]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
[grub2.git] / ChangeLog
CommitLineData
d3539132 12009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
2
3 Framebuffer split.
4
5 * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
6 subsystem at the end.
7 * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
8 (video_fb_mod_SOURCES): New variable.
9 (video_fb_mod_CFLAGS): Likewise.
10 (video_fb_mod_LDFLAGS): Likewise.
11 * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
12 video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
13 * video/i386/pc/vbeblit.c: Moved from here ...
14 * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
15 * video/i386/pc/vbefill.c: Moved from here ...
16 * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
17 * video/i386/pc/vbeutil.c: Moved from here ...
18 * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
19 * include/grub/i386/pc/vbeblit.h: Moved from here ...
20 * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
21 * include/grub/i386/pc/vbefill.h: Moved from here ...
22 * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
23 * include/grub/i386/pc/vbeutil.h: Moved from here ...
24 * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
25 * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
26 * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
27 * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
28 (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
29 (grub_video_adapter): Added 'get_info_and_fini'.
30 (grub_video_get_info_and_fini): New prototype.
31 (grub_video_set_mode): make modestring const char *.
32 * loader/i386/linux.c (grub_linux_setup_video): Use
33 grub_video_get_info_and_fini.
34 (grub_linux_boot): Move modesetting just before booting.
35 * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
36 grub_video_get_info_and_fini.
37 * video/i386/pc/vbe.c: Moved framebuffer part ...
38 * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
39 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
40 grub_video_fbstd_colors and grub_video_fb_set_palette.
41 (grub_video_vbe_init): Clear 'framebuffer' variable and use
42 grub_video_fb_init.
43 (grub_video_vbe_fini): Use grub_video_fb_fini.
44 (grub_video_vbe_setup): Use framebuffer.render_target instead of
45 render_target and use grub_video_fb_set_active_render_target and
46 grub_video_fb_set_palette.
47 (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
48 (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
49 (grub_video_vbe_adapter): Use framebuffer.
50 * video/video.c (grub_video_get_info_and_fini): New function.
51 (grub_video_set_mode): Make modestring const char *.
52 (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
53 values are already initialised.
54
d404ee56 552009-08-14 Pavel Roskin <proski@gnu.org>
56
57 * boot/i386/pc/cdboot.S: Use LOCAL for local labels. Eliminate
58 ABS and APPLE_CC.
59 * boot/i386/pc/diskboot.S: Likewise.
60 * boot/i386/pc/lnxboot.S: Likewise. Hardcode the number of code
61 sectors allow compilation on MacOSX.
62 * conf/i386-pc.rmk: Enable unconditional compilation of
63 lnxboot.img.
64
9a10df16 652009-08-13 Colin Watson <cjwatson@ubuntu.com>
66
67 * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
68 * util/grub.d/00_header.in: Enter interruptible sleep if
69 GRUB_HIDDEN_TIMEOUT is set.
70
be3c9ca7 712009-08-13 Yves Blusseau <blusseau@zetam.org>
72
73 * include/grub/symbol.h: Add the LOCAL macro.
74 * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
75 starting with "L_".
76
1f9e557e 772009-08-13 Pavel Roskin <proski@gnu.org>
78
9ca62843 79 * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
80 any modern compilers we support.
81
1f9e557e 82 * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
83 Use local labels starting with "L_" so that Apple assembler
84 knows they are local.
85
81623db6 862009-08-10 Robert Millan <rmh.grub@aybabtu.com>
87
88 * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
89 (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
90 (bsd_kernel_types): ... this enum.
91
92 * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
93 (grub_cmd_freebsd_module_elf): Abort with "You need to load the
94 kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
95
96 (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
97 (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
98 (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
99 messages.
100
f5d35e7a 1012009-08-08 Robert Millan <rmh.grub@aybabtu.com>
102
103 * util/grub-dumpdevtree: Moved from here ...
104 * util/i386/efi/grub-dumpdevtree: ... to here.
105 (hexify): New function. Converts a string to its hex version.
106 Generate hex versions of "efi" and "device-properties" by calling
107 hexify() on the ASCII strings rather than by hardcoding numbers.
108
d1e1d527 1092009-08-08 Robert Millan <rmh.grub@aybabtu.com>
110
111 * fs/jfs.c: Update copyright year.
112
1ebbe064 1132009-08-08 Felix Zielcke <fzielcke@z-51.de>
114
115 * util/grub.d/00_header.in: Fix a comment.
116 * util/grub.d/10_linux.in: Likewise.
117 * util/grub.d/10_windows.in: Likewise.
118 * util/grub.d/10_hurd.in: Likewise.
119
a78c8d24 1202009-08-08 Felix Zielcke <fzielcke@z-51.de>
121
122 * util/grub-mkconfig.in: Allow the user to specify the used font
123 with GRUB_FONT.
124
29a6b9e8 1252009-08-08 Pavel Roskin <proski@gnu.org>
126
b5f16cc4 127 * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
128 available, xfs.mod needs it now.
129
2f5cb827 130 * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
131 the "g" modifier in sed when the intention is to strip something
132 once. This fixes comparison of kernels with multiple dashes.
133
29a6b9e8 134 * util/grub-mkconfig.in: Define datarootdir, datadir may depend
135 on it. Add missing space before closing bracket. Fix
136 misleading formatting.
137
892a3d98 1382009-08-07 Robert Millan <rmh.grub@aybabtu.com>
139
140 * docs/grub.texi: Major overhaul. Remove all sections that are
141 specific to GRUB Legacy, or mostly composed of Legacy-specific
142 information.
143
ed94253f 1442009-08-07 Robert Millan <rmh.grub@aybabtu.com>
145
146 * docs/version.texi: New file. Provides version information for
147 grub.texi.
148
126d6628 1492009-08-07 Robert Millan <rmh.grub@aybabtu.com>
150
151 * docs/grub.texi: Update CVS information to SVN.
152 Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
153
998b5aa9 1542009-08-07 Felix Zielcke <fzielcke@z-51.de>
155
156 * util/grub-mkconfig.in: Remove a wrong `fi'.
157
818e094a 1582009-08-07 Felix Zielcke <fzielcke@z-51.de>
159
160 * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
161 (grub_jfs_uuid): New function.
162 (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
163
b969c52f 1642009-08-07 Felix Zielcke <fzielcke@z-51.de>
165
166 * util/grub-mkconfig_lib.in (font_path): Move the functionality
167 of it to ...
168 * util/grub-mkconfig.in: ... here. Prefer unicode.pf2 and
169 unifont.pf2 over ascii.pf2. Export LANG=C in case ascii.pf2 gets used.
170
7a4894cc 1712009-08-07 Robert Millan <rmh.grub@aybabtu.com>
172
173 * util/grub.d/10_linux.in (test_numeric): Moved from here ...
174 * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
175 Update all users.
176
177 * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
178 not just "vmlinu[zx]".
179 Moved from here ...
180 * util/grub-mkconfig_lib.in (version_test_gt): ... to here. Update
181 all users.
182
183 * util/grub.d/10_linux.in (find_latest): Moved from here ...
184 * util/grub-mkconfig_lib.in (version_find_latest): ... to here. Update
185 all users.
186
4e2171f8 1872009-08-07 Robert Millan <rmh.grub@aybabtu.com>
188
189 * util/grub.d/10_freebsd.in: Use an absolute device path for
190 `vfs.root.mountfrom'. Set `vfs.root.mountfrom.options=rw'.
191
6dcfcb32 1922009-08-06 Felix Zielcke <fzielcke@z-51.de>
193
194 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
195 handling of multiple abstraction modules.
196
f56a8756 1972009-08-04 Robert Millan <rmh.grub@aybabtu.com>
198
199 Fix a bug resulting in black screen when loading Linux using a
200 packed video mode.
201
202 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
203 function.
204
205 * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
206 (grub_vbe_bios_getset_dac_palette_width): New function.
207 (grub_vbe_bios_get_dac_palette_width)
208 (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
209 grub_vbe_bios_getset_dac_palette_width()).
210
211 * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
212 check for return status.
213 (grub_vbe_get_video_mode_info): When getting information for a packed
214 mode (<= 8 bpp), obtain DAC palette width using
215 grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
216 {red,green,blue}_mark_size.
217
222671b2 2182009-08-04 Felix Zielcke <fzielcke@z-51.de>
219
ecb1a6d9 220 * commands/search.c (options): Fix help output to match actual code.
222671b2 221
f84114f5 2222009-08-02 Vladimir Serbinenko <phcoder@gmail.com>
223
224 * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
225 of homegrown code.
226
bd288a20 2272009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
e768b770 228
229 * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
230 on XFS or ReiserFS.
231
8aab5e25 2322009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
233
234 Support Apple partition map with sector size different from 512 bytes.
235
236 * partmap/apple.c (grub_apple_header): New field 'blocksize'.
237 (apple_partition_map_iterate): Respect 'aheader.blocksize'
238 and 'apart.partmap_size'.
239
6ad6258a 2402009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
2412009-08-01 Robert Millan <rmh.grub@aybabtu.com>
242
243 Fix cpuid command.
244
245 * commands/i386/cpuid.c (options): New variable.
246 (grub_cmd_cpuid): Return real error.
247 (GRUB_MOD_INIT(cpuid)): Declare options.
248
67459bc6 2492009-07-31 Vladimir Serbinenko <phcoder@gmail.com>
250
251 * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
252 valid.
253
fbc6ab54 2542009-07-31 Bean <bean123ch@gmail.com>
255
256 * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
257 log2_inode.
258 (grub_fshelp_node): Move inode field to the end.
259 (grub_xfs_data): Remove inode field.
260 (grub_xfs_inode_block): Calculate inode size using sblock.
261 (grub_xfs_inode_offset): Likewise.
262 (grub_xfs_read_inode): Calculate inode size using sblock.
263 (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
264 (grub_xfs_iterate_dir): Calculate inode size using sblock.
265 (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
266 to match inode size.
267 (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
268 not accessible when data is null.
269 (grub_xfs_open): Likewise.
270
f45d6cfc 2712009-07-31 Bean <bean123ch@gmail.com>
272
273 * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
274 Don't change pv->disk if it's already set.
275
276 * disk/raid.c (grub_raid_scan_device): Merge this function into ...
277 (grub_raid_register): ... here.
278 (grub_raid_rescan): Removed.
279
280 * include/grub/raid.h (grub_raid_rescan): Removed.
281
282 * util/grub-fstest.c: Remove include file <grub/raid.h>.
283 (fstest): Replace grub_raid_rescan with module fini function followed
284 by init function.
285
286 * util/grub-probe.c: Add include file <grub/raid.h>.
287 (probe_raid_level): New function.
288 (probe): Detect abstraction by walking the disk device, support two
289 level of abstraction (LVM on RAID) when detecting partition map.
290
24443b5a 2912009-07-31 Pavel Roskin <proski@gnu.org>
292
293 * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
294 to grub_zalloc(), it was erroneous.
295 Reported by Bean <bean123ch@gmail.com>
296
a275d9e7 2972009-07-30 Vladimir Serbinenko <phcoder@gmail.com>
298
299 * util/i386/pc/grub-setup.c (setup): Check that no partition is in
300 embeding zone, not only the first one.
301
56c5a47f 3022009-07-29 Joe Auricchio <jauricchio@gmail.com>
303
304 * term/gfxterm.c (clear_char): New function.
305 (grub_virtual_screen_setup): Use clear_char.
306 (scroll_up): Likewise.
307 (grub_virtual_screen_cls): Likewise.
308
67bb323a 3092009-07-29 Felix Zielcke <fzielcke@z-51.de>
310
311 * util/deviceiter.c (get_acceleraid_disk_name): New static
312 function.
313 (grub_util_iterate_devices): Handle Accelraid devices.
314 * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
315
388a7c75 3162009-07-28 Robert Millan <rmh.grub@aybabtu.com>
317
318 * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
319 separator for the suggested gfxpayload string (';' collides with the
320 parser and needs escaping).
321
3bb7abcf 3222009-07-28 Vladimir Serbinenko <phcoder@gmail.com>
323
324 * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
325 Clear direction flag before jumping to OS.
326 (grub_multiboot2_real_boot): Likewise.
327
2ddd36d7 3282009-07-28 Felix Zielcke <fzielcke@z-51.de>
329
330 * util/i386/pc/grub-install: Fix parsing of --disk-module
331 option.
332
c521b62b 3332009-07-28 Felix Zielcke <fzielcke@z-51.de>
334
335 * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
336 when embedding.
337
880e0a0c 3382009-07-26 Felix Zielcke <fzielcke@z-51.de>
339
340 * util/grub-mkconfig.in (package_version): New variable.
341 Use it do display the version.
342
2366e356 3432009-07-25 Felix Zielcke <fzielcke@z-51.de>
344
345 * kern/file.c (grub_file_open): Revert to previous check with
346 grub_errno.
347
7ad8c80e 3482009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
349
350 * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
351 from help line. It's out of sync with code.
352
72b9658b 3532009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
354
355 * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
356 entries on failed boot.
357
77435277 3582009-07-25 Felix Zielcke <fzielcke@z-51.de>
359
360 * kern/file.c (grub_file_open): Fix an error check.
361
fcaa8b21 3622009-07-24 Vladimir Serbinenko <phcoder@gmail.com>
363
35d16c74 364 * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
365 partition map couldn't be identified.
fcaa8b21 366
48904cd1 3672009-07-23 Pavel Roskin <proski@gnu.org>
368
ef3c317f 369 * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
370 instead of WORDS_BIGENDIAN. Use grub_le_to_cpu32(), so that the
371 case of little endian words becomes just an optimization.
372 Respect const modifier.
373 (md5_final): Use code that doesn't depend on endianess.
374
48904cd1 375 * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
376 to avoid loss of upper bits if align is unsigned and shorter
377 than addr.
378
260c9a89 3792009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
380
381 UUID support for UFS
382
383 * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
384 (grub_ufs_uuid): New function.
385 (grub_ufs_fs): add .uuid
386
f76ce889 3872009-07-21 Pavel Roskin <proski@gnu.org>
388
389 * kern/dl.c (grub_dl_check_header): Make static.
390
6a6cbcaf 3912009-07-21 Felix Zielcke <fzielcke@z-51.de>
392
393 * util/grub.d/30_os-prober.in: Remove unused CHAINROOT. Don't
394 add drivemap for Vista. It breaks Windows 7.
395
cffcddb2 3962009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
397
398 * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
399 128 bytes
400
1ef44b80 4012009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
402
403 Add BFS support
404
405 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
406 (grub_fstest_SOURCES): Likewise.
407 (pkglib_MODULES): Add befs.mod.
408 (befs_mod_SOURCES): New variable.
409 (befs_mod_CFLAGS): Likewise.
410 (befs_mod_LDFLAGS): Likewise.
411 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
412 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
413 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
414 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
415 (grub_setup_SOURCES): Likewise.
416 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
417 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
418 (grub_setup_SOURCES): Likewise.
419 * fs/befs.c: New file.
420 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
421 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
422 (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
423 (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
424 (B_KEY_INDEX_ALIGN): New declaration.
425 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
426 (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
427 (grub_afs_btree) [MODE_BFS]: New conditional declaration.
428 (grub_afs_sblock) [MODE_BFS]: Remove link_count.
429 (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
430 (grub_afs_mount) [MODE_BFS]: Likewise.
431 (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
432 (grub_afs_fs): Use GRUB_AFS_FSNAME
433 (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
434 (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
435 (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
436 (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
437
4f253044 4382009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
439
440 * util/getroot.c (find_root_device): Add support for MacOSX.
441 * util/hostdisk.c: Likewise.
442
57a55913 4432009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
444
445 * font/font.c (find_glyph): Check whether a font is present to avoid
446 segmentation fault.
75421ca9 447
4482009-07-20 Joe Auricchio <jauricchio@gmail.com>
04c7c429 449
450 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
451
e98cd0c2 4522009-07-20 Pavel Roskin <proski@gnu.org>
453
454 * configure.ac: Trim excessively wordy excuses.
455
1d2d169a 4562009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
457
458 Add symlink, mtime and label support to AtheFS.
459
460 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
461 (grub_afs_iterate_dir): Handle symlinks.
462 (grub_afs_open): Use grub_afs_read_symlink.
463 (grub_afs_dir): Likewise.
464 Pass mtime.
465 (grub_afs_label): New function.
466 (grub_afs_fs): Add grub_afs_label.
467 (grub_afs_read_symlink): New function.
468
186f3189 4692009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
470
471 Fix AtheFS support.
472
473 * fs/afs.c: Fix comments style.
474 (grub_afs_blockrun): Declare as packed.
475 (grub_afs_datastream): Likewise.
476 (grub_afs_bnode): Likewise.
477 (grub_afs_btree): Likewise.
478 (grub_afs_sblock): Likewise.
479 Declare `name' as char.
480 (grub_afs_inode): Declare as packed.
481 Change void *vnode to grub_uint32_t unused.
482 (grub_afs_iterate_dir): Check that key_size is positive.
483 (grub_afs_mount): Don't read superblock twice.
75421ca9 484 (grub_afs_dir): Don't free node in case of error,
186f3189 485 grub_fshelp_find_file already handles this.
486 (grub_afs_open): Likewise.
487
5680109e 4882009-07-19 Pavel Roskin <proski@gnu.org>
489
490 * Makefile.in: Remove LIBLZO and enable_lzo.
491 * conf/i386-pc.rmk: Remove lzo support.
492 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
493 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
494 support.
495 * kern/i386/pc/lzo1x.S: Remove.
496 * kern/i386/pc/startup.S: Remove lzo support.
497 * util/i386/pc/grub-mkimage.c: Likewise.
498
ac70fa32 4992009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
500
501 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
502 * fs/xfs.c (grub_xfs_dir): Likewise.
503 * fs/afs.c (grub_afs_dir): Likewise.
504 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
505 (grub_iso9660_open): Likewise.
506 * fs/jfs.c (grub_jfs_open): Likewise.
507 * fs/ext2.c (grub_ext2_dir): Likewise.
508 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
509 * script/sh/lexer.c (grub_script_yylex): Likewise.
75421ca9 510
eab58da2 5112009-07-16 Pavel Roskin <proski@gnu.org>
512
d2838156 513 * configure.ac: Never add "-c" to CFLAGS.
514
55c70904 515 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
516
43e6200c 517 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
518 grub_cv_cc_efiemu should be used.
519
ce7a733d 520 * configure.ac: Typo fixes.
521
eab58da2 522 * kern/mm.c (grub_zalloc): New function.
523 (grub_debug_zalloc): Likewise.
524 * include/grub/mm.h: Declare grub_zalloc() and
525 grub_debug_zalloc().
526 * util/misc.c (grub_zalloc): New function.
527 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
528 instead of grub_malloc(), remove unneeded initializations.
529 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
530 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
531 * commands/parttool.c (grub_cmd_parttool): Likewise.
532 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
533 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
534 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
535 * disk/usbms.c (grub_usbms_finddevs): Likewise.
536 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
537 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
538 (grub_cmd_efiemu_pnvram): Likewise.
539 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
540 * fs/iso9660.c (grub_iso9660_mount): Likewise.
541 (grub_iso9660_iterate_dir): Likewise.
542 * fs/jfs.c (grub_jfs_opendir): Likewise.
543 * fs/ntfs.c (list_file): Likewise.
544 (grub_ntfs_mount): Likewise.
545 * kern/disk.c (grub_disk_open): Likewise.
546 * kern/dl.c (grub_dl_load_core): Likewise.
547 * kern/elf.c (grub_elf_file): Likewise.
548 * kern/env.c (grub_env_context_open): Likewise.
549 (grub_env_set): Likewise.
550 (grub_env_set_data_slot): Likewise.
551 * kern/file.c (grub_file_open): Likewise.
552 * kern/fs.c (grub_fs_blocklist_open): Likewise.
553 * loader/i386/multiboot.c (grub_module): Likewise.
554 * loader/xnu.c (grub_xnu_create_key): Likewise.
555 (grub_xnu_create_value): Likewise.
556 * normal/main.c (grub_normal_add_menu_entry): Likewise.
557 (read_config_file): Likewise.
558 * normal/menu_entry.c (make_screen): Likewise.
559 * partmap/sun.c (sun_partition_map_iterate): Likewise.
560 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
561 * script/sh/script.c (grub_script_parse): Likewise.
562 * video/bitmap.c (grub_video_bitmap_create): Likewise.
563 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
564 * video/readers/png.c (grub_png_output_byte): Likewise.
565 (grub_video_reader_png): Likewise.
566
830afef7 5672009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
5ce5507f 568
569 Enable all targets that can be built by default
570
830afef7 571 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
5ce5507f 572 grub-mkfont and grub-fstest if they can be built
573
ee293aee 5742009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
575
576 Fix hang and segmentation fault in grub-emu-usb
577
578 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
579 * util/usb.c (grub_libusb_devices): likewise
580 (grub_libusb_init): rename to ...
581 (GRUB_MOD_INIT (libusb)):...this
582 (grub_libusb_fini): rename to ..
583 (GRUB_MOD_FINI (libusb)):...this
584 * disk/usbms.c (grub_usbms_transfer): fix retry logic
585 * include/grub/disk.h (grub_raid_init): removed, it's useless
586 (grub_raid_fini): likewise
587 (grub_lvm_init): likewise
588 (grub_lvm_fini): likewise
589 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
590 by grub_init_all
591
94414221 5922009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
593
594 Fix libusb
595
596 * Makefile.in (LIBUSB): new macro
597 * genmk.rb (Utility/print_tail): new method
598 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
599 (top level): call util.print_tail at the end.
600
59ade63d 6012009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
602
603 Make FreeBSD accept zpool.cache
604
605 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
606 type is /boot/zfs/zpool.cache
607
a58da8c7 6082009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
609
610 Fix 64-bit efiemu
611
612 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
613 correct wrong typedef
614 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
615
20591577 6162009-07-15 Pavel Roskin <proski@gnu.org>
617
560ca572 618 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
619 * kern/disk.c (struct grub_disk_cache): Likewise.
620
e8e8e4fd 621 * commands/probe.c (options): Typo fix.
622
fde24e10 623 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
624 Increase to 0x5a to accommodate FAT32. Adjust other offsets
625 accordingly.
626 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
627
379c54c1 628 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
629 the end of "Error" to make the message more readable.
630
7bd8f5bf 631 * boot/i386/pc/boot.S (kernel_segment): Remove.
632 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
633 for destination.
634
40b132c5 635 * boot/i386/pc/boot.S (boot_version): Remove.
636 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
637 Remove.
638
20591577 639 * include/grub/i386/pc/boot.h: Sort all offsets.
640 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
641 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
642 * boot/i386/pc/boot.S: Assert location of every offset listed in
643 include/grub/i386/pc/boot.h.
644
2df32b2c 6452009-07-13 Pavel Roskin <proski@gnu.org>
646
44b5d879 647 * include/grub/i386/coreboot/machine.h: Rename
648 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
649 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
650 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
651
17dc3751 652 * kern/dl.c: Force native word size to suppress warnings when
653 compiling grub-emu.
654
2df32b2c 655 * kern/device.c (grub_device_iterate): Change struct part_ent to
656 hold the name, not a pointer to it. Use one grub_malloc() per
657 partition, not two. Free partition_name if grub_malloc() fails.
658 Set ents to NULL only before grub_partition_iterate() is called.
659
75c59f59 6602009-07-11 Bean <bean123ch@gmail.com>
661
662 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
663 childname.
664
0ae1bf88 6652009-07-10 Bean <bean123ch@gmail.com>
6662009-07-10 Robert Millan <rmh.grub@aybabtu.com>
667
668 * kern/ieee1275/openfw.c (grub_children_iterate)
669 (grub_devalias_iterate): Fix size evaluation for property or path
670 strings, which was broken since r2132.
671
8279cade 6722009-07-07 Pavel Roskin <proski@gnu.org>
673
7d8a52d3 674 * commands/search.c (search_file): Merge into ...
675 (search_fs): ... this. Accept search type as argument.
676 (grub_cmd_search): Pass search type to search_fs().
677
25f9a05a 678 * include/grub/util/console.h: New file.
679 * util/console.c: Use it instead of grub/machine/console.h.
680 * util/grub-emu.c: Likewise.
681
8279cade 682 * lib/arg.c (find_long_option): Remove.
683 (find_long): Add `len' argument, make `s' const char *.
684 (grub_arg_parse): Parse long options in place, not in a
685 temporary buffer.
686
4a11b60f 6872009-07-06 Pavel Roskin <proski@gnu.org>
688
99f68041 689 * commands/search.c (search_fs): Fix potential NULL pointer
690 dereference.
691
4a11b60f 692 * commands/search.c (search_fs): Replace QUID macro with quid_fn
693 function pointer.
694
e110f4de 6952009-07-06 Daniel Mierswa <impulze@impulze.org>
696
697 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
698 comparison.
699
46eeb6a2 7002009-07-05 Pavel Roskin <proski@gnu.org>
701
bab74958 702 * include/grub/i386/linux.h (struct linux_kernel_params):
703 Restore padding3, it's still needed.
704
46eeb6a2 705 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
706 FreeBSD.
707 * util/osdetect.lua: Likewise.
708
b4a1dc79 7092009-07-05 Bean <bean123ch@gmail.com>
710
711 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
712
713 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
714 (grub_lua_getenv): Likewise.
715 (grub_lua_setenv): Likewise.
716 (save_errno): New function.
717 (push_result): Likewise.
718 (grub_lua_enum_device): Likewise.
719 (grub_lua_enum_file): Likewise.
720 (grub_lua_file_open): Likewise.
721 (grub_lua_file_close): Likewise.
722 (grub_lua_file_seek): Likewise.
723 (grub_lua_file_read): Likewise.
724 (grub_lua_file_getline): Likewise.
725 (grub_lua_file_getsize): Likewise.
726 (grub_lua_file_getpos): Likewise.
727 (grub_lua_file_eof): Likewise.
728 (grub_lua_file_exist): Likewise.
729 (grub_lua_add_menu): Likewise.
730
731 * script/lua/grub_lua.h (isupper): New inline function.
732 (islower): Likewise.
733 (ispunct): Likewise.
734 (isxdigit): Likewise.
735 (strcspn): Change to normal function.
736 (strpbkr): New function declaration.
737 (memchr): Likewise.
738
739 * script/lua/grub_main.c (scan_str): New function.
740 (strcspn): Likewise.
741 (strpbrk): Likewise.
742 (memchr): Likewise.
743
744 * script/lua/linit.c (lualibs): Enable the string library.
745
746 * util/osdetect.lua: New file.
747
2da92295 7482009-07-04 Robert Millan <rmh.grub@aybabtu.com>
749
750 * include/grub/i386/linux.h (struct linux_kernel_params): Add
751 `capabilities' member.
752
b2582ec9 7532009-07-02 Pavel Roskin <proski@gnu.org>
754
755 * genparttoollist.sh: Add missing newline at the end.
756
32622956 7572009-07-01 Pavel Roskin <proski@gnu.org>
758
87a7339e 759 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
760
d23af54e 761 * util/hostdisk.c (open_device): Remove `const' from
762 `sysctl_size', as sysctlbyname() can change it (in this case it
763 doesn't actually happen).
764
c94b18a9 765 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
766 using signed long int constants.
767
c6cd3ef0 768 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
769 constant to avoid a warning on FreeBSD.
770
0df63420 771 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
772 where it's needed.
773
999577f1 774 * Makefile.in: Install include/grub/machine symlink.
775
6f41557f 776 * Makefile.in: When installing symlinks, use "cp -fR", which
777 works on FreeBSD and MacOSX.
778 From Yves Blusseau <cl7m42e02@sneakemail.com>
779
c8d22988 780 * kern/dl.c (grub_dl_resolve_symbol): Make static.
781 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
782
1b96e952 783 * util/misc.c: Move grub_reboot() and grub_halt() ...
784 * util/grub-emu.c: ... here. Make main_env static.
785 * include/grub/util/misc.h: Remove main_env.
786
2ef0084d 787 * kern/mm.c: Use correct format to print size_t.
788
32622956 789 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
790 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
791 * kern/powerpc/dl.c: Likewise.
792 * kern/sparc64/dl.c: Likewise.
793 * kern/x86_64/dl.c: Likewise.
794
3f7f0cd0 7952009-07-01 Robert Millan <rmh.grub@aybabtu.com>
796
797 Fix grub-emu build on sparc64-ieee1275.
798
75421ca9 799 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
3f7f0cd0 800 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
801
211d06b5 8022009-07-01 Robert Millan <rmh.grub@aybabtu.com>
803
804 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
805 (grub_reboot, grub_halt): New functions.
806
807 * util/i386/pc/misc.c: Delete. Update all users.
808 * util/sparc64/ieee1275/misc.c: Likewise.
809 * util/powerpc/ieee1275/misc.c: Likewise.
810
aaf53e3c 8112009-07-01 Robert Millan <rmh.grub@aybabtu.com>
812
813 * conf/i386.rmk (setjmp_mod_SOURCES)
814 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
815 * conf/common.rmk (setjmp_mod_SOURCES)
816 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
817 to use $(target_cpu).
818 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
819 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
820 * conf/powerpc-ieee1275.rmk: Likewise.
821 * conf/sparc64-ieee1275.rmk: Likewise.
822
823 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
824 $(target_cpu) for kern/$(target_cpu)/dl.c.
825 * conf/i386-efi.rmk: Likewise.
826 * conf/i386-ieee1275.rmk: Likewise.
827 * conf/x86_64-efi.rmk: Likewise.
828 * conf/i386-coreboot.rmk: Likewise.
829 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
830 $(target_cpu) for kern/$(target_cpu)/dl.c and for
831 kern/$(target_cpu)/cache.S.
832 * conf/sparc64-ieee1275.rmk: Likewise.
833
a337130b 8342009-07-01 Robert Millan <rmh.grub@aybabtu.com>
835
836 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
837 type to `grub_uint8_t', and adjust `padding9' accordingly.
838
c6fe4d53 8392009-06-29 Robert Millan <rmh.grub@aybabtu.com>
840
b09db61d 841 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
842
c6fe4d53 843 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
844 assembly in final jump, using register constraints.
845
b09db61d 846 (grub_linux_boot): For text mode, initialize `have_vga' using
847 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
848
849 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
850 right before the final jump.
851
852 Set `video_mode' to 0x3.
853
854 Document initialization of `video_page', `video_mode' and
855 `video_ega_bx'.
856
28333ad0 8572009-06-29 Robert Millan <rmh.grub@aybabtu.com>
858
859 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
860 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
75421ca9 861 and set GRUB_LINUX_FLAG_QUIET appropriately.
28333ad0 862
02164e1b 8632009-06-29 Robert Millan <rmh.grub@aybabtu.com>
864
865 Fix build on Debian / sparc.
866
867 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
868
18b6c557 8692009-06-28 Pavel Roskin <proski@gnu.org>
870
85f2aab6 871 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
872 fix a warning.
873
18b6c557 874 * util/grub.d/10_linux.in: Match SUSE style initrd names.
875
ad760f81 8762009-06-27 Robert Millan <rmh.grub@aybabtu.com>
877
878 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
879 `err'.
880
87a4623b 8812009-06-27 Robert Millan <rmh.grub@aybabtu.com>
882
883 Revert r2338.
884
885 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
886 file can't be opened. grub_file_open() is already supposed to set
75421ca9 887 grub_errno / grub_errmsg appropriately.
87a4623b 888 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
889
8231fb77 8902009-06-27 Pavel Roskin <proski@gnu.org>
8912009-06-27 Robert Millan <rmh.grub@aybabtu.com>
892
893 * include/grub/dl.h: Include grub/elf.h.
894 (struct grub_dl): Add symtab field.
895 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
896 GRUB_MODULES_MACHINE_READONLY.
897 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
898 of the header for read-only modules.
899 (grub_dl_unload): Free mod->symtab for read-only modules.
900 * kern/i386/dl.c: Use mod->symtab.
901 * kern/powerpc/dl.c: Likewise.
902 * kern/sparc64/dl.c: Likewise.
903 * kern/x86_64/dl.c: Likewise.
904
905 * conf/i386-qemu.rmk: New file.
906 * kern/i386/qemu/startup.S: Likewise.
907 * kern/i386/qemu/mmap.c: Likewise.
908 * boot/i386/qemu/boot.S: Likewise.
909 * include/grub/i386/qemu/time.h: Likewise.
910 * include/grub/i386/qemu/serial.h: Likewise.
911 * include/grub/i386/qemu/kernel.h: Likewise.
912 * include/grub/i386/qemu/console.h: Likewise.
913 * include/grub/i386/qemu/boot.h: Likewise.
914 * include/grub/i386/qemu/init.h: Likewise.
915 * include/grub/i386/qemu/machine.h: Likewise.
916 * include/grub/i386/qemu/loader.h: Likewise.
917 * include/grub/i386/qemu/memory.h: Likewise.
918
919 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
920 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
921 [qemu] (pkglib_IMAGES): Add `boot.img'.
922 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
923 [qemu] (boot_img_FORMAT): New variables.
924 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
925 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
926 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
927 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
928 [qemu] (kernel_img_FORMAT): New variables.
929
930 * configure.ac: Recognise `i386-qemu'.
931
932 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
933 (for no compression).
934 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
935 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
936 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
937 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
938 ifdefs).
939
97fe384e 9402009-06-27 Pavel Roskin <proski@gnu.org>
941
942 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
943 read.
944 * efiemu/prepare32.c: Likewise.
945 * efiemu/prepare64.c: Likewise.
946
c402ab17 9472009-06-26 Pavel Roskin <proski@gnu.org>
948
949 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
950 * include/grub/elf.h: Define symbols without "32" or "64" based
951 on GRUB_TARGET_WORDSIZE.
952 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
953 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
954 ELF definitions.
955 * efiemu/loadcore64.c: Likewise.
956 * loader/i386/bsd32.c: Likewise.
957 * loader/i386/bsd64.c: Likewise.
958 * kern/dl.c: Remove own ELF definitions.
959 * util/i386/efi/grub-mkimage.c: Likewise.
960
9bbdfd4d 9612009-06-23 Robert Millan <rmh.grub@aybabtu.com>
962
963 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
964 segment 0x0 unconditionally, because the reference generated by
965 GAS is an absolute address.
966
a42ce6e9 9672009-06-22 Robert Millan <rmh.grub@aybabtu.com>
968
969 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
970 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
971
c952cf92 9722009-06-22 Robert Millan <rmh.grub@aybabtu.com>
973
974 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
975 indexes. Check for -f explicitly.
cc3752ad 976 (search_file): Improve error message.
977 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
c952cf92 978
132a0a59 9792009-06-22 Robert Millan <rmh.grub@aybabtu.com>
980
981 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
982 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
983
387a140c 9842009-06-22 Robert Millan <rmh.grub@aybabtu.com>
985
986 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
987 * conf/i386-ieee1275.rmk: Likewise.
988 * conf/i386-coreboot.rmk: Likewise.
989
990 * kern/i386/pc/startup.S (grub_stop): Remove function.
991 * kern/i386/ieee1275/startup.S: Likewise.
992 * kern/i386/coreboot/startup.S: Likewise.
993 * kern/i386/misc.S (grub_stop): New function.
994
41da9665 9952009-06-22 Robert Millan <rmh.grub@aybabtu.com>
996
997 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
998 * kern/i386/realmode.S (real_to_prot): ... to here.
999
bf337234 10002009-06-22 Robert Millan <rmh.grub@aybabtu.com>
1001
1002 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
1003 with `kernel.img'.
1004 (kernel_elf_SOURCES): Rename to ...
1005 (kernel_img_SOURCES): ... this.
1006 (kernel_elf_HEADERS): Rename to ...
1007 (kernel_img_HEADERS): ... this. Update all users.
1008 (kernel_elf_ASFLAGS): Rename to ...
1009 (kernel_img_ASFLAGS): ... this.
1010 (kernel_elf_CFLAGS): Rename to ...
1011 (kernel_img_CFLAGS): ... this.
1012 (kernel_elf_LDFLAGS): Rename to ...
1013 (kernel_img_LDFLAGS): ... this.
1014 * conf/i386-coreboot.rmk: Likewise.
1015 * conf/powerpc-ieee1275.rmk: Likewise.
1016
1017 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
1018 with "kernel.img".
1019
f52196ff 10202009-06-21 Pavel Roskin <proski@gnu.org>
1021
c3cee413 1022 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
1023 to match nested functions.
1024 * loader/sparc64/ieee1275/linux.c: Likewise.
1025
f52196ff 1026 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
1027
58750afc 10282009-06-21 Robert Millan <rmh.grub@aybabtu.com>
1029
1030 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
1031 all i386 platforms.
1032
15355c7d 10332009-06-21 Robert Millan <rmh.grub@aybabtu.com>
1034
1035 Fix asm file handling on ELF, and remove workarounds.
1036
1037 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
75421ca9 1038 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
15355c7d 1039 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
1040 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
1041
3f3ec72b 10422009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
1043
1044 Load BSD ELF modules
1045
1046 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
1047 and loader/i386/bsd64.c
1048 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
1049 (FREEBSD_MODTYPE_ELF_MODULE): New definition
1050 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
1051 (grub_freebsd_load_elfmodule32): New declaration
1052 (grub_freebsd_load_elfmoduleobj64): Likewise
1053 (grub_freebsd_load_elf_meta32): Likewise
1054 (grub_freebsd_load_elf_meta64): Likewise
1055 (grub_freebsd_add_meta): Likewise
1056 (grub_freebsd_add_meta_module): Likewise
1057 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
1058 (grub_freebsd_add_meta_module): Likewise and move module-specific
1059 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
1060 (grub_cmd_freebsd): Add elf-kernel specific parts
1061 based on grub_freebsd_add_meta_module
1062 (grub_cmd_freebsd_module): Add type parsing moved from
1063 grub_freebsd_add_meta_module
1064 (grub_cmd_freebsd_module_elf): New function
1065 (cmd_freebsd_module_elf): New variable
1066 (GRUB_MOD_INIT): Register freebsd_module_elf
1067 * loader/i386/bsd32.c: New file
1068 * loader/i386/bsd64.c: Likewise
1069 * loader/i386/bsdXX.c: Likewise
1070 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
1071 (grub_elf64_load): Likewise
1072 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
1073 All users updated
1074 (grub_elf64_load_hook_t): Likewise
1075
0db15301 10762009-06-21 Colin Watson <cjwatson@ubuntu.com>
1077
1078 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
1079 variable.
1080 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
1081 don't write a menu entry for recovery mode.
1082
546796c1 10832009-06-20 Robert Millan <rmh.grub@aybabtu.com>
1084
1085 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
1086 after it's no longer needed.
1087
cd7310d5 10882009-06-20 Robert Millan <rmh.grub@aybabtu.com>
1089
1090 * include/grub/i386/loader.h (grub_linux_prot_size)
1091 (grub_linux_tmp_addr, grub_linux_real_addr)
1092 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
1093 GRUB_MACHINE_PCBIOS.
1094 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
1095 common grub_util_info() call to ...
1096 (generate_image): ... here.
1097 Fix use of uninitialized memory, comparison of signed with
1098 unsigned integers and memory leak.
1099 Remove bogus module address message.
1100
ab32d3b5 11012009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
1102
1103 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
1104 grub_raid_register
1105 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
1106
024ef597 11072009-06-19 Pavel Roskin <proski@gnu.org>
1108
1109 * configure.ac: Remove stray AC_MSG_CHECKING.
1110
3ac72b51 11112009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
1112
1113 * disk/scsi.c (grub_scsi_open): use continue instead of big if
dd74360c 1114
e14cd814 11152009-06-18 Pavel Roskin <proski@gnu.org>
1116
1117 * conf/common.rmk: Add fs_file.mod.
1118 * disk/fs_file.c: New file.
1119 * include/grub/disk.h (enum grub_disk_dev_id): Add
1120 GRUB_DISK_DEVICE_FILE_ID.
1121
26586d98 11222009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
1123
1124 Fix build with Apple's toolchain. Part 2
1125
1126 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
1127 a fake start
1128
26de2bcd 11292009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
1130
1131 Fix build with Apple's toolchain. Part 1
1132
1133 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
1134 for long calls
1135 * configure.ac: remove a leftover AC_MSG_RESULT
dd74360c 1136 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
26de2bcd 1137 Apple's toolchain
1138
09b3490b 11392009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
1140
1141 Fix warnings
1142
1143 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
1144 (decomp_block): initialize ch
1145 use grub_memcpy instead of memcpy
1146
c22a006a 11472009-06-17 Pavel Roskin <proski@gnu.org>
1148
d3638678 1149 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
1150 version, use declarations needed to use vga_text as the startup
1151 console.
1152
c22a006a 1153 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
1154 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
1155 the kernel.
1156 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
1157 and grub_at_keyboard_fini(), it's done on module load and
1158 unload.
1159
05b129e0 11602009-06-17 Felix Zielcke <fzielcke@z-51.de>
1161
1162 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
1163 file can't be found.
1164 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1165
cf24ed9e 11662009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
1167
1168 Fix newline handling
1169
1170 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
dd74360c 1171 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
cf24ed9e 1172 (grub_script_yylex): don't segfault on unterminated script
1173 newline terminates command and variable
1174
74aa8e4b 11752009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
1176
1177 avoid double grub_adjust_range call. Bug reported by David Simner
1178
1179 * kern/disk.c (grub_disk_write): change to raw disk access before
1180 calling disk_read
1181
1bd265f3 11822009-06-17 Colin Watson <cjwatson@ubuntu.com>
1183
1184 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
1185 spaces, for the benefit of help2man.
1186 * util/i386/efi/grub-mkimage.c (usage): Likewise.
1187
a2d08c06 11882009-06-16 Pavel Roskin <proski@gnu.org>
1189
1190 * kern/i386/halt.c: Include grub/machine/init.h.
1191 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
1192
b97bcb19 11932009-06-16 Felix Zielcke <fzielcke@z-51.de>
1194
1195 * util/grub.d/30_os-prober.in: Use ${root} in the generated
1196 drivemap menuentry.
1197
0644f96c 11982009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
1199
1200 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
1201 `echo' command.
1202
3ef17a2e 12032009-06-16 Pavel Roskin <proski@gnu.org>
1204
1205 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
1206 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
1207 save %dx, we only need %dl and we never change it.
1208 * boot/i386/pc/cdboot.S: Don't set the root drive.
1209 * boot/i386/pc/pxeboot.S: Likewise.
1210 * include/grub/i386/pc/boot.h: Remove
1211 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
1212 GRUB_BOOT_MACHINE_DRIVE_CHECK.
1213 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
1214 * kern/i386/pc/init.c (make_install_device): Remove references
1215 to grub_root_drive.
1216 * kern/i386/pc/startup.S: Likewise.
1217 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
1218
693fe637 12192009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
1220
1221 xnu_uuid command
1222
1223 * commands/xnu_uuid.c: new file
1224 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
1225 (xnu_uuid_mod_SOURCES): new variable
1226 (xnu_uuid_mod_CFLAGS): likewise
1227 (xnu_uuid_mod_LDFLAGS): likewise
1228 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
1229 * conf/i386-ieee1275.rmk: likewise
1230 * conf/i386-pc.rmk: likewise
1231 * conf/powerpc-ieee1275.rmk: likewise
1232 * conf/sparc64-ieee1275.rmk: likewise
1233 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
1234
c9da87d0 12352009-06-16 Pavel Roskin <proski@gnu.org>
1236
1237 * configure.ac: Avoid '==' in test command, it's not portable.
1238
9c6f4596 12392009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
1240
1241 Probe command
1242
1243 * commands/probe.c: new file
1244 * conf/common.rmk (pkglib_MODULES): add probe.mod
1245 (probe_mod_SOURCES): new variable
1246 (probe_mod_CFLAGS): likewise
1247 (probe_mod_LDFLAGS): likewise
1248 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
1249 * conf/i386-ieee1275.rmk: likewise
1250 * conf/i386-pc.rmk: likewise
1251 * conf/powerpc-ieee1275.rmk: likewise
1252 * conf/sparc64-ieee1275.rmk: likewise
1253
70b7f9fd 12542009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
1255
1256 Fix handling of string like \"hello\" and "a
1257 b"
1258
1259 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
1260 (grub_script_yylex): fix parsing of quoting, escaping and newline
1261
71c79a6b 12622009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
1263
dd74360c 1264 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
71c79a6b 1265 handling
dd74360c 1266
0644f96c 12672009-06-13 Jun Inoue <jun.lambda@gmail.com>
880fc3c4 1268
1269 * util/grub-mkconfig.in: Fix parsing of --output option.
1270
e40893c3 12712009-06-12 Pavel Roskin <proski@gnu.org>
1272
1273 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
1274 genmk.rb don't need to be generated or installed.
1275
3a1acfe2 12762009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
1277
1278 * commands/i386/pc/drivemap_int13h.S: add more comments
1279
3a4575d4 12802009-06-11 Pavel Roskin <proski@gnu.org>
1281
0658e928 1282 * Makefile.in (uninstall): Uninstall manuals.
1283
ca0388f0 1284 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
1285 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
1286 and update-grub_lib in two places.
1287 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
1288
e3b27c39 1289 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
1290 a compiler warning.
1291
3a4575d4 1292 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
1293 `entry_lo' to fix variable shadowing.
1294
af1f4f55 12952009-06-11 Christian Franke <franke@computer.org>
1296
1297 * kern/misc.c (__enable_execute_stack): Add missing return type
1298 to prevent gcc warning.
1299
5225e649 13002009-06-11 Felix Zielcke <fzielcke@z-51.de>
1301
1302 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
1303
7d83bd47 13042009-06-11 Pavel Roskin <proski@gnu.org>
1305
c1cb63ba 1306 * Makefile.in: Don't rely on any scripts being executable.
1307 Always use $(SHELL) to run shell scripts.
1308
7d83bd47 1309 * configure.ac: Always define ___main if using -nostdlib. This
1310 fixes tests on Cygwin.
1311
948f48e7 13122009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
1313
1314 UDF fix
1315
7d83bd47 1316 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
948f48e7 1317 is in bytes and not in blocks
7d83bd47 1318
8ada9bc1 13192009-06-11 Pavel Roskin <proski@gnu.org>
1320
1321 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
1322 warning.
1323
25ad2323 13242009-06-11 Felix Zielcke <fzielcke@z-51.de>
1325
1326 * util/grub.d/30_os-prober.in: Fix a comment. Source
1327 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
1328 to set the root device. Place drivemap command in the generated
1329 chain entry.
1330
e65acb0c 13312009-06-11 Pavel Roskin <proski@gnu.org>
1332
1333 * configure.ac: Remove host_m32. Issues with 64-bit utilities
1334 have long been resolved.
1335
f285fe2d 13362009-06-11 Colin Watson <cjwatson@ubuntu.com>
1337
bd47b0b5 1338 * util/grub.d/10_linux.in: Capitalise "Linux".
1339
f285fe2d 1340 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
1341
a0c62e4e 13422009-06-11 Pavel Roskin <proski@gnu.org>
1343
b6783cb2 1344 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
1345 fix a gcc warning and ensure that the function won't ever exit.
1346
dde032e8 1347 * kern/i386/ieee1275/init.c: Add missing prototype for
1348 grub_stop_floppy().
1349
22cd079d 1350 * loader/ieee1275/multiboot2.c [__i386__]: Include
1351 grub/cpu/multiboot.h.
1352
a0c62e4e 1353 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
1354 casts to short - they are not portable and cause warnings. Fix
1355 use of uninitialized values in input_buf. Use ARRAY_SIZE.
1356
63963d17 13572009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
1358
1359 Drivemap fixes
1360
1361 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
1362 new function
1363 (grub_get_root_biosnumber_saved): new variable
1364 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
1365 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
775dbc4d 1366 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
63963d17 1367 %dx after the call if necessary
1368 * conf/common.rmk (pkglib_MODULES): remove boot.mod
1369 (boot_mod_SOURCES): remove
1370 (boot_mod_CFLAGS): remove
1371 (boot_mod_LDFLAGS): remove
1372 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
1373 (boot_mod_SOURCES): new variable
1374 (boot_mod_CFLAGS): likewise
1375 (boot_mod_LDFLAGS): likewise
1376 * conf/i386-efi.rmk: likewise
1377 * conf/i386-ieee1275.rmk: likewise
1378 * conf/i386-pc.rmk: likewise
1379 * conf/powerpc-ieee1275.rmk: likewise
1380 * conf/sparc64-ieee1275.rmk: likewise
1381 * conf/x86_64-efi.rmk: likewise
1382 * include/grub/i386/pc/biosnum.h: new file
1383 * lib/i386/pc/biosnum.c: likewise
1384 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
1385 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
1386 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
775dbc4d 1387
33abf7ae 13882009-06-10 Pavel Roskin <proski@gnu.org>
1389
5ac35b35 1390 * io/gzio.c (test_header): Don't reuse one buffer for all data.
1391 Use separate variables. Read only the file size at the end, but
1392 not the checksum that we don't use.
1393
5c5215d5 1394 * kern/file.c (grub_file_read): Use void pointer for the buffer.
1395 Adjust all callers.
1396
27d5fef7 1397 * kern/ieee1275/openfw.c: Remove libc includes.
1398 * kern/ieee1275/cmain.c: Likewise.
1399 * include/grub/ieee1275/ieee1275.h: Likewise.
1400
33abf7ae 1401 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
1402 compiler warnings.
1403
19d50c2b 14042009-06-10 Felix Zielcke <fzielcke@z-51.de>
1405
1406 * Makefile.in: Remove all trailing whitespace.
1407 * conf/i386-pc.rmk: Likewise.
1408 * conf/powerpc-ieee1275.rmk: Likewise.
1409 * conf/sparc64-ieee1275.rmk: Likewise.
1410 * docs/grub.texi: Likewise.
1411 * docs/texinfo.tex: Likewise.
1412 * disk/fs_uuid.c: Likewise.
1413 * disk/lvm.c: Likewise.
1414 * disk/scsi.c: Likewise.
1415 * disk/ata.c: Likewise.
1416 * disk/ieee1275/ofdisk.c: Likewise.
1417 * disk/i386/pc/biosdisk.c: Likewise.
1418 * disk/host.c: Likewise.
1419 * disk/raid.c: Likewise.
1420 * disk/efi/efidisk.c: Likewise.
1421 * disk/usbms.c: Likewise.
1422 * disk/memdisk.c: Likewise.
1423 * disk/loopback.c: Likewise.
1424 * kern/powerpc/dl.c: Likewise.
1425 * kern/device.c: Likewise.
1426 * kern/dl.c: Likewise.
1427 * kern/sparc64/dl.c: Likewise.
1428 * kern/ieee1275/ieee1275.c: Likewise.
1429 * kern/term.c: Likewise.
1430 * kern/fs.c: Likewise.
1431 * kern/i386/dl.c: Likewise.
1432 * kern/i386/pc/startup.S: Likewise.
1433 * kern/i386/pc/init.c: Likewise.
1434 * kern/i386/pc/mmap.c: Likewise.
1435 * kern/i386/pc/lzo1x.S: Likewise.
1436 * kern/i386/ieee1275/init.c: Likewise.
1437 * kern/i386/realmode.S: Likewise.
1438 * kern/i386/tsc.c: Likewise.
1439 * kern/partition.c: Likewise.
1440 * kern/corecmd.c: Likewise.
1441 * kern/file.c: Likewise.
1442 * kern/efi/efi.c: Likewise.
1443 * kern/efi/init.c: Likewise.
1444 * kern/efi/mm.c: Likewise.
1445 * kern/main.c: Likewise.
1446 * kern/err.c: Likewise.
1447 * kern/env.c: Likewise.
1448 * kern/disk.c: Likewise.
1449 * kern/generic/millisleep.c: Likewise.
1450 * kern/generic/rtc_get_time_ms.c: Likewise.
1451 * kern/misc.c: Likewise.
1452 * kern/parser.c: Likewise.
1453 * genmk.rb: Likewise.
1454 * configure.ac: Likewise.
1455 * boot/i386/pc/diskboot.S: Likewise.
1456 * boot/i386/pc/pxeboot.S: Likewise.
1457 * boot/i386/pc/boot.S: Likewise.
1458 * boot/i386/pc/lnxboot.S: Likewise.
1459 * boot/i386/pc/cdboot.S: Likewise.
1460 * parttool/pcpart.c: Likewise.
1461 * video/readers/tga.c: Likewise.
1462 * video/video.c: Likewise.
1463 * video/bitmap.c: Likewise.
1464 * lib/envblk.c: Likewise.
1465 * lib/i386/setjmp.S: Likewise.
1466 * fs/xfs.c: Likewise.
1467 * fs/afs.c: Likewise.
1468 * fs/fat.c: Likewise.
1469 * fs/ntfs.c: Likewise.
1470 * fs/udf.c: Likewise.
1471 * fs/affs.c: Likewise.
1472 * fs/iso9660.c: Likewise.
1473 * fs/hfs.c: Likewise.
1474 * fs/fshelp.c: Likewise.
1475 * fs/ext2.c: Likewise.
1476 * fs/jfs.c: Likewise.
1477 * fs/reiserfs.c: Likewise.
1478 * fs/hfsplus.c: Likewise.
1479 * fs/minix.c: Likewise.
1480 * fs/cpio.c: Likewise.
1481 * fs/sfs.c: Likewise.
1482 * fs/ufs.c: Likewise.
1483 * efiemu/prepare.c: Likewise.
1484 * efiemu/loadcore_common.c: Likewise.
1485 * efiemu/runtime/efiemu.sh: Likewise.
1486 * efiemu/runtime/efiemu.S: Likewise.
1487 * efiemu/runtime/efiemu.c: Likewise.
1488 * efiemu/pnvram.c: Likewise.
1489 * efiemu/main.c: Likewise.
1490 * efiemu/i386/pc/cfgtables.c: Likewise.
1491 * efiemu/i386/loadcore64.c: Likewise.
1492 * efiemu/i386/loadcore32.c: Likewise.
1493 * efiemu/loadcore.c: Likewise.
1494 * efiemu/symbols.c: Likewise.
1495 * efiemu/mm.c: Likewise.
1496 * include/grub/autoefi.h: Likewise.
1497 * include/grub/datetime.h: Likewise.
1498 * include/grub/term.h: Likewise.
1499 * include/grub/hfs.h: Likewise.
1500 * include/grub/lvm.h: Likewise.
1501 * include/grub/i386/tsc.h: Likewise.
1502 * include/grub/i386/linux.h: Likewise.
1503 * include/grub/i386/xnu.h: Likewise.
1504 * include/grub/i386/efiemu.h: Likewise.
1505 * include/grub/i386/pc/biosdisk.h: Likewise.
1506 * include/grub/i386/pc/memory.h: Likewise.
1507 * include/grub/i386/pc/vbe.h: Likewise.
1508 * include/grub/parttool.h: Likewise.
1509 * include/grub/video.h: Likewise.
1510 * include/grub/memory.h: Likewise.
1511 * include/grub/fs.h: Likewise.
1512 * include/grub/partition.h: Likewise.
1513 * include/grub/xnu.h: Likewise.
1514 * include/grub/efi/api.h: Likewise.
1515 * include/grub/efi/pe32.h: Likewise.
1516 * include/grub/efi/memory.h: Likewise.
1517 * include/grub/multiboot.h: Likewise.
1518 * include/grub/usbdesc.h: Likewise.
1519 * include/grub/multiboot2.h: Likewise.
1520 * include/grub/acpi.h: Likewise.
1521 * include/grub/efiemu/efiemu.h: Likewise.
1522 * include/grub/disk.h: Likewise.
1523 * include/grub/ieee1275/ieee1275.h: Likewise.
1524 * include/grub/net.h: Likewise.
1525 * include/grub/machoload.h: Likewise.
1526 * include/grub/macho.h: Likewise.
1527 * include/multiboot.h: Likewise.
1528 * genmoddep.awk: Likewise.
1529 * normal/main.c: Likewise.
1530 * normal/menu_entry.c: Likewise.
1531 * normal/menu_viewer.c: Likewise.
1532 * normal/completion.c: Likewise.
1533 * normal/cmdline.c: Likewise.
1534 * normal/misc.c: Likewise.
1535 * normal/datetime.c: Likewise.
1536 * bus/usb/usbtrans.c: Likewise.
1537 * bus/usb/ohci.c: Likewise.
1538 * bus/usb/uhci.c: Likewise.
1539 * bus/usb/usb.c: Likewise.
1540 * mmap/efi/mmap.c: Likewise.
1541 * mmap/i386/pc/mmap_helper.S: Likewise.
1542 * mmap/i386/pc/mmap.c: Likewise.
1543 * mmap/i386/mmap.c: Likewise.
1544 * mmap/i386/uppermem.c: Likewise.
1545 * mmap/mmap.c: Likewise.
1546 * commands/acpi.c: Likewise.
1547 * commands/echo.c: Likewise.
1548 * commands/blocklist.c: Likewise.
1549 * commands/loadenv.c: Likewise.
1550 * commands/usbtest.c: Likewise.
1551 * commands/boot.c: Likewise.
1552 * commands/parttool.c: Likewise.
1553 * commands/search.c: Likewise.
1554 * commands/cat.c: Likewise.
1555 * commands/i386/pc/play.c: Likewise.
1556 * commands/i386/pc/drivemap.c: Likewise.
1557 * commands/i386/pc/vbeinfo.c: Likewise.
1558 * commands/i386/pc/acpi.c: Likewise.
1559 * commands/i386/pc/vbetest.c: Likewise.
1560 * commands/ls.c: Likewise.
1561 * commands/cmp.c: Likewise.
1562 * commands/test.c: Likewise.
1563 * commands/efi/acpi.c: Likewise.
1564 * commands/gptsync.c: Likewise.
1565 * commands/help.c: Likewise.
1566 * partmap/amiga.c: Likewise.
1567 * partmap/apple.c: Likewise.
1568 * partmap/acorn.c: Likewise.
1569 * partmap/pc.c: Likewise.
1570 * partmap/sun.c: Likewise.
1571 * partmap/gpt.c: Likewise.
1572 * script/sh/lexer.c: Likewise.
1573 * script/sh/function.c: Likewise.
1574 * font/font.c: Likewise.
1575 * font/font_cmd.c: Likewise.
1576 * loader/powerpc/ieee1275/linux.c: Likewise.
1577 * loader/efi/chainloader.c: Likewise.
1578 * loader/multiboot_loader.c: Likewise.
1579 * loader/macho.c: Likewise.
1580 * loader/i386/multiboot.c: Likewise.
1581 * loader/i386/linux.c: Likewise.
1582 * loader/i386/pc/linux.c: Likewise.
1583 * loader/i386/pc/multiboot2.c: Likewise.
1584 * loader/i386/pc/chainloader.c: Likewise.
1585 * loader/i386/pc/xnu.c: Likewise.
1586 * loader/i386/bsd_trampoline.S: Likewise.
1587 * loader/i386/efi/linux.c: Likewise.
1588 * loader/i386/multiboot_elfxx.c: Likewise.
1589 * loader/i386/bsd_helper.S: Likewise.
1590 * loader/i386/bsd.c: Likewise.
1591 * loader/i386/linux_trampoline.S: Likewise.
1592 * loader/i386/xnu_helper.S: Likewise.
1593 * loader/i386/xnu.c: Likewise.
1594 * loader/i386/bsd_pagetable.c: Likewise.
1595 * loader/i386/multiboot_helper.S: Likewise.
1596 * loader/xnu.c: Likewise.
1597 * loader/xnu_resume.c: Likewise.
1598 * io/gzio.c: Likewise.
1599 * term/efi/console.c: Likewise.
1600 * term/terminfo.c: Likewise.
1601 * term/ieee1275/ofconsole.c: Likewise.
1602 * term/i386/pc/serial.c: Likewise.
1603 * term/i386/pc/vesafb.c: Likewise.
1604 * term/i386/pc/vga.c: Likewise.
1605 * term/usb_keyboard.c: Likewise.
1606 * term/gfxterm.c: Likewise.
1607 * aclocal.m4: Likewise.
1608 * util/lvm.c: Likewise.
1609 * util/grub.d/30_os-prober.in: Likewise.
1610 * util/grub.d/10_hurd.in: Likewise.
1611 * util/console.c: Likewise.
1612 * util/grub-macho2img.c: Likewise.
1613 * util/grub-probe.c: Likewise.
1614 * util/hostfs.c: Likewise.
1615 * util/i386/pc/grub-mkimage.c: Likewise.
1616 * util/i386/pc/grub-setup.c: Likewise.
1617 * util/i386/efi/grub-mkimage.c: Likewise.
1618 * util/grub-mkconfig.in: Likewise.
1619 * util/raid.c: Likewise.
1620 * util/resolve.c: Likewise.
1621 * util/grub-mkdevicemap.c: Likewise.
1622 * util/grub-emu.c: Likewise.
1623 * util/getroot.c: Likewise.
1624 * util/hostdisk.c: Likewise.
1625 * util/usb.c: Likewise.
1626 * util/grub-editenv.c: Likewise.
1627 * util/misc.c: Likewise.
1628
d2d49665 16292009-06-10 Felix Zielcke <fzielcke@z-51.de>
1630
1631 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
1632 `genparttoollist.sh'.
1633 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
1634 Add `*.sh' to the list find searches for and change `mdate.sh'
1635 to `mdate-sh'.
1636
fe052e37 16372009-06-10 Pavel Roskin <proski@gnu.org>
1638
2763ac18 1639 * include/grub/multiboot2.h: Provide compatibility defines for
1640 multiboot2.h.
1641 * include/multiboot2.h: Include stdint.h only if needed, using
1642 angle brackets.
1643 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
1644 grub/multiboot2.h.
1645 * loader/ieee1275/multiboot2.c: Likewise.
1646 * loader/multiboot2.c: Likewise.
1647 * loader/multiboot_loader.c: Likewise.
1648
437e6adc 1649 * configure.ac: Use -nostdlib when probing for the target. It
1650 should not be required to have libc for the target.
1651
06a6836c 1652 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
1653 they fail without libc headers for the target.
1654 * include/grub/powerpc/libgcc.h: Use weak attribute for all
1655 exports.
1656 * include/grub/sparc64/libgcc.h: Likewise. Don't use
1657 preprocessor conditionals.
1658
fe052e37 1659 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
1660 build system doesn't need to be aware of the tar.c internals.
1661
afd22553 16622009-06-09 Michel Hermier <michel.hermier@gmail.com>
87b8f28c 1663
afd22553 1664 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
8ec4a6d0 1665
6b787c4f 16662009-06-09 Robert Millan <rmh.grub@aybabtu.com>
1667
1668 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
1669 disk limit to 26 for IDE, Virtio, Xen and SCSI.
1670
16712009-06-09 Felix Zielcke <fzielcke@z-51.de>
1672
1673 * util/i386/pc/grub-install.in: Change the error message if UUIDs
473d1e45 1674 aren't available if ata.mod gets used.
6b787c4f 1675
473d1e45 16762009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
e23721e8 1677
473d1e45 1678 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
e23721e8 1679 initialising controller.
473d1e45 1680 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
e23721e8 1681
255a27d4 16822009-06-08 Felix Zielcke <fzielcke@z-51.de>
1683
1684 * util/i386/pc/grub-install.in: Add a parameter --disk-module
1685 to choose between ata and biosdisk module on i386-pc.
1686
473d1e45 16872009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
69da8877 1688
d55842d8 1689 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
1690 Subclass and Programming Interface fields in terms of the 3 byte
1691 Class Code register.
1692 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1693
fa5db0b1 1694 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
1695 interface is OHCI. Add grub_dprintf for symmetry with
1696 bus/usb/uhci.c.
1697 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
1698 interface is UHCI. Add interf variable for programming
1699 interface. Print interface with class/subclass.
1700
c0947beb 1701 * bus/usb/ohci.c: Set interf with correct field.
1702
69da8877 1703 * bus/usb/uhci.c: Remove unneeded doubled lines.
1704 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
1705 Remove whitespace inside comment.
1706
9e172e30 17072009-06-08 Robert Millan <rmh.grub@aybabtu.com>
1708
1709 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
1710 as fallback an equivalent option without depth.
1711
de65ee2b 17122009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1713
1714 Not fail if unable to retrieve C/H/S on LBA disks
1715
473d1e45 1716 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
de65ee2b 1717 if unable to retrieve C/H/S on LBA disks
1718
b57ea2c9 17192009-06-08 Pavel Roskin <proski@gnu.org>
1720
1721 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
1722 about aliasing.
1723
af361263 17242009-06-08 Felix Zielcke <fzielcke@z-51.de>
1725
1726 * Makefile.in (uninstall): Remove all $lib_DATA files.
1727
4c9ec6b3 17282009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1729
1730 Bugfix: install on partitionless device
1731
1732 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
1733 is a whole disk
1734
e76fc924 17352009-06-08 Felix Zielcke <fzielcke@z-51.de>
1736
1737 * Makefile.in (uninstall): Remove all $include_DATA files.
1738
ba5a0d05 17392009-06-08 Felix Zielcke <fzielcke@z-51.de>
1740
1741 * commands/true.c: New file. Implement the true and false commands.
1742 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1743 (true_mod_SOURCES): New variable.
1744 (true_mod_CFLAGS): Likewise.
1745 (true_mod_LDFLAGS): Likewise.
1746
c8048e32 17472009-06-05 Colin D Bennett <colin@gibibit.com>
1748
1749 Optimized font character lookup using binary search instead of linear
1750 search. Fonts now are required to have the character index ordered by
1751 code point.
1752
1753 * font/font.c (load_font_index): Verify that fonts have ordered
1754 character indices.
1755 (find_glyph): Use binary search instead of linear search to find a
1756 character in a font.
1757
408305be 17582009-06-05 Michael Scherer <misc@mandriva.org>
1759
1760 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1761 uses case sensitive btree.
1762 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1763 only for case insensitive filesystems.
1764
8ee1e0d9 17652009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
1766
1767 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1768 * conf/common.rmk (search_mod_CFLAGS): likewise
1769
a9966eb1 17702009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1771
473d1e45 1772 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
a9966eb1 1773 compensate a compiler bug
1774
9e7100fb 17752009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1776
473d1e45 1777 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
9e7100fb 1778 instead of '\b'
473d1e45 1779
ede21d71 17802009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1781
1782 Definitions for creating asm symbols with Apple's CC
1783
1784 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
1785 [APPLE_CC] (VARIABLE): likewise
1786
9dbf7653 17872009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1788
1789 Disable lnxboot.img when compiled
1790 with Apple's CC
1791
1792 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1793 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1794 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1795 [! APPLE_CC] (CODE_LENG): skip
1796 [! APPLE_CC] (setup_sects): likewise
1797 [! APPLE_CC]: skip filling
473d1e45 1798
e93cdc3d 17992009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1800
1801 Address in trampolines based on 32-bit registers when compiled
1802 with Apple's CC
1803
473d1e45 1804 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
e93cdc3d 1805 for addresses
1806 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1807
6c688477 18082009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1809
1810 Avoid aliases when compiling with Apple's CC for PCBIOS machine
1811
1812 * kern/misc.c [APPLE_CC] (memcpy): new function
1813 [APPLE_CC] (memmove): likewise
1814 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
473d1e45 1815 (memcpy): define alias conditionally on !APPLE_CC
6c688477 1816 (memset): likewise
1817 (abort): likewise
1818 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1819 APPLE_CC are defined
1820 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1821 (grub_assert_fail): make prototype conditional
1822
e37ffc5c 18232009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1824
1825 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1826
473d1e45 1827 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1828 grub-macho2img
e37ffc5c 1829 (CLEANFILES): add grub-macho2img
1830 (grub_macho2img_SOURCES): new variable
1831 * kern/i386/pc/startup.S (bss_start): new variable
1832 (bss_end): likewise
1833 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1834 * util/grub-macho2img.c: new file
1835
cf00df31 18362009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1837
1838 Use objconv when compiling with Apple's CC
1839
1840 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1841 (efiemu64.o): likewise
1842 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1843 when compiling with Apple's CC
1844 (efiemu64_s.o): likewise
1845 * configure.ac: check for objconv when compiling with Apple's CC
1846 * genmk.rb: use objconv for modules when compiled with Apple's CC
473d1e45 1847
d119a20c 18482009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1849
1850 Define segment as well as section when compiling with
1851 Apple's CC
1852
1853 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1854 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1855 (efiemu_convert_pointer): likewise
1856 (efiemu_set_virtual_address_map): likewise
1857 (efiemu_convert_pointer): likewise
1858 (efiemu_getcrc32): likewise
1859 (init_crc32_table): likewise
1860 (reflect): likewise
1861 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1862 (GRUB_MOD_DEP): likewise
473d1e45 1863
c8600122 18642009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1865
1866 Allow a compilation without -mcmodel=large
1867
1868 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1869 when compiled without -mcmodel=large
473d1e45 1870 (filter_memory_map): remove memory post 4 GiB when compiled
c8600122 1871 without -mcmodel=large
473d1e45 1872 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
c8600122 1873 TARGET_CFLAGS when -mcmodel=large isn't supported
473d1e45 1874
e8df1d4e 18752009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1876
1877 Remove nested functions in efiemu core
1878
1879 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
473d1e45 1880
cc6c3ac1 18812009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1882
1883 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1884
1885 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1886 temporary storage
473d1e45 1887 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1888 using Apple's CC
cc6c3ac1 1889 (grub_cpu_is_tsc_supported): likewise
1890 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
473d1e45 1891
3e325901 18922009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1893
1894 Absolute addressing through constant with Apple's cc
1895
1896 * kern/i386/pc/startup.S: Define necessary constants
1897 and address through it when using ABS with Apple's CC
1898 * boot/i386/pc/diskboot.S: likewise
1899 * boot/i386/pc/boot.S: likewise
1900 * boot/i386/pc/lnxboot.S: likewise
1901 * boot/i386/pc/cdboot.S: likewise
1902 * mmap/i386/pc/mmap_helper.S: likewise
1903 * commands/i386/pc/drivemap_int13h.S: likewise
1904
2b167a72 19052009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1906
1907 Check if compiler is apple cc
1908
1909 * Makefile.in (ASFLAGS): new variable
1910 (TARGET_ASFLAGS): likewise
1911 (TARGET_MODULE_FORMAT): likewise
1912 (TARGET_APPLE_CC): likewise
1913 (OBJCONV): likewise
1914 (TARGET_IMG_CFLAGS): likewise
1915 (TARGET_CPPFLAGS): add includedir
1916 * configure.ac: call grub_apple_cc and grub_apple_target_cc
1917 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1918 Check for linker script only if compiler isn't Apple's CC
1919 (TARGET_MODULE_FORMAT): set
1920 (TARGET_APPLE_CC): likewise
1921 (TARGET_ASFLAGS): likewise
1922 (ASFLAGS): likewise
1923 Check for objcopy only if compiler isn't Apple's CC
1924 Check for BSS symbol only if compiler isn't Apple's CC
1925 * genmk.rb: adapt nm options if we use Apple's utils
1926 * aclocal.m4 (grub_apple_cc): new test
1927 (grub_apple_target_cc): likewise
473d1e45 1928
fb14123e 19292009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1930
1931 Simplify sed expressions and improve awk
1932
1933 * Makefile.in (install-local): simplify sed expression
1934 * gencmdlist.sh: likewise
1935 * genmoddep.awk: avoid adding module as a dependency of itself
1936
5b889789 19372009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1938
1939 Add missing start symbols
1940
1941 * boot/i386/pc/boot.S: add start
fb14123e 1942 * boot/i386/pc/pxeboot.S: likewise
473d1e45 1943
fd2bf2e3 19442009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1945
1946 Fix wrong assumptions with grub-mkimage on EFI
473d1e45 1947
1948 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
fd2bf2e3 1949 (relocate_addresses): consider both r_addend and value at offset
1950 (make_mods_section): zerofill modinfo and header
1951 (convert_elf): write prefix here
473d1e45 1952
5389763d 19532009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1954
1955 Use .asciz instead of .string
1956
1957 * i386/pc/diskboot.S: use .asciz instead of .string
1958 * i386/pc/boot.S: likewise
1959 * include/grub/dl.h (GRUB_MOD_DEP): likewise
1960 (GRUB_MOD_NAME): likewise
473d1e45 1961
3eb5ed4e 19622009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1963
1964 gfxpayload support
1965
1966 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1967 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1968 (grub_video_setup): remove
1969 (grub_video_set_mode): new prototype
1970 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1971 (vid_mode): remove
1972 (linux_vesafb_res): compile only on PCBIOS
1973 (grub_linux_boot): support gfxpayload
1974 * loader/i386/pc/xnu.c (video_hook): new function
1975 (grub_xnu_set_video): support gfxpayload
1976 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1977 (DEFAULT_VIDEO_HEIGHT): likewise
1978 (DEFAULT_VIDEO_FLAGS): likewise
1979 (DEFAULT_VIDEO_MODE): new definition
1980 (video_hook): new function
1981 (grub_gfxterm_init): use grub_video_set_mode
473d1e45 1982 * util/grub.d/30_os-prober.in: remove explicit modesetting before
3eb5ed4e 1983 loading xnu
1984 * video/video.c (grub_video_setup): removed
473d1e45 1985 (grub_video_set_mode): new function based on grub_gfxterm_init and
3eb5ed4e 1986 grub_video_setup
1987
4b0e1143 19882009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1989
1990 Avoid calling biosdisk in drivemap
1991
1992 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1993 (revparse_biosdisk): likewise
1994 (list_mappings): derive name from id directly
1995 (grub_cmd_drivemap): use tryparse_diskstring
473d1e45 1996
fda6cb98 19972009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1998
1999 Script fixes
2000
2001 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
2002 (grub_lexer_param): add tokenonhold
2003 (grub_script_create_cmdline): remove cmdline. All callers updated
2004 (grub_script_function_create): make functionname
2005 grub_script_arg. All callers updated
2006 (grub_script_execute_argument_to_string): new prototype
2007 * kern/parser.c (state_transitions): reorder
2008 (grub_parser_cmdline_state): fix a bug and make more compact
473d1e45 2009 * script/sh/execute.c (grub_script_execute_argument_to_string):
fda6cb98 2010 make global
2011 (grub_script_execute_cmdline): use new format
2012 * script/sh/function.c (grub_script_function_create): make functionname
2013 grub_script_arg. All callers updated
473d1e45 2014 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
fda6cb98 2015 (grub_script_yylex): remove
2016 (grub_script_yylex2): renamed to ...
2017 (grub_script_yylex): ...renamed
2018 parse the expressions like a${b}c
2019 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
2020 (GRUB_PARSER_TOKEN_VAR): remove
2021 (GRUB_PARSER_TOKEN_NAME): likewise
2022 ("if"): declare as typeless
2023 ("while"): likewise
2024 ("function"): likewise
2025 ("else"): likewise
2026 ("then"): likewise
2027 ("fi"): likewise
2028 (text): remove
2029 (argument): likewise
2030 (script): accept empty scripts and make exit on error
2031 (arguments): use GRUB_PARSER_TOKEN_ARG
2032 (function): likewise
2033 (command): move error handling to script
2034 (menuentry): move grub_script_lexer_ref before
473d1e45 2035 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
fda6cb98 2036 argument. All callers updated
2037
f4448a07 20382009-06-04 Robert Millan <rmh.grub@aybabtu.com>
2039
2040 Prevent GRUB from probing floppies during boot.
2041
2042 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
2043 * commands/search.c (options): Add --no-floppy.
2044 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
2045 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
2046 --no-floppy when searching for UUIDs.
2047
2bf5885a 20482009-06-04 Robert Millan <rmh.grub@aybabtu.com>
2049
2050 Simplify the code duplication in commands/search.c.
2051
2052 * commands/search.c (search_label, search_fs_uuid): Merge into ...
2053 (search_fs): ... this. Update all users.
2054
f6fd460a 20552009-06-03 Felix Zielcke <fzielcke@z-51.de>
2056
2057 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
2058
cbb3c83e 20592009-05-28 Pavel Roskin <proski@gnu.org>
2060
57788cfd 2061 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
2062 Remove the original symlink explicitly.
2063
cbb3c83e 2064 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
2065 just one slash. That's how grub_fshelp_find_file() does it.
2066
cd0d5e30 20672009-05-26 Pavel Roskin <proski@gnu.org>
2068
f0f8bbe2 2069 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
2070 to `str'.
2071
cd0d5e30 2072 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
2073 possibly unused.
2074
8c2cab51 20752009-05-25 Christian Franke <franke@computer.org>
2076
2077 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
2078 register.
2079 (grub_atapi_identify): Add wait after drive select.
2080 (grub_ata_identify): Do more strict status register check before
2081 calling grub_atapi_identify (). Suppress error message if status
2082 register is 0x00 after command failure. Add status register
2083 check after PIO read to avoid bogus identify due to stuck DRQ.
2084 Thanks to Pavel Roskin for testing.
2085 (grub_device_initialize): Remove unsafe status register check.
2086 Thanks to 'phcoder' for problem report and patch.
2087 Prevent sign extension in debug message.
2088
230c0ad6 20892009-05-23 Colin D Bennett <colin@gibibit.com>
2090
2091 Cleaned up `include/grub/normal.h'. Grouped prototypes by
2092 definition file, and functions defined in `normal/menu.c' have had
2093 their prototypes moved to `include/grub/menu.h' for consistency.
2094
2095 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
2096 from normal.h.
2097 (grub_menu_get_entry): Likewise.
2098 (grub_menu_get_timeout): Likewise.
2099 (grub_menu_set_timeout): Likewise.
2100 (grub_menu_execute_entry): Likewise.
2101 (grub_menu_execute_with_fallback): Likewise.
2102 (grub_menu_entry_run): Likewise.
2103
2104 * include/grub/normal.h: Re-ordered and grouped function
2105 prototypes by file that the function is defined in.
2106 (grub_menu_execute_callback): Removed; moved to menu.h.
2107 (grub_menu_get_entry): Likewise.
2108 (grub_menu_get_timeout): Likewise.
2109 (grub_menu_set_timeout): Likewise.
2110 (grub_menu_execute_entry): Likewise.
2111 (grub_menu_execute_with_fallback): Likewise.
2112 (grub_menu_entry_run): Likewise.
2113 (grub_menu_addentry): Renamed from this ...
2114 (grub_normal_add_menu_entry): ... to this.
2115
2116 * normal/main.c (grub_menu_addentry): Renamed from this ...
2117 (grub_normal_add_menu_entry): ... to this.
2118
2119 * script/sh/execute.c (grub_script_execute_menuentry): Update
2120 reference to renamed grub_menu_addentry function.
2121
861f03a5 21222009-05-23 Felix Zielcke <fzielcke@z-51.de>
2123
2124 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
2125
96b1619a 21262009-05-22 Pavel Roskin <proski@gnu.org>
2127
bf6a5fb2 2128 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
2129 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
2130 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
2131 compiling for the i386 targets, but not for the utilities.
2132
96b1619a 2133 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
2134 to grub_uint8_t.
2135 (grub_root_drive): Likewise.
2136 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
2137 remove alignment.
2138 (grub_root_drive): Change size to byte.
2139 (grub_start_addr): Remove.
2140 (grub_end_addr): Likewise.
2141 (grub_apm_bios_info): Likewise.
2142
b729776b 21432009-05-21 Felix Zielcke <fzielcke@z-51.de>
2144
2145 * normal/i386: Remove.
2146 * normal/powerpc: Likewise.
2147 * normal/sparc64: Likewise.
2148 * normal/x86_64: Likewise.
2149
0a15ce80 21502009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
2151
2152 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
473d1e45 2153 * loader/i386/linux_trampoline.S: Fix indentation
0a15ce80 2154 * loader/i386/xnu_helper.S: Likewise
d6da58e6 2155
33db9015 21562009-05-18 Colin D Bennett <colin@gibibit.com>
2157
d6da58e6 2158 Display error messages when parsing a Lua statement fails.
2159 Previously, executing a syntactically invalid statement like
2160 ")foo" or "bar;" would silently fail.
33db9015 2161
2162 * script/lua/grub_main.c (handle_lua_error): New function.
d6da58e6 2163 (grub_lua_parse_line): Improved reporting of Lua parser and
2164 execution errors.
33db9015 2165
46422c89 21662009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
2167
2168 Remove -Werror which causes build to fail on some systems
2169
2170 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
2171 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
2172 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
18f547ad 2173
22f53a96 21742009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
2175
2176 trampoline for linux on 64-bit platform
2177
18f547ad 2178 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
2179 loader/i386/efi/linux_trampoline.S
2180 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
473d1e45 2181 declaration
d6da58e6 2182 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
2183 here
22f53a96 2184 * loader/i386/linux_trampoline.S: moved here
d6da58e6 2185 * loader/i386/efi/linux.c (allocate_pages): reserve space for
2186 trampoline
22f53a96 2187 (jumpvector): removed
2188 (grub_linux_trampoline_start): new declaration
2189 (grub_linux_trampoline_end): likewise
2190 (grub_linux_boot): use trampoline when on 64-bit platform
2191 * loader/i386/linux.c: likewise
2192
cb5a0f40 21932009-05-16 Pavel Roskin <proski@gnu.org>
2194
2195 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
2196 const to avoid a warning.
2197 (grub_lua_setenv): Likewise.
2198 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
2199 lmsg to fix a warning.
2200
334f2c28 22012009-05-16 Felix Zielcke <fzielcke@z-51.de>
2202
2203 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
7dd10fce 2204 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2205 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
2206 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2207 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2208 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2209 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2210 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
334f2c28 2211
59e5d3ec 22122009-05-16 Felix Zielcke <fzielcke@z-51.de>
2213
2214 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
2215
9d87a1ba 22162009-05-16 Bean <bean123ch@gmail.com>
2217
2218 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
2219 (lua_mod_SOURCES): New variable.
2220 (lua_mod_CFLAGS): Likewise.
2221 (lua_mod_LDFLAGS): Likewise.
2222
2223 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
2224 (setjmp_mod_SOURCES): New variable.
2225 (setjmp_mod_CFLAGS): Likewise.
2226 (setjmp_LDFLAGS): Likewise.
2227
2228 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
2229 (setjmp_mod_SOURCES): New variable.
2230 (setjmp_mod_CFLAGS): Likewise.
2231 (setjmp_LDFLAGS): Likewise.
2232
2233 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
2234 (setjmp_mod_SOURCES): New variable.
2235 (setjmp_mod_CFLAGS): Likewise.
2236 (setjmp_LDFLAGS): Likewise.
2237
2238 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
2239 (setjmp_mod_SOURCES): New variable.
2240 (setjmp_mod_CFLAGS): Likewise.
2241 (setjmp_LDFLAGS): Likewise.
2242
2243 * normal/i386/setjmp.S: Moved from here ...
2244 * lib/i386/setjmp.S: ... Moved here
2245 * normal/x86_64/setjmp.S: Moved from here ...
2246 * lib/x86_64/setjmp.S: ... Moved here
2247 * normal/powerpc/setjmp.S: Moved from here ...
2248 * lib/powerpc/setjmp.S: ... Moved here
2249 * normal/sparc64/setjmp.S: Moved from here ...
2250 * lib/sparc64/setjmp.S: ... Moved here
2251
2252 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
2253 returns_twice in mingw.
2254
2255 * script/lua/grub_lib.c: New file.
2256 * script/lua/grub_lib.h: Likewise.
2257 * script/lua/grub_lua.h: Likewise.
2258 * script/lua/grub_main.c: Likewise.
2259 * script/lua/lapi.c: Likewise.
2260 * script/lua/lapi.h: Likewise.
2261 * script/lua/lauxlib.c: Likewise.
2262 * script/lua/lauxlib.h: Likewise.
2263 * script/lua/lbaselib.c: Likewise.
2264 * script/lua/lcode.c: Likewise.
2265 * script/lua/lcode.h: Likewise.
2266 * script/lua/ldblib.c: Likewise.
2267 * script/lua/ldebug.c: Likewise.
2268 * script/lua/ldebug.h: Likewise.
2269 * script/lua/ldo.c: Likewise.
2270 * script/lua/ldo.h: Likewise.
2271 * script/lua/ldump.c: Likewise.
2272 * script/lua/lfunc.c: Likewise.
2273 * script/lua/lfunc.h: Likewise.
2274 * script/lua/lgc.c: Likewise.
2275 * script/lua/lgc.h: Likewise.
2276 * script/lua/linit.c: Likewise.
2277 * script/lua/liolib.c: Likewise.
2278 * script/lua/llex.c: Likewise.
2279 * script/lua/llex.h: Likewise.
2280 * script/lua/llimits.h: Likewise.
2281 * script/lua/lmathlib.c: Likewise.
2282 * script/lua/lmem.c: Likewise.
2283 * script/lua/lmem.h: Likewise.
2284 * script/lua/loadlib.c: Likewise.
2285 * script/lua/lobject.c: Likewise.
2286 * script/lua/lobject.h: Likewise.
2287 * script/lua/lopcodes.c: Likewise.
2288 * script/lua/lopcodes.h: Likewise.
2289 * script/lua/loslib.c: Likewise.
2290 * script/lua/lparser.c: Likewise.
2291 * script/lua/lparser.h: Likewise.
2292 * script/lua/lstate.c: Likewise.
2293 * script/lua/lstate.h: Likewise.
2294 * script/lua/lstring.c: Likewise.
2295 * script/lua/lstring.h: Likewise.
2296 * script/lua/lstrlib.c: Likewise.
2297 * script/lua/ltable.c: Likewise.
2298 * script/lua/ltable.h: Likewise.
2299 * script/lua/ltablib.c: Likewise.
2300 * script/lua/ltm.c: Likewise.
2301 * script/lua/ltm.h: Likewise.
2302 * script/lua/lua.h: Likewise.
2303 * script/lua/luaconf.h: Likewise.
2304 * script/lua/lualib.h: Likewise.
2305 * script/lua/lundump.c: Likewise.
2306 * script/lua/lundump.h: Likewise.
2307 * script/lua/lvm.c: Likewise.
2308 * script/lua/lvm.h: Likewise.
2309 * script/lua/lzio.c: Likewise.
2310 * script/lua/lzio.h: Likewise.
2311
5e898c9d 23122009-05-16 Bean <bean123ch@gmail.com>
2313
2314 * include/grub/kernel.h (grub_module_header_types): Add type
2315 OBJ_TYPE_CONFIG.
2316
2317 * kern/main.c (grub_load_config): New function.
2318 (grub_main): Call grub_load_config to read boot config.
2319
2320 * grub-mkimage (generate_image): New parameter config_path.
2321 (options): New option --config.
2322 (main): Parse --config option, and pass it to generate_image.
2323
cf353a47 23242009-05-14 Christian Franke <franke@computer.org>
2325
2326 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
2327 This fixes build on Cygwin.
2328
3834887f 23292009-05-14 Pavel Roskin <proski@gnu.org>
2330
2331 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
2332 jump. This saves two bytes, so the typical case of 2 swapped
2333 drives would fit 32 bytes.
2334
8090fc01 23352009-05-13 Pavel Roskin <proski@gnu.org>
2336
ac963883 2337 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
2338 grub_uint32_t to avoid a warning.
2339
8090fc01 2340 * loader/i386/linux.c (allocate_pages): When assigning
2341 real_mode_mem, cast through grub_size_t to fix a warning. The
2342 code already makes sure that the value would fit a pointer.
2343 (grub_linux_setup_video): Cast render_target->data to
2344 grub_size_t to fix a warning.
2345
18f547ad 23462009-05-13 Javier Martín <lordhabbit@gmail.com>
4246b8a9 2347
2348 * commands/i386/pc/drivemap.c: New file - implement drivemap
2349 command.
2350 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
2351 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
2352
6f6a8b28 23532009-05-13 Pavel Roskin <proski@gnu.org>
2354
2355 * util/i386/pc/grub-setup.c (setup): Remove unused variable
2356 embedding_area_exists.
2357
15fbf4c4 23582009-05-13 Robert Millan <rmh.grub@aybabtu.com>
2359
2360 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
2361 it easier to understand / work with.
59978c8a 2362 Improve warning messages for cases where there's no embedding area,
2363 or when it is too small (or core.img too large).
15fbf4c4 2364
238e871f 23652009-05-13 Pavel Roskin <proski@gnu.org>
2366
0ab3a9a4 2367 * loader/i386/pc/multiboot2.c: Add necessary includes for
2368 grub_multiboot2_real_boot().
2369
a2c8c5f8 2370 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
2371 PX record is always little-endian. We only need the lower 2
2372 bytes of the mode.
2373
faec96af 2374 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
2375 facilitate code reuse.
2376 (grub_cpio_mount): Use "struct head", not a char buffer. This
2377 fixes a warning reported by gcc 4.4.
2378
238e871f 2379 * kernel/disk.c (grub_disk_read): Use void pointer for the
2380 buffer.
2381 (grub_disk_write): Use const void pointer for the buffer.
2382 Adjust all callers. Remove unnecessary casts.
2383
901d2f0c 23842009-05-10 Robert Millan <rmh.grub@aybabtu.com>
2385
2386 * util/i386/pc/grub-install.in: Update copyright year.
2387
18f547ad 23882009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2eac4c16 2389
2390 gptsync
2391
2392 * commands/gptsync.c: new file
2393 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
2394 (gptsync_mod_SOURCES): new variable
2395 (gptsync_mod_CFLAGS): likewise
2396 (gptsync_mod_LDFLAGS): likewise
18f547ad 2397 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2eac4c16 2398 new definition
2399 (GRUB_PC_PARTITION_TYPE_HFS): likewise
2400 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
2401 * conf/i386-ieee1275.rmk: likewise
2402 * conf/i386-pc.rmk: likewise
2403 * conf/powerpc-ieee1275.rmk: likewise
2404
b4ba690a 24052009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2406
2407 Fixed grub-emu
2408
2409 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
2410 (grub_dl_ref): likewise
2411
317e1a44 24122009-05-08 Robert Millan <rmh.grub@aybabtu.com>
2413
2414 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
2415 split in two functions (one for msdos and one for gpt).
2416
041b8094 24172009-05-08 Pavel Roskin <proski@gnu.org>
2418
752473c2 2419 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
2420 not modified.
2421
041b8094 2422 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
2423 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
2424 Initialize them with -1. Add sanity check for bad1. Eliminate
2425 nerr variable.
2426
172800ce 24272009-05-08 David S. Miller <davem@davemloft.net>
2428
2429 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
2430
29aa5e81 24312009-05-06 Robert Millan <rmh.grub@aybabtu.com>
2432
2433 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
473d1e45 2434 existence.
29aa5e81 2435
96613b62 24362009-05-05 Felix Zielcke <fzielcke@z-51.de>
2437
2438 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1905c57b 2439 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
96613b62 2440
eef73c8a 24412009-05-05 David S. Miller <davem@davemloft.net>
2442
2443 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
2444
119494b5 24452009-05-05 Pavel Roskin <proski@gnu.org>
2446
2447 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
2448 of grub_dl_ref() and grub_dl_unref().
2449 * commands/parttool.c: Remove preprocessor conditionals around
2450 grub_dl_ref() and grub_dl_unref().
2451 * fs/affs.c: Likewise.
2452 * fs/afs.c: Likewise.
2453 * fs/cpio.c: Likewise.
2454 * fs/ext2.c: Likewise.
2455 * fs/fat.c: Likewise.
2456 * fs/hfs.c: Likewise.
2457 * fs/hfsplus.c: Likewise.
2458 * fs/iso9660.c: Likewise.
2459 * fs/jfs.c: Likewise.
2460 * fs/minix.c: Likewise.
2461 * fs/ntfs.c: Likewise.
2462 * fs/reiserfs.c: Likewise.
2463 * fs/sfs.c: Likewise.
2464 * fs/udf.c: Likewise.
2465 * fs/ufs.c: Likewise.
2466 * fs/xfs.c: Likewise.
2467 * include/grub/dl.h: Likewise.
2468 * loader/xnu.c: Likewise.
2469
de5fd76e 24702009-05-04 Pavel Roskin <proski@gnu.org>
2471
2472 * commands/acpi.c: Remove unused variable my_mod.
2473 * partmap/amiga.c: Likewise.
2474 * partmap/apple.c: Likewise.
2475 * partmap/gpt.c: Likewise.
2476 * partmap/pc.c: Likewise.
2477 * partmap/sun.c: Likewise.
2478 * term/gfxterm.c: Likewise.
2479 * term/i386/pc/vesafb.c: Likewise.
2480 * term/i386/pc/vga.c: Likewise.
2481
983598ad 24822009-05-04 David S. Miller <davem@davemloft.net>
2483
2484 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
2485 pointer args to grub_ieee1275_get_property().
2486
8aadec43 2487 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
2488
9554b15e 2489 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
2490 devices, and do not traverse down under controller nodes.
2491
67e23c90 2492 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
2493 (grub_ofdisk_open): Use it to un-escape "," characters.
2494 * kern/disk.c (find_part_sep): New.
2495 (grub_disk_open): Use it to find the first non-escaped ','
2496 character in the disk name.
2497 * util/ieee1275/devicemap.c (escape_of_path): New.
2498 (grub_util_emit_devicemap_entry): Use it.
2499 * util/sparc64/ieee1275/grub-install.in: Update script to
2500 strip partition specifiers properly by not triggering on
2501 '\' escaped ',' characters.
2502
74bfdd2f 25032009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2504
2505 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
2506 to 0x300.
2507 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
2508 resolutions.
2509 (linux_vesafb_modes): Add a lot of additional modes to the list (based
2510 on documentation from Wikipedia).
2511
4241d2b1 25122009-05-04 Pavel Roskin <proski@gnu.org>
2513
2514 * disk/ata.c: Spelling fixes.
2515 * disk/raid.c: Likewise.
2516 * disk/usbms.c: Likewise.
2517 * disk/dmraid_nvidia.c: Likewise.
2518 * kern/ieee1275/openfw.c: Likewise.
2519 * kern/ieee1275/init.c: Likewise.
2520 * kern/ieee1275/cmain.c: Likewise.
2521 * boot/i386/pc/cdboot.S: Likewise.
2522 * video/readers/png.c: Likewise.
2523 * video/i386/pc/vbe.c: Likewise.
2524 * fs/udf.c: Likewise.
2525 * fs/hfs.c: Likewise.
2526 * fs/reiserfs.c: Likewise.
2527 * efiemu/runtime/efiemu.c: Likewise.
2528 * efiemu/main.c: Likewise.
2529 * efiemu/mm.c: Likewise.
2530 * include/grub/elf.h: Likewise.
2531 * include/grub/xnu.h: Likewise.
2532 * include/grub/usbdesc.h: Likewise.
2533 * include/grub/usb.h: Likewise.
2534 * include/grub/script_sh.h: Likewise.
2535 * include/grub/lib/LzmaEnc.h: Likewise.
2536 * include/grub/efiemu/efiemu.h: Likewise.
2537 * include/grub/command.h: Likewise.
2538 * normal/menu.c: Likewise.
2539 * normal/main.c: Likewise.
2540 * normal/datetime.c: Likewise.
2541 * bus/usb/uhci.c: Likewise.
2542 * mmap/i386/uppermem.c: Likewise.
2543 * mmap/mmap.c: Likewise.
2544 * commands/acpi.c: Likewise.
2545 * commands/test.c: Likewise.
2546 * partmap/apple.c: Likewise.
2547 * font/font.c: Likewise.
2548 * loader/sparc64/ieee1275/linux.c: Likewise.
2549 * loader/macho.c: Likewise.
2550 * loader/i386/bsd_trampoline.S: Likewise.
2551 * loader/i386/bsd.c: Likewise.
2552 * loader/xnu.c: Likewise.
2553 * term/i386/pc/vesafb.c: Likewise.
2554 * term/usb_keyboard.c: Likewise.
2555 * util/resolve.c: Likewise.
2556 * util/getroot.c: Likewise.
2557
0cfc0083 25582009-05-04 Felix Zielcke <fzielcke@z-51.de>
2559
2560 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
2561
7c1d00cd 25622009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2563
2564 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
2565 build error.
2566
b01f0548 25672009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2568
2569 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
2570 parameter only available on BIOS.
2571
ecc3eb22 25722009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2573
2574 Removed wrong semicolon in declaration
2575
2576 * grub/misc.h (grub_dprintf): remove semicolon
2577
112972a9 25782009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2579
2580 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
2581 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
2582 is done by grub_cmd_linux() now).
2583 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
2584 restore video to text mode.
2585 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
2586 indicates lack of "vga=" parameter. "vga=0" is mapped to
2587 `GRUB_LINUX_VID_MODE_NORMAL'.
2588
afd5c115 25892009-05-04 Felix Zielcke <fzielcke@z-51.de>
2590
2591 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
2592 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
2593 and `normal/script.c'. Add `kern/rescue_reader.c',
18f547ad 2594 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
afd5c115 2595 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
2596 `grub_script.tab.c'.
2597
2598 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2599 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2600 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2601 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2602 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2603
faa517ce 2604 * Makefile.in: Remove duplicated 2008 in Copyright line.
2605
ae0c0bdc 26062009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2607
473d1e45 2608 * util/misc.c (grub_util_warn): New function. Emits a warning
ae0c0bdc 2609 unconditionally.
2610 * include/grub/util/misc.h (grub_util_warn): New declaration.
2611
2612 * util/i386/pc/grub-install.in: Understand --force and pass it down
2613 to grub-setup.
2614
2615 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
2616 down to setup().
2617 (setup): Improve error messages and add warnings when requested to
2618 install in odd layouts. Refuse to install using blocklists unless
2619 --force was set.
2620
18f547ad 26212009-05-04 martin f. krafft <madduck@madduck.net>
c149b500 2622
2623 * disk/raid.c (grub_raid_scan_device): Improve debug message.
2624
6d260daa 26252009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2626
2627 Updated copyright year
2628
2629 * fs/hfsplus.c: updated copyright year
18f547ad 2630
69f853f8 26312009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2632
2633 HFS+ UUID
2634
18f547ad 2635 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
69f853f8 2636 in the space previously used by unused3
2637 (grub_hfsplus_uuid): new function
2638 (grub_hfsplus_fs): added uuid field
2639
4c402e73 26402009-05-03 Pavel Roskin <proski@gnu.org>
2641
2642 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
2643 suppress warnings. It's no longer needed.
2644 * disk/host.c: Likewise.
2645 * disk/ata_pthru.c: Likewise.
2646 * disk/loopback.c: Likewise.
2647 * hook/datehook.c: Likewise.
2648 * parttool/pcpart.c: Likewise.
2649 * fs/i386/pc/pxe.c: Likewise.
2650 * fs/ntfscomp.c: Likewise.
2651 * efiemu/main.c: Likewise.
2652 * mmap/mmap.c: Likewise.
2653 * commands/crc.c: Likewise.
2654 * commands/hexdump.c: Likewise.
2655 * commands/hdparm.c: Likewise.
2656 * commands/acpi.c: Likewise.
2657 * commands/echo.c: Likewise.
2658 * commands/minicmd.c: Likewise.
2659 * commands/blocklist.c: Likewise.
2660 * commands/memrw.c: Likewise.
2661 * commands/loadenv.c: Likewise.
2662 * commands/usbtest.c: Likewise.
2663 * commands/lsmmap.c: Likewise.
2664 * commands/boot.c: Likewise.
2665 * commands/parttool.c: Likewise.
2666 * commands/configfile.c: Likewise.
2667 * commands/search.c: Likewise.
2668 * commands/ieee1275/suspend.c: Likewise.
2669 * commands/cat.c: Likewise.
2670 * commands/i386/pc/pxecmd.c: Likewise.
2671 * commands/i386/pc/play.c: Likewise.
2672 * commands/i386/pc/halt.c: Likewise.
2673 * commands/i386/pc/vbeinfo.c: Likewise.
2674 * commands/i386/pc/vbetest.c: Likewise.
2675 * commands/lspci.c: Likewise.
2676 * commands/date.c: Likewise.
2677 * commands/handler.c: Likewise.
2678 * commands/ls.c: Likewise.
2679 * commands/test.c: Likewise.
2680 * commands/cmp.c: Likewise.
2681 * commands/efi/loadbios.c: Likewise.
2682 * commands/efi/fixvideo.c: Likewise.
2683 * commands/halt.c: Likewise.
2684 * commands/help.c: Likewise.
2685 * commands/reboot.c: Likewise.
2686 * hello/hello.c: Likewise.
2687 * script/sh/main.c: Likewise.
2688 * loader/xnu.c: Likewise.
2689 * term/terminfo.c: Likewise.
2690 * term/i386/pc/serial.c: Likewise.
2691 * term/usb_keyboard.c: Likewise.
2692
515b5079 26932009-05-03 David S. Miller <davem@davemloft.net>
2694
2695 * normal/menu.c: Include grub/parser.h
2696
dfc31a22 26972009-05-03 Pavel Roskin <proski@gnu.org>
2698
2fee74f1 2699 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
2700 not char*.
2701 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
2702 Suggested by Javier Martín <lordhabbit@gmail.com>
2703
dfc31a22 2704 * util/i386/pc/grub-mkrescue.in: Allow for the case when
2705 efiemu??.o doesn't exist.
2706 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
2707 copying.
2708
18f547ad 27092009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
cef17233 2710
2711 FreeBSD 64-bit support
2712
18f547ad 2713 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
cef17233 2714 and loader/i386/bsd_trampoline.S
2715 (bsd_mod_ASFLAGS): new variable
2716 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
2717 (FREEBSD_MODTYPE_KERNEL64): likewise
2718 (grub_bsd64_trampoline_start): likewise
2719 (grub_bsd64_trampoline_end): likewise
2720 (grub_bsd64_trampoline_selfjump): likewise
2721 (grub_bsd64_trampoline_gdt): likewise
2722 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
2723 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
2724 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
2725 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18f547ad 2726 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
cef17233 2727 of "attrib" member
2728 * loader/i386/bsd_pagetable.c: new file
2729 * loader/i386/bsd_trampoline.S: likewise
2730 * loader/i386/bsd.c (ALIGN_QWORD): new macro
2731 (ALIGN_VAR): likewise
2732 (entry_hi): new variable
2733 (kern_end_mdofs): likewise
2734 (is_64bit): likewise
2735 (grub_freebsd_add_meta): use ALIGN_VAR
2736 (grub_e820_mmap): new declaration
2737 (grub_freebsd_add_mmap): new function
2738 (grub_freebsd_add_meta_module): support 64 bit kernels
2739 (grub_freebsd_list_modules): use ALIGN_VAR
2740 (gdt_descriptor): new declaration
2741 (grub_freebsd_boot): support 64 bit kernels
2742 (grub_bsd_elf64_hook): new function
2743 (grub_bsd_load_elf): support elf64
2744
038c5720 27452009-05-03 Bean <bean123ch@gmail.com>
2746
2747 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2748 after we get the result of if statement.
2749
fc45fb58 27502009-05-03 Bean <bean123ch@gmail.com>
2751
2752 * Makefile.in (enable_efiemu): New variable.
2753
2754 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2755 set.
2756 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2757 path.
2758 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2759 path, add -mno-red-zone option.
2760 (efiemu64_s.o): Likewise.
2761 (efiemu64.o): Use macro $^ for source file.
2762
2763 * configure.ac (--enable-efiemu): New option.
2764
bbee0f2b 27652009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
2766
2767 xnu support
2768
2769 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2770 (pkglib_MODULES): add xnu.mod
2771 (xnu_mod_SOURCES): new variable
2772 (xnu_mod_CFLAGS): likewise
2773 (xnu_mod_LDFLAGS): likewise
2774 (xnu_mod_ASFLAGS): likewise
2775 * conf/i386-pc.rmk: likewise
2776 * conf/x86_64-efi.rmk: likewise
7dd4a573 2777 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 2778 new declaration
2779 * include/grub/i386/macho.h: new file
2780 * include/grub/i386/xnu.h: likewise
2781 * include/grub/macho.h: likewise
2782 * include/grub/machoload.h: likewise
2783 * include/grub/x86_64/macho.h: likewise
2784 * include/grub/x86_64/xnu.h: likewise
2785 * include/grub/xnu.h: likewise
2786 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
2787 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
2788 * loader/i386/efi/xnu.c: new file
2789 * loader/i386/pc/xnu.c: likewise
2790 * loader/i386/xnu.c: likewise
2791 * loader/i386/xnu_helper.S: likewise
2792 * loader/macho.c: likewise
2793 * loader/xnu.c: likewise
2794 * loader/xnu_resume.c: likewise
2795 * util/grub-dumpdevtree: likewise
2796 * include/grub/i386/pit.h: include grub/err.h
2797 (grub_pit_wait): export
2798 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 2799
5caf964d 28002009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
2801
2802 Efiemu
7dd4a573 2803
5caf964d 2804 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 2805 _linux_efi, linux_efi.
2806 new files in grub-emu
5caf964d 2807 new targets efiemu32.o and efiemu64.o
2808 * loader/linux_normal_efiemu.c: likewise
2809 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 2810 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 2811 files to copy
2812 * include/grub/autoefi.h: new file
7dd4a573 2813 * include/grub/i386/efiemu.h: likewise
5caf964d 2814 * include/grub/i386/pc/efiemu.h: likewise
2815 * include/grub/efi/api.h: add LL suffix when necessary
2816 new definitions relating to tables
2817 * include/grub/efiemu/efiemu.h: new file
2818 * include/grub/efiemu/runtime.h: likewise
2819 * efiemu/prepare.c: likewise
2820 * efiemu/loadcore_common.c: likewise
2821 * efiemu/loadcore64.c: likewise
2822 * efiemu/runtime/efiemu.sh: likewise
2823 * efiemu/runtime/efiemu.S: likewise
2824 * efiemu/runtime/efiemu.c: likewise
2825 * efiemu/runtime/config.h: likewise
2826 * efiemu/prepare32.c: likewise
2827 * efiemu/main.c: likewise
2828 * efiemu/modules/pnvram.c: likewise
2829 * efiemu/modules/i386: likewise
2830 * efiemu/modules/i386/pc: likewise
2831 * efiemu/modules/acpi.c: likewise
2832 * efiemu/i386/pc/cfgtables.c: likewise
2833 * efiemu/i386/loadcore64.c: likewise
2834 * efiemu/i386/loadcore32.c: likewise
2835 * efiemu/prepare64.c: likewise
2836 * efiemu/loadcore.c: likewise
2837 * efiemu/symbols.c: likewise
2838 * efiemu/mm.c: likewise
2839 * efiemu/loadcore32.c: likewise
7dd4a573 2840
28412009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 2842
2843 ACPI spoofing
2844
2845 * commands/acpi.c: new file
2846 * commands/i386/pc/acpi.c: likewise
2847 * commands/efi/acpi.c: likewise
2848 * include/grub/acpi.h: likewise
2849 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2850 (acpi_mod_SOURCES): new variable
2851 (acpi_mod_CFLAGS): likewise
2852 (acpi_mod_LDFLAGS): likewise
2853 * conf/i386-efi.rmk: likewise
2854 * conf/x86_64-efi.rmk: likewise
2855
7dd4a573 28562009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 2857
2858 Missing part from mmap patch
2859
2860 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2861 (grub_mmap_unregister)
2862 (grub_mmap_free_and_unregister): use grub_mmap_register
2863
7dd4a573 28642009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 2865
2866 Mmap services
2867
2868 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2869 * loader/i386/linux.c (find_mmap_size): likewise
2870 (allocate_pages): likewise
2871 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2872 (grub_fill_multiboot_mmap): likewise
2873 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2874 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2875 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2876 (OPENBSD_MMAP_RESERVED): likewise
2877 * include/grub/i386/pc/memory.h: include grub/memory.h
2878 (grub_lower_mem): removed
2879 (grub_upper_mem): likewise
2880 (GRUB_MACHINE_MEMORY_ACPI): new definition
2881 (GRUB_MACHINE_MEMORY_NVS): likewise
2882 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2883 (GRUB_MACHINE_MEMORY_HOLE): likewise
2884 (grub_machine_mmap_register): likewise
2885 (grub_machine_mmap_unregister): likewise
2886 (grub_machine_get_upper): likewise
2887 (grub_machine_get_lower): likewise
2888 (grub_machine_get_post64): likewise
2889 * include/grub/i386/efi/memory.h: new file
2890 * include/grub/x86_64/efi/memory.h: likewise
2891 * include/grub/efi/memory.h: likewise
2892 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2893 (mmap_mod_SOURCES): new variable
2894 (mmap_mod_LDFLAGS): likewise
2895 (mmap_mod_ASFLAGS): likewise
2896 * conf/i386-coreboot.rmk: likewise
2897 * conf/i386-ieee1275.rmk: likewise
2898 * conf/i386-efi.rmk: likewise
2899 * conf/x86_64-efi.rmk: likewise
2900 * include/grub/types.h (UINT_TO_PTR): new macro
2901 (PTR_TO_UINT32): likewise
2902 (PTR_TO_UINT64): likewise
2903 * include/grub/memory.h: new file
2904 * mmap/i386/pc/mmap.c: likewise
2905 * mmap/i386/pc/mmap_helper.S: likewise
2906 * mmap/i386/uppermem.c: likewise
2907 * mmap/mmap.c: likewise
2908 * mmap/efi/mmap.c: likewise
7dd4a573 2909 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 2910 grub_upper_mem
2911 * kern/i386/pc/init.c (grub_lower_mem): removed variable
2912 (grub_upper_mem): likewise
2913 (grub_machine_init): don't use grub_upper_mem,
2914 make grub_lower_mem local
2915 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2916 grub_mmap_iterate and grub_mmap_get_upper
2917 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2918
d558e6b5 29192009-05-02 Bean <bean123ch@gmail.com>
2920
2921 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2922 script/sh/parser.y.
2923 (pkglib_MODULES): Add normal.mod and sh.mod.
2924 (normal_SOURCES): New variable.
2925 (normal_mod_CFLAGS): Likewise.
2926 (normal_mod_LDFLAGS): Likewise.
2927 (sh_mod_SOURCES): Likewise.
2928 (sh_mod_CFLAGS): Likewise.
2929 (sh_mod_LDFLAGS): Likewise.
2930
2931 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2932 script/sh/lexer.c_DEPENDENCIES.
2933 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2934 kern/rescue_reader.c and kern/rescue_parser.c.
2935 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2936 (grub_emu_SOURCES): Change source files.
2937 (pkglib_MODULES): Remove normal.mod.
2938 (normal_SOURCES): Removed.
2939 (normal_mod_CFLAGS): Likewise.
2940 (normal_mod_LDFLAGS): Likewise.
2941 * conf/i386-coreboot.rmk: Likewise.
2942 * conf/i386-efi.rmk: Likewise.
2943 * conf/i386-ieee1276.rmk: Likewise.
2944 * conf/powerpc-ieee1275.rmk: Likewise.
2945 * conf/sparc64-ieee1275.rmk: Likewise.
2946 * conf/x86_64-efi.rmk: Likewise.
2947
2948 * include/grub/command.h (grub_command_execute): New inline function.
2949
2950 * include/grub/menu.h (grub_menu_entry): Removed commands field.
2951
2952 * include/grub/normal.h: Remove <grub/setjmp.h>.
2953 (grub_fs_module_list): Moved to normal/autofs.c.
2954 (grub_exit_env): Removed.
2955 (grub_command_execute): Likewise.
2956 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2957 parameter script.
2958 (read_command_list): New function declaration.
2959 (read_fs_list): Likewise.
2960
2961 * include/parser.h: Include <grub/reader.h>.
2962 (grub_parser_split_cmdline): Change type of getline parameter.
2963 (grub_parser): New structure.
2964 (grub_parser_class): New variable.
2965 (grub_parser_execute): New function declaration.
2966 (grub_register_rescue_parser): Likewise.
2967 (grub_parser_register): New inline function.
2968 (grub_parser_unregister): Likewise.
2969 (grub_parser_get_current): Likewise.
2970 (grub_parser_set_current): Likewise.
2971
2972 * include/grub/reader.h: New file.
2973 * kern/reader.c: Likewise.
2974 * kern/rescue_parser.c: Likewise.
2975 * kern/rescue_reader.c: Likewise.
2976 * normal/autofs.c: Likewise.
2977 * normal/dyncmd.c: Likewise.
2978
2979 * include/grub/rescue.h: Removed.
2980 * normal/command.h: Likewise.
2981
2982 * include/grub/script.h: Moved to ...
2983 * include/grub/script_sh.h: ... Moved here.
2984 * normal/execute.c: Moved to ...
2985 * script/sh/execute.c: ... Moved here.
2986 * normal/function.c: Moved to ...
2987 * script/sh/function.c: ... Moved here.
2988 * normal/lexer.c: Moved to ...
2989 * script/sh/lexer.c: ... Moved here.
2990 * normal/parser.y: Moved to ...
2991 * script/sh/parser.y: ... Moved here.
2992 * normal/script.c: Moved to ...
2993 * script/sh/script.c: ... Moved here.
2994
2995 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2996 <grub/reader.h>.
2997 (grub_exit_env): Removed.
2998 (fs_module_list): Moved to normal/autofs.c.
2999 (grub_file_getline): Don't handle comment here.
3000 (free_menu): Skip removed field entry->commands.
3001 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
3002 script parameter.
3003 (read_config_file): Removed nested parameter, change getline function.
3004 (grub_enter_normal_mode): Removed.
3005 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
3006 (read_command_list): Likewise.
3007 (autoload_fs_module): Moved to normal/autofs.c.
3008 (read_fs_list): Likewise.
3009 (reader_nested): New variable.
3010 (grub_normal_execute): Run parser.sh to switch to sh parser.
3011 (grub_cmd_rescue): Removed.
3012 (cmd_normal): Removed.
3013 (grub_cmd_normal): Unregister itself at the beginning. Don't register
3014 rescue command.
3015 (grub_cmdline_run): New function.
3016 (grub_normal_reader_init): Likewise.
3017 (grub_normal_read_line): Likewise.
3018 (grub_env_write_pager): Likewise.
3019 (cmdline): New variable.
3020 (grub_normal_reader): Likewise.
3021 (GRUB_MOD_INIT): Register normal reader and set as current, register
3022 pager hook, register normal command with grub_register_command_prio,
3023 so that it won't show up in command.lst.
3024 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
3025 grub_fs_autoload_hook.
3026
3027 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
3028 (grub_menu_execute_entry): Replace grub_script_execute with
3029 grub_parser_execute, change parameter to grub_command_execute.
3030
3031 * normal/menu_text.c: Remove <grub/script.h>.
3032
3033 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
3034 and <grub/parser.h>.
3035 (run): Change editor_getline to use new parser interface. Change
3036 parameter to grub_command_execute.
3037
3038 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
3039 <grub/reader.h> and <grub/parser.h>.
3040 (grub_load_normal_mode): Execute normal command.
3041 (grub_main): Call grub_register_core_commands,
3042 grub_register_rescue_parser and grub_register_rescue_reader, use
3043 grub_reader_loop to enter input loop.
3044
7dd4a573 3045 * kern/parser.c (grub_parser_split_cmdline): Change type of
3046 getline parameter.
d558e6b5 3047 (grub_parser_class): New variable.
3048 (grub_parser_execute): New function.
3049
3050 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
3051 * loader/multiboot2.c: Likewise.
3052 * loader/sparc64/ieee1275/linux.c: Likewise.
3053
3054 * util/grub-emu.c (read_command_list): New dummy function.
3055
18db813d 30562009-05-02 Robert Millan <rmh.grub@aybabtu.com>
3057
3058 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
3059 count to 16 for CCISS and IDA.
3060
6c67de15 30612009-05-02 Robert Millan <rmh.grub@aybabtu.com>
3062
3063 * normal/menu_text.c (grub_wait_after_message): Print a newline
3064 after waiting for user input.
3065
3066 * loader/i386/linux.c: Include `<grub/normal.h>'.
3067 (grub_cmd_linux): Improve the error message about `ask' mode, by
3068 waiting for user input so it's not missed (we can do this, since
3069 user requested interaction).
3070
d9dc87b0 30712009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
3072
3073 Added missing lst to grub-mkrescue
3074
3075 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
3076 and ${input_dir}/parttool.lst
3077
ac8a2baa 30782009-04-30 David S. Miller <davem@davemloft.net>
3079
ad22a610 3080 * util/hostdisk.c (device_is_wholedisk): New function.
3081 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
3082 zero only if device_is_wholedisk() returns true.
3083
6966215d 3084 * util/hostdisk.c (convert_system_partition_to_system_disk):
3085 Handle virtual disk devices named /dev/vdiskX as found on sparc
3086 and powerpc.
3087
ac8a2baa 3088 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
3089 lettered partition specifier is found, convert to numbered.
3090
979b4fb4 30912009-04-29 David S. Miller <davem@davemloft.net>
3092
e2bf39b2 3093 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
3094 * include/grub/sparc64/ieee1275/memory.h: Likewise.
3095
3c64e104 3096 * normal/command.c: Add missing newline at end of file.
3097
979b4fb4 3098 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
3099 warnings.
3100 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
3101 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
3102 grub_ofdisk_read): Likewise, and deal similarly with the fact that
3103 ihandles have a 32-bit type but need to be stored in a "void *".
3104
136d9f82 31052009-04-28 Pavel Roskin <proski@gnu.org>
3106
9459c306 3107 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
3108 not disk. Adjust all dependencies.
2e08a26a 3109 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 3110 grub_disk_close().
3111
136d9f82 3112 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
3113 parent's partition, don't copy it by reference, as it gets freed
3114 on close.
3115
7dd4a573 31162009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 3117
3118 Preboot hooks support
3119
3120 * commands/boot.c (struct grub_preboot_t): new declaration
3121 (preboots_head): new variable
3122 (preboots_tail): likewise
3123 (grub_loader_register_preboot_hook): new function
3124 (grub_loader_unregister_preboot_hook): likewise
3125 (grub_loader_set): launch preboot hooks
3126 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
3127 (grub_loader_register_preboot_hook): new declaration
3128 (grub_loader_unregister_preboot_hook): likewise
3129
5af922b5 31302009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
3131
3132 Warning fix
3133
7dd4a573 3134 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 3135 calling grub_dprintf
3136
a5562c30 31372009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
3138
3139 Bug and warning fixes
3140
7dd4a573 3141 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 3142 declaration
3143 * commands/test.c (test_parse): fixed bug with file tests and corrected
3144 declaration of find_file
3145
4006f85c 31462009-04-26 Pavel Roskin <proski@gnu.org>
3147
3148 * Makefile.in: Don't install empty manual pages if help2man is
3149 missing. Use help2man option for output, not shell redirection.
3150
5c77c3de 31512009-04-26 David S. Miller <davem@davemloft.net>
3152
3153 * util/grub-mkdevicemap.c (make_device_map): Add missing
3154 NESTED_FUNC_ATTR to process_device().
3155
033b10a8 31562009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
3157
3158 Test command
3159
3160 * commands/test.c: rewritten to use bash-like test
3161
e4343593 31622009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
3163
3164 Parttool autoloading and improvements
3165
7dd4a573 3166 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 3167 (parttool.lst): new target
3168 * genmk.rb: generate parttool-*
3169 (CLEANFILES): add #{parttool}
3170 (PARTTOOLFILES): new variable
3171 * genparttoollist.sh: new file
7dd4a573 3172 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 3173 (grub_pcpart_type): likewise
3174 * commands/parttool.c (helpmsg): new variable
3175 (grub_cmd_parttool): output help if not enough arguments are supplied
3176 autoload modules
3177 (GRUB_MOD_INIT(parttool)): use helpmsg
3178
0d312500 31792009-04-24 David S. Miller <davem@davemloft.net>
3180
7dd4a573 3181 Avoiding opening same device multiple times in device iterator.
0d312500 3182
3183 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 3184 and use it to build a list of partitions in iterate_disk() and
0d312500 3185 iterate_partition().
3186
ac20caff 3187 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
3188 on disk->data.
3189
0dcf7495 3190 * disk/ieee1275/nand.c (grub_nand_iterate): Return
3191 grub_devalias_iterate() result instead of unconditional 0.
3192 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
3193 Also, capture hook return value, either directly or via
3194 grub_children_iterate(), and propagate to caller.
3195 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
3196 grub_children_iterate): Return value is now 'int' instead of
3197 'grub_err_t'.
3198 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
3199 like a proper iterator, stopping when hooks return non-zero.
3200 (grub_devalias_iterate): Likewise.
3201
c8c08833 32022009-04-23 David S. Miller <davem@davemloft.net>
3203
3204 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
3205
f01005a8 32062009-04-22 David S. Miller <davem@davemloft.net>
3207
3208 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
3209 is larger than address_cells, use that value for address_cells too.
3210
4e8269da 3211 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
3212 IEEE1275_MAX_PATH_LEN): Define.
3213 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
3214 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
3215 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
3216 'devtype'. Explicitly NULL terminate devalias expansion.
3217
a1447506 3218 * util/sparc64/ieee1275/misc.c: New file.
3219 * util/sparc64/ieee1275/grub-setup.c: New file.
3220 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
3221 * util/sparc64/ieee1275/grub-mkimage.c: New file.
3222 * util/sparc64/ieee1275/grub-install.in: New file.
3223 * util/ieee1275/ofpath.c: New file.
3224 * util/ieee1275/devicemap.c: New file.
3225 * util/devicemap.c: New file.
3226 * util/deviceiter.c: New file.
3227 * kern/sparc64/ieee1275/init.c: New file.
3228 * include/grub/util/ofpath.h: New file.
3229 * include/grub/util/deviceiter.h: New file.
3230 * util/grub-mkdevicemap.c: Include deviceiter.h.
3231 Implement using grub_util_emit_devicemap_entry and
3232 grub_util_iterate_devices.
3233 * conf/i386-corebook.rmk: Build util/deviceiter.c and
3234 util/devicemap.c into grub-mkdevicemap
3235 * conf/i386-efi.rmk: Likewise.
3236 * conf/i386-ieee1275.rmk: Likewise.
3237 * conf/i386-pc.rmk: Likewise.
3238 * conf/powerpc-ieee1275.rmk: Likewise.
3239 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
3240 images and installation utilities. Build kernel as image
3241 instead of as elf binary. Use common rules as much as possible.
3242
7dd4a573 32432009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 3244
3245 Correct GPT definition
3246
7dd4a573 3247 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 3248 of "attrib" member
3249
c6c5219f 32502009-04-19 Felix Zielcke <fzielcke@z-51.de>
3251
3252 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
3253
0552ff9f 32542009-04-19 David S. Miller <davem@davemloft.net>
3255
3256 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
3257 (grub_rescue_cmd_linux): Rename to...
3258 (grub_cmd_linux): and fix prototype.
3259 (grub_rescue_cmd_initrd): Rename to...
3260 (grub_cmd_initrd): and fix prototype.
3261 (cmd_linux, cmd_initrd): New.
3262 (GRUB_MOD_INIT(linux)): Use grub_register_command().
3263 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
3264
d1a282fc 32652009-04-17 Pavel Roskin <proski@gnu.org>
3266
07c5039f 3267 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
3268 format.
3269 (grub_ohci_transfer): Likewise.
3270
b012002d 3271 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
3272
1bc09c35 3273 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
3274 return without a value. Fix inconsistent indentation.
3275
e0ff9126 3276 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
3277 match struct grub_fs.
3278
d1a282fc 3279 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
3280 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
3281 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
3282 * commands/lspci.c (grub_lspci_iter): Likewise.
3283
a96df3f2 32842009-04-16 Bean <bean123ch@gmail.com>
3285
3286 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
3287 value.
3288
41bb0fe9 32892009-04-15 Pavel Roskin <proski@gnu.org>
3290
3291 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
3292 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
3293 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
3294 definitions.
3295
596c6970 32962009-04-15 Felix Zielcke <fzielcke@z-51.de>
3297
3298 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 3299 that no multiple data or metadata areas are supported and `Unknown
596c6970 3300 metadata header'.
3301
7dd4a573 33022009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 3303
3304 Move loader out of the kernel
3305
3306 * kern/loader.c: moved to ...
3307 * commands/boot.c: ... moved here
3308 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
3309 * commands/boot.c (grub_cmd_boot): moved here. All users updated
3310 * include/grub/kernel.h (grub_machine_fini): export
3311 * include/grub/loader.h (grub_loader_is_loaded): update declaration
3312 (grub_loader_set): likewise
3313 (grub_loader_unset): likewise
3314 (grub_loader_boot): likewise
3315 * conf/common.rmk: new module boot.mod
3316 (pkglib_MODULES): add boot.mod
3317 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
3318 (grub_emu_SOURCES): likewise
3319 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
3320 (grub_emu_SOURCES): likewise
3321 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
3322 (grub_emu_SOURCES): likewise
3323 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
3324 (grub_emu_SOURCES): likewise
3325 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
3326 (grub_emu_SOURCES): likewise
7dd4a573 3327 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
3328 (grub_emu_SOURCES): likewise
0d5d5653 3329 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 3330 (grub_emu_SOURCES): likewise
0d5d5653 3331
7dd4a573 33322009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 3333
3334 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 3335
5999d619 3336 * kern/misc.c (grub_itoa): Removed function
3337 (grub_ltoa): likewise
3338 (grub_vsprintf): use grub_lltoa
3339
7dd4a573 33402009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 3341
3342 Restore grub-emu
3343
3344 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
3345 * conf/i386-coreboot.rmk: likewise
3346 * conf/i386-ieee1275.rmk: likewise
3347 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 3348
20318222 33492009-04-15 Felix Zielcke <fzielcke@z-51.de>
3350
3351 * INSTALL: Add that `./autogen.sh' needs to be run before
3352 `./configure.'.
3353
d05f0df3 33542009-04-14 Bean <bean123ch@gmail.com>
3355
3356 * Makefile.in (pkglib_DATA): Add handler.lst.
3357 (handler.lst): New rule.
3358
3359 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
3360 * conf/i386-coreboot.rmk: Likewise.
3361 * conf/i386-ieee1275.rmk: Likewise.
3362 * conf/i386-efi.rmk: Likewise.
3363 * conf/x86_64-efi.rmk: Likewise.
3364 * conf/powerpc-ieee1275.rmk: Likewise.
3365 * conf/sparc64-ieee1275.rmk: Likewise.
3366
3367 * genhandlerlist.sh: New file.
3368
3369 * genmk.rb: Add rules to generate handler.lst.
3370
3371 * include/grub/normal.h (grub_file_getline): New function definition.
3372 (read_handler_list): Likewise.
3373 (free_handler_list): Likewise.
3374
3375 * include/grub/term.h (grub_term_register_input): Add name parameter
3376 for auto generation of handler.lst.
3377 (grub_term_register_output): Likewise.
3378
3379 * normal/handler.c: New file.
3380
3381 * normal/main.c (get_line): Renamed to grub_file_getline.
3382 (read_config_file): Use the newly renamed grub_file_getline.
3383 (read_command_list): Likewise.
3384 (read_fs_list): Likewise.
3385 (grub_normal_execute): Call read_handler_list to parse handler.lst.
3386 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
3387
3388 * term/efi/console.c (grub_console_init): Add name parameter for auto
3389 generation of handler.lst.
3390 * term/gfxterm.c: Likewise.
3391 * term/i386/pc/at_keyboard.c: Likewise.
3392 * term/i386/pc/console.c: Likewise.
3393 * term/i386/pc/serial.c: Likewise.
3394 * term/i386/pc/vesafb.c: Likewise.
3395 * term/i386/pc/vga.c: Likewise.
3396 * term/i386/pc/vga_text.c: Likewise.
3397 * term/ieee1275/ofconsole.c: Likewise.
3398 * term/usb_keyboard.c: Likewise.
3399
33c846be 34002009-04-14 Bean <bean123ch@gmail.com>
3401
3402 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
3403 properly with null character.
3404
4484e01e 34052009-04-14 Felix Zielcke <fzielcke@z-51.de>
3406
3407 * configure: Remove.
3408 * config.h.in: Likewise.
f93d668e 3409 * stamp-h.in: Likewise.
4484e01e 3410 * DISTLIST: Likewise.
3411 * conf/common.mk: Likewise.
3412 * conf/i386-coreboot.mk: Likewise.
3413 * conf/i386-efi.mk: Likewise.
3414 * conf/i386-ieee1275.mk: Likewise.
3415 * conf/i386.mk: Likewise.
3416 * conf/i386-pc.mk: Likewise.
3417 * conf/powerpc-ieee1275.mk: Likewise.
3418 * conf/sparc64-ieee1275.mk: Likewise.
3419 * conf/x86_64-efi.mk: Likewise.
3420
3421 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
3422 develop on GRUB.
3423
7dd4a573 34242009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 3425 David S. Miller <davem@davemloft.net>
3426
3427 * util/hostdisk.c (make_device_name): Fix buffer length
3428 calculations.
3429
e25b5a8c 34302009-04-14 Felix Zielcke <fzielcke@z-51.de>
3431
3432 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
3433 <sys/param.h> and <sys/sysctl.h>.
3434 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
3435 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
3436 opening the device and reset them afterwards.
3437
1f1f580c 34382009-04-13 Pavel Roskin <proski@gnu.org>
3439
3440 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
3441 Reported by John Stanley <jpsinthemix@verizon.net>
3442
7ebc2d6b 34432009-04-13 Robert Millan <rmh@aybabtu.com>
3444
3445 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 3446 that name for menuentries when appropriate.
7ebc2d6b 3447
d8ba3667 34482009-04-13 Felix Zielcke <fzielcke@z-51.de>
3449
3450 * util/grub.d/10_freebsd.in: Add a missing `fi'.
3451
cba416eb 34522009-04-13 Robert Millan <rmh@aybabtu.com>
3453
3454 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
3455 to Linux, simply abort telling the user it's no longer supported.
3456
a547a745 34572009-04-13 Felix Zielcke <fzielcke@z-51.de>
3458
3459 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 3460 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 3461 `freebsd_loadenv' only when devices.hints exist.
3462
232a769c 34632009-04-13 Pavel Roskin <proski@gnu.org>
3464
3465 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
3466
c3012039 34672009-04-13 Felix Zielcke <fzielcke@z-51.de>
3468
3469 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
3470 partition number.
3471 (grub_drive): Likewise.
3472
234022fe 34732009-04-13 David S. Miller <davem@davemloft.net>
3474
3475 * kern/sparc64/ieee1275/ieee1275.c: New file.
3476 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
3477 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
3478 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
3479 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
3480 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
3481 grub_ieee1275_alloc_physmem): Declare new exported functions.
3482
d8e1836c 3483 * include/grub/sparc64/ieee1275/loader.h: New file.
3484 * include/grub/sparc64/ieee1275/memory.h: Likewise.
3485 * include/grub/sparc64/kernel.h: Likewise.
3486 * loader/sparc64/ieee1275/linux.c: Likewise.
3487
96bd81ec 3488 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
3489 (grub_fstest_SOURCES): Likewise.
3490
6a4737e5 3491 * util/hostdisk.c (make_device_name): Do not make any assumptions
3492 about the length of drive names.
3493
1d7a72fd 3494 * kern/dl.c (grub_dl_load_file): Close file immediately when
3495 we are done using it.
3496
56bc2471 34972009-04-12 David S. Miller <davem@davemloft.net>
3498
3499 * kern/misc.c (grub_ltoa): Fix cast when handling negative
3500 values. Noticed by Pavel Roskin.
3501
df38d0bb 3502 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
3503 target compiler.
7dd4a573 3504
e382e93a 3505 * genmk.rb: Add more flexible image type specification, also
3506 pass --strip-unneeded to objcopy.
3507 * conf/i386-pc.rmk: Use *_FORMAT.
3508 * conf/i386-pc.mk: Rebuilt.
3509
f5dbbca9 3510 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
3511 (OFDISK_HASH_SZ): Define.
3512 (ofdisk_hash): New hash table.
3513 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
3514 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
3515 instead of device phandle which is not unique.
3516
91c88b12 3517 * kern/sparc64/ieee1275/init.c: Delete, replace with...
3518 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
3519 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
3520 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
3521 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
3522 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
3523 GRUB_KERNEL_MACHINE_DATA_END): Define.
3524 (grub_kernel_image_size, grub_total_module_size): Declare.
3525
5b5d4aa5 35262009-04-12 Pavel Roskin <proski@gnu.org>
3527
7dd4a573 3528 * configure.ac: Change the logic when we check for target tools.
3529 Do it when the target is specified and it's different from the
3530 specified value of the host.
5b5d4aa5 3531
c91e1793 35322009-04-11 Felix Zielcke <fzielcke@z-51.de>
3533
3534 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
3535 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
3536 GNU/kFreeBSD. Check if a device is a character device. Use
3537 DIOCGMEDIASIZE to get the size.
3538 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
3539 support for GNU/kFreeBSD.
3540 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
3541 is a character device instead of a block device. Add support for
3542 FreeBSD device names.
3543
3544 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
3545 is a character device instead of a block device.
3546
3547 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
3548 is a character device instead of a block device.
3549
b1ac8644 35502009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
3551
3552 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
3553 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
3554 FreeBSD. Check if a device is a character device. Use
3555 DIOCGMEDIASIZE to get the size.
3556 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
3557 support for FreeBSD.
3558 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
3559 is a character device instead of a block device. Add support for
3560 FreeBSD device names.
3561
3562 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
3563 a character device instead of a block device.
3564 (grub_util_check_char_device): New function.
3565
3566 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
3567 a character device instead of a block device.
3568
3569 * include/grub/util/getroot.h (grub_util_check_char_device): New
3570 prototype.
3571
a3f7515a 35722009-04-11 David S. Miller <davem@davemloft.net>
3573
3574 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
3575 static libgcc.
3576 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
3577 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
3578 function, if present.
3579 (__bswapdi2): Likewise.
3580
0d44993d 3581 * include/grub/sparc64/ieee1275/boot.h: New file.
3582 * boot/sparc64/ieee1275/boot.S: Likewise.
3583 * boot/sparc64/ieee1275/diskboot.S: Likewise.
3584
ed3d2bc2 3585 * kern/misc.c (grub_ltoa): New function.
3586 (grub_vsprintf): Use it to format 'long' integers.
3587
d3bfb59c 35882009-04-10 David S. Miller <davem@davemloft.net>
3589
3590 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
3591 slots are of type grub_ieee1275_cell_t.
3592 (grub_nand_read): Likewise.
3593 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
3594 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
3595 macros are used to compare values in arg/ret block of the call.
3596 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
3597 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
3598 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
3599 grub_ieee1275_instance_to_path, grub_ieee1275_write,
3600 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
3601 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
3602 grub_ieee1275_close, grub_ieee1275_set_property,
3603 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
3604 grub_ieee1275_cell_t.
3605 * kern/ieee1275/openfw.c (grub_map): Likewise.
3606 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
3607 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
3608
450e2238 3609 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
3610 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
3611 (grub_devalias_iterate): Likewise.
3612
7dd4a573 36132009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 3614
3615 UFS improvements
3616
3617 * fs/ufs.c (INODE_NBLOCKS): new definition
3618 (struct grub_ufs_dirent): added fields for non-BSD dirents
3619 (grub_ufs_get_file_block): fixed double indirect handling
3620 (grub_ufs_lookup_symlink): use more robust way to determine whether
3621 symlink is inline
3622 (grub_ufs_find_file): support for non-BSD dirents
3623 (grub_ufs_dir): support for non-BSD dirents
3624
e7e6862a 36252009-04-10 Bean <bean123ch@gnail.com>
3626
3627 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
3628 attribute, otherwise the size would be wrong for i386 platform.
3629
3630 * include/grub/pci.h (grub_pci_read_word): New inline function.
3631 (grub_pci_read_byte): Likewise.
3632 (grub_pci_write): Likewise.
3633 (grub_pci_write_word): Likewise.
3634 (grub_pci_write_byte): Likewise.
3635
3636 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
3637
3638 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
3639 (find_framebuf): Scan pci to locate the frame buffer address.
3640
3641 * commands/efi/fixvideo.c: New file.
3642
3643 * commands/efi/loadbios.c: Likewise.
3644
3645 * commands/memrw.c: Likewise.
3646
3647 * util/grub-dumpbios.in: Likewise.
3648
3649 * conf/common.rmk (grub-dumpbios): New utility.
3650 (pkglib_MODULES): New module memrw.mod.
3651 (memrw_mod_SOURCE): New macro.
3652 (memrw_mod_CFLAGS): Likewise.
3653 (memrw_mod_LDFLAGS): Likewise.
3654
7dd4a573 3655 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 3656 fixvideo.mod.
3657 (loadbios_mod_SOURCE): New macro.
3658 (loadbios_mod_CFLAGS): Likewise.
3659 (loadbios_mod_LDFLAGS): Likewise.
3660 (fixvideo_mod_SOURCE): Likewise.
3661 (fixvideo_mod_CFLAGS): Likewise.
3662 (fixvideo_mod_LDFLAGS): Likewise.
3663
7dd4a573 3664 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 3665 fixvideo.mod.
3666 (loadbios_mod_SOURCE): New macro.
3667 (loadbios_mod_CFLAGS): Likewise.
3668 (loadbios_mod_LDFLAGS): Likewise.
3669 (fixvideo_mod_SOURCE): Likewise.
3670 (fixvideo_mod_CFLAGS): Likewise.
3671 (fixvideo_mod_LDFLAGS): Likewise.
3672
af63ada2 36732009-04-08 Felix Zielcke <fzielcke@z-51.de>
3674
3675 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
3676
c2cdde70 36772009-04-07 David S. Miller <davem@davemloft.net>
3678
3679 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
3680 support for R_SPARC_OLO10 relocations. Fix compile warning for
3681 R_SPARC_WDISP30 case.
ea3f72cf 3682 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 3683
761319cf 36842009-04-06 Pavel Roskin <proski@gnu.org>
3685
1007d1f5 3686 * include/grub/misc.h (ARRAY_SIZE): New macro.
3687 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
3688 New macro.
3689 * loader/i386/linux.c (allocate_pages): Use free_pages().
3690 (grub_linux_unload): Don't use free_pages().
3691 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
3692 wrong index. Treat all other modes as text modes.
3693 (grub_cmd_linux): Initialize vid_mode unconditionally to
3694 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
3695
761319cf 3696 * commands/help.c (print_command_help): Use cmd->prio, not
3697 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
3698
ea761d40 36992009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 3700
ea761d40 3701 Parttool
3702
3703 * parttool/pcpart.c: new file
3704 * commands/parttool.c: likewise
3705 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
3706 (parttool_mod_SOURCES): new variable
3707 (parttool_mod_CFLAGS): likewise
3708 (parttool_mod_LDFLAGS): likewise
3709 (pcpart_mod_SOURCES): likewise
3710 (pcpart_mod_CFLAGS): likewise
3711 (pcpart_mod_LDFLAGS): likewise
7dd4a573 3712 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 3713 and parttool/pcpart.c
3714 * conf/i386-efi.rmk: likewise
3715 * conf/i386-ieee1275.rmk: likewise
3716 * conf/i386-pc.rmk: likewise
3717 * conf/powerpc-ieee1275.rmk: likewise
3718 * conf/sparc64-ieee1275.rmk: likewise
3719 * conf/x86_64-ieee1275.rmk: likewise
3720
05aaebfb 37212009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3722
3723 Support for mtime and further expandability of dir command
3724
3725 * include/grub/lib/datetime.h: moved to ...
7dd4a573 3726 * include/grub/datetime.h: ... moved here and added
05aaebfb 3727 declaration of grub_unixtime2datetime. All users updated
7dd4a573 3728 * include/grub/fs.h: new syntax for dir and mtime functions in
3729 struct grub_fs
05aaebfb 3730 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
3731 and GRUB_FSHELP_FLAGS_MASK
3732 * commands/ls.c (grub_ls_list_files): Write mtime in long format
3733 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
3734 (grub_ext2_mtime): new function
3735 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
3736 (grub_hfsplus_mtime): new function
3737 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
3738 (GRUB_UFS_ATTR_FILE): likewise
3739 (GRUB_UFS_ATTR_LNK): likewise
3740 (struct grub_ufs_sblock): new fields mtime
3741 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3742 all users updated
3743 (grub_ufs_dir): mtime support
3744 (grub_ufs_mtime): new function
3745 * fs/affs.c (grub_affs_dir): use new dir syntax
3746 * fs/afs.c (grub_afs_dir): likewise
3747 * fs/cpio.c (grub_cpio_dir): likewise
3748 * fs/fat.c (grub_fat_find_dir): likewise
3749 * fs/hfs.c (grub_hfs_dir): likewise
3750 * fs/iso9660.c (grub_iso9660_dir): likewise
3751 * fs/jfs.c (grub_jfs_dir): likewise
3752 * fs/minix.c (grub_minix_dir): likewise
3753 * fs/ntfs.c (grub_ntfs_dir): likewise
3754 * fs/reiserfs.c (grub_reiserfs_dir): likewise
3755 * fs/sfs.c (grub_sfs_dir): likewise
3756 * fs/xfs.c (grub_xfs_dir): likewise
3757 * util/hostfs.c (grub_hostfs_dir): likewise
3758 * lib/datetime.c: moved to ...
3759 * normal/datetime.c: ... moved here
3760 (grub_unixtime2datetime): new function
3761 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 3762 * normal/completion.c (iterate_dir): use new dir syntax
3763 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 3764 last modification time of a volume
7dd4a573 3765 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 3766 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 3767 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 3768 (normal_mod_SOURCES): likewise
3769 (datetime_mod_SOURCES): Removed lib/datetime.c
3770 * conf/i386-efi.rmk: likewise
7dd4a573 3771 * conf/i386-ieee1275.rmk: likewise
05aaebfb 3772 * conf/i386-pc.rmk: likewise
3773 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 3774 * conf/sparc64-ieee1275.rmk: likewise
3775 * conf/x86_64-efi.rmk: likewise
05aaebfb 3776
8a7e1a14 37772009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3778
3779 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 3780
3781 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 3782 on grub_fat_find_dir
3783 (grub_fat_find_dir): use grub_fat_iterate_dir
3784 (grub_fat_label): likewise
3785
04186a9c 37862009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
3787
7dd4a573 3788 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 3789 and command.h
3790 remove extraneous kernel_elf_HEADERS
3791
da4c0bb6 37922009-04-04 Bean <bean123ch@gnail.com>
3793
3794 * include/grub/util/misc.h: Add dummy function fsync for mingw.
3795
3796 * util/misc.c: Likewise.
3797
54ad9555 37982009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3799
3800 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3801 instead of grub_printf.
3802
7a6bf9f2 38032009-04-03 Robert Millan <rmh@aybabtu.com>
3804
3805 * loader/i386/linux.c (grub_linux_setup_video): Fill
3806 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3807 values from `mode info' structure instead of hardcoded
3808 values.
3809
3fcc2083 38102009-04-01 Pavel Roskin <proski@gnu.org>
3811
3812 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3813 unused now.
3814 * genmk.rb: Likewise.
3815 * configure.ac: Likewise.
3816
5ec9740b 38172009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
3818
3819 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3820 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
3821
5270cec8 38222009-04-01 David S. Miller <davem@davemloft.net>
3823
3824 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 3825 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 3826 (grub_setjmp): Mark with 'returns_twice' attribute.
3827 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3828 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3829 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3830
9c3dd854 38312009-04-01 Robert Millan <rmh@aybabtu.com>
3832
3833 Reapply fix from 2008-07-28 which was accidentally reverted; also
3834 perform the same fix to a similar check in same function.
3835
3836 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3837 with the same number are found, just use issue a warning with
3838 grub_dprintf(), as this error has been reported to be non-fatal.
3839
0d818b7e 38402009-03-31 Pavel Roskin <proski@gnu.org>
3841
3842 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3843 for cross-compilation.
3844
95646d92 38452009-03-30 Robert Millan <rmh@aybabtu.com>
3846
3847 Fix i386-ieee1275 build.
3848
3849 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3850 Remove declaration.
3851
6a003ed1 38522009-03-30 Pavel Roskin <proski@gnu.org>
3853
3854 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3855 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
3856 zero-terminated, rely only on the strlen value. Fix comparison
3857 of strings differing in length.
3858
92f33540 38592009-03-30 Robert Millan <rmh@aybabtu.com>
3860
3861 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3862 checking for abi version. Improve error messages on BIOS to notify
3863 user about `linux16' command.
3864
a8c48fd5 38652009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
3866
f968172e 3867 Leak fixes
a8c48fd5 3868
f968172e 3869 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3870 in case of collision
3871 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 3872
9c323f09 38732009-03-29 Robert Millan <rmh@aybabtu.com>
3874
3875 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3876 set `vid_mode' accordingly.
3877 (grub_linux_boot): Process `vid_mode' and set video mode.
3878
ae68f423 38792009-03-29 Robert Millan <rmh@aybabtu.com>
3880
3881 * util/grub.d/10_linux.in (linux_entry): New function.
3882 Factorize generation of Linux boot entries.
3883
5709cfc4 38842009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
3885
3886 Make the format of Environment Block plain text. The boot loader
3887 part is not tested well yet.
7dd4a573 3888
5709cfc4 3889 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3890 (buffer): Removed.
3891 (envblk): Likewise.
3892 (usage): Remove "info" and "clear". Add "unset". Update the
3893 description of "set", as this does not delete variables any
3894 longer.
3895 (create_envblk_file): Complete rewrite.
3896 (open_envblk_file): Likewise.
3897 (cmd_info): Removed.
3898 (cmd_list): Likewise.
3899 (cmd_set): Likewise.
3900 (cmd_clear): Likewise.
3901 (list_variables): New function.
3902 (write_envblk): Likewise.
3903 (set_variables): Likewise.
3904 (unset_variables): Likewise.
3905 (main): Complete rewrite.
3906
3907 * commands/loadenv.c (buffer): Removed.
3908 (envblk): Likewise.
3909 (open_envblk_file): New function.
3910 (read_envblk_file): Complete rewrite.
3911 (grub_cmd_load_env): Likewise.
3912 (grub_cmd_list_env): Likewise.
3913 (struct blocklist): New struct.
3914 (free_blocklists): New function.
3915 (check_blocklists): Likewise.
3916 (write_blocklists): Likewise.
3917 (grub_cmd_save_env): Complete rewrite.
3918
3919 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3920 a plain text signature.
3921 (GRUB_ENVBLK_MAXLEN): Removed.
3922 (struct grub_envblk): Complete rewrite.
3923 (grub_envblk_find): Removed.
3924 (grub_envblk_insert): Likewise.
3925 (grub_envblk_open): New prototype.
3926 (grub_envblk_set): Likewise.
3927 (grub_envblk_delete): Put const to VALUE.
3928 (grub_envblk_iterate): Put const to NAME and VALUE.
3929 (grub_envblk_close): New prototype.
3930 (grub_envblk_buffer): New inline function.
3931 (grub_envblk_size): Likewise.
3932
3933 * lib/envblk.c: Include grub/mm.h.
3934 (grub_env_find): Removed.
3935 (grub_envblk_open): New function.
3936 (grub_envblk_close): Likewise.
3937 (escaped_value_len): Likewise.
3938 (find_next_line): Likewise.
3939 (grub_envblk_insert): Removed.
3940 (grub_envblk_set): New function.
3941 (grub_envblk_delete): Complete rewrite.
3942 (grub_envblk_iterate): Likewise.
3943
a9368fd3 39442009-03-28 Robert Millan <rmh@aybabtu.com>
3945
3946 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3947 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3948 variables. Use 16-bit loader.
3949 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3950 loader.
3951 * kern/i386/loader.S (grub_linux_boot): Rename to ...
3952 (grub_linux16_boot): ... this. Update all users.
3953 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3954 (grub_linux_boot): ... this. Update all users.
3955
3956 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3957 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
3958 commands to `linux16' and `initrd16'.
3959 (GRUB_MOD_FINI(linux)): Rename to ...
3960 (GRUB_MOD_FINI(linux16)): ... this.
3961
e4dd5a7e 39622009-03-24 Pavel Roskin <proski@gnu.org>
3963
3964 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3965 not just for compilation.
3966
c04d6e05 39672009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
3968
3969 Move multiboot helper out of kernel
3970
3971 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3972 `loader/i386/multiboot_helper.S'.
3973 * conf/i386-coreboot.rmk: Likewise
3974 * conf/i386-ieee1275.rmk: Likewise
3975
3976 * kern/i386/loader.S: Move multiboot helpers from here...
3977 * loader/i386/multiboot_helper.S: ...moved here
3978 * include/grub/i386/loader.h: Move declarations of multiboot
3979 helpers from here...
3980 * include/grub/i386/multiboot.h: ...moved here
3981 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3982
42a5b3fc 39832009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3984
3985 * kern/env.c (grub_env_context_open): Added an argument to specify
3986 whether a new context inherits exported variables from current
3987 one. This is useful when making a sandbox to interpret a config
3988 file.
3989 All callers updated.
3990
3991 * include/grub/env.h (grub_env_context_open): Updated the prototype.
3992
b28bbc4e 39932009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3994
3995 * kern/env.c (grub_env_context_close): Fix memory leaks.
3996
f04f02e4 39972009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
3998
3999 * normal/main.c (grub_normal_execute): Added an argument
4000 BATCH to specify if an interactive interface should be provided
4001 after reading a config file.
4002 All callers updated.
4003 (read_command_list): Prevent being executed twice.
4004 (read_fs_list): Likewise.
4005
42a5b3fc 4006 * include/grub/normal.h (grub_normal_execute): Updated the
4007 prototype.
f04f02e4 4008
41473ac2 40092009-03-22 Pavel Roskin <proski@gno.org>
4010
fbc00b0c 4011 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
4012 _start.
4013 * kern/i386/pc/startup.S: Likewise.
4014 * kern/i386/efi/startup.S: Likewise.
4015 * kern/i386/ieee1275/startup.S: Likewise.
4016 * kern/i386/coreboot/startup.S: Likewise.
4017 * kern/x86_64/efi/startup.S: Likewise.
4018
41473ac2 4019 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
4020 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
4021 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
4022
2274cc8f 40232009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
4024
4025 Bugfixes in multiboot for bugs uncovered by solaris kernel.
4026
4027 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
4028 limit detection.
4029 Use vaddr of correct segment for entry_point.
4030
b1b797cb 40312009-03-21 Bean <bean123ch@gmail.com>
4032
4033 * commands/blocklist.c: Add include file <grub/command.h>, remove
4034 <grub/normal.h> and <grub/arg.h>.
4035 (grub_cmd_blocklist): Use the new command interface.
4036 (GRUB_MOD_INIT): Likewise.
4037 (GRUB_MOD_FINI): Likewise.
4038 * commands/boot.c: Likewise.
4039 * commands/cat.c: Likewise.
4040 * commands/cmp.c: Likewise.
4041 * commands/configfile.c: Likewise.
4042 * commands/crc.c: Likewise.
4043 * commands/echo.c: Likewise.
4044 * commands/halt.c: Likewise.
4045 * commands/handler.c: Likewise.
4046 * commands/hdparm.c: Likewise.
4047 * commands/help.c: Likewise.
4048 * commands/hexdump.c: Likewise.
4049 * commands/loadenv.c: Likewise.
4050 * commands/ls.c: Likewise.
4051 * commands/lsmmap.c: Likewise.
4052 * commands/lspci.c: Likewise.
4053 * commands/loadenv.c: Likewise.
4054 * commands/read.c: Likewise.
4055 * commands/reboot.c: Likewise.
4056 * commands/search.c: Likewise.
4057 * commands/sleep.c: Likewise.
4058 * commands/test.c: Likewise.
4059 * commands/usbtest.c: Likewise.
4060 * commands/videotest.c: Likewise.
4061 * commands/i386/cpuid.c: Likewise.
4062 * commands/i386/pc/halt.c: Likewise.
4063 * commands/i386/pc/play.c: Likewise.
4064 * commands/i386/pc/pxecmd.c: Likewise.
4065 * commands/i386/pc/vbeinfo.c: Likewise.
4066 * commands/i386/pc/vbetest.c: Likewise.
4067 * commands/ieee1275/suspend.c: Likewise.
4068 * disk/loopback.c: Likewise.
4069 * font/font_cmd.c: Likewise.
4070 * hello/hello.c: Likewise.
4071 * loader/efi/appleloader.c: Likewise.
4072 * loader/efi/chainloader.c: Likewise.
4073 * loader/i386/bsd.c: Likewise.
4074 * loader/i386/efi/linux.c: Likewise.
4075 * loader/i386/ieee1275/linux.c: Likewise.
4076 * loader/i386/linux.c: Likewise.
4077 * loader/i386/pc/chainloader.c: Likewise.
4078 * loader/i386/pc/linux.c: Likewise.
4079 * loader/powerpc/ieee1275/linux.c: Likewise.
4080 * loader/multiboot_loader.c: Likewise.
4081 * term/gfxterm.c: Likewise.
4082 * term/i386/pc/serial.c: Likewise.
4083 * term/terminfo.c: Likewise.
4084
4085 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
4086 * term/i386/pc/vga.c: Likewise.
4087 * video/readers/jpeg.c: Likewise.
4088 * video/readers/png.c: Likewise.
4089 * video/readers/tga.c: Likewise.
4090
4091 * util/grub-fstest (cmd_loopback): Removed.
4092 (cmd_blocklist): Likewise.
4093 (cmd_ls): Likewise.
4094 (grub_register_command): Likewise.
4095 (grub_unregister_command): Likewise.
4096 (execute_command): Use grub_command_find to locate command and execute
4097 it.
4098
4099 * include/grub/efi/chainloader.h: Removed.
4100 * loader/efi/chainloader_normal.c: Likewise.
4101 * loader/i386/bsd_normal.c: Likewise.
4102 * loader/i386/pc/chainloader_normal.c: Likewise.
4103 * loader/i386/pc/multiboot_normal.c: Likewise.
4104 * loader/linux_normal.c: Likewise.
4105 * loader/multiboot_loader_normal.c: Likewise.
4106 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4107
4108 * gencmdlist.sh: Scan new registration command grub_register_extcmd
4109 and grub_register_command_p1.
4110
4111 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
4112 kern/command.c, lib/arg.c and commands/extcmd.c.
4113 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
4114 (minicmd_mod_SOURCES): New variable.
4115 (minicmd_mod_CFLAGS): Likewise.
4116 (minicmd_mod_LDFLAGS): Likewise.
4117 (extcmd_mod_SOURCES): Likewise.
4118 (extcmd_mod_CFLAGS): Likewise.
4119 (extcmd_mod_LDFLAGS): Likewise.
4120 (boot_mod_SOURCES): Removed.
4121 (boot_mod_CFLAGS): Likewise.
4122 (boot_mod_LDFLAGS): Likewise.
4123
4124 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
4125 kern/corecmd.c.
4126 (kernel_img_HEADERS): Add command.h.
4127 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
4128 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
4129 and lib/arg.c.
4130 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
4131 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
4132 remove the corresponding normal mode command.
4133 (normal_mod_SOURCES): Remove normal/arg.c.
4134 * conf/i386-coreboot.rmk: Likewise.
4135 * conf/i386-efi.rmk: Likewise.
4136 * conf/i386-ieee1275.rmk: Likewise.
4137 * conf/powerpc-ieee1275.rmk: Likewise.
4138 * conf/x86_64-efi.rmk: Likewise.
4139
4140 * include/grub/arg.h: Move from here ...
4141 * include/grub/lib/arg.h: ... to here.
4142
4143 * normal/arg.c: Move from here ...
4144 * lib/arg.c: ... to here.
4145
4146 * commands/extcmd.c: New file.
4147 * commands/minicmd.c: Likewise.
4148 * include/grub/command.h: Likewise.
4149 * include/grub/extcmd.h: Likewise.
4150 * kern/command.c: Likewise.
4151 * kern/corecmd.c: Likewise.
4152
4153 * kern/list.c (grub_list_iterate): Return int instead of void.
4154 (grub_list_insert): New function.
4155 (grub_prio_list_insert): Likewise.
4156
4157 * kern/rescue.c (grub_rescue_command): Removed.
4158 (grub_rescue_command_list): Likewise.
4159 (grub_rescue_register_command): Likewise.
4160 (grub_rescue_unregister_command): Likewise.
4161 (grub_rescue_cmd_boot): Move to minicmd.c
4162 (grub_rescue_cmd_help): Likewise.
4163 (grub_rescue_cmd_info): Likewise.
4164 (grub_rescue_cmd_boot): Likewise.
4165 (grub_rescue_cmd_testload): Likewise.
4166 (grub_rescue_cmd_dump): Likewise.
4167 (grub_rescue_cmd_rmmod): Likewise.
4168 (grub_rescue_cmd_lsmod): Likewise.
4169 (grub_rescue_cmd_exit): Likewise.
4170 (grub_rescue_print_devices): Moved to corecmd.c.
4171 (grub_rescue_print_files): Likewise.
4172 (grub_rescue_cmd_ls): Likewise.
4173 (grub_rescue_cmd_insmod): Likewise.
4174 (grub_rescue_cmd_set): Likewise.
4175 (grub_rescue_cmd_unset): Likewise.
7d074e3c 4176 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 4177 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 4178 commands, remove grub_rescue_register_command calls.
b1b797cb 4179
7d074e3c 4180 * normal/command.c (grub_register_command): Removed.
b1b797cb 4181 (grub_unregister_command): Likewise.
4182 (grub_command_find): Likewise.
4183 (grub_iterate_commands): Likewise.
4184 (rescue_command): Likewise.
4185 (export_command): Moved to corecmd.c.
4186 (set_command): Removed.
4187 (unset_command): Likewise.
4188 (insmod_command): Likewise.
4189 (rmmod_command): Likewise.
4190 (lsmod_command): Likewise.
4191 (grub_command_init): Likewise.
4192
4193 * normal/completion.c (iterate_command): Use cmd->prio to check for
4194 active command.
4195 (complete_arguments): Use grub_extcmd_t structure to find options.
4196 (grub_normal_do_completion): Change function grub_iterate_commands to
4197 grub_command_iterate.
4198
4199 * normal/execute.c (grub_script_execute_cmd): No need to parse
4200 argument here.
4201
4202 * normal/main.c (grub_dyncmd_dispatcher): New function.
4203 (read_command_list): Register unload commands as dyncmd.
4204 (grub_cmd_normal): Use new command interface, register rescue,
4205 unregister normal at entry, register normal, unregister rescue at exit.
4206
4207 * include/grub/list.h (grub_list_test_t): New type.
4208 (grub_list_iterate): Return int instead of void.
4209 (grub_list_insert): New function.
4210 (GRUB_AS_NAMED_LIST_P): New macro.
4211 (GRUB_AS_PRIO_LIST): Likewise.
4212 (GRUB_AS_PRIO_LIST_P): Likewise.
4213 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
4214 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
4215 (grub_prio_list): New structure.
4216 (grub_prio_list_insert): New function.
4217 (grub_prio_list_remove): New inline function.
4218
4219 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
4220 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
4221 (GRUB_COMMAND_FLAG_MENU): Likewise.
4222 (GRUB_COMMAND_FLAG_BOTH): Likewise.
4223 (GRUB_COMMAND_FLAG_TITLE): Likewise.
4224 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
4225 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
4226 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
4227 (grub_command): Likewise.
4228 (grub_register_command): Likewise.
4229 (grub_command_find): Likewise.
4230 (grub_iterate_commands): Likewise.
4231 (grub_command_init): Likewise.
4232 (grub_arg_parse): Likewise.
4233 (grub_arg_show_help): Likewise.
4234
4235 * include/grub/rescue.h (grub_rescue_register_command): Removed.
4236 (grub_rescue_unregister_command): Likewise.
4237
4238 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
4239 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
4240 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
4241
4242 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
4243 grub_rescue_cmd_initrd.
4244 * include/grub/i386/loader.h: Likewise.
4245 * include/grub/x86_64/loader.h: Likewise.
4246
4247 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
4248
1f4147aa 42492009-03-21 Bean <bean123ch@gmail.com>
4250
4251 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
4252 instead of stat in mingw environment.
4253
4254 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
4255
4256 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
4257
4258 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
4259 AC_CONFIG_LINKS.
4260
2156d5ba 42612009-03-21 Bean <bean123ch@gmail.com>
4262
4263 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
4264 out of range error.
4265
177b82ca 42662009-03-18 Michel Dänzer <michel@daenzer.net>
4267
4268 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
4269 checking inode flags for EXT4_EXTENTS_FLAG.
4270
14aad807 42712009-03-18 Robert Millan <rmh@aybabtu.com>
4272
4273 * loader/i386/linux.c: Include `<grub/video.h>' and
4274 `<grub/i386/pc/vbe.h>'..
4275 (grub_linux_setup_video): New function. Loosely based on the EFI one.
4276 (grub_linux32_boot): Attempt to configure video settings with
4277 grub_linux_setup_video().
4278 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
4279 to avoid grub_console_fini() which would step out of graphical mode
4280 unconditionally.
4281
8cf83a27 42822009-03-14 Robert Millan <rmh@aybabtu.com>
4283
4284 Fix build on powerpc.
4285 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
4286
40164e75 42872009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
4288
4289 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
4290 background image command.
4291
c58bc32a 42922009-03-12 Colin D Bennett <colin@gibibit.com>
4293
4294 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
4295 (grub_gfxterm_putchar): Extract pairs of identical calls to
4296 draw_cursor out of conditional blocks.
4297
5415144a 42982009-03-11 Pavel Roskin <proski@gnu.org>
4299
4300 * fs/hfs.c (grub_hfs_strncasecmp): New function.
4301 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
4302
6394042e 43032009-03-11 Robert Millan <rmh@aybabtu.com>
4304
4305 * loader/i386/multiboot_elfxx.c
4306 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
4307
b7b50e5f 43082009-03-11 Felix Zielcke <fzielcke@z-51.de>
4309
4310 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
4311 `kern/handler.c'.
4312
1ca7fc96 43132009-03-11 Robert Millan <rmh@aybabtu.com>
4314
4315 * loader/i386/multiboot.c (code_size): New variable.
4316 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 4317 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 4318 4-byte alignment to MBI and others by increasing
7d074e3c 4319 `boot_loader_name_length' appropriately.
1ca7fc96 4320
4321 * loader/i386/multiboot_elfxx.c
4322 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
4323
a83ea1d2 43242009-03-09 Felix Zielcke <fzielcke@z-51.de>
4325
4326 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
4327 `fs/ext2.c'.
4328
aa9f3bff 43292009-03-08 Robert Millan <rmh@aybabtu.com>
4330
4331 Make loader/i386/linux.c usable on i386-pc again.
4332
4333 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
4334 memory to heap.
4335 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
4336 `#error' stanza.
4337
d8b3b60e 43382009-03-07 Bean <bean123ch@gmail.com>
4339
4340 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
4341 allocation.
4342
b362c9e9 43432009-03-06 Robert Millan <rmh@aybabtu.com>
4344
4345 Fix display issue on terminals with screen size other than 80x25
4346 (e.g. gfxterm with resolution higher than 640x480).
4347
4348 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 4349 position relative to the center of the terminal instead of relying
b362c9e9 4350 on a hardcoded offset.
4351
9304eef1 43522009-03-04 Robert Millan <rmh@aybabtu.com>
4353
4354 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
4355 installed.
4356
4357 * Makefile.in (host_kernel): New variable.
4358 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
4359 scripts instead of just the windows one.
4360 * configure.ac: Initialize and AC_SUBST `host_kernel'.
4361
eabc95fb 43622009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 4363
4364 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
4365 `kern/handler.c'.
4366 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4367 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4368 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4369 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4370 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4371 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4372
ceb1223c 43732009-03-04 Felix Zielcke <fzielcke@z-51.de>
4374
4375 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
4376 or if there's no space for the disk label and print the partition number on a
4377 invalid magic.
4378
4910684a 43792009-03-04 Felix Zielcke <fzielcke@z-51.de>
4380
4381 * util/misc.c: Include <time.h>.
4382 (grub_millisleep): New function.
4383
7e9ca17a 43842009-03-04 Bean <bean123ch@gmail.com>
4385
4386 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
4387 another option -mno-red-zone.
4388
4389 * commands/handler.c: Change module description.
4390
4391 * kern/handler.c: Add missing space at the end of description line.
4392
4393 * kern/list.c: Likewise.
4394
f501677c 43952009-03-03 Robert Millan <rmh@aybabtu.com>
4396
4397 Move more components to the relocation area, and fix mbi pointer
4398 handling to use the destination rather than the origin (thanks to
4399 Vladimir Serbinenko for spotting).
4400
4401 * loader/i386/multiboot.c (mbi_dest): New variable.
4402 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
4403 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
4404 relocation area.
4405
9902d047 44062009-03-01 Bean <bean123ch@gmail.com>
4407
50fb7002 4408 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 4409 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
4410 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
4411 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
4412
4413 * loader/i386/efi/linux.c (acpi_guid): New variable.
4414 (acpi_guid): Likewise.
4415 (EBDA_SEG_ADDR): New constant.
4416 (LOW_MEM_ADDR): Likewise.
4417 (FAKE_EBDA_SEG): Likewise.
4418 (fake_bios_data): New function.
4419 (grub_linux_boot): Call fake_bios_data.
4420
71b9f361 44212009-03-01 Bean <bean123ch@gmail.com>
4422
4423 * commands/terminal.c: Removed.
4424
4425 * commands/handler.c: New file.
4426
4427 * include/grub/list.h: Likewise.
4428
4429 * include/grub/handler.h: Likewise.
4430
4431 * kern/list.c: Likewise.
4432
4433 * kern/handler.c: Likewise.
4434
4435 * kern/term.h: Include header file <grub/handler.h>.
4436 (grub_term_input): Move next field to the beginning.
4437 (grub_term_output): Likewise.
4438 (grub_term_input_class): New variable.
4439 (grub_term_output_class): Likewise.
4440 (grub_term_register_input): Changed to inline function.
4441 (grub_term_register_output): Likewise.
4442 (grub_term_unregister_input): Likewise.
4443 (grub_term_unregister_output): Likewise.
4444 (grub_term_set_current_input): Likewise.
4445 (grub_term_set_current_output): Likewise.
4446 (grub_term_get_current_input): Likewise.
4447 (grub_term_get_current_output): Likewise.
4448 (grub_term_iterate_input): Removed.
4449 (grub_term_iterate_output): Likewise.
4450
4451 * kern/term.c (grub_term_list_input): Removed.
4452 (grub_term_list_output): Likewise.
4453 (grub_term_input_class): New variable.
4454 (grub_term_output_class): Likewise.
50fb7002 4455 (grub_cur_term_input): Change variable as macro.
71b9f361 4456 (grub_cur_term_output): Likewise.
4457 (grub_term_register_input): Removed.
4458 (grub_term_register_output): Likewise.
4459 (grub_term_unregister_input): Likewise.
4460 (grub_term_unregister_output): Likewise.
4461 (grub_term_set_current_input): Likewise.
4462 (grub_term_set_current_output): Likewise.
4463 (grub_term_iterate_input): Likewise.
4464 (grub_term_iterate_output): Likewise.
4465 (grub_term_get_current_input): Likewise.
4466 (grub_term_get_current_output): Likewise.
4467
4468 * util/grub-editenv.c: Include header file <grub/handler.h>.
4469 (grub_term_get_current_input): Removed.
4470 (grub_term_get_current_output): Likewise.
4471 (grub_term_input_class): New variable.
50fb7002 4472 (grub_term_output_class): Likewise.
71b9f361 4473
4474 * util/grub-fstest.c (grub_term_get_current_input): Removed.
4475 (grub_term_get_current_output): Likewise.
4476 (grub_term_input_class): New variable.
50fb7002 4477 (grub_term_output_class): Likewise.
71b9f361 4478
4479 * util/grub-probe.c (grub_term_get_current_input): Removed.
4480 (grub_term_get_current_output): Likewise.
4481 (grub_term_input_class): New variable.
50fb7002 4482 (grub_term_output_class): Likewise.
71b9f361 4483
4484 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
4485 (grub_term_get_current_output): Likewise.
4486 (grub_term_input_class): New variable.
50fb7002 4487 (grub_term_output_class): Likewise.
71b9f361 4488
4489 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
4490 (terminal_mod_SOURCES): Likewise.
4491 (terminal_mod_CFLAGS): Likewise.
4492 (terminal_mod_LDFLAGS): Likewise.
4493
4494 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
4495 handler.c.
4496 (kernel_img_SOURCES): Add list.c and handler.c.
4497 (kernel_img_HEADERS): Add list.h and handler.h.
4498
4499 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
4500 handler.c.
4501 (kernel_mod_SOURCES): Add list.c and handler.c.
4502 (kernel_mod_HEADERS): Add list.h and handler.h.
4503
4504 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
4505 handler.c.
4506 (kernel_elf_SOURCES): Add list.c and handler.c.
4507 (kernel_elf_HEADERS): Add list.h and handler.h.
4508
4509 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
4510 handler.c.
4511 (kernel_elf_SOURCES): Add list.c and handler.c.
4512 (kernel_elf_HEADERS): Add list.h and handler.h.
4513
4514 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
4515 handler.c.
4516 (kernel_mod_SOURCES): Add list.c and handler.c.
4517 (kernel_mod_HEADERS): Add list.h and handler.h.
4518
4519 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
4520 handler.c.
4521 (kernel_elf_SOURCES): Add list.c and handler.c.
4522 (kernel_elf_HEADERS): Add list.h and handler.h.
4523
8a31787f 45242009-02-27 Robert Millan <rmh@aybabtu.com>
4525
4526 Factorize elf32 / elf64 code in Multiboot loader. This will
4527 prevent it from getting out of sync again.
4528
4529 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
4530 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
4531 grub_multiboot_load_elf64): Move from here ...
4532 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
4533 grub_multiboot_load_elf): ... to here (new file).
4534
51cd3dfc 45352009-02-27 Robert Millan <rmh@aybabtu.com>
4536
4537 * util/grub.d/10_linux.in: Rename "single-user mode" to
4538 "recovery mode".
4539
6e8c9c3a 45402009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
4541
4542 Don't leak in SCSI code.
4543 * disk/scsi.c (grub_scsi_close): free `scsi'.
4544
4b6bf4f9 45452009-02-27 Robert Millan <rmh@aybabtu.com>
4546
4547 * loader/i386/pc/multiboot.c: Move from here ...
4548 * loader/i386/multiboot.c: ... to here. Update all users.
4549
b9413424 45502009-02-27 Robert Millan <rmh@aybabtu.com>
4551
4552 Patch from Alexandre Bique <bique.alexandre@gmail.com>
4553 * util/i386/pc/grub-setup.c (setup): Fix directory path.
4554
50fb7002 45552009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 4556
4557 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
4558 b-tree.
4559
8cc50345 45602009-02-27 Robert Millan <rmh@aybabtu.com>
4561
4562 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
4563 `0x' qualifier as 0 when base is specified as parameter).
4564
6e09b8b7 45652009-02-24 Bean <bean123ch@gmail.com>
4566
4567 * configure.ac: Check for -mcmodel=large in x86_64 target.
4568
4569 * include/grub/efi/api.h (efi_call_10): New macro.
4570 (efi_wrap_10): New function.
4571
4572 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
4573 (GRUB_PE32_REL_BASED_HIGH): Likewise.
4574 (GRUB_PE32_REL_BASED_LOW): Likewise.
4575 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
4576 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
4577 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
4578 (GRUB_PE32_REL_BASED_SECTION): Likewise.
4579 (GRUB_PE32_REL_BASED_REL): Likewise.
4580 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
4581 (GRUB_PE32_REL_BASED_DIR64): Likewise.
4582 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
4583
4584 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
4585 issue.
4586
4587 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
4588 (efi_wrap_10): New function.
4589
4590 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
4591
4592 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
4593 MB/MBP model (NV chipset).
4594 (devdata_devs): Add devpath_5 to the list.
4595
4596 * load/i386/efi/linux.c (video_base): Remove variable.
4597 (RGB_MASK): New macro.
4598 (RGB_MAGIC): Likewise.
4599 (LINE_MIN): Likewise.
4600 (LINE_MAX): Likewise.
4601 (FBTEST_STEP): Likewise.
4602 (FBTEST_COUNT): Likewise.
4603 (fb_list): New variable.
4604 (grub_find_video_card): Remove function.
4605 (find_framebuf): New function.
4606 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
4607 line length.
4608
4609 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
4610 problem for x86_64.
4611
74b21bee 46122009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
4613
4614 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
4615
4616 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
4617 coding tool name.
4618
a455f472 46192009-02-22 Robert Millan <rmh@aybabtu.com>
4620
4621 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
4622 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
4623 in our relocation, instead of using it directly from heap. Also
4624 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
4625
6374daf3 46262009-02-21 Robert Millan <rmh@aybabtu.com>
4627
4628 Implement USB keyboard support (based on patch by Marco Gerards)
4629
4630 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
4631 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
4632 (usb_keyboard_mod_LDFLAGS): New variables.
4633
4634 * term/usb_keyboard.c: New file.
4635
8fa4ea70 46362009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
4637
4638 Corrected wrong declaration
4639
4640 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
4641
353976ac 46422009-02-14 Christian Franke <franke@computer.org>
4643
4644 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
4645 (grub_lspci_iter): Print class code and programming interface byte.
4646
6aa1169b 46472009-02-14 Christian Franke <franke@computer.org>
4648
4649 * gendistlist.sh: Ignore `.svn' directories.
4650
265372ca 46512009-02-14 Felix Zielcke <fzielcke@z-51.de>
4652
4653 * fs/fat.c: Add 2009 to Copyright line.
4654
9ff516f3 46552009-02-14 Christian Franke <franke@computer.org>
4656
4657 * commands/hdparm.c: New file. Provides `hdparm' command
4658 which sends ATA commands via grub_disk_ata_pass_through ().
4659
4660 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
4661
4662 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
4663 and <grub/cpu/io.h> to include/grub/ata.h.
4664 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
4665 (GRUB_CDROM_SECTOR_SIZE): Remove.
4666 (GRUB_ATA_*): Move to include/grub/ata.h.
4667 (GRUB_ATAPI_*): Likewise.
4668 (enum grub_ata_commands): Likewise.
4669 (enum grub_ata_timeout_milliseconds): Likewise.
4670 (struct grub_ata_device): Likewise.
4671 (grub_ata_regset): Likewise.
4672 (grub_ata_regget): Likewise.
4673 (grub_ata_regset2): Likewise.
4674 (grub_ata_regget2): Likewise.
4675 (grub_ata_check_ready): Likewise.
4676 (grub_ata_wait_not_busy): Remove static, exported in
4677 include/grub/ata.h.
4678 (grub_ata_wait_drq): Likewise.
4679 (grub_ata_pio_read): Likewise.
4680
4681 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
4682 function for hdparm.mod.
4683
4684 * include/grub/ata.h: New file, contains declarations from
4685 disk/ata.c.
4686 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
4687
4688 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
4689 (grub_disk_ata_pass_through): New exported variable.
4690
4691 * kern/disk.c (grub_disk_ata_pass_through): New variable.
4692
772e23da 46932009-02-13 Colin D Bennett <colin@gibibit.com>
4694
4695 Support multiple fallback entries, and provide an API to support
4696 executing default+fallback menu entries. Renamed the `terminal' menu
4697 viewer to `text'.
4698
4699 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
4700 variable declaration.
4701 (grub_menu_execute_callback): New structure declaration.
4702 (grub_menu_execute_callback_t): New typedef.
4703 (grub_menu_execute_with_fallback): New function declaration.
4704 (grub_menu_get_entry): Likewise.
4705 (grub_menu_get_timeout): Likewise.
4706 (grub_menu_set_timeout): Likewise.
4707
4708 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
4709
4710 * normal/menu.c (grub_wait_after_message): Moved to
4711 `normal/menu_text.c'.
4712 (draw_border): Likewise.
4713 (print_message): Likewise.
4714 (print_entry): Likewise.
4715 (print_entries): Likewise.
4716 (grub_menu_init_page): Likewise.
4717 (get_entry_number): Likewise.
4718 (print_timeout): Likewise.
4719 (run_menu): Likewise.
4720 (grub_menu_execute_entry): Likewise.
4721 (show_text_menu): Likewise.
4722 (get_and_remove_first_entry_number): New function.
4723 (grub_menu_execute_with_fallback): Likewise.
4724 (get_entry): Renamed to ...
4725 (grub_menu_get_entry): .. this and made it global.
4726 (get_timeout): Renamed to ...
4727 (grub_menu_get_timeout): ... this and made it global.
4728 (set_timeout): Renamed to ...
4729 (grub_menu_set_timeout): ... this and made it global.
4730 (grub_normal_terminal_menu_viewer): Renamed to ...
4731 (grub_normal_text_menu_viewer): ... this.
4732
4733 * normal/menu_text.c: New file. Extracted text-menu-specific code
4734 from normal/menu.c.
4735
4736 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
4737 (normal_mod_SOURCES): Likewise.
4738
4739 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4740 (normal_mod_SOURCES): Likewise.
4741
4742 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4743 (normal_mod_SOURCES): Likewise.
4744
4745 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4746 (normal_mod_SOURCES): Likewise.
4747
4748 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4749 (normal_mod_SOURCES): Likewise.
4750
4751 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4752 (normal_mod_SOURCES): Likewise.
4753
4754 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4755 (normal_mod_SOURCES): Likewise.
4756
16ac430e 47572009-02-11 Robert Millan <rmh@aybabtu.com>
4758
4759 * util/grub.d/00_header.in: Update old reference to `font' command.
4760
06ff20fc 47612009-02-10 Felix Zielcke <fzielcke@z-51.de>
4762
4763 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4764
4765 Based on patch from Javier Martín.
4766
96da9407 47672009-02-09 Felix Zielcke <fzielcke@z-51.de>
4768
4769 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 4770 to avoid false positives with FAT.
96da9407 4771 (grub_fstest_SOURCES): Likewise.
4772 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4773 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4774 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4775 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4776 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4777 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4778
6dca6fe4 47792009-02-09 Felix Zielcke <fzielcke@z-51.de>
4780
06ff20fc 4781 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 4782 bpb.version_specific.fat12_or_fat16.fstype and
4783 bpb.version_specific.fat32.fstype.
4784
2550c62f 47852009-02-08 Robert Millan <rmh@aybabtu.com>
4786
be110b30 4787 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 4788
56978920 47892009-02-08 Robert Millan <rmh@aybabtu.com>
4790
4791 * Makefile.in (host_os, host_cpu): New variables.
4792 (target_os): Remove. Update all users.
4793
d64399b5 47942009-02-08 Marco Gerards <marco@gnu.org>
4795
4796 * Makefile.in (enable_grub_emu_usb): New variable.
4797 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4798 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4799 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4800 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4801 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4802 `usbtest.mod' and `usbms.mod'.
4803 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4804 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4805 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4806 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4807 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4808 variables.
4809
4810 * disk/usbms.c: New file.
4811
4812 * include/grub/usb.h: Likewise.
4813
4814 * include/grub/usbtrans.h: Likewise.
4815
4816 * include/grub/usbdesc.h: Likewise.
4817
4818 * bus/usb/usbtrans.c: Likewise.
4819
4820 * bus/usb/ohci.c: Likewise.
4821
4822 * bus/usb/uhci.c: Likewise.
4823
4824 * bus/usb/usbhub.c: Likewise.
4825
4826 * bus/usb/usb.c: Likewise.
4827
4828 * commands/usbtest.c: Likewise.
4829
4830 * util/usb.c: Likewise.
50fb7002 4831
d64399b5 4832 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4833
4834 * configure.ac: Test for libusb presence.
50fb7002 4835
d64399b5 4836 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4837
2b40d6bb 48382009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
4839
4840 * kern/mm.c: Add more comments.
4841
73a4ce81 48422009-02-08 Robert Millan <rmh@aybabtu.com>
4843
4844 Patch from Javier Martín.
4845 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4846 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4847
f821ce59 48482009-02-08 Robert Millan <rmh@aybabtu.com>
4849
4850 * fs/cpio.c: Split tar functionality to ...
4851 * fs/tar.c: ... here (new file). Update all users.
4852
aebfc4b0 48532009-02-07 Robert Millan <rmh@aybabtu.com>
4854
4855 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4856 backward-incompatible features.
4857
4858 Based on patch from Javier Martín, with some adjustments.
4859
50fb7002 48602009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 4861
4862 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4863
0bb5115e 48642009-02-07 Robert Millan <rmh@aybabtu.com>
4865
4866 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4867 position of `disk/lvm.c' to ensure grub_init_all() always picks it
4868 after the RAID stuff.
4869
38a0f8e7 48702009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
4871
50fb7002 4872 Fixes problem when running vbetest command as reported by
38a0f8e7 4873 Vladimir Serbinenko <phcoder@gmail.com>.
4874
4875 * (grub_vbe_set_video_mode): Fixed problem with text modes.
4876
3143cc1c 48772009-02-04 Felix Zielcke <fzielcke@z-51.de>
4878
4879 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4880 /dev/md/NpN style mdraid devices.
4881
9cba6fce 48822009-02-03 Felix Zielcke <fzielcke@z-51.de>
4883
4884 * util/unifont2pff.rb: Remove.
4885
e507a2c1 48862009-02-03 Felix Zielcke <fzielcke@z-51.de>
4887
4888 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4889 `#'.
4890
d2c2b4cd 48912009-02-03 Felix Zielcke <fzielcke@z-51.de>
4892
4893 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4894 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4895 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4896 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4897 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4898 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4899 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4900
b4315fb0 49012009-02-02 Christian Franke <franke@computer.org>
4902
4903 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4904
de3aa260 49052009-02-01 Felix Zielcke <fzielcke@z-51.de>
4906
7c3ff286 4907 * INSTALL: Note that we now require at least autoconf 2.59 and
4908 that LZO is optional.
de3aa260 4909
825a182b 49102009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4911
4912 Base on patch on bug #24154 created by Tomas Tintera
4913 <trosos@seznam.cz>.
4914
4915 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4916
a69ef770 49172009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
4918
7c3ff286 4919 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 4920 <bero@arklinux.org>.
4921
4922 * normal/parser.y (script_init): Add missing semicolon.
4923
6fa42fa6 49242009-01-31 Colin D Bennett <colin@gibibit.com>
4925
7c3ff286 4926 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 4927 (free_menu_entry_classes): Added.
4928 (grub_normal_menu_addentry): Added class property handling.
4929 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4930 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4931
4932 * normal/menu_viewer.c: New file.
4933
4934 * normal/menu.c (run_menu_entry): Renamed to ...
4935 (grub_menu_execute_entry): ... this and made it as global.
4936 (grub_menu_run): Renamed to ...
4937 (show_text_menu): ... this and made it local.
4938 (show_text_menu): Adapt to new function names.
4939 (grub_normal_terminal_menu_viewer): New global variable.
4940
4941 * include/grub/menu.h: New file.
4942
4943 * include/grub/menu_viewer.h: New file.
4944
4945 * include/grub/normal.h: Added include to grub/menu.h.
4946 (grub_menu_entry): Moved to include/grub/menu.h.
4947 (grub_menu_entry_t): Likewise.
4948 (grub_menu): Likewise.
4949 (grub_menu_t): Likewise.
4950 (grub_normal_terminal_menu_viewer): Added.
4951 (grub_menu_execute_entry): Likewise.
4952 (grub_menu_run): Removed.
4953
4954 * DISTLIST: Added include/grub/menu.h.
4955 Added include/grub/menu_viewer.h.
4956 Added normal/menu_viewer.c.
4957
49582009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
4959
4960 * normal/execute.c (grub_script_execute_menuentry): Changed to use
4961 arglist for menutitle arguments.
4962
4963 * normal/main.c (grub_normal_menu_addentry): Likewise.
4964
4965 * normal/parser.y (menuentry): Likewise.
4966
4967 * normal/script.c (grub_script_create_cmdmenu): Likewise.
4968
4969 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4970 (grub_script_create_cmdmenu): Likewise.
4971
4972 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4973
4974 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4975 changes.
4976
4977 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4978
4979 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4980
4981 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4982
4983 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4984
4985 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4986
4987 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4988
56192c23 49892009-01-30 Christian Franke <franke@computer.org>
4990
4991 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4992 in option help text.
4993
d72521b3 49942009-01-27 Pavel Roskin <proski@gnu.org>
4995
4996 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4997
994b5e84 49982009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
4999
5000 * commands/lsmmap.c: Add include to grub/machine/memory.h.
5001
5002 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
5003
5004 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
5005 unregister function.
5006
6a7eab2c 50072009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
5008
5009 * disk/scsi.c (grub_scsi_read): Fix sign problem.
5010
5011 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
5012
5013 * util/grub-mkfont.c (usage): Fix typo.
5014
5015 * util/elf/grub-mkimage.c (load_modules): Fix warning.
5016
1806b56e 50172009-01-26 Daniel Mierswa <impulze@impulze.org>
5018
3fb18f09 5019 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
5020
336e1fb9 5021 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
5022
1806b56e 5023 * kern/misc.c (grub_strcasecmp): New function.
5024 (grub_strcasecmp): Use grub_size_t instead of int for length.
5025 Fix return value.
5026 * include/grub/misc.h: Update function prototypes.
5027
580b2a0f 50282009-01-26 Robert Millan <rmh@aybabtu.com>
5029
5030 * configure.ac: Fix cross-compilation check.
ef257b36 5031
d31c24f1 50322009-01-22 Christian Franke <franke@computer.org>
5033
5034 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
5035 (precision) digit string. Allow `.format2' without `format1' (width).
5036 Limit input chars for `%s' output to `format2' if specified. This is
5037 compatible with standard printf ().
5038
3138b44c 50392009-01-22 Christian Franke <franke@computer.org>
5040
5041 * disk/ata.c (grub_ata_wait_status): Replace by ...
5042 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
5043 other status bits may be invalid while BSY is asserted.
5044 (grub_ata_check_ready): New function.
5045 (grub_ata_cmd): Removed.
5046 (grub_ata_wait_drq): New function.
5047 (grub_ata_strncpy): Remove inline.
5048 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
5049 and error check now done by grub_ata_wait_drq ().
5050 (grub_ata_pio_write): Likewise.
5051 (grub_atapi_identify): Set DEV before check for !BSY. Use
5052 grub_ata_wait_drq () to wait for data.
5053 (grub_ata_device_initialize): Add status register check to
5054 detect missing SATA slave devices. Add debug messages.
5055 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
5056 (grub_atapi_packet): Set DEV before check for !BSY. Replace
5057 transfer loop by grub_ata_pio_write ().
5058 (grub_ata_identify): Set DEV before check for !BSY. Use
5059 grub_ata_wait_drq () to wait for data.
ef257b36 5060 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 5061 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
5062 read/write in one loop. Fix invalid command on write. Fix incomplete
5063 command on (size % batch) == 0. Add missing error check after write of
5064 last block. Add debug messages.
5065 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
5066
59a64ef6 50672009-01-19 Christian Franke <franke@computer.org>
5068
5069 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
5070 (GRUB_ATAPI_IREASON_*): Likewise.
5071 (grub_ata_pio_write): Fix timeout error return.
5072 (grub_atapi_identify): Add grub_ata_wait () after cmd.
5073 (grub_atapi_wait_drq): New function.
5074 (grub_atapi_packet): New parameter `size'.
5075 Use grub_atapi_wait_drq () and direct write instead of
5076 grub_ata_pio_write ().
5077 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
5078 reads the number of bytes requested by the device for each DRQ
5079 assertion.
5080 (grub_atapi_write): Remove old implementation, return not
5081 implemented instead.
5082
1cfe20b3 50832009-01-19 Christian Franke <franke@computer.org>
5084
5085 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
5086 of 512 to calculate data size.
5087 (grub_scsi_read12): Likewise.
5088 (grub_scsi_write10): Likewise.
5089 (grub_scsi_write12): Likewise.
5090 (grub_scsi_read): Adjust size according to blocksize.
5091 Add checks for invalid blocksize and unaligned transfer.
5092
bee5fe5d 50932009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
5094
5095 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
5096
ef257b36 5097 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 5098 width glyphs.
5099
3e643f8c 51002009-01-19 Robert Millan <rmh@aybabtu.com>
5101
5102 * config.guess: Update to latest version from config git.
5103 * config.sub: Likewise.
5104
4fa80998 51052009-01-17 Felix Zielcke <fzielcke@z-51.de>
5106
5107 * Makefile.in: Change font compilation to use new grub-mkfont instead
5108 of java version.
5109
5110 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
5111 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
5112 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5113 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5114 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
5115 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
5116 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
5117 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
5118 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
5119
7086085b 51202009-01-16 Christian Franke <franke@computer.org>
5121
5122 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
5123 (enum grub_ata_timeout_milliseconds): New enum.
5124 (grub_ata_wait_status): Add parameter milliseconds.
5125 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
5126 recovery from timed-out commands.
5127 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
5128 return grub_errno instead of REG_ERROR.
5129 (grub_ata_pio_write): Add parameter milliseconds.
5130 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
5131 Pass milliseconds to grub_ata_wait_status () and
5132 grub_ata_pio_read ().
5133 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
5134 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
5135 grub_ata_wait_status (). Fix IDENTIFY timeout check.
5136 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
5137 It is not suitable for device detection, because DEV bit is ignored,
5138 the command may run too long, and not all devices set the signature
5139 properly.
5140 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
5141 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
5142 Fix device selection, DEV bit must be set first to address the registers
5143 of the correct device.
5144 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
5145 grub_ata_pio_read/write ().
5146 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
5147 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
5148
4a412913 51492009-01-13 Carles Pina i Estany <carles@pina.cat>
5150
5151 * util/grub-editenv.c (main): Use fseeko(), not fseek().
5152
7795c55e 51532009-01-13 Bean <bean123ch@gmail.com>
d913988c 5154
5155 * util/grub-mkfont.c (write_font): forget to remove some debug code.
5156
7795c55e 51572009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 5158
5159 * Makefile.in: (enable_grub_mkfont): New variable.
5160 (freetype_cflags): Likewise.
5161 (freetype_libs): Likewise.
5162
5163 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
5164 (grub_mkfont_SOURCES): New variable.
5165 (grub_mkfont_CFLAGS): Likewise.
5166 (grub_mkfont_LDFLAGS): Likewise.
5167
5168 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
5169 library if `--enable-grub-mkfont' is requested.
5170 (enable_grub_mkfont): New variable.
5171 (freetype_cflags): Likewise.
5172 (freetype_libs): Likewise.
5173
5174 * util/grub-mkfont.c: New file.
5175
093af1fe 51762009-01-12 Christian Franke <franke@computer.org>
5177
5178 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
5179 mode check. Fix setting of compat_use[].
5180
f36cc108 51812009-01-10 Robert Millan <rmh@aybabtu.com>
5182
5183 Update a few copyright years which we forgot to do in 2008 (only for
5184 files whose changes made in 2008 were copyright-significant)
5185
5186 * Makefile.in: Add 2008 to Copyright line.
5187 * disk/ieee1275/ofdisk.c: Likewise.
5188 * disk/efi/efidisk.c: Likewise.
5189 * kern/dl.c: Likewise.
5190 * kern/sparc64/ieee1275/init.c: Likewise.
5191 * kern/mm.c: Likewise.
5192 * kern/efi/mm.c: Likewise.
5193 * boot/i386/pc/boot.S: Likewise.
5194 * genfslist.sh: Likewise.
5195 * fs/iso9660.c: Likewise.
5196 * fs/hfs.c: Likewise.
5197 * fs/jfs.c: Likewise.
5198 * fs/minix.c: Likewise.
5199 * fs/ufs.c: Likewise.
5200 * gensymlist.sh.in: Likewise.
5201 * genkernsyms.sh.in: Likewise.
5202 * include/grub/misc.h: Likewise.
5203 * include/grub/types.h: Likewise.
5204 * include/grub/symbol.h: Likewise.
5205 * include/grub/elf.h: Likewise.
5206 * include/grub/kernel.h: Likewise.
5207 * include/grub/disk.h: Likewise.
5208 * include/grub/dl.h: Likewise.
5209 * include/grub/i386/linux.h: Likewise.
5210 * include/grub/i386/pc/biosdisk.h: Likewise.
5211 * include/grub/efi/api.h: Likewise.
5212 * include/grub/efi/pe32.h: Likewise.
5213 * include/grub/util/misc.h: Likewise.
5214 * normal/execute.c: Likewise.
5215 * normal/arg.c: Likewise.
5216 * normal/completion.c: Likewise.
5217 * normal/lexer.c: Likewise.
5218 * normal/parser.y: Likewise.
5219 * normal/misc.c: Likewise.
5220 * commands/i386/pc/vbeinfo.c: Likewise.
5221 * commands/hexdump.c: Likewise.
5222 * commands/terminal.c: Likewise.
5223 * commands/ls.c: Likewise.
5224 * commands/help.c: Likewise.
5225 * partmap/pc.c: Likewise.
5226 * loader/efi/chainloader.c: Likewise.
5227 * loader/multiboot_loader.c: Likewise.
5228 * loader/i386/pc/multiboot2.c: Likewise.
5229 * term/efi/console.c: Likewise.
5230 * term/i386/pc/serial.c: Likewise.
5231 * util/lvm.c: Likewise.
5232 * util/console.c: Likewise.
5233 * util/i386/efi/grub-mkimage.c: Likewise.
5234 * util/raid.c: Likewise.
5235
7f02114b 52362009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
5237
5238 * commands/videotest.c: Removed include to grub/machine/memory.h.
5239
5240 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
5241 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
5242 (video_mod_SOURCES): Removed.
5243 (video_mod_CFLAGS): Likewise.
5244 (video_mod_LDFLAGS): Likewise.
5245 (gfxterm_mod_SOURCES): Likewise.
5246 (gfxterm_mod_CFLAGS): Likewise.
5247 (gfxterm_mod_LDFLAGS): Likewise.
5248 (videotest_mod_SOURCES): Likewise.
5249 (videotest_mod_CFLAGS): Likewise.
5250 (videotest_mod_LDFLAGS): Likewise.
5251 (bitmap_mod_SOURCES): Likewise.
5252 (bitmap_mod_CFLAGS): Likewise.
5253 (bitmap_mod_LDFLAGS): Likewise.
5254 (tga_mod_SOURCES): Likewise.
5255 (tga_mod_CFLAGS): Likewise.
5256 (tga_mod_LDFLAGS): Likewise.
5257 (jpeg_mod_SOURCES): Likewise.
5258 (jpeg_mod_CFLAGS): Likewise.
5259 (jpeg_mod_LDFLAGS): Likewise.
5260 (png_mod_SOURCES): Likewise.
5261 (png_mod_CFLAGS): Likewise.
5262 (png_mod_LDFLAGS): Likewise.
5263
5264 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
5265 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
5266 (video_mod_SOURCES): Added.
5267 (video_mod_CFLAGS): Likewise.
5268 (video_mod_LDFLAGS): Likewise.
5269 (videotest_mod_SOURCES): Likewise.
5270 (videotest_mod_CFLAGS): Likewise.
5271 (videotest_mod_LDFLAGS): Likewise.
5272 (bitmap_mod_SOURCES): Likewise.
5273 (bitmap_mod_CFLAGS): Likewise.
5274 (bitmap_mod_LDFLAGS): Likewise.
5275 (tga_mod_SOURCES): Likewise.
5276 (tga_mod_CFLAGS): Likewise.
5277 (tga_mod_LDFLAGS): Likewise.
5278 (jpeg_mod_SOURCES): Likewise.
5279 (jpeg_mod_CFLAGS): Likewise.
5280 (jpeg_mod_LDFLAGS): Likewise.
5281 (png_mod_SOURCES): Likewise.
5282 (png_mod_CFLAGS): Likewise.
5283 (png_mod_LDFLAGS): Likewise.
5284 (gfxterm_mod_SOURCES): Likewise.
5285 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 5286 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 5287
5288 * term/gfxterm.c: Removed include to grub/machine/memory.h,
5289 grub/machine/console.h.
5290
644fff97 52912009-01-04 Jerone Young <jerone@gmail.com>
5292
5293 Make on screen instructions clearer
5294
5295 Based on patch created by Jidanni <jidanni@jidanni.org>
5296
5297 * normal/menu.c: print clearer instructions on the screen
5298
1e901a75 52992009-01-02 Colin D Bennett <colin@gibibit.com>
5300
5301 New font engine.
34c44600 5302
1e901a75 5303 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
5304 build system and fixed gfxterm.c to work with different sized fonts.
5305
5306 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 5307
1e901a75 5308 * configure: Re-generated.
34c44600 5309
1e901a75 5310 * DISTLIST: Removed font/manager.c.
5311 Added font/font.c.
5312 Added font/font_cmd.c.
34c44600 5313
1e901a75 5314 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
5315 compilation.
34c44600 5316
1e901a75 5317 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 5318
5319 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 5320
5321 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 5322
1e901a75 5323 * normal/menu.c: Likewise.
34c44600 5324
1e901a75 5325 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
5326 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 5327
1e901a75 5328 * include/grub/font.h: Replaced with new file.
34c44600 5329
1e901a75 5330 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
5331 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
5332 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
5333 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
5334 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 5335 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 5336 fg_red, fg_green, fg_blue, fg_alpha.
5337 (grub_video_adapter): Removed blit_glyph.
34c44600 5338 (grub_video_blit_glyph): Removed.
5339
1e901a75 5340 * font/manager.c: Removed file.
34c44600 5341
5342 * font/font.c: New file.
5343
1e901a75 5344 * font/font_cmd.c: Likewise.
34c44600 5345
1e901a75 5346 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 5347
1e901a75 5348 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
5349 (grub_video_vbe_map_rgba): Likewise.
5350 (grub_video_vbe_unmap_color_int): Likewise.
5351 (grub_video_vbe_blit_glyph): Removed.
5352 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 5353
1e901a75 5354 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
5355 (get_pixel): Likewise.
34c44600 5356 (set_pixel): Likewise.
5357
1e901a75 5358 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 5359
1e901a75 5360 * term/gfxterm.c: Adapted to new font engine.
34c44600 5361
1e901a75 5362 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 5363
1e901a75 5364 * term/i386/pc/vga.c: Likewise.
34c44600 5365
1e901a75 5366 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 5367
1e901a75 5368 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 5369
1e901a75 5370 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 5371
1e901a75 5372 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 5373
1e901a75 5374 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 5375
1e901a75 5376 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 5377
1e901a75 5378 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 5379
1e901a75 5380 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 5381
1e901a75 5382 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
5383
5384 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 5385
1e901a75 5386 * util/grub-mkconfig_lib.in: Changed font extension.
5387
278922e8 53882008-12-28 Felix Zielcke <fzielcke@z-51.de>
5389
5390 * util/getroot.c (grub_util_get_grub_dev): Add support for
5391 /dev/md/dNNpNN style partitionable mdraid devices.
5392
3ced05cf 53932008-12-12 Alex Smith <alex@alex-smith.me.uk>
5394
5395 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
5396 at a time limit of the PXE TFTP API correctly.
5397 (grub_pxefs_close): Likewise.
5398
7fd0ee30 53992008-11-29 Robert Millan <rmh@aybabtu.com>
5400
34c44600 5401 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 5402 grub_ata_device_initialize() calls.
5403
34c44600 54042008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 5405
5406 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
5407 iteration failed.
5408 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
5409
89313780 54102008-11-28 Robert Millan <rmh@aybabtu.com>
5411
5412 Fix build on powerpc-ieee1275. Based on patch created by
5413 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
5414 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5415 `kern/ieee1275/mmap.c'.
5416 * include/grub/powerpc/ieee1275/memory.h: New file.
5417
15257703 5418 Provide grub-install on coreboot.
5419 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
5420 (grub_install_SOURCES): New variable.
5421 * util/i386/pc/grub-install.in: Add a few condition checks to make it
5422 usable on coreboot.
5423
9fc5388a 54242008-11-25 Felix Zielcke <fzielcke@z-51.de>
5425
5426 * util/grub-fstest.c (grub_term_get_current_input): Change return type
5427 to `grub_term_input_t'.
5428 (grub_term_get_current_output): Change return type to
5429 `grub_term_output_t'.
5430
bc3a2f31 54312008-11-22 Robert Millan <rmh@aybabtu.com>
5432
34c44600 5433 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 5434 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
5435 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
5436 grub_vga_text_cls().
5437
80fc88f2 5438 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 5439 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 5440
cbf36fd3 5441 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
5442 to 0x200000 (avoids trouble with some OFW implementations, and matches
5443 with the one in Yaboot).
5444 Reported by Manoel Abranches
5445
73e8e268 54462008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 5447
5448 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
5449 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
5450
73e8e268 5451 * util/grub-mkconfig_lib.in (grub_warn): New function.
5452 (convert_system_path_to_grub_path): Use grub_warn() when issuing
5453 warnings, to obtain consistent formatting.
5454 * util/grub.d/00_header.in: Likewise.
5455 * util/update-grub_lib.in: Likewise.
5456
e94045a1 5457 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 5458 Move comment text to `#error' stanza.
e94045a1 5459
79d29fd7 5460 Harmonize ieee1275's grub_available_iterate() with the generic
5461 grub_machine_mmap_iterate() interface (fixes a recently-introduced
5462 build problem on i386-ieee1275):
5463 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
5464 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
5465 parameter `type'. Update all users of this function.
5466 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5467 `kern/ieee1275/mmap.c'.
5468 * kern/ieee1275/init.c
5469 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
5470 with ...
5471 (grub_machine_mmap_iterate): ... this.
5472 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
5473 return type to `grub_err_t'. Update all implementations of this
5474 function prototype.
5475 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
5476 Likewise.
5477
60d6b16e 5478 Add `lsmmap' command (lists firmware-provided memory map):
5479 * commands/lsmmap.c: New file.
5480 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
5481 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
5482 variables.
5483 * conf/powerpc-ieee1275.rmk: Likewise.
5484 * conf/i386-coreboot.rmk: Likewise.
5485 * conf/i386-ieee1275.rmk: Likewise.
5486
ebaaf49b 54872008-11-19 Robert Millan <rmh@aybabtu.com>
5488
5489 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 5490 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
5491 constraints to initrd allocation (based on code from
5492 loader/i386/pc/linux.c). Without them, initrd was allocated too high
5493 for Linux to find it.
ebaaf49b 5494
dfab719f 54952008-11-14 Robert Millan <rmh@aybabtu.com>
5496
5497 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
5498 order to cope with duplicate slashes.
5499
10fc3eb9 55002008-11-14 Robert Millan <rmh@aybabtu.com>
5501
5502 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
5503 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
5504 don't want to mess with lower memory, because it is used in the Linux
5505 loader.
5506
5507 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 5508 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 5509 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
5510 is in our heap (probably as a result of it being corrupted during
2f2a3442 5511 decompression). Add #error instance with comment to explain why this
5512 loader isn't currently usable on PC/BIOS.
10fc3eb9 5513
e2e07847 55142008-11-14 Robert Millan <rmh@aybabtu.com>
5515
5516 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 5517 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 5518
fe8e8d69 55192008-11-12 Robert Millan <rmh@aybabtu.com>
5520
5521 Make loader/i386/linux.c buildable on i386-pc (although disabled).
5522
5523 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
5524 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
5525 from here ...
5526 * include/grub/i386/pc/memory.h: ... to here.
5527
976b07d0 55282008-11-12 Robert Millan <rmh@aybabtu.com>
5529
5530 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
5531 split).
5532
5533 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
5534 (grub_console_cur_color, grub_console_real_putchar)
5535 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5536 (grub_console_setcolorstate, grub_console_setcolor)
5537 (grub_console_getcolor): Move from here ...
5538 * include/grub/i386/vga_common.h: ... to here (new file).
5539
5540 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
5541 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
5542 `<grub/i386/io.h>'.
5543 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
5544 `<grub/i386/vga_common.h>'.
5545
76679cd3 55462008-11-12 Robert Millan <rmh@aybabtu.com>
5547
5548 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
5549 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
5550 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
5551 variables.
5552 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5553 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
5554
5555 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
5556 grub_console_init() with call to grub_vga_text_init().
5557 (grub_machine_fini): Replace call to
5558 grub_console_fini() with call to grub_vga_text_fini() and
5559 grub_at_keyboard_fini().
5560
5561 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
5562 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5563 (grub_console_setcolorstate, grub_console_setcolor)
5564 (grub_console_getcolor): New function prototypes.
5565
5566 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
5567 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
5568 (grub_vga_text_setcursor): Static-ize.
5569 (grub_vga_text_term): New structure.
5570 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
5571
5572 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
5573 (grub_console_cur_color, grub_console_standard_color)
5574 (grub_console_normal_color, grub_console_highlight_color)
5575 (map_char, grub_console_putchar, grub_console_getcharwidth)
5576 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
5577 (grub_console_getcolor): Move from here ...
5578 * term/i386/vga_common.c: ... to here (same function names).
5579
95b841d3 55802008-11-12 Robert Millan <rmh@aybabtu.com>
5581
5582 Use newly-added Multiboot support in coreboot.
5583
5584 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5585 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
5586
5587 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
5588 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
5589 (codestart): Store the MBI in `startup_multiboot_info' when we're
5590 being loaded using Multiboot.
5591
5592 * kern/i386/coreboot/init.c (grub_machine_init): Move
5593 grub_at_keyboard_init() call to beginning of function (useful for
5594 debugging). Call grub_machine_mmap_init() before attempting to use
5595 grub_machine_mmap_iterate().
5596 (grub_lower_mem, grub_upper_mem): Move from here ...
5597 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
5598 here (new file).
5599
5600 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
5601 function prototype.
5602
761ca975 56032008-11-12 Robert Millan <rmh@aybabtu.com>
5604
5605 Fix a regression introduced by the at_keyboard.mod split. Because
5606 some terminals are default on some platforms and non-default on
5607 others, the first terminal being registered determines which is
5608 going to be default.
5609
5610 * kern/term.c (grub_term_register_input): If this is the first
5611 terminal being registered, set it as the current one.
5612 (grub_term_register_output): Likewise.
5613
5614 * term/efi/console.c (grub_console_init): Do not call
5615 grub_term_set_current_output() or grub_term_set_current_input().
5616 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
5617 * term/i386/pc/console.c (grub_console_init): Likewise.
5618 (grub_console_fini): Do not call grub_term_set_current_input()
5619 (but leave grub_term_set_current_output() to restore text mode).
5620
6c529df7 56212008-11-10 Robert Millan <rmh@aybabtu.com>
5622
5623 * util/grub.d/00_header.in: Add backward compatibility check for
5624 versions of terminal.mod that don't understand `terminal_input' or
5625 `terminal_output'.
5626
132e4113 56272008-11-09 Robert Millan <rmh@aybabtu.com>
5628
5629 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
5630 `terminal_input' / `terminal_output', not `terminal'.
5631
ac293d50 56322008-11-08 Robert Millan <rmh@aybabtu.com>
5633
5634 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 5635 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 5636
0025933a 56372008-11-08 Robert Millan <rmh@aybabtu.com>
5638
5639 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 5640 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 5641 members. Update all users.
5642 * util/console.c (grub_ncurses_term): Split in ...
5643 (grub_ncurses_term_input): ... this, and ...
5644 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 5645 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 5646
37c86336 56472008-11-08 Robert Millan <rmh@aybabtu.com>
5648
5649 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
5650 (PKGDATA): Add $(pkgdata_SRCDIR).
5651 (pkglib_BUILDDIR): New variable.
5652 (pkgdata_SRCDIR): New variable.
5653 (build_env.mk): New target.
5654 (include_DATA): New variable.
5655 (install-local): Install $(include_DATA) files in $(includedir).
5656
b6c15a2d 56572008-11-07 Pavel Roskin <proski@gnu.org>
5658
d99d46f1 5659 * gendistlist.sh: Use C locale for sorting to ensure consistent
5660 output on all systems.
5661
b6c15a2d 5662 * util/grub.d/00_header.in: Remove incorrect space before
5663 "serial".
5664
c32ee8c9 56652008-11-07 Robert Millan <rmh@aybabtu.com>
5666
5667 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
5668 per specification.
5669 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
5670 * loader/multiboot_loader.c (find_multi_boot2_header): New function
5671 (based on find_multi_boot1_header).
5672 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
5673 using find_multi_boot2_header(), and abort if neither Multiboot or
5674 Multiboot headers were found.
5675
651c29b7 56762008-11-07 Robert Millan <rmh@aybabtu.com>
5677
5678 Modularize at_keyboard.mod:
5679
5680 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
5681 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
5682 (at_keyboard_mod_LDFLAGS): New variables.
5683
5684 Actual terminal split:
5685
5686 * include/grub/term.h (struct grub_term): Split in ...
5687 (struct grub_term_input): ... this, and ...
5688 (struct grub_term_output): ... this. Update all users.
5689 (grub_term_set_current): Split in ...
5690 (grub_term_set_current_input): ... this, and ...
5691 (grub_term_set_current_output): ... this.
5692 (grub_term_get_current): Split in ...
5693 (grub_term_get_current_input): ... this, and ...
5694 (grub_term_get_current_output): ... this.
5695 (grub_term_register): Split in ...
5696 (grub_term_register_input): ... this, and ...
5697 (grub_term_register_output): ... this.
5698 (grub_term_unregister): Split in ...
5699 (grub_term_unregister_input): ... this, and ...
5700 (grub_term_unregister_output): ... this.
5701 (grub_term_iterate): Split in ...
5702 (grub_term_iterate_input): ... this, and ...
5703 (grub_term_iterate_output): ... this.
5704
5705 * kern/term.c (grub_term_list): Split in ...
5706 (grub_term_list_input): ... this, and ...
5707 (grub_term_list_output): ... this. Update all users.
5708 (grub_cur_term): Split in ...
5709 (grub_cur_term_input): ... this, and ...
5710 (grub_cur_term_output): ... this. Update all users.
5711 (grub_term_set_current): Split in ...
5712 (grub_term_set_current_input): ... this, and ...
5713 (grub_term_set_current_output): ... this.
5714 (grub_term_get_current): Split in ...
5715 (grub_term_get_current_input): ... this, and ...
5716 (grub_term_get_current_output): ... this.
5717 (grub_term_register): Split in ...
5718 (grub_term_register_input): ... this, and ...
5719 (grub_term_register_output): ... this.
5720 (grub_term_unregister): Split in ...
5721 (grub_term_unregister_input): ... this, and ...
5722 (grub_term_unregister_output): ... this.
5723 (grub_term_iterate): Split in ...
5724 (grub_term_iterate_input): ... this, and ...
5725 (grub_term_iterate_output): ... this.
5726
5727 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
5728 a check for input and one for output (and only attempt to get keys
5729 from user when input works).
5730
5731 * util/grub-probe.c (grub_term_get_current): Split in ...
5732 (grub_term_get_current_input): ... this, and ...
5733 (grub_term_get_current_output): ... this.
5734 * util/grub-fstest.c: Likewise.
5735 * util/i386/pc/grub-setup.c: Likewise.
5736 * util/grub-editenv.c: Likewise.
5737
5738 Portability adjustments:
5739
5740 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
5741 `term/i386/pc/at_keyboard.c'.
5742 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5743 grub_keyboard_controller_init() (now handled by terminal .init).
5744 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5745 grub_at_keyboard_init().
5746 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5747 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5748 at_keyboard.mod via input terminal interface).
5749 * include/grub/i386/coreboot/console.h: Convert into a stub for
5750 `<grub/i386/pc/console.h>'.
5751
5752 Migrate full terminals to new API:
5753
5754 * term/efi/console.c (grub_console_term): Split into ...
5755 (grub_console_term_input): ... this, and ...
5756 (grub_console_term_output): ... this. Update all users.
5757 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5758 (grub_ofconsole_init): Split into ...
5759 (grub_ofconsole_init_input): ... this, and ...
5760 (grub_ofconsole_init_output): ... this.
5761 (grub_ofconsole_term): Split into ...
5762 (grub_ofconsole_term_input): ... this, and ...
5763 (grub_ofconsole_term_output): ... this. Update all users.
5764 * term/i386/pc/serial.c (grub_serial_term): Split into ...
5765 (grub_serial_term_input): ... this, and ...
5766 (grub_serial_term_output): ... this. Update all users.
5767 * term/i386/pc/console.c (grub_console_term): Split into ...
5768 (grub_console_term_input): ... this, and ...
5769 (grub_console_term_output): ... this. Update all users.
5770 (grub_console_term_input): Only enable it on PC/BIOS platform.
5771 (grub_console_init): Remove grub_keyboard_controller_init() call.
5772
5773 Migrate input terminals to new API:
5774
5775 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5776 `i386' and `i386/pc' to enable build on x86_64 (this driver is
5777 i386-specific anyway).
5778 (grub_console_checkkey): Rename to ...
5779 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
5780 users.
5781 (grub_keyboard_controller_orig): New variable.
5782 (grub_console_getkey): Rename to ...
5783 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
5784 users.
5785 (grub_keyboard_controller_init): Static-ize. Save original
5786 controller value so that it can be restored ...
5787 (grub_keyboard_controller_fini): ... here (new function).
5788 (grub_at_keyboard_term): New structure.
5789 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5790 functions.
5791
5792 Migrate output terminals to new API:
5793
5794 * term/i386/pc/vga.c (grub_vga_term): Change type to
5795 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5796 members. Update all users.
5797 * term/gfxterm.c (grub_video_term): Change type to
5798 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5799 members. Update all users.
5800 * include/grub/i386/pc/console.h (grub_console_checkkey)
5801 (grub_console_getkey): Do not export (no longer needed by gfxterm,
5802 etc).
5803
5804 Migrate `terminal' command and userland tools to new API:
5805
5806 * commands/terminal.c (grub_cmd_terminal): Split into ...
5807 (grub_cmd_terminal_input): ... this, and ...
5808 (grub_cmd_terminal_output): ... this.
5809 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5810 `terminal_input' and `terminal_output'.
5811 * util/grub.d/00_header.in: Adjust `terminal' calls to new
5812 `terminal_input' / `terminal_output' API.
5813 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5814 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5815 provided ${GRUB_TERMINAL}, convert it).
5816
96e5d876 58172008-11-04 Robert Millan <rmh@aybabtu.com>
5818
5819 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
5820 for FreeBSD.
5821 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5822
556f3775 58232008-11-03 Bean <bean123ch@gmail.com>
5824
5825 * kern/elf.c (grub_elf32_load): Revert to previous code.
5826 (grub_elf64_load): Likewise.
5827
5828 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5829
926b9823 58302008-11-01 Robert Millan <rmh@aybabtu.com>
5831
5832 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5833 (TARGET_CPPFLAGS): Likewise.
5834 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5835
1432e958 58362008-11-01 Carles Pina i Estany <carles@pina.cat>
5837
5838 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5839
dba3f844 58402008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 5841
5842 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5843 addition of objects until the code is not going to be able to fail.
5844
dba3f844 58452008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 5846
5847 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5848 (add a missing NULL check, and correct them by moving the pointer
5849 operations after the actual check).
5850
7ab28c21 58512008-10-29 Robert Millan <rmh@aybabtu.com>
5852
5853 * util/i386/pc/grub-install.in: Handle empty string as output from
5854 make_system_path_relative_to_its_root().
5855
1b7748eb 58562008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
5857
5858 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5859 circular metadata worst case scenario. If the metadata is circular
5860 then copy the wrap in place.
5861 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5862 project lib/format_text/layout.h
5863 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5864
c9618ab2 58652008-10-03 Felix Zielcke <fzielcke@z-51.de>
5866
7a36edca 5867 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 5868
bf981c62 58692008-10-03 Felix Zielcke <fzielcke@z-51.de>
5870
5871 * util/update-grub_lib.in: Mention filename in warning message.
5872
6d994591 58732008-09-29 Felix Zielcke <fzielcke@z-51.de>
5874
5875 * NEWS: Update for rename of update-grub to grub-mkconfig.
5876
18ade780 58772008-09-29 Felix Zielcke <fzielcke@z-51.de>
5878
5879 * util/update-grub_lib.in: Copy to ...
5880 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 5881 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 5882 * util/update-grub.in: Rename to ...
5883 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
5884 option. Add `--output' option to allow users to specify the generated
5885 configuration file. Default to stdout.
5886 (update_grub_dir): Rename to ...
5887 (grub_mkconfig_dir): ... this.
5888 (grub_cfg): Default to an empty string.
5889 * conf/common.rmk (update-grub): Rename to ...
5890 (grub-mkconfig): ... this.
5891 (update-grub_lib): Copy to ...
5892 (grub-mkconfig_lib): ... this.
5893 (update-grub_SCRIPTS): Copy to ...
5894 (grub-mkconfig_SCRIPTS): ... this. Update all users.
5895 (update-grub_DATA): Rename to ...
5896 (grub-mkconfig_DATA): ... this.
5897
556ce6ac 58982008-09-28 Robert Millan <rmh@aybabtu.com>
5899
5900 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5901 to `modified'. Add the real `created' field.
5902 (grub_iso9660_uuid): Use `modified' rather than `created' for
5903 constructing the UUID.
5904
59052008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 5906
5907 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5908 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5909
92274e85 59102008-09-28 Bean <bean123ch@gmail.com>
5911
5912 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5913 Thanks to Christian Franke for finding this bug.
5914
add6f17a 59152008-09-25 Robert Millan <rmh@aybabtu.com>
5916
5917 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5918 instances of grub_util_get_disk_name() (see previous commit).
5919
d2a367b8 59202008-09-25 Robert Millan <rmh@aybabtu.com>
5921
5922 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5923 `util/i386/get_disk_name.c'.
5924 * conf/i386-efi.rmk: Likewise.
5925 * conf/x86_64-efi.rmk: Likewise.
5926 * conf/i386-coreboot.rmk: Likewise.
5927 * conf/i386-ieee1275.rmk: Likewise.
5928 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5929 `util/ieee1275/get_disk_name.c'.
5930 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5931 * util/ieee1275/get_disk_name.c: Remove file.
5932 * util/i386/get_disk_name.c: Remove file.
5933 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5934 "hd%d" for device.map entries, rather than using
5935 grub_util_get_disk_name().
5936
81a06771 59372008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 5938
5939 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5940 warning.
5941 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5942
5a004279 59432008-09-24 Carles Pina i Estany <carles@pina.cat>
5944
5945 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5946 Changed to 0x5100.
5947 (GRUB_TERM_PPAGE): Changed to 0x4900.
5948
397093d3 59492008-09-24 Robert Millan <rmh@aybabtu.com>
5950
5951 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5952 macros (they were i386-pc specific).
5953 * include/grub/sparc64/ieee1275/console.h: Likewise.
5954 * include/grub/efi/console.h: Likewise.
5955
a91b6c7c 59562008-09-22 Bean <bean123ch@gmail.com>
5957
5958 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5959 resident and in attribute list.
5960
5961 * include/grub/ntfs.h (BMP_LEN): Removed.
5962
c40fd116 59632008-09-22 Bean <bean123ch@gmail.com>
5964
81a06771 5965 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 5966 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5967
5968 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5969 error occurs, as grub_disk_open will call grub_disk_close, which will
5970 call p->close (scsi).
5971
81a06771 59722008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 5973
5974 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5975 (AC_PREREQ): Bumped to 2.59.
5976 (AC_TRY_COMPILE): Replace obsolete macro with ...
5977 (AC_COMPILE_IFELSE): ... this.
5978 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5979 (AC_LINK_IFELSE): ... this.
5980
5dc43410 59812008-09-21 Felix Zielcke <fzielcke@z-51.de>
5982
5983 * autogen.sh: Add a call to `gendistlist.sh'.
5984
9035dce4 59852008-09-19 Christian Franke <franke@computer.org>
5986
5987 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5988 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5989 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5990 Export __enable_execute_stack() to modules.
5991 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5992 New function.
5993
7fd75377 59942008-09-09 Felix Zielcke <fzielcke@z-51.de>
5995
040030b3 5996 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5997 Sort the list.
5998
59992008-09-09 Felix Zielcke <fzielcke@z-51.de>
6000
6001 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 6002 #include <grub/util/hostdisk.h>.
6003
89d5ffcf 60042008-09-08 Robert Millan <rmh@aybabtu.com>
6005
6006 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
6007 segments when their filesz is zero (grub_file_read() interprets
81a06771 6008 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 6009 Use `lowest_segment' rather than 0 for calculating the current
6010 segment load address.
6011
40da438f 60122008-09-08 Robert Millan <rmh@aybabtu.com>
6013
6014 * util/hostdisk.c (open_device): Replace a grub_util_info() call
6015 with grub_dprintf("hostdisk", ...), as it was so verbose that it
6016 clobbered useful information.
6017
ddbf5556 60182008-09-08 Robert Millan <rmh@aybabtu.com>
6019
6020 * include/grub/util/biosdisk.h: Move to ...
6021 * include/grub/util/hostdisk.h: ... here. Update all users.
6022 * util/biosdisk.c: Move to ...
6023 * util/hostdisk.c: ... here. Update all users.
6024
783d0f48 60252008-09-07 Robert Millan <rmh@aybabtu.com>
6026
6027 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
6028 variables.
6029 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
6030 and length can be stored directly in the `mbi->mmap_addr' and
6031 `mbi->mmap_length' struct fields.
6032
548e2ea5 60332008-09-07 Robert Millan <rmh@aybabtu.com>
6034
6035 * conf/i386.rmk: New file. Provides declaration for building
6036 `cpuid.mod'.
6037 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
6038 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
6039 variables.
6040 Include `conf/i386.mk'.
6041 * conf/i386-efi.rmk: Likewise.
6042 * conf/x86_64-efi.rmk: Likewise.
6043 * conf/i386-coreboot.rmk: Likewise.
6044 * conf/i386-ieee1275.rmk: Likewise.
6045
0ea85a37 60462008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
6047
6048 Based on patch created by Colin D Bennett <colin@gibibit.com>.
6049 Adds optimization support for BGR based modes.
6050
6051 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
6052 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6053 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6054 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6055 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6056 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6057 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6058 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6059 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6060 (grub_video_i386_vbeblit_index_index): Likewise.
6061 (grub_video_i386_vbeblit_replace_directN): Added.
6062 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6063 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6064 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6065 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6066 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6067 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 6068 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 6069 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6070 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6071 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6072 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6073 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6074 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6075
6076 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
6077 (grub_video_i386_vbefill_R8G8B8): Likewise.
6078 (grub_video_i386_vbefill_index): Likewise.
6079 (grub_video_i386_vbefill_direct32): Added.
6080 (grub_video_i386_vbefill_direct24): Likewise.
6081 (grub_video_i386_vbefill_direct16): Likewise.
6082 (grub_video_i386_vbefill_direct8): Likewise.
6083
81a06771 6084 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 6085 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
6086 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
6087 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
6088 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
6089 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 6090
0ea85a37 6091 * video/video.c (grub_video_get_blit_format): Updated to use new
6092 blit formats. Added handling for 16 bit color modes.
81a06771 6093
6094 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 6095 fillers.
6096 (common_blitter): Updated to use new blitters.
6097
6098 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
6099 Removed.
6100 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6101 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6102 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6103 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6104 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6105 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6106 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6107 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6108 (grub_video_i386_vbeblit_index_index): Likewise.
6109 (grub_video_i386_vbeblit_replace_directN): Added.
6110 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6111 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6112 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6113 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6114 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6115 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6116 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6117 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6118 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6119 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6120 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6121 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6122 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 6123
0ea85a37 6124 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
6125 (grub_video_i386_vbefill_R8G8B8): Likewise.
6126 (grub_video_i386_vbefill_index): Likewise.
6127 (grub_video_i386_vbefill_direct32): Added.
6128 (grub_video_i386_vbefill_direct24): Likewise.
6129 (grub_video_i386_vbefill_direct16): Likewise.
6130 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 6131
0ea85a37 6132 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
6133 types.
81a06771 6134
0ea85a37 6135 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
6136 types.
81a06771 6137
0ea85a37 6138 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
6139 blitter types.
81a06771 6140
0ea85a37 6141 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
6142 types.
6143
e8a83df6 61442008-09-06 Felix Zielcke <fzielcke@z-51.de>
6145
6146 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
6147 RAID level 1.
6148
6bcd8ee5 61492008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 6150
6bcd8ee5 6151 * fs/iso9660.c (grub_iso9660_date): New structure.
6152 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
6153 (grub_iso9660_uuid): New function.
c375ae58 6154
59261157 61552008-09-05 Bean <bean123ch@gmail.com>
6156
6157 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
6158
6159 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
6160 insensitive bit for names in Win32 and Win32 & DOS namespace.
6161
6162 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
6163
6164 * include/grub/types.h (LONG_MAX): Likewise.
6165
58b6645a 61662008-09-04 Felix Zielcke <fzielcke@z-51.de>
6167
4ee55921 6168 * util/getroot.c: Include <config.h>.
6169 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
6170 add support for /dev/md/N devices and handle LVM double dash escaping.
6171
61722008-09-04 Felix Zielcke <fzielcke@z-51.de>
6173
6174 * config.guess: Update to latest version from config git.
6175 * config.sub: Likewise.
58b6645a 6176
9124f65d 61772008-09-03 Robert Millan <rmh@aybabtu.com>
6178
6179 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
6180 `disk->total_sectors'.
6181
81a06771 61822008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 6183
6184 * include/grub/normal.h: Fixed incorrect comment for
6185 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
6186
81a06771 61872008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 6188
6189 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
6190 values with defines.
6191
6192 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
6193 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
6194 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
6195 (GRUB_VBE_MODEATTR_COLOR): Likewise.
6196 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
6197 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
6198 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
6199 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
6200 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
6201 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
6202 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
6203 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
6204 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
6205 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
6206 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
6207 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
6208 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
6209 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
6210 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
6211
93d5cbf8 62122008-08-31 Robert Millan <rmh@aybabtu.com>
6213
6214 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
6215 declaration.
6216 (grub_multiboot): Fix a few warnings.
6217
21751d50 62182008-08-31 Robert Millan <rmh@aybabtu.com>
6219
6220 * loader/i386/pc/multiboot.c: Update comment not to say that
6221 boot_device support is unimplemented.
6222
e27a75c5 62232008-08-31 Robert Millan <rmh@aybabtu.com>
6224
6225 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
6226 or memory map support are unimplemented.
6227
81a06771 62282008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 6229
6230 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
6231
81a06771 62322008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 6233
6234 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
6235 total video memory in 'vbeinfo' output; show color format details for
6236 each video mode.
6237
7c5d8d95 62382008-08-30 Pavel Roskin <proski@gnu.org>
6239
6240 * util/genmoddep.c: Remove for real this time.
6241 * DISTLIST: Remove util/genmoddep.c.
6242
4cebd25a 62432008-08-30 Robert Millan <rmh@aybabtu.com>
6244
6245 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
6246 as required by Multiboot spec (it was already 4-byte aligned, but
6247 only by chance).
6248
b497a269 62492008-08-29 Pavel Roskin <proski@gnu.org>
6250
e3925185 6251 * kern/powerpc/ieee1275/crt0.S: Rename to ...
6252 * kern/powerpc/ieee1275/startup.S: ... this.
6253 * conf/powerpc-ieee1275.rmk: Adjust for the above.
6254 * DISTLIST: Likewise.
6255
b497a269 6256 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
6257 grub/cpu/kernel.h. Add start label for consistency with other
6258 platforms. Add grub_prefix immediately after start. Add jump
6259 to the code after grub_prefix.
6260 * include/grub/powerpc/kernel.h: Provide valid values for
6261 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
6262
6e5a42fe 62632008-08-29 Bean <bean123ch@gmail.com>
6264
6265 * configure.ac: Change host_os to cygwin for mingw.
6266 (asprintf): New check for function.
6267
6268 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
6269 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
6270
6271 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 6272 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 6273 sync, sleep and grub_util_get_disk_size for mingw.
6274
6275 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
6276 to get size in mingw.
6277 (open_device): Use flag O_BINARY if it's defined.
6278 (find_root_device): Add dummy code for mingw.
6279
6280 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
6281 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
6282 (get_scsi_disk_name): Return 0 for mingw.
6283
6284 * util/hostfs.c: #include <grub/util/misc.h>.
6285 (grub_hostfs_open): Use "rb" flag to open file, use
6286 grub_util_get_disk_size to get disk size for mingw.
6287
6288 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
6289 (asprintf): New function if HAVE_ASPRINTF is not set.
6290 (sync): New function for mingw.
6291 (sleep): Likewise.
6292 (grub_util_get_disk_size): Likewise.
6293
ab3f2673 62942008-08-28 Pavel Roskin <proski@gnu.org>
6295
6296 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6297 kern/time.c.
6298
1c282483 62992008-08-28 Robert Millan <rmh@aybabtu.com>
6300
6301 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
6302
678e849c 63032008-08-28 Robert Millan <rmh@aybabtu.com>
6304
6305 Change find_grub_drive() syntax so it doesn't prevent it from
6306 detecting NULL names as errors.
6307
6308 * util/biosdisk.c (find_grub_drive): Move free slot search code
6309 from here ...
6310 (find_free_slot): ... to here.
6311 (read_device_map): Use find_free_slot() to search for free slots.
6312
965c75ca 63132008-08-27 Marco Gerards <marco@gnu.org>
6314
6315 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
6316 (scsi_mod_SOURCES): New variable.
6317 (scsi_mod_CFLAGS): Likewise
6318 (scsi_mod_LDFLAGS): Likewise.
6319
6320 * disk/scsi.c: New file.
6321
6322 * include/grub/scsi.h: Likewise.
6323
6324 * include/grub/scsicmd.h: Likewise.
6325
6326 * disk/ata.c: Include <grub/scsi.h>.
6327 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
6328 instead.
6329 (grub_ata_iterate): Skip ATAPI devices.
6330 (grub_ata_open): Only handle ATAPI devices.
6331 (struct grub_atapi_read): Removed.
6332 (grub_atapi_readsector): Likewise.
6333 (grub_ata_read): No longer handle ATAPI devices.
6334 (grub_ata_write): Likewise.
6335 (grub_atapi_iterate): New function.
6336 (grub_atapi_read): Likewise.
6337 (grub_atapi_write): Likewise.
6338 (grub_atapi_open): Likewise.
6339 (grub_atapi_close): Likewise.
6340 (grub_atapi_dev): New variable.
6341 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
6342 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
6343
6344 * include/grub/disk.h (enum grub_disk_dev_id): Add
6345 `GRUB_DISK_DEVICE_SCSI_ID'.
6346
c07ae501 63472008-08-26 Robert Millan <rmh@aybabtu.com>
6348
6349 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
6350 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
6351 descriptive.
6352
5ed20adc 63532008-08-23 Bean <bean123ch@gmail.com>
6354
6355 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
6356 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
6357 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
6358 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
6359 dm_nv.mod.
6360 (raid5rec_mod_SOURCES): New macro.
6361 (raid5rec_mod_CFLAGS): Likewise.
6362 (raid5rec_mod_LDFLAGS): Likewise.
6363 (raid6rec_mod_SOURCES): Likewise.
6364 (raid6rec_mod_CFLAGS): Likewise.
6365 (raid6rec_mod_LDFLAGS): Likewise.
6366 (mdraid_mod_SOURCES): Likewise.
6367 (mdraid_mod_CFLAGS): Likewise.
6368 (mdraid_mod_LDFLAGS): Likewise.
6369 (dm_nv_mod_SOURCES): Likewise.
6370 (dm_nv_mod_CFLAGS): Likewise.
6371 (dm_nv_mod_LDFLAGS): Likewise.
6372
6373 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
6374 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
6375 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
6376
6377 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
6378 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
6379
6380 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6381
6382 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6383
6384 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6385
6386 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6387
6388 * disk/raid5_recover.c: New file.
6389
6390 * disk/raid6_recover.c: Likewise.
6391
6392 * disk/mdraid_linux.c: Likewise.
6393
6394 * disk/dmraid_nvidia.c: Likewise.
6395
6396 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
6397 ULONG_MAX.
6398
6399 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
6400 calculate the size of raid device.
6401 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
6402 different layout of raid5.
6403 (grub_raid_scan_device): Remove code specific to mdraid.
6404 (grub_raid_list): New variable.
6405 (free_array): New function.
6406 (grub_raid_register): Likewise.
6407 (grub_raid_unregister): Likewise.
6408 (grub_raid_rescan): Likewise.
6409 (GRUB_MOD_INIT): Don't iterate device here.
6410 (GRUB_MOD_FINI): Use free_array to release resource.
6411
6412 * include/grub/raid.h: Remove macro and structure specific to mdraid.
6413 (grub_raid5_recover_func_t): New function variable type.
6414 (grub_raid6_recover_func_t): Likewise.
6415 (grub_raid5_recover_func): New variable.
6416 (grub_raid6_recover_func): Likewise.
6417 (grub_raid_register): New function.
6418 (grub_raid_unregister): Likewise.
6419 (grub_raid_rescan): Likewise.
6420 (grub_raid_block_xor): Likewise.
6421
6422 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
6423 (CMD_CRC): New macro.
6424 (part): Removed.
6425 (read_file): Handle device as well as file.
6426 (cmd_crc): New function.
6427 (fstest): Handle multiple disks.
6428 (options): Remove part, raw and long, add root and diskcount.
6429 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 6430 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 6431 add handling for the new options, support multiple disks.
6432
6433 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
6434
29c18915 64352008-08-23 Bean <bean123ch@gmail.com>
6436
6437 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
6438
6439 * genfslist.sh: Ignore kernel.mod.
6440
6441 * genpartmaplist.sh: Likewise.
6442
8415f261 64432008-08-23 Robert Millan <rmh@aybabtu.com>
6444
6445 * util/getroot.c (find_root_device): Skip anything that starts with
6446 a dot, not just directories. This avoids things like /dev/.tmp.md0.
6447
d5a7dc5b 64482008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 6449
d5a7dc5b 6450 * util/update-grub.in (GRUB_GFXMODE): Export variable.
6451 * util/grub.d/00_header.in: Allow the administrator to change default
6452 gfxmode via ${GRUB_GFXMODE}.
6453
380cfbb4 64542008-08-21 Felix Zielcke <fzielcke@z-51.de>
6455
6456 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
6457
c9baafe7 64582008-08-21 Robert Millan <rmh@aybabtu.com>
6459
6460 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
6461 loader.
6462 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
6463 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
6464
e290bef2 64652008-08-20 Carles Pina i Estany <carles@pina.cat>
6466
6467 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
6468 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
6469
f9dbfc96 64702008-08-19 Robert Millan <rmh@aybabtu.com>
6471
6472 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
6473 (struct grub_virtual_screen): Remove `cursor_color'.
6474 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
6475 initialization.
6476 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
6477
dd6bd6ab 64782008-08-18 Robert Millan <rmh@aybabtu.com>
6479
6480 Unify (identical) linux_normal.c files.
6481 * loader/i386/efi/linux_normal.c: Move from here ...
6482 * loader/linux_normal.c: ... to here. Update all users.
6483 * loader/i386/pc/linux_normal.c: Delete. Update all users.
6484 * loader/i386/ieee1275/linux_normal.c: Likewise.
6485
7f42f83e 64862008-08-18 Robert Millan <rmh@aybabtu.com>
6487
6488 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
6489 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
6490 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
6491 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
6492 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
6493 New macros.
6494 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
6495 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
6496 (GRUB_LINUX_CL_END_OFFSET): ... to here.
6497 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
6498 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
6499 (GRUB_EFI_CL_END_OFFSET): Rename to ...
6500 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
6501 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
6502 Initialize `params->video_cursor_x' and `params->video_cursor_y'
6503 portably using grub_getxy().
6504 Replace `-EFI' with `-bzImage' in boot message.
6505
38487ddb 65062008-08-17 Robert Millan <rmh@aybabtu.com>
6507
6508 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
6509
deceb3ec 65102008-08-17 Robert Millan <rmh@aybabtu.com>
6511
6512 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
6513
6514 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
6515 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
6516 (grub_machine_mmap_iterate): New function declaration.
6517 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
6518 structure.
6519 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
6520 macros.
6521
6522 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
6523 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
6524 Move e820 parsing from here ...
6525 * kern/i386/pc/mmap.c: New file.
6526 (grub_machine_mmap_iterate): ... to here.
6527
6528 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
6529 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
6530 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
6531 (grub_available_iterate): Redeclare to return `void', and redeclare
6532 its hook to use grub_uint64_t as addr and size parameters, and rename
6533 to ...
6534 (grub_machine_mmap_iterate): ... this. Update all users.
6535
6536 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
6537 to make it more readable. Rename to ...
6538 (grub_machine_mmap_iterate): ... this.
6539
6540 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
6541 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
6542 (grub_multiboot): Allocate an extra region after the payload, and fill
6543 it with a Multiboot memory map. Adjust a.out loader to calculate size
6544 with the extra space.
6545 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
6546 with the extra space.
6547
f8aa0f43 65482008-08-17 Carles Pina i Estany <carles@pina.cat>
6549
9807deb9 6550 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 6551
605f5bb6 65522008-08-17 Felix Zielcke <fzielcke@z-51.de>
6553
6554 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
6555 mdate-sh to the list `find' searches for.
6556 * DISTLIST: Regenerated.
6557
210db6c6 65582008-08-16 Felix Zielcke <fzielcke@z-51.de>
6559
6560 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
6561 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 6562 genmoddep.awk, gensymlist.sh.in.
6563 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 6564 * DISTLIST: Regenerated.
48cdbfd4 6565 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 6566
1082b929 65672008-08-16 Robert Millan <rmh@aybabtu.com>
6568
6569 * disk/raid.c (grub_raid_init): Handle/report errors set by
6570 grub_device_iterate().
6571 * disk/lvm.c (grub_lvm_init): Likewise.
6572
42ce5170 65732008-08-15 Bean <bean123ch@gmail.com>
6574
6575 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6576 and datehook.mod.
6577 (datetime_mod_SOURCES): New macro.
6578 (datetime_mod_CFLAGS): Likewise.
6579 (datetime_mod_LDFLAGS): Likewise.
6580 (date_mod_SOURCES): Likewise.
6581 (date_mod_CFLAGS): Likewise.
6582 (date_mod_LDFLAGS): Likewise.
6583 (datehook_mod_SOURCES): Likewise.
6584 (datehook_mod_CFLAGS): Likewise.
6585 (datehook_mod_LDFLAGS): Likewise.
6586
6587 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6588 and datehook.mod.
6589 (datetime_mod_SOURCES): New macro.
6590 (datetime_mod_CFLAGS): Likewise.
6591 (datetime_mod_LDFLAGS): Likewise.
6592 (date_mod_SOURCES): Likewise.
6593 (date_mod_CFLAGS): Likewise.
6594 (date_mod_LDFLAGS): Likewise.
6595 (datehook_mod_SOURCES): Likewise.
6596 (datehook_mod_CFLAGS): Likewise.
6597 (datehook_mod_LDFLAGS): Likewise.
6598
6599 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6600 and datehook.mod.
6601 (datetime_mod_SOURCES): New macro.
6602 (datetime_mod_CFLAGS): Likewise.
6603 (datetime_mod_LDFLAGS): Likewise.
6604 (date_mod_SOURCES): Likewise.
6605 (date_mod_CFLAGS): Likewise.
6606 (date_mod_LDFLAGS): Likewise.
6607 (datehook_mod_SOURCES): Likewise.
6608 (datehook_mod_CFLAGS): Likewise.
6609 (datehook_mod_LDFLAGS): Likewise.
6610
6611 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6612 and datehook.mod.
6613 (datetime_mod_SOURCES): New macro.
6614 (datetime_mod_CFLAGS): Likewise.
6615 (datetime_mod_LDFLAGS): Likewise.
6616 (date_mod_SOURCES): Likewise.
6617 (date_mod_CFLAGS): Likewise.
6618 (date_mod_LDFLAGS): Likewise.
6619 (datehook_mod_SOURCES): Likewise.
6620 (datehook_mod_CFLAGS): Likewise.
6621 (datehook_mod_LDFLAGS): Likewise.
6622
6623 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6624 and datehook.mod.
6625 (datetime_mod_SOURCES): New macro.
6626 (datetime_mod_CFLAGS): Likewise.
6627 (datetime_mod_LDFLAGS): Likewise.
6628 (date_mod_SOURCES): Likewise.
6629 (date_mod_CFLAGS): Likewise.
6630 (date_mod_LDFLAGS): Likewise.
6631 (datehook_mod_SOURCES): Likewise.
6632 (datehook_mod_CFLAGS): Likewise.
6633 (datehook_mod_LDFLAGS): Likewise.
6634
6635 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
6636
6637 * commands/date.c: New file.
6638
6639 * hook/datehook.c: Likewise.
6640
6641 * include/grub/lib/datetime.h: Likewise.
6642
6643 * include/grub/i386/cmos.h: Likewise.
6644
6645 * lib/datetime.c: Likewise.
6646
6647 * lib/i386/datetime.c: Likewise.
6648
6649 * lib/efi/datetime.c: Likewise.
6650
0e9242da 66512008-08-14 Robert Millan <rmh@aybabtu.com>
6652
6653 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
6654 (grub_mkelfimage_SOURCES): New variable.
6655 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
6656
6657 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
6658 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
6659 * conf/powerpc-ieee1275.rmk: Likewise.
6660 * conf/i386-ieee1275.rmk: Likewise.
6661
6662 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
6663 * kern/i386/coreboot/init.c: Likewise.
6664
6665 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
6666 with `<grub/cpu/kernel.h>'.
6667 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
6668 to ...
6669 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
6670 * kern/i386/coreboot/startup.S: Likewise.
6671
6672 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
6673 (GRUB_MOD_GAP): Remove.
6674 * include/grub/powerpc/kernel.h: New file.
6675 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
6676 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6677 * include/grub/i386/kernel.h: New file.
6678 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
6679 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
6680 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6681
6682 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
6683 `grub-mkelfimage'.
6684 Use --directory when invoking grub_mkimage.
6685
6686 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
6687 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
6688 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
6689 and GRUB_KERNEL_CPU_PREFIX.
6690
b86408f8 66912008-08-14 Felix Zielcke <fzielcke@z-51.de>
6692
d5e619ca 6693 * include/grub/err.h (grub_err_printf): New function prototype.
6694 * util/misc.c (grub_err_printf): New function.
6695 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
6696 grub_printf.
6697 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 6698
7161f0e0 66992008-08-13 Robert Millan <rmh@aybabtu.com>
6700
6701 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
6702
a1967522 67032008-08-13 Robert Millan <rmh@aybabtu.com>
6704
6705 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
6706 boot entry.
6707
371458b5 67082008-08-12 Robert Millan <rmh@aybabtu.com>
6709
6710 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
6711 of the relocation code from here ...
6712 (grub_multiboot): ... to here.
6713 (forward_relocator, backward_relocator): Move from here ...
6714 * kern/i386/loader.S (grub_multiboot_forward_relocator)
6715 (grub_multiboot_backward_relocator): ... to here.
6716 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
6717 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
6718 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
6719 (grub_multiboot_forward_relocator_end)
6720 (grub_multiboot_backward_relocator)
6721 (grub_multiboot_backward_relocator_end): New variables.
6722
05f9452b 67232008-08-12 Bean <bean123ch@gmail.com>
6724
6725 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
6726
20024ab0 67272008-08-11 Robert Millan <rmh@aybabtu.com>
6728
6729 * kern/i386/linuxbios/startup.S: Move from here ...
6730 * kern/i386/coreboot/startup.S: ... to here.
6731
6732 * kern/i386/linuxbios/init.c: Move from here ...
6733 * kern/i386/coreboot/init.c: ... to here.
6734
6735 * kern/i386/linuxbios/table.c: Move from here ...
6736 * kern/i386/coreboot/mmap.c: ... to here.
6737
6738 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
6739
e352e9cd 67402008-08-11 Robert Millan <rmh@aybabtu.com>
6741
6742 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6743 errors. Leave it to the upper layer to handle them.
6744
2d05bc6a 67452008-08-09 Christian Franke <franke@computer.org>
6746
6747 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6748 * conf/common.rmk: Install `grub-pe2elf' only if requested.
6749 Install `grub.d/10_windows' only on Cygwin.
6750 * configure.ac: Add subst of `target_os'.
6751 Check `target_os' also before setting TARGET_OBJ2ELF.
6752 Add `--enable-grub-pe2elf'.
6753
042bd419 67542008-08-08 Robert Millan <rmh@aybabtu.com>
6755
6756 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6757 (grub_last_time): Change type to grub_uint64_t.
6758 (grub_disk_open): Migrate code from to using grub_get_time_ms().
6759 (grub_disk_close): Likewise.
6760
6761 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6762 (run_menu): Migrate code from to using grub_get_time_ms().
6763
6764 * util/misc.c (grub_get_time_ms): New function.
6765
7f280db5 67662008-08-08 Marco Gerards <marco@gnu.org>
6767
6768 * disk/ata.c (grub_ata_regget): Change return type to
6769 `grub_uint8_t'.
6770 (grub_ata_regget2): Likewise.
6771 (grub_ata_wait_status): New function.
6772 (grub_ata_wait_busy): Removed function, updated all users to use
6773 `grub_ata_wait_status'.
6774 (grub_ata_wait_drq): Likewise.
6775 (grub_ata_cmd): New function.
6776 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
6777 error handling.
6778 (grub_ata_pio_write): Add error handling.
6779 (grub_atapi_identify): Likewise.
6780 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
6781 handling.
6782 (grub_ata_identify): Use `grub_ata_cmd' and improve error
6783 handling. Actually use the detected registers. Reorder the
6784 detection logic such that it is easier to read.
6785 (grub_ata_pciinit): Do not assign the same ID to each controller.
6786 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
6787 handling.
6788 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6789
6790 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6791
1fbc5e66 67922008-08-08 Marco Gerards <marco@gnu.org>
6793
6794 * NEWS: Update.
6795
819ce6c0 67962008-08-07 Bean <bean123ch@gmail.com>
6797
6798 * include/grub/x86_64/pci.h: New file.
6799
5c41d44d 68002008-08-07 Christian Franke <franke@computer.org>
6801
6802 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6803 (TIMER2_GATE): Likewise.
6804 (grub_pit_wait): Add enable/disable of the timer2 gate
6805 bit of port 0x61. This fixes a possible infinite loop.
6806
5ebc275d 68072008-08-07 Bean <bean123ch@gmail.com>
6808
6809 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6810 kern/i386/tsc.c and kern/i386/pit.c.
6811
6812 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6813 x86_64 platform.
6814
6815 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6816 <grub/i386/tsc.h>.
6817
6818 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6819
e383b3d0 68202008-08-07 Bean <bean123ch@gmail.com>
6821
6822 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6823
6824 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6825
6826 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6827 multiple inclusion. Add #include <grub/types.h>.
6828
1cbb58ac 68292008-08-06 Christian Franke <franke@computer.org>
6830
6831 * conf/common.rmk: Build and install `10_windows'.
6832 * util/grub.d/10_windows.in: New script.
6833
337f5a1e 68342008-08-06 Pavel Roskin <proski@gnu.org>
6835
6836 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6837
057bc4ac 68382008-08-06 Robert Millan <rmh@aybabtu.com>
6839
6840 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6841 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6842
2b99f123 68432008-08-06 Bean <bean123ch@gmail.com>
6844
6845 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6846 (grub_pxefs_fs_int): Remove dummy definition.
6847 (grub_pxefs_open): Use data->block_size to store the current block
6848 size setting.
6849 (grub_pxefs_read): Use block size stored in data->block_size. As the
6850 value of grub_pxe_blksize can be changed after the file is opened.
6851
9f0234cb 68522008-08-06 Bean <bean123ch@gmail.com>
6853
6854 * fs/i386/pc/pxe.c (curr_file): new variable.
6855 (grub_pxefs_open): Simply the handling of pxe file system. Don't
6856 require the dummy internal file system anymore.
6857 (grub_pxefs_read): Removed.
6858 (grub_pxefs_close): Likewise.
6859 (grub_pxefs_fs_int): Likewise.
6860 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6861 connection when we switch file.
6862 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6863
a55d42e0 68642008-08-06 Robert Millan <rmh@aybabtu.com>
6865
6866 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6867 `halt.mod'.
6868 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6869 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6870
6871 * kern/i386/halt.c: New file.
6872 * kern/i386/reboot.c: Likewise.
6873 * include/grub/i386/reboot.h: Likewise.
6874 * include/grub/i386/halt.h: Likewise.
6875
6876 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6877 Include `<grub/cpu/halt.h>'.
6878 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6879 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6880
6881 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6882 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6883 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6884 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6885 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6886 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6887 from here ...
6888 * include/grub/i386/at_keyboard.h: ... to here.
6889
24371d26 68902008-08-05 Robert Millan <rmh@aybabtu.com>
6891
6892 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6893 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6894 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6895 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6896 `kern/generic/millisleep.c'.
6897
6898 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6899 instead of grub_get_rtc().
6900 (grub_tsc_init): Initialize `tsc_boot_time'.
6901
6902 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6903 (grub_machine_init): Use grub_tsc_init() rather than
6904 installing an RTC-based handler via grub_install_get_time_ms().
6905
6906 * kern/i386/pit.c: New file.
6907 * include/grub/i386/pit.h: Likewise.
6908
9e7007b3 69092008-08-05 Bean <bean123ch@gmail.com>
6910
6911 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6912
6913 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6914 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6915 (pxe_mod_SOURCES): New macro.
6916 (pxe_mod_CFLAGS): Likewise.
6917 (pxe_mod_LDFLAGS): Likewise.
6918 (pxecmd_mod_SOURCES): Likewise.
6919 (pxecmd_mod_CFLAGS): Likewise.
6920 (pxecmd_mod_LDFLAGS): Likewise.
6921
6922 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6923 (grub_pxe_call): Likewise.
6924
6925 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6926
6927 * commands/i386/pc/pxecmd.c: New file.
6928
9f0234cb 6929 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 6930
6931 * include/grub/i386/pc/pxe.h: Likewise.
6932
6977d49f 69332008-08-05 Bean <bean123ch@gmail.com>
6934
6935 * util/console.c (grub_console_cur_color): New variable.
6936 (grub_console_standard_color): Likewise.
6937 (grub_console_normal_color): Likewise.
6938 (grub_console_highlight_color): Likewise.
6939 (color_map): Likewise.
6940 (use_color): Likewise.
6941 (NUM_COLORS): New macro.
6942 (grub_ncurses_setcolorstate): Handle color properly.
6943 (grub_ncurses_setcolor): Don't change color here, just remember the
6944 settings, color will be set in grub_ncurses_setcolorstate.
6945 (grub_ncurses_getcolor): New function.
6946 (grub_ncurses_init): Initialize color pairs.
6947 (grub_ncurses_term): New member grub_ncurses_getcolor.
6948
9c2ff3ee 69492008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 6950
9c2ff3ee 6951 High resolution timer support. Implemented for x86 CPUs using TSC.
6952 Extracted generic grub_millisleep() so it's linked in only as needed.
6953 This requires a Pentium compatible CPU; if the RDTSC instruction is
6954 not supported, then it falls back on the generic grub_get_time_ms()
6955 implementation that uses the machine's RTC.
6956
6957 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6958 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6959 `kern/generic/millisleep.c'.
6960
6961 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6962 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6963
6964 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6965 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6966
6967 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6968
6969 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6970 `kern/generic/millisleep.c'.
6971
6972 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6973
6974 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6975
6976 * kern/generic/rtc_get_time_ms.c: New file.
6977
6978 * kern/generic/millisleep.c: New file.
337f5a1e 6979
9c2ff3ee 6980 * kern/misc.c: Don't include
6981 <kern/time.h> anymore.
6982 (grub_millisleep_generic): Removed.
6983
6984 * commands/sleep.c (grub_interruptible_millisleep): Uses
6985 grub_get_time_ms() instead of grub_get_rtc().
6986
6987 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
6988 function.
6989 (grub_cpu_is_cpuid_supported): New inline function.
6990 (grub_cpu_is_tsc_supported): New inline function.
6991 (grub_tsc_init): New function prototype.
6992 (grub_tsc_get_time_ms): New function prototype.
6993
6994 * kern/i386/tsc.c (grub_get_time_ms): New file.
6995
6996 * include/grub/time.h: Include <grub/types.h.
6997 (grub_millisleep_generic): Removed.
6998 (grub_get_time_ms): New prototype.
6999 (grub_install_get_time_ms): New prototype.
7000 (grub_rtc_get_time_ms): New prototype.
7001
7002 * kern/time.c (grub_get_time_ms): New function.
7003 (grub_install_get_time_ms): New function.
7004
7005 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
7006 <grub/time.h> anymore.
7007 (grub_millisleep): Removed.
7008 (grub_machine_init): Call grub_tsc_init.
7009
7010 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
7011 get_time_ms() implementation.
7012
7013 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
7014 (ieee1275_get_time_ms): New function.
7015 (grub_machine_init): Install get_time_ms() implementation.
7016
7017 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
7018 (grub_machine_init): Call grub_tsc_init().
7019 (grub_millisleep): Removed.
bf06a93f 7020
9c2ff3ee 7021 * kern/ieee1275/init.c (grub_millisleep): Removed.
7022 (grub_machine_init): Install ieee1275_get_time_ms()
7023 implementation.
7024 (ieee1275_get_time_ms): New function.
7025 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
7026 real work.
7027
9ec92aaf 70282008-08-05 Marco Gerards <marco@gnu.org>
7029
7030 * disk/ata.c: Include <grub/pci.h>.
7031 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
7032 (grub_ata_initialize): Rewritten.
7033 (grub_ata_device_initialize): New function.
7034
8d23f507 70352008-08-04 Pavel Roskin <proski@gnu.org>
7036
7037 * kern/main.c: Include grub/mm.h.
7038
5e15ee3d 70392008-08-04 Robert Millan <rmh@aybabtu.com>
7040
7041 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
7042 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
7043 corruption problem).
7044
a9053f8f 70452008-08-04 Robert Millan <rmh@aybabtu.com>
7046
7047 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
7048 warnings introduced in my last commit.
7049
dd19c7d7 70502008-08-03 Robert Millan <rmh@aybabtu.com>
7051
7052 Make PCI available on all i386 architectures.
7053
7054 * include/grub/i386/pc/pci.h: Move from here ...
7055 * include/grub/i386/pci.h: ... to here.
7056
7057 * include/grub/i386/pc/pci.h: Remove.
7058 * include/grub/i386/efi/pci.h: Remove.
7059 * include/grub/x86_64/efi/pci.h: Remove.
7060
7061 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
7062 `<grub/cpu/pci.h>'.
7063
7064 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
7065 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
7066 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
7067
7068 * conf/i386-ieee1275.rmk: Likewise.
7069
e14a6184 70702008-08-03 Robert Millan <rmh@aybabtu.com>
7071
7072 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
7073 (grub_console_setcursor): Make it possible to set cursor off.
7074
52768e37 70752008-08-03 Robert Millan <rmh@aybabtu.com>
7076
7077 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
7078 of modules instead of assuming which platform provides what.
7079 * util/update-grub.in: Likewise.
7080
2d52f57f 70812008-08-03 Robert Millan <rmh@aybabtu.com>
7082
7083 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
7084 instead of `grub_install_dos_part' to determine whether a drive needs
7085 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 7086 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 7087
2a5cd121 70882008-08-02 Robert Millan <rmh@aybabtu.com>
7089
7090 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
7091
93808428 70922008-08-02 Robert Millan <rmh@aybabtu.com>
7093
7094 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
7095 of informational grub_dprintf() calls.
7096
3bd0a12a 70972008-08-02 Robert Millan <rmh@aybabtu.com>
7098
7099 * disk/memdisk.c (memdisk_size): Don't initialize.
7100 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
7101
7102 * include/grub/i386/pc/kernel.h
7103 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
7104 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
7105 (grub_memdisk_image_size, grub_arch_memdisk_addr)
7106 (grub_arch_memdisk_size): Remove.
7107
7108 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
7109 field (was only used to transfer a constant). Add `type' field to
7110 support multiple module types.
7111 (grub_module_iterate): New function.
7112
7113 * kern/device.c (grub_device_open): Do not hide error messages
7114 when grub_disk_open() fails. Use grub_print_error() instead.
7115
7116 * kern/i386/pc/init.c (grub_arch_modules_addr)
7117 (grub_arch_memdisk_size): Remove functions.
7118 (grub_arch_modules_addr): Return the module address in high memory
7119 (now that it isn't copied anymore).
7120
7121 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
7122 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
7123 decompression routine (grub_total_module_size already includes that
7124 now). Don't copy modules back to low memory.
7125
7126 * kern/main.c: Include `<grub/mm.h>'.
7127 (grub_load_modules): Split out (and use) ...
7128 (grub_module_iterate): ... this function, which iterates through
7129 module objects and runs a hook.
7130 Comment out grub_mm_init_region() call, as it would cause non-ELF
7131 modules to be overwritten.
7132
7133 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
7134 the memdisk image in its own region, make it part of the module list.
7135 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
7136 (main): Parse --memdisk|-m option, and pass user-provided path as
7137 parameter to generate_image().
7138 (add_segments): Pass `memdisk_path' down to load_modules().
7139 (load_modules): Embed memdisk image in module section when requested.
7140 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
7141 `header.type' instead of `header.offset'.
7142
7143 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
7144 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
7145 (memdisk_mod_LDFLAGS): New variables.
7146 * conf/i386-coreboot.rmk: Likewise.
7147 * conf/i386-ieee1275.rmk: Likewise.
7148
a927cc73 71492008-08-02 Robert Millan <rmh@aybabtu.com>
7150
7151 * loader/i386/pc/multiboot.c (playground, forward_relocator)
7152 (backward_relocator): New variables. Used to allocate and relocate
7153 the payload, respectively.
7154 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 7155 address, install the appropriate relocator code in each bound of
a927cc73 7156 the payload, and set the entry point such that
7157 grub_multiboot_real_boot() will jump to one of them.
7158
7159 * kern/i386/loader.S (grub_multiboot_payload_size)
7160 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7161 (grub_multiboot_payload_entry_offset): New variables.
7162 (grub_multiboot_real_boot): Set cpu context to what the relocator
7163 expects, and jump to the relocator instead of the payload.
7164
7165 * include/grub/i386/loader.h (grub_multiboot_payload_size)
7166 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7167 (grub_multiboot_payload_entry_offset): Export.
7168
b15d8a0c 71692008-08-01 Bean <bean123ch@gmail.com>
7170
7171 * normal/menu_entry.c (editor_getline): Don't return the original
7172 string as result, as it will be released by lexer once it has done
7173 using it.
7174
cdfb3d22 71752008-08-01 Robert Millan <rmh@aybabtu.com>
7176
7177 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
7178 within menuentries, not before them.
7179 util/grub.d/10_hurd.in: Likewise.
7180
9175e93d 71812008-08-01 Bean <bean123ch@gmail.com>
7182
7183 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
7184 (bufio_mod_SOURCES): New macro.
7185 (bufio_mod_CFLAGS): Likewise.
7186 (bufio_mod_LDFLAGS): Likewise.
7187
7188 * include/grub/bufio.h: New file.
7189
7190 * io/bufio.c: Likewise.
7191
7192 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
7193 (grub_video_reader_png): Use grub_buffile_open to open file.
7194
7195 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
7196 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
7197
7198 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
7199 (grub_video_reader_tga): Use grub_buffile_open to open file.
7200
7201 * font/manager.c: Include <grub/bufio.h>.
7202 (add_font): Use grub_buffile_open to open file.
7203
3d8383e7 72042008-07-31 Robert Millan <rmh@aybabtu.com>
7205
7206 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
7207 ELF segments, use a macro for arbitrarily accessing any of them instead
7208 of preparing a pointer that allows access to one at a time.
7209 (grub_multiboot_load_elf64): Likewise.
7210
16e641b6 72112008-07-31 Bean <bean123ch@gmail.com>
7212
7213 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
7214 GRUB_KERNEL_MACHINE_DATA_END.
7215
59198b72 72162008-07-30 Robert Millan <rmh@aybabtu.com>
7217
7218 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
7219 Increase from 0x50 to 0x60.
7220 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
7221 use UUIDs to identify the root drive for them. If that's not
7222 possible, abort.
7223 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
7224 check, for cross-disk installs.
7225
ae88bca3 72262008-07-30 Robert Millan <rmh@aybabtu.com>
7227
7228 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
7229 is non-empty, use it to set the `prefix' environment variable instead
7230 of the usual approach.
7231 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
7232 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
7233 environment variable instead of dummy make_install_device().
7234
7235 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
7236 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 7237 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 7238
7239 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
7240 New variable reference.
7241 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
7242 New macro. Defines offset of `grub_prefix' within startup.S (relative
7243 to `start').
7244 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
7245 section within startup.S (relative to `start').
7246 * include/grub/i386/coreboot/kernel.h: Likewise.
7247
7248 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
7249 Overwrite grub_prefix with its contents, at the beginning of the
7250 first segment.
7251 (main): Understand -p|--prefix.
7252
14f41dd1 72532008-07-30 Robert Millan <rmh@aybabtu.com>
7254
7255 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
7256
4ca049a3 72572008-07-30 Robert Millan <rmh@aybabtu.com>
7258
7259 * term/i386/pc/vga_text.c (grub_console_cls): Use
7260 grub_console_gotoxy() to go back to beginning of the screen.
7261 Found by Patrick Georgi <patrick.georgi@coresystems.de>
7262
2921d337 72632008-07-29 Christian Franke <franke@computer.org>
7264
7265 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7266 Add conversion of emulated mount points on Cygwin.
7267
b609876d 72682008-07-29 Christian Franke <franke@computer.org>
7269
7270 * util/update-grub.in: Add a check for admin
7271 group on Cygwin.
7272 Remove old `grub.cfg.new' before creation.
7273 Add `-f' to `mv' to handle the different filesystem
7274 semantics of Windows.
7275
e93e4679 72762008-07-29 Bean <bean123ch@gmail.com>
7277
7278 * normal/main.c (get_line): Fix buffer overflow bug.
7279
41694fd0 72802008-07-28 Robert Millan <rmh@aybabtu.com>
7281
7282 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
7283 (struct grub_apple_header): New struct. Describes the layout of
7284 the partmap header.
7285 (apple_partition_map_iterate): Check the header magic as well as the
7286 partition magic (which was already being checked).
7287
cfd0b4e6 72882008-07-28 Pavel Roskin <proski@gnu.org>
7289
7290 * genmk.rb: Add a warning to the beginning of the output that
7291 it's a generated file and should not be edited.
7292
93cce016 72932008-07-28 Robert Millan <rmh@aybabtu.com>
7294
7295 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
7296 with the same number are found, just use issue a warning with
7297 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 7298
cd1df915 72992008-07-27 Robert Millan <rmh@aybabtu.com>
7300
7301 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
7302 information.
7303
b70a8427 73042008-07-27 Bean <bean123ch@gmail.com>
7305
7306 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
7307 (grub_fat_find_dir): Ignore case when comparing filename.
7308
8f5e379f 73092008-07-27 Bean <bean123ch@gmail.com>
7310
7311 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
7312 smallino, as it's more descriptive, and i8count can be confused with
7313 the other field count.
7314 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
7315 inode type.
7316
a85cd5a0 73172008-07-27 Bean <bean123ch@gmail.com>
7318
7319 * commands/crc.c: New file.
7320
7321 * lib/crc.c: Likewise.
7322
7323 * include/grub/lib/crc.h: Likewise.
7324
7325 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
7326
7327 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
7328 (hexdump): Move this function to ...
7329
7330 * lib/hexdump.c: ... here.
7331
7332 * include/grub/hexdump.h: Renamed to ...
7333
7334 * include/grub/lib/hexdump.h: ... this.
7335
7336 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
7337
7338 * util/grub-editenv.c: Likewise.
7339
7340 * include/envblk.h: Renamed to ...
7341
7342 * include/lib/envblk.h: ... this.
7343
7344 * util/envblk.c: Renamed to ...
7345
7346 * lib/envblk.c: ... this.
7347
7348 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
7349 lib/hexdump.c.
7350 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
7351 (pkglib_MODULES): Add crc.mod.
7352 (hexdump_mod_SOURCES): Add lib/hexdump.c.
7353 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
7354 (crc_mod_SOURCES): New macro.
7355 (crc_mod_CFLAGS): Likewise.
7356 (crc_mod_LDFLAGS): Likewise.
7357
7358 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
7359
7360 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7361
7362 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7363
7364 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7365
7366 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7367
c298def0 73682008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 7369
7370 * commands/help.c: Include <grub/term.h>.
7371 (TERM_WIDTH): Removed. Updated all users.
7372
cc349fb3 73732008-07-27 Pavel Roskin <proski@gnu.org>
7374
7375 * util/getroot.c (find_root_device): Rephrase a comment to avoid
7376 spurious warnings about a comment within a comment.
7377
9051607e 73782008-07-25 Robert Millan <rmh@aybabtu.com>
7379
7380 * util/getroot.c (find_root_device): Skip devices that match
7381 /dev/dm-[0-9]. This lets the real device be found for any type of
7382 abstraction (LVM, EVMS, RAID..).
7383 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
7384 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
7385 device is found first, find_root_device() will now skip it.
7386
01453bfc 73872008-07-24 Pavel Roskin <proski@gnu.org>
7388
7389 * include/grub/types.h: Use __builtin_bswap32() and
7390 __builtin_bswap64() with gcc 4.3 and newer.
7391
6af9849f 73922008-07-24 Christian Franke <franke@computer.org>
7393
3a0fa256 7394 * util/i386/pc/grub-install.in: If `--debug' is specified,
7395 pass `--verbose' to grub-setup.
7396 Abort script if make_system_path_relative_to_its_root() fails.
7397
7810e747 73982008-07-24 Bean <bean123ch@gmail.com>
7399
7400 * configure.ac: Fixed a bug caused by the previous cygwin patch,
7401 variable `target_platform' should be `platform'.
7402
42290e17 74032008-07-24 Bean <bean123ch@gmail.com>
7404
51cc5193 7405 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 7406 (grub_png_init_fixed_block): New function.
7407 (grub_png_decode_image_data): Handle fixed huffman code compression.
7408
2a8a80e4 74092008-07-24 Bean <bean123ch@gmail.com>
7410
7411 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
7412 (grub_pe2elf_SOURCES): New macro.
7413 (CLEANFILES): Add grub-pe2elf.
7414
7415 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
7416 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
7417 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
7418 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
7419 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
7420 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
7421 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
7422 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
7423 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
7424 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
7425 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
7426 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
7427 (GRUB_PE32_DT_FUNCTION): Likewise.
7428 (GRUB_PE32_REL_I386_DIR32): Likewise.
7429 (GRUB_PE32_REL_I386_REL32): Likewise.
7430 (grub_pe32_symbol): New structure.
7431 (grub_pe32_reloc): Likewise.
7432
7433 * util/grub-pe2elf.c: New file.
7434
7435 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
7436 start symbol in non pc platform.
7437
7438 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
7439
7440 The following patches are from Christian Franke.
7441
7442 * include/grub/dl.h: Remove .previous, gas supports this only
7443 for ELF format.
7444
7445 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
7446 Remove .type, gas supports this only for ELF format.
7447
7448 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
7449 nullbytes in symbol table. This fixes an infinite loop if table is
7450 zero filled.
7451
7452 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
7453 TARGET_IMG_LDFLAGS and EXEEXT.
7454
7455 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
7456 TARGET_IMG_LDFLAGS_AC.
7457 (grub_CHECK_STACK_ARG_PROBE): New function.
7458
7459 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
7460
7461 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
7462
7463 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
7464 to set TARGET_IMG_LD* accordingly.
7465 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
7466 Add call to grub_CHECK_STACK_ARG_PROBE.
7467 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
7468
7469 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
7470
7471 * genmk.rb: Add EXEEXT to CLEANFILES.
7472
12ccdb75 74732008-07-23 Robert Millan <rmh@aybabtu.com>
7474
7475 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
7476 define the codes for arrows and lines used for the menu).
7477 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
7478 as well.
7479
7480 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
7481 fonts, because the latter are too slow.
7482
18eeaf04 74832008-07-21 Bean <bean123ch@gmail.com>
7484
7485 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
7486 a20. Run keyboard test last, as it will cause macbook to halt.
7487
b095e2ad 74882008-07-18 Pavel Roskin <proski@gnu.org>
7489
7490 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
7491 load foreign architecture modules correctly anyway. Keep
7492 support for loading host architecture modules, whether we
7493 compile them or not.
7494
737feb35 74952008-07-17 Pavel Roskin <proski@gnu.org>
7496
3f4ce737 7497 * configure.ac: Use -m32 or -m64 regardless of whether we had to
7498 change target_cpu. The compiler default can mismatch target_cpu
7499 in any case.
7500
4ad2d049 7501 * disk/efi/efidisk.c: Fix format warnings on x86_64.
7502 * kern/efi/efi.c: Likewise.
7503
f6130a12 7504 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
7505 target compiler is functional.
7506 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
7507 are set up.
7508
58393a2d 7509 * configure.ac: Default to efi platform for x86_64-apple. Allow
7510 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
7511 adjustments from the rest, only do them if target is not
7512 explicitly given. Merge other adjustments with the final sanity
7513 check. Remove an extraneous check for supported CPU. Be
7514 specific which CPU and which platform is not supported.
7515
737feb35 7516 * configure.ac: Default to pc platform for x86_64.
7517
546f966a 75182008-07-17 Robert Millan <rmh@aybabtu.com>
7519
7520 Partial LinuxBIOS -> Coreboot rename.
7521
7522 * conf/i386-linuxbios.rmk: Renamed to ...
7523 * conf/i386-coreboot.rmk: ... this.
7524 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
7525 * configure.ac: Accept "coreboot" as input platform (but maintain
7526 compatibility with "linuxbios").
7527 * include/grub/i386/linuxbios: Renamed to ...
7528 * include/grub/i386/coreboot: ... this.
7529
20011694 75302008-07-17 Bean <bean123ch@gmail.com>
7531
7532 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 7533 (appleldr_mod_SOURCE): New variable.
20011694 7534 (appleldr_mod_CFLAGS): Likewise.
7535 (appleldr_mod_LDFLAGS): Likewise.
7536 (pci_mod_SOURCES): Likewise.
7537 (pci_mod_CFLAGS): Likewise.
7538 (pci_mod_LDFLAGS): Likewise.
7539 (lspci_mod_SOURCES): Likewise.
7540 (lspci_mod_CFLAGS): Likewise.
7541 (lspci_mod_LDFLAGS): Likewise.
7542
7543 * conf/x86_64-efi.rmk: New file.
7544
7545 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
7546 macro.
7547 (grub_efidisk_write): Likewise.
7548
7549 * include/efi/api.h (efi_call_0): New macro.
7550 (efi_call_1): Likewise.
7551 (efi_call_2): Likewise.
7552 (efi_call_3): Likewise.
7553 (efi_call_4): Likewise.
7554 (efi_call_5): Likewise.
7555 (efi_call_6): Likewise.
7556
7557 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
7558 grub_rescue_cmd_chainloader.
7559
7560 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
7561 (grub_pe32_optional_header): Change some fields based on i386 or
7562 x86_64 platform.
7563 (GRUB_PE32_PE32_MAGIC): Likewise.
7564
7565 * include/grub/efi/uga_draw.h: New file.
7566
7567 * include/grub/elf.h (STN_ABS): New constant.
7568 (R_X86_64_NONE): Relocation constant for x86_64.
7569 (R_X86_64_64): Likewise.
7570 (R_X86_64_PC32): Likewise.
7571 (R_X86_64_GOT32): Likewise.
7572 (R_X86_64_PLT32): Likewise.
7573 (R_X86_64_COPY): Likewise.
7574 (R_X86_64_GLOB_DAT): Likewise.
7575 (R_X86_64_JUMP_SLOT): Likewise.
7576 (R_X86_64_RELATIVE): Likewise.
7577 (R_X86_64_GOTPCREL): Likewise.
7578 (R_X86_64_32): Likewise.
7579 (R_X86_64_32S): Likewise.
7580 (R_X86_64_16): Likewise.
7581 (R_X86_64_PC16): Likewise.
7582 (R_X86_64_8): Likewise.
7583 (R_X86_64_PC8): Likewise.
7584
7585 * include/grub/i386/efi/pci.h: New file.
7586
7587 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
7588 Change it value based on platform.
7589 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
7590 (GRUB_E820_RAM): Likewise.
7591 (GRUB_E820_RESERVED): Likewise.
7592 (GRUB_E820_ACPI): Likewise.
7593 (GRUB_E820_NVS): Likewise.
7594 (GRUB_E820_EXEC_CODE): Likewise.
7595 (GRUB_E820_MAX_ENTRY): Likewise.
7596 (grub_e820_mmap): New structure.
7597 (linux_kernel_header): Change the efi field according to different
7598 kernel version, also field from linux_kernel_header.
7599
7600 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
7601
7602 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
7603 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
7604 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
7605 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
7606 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
7607 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
7608 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
7609 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
7610 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
7611 (GRUB_PCI_ADDR_IO_MASK): Likewise.
7612
7613 * include/grub/x86_64/efi/kernel.h: New file.
7614
7615 * include/grub/x86_64/efi/loader.h: Likewise.
7616
7617 * include/grub/x86_64/efi/machine.h: Likewise.
7618
7619 * include/grub/x86_64/efi/pci.h: Likewise.
7620
7621 * include/grub/x86_64/efi/time.h: Likewise.
7622
7623 * include/grub/x86_64/linux.h: Likewise.
7624
7625 * include/grub/x86_64/setjmp.h: Likewise.
7626
7627 * include/grub/x86_64/time.h: Likewise.
7628
7629 * include/grub/x86_64/types.h: Likewise.
7630
7631 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
7632 GRUB_TARGET_SIZEOF_VOID_P.
7633
7634 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
7635 (grub_efi_locate_handle): Likewise.
7636 (grub_efi_open_protocol): Likewise.
7637 (grub_efi_set_text_mode): Likewise.
7638 (grub_efi_stall): Likewise.
7639 (grub_exit): Likewise.
7640 (grub_reboot): Likewise.
7641 (grub_halt): Likewise.
7642 (grub_efi_exit_boot_services): Likewise.
7643 (grub_get_rtc): Likewise.
7644
7645 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
7646 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
7647 (grub_efi_allocate_pages): Wrap efi calls.
7648 (grub_efi_free_pages): Wrap efi calls.
7649 (grub_efi_get_memory_map): Wrap efi calls.
7650
7651 * kern/x86_64/dl.c: New file.
7652
7653 * kern/x86_64/efi/callwrap.S: Likewise.
7654
7655 * kern/x86_64/efi/startup.S: Likewise.
7656
7657 * loader/efi/appleloader.c: Likewise.
7658
7659 * loader/efi/chainloader.c (cmdline): New variable.
7660 (grub_chainloader_unload): Wrap efi calls.
7661 (grub_chainloader_boot): Likewise.
7662 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
7663 command line.
7664
7665 * loader/efi/chainloader_normal.c (chainloader_command):
7666 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
7667 command line.
7668
7669 * loader/i386/efi/linux.c (allocate_pages): Change allocation
7670 method.
7671 (grub_e820_add_region): New function.
7672 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
7673 booting.
7674 (grub_find_video_card): New function.
7675 (grub_linux_setup_video): New function.
7676 (grub_rescue_cmd_linux): Probe for video information.
7677
7678 * normal/x86_64/setjmp.S: New file.
7679
7680 * term/efi/console.c (map_char): New function.
7681 (grub_console_putchar): Map unicode char.
7682 (grub_console_checkkey): Wrap efi calls.
7683 (grub_console_getkey): Likewise.
7684 (grub_console_getwh): Likewise.
7685 (grub_console_gotoxy): Likewise.
7686 (grub_console_cls): Likewise.
7687 (grub_console_setcolorstate): Likewise.
7688 (grub_console_setcursor): Likewise.
7689
7690 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
7691
59652a20 76922008-07-16 Pavel Roskin <proski@gnu.org>
7693
ef294055 7694 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
7695 format strings.
7696
59652a20 7697 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
7698 pointer, not an integer. This fixes a warning and prevents
7699 precision loss on 64-bit systems.
7700 (relocate_addresses): Remove unneeded cast.
7701
afc3b5d7 77022008-07-15 Pavel Roskin <proski@gnu.org>
7703
506b2b3e 7704 * kern/i386/ieee1275/init.c: Include grub/cache.h.
7705
62ead89c 7706 * term/ieee1275/ofconsole.c: Disable code unused on i386.
7707
c4cd51d7 7708 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
7709 Fix comparison between signed and unsigned.
7710
0d3d8f28 7711 * include/grub/i386/ieee1275/console.h: Declare
7712 grub_console_init() and grub_console_fini().
7713
8804b286 7714 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
7715 It's empty and unused.
7716
ee01cf35 7717 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
7718 beginning to avoid warnings with some compilers.
7719
afc3b5d7 7720 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
7721 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
7722
e4e8eaa5 77232008-07-14 Pavel Roskin <proski@gnu.org>
7724
407aceb4 7725 * kern/env.c (grub_register_variable_hook): Don't copy empty
7726 string, it leaks memory. Pass "" to grub_env_set(), it should
7727 handle constant strings.
7728
e4e8eaa5 7729 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
7730 * commands/cmp.c (grub_cmd_cmp): Likewise.
7731 * kern/dl.c (grub_dl_flush_cache): Likewise.
7732 (grub_dl_load_core): Likewise.
7733 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
7734 (grub_elf64_load_phdrs): Likewise.
7735
d4e2dad3 77362008-07-13 Pavel Roskin <proski@gnu.org>
7737
7738 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
7739 between signed and unsigned.
7740 (LzmaEnc_Finish): Fix warning about an unused parameter.
7741
aa24b516 77422008-07-13 Bean <bean123ch@gmail.com>
7743
7744 * Makefile.in (enable_lzo): New rule.
7745
7746 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7747
7748 * configure.ac (ENABLE_LZO): New option --enable-lzo.
7749
7750 * boot/i386/pc/lnxboot.S: #include <config.h>.
7751
7752 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 7753 its value according to the compression algorithm used, lzo or lzma.
aa24b516 7754
7755 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7756 compression algorithm according to configure macro.
7757
7758 * kern/i386/pc/startup.S (codestart): Likewise.
7759
7760 * kern/i386/pc/lzma_decode.S: New file.
7761
7762 * include/grub/lib/LzFind.h: Likewise.
7763
7764 * include/grub/lib/LzHash.h: Likewise.
7765
7766 * include/grub/lib/LzmaDec.h: Likewise.
7767
7768 * include/grub/lib/LzmaEnc.h: Likewise.
7769
7770 * include/grub/lib/LzmaTypes.h: Likewise.
7771
7772 * lib/LzFind.c: Likewise.
7773
7774 * lib/LzmaDec.c: Likewise.
7775
7776 * lib/LzmaEnc.c: Likewise.
7777
4ae821ac 77782008-07-13 Bean <bean123ch@gmail.com>
7779
7780 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
7781 (grub_ext4_extent_header): New structure.
7782 (grub_ext4_extent): Likewise.
7783 (grub_ext4_extent_idx): Likewise.
7784 (grub_ext4_find_leaf): New function.
7785 (grub_ext2_read_block): Handle extents.
7786
9a745147 77872008-07-12 Robert Millan <rmh@aybabtu.com>
7788
7789 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7790
d49a4cf6 77912008-07-11 Robert Millan <rmh@aybabtu.com>
7792
7793 * util/grub.d/40_custom.in: New file. Example on how to add custom
7794 entries to /etc/grub.d.
7795 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7796 40_custom (implicitly, by merging all the grub.d rules).
7797
947414b4 77982008-07-11 Pavel Roskin <proski@gnu.org>
7799
0059cf6f 7800 * commands/read.c (grub_getline): Fix invalid memory access.
7801 Don't add newline to the variable value.
7802
947414b4 7803 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7804 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7805 (serial_hw_get_port): Check validity of the port number.
7806 (grub_cmd_serial): Check return value of serial_hw_get_port().
7807
62a02d00 78082008-07-07 Pavel Roskin <proski@gnu.org>
7809
7810 * boot/i386/pc/diskboot.S (notification_string): Replace
7811 "Loading kernel" with just "loading". This is shorter, less
7812 confusing and saves a few bytes for possible future changes.
7813
3e5581b0 78142008-07-05 Pavel Roskin <proski@gnu.org>
7815
ea387a48 7816 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7817 size for ATAPI devices, they are undefined. Output sector
7818 number in decimal form.
7819
3e5581b0 7820 * disk/ata.c: Use named constants for status bits.
7821
fdecb8fd 78222008-07-04 Pavel Roskin <proski@gnu.org>
7823
bcd35b90 7824 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7825 grub_addr_t before casting it to the void pointer to fix a
7826 warning. Non-addressable regions are discarded earlier.
7827 (grub_arch_modules_addr): Cast _end to grub_addr_t.
7828 * kern/i386/linuxbios/table.c: Include grub/misc.h.
7829 (check_signature): Don't shadow table_header.
7830 (grub_linuxbios_table_iterate): Cast numeric constants to
7831 grub_linuxbios_table_header_t.
7832 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7833 grub_stop().
7834
af58ab3d 7835 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7836 prevent warnings.
7837
1759aa57 7838 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7839 pointer, which can cause warnings. Support 64-bit addresses.
7840
fdecb8fd 7841 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7842 of sizeof(long). This fixes PowerPC image generation on x86_64.
7843
8516d2a8 78442008-07-04 Robert Millan <rmh@aybabtu.com>
7845
7846 This fixes a performance issue when pc & gpt partmap iterators
7847 didn't abort iteration even after our hook found what it was
fe987087 7848 looking for (often causing expensive probes of non-existent drives).
8516d2a8 7849
7850 Some callers relied on previous buggy behaviour, since they would
34c44600 7851 raise an error when their own hooks caused early abortion of its
8516d2a8 7852 iteration.
7853
7854 * kern/device.c (grub_device_open): Improve error message.
7855 * disk/lvm.c (grub_lvm_open): Likewise.
7856 * disk/raid.c (grub_raid_open): Likewise.
7857
7858 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7859 when hook requests it, independently of grub_errno.
7860 (pc_partition_map_probe): Do not fail when find_func() caused
7861 early abortion of pc_partition_map_iterate().
7862
7863 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7864 when hook requests it, independently of grub_errno.
7865 (gpt_partition_map_probe): Do not fail when find_func() caused
7866 early abortion of gpt_partition_map_iterate().
7867
7868 * kern/partition.c (grub_partition_iterate): Abort parent iteration
7869 when hook requests it, independently of grub_errno. Do not fail when
7870 part_map_iterate_hook() caused early abortion of p->iterate().
7871
7872 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7873 when grub_partition_iterate() returned with non-zero.
7874
277d0de9 78752008-07-03 Pavel Roskin <proski@gnu.org>
7876
7877 * disk/ata.c (grub_ata_pio_write): Check status before writing,
7878 like we do in grub_ata_pio_read().
7879 (grub_ata_readwrite): Always write individual sectors. Fix the
7880 sector count for the remainder.
7881 (grub_ata_write): Enable writing to ATA devices. Correctly
7882 report error for ATAPI devices.
7883
d4c9b428 78842008-07-02 Pavel Roskin <proski@gnu.org>
7885
e43fc690 7886 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7887 warning.
7888
f707af42 7889 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7890 for every read sector, we already increment it for the whole
7891 batch. This fixes reading more than 256 sectors at once.
7892
11e16b15 7893 * util/grub-editenv.c (cmd_info): Cast argument to long
7894 explicitly. ptrdiff_t reduces to int on i386.
7895
cbabfdd4 7896 * util/grub-editenv.c (main): Be specific which parameter is
7897 missing.
7898
b8fbce0a 7899 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7900 (memdisk): Make memdisk_orig_addr a pointer.
7901
c9c8e606 7902 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7903 for file offsets, use grub_off_t instead. Fix printf format
7904 warnings.
7905
ca62e598 7906 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7907 there. Real unexpected warnings should not drown in the noise
7908 about known problems.
7909
ce8d1766 7910 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7911 grub_disk_addr_t for memory addresses.
7912
00c7a56a 7913 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7914 explicitly to fix a warning.
7915
08d3ef09 7916 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7917
cb71ba20 7918 * Makefile.in (MODULE_LDFLAGS): New variable.
7919 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
7920 the linker accepts --build-id=none.
7921 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
7922 MODULE_LDFLAGS.
7923 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7924
d4c9b428 7925 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7926 those in Linux XFS code. Provide a way to access 64-bit parent
7927 inode.
7928 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
7929 the end of struct grub_xfs_dir_header.
7930
d4156eee 79312008-07-02 Bean <bean123ch@gmail.com>
7932
7933 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7934 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7935 and GRUB_IEEE1275_FLAG_NO_ANSI.
7936
7937 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7938 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7939 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7940
7941 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7942 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7943
7944 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7945 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7946
7947 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7948 esc sequence on non ANSI terminal.
7949 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7950
7951 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7952 beginning of file.
7953
2270f77b 79542008-07-02 Bean <bean123ch@gmail.com>
7955
7956 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7957 (grub_editenv_SOURCES): New variable.
7958 (pkglib_MODULES): Add loadenv.mod.
7959 (loadenv_mod_SOURCES): New variable.
7960 (loadenv_mod_CFLAGS): Likewise.
7961 (loadenv_mod_LDFLAGS): Likewise.
7962
7963 * include/grub/envblk.h: New file.
7964
7965 * util/envblk.c: New file.
7966
7967 * util/grub-editenv.c: New file.
7968
7969 * commands/loadenv.c: New file.
7970
0e9e51ec 79712008-07-01 Pavel Roskin <proski@gnu.org>
7972
d89b7634 7973 * include/multiboot2.h (struct multiboot_tag_module): Use char,
7974 not unsigned char. This fixes warnings and is consistent with
7975 other tags.
7976
bf1835b1 7977 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7978
8222a04b 7979 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7980
6a42d99d 7981 * term/tparm.c (analyze): Always set *popcount.
7982
10b159d1 7983 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7984 cast to fix a warning.
7985
b8789f6c 7986 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7987 cast to suppress a warning.
7988
29d7e38a 7989 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7990 grub_fshelp_read_file() expects.
7991
f341f669 7992 * fs/fat.c: Fix UUID calculation on big-endian systems. We
7993 write uuid as a 32-bit value in CPU byte order, so declare and
7994 use it as such.
7995
0e9e51ec 7996 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7997 long if the format specifier expects it.
7998 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7999 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8000 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
8001 long to fix a warning.
8002 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
8003 grub_dprintf() arguments to fix warnings.
8004
3aefa857 80052008-06-30 Pavel Roskin <proski@gnu.org>
8006
56c7668b 8007 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
8008 install_bsd_part immediately before core.img is embedded or
8009 modified on disk. This fixes core.img verification if core.img
8010 cannot be embedded.
8011
3aefa857 8012 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
8013 core_path to calculate the blocklist.
8014 Patch from Javier Martín <lordhabbit@gmail.com>
8015
5444088d 80162008-06-29 Robert Millan <rmh@aybabtu.com>
8017
8018 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
8019 block to disk block.
8020 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
8021 Patch from Niels Böhm <bitbucket@arcor.de>
8022
674835c8 80232008-06-29 Robert Millan <rmh@aybabtu.com>
8024
8025 * util/update-grub_lib.in (font_path): Search for fonts in
8026 /boot/grub first, which is more likely to be readable (we aren't
8027 deciding where fonts live, just looking for them).
8028
f527dbc8 80292008-06-26 Pavel Roskin <proski@gnu.org>
8030
6c2d8df6 8031 * util/biosdisk.c (read_device_map): Don't leave dead map
8032 entries for devices failing stat() check.
8033
f527dbc8 8034 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
8035 core_path_dev for the core.img path on the target device.
8036
aebe3d13 80372008-06-26 Robert Millan <rmh@aybabtu.com>
8038
8039 * disk/fs_uuid.c: New file.
8040 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
8041 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
8042 (fs_uuid_mod_LDFLAGS): New variables.
8043 * include/grub/disk.h (grub_disk_dev_id): Add
8044 `GRUB_DISK_DEVICE_UUID_ID'.
8045 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
8046 implement iterate().
8047
37aaf354 80482008-06-26 Robert Millan <rmh@aybabtu.com>
8049
8050 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
8051 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
8052 Linux image includes no initrd.
8053
25ff262a 80542008-06-21 Javier Martín <lordhabbit@gmail.com>
8055
8056 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
8057 call to resolve the core image location that effectively appended the
8058 name twice.
8059
76a2bd44 80602008-06-21 Robert Millan <rmh@aybabtu.com>
8061
8062 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
8063 call from here ...
8064
8065 * util/grub.d/10_hurd.in: ... to here ...
8066 * util/grub.d/10_linux.in: ... and here.
8067
650e1c79 80682008-06-19 Robert Millan <rmh@aybabtu.com>
8069
fe987087 8070 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 8071 after it has been set by grub_machine_set_prefix().
8072
6ce63911 80732008-06-19 Robert Millan <rmh@aybabtu.com>
8074
8075 * commands/search.c (search_label, search_fs_uuid, search_file): Print
8076 search result when not saving to variable, not the other way around.
8077 When saving to variable, abort iteration as soon as a match is found.
8078
73940cec 80792008-06-19 Robert Millan <rmh@aybabtu.com>
8080
8081 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
8082 check for partition that provides /boot/grub. Its logic is flawed,
8083 as it prevents prepare_grub_to_access_device() from being called
8084 multiple times.
8085
3c62a39d 80862008-06-19 Robert Millan <rmh@aybabtu.com>
8087
8088 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
8089 "insmod" command directly when abstraction modules are needed,
fe987087 8090 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 8091 since it had already been processed).
8092
47395a42 80932008-06-19 Pavel Roskin <proski@gnu.org>
8094
8095 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
8096 changed. This is needed in case GRUB_LIBDIR changes.
8097 * conf/i386-ieee1275.rmk: Likewise.
8098 * conf/i386-linuxbios.rmk: Likewise.
8099 * conf/i386-pc.rmk: Likewise.
8100 * conf/powerpc-ieee1275.rmk: Likewise.
8101
a145ac2d 81022008-06-18 Pavel Roskin <proski@gnu.org>
8103
8104 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
8105 kernel_elf_symlist.c to symlist.c for consistency with other
8106 architectures. Update all users.
8107 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8108
7847c51e 81092008-06-18 Robert Millan <rmh@aybabtu.com>
8110
8111 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
8112 it in prefix.
8113
8114 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
8115 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
8116 a RAID device, run setup() for all members independently on whether
8117 LVM abstraction is being used.
8118 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
8119 If grub-mkimage has set `*install_dos_part == -2', don't override this
8120 value.
8121 Perform *install_dos_part adjustments independently on whether
8122 we're embedding or not.
8123 Clarify error message when image is too big for embedding.
8124 Remove duplicate *install_dos_part stanza.
8125
b23e5644 81262008-06-17 Robert Millan <rmh@aybabtu.com>
8127
8128 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
8129 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
8130 variables.
8131 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
8132 values in grub_ofconsole_normal_color and
8133 grub_ofconsole_highlight_color (they're not directly related to
8134 background and foreground).
8135 (grub_ofconsole_setcolorstate): Extract background and foreground
8136 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
8137
0aac2f79 81382008-06-17 Robert Millan <rmh@aybabtu.com>
8139
8140 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
8141 /boot/grub for the check in last commit, not /boot (they could be
8142 different partitions).
8143
3cca7ef3 81442008-06-16 Robert Millan <rmh@aybabtu.com>
8145
8146 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
8147 asked to setup access for the same partition that provides /boot,
8148 don't bother using UUIDs since our root already has the value we
8149 want.
8150
347396d8 81512008-06-16 Robert Millan <rmh@aybabtu.com>
8152
8153 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
8154 I2O devices.
8155 Patch from Sven Mueller <sven@debian.org>.
8156
991477f8 81572008-06-16 Robert Millan <rmh@aybabtu.com>
8158
8159 * util/update-grub.in: Check for $EUID instead of $UID.
8160 Reported by Vincent Zweije.
8161
d31a32a1 81622008-06-16 Bean <bean123ch@gmail.com>
8163
fe987087 8164 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 8165 (grub_ext2_read_block): Likewise.
8166 (grub_ext2_read_inode): Likewise.
8167 (grub_ext2_mount): Likewise.
8168 (grub_ext2_close): Likewise.
8169 (grub_ext3_get_journal): Removed.
8170
fe987087 8171 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 8172 (grub_reiserfs_read_symlink): Likewise.
8173 (grub_reiserfs_mount): Likewise.
8174 (grub_reiserfs_open): Likewise.
8175 (grub_reiserfs_read): Likewise.
8176 (grub_reiserfs_close): Likewise.
8177 (grub_reiserfs_get_journal): Removed.
8178
8179 * fs/fshelp.c (grub_fshelp_read): Removed.
8180 (grub_fshelp_map_block): Likewise.
8181
8182 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
8183 (grub_fshelp_journal): Likewise.
8184 (grub_fshelp_read): Likewise.
8185 (grub_fshelp_map_block): Likewise.
8186
3540a760 81872008-06-16 Pavel Roskin <proski@gnu.org>
8188
8189 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
8190 floating point anymore.
8191 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
8192
95614c84 81932008-06-15 Pavel Roskin <proski@gnu.org>
8194
8195 * commands/ls.c (grub_ls_list_files): Use integer calculations
8196 for human readable format, avoid floating point use.
8197 * kern/misc.c (grub_ftoa): Remove.
8198 (grub_vsprintf): Remove floating point support.
8199
50465dd6 82002008-06-15 Robert Millan <rmh@aybabtu.com>
8201
fe6b695a 8202 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 8203 devices.
8204 Reported by Max Vozeler.
8205
a9207284 82062008-06-15 Robert Millan <rmh@aybabtu.com>
8207
8208 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
8209 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
8210 skipped later.
8211 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
8212 the beginning of the prefix.
8213
8214 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
8215 It is assumed that if we have a memdisk, grub-mkimage has set
8216 grub_prefix to include the "(memdisk)" drive in it.
8217
a7cbd45a 82182008-06-15 Robert Millan <rmh@aybabtu.com>
8219
8220 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
8221 Initialize keyboard controller after registering the terminal, so that
8222 grub_printf() can be called from grub_keyboard_controller_init().
8223
21cf716a 82242008-06-15 Robert Millan <rmh@aybabtu.com>
8225
8226 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
8227 extent-btree which is written as big endian on disk.
8228 Reported by Alain Greppin <al@chilibi.org>.
8229
23a64d8e 82302008-06-14 Robert Millan <rmh@aybabtu.com>
8231
8232 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
8233 * util/i386/pc/grub-install.in (modules): Likewise.
8234
d687651c 82352008-06-13 Pavel Roskin <proski@gnu.org>
8236
8237 * commands/ls.c (grub_ls_list_files): Fix format warnings.
8238
dfe9ddd4 82392008-06-13 Bean <bean123ch@gmail.com>
8240
8241 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
8242
8243 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
8244
8245 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
8246 to indicate sparse block.
8247
16ae7781 82482008-06-12 Pavel Roskin <proski@gnu.org>
8249
e6d1a308 8250 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
8251 number, grub_fshelp_read() does it for us.
8252
16ae7781 8253 * fs/fshelp.c (grub_fshelp_read): New function. Implement
8254 linear disk read with journal translation.
8255 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
8256 * include/grub/fshelp.h: Declare grub_fshelp_read().
8257
40fd3a2b 82582008-06-09 Pavel Roskin <proski@gnu.org>
8259
8260 * fs/minix.c (grub_minix_mount): Handle error reading
8261 superblock.
8262
f5679726 82632008-06-08 Robert Millan <rmh@aybabtu.com>
8264
8265 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
8266 don't append the RAID prefix afterwards.
8267 Reported by Clint Adams.
8268
ce525529 82692008-06-08 Robert Millan <rmh@aybabtu.com>
8270
8271 Based on description from Pavel:
8272 * kern/disk.c (grub_disk_check_range): Rename to ...
8273 (grub_disk_adjust_range): ... this. Add a comment explaining the
8274 tasks performed by this function.
8275
ad4936a0 82762008-06-08 Robert Millan <rmh@aybabtu.com>
8277
8278 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
8279 `num_serial' (for consistency with other variables).
8280 (struct grub_ntfs_data): Add `uuid' member.
8281 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
8282 (grub_ntfs_uuid): New function.
8283 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
8284
dc20b0f9 82852008-06-07 Pavel Roskin <proski@gnu.org>
8286
8287 * util/biosdisk.c (open_device): Revert last change to the
8288 function, it broke installation. The sector needs to be
8289 different dependent on which device is opened.
8290
c5e3cfba 82912008-06-06 Robert Millan <rmh@aybabtu.com>
8292
8293 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
8294 rest of GRUB, and breakage doesn't happen if its value were modified.
8295
8296 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8297 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
8298 a constant (same value).
8299 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
8300 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
8301
26a1f8c4 83022008-06-06 Robert Millan <rmh@aybabtu.com>
8303
8304 * util/biosdisk.c (open_device): Do not modify sector offset when
8305 accessing a partition. kern/disk.c already handles this for us.
8306
25d6b327 83072008-06-06 Robert Millan <rmh@aybabtu.com>
8308
8309 * util/grub-emu.c (grub_machine_init): Move code in this function from
8310 here ...
8311 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
8312 segfault in case grub_printf() is called).
8313
8314 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
8315 grub_probe. Update all users not to explicitly add it again.
8316 (grub_device): New variable; contains corresponding device for grubdir.
8317 (fs_module, partmap_module, devabstraction_module): Pass
8318 `--device ${grub_device}' to grub_probe to avoid traversing /dev
8319 every time.
8320
9ece62fb 83212008-06-05 Robert Millan <rmh@aybabtu.com>
8322
8323 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
8324 is found, print it (same layout as with labels).
8325
1ad36d37 83262008-06-04 Robert Millan <rmh@aybabtu.com>
8327
8328 * util/biosdisk.c (get_drive): Rename to ...
8329 (find_grub_drive): ... this. Update all users.
8330
8331 (get_os_disk): Rename to ...
8332 (convert_system_partition_to_system_disk): ... this. Update all users.
8333
8334 (find_drive): Rename to ...
8335 (find_system_device): ... this. Update all users.
8336
e6a30859 83372008-06-04 Robert Millan <rmh@aybabtu.com>
8338
8339 * util/biosdisk.c (get_os_disk): Handle IDA devices.
8340 * util/grub-mkdevicemap.c (get_mmc_disk_name)
8341 (make_device_map): Likewise.
8342
00c108a4 83432008-06-01 Robert Millan <rmh@aybabtu.com>
8344
8345 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
8346 before dereferencing it.
8347
8348 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
8349 union with fat12/fat16-specific ones. Add some new fields, including
8350 `num_serial' for both versions.
8351 (struct grub_fat_data): Add `uuid' member.
8352 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
8353 names. Initialize `data->uuid' using `num_serial'.
8354 (grub_fat_uuid): New function.
8355 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
8356
8357 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
8358 (grub_reiserfs_uuid): New function.
8359 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
8360 member.
8361
8362 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
8363 (grub_xfs_uuid): New function.
8364 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
8365
1385c5bb 83662008-06-01 Robert Millan <rmh@aybabtu.com>
8367
8368 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
8369 code that is backward compatible with pre-uuid search command.
8370
c682dfd7 83712008-05-31 Robert Millan <rmh@aybabtu.com>
8372
8373 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
8374 floppies after everything else, to ensure floppy drive isn't accessed
8375 unnecessarily (patch from Bean).
8376
b7db5d47 83772008-05-31 Robert Millan <rmh@aybabtu.com>
8378
8379 * commands/search.c (search_label, search_fs_uuid, search_file): Do
8380 not print device names when we were asked to set a variable.
8381
6e037aa9 83822008-05-31 Robert Millan <rmh@aybabtu.com>
8383
8384 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
8385 using "cursor-on" and "cursor-off" commands (understood at least by
8386 the Open Firmware flavour on OLPC).
8387
41305bc8 83882008-05-31 Michael Gorven <michael@gorven.za.net>
8389
8390 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
8391 on and off sequences.
8392
69ba137e 83932008-05-31 Robert Millan <rmh@aybabtu.com>
8394
8395 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
8396 * util/update-grub.in: Likewise.
8397
520ae21b 83982008-05-30 Pavel Roskin <proski@gnu.org>
8399
8400 * util/biosdisk.c (linux_find_partition): Simplify logic and
8401 make the code more universal. Keep special processing for
8402 devfs, but use a simple rule for all other devices. If the
8403 device ends with a number, append 'p' and the partition number.
8404 Otherwise, append only the partition number.
8405
5786569b 84062008-05-30 Robert Millan <rmh@aybabtu.com>
8407
8408 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
8409 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
8410 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
8411 the `root' parameter to Linux.
8412
51500452 84132008-05-30 Robert Millan <rmh@aybabtu.com>
8414
8415 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
8416 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
8417 --fs_uuid with --fs-uuid.
8418 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
8419 all filesystems support them).
8420
811d3878 84212008-05-30 Robert Millan <rmh@aybabtu.com>
8422
8423 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 8424 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 8425
cab63c95 84262008-05-30 Robert Millan <rmh@aybabtu.com>
8427
8428 * util/grub.d/00_header.in: Remove obsolete comment referencing
8429 convert_system_path_to_grub_path().
8430 * util/update-grub.in: Likewise.
8431 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
8432 (convert_system_path_to_grub_path): Add a warning message explaining
8433 that this function is deprecated. Rely on is_path_readable_by_grub()
8434 for the readability checks.
8435 (font_path): Use is_path_readable_by_grub() for the readability
8436 check rather than convert_system_path_to_grub_path().
8437
972e2f7a 84382008-05-30 Robert Millan <rmh@aybabtu.com>
8439
8440 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
8441 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
8442 converting it first.
8443 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
8444 grub.cfg for access to font file, and afterwards call it again to set
8445 the root device.
8446
62191274 84472008-05-30 Robert Millan <rmh@aybabtu.com>
8448
8449 * commands/search.c (options): Add --fs_uuid option.
8450 (search_fs_uuid): New function.
8451 (grub_cmd_search): Fix --set argument passing.
8452 Use search_fs_uuid() when requested via --fs_uuid.
8453 (grub_search_init): Update help message.
8454 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
8455 and redeclare it as an array of 16-bit words.
8456 (grub_ext2_uuid): New function.
8457 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
8458 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
8459 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
8460 (GRUB_DEVICE_BOOT_UUID): New variables.
8461 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
8462 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
8463 whenever possible.
8464 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
8465 just assume `root' variable has the right value.
8466 * util/grub.d/10_linux.in: Likewise.
8467 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
8468 via PRINT_FS_UUID.
8469 (main): Recognise `-t fs_uuid' argument.
8470
01b73ec8 84712008-05-30 Robert Millan <rmh@aybabtu.com>
8472
8473 * util/biosdisk.c (map): Redefine structure to hold information
8474 about GRUB drive name.
fe6b695a 8475 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 8476 drive names.
8477 (call_hook): Remove.
8478 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
8479 member. Assume drive has partitions.
8480 (grub_util_biosdisk_open): Access device names via `.device' struct
8481 member.
8482 (open_device): Likewise.
8483 (find_drive): Likewise.
8484 (read_device_map): Adjust map[] usage to match the new struct
8485 definition. Don't check for duplicates (still possible, but not cheap
8486 anymore).
8487 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
8488 (make_device_name): Remove assumption of BIOS-like drive names.
8489
22f16596 84902008-05-30 Pavel Roskin <proski@gnu.org>
8491
8492 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
8493 compiling execute.c doesn't need grub_script.tab.h anymore.
8494 (normal/command.c_DEPENDENCIES): Likewise.
8495 (normal/function.c_DEPENDENCIES): Likewise.
8496 * conf/i386-ieee1275.rmk: Likewise.
8497 * conf/i386-linuxbios.rmk: Likewise.
8498 * conf/i386-pc.rmk: Likewise.
8499 * conf/powerpc-ieee1275.rmk: Likewise.
8500 * conf/sparc64-ieee1275.rmk: Likewise.
8501
528ad8f2 85022008-05-29 Pavel Roskin <proski@gnu.org>
8503
d1dff95d 8504 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
8505 when scanning metadata for volume group name.
8506
528ad8f2 8507 * include/grub/script.h: Don't include grub_script.tab.h. It's
8508 a generated file, which may only be included from the files with
8509 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
8510 use union YYSTYPE, as the later allows forward declaration.
8511 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
8512
47248e08 85132008-05-29 Robert Millan <rmh@aybabtu.com>
8514
8515 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
8516 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
8517 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
8518 (grub_console_checkkey): Add grub_dprintf() call to report unknown
8519 scan codes.
8520
ee632529 85212008-05-29 Robert Millan <rmh@aybabtu.com>
8522
8523 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
8524 control key combinations.
8525
eee96e08 85262008-05-29 Robert Millan <rmh@aybabtu.com>
8527
8528 * util/powerpc/ieee1275/grub-install.in: Move from here ...
8529 * util/ieee1275/grub-install.in: ... to here.
8530 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
8531 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
8532 (grub_install_SOURCES): Likewise.
8533
da9a6a94 85342008-05-29 Robert Millan <rmh@aybabtu.com>
8535
8536 * fs/affs.c: Update copyright year.
8537 * fs/ext2.c: Likewise.
8538 * fs/fshelp.c: Likewise.
8539 * fs/hfsplus.c: Likewise.
8540 * fs/ntfs.c: Likewise.
8541 * fs/xfs.c: Likewise.
8542 * include/grub/fshelp.h: Likewise.
8543 * util/grub-mkdevicemap.c: Likewise.
8544
12e65f3a 85452008-05-28 Robert Millan <rmh@aybabtu.com>
8546
8547 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
8548 might need to be fatfs to support some firmware implementations
8549 (e.g. OFW or EFI).
8550
23023641 85512008-05-28 Robert Millan <rmh@aybabtu.com>
8552
8553 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
8554 devices.
8555 * util/grub-mkdevicemap.c (get_mmc_disk_name)
8556 (make_device_map): Likewise.
8557
887d2619 85582008-05-20 Bean <bean123ch@gmail.com>
8559
8560 * fs/fshelp.c (grub_fshelp_map_block): New function.
8561 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
8562 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
8563
8564 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
8565 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
8566 (grub_fshelp_journal): New structure.
8567 (grub_fshelp_map_block): New function prototype.
8568 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
8569 (grub_fshelp_map_block): Likewise.
8570
8571 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
8572 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
8573 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
8574 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
8575 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
8576 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
8577 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
8578 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
8579 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
8580 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
8581 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
8582 (grub_ext2_sblock): New members for journal support.
8583 (grub_ext3_journal_header): New structure.
8584 (grub_ext3_journal_revoke_header): Likewise.
8585 (grub_ext3_journal_block_tag): Likewise.
8586 (grub_ext3_journal_sblock): Likewise.
8587 (grub_fshelp_node): New members logfile and journal.
8588 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
8589 grub_fshelp_map_block to get real block number.
8590 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
8591 number.
8592 (grub_ext2_read_inode): Likewise.
8593 (grub_ext3_get_journal): New function.
8594 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
8595 (grub_ext2_close): Release memory used by journal.
8596
8597 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
8598 (REISERFS_MAGIC_DESC_BLOCK): New macro.
8599 (grub_reiserfs_transaction_header): Renamed to
8600 grub_reiserfs_description_block, replace field data with real_blocks.
8601 (grub_reiserfs_commit_block): New structure.
8602 (grub_reiserfs_data): New member journal.
8603 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
8604 number.
8605 (grub_reiserfs_read_symlink): Likewise.
8606 (grub_reiserfs_iterate_dir): Likewise.
8607 (grub_reiserfs_open): Likewise.
8608 (grub_reiserfs_read): Likewise.
8609 (grub_reiserfs_get_journal): New function.
8610 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
8611 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
8612 using grub_reiserfs_get_journal.
8613 (grub_reiserfs_close): Release memory used by journal.
8614
8615 * fs/affs.c (grub_affs_read_block): Change block type to
8616 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
8617
8618 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
8619
8620 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
8621
8622 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
8623
8624 * fs/udf.c (grub_udf_read_block): Change block type to
8625 grub_disk_addr_t. Use type cast to avoid warning.
8626
8627 * fs/xfs.c (grub_xfs_read_block): Likewise.
8628
b7c6bed5 86292008-05-16 Christian Franke <franke@computer.org>
8630
8631 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
8632 to ensure that break with ESC will always work.
8633 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
8634 Remove ESC from keyboard queue.
8635
eedf167f 86362008-05-16 Christian Franke <franke@computer.org>
8637
8638 * util/biosdisk.c: [__CYGWIN__] Add includes.
8639 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
8640 (get_os_disk): Move variable declarations to OS specific
8641 parts to avoid warning.
8642 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
8643 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
8644 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
8645 Cygwin.
8646 * util/getroot.c: [__CYGWIN__] Add includes.
8647 (strip_extra_slashes): Fix "/" case.
8648 [__CYGWIN__] (get_win32_path): New function.
8649 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
8650 [__CYGWIN__] (find_root_device): Disable.
8651 [__CYGWIN__] (get_bootsec_serial): New function.
8652 [__CYGWIN__] (find_cygwin_root_device): Likewise.
8653 [__linux__] (grub_guess_root_device): Add early returns to simplify
8654 structure.
8655 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
8656 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
8657 check for Linux only.
8658
a079699e 86592008-05-15 Bean <bean123ch@gmail.com>
8660
8661 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
8662 keyboard hang problem in apple's intel mac.
8663
1cf4059a 86642008-05-09 Robert Millan <rmh@aybabtu.com>
8665
8666 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
8667 devices.
8668 * util/grub-mkdevicemap.c (get_virtio_disk_name)
8669 (make_device_map): Likewise.
8670 Reported by Aurelien Jarno <aurel32@debian.org>
8671
ed759390 86722008-05-07 Ian Campbell <ijc@hellion.org.uk>
8673
8674 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
8675 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
8676 (make_device_map): Output entries for xvd type disks.
8677
b56c4eaa 86782008-05-07 Robert Millan <rmh@aybabtu.com>
8679
8680 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
8681 devices.
8682 * util/grub-mkdevicemap.c (get_cciss_disk_name)
8683 (make_device_map): Likewise.
8684 Reported by Roland Dreier <rdreier@cisco.com>
8685
7f8866ed 86862008-05-07 Robert Millan <rmh@aybabtu.com>
8687
8688 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
8689 grub_strstr() call. Correct a few mistakes in failure path handling.
8690
b0346e0f 86912008-05-06 Robert Millan <rmh@aybabtu.com>
8692
8693 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8694 Do not print a trailing slash (therefore, the root directory is an
8695 empty string).
8696 (convert_system_path_to_grub_path): Do not remove trailing slash
8697 from make_system_path_relative_to_its_root() output.
8698
8699 * util/i386/pc/grub-install.in: Add trailing slash to output from
8700 make_system_path_relative_to_its_root().
8701
6cf12cbd 87022008-05-06 Robert Millan <rmh@aybabtu.com>
8703
8704 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
8705 ensures that output lines aren't intermangled with those sent to
8706 stderr (via grub_util_info()).
8707 * util/grub-probe.c (grub_refresh): Likewise.
8708 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8709
0fbb3117 87102008-05-05 Christian Franke <franke@computer.org>
8711
8712 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
8713 Add Cygwin device names.
8714 (get_ide_disk_name) [__CYGWIN__]: Likewise.
8715 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
8716 (check_device): Return error instead of success on empty name.
8717 (make_device_map): Move label inside linux specific code to
8718 prevent compiler warning.
8719
8124cdb7 87202008-04-30 Robert Millan <rmh@aybabtu.com>
8721
8722 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
8723 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
8724 first boot option.
8725 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
8726
094c01d0 87272008-04-29 Robert Millan <rmh@aybabtu.com>
8728
8729 * docs/grub.cfg: New file (example GRUB configuration).
8730
f4b1fc02 87312008-04-26 Robert Millan <rmh@aybabtu.com>
8732
329ce2a5 8733 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
8734 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
8735 and `disk/ieee1275/nand.c'.
f4b1fc02 8736
25f16ec1 87372008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 8738
25f16ec1 8739 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
8740 i386-linuxbios.
8741
8742 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8743 change the buffer size to 4096 for cdrom device.
8744
8745 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8746 and nand.mod.
8747 (_linux_mod_SOURCES): New variable.
8748 (_linux_mod_CFLAGS): Likewise.
8749 (_linux_mod_LDFLAGS): Likewise.
8750 (linux_mod_SOURCES): Likewise.
8751 (linux_mod_CFLAGS): Likewise.
8752 (linux_mod_LDFLAGS): Likewise.
8753 (nand_mod_SOURCES): Likewise.
8754 (nand_mod_CFLAGS): Likewise.
8755 (nand_mod_LDFLAGS): Likewise.
8756
8757 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8758 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8759 type property. (nand device in olpc don't have this property)
8760
8761 * include/grub/disk.h (grub_disk_dev_id): New macro
8762 GRUB_DISK_DEVICE_NAND_ID.
8763
8764 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8765 function prototype.
8766 (grub_rescue_cmd_initrd): Likewise.
8767
8768 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8769 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8770 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 8771
25f16ec1 8772 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8773 GRUB_MACHINE_IEEE1275 is defined.
8774
8775 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8776 Use NESTED_FUNC_ATTR attribute on the hook parameter.
8777
8778 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8779 on nested function heap_init.
8780 (grub_upper_mem): New variable for i386-ieee1275.
8781 (grub_get_extended_memory): New function for i386-ieee1275.
8782 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
8783
8784 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
8785 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
8786 property.
f19dbdb7 8787
25f16ec1 8788 * loader/i386/ieee1275/linux.c: New file.
8789
8790 * loader/i386/ieee1275/linux_normal.c: New file.
8791
8792 * disk/ieee1275/nand.c: New file.
8793
e89d61e9 87942008-04-18 Thomas Schwinge <tschwinge@gnu.org>
8795
8796 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8797 value.
8798 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8799
602566f6 88002008-04-18 Robert Millan <rmh@aybabtu.com>
8801
8802 Restructures early code path on ieee1275 to unify grub_main() as
8803 the first C function that is executed in every platform.
8804
8805 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8806 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8807 cmain().
8808 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8809 * kern/ieee1275/cmain.c (cmain): Rename to ...
8810 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8811 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8812 at the beginning.
8813
57490c2b 88142008-04-18 Robert Millan <rmh@aybabtu.com>
8815
8816 * util/update-grub.in: Fix syntax error when setting
8817 `GRUB_PRELOAD_MODULES'.
8818 Reported by Stephane Chazelas <stephane@artesyncp.com>
8819
1977517d 88202008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
8821
8822 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8823 section into account, newer toolchains generate unique build ids
8824 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 8825 we want build ids to be preserved
1977517d 8826 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8827 far from other sections don't cause the raw binary images grow
8828 size
8829
bfb1f1a2 88302008-04-15 Robert Millan <rmh@aybabtu.com>
8831
8832 * disk/lvm.c: Update copyright year.
8833 * kern/misc.c: Likewise.
8834
01979850 88352008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8836
8837 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 8838 there is no memory left for physical volume name.
01979850 8839
0a1150e2 88402008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
8841
8842 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8843 volume name mapping to support bigger than 9 character names properly.
8844
82ead3fe 88452008-04-13 Robert Millan <rmh@aybabtu.com>
8846
8847 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8848 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8849
e54a72f5 88502008-04-13 Christian Franke <franke@computer.org>
8851
8852 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8853 to create a floppy emulation boot CD when non emulation mode
8854 does not work.
8855 Enable Joliet CD filesystem extension.
8856
9fe86034 88572008-04-13 Robert Millan <rmh@aybabtu.com>
8858
8859 * kern/misc.c (grub_strncat): Fix off-by-one error.
8860 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8861
8862 * kern/env.c (grub_env_context_close): Clear current context, not
8863 previous one.
8864 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8865
8866 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8867
7ceeee39 88682008-04-13 Robert Millan <rmh@aybabtu.com>
8869
8870 Improve robustness when handling LVM.
8871
8872 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 8873 (and leave `*p' unmodified).
7ceeee39 8874 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8875 through it.
8876 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8877 iterating through it.
8878 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8879 through it.
fe6b695a 8880 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 8881 when due) on each grub_lvm_getvalue() or grub_strstr() call.
8882 Don't assume `vg->pvs != NULL' when iterating through it.
8883
58cd3d85 88842008-04-13 Robert Millan <rmh@aybabtu.com>
8885
8886 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8887 * genmk.rb (partmap): New variable.
8888 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8889 (#{partmap}): New target rule.
8890 * genpartmaplist.sh: New file.
8891 * Makefile.in (pkglib_DATA): Add partmap.lst.
8892 (partmap.lst): New target rule.
8893 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8894 modules (including all partition maps), instead of preloading them.
8895
78b51059 88962007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
8897
8898 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8899 `linux-boot-prober' (if installed) to detect other operating
8900 systems which are installed on the computer and add them to
8901 the boot menu.
8902 * conf/common.rmk: Build and install 30_os-prober.
8903
a91627b4 89042008-04-12 Robert Millan <rmh@aybabtu.com>
8905
8906 * kern/powerpc/ieee1275/init.c: Move from here ...
8907 * kern/ieee1275/init.c: ... to here. Update all users.
8908
8909 * kern/powerpc/ieee1275/cmain.c: Move from here ...
8910 * kern/ieee1275/cmain.c: ... to here. Update all users.
8911
8912 * kern/powerpc/ieee1275/openfw.c: Move from here ...
8913 * kern/ieee1275/openfw.c: ... to here. Update all users.
8914
8915 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8916 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
8917
322562ea 89182008-04-10 Pavel Roskin <proski@gnu.org>
8919
8920 * configure.ac: Always use "_cv_" in cache variables for
8921 compatibility with Autoconf 2.62.
8922
a02a73c5 89232008-04-07 Robert Millan <rmh@aybabtu.com>
8924
8925 Revert grub/machine/init.h addition by Pavel (since it breaks on
8926 i386-ieee1275 and others):
8927 * util/i386/pc/misc.c: Remove grub/machine/init.h.
8928 * util/powerpc/ieee1275/misc.c: Likewise.
8929
25c024b1 89302008-04-07 Robert Millan <rmh@aybabtu.com>
8931
8932 * util/grub-probe.c (probe): Improve error message.
8933
3cbd2f98 89342008-04-07 Robert Millan <rmh@aybabtu.com>
8935
8936 * util/biosdisk.c (read_device_map): Skip devices that don't exist
8937 (this prevents the presence of a bogus entry from ruining the whole
8938 thing).
8939
87a297bf 89402008-04-06 Pavel Roskin <proski@gnu.org>
8941
36747a62 8942 * util/biosdisk.c: Include grub/util/biosdisk.h.
8943 * util/grub-fstest.c (execute_command): Make static.
8944 * util/grub-mkdevicemap.c (check_device): Likewise.
8945 * util/i386/pc/misc.c: Include grub/machine/init.h.
8946 * util/powerpc/ieee1275/misc.c: Likewise.
8947 * util/lvm.c: Include grub/util/lvm.h.
8948 * util/misc.c: Include grub/kernel.h, grub/misc.h and
8949 grub/cache.h.
8950 * util/raid.c: Include grub/util/raid.h.
8951 (grub_util_getdiskname): Make static.
8952
87a297bf 8953 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8954 grub_hostfs_fini(), as they are called from grub_init_all() and
8955 grub_fini_all() respectively. This fixes an infinite loop in
8956 grub-fstest due to double registration of hostfs.
8957 Reported by Christian Franke <Christian.Franke@t-online.de>
8958
f6ce7629 89592008-04-05 Pavel Roskin <proski@gnu.org>
8960
8961 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8962 all 8 functions. Otherwise, probe function 0 only.
8963
070e49e4 89642008-04-04 Pavel Roskin <proski@gnu.org>
8965
8b088a4c 8966 * commands/lspci.c (grub_lspci_iter): Print the bus number
8967 correctly.
8968
4f657021 8969 * commands/lspci.c (grub_pci_classes): Fix typos.
8970 (grub_lspci_iter): Don't print func twice. Print vendor ID
8971 before device ID, as it's normally done.
8972
070e49e4 8973 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8974 Fix signedness warnings.
8975 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8976 Likewise.
8977 * util/ieee1275/get_disk_name.c: Include config.h so that
8978 _GNU_SOURCE is defined and getline() is declared. Mark an
8979 unused argument as such. Fix a signedness warning.
8980
ba7328dc 89812008-04-02 Pavel Roskin <proski@gnu.org>
8982
26887f22 8983 * genkernsyms.sh.in: Use more robust assignments for CC and
8984 srcdir. Quote srcdir.
8985 * gensymlist.sh.in: Likewise. Assert at the compile time that
8986 the symbol table is not empty.
8987
ba7328dc 8988 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8989 * fs/cpio.c (grub_cpio_read): Likewise.
8990
0f582c6b 89912008-04-01 Pavel Roskin <proski@gnu.org>
8992
4b6e1995 8993 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8994 * disk/host.c (grub_host_open): Likewise.
8995 * disk/loopback.c (grub_loopback_open): Likewise.
8996 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8997 disk->id as in disk/host.c, not a multi-character constant.
8998
828a2768 8999 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
9000 later is obsolete, potentially dangerous and sets a bad example.
9001 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
9002 * util/misc.c (grub_util_get_image_size): Likewise.
9003
2bb4fb47 9004 * disk/loopback.c (options): Improve help for "--partitions".
9005
0f582c6b 9006 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
9007 options to align them with the short options, e.g. "echo -e".
9008
a33224e0 90092008-03-31 Bean <bean123ch@gmail.com>
9010
9011 * video/reader/png.c (grub_png_data): New member is_16bit and
9012 image_data.
9013 (grub_png_decode_image_header): Detect 16 bit png image.
9014 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
9015 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
9016 (grub_video_reader_png): Release memory occupied by image_data.
9017
9018 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
9019 4096 bytes.
9020 (grub_nfs_mount): Skip the test for sector per cluster.
9021
9022 * include/grub/ntfs.h (MAX_SPC): Removed.
9023
86cb4f54 90242008-03-31 Bean <bean123ch@gmail.com>
9025
9026 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
9027 (grub_probe_SOURCES): Add fs/afs.c.
9028 (grub_fstest_SOURCES): Likewise.
9029 (afs_mod_SOURCES): New variable.
9030 (afs_mod_CFLAGS): Likewise.
9031 (afs_mod_LDFLAGS): Likewise.
9032
9033 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
9034 (grub_emu_SOURCES): Likewise.
9035
9036 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9037
9038 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9039
9040 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9041
9042 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9043
9044 * fs/afs.c: New file.
9045
17c74c21 90462008-03-30 Pavel Roskin <proski@gnu.org>
9047
4cb68e89 9048 * disk/host.c: Include grub/misc.h to fix a warning.
9049 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
9050 warnings about implicit declarations.
9051
8790bb04 9052 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
9053 variable.
9054 * include/grub/i386/loader.h: Change declaration of
9055 grub_linux_boot() to match what grub_loader_set() expects.
9056 * util/getroot.c (grub_guess_root_device): Return const char* to
9057 fix a warning.
9058 * util/grub-probe.c (probe): Fix a warning about uninitialized
9059 abstraction_name variable.
9060 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
9061 second argument as unused to fix a warning.
9062
9a3f3296 9063 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
9064 missing grub_error() call.
9065
0ecef90d 9066 * util/update-grub_lib.in: Define datarootdir, since Autoconf
9067 2.60 and newer uses it to define datadir.
9068
0bf6d401 9069 * commands/sleep.c: Fix warning about implicit declaration.
9070 * disk/memdisk.c: Likewise.
9071 * loader/aout.c: Likewise.
9072 * loader/i386/bsd_normal.c: Likewise.
9073 * util/grub-probe.c: Likewise.
9074
7cdacf97 9075 * commands/i386/cpuid.c (has_longmode): Make static.
9076 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
9077 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
9078
17c74c21 9079 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
9080 GDT. This is more robust, as %ds can change.
9081 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
9082 calling real_to_prot().
9083 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
9084
80a3e68b 90852008-03-28 Pavel Roskin <proski@gnu.org>
9086
9087 * kern/i386/pc/startup.S: Assert that uncompressed functions
9088 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
9089 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
9090 code, as they push parts of the code (error handlers) beyond
9091 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
9092 code as correctness and size.
9093
77bcd272 90942008-03-28 Pavel Roskin <proski@gnu.org>
9095
9096 * kern/i386/pc/startup.S
9097 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
9098 data block address to the real mode, keep offset minimal. This
9099 works around a bug in AWARD BIOS on old Athlon systems, which
9100 makes CD detection hang.
9101
c5dfd43b 91022008-03-26 Pavel Roskin <proski@gnu.org>
9103
9104 * normal/color.c (grub_parse_color_name_pair): Make `name' a
9105 const.
9106 * include/grub/normal.h: Add grub_parse_color_name_pair()
9107 declaration.
9108
bf962df2 91092008-03-24 Bean <bean123ch@gmail.com>
9110
9111 * disk/i386/pc/biosdisk.c (cd_start): Removed.
9112 (cd_count): Removed.
9113 (cd_drive): New variable.
9114 (grub_biosdisk_get_drive): Don't check for (cdN) device.
9115 (grub_biosdisk_call_hook): Likewise.
9116 (grub_biosdisk_iterate): Change cdrom detection method.
9117 (grub_biosdisk_open): Replace cd_start with cd_drive.
9118 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
9119 detect cdrom device.
9120
9121 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
9122 Removed.
9123 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
9124 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
9125 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
9126 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
9127 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
9128 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
9129 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
9130 (grub_biosdisk_cdrp): New structure.
9131 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
9132
9133 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
9134
9135 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
9136 device.
9137
9138 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
9139 New function.
9140
68e7fc7a 91412008-03-20 Robert Millan <rmh@aybabtu.com>
9142
9143 Remove 2 TiB limit in ata.mod.
9144 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
9145 (grub_ata_dumpinfo): Print sector count with 0x%llx.
9146 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
9147 grub_uint64_t instead of grub_uint32_t.
9148
38ad2cf5 91492008-03-05 Bean <bean123ch@gmail.com>
9150
9151 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
9152 (grub_multiboot): Set boot device.
9153
9154 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
9155
2b89344e 91562008-03-02 Bean <bean123ch@gmail.com>
9157
9158 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
9159 symlink_buffer.
9160
87a95d1f 91612008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
9162
9163 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
9164 texinfo.tex.
9165
9166 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
9167 modified.
9168
9169 * docs/fdl.texi: New file.
f19dbdb7 9170
87a95d1f 9171 * docs/mdate-sh: New file. Copied from gnulib.
9172 * docs/texinfo.tex: Likewise.
9173
9174 * config.guess: Updated from gnulib.
9175 * install-sh: Likewise.
9176
7dc15d8e 91772008-02-28 Robert Millan <rmh@aybabtu.com>
9178
9179 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
9180 (aout_mod_SOURCES): New variable.
9181 (aout_mod_CFLAGS): Likewise.
9182 (aout_mod_LDFLAGS): Likewise.
9183
9184 * conf/i386-ieee1275.rmk: Likewise.
9185
b00ab696 91862008-02-28 Robert Millan <rmh@aybabtu.com>
9187
9188 * util/update-grub.in: Reorganise terminal validity check. Accept
9189 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
9190 Based on suggestion by Franklin PIAT.
9191
79ca2d78 91922008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
9193
9194 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
9195 function.
9196 * util/getroot.c (grub_util_check_block_device): New function that
9197 returns the given argument if it is a block device and returns NULL else.
9198 * util/grub-probe.c (argument_is_device): New variable.
9199 (probe): Promote device_name from a variable to an argument. Receive
9200 device_name from grub_util_check_block_device() if path is NULL and from
9201 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 9202 (options): Introduce new parameter '-d, --device'.
79ca2d78 9203 (main): Add description of the new parameter to the help screen.
9204 Rename path variable to argument. Set argument_is_device if the '-d'
9205 option is given. Pass argument to probe() depending on
9206 argument_is_device.
9207
0d16e571 92082008-02-24 Bean <bean123ch@gmail.com>
9209
9210 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
9211 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
9212 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
9213 (GRUB_ISO9660_VOLDESC_PART): Likewise.
9214 (GRUB_ISO9660_VOLDESC_END): Likewise.
9215 (grub_iso9660_primary_voldesc): New member escape.
9216 (grub_iso9660_data): New member joliet.
9217 (grub_iso9660_convert_string): New function.
9218 (grub_iso9660_mount): Detect joliet extension.
9219 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
9220 (grub_iso9660_iso9660_label): Likewise.
9221
9222 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
9223 (grub_setup_SOURCES): Add fs/udf.c.
9224 (grub_fstest_SOURCES): Likewise.
9225 (udf_mod_SOURCES): New variable.
9226 (udf_mod_CFLAGS): Likewise.
9227 (udf_mod_LDFLAGS): Likewise.
9228
9229 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
9230 (grub_emu_SOURCES): Likewise.
9231
9232 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9233
9234 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9235
9236 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9237
9238 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9239
9240 * fs/udf.c: New file.
9241
8a594a17 92422008-02-24 Robert Millan <rmh@aybabtu.com>
9243
9244 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
9245 (normal/lexer.c_DEPENDENCIES): New variables.
9246 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9247 (normal/lexer.c_DEPENDENCIES): Likewise.
9248 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
9249 (normal/lexer.c_DEPENDENCIES): Likewise.
9250 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
9251 (normal/lexer.c_DEPENDENCIES): Likewise.
9252 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9253 (normal/lexer.c_DEPENDENCIES): Likewise.
9254 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9255 (normal/lexer.c_DEPENDENCIES): Likewise.
9256
2dc33c03 92572008-02-23 Robert Millan <rmh@aybabtu.com>
9258
9259 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
9260 since they were intended to be in hex. This didn't break previously
9261 because of a bug in gpt_partition_map_iterate() (see below).
9262
9263 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
9264 when checking the validity of GPT header.
9265 Remove `partno', since it always provides the same information as `i'.
9266
f6f4cfb0 92672008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
9268
9269 * include/grub/efi/time.h: Fix a wrong comment.
9270
79ff665f 92712008-02-19 Pavel Roskin <proski@gnu.org>
9272
9273 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
9274 message.
9275
d38e24c2 92762008-02-19 Bean <bean123ch@gmail.com>
9277
9278 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
9279 (aout_mod_SOURCES): New variable.
9280 (aout_mod_CFLAGS): Likewise.
9281 (aout_mod_LDFLAGS): Likewise.
9282 (_bsd_mod_SOURCES): New variable.
9283 (_bsd_mod_CFLAGS): Likewise.
9284 (_bsd_mod_LDFLAGS): Likewise.
9285 (bsd_mod_SOURCES): New variable.
9286 (bsd_mod_CFLAGS): Likewise.
9287 (bsd_mod_LDFLAGS): Likewise.
9288
9289 * include/grub/aout.h: New file.
9290
9291 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
9292
9293 * include/grub/i386/bsd.h: New file.
9294
9295 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
9296 to make it public.
9297
9298 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
9299 function is called, so that it's possible to change it inside the hook.
9300 (grub_elf64_load): Likewise.
9301 (grub_elf_file): Don't close the file if elf header is not found.
9302 (grub_elf_close): Close the file if grub_elf_file fails (The new
9303 grub_elf_file won't close it).
9304 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
9305 (grub_elf64_size): Likewise.
9306
9307 * kern/i386/loader.S (grub_unix_real_boot): New function.
9308
9309 * loader/aout.c: New file.
9310
9311 * loader/i386/bsd.c: New file.
9312
9313 * loader/i386/bsd_normal.c: New file.
9314
9315 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
9316
9317 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 9318 can test other formats.
d38e24c2 9319
b93bdb0f 93202008-02-19 Robert Millan <rmh@aybabtu.com>
9321
9322 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
9323 (grub_gpt_partition_type_empty): Redefine with macro from
9324 `<grub/gpt_partition.h>'.
9325 (gpt_partition_map_iterate): Adjust partition type comparison.
9326
9327 Export `entry' as partmap-specific `part.data' struct.
9328 (grub_gpt_header, grub_gpt_partentry): Move from here ...
9329
9330 * include/grub/gpt_partition.h (grub_gpt_header)
9331 (grub_gpt_partentry): ... to here (new file).
9332
9333 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
9334
9335 (grub_gpt_partition_type_bios_boot): New const variable, defined
9336 with macro from `<grub/gpt_partition.h>'.
9337
9338 (setup): Replace `first_start' with `embed_region', which keeps
9339 track of the embed region (and is partmap-agnostic).
9340
9341 Replace find_first_partition_start() with find_usable_region(),
9342 which finds a usable region for embedding using partmap-specific
9343 knowledge (supports PC/MSDOS and GPT).
9344
9345 Fix all assumptions that the embed region start at sector 1, using
9346 `embed_region.start' from now on. Similarly, use `embed_region.end'
9347 rather than `first_start' to calculate available size.
9348
9349 In grub_util_info() message, replace "into after the MBR" with an
9350 indication of the specific sector our embed region starts at.
9351
66cb40f6 93522008-02-19 Robert Millan <rmh@aybabtu.com>
9353
9354 * DISTLIST: Replace `commands/ieee1275/halt.c' and
9355 `commands/ieee1275/reboot.c' with `commands/halt.c' and
9356 `commands/reboot.c'.
9357 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
9358 (halt_mod_SOURCES): Likewise.
9359 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
9360 (halt_mod_SOURCES): Likewise.
9361
b7202015 93622008-02-17 Christian Franke <franke@computer.org>
9363
9364 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
9365
32b0fc49 93662008-02-17 Robert Millan <rmh@aybabtu.com>
9367
9368 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
9369 set `first_start' to 0 for non-PC/MSDOS partition maps.
9370
aca63502 93712008-02-16 Robert Millan <rmh@aybabtu.com>
9372
9373 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
9374 do not assume partition map is PC/MSDOS before performing checks that
9375 are specific to that layout.
9376
0de8be86 93772008-02-13 Robert Millan <rmh@aybabtu.com>
9378
9379 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
9380 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
9381 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
9382
c3db8364 93832008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
9384
9385 * configure.ac: Only a cosmetic change on the handling of
9386 -fno-stack-protector.
9387
f714229e 93882008-02-12 Alexandre Boeglin <alex@boeglin.org>
9389
c3db8364 9390 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
9391 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
9392 reboot.c.
f714229e 9393 (grub_install_SOURCES): Add halt.mod and reboot.mod.
9394 (halt_mod_SOURCES): New variable.
9395 (halt_mod_CFLAGS): Likewise.
9396 (halt_mod_LDFLAGS): Likewise.
9397 (reboot_mod_SOURCES): Likewise.
9398 (reboot_mod_CFLAGS): Likewise.
9399 (reboot_mod_LDFLAGS): Likewise.
9400
c3db8364 9401 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
9402 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
9403 reboot.c.
f714229e 9404 (halt_mod_SOURCES): Likewise.
9405 (reboot_mod_SOURCES): Likewise.
9406
c3db8364 9407 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
9408 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 9409 (reboot_mod_SOURCES): Likewise.
9410
9411 * commands/i386/pc/reboot.c: merge this file ...
9412
9413 * commands/ieee1275/reboot.c: ... and this file ...
9414
9415 * commands/reboot.c: ... to this file.
c3db8364 9416 Add some precompiler directive to include the correct header for
9417 each machine.
f714229e 9418
9419 * commands/ieee1275/halt.c: move this file ...
9420
9421 * commands/halt.c: ... to here.
c3db8364 9422 Add some precompiler directive to include the correct header for
9423 each machine.
f714229e 9424
9425 * include/grub/efi/efi.h (grub_reboot): New function declaration.
9426 (grub_halt): Likewise.
9427
9428 * kern/efi/efi.c (grub_reboot): New function.
9429 (grub_halt): Likewise.
9430
c74493e0 94312008-02-12 Robert Millan <rmh@aybabtu.com>
9432
9433 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
9434 /dev (like it is done for /dev/mapper). This doesn't provide support
9435 for EVMS, but at least it is now easy to identify the problem when it
9436 arises.
9437
d0db4b04 94382008-02-11 Robert Millan <rmh@aybabtu.com>
9439
9440 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
9441 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
9442 comparing it with -1, not 0.
9443
bf748642 94442008-02-10 Robert Millan <rmh@aybabtu.com>
9445
9446 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
9447 `disk/lvm.c'.
9448 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9449 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
9450
9451 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
9452 `disk/lvm.c' to the end of the list.
9453 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9454 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9455
b5db202a 94562008-02-10 Robert Millan <rmh@aybabtu.com>
9457
9458 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
9459 grub_print_error() instead. This will let user know why we're entering
9460 rescue mode.
9461 Based on suggestions from Sam Morris.
9462
83abee31 94632008-02-10 Alexandre Boeglin <alex@boeglin.org>
9464
9465 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
9466 on remaining N args, instead of "--" arg N times.
9467
78d5a08b 94682008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
9469
9470 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
9471 (fill_with_default_glyph): Changed to use unknown_glyph for fill
9472 pattern for unknown glyphs.
9473
68807e5f 94742008-02-09 Robert Millan <rmh@aybabtu.com>
9475
9476 * configure.ac: Probe for `help2man'.
9477 * Makefile.in (builddir): New variable.
9478 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
9479 or otherwise add a few flags/options to it.
9480 (install-local): For every executable utility or script that is
9481 installed, invoke $(HELP2MAN) to install a manpage based on --help
9482 output.
9483
9484 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
9485 that it doesn't prevent --help from working in build tree.
9486
9487 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
9488 with `bug-grub@gnu.org'.
9489 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
9490 * util/update-grub.in (usage): New function.
9491 Implement proper argument check, with support for --help and --version
9492 (as well as existing -y).
9493
94942008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 9495
9496 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
9497 avoid overwriting previous output.
9498 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
9499
c1962162 95002008-02-09 Robert Millan <rmh@aybabtu.com>
9501
9502 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
9503 drawing the menu.
9504
3dac2e3f 95052008-02-09 Robert Millan <rmh@aybabtu.com>
9506
9507 * commands/sleep.c: New file.
9508 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
9509 (sleep_mod_SOURCES): New variable.
9510 (sleep_mod_CFLAGS): Likewise.
9511 (sleep_mod_LDFLAGS): Likewise.
9512
7a634e08 95132008-02-09 Robert Millan <rmh@aybabtu.com>
9514
9515 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
9516 situations in which we can deduce the RAID size and the superblock
9517 doesn't match it.
9518
b92f0c18 95192008-02-09 Robert Millan <rmh@aybabtu.com>
9520
9521 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
9522 and return a grub_diskmemberlist_t composed of LVM physical volumes.
9523 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
9524
9525 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
9526 and return a grub_diskmemberlist_t composed of physical array members.
9527 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
9528
9529 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
9530 prototype.
9531 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
9532 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
9533 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
9534
9535 * util/grub-probe.c (probe): Move partmap probing code from here ...
9536 (probe_partmap): ... to here.
9537 (probe): Use probe_partmap() once for the disk we're probing, and
9538 additionally, when such disk contains a memberlist() struct member,
9539 once for each disk that is contained in the structure returned by
9540 memberlist().
9541
91a4bf68 95422008-02-09 Robert Millan <rmh@aybabtu.com>
9543
9544 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
9545 environment variable to 'all' in order to obtain debug output from
9546 non-util/ code.
9547 * util/i386/pc/grub-setup.c (main): Likewise.
9548
a96f9caa 95492008-02-08 Robert Millan <rmh@aybabtu.com>
9550
9551 * disk/raid.c (grub_raid_scan_device): Check for
9552 `array->device[sb.this_disk.number]' rather than for
9553 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 9554 guaranteed to be accessible.
a96f9caa 9555
b37a9222 95562008-02-08 Robert Millan <rmh@aybabtu.com>
9557
9558 * disk/raid.c: Update copyright.
9559 * fs/cpio.c: Likewise.
9560 * include/grub/raid.h: Likewise.
9561 * loader/i386/pc/multiboot.c: Likewise.
9562 * util/hostfs.c: Likewise.
9563
5626aee1 95642008-02-08 Robert Millan <rmh@aybabtu.com>
9565
9566 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
9567 to a grub_disk_t array.
9568 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
9569 `device[x]'.
9570 (grub_raid_scan_device): Replace `device[x].name' accesses with
9571 `device[x]->name'. Simplify initialization of `array->device[x]'.
9572
554f0187 95732008-02-08 Robert Millan <rmh@aybabtu.com>
9574
9575 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
9576 grub_dprintf() calls.
9577 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
9578 error message.
9579
1ec8425d 95802008-02-07 Christian Franke <franke@computer.org>
9581
9582 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
9583 instead of fseek and ftell to support large files.
9584 (grub_hostfs_read): Likewise.
9585
f2156fda 95862008-02-07 Robert Millan <rmh@aybabtu.com>
9587
9588 Patch from Jeroen Dekkers.
9589 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 9590 failure, since successfully reading all array members might not be
f2156fda 9591 required.
9592
9216e0e7 95932008-02-06 Robert Millan <rmh@aybabtu.com>
9594
9595 * util/grub-probe.c (probe): Simplify partmap probing (with the
9596 assumption that the first word up to the underscore equals to
9597 the module name).
9598
b0dfd29a 95992008-02-06 Christian Franke <franke@computer.org>
9600
9601 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
9602 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
9603 last block of a cpio or tar stream.
9604 Check for "TRAILER!!!" instead of any empty data
9605 block to detect last block of a cpio stream.
9606 (grub_cpio_dir): Fix constness of variable np.
9607 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
9608 cpio or tar trailer is detected. This fixes a crash
9609 on open of a non existing file.
9610
c32865bf 96112008-02-05 Bean <bean123ch@gmail.com>
9612
9613 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
9614 address of entry.
9615 (grub_multiboot_load_elf64): Likewise.
9616 (grub_multiboot): Initialize mbi structure.
9617
9618 * util/grub-fstest.c: Don't include unused header file script.h.
9619
fe6b695a 9620 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 9621 of file.
9622 (grub_fstest_SOURCES): Likewise.
9623
409480b7 96242008-02-05 Robert Millan <rmh@aybabtu.com>
9625
9626 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
9627 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
9628 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
9629 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
9630
9631 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
9632 (translation_table): Replace hardcoded values with macros
9633 provided by `<grub/term.h>'.
9634
9635 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
9636 (keyboard_map): Correct/add a few values, with macros provided
9637 by `<grub/term.h>'.
9638 (keyboard_map_shift): Zero values that don't differ from their
9639 `keyboard_map' equivalents.
9640 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
9641 Discard the second scan code that is always sent by Caps lock.
9642 Only use `keyboard_map_shift' when it provides a non-zero value,
9643 otherwise fallback to `keyboard_map'.
9644
99fadbaa 96452008-02-04 Bean <bean123ch@gmail.com>
9646
9647 * Makefile.in (enable_grub_fstest): New variable.
9648
9649 * conf/common.rmk (grub_fstest_init.lst): New rule.
9650 (grub_fstest_init.h): Likewise.
9651 (grub_fstest_init.c): Likewise.
9652 (util/grub-fstest.c_DEPENDENCIES): New variable.
9653 (grub_fstest_SOURCES): Likewise.
9654
9655 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
9656
9657 * util/grub-fstest.c: New file.
9658
bf567c50 96592008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9660
9661 Make grub-setup handle a separate root device.
f19dbdb7 9662
bf567c50 9663 * util/i386/pc/grub-setup.c (setup): Always open the root device,
9664 so that the root device can be compared with the destination
9665 device.
9666 When embedding the core image, if the root and destination devices
9667 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
9668 0xFF.
9669 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 9670
9be6b98b 96712008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9672
9673 Add support for having a grub directory in a different drive. This
9674 is still only the data handling part.
f19dbdb7 9675
9be6b98b 9676 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
9677 (codestart): Save %dh in GRUB_ROOT_DRIVE.
9678 (grub_root_drive): New variable.
9679
9680 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
9681 instead of GRUB_BOOT_DRIVE to construct a device name. Set
9682 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
9683 as it was.
9684
9685 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
9686
9687 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
9688 macro.
9689 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
9690
9691 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
9692 is bogus, because PXE booting does not specify any drive
9693 correctly.
9694
9695 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
9696 am not sure if this is really correct.
9697
9698 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
9699 is always identical to the boot drive when booting from a CD.
9700
9701 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
9702 longer.
9703 (root_drive): New variable.
9704 (real_start): Unconditionally set %dh to ROOT_DRIVE.
9705 (setup_sectors): Push %dx right after popping it, because %dh will
9706 be modified later.
9707 (copy_buffer): Restore %dx.
9708
e0ca0677 97092008-02-03 Robert Millan <rmh@aybabtu.com>
9710
9711 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
9712 use `cdboot.img' for cdrom images.
9713
3b3f6629 97142008-02-03 Robert Millan <rmh@aybabtu.com>
9715
9716 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
9717 only setup gfxterm when `font' command has succeeded.
9718
d42b3672 97192008-02-03 Robert Millan <rmh@aybabtu.com>
9720
9721 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
9722 (grub_rescue_cmd_multiboot_loader)
9723 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
9724
fa370ea6 97252008-02-03 Pavel Roskin <proski@gnu.org>
9726
e0c5dacb 9727 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 9728 %edx and %esi from stack only after grub_gate_a20() is called.
9729 grub_gate_a20() clobbers %edx.
9730
f2a76e1d 97312008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9732
9733 * configure.ac (AC_INIT): Bumped to 1.96.
9734
9735 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
9736 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
9737 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
9738 video/readers/png.c.
9739
90fd32d1 97402008-02-03 Bean <bean123ch@gmail.com>
9be665dd 9741
9742 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9743 (cdboot_img_SOURCES): New variable.
9744 (cdboot_img_ASFLAGS): New variable.
9745 (cdboot_img_LDFLAGS): New variable.
9746
9747 * boot/i386/pc/cdboot.S: New file.
9748
9749 * disk/i386/pc/biosdisk.c (cd_start): New variable.
9750 (cd_count): Likewise.
9751 (grub_biosdisk_get_drive): Add support for cd device.
9752 (grub_biosdisk_call_hook): Likewise.
9753 (grub_biosdisk_iterate): Likewise.
9754 (grub_biosdisk_open): Likewise.
9755 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9756 (grub_biosdisk_rw): Support reading from cd device.
9757 (GRUB_MOD_INIT): Iterate cd devices.
9758
9759 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9760 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9761 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9762
9763 * kern/i386/pc/init.c (make_install_device): Check for cd device.
9764
4020aa53 97652008-02-02 Robert Millan <rmh@aybabtu.com>
9766
9767 * commands/read.c: New file.
9768 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9769 (read_mod_SOURCES): New variable.
9770 (read_mod_CFLAGS): Likewise.
9771 (read_mod_LDFLAGS): Likewise.
9772
e03a1132 97732008-02-02 Robert Millan <rmh@aybabtu.com>
9774
9775 * normal/main.c (grub_normal_execute): Check for `menu->size' when
9776 determining whether menu has to be displayed.
9777
58c69220 97782008-02-02 Marco Gerards <marco@gnu.org>
9779
9780 * bus/pci.c: New file.
9781
9782 * include/grub/pci.h: Likewise.
9783
9784 * include/grub/i386/pc/pci.h: Likewise.
9785
9786 * commands/lspci.c: Likewise.
9787
9788 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
9789 `lspci.mod'.
9790 (pci_mod_SOURCES): New variable.
9791 (pci_mod_CFLAGS): Likewise.
9792 (pci_mod_LDFLAGS): Likewise.
9793 (lspci_mod_SOURCES): Likewise.
9794 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 9795 (lspci_mod_LDFLAGS): Likewise.
58c69220 9796
c004e1b4 97972008-02-02 Bean <bean123ch@gmail.com>
9798
9799 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9800 (grub_ufs_get_file_block): Fix indirect block calculation problem.
9801
9802 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9803 (grub_xfs_btree_node): New structure.
9804 (grub_xfs_btree_root): New structure.
9805 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9806 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9807 (GRUB_XFS_EXTENT_BLOCK): Likewise.
9808 (GRUB_XFS_EXTENT_SIZE): Likewise.
9809 (grub_xfs_read_block): Support btree format type.
9810 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9811 Use directory block as basic unit.
9812
9813 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9814
9815 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9816 __attribute__ ((__regparm__ (1))).
9817
f95562bf 98182008-02-01 Robert Millan <rmh@aybabtu.com>
9819
9820 Correct a mistake in previous commit.
9821
9822 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9823 top.
9824 (normal/command.c_DEPENDENCIES): New variable.
9825
7d31f41f 98262008-02-01 Robert Millan <rmh@aybabtu.com>
9827
9828 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9829 top.
9830 (normal/command.c_DEPENDENCIES): New variable.
9831 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9832 * conf/i386-ieee1275.rmk: Likewise.
9833 * conf/i386-linuxbios.rmk: Likewise.
9834 * conf/i386-pc.rmk: Likewise.
9835 * conf/sparc64-ieee1275.rmk: Likewise.
9836 * conf/powerpc-ieee1275.rmk: Likewise.
9837 (grub_emu_SOURCES): Add `fs/fshelp.c'.
9838
9839 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9840
60b6be74 98412008-02-01 Robert Millan <rmh@aybabtu.com>
9842
9843 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9844 call at beginning of function.
9845
078522ab 98462008-01-31 Pavel Roskin <proski@gnu.org>
9847
9848 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 9849 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9850 (grub_mkrescue_SOURCES): Likewise.
078522ab 9851 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9852
ccaa8a5f 98532008-01-30 Robert Millan <rmh@aybabtu.com>
9854
9855 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9856 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9857 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9858 (grub_probe_SOURCES): ... to here.
9859
9860 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9861 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9862 * conf/i386-ieee1275.rmk: Likewise.
9863 * conf/i386-linuxbios.rmk: Likewise.
9864 * conf/powerpc-ieee1275.rmk: Likewise.
9865
ae5a9cd7 98662008-01-30 Tristan Gingold <gingold@free.fr>
9867
9868 * kern/rescue.c: Silently accept empty lines.
9869
70bc2ef2 98702008-01-29 Bean <bean123ch@gmail.com>
9871
9872 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9873 (real_code_2): Code cleanup and change comment style.
9874 (move_memory): Avoid using 32-bit address mode.
9875
6a4d50ea 98762008-01-29 Bean <bean123ch@gmail.com>
9877
9878 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9879 (png_mod_SOURCES): New variable.
9880 (png_mod_CFLAGS): Likewise.
9881 (png_mod_LDFLAGS): Likewise.
9882
9883 * video/readers/png.c: New file.
9884
11cc30ac 98852008-01-28 Robert Millan <rmh@aybabtu.com>
9886
9887 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9888 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9889 `ifndef GRUB_MOD_GAP' hack.
9890 * util/elf/grub-mkimage.c (add_segments): Likewise.
9891
3abc589f 98922008-01-27 Robert Millan <rmh@aybabtu.com>
9893
9894 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9895 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 9896 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 9897
e1907778 98982008-01-27 Robert Millan <rmh@aybabtu.com>
9899
9900 Get grub-emu to build again (including parallel builds).
9901
9902 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9903 Split into ...
9904 (util/grub-emu.c_DEPENDENCIES): ... this, ...
9905 (normal/execute.c_DEPENDENCIES): ... this, ...
9906 (grub-emu_DEPENDENCIES): ... and this.
9907
9908 * conf/i386-efi.rmk: Likewise.
9909 * conf/i386-linuxbios.rmk: Likewise.
9910 * conf/i386-ieee1275.rmk: Likewise.
9911 * conf/powerpc-ieee1275.rmk: Likewise.
9912 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9913
2216b101 99142008-01-27 Robert Millan <rmh@aybabtu.com>
9915
9916 * NEWS: Add a few items.
9917
f75172d9 99182008-01-27 Robert Millan <rmh@aybabtu.com>
9919
9920 Fix parallel builds with grub-emu. Based on earlier commit for
9921 grub-probe and grub-setup.
9922
9923 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9924 (util/grub-emu.c_DEPENDENCIES): ... this.
9925 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9926 (util/grub-emu.c_DEPENDENCIES): ... this.
9927 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9928 (util/grub-emu.c_DEPENDENCIES): ... this.
9929 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9930 (util/grub-emu.c_DEPENDENCIES): ... this.
9931 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9932 (util/grub-emu.c_DEPENDENCIES): ... this.
9933
3f51de77 99342008-01-27 Pavel Roskin <proski@gnu.org>
9935
9936 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9937 to create a gap between _end and the modules added to the image
9938 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
9939 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9940 * util/elf/grub-mkimage.c (add_segments): Likewise.
9941
2033f53e 99422008-01-26 Pavel Roskin <proski@gnu.org>
9943
9944 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9945 just return an error.
9946
22da1f6f 99472008-01-26 Bean <bean123ch@gmail.com>
9948
9949 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9950 (grub_reiserfs_get_item): Save offset of the next item.
9951 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9952
2a9525e6 99532008-01-25 Robert Millan <rmh@aybabtu.com>
9954
9955 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9956 make all filesystem sources appear together (possibly fixing omissions
9957 while at it).
9958 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9959 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9960 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9961 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9962
9963 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
9964 add `kern/file.c'.
9965 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9966 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9967 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9968 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9969
9970 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9971 (probe): Add a sanity check to make sure of our ability to read
9972 requested files when probing for filesystem type.
9973
9974 * genmk.rb: Update copyright year (2007).
9975
9976 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9977 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9978 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9979 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9980 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9981 : Remove function prototypes.
9982
b95f71b5 99832008-01-25 Robert Millan <rmh@aybabtu.com>
9984
9985 Revert my previous commits (based on wrong assumption of how grub_errno
9986 works).
9987
fe6b695a 9988 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 9989 * kern/file.c (grub_file_open): Likewise.
9990
d08bbb49 99912008-01-24 Pavel Roskin <proski@gnu.org>
9992
9993 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9994 that hang if GRUB tries to setup colors.
9995 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9996 colors for firmwares that don't support it.
9997 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9998 Recognize Open Hack'Ware, set flags to work around its
9999 limitations.
10000
605e36ed 100012008-01-24 Robert Millan <rmh@aybabtu.com>
10002
10003 * kern/file.c (grub_file_open): Do not account previous failures of
10004 unrelated functions when grub_errno is checked for.
10005 Reported by Oleg Strikov.
10006
bac332a1 100072008-01-24 Bean <bean123ch@gmail.com>
10008
10009 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
10010 (grub_ufs_sblock): New member volume name.
10011 (grub_ufs_find_file): Fix string copy bug.
10012 (grub_ufs_label): Implement this function properly.
10013
10014 * fs/hfs.c (grub_hfs_cnid_type): New enum.
10015 (grub_hfs_iterate_records): Use the correct file number for extents
10016 and catalog file. Fix problem in next index calculation.
10017 (grub_hfs_find_node): Replace recursive function call with loop.
10018 (grub_hfs_iterate_dir): Replace recursive function call with loop.
10019
15c80c09 100202008-01-23 Robert Millan <rmh@aybabtu.com>
10021
10022 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
10023 `<grub/symbol.h>' and `<grub/multiboot.h>'.
10024 (grub_multiboot2_real_boot): New function prototype.
10025
10026 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
10027 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
10028
10029 * kern/i386/ieee1275/init.c (grub_os_area_addr)
10030 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
10031
305338fd 100322008-01-23 Robert Millan <rmh@aybabtu.com>
10033
10034 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
10035 #ifdef'ed out grub_printf().
10036
3ea52685 100372008-01-23 Robert Millan <rmh@aybabtu.com>
10038
10039 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
10040 grub_dprintf calls, since they make "debug=all" mode unusable.
10041 (grub_console_checkkey): Likewise.
10042
5882ae4b 100432008-01-23 Robert Millan <rmh@aybabtu.com>
10044
10045 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
10046 `term/i386/pc/at_keyboard.c'.
10047 (pkglib_MODULES): Add `serial.mod'.
10048 (serial_mod_SOURCES): New variable.
10049 (serial_mod_CFLAGS): Likewise.
10050 (serial_mod_LDFLAGS): Likewise.
10051
10052 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
10053 `<grub/powerpc/ieee1275/console.h>'.
10054 (grub_keyboard_controller_init): New function prototype.
10055 (grub_console_checkkey): Likewise.
10056 (grub_console_getkey): Likewise.
10057
10058 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
10059 keyboard on i386.
10060
10061 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
10062 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
10063
06ab5303 100642008-01-23 Robert Millan <rmh@aybabtu.com>
10065
10066 * kern/i386/pc/init.c (make_install_device): When memdisk image is
10067 present, "(memdisk)/boot/grub" becomes the default prefix.
10068
10069 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
10070 a memdisk tarball with all the modules. Add --overlay=DIR option that
10071 allows users to overlay additional files into the image.
10072
dbb475a4 100732008-01-23 Robert Millan <rmh@aybabtu.com>
10074
10075 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
10076 and `machine/memory.h'.
10077 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
10078 (_multiboot_mod_SOURCES): New variable.
10079 (_multiboot_mod_CFLAGS): Likewise.
10080 (_multiboot_mod_LDFLAGS): Likewise.
10081 (multiboot_mod_SOURCES): Likewise.
10082 (multiboot_mod_CFLAGS): Likewise.
10083 (multiboot_mod_LDFLAGS): Likewise.
10084
10085 * include/grub/i386/ieee1275/loader.h: New file.
10086
10087 * include/grub/i386/ieee1275/machine.h: Likewise.
10088
10089 * include/grub/i386/ieee1275/memory.h: Likewise.
10090
10091 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
10092 variable declaration.
10093 (grub_os_area_size): Likewise.
10094
10095 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
10096 (grub_lower_mem, grub_upper_mem): New variables.
10097 (grub_stop_floppy): New function (just to make
10098 grub_multiboot2_real_boot() happy).
10099
10100 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
10101 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
10102 (grub_stop): New function.
10103 Include `"../realmode.S"' and `"../loader.S"'.
10104
10105 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
10106 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
10107
10108 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
10109 rely on grub_multiboot2_real_boot() for final boot.
10110
25638629 101112008-01-22 Robert Millan <rmh@aybabtu.com>
10112
10113 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
10114 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
10115 device that doesn't look like an SD card.
10116 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10117 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
10118 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
10119 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
10120 found.
10121
9dad816d 101222008-01-22 Robert Millan <rmh@aybabtu.com>
10123
10124 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
10125 avoid claiming over our own code.
10126
34842f2d 101272008-01-22 Bean <bean123ch@gmail.com>
10128
10129 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
10130 (jpeg_mod_SOURCES): New variable.
10131 (jpeg_mod_CFLAGS): Likewise.
10132 (jpeg_mod_LDFLAGS): Likewise.
10133
10134 * video/readers/jpeg.c : New file.
10135
44023a28 101362008-01-22 Bean <bean123ch@gmail.com>
10137
10138 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
10139 there are no more items.
10140
bc2d8ac6 101412008-01-21 Robert Millan <rmh@aybabtu.com>
10142
10143 * kern/mm.c (grub_mm_init_region): Improve debug message.
10144
261bd4bc 101452008-01-21 Robert Millan <rmh@aybabtu.com>
10146
10147 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
10148 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
10149 address.
10150 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
10151 a C macro.
10152 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
10153 Indicates start of upper memory.
10154 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
10155 (generate_image): Abort when image size is big enough to corrupt
10156 upper memory.
10157
10158 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
10159 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
10160 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10161 instead of hardcoding 0xA0000.
10162 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
10163 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10164 instead of hardcoding 0xA0000.
10165
f970b55e 101662008-01-21 Robert Millan <rmh@aybabtu.com>
10167
10168 * disk/memdisk.c (memdisk_size): New variable.
10169 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
10170 `memdisk_size'.
10171 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
10172 image to dynamic memory.
10173 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
10174 `memdisk_size'. Free memdisk block.
10175
1a8b0526 101762008-01-21 Robert Millan <rmh@aybabtu.com>
10177
10178 Fix detection of very small filesystems (like tar).
10179
10180 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
10181 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
10182 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
10183 a problem with this disk).
10184
6e9b4aab 101852008-01-21 Robert Millan <rmh@aybabtu.com>
10186
10187 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
10188 on grub_biosdisk_rw_standard() error.
10189
0d8837b2 101902008-01-21 Robert Millan <rmh@aybabtu.com>
10191
10192 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
10193 recent changes.
10194 * kern/elf.c: Likewise.
10195 * kern/ieee1275/ieee1275.c: Likewise.
10196 * kern/powerpc/ieee1275/openfw.c: Likewise.
10197 * term/ieee1275/ofconsole.c: Likewise.
10198
ffd36e34 101992008-01-21 Robert Millan <rmh@aybabtu.com>
10200
10201 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
10202
3f0093d0 10203 * include/grub/kernel.h (grub_arch_memdisk_addr)
10204 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 10205
3f0093d0 10206 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
10207 (grub_arch_memdisk_size): ... to here.
ffd36e34 10208
6c391b21 102092008-01-21 Robert Millan <rmh@aybabtu.com>
10210
10211 Mostly based on bugfix from Bean.
10212
10213 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
10214 attribute with hook() parameter.
10215 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
10216 declaration.
10217 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
10218 attribute with hook() parameter.
10219 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
10220 declaration.
10221
55a581dc 102222008-01-21 Robert Millan <rmh@aybabtu.com>
10223
10224 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
10225 (pkglib_MODULES): Add `memdisk.mod'.
10226 (memdisk_mod_SOURCES): New variable.
10227 (memdisk_mod_CFLAGS): Likewise.
10228 (memdisk_mod_LDFLAGS): Likewise.
10229
10230 * disk/memdisk.c: New file.
10231
10232 * include/grub/disk.h (grub_disk_dev_id): Add
10233 `GRUB_DISK_DEVICE_MEMDISK_ID'.
10234
10235 * include/grub/i386/pc/kernel.h
10236 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
10237 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
10238 (grub_kernel_image_size): New variable declaration.
10239 (grub_total_module_size): Likewise.
10240 (grub_memdisk_image_size): Likewise.
10241
10242 * include/grub/i386/pc/memory.h
10243 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
10244
10245 * include/grub/kernel.h: Include `<grub/symbol.h>'.
10246 (grub_arch_memdisk_addr): New variable declaration.
10247 (grub_arch_memdisk_size): Likewise.
10248
10249 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
10250 (grub_arch_memdisk_size): Likewise.
10251
10252 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
10253 (codestart): Replace hardcoded `0x100000' with
10254 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
10255
10256 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
10257 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
10258 not NULL, append the contents of the file it refers to, at the end of
10259 the compressed kernel image. Initialize `grub_memdisk_image_size'
10260 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
10261 (options): Add "memdisk"|'m' option.
10262 (main): Parse --memdisk|-m option, and pass user-provided path as
10263 parameter to generate_image().
10264
3d7f54c9 102652008-01-20 Robert Millan <rmh@aybabtu.com>
10266
10267 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
10268 grub_dprintf() calls from here ...
10269 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
10270
0bf74728 102712008-01-20 Robert Millan <rmh@aybabtu.com>
10272
10273 Fix detection of "real mode" when /options/real-mode? doesn't exist.
10274
10275 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
10276 declaration.
10277 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
10278 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
10279 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 10280 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 10281 property).
10282 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
10283 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
10284
33bf70a7 102852008-01-19 Robert Millan <rmh@aybabtu.com>
10286
fe6b695a 10287 Get rid of confusing function (superseded by
33bf70a7 10288 `grub_ieee1275_get_integer_property')
10289 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
10290 prototype.
10291 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
10292 function.
10293 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
10294 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 10295 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 10296
e2da7d26 102972008-01-19 Robert Millan <rmh@aybabtu.com>
10298
10299 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
10300 command after "shut-down", since implementations differ on which
10301 the command for halt is.
10302
59f1fd8d 103032008-01-19 Robert Millan <rmh@aybabtu.com>
10304
10305 * include/grub/i386/linuxbios/console.h: Add header protection.
10306 (grub_keyboard_controller_init): New function prototype.
10307 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
10308 (KEYBOARD_COMMAND_READ): Likewise.
10309 (KEYBOARD_COMMAND_WRITE): Likewise.
10310 (KEYBOARD_SCANCODE_SET1): Likewise.
10311 (grub_keyboard_controller_write): New function.
10312 (grub_keyboard_controller_read): Likewise.
10313 (grub_keyboard_controller_init): Likewise.
10314
10315 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
10316 (grub_console_init): On coreboot/LinuxBIOS, call
10317 grub_keyboard_controller_init().
10318
5f5a7c15 103192008-01-19 Robert Millan <rmh@aybabtu.com>
10320
10321 PowerPC changes provided by Pavel Roskin.
10322
10323 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
10324 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
10325 don't rely on cmain() doing it.
10326 * kern/i386/ieee1275/startup.S (_start): Store %eax in
10327 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
10328
1210e168 103292008-01-16 Robert Millan <rmh@aybabtu.com>
10330
10331 * include/grub/i386/linuxbios/memory.h
10332 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
10333 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
10334 receive `table_header' as argument. Instead, probe for it in the
10335 known memory ranges where it can be present.
10336 (grub_available_iterate): Do not pass a fixed `table_header' address
10337 to grub_linuxbios_table_iterate().
10338
3d04eab8 103392008-01-15 Robert Millan <rmh@aybabtu.com>
10340
10341 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
10342 * conf/i386-ieee1275.rmk: New file.
10343 * include/grub/i386/ieee1275/console.h: Likewise.
10344 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
10345 * include/grub/i386/ieee1275/kernel.h: Likewise.
10346 * include/grub/i386/ieee1275/time.h: Likewise.
10347 * kern/i386/ieee1275/init.c: Likewise.
10348 * kern/i386/ieee1275/startup.S: Likewise.
10349
d1bc1b73 103502008-01-15 Robert Millan <rmh@aybabtu.com>
10351
10352 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
10353 when pointers are 32-bit (but still do set it to one when they are
10354 64-bit).
10355
66a65807 103562008-01-15 Robert Millan <rmh@aybabtu.com>
10357
10358 * include/grub/ieee1275/ieee1275.h
10359 (grub_ieee1275_get_integer_property): New function prototype.
10360
10361 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
10362 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 10363 grub_ieee1275_get_property() to handle endianness.
66a65807 10364
10365 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
10366 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 10367 where appropriate.
66a65807 10368 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
10369 (grub_map): Likewise.
10370 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
10371
a83ccafd 103722008-01-15 Bean <bean123ch@gmail.com>
10373
10374 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
10375 (grub_script_execute_cmdline): Reset grub_errno.
10376
10377 * normal/main.c (read_config_file): Reset grub_errno.
10378
10379 * normal/parse.y (script_init): New.
10380 (script): Move function and menuentry here.
10381 (delimiter): New.
10382 (command): Add delimiter at the end of command.
10383 (commands): Adjust to match the new command.
10384 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 10385 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 10386 (if): Use the new commands.
10387
10388 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
10389
df6ecfc6 103902008-01-15 Robert Millan <rmh@aybabtu.com>
10391
10392 * normal/menu.c (run_menu): Move timeout message from here ...
10393 (print_timeout): ... to here.
10394 (run_menu): Use print_timeout() once during initial draw to print
10395 the whole message, and again in every clock tick to update only
10396 the number of seconds.
10397
87ae25eb 103982008-01-15 Robert Millan <rmh@aybabtu.com>
10399
10400 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
10401 actual size of `available' from grub_ieee1275_get_property(), and
10402 restrict parsing to that bound.
10403
47bf09a4 104042008-01-15 Christian Franke <franke@computer.org>
10405
10406 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
10407 (argp_program_version): Remove variable.
10408 (argp_program_bug_address): Likewise.
10409 (options): Convert from struct argp_option to struct option.
10410 (struct arguments): Remove.
10411 (parse_opt): Remove.
10412 (usage): New function.
10413 (main): Replace struct args members by simple variables.
10414 Replace argp_parse() by getopt_long().
10415 Add switch to evaluate options.
10416 Add missing "(...)" around root_dev in prefix string.
10417
c86f1469 104182008-01-14 Robert Millan <rmh@aybabtu.com>
10419
10420 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
10421 for grub_ieee1275_exit(), in order to improve portability.
10422
e622c559 104232008-01-14 Robert Millan <rmh@aybabtu.com>
10424
10425 * util/grub.d/10_linux.in (prefix): Define.
10426 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
10427
44cb1ec8 104282008-01-13 Pavel Roskin <proski@gnu.org>
10429
10430 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
10431 grub_errno if no errors have been detected.
10432
1eb8c802 104332008-01-12 Robert Millan <rmh@aybabtu.com>
10434
10435 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
10436 (grub_util_get_dev_abstraction): New function prototype.
10437
10438 * util/getroot.c: Include `<grub/util/getroot.h>'
10439 (grub_util_get_grub_dev): Move detection of abstraction type to ...
10440 (grub_util_get_dev_abstraction): ... here (new function).
10441
10442 * util/grub-probe.c: Convert PRINT_* to an enum. Add
10443 `PRINT_ABSTRACTION'.
10444 (probe): Probe for abstraction type when requested.
10445 (main): Understand `--target=abstraction'.
10446
10447 * util/i386/efi/grub-install.in: Add abstraction module to core
10448 image when it is found to be necessary.
10449 * util/i386/pc/grub-install.in: Likewise.
10450 * util/powerpc/ieee1275/grub-install.in: Likewise.
10451
10452 * util/update-grub_lib.in (font_path): Return system path without
10453 converting to GRUB path.
10454 * util/update-grub.in: Convert system path returned by font_path()
10455 to a GRUB path. Use `grub-probe -t abstraction' to determine what
10456 abstraction module is needed for loading fonts (if any). Export
10457 that as `GRUB_PRELOAD_MODULES'.
10458 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
10459 insmod commands).
10460
52bd3de9 104612008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
10462
10463 Remove some unused code from reiserfs.
f19dbdb7 10464
52bd3de9 10465 * fs/reiserfs.c (struct grub_reiserfs_key)
10466 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
10467 (struct grub_reiserfs_node_body): Removed.
10468 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
10469 Likewise.
10470 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10471 Likewise.
10472 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10473 Likewise.
10474 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10475 Likewise.
10476 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
10477 Likewise.
10478 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
10479 Likewise.
10480 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10481 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10482 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10483
2f80039d 104842008-01-10 Robert Millan <rmh@aybabtu.com>
10485
10486 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
10487 Determines if a file is garbage left by packaging systems, etc.
10488 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
10489 for processing /etc/grub.d scripts.
10490 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
10491 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
10492 as a condition for processing Linux images.
10493
87888032 104942008-01-10 Pavel Roskin <proski@gnu.org>
10495
10496 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
10497 to compile reiserfs.c on PowerPC.
10498
7e54fced 104992008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 10500
10501 * kern/device.c (grub_device_iterate): Do not abort device iteration
10502 when one of the devices cannot be opened.
10503 * kern/disk.c (grub_disk_open): Do not account previous failures of
10504 unrelated functions when grub_errno is checked for.
10505
5aa541e6 105062008-01-08 Robert Millan <rmh@aybabtu.com>
10507
10508 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
10509 `! grub_linux_is_bzimage', change order of address comparison to make
10510 it more intuitive, and improve "too big zImage" error message.
10511
7076340d 105122008-01-08 Robert Millan <rmh@aybabtu.com>
10513
10514 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
10515 `$(update-grub_DATA)'.
10516 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
10517 targets.
10518
9ca70333 105192008-01-07 Robert Millan <rmh@aybabtu.com>
10520
10521 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
10522 which instruction is modified by grub-setup during installation
10523 (since it wasn't obvious by only looking at this file).
10524
38ccf575 105252008-01-07 Robert Millan <rmh@aybabtu.com>
10526
10527 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
10528 listing actual TODO items.
10529
f5db4291 105302008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10531
868967cf 10532 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
10533 correctly.
10534 (grub_reiserfs_get_key_offset): Likewise.
10535 (grub_reiserfs_set_key_offset): Likewise.
10536 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 10537 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 10538
10539 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
10540 better to remove the bitfield version completely.
f19dbdb7 10541
868967cf 105422008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 10543
f5db4291 10544 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
10545 allocated from the heap, due to the fshelp implementation.
10546 (grub_reiserfs_dir): Free NODE, due to the same reason.
10547
492e6d9d 105482008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10549
10550 Mostly from Vincent Pelletier:
f19dbdb7 10551
492e6d9d 10552 * fs/reiserfs.c: New file.
f19dbdb7 10553
492e6d9d 10554 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
10555 (reiserfs_mod_SOURCES): New variable.
10556 (reiserfs_mod_CFLAGS): Likewise.
10557 (reiserfs_mod_LDFLAGS): Likewise.
10558
10559 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
10560 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
10561 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
10562 normal/color.c.
10563
9ce3e7c1 105642008-01-06 Robert Millan <rmh@aybabtu.com>
10565
10566 * normal/color.c: Remove `<grub/env.h>'.
10567
f3b58148 105682008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
10569
10570 * include/grub/normal.h: Include <grub/env.h>.
10571
7ac3bcfa 105722008-01-05 Robert Millan <rmh@aybabtu.com>
10573
10574 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
10575 usage example with `(hd0,1)'.
fb358190 10576 Reported by Samuel Thibault.
7ac3bcfa 10577
c8ee99d7 105782008-01-05 Robert Millan <rmh@aybabtu.com>
10579
10580 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
10581 (grub_linux_boot_zimage): Rename to ...
10582 (grub_linux_boot): ... this.
10583 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
10584 (grub_linux_boot_zimage): Conditionalize zImage copy.
10585
10586 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
10587 (grub_linux_boot_bzimage): Remove prototype.
10588 (grub_linux_boot_zimage): Rename to ...
10589 (grub_linux_boot): ... this.
10590
10591 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
10592 (grub_linux_boot): Remove function.
10593
0ece25b1 105942008-01-05 Robert Millan <rmh@aybabtu.com>
10595
10596 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
10597 (grub_env_write_color_highlight): Likewise.
10598 (grub_wait_after_message): Likewise.
10599
10600 * normal/color.c: New file.
10601
10602 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10603 (normal_mod_DEPENDENCIES): Likewise.
10604
10605 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10606 (normal_mod_DEPENDENCIES): Likewise.
10607
10608 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10609 (normal_mod_DEPENDENCIES): Likewise.
10610
10611 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10612 (normal_mod_DEPENDENCIES): Likewise.
10613
10614 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
10615 for waiting after a message is printed.
10616 * normal/main.c (read_config_file): Likewise.
10617 (grub_normal_init): Register grub_env_write_color_normal() and
10618 grub_env_write_color_highlight() hooks. Mark `color_normal' and
10619 `color_highlight' variables as global.
10620
10621 * normal/menu.c (grub_wait_after_message): New function.
10622 (grub_color_menu_normal): New variable. Replaces ...
10623 (GRUB_COLOR_MENU_NORMAL): ... this macro.
10624 (grub_color_menu_highlight): New variable. Replaces ...
10625 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
10626 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
10627 `GRUB_TERM_COLOR_STANDARD'.
10628 (print_message): Use `grub_setcolorstate' to reload colors. Rename
10629 `normal_code' and `highlight_code' to `old_color_normal' and
10630 `old_color_highlight', respectively.
10631 (grub_menu_init_page): Update colors when drawing the menu, based on
10632 `menu_color_normal' and `menu_color_highlight' variables.
10633 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
10634 a message is printed.
10635
182dd4e5 106362008-01-05 Robert Millan <rmh@aybabtu.com>
10637
10638 * kern/env.c (grub_env_context_open): Propagate hooks for global
10639 variables to new context.
10640
10641 * kern/main.c (grub_set_root_dev): Export `root' variable.
10642
ddf8f6ad 106432008-01-05 Robert Millan <rmh@aybabtu.com>
10644
10645 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 10646 discs unconditionally, since udev and others have options to provide
ddf8f6ad 10647 them.
10648
d8b43d9b 106492008-01-05 Robert Millan <rmh@aybabtu.com>
10650
10651 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
10652
2bff2de3 106532008-01-04 Christian Franke <franke@computer.org>
10654
10655 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
10656 of eisa_mmap.
10657
97eab917 106582008-01-03 Pavel Roskin <proski@gnu.org>
10659
10660 * kern/i386/linuxbios/init.c: Put "void" to all function
10661 declarations with no arguments.
10662 * kern/powerpc/ieee1275/init.c: Likewise.
10663 * term/i386/pc/at_keyboard.c: Likewise.
10664 * term/i386/pc/vga_text.c: Likewise.
10665 * util/grub-mkdevicemap.c: Likewise.
10666
b9416d00 106672008-01-02 Robert Millan <rmh@aybabtu.com>
10668
10669 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
10670 message when loaded image is out of bounds.
10671 (grub_multiboot_load_elf64): Likewise.
10672
92695df9 106732008-01-02 Pavel Roskin <proski@gnu.org>
10674
10675 * util/grub.d/10_linux.in: Try version without ".old" when
10676 looking for initrd. It's better to use initrd from the newer
10677 kernel of the same version than no initrd at all.
10678
d98d9cad 106792008-01-01 Robert Millan <rmh@aybabtu.com>
10680
10681 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
10682
dbfdce36 106832008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
10684
f19dbdb7 10685 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 10686 grub_video_get_active_render_target.
10687 (grub_video_adapter): Added unmap_color and get_active_render_target.
10688
f19dbdb7 10689 * video/video.c: Added grub_video_unmap_color and
dbfdce36 10690 grub_video_get_active_render_target.
10691 (grub_video_get_info): Changed method to accept NULL pointer as an
10692 argument to allow detection of active video adapter.
10693
10694 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
10695 grub_video_vbe_unmap_color_int.
10696 Added grub_video_vbe_unmap_color and
10697 grub_video_vbe_get_active_render_target.
10698 (grub_video_vbe_adapter): Added unmap_color and
10699 get_active_render_target.
10700
f19dbdb7 10701 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 10702 with grub_video_vbe_unmap_color_int.
10703
10704 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
10705 (DEFAULT_NORMAL_COLOR): Likewise.
10706 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
10707 (DEFAULT_FG_COLOR): Removed.
10708 (DEFAULT_BG_COLOR): Likewise.
10709 (DEFAULT_CURSOR_COLOR): Changed value.
10710 (grub_virtual_screen): Added standard_color_setting,
10711 normal_color_setting, highlight_color_setting and term_color.
10712 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
10713 (bitmap_width): Added.
10714 (bitmap_height): Likewise.
10715 (bitmap): Likewise.
10716 (set_term_color): Likewise.
10717 (grub_virtual_screen_setup): Changed to use new terminal coloring
10718 settings.
10719 (grub_gfxterm_init): Added init for bitmap.
10720 (grub_gfxterm_fini): Added destroy for bitmap.
10721 (redraw_screen_rect): Updated to use background bitmap and new
10722 terminal coloring.
10723 (scroll_up): Added optimization for case when there is no bitmap.
10724 (grub_gfxterm_cls): Fixed to use correct background color.
10725 (grub_virtual_screen_setcolorstate): Changed to use new terminal
10726 coloring.
10727 (grub_virtual_screen_setcolor): Likewise.
10728 (grub_virtual_screen_getcolor): Added.
10729 (grub_gfxterm_background_image_cmd): Likewise.
10730 (grub_video_term): Added setcolor and getcolor.
10731 (MOD_INIT): Added registration of background_image command.
10732 (MOD_TERM): Added unregistration for background_image command.
10733
c3c20931 107342007-12-30 Pavel Roskin <proski@gnu.org>
10735
10736 * loader/multiboot_loader.c: Fix multiboot command
10737 unregistration. Fix all typos in the word "multiboot".
10738
df266716 107392007-12-29 Pavel Roskin <proski@gnu.org>
94239199 10740
10741 * util/grub.d/10_linux.in: Refactor search for initrd. Add
10742 support for initrd names used in Fedora.
10743
fc6e896c 107442007-12-26 Bean <bean123ch@gmail.com>
10745
10746 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10747 (cpio_mod_SOURCES): New variable.
10748 (cpio_mod_CFLAGS): Likewise.
10749 (cpio_mod_LDFLAGS): Likewise.
10750
10751 * fs/cpio.c: New file.
10752
10753 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10754
10755 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10756
10757 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10758
10759 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10760
533110ad 107612007-12-25 Robert Millan <rmh@aybabtu.com>
10762
10763 * include/grub/term.h (struct grub_term): Add `getcolor' function.
10764 (grub_getcolor): New function.
10765
10766 * kern/term.c (grub_getcolor): New function.
10767 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10768 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10769 (print_entry): Set normal and highlight colors to
10770 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10771 respectively, before printing and restore them to old
10772 values afterwards.
10773 (grub_menu_init_page): Likewise. Fill an additional colored space
10774 that would otherwise be left blank.
10775
10776 * term/efi/console.c (grub_console_getcolor): New function.
10777 (struct grub_console_term.getcolor): New variable.
10778 * term/i386/pc/console.c (grub_console_getcolor): New function.
10779 (struct grub_console_term.getcolor): New variable.
10780 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
10781 (struct grub_console_term.getcolor): New variable.
10782
10783 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
10784 (struct grub_console_term.setcolor): Remove variable.
10785 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
10786 (struct grub_console_term.setcolor): Remove variable.
10787 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
10788 (struct grub_console_term.setcolor): Remove variable.
10789 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10790 (struct grub_console_term.setcolor): Remove variable.
10791
4931827f 107922007-12-25 Robert Millan <rmh@aybabtu.com>
10793
10794 * configure.ac: Search for possible unifont.hex locations, and
10795 define UNIFONT_HEX if found.
10796
10797 * Makefile.in (UNIFONT_HEX): Define variable.
10798 (DATA): Rename to ...
10799 (PKGLIB): ... this. Update all users.
10800 (PKGDATA): New variable.
10801 (pkgdata_IMAGES): Rename to ...
10802 (pkglib_IMAGES): ... this. Update all users.
10803 (pkgdata_MODULES): Rename to ...
10804 (pkglib_MODULES): ... this. Update all users.
10805 (pkgdata_PROGRAMS): Rename to ...
10806 (pkglib_PROGRAMS): ... this. Update all users.
10807 (pkgdata_DATA): Rename to ...
10808 (pkglib_DATA): ... this. Update all users.
10809 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10810 (unicode.pff, ascii.pff): New rules.
10811 (all-local): Add `$(PKGDATA)' dependency.
10812 (install-local): Process `$(PKGDATA)'.
10813
10814 * util/update-grub_lib.in (font_path): Search for *.pff files in
10815 a few more locations, including `${pkgdata}'.
10816
57e57e31 108172007-12-23 Robert Millan <rmh@aybabtu.com>
10818
10819 Patch from Bean <bean123ch@gmail.com>:
10820 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10821 `size'.
10822
4bc72aa9 108232007-12-21 Bean <bean123ch@gmail.com>
10824
10825 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10826 (ntfscomp_mod_SOURCES): New variable.
10827 (ntfscomp_mod_CFLAGS): Likewise.
10828 (ntfscomp_mod_LDFLAGS): Likewise.
10829
10830 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10831 (grub_probe_SOURCES): Likewise.
10832 (grub_emu_SOURCES): Likewise.
10833
10834 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10835 (grub_emu_SOURCES): Likewise.
10836
10837 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10838 (grub_emu_SOURCES): Likewise.
10839
10840 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10841 (grub_emu_SOURCES): Likewise.
10842
10843 * fs/ntfs.c (grub_ntfscomp_func): New variable.
10844 (read_run_list): Renamed to grub_ntfs_read_run_list.
10845 (decomp_nextvcn): Moved to ntfscomp.c.
10846 (decomp_getch): Likewise.
10847 (decomp_get16): Likewise.
10848 (decomp_block): Likewise.
10849 (read_block): Likewise.
10850 (read_data): Partially moved to ntfscomp.c.
10851 (fixup): Change unsigned to grub_uint16_t.
10852 (read_mft): Change unsigned long to grub_uint32_t.
10853 (read_attr): Likewise.
10854 (read_data): Likewise.
10855 (read_run_data): Likewise.
10856 (read_run_list): Likewise.
10857 (read_mft): Likewise.
10858
10859 * fs/ntfscomp.c: New file.
10860
10861 * include/grub/ntfs.h: New file.
10862
af680a87 108632007-12-16 Robert Millan <rmh@aybabtu.com>
10864
10865 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10866 IDE disk check, since Linux is known to support 20 IDE disks.
10867 Reported by Colin Watson.
10868
84be7599 108692007-12-15 Bean <bean123ch@gmail.com>
10870
10871 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10872 (lnxboot_img_SOURCES): New variable.
10873 (lnxboot_img_ASFLAGS): Likewise.
10874 (lnxboot_img_LDFLAGS): Likewise.
10875
10876 * boot/i386/pc/lnxboot.S: New file.
10877
6af9db01 108782007-11-24 Pavel Roskin <proski@gnu.org>
10879
10880 * configure.ac: Test if '--build-id=none' is supported by the
10881 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
10882 objcopy to generate incorrect binary files (binutils
10883 2.17.50.0.18-1 as shipped by Fedora 8).
10884 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10885 linking, so that build ID doesn't break the test.
10886
7361cfe6 108872007-11-24 Pavel Roskin <proski@gnu.org>
10888
10889 * include/grub/i386/time.h: use "void" in the argument list
10890 of grub_cpu_idle().
10891 * include/grub/powerpc/time.h: Likewise.
10892 * include/grub/sparc64/time.h: Likewise.
10893
1593e10c 108942007-11-18 Christian Franke <franke@computer.org>
10895
10896 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10897 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10898 This fixes the problem that function keys did not work in grub-emu.
10899
3b8db1a8 109002007-11-18 Christian Franke <franke@computer.org>
10901
10902 * disk/host.c (grub_host_open): Remove attribute unused from
10903 name parameter. Add check for "host". This fixes the problem
10904 that grub-emu does not find partitions.
10905
2e29408d 109062007-11-18 Christian Franke <franke@computer.org>
10907
10908 * util/hostfs.c (is_dir): New function.
10909 (grub_hostfs_dir): Handle missing dirent.d_type case.
10910 (grub_hostfs_read): Add missing fseek().
10911 (grub_hostfs_label): Clear label pointer. This fixes a crash
10912 of grub-emu on "ls (host)".
10913
398cd047 109142007-11-18 Christian Franke <franke@computer.org>
10915
10916 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10917 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10918 to 64 bit boundary by default.
10919
c405c391 109202007-11-18 Bean <bean123ch@gmail.com>
10921
10922 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10923 (hexdump_mod_SOURCES): New variable.
10924 (hexdump_mod_CFLAGS): Likewise.
10925 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 10926
c405c391 10927 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10928
10929 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10930
10931 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10932
10933 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10934
10935 * include/grub/hexdump.h: New file.
10936
10937 * commands/hexdump.c: New file.
10938
5cced7fd 109392007-11-10 Robert Millan <rmh@aybabtu.com>
10940
10941 * commands/i386/pc/play.c (beep_off): Switch order of arguments
10942 in grub_outb() calls.
10943 (beep_on): Likewise.
10944
8b714eb0 109452007-11-10 Christian Franke <franke@computer.org>
10946
10947 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10948 (grub_menu_run): Likewise.
10949
ce0f1839 109502007-11-10 Robert Millan <rmh@aybabtu.com>
10951
10952 * include/grub/i386/efi/machine.h: New file.
10953 * include/grub/i386/linuxbios/machine.h: Likewise.
10954 * include/grub/i386/pc/machine.h: Likewise.
10955 * include/grub/powerpc/ieee1275/machine.h: Likewise.
10956 * include/grub/sparc64/ieee1275/machine.h: Likewise.
10957
10958 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10959 (serial_hw_io_addr): New variable.
10960 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10961 instead of `(unsigned short *) 0x400'.
10962
270c237d 109632007-11-10 Bean <bean123ch@gmail.com>
10964
10965 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10966
a87783bf 109672007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10968
10969 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10970 (vga_mod_SOURCES): Added.
10971 (vga_mod_CFLAGS): Likewise.
10972 (vga_mod_LDFLAGS): Likewise.
10973
10974 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10975 grub_outb() calls.
10976 (set_map_mask): Likewise.
10977 (set_read_map): Likewise.
10978 (set_read_address): Likewise.
10979 (vga_font): Removed variable.
10980 (get_vga_glyph): Removed function.
10981 (invalidate_char): Likewise.
10982 (write_char): Changed to use grub_font_get_glyph() for font
10983 information.
10984 (grub_vga_putchar): Likewise.
10985 (grub_vga_getcharwidth): Likewise.
10986
6433b448 109872007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
10988
10989 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10990 flags.
10991 (pxeboot_img_LDFLAGS): Likewise.
10992 (diskboot_img_LDFLAGS): Likewise.
10993 (kernel_img_LDFLAGS): Likewise.
10994
49178511 109952007-11-06 Robert Millan <rmh@aybabtu.com>
10996
10997 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10998 in grub_outb() calls.
10999 (serial_hw_init): Likewise.
11000
53b052de 110012007-11-05 Robert Millan <rmh@aybabtu.com>
11002
11003 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
11004 spaces. Skip non-regular files.
11005
5ab33bba 110062007-11-05 Robert Millan <rmh@aybabtu.com>
11007
11008 * kern/disk.c (grub_disk_firmware_fini)
11009 (grub_disk_firmware_is_tainted): New variables.
11010
11011 * include/grub/disk.h (grub_disk_firmware_fini)
11012 (grub_disk_firmware_is_tainted): Likewise.
11013
11014 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
11015 (grub_disk_biosdisk_fini): ... to here.
11016 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
11017 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
11018 is set. Register grub_disk_biosdisk_fini() in
11019 `grub_disk_firmware_fini'.
11020
11021 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
11022 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
11023 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
11024 to finish existing firmware disk interface.
11025
11026 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
11027 (ata_mod_SOURCES): New variable.
11028 (ata_mod_CFLAGS): Likewise.
11029 (ata_mod_LDFLAGS): Likewise.
11030
0149ab7c 110312007-11-05 Robert Millan <rmh@aybabtu.com>
11032
11033 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
11034 (grub_ata_wait): Reimplement using grub_millisleep().
11035
11036 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
11037 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
11038
be7ac41e 110392007-11-03 Marco Gerards <marco@gnu.org>
11040
11041 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
11042 (CRTC_ADDR_PORT): New macro.
11043 (CRTC_DATA_PORT): Likewise.
11044 (CRTC_CURSOR): Likewise.
11045 (CRTC_CURSOR_ADDR_HIGH): Likewise.
11046 (CRTC_CURSOR_ADDR_LOW): Likewise.
11047 (update_cursor): New function.
11048 (grub_console_real_putchar): Call `update_cursor'.
11049 (grub_console_gotoxy): Likewise.
11050 (grub_console_cls): Set the default color when clearing the
11051 screen.
11052 (grub_console_setcursor): Implemented.
11053
bb06ab2e 110542007-11-03 Marco Gerards <marco@gnu.org>
11055
11056 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
11057 become activate.
11058 (grub_ata_pio_write): Likewise.
11059
11060 (grub_atapi_identify): Wait after issuing an ATA command.
11061 (grub_atapi_packet): Likewise.
11062 (grub_ata_identify): Likewise.
11063 (grub_ata_readwrite): Likewise.
11064
cf8f780b 110652007-11-03 Marco Gerards <marco@gnu.org>
11066
11067 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
11068 (grub_ata_pio_write): Likewise.
11069 (grub_ata_readwrite): Use `grub_error', instead of
11070 returning `grub_errno'.
11071
ed649e54 110722007-11-03 Marco Gerards <marco@gnu.org>
11073
11074 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
11075 grub_ata_pio_write once for every single sector, instead of for
11076 multiple sectors.
11077
ca25d8f0 110782007-10-31 Robert Millan <rmh@aybabtu.com>
11079
11080 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
11081
11082 * conf/i386-linuxbios.rmk: New file.
11083
11084 * kern/i386/pc/hardware.c: Likewise.
11085 * term/i386/pc/at_keyboard.c: Likewise.
11086 * term/i386/pc/vga_text.c: Likewise.
11087
11088 * include/grub/i386/linuxbios/boot.h: Likewise.
11089 * include/grub/i386/linuxbios/console.h: Likewise.
11090 * include/grub/i386/linuxbios/init.h: Likewise.
11091 * include/grub/i386/linuxbios/kernel.h: Likewise.
11092 * include/grub/i386/linuxbios/loader.h: Likewise.
11093 * include/grub/i386/linuxbios/memory.h: Likewise.
11094 * include/grub/i386/linuxbios/serial.h: Likewise.
11095 * include/grub/i386/linuxbios/time.h: Likewise.
11096
11097 * kern/i386/linuxbios/init.c: Likewise.
11098 * kern/i386/linuxbios/startup.S: Likewise.
11099 * kern/i386/linuxbios/table.c: Likewise.
11100
e911ecc1 111012007-10-31 Marco Gerards <marco@gnu.org>
11102
11103 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
11104 (ata_mod_SOURCES): New variable.
11105 (ata_mod_CFLAGS): Likewise.
11106 (ata_mod_LDFLAGS): Likewise.
11107
11108 * disk/ata.c: New file.
11109
11110 * include/grub/disk.h (grub_disk_dev_id): Add
11111 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 11112
7f66d0e0 111132007-10-31 Robert Millan <rmh@aybabtu.com>
11114
11115 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
11116 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
11117
11118 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
11119 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
11120
11121 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
11122 `<grub/types.h>'.
11123
11124 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
11125
5cd7dd46 111262007-10-27 Robert Millan <rmh@aybabtu.com>
11127
3236ca65 11128 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 11129
2ebfc90f 111302007-10-22 Robert Millan <rmh@aybabtu.com>
11131
11132 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
11133 `"../realmode.S"'.
11134 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
11135
73fcb0f3 111362007-10-22 Robert Millan <rmh@aybabtu.com>
11137
11138 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
11139 (pkgdata_MODULES): Add `biosdisk.mod'.
11140 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
11141 variables.
11142
11143 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
11144 (grub_biosdisk_init): Replace with ...
11145 (GRUB_MOD_INIT(biosdisk)): ... this.
11146 (grub_biosdisk_fini): Replace with ...
11147 (GRUB_MOD_FINI(biosdisk)): ... this.
11148
11149 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
11150 (grub_machine_init): Remove call to grub_biosdisk_init().
11151 (grub_machine_fini): Remove call to grub_machine_fini().
11152
11153 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
11154
3381d274 111552007-10-22 Robert Millan <rmh@aybabtu.com>
11156
11157 * include/grub/time.h: New file.
11158 * include/grub/i386/time.h: Likewise.
11159 * include/grub/powerpc/time.h: Likewise.
11160 * include/grub/sparc64/time.h: Likewise.
11161
11162 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
11163 instances to ...
11164 (KERNEL_MACHINE_TIME_HEADER): ... this.
11165 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11166 instances to ...
11167 (KERNEL_MACHINE_TIME_HEADER): ... this.
11168 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11169 instances to ...
11170 (KERNEL_MACHINE_TIME_HEADER): ... this.
11171
11172 * kern/i386/efi/init.c: Include `<grub/time.h>'.
11173 (grub_millisleep): New function.
11174 * kern/i386/pc/init.c: Include `<grub/time.h>'.
11175 (grub_millisleep): New function.
11176 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
11177 Remove `grub/machine/time.h' include.
11178 (grub_millisleep): New function.
11179 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
11180 Remove `grub/machine/time.h' include.
11181 (grub_millisleep): New function.
11182
11183 * include/grub/misc.h (grub_div_roundup): New function.
11184
11185 * kern/misc.c: Include `<grub/time.h>'.
11186 (grub_millisleep_generic): New function.
11187
11188 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
11189 Add `time.h'.
11190 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
11191 Add `time.h'.
11192 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
11193 `machine/time.h'. Add `time.h'.
11194 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11195
a39a0312 111962007-10-21 Robert Millan <rmh@aybabtu.com>
11197
11198 * include/grub/misc.h (grub_max): New function.
11199
2aad70e2 112002007-10-21 Robert Millan <rmh@aybabtu.com>
11201
11202 * util/misc.c (grub_util_info): Call fflush() before returning.
11203
54b71c4b 112042007-10-20 Robert Millan <rmh@aybabtu.com>
11205
11206 * genmk.rb (Image): Copy `extra_flags' from here ...
11207 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
11208
11209 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
11210 to `argc' and `args' arguments.
11211
a979f513 112122007-10-17 Robert Millan <rmh@aybabtu.com>
11213
11214 * kern/i386/loader.S: New file.
11215
11216 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
11217 * kern/i386/loader.S (grub_linux_prot_size)... to here.
11218 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
11219 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
11220 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
11221 * kern/i386/loader.S (grub_linux_real_addr)... to here.
11222 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
11223 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
11224 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
11225 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
11226 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
11227 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
11228 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
11229 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
11230
11231 * kern/i386/realmode.S: New file.
11232
11233 * kern/i386/pc/startup.S (protstack): Moved from here ...
11234 * kern/i386/realmode.S (protstack)... to here.
11235 * kern/i386/pc/startup.S (gdt): Moved from here ...
11236 * kern/i386/realmode.S (gdt)... to here.
11237 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
11238 * kern/i386/realmode.S (prot_to_real)... to here.
11239
11240 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
11241 `kern/i386/realmode.S'.
11242
825fc8fd 112432007-10-17 Robert Millan <rmh@aybabtu.com>
11244
11245 * include/grub/i386/loader.h: New file.
11246
11247 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
11248 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
11249 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
11250 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
11251 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
11252 * include/grub/i386/loader.h (grub_linux_prot_size)
11253 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
11254 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
11255 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
11256 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
11257
11258 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
11259
e179b2f4 112602007-10-15 Robert Millan <rmh@aybabtu.com>
11261
11262 * normal/misc.c (grub_normal_print_device_info): Do not probe for
11263 filesystem when dev->disk is unset.
11264 Do probe for filesystem even when dev->disk->has_partitions is set.
11265 In case a filesystem is found, always report it.
11266 In case it isn't, if dev->disk->has_partitions is set, report that
11267 a partition table was found instead of reporting that no filesystem
11268 could be identified.
11269
5db82af6 112702007-10-12 Robert Millan <rmh@aybabtu.com>
11271
11272 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
11273 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
11274
68f6ac74 11275 * include/grub/types.h (grub_host_to_target16): New macro.
11276 (grub_host_to_target32): Likewise.
11277 (grub_host_to_target64): Likewise.
11278 (grub_target_to_host16): Likewise.
11279 (grub_target_to_host32): Likewise.
11280 (grub_target_to_host64): Likewise.
5db82af6 11281
11282 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11283 Renamed from to ...
11284 (GRUB_MOD_ALIGN): ...this. Update all users.
11285
68f6ac74 11286 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
11287 grub_host_to_target32.
11288 Replace grub_be_to_cpu32 with grub_target_to_host32.
11289 (load_modules): Likewise.
11290 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
11291 Replace grub_be_to_cpu32 with grub_target_to_host32.
11292 Replace grub_cpu_to_be16 with grub_host_to_target16.
11293 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 11294
3cf497cc 112952007-10-12 Robert Millan <rmh@aybabtu.com>
11296
11297 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
11298 * util/elf/grub-mkimage.c: ... here.
11299
11300 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
11301 `util/powerpc/ieee1275/grub-mkimage.c'.
11302
c8cc3692 113032007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 11304
c8cc3692 11305 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
11306 and make it easier to figure out.
11307 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
11308 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
11309 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
11310 leave us with less than HEAP_MIN_SIZE total heap.
11311 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 11312
5c58b791 113132007-10-03 Robert Millan <rmh@aybabtu.com>
11314
11315 * include/grub/i386/io.h: New file.
11316 * commands/i386/pc/play.c (inb): Removed.
11317 (outb): Removed.
11318 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
11319 with grub_outb().
afcd2ef8 11320 * term/i386/pc/serial.c (inb): Removed.
11321 (outb): Removed.
11322 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
11323 with grub_outb().
11324 * term/i386/pc/vga.c (inb): Removed.
11325 (outb): Removed.
11326 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
11327 with grub_outb().
5c58b791 11328
1a477ed6 113292007-10-02 Robert Millan <rmh@aybabtu.com>
11330
11331 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
11332 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11333 Reported by Marcin Kurek.
11334
6b5d80fa 113352007-09-07 Robert Millan <rmh@aybabtu.com>
11336
11337 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
11338 SmartFirmware version updates (as released by Sven Luther), and avoid
11339 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
11340 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
11341 known broken.
11342
5618afbf 113432007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11344
11345 From Hitoshi Ozeki:
11346 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
11347 when merging two regions.
11348
6139dcd9 113492007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11350
508e39ee 11351 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
11352 * normal/completion.c (grub_normal_do_completion): Likewise.
11353 Reported by Hitoshi Ozeki.
11354
113552007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 11356
6139dcd9 11357 Do not use devices at boot in chainloading.
f19dbdb7 11358
6139dcd9 11359 * loader/i386/pc/chainloader.c (boot_drive): New variable.
11360 (boot_part_addr): Likewise.
11361 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
11362 with BOOT_DRIVE and BOOT_PART_ADDR.
11363 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
11364 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
11365
38da6516 113662007-08-29 Robert Millan <rmh@aybabtu.com>
11367
11368 Patch from Simon Peter <dn.tlp@gmx.net>:
11369 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
11370 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
11371 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
11372 util/i386/pc/grub-setup.c_DEPENDENCIES.
11373 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
11374 util/grub-probe.c_DEPENDENCIES.
11375 * conf/powerpc-ieee1275.rmk: Likewise.
11376
29d0928c 113772007-08-28 Robert Millan <rmh@aybabtu.com>
11378
11379 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
11380 to tell grub-mkdevicemap how to name devices.
11381 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
11382 feature).
11383
11384 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
11385 util/i386/get_disk_name.c.
11386 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
11387 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
11388 util/ieee1275/get_disk_name.c.
11389
11390 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
11391
11392 * DISTLIST: Add util/i386/get_disk_name.c and
11393 util/ieee1275/get_disk_name.c.
11394
11395 * util/grub-mkdevicemap.c: Replace device naming logic with
11396 grub_util_get_disk_name() calls.
11397
5a0d3cca 113982007-08-20 Robert Millan <rmh@aybabtu.com>
11399
11400 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
11401 (so that it works for both plural and singular quantities).
11402
8b72db2f 114032007-08-05 Robert Millan <rmh@aybabtu.com>
11404
11405 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
11406 so that [xz] isn't taken into account when determining order.
11407
352466bf 114082007-08-02 Marco Gerards <marco@gnu.org>
11409
11410 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
11411 `include/multiboot2.h', `include/grub/elfload.h',
11412 `include/multiboot.h', `include/grub/multiboot.h',
11413 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
11414 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
11415 `kern/elf.c', `loader/multiboot_loader.c',
11416 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
11417 `loader/i386/pc/multiboot2.c',
11418 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
11419 `util/i386/pc/grub-mkrescue.in'. Remove
11420 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
11421 `include/grub/i386/pc/util/biosdisk.h' and
11422 `include/grub/powerpc/ieee1275/multiboot.h'.
11423
8f096014 114242007-08-02 Bean <bean123ch@gmail.com>
11425
11426 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
11427 (ntfs_mod_SOURCES): New variable.
11428 (ntfs_mod_CFLAGS): Likewise.
11429 (ntfs_mod_LDFLAGS): Likewise.
11430
11431 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
11432 (grub_probe_SOURCES): Likewise.
11433 (grub_emu_SOURCES): Likewise.
11434
11435 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
11436 (grub_emu_SOURCES): Likewise.
11437
11438 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
11439 (grub_emu_SOURCES): Likewise.
f19dbdb7 11440
8f096014 11441 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
11442
11443 * fs/ntfs.c: New file.
11444
9959f7db 114452007-08-02 Bean <bean123ch@gmail.com>
11446
11447 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
11448
11449 * file.h (grub_file): Likewise.
11450
11451 * fshelp.h (grub_fshelp_read_file): Likewise.
11452
11453 * util/i386/pc/grub-setup.c (setup): Likewise.
11454 (save_first_sector): Likewise.
11455 (save_blocklists): Likewise.
f19dbdb7 11456
9959f7db 11457 * fs/affs.c (grub_affs_read_file): Likewise.
11458
11459 * fs/ext2.c (grub_ext2_read_file): Likewise.
11460
11461 * fs/fat.c (grub_fat_read_data): Likewise.
11462
11463 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
11464
11465 * fs/hfs.c (grub_hfs_read_file): Likewise.
11466
11467 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11468
11469 * fs/jfs.c (grub_jfs_read_file): Likewise.
11470
11471 * fs/minix.c (grub_minix_read_file): Likewise.
11472
11473 * fs/sfs.c (grub_sfs_read_file): Likewise.
11474
11475 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 11476
9959f7db 11477 * fs/xfs.c (grub_xfs_read_file): Likewise.
11478
11479 * command/blocklist.c (read_blocklist): Likewise.
11480 (print_blocklist): Likewise.
11481
0a203f83 114822007-08-02 Marco Gerards <marco@gnu.org>
11483
11484 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
11485 `util/hostfs.c'.
11486
11487 * disk/host.c: New file.
11488
11489 * util/hostfs.c: Likewise.
11490
11491 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
11492 return `GRUB_ERR_BAD_FS'.
11493 * fs/sfs.c (grub_sfs_mount): Likewise.
11494 * fs/xfs.c (grub_xfs_mount): Likewise.
11495
11496 * include/grub/disk.h (enum grub_disk_dev_id): Add
11497 `GRUB_DISK_DEVICE_HOST_ID'.
11498
11499 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
11500
e5dfe777 115012007-07-24 Jerone Young <jerone@gmail.com>
11502
f19dbdb7 11503 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 11504 modules for compilation.
11505 * conf/powerpc-ieee1275.rmk: Likewise.
11506
11507 * include/multiboot.h: Move multiboot definitions to one file. Rename
11508 many definitions to not get grub specific.
11509 * include/multiboot2.h: Create header with multiboot 2 definitions.
11510 * include/grub/multiboot.h: Header for grub specific function
11511 prototypes and definitions.
11512 * include/grub/multiboot2.h: Likewise.
11513 * include/grub/multiboot_loader.h: Likewise.
11514 * include/grub/i386/pc/multiboot.h: Removed.
11515 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
11516
11517 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
11518 and 2 to allow for one multiboot and module commands.
11519 * loader/multiboot2.c: Add multiboot2 functionality.
11520 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
11521 and definition names.
11522 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
11523 2 functions.
11524 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
11525 ieee1275 specific multiboot2 code.
11526
11527 * kern/i386/pc/startup.S: Change headers and definition names for
11528 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
11529
daf0f0ba 115302007-07-22 Robert Millan <rmh@aybabtu.com>
11531
11532 * geninitheader.sh: Process file specified in first parameter rather
11533 than hardcoding grub_modules_init.lst.
fe6b695a 11534 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 11535 than hardcoding grub_modules_init.h.
11536
11537 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
11538 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
11539 grub_probe_init.[ch] and grub_setup_init.[ch].
11540
11541 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
11542 grub_modules_init.h with grub_emu_init.h.
11543 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
11544 grub_probe_init.[ch] files.
11545 * conf/i386-efi.rmk: Likewise.
11546 * conf/i386-pc.rmk: Likewise.
11547 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
11548 grub_setup_init.[ch] files.
11549
11550 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
11551 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
11552 to initialize modules rather than a list of hardcoded functions.
11553 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
11554 grub_init_all() to initialize modules rather than a list of hardcoded
11555 functions.
11556
54cdc1cc 115572007-07-22 Robert Millan <rmh@aybabtu.com>
11558
11559 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
11560 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
11561
ad0686cc 115622007-07-22 Robert Millan <rmh@aybabtu.com>
11563
11564 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
11565 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
11566 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
11567 flag when running on SmartFirmware.
11568 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
11569 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
11570 was set.
11571
11572 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11573 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
11574 rather than decreasing it.
11575
11576 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
11577 there's not enough space to do it, fail in the same way as when it
11578 can't be done because there are no partitions.
11579
11580 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
11581 when nvsetenv failed.
11582
969c02ec 115832007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
11584
11585 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
11586 because this rule is automatically generated.
11587 (grub-mkrescue): Removed for the same reason as above.
11588
5a79f472 115892007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
11590
11591 Migrate to GNU General Public License Version 3.
f19dbdb7 11592
5a79f472 11593 * COPYING: Replaced with the plain text version of GPLv3.
11594
11595 * config.guess: Updated from gnulib.
11596 * config.sub: Likewise.
11597
11598 * geninit.sh: Output a GPLv3 copyright notice.
11599 * geninitheader.sh: Likewise.
11600 * genmodsrc.sh: Likewise.
11601 * gensymlist.sh.in: Likewise.
11602
11603 * boot/i386/pc/boot.S: Upgraded to GPLv3.
11604 * boot/i386/pc/diskboot.S: Likewise.
11605 * boot/i386/pc/pxeboot.S: Likewise.
11606 * commands/blocklist.c: Likewise.
11607 * commands/boot.c: Likewise.
11608 * commands/cat.c: Likewise.
11609 * commands/cmp.c: Likewise.
11610 * commands/configfile.c: Likewise.
11611 * commands/echo.c: Likewise.
11612 * commands/help.c: Likewise.
11613 * commands/ls.c: Likewise.
11614 * commands/search.c: Likewise.
11615 * commands/terminal.c: Likewise.
11616 * commands/test.c: Likewise.
11617 * commands/videotest.c: Likewise.
11618 * commands/i386/cpuid.c: Likewise.
11619 * commands/i386/pc/halt.c: Likewise.
11620 * commands/i386/pc/play.c: Likewise.
11621 * commands/i386/pc/reboot.c: Likewise.
11622 * commands/i386/pc/vbeinfo.c: Likewise.
11623 * commands/i386/pc/vbetest.c: Likewise.
11624 * commands/ieee1275/halt.c: Likewise.
11625 * commands/ieee1275/reboot.c: Likewise.
11626 * commands/ieee1275/suspend.c: Likewise.
11627 * disk/loopback.c: Likewise.
11628 * disk/lvm.c: Likewise.
11629 * disk/raid.c: Likewise.
11630 * disk/efi/efidisk.c: Likewise.
11631 * disk/i386/pc/biosdisk.c: Likewise.
11632 * disk/ieee1275/ofdisk.c: Likewise.
11633 * font/manager.c: Likewise.
11634 * fs/affs.c: Likewise.
11635 * fs/ext2.c: Likewise.
11636 * fs/fat.c: Likewise.
11637 * fs/fshelp.c: Likewise.
11638 * fs/hfs.c: Likewise.
11639 * fs/hfsplus.c: Likewise.
11640 * fs/iso9660.c: Likewise.
11641 * fs/jfs.c: Likewise.
11642 * fs/minix.c: Likewise.
11643 * fs/sfs.c: Likewise.
11644 * fs/ufs.c: Likewise.
11645 * fs/xfs.c: Likewise.
11646 * hello/hello.c: Likewise.
11647 * include/grub/acorn_filecore.h: Likewise.
11648 * include/grub/arg.h: Likewise.
11649 * include/grub/bitmap.h: Likewise.
11650 * include/grub/boot.h: Likewise.
11651 * include/grub/cache.h: Likewise.
11652 * include/grub/device.h: Likewise.
11653 * include/grub/disk.h: Likewise.
11654 * include/grub/dl.h: Likewise.
11655 * include/grub/elfload.h: Likewise.
11656 * include/grub/env.h: Likewise.
11657 * include/grub/err.h: Likewise.
11658 * include/grub/file.h: Likewise.
11659 * include/grub/font.h: Likewise.
11660 * include/grub/fs.h: Likewise.
11661 * include/grub/fshelp.h: Likewise.
11662 * include/grub/gzio.h: Likewise.
11663 * include/grub/hfs.h: Likewise.
11664 * include/grub/kernel.h: Likewise.
11665 * include/grub/loader.h: Likewise.
11666 * include/grub/lvm.h: Likewise.
11667 * include/grub/misc.h: Likewise.
11668 * include/grub/mm.h: Likewise.
11669 * include/grub/net.h: Likewise.
11670 * include/grub/normal.h: Likewise.
11671 * include/grub/parser.h: Likewise.
11672 * include/grub/partition.h: Likewise.
11673 * include/grub/pc_partition.h: Likewise.
11674 * include/grub/raid.h: Likewise.
11675 * include/grub/rescue.h: Likewise.
11676 * include/grub/script.h: Likewise.
11677 * include/grub/setjmp.h: Likewise.
11678 * include/grub/symbol.h: Likewise.
11679 * include/grub/term.h: Likewise.
11680 * include/grub/terminfo.h: Likewise.
11681 * include/grub/tparm.h: Likewise.
11682 * include/grub/types.h: Likewise.
11683 * include/grub/video.h: Likewise.
11684 * include/grub/efi/api.h: Likewise.
11685 * include/grub/efi/chainloader.h: Likewise.
11686 * include/grub/efi/console.h: Likewise.
11687 * include/grub/efi/console_control.h: Likewise.
11688 * include/grub/efi/disk.h: Likewise.
11689 * include/grub/efi/efi.h: Likewise.
11690 * include/grub/efi/pe32.h: Likewise.
11691 * include/grub/efi/time.h: Likewise.
11692 * include/grub/i386/linux.h: Likewise.
11693 * include/grub/i386/setjmp.h: Likewise.
11694 * include/grub/i386/types.h: Likewise.
11695 * include/grub/i386/efi/kernel.h: Likewise.
11696 * include/grub/i386/efi/loader.h: Likewise.
11697 * include/grub/i386/efi/time.h: Likewise.
11698 * include/grub/i386/pc/biosdisk.h: Likewise.
11699 * include/grub/i386/pc/boot.h: Likewise.
11700 * include/grub/i386/pc/chainloader.h: Likewise.
11701 * include/grub/i386/pc/console.h: Likewise.
11702 * include/grub/i386/pc/init.h: Likewise.
11703 * include/grub/i386/pc/kernel.h: Likewise.
11704 * include/grub/i386/pc/loader.h: Likewise.
11705 * include/grub/i386/pc/memory.h: Likewise.
11706 * include/grub/i386/pc/multiboot.h: Likewise.
11707 * include/grub/i386/pc/serial.h: Likewise.
11708 * include/grub/i386/pc/time.h: Likewise.
11709 * include/grub/i386/pc/vbe.h: Likewise.
11710 * include/grub/i386/pc/vbeblit.h: Likewise.
11711 * include/grub/i386/pc/vbefill.h: Likewise.
11712 * include/grub/i386/pc/vbeutil.h: Likewise.
11713 * include/grub/i386/pc/vga.h: Likewise.
11714 * include/grub/ieee1275/ieee1275.h: Likewise.
11715 * include/grub/ieee1275/ofdisk.h: Likewise.
11716 * include/grub/powerpc/libgcc.h: Likewise.
11717 * include/grub/powerpc/setjmp.h: Likewise.
11718 * include/grub/powerpc/types.h: Likewise.
11719 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
11720 * include/grub/powerpc/ieee1275/console.h: Likewise.
11721 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
11722 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
11723 * include/grub/powerpc/ieee1275/loader.h: Likewise.
11724 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
11725 * include/grub/powerpc/ieee1275/time.h: Likewise.
11726 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
11727 * include/grub/sparc64/libgcc.h: Likewise.
11728 * include/grub/sparc64/setjmp.h: Likewise.
11729 * include/grub/sparc64/types.h: Likewise.
11730 * include/grub/sparc64/ieee1275/console.h: Likewise.
11731 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11732 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11733 * include/grub/sparc64/ieee1275/time.h: Likewise.
11734 * include/grub/util/biosdisk.h: Likewise.
11735 * include/grub/util/getroot.h: Likewise.
11736 * include/grub/util/lvm.h: Likewise.
11737 * include/grub/util/misc.h: Likewise.
11738 * include/grub/util/raid.h: Likewise.
11739 * include/grub/util/resolve.h: Likewise.
11740 * io/gzio.c: Likewise.
11741 * kern/device.c: Likewise.
11742 * kern/disk.c: Likewise.
11743 * kern/dl.c: Likewise.
11744 * kern/elf.c: Likewise.
11745 * kern/env.c: Likewise.
11746 * kern/err.c: Likewise.
11747 * kern/file.c: Likewise.
11748 * kern/fs.c: Likewise.
11749 * kern/loader.c: Likewise.
11750 * kern/main.c: Likewise.
11751 * kern/misc.c: Likewise.
11752 * kern/mm.c: Likewise.
11753 * kern/parser.c: Likewise.
11754 * kern/partition.c: Likewise.
11755 * kern/rescue.c: Likewise.
11756 * kern/term.c: Likewise.
11757 * kern/efi/efi.c: Likewise.
11758 * kern/efi/init.c: Likewise.
11759 * kern/efi/mm.c: Likewise.
11760 * kern/i386/dl.c: Likewise.
11761 * kern/i386/efi/init.c: Likewise.
11762 * kern/i386/efi/startup.S: Likewise.
11763 * kern/i386/pc/init.c: Likewise.
11764 * kern/i386/pc/lzo1x.S: Likewise.
11765 * kern/i386/pc/startup.S: Likewise.
11766 * kern/ieee1275/ieee1275.c: Likewise.
11767 * kern/powerpc/cache.S: Likewise.
11768 * kern/powerpc/dl.c: Likewise.
11769 * kern/powerpc/ieee1275/cmain.c: Likewise.
11770 * kern/powerpc/ieee1275/crt0.S: Likewise.
11771 * kern/powerpc/ieee1275/init.c: Likewise.
11772 * kern/powerpc/ieee1275/openfw.c: Likewise.
11773 * kern/sparc64/cache.S: Likewise.
11774 * kern/sparc64/dl.c: Likewise.
11775 * kern/sparc64/ieee1275/init.c: Likewise.
11776 * kern/sparc64/ieee1275/openfw.c: Likewise.
11777 * loader/efi/chainloader.c: Likewise.
11778 * loader/efi/chainloader_normal.c: Likewise.
11779 * loader/i386/efi/linux.c: Likewise.
11780 * loader/i386/efi/linux_normal.c: Likewise.
11781 * loader/i386/pc/chainloader.c: Likewise.
11782 * loader/i386/pc/chainloader_normal.c: Likewise.
11783 * loader/i386/pc/linux.c: Likewise.
11784 * loader/i386/pc/linux_normal.c: Likewise.
11785 * loader/i386/pc/multiboot.c: Likewise.
11786 * loader/i386/pc/multiboot_normal.c: Likewise.
11787 * loader/powerpc/ieee1275/linux.c: Likewise.
11788 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11789 * normal/arg.c: Likewise.
11790 * normal/cmdline.c: Likewise.
11791 * normal/command.c: Likewise.
11792 * normal/completion.c: Likewise.
11793 * normal/execute.c: Likewise.
11794 * normal/function.c: Likewise.
11795 * normal/lexer.c: Likewise.
11796 * normal/main.c: Likewise.
11797 * normal/menu.c: Likewise.
11798 * normal/menu_entry.c: Likewise.
11799 * normal/misc.c: Likewise.
11800 * normal/parser.y: Likewise.
11801 * normal/script.c: Likewise.
11802 * normal/i386/setjmp.S: Likewise.
11803 * normal/powerpc/setjmp.S: Likewise.
11804 * normal/sparc64/setjmp.S: Likewise.
11805 * partmap/acorn.c: Likewise.
11806 * partmap/amiga.c: Likewise.
11807 * partmap/apple.c: Likewise.
11808 * partmap/gpt.c: Likewise.
11809 * partmap/pc.c: Likewise.
11810 * partmap/sun.c: Likewise.
11811 * term/gfxterm.c: Likewise.
11812 * term/terminfo.c: Likewise.
11813 * term/efi/console.c: Likewise.
11814 * term/i386/pc/console.c: Likewise.
11815 * term/i386/pc/serial.c: Likewise.
11816 * term/i386/pc/vesafb.c: Likewise.
11817 * term/i386/pc/vga.c: Likewise.
11818 * term/ieee1275/ofconsole.c: Likewise.
11819 * util/biosdisk.c: Likewise.
11820 * util/console.c: Likewise.
11821 * util/genmoddep.c: Likewise.
11822 * util/getroot.c: Likewise.
11823 * util/grub-emu.c: Likewise.
11824 * util/grub-mkdevicemap.c: Likewise.
11825 * util/grub-probe.c: Likewise.
11826 * util/lvm.c: Likewise.
11827 * util/misc.c: Likewise.
11828 * util/raid.c: Likewise.
11829 * util/resolve.c: Likewise.
11830 * util/update-grub.in: Likewise.
11831 * util/update-grub_lib.in: Likewise.
11832 * util/grub.d/00_header.in: Likewise.
11833 * util/grub.d/10_hurd.in: Likewise.
11834 * util/grub.d/10_linux.in: Likewise.
11835 * util/i386/efi/grub-install.in: Likewise.
11836 * util/i386/efi/grub-mkimage.c: Likewise.
11837 * util/i386/pc/grub-install.in: Likewise.
11838 * util/i386/pc/grub-mkimage.c: Likewise.
11839 * util/i386/pc/grub-mkrescue.in: Likewise.
11840 * util/i386/pc/grub-setup.c: Likewise.
11841 * util/i386/pc/misc.c: Likewise.
11842 * util/powerpc/ieee1275/grub-install.in: Likewise.
11843 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11844 * util/powerpc/ieee1275/misc.c: Likewise.
11845 * video/bitmap.c: Likewise.
11846 * video/video.c: Likewise.
11847 * video/i386/pc/vbe.c: Likewise.
11848 * video/i386/pc/vbeblit.c: Likewise.
11849 * video/i386/pc/vbefill.c: Likewise.
11850 * video/i386/pc/vbeutil.c: Likewise.
11851 * video/readers/tga.c: Likewise.
11852
3572d015 118532007-07-02 Robert Millan <rmh@aybabtu.com>
11854
11855 * conf/i386-efi.rmk: Replace obsolete reference to
11856 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11857 with util/getroot.c.
11858 * conf/powerpc-ieee1275.rmk: Likewise.
11859 * conf/sparc64-ieee1275.rmk: Likewise.
11860
11861 * util/grub-emu.c (main): Fix unchecked pointer handling.
11862
2c2a681b 118632007-07-02 Robert Millan <rmh@aybabtu.com>
11864
11865 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11866 invocation to fail, in order to support partition-less media.
11867
11868 * util/i386/pc/grub-install.in: Likewise.
11869
11870 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11871 which fs or partmap modules are needed (akin to its sister scripts).
11872
11873 Also use grub-probe to get rid of unportable /proc/mounts check.
11874
11875 Print the same informational message that the other scripts do, before
fe6b695a 11876 exiting.
2c2a681b 11877
6193defe 118782007-06-23 Robert Millan <rmh@aybabtu.com>
11879
fe6b695a 11880 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 11881 a font file can be found and, if so, echo the GRUB path to it.
11882
11883 * util/update-grub.in: Handle multiple terminals depending on user
11884 input, platform availability and font file presence. Propagate
11885 variables of our findings to /etc/grub.d/ children.
11886
11887 * util/grub.d/00_header.in: Handle multiple terminals, based on
11888 environment setup by update-grub.
11889
eface1dc 118902007-06-23 Robert Millan <rmh@aybabtu.com>
11891
ba50d28f 11892 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 11893
bf697e28 118942007-06-21 Robert Millan <rmh@aybabtu.com>
11895
11896 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11897 indicate end of data section in kernel image.
11898 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11899 GRUB_KERNEL_MACHINE_DATA_END.
11900
11901 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11902 space for it.
11903 * kern/i386/efi/startup.S: Likewise.
11904
11905 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11906 during image generation. Implement --prefix option to override this
11907 patch.
11908 * util/i386/efi/grub-mkimage.c: Likewise.
11909
11910 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11911 code to make path relative to its root into a separate function.
11912
11913 * util/i386/pc/grub-install.in: Use newly provided
11914 make_system_path_relative_to_its_root() to convert ${grubdir}, then
11915 pass the result to grub-install --prefix.
11916
baa574b4 119172007-06-13 Robert Millan <rmh@aybabtu.com>
11918
11919 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11920 DEFAULT_DEVICE_MAP.
11921 * util/grub-emu.c: Use above definitions from misc.h instead of
11922 defining them.
11923 * util/grub-mkdevicemap.c: Likewise.
11924 * util/i386/pc/grub-setup.c: Likewise.
11925 * util/grub-probe.c: Likewise.
11926 (probe): Abort with grub_util_error() when either
11927 grub_guess_root_device or grub_util_get_grub_dev fails.
11928
0215dcbf 119292007-06-12 Robert Millan <rmh@aybabtu.com>
11930
11931 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11932 "pager" assignment.
11933 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11934 "pcdata".
11935 * util/grub-probe.c (probe): Likewise for "drive_name".
11936
8af2ab7b 119372007-06-11 Robert Millan <rmh@aybabtu.com>
11938
11939 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11940 not just the cdrom one.
11941
59d31694 119422007-06-11 Robert Millan <rmh@aybabtu.com>
11943
11944 * util/i386/pc/grub-mkrescue.in: Add "set -e".
11945 Add --pkglibdir=DIR option to override pkglibdir.
11946 Mention --image-type=TYPE in help output.
11947 Fix --grub-mkimage (it was a no-op).
fe6b695a 11948 Abort gracefully when no parameter is given.
59d31694 11949
7ee367e4 119502007-06-11 Robert Millan <rmh@aybabtu.com>
11951
11952 * util/i386/pc/grub-mkrescue.in: New file.
11953 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
11954 * Makefile.in: Handle bin_SCRIPTS.
11955
29b0ed46 119562007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
11957
11958 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11959 list of video modes.
11960
c0f90770 119612007-06-06 Robert Millan <rmh@aybabtu.com>
11962
11963 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11964 file doesn't exist, or if it is in a filesystem grub can't read.
11965
11966 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
11967 not abort if GRUB_DRIVE could not be defined. Rearrange generated
11968 header comment to fit in 80 columns when the variables are resolved.
11969
11970 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11971 could be identified by update-grub. Remove redundant check for
fe6b695a 11972 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 11973 handles that).
11974
fb36dc26 119752007-06-04 Robert Millan <rmh@aybabtu.com>
11976
11977 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11978
11979 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11980
11981 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11982
0c68c93e 119832007-06-04 Robert Millan <rmh@aybabtu.com>
11984
11985 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11986
11987 * include/grub/partition.h: Declare grub_apple_partition_map_init and
11988 grub_apple_partition_map_fini.
11989
11990 * util/biosdisk.c
11991 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11992 to access >2 TiB disks).
11993
11994 Print disk->total_sectors with %llu instead of %lu, since this
11995 variable is always 64-bit (prevents wrong disk size from being displayed
11996 on either >2 TiB disk or big-endian CPU).
11997
11998 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11999 into a generic case that supports all (sane) partition maps.
12000
12001 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
12002 breaks big-endian.
12003
12004 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
12005 and grub_apple_partition_map_fini() after that.
12006
0f23eb74 120072007-06-01 Robert Millan <rmh@aybabtu.com>
12008
12009 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
12010
12011 * util/grub.d/00_header.in: Only enable gfxterm when
12012 convert_system_path_to_grub_path() succeeds.
12013
42c71976 120142007-05-20 Robert Millan <rmh@aybabtu.com>
12015
12016 * util/update-grub_lib.in: New file.
12017 * DISTLIST: Add update-grub_lib.in.
12018 * conf/common.rmk: Generate update-grub_lib and install it in
12019 $(lib_DATA).
12020 * Makefile.in: Add install routine for $(lib_DATA).
12021
12022 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
12023 function provided by update-grub_lib to support arbitrary paths of
12024 unifont.pff.
12025 * util/update-grub.in: Use convert_system_path_to_grub_path() to
12026 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
12027
5beb2291 120282007-05-19 Robert Millan <rmh@aybabtu.com>
12029
12030 * commands/i386/cpuid.c: New module.
12031 * DISTLIST: Add it.
12032 * conf/i386-efi.rmk: Enable cpuid.mod.
12033 * conf/i386-pc.rmk: Likewise.
12034
7262eca1 120352007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
12036
12037 * kern/disk.c (grub_disk_read): Check return value of
12038 grub_realloc().
12039
260ba823 120402007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
12041
12042 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
12043 arrays.
12044 * disk/raid.c (grub_raid_open): Likewise.
12045
1ecb6cf2 120462007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
12047
12048 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
12049 stack instead of on the heap.
12050
12051 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
12052 before doing a read on it.
12053
12054 * configure.ac: Only use -fno-stack-protector for the target
12055 environment.
f19dbdb7 12056
21c8cbb1 120572007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
12058
12059 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
12060 __attribute_ ((unused)) to mode_type argument.
12061
12062 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 12063
21c8cbb1 12064 * kern/misc.c (memcmp): Fix prototype.
12065
12066 * include/grub/partition.h [GRUB_UTIL]
12067 (grub_gpt_partition_map_init): Add prototype.
12068 (grub_gpt_partition_map_fini): Likewise.
12069
12070 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
12071 at the right place.
12072
12073 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
12074 (grub_fat_read_data): Likewise.
12075 (grub_fat_find_dir): Likewise.
12076
12077 * font/manager.c (find_glyph): Make table a const.
12078 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 12079
849d55d3 120802007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
12081
12082 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
12083 code, first search for device in /dev/mapper, then in /dev.
12084 (grub_util_get_grub_dev): New function.
12085 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
12086 prototype.
12087 * util/grub-probe.c (probe): Remove check for RAID, call
12088 grub_util_get_grub_dev() instead of
12089 grub_util_biosdisk_get_grub_dev().
12090 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
12091 grub_util_biosdisk_get_grub_dev().
12092 * util/i386/pc/grub-setup.c (main): Likewise.
12093
8fff7c2f 120942007-05-16 Robert Millan <rmh@aybabtu.com>
12095
12096 * DISTLIST: Update for the latest changes.
12097 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
12098 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
12099 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
12100 grub/util/biosdisk.h.
12101 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
12102 grub/util/biosdisk.h.
12103
48e12b52 121042007-05-16 Robert Millan <rmh@aybabtu.com>
12105
12106 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
12107
46b9d128 121082007-05-16 Robert Millan <rmh@aybabtu.com>
12109
12110 * util/i386/efi/grub-install.in: New.
12111 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
12112 newly added grub-install.
12113 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
12114 include.
12115 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
12116 grub/util/biosdisk.h.
12117 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
12118 grub/util/biosdisk.h.
12119
2d1a40a9 121202007-05-16 Robert Millan <rmh@aybabtu.com>
12121
12122 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
12123 * include/grub/util/biosdisk.h: ... here.
12124 * util/i386/pc/biosdisk.c: Moved to ...
12125 * util/biosdisk.c: ... here.
12126 * util/i386/pc/getroot.c: Moved to ...
12127 * util/getroot.c: ... here.
12128 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
12129 * util/grub-mkdevicemap.c: ... here.
12130 * util/i386/pc/grub-probe.c: Moved to ...
12131 * util/grub-probe.c: ... here.
12132
9e26e3bc 121332007-05-15 Robert Millan <rmh@aybabtu.com>
12134
12135 * util/update-grub.in: Remove duplicated line in grub.cfg header
12136 message.
12137
57f96397 121382007-05-13 Robert Millan <rmh@aybabtu.com>
12139
12140 * util/update-grub.in: Fix a few assumptions about the devices holding
12141 /, /boot and /boot/grub being the same.
12142 * util/grub.d/00_header.in: Likewise.
12143 * util/grub.d/10_hurd.in: Likewise.
12144 * util/grub.d/10_linux.in: Likewise.
12145
12146 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
12147 patterns. Use that to define the `.old' suffix as older than `'.
12148
12149 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
12150
12151 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
12152 the grub.cfg header message.
12153
2e610d62 121542007-05-11 Robert Millan <rmh@aybabtu.com>
12155
12156 * util/update-grub.in: Create device.map if it doesn't already exist,
12157 before attempting to run grub-probe.
12158 Check for grub-probe and grub-mkdevicemap with the same code
12159 grub-install is using.
12160 Remove test mode.
12161
3f6a10ef 121622007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
12163
12164 * Makefile.in: Add the datarootdir autoconf variable.
12165
02e7b75e 121662007-05-09 Robert Millan <rmh@aybabtu.com>
12167
12168 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 12169 fail gracefully if dev->disk->partition == NULL.
02e7b75e 12170
75f396cc 121712007-05-07 Robert Millan <rmh@aybabtu.com>
12172
12173 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
12174 determine partition map module.
12175 * util/i386/pc/grub-install.in: Use this feature to decide which
12176 partition module to load, instead of hardcoding pc and gpt.
12177
da65cb36 121782007-05-07 Robert Millan <rmh@aybabtu.com>
12179
12180 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
12181 source directory differs from build directory.
12182
b57d6a91 121832007-05-05 Robert Millan <rmh@aybabtu.com>
12184
12185 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
12186 initialisation.
12187
509d00f1 121882007-05-05 Robert Millan <rmh@aybabtu.com>
12189
12190 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
12191
c48f23ef 121922007-05-05 Robert Millan <rmh@aybabtu.com>
12193
12194 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
12195 command-line arguments via ${GRUB_CMDLINE_LINUX}.
12196
20b97658 121972007-05-05 Robert Millan <rmh@aybabtu.com>
12198
12199 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
12200 (grub_probe_SOURCES): Likewise.
12201 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
12202 GPT and initialize dos_part and bsd_part accordingly.
12203 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
12204 install_bsd_part.
12205 (main): Activate gpt module for use during partition identification,
12206 and deactivate it afterwards.
12207 * util/i386/pc/grub-install.in: Add gpt module to core.img.
12208 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
12209 partition identification, and deactivate it afterwards.
12210
99123174 122112007-05-05 Robert Millan <rmh@aybabtu.com>
12212
12213 * term/i386/pc/console.c (grub_console_fini): Call
12214 grub_term_set_current() before grub_term_unregister().
12215
ebd97f6e 122162007-05-04 Robert Millan <rmh@aybabtu.com>
12217
12218 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
12219 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
12220 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
12221 and update-grub_DATA.
12222 * conf/common.rmk: Build and install update-grub components.
12223 * conf/common.mk: Regenerate.
12224 * util/update-grub.in: New. Core of update-grub.
12225 * util/grub.d/00_header.in: New. Generates grub.cfg header.
12226 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
12227 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
12228 * util/grub.d/README: New. Document grub.d directory layout.
12229
b06a264d 122302007-05-01 Robert Millan <rmh@aybabtu.com>
12231
12232 * util/grub-emu.c: Move initialization functions
12233 grub_util_biosdisk_init() and grub_init_all() before
12234 grub_util_biosdisk_get_grub_dev(), which relies on them.
12235
41f0050e 122362007-04-19 Robert Millan <rmh@aybabtu.com>
12237
12238 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
12239 it is used later.
12240
04582bb3 122412007-04-18 Jerone Young <jerone@gmail.com>
12242
f19dbdb7 12243 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 12244 stanza.
12245
08db4632 122462007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 12247
08db4632 12248 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
12249 continue on and look for device node with real device name.
12250
801b76be 122512007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 12252
fe6b695a 12253 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 12254 ability.
12255 * Makefile.in: Add autoconf package transformation code.
12256 * util/i386/pc/grub-install.in: Likewise.
12257 * util/powerpc/ieee1275/grub-install.in: Likewise.
12258
6795c4e1 122592007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
12260
12261 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
12262 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
12263 (EXT2_REVISION): Likewise.
12264 (EXT2_INODE_SIZE): Likewise.
12265 (struct grub_ext2_block_group): Added a missing member
12266 "used_dirs".
12267 (grub_ext2_read_inode): Divide by the inode size in a superblock
12268 instead of 128 to obtain INODES_PER_BLOCK.
12269 Use the macro EXT2_INODE_SIZE instead of directly using
12270 SBLOCK->INODE_SIZE.
12271
d70af616 122722007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
12273
12274 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
12275 superblock instead of the structure size to compute an
12276 offset. This fixes the problem that GRUB could not read a
12277 filesystem when inode size is different from 128-byte.
12278
3b801603 122792007-03-05 Marco Gerards <marco@gnu.org>
12280
12281 * normal/main.c (read_config_file): When "menu" is not set, create
12282 an initial context.
12283
4785bfe4 122842007-02-21 Hollis Blanchard <hollis@penguinppc.org>
12285
12286 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
12287 (HEAP_LIMIT): New macro.
12288 (grub_claim_heap): Claim memory up to `heaplimit'.
12289
a0cbb023 122902007-02-21 Hollis Blanchard <hollis@penguinppc.org>
12291
12292 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
12293 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
12294 (_start): Likewise.
12295 (grub_arch_modules_addr): Return address after `_end'.
12296 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
12297 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
12298 (add_segments): Calculate `_end' from phdr size and location.
12299 (ALIGN_UP): Moved to ...
12300 * include/grub/misc.h: here.
12301 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
12302 New macro.
12303 (GRUB_IEEE1275_MODULE_BASE): Removed.
12304
fd7d8eba 123052007-02-20 Hollis Blanchard <hollis@penguinppc.org>
12306
12307 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
12308 loop boundary.
12309
9b09e6fc 123102007-02-20 Hollis Blanchard <hollis@penguinppc.org>
12311
12312 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
12313 All users updated.
12314 (grub_elf64_load_hook_t): Likewise.
12315 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
12316 debug output.
12317
3ce27299 123182007-02-20 Hollis Blanchard <hollis@penguinppc.org>
12319
12320 * kern/mm.c: Update copyright.
12321 (grub_mm_debug): Correct syntax error.
12322 (grub_mm_dump_free): New function.
12323 (grub_debug_free): Call `grub_free'.
12324 * include/grub/mm.h: Update copyright.
12325 (grub_mm_dump_free): Add declaration.
12326
077d5fee 123272007-02-12 Hollis Blanchard <hollis@penguinppc.org>
12328
12329 * include/grub/ieee1275/ieee1275.h: Update copyright.
12330 * kern/powerpc/ieee1275/init.c: Likewise.
12331 * kern/powerpc/ieee1275/openfw.c: Likewise.
12332
12333 * loader/powerpc/ieee1275/linux.c: Likewise.
12334 * include/grub/elfload.h: Likewise.
12335 * kern/elf.c: Likewise.
12336 (grub_elf32_load): Pass `base' and `size' parameters. Update all
12337 callers.
12338 (grub_elf64_load): Likewise.
12339 (grub_elf32_load_segment): Move to a nested function.
12340 (grub_elf64_load_segment): Likewise.
12341
dc946850 123422007-02-12 Hollis Blanchard <hollis@penguinppc.org>
12343
12344 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
12345 prototype.
12346 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
12347 (grub_heap_len): Likewise.
12348 (HEAP_SIZE): New macro.
12349 (grub_claim_heap): New function.
12350 (grub_machine_init): Don't claim heap directly. Call
12351 `grub_claim_heap'.
12352 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
12353 (grub_available_iterate): New function.
12354
baa2a121 123552007-02-03 Thomas Schwinge <tschwinge@gnu.org>
12356
12357 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
12358 * configure.ac: Use it for testing the HOST and TARGET compilers.
12359
4fe9862e 123602006-12-13 Thomas Schwinge <tschwinge@gnu.org>
12361
12362 * Makefile.in (enable_grub_emu): New variable.
12363 * configure.ac (--enable-grub-emu): New option.
12364 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
12365 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
12366 * conf/i386-pc.rmk: Likewise.
12367 * conf/powerpc-ieee1275.rmk: Likewise.
12368 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
12369
a8aa5762 123702006-12-12 Marco Gerards <marco@gnu.org>
12371
12372 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
12373
12374 * kern/env.c (grub_env_unset): Don't free the member `value' when
12375 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
12376 pointer.
12377
12378 * normal/main.c (current_menu): Removed.
12379 (free_menu): Unset the `menu' environment variable.
12380 (grub_normal_menu_addentry): Make use of the environment variable
12381 `menu', instead of using the global `current_menu'. Allocate
12382 memory for the sourcecode of this entry.
12383 (read_config_file): New argument `nested', changed all callers.
12384 Only in the case of a new context, initialize a new menu. Set the
12385 `menu' environment variable.
12386 (grub_normal_execute): Don't set and unset the environment
12387 variable `menu' here anymore. Only free the menu when leaving the
12388 context.
12389
12390 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
12391 leak.
12392
957b3a3e 123932006-12-11 Marco Gerards <marco@gnu.org>
12394
12395 * normal/menu_entry.c (run): Fix off by one bug so the last line
12396 is executed. Move the loader check to outside the loop.
12397
ef875714 123982006-12-08 Hollis Blanchard <hollis@penguinppc.org>
12399
12400 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
12401
4e739985 124022006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
12403
12404 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
12405 the number of sectors. Reported by Andrey Shuvikov
12406 <mr_hyro@yahoo.com>.
f19dbdb7 12407
790707f2 124082006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
12409
12410 * kern/disk.c (grub_disk_read): When there is a read error, always
12411 try to read only the necessary data.
f19dbdb7 12412
790707f2 12413 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
12414 disk/raid.c.
12415 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
12416 prototype.
12417 [GRUB_UTIL] (grub_raid_fini): Likewise.
12418 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 12419 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 12420 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
12421 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
12422 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
12423 and grub_raid_fini().
f19dbdb7 12424
03e58196 124252006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
12426
12427 * include/grub/types.h (__unused): Rename to UNUSED.
12428 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
12429 (grub_elf64_size): Likewise.
f19dbdb7 12430
ae4f23bf 124312006-11-03 Hollis Blanchard <hollis@penguinppc.org>
12432
12433 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
12434 grub_error_push and grub_error_pop in the error-handling path.
12435 (grub_elf32_load_segment): Only call grub_file_read with non-zero
12436 length.
12437
2166cc83 124382006-11-03 Hollis Blanchard <hollis@penguinppc.org>
12439
12440 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
12441 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
12442 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12443 (kernel_elf_SOURCES): Likewise.
12444 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
12445 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
12446 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
12447 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
12448 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
12449 (elf_mod_SOURCES): New variable.
12450 (elf_mod_CFLAGS): Likewise.
12451 (elf_mod_LDFLAGS): Likewise.
12452 * include/grub/types.h (__unused): New macro.
12453 * include/grub/elfload.h: New file.
12454 * kern/elf.c: Likewise.
12455 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
12456 (ELF32_LOADMASK): New macro.
12457 (ELF64_LOADMASK): Likewise.
12458 (vmlinux): Removed.
12459 (grub_linux_load32): New function.
12460 (grub_linux_load64): Likewise.
12461 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
12462 Use grub_elf_t instead of grub_file_t.
12463
a09d5aa5 124642006-11-02 Hollis Blanchard <hollis@penguinppc.org>
12465
12466 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
12467 `catch_result' to struct set_color_args.
12468
d976fc51 124692006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
12470
12471 * normal/menu.c: Include grub/script.h.
12472 * normal/menu_entry.c: Likewise.
12473 * include/grub/normal.h: Do not include grub/script.h.
12474
67507549 124752006-10-27 Hollis Blanchard <hollis@penguinppc.org>
12476
12477 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
12478
69203a99 124792006-10-27 Hollis Blanchard <hollis@penguinppc.org>
12480
12481 * kern/disk.c (grub_disk_open): Print debug messages when opening a
12482 disk.
12483 (grub_disk_close): Print debug messages when closing a disk.
12484 (grub_disk_read): Print debug messages when disk read fails.
12485 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
12486 filesystem type.
12487 * kern/partition.c: Include misc.h.
12488 (grub_partition_iterate): Print debug messages when detecting
12489 partition type.
12490
e2b8278c 124912006-10-27 Hollis Blanchard <hollis@penguinppc.org>
12492
12493 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
12494 is negative.
12495 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
12496
97b2f2ff 124972006-10-26 Hollis Blanchard <hollis@penguinppc.org>
12498
12499 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12500 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
12501
6555d655 125022006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
12503
12504 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
12505 instead of sizeof(lv). Patch by Michael Guntsche.
12506
4d42b77f 125072006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
12508
12509 * disk/lvm.c: Rename VGS to VG_LIST.
12510 (grub_lvm_iterate): Change VGS->LV to VG-LV.
12511 (grub_lvm_open): Likewise.
12512 Thanks to Michael Guntsche for finding this bug.
12513
5d74d927 125142006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12515
12516 * configure.ac (AC_INIT): Bumped to 1.95.
12517
a1bb27e4 125182006-10-14 Robert Millan <rmh@aybabtu.com>
12519
12520 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
12521 with "/dev/.static/dev/md".
12522
e0994b8b 125232006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
12524
12525 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
12526 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
12527 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
12528 DRIVE_NAME are always freed.
12529
12530 * util/i386/pc/biosdisk.c (make_device_name): Add one into
12531 DOS_PART, as a DOS partition is counted from one instead of zero
12532 now. Reported by Robert Millan.
12533
ddd5cee9 125342006-10-14 Robert Millan <rmh@aybabtu.com>
12535
12536 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
12537 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
12538 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
12539 string returned by grub_guess_root_device.
12540 * util/i386/pc/grub-setup.c: Likewise.
12541 * util/i386/pc/grub-probefs.c: Likewise.
12542
12543 * util/i386/pc/grub-probefs.c: Rename to ...
12544 * util/i386/pc/grub-probe.c: ... this.
12545 * DISTLIST: Remove grub-probefs, add grub-probe.
12546 * conf/i386-efi.rmk: Likewise.
12547 * conf/i386-pc.rmk: Likewise.
12548 * util/i386/pc/grub-install.in: Likewise.
12549
12550 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
12551 choose which information we want to print.
12552
2b002173 125532006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
12554
12555 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
12556 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
12557 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
12558 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
12559 video/readers/tga.c and video/i386/pc/vbeutil.c.
12560
125612006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
12562
12563 Added support for RAID and LVM.
f19dbdb7 12564
2b002173 12565 * disk/lvm.c: New file.
12566 * disk/raid.c: Likewise.
12567 * include/grub/lvm.h: Likewise.
f19dbdb7 12568 * include/grub/raid.h: Likewise.
2b002173 12569 * include/grub/util/lvm.h: Likewise.
12570 * include/grub/util/raid.h: Likewise.
12571 * util/lvm.c: Likewise.
12572 * util/raid.c: Likewise.
12573
12574 * include/grub/disk.h (grub_disk_dev_id): Add
12575 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
12576 (grub_disk_get_size): New prototype.
12577 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
12578 returns a partition.
12579 (grub_disk_get_size): New function.
f19dbdb7 12580
2b002173 12581 * kern/i386/pc/init.c (make_install_device): Copy the prefix
12582 verbatim if grub_install_dos_part is -2.
12583
12584 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
12585 and LVM devices.
12586
12587 * util/i386/pc/grub-setup.c (setup): New argument
12588 MUST_EMBED. Force embedding of GRUB when the argument is
12589 true. Close FILE before returning.
12590 (main): Add support for RAID and LVM.
f19dbdb7 12591
2b002173 12592 * conf/common.rmk: Add RAID and LVM modules.
12593 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
12594 util/lvm.c.
12595 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
12596
12597 * kern/misc.c (grub_strstr): New function.
12598 * include/grub/misc.h (grub_strstr): New prototype.
12599
050548d0 126002006-10-10 Tristan Gingold <tristan.gingold@bull.net>
12601
12602 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
12603
da849d2d 126042006-10-05 Tristan Gingold <tristan.gingold@bull.net>
12605
12606 * kern/misc.c (grub_strtoull): Guess the base only if not
12607 specified.
12608
97b2f2ff 126092006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 12610
12611 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
12612 PowerMac support.
12613
97b2f2ff 126142006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 12615
12616 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
12617
12618 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
12619 Remove `flags' argument. All callers changed.
12620 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
12621 (IEEE1275_IHANDLE_INVALID): New variable.
12622 (IEEE1275_CELL_INVALID): New variable.
12623 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
12624 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
12625 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
12626 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
12627 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
12628 codes from Open Firmware. All callers updated.
12629 (grub_ieee1275_next_property): Directly return Open Firmware return
12630 code.
12631 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
12632 Standardize error checking from `grub_ieee1275_get_property'.
12633 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
12634 `devalias' to `aliases'. Correct comments. Consolidate error paths.
12635
97b2f2ff 126362006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 12637
12638 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
12639 `instance_to_package_args' to `instance_to_path_args'.
12640
12641 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
12642 `grub_ieee1275_chosen'.
12643
12644 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
12645 `grub_ieee1275_interpret'.
12646
97b2f2ff 126472006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 12648
12649 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
12650
97b2f2ff 126512006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 12652
12653 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
12654 (__cmpdi): Likewise.
12655
12656 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
12657 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
12658 `grub_ssize_t'.
12659
02bb8acc 12660 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 12661
12662 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
12663 to type `grub_ssize_t'.
12664 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
12665
7f9a8531 126662006-09-22 Marco Gerards <marco@gnu.org>
12667
12668 * normal/script.c (grub_script_create_cmdmenu): Skip leading
12669 newlines.
12670
b5ef1102 126712006-09-22 Marco Gerards <marco@gnu.org>
12672
12673 * commands/echo.c: New file.
12674
12675 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
12676
12677 * conf/common.rmk (echo_mod_SOURCES): New variable.
12678 (echo_mod_CFLAGS): Likewise.
12679 (echo_mod_LDFLAGS): Likewise.
12680
2cff3677 126812006-09-22 Marco Gerards <marco@gnu.org>
12682
12683 * normal/main.c (get_line): Malloc memory instead of using
12684 preallocated memory. Removed the arguments `cmdline' and
12685 `max_len'. Updated all callers.
12686
6ba4688b 126872006-09-22 Marco Gerards <marco@gnu.org>
12688
12689 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
12690 (normal_mod_DEPENDENCIES): Likewise.
12691
12692 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
12693 (normal_mod_DEPENDENCIES): Likewise.
12694
12695 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
12696
e02ac02c 126972006-09-22 Johan Rydberg <jrydberg@gnu.org>
12698
12699 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
12700 programs.
12701 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
12702 (normal_mod_DEPENDENCIES): Likewise.
12703 * conf/i386-pc.mk: Regenerate.
12704 * conf/i386-efi.mk: Likewise
12705 * conf/common.mk: Likewise.
12706 * conf/powerpc-ieee1275.mk: Likewise.
12707 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 12708
8d252e44 127092006-09-22 Robert Millan <rmh@aybabtu.com>
12710
12711 Sync with i386 version.
12712 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
12713 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
12714
209bf7ac 127152006-09-21 Robert Millan <rmh@aybabtu.com>
12716
12717 Import from GRUB Legacy (lib/device.c):
12718 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
12719 (init_device_map) [__linux__]: Add support for I2O devices.
12720
6b146090 127212006-09-14 Marco Gerards <marco@gnu.org>
12722
12723 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
12724 `-melf_i386'.
12725
e38600a8 127262006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 12727
12728 * util/i386/pc/grub-install.in: Skip menu.lst when removing
12729 /boot/grub/*.lst.
78fa1790 12730
2952da5d 12731 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 12732
2952da5d 12733 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
12734 before adding it to device.map.
12735
01b82a64 127362006-08-15 Johan Rydberg <jrydberg@gnu.org>
12737
fe6b695a 12738 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 12739 compiles a file; using the -MD option.
12740 * conf/common.mk: Regenerate.
12741 * conf/i386-pc.mk: Likewise.
12742 * conf/i386-efi.mk: Likewise.
12743 * conf/powerpc-ieee1275.mk: Likewise.
12744 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 12745
1064790d 127462006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
12747
12748 Move the prototypes of grub_setjmp and grub_longjmp to
12749 cpu/setjmp.h, so that each architecture may specify different
12750 attributes.
f19dbdb7 12751
1064790d 12752 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12753 (grub_longjmp): Likewise.
12754 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12755 (grub_longjmp): Likewise.
12756 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12757 (grub_longjmp): Likewise.
12758
12759 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12760 [!GRUB_UTIL] (grub_longjmp): Removed.
12761
29dda3ed 127622006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
12763
12764 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12765 "color!" method does not return any value.
12766
ad2a06ed 127672006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12768
12769 * include/grub/bitmap.h: New file.
12770
12771 * include/grub/i386/pc/vbeutil.h: Likewise.
12772
12773 * video/bitmap.c: Likewise.
12774
12775 * video/readers/tga.c: Likewise.
12776
12777 * video/i386/pc/vbeutil.c: Likewise.
12778
12779 * commands/videotest.c: Code cleanup and updated to reflect to new
12780 video API.
12781
12782 * term/gfxterm.c: Likewise.
12783
12784 * video/video.c: Likewise.
12785
12786 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
12787 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
12788 (bitmap_mod_SOURCES): New entry.
12789 (bitmap_mod_CFLAGS): Likewise.
12790 (bitmap_mod_LDFLAGS): Likewise.
12791 (tga_mod_SOURCES): Likewise.
12792 (tga_mod_CFLAGS): Likewise.
12793 (tga_mod_LDFLAGS): Likewise.
12794
12795 * include/grub/video.h (grub_video_blit_operators): New enum type.
12796 (grub_video_render_target): Changed as forward declaration and moved
12797 actual definition to be video driver specific.
12798 (grub_video_adapter.blit_bitmap): Added blitting operator.
12799 (grub_video_adapter.blit_render_target): Likewise.
12800 (grub_video_blit_bitmap): Likewise.
12801 (grub_video_blit_render_target): Likewise.
12802
12803 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12804 driver specific render target definition.
12805 (grub_video_vbe_map_rgba): Added driver internal helper.
12806 (grub_video_vbe_unmap_color): Updated to use
12807 grub_video_i386_vbeblit_info.
12808 (grub_video_vbe_get_video_ptr): Likewise.
12809
12810 * include/grub/i386/pc/vbeblit.h
12811 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12812 grub_video_i386_vbeblit_info.
12813 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12814 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12815 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12816 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12817 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12818 (grub_video_i386_vbeblit_index_index): Likewise.
12819 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12820 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12821 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12822 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12823 operator.
12824 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12825 operator.
12826
12827 * video/i386/pc/vbeblit.c: Updated to reflect changes on
12828 include/grub/i386/pc/vbeblit.h.
12829
12830 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12831 Updated to use grub_video_i386_vbeblit_info.
12832 (grub_video_i386_vbefill_R8G8B8): Likewise.
12833 (grub_video_i386_vbefill_index): Likewise.
12834 (grub_video_i386_vbefill): Added generic filler.
12835
12836 * video/i386/pc/vbefill.c: Updated to reflect changes on
12837 include/grub/i386/pc/vbefill.h.
12838
12839 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12840 grub_video_i386_vbeblit_info.
12841 (grub_video_vbe_unmap_color): Likewise.
12842 (grub_video_vbe_blit_glyph): Likewise.
12843 (grub_video_vbe_scroll): Likewise.
12844 (grub_video_vbe_draw_pixel): Removed function.
12845 (grub_video_vbe_get_pixel): Likewise.
12846 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12847 updated code to use it.
12848 (common_blitter): Added common blitter for render target and bitmap.
12849 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12850 (grub_video_vbe_blit_render_target): Likewise.
12851
bc8c036d 128522006-07-30 Johan Rydberg <jrydberg@gnu.org>
12853
12854 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12855 is in text mode if there is no console control protocol instance
12856 available.
12857
684a8eff 128582006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12859
12860 * include/grub/video.h: Code cleanup.
12861
12862 * include/grub/i386/pc/vbe.h: Likewise.
12863
12864 * video/i386/pc/vbe.c: Likewise.
12865
12866 * video/i386/pc/vbeblit.c: Likewise.
12867
12868 * video/i386/pc/vbefill.c: Likewise.
12869
12870 * video/video.c: Likewise. Also added more comments.
12871
5915059b 128722006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12873
12874 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12875 (struct grub_biosdisk_dap): Likewise.
12876
12877 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
12878 linkage settings for all functions.
12879
90ce5d56 128802006-07-12 Marco Gerards <marco@gnu.org>
12881
12882 * configure.ac (--enable-mm-debug): Fix typo.
12883
12884 * genkernsyms.sh.in: Use proper quoting for `CC'.
12885
43e7f879 128862006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
12887
12888 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12889 (normal_mod_ASFLAGS): Remove "-m32".
12890
4889bdec 128912006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
12892
12893 * util/misc.c: Include config.h.
12894 [!HAVE_MEMALIGN]: Do not include malloc.h.
12895 (grub_memalign): Use posix_memalign, if present. Then, use
12896 memalign, if present. Otherwise, emit an error.
12897
12898 * util/grub-emu.c: Do not include malloc.h.
12899
12900 * include/grub/util/misc.h: Include unistd.h. This is required for
12901 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12902 D. Eades III <hde@foobar-qux.org>.
12903
12904 * configure.ac (AC_GNU_SOURCE): Added.
12905 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12906 type.
12907
fd39d4da 129082006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
12909
12910 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12911 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12912
b786f3b5 129132006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
12914
12915 * include/grub/types.h (grub_host_addr_t): Rename to
12916 grub_target_addr_t.
12917 (grub_host_off_t): Rename to grub_target_off_t.
12918 (grub_host_size_t): Rename to grub_target_size_t.
12919 (grub_host_ssize_t): Rename to grub_target_ssize_t.
12920 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12921
12922 * include/grub/kernel.h (struct grub_module_header): Change type
12923 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12924 (grub_module_info): Likewise.
f19dbdb7 12925
051988bb 129262006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12927
12928 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12929 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12930 Velazquez <jesus.velazquez@gmail.com>.
12931
deae281b 129322006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
12933
12934 Count partitions from 1 instead of 0 in the string representation
12935 of partitions. Still use 0-based internally.
f19dbdb7 12936
deae281b 12937 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12938 (sun_partition_map_iterate): Use grub_partition_t instead of
12939 struct grub_partition *. Cast DESC->START_CYLINDER to
12940 grub_uint64_t after converting the endian.
12941 (sun_partition_map_probe): Subtract 1 for PARTNUM.
12942 (sun_partition_map_get_name): Add 1 to P->INDEX.
12943
12944 * partmap/pc.c (grub_partition_parse): Subtract 1 for
12945 PCDATA->DOS_PART.
12946 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12947
12948 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12949 zero instead of one.
12950 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12951 (gpt_partition_map_get_name): Add 1 into P->INDEX.
12952
12953 * partmap/apple.c (apple_partition_map_iterate): Change the type
12954 of POS to unsigned.
12955 (apple_partition_map_probe): Subtract 1 for PARTNUM.
12956 (apple_partition_map_get_name): Add 1 into P->INDEX.
12957
12958 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12959 of POS to unsigned.
12960 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12961 calculate the offset of a partition.
12962 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12963 (amiga_partition_map_get_name): Add 1 into P->INDEX.
12964
12965 * partmap/acorn.c (acorn_partition_map_find): Change the type of
12966 SECTOR to grub_disk_addr_t.
12967 (acorn_partition_map_iterate): Likewise.
12968 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12969 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12970 top.
12971 (acorn_partition_map_get_name): Add 1 into P->INDEX.
12972
12973 * kern/i386/pc/init.c (make_install_device): Add 1 into
12974 GRUB_INSTALL_DOS_PART.
12975
12976 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12977 conditional.
12978
524a1e6a 129792006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
12980
12981 Clean up the code to support 64-bit addressing in disks and
12982 files. This change is not enough for filesystems yet.
f19dbdb7 12983
524a1e6a 12984 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12985 type of "start" to grub_uint64_t.
12986 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12987 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12988 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12989 convert addresses.
12990
12991 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12992 to grub_disk_addr_t.
12993
12994 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12995 string.
12996
12997 * partmap/pc.c (pc_partition_map_iterate): Likewise.
12998
12999 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
13000 to char *.
13001
13002 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
13003
13004 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
13005
13006 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
13007
13008 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
13009 to grub_off_t, to detect an error from grub_file_seek.
13010 (grub_multiboot_load_elf32): Likewise.
13011
13012 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
13013 maximum unsigned long value when an overflow is detected.
13014 (grub_strtoull): New function.
13015 (grub_divmod64): Likewise.
13016 (grub_lltoa): use grub_divmod64.
13017
13018 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
13019 grub_disk_addr_t.
13020 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
13021 the pointer to next character. Use grub_strtoull instead of
13022 grub_strtoul.
13023 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
13024 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
13025 respectively.
13026
fe6b695a 13027 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 13028 return value is signed.
13029 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
13030 test if OFFSET is less than zero, as OFFSET is unsigned now.
13031
13032 * kern/disk.c (struct grub_disk_cache): Change the type of
13033 "sector" to grub_disk_addr_t.
13034 (grub_disk_cache_get_index): Change the type of SECTOR to
13035 grub_disk_addr_t. Calculate the hash with SECTOR casted to
13036 unsigned after shifting.
13037 (grub_disk_cache_invalidate): Change the type of SECTOR to
13038 grub_disk_addr_t.
13039 (grub_disk_cache_unlock): Likewise.
13040 (grub_disk_cache_store): Likewise.
13041 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
13042 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
13043 grub_disk_addr_t and grub_uint64_t, respectively.
13044 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
13045 body, as the value of OFFSET is tweaked by
13046 grub_disk_check_range. Change the types of START_SECTOR, LEN and
13047 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
13048 respectively.
13049 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
13050 body, as the value of OFFSET is tweaked by
13051 grub_disk_check_range. Change the types of LEN and N to
13052 grub_size_t.
13053
13054 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
13055 and "saved_offset" to grub_off_t.
13056 (test_header): Cast BUF to char *.
13057 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
13058 to char *.
13059 (grub_gzio_read): Change the types of OFFSET and SIZE to
13060 grub_off_t and grub_size_t, respectively.
13061
13062 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
13063 Removed.
13064 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
13065 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
13066 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
13067 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
13068 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
13069
13070 * include/grub/types.h (grub_off_t): Unconditionally set to
13071 grub_uint64_t.
13072 (grub_disk_addr_t): Changed to grub_uint64_t.
13073
13074 * include/grub/partition.h (struct grub_partition): Change the
13075 types of "start", "len" and "offset" to grub_disk_addr_t,
13076 grub_uint64_t and grub_disk_addr_t, respectively.
13077 (grub_partition_get_start): Return grub_disk_addr_t.
13078 (grub_partition_get_len): Return grub_uint64_t.
13079
13080 * include/grub/misc.h (grub_strtoull): New prototype.
13081 (grub_divmod64): Likewise.
13082
13083 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
13084 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
13085 grub_off_t, respectively.
13086 All callers and references changed.
13087
13088 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
13089 grub_size_t in "read".
13090 All callers and references changed.
13091
13092 * include/grub/file.h (struct grub_file): Change the types of
13093 "offset" and "size" to grub_off_t and grub_off_t,
13094 respectively. Change the type of SECTOR to grub_disk_addr_t in
13095 "read_hook".
13096 (grub_file_read): Change the type of LEN to grub_size_t.
13097 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
13098 grub_off_t.
13099 (grub_file_size): Return grub_off_t.
13100 (grub_file_tell): Likewise.
13101 All callers and references changed.
13102
13103 * include/grub/disk.h (struct grub_disk_dev): Change the types of
13104 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
13105 "write".
13106 (struct grub_disk): Change the type of "total_sectors" to
13107 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 13108 "read_hook".
524a1e6a 13109 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
13110 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
13111 (grub_disk_write): Likewise.
13112 All callers and references changed.
13113
13114 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
13115 char * for grub_strncmp to silence gcc.
13116 (grub_iso9660_mount): Likewise.
13117 (grub_iso9660_mount): Likewise.
13118 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
13119 return statement.
13120 (grub_iso9660_iterate_dir): Likewise.
13121 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
13122
13123 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
13124 LEN to grub_disk_addr_t and grub_size_t, respectively.
13125
13126 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
13127
13128 * fs/jfs.c (grub_jfs_read_file): Likewise.
13129
13130 * fs/minix.c (grub_jfs_read_file): Likewise.
13131
13132 * fs/sfs.c (grub_jfs_read_file): Likewise.
13133
13134 * fs/ufs.c (grub_jfs_read_file): Likewise.
13135
13136 * fs/xfs.c (grub_jfs_read_file): Likewise.
13137
13138 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
13139 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
13140 respectively.
13141
13142 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
13143 BLKNR to -1 instead of returning GRUB_ERRNO.
13144 (grub_ext2_read_file): Change the types of SECTOR and
13145 LEN to grub_disk_addr_t and grub_size_t, respectively.
13146
13147 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
13148 LEN to grub_disk_addr_t and grub_size_t, respectively.
13149
13150 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
13151 grub_file_read.
13152
13153 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
13154 string. Do not cast SECTOR explicitly.
13155
13156 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
13157 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
13158 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
13159 grub_disk_addr_t and grub_size_t, respectively. If the sector is
13160 over 2TB and LBA mode is not supported, raise an error.
13161 (get_safe_sectors): New function.
13162 (grub_biosdisk_read): Use get_safe_sectors.
13163 (grub_biosdisk_write): Likewise.
13164
13165 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
13166 (grub_efidisk_write): Likewise.
13167
13168 * disk/loopback.c (delete_loopback): Cosmetic changes.
13169 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
13170 correctly.
13171 (grub_loopback_open): Likewise.
13172 (grub_loopback_read): Likewise. Also, change the type of POS to
13173 grub_off_t, and fix the usage of grub_memset.
13174
13175 * commands/i386/pc/play.c: Include grub/machine/time.h.
13176
13177 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
13178 print FILE->SIZE.
13179
13180 * commands/configfile.c: Include grub/env.h.
13181
13182 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
13183 GRUB_ERRNO directly instead. Change the type of POS to
13184 grub_off_t. Follow the coding standard.
13185
13186 * commands/blocklist.c: Include grub/partition.h.
13187 (grub_cmd_blocklist): Return an error if the underlying device is
13188 not a disk. Take the starting sector of a partition into account,
13189 if a partition is used.
13190
13191 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
13192 a length field.
13193 (lba_mode): Support 64-bit addresses.
13194 (chs_mode): Likewise.
13195 (copy_buffer): Adapted to the new offsets of a length field and a
13196 segment field.
13197 (blocklist_default_start): Allocate 64-bit space.
13198
13199 * boot/i386/pc/boot.S (force_lba): Removed.
13200 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 13201 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 13202 space.
13203 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
13204 is useless.
13205 (lba_mode): Refactored to support a 64-bit address. More size
13206 optimization.
13207 (setup_sectors): Likewise.
13208
53af98ad 132092006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
13210
13211 * DISTLIST: Added include/grub/i386/linux.h. Removed
13212 include/grub/i386/pc/linux.h
13213
13214 * configure.ac (AC_INIT): Bumped to 1.94.
13215
13216 * config.guess: Updated from gnulib.
13217 * config.sub: Likewise.
13218 * install-sh: Likewise.
13219 * mkinstalldirs: Likewise.
13220
b4c1940a 132212006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
13222
13223 * conf/common.rmk (grub_modules_init.lst): Depended on
13224 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
13225 MODSRCFILES.
13226
13227 * genmk.rb (PModule::rule): Reverted the previous change.
13228
cfca1cfd 132292006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
13230
13231 * conf/common.rmk (grub_modules_init.lst): Depends on
13232 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
13233 that the target does not exist before producing.
13234 (grub_modules_init.h): Remove the target before generating.
13235 (grub_emu_init.c): Likewise.
13236
13237 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
13238
aa6d7826 132392006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
13240
13241 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
13242 for the target-specific tests. Make sure that we also have the
13243 up-to-date target variables for those tests.
13244
26c607b9 132452006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
13246
13247 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
13248 (PModule::rule): Likewise.
13249
0162321a 132502006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
13251
13252 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
13253 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
13254 target-specific flags should be prefixed.
13255 (PModule::rule): Likewise.
13256
6c826348 132572006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
13258
13259 * configure.ac (CMP): Check if cmp is available explicitly.
13260
b977bf01 132612006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
13262
13263 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
13264 (target_cpu): New variable.
13265 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 13266
b977bf01 13267 * util/i386/pc/grub-install.in (host_cpu): Removed.
13268 (target_cpu): New variable.
13269 (pkglibdir): Use target_cpu instead of host_cpu.
13270
13271 * util/genmoddep.c: Removed.
f19dbdb7 13272
b977bf01 13273 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
13274 instead of GRUB_HOST_SIZEOF_VOID_P.
13275 * kern/dl.c: Likewise.
13276
13277 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
13278 ...
13279 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
13280 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
13281 (GRUB_TARGET_SIZEOF_LONG): ... this.
13282 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
13283 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
13284 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
13285 to ...
13286 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
13287 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
13288 (GRUB_TARGET_SIZEOF_LONG): ... this.
13289 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
13290 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
13291 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
13292 to ...
13293 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
13294 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
13295 (GRUB_TARGET_SIZEOF_LONG): ... this.
13296 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
13297 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
13298
13299 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
13300 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
13301 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
13302 instead of GRUB_HOST_SIZEOF_LONG.
13303 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
13304 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
13305 GRUB_CPU_WORDS_BIGENDIAN.
13306 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
13307 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
13308 grub_host_ssize_t.
13309
13310 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
13311 (genmoddep_SOURCES): Likewise.
13312 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
13313 (genmoddep_SOURCES): Likewise.
13314 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
13315 (genmoddep_SOURCES): Likewise.
13316 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
13317 Likewise.
13318 (genmoddep_SOURCES): Likewise.
13319
13320 * genmoddep.awk: New file.
13321
13322 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
13323 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
13324 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
13325 (PModule::rule): Likewise.
13326 (Program::rule): Likewise.
13327 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
13328 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
13329 respectively.
13330
13331 * configure.ac: Rewritten intensively to use host and target
13332 instead of build and host, respectively.
13333
13334 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
13335 (host_cpu): Removed.
13336 (target_cpu): New variable.
13337 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
13338 (BUILD_CC): Removed.
13339 (BUILD_CFLAGS): Likewise.
13340 (BUILD_CPPFLAGS): Likewise.
13341 (TARGET_CC): New variable.
13342 (TARGET_CFLAGS): Likewise.
13343 (TARGET_CPPFLAGS): Likewise.
13344 (TARGET_LDFLAGS): Likewise.
13345 (AWK): Likewise.
13346 (include): Use target_cpu instead of host_cpu.
13347 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 13348
b977bf01 13349 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
13350
f09771a1 133512006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
13352
13353 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
13354 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
13355 field 'false' to 'exec_on_false'.
13356 (grub_script_create_cmdif): Renamed argument names to reflect above
13357 changes.
13358
13359 * normal/execute.c (grub_script_execute_cmdif): Likewise.
13360
13361 * normal/script.c (grub_script_create_cmdif): Likewise.
13362
118f4fb3 133632006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
13364
13365 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
13366 top.
13367 (grub_hfsplus_btree_recptr): Likewise.
13368 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
13369 FILEBLOCK both to pass a block number and store next block
13370 number.
13371 (grub_hfsplus_read_block): Rewritten heavily to support an extent
13372 overflow file correctly. Specify errors appropriately, because
13373 fshelp expects that GRUB_ERRNO is set when fails. Reuse
13374 grub_hfsplus_btree_recptr to get the pointer to a found key.
13375 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
13376 is found.
13377
13378 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
13379 linux.mod.
13380 (_linux_mod_SOURCES): New variable.
13381 (_linux_mod_CFLAGS): Likewise.
13382 (_linux_mod_LDFLAGS): Likewise.
13383 (linux_mod_SOURCES): Likewise.
13384 (linux_mod_CFLAGS): Likewise.
13385 (linux_mod_LDFLAGS): Likewise.
13386
13387 * DISTLIST: Added loader/i386/efi/linux.c,
13388 loader/i386/efi/linux_normal.c and
13389 include/grub/i386/efi/loader.h.
13390
13391 * loader/i386/efi/linux.c: New file.
13392 * loader/i386/efi/linux_normal.c: Likewise.
13393 * include/grub/i386/efi/loader.h: Likewise.
13394
89a7d726 133952006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
13396
13397 * commands/blocklist.c: New file.
13398
13399 * DISTLIST: Added commands/blocklist.c.
13400
13401 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 13402 color for the background, and a darker color for the foreground.
89a7d726 13403 (grub_console_checkkey): Return READ_KEY.
13404 (grub_console_cls): Set the background to
13405 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
13406
13407 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
13408
13409 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
13410 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
13411
13412 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
13413 prototype.
13414
13415 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
13416 BG. The spec is wrong again.
13417
13418 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
13419 prototype.
13420 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
13421
13422 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13423 commands/blocklist.c.
13424 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 13425
89a7d726 13426 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
13427 (blocklist_mod_SOURCES): New variable.
13428 (blocklist_mod_CFLAGS): Likewise.
13429 (blocklist_mod_LDFLAGS): Likewise.
13430
75c8f258 134312006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
13432
13433 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
13434 duplication.
13435 (lba_mode): Use %eax more intensively to reduce the code size.
13436
da2eb181 134372006-05-20 Marco Gerards <marco@gnu.org>
13438
13439 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
13440
13441 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
13442 for `menuentry'.
13443 (script): Accept leading newlines.
13444 (newlines): New rule to describe 0 or more newlines.
13445 (commands): Accept `command' with trailing newline. Fixed the
13446 order in which arguments were passed to `grub_script_add_cmd'.
13447 Accept commands separated by newlines.
13448 (function): Changed to accept newlines.
13449 (menuentry) Rewritten.
13450
13451 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
13452 front of the list, instead of to the end.
13453
577b4050 134542006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
13455
13456 * util/i386/pc/grub-install.in (bindir): New variable.
13457 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
13458 Shaver <lbgwjl@gmail.com>.
13459
0d6e1189 134602006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
13461
13462 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
13463 grub/machine/linux.h
13464 * loader/i386/pc/linux.c: Likewise.
13465
13466 * include/grub/i386/pc/linux.h: Moved to ...
13467 * include/grub/i386/linux.h: ... here.
13468
13469 * include/grub/i386/linux.h (struct linux_kernel_params): New
13470 struct.
f19dbdb7 13471
31b86e9f 134722006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
13473
13474 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
13475 checking.
13476 (grub_video_vbe_blit_glyph): Likewise.
13477 (grub_video_vbe_blit_bitmap): Likewise.
13478 (grub_video_vbe_blit_render_target): Likewise.
13479
83b984de 134802006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
13481
13482 * configure.ac (--with-platform): Properly quote the square
13483 brackets.
13484
5f0413bd 134852006-05-08 Marco Gerards <marco@gnu.org>
13486
13487 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
13488 this...
13489 (kernel_elf_HEADERS): ...to this. Updated all users.
13490 (grubof_symlist.c): Renamed from this...
13491 (kernel_elf_symlist.c): ...to this. Updated all users.
13492 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
13493 (grubof_SOURCES): Renamed from this...
13494 (kernel_elf_SOURCES): ...to this.
13495 (grubof_HEADERS): Renamed from this...
13496 (kernel_elf_HEADERS): ...to this.
13497 (grubof_CFLAGS): Renamed from this...
13498 (kernel_elf_CFLAGS): ...to this.
13499 (grubof_ASFLAGS): Renamed from this...
13500 (kernel_elf_ASFLAGS): ...to this.
13501 (grubof_LDFLAGS): Renamed from this...
13502 (kernel_elf_LDFLAGS): ...to this.
13503
13504 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
13505 this...
13506 (kernel_elf_HEADERS): ...to this. Updated all users.
13507 (grubof_symlist.c): Renamed from this...
13508 (kernel_elf_symlist.c): ...to this. Updated all users.
13509 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
13510 (grubof_SOURCES): Renamed from this...
13511 (kernel_elf_SOURCES): ...to this.
13512 (grubof_HEADERS): Renamed from this...
13513 (kernel_elf_HEADERS): ...to this.
13514 (grubof_CFLAGS): Renamed from this...
13515 (kernel_elf_CFLAGS): ...to this.
13516 (grubof_ASFLAGS): Renamed from this...
13517 (kernel_elf_ASFLAGS): ...to this.
13518 (grubof_LDFLAGS): Renamed from this...
13519 (kernel_elf_LDFLAGS): ...to this.
13520
13521 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
13522 `kernel.elf' instead of `grubof'.
13523
05568c2e 135242006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
13525
13526 Add --with-platform to configure. Use pkglibdir instead of
13527 pkgdatadir. This is reported by Roger Leigh.
13528
13529 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
13530 (host_vendor): Likewise.
13531 (host_os): Likewise.
13532 (pkgdatadir): Likewise.
13533 (platform): New variable.
13534 (pkglibdir): Likewise.
13535 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 13536
05568c2e 13537 * util/i386/pc/grub-install.in (datadir): Removed.
13538 (host_vendor): Likewise.
13539 (host_os): Likewise.
13540 (pkgdatadir): Likewise.
13541 (platform): New variable.
13542 (pkglibdir): Likewise.
13543 Use PKGLIBDIR instead of PKGDATADIR.
13544
13545 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
13546 instead of GRUB_DATADIR.
13547 (main): Likewise.
13548 * util/i386/pc/grub-mkimage.c (usage): Likewise.
13549 (main): Likewise.
13550 * util/i386/efi/grub-mkimage.c (usage): Likewise.
13551 (main): Likewise.
13552
13553 * configure.ac (--with-platform): New option.
13554 Use PLATFORM instead of HOST_VENDOR to specify a platform.
13555
13556 * Makefile.in: Include a makefile based on PLATFORM instead of
13557 HOST_VENDOR.
13558 (pkgdatadir): Not appended by the machine type.
13559 (pkglibdir): Appended by the machine type.
13560 (host_vendor): Removed.
13561 (platform): New variable.
13562 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
13563 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
13564 (uninstall): Likewise.
13565
4e93851c 135662006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
13567
13568 Use the environment context in the menu. Remove the commands
13569 "default" and "timeout", and use variables instead.
f19dbdb7 13570
4e93851c 13571 * normal/menu.c: Include grub/env.h.
13572 (print_entry): Cast TITLE to silence gcc.
13573 (get_timeout): New function.
13574 (set_timeout): Likewise.
13575 (get_entry_number): Likewise.
13576 (run_menu): Use a default entry, a fallback entry and a timeout
13577 in the environment variables "default", "fallback" and
13578 "timeout". Also, tweak the default entry if it is not within the
13579 current menu entries.
13580 (grub_menu_run): Use a fallback entry in the environment variable
13581 "fallback".
13582
13583 * normal/main.c (read_config_file): Do not initialize
13584 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
13585 NEWMENU->TIMEOUT.
13586 (grub_normal_execute): Use a data slot to store the menu.
13587
13588 * include/grub/normal.h (struct grub_menu): Removed default_entry,
13589 fallback_entry and timeout.
13590 (struct grub_menu_list): Removed.
13591 (grub_menu_list_t): Likewise.
13592 (struct grub_context): Likewise.
13593 (grub_context_t): Likewise.
13594 (grub_context_get): Likewise.
13595 (grub_context_get_current_menu): Likewise.
13596 (grub_context_push_menu): Likewise.
13597 (grub_context_pop_menu): Likewise.
13598 (grub_default_init): Likewise.
13599 (grub_default_fini): Likewise.
13600 (grub_timeout_init): Likewise.
13601 (grub_timeout_fini): Likewise.
13602
13603 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
13604 and timeout.mod.
13605 (normal_mod_SOURCES): Removed normal/context.c.
13606
13607 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
13608 commands/default.c, commands/timeout.c and normal/context.c.
13609 (normal_mod_SOURCES): Removed normal/context.c.
13610
13611 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
13612 commands/timeout.c and normal/context.c.
13613 (normal_mod_SOURCES): Removed normal/context.c.
13614
13615 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
13616 commands/default.c, commands/timeout.c and normal/context.c.
13617 (normal_mod_SOURCES): Removed normal/context.c.
13618
13619 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
13620 timeout.mod.
13621 (default_mod_SOURCES): Removed.
13622 (default_mod_CFLAGS): Likewise.
13623 (default_mod_LDFLAGS): Likewise.
13624 (timeout_mod_SOURCES): Removed.
13625 (timeout_mod_CFLAGS): Likewise.
13626 (timeout_mod_LDFLAGS): Likewise.
13627
13628 * DISTLIST: Removed commands/default.c, commands/timeout.c and
13629 normal/context.c.
13630
13631 * commands/default.c: Removed.
13632 * commands/timeout.c: Likewise.
13633 * normal/context.c: Likewise.
13634
1eb9cc1d 136352006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
13636
13637 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
13638
385bd9c1 136392006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
13640
13641 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
13642 "next" to "prev" for readability.
13643 (struct grub_env_sorted_var): New struct.
13644 (grub_env_context): Renamed to ...
13645 (initial_context): ... this.
13646 (grub_env_var_context): Renamed to ...
13647 (current_context): ... this.
13648 (grub_env_find): Look only at CURRENT_CONTEXT.
13649 (grub_env_context_open): Rewritten to copy exported variables from
13650 previous context.
13651 (grub_env_context_close): Rewritten according to the new
13652 scheme. Also, add an assertion to prevent the initial context from
13653 removed.
13654 (grub_env_insert): Removed the code for the sorted list.
13655 (grub_env_remove): Likewise.
13656 (grub_env_export): Simply mark the variable with
13657 GRUB_ENV_VAR_GLOBAL.
13658 (grub_env_set): A cosmetic change for naming consistency.
13659 (grub_env_get): Likewise.
13660 (grub_env_unset): Likewise.
13661 (grub_env_iterate): Rewritten to sort variables within this
13662 function.
13663 (grub_register_variable_hook): Fixed for naming consistency. Call
13664 grub_env_find again, only if NAME is not found at the first time.
13665 (mangle_data_slot_name): New function.
13666 (grub_env_set_data_slot): Likewise.
13667 (grub_env_get_data_slot): Likewise.
13668 (grub_env_unset_data_slot): Likewise.
13669
13670 * include/grub/env.h (grub_env_var_type): New enum.
13671 (GRUB_ENV_VAR_LOCAL): New constant.
13672 (GRUB_ENV_VAR_GLOBAL): Likewise.
13673 (GRUB_ENV_VAR_DATA): Likewise.
13674 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
13675 "type".
13676 (grub_env_set): Replace VAR with NAME for consistency.
13677 (grub_register_variable_hook): Likewise.
13678 (grub_env_export): Specify the name of the argument.
13679 (grub_env_set_data_slot): New prototype.
13680 (grub_env_get_data_slot): Likewise.
13681 (grub_env_unset_data_slot): Likewise.
13682
7f362539 136832006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13684
13685 Extend the loader so that GRUB can accept a loader which comes
13686 back to GRUB when a loaded image exits. Also, this change adds
13687 support for a chainloader on EFI.
f19dbdb7 13688
7f362539 13689 * term/efi/console.c: Include grub/misc.h.
13690 (grub_console_checkkey): Display a scan code on the top for
13691 debugging. This will be removed once the EFI port gets stable.
13692 Correct the scan code mapping.
13693
13694 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
13695 allocate memory from larger regions, in order to reduce the number
13696 of allocated regions. Otherwise, the MacOSX loader panics.
13697 (filter_memory_map): Avoid less than 1MB for compatibility with
13698 other loaders.
13699 (add_memory_regions): Allocate from the tail of a region, if
13700 possible, to avoid allocating a region near to 1MB, for the MacOSX
13701 loader.
13702
13703 * kern/efi/init.c (grub_efi_set_prefix): Specify
13704 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
13705
13706 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
13707 argument IMAGE_HANDLE and specify it to get a loaded image.
13708 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
13709 grub_efi_get_loaded_image.
fe6b695a 13710 (grub_efi_get_filename): Divide the length by the size of
7f362539 13711 grub_efi_char16_t.
13712 (grub_efi_get_device_path): New function.
13713 (grub_efi_print_device_path): Print End Device Path nodes. Divide
13714 the length by the size of grub_efi_char16_t for a file path device
13715 path node.
13716
13717 * kern/loader.c (grub_loader_noreturn): New variable.
13718 (grub_loader_set): Accept a new argument NORETURN. Set
13719 GRUB_LOADER_NORETURN to NORETURN.
13720 All callers changed.
13721 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
13722 grub_machine_fini.
13723
13724 * include/grub/efi/efi.h (grub_efi_get_device_path): New
13725 prototype.
13726 (grub_efi_get_loaded_image): Take an argument to specify an image
13727 handle.
13728
13729 * include/grub/loader.h (grub_loader_set): Added one more argument
13730 NORETURN.
13731
13732 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
13733 instead of grub_efi_open_protocol.
13734 (grub_efidisk_get_device_name): Likewise.
13735 (grub_efidisk_close): Print a newline.
13736 (grub_efidisk_get_device_handle): Fixed to use
13737 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
13738 GRUB_EFI_DEVICE_PATH_TYPE.
13739
13740 * disk/efi/efidisk.c (device_path_guid): Moved to ...
13741 * kern/efi/efi.c (device_path_guid): ... here.
13742
13743 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13744 chain.mod.
13745 (kernel_mod_HEADERS): Added efi/disk.h.
13746 (_chain_mod_SOURCES): New variable.
13747 (_chain_mod_CFLAGS): Likewise.
13748 (_chain_mod_LDFLAGS): Likewise.
13749 (chain_mod_SOURCES): Likewise.
13750 (chain_mod_CFLAGS): Likewise.
13751 (chain_mod_LDFLAGS): Likewise.
13752
13753 * DISTLIST: Added include/grub/efi/chainloader.h,
13754 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13755
13756 * include/grub/efi/chainloader.h: New file.
13757 * loader/efi/chainloader.c: Likewise.
13758 * loader/efi/chainloader_normal.c: Likewise.
13759
c0111d6e 137602006-04-30 Marco Gerards <marco@gnu.org>
13761
13762 * commands/configfile.c (grub_cmd_source): New function.
13763 (GRUB_MOD_INIT): Register the commands `source' and `.'.
13764 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13765
df5341da 137662006-04-30 Marco Gerards <marco@gnu.org>
13767
13768 * normal/execute.c (grub_script_execute_cmd): Change the return
13769 type to `grub_err_t'. Correctly return the error.
13770 (grub_script_execute_cmdline): In case a command line is not a
13771 command or a function, try to interpret it as an assignment.
13772
f85934bd 137732006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13774
13775 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13776 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13777 skip a node whose name is obviously invalid as UTF-16,
13778 i.e. contains a NUL character. Stop the iteration when the last
13779 directory entry is found. Instead of using the return value of
13780 grub_hfsplus_btree_iterate_node, store the value in RET and use
13781 it, because the iterator can be stopped by the last directory
13782 entry.
13783
8f8a2cf8 137842006-04-30 Marco Gerards <marco@gnu.org>
13785
13786 * include/grub/env.h (grub_env_export): New prototype. Reported
13787 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
13788
a27e84ce 137892006-04-30 Marco Gerards <marco@gnu.org>
13790
13791 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13792 size of the extents in a catalog file record.
13793
eaef0553 137942006-04-29 Marco Gerards <marco@gnu.org>
13795
13796 * commands/configfile.c (grub_cmd_configfile): Execute the
13797 configfile within its own context.
13798
13799 * include/grub/env.h (grub_env_context_open): New prototype.
13800 (grub_env_context_close): Likewise.
13801
13802 * kern/env.c (grub_env): Removed.
13803 (grub_env_sorted): Likewise.
13804 (grub_env_context): New variable.
13805 (grub_env_var_context): Likewise.
13806 (grub_env_find): Search both the active context and the global
13807 context.
13808 (grub_env_context_open): New function.
13809 (grub_env_context_close): Likewise.
13810 (grub_env_insert): Likewise.
13811 (grub_env_remove): Likewise.
13812 (grub_env_export): Likewise.
13813 (grub_env_set): Changed to use helper functions to avoid code
13814 duplication.
13815 (grub_env_iterate): Rewritten so both the current context and the
13816 global context are being used.
13817
13818 * normal/command.c (export_command): New function.
13819 (grub_command_init): Register the `export' function.
13820
7b455f4d 138212006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
13822
13823 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13824 explicitly to suppress gcc's warnings.
13825 * fs/fat.c (grub_fat_find_dir): Likewise.
13826 (grub_fat_label): Likewise.
13827 * fs/xfs.c (grub_xfs_read_inode): Likewise.
13828 (grub_xfs_mount): Likewise.
13829 (grub_xfs_label): Likewise.
13830 * fs/affs.c (grub_affs_mount): Likewise.
13831 (grub_affs_label): Likewise.
13832 (grub_affs_iterate_dir): Likewise.
13833 * fs/sfs.c (grub_sfs_mount): Likewise.
13834 (grub_sfs_iterate_dir): Likewise.
13835 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13836 * fs/hfs.c (grub_hfs_mount): Likewise.
13837 (grub_hfs_cmp_catkeys): Likewise.
13838 (grub_hfs_find_dir): Likewise.
13839 (grub_hfs_dir): Likewise.
13840 (grub_hfs_label): Likewise.
13841 * fs/jfs.c (grub_jfs_mount): Likewise.
13842 (grub_jfs_opendir): Likewise.
13843 (grub_jfs_getent): Likewise.
13844 (grub_jfs_lookup_symlink): Likewise.
13845 (grub_jfs_label): Likewise.
13846 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13847 (grub_hfsplus_iterate_dir): Likewise.
13848 (grub_hfsplus_btree_iterate_node): Made static.
13849
13850 * util/grub-emu.c (prefix): New variable.
13851 (grub_machine_set_prefix): New function.
13852 (main): Do not set the environment variable "prefix" here. Only
13853 set PREFIX, which is used later by grub_machine_set_prefix.
13854
13855 * include/grub/video.h: Do not include grub/symbol.h.
13856 (grub_video_register): Not exported. This symbol is not defined in
13857 the kernel.
13858 (grub_video_unregister): Likewise.
13859 (grub_video_iterate): Likewise.
13860 (grub_video_setup): Likewise.
13861 (grub_video_restore): Likewise.
13862 (grub_video_get_info): Likewise.
13863 (grub_video_get_blit_format): Likewise.
13864 (grub_video_set_palette): Likewise.
13865 (grub_video_get_palette): Likewise.
13866 (grub_video_set_viewport): Likewise.
13867 (grub_video_get_viewport): Likewise.
13868 (grub_video_map_color): Likewise.
13869 (grub_video_map_rgb): Likewise.
13870 (grub_video_map_rgba): Likewise.
13871 (grub_video_fill_rect): Likewise.
13872 (grub_video_blit_glyph): Likewise.
13873 (grub_video_blit_bitmap): Likewise.
13874 (grub_video_blit_render_target): Likewise.
13875 (grub_video_scroll): Likewise.
13876 (grub_video_swap_buffers): Likewise.
13877 (grub_video_create_render_target): Likewise.
13878 (grub_video_delete_render_target): Likewise.
13879 (grub_video_set_active_render_target): Likewise.
13880
13881 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13882 Undefined.
13883 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13884
13885 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13886 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13887 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13888 instead of $(srcdir)/genkernsyms.sh.
13889
13890 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13891 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13892 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13893 instead of $(srcdir)/genkernsyms.sh.
13894
13895 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13896 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13897 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13898 instead of $(srcdir)/genkernsyms.sh.
13899
13900 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13901 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13902 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13903 instead of $(srcdir)/genkernsyms.sh.
13904
13905 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13906 genkernsyms.sh.
13907
13908 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13909 genkernsyms.sh.
13910 (gensymlist.sh): New target.
13911 (genkernsyms.sh): Likewise.
13912
13913 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13914 genkernsyms.sh.in and gensymlist.sh.in.
13915
13916 * genkernsyms.sh: Removed.
13917 * gensymlist.sh: Likewise.
f19dbdb7 13918
7b455f4d 13919 * genkernsyms.sh.in: New file.
13920 * gensymlist.sh.in: Likewise.
13921
1885bb27 139222006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13923
13924 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13925 clobber "prefix", since we may have already set it manually.
13926
71538dff 139272006-04-25 Hollis Blanchard <hollis@penguinppc.org>
13928
13929 * kern/misc.c (abort): New alias for grub_abort.
13930
2965c7cc 139312006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
13932
13933 A new machine-specific function "grub_machine_set_prefix" is
13934 defined. This is called after loading modules, so that a prefix
13935 initialization can use modules. Also, this change adds an
13936 intensive debugging feature for the memory manager via the
13937 configure option "--enable-mm-debug".
f19dbdb7 13938
2965c7cc 13939 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13940 PART.LEN.
13941
13942 * kern/sparc64/ieee1275/init.c (abort): Removed.
13943 (grub_stop): Likewise.
13944 (grub_exit): New function.
13945 (grub_set_prefix): Renamed to ...
13946 (grub_machine_set_prefix): ... this.
13947 (grub_machine_init): Do not call grub_set_prefix.
13948
13949 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13950 (grub_machine_set_prefix): ... this.
13951 (grub_machine_init): Do not call grub_set_prefix.
13952
13953 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13954 (grub_machine_init): Do not set the prefix here.
13955
13956 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13957
13958 * kern/efi/init.c: Include grub/mm.h.
13959 (grub_efi_set_prefix): New function.
13960
13961 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13962 (grub_efi_get_filename): New function.
13963 (grub_print_device_path): Renamed to ...
13964 (grub_efi_print_device_path): ... this.
13965
13966 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13967 [MM_DEBUG] (grub_realloc): Likewise.
13968 [MM_DEBUG] (grub_free): Likewise.
13969 [MM_DEBUG] (grub_memalign): Likewise.
13970 [MM_DEBUG] (grub_mm_debug): New variable.
13971 [MM_DEBUG] (grub_debug_malloc): New function.
13972 [MM_DEBUG] (grub_debug_free): New function.
13973 [MM_DEBUG] (grub_debug_realloc): New function.
13974 [MM_DEBUG] (grub_debug_memalign): New function.
13975
13976 * kern/misc.c (grub_abort): Print a newline to distinguish
13977 the message.
13978
13979 * kern/main.c (grub_main): Call grub_machine_set_prefix and
13980 grub_set_root_dev after loading modules. This is necessary when
13981 setting a prefix depends on modules.
13982
13983 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13984 (grub_efi_print_device_path): ... this.
13985 (grub_efi_get_filename): New prototype.
13986 (grub_efi_set_prefix): Likewise.
13987
13988 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13989 and grub/disk.h.
13990 (grub_efidisk_get_device_handle): New prototype.
13991 (grub_efidisk_get_device_name): Likewise.
13992
13993 * include/grub/mm.h: Include config.h.
13994 (MM_DEBUG): Removed.
13995 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13996 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13997 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13998 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13999 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
14000 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
14001 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
14002 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
14003 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
14004
14005 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
14006
14007 * disk/efi/efidisk.c: Include grub/partition.h.
14008 (iterate_child_devices): New function.
14009 (add_device): First, compare only last device path nodes, so that
14010 devices are sorted by the types.
14011 (grub_efidisk_get_device_handle): New function.
14012 (grub_efidisk_get_device_name): Likewise.
14013
14014 * configure.ac (--enable-mm-debug): New option to enable the
14015 memory manager debugging feature. This makes the binary much
14016 bigger, so is disabled by default.
14017
9cacaa17 140182006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
14019
14020 Use grub_abort instead of grub_stop, and grub_exit must be
14021 define in each architecture now. Also, this change adds support
14022 for EFI disks.
f19dbdb7 14023
9cacaa17 14024 * util/i386/pc/grub-probefs.c: Include grub/term.h.
14025 (grub_getkey): New function.
14026 (grub_term_get_current): Likewise.
14027
14028 * util/i386/pc/grub-setup.c: Include grub/term.h.
14029 (grub_getkey): New function.
14030 (grub_term_get_current): Likewise.
14031
14032 * util/misc.c (grub_stop): Renamed to ...
14033 (grub_exit): ... this.
14034
14035 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
14036 (grub_exit): ... this.
14037 (grub_machine_init): Use grub_abort instead of abort.
14038 (grub_stop): Removed.
14039
14040 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
14041 abort.
14042
14043 * kern/i386/pc/startup.S (grub_exit): New function.
14044 (cold_reboot): New label.
14045
14046 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
14047 (grub_efi_init): Call grub_efidisk_init.
14048 (grub_efi_fini): Call grub_efidisk_fini.
14049
14050 * kern/efi/efi.c: Include grub/mm.h.
14051 (grub_efi_console_control_guid): Renamed to ...
14052 (console_control_guid): ... this.
14053 (grub_efi_loaded_image_guid): Renamed to ...
14054 (loaded_image_guid): ... this.
14055 (grub_efi_locate_handle): New function.
14056 (grub_efi_open_protocol): Likewise.
14057 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
14058 GRUB_EFI_CONSOLE_CONTROL_GUID.
14059 (grub_efi_exit): Removed.
14060 (grub_stop): Likewise.
14061 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
14062 (grub_exit): New function.
14063 (grub_print_device_path): Likewise.
14064
14065 * kern/rescue.c (grub_rescue_cmd_exit): New function.
14066 (grub_enter_rescue_mode): Register "exit".
14067
14068 * kern/misc.c (grub_real_dprintf): A cosmetic change.
14069 (grub_abort): New function.
14070
14071 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
14072
14073 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
14074
14075 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
14076
14077 * include/grub/efi/efi.h (grub_efi_exit): Removed.
14078 (grub_print_device_path): New prototype.
14079 (grub_efi_locate_handle): Likewise.
14080 (grub_efi_open_protocol): Likewise.
14081
14082 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
14083 * disk/efi/efidisk.c: Likewise.
14084
14085 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
14086
14087 * include/grub/efi/console_control.h
14088 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
14089
14090 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
14091 last 8 bytes as an array.
14092 (GRUB_EFI_DISK_IO_GUID): New macro.
14093 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
14094 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
14095 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
14096 grub_uint8_t.
14097 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
14098 (struct grub_efi_device_path): Rename the member "sub_type" to
14099 "subtype".
14100 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
14101 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
14102 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
14103 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
14104 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
14105 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
14106 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
14107 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
14108 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
14109 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
14110 (struct grub_efi_pci_device_path): New structure.
14111 (grub_efi_pci_device_path_t): New type.
14112 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
14113 (struct grub_efi_pccard_device_path): New structure.
14114 (grub_efi_pccard_device_path_t): New type.
14115 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
14116 (struct grub_efi_memory_mapped_device_path): New structure.
14117 (grub_efi_memory_mapped_device_path_t): New type.
14118 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
14119 (struct grub_efi_vendor_device_path): New structure.
14120 (grub_efi_vendor_device_path_t): New type.
14121 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
14122 (struct grub_efi_controller_device_path): New structure.
14123 (grub_efi_controller_device_path_t): New type.
14124 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
14125 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
14126 (struct grub_efi_acpi_device_path): New structure.
14127 (grub_efi_acpi_device_path_t): New type.
14128 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
14129 (struct grub_efi_expanded_acpi_device_path): New structure.
14130 (grub_efi_expanded_acpi_device_path_t): New type.
14131 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
14132 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
14133 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
14134 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
14135 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
14136 (struct grub_efi_atapi_device_path): New structure.
14137 (grub_efi_atapi_device_path_t): New type.
14138 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
14139 (struct grub_efi_fibre_channel_device_path): New structure.
14140 (grub_efi_fibre_channel_device_path_t): New type.
14141 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
14142 (struct grub_efi_1394_device_path): New structure.
14143 (grub_efi_1394_device_path_t): New type.
14144 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
14145 (struct grub_efi_usb_device_path): New structure.
14146 (grub_efi_usb_device_path_t): New type.
14147 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
14148 (struct grub_efi_usb_class_device_path): New structure.
14149 (grub_efi_usb_class_device_path_t): New type.
14150 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
14151 (struct grub_efi_i2o_device_path): New structure.
14152 (grub_efi_i2o_device_path_t): New type.
14153 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
14154 (struct grub_efi_mac_address_device_path): New structure.
14155 (grub_efi_mac_address_device_path_t): New type.
14156 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
14157 (struct grub_efi_ipv4_device_path): New structure.
14158 (grub_efi_ipv4_device_path_t): New type.
14159 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
14160 (struct grub_efi_ipv6_device_path): New structure.
14161 (grub_efi_ipv6_device_path_t): New type.
14162 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
14163 (struct grub_efi_infiniband_device_path): New structure.
14164 (grub_efi_infiniband_device_path_t): New type.
14165 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
14166 (struct grub_efi_uart_device_path): New structure.
14167 (grub_efi_uart_device_path_t): New type.
14168 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
14169 (struct grub_efi_vendor_messaging_device_path): New structure.
14170 (grub_efi_vendor_messaging_device_path_t): New type.
14171 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
14172 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
14173 (struct grub_efi_hard_drive_device_path): New structure.
14174 (grub_efi_hard_drive_device_path_t): New type.
14175 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
14176 (struct grub_efi_cdrom_device_path): New structure.
14177 (grub_efi_cdrom_device_path_t): New type.
14178 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
14179 (struct grub_efi_vendor_media_device_path): New structure.
14180 (grub_efi_vendor_media_device_path_t): New type.
14181 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
14182 (struct grub_efi_file_path_device_path): New structure.
14183 (grub_efi_file_path_device_path_t): New type.
14184 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
14185 (struct grub_efi_protocol_device_path): New structure.
14186 (grub_efi_protocol_device_path_t): New type.
14187 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
14188 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
14189 (struct grub_efi_bios_device_path): New structure.
14190 (grub_efi_bios_device_path_t): New type.
14191 (struct grub_efi_disk_io): New structure.
14192 (grub_efi_disk_io_t): New type.
14193 (struct grub_efi_block_io_media): New structure.
14194 (grub_efi_block_io_media_t): New type.
14195 (struct grub_efi_block_io): New structure.
14196 (grub_efi_block_io_t): New type.
14197
14198 * include/grub/misc.h (grub_stop): Removed.
14199 (grub_exit): New prototype.
14200 (grub_abort): Likewise.
14201
14202 * include/grub/disk.h (enum grub_disk_dev_id): Added
14203 GRUB_DISK_DEVICE_EFIDISK_ID.
14204
14205 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
14206 disk/efi/efidisk.c.
14207 (kernel_syms.lst): Remove the target if an error occurs.
14208
49986a9f 142092006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
14210
14211 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
14212 as it was simply too buggy.
14213
970d3b8a 142142006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
14215
14216 * kern/misc.c (grub_lltoa): New function.
14217 (grub_vsprintf): Added support for the long long suffix,
14218 i.e. "ll".
14219
ff04ec24 142202006-04-20 Hollis Blanchard <hollis@penguinppc.org>
14221
14222 * Makefile.in (LDFLAGS): Add variable.
14223 (LD): Remove variable.
14224 * configure.ac: Add -m32 to LDFLAGS.
14225 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
14226 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
14227 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
14228 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
14229 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
14230 variables.
14231 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
14232 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
14233 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
14234
37e5e1a4 142352006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
14236
14237 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
14238 length for unknown glyph.
14239
c352d8dd 142402006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
14241
2eab1c0d 14242 Add support for pre-loaded modules into the EFI port.
f19dbdb7 14243
2eab1c0d 14244 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
14245 completely. Accept one more argument DIR. The caller has changed.
14246
14247 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
14248
14249 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
14250 (grub_efi_loaded_image_guid): New variable.
14251 (grub_efi_get_loaded_image): New function.
14252 (grub_arch_modules_addr): Likewise.
14253
14254 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
14255 prototype.
14256
14257 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
14258 (struct grub_efi_loaded_image): New structure.
14259 (grub_efi_loaded_image_t): New type.
14260
142612006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 14262
c352d8dd 14263 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
14264 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
14265 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
14266
6d01d6b4 142672006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
14268
14269 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
14270
976a4ea0 142712006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
14272
14273 * DISTLIST: Added include/grub/efi/console.h,
14274 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
14275 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
14276
14277 * include/grub/efi/console.h: New file.
14278 * include/grub/efi/time.h: Likewise.
14279 * include/grub/i386/efi/kernel.h: Likewise.
14280 * kern/efi/init.c: Likewise.
14281 * kern/efi/mm.c: Likewise.
14282 * term/efi/console.c: Likewise.
f19dbdb7 14283
976a4ea0 14284 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
14285 (grub_stop): Removed.
14286 (grub_get_rtc): Likewise.
14287 (grub_machine_init): Simply call grub_efi_init.
14288 (grub_machine_fini): Call grub_efi_fini.
14289
14290 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
14291 (grub_efi_output_string): Removed.
14292 (grub_efi_stall): New function.
14293 (grub_stop): Likewise.
14294 (grub_get_rtc): Likewise.
14295
14296 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
14297 (grub_efi_stall): New prototype.
14298 (grub_efi_allocate_pages): Likewise.
14299 (grub_efi_free_pages): Likewise.
14300 (grub_efi_get_memory_map): Likewise.
14301 (grub_efi_mm_init): Likewise.
14302 (grub_efi_mm_fini): Likewise.
14303 (grub_efi_init): Likewise.
14304 (grub_efi_fini): Likewise.
14305
14306 * include/grub/i386/efi/time.h: Do not include
14307 grub/symbol.h. Include grub/efi/time.h.
14308 (GRUB_TICKS_PER_SECOND): Removed.
14309 (grub_get_rtc): Likewise.
14310
14311 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
14312 Added padding. The EFI spec is buggy.
14313 (GRUB_EFI_BLACK): New macro.
14314 (GRUB_EFI_BLUE): Likewise.
14315 (GRUB_EFI_GREEN): Likewise.
14316 (GRUB_EFI_CYAN): Likewise.
14317 (GRUB_EFI_RED): Likewise.
14318 (GRUB_EFI_MAGENTA): Likewise.
14319 (GRUB_EFI_BROWN): Likewise.
14320 (GRUB_EFI_LIGHTGRAY): Likewise.
14321 (GRUB_EFI_BRIGHT): Likewise.
14322 (GRUB_EFI_DARKGRAY): Likewise.
14323 (GRUB_EFI_LIGHTBLUE): Likewise.
14324 (GRUB_EFI_LIGHTGREEN): Likewise.
14325 (GRUB_EFI_LIGHTCYAN): Likewise.
14326 (GRUB_EFI_LIGHTRED): Likewise.
14327 (GRUB_EFI_LIGHTMAGENTA): Likewise.
14328 (GRUB_EFI_YELLOW): Likewise.
14329 (GRUB_EFI_WHITE): Likewise.
14330 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
14331 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
14332 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
14333 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
14334 (GRUB_EFI_BACKGROUND_RED): Likewise.
14335 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
14336 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
14337 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
14338 (GRUB_EFI_TEXT_ATTR): Likewise.
14339
14340 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
14341 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
14342 (kernel_mod_HEADERS): Added efi/time.h.
14343
83709125 143442006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
14345
14346 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
14347 include/grub/efi/api.h, include/grub/efi/console_control.h,
14348 include/grub/efi/efi.h, include/grub/efi/pe32.h,
14349 include/grub/i386/efi/time.h, kern/efi/efi.c,
14350 kern/i386/efi/init.c, kern/i386/efi/startup.S,
14351 and util/i386/efi/grub-mkimage.c.
14352
14353 * Makefile.in (RMKFILES): Added i386-efi.rmk.
14354
14355 * genmk.rb (PModule#rule): Do not export symbols if
14356 #{prefix}_EXPORTS is set to "no".
14357
14358 * conf/i386-efi.mk: New file.
14359 * conf/i386-efi.rmk: Likewise.
14360 * include/grub/efi/api.h: Likewise.
14361 * include/grub/efi/console_control.h: Likewise.
14362 * include/grub/efi/efi.h: Likewise.
14363 * include/grub/efi/pe32.h: Likewise.
14364 * include/grub/i386/efi/time.h: Likewise.
14365 * kern/efi/efi.c: Likewise.
14366 * kern/i386/efi/init.c: Likewise.
14367 * kern/i386/efi/startup.S: Likewise.
14368 * util/i386/efi/grub-mkimage.c: Likewise.
14369
143702006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 14371
14372 * include/grub/script.h: Include <grub/parser.h> and
14373 "grub_script.tab.h".
14374 (struct grub_lexer_param): New struct.
14375 (struct grub_parser_param): Likewise.
14376 (grub_script_create_arglist): Pass the state in an argument.
14377 (grub_script_add_arglist): Likewise.
14378 (grub_script_create_cmdline): Likewise.
14379 (grub_script_create_cmdblock): Likewise.
14380 (grub_script_create_cmdif): Likewise.
14381 (grub_script_create_cmdmenu): Likewise.
14382 (grub_script_add_cmd): Likewise.
14383 (grub_script_arg_add): Likewise.
14384 (grub_script_lexer_ref): Likewise.
14385 (grub_script_lexer_deref): Likewise.
14386 (grub_script_lexer_record_start): Likewise.
14387 (grub_script_lexer_record_stop): Likewise.
14388 (grub_script_mem_record): Likewise.
14389 (grub_script_mem_record_stop): Likewise.
14390 (grub_script_malloc): Likewise.
14391 (grub_script_yylex): Likewise.
14392 (grub_script_yyparse): Likewise.
14393 (grub_script_yyerror): Likewise.
14394 (grub_script_yylex): Likewise.
14395 (grub_script_lexer_init): Return the state.
14396
14397 * normal/lexer.c (grub_script_lexer_state): Removed variable.
14398 (grub_script_lexer_done): Likewise.
14399 (grub_script_lexer_getline): Likewise.
14400 (grub_script_lexer_refs): Likewise.
14401 (script): Likewise.
14402 (newscript): Likewise.
14403 (record): Likewise.
14404 (recording): Likewise.
14405 (recordpos): Likewise.
14406 (recordlen): Likewise.
14407 (grub_script_lexer_init): Return the state instead of setting
14408 global variables.
14409 (grub_script_lexer_ref): Use the newly added argument for state
14410 instead of globals.
14411 (grub_script_lexer_deref): Likewise.
14412 (grub_script_lexer_record_start): Likewise.
14413 (grub_script_lexer_record_stop): Likewise.
14414 (recordchar): Likewise.
14415 (nextchar): Likewise.
14416 (grub_script_yylex2): Likewise.
14417 (grub_script_yylex): Likewise.
14418 (grub_script_yyerror): Likewise.
14419
14420 * normal/parser.y (func_mem): Removed variable.
14421 (menu_entry): Likewise.
14422 (err): Likewise.
14423 (%lex-param): New parser option.
14424 (%parse-param): Likewise.
14425 (script): Always return the AST.
14426 (argument): Pass the state around.
14427 (arguments): Likewise.
14428 (grubcmd): Likewise.
14429 (commands): Likewise.
14430 (function): Likewise.
14431 (menuentry): Likewise.
14432 (if_statement): Likewise.
14433 (if): Likewise.
14434
14435 * normal/script.c (grub_script_memused): Removed variable.
14436 (grub_script_parsed): Likewise.
14437 (grub_script_malloc): Added a state argument. Use that instead of
14438 global variables.
14439 (grub_script_mem_record): Likewise.
14440 (grub_script_mem_record_stop): Likewise.
14441 (grub_script_arg_add): Likewise.
14442 (grub_script_add_arglist): Likewise.
14443 (grub_script_create_cmdline): Likewise.
14444 (grub_script_create_cmdif): Likewise.
14445 (grub_script_create_cmdmenu): Likewise.
14446 (grub_script_add_cmd): Likewise.
14447 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 14448
e2a8c904 144492006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 14450
14451 * normal/command.c (grub_command_init): Remove the title command.
14452
14453 * normal/lexer.c (grub_script_yylex): Renamed from this...
14454 (grub_script_yylex2): ... to this.
14455 (grub_script_yylex): New function. Temporary
14456 introduced to filter some tokens.
14457 (grub_script_yyerror): Print a newline.
14458
14459 * normal/main.c (read_config_file): Output information about the
14460 lines that contain errors. Wait for a key after all lines have
14461 been processed. Don't return an empty menu.
14462
14463 * normal/parser.y (func_mem): Don't initialize.
14464 (menu_entry): Likewise.
14465 (err): New variable.
14466 (script): Don't return anything when an error was encountered.
14467 (ws, returns): Removed rules.
14468 (argument): Disabled concatenated variable support.
14469 (arguments): Remove explicit separators.
14470 (grubcmd): Likewise.
14471 (function): Likewise.
14472 (menuentry): Likewise.
14473 (if): Likewise.
14474 (commands): Likewise. Add error handling.
14475
14476 * normal/script.c (grub_script_create_cmdline): If
14477 `grub_script_parsed' is 0, assume the parser encountered an error.
14478
c9a86192 144792006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
14480
14481 * configure.ac: Add support for EFI. Fix the typo
14482 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
14483
70f3b243 144842006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
14485
14486 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
14487 foreign multibyte characters should be shown correctly.
14488
65f201ad 144892006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
14490
14491 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
14492 calculation.
14493 (read_config_file): Made it to close file before returning.
14494
b4b93674 144952006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
14496
14497 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
14498 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
14499 video/i386/pc/vbefill.c.
14500
14501 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
14502 video/i386/pc/vbefill.c.
14503
14504 * include/grub/video.h (grub_video_blit_format): New enum.
14505 (grub_video_mode_info): Added new member blit_format.
14506 (grub_video_get_blit_format): New function prototype.
14507
14508 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
14509 function prototype.
14510 (grub_video_vbe_map_rgb): Likewise.
14511 (grub_video_vbe_unmap_color): Likewise.
14512
14513 * include/grub/i386/pc/vbeblit.h: New file.
14514
14515 * include/grub/i386/pc/vbefill.h: New file.
14516
14517 * video/video.c (grub_video_get_blit_format): New function.
14518 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
14519 (grub_video_vbe_map_rgb): Likewise.
14520 (grub_video_vbe_unmap_color): Likewise.
14521
14522 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
14523 optimized fills.
14524 (grub_video_vbe_blit_render_target): Changed to use more optimized
14525 blits.
14526 (grub_video_vbe_setup): Added detection for optimized settings.
14527 (grub_video_vbe_create_render_target): Likewise.
14528
14529 * video/i386/pc/vbeblit.c: New file.
14530
14531 * video/i386/pc/vbefill.c: New file.
14532
c2379b9c 145332006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
14534
14535 * font/manager.c (grub_font_get_glyph): Removed font fixup from
14536 here...
14537
14538 * util/unifont2pff.rb: ... and moved it to here. Improved argument
14539 parsing to support both hex and dec ranges. If filename was missing
14540 show usage information.
14541
bd0d7896 145422006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
14543
14544 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
14545 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
14546
14547 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
14548 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
14549 (video_mod_SOURCES): Added.
14550 (video_mod_CFLAGS): Likewise.
14551 (video_mod_LDFLAGS): Likewise.
14552 (gfxterm_mod_SOURCES): Likewise.
14553 (gfxterm_mod_CFLAGS): Likewise.
14554 (gfxterm_mod_LDFLAGS): Likewise.
14555 (videotest_mod_SOURCES): Likewise.
14556 (videotest_mod_CFLAGS): Likewise.
14557 (videotest_mod_LDFLAGS): Likewise.
14558 (vesafb_mod_SOURCES): Removed.
14559 (vesafb_mod_CFLAGS): Likewise.
14560 (vesafb_mod_LDFLAGS): Likewise.
14561 (vga_mod_SOURCES): Likewise.
14562 (vga_mod_CFLAGS): Likewise.
14563 (vga_mod_LDFLAGS): Likewise.
14564
14565 * commands/videotest.c: New file.
14566
14567 * font/manager.c (fill_with_default_glyph): Modified to use
14568 grub_font_glyph.
14569 (grub_font_get_glyph): Likewise.
14570 (fontmanager): Renamed from this...
14571 (font_manager): ... to this.
14572
14573 * include/grub/font.h (grub_font_glyph): Added new structure.
14574 (grub_font_get_glyph): Modified to use grub_font_glyph.
14575
14576 * include/grub/misc.h (grub_abs): Added as inline function.
14577
14578 * include/grub/video.h: New file.
14579
14580 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
14581 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
14582 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
14583 (grub_vbe_get_controller_info): Renamed from this...
14584 (grub_vbe_bios_get_controller_info): ... to this.
14585 (grub_vbe_get_mode_info): Renamed from this...
14586 (grub_vbe_bios_get_mode_info): ... to this.
14587 (grub_vbe_set_mode): Renamed from this...
14588 (grub_vbe_bios_set_mode): ... to this.
14589 (grub_vbe_get_mode): Renamed from this...
14590 (grub_vbe_bios_get_mode): ... to this.
14591 (grub_vbe_set_memory_window): Renamed from this...
14592 (grub_vbe_bios_set_memory_window): ... to this.
14593 (grub_vbe_get_memory_window): Renamed from this...
14594 (grub_vbe_bios_get_memory_window): ... to this.
14595 (grub_vbe_set_scanline_length): Renamed from this...
14596 (grub_vbe_set_scanline_length): ... to this.
14597 (grub_vbe_get_scanline_length): Renamed from this...
14598 (grub_vbe_bios_get_scanline_length): ... to this.
14599 (grub_vbe_set_display_start): Renamed from this...
14600 (grub_vbe_bios_set_display_start): ... to this.
14601 (grub_vbe_get_display_start): Renamed from this...
14602 (grub_vbe_bios_get_display_start): ... to this.
14603 (grub_vbe_set_palette_data): Renamed from this...
14604 (grub_vbe_bios_set_palette_data): ... to this.
14605 (grub_vbe_set_pixel_rgb): Removed.
14606 (grub_vbe_set_pixel_index): Likewise.
14607
14608 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
14609 from this...
14610 (grub_vbe_bios_get_controller_info): ... to this.
14611 (grub_vbe_get_mode_info): Renamed from this...
14612 (grub_vbe_bios_get_mode_info): ... to this.
14613 (grub_vbe_set_mode): Renamed from this...
14614 (grub_vbe_bios_set_mode): ... to this.
14615 (grub_vbe_get_mode): Renamed from this...
14616 (grub_vbe_bios_get_mode): ... to this.
14617 (grub_vbe_set_memory_window): Renamed from this...
14618 (grub_vbe_bios_set_memory_window): ... to this.
14619 (grub_vbe_get_memory_window): Renamed from this...
14620 (grub_vbe_bios_get_memory_window): ... to this.
14621 (grub_vbe_set_scanline_length): Renamed from this...
14622 (grub_vbe_set_scanline_length): ... to this.
14623 (grub_vbe_get_scanline_length): Renamed from this...
14624 (grub_vbe_bios_get_scanline_length): ... to this.
14625 (grub_vbe_set_display_start): Renamed from this...
14626 (grub_vbe_bios_set_display_start): ... to this.
14627 (grub_vbe_get_display_start): Renamed from this...
14628 (grub_vbe_bios_get_display_start): ... to this.
14629 (grub_vbe_set_palette_data): Renamed from this...
14630 (grub_vbe_bios_set_palette_data): ... to this.
14631 (grub_vbe_bios_get_controller_info): Fixed problem with registers
14632 getting corrupted after calling it. Added more pushes and pops.
14633 (grub_vbe_bios_set_mode): Likewise.
14634 (grub_vbe_bios_get_mode): Likewise.
14635 (grub_vbe_bios_get_memory_window): Likewise.
14636 (grub_vbe_bios_set_scanline_length): Likewise.
14637 (grub_vbe_bios_get_scanline_length): Likewise.
14638 (grub_vbe_bios_get_display_start): Likewise.
14639 (grub_vbe_bios_set_palette_data): Likewise.
14640
14641 * normal/cmdline.c (cl_set_pos): Refresh the screen.
14642 (cl_insert): Likewise.
14643 (cl_delete): Likewise.
14644
14645 * term/gfxterm.c: New file.
14646
14647 * term/i386/pc/vesafb.c: Removed file.
14648
14649 * video/video.c: New file.
14650
14651 * video/i386/pc/vbe.c (real2pm): Added new function.
14652 (grub_video_vbe_draw_pixel): Likewise.
14653 (grub_video_vbe_get_video_ptr): Likewise.
14654 (grub_video_vbe_get_pixel): Likewise
14655 (grub_video_vbe_init): Likewise.
14656 (grub_video_vbe_fini): Likewise.
14657 (grub_video_vbe_setup): Likewise.
14658 (grub_video_vbe_get_info): Likewise.
14659 (grub_video_vbe_set_palette): Likewise.
14660 (grub_video_vbe_get_palette): Likewise.
14661 (grub_video_vbe_set_viewport): Likewise.
14662 (grub_video_vbe_get_viewport): Likewise.
14663 (grub_video_vbe_map_color): Likewise.
14664 (grub_video_vbe_map_rgb): Likewise.
14665 (grub_video_vbe_map_rgba): Likewise.
14666 (grub_video_vbe_unmap_color): Likewise.
14667 (grub_video_vbe_fill_rect): Likewise.
14668 (grub_video_vbe_blit_glyph): Likewise.
14669 (grub_video_vbe_blit_bitmap): Likewise.
14670 (grub_video_vbe_blit_render_target): Likewise.
14671 (grub_video_vbe_scroll): Likewise.
14672 (grub_video_vbe_swap_buffers): Likewise.
14673 (grub_video_vbe_create_render_target): Likewise.
14674 (grub_video_vbe_delete_render_target): Likewise.
14675 (grub_video_vbe_set_active_render_target): Likewise.
14676 (grub_vbe_set_pixel_rgb): Remove function.
14677 (grub_vbe_set_pixel_index): Likewise.
14678 (index_color_mode): Remove static variable.
14679 (active_mode): Likewise.
14680 (framebuffer): Likewise.
14681 (bytes_per_scan_line): Likewise.
14682 (grub_video_vbe_adapter): Added new static variable.
14683 (framebuffer): Likewise.
14684 (render_target): Likewise.
14685 (initial_mode): Likewise.
14686 (mode_in_use): Likewise.
14687 (mode_list): Likewise.
14688
5f97350b 146892006-03-10 Marco Gerards <marco@gnu.org>
14690
14691 * configure.ac (AC_INIT): Bumped to 1.93.
14692
14693 * DISTLIST: Added `include/grub/hfs.h'.
14694
a3c5c6f8 146952006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
14696
14697 * boot/i386/pc/boot.S (general_error): Before looping, try INT
14698 18H, which might help the BIOS falling back to next boot media.
14699
6de53d26 147002006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
14701
14702 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
14703 Poe Chen <poe.poechen@gmail.com>.
14704
77c4a393 147052006-01-17 Marco Gerards <marco@gnu.org>
14706
14707 * include/grub/normal.h: Include <grub/script.h>.
14708 (grub_command_list): Removed struct.
14709 (grub_command_list_t): Removed type.
14710 (grub_menu_entry): Remove members `num' and `command_list'. Add
14711 members `commands' and `sourcecode'.
14712 * include/grub/script.h: Add inclusion guards.
14713 (grub_script_cmd_menuentry): New struct.
14714 (grub_script_execute_menuentry): New prototype.
14715 (grub_script_lexer_record_start): Likewise.
14716 (grub_script_lexer_record_stop): Likewise.
14717 * normal/execute.c (grub_script_execute_menuentry): New function.
14718 * normal/lexer.c (record, recording, recordpos, recordlen): New
14719 variables.
14720 (grub_script_lexer_record_start): New function.
14721 (grub_script_lexer_record_stop): Likewise.
14722 (recordchar): Likewise.
14723 (nextchar): Likewise.
14724 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
14725 2048 as the buffer size. Add the tokens `menuentry' and `@'.
14726 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
14727 (current_menu): New variable.
14728 (free_menu): Mainly rewritten.
14729 (grub_normal_menu_addentry): New function.
14730 (read_config_file): Rewritten.
14731 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 14732 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 14733 the menu entry.
14734 (run): Mainly rewritten.
14735 * normal/parser.y (menu_entry): New variable.
14736 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
14737 (menuentry): New rule.
14738 (command): Add `menuentry'.
14739 (if_statement): Allow additional returns before `fi'.
14740 * normal/script.c (grub_script_create_cmdmenu): New function.
14741
144f1f98 147422006-01-03 Marco Gerards <marco@gnu.org>
14743
14744 * INSTALL: GNU Bison is required.
14745 * configure.ac: Rewritten the test to detect Bison.
14746 * Makefile.in (YACC): New variable. Reported by Xun Sun
14747 <xun.sun.cn@gmail.com>.
14748
af4b2d89 147492006-01-03 Marco Gerards <marco@gnu.org>
14750
14751 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14752 the HFS+ filesystem to filesystem blocks.
14753 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14754 GCC warning is silenced.
14755
15643b71 147562006-01-03 Marco Gerards <marco@gnu.org>
14757
14758 * partmap/apple.c (apple_partition_map_iterate): Convert the data
14759 read from disk from big endian to host byte order.
14760
00905879 147612006-01-03 Hollis Blanchard <hollis@penguinppc.org>
14762
14763 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
14764 documentation.
14765 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14766 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14767 embedded HFS+ filesystem.
14768 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14769 (grub_hfs_sblock): Move from here...
14770 * include/grub/hfs.h: To here... New file.
14771 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
14772 documentation.
14773 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14774 New macros.
14775 (grub_hfsplus_volheader): Change type of member `magic' to
14776 `grub_uint16_t'.
14777 (grub_hfsplus_data): Add new member `embedded_offset'.
14778 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
14779 returned block.
14780 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
14781 Calculate the offset.
14782
8899bc3e 147832005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14784
14785 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
14786 Removed.
14787 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
14788
ae8c0277 147892005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14790
14791 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14792 ENV->NAME is NULL after allocating ENV->VALUE.
14793
07084456 147942005-12-25 Marco Gerards <marco@gnu.org>
14795
14796 * kern/env.c (grub_env_set): Rewritten the error handling code.
14797
4750f5f1 147982005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14799
14800 * geninit.sh: Made more robust, and more portable.
14801
50214199 148022005-12-25 Marco Gerards <marco@gnu.org>
14803
14804 Add support for Apple HFS+ filesystems.
f19dbdb7 14805
50214199 14806 * fs/hfsplus.c: New file.
14807
14808 * DISTLIST: Added `fs/hfsplus.c'.
14809
14810 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14811 (hfsplus_mod_SOURCES): New variable.
14812 (hfsplus_mod_CFLAGS): Likewise.
14813 (hfsplus_mod_LDFLAGS): Likewise.
14814 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14815 (grub_setup_SOURCES): Likewise.
14816 (grub_mkdevicemap_SOURCES): Likewise.
14817 (grub_emu_SOURCES): Likewise.
14818 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14819
14820 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14821
14822 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14823
befaed6c 148242005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
14825
14826 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14827 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14828 include/grub/parser.h, include/grub/script.h, kern/parser.c,
14829 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14830 normal/lexer.c, normal/parser.y, normal/script.c, and
14831 partmap/gpt.c.
14832 Removed kern/sparc64/cache.c.
14833
14834 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14835 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14836 grub_emu_init.c.
14837
14838 * configure.ac (AC_INIT): Bumped to 1.92.
14839
6a124103 148402005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
14841
14842 * kern/err.c (grub_error_push): Added new function to support error
14843 stacks.
14844 (grub_error_pop): Likewise.
14845 (grub_error_stack_items): New local variable to support error stacks.
14846 (grub_error_stack_pos): Likewise.
14847 (grub_error_stack_assert): Likewise.
14848 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14849 stack depth.
14850 (grub_print_error): Added support to print errors from error stack.
14851
14852 * include/grub/err.h (grub_error_push): Added function prototype.
14853 (grub_error_pop): Likewise.
14854
be973c1b 148552005-12-09 Hollis Blanchard <hollis@penguinppc.org>
14856
14857 * configure.ac: Accept `powerpc64' as host_cpu.
14858 (amd64): Rename to `biarch32'.
14859
14860 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14861 non-cacheline-aligned addresses.
14862
14863 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14864 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
14865 if `size' is non-zero.
14866
b04216ab 148672005-12-03 Marco Gerards <mgerards@xs4all.nl>
14868
14869 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14870 and `cd' to make sure the filename is not prefixed with a
14871 directory name.
14872 (pkgdata_MODULES): Add `gpt.mod'.
14873 (gpt_mod_SOURCES): New variable.
14874 (gpt_mod_CFLAGS): Likewise.
14875 (gpt_mod_LDFLAGS): Likewise.
14876
14877 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14878
14879 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14880 New macro.
14881
14882 * partmap/gpt.c: New file.
14883
14884 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14885 GPT partition map is detected.
14886
41730ed9 148872005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
14888
14889 * commands/i386/pc/play.c: New file.
14890 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14891 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14892 macros.
f19dbdb7 14893
95dc3643 148942005-11-27 Marco Gerards <mgerards@xs4all.nl>
14895
14896 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14897 ((unused))' to silence gcc warning.
14898
1569ec51 148992005-11-26 Hollis Blanchard <hollis@penguinppc.org>
14900
14901 * configure.ac: Correct `AC_PROG_YACC' test.
14902
9abde152 149032005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14904
14905 * util/powerpc/ieee1275/grub-install.in: Run the mount point
14906 check before installing files.
14907
44b83271 149082005-11-22 Mike Small <smallm@panix.com>
14909
14910 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14911 number regex so multidigit numbers are recognized correctly.
14912
149132005-11-22 Mike Small <smallm@panix.com>
14914
14915 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14916 debugging message before attempting to claim memory.
14917 (grub_rescue_cmd_initrd): Add a claim debugging message and try
14918 multiple addresses in case of failure.
14919
9c12956b 149202005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14921
14922 * term/tparm.c (get_space): Remove empty `if' statement.
14923
14924 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14925
14926 * kern/parser.c (check_varstate): Rename `state' to 's'.
14927
aeaf81d9 149282005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14929
14930 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
14931 variable definitions to the beginning of each function. Sort stack
14932 variables by size.
14933 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
14934 `buf' argument to `char *'.
14935
79bbb63f 149362005-11-22 Hollis Blanchard <hollis@penguinppc.org>
14937
14938 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14939 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 14940 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 14941 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14942 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14943 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14944 configfile.mod, search.mod, gzio.mod and test.mod.
14945 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14946 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14947 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14948 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14949 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14950 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14951 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14952 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14953 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14954 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14955 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14956 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14957 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14958 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14959 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14960 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14961 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14962 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14963 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14964 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14965 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14966 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14967 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14968
14969 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14970 `grep --include'.
14971 (pkgdata_MODULES): Add test.mod.
14972
233b1628 149732005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14974
14975 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
14976 appending to variables with "+=".
14977 (PModule): Use full pathname to generate *.lst filenames.
14978
14979 * Makefile.in: Fixed list rules moved from genmk.rb.
14980 (.DELETE_ON_ERROR): New special target.
14981 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14982
14983 * conf/i386-pc.rmk: Include conf/common.mk.
14984 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 14985 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 14986 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14987 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14988 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14989 configfile.mod, search.mod, gzio.mod and test.mod.
14990 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14991 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14992 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14993 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14994 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14995 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14996 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14997 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14998 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14999 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15000 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15001 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15002 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15003 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15004 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15005 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15006 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15007 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15008 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15009 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15010 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15011 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15012 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
15013 here...
15014 * conf/common.rmk: ... to here. New file.
15015
15016 * conf/common.mk: New file.
15017
16f820c8 150182005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
15019
15020 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
15021 (grub_script.tab.c): ... here.
15022
15023 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
15024 (grub_script.tab.c): ... here.
15025
15026 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
15027 (grub_script.tab.c): ... here.
15028
15029 * normal/command.c (grub_command_find): Fixed a memory leak of
15030 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
15031
63ba1554 150322005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15033
15034 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
15035 "@" which marks the start of a comment on ARM.
15036 (VARIABLE): Likewise.
15037
7f67dc13 150382005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15039
79bbb63f 15040 Add support for Linux/ADFS partition tables.
7f67dc13 15041
15042 * partmap/acorn.c: New file.
15043
15044 * include/grub/acorn_filecore.h: Likewise.
15045
15046 * DISTLIST: Added `partmap/acorn.c' and
15047 `include/grub/acorn_filecore.h'.
f19dbdb7 15048
7f67dc13 15049 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15050 `partmap/acorn.c'.
15051 (pkgdata_MODULES): Add `acorn.mod'.
15052 (acorn_mod_SOURCES): New variable.
15053 (acorn_mod_CFLAGS): Likewise.
15054
15055 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15056 `partmap/acorn.c'.
15057 (pkgdata_MODULES): Add `acorn.mod'.
15058 (acorn_mod_SOURCES): New variable.
15059 (acorn_mod_CFLAGS): Likewise.
15060
15061 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
15062 (pkgdata_MODULES): Add `acorn.mod'.
15063 (acorn_mod_SOURCES): New variable.
15064 (acorn_mod_CFLAGS): Likewise.
15065 (acorn_mod_LDFLAGS): Likewise.
15066
15067 * include/types.h (grub_disk_addr_t): New typedef.
15068
6d099807 150692005-11-13 Marco Gerards <mgerards@xs4all.nl>
15070
15071 * geninit.sh: New file.
15072
15073 * geninitheader.sh: Likewise.
15074
15075 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
15076 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
15077 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
15078 * commands/configfile.c (grub_configfile_init)
15079 (grub_configfile_fini): Likewise.
15080 * commands/default.c (grub_default_init, grub_default_fini):
15081 Likewise.
15082 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
15083 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
15084 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
15085 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
15086 Likewise.
15087 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
15088 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
15089 Likewise.
15090 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 15091 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 15092 Likewise.
15093 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
15094 Likewise.
fe6b695a 15095 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 15096 Likewise.
15097 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
15098 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
15099 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
15100 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
15101 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
15102 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
15103 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
15104 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
15105 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
15106 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
15107 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
15108 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
15109 * partmap/amiga.c (grub_amiga_partition_map_init)
15110 (grub_amiga_partition_map_fini): Likewise.
15111 * partmap/apple.c (grub_apple_partition_map_init)
15112 (grub_apple_partition_map_fini): Likewise.
15113 * partmap/pc.c (grub_pc_partition_map_init)
15114 (grub_pc_partition_map_fini): Likewise.
15115 * partmap/sun.c (grub_sun_partition_map_init,
15116 grub_sun_partition_map_fini): Likewise.
15117 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
15118 Likewise.
15119
15120 * util/grub-emu.c: Include <grub_modules_init.h>.
15121 (main): Don't initialize and de-initialize any modules directly,
15122 use `grub_init_all' and `grub_fini_all' instead.
15123
15124 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
15125 `grub_vesafb_mod_init'.
15126 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
15127 all users.
15128 * term/i386/pc/vga.c (grub_vga_init): Renamed to
15129 `grub_vga_mod_init'. Updated all users.
15130 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 15131
6d099807 15132 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
15133 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
15134 rules.
15135
15136 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
15137 Generate a function to initialize the module in utilities.
15138 Updated all callers.
15139 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
15140 initialize the module in utilities. Updated all callers.
15141
9046bcf0 151422005-11-09 Hollis Blanchard <hollis@penguinppc.org>
15143
15144 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
15145 escape sequence and a literal ^L to clear the screen.
15146
15147 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
15148 when returning from Open Firmware.
15149
d13ea639 151502005-11-09 Hollis Blanchard <hollis@penguinppc.org>
15151
15152 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
15153 (grub_ofconsole_height): Likewise.
15154 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
15155 manually insert a '\n'.
15156 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
15157 `grub_ofconsole_height'. Return early if these are already set.
15158
a8fcf206 151592005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
15160
15161 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15162 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
15163 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
15164 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
15165 and `normal/script.c'.
15166 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15167 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15168 (test_mod_SOURCES): New variable.
15169 (test_mod_CFLAGS): Likewise.
15170 (test_mod_LDFLAGS): Likewise.
15171 (pkgdata_MODULES): Add `test.mod'.
15172 (grub_script.tab.c): New rule.
15173 (grub_script.tab.h): Likewise.
15174
b6b32745 151752005-11-07 Marco Gerards <mgerards@xs4all.nl>
15176
15177 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15178 `commands/test.c', `normal/execute.c', `normal/lexer.c',
15179 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15180 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15181 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15182 (test_mod_SOURCES): New variable.
15183 (test_mod_CFLAGS): Likewise.
15184 (pkgdata_MODULES): Add `test.mod'.
15185 (grub_script.tab.c): New rule.
15186 (grub_script.tab.h): Likewise.
15187
daac212a 151882005-11-06 Marco Gerards <mgerards@xs4all.nl>
15189
15190 Add initial scripting support.
15191
15192 * commands/test.c: New file.
15193 * include/grub/script.h: Likewise.
15194 * normal/execute.c: Likewise.
15195 * normal/function.c: Likewise.
15196 * normal/lexer.c: Likewise.
15197 * normal/parser.y: Likewise.
15198 * normal/script.c: Likewise.
15199
15200 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 15201
daac212a 15202 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
15203 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
15204 `normal/function.c' and `normal/script.c'.
15205 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15206 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 15207 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
15208 variables.
daac212a 15209 (pkgdata_MODULES): Add `test.mod'.
15210 (grub_script.tab.c): New rule.
15211 (grub_script.tab.h): Likewise.
15212
15213 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
15214
15215 * include/grub/normal.h (grub_test_init): New prototype.
15216 (grub_test_fini): Likewise.
f19dbdb7 15217
daac212a 15218 * normal/command.c: Include <grub/script.h>.
15219 (grub_command_execute): Rewritten.
f19dbdb7 15220
daac212a 15221 * util/grub-emu.c (main): Call `grub_test_init' and
15222 `grub_test_fini'.
15223
77500b2b 152242005-11-03 Hollis Blanchard <hollis@penguinppc.org>
15225
15226 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
15227 to 0.
15228 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
15229 there are no pending characters.
15230
e45deb9e 152312005-11-03 Hollis Blanchard <hollis@penguinppc.org>
15232
15233 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
15234 `grub_strndup' to drop device arguments. Replace unnecessary
15235 `grub_strndup' with `grub_strdup'.
15236
4ce32619 152372005-11-03 Hollis Blanchard <hollis@penguinppc.org>
15238
15239 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
15240 `debug' environment variable has been set.
15241
152422005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 15243
4ce32619 15244 * Makefile.in (install-local): Use $(DATA).
15245 (uninstall): Likewise.
15246 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
15247 (sbin_UTILITIES): ... to here.
15248 (sbin_SCRIPTS): New variable.
15249 (grub_install_SOURCES): New variable.
15250 * util/powerpc/ieee1275/grub-install.in: New file.
15251 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
15252 variable.
15253 (add_segments): Call `grub_util_get_path'.
15254
25fe6f03 152552005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
15256
15257 From Timothy Baldwin:
15258 * commands/ls.c (grub_ls_list_files): Close FILE with
15259 grub_file_close.
15260 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
15261
04ccf3ec 152622005-10-24 Marco Gerards <mgerards@xs4all.nl>
15263
15264 * include/grub/parser.h: New file.
15265
15266 * kern/parser.c: Likewise.
15267
15268 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
15269 (grub_setup_SOURCES): Likewise.
15270 (grub_probefs_SOURCES): Likewise.
15271 (grub_emu_SOURCES): Likewise.
15272 (kernel_img_HEADERS): Add `parser.h'.
15273
15274 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
15275 (grub_emu_SOURCES): Add `kern/parser.c'.
15276 (grubof_SOURCES): Likewise.
15277
15278 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
15279 (grubof_SOURCES): Add `kern/parser.c'.
15280
15281 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
15282
15283 * kern/misc.c (grub_split_cmdline): Removed function.
15284
15285 * kern/rescue.c: Include <grub/parser.h>.
15286 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
15287 of `grub_split_cmdline'.
15288
15289 * normal/command.c: Include <grub/parser.h>.
15290 (grub_command_execute): Use `grub_parser_split_cmdline' instead
15291 of `grub_split_cmdline'.
15292
15293 * normal/completion.c: Include <grub/parser.h>.
15294 (cmdline_state): New variable.
15295 (iterate_dir): End the filename with a quote depending on the
15296 command line state.
15297 (get_state): new function.
15298 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
15299 split the arguments and determine the current argument. When the
15300 argument string is not quoted, escape all spaces.
15301
6d8f4b0e 153022005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
15303
15304 * normal/sparc64/setjmp.S: New file.
15305
15cf03ed 153062005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
15307
15308 * include/grub/sparc64/libgcc.h: New file.
15309 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
15310 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
15311 normal/sparc64/setjmp.c.
15312
03e8661a 153132005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
15314
15315 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
15316 * kern/sparc64/cache.S: New file.
15317 * kern/sparc64/cache.c: Removed.
15318 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
15319 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
15320 -mtune=ultrasparc.
15321 (COMMON_LDFLAGS): Add -melf64_sparc.
15322 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
15323 (grubof_SOURCES): Use cache.S instead of cache.c.
15324 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
15325 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
15326 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
15327 commented though.
15328 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
15329 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
15330 (linux_mod_CFLAGS): Commented out.
15331 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
15332 out because module isn't built.
15333 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
15334 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
15335 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
15336 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
15337 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
15338 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
15339 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
15340 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
15341 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
15342 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
15343 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15344 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15345 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
15346 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
15347
34eeec8a 153482005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
15349
15350 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
15351 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
15352 longer, because HFS should not be used on PC.
15353
708367a3 153542005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15355
15356 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
15357 consistently within the loop.
15358
6fa1251a 153592005-10-15 Marco Gerards <mgerards@xs4all.nl>
15360
15361 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
15362 directory can not be read.
15363
4801580b 153642005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
15365
15366 * configure.ac (AC_INIT): Increase the version number to 1.91.
15367
15368 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
15369 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
15370 term/i386/pc/serial.c.
15371
219ad426 153722005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
15373
15374 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
15375 file size must be permitted.
15376
15377 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
15378 between %ah and %al.
15379
688e5699 153802005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
15381
15382 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
15383 grub_uint64_t.
15384 Call the hook with a NUL-terminated filename.
15385 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
15386 grub_cpu_to_be32.
15387
15388 * kern/term.c (cursor_state): New variable.
15389 (grub_term_set_current): Reset the cursor state on a new
15390 terminal.
15391 (grub_setcursor): Rewritten to use CURSOR_STATE.
15392 (grub_getcursor): New function.
15393
15394 * include/grub/term.h (grub_getcursor): New prototype.
15395
15396 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
15397 integers on ARM. Reported by Timothy Baldwin
15398 <T.E.Baldwin99@members.leeds.ac.uk>.
15399
bb34586c 154002005-10-11 Marco Gerards <mgerards@xs4all.nl>
15401
15402 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
15403 allocated.
15404 (grub_sfs_dir): Likewise.
15405
9a909877 154062005-10-09 Marco Gerards <mgerards@xs4all.nl>
15407
15408 Add support for the SFS filesystem.
15409
15410 * fs/sfs.c: New file.
15411
15412 * DISTLIST: Added `fs/sfs.c'.
15413
15414 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
15415 (grub_probefs_SOURCES): Likewise.
15416 (grub_emu_SOURCES): Likewise.
15417 (pkgdata_MODULES): Add `sfs.mod'.
15418 (sfs_mod_SOURCES): New variable.
15419 (sfs_mod_CFLAGS): Likewise.
15420 (sfs_mod_LDFLAGS): Likewise.
15421
15422 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
15423 (pkgdata_MODULES): Add `sfs.mod'.
15424 (sfs_mod_SOURCES): New variable.
15425 (sfs_mod_CFLAGS): Likewise.
15426
15427 * util/grub-emu.c (main): Call `grub_sfs_init' and
15428 `grub_sfs_fini'.
15429
15430 * include/grub/fs.h (grub_sfs_init): New prototype.
15431 (grub_sfs_fini): Likewise.
15432
57bdbde3 154332005-10-07 Marco Gerards <mgerards@xs4all.nl>
15434
15435 Add support for the AFFS filesystem.
15436
15437 * fs/affs.c: New file.
15438
15439 * DISTLIST: Added `fs/affs.c'.
15440
15441 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
15442 (grub_probefs_SOURCES): Likewise.
15443 (grub_emu_SOURCES): Likewise.
15444 (pkgdata_MODULES): Add `affs.mod'.
15445 (affs_mod_SOURCES): New variable.
15446 (affs_mod_CFLAGS): Likewise.
15447 (affs_mod_LDFLAGS): Likewise.
15448
15449 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
15450 (pkgdata_MODULES): Add `affs.mod'.
15451 (affs_mod_SOURCES): New variable.
15452 (affs_mod_CFLAGS): Likewise.
15453
15454 * util/grub-emu.c (main): Call `grub_affs_init' and
15455 `grub_affs_fini'.
15456
15457 * include/grub/fs.h (grub_affs_init): New prototype.
15458 (grub_affs_fini): Likewise.
15459
047b67e0 154602005-10-01 Marco Gerards <mgerards@xs4all.nl>
15461
15462 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
15463
59b8208a 154642005-10-01 Marco Gerards <mgerards@xs4all.nl>
15465
15466 * configure.ac: Accept `x86_64' as host_cpu. In that case add
15467 `-m32' to CFLAGS.
15468
15469 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
15470 linking.
f19dbdb7 15471
59b8208a 15472 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
15473 (COMMON_LDFLAGS): New variable.
15474 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
15475 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
15476 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
15477 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
15478 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
15479 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
15480 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
15481 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
15482 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
15483 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
15484 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
15485 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
15486 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
15487 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
15488 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
15489 variables.
15490 (normal_mod_ASFLAGS): Add `-m32'.
15491
15492 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
15493 (grub_host_size_t, grub_host_ssize_t): New types.
15494 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 15495 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 15496 `GRUB_HOST_SIZEOF_VOID_P'.
15497
15498 * include/grub/kernel.h (struct grub_module_header): Type of
15499 member offset changed to `grub_host_off_t'. Type of member size
15500 changed to `grub_host_size_t'.
15501 (struct grub_module_info): Type of member offset changed to
15502 `grub_host_off_t'. Type of member size changed to
15503 `grub_host_size_t'.
15504
b4093103 155052005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
15506
15507 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 15508
b4093103 15509 * kern/i386/pc/startup.S (multiboot_header): New label.
15510 (multiboot_entry): Likewise.
15511 (multiboot_trampoline): Likewise.
15512
15513 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15514 Increased to 0x4A0.
15515
15516 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
15517 put parentheses after a question mark.
15518 [!GRUB_UTIL] (my_mod): New variable.
15519
15520 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
15521
b2499b29 155222005-09-28 Marco Gerards <mgerards@xs4all.nl>
15523
15524 Adds support for the XFS filesystem. Btrees are not supported
15525 yet.
15526
15527 * fs/xfs.c: New file.
15528
15529 * DISTLIST: Added `fs/xfs.c'.
15530
15531 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
15532 (grub_probefs_SOURCES): Likewise.
15533 (grub_emu_SOURCES): Likewise.
15534 (pkgdata_MODULES): Add `xfs.mod'.
15535 (xfs_mod_SOURCES): New variable.
15536 (xfs_mod_CFLAGS): Likewise.
15537
15538 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
15539 (pkgdata_MODULES): Add `xfs.mod'.
15540 (xfs_mod_SOURCES): New variable.
15541 (xfs_mod_CFLAGS): Likewise.
15542
15543 * util/grub-emu.c (main): Call `grub_xfs_init' and
15544 `grub_xfs_fini'.
15545
15546 * include/grub/fs.h (grub_xfs_init): New prototype.
15547 (grub_xfs_fini): Likewise.
15548
f19dbdb7 15549
83d37a62 155502005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
15551
15552 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
15553 color modes, allow greater than 16 colors to be configured as
15554 a default palette.
15555
47d2d65e 155562005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
15557
15558 * normal/completion.c (complete_arguments): Add the qualifier
15559 const into OPTIONS.
15560
15561 From Omniflux <omniflux+lists@omniflux.com>:
15562 * include/grub/terminfo.h: New file.
15563 * include/grub/tparm.h: Likewise.
15564 * include/grub/i386/pc/serial.h: Likewise.
15565 * term/terminfo.c: Likewise.
15566 * term/tparm.c: Likewise.
15567 * term/i386/pc/serial.c: Likewise.
15568 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
15569 serial.mod.
15570 (terminfo_mod_SOURCES): New variable.
15571 (terminfo_mod_CFLAGS): Likewise.
15572 (serial_mod_SOURCES): Likewise.
15573 (serial_mod_CFLAGS): Likewise.
15574
48b671ff 155752005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
15576
15577 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
15578 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
15579 and kern/powerpc/ieee1275/cmain.c, respectively.
15580
15581 * boot/powerpc/ieee1275/crt0.S: Moved to ...
15582 * kern/powerpc/ieee1275/crt0.S: ... here.
15583
15584 * boot/powerpc/ieee1275/cmain.c: Moved to ...
15585 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 15586
48b671ff 15587 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
15588 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
15589 instead of boot/powerpc/ieee1275/crt0.S and
15590 boot/powerpc/ieee1275/cmain.c, respectively.
15591
15592 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
15593 sectors. It was not used anyway.
15594
09fc77a7 155952005-08-30 Hollis Blanchard <hollis@penguinppc.org>
15596
15597 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
15598 `unused parameter' warning.
15599
003789c7 156002005-08-30 Hollis Blanchard <hollis@penguinppc.org>
15601
15602 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
15603 function.
15604 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
15605 getcharwidth.
15606
67f44c86 156072005-08-28 Marco Gerards <metgerards@student.han.nl>
15608
15609 * include/grub/normal.h (enum grub_completion_type): Added
15610 `GRUB_COMPLETION_TYPE_ARGUMENT'.
15611
15612 * normal/cmdline.c (print_completion): Handle
15613 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
15614 * normal/menu_entry.c (store_completion): Likewise.
15615
15616 * normal/completion.c (complete_arguments): New function.
15617 (grub_normal_do_completion): Call `complete_arguments' when the
15618 current words start with a dash.
15619
0b5abe02 156202005-08-27 Marco Gerards <metgerards@student.han.nl>
15621
15622 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
15623 `gzio.mod' instead of `io.mod').
15624
d9864ee1 156252005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
15626
15627 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
15628 (DISTDIRS): Added io and video.
15629 Rewrite the search routine to make an output consistently.
15630
15631 * DISTLIST: Added conf/sparc64-ieee1275.mk,
15632 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
15633 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
15634 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
15635 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
15636 util/powerpc/ieee1275/misc.c.
f19dbdb7 15637
d9864ee1 15638 * include/grub/gzio.h: New file.
15639 * io/gzio.c: Likewise.
f19dbdb7 15640
d9864ee1 15641 * kern/file.c (grub_file_close): Call grub_device_close only if
15642 FILE->DEVICE is not NULL.
15643
15644 * include/grub/mm.h [!NULL] (NULL): New macro.
15645
15646 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
15647
15648 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
15649 (pkgdata_MODULES): Added gzio.mod.
15650 (gzio_mod_SOURCES): New variable.
15651 (gzio_mod_CFLAGS): Likewise.
15652
15653 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
15654 (pkgdata_MODULES): Added gzio.mod.
15655 (gzio_mod_SOURCES): New variable.
15656 (gzio_mod_CFLAGS): Likewise.
15657
15658 * commands/cat.c: Include grub/gzio.h.
15659 (grub_cmd_cat): Use grub_gzfile_open instead of
15660 grub_file_open.
f19dbdb7 15661
d9864ee1 15662 * commands/cmp.c: Include grub/gzio.h.
15663 (grub_cmd_cmp): Use grub_gzfile_open instead of
15664 grub_file_open.
15665
15666 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
15667 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
15668 grub_file_open.
15669 (grub_rescue_cmd_module): Likewise.
15670
fa46f4b5 156712005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15672
15673 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
15674 kern/sparc64/ieee1275/init.c because it contains _start.
15675 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
15676
e9211b5d 156772005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15678
15679 * configure.ac: Add support for sparc64 host with ieee1275
15680 firmware.
15681 * configure: Generated from configure.ac.
15682 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
15683 instead of int.
15684 (grub_ofdisk_read): Likewise.
15685 (grub_ofdisk_open): Use %p to print pointer values, and cast the
15686 pointers as (void *) to remove a warning.
15687 (grub_ofdisk_close): Likewise.
15688 (grub_ofdisk_read): Likewise.
15689 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
15690 returns, so make it return void to remove a warning.
15691 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
15692 Corresponding prototype change.
15693 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
15694 values, and cast the pointers as (void *) to remove a warning.
15695 (grub_mm_dump): Likewise.
15696 * conf/sparc64-ieee1275.mk: New file.
15697 * conf/sparc64-ieee1275.rmk: Likewise.
15698 * include/grub/sparc64/setjmp.h: Likewise.
15699 * include/grub/sparc64/types.h: Likewise.
15700 * include/grub/sparc64/ieee1275/console.h: Likewise.
15701 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
15702 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
15703 * include/grub/sparc64/ieee1275/time.h: Likewise.
15704 * kern/sparc64/cache.c: Likewise.
15705 * kern/sparc64/dl.c: Likewise.
15706 * kern/sparc64/ieee1275/init.c: Likewise.
15707 * kern/sparc64/ieee1275/openfw.c: Likewise.
15708
385c6a92 157092005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15710
15711 * util/console.c (grub_ncurses_putchar): If C is greater than
15712 0x7f, set C to a question mark.
15713 (grub_ncurses_getcharwidth): New function.
15714 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
15715 getcharwidth.
15716
15717 * normal/menu.c (print_entry): Made aware of Unicode. First,
15718 convert TITLE to UCS-4, and predict the cursor position by
15719 grub_getcharwidth.
15720
15721 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
15722 const to SRC.
15723 * kern/misc.c (grub_utf16_to_utf8): Likewise.
15724
16ccb8b1 157252005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15726
15727 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
15728 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15729 grub_strcat.
15730
15731 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
15732 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15733 grub_strcpy and grub_strlen. Take it into account that a space
15734 character is inserted as a delimiter.
15735
6a85ce79 157362005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15737
15738 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 15739 invalid magic in the error.
6a85ce79 15740
15741 * commands/search.c: New file.
f19dbdb7 15742
6a85ce79 15743 * util/grub-emu.c (main): Call grub_search_init and
15744 grub_search_fini.
15745
15746 * kern/rescue.c (grub_rescue_print_disks): Removed.
15747 (grub_rescue_print_devices): New function.
15748 (grub_rescue_cmd_ls): Use grub_device_iterate with
15749 grub_rescue_print_devices instead of grub_disk_dev_iterate with
15750 grub_rescue_print_disks.
15751
15752 * kern/partition.c (grub_partition_iterate): Return the result of
15753 PARTMAP->ITERATE instead of GRUB_ERRNO.
15754
15755 * kern/device.c: Include grub/partition.h.
15756 (grub_device_iterate): New function.
15757
15758 * include/grub/partition.h (grub_partition_iterate): Return int
15759 instead of grub_err_t.
15760
15761 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15762 prototype.
15763 [GRUB_UTIL] (grub_search_fini): Likewise.
15764
15765 * include/grub/device.h (grub_device_iterate): New prototype.
15766
15767 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15768 commands/search.c.
15769 (pkgdata_MODULES): Added search.mod.
15770 (search_mod_SOURCES): New variable.
15771 (search_mod_CFLAGS): Likewise.
15772
15773 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15774 (pkgdata_MODULES): Added search.mod.
15775 (search_mod_SOURCES): New variable.
15776 (search_mod_CFLAGS): Likewise.
15777
15778 * commands/ls.c (grub_ls_list_disks): Renamed to ...
15779 (grub_ls_list_devices): ... this, and use grub_device_iterate.
15780 All callers changed.
15781
15782 * DISTLIST: Added commands/search.c.
15783
ef095434 157842005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15785
15786 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
15787 conversion.
15788 (grub_getcharwidth): New function.
15789
15790 * kern/misc.c (grub_utf8_to_ucs4): New function.
15791
15792 * include/grub/term.h (struct grub_term): Added a new member
15793 "getcharwidth".
15794 (grub_getcharwidth): New prototype.
15795
15796 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15797
15798 * term/i386/pc/console.c (map_char): New function. Segregated from
15799 grub_console_putchar.
15800 (grub_console_putchar): Use map_char.
15801 (grub_console_getcharwidth): New function.
15802 (grub_console_term): Specified grub_console_getcharwidth as
15803 getcharwidth.
15804
15805 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15806 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15807
15808 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15809 GRUB_ERRNO.
15810 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15811 on grub_strtoul completely.
15812 (write_char): Declare local variables in the beginning of the
15813 function.
15814 (grub_vesafb_getcharwidth): New function.
15815 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15816 getcharwidth.
15817
1f0a95e4 158182005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
15819
15820 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15821 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15822 commands/i386/pc/vbetest.c.
15823
15824 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15825 call grub_vbe_get_controller_info again, because the returned
15826 information is volatile.
15827 (grub_vbe_set_video_mode): Mostly rewritten.
15828 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15829 grub_vbe_status_t correctly.
15830 (grub_vbe_get_video_mode_info): Likewise.
15831 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15832 several if statements.
15833
15834 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15835 * commands/i386/pc/vbeinfo.c: ... this.
15836
15837 * commands/i386/pc/vbe_test.c: Renamed to ...
15838 * commands/i386/pc/vbetest.c: ... this.
15839
15840 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15841 ...
15842 (grub_cmd_vbeinfo): ... this. Save video modes before
15843 iterating. Skip a video mode, if it is not available, not enough
15844 information is given or it is monochrome. Show the memory
15845 model. Leave the interpretation of MODEVAR to grub_strtoul
15846 completely.
15847 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15848 (GRUB_MOD_FINI): Likewise.
15849
15850 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15851 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15852 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15853 duplicated grub_env_get. Leave the interpretation of MODEVAR to
15854 grub_strtoul completely.
15855 (real2pm): Removed.
15856 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15857 (GRUB_MOD_FINI): Likewise.
15858
15859 * normal/misc.c: Include grub/mm.h.
15860
15861 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15862 vbe_list_modes with vbetest.mod and vbeinfo.mod.
15863 (vbe_list_modes_mod_SOURCES): Removed.
15864 (vbe_list_modes_mod_CFLAGS): Likewise.
15865 (vbe_test_mod_SOURCES): Likewise.
15866 (vbe_test_mod_CFLAGS): Likewise.
15867 (vbeinfo_mod_SOURCES): New variable.
15868 (vbeinfo_mod_CFLAGS): Likewise.
15869 (vbetest_mod_SOURCES): Likewise.
15870 (vbetest_mod_CFLAGS): Likewise.
15871
992ffbbe 158722005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
15873
15874 * normal/misc.c: New file.
15875
15876 * DISTLIST: Added normal/misc.c.
f19dbdb7 15877
992ffbbe 15878 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15879 DISK to HOOK. Call HOOK with DISK.
15880 * partmap/apple.c (apple_partition_map_iterate): Likewise.
15881 * partmap/pc.c (pc_partition_map_iterate): Likewise.
15882 * partmap/sun.c (sun_partition_map_iterate): Likewise.
15883
15884 * normal/menu_entry.c (struct screen): Added a new member
15885 "completion_shown".
15886 (completion_buffer): New global variable.
15887 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15888 (store_completion): New function.
15889 (complete): Likewise.
15890 (clear_completions): Likewise.
15891 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15892 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15893 a tab, call complete.
15894
15895 * normal/completion.c (disk_dev): Removed.
15896 (print_simple_completion): Likewise.
15897 (print_partition_completion): Likewise.
15898 (print_func): New global variable.
15899 (add_completion): Do not take the arguments WHAT or PRINT any
15900 longer. Added a new argument TYPE. Instead of printing directly,
15901 call PRINT_FUNC if not NULL.
15902 All callers changed.
15903 (complete_device): Use a local variable DEV instead of
15904 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15905 (grub_normal_do_completion): Take a new argument HOOK. Do not
15906 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15907 empty string, return NULL instead.
15908 All callers changed.
15909
15910 * normal/cmdline.c (print_completion): New function.
15911
15912 * kern/partition.c (grub_partition_iterate): Add an argument DISK
15913 to HOOK.
15914 All callers changed.
15915
15916 * kern/disk.c (grub_print_partinfo): Removed.
15917
15918 * include/grub/partition.h (struct grub_partition_map): Add a new
15919 argument DISK into HOOK of ITERATE.
15920 (grub_partition_iterate): Add a new argument DISK to HOOK.
15921
15922 * include/grub/normal.h (enum grub_completion_type): New enum.
15923 (grub_completion_type_t): New type.
15924 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15925 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15926 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15927 (GRUB_COMPLETION_TYPE_FILE): Likewise.
15928 (grub_normal_do_completion): Added a new argument HOOK.
15929 (grub_normal_print_device_info): New prototype.
15930
15931 * include/grub/disk.h (grub_print_partinfo): Removed.
15932
15933 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15934 (normal_mod_SOURCES): Likewise.
15935 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15936 (normal_mod_SOURCES): Likewise.
15937
15938 * commands/ls.c (grub_ls_list_disks): Use
15939 grub_normal_print_device_info instead of grub_print_partinfo. Free
15940 PNAME.
15941 (grub_ls_list_files): Use grub_normal_print_device_info instead of
15942 duplicating the code.
15943
0bd41162 159442005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15945
15946 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 15947 follow GCS more precisely.
15948 * commands/i386/pc/vbe_test.c: Likewise.
15949 * include/grub/i386/pc/vbe.h: Likewise.
15950 * term/i386/pc/vesafb.c: Likewise.
15951 * video/i386/pc/vbe.c: Likewise.
0bd41162 15952
6323696a 159532005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
15954
15955 * DISTLIST: Added term/i386/pc/vesafb.c
15956 DISTLIST: Added video/i386/pc/vbe.c
15957 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15958 DISTLIST: Added commands/i386/pc/vbe_test.c.
15959 * commands/i386/pc/vbe_list_modes.c: New file.
15960 * commands/i386/pc/vbe_test.c: Likewise.
15961 * term/i386/pc/vesafb.c: Likewise.
15962 * video/i386/pc/vbe.c: Likewise.
15963 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15964 (grub_vbe_probe) Added prototype.
15965 (grub_vbe_set_video_mode) Likewise.
15966 (grub_vbe_get_video_mode) Likewise.
15967 (grub_vbe_get_video_mode_info) Likewise.
15968 (grub_vbe_set_pixel_rgb) Likewise.
15969 (grub_vbe_set_pixel_index) Likewise.
15970 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15971 (pkgdata_MODULES): Added vesafb.mod.
15972 (pkgdata_MODULES): Added vbe_list_modes.mod.
15973 (pkgdata_MODULES): Added vbe_test.mod.
15974 (vbe_mod_SOURCES): Added.
15975 (vbe_mod_CFLAGS): Likewise.
15976 (vesafb_mod_SOURCES): Likewise.
15977 (vesafb_mod_CFLAGS): Likewise.
15978 (vbe_list_modes_mod_SOURCES): Likewise.
15979 (vbe_list_modes_mod_CFLAGS): Likewise.
15980 (vbe_test_mod_SOURCES): Likewise.
15981 (vbe_test_mod_CFLAGS): Likewise.
15982
0a74e62f 159832005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
15984
0a74e62f 15985 * normal/command.c (grub_command_execute): If INTERACTIVE is
15986 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15987 CMDLINE. Disable the pager if INTERACTIVE is true.
15988 All callers are changed.
15989
15990 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15991 before reading a config file.
15992 * normal/main.c (read_config_file): Even if a command is not
15993 found, register it if it is within an entry.
15994
15995 * util/grub-emu.c: Include sys/types.h and unistd.h.
15996 (options): Added --hold.
15997 (struct arguments): Added a new member "hold".
15998 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15999 missing.
16000 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
16001 cleared by a debugger, if it is not zero.
16002
16003 * include/grub/normal.h (grub_command_execute): Add an argument
16004 INTERACTIVE.
16005
e51f85ae 160062005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
16007
16008 * DISTLIST: Added include/grub/i386/pc/vbe.h.
16009
e9c6f39b 160102005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
16011
16012 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
16013 program with another one, because the old one didn't detect a bug
16014 in gcc-3.4. Always use regparm 2, because the new test is still
16015 not enough for gcc-4.0. Someone must investigate a simple test
16016 case which detects a bug in gcc-4.0.
16017
8de3495c 160182005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
16019
16020 * DISTLIST: Added normal/completion.c.
16021
16022 * normal/completion.c: New file.
f19dbdb7 16023
8de3495c 16024 * term/i386/pc/console.c (grub_console_getwh): New function.
16025 (grub_console_term): Assign grub_console_getwh to getwh.
16026
16027 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
16028 function is defined in normal/completion.c as
16029 grub_normal_do_completion.
16030 (grub_cmdline_get): Use grub_normal_do_completion instead of
16031 grub_tab_complete.
16032
16033 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
16034 returns non-zero, otherwise return 0.
16035 (grub_partition_iterate): First, probe the partition map. Then,
16036 call ITERATE only for this partition map.
16037
16038 * kern/misc.c (grub_strncmp): Rewritten.
16039
16040 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
16041 returns non-zero. Otherwise return 0.
16042
16043 * include/grub/partition.h (grub_partition_map_iterate): Return
16044 int instead of void.
16045
16046 * include/grub/normal.h (grub_normal_do_completion): New prototype.
16047
16048 * include/grub/misc.h (grub_strncmp): Change the type of N to
16049 grub_size_t.
16050
16051 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
16052 of void.
16053
16054 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 16055 unsigned explicitly before comparing it with I.
8de3495c 16056
16057 * kern/main.c (grub_env_write_root): Add the attribute unused into
16058 VAR.
16059
16060 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16061 normal/completion.c.
16062 (normal_mod_SOURCES): Likewise.
16063 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
16064 (normal_mod_SOURCES): Likewise.
16065
16066 * normal/command.c (grub_iterate_commands): If ITERATE returns
16067 non-zero, return one immediately.
16068
e85e144b 160692005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
16070
16071 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
16072 * kern/i386/pc/startup.S: Updated Global Descriptor table's
16073 descriptions.
16074 (grub_vbe_get_controller_info): New function.
16075 (grub_vbe_get_mode_info): Likewise.
16076 (grub_vbe_set_mode): Likewise.
16077 (grub_vbe_get_mode): Likewise.
16078 (grub_vbe_set_memory_window): Likewise.
16079 (grub_vbe_get_memory_window): Likewise.
16080 (grub_vbe_set_scanline_length): Likewise.
16081 (grub_vbe_get_scanline_length): Likewise.
16082 (grub_vbe_set_display_start): Likewise.
16083 (grub_vbe_get_display_start): Likewise.
16084 (grub_vbe_set_palette_data): Likewise.
16085 * include/grub/i386/pc/vbe.h: New file.
16086
c46153d2 160872005-08-08 Hollis Blanchard <hollis@penguinppc.org>
16088
16089 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16090 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
16091 * DISTLIST: Likewise.
16092 * kern/ieee1275/of.c: Moved to ...
16093 * kern/ieee1275/ieee1275.c: ... here.
16094
0cb90c45 160952005-08-08 Hollis Blanchard <hollis@penguinppc.org>
16096
16097 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
16098 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
16099 Pass 0 as `end' parameter to grub_strtoul().
16100
a19fb360 161012005-08-08 Hollis Blanchard <hollis@penguinppc.org>
16102
16103 * include/grub/powerpc/ieee1275/console.h: Do not include
16104 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
16105 ifdef.
16106 (grub_console_cur_color): Remove i386-specific prototype.
16107 (grub_console_real_putchar): Likewise.
16108 (grub_console_checkkey): Likewise.
16109 (grub_console_getkey): Likewise.
16110 (grub_console_getxy): Likewise.
16111 (grub_console_gotoxy): Likewise.
16112 (grub_console_cls): Likewise.
16113 (grub_console_setcursor): Likewise.
16114 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
16115 Include <grub/machine/console.h>.
16116 * term/ieee1275/ofconsole.c: Likewise.
16117
4ac9bd04 161182005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
16119
16120 * Makefile.in (LIBLZO): New variable.
16121
16122 * configure.ac: Check for LZO version 2.
16123
16124 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
16125 lzo/lzo1x.h instead of lzo1x.h.
16126
16127 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
16128 of -llzo.
16129
16130 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
16131 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
16132
16133 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
16134 copying the data from PARTITION to P.
16135
f4917dfd 161362005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
16137
16138 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
16139 negative, unload the module.
16140
16141 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
16142 map is "pc_partition_map" but not "pc".
16143 (usage): Fix the description. The options are --boot-image and
16144 --core-image but not --boot-file or --core-file.
16145 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
16146 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
16147 DEFAULT_DIRECTORY.
16148
16149 * util/i386/pc/grub-install.in: Do not specify --boot-file or
16150 --core-file. Specify INSTALL_DEVICE as an argument.
16151
16152 * util/console.c: Include config.h.
16153 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
16154 [HAVE_NCURSES_H]: Include ncurses.h.
16155 [HAVE_CURSES_H]: Include curses.h.
16156 [!A_NORMAL] (A_NORMAL): Defined as zero.
16157 [!A_STANDOUT] (A_STANDOUT): Likewise.
16158
16159 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
16160 -lncurses.
16161 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
16162
16163 * configure.ac: Check for curses libraries and headers.
16164
16165 * Makefile.in (LIBCURSES): New variable.
16166
16167 * genmk.rb (Script::rule): Set the executable bits.
16168
16169 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
16170 name of the PC partition map is "pc_partition_map" but not "pc".
16171
0e143073 161722005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
16173
16174 * util/i386/pc/grub-install.in (grub_probefs): New variable.
16175 (modules): Likewise.
16176 (usage): Added descriptions for --modules and --grub-probefs.
16177 Handle --modules and --grub-probefs. Save the arguments in MODULES
16178 and GRUB_PROBEFS, respectively.
16179 Auto-detect a filesystem module against GRUBDIR. If the result is
16180 empty and modules are not specified explicitly, abort the
16181 installation. Add the result to MODULES.
16182
16183 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
16184 disk/powerpc/ieee1275/ofdisk.c,
16185 include/grub/powerpc/ieee1275/init.h and
16186 term/powerpc/ieee1275/ofconsole.c.
16187 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
16188 term/ieee1275/ofconsole.c.
16189
16190 * include/grub/powerpc/ieee1275/console.h: Resurrected.
16191
16192 * COPYING: Upgraded to the latest version. Only the address of the
16193 FSF office has changed.
f19dbdb7 16194
efd6e6d5 161952005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
16196
16197 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16198 kern/ieee1275.c with kern/ieee1275/of.c.
16199
16200 * kern/ieee1275.c: Moved to ...
16201 * kern/ieee1275/of.c: ... here.
16202
8ceafda2 162032005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
16204
16205 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 16206 readability.
8ceafda2 16207
16208 * config.guess: Updated to the latest version from gnulib.
16209 * config.sub: Likewise.
16210 * install.sh: Likewise.
16211 * mkinstalldirs: Likewise.
16212
16213 * include/grub/console.h: Removed. This file is arch-specific. Do
16214 not put this in include/grub.
16215
16216 * include/grub/i386/pc/console.h: Resurrected.
16217
16218 * util/console.c: Include grub/machine/console.h instead of
16219 grub/console.h.
16220 * util/grub-emu.c: Likewise.
16221
267f6cd9 162222005-08-04 Marco Gerards <metgerards@student.han.nl>
16223
16224 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
16225 hardcoded value.
f19dbdb7 16226
267f6cd9 16227 From Vincent Pelletier <subdino2004@yahoo.fr>
16228 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
16229 Redefined to use grub_getwh.
16230 (grub_term): New member named getwh.
16231 (grub_getwh): New prototype.
16232 * kern/term.c (grub_getwh): New function.
16233 * term/i386/pc/console.c (grub_console_getwh): New function.
16234 (grub_console_term): New member `getwh'.
16235 * term/i386/pc/vga.c (grub_vga_getwh): New function.
16236 (grub_vga_term): New member `getwh'.
0b5abe02 16237 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 16238 grub_ssize_t.
16239 (grub_ofconsole_getw): New function.
16240 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
16241 (grub_ofconsole_term): New field named getwh and new initial
16242 value.
16243
3be7266d 162442005-08-03 Hollis Blanchard <hollis@penguinppc.org>
16245
16246 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
16247 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
16248 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
16249 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
16250 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
16251 of <grub/machine/ieee1275.h>.
16252 * commands/ieee1275/reboot.c: Likewise.
16253 * boot/powerpc/ieee1275/ieee1275.c: Move ...
16254 * kern/ieee1275.c: ... to here. All users updated. Change all
16255 parameter structs to use new type `grub_ieee1275_cell_t'.
16256 * term/powerpc/ieee1275/ofconsole.c: Move ...
16257 * term/ieee1275/ofconsole.c: ... to here. All users updated.
16258 * disk/powerpc/ieee1275/ofdisk.c: Move ...
16259 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
16260 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
16261 to return int.
16262 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
16263 Remove unused prototypes. All users updated.
16264 * include/grub/powerpc/ieee1275/console.h: Removed.
16265 * include/grub/powerpc/ieee1275/ieee1275.h: Define
16266 `grub_ieee1275_cell_t'.
16267 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
16268 Cast comparisons with -1 to the correct type.
16269 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
16270 type to match `grub_ieee1275_entry_fn'.
16271
8b5f3938 162722005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
16273
16274 * DISTLIST: Added util/i386/pc/grub-probefs.c.
16275
16276 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
16277 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
16278 partmap/sun.c.
16279 (grub_probefs_SOURCES): New variable.
16280
16281 * util/i386/pc/grub-probefs.c: New file.
16282
16283 * util/i386/pc/grub-setup.c (main): Call
16284 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
16285 grub_hfs_init and grub_jfs_init to initialize the system. Call
16286 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
16287 grub_pc_partition_map_fini to finish the system.
16288
ea409713 162892005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
16290
16291 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
16292 function.
16293 (grub_multiboot_load_elf32): Likewise.
16294 (grub_multiboot_is_elf64): Likewise.
16295 (grub_multiboot_load_elf64): Likewise.
16296 (grub_multiboot_load_elf): Likewise.
16297 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
16298 an ELF32 or ELF64 file.
16299 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
16300
16301 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
16302 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
16303 NULL before calling FS->LABEL.
16304 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
16305 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
16306 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
16307 before calling FS->LABEL.
16308
141a288b 163092005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
16310
16311 * util/i386/pc/grub-install.in (datadir): New variable.
16312 (libdir): Removed.
16313 (pkgdatadir): New variable.
16314 (pkglibdir): Removed.
16315
0d5f8a54 163162005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
16317
16318 * DISTLIST: Added util/i386/pc/grub-install.in.
16319
16320 * util/i386/pc/grub-install.in: New file.
16321
16322 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
16323 (grub_install_SOURCES): Likewise.
16324
16325 * genmk.rb: Added support for scripts.
16326 (Script): New class.
16327 (scripts): New variable.
16328
16329 * Makefile.in (install-local): Install sbin_SCRIPTS by
16330 INSTALL_SCRIPT.
16331 (uninstall): Remove sbin_SCRIPTS.
16332
16333 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
16334 device, try to get a GRUB device by
16335 grub_util_biosdisk_get_grub_dev.
16336 Free DEST_DEV.
16337
16338 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
16339 description for --device-map.
16340
5f968e1e 163412005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
16342
16343 Change the semantics of variable hooks. They now return strings
16344 instead of error values.
f19dbdb7 16345
5f968e1e 16346 * util/i386/pc/grub-setup.c: Include grub/env.h.
16347 (setup): Use grub_device_set_root instead of grub_env_set.
16348
16349 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
16350 grub_env_get instead of grub_device_set_root and
16351 grub_device_get_root, respectively.
16352
16353 * kern/main.c (grub_env_write_root): New function.
16354 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
16355 grub_env_set instead of grub_device_set_root.
16356
16357 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
16358 many variables.
16359 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
16360 rather than calling ENV->WRITE_HOOK afterwards.
16361 (grub_env_get): Return the result of ENV->READ_HOOK rather than
16362 passing a pointer of a pointer.
16363 (grub_register_variable_hook): Change the types of "read_hook" and
16364 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
16365 respectively.
16366 Allocate the default empty string on the heap, because this string
16367 may be freed later.
16368
16369 * kern/device.c: Include grub/env.h.
16370 (grub_device_set_root): Removed.
16371 (grub_device_get_root): Likewise.
16372 (grub_device_open): Use grub_env_get instead of
16373 grub_device_get_root.
16374
16375 * include/grub/env.h (grub_env_read_hook_t): New type.
16376 (grub_env_write_hook_t): Likewise.
16377 (grub_env_var): Change the types of "read_hook" and "write_hook"
16378 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
16379 (grub_register_variable_hook): Likewise.
16380
16381 * include/grub/device.h (grub_device_set_root): Removed.
16382 (grub_device_set_root): Likewise.
16383
16384 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
16385 make sure that DIRNAME terminates with '/', so that
16386 grub_fat_find_dir will fail if PATH is not a directory.
16387
16388 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
16389 from DIRNAME.
16390 Use the qualifier auto for print_files and print_files_long.
16391 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
16392 as a regular file.
16393 Put a newline only if there is no error.
16394 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
16395 used.
16396
896f0afd 163972005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
16398
16399 * kern/partition.c (grub_partition_probe): Initialize PART to
16400 NULL. Otherwise, when no partition map is registered, this returns
16401 a garbage.
16402
b28b81b2 164032005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
16404
16405 * partmap/apple.c (apple_partition_map_iterate): Check if POS
16406 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
16407 valid.
16408
5f3607e0 164092005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
16410
16411 * commands/ls.c (grub_ls_list_disks): Print the filesystem
16412 information on each device, if it does not have partitions. Print
16413 "Device" instead of "Disk", because this function is not specific
16414 to disk devices.
16415
16416 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
16417 static to ensure that it is put on the memory rather than a
16418 register.
16419
502c87e8 164202005-07-17 Yoshinori Okuji <okuji@enbug.org>
16421
16422 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
16423 (grub_cat_init): Likewise.
16424 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
16425 (options): Likewise.
16426 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
16427 (grub_configfile_init): Likewise.
16428 * font/manager.c (GRUB_MOD_INIT): Likewise.
16429 * commands/help.c (GRUB_MOD_INIT): Likewise.
16430 (grub_help_init): Likewise.
16431 * normal/command.c (grub_command_init): Likewise.
16432 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
16433 * disk/loopback.c (grub_loop_init): Likewise.
16434 (GRUB_MOD_INIT): Likewise.
16435 * commands/ls.c (grub_ls_init): Likewise.
16436 (GRUB_MOD_INIT): Likewise.
16437 (options): Likewise.
16438 * commands/boot.c (grub_boot_init): Likewise.
16439 (GRUB_MOD_INIT): Likewise.
16440 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
16441 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
16442 (GRUB_MOD_INIT): Likewise.
16443 * commands/cmp.c (grub_cmp_init): Likewise.
16444 (GRUB_MOD_INIT): Likewise.
16445
16446 * normal/arg.c: Use <> instead of "" to include header files.
16447 (SHORT_ARG_HELP): New macro.
16448 (SHORT_ARG_USAGE): Likewise.
16449 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
16450 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
16451 descriptions.
16452 (find_short): Check if C is 'h' or 'u' explicitly.
16453 (grub_arg_show_help): Use space characters instead of tabs. Treat
16454 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
16455 are shown with --help and --usage only if they are not used for
16456 the command itself.
16457 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
16458 'h' and 'u'.
16459
16460 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
16461 const into "longarg". Change the type of "shortarg" to int.
16462
f806d18e 164632005-07-17 Yoshinori Okuji <okuji@enbug.org>
16464
16465 * boot/i386/pc/boot.S (boot_drive_check): New label.
16466
16467 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
16468 macro.
16469
16470 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
16471 which do not pass a boot drive correctly. Copied from GRUB Legacy.
16472
e293232b 164732005-07-17 Yoshinori Okuji <okuji@enbug.org>
16474
16475 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
16476 When turning off Gate A20, skip the check and return immediately,
16477 because this is not fatal usually.
16478
ebedfd00 164792005-07-17 Yoshinori Okuji <okuji@enbug.org>
16480
16481 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
16482 be 0x7C00 instead of 0x8000.
16483
16484 * boot/i386/pc/pxeboot.S: Rewritten.
16485
16486 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
16487 EXT_C.
16488 (gate_a20_check_state): Read a byte from 0x108000. Invert the
16489 result.
16490
654fc59f 164912005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
16492
16493 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
16494 robustness. This routine now supports a BIOS call and System
16495 Control Port A to modify the gate A20.
16496
16497 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16498 Increased to 0x440.
16499
09f9923f 165002005-07-12 Hollis Blanchard <hollis@penguinppc.org>
16501
16502 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
16503 device path and resulting ihandle.
16504 (grub_ofdisk_close): dprintf the ihandle being closed.
16505 (grub_ofdisk_read): dprintf function parameters.
16506 * kern/mm.c (grub_mm_init_region): Likewise.
16507 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
16508 (grub_linux_boot): dprintf the Linux entry point, initrd address and
16509 size, and boot arguments.
16510 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
16511 before loading into memory.
16512 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
16513 before loading into memory.
16514
7ef504d8 165152005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
16516
16517 * kern/mm.c: Added much documentation.
16518 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
16519 8, set to 5 instead of 8.
16520
e0f050c2 165212005-07-10 Yoshinori Okuji <okuji@enbug.org>
16522
16523 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
16524
16525 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
16526 (grub_mkdevicemap_SOURCES): New variable.
16527
16528 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
16529 lib/device.c of GRUB Legacy.
16530
7224189a 165312005-07-10 Yoshinori Okuji <okuji@enbug.org>
16532
16533 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
16534 instead of PATH is NULL.
16535
68c864eb 165362005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
16537
16538 * commands/cmp.c (BUFFER_SIZE): New macro.
16539 (grub_cmd_cmp): Close the right file at the right time. Compare
16540 only data just read. Don't report files of different size as
16541 identical. Dynamically allocate buffers. Move variable
16542 declarations at the beginning of function.
16543
e6f3e614 165442005-07-09 Yoshinori Okuji <okuji@enbug.org>
16545
16546 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
16547 reverse.
16548
f8f1559a 165492004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
16550
16551 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
16552 when backspace is pressed at beginning of line.
16553
39c9d41d 165542005-07-03 Yoshinori Okuji <okuji@enbug.org>
16555
16556 * DISTLIST: Added genfslist.sh.
16557
16558 * normal/main.c (fs_module_list): New variable.
16559 (autoload_fs_module): New function.
16560 (read_fs_list): Likewise.
16561 (grub_normal_execute): Call read_fs_list.
16562
16563 * kern/fs.c (grub_fs_autoload_hook): New variable.
16564 (grub_fs_probe): Added support for auto-loading.
16565
16566 * include/grub/normal.h (struct grub_fs_module_list): New struct.
16567 (grub_fs_module_list_t): New type.
16568
16569 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
16570 (grub_fs_autoload_hook): New prototype.
16571
16572 * genfslist.sh: New file.
f19dbdb7 16573
39c9d41d 16574 * genmk.rb: Added a rule to generate a filesystem list.
16575
121c1d83 165762005-06-30 Marco Gerards <metgerards@student.han.nl>
16577
16578 * configure.ac: Fix the test for cross-compiling.
16579
16580 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
16581 define GRUB_UTIL anymore.
16582
16583 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
16584 so this function works on other systems than just big endian.
16585 (load_modules): Likewise.
16586 (add_segments): Likewise.
16587
e75d76e1 165882005-06-23 Hollis Blanchard <hollis@penguinppc.org>
16589
16590 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
16591 contains `l' modifier, get a long from va_arg().
16592
50b5a0a7 165932005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
16594
16595 * kern/mm.c (grub_free): If the next free block which is being
16596 merged is the first free block, set the first block to the block
16597 being freed.
16598 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
16599
89371b20 166002005-05-08 Hollis Blanchard <hollis@penguinppc.org>
16601
16602 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
16603 `grub_ieee1275_chosen'.
16604
168d6e58 166052005-05-08 Hollis Blanchard <hollis@penguinppc.org>
16606
16607 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
16608 (grub_ieee1275_chosen): New variable.
16609 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
16610 `chosen'.
16611 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
16612 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16613 Rename first argument to `phandle' for consistency.
16614 (grub_ieee1275_get_property_length): Likewise.
16615 (grub_ieee1275_next_property): Likewise. Change type of first argument
16616 to grub_ieee1275_phandle_t.
16617 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
16618 Move export next to declaration.
16619 (grub_ieee1275_chosen): New variable.
16620 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
16621 Correct cosmetic typo.
16622 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
16623 `grub_ieee1275_chosen'.
16624 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
16625 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
16626 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
16627 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
16628 `grub_ieee1275_chosen'.
16629
ca5baa3f 166302005-05-10 Hollis Blanchard <hollis@penguinppc.org>
16631
16632 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
16633 /chosen/bootargs.
16634 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
16635 /chosen/bootargs as "variable=value" pairs.
16636
708b345f 166372005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
16638
16639 * include/grub/misc.h (grub_dprintf): New macro.
16640 (grub_real_dprintf): New prototype.
16641 (grub_strword): Likewise.
16642 (grub_iswordseparator): Likewise.
16643 * kern/misc.c (grub_real_dprintf): New function.
16644 (grub_strword): Likewise.
16645 (grub_iswordseparator): Likewise.
16646
f4c5e67c 166472005-04-30 Hollis Blanchard <hollis@penguinppc.org>
16648
16649 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
16650 (roundup): Remove macro.
16651 (grub_ieee1275_flags): Make static.
16652 (grub_ieee1275_realmode): Remove.
16653 (grub_ieee1275_test_flag): New function.
16654 (grub_ieee1275_set_flag): Likewise.
16655 (find_options): Rename to `grub_ieee1275_find_options'; update
16656 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
16657 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
16658 (cmain): New prototype.
16659 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
16660 `grub_ieee1275_flags' directly.
16661 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
16662 machine/biosdisk.h.
16663 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
16664 Don't include grub/machine/init.h.
16665 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
16666 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16667 Remove prototype.
16668 (grub_ieee1275_realmode): Likewise.
16669 (grub_ieee1275_flag): New enum.
16670 (grub_ieee1275_test_flag): New prototype.
16671 (grub_ieee1275_set_flag): New prototype.
16672 * include/grub/powerpc/ieee1275/init.h: Remove file.
16673 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
16674 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
16675 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
16676 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
16677 comment.
16678 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
16679 `grub_ieee1275_test_flag'.
16680 (grub_ieee1275_encode_devname): Likewise.
16681
ed16607e 166822005-04-21 Hollis Blanchard <hollis@penguinppc.org>
16683
16684 * include/grub/powerpc/ieee1275/ieee1275.h
16685 (grub_ieee1275_encode_devname): New prototype.
16686 (grub_ieee1275_get_filename): Likewise.
16687 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
16688 function.
16689 (grub_set_prefix): Likewise.
16690 (grub_machine_init): Call grub_set_prefix.
16691 * kern/powerpc/ieee1275/openfw.c: Fix typos.
16692 (grub_parse_type): New enum.
16693 (grub_ieee1275_get_devargs): New function.
16694 (grub_ieee1275_get_devname): Likewise.
16695 (grub_ieee1275_parse_args): Likewise.
16696 (grub_ieee1275_get_filename): Likewise.
16697 (grub_ieee1275_encode_devname): Likewise.
16698
be369920 166992005-03-30 Marco Gerards <metgerards@student.han.nl>
16700
16701 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
16702 `grub_loader_unset'.
16703
a5ce3a4a 167042005-03-26 Hollis Blanchard <hollis@penguinppc.org>
16705
16706 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
16707 instead of grub_ieee1275_interpret.
16708 (grub_halt_init): New function.
16709 (grub_halt_fini): Likewise.
16710 (GRUB_MOD_INIT): Correct message grammar.
16711 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
16712 instead of grub_ieee1275_interpret.
16713 (grub_reboot_init): New function.
16714 (grub_reboot_fini): Likewise.
16715 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
16716 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
16717 util/i386/pc/misc.c with commands/ieee1275/halt.c,
16718 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
16719 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
16720 function.
16721 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
16722 Add prototype.
16723 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
16724 prototype.
16725 (grub_halt): Likewise.
16726 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
16727 (cmain): Remove __attribute__((unused)).
16728 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
16729 (grub_heap_len): Likewise.
16730 (grub_machine_fini): New function.
16731 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
16732 (grub_halt): Likewise.
16733 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
16734 function.
16735 * util/powerpc/ieee1275/misc.c: New file.
16736
0058f771 167372005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
16738
16739 * DISTLIST: New file.
16740 * gendistlist.sh: Likewise.
f19dbdb7 16741
0058f771 16742 * Makefile.in (COMMON_DISTFILES): Removed.
16743 (BOOT_DISTFILES): Likewise.
16744 (CONF_DISTFILES): Likewise.
16745 (DISK_DISTFILES): Likewise.
16746 (FS_DISTFILES): Likewise.
16747 (INCLUDE_DISTFILES): Likewise.
16748 (KERN_DISTFILES): Likewise.
16749 (LOADER_DISTFILES): Likewise.
16750 (TERM_DISTFILES): Likewise.
16751 (UTIL_DISTFILES): Likewise.
16752 (DISTFILES): Likewise.
16753 (uninstall): Uninstall files in $(pkgdata_DATA).
16754 (DISTLIST): New target.
16755 (distdir): Use the contents of the file DISTLIST to get a list of
16756 distributed files.
16757
46b3b8a5 167582005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
16759
16760 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16761 descriptor. This is ported from GRUB Legacy.
16762
16763 * gencmdlist.sh: Added an extra semicolon to make it work with
16764 old sed versions. Reported by Robert Bihlmeyer
16765 <robbe@orcus.priv.at>.
16766
5822ff87 167672005-03-08 Yoshinori Okuji <okuji@enbug.org>
16768
16769 Automatic loading of commands is supported.
f19dbdb7 16770
5822ff87 16771 * normal/main.c (read_command_list): New function.
16772 (grub_normal_execute): Call read_command_list.
16773
16774 * normal/command.c (grub_register_command): Return zero or CMD.
16775 Allocate CMD->NAME from the heap.
16776 Initialize CMD->MODULE_NAME to zero.
16777 Find the same name as well. If the same command is found and it is
16778 a dummy command, overwrite members. If it is not a dummy command,
16779 return zero.
16780 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
16781 (grub_command_find): If a dummy command is found, load a module
16782 and retry to find a command only once.
16783
16784 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
16785 make sure that each command is loaded.
16786
16787 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
16788 macro.
16789 (struct grub_command): Remove const from the member `name'.
16790 Add a new member `module_name'.
16791 (grub_register_command): Return grub_command_t.
16792
16793 * commands/help.c (grub_cmd_help): Call grub_command_find to make
16794 sure that each command is loaded.
16795
16796 * genmk.rb (PModule::rule): Specify a module name without the
16797 suffix ".mod" to gencmdlist.sh.
16798
7b1f4b57 167992005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16800
16801 * gencmdlist.sh: New file.
f19dbdb7 16802
7b1f4b57 16803 * genmk.rb (PModule::rule): Generate a rule for a command list.
16804 Clean command.lst.
16805 Generate command.lst from $(COMMANDFILES).
16806
16807 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16808 (DATA): Added $(pkgdata_DATA).
16809 (install-local): Install files in $(pkgdata_DATA).
16810
062aaf39 168112005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
16812
16813 * term/i386/pc/vga.c (debug_command): Removed.
16814 (GRUB_MOD_INIT): Do not register the command "debug".
16815
16816 From Hollis Blanchard:
16817 * commands/configfile.c: New file.
16818 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16819 commands/configfile.c.
16820 (pkgdata_MODULES): Added configfile.mod.
16821 (configfile_mod_SOURCES): New variable.
16822 (configfile_mod_CFLAGS): Likewise.
16823 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16824 commands/configfile.c.
16825 (pkgdata_MODULES): Added configfile.mod.
16826 (configfile_mod_SOURCES): New variable.
16827 (configfile_mod_CFLAGS): Likewise.
16828 * util/grub-emu.c (main): Call grub_configfile_init and
16829 grub_configfile_fini.
16830 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16831 prototype.
16832 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 16833
cee01aa6 168342005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16835
16836 * normal/arg.c (grub_arg_show_help): Do not show the bug report
16837 address.
16838
16839 * commands/help.c (grub_cmd_help): Do not print newlines after
16840 the last command in print_command_help.
16841
93f3a1d8 168422005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
16843
16844 * commands/default.h: New file.
16845 * commands/timeout.h: Likewise.
16846 * normal/context.c: Likewise.
f19dbdb7 16847
93f3a1d8 16848 * util/misc.c: Do not include sys/times.h.
16849 Include sys/time.h and grub/machine/time.h.
16850 (grub_get_rtc): Rewritten with gettimeofday.
16851
16852 * util/grub-emu.c (main): Call grub_default_init and
16853 grub_timeout_init before grub_normal_init, and call
16854 grub_timeout_fini and grub_default_fini after grub_main.
16855
16856 * util/console.c (grub_ncurses_checkkey): Return the read
16857 character or -1.
16858
16859 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16860 timeouts.
16861
16862 * normal/main.c (read_config_file): Push MENU. If this fails,
16863 print an error and wait for a user input.
16864 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16865 If a menu is empty or an error occurs, pop MENU.
16866 (grub_normal_execute): Pop and free MENU after grub_menu_run
16867 returns.
16868
16869 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16870
16871 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16872 include time.h.
16873 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16874 without GRUB_UTIL.
16875 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16876 time.h.
16877 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16878 without GRUB_UTIL.
16879
16880 * include/grub/normal.h (struct grub_menu_list): New struct.
16881 (grub_menu_list_t): New type.
16882 (struct grub_context): New struct.
16883 (grub_context_t): New type.
16884 (grub_register_command): Got rid of EXPORT_FUNC.
16885 (grub_unregister_command): Likewise.
16886 (grub_context_get): New prototype.
16887 (grub_context_get_current_menu): Likewise.
16888 (grub_context_push_menu): Likewise.
16889 (grub_context_pop_menu): Likewise.
16890 [GRUB_UTIL] (grub_default_init): Likewise.
16891 [GRUB_UTIL] (grub_default_fini): Likewise.
16892 [GRUB_UTIL] (grub_timeout_init): Likewise.
16893 [GRUB_UTIL] (grub_timeout_fini): Likewise.
16894
16895 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16896 commands/timeout.c and normal/context.c.
16897 (pkgdata_MODULES): Added default.mod and timeout.mod.
16898 (normal_mod_SOURCES): Added normal/context.c.
16899 (default_mod_SOURCES): New variable.
16900 (default_mod_CFLAGS): Likewise.
16901 (timeout_mod_SOURCES): Likewise.
16902 (timeout_mod_CFLAGS): Likewise.
16903 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16904 conf/i386-pc.rmk.
16905 (pkgdata_MODULES): Added default.mod and timeout.mod.
16906 (normal_mod_SOURCES): Added normal/context.c.
16907 (default_mod_SOURCES): New variable.
16908 (default_mod_CFLAGS): Likewise.
16909 (timeout_mod_SOURCES): Likewise.
16910 (timeout_mod_CFLAGS): Likewise.
16911
16912 * Makefile.in (all-local): Added $(MKFILES).
16913
4ed2e1dd 169142005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
16915
16916 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16917 (grub_emu_SOURCES): Likewise.
16918 (pkgdata_MODULES): Add `sun.mod'.
16919 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16920 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16921 `partmap/sun.c'.
16922 (pkgdata_MODULES): Add `sun.mod'.
16923 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16924 * include/grub/partition.h (grub_sun_partition_map_init): New
16925 prototype.
16926 (grub_sun_partition_map_fini): Likewise.
16927 * partmap/sun.c: New file.
16928 * util/grub-emu.c (main): Initialize and de-initialize the sun
16929 partitionmap support.
16930
4d4e372e 169312005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
16932
16933 This implements an Emacs-like menu entry editor.
f19dbdb7 16934
4d4e372e 16935 * normal/menu_entry.c: New file.
f19dbdb7 16936
4d4e372e 16937 * util/console.c (grub_ncurses_putchar): Translate some Unicode
16938 characters to ASCII.
16939 (saved_char): New variable.
16940 (grub_ncurses_checkkey): Rewritten completely.
16941 (grub_ncurses_getkey): Likewise.
16942 (grub_ncurses_init): Call raw instead of cbreak.
16943
16944 * normal/menu.c (print_entry): Do not put a space.
16945 (init_page): Renamed to ...
16946 (grub_menu_init_page): ... this. All callers changed.
16947 (edit_menu_entry): Removed.
16948 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16949
16950 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16951
16952 * kern/misc.c (grub_vprintf): Call grub_refresh.
16953
16954 * normal/menu.c (DISP_LEFT): Renamed to ...
16955 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16956 * normal/menu.c (DISP_UP): Renamed to ...
16957 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16958 * normal/menu.c (DISP_RIGHT): Renamed to ...
16959 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16960 * normal/menu.c (DISP_DOWN): Renamed to ...
16961 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16962 * normal/menu.c (DISP_HLINE): Renamed to ...
16963 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16964 * normal/menu.c (DISP_VLINE): Renamed to ...
16965 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16966 * normal/menu.c (DISP_UL): Renamed to ...
16967 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16968 * normal/menu.c (DISP_UR): Renamed to ...
16969 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16970 * normal/menu.c (DISP_LL): Renamed to ...
16971 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16972 * normal/menu.c (DISP_LR): Renamed to ...
16973 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16974 * normal/menu.c (TERM_WIDTH): Renamed to ...
16975 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16976 * normal/menu.c (TERM_HEIGHT): Renamed to ...
16977 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16978 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16979 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16980 * normal/menu.c (TERM_MARGIN): Renamed to ...
16981 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16982 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16983 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16984 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16985 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16986 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16987 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16988 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16989 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16990 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16991 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16992 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16993 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16994 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16995 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16996 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16997 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16998 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16999 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
17000 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
17001 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
17002 All callers changed.
17003
17004 * include/grub/normal.h: New prototype.
17005
17006 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17007 normal/menu_entry.c.
17008 (normal_mod_SOURCES): Likewise.
17009 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17010 (normal_mod_SOURCES): Likewise.
17011
e6b92c8a 170122005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
17013
17014 * include/grub/normal.h (grub_halt_init): New prototype.
17015 (grub_halt_fini): Likewise.
17016 (grub_reboot_init): Likewise.
17017 (grub_reboot_fini): Likewise.
17018
17019 * util/grub-emu.c: Include signal.h.
17020 (main_env): New global variable.
17021 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
17022 catch C-c.
17023 (grub_machine_fini): New function.
17024 (main): Call grub_halt_init and grub_reboot_init before
17025 grub_main, and grub_reboot_fini and grub_halt_fini after it.
17026 Call setjmp with MAIN_ENV to go back afterwards.
17027 Call grub_machine_fini right before return.
17028
17029 * include/grub/util/misc.h: Include setjmp.h.
17030 (main_env): New prototype.
17031
17032 * include/grub/kernel.h (grub_machine_fini): New prototype.
17033 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
17034 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
17035
17036 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
17037 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
17038 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 17039
e6b92c8a 17040 * util/i386/pc/misc.c: New file.
f19dbdb7 17041
e6b92c8a 17042 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17043 util/i386/pc/misc.c, commands/i386/pc/halt.c and
17044 commands/i386/pc/reboot.c.
17045
c642636f 170462005-02-14 Guillem Jover <guillem@hadrons.org>
17047
17048 * include/grub/dl.h (grub_dl_check_header): New prototype.
17049 (grub_arch_dl_check_header): Change return type to grub_err_t,
17050 remove size parameter and export function. Update all callers.
17051 * kern/dl.c (grub_dl_check_header): New function.
17052 (grub_dl_load_core): Use `grub_dl_check_header' instead of
17053 `grub_arch_dl_check_header'. Check ELF type. Check if sections
17054 are inside the core.
17055 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
17056 independent ELF header checks.
17057 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
17058 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
17059 `grub_dl_check_header' instead of explicit checks. Check for the
17060 ELF type.
17061 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
17062 `grub_dl_check_header' instead of explicit checks. Remove arch
17063 specific ELF header checks.
17064
e6b92c8a 17065 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
17066 argument SIZE.
17067
5eabe94b 170682005-02-13 Hollis Blanchard <hollis@penguinppc.org>
17069
17070 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
17071 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
17072
1b14a681 170732005-02-12 Hollis Blanchard <hollis@penguinppc.org>
17074
17075 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 17076 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 17077 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 17078 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 17079 * partmap/amiga.c (amiga_partition_map_iterate): Return
17080 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
17081 * partmap/apple.c (apple_partition_map_iterate): Likewise.
17082
aca108aa 170832005-02-01 Guillem Jover <guillem@hadrons.org>
17084
17085 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
17086 help info.
17087
c9f9c556 170882005-01-31 Marco Gerards <metgerards@student.han.nl>
17089
17090 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
17091 Removed prototype.
17092 (grub_rescue_cmd_linux): New prototype.
17093 (grub_rescue_cmd_initrd): Likewise.
17094 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
17095 `bi_rec'.
17096 (grub_linux_release_mem): Release the memory for the initrd.
17097 (grub_load_linux): Renamed from this...
17098 (grub_rescue_cmd_linux): ...To this. Changed all callers.
17099 Changed `entry' not to be static. Loop over memory regions to
17100 find another one when the default fails.
17101 (grub_rescue_cmd_initrd): New function.
17102 (grub_linux_init): Remove function.
17103 (grub_linux_fini): Likewise.
17104 (GRUB_MOD_INIT): Register `initrd'.
17105 (GRUB_MOD_FINI): Unregister `initrd'.
17106 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
17107 Function removed.
17108 (grub_linux_normal_fini): Likewise.
17109 (GRUB_MOD_INIT): Register `initrd'.
17110 (GRUB_MOD_FINI): Unregister `initrd'.
17111
990cf3aa 171122005-01-31 Marco Gerards <metgerards@student.han.nl>
17113
17114 * commands/help.c: New file.
17115 * normal/arg.c (show_help): Renamed to...
17116 (grub_arg_show_help): ... this.
17117 * commands/i386/pc/halt.c: New file.
17118 * commands/i386/pc/reboot.c: Likewise.
17119 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
17120 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
17121 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
17122 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
17123 variables.
17124 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17125 `commands/help.c'.
17126 (pkgdata_MODULES): Add `help.mod'.
17127 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
17128 * grub/i386/pc/init.h (grub_reboot): New prototype.
17129 (grub_halt): Likewise.
17130 * include/grub/normal.h (grub_arg_show_help): New prototype.
17131 (grub_help_init): Likewise.
17132 (grub_help_fini): Likewise.
17133 * util/grub-emu.c (main): Initialize and deinitialize the help
17134 command.
17135
17136 * normal/cmdline.c (grub_cmdline_get): Doc fix.
17137
17138 * normal/command.c (grub_command_init): Fixed the description of
17139 the `set' and `unset' commands.
17140
171412005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 17142
17143 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
17144 function.
17145 * commands/ieee1275/halt.c: New file.
17146 * commands/ieee1275/reboot.c: Likewise.
17147 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
17148 `__attribute__ ((unused))'. Some GCS related fixed.
17149 (grub_suspend_init) [GRUB_UTIL]: Function removed.
17150 (grub_suspend_fini): Likewise.
17151 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
17152 and `halt.mod'.
17153 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
17154 (halt_mod_CFLAGS): New variables.
17155 * include/grub/powerpc/ieee1275/ieee1275.h
17156 (grub_ieee1275_interpret): New prototype.
17157
1ab09cc7 171582005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
17159
17160 * include/grub/misc.h (memmove): New prototype.
17161 (memcpy): Likewise.
17162
8b8cbdb2 171632005-01-22 Hollis Blanchard <hollis@penguinppc.org>
17164
17165 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
17166 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
17167
e3741a27 171682005-01-22 Marco Gerards <metgerards@student.han.nl>
17169
17170 * kern/misc.c (grub_strndup): Function rewritten.
17171
776bd780 171722005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
17173
17174 * normal/menu.c (TERM_WIDTH): Macro redefined.
17175 (TERM_TOP_BORDER_Y): Likewise.
17176 (draw_border): Replaced while-loop by a for-loop. Make the number
17177 of lines consistent with the number of lines displayed in
17178 print_entries. Added a margin below the rectangle.
17179 (print_entry): Make the entry fit in the rectangle.
17180 (print_entries): Display the scroll arrows next to the right
17181 border.
17182
78026bce 171832005-01-21 Marco Gerards <metgerards@student.han.nl>
17184
17185 * fs/minix.c (grub_minix_find_file): Reserve more space for
17186 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
17187 `grub_strncpy' to copy `path' into it.
17188
67bbaf0f 171892005-01-21 Marco Gerards <metgerards@student.han.nl>
17190
17191 Add the loopback device, a device via which files can be accessed
17192 as devices.
f19dbdb7 17193
67bbaf0f 17194 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
17195 (pkgdata_MODULES): Add loopback.mod.
17196 (loopback_mod_SOURCES): New variable.
17197 (loopback_mod_CFLAGS): Likewise.
17198 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17199 `disk/loopback.c'.
17200 (pkgdata_MODULES): Add loopback.mod.
17201 (loopback_mod_SOURCES): New variable.
17202 (loopback_mod_CFLAGS): Likewise.
17203 * disk/loopback.c: new file.
17204 * include/grub/normal.h (grub_loop_init): New prototype.
17205 (grub_loop_fini): New prototype.
17206 * util/grub-emu.c (main): Initialize and de-initialize loopback
17207 support.
17208 * include/grub/disk.h (grub_disk_dev_id): Add
17209 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
17210
6f1c18bd 172112005-01-20 Hollis Blanchard <hollis@penguinppc.org>
17212
17213 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
17214 function.
17215 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
17216 (suspend_mod_SOURCES): New variable.
17217 (suspend_mod_CFLAGS): Likewise.
17218 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
17219 New prototype.
17220 * commands/ieee1275/suspend.c: New file.
17221
b38551da 172222005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17223
17224 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 17225 ((unused))' to `__attribute__ ((used))'.
b38551da 17226 (GRUB_MOD_FINI): Likewise.
17227 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
17228 * genmk.rb (PModule): Assign space to common symbols when linking
17229 modules.
17230
777aff39 172312005-01-20 Marco Gerards <metgerards@student.han.nl>
17232
17233 * include/grub/mm.h (grub_mm_init_region): Change the type of the
17234 `unsigned' arguments to `grub_size_t'.
17235 (grub_malloc): Likewise.
17236 (grub_realloc): Likewise.
17237 (grub_memalign): Likewise.
17238 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
17239 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
17240 * util/misc.c (grub_malloc): Likewise.
17241 (grub_realloc): Likewise.
17242 * kern/mm.c (get_header_from_pointer): Change the casts to
17243 `unsigned' into a cast to `grub_size_t'.
17244
17245 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
17246 point to `currnode' when `currnode' is changed.
17247
17248 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
17249 Schottelius <nico-linux@schottelius.org>.
17250
d0ff18e1 172512005-01-09 Hollis Blanchard <hollis@penguinppc.org>
17252
17253 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
17254 (note_path): Remove variable.
17255 (GRUB_IEEE1275_NOTE_NAME): New macro.
17256 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
17257 (grub_ieee1275_note_hdr): New structure.
17258 (grub_ieee1275_note_desc): Likewise.
17259 (grub_ieee1275_note): Likewise.
17260 (load_note): Remove `dir' argument. All callers updated. Remove
17261 `note_img' and `path'. Do not load a file from `note_path'.
17262 Initialize a struct grub_ieee1275_note and write that to `out'.
17263 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
17264
4ca7004c 172652005-01-05 Marco Gerards <metgerards@student.han.nl>
17266
17267 * util/misc.c (grub_util_read_image): Revert last change. It
17268 called `grub_util_read_at', which seeks from the beginning of the
17269 file.
17270
0b412211 172712005-01-04 Hollis Blanchard <hollis@penguinppc.org>
17272
17273 * TODO: Add note about endianness in grub-mkimage.
17274 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
17275 section.
17276 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
17277 (grub_mkimage_SOURCES): New target.
17278 * include/grub/kernel.h (grub_start_addr): Remove variable.
17279 (grub_end_addr): Likewise.
17280 (grub_total_module_size): Likewise.
17281 (grub_kernel_image_size): Likewise.
17282 (GRUB_MODULE_MAGIC): New constant.
17283 (grub_module_info): New structure.
17284 (grub_arch_modules_addr): New prototype.
17285 (grub_get_end_addr): Remove prototype.
17286 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
17287 * include/grub/powerpc/ieee1275/kernel.h: New file.
17288 * include/grub/util/misc.h (grub_util_get_fp_size): New
17289 prototype.
17290 (grub_util_read_at): Likewise.
17291 (grub_util_write_image_at): Likewise.
17292 * kern/main.c (grub_get_end_addr): Remove function.
17293 (grub_load_modules): Call grub_arch_modules_addr instead of using
17294 grub_end_addr. Look for a grub_module_info struct in memory. Use
17295 the grub_module_info fields instead of calling grub_get_end_addr
17296 as loop conditions. Move grub_add_unused_region code here.
17297 (grub_add_unused_region): Remove function.
17298 * kern/i386/pc/init.c: Include grub/cache.h.
17299 (grub_machine_init): Remove call to grub_get_end_addr. Remove
17300 one call to add_mem_region.
17301 (grub_arch_modules_addr): New function.
17302 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
17303 (grub_total_module_size): Likewise.
17304 Include grub/machine/kernel.h.
17305 (grub_arch_modules_addr): New function.
17306 * util/grub-emu.c (grub_end_addr): Remove variable.
17307 (grub_total_module_size): Likewise.
17308 (grub_arch_modules_addr): New function.
17309 * util/misc.c: Include unistd.h.
17310 (grub_util_get_fp_size): New function.
17311 (grub_util_read_at): Likewise.
17312 (grub_util_write_image_at): Likewise.
17313 (grub_util_read_image): Call grub_util_read_at.
17314 (grub_util_write_image): Call grub_util_write_image_at.
17315 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
17316 additional memory in kernel_img for a struct grub_module_info.
17317 Fill in that grub_module_info.
17318 * util/powerpc/ieee1275/grub-mkimage.c: New file.
17319
458786f8 173202005-01-03 Hollis Blanchard <hollis@penguinppc.org>
17321
17322 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
17323 New function.
17324 * include/grub/powerpc/ieee1275/ieee1275.h
17325 (grub_ieee1275_milliseconds): New prototype.
17326 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
17327 Change to 1000.
17328 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
17329 grub_ieee1275_milliseconds.
17330
ac507d1b 173312005-01-03 Hollis Blanchard <hollis@penguinppc.org>
17332
17333 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
17334 variable.
17335 (find_options): New function.
17336 (cmain): Call find_options.
17337 * include/grub/powerpc/ieee1275/ieee1275.h
17338 (grub_ieee1275_realmode): New extern variable.
17339 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
17340 grub_map if grub_ieee1275_realmode is false.
17341
6b8fd1c4 173422004-12-29 Marco Gerards <metgerards@student.han.nl>
17343
17344 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
17345 lines are inserted and make it work like readline. Reported by
17346 Vincent Pelletier <subdino2004@yahoo.fr>.
17347
8514a1e0 173482004-12-28 Marco Gerards <metgerards@student.han.nl>
17349
17350 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
17351
17352 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
17353 `kern/powerpc/cache.S'.
17354
924b6140 173552004-12-27 Marco Gerards <metgerards@student.han.nl>
17356
17357 * genmk.rb: Handle the `Program' class in the main loop. Written
17358 by Johan Rydberg <jrydberg@gnu.org>.
17359 (Program): New class.
17360 (programs): New variable.
17361 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
17362 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
17363 instead of "grub/kernel.h". Include <grub/machine/init.h>.
17364 (help_arch): Function removed.
17365 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
17366 `powerpc/libgcc.h' and `loader.h'.
17367 (pkgdata_PROGRAMS): New variable.
17368 (sbin_UTILITIES): Variable removed.
17369 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
17370 (grubof_SOURCES): Variable re-defined so it only includes the
17371 core functionality.
17372 (grubof_CFLAGS): Remove `-DGRUBOF'.
17373 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
17374 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
17375 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
17376 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
17377 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
17378 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
17379 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
17380 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
17381 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
17382 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
17383 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
17384 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
17385 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
17386 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
17387 (pc_mod_CFLAGS): New variables.
17388 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
17389 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
17390 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
17391 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
17392 Moved from here...
17393 * include/grub/i386/pc/init.h (grub_os_area_addr)
17394 (rub_os_area_size): ... to here.
17395 * include/grub/powerpc/ieee1275/ieee1275.h
17396 (grub_ieee1275_entry_fn): Export symbol.
17397 * include/grub/powerpc/ieee1275/init.h: New file.
17398 * include/grub/powerpc/libgcc.h: Likewise.
17399 * include/grub/cache.h: Likewise.
17400 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
17401 <hollis@penguinppc.org>.
17402 * kern/dl.c: Include <grub/cache.h>.
17403 (grub_dl_flush_cache): New function.
17404 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
17405 for this module.
17406 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
17407 (grub_console_init): Removed prototypes.
17408 (grub_machine_init): Don't initialize the modules anymore.
17409 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
17410 static.
17411 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
17412 Macro undef removed.
17413 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
17414 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
17415 relocation `R_PPC_REL32'. Return an error when the relocation is
17416 unknown.
17417 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
17418 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
17419 * util/misc.c (grub_arch_sync_caches): Likewise.
17420
e4b47e0c 174212004-12-19 Marco Gerards <metgerards@student.han.nl>
17422
17423 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
17424 `symlist.c', add `grubof_symlist.c'.
17425 (symlist.c): Variable removed.
17426 (grubof_HEADERS): Variable added.
17427 (grubof_symlist.c): New target.
17428 (kernel_syms.lst): Use `grubof_HEADERS' instead of
17429 `kernel_img_HEADERS'.
17430 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
17431 * kern/powerpc/dl.c: New file.
17432 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
17433 Function removed.
17434 (grub_arch_dl_relocate_symbols): Likewise.
17435 (grub_register_exported_symbols): Likewise.
17436
4ceb3636 174372004-12-13 Marco Gerards <metgerards@student.han.nl>
17438
17439 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
17440 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
17441 to fail instead. Reported by Vincent Pelletier
17442 <subdino2004@yahoo.fr>.
17443
17444 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
17445 it is not allocated. Reported by Vincent Pelletier
17446 <subdino2004@yahoo.fr>.
17447
17448 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
17449 output so the output looks better.
f19dbdb7 17450
3f1578fe 174512004-12-04 Marco Gerards <metgerards@student.han.nl>
17452
17453 Modulize the partition map support and add support for the amiga
17454 partition map.
f19dbdb7 17455
3f1578fe 17456 * commands/ls.c: Include <grub/partition.h> instead of
17457 <grub/machine/partition.h>.
17458 * kern/disk.c: Likewise.
17459 * kern/rescue.c: Likewise.
17460 * loader/i386/pc/chainloader.c: Likewise.
17461 * normal/cmdline.c: Likewise.
17462 * kern/powerpc/ieee1275/init.c: Likewise.
17463 (grub_machine_init): Call `grub_pc_partition_map_init',
17464 `grub_amiga_partition_map_init' and
17465 `grub_apple_partition_map_init'.
17466 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
17467 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
17468 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
17469 `partition.h' and `pc_partition.h'.
17470 (grub_setup_SOURCES): Remove
17471 `disk/i386/pc/partition.c'. Add `kern/partition.c',
17472 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
17473 (grub_emu_SOURCES): Likewise.
17474 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
17475 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
17476 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
17477 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
17478 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
17479 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
17480 (grubof_SOURCES): Likewise.
17481 * disk/i386/pc/partition.c: File removed.
17482 * disk/powerpc/ieee1275/partition.c: Likewise.
17483 * include/grub/powerpc/ieee1275/partition.h: Likewise.
17484 * include/grub/i386/pc/partition.h: Likewise.
17485 * kern/partition.c: New file.
17486 * partmap/amiga.c: Likewise.
17487 * partmap/apple.c: Likewise.
17488 * partmap/pc.c: Likewise.
17489 * include/grub/partition.h: Likewise..
17490 * include/grub/pc_partition.h: Likewise.
17491 * util/grub-emu.c: Include <grub/partition.h> instead of
17492 <grub/machine/partition.h>.
17493 (main): Call `grub_pc_partition_map_init',
17494 `grub_amiga_partition_map_init' and
17495 `grub_apple_partition_map_init' and deinitialize afterwards.
17496 * util/i386/pc/biosdisk.c: Include `#include
17497 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
17498 `<grub/machine/partition.h>'.
17499 * util/i386/pc/grub-setup.c: Likewise.
17500 * util/i386/pc/biosdisk.c: Likewise.
17501 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
17502 partition information in case of a PC partition.
17503 * util/i386/pc/grub-setup.c: Include `#include
17504 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
17505 `<grub/machine/partition.h>'.
17506 (setup): Only access the PC specific partition information in case
17507 of a PC partition.
17508
0ef4ced9 175092004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 17510
0ef4ced9 17511 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
17512 (grub_longjmp): Likewise.
17513 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
17514 20.
17515 * normal/powerpc/setjmp.S: New file.
17516 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17517 `normal/powerpc/setjmp.S'.
17518 (grubof_CFLAGS): Add `-DGRUBOF'.
17519 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
17520 [GRUB_UTIL && !GRUBOF].
f19dbdb7 17521
19950e29 175222004-11-16 Marco Gerards <metgerards@student.han.nl>
17523
17524 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
17525 property named `name'. Correctly handle the error returned by
17526 `grub_ieee1275_finddevice' if a device can not be opened.
17527
a2fea427 175282004-11-02 Hollis Blanchard <hollis@penguinppc.org>
17529
17530 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
17531 `actual' for negativity.
17532 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
17533 kern/fshelp.c.
17534
41ea0ea3 175352004-11-01 Marco Gerards <metgerards@student.han.nl>
17536
17537 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
17538 (PAGE_OFFSET): New macro.
17539 (CRTC_ADDR_PORT): Likewise.
17540 (CRTC_DATA_PORT): Likewise.
17541 (START_ADDR_HIGH_REGISTER): Likewise.
17542 (START_ADDR_LOW_REGISTER): Likewise.
17543 (GRAPHICS_ADDR_PORT): Likewise.
17544 (GRAPHICS_DATA_PORT): Likewise.
17545 (READ_MAP_REGISTER): Likewise.
17546 (INPUT_STATUS1_REGISTER): Likewise.
17547 (INPUT_STATUS1_VERTR_BIT): Likewise.
17548 (page): New variable.
17549 (wait_vretrace): New function.
17550 (set_read_map): Likewise.
17551 (set_start_address): Likewise.
17552 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
17553 the right page.
17554 (check_vga_mem): Take the page into account.
17555 (write_char): Likewise.
17556 (write_cursor): Likewise.
17557 (scroll_up): Likewise. Copy the page to the page that is not
17558 shown and switch between both pages.
17559 (grub_vga_putchar): Fix off by one error.
17560 (grub_vga_cls): Wait for the vertical retrace. Take the page into
17561 account.
17562
ad0bd20b 175632004-11-01 Marco Gerards <metgerards@student.han.nl>
17564
17565 Add support for iso9660 (including rockridge).
f19dbdb7 17566
ad0bd20b 17567 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17568 (iso9660_mod_SOURCES): New variable.
17569 (iso9660_mod_CFLAGS): Likewise.
17570 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17571 * include/grub/fs.h (grub_iso9660_init): New prototype.
17572 * util/grub-emu.c (main): Call `grub_iso9660_init'.
17573 * fs/iso9660.c: New file.
17574
17575 * include/grub/misc.h (grub_strncat): New prototype.
17576 * kern/misc.c (grub_strncat): New function.
f19dbdb7 17577
ad0bd20b 17578 * fs/hfs.c (grub_hfs_mount): Translate the error
17579 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
17580 * fs/jfs.c (grub_jfs_mount): Likewise.
17581 * fs/ufs.c (grub_ufs_mount): Likewise.
17582
a5477a59 175832004-10-28 Hollis Blanchard <hollis@penguinppc.org>
17584
17585 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
17586 which initialized BAT registers.
17587 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
17588 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17589 Move from here...
17590 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
17591 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17592 ... to here.
17593 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
17594 (grub_mapclaim): Likewise.
17595 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
17596 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
17597 hand.
17598
9304c1f8 175992004-10-19 Hollis Blanchard <hollis@penguinppc.org>
17600
17601 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
17602 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
17603 -ffreestanding and -msoft-float.
17604
86f4ae25 176052004-10-15 Hollis Blanchard <hollis@penguinppc.org>
17606
17607 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
17608 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
17609 set in grub_ieee1275_flags.
17610
38912228 176112004-10-14 Hollis Blanchard <hollis@penguinppc.org>
17612
17613 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
17614 prototype.
17615 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
17616 grub_console_init first.
17617 Change the memory range used for grub_ieee1275_claim and
17618 grub_mm_init_region.
17619 Print an error message if the claim fails.
17620 Include <grub/misc.h>.
17621
d1923dc8 176222004-10-13 Hollis Blanchard <hollis@penguinppc.org>
17623
17624 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
17625 Call grub_children_iterate for device nodes of type `scsi',
17626 `ide', or `ata'.
17627 (grub_ofdisk_open): Remove manual device alias resolution.
17628 Fix memory leak when device cannot be opened.
f19dbdb7 17629 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 17630 (grub_children_iterate): New prototype.
17631 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
17632 New function.
17633 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17634 Return -1 if args.size was -1.
17635
4512e4f3 176362004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17637
17638 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
17639 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
17640 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
17641 Open Firmware's memory for it; claim memory from _start to _end.
17642 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
17643 (_end): New extern.
17644 (_start): Zero BSS from __bss_start to _end.
17645 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17646 New extern.
17647 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
17648
4d61feb0 176492004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17650
ad0bd20b 17651 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
17652 -1 if args.base was -1.
4d61feb0 17653
026fa2f9 176542004-10-08 Hollis Blanchard <hollis@penguinppc.org>
17655
17656 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
17657 escape sequence instead of a literal ^L. Also call
17658 grub_ofconsole_gotoxy.
17659
9f2220ef 176602004-10-03 Hollis Blanchard <hollis@penguinppc.org>
17661
17662 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
17663 void * arguments to grub_addr_t. All callers updated. Also make
17664 the `result' argument optional.
17665 (grub_ieee1275_release): change void * arguments to grub_addr_t.
17666 All callers updated.
17667
8a572cd7 176682004-09-22 Hollis Blanchard <hollis@penguinppc.org>
17669
17670 * commands/ls.c (grub_ls_list_files): Use the string following the
17671 initial ')', if present, as the filesystem path.
17672 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
17673
17674 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
17675
18aa81f2 176762004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
17677
17678 Make the source code of the menu interface more readable.
f19dbdb7 17679
18aa81f2 17680 * normal/menu.c: Include grub/mm.h.
17681 (TERM_WIDTH): New macro.
17682 (TERM_HEIGHT): Likewise.
17683 (TERM_INFO_HEIGHT): Likewise.
17684 (TERM_MARGIN): Likewise.
17685 (TERM_SCROLL_WIDTH): Likewise.
17686 (TERM_TOP_BORDER_Y): Likewise.
17687 (TERM_LEFT_BORDER_X): Likewise.
17688 (TERM_BORDER_WIDTH): Likewise.
17689 (TERM_MESSAGE_HEIGHT): Likewise.
17690 (TERM_BORDER_HEIGHT): Likewise.
17691 (TERM_NUM_ENTRIES): Likewise.
17692 (TERM_FIRST_ENTRY_Y): Likewise.
17693 (TERM_ENTRY_WIDTH): Likewise.
17694 (TERM_CURSOR_X): Likewise.
17695 (draw_border): Use macros instead of magic numbers.
17696 (print_entry): Likewise.
17697 (print_entries): Likewise.
17698 (run_menu): Likewise. Also, handle the key 'e'.
17699 (run_menu_entry): Ignore empty command lines.
17700 (print_message): Added a new argument EDIT. If EDIT is true,
17701 print a different message.
17702 (init_page): Likewise.
17703 (edit_menu_entry): New function. Not implemented yet.
17704
b47efe30 177052004-09-17 Marco Gerards <metgerards@student.han.nl>
17706
17707 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
17708 can be loaded from normal mode.
f19dbdb7 17709
b47efe30 17710 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
17711 `multiboot.mod'.
17712 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
17713 (multiboot_mod_CFLAGS): New variables.
17714 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 17715 * loader/i386/pc/multiboot_normal.c: Likewise.
17716
b47efe30 17717 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
17718 attribute `unused'.
f19dbdb7 17719
b47efe30 17720 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
17721 `fdiro' to read the mode information from instead of `diro'.
17722
17723 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
17724 looking up a symlink.
17725
17726 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
17727 macro.
17728 * normal/command.c (grub_command_execute): Don't parse the
17729 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
17730 flags of the command.
17731
17732 * normal/menu.c (grub_menu_run): Fix typo.
17733
da75ac71 177342004-09-14 Hollis Blanchard <hollis@penguinppc.org>
17735
17736 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
17737
17738 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
17739 `y + 1' instead of `y - 1'.
17740
17741 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 17742
062b24c2 177432004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
17744
17745 From Hollis Blanchard <hollis@penguinppc.org>:
17746 * kern/misc.c (memmove): New alias for grub_memmove.
17747 (memcmp): New alias for grub_memcmp.
17748 (memset): New alias for grub_memset.
f19dbdb7 17749 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 17750 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 17751 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 17752 (grub_ieee1275_get_property): Likewise.
f19dbdb7 17753
8ddad845 177542004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
17755
17756 Added normal mode command `chainloader' as module chain.mod, which
17757 depends on normal.mod and _chain.mod.
f19dbdb7 17758
8ddad845 17759 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17760 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17761 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17762 Deleted prototype.
17763 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17764 but arguments parsing moved to ...
17765 (grub_chainloader_cmd): ... here. New function.
17766 * include/grub/i386/pc/chainloader.h: New file.
17767 * loader/i386/pc/chainloader_normal.c: Likewise.
17768
2c1f4ce3 177692004-09-11 Marco Gerards <metgerards@student.han.nl>
17770
17771 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17772 (grub_mkimage_LDFLAGS): Likewise.
17773 (grub_emu_SOURCES): Likewise.
17774 (kernel_img_HEADERS): Added fshelp.h.
17775 * fs/ext2.c: Include <grub/fshelp.h>.
17776 (FILETYPE_REG): New macro.
17777 (FILETYPE_INO_REG): Likewise.
17778 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
17779 Changed all users.
17780 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
17781 all users.
17782 (grub_fshelp_node): New struct.
17783 (grub_ext2_data): Added member `diropen'. Changed member `inode'
17784 to a pointer.
17785 (grub_ext2_get_file_block): Removed function.
17786 (grub_ext2_read_block): New function.
17787 (grub_ext2_read_file): Replaced parameter `data' by `node'.
17788 This function was written.
17789 (grub_ext2_mount): Read the root inode. Create a diropen struct.
17790 (grub_ext2_find_file): Removed function.
17791 (grub_ext2_read_symlink): New function.
17792 (grub_ext2_iterate_dir): Likewise.
17793 (grub_ext2_open): Rewritten.
17794 (grub_ext2_dir): Rewritten.
17795 * include/grub/fshelp.h: New file.
17796 * fs/fshelp.c: Likewise.
17797
3c52136a 177982004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
17799
17800 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17801 (print_message): Add a missing newline.
17802 (run_menu): Added timeout support.
17803 (run_menu_entry): New local function.
17804 (grub_menu_run): Added support for booting.
17805
17806 * kern/loader.c (grub_loader_is_loaded): New function.
17807
17808 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17809 (grub_get_rtc): Exported.
17810
17811 * include/grub/i386/pc/time.h: Include grub/symbol.h.
17812 (grub_get_rtc): Exported.
17813
17814 * include/grub/normal.h (struct grub_command_list): Remove
17815 constant from the member `command'.
17816
17817 * include/grub/loader.h (grub_loader_is_loaded): Declared.
17818
17819 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17820
17821 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17822
aa033560 178232004-08-28 Marco Gerards <metgerards@student.han.nl>
17824
17825 Add support for the JFS filesystem.
17826
17827 * fs/jfs.c: New file.
17828 * include/grub/fs.h (grub_jfs_init): New prototype.
17829 (grub_jfs_fini): New prototype.
17830 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17831 (grub_emu_SOURCES): Likewise.
17832 (pkgdata_MODULES): Add jfs.mod.
17833 (jfs_mod_SOURCES): New variable.
17834 (jfs_mod_CFLAGS): Likewise.
17835 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17836 (grubof_SOURCES): Likewise.
17837 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17838
17839 * fs/fat.c (grub_fat_find_dir): Convert the filename little
17840 endian to the host endian.
17841 (grub_fat_utf16_to_utf8): Move function from there...
17842 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 17843 the endianness of the source string anymore.
aa033560 17844 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17845
94bc45af 178462004-08-24 Marco Gerards <metgerards@student.han.nl>
17847
17848 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17849 (grub_boot_fini) [GRUB_UTIL]: Likewise.
17850 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17851 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 17852
94bc45af 17853 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17854 (grub_hfs_iterate_dir): Make the function static. Add prototypes
17855 for `node_found' and `it_dir'.
17856 (grub_hfs_dir): Add prototype for `dir_hook'.
17857
17858 * fs/minix.c (grub_minix_get_file_block): Add prototype for
17859 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
17860 and `indir32' to silence a gcc warning.
17861
17862 * include/grub/fs.h (grub_hfs_init): New prototype.
17863 (grub_hfs_fini): Likewise.
f19dbdb7 17864
17865
97543f08 178662004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
17867
17868 Each disk device has its own id now. This is useful to make use
17869 of multiple disk devices.
f19dbdb7 17870
97543f08 17871 * include/grub/disk.h (grub_disk_dev_id): New enum.
17872 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17873 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17874
17875 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17876 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17877
17878 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17879 GRUB_DISK_DEVICE_OFDISK_ID as an id.
17880
17881 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17882 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17883
17884 * include/grub/disk.h (struct grub_disk_dev): Added a new member
17885 "id" which is used by the cache manager.
17886
17887 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17888 of just "GRUB".
17889
64372eb4 178902004-08-18 Marco Gerards <metgerards@student.han.nl>
17891
17892 * fs/hfs.c: New file.
17893 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17894 (grub_emu_SOURCES): Likewise.
17895 (pkgdata_MODULES): Add hfs.mod.
17896 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17897 (grubof_SOURCES): Likewise.
17898 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17899
17900 * include/grub/misc.h (grub_strncasecmp): Add prototype.
17901 * kern/misc.c (grub_strncasecmp): Add function.
17902
cc61b58f 179032004-08-14 Marco Gerards <metgerards@student.han.nl>
17904
17905 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17906 with parentheses.
17907
17908 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17909 (grub_ext2_dir): In case the directory entry type is unknown, read
17910 it from the inode.
17911
0ef123f6 179122004-08-02 Peter Bruin <pjbruin@dds.nl>
17913
17914 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17915 grub_load_linux instead of grub_rescue_cmd_linux as second
17916 argument of grub_rescue_register_command.
17917
17918 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17919
a447c5df 179202004-07-27 Marco Gerards <metgerards@student.han.nl>
17921
17922 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17923 function.
17924 * commands/boot.c: Remove the check for `GRUB_UTIL'.
17925 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17926 `loader/powerpc/ieee1275/linux.c',
17927 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17928 * include/grub/powerpc/ieee1275/ieee1275.h
17929 (grub_ieee1275_release): New prototype.
17930 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17931 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17932 normal, boot, linux and linux_normal.
17933 * loader/powerpc/ieee1275/linux.c: New file.
17934 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17935
5a9e3546 179362004-07-12 Marco Gerards <metgerards@student.han.nl>
17937
17938 * normal/arg.c (grub_arg_parse): Correct error handling after
17939 reallocating the argumentlist (check if `argl' is not null instead
17940 of checking if `args' is not null).
17941 * kern/mm.c (grub_realloc): Return the same pointer when using the
17942 same region, instead of returning the header address.
17943
e15199cb 179442004-07-11 Marco Gerards <metgerards@student.han.nl>
17945
17946 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17947 one block instead of two when looking for the initial partition.
17948 (grub_partition_probe): Initialize the local variable `p' with 0.
17949 Use base 10 for the grub_strtoul call.
17950 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
17951 need for one local variable.
17952 (grub_strtoul): Don't add the new value to `num', instead of that
17953 just assign it.
17954
020616c2 179552004-07-11 Marco Gerards <metgerards@student.han.nl>
17956
17957 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17958 (pxeboot_img_SOURCES): New variable.
17959 (pxeboot_img_ASFLAGS): Likewise.
17960 (pxeboot_img_LDFLAGS): Likewise.
17961 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
17962 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
17963 <lode_leroy@hotmail.com>.
17964
6c51eb64 179652004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17966
17967 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17968 there was no input.
17969
cfb12aff 179702004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17971
17972 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
17973 the history buffer logic.
17974
6eabba74 179752004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
17976
17977 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17978 (FILETYPE_INO_SYMLINK): New macros.
17979 (grub_ext2_find_file): Check if the node is a directory using the
17980 inode stat information instead of using the filetype in the
17981 dirent. Exclude the first character of an absolute symlink.
17982 (grub_ext2_dir): Mask out the filetype part of the mode member of
17983 the inode.
17984
66e19ef8 179852004-05-24 Marco Gerards <metgerards@student.han.nl>
17986
17987 Add support for UFS version 1 and 2. Add support for the minix
17988 filesystem version 1 and 2, both the variants with 14 and 30 long
17989 filenames.
f19dbdb7 17990
66e19ef8 17991 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17992 fs/minix.c.
17993 (grub_emu_SOURCES): Likewise.
17994 (pkgdata_MODULES): Add ufs.mod and minix.mod.
17995 (ufs_mod_SOURCES): New variable.
17996 (ufs_mod_CFLAGS): Likewise.
17997 (minix_mod_SOURCES): Likewise.
17998 (minix_mod_CFLAGS): Likewise.
17999 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
18000 fs/minix.c.
18001 (grubof_SOURCES): Likewise.
18002 * fs/ufs.c: New file.
18003 * fs/minix.c: New file.
18004 * include/grub/fs.h (grub_ufs_init): New prototype.
18005 (grub_ufs_fini): Likewise.
18006 (grub_minix_init): Likewise.
18007 (grub_minix_fini): Likewise.
18008 * util/grub-emu.c (main): Initialize and deinitialize UFS and
18009 minix fs.
18010
cc2e748a 180112004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
18012
18013 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
18014 commands/ls.c, commands/terminal.c, commands/boot.c,
18015 commands/cmp.c and commands/cat.c.
18016 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
18017
18018 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
18019 "env.h"
18020
4b13b216 180212004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
18022
18023 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
18024 and grub_, respectively. Because the conversion is trivial and
18025 mechanical, I omit the details here. Please refer to the CVS
18026 if you need more information.
18027
6a142551 180282004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
18029
18030 * include/pupa: Renamed to ...
18031 * include/grub: ... this.
18032 * util/i386/pc/pupa-mkimage.c: Renamed to ...
18033 * util/i386/pc/grub-mkimage.c: ... this.
18034 * util/i386/pc/pupa-setup.c: Renamed to ...
18035 * util/i386/pc/grub-setup.c: ... this.
18036 * util/pupa-emu.c: Renamed to ...
18037 * util/grub-emu.c: ... this.
18038
e56cdf21 180392004-03-29 Marco Gerards <metgerards@student.han.nl>
18040
18041 Add support for the newworld apple macintosh (PPC). This has been
18042 tested on the powerbook 2000 only. It only adds support for
18043 generic ieee1275 functions, console and disk support. This should
18044 be easy to port to other architectures with support for Open
18045 Firmware.
f19dbdb7 18046
e56cdf21 18047 * configure.ac: Accept the powerpc as host_cpu. In the case of
18048 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
18049 specific tests are only executed while building for the i386.
18050 Inverse test for crosscompile.
18051 * genmk.rb (Utility): Allow assembler files.
18052 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
18053 * conf/powerpc-ieee1275.rmk: New file.
18054 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
18055 * disk/powerpc/ieee1275/partition.c: Likewise.
18056 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
18057 * include/pupa/powerpc/ieee1275/console.h: Likewise.
18058 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
18059 * include/pupa/powerpc/ieee1275/time.h: Likewise.
18060 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
18061 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
18062 * include/pupa/powerpc/ieee1275/loader.h
18063 * include/pupa/powerpc/setjmp.h: Likewise.
18064 * include/pupa/powerpc/types.h: Likewise.
18065 * kern/powerpc/ieee1275/init.c: Likewise.
18066 * kern/powerpc/ieee1275/openfw.c: Likewise.
18067 * term/powerpc/ieee1275/ofconsole.c: Likewise.
18068
18069 These files were written by Johan Rydberg
18070 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 18071
e56cdf21 18072 * boot/powerpc/ieee1275/cmain.c: New file.
18073 * boot/powerpc/ieee1275/crt0.S: Likewise.
18074 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
18075 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
18076
8c8cc205 180772004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
18078
18079 * Makefile.in: Update copyright.
18080 * genmodsrc.sh: Likewise.
18081 * gensymlist.sh: Likewise.
18082 * term/i386/pc/vga.c: Indent correctly.
18083
18084 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
18085 bugreporting address.
18086 * util/i386/pc/pupa-setup.c (usage): Likewise,
18087 (main): Call pupa_ext2_init and pupa_ext2_fini.
18088
f19dbdb7 18089 * fs/fat.c (log2): Renamed to ...
8c8cc205 18090 (fat_log2): ... this.
18091 All callers changed.
18092 * kern/misc.c (memcpy): Alias to pupa_memmove.
18093 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
18094 lvalue cast.
18095 * util/console.c (pupa_ncurses_fini): Return 0.
18096
18097 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
18098 Move fail label here.
18099 [__GNU__]: Don't warn when using stat.
18100 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
18101 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
18102 long int. Use strtol instead of strtoul.
f19dbdb7 18103
db1771cf 181042004-03-14 Marco Gerards <metgerards@student.han.nl>
18105
18106 * commands/boot.c: New file.
18107 * commands/cat.c: Likewise.
18108 * commands/cmp.c: Likewise.
18109 * commands/ls.c: Likewise.
18110 * commands/terminal.c: Likewise.
18111 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
18112 (pupa_register_command): Changed interface to match the new
18113 argument parser.
18114 (pupa_command_execute): Changed (almost rewritten) so it uses
18115 pupa_split_command. Added support for setting variables using the
18116 syntax `foo=bar'.
18117 (rescue_command): Changed to work with the new argument parser.
18118 (terminal_command): Moved from here to commands/terminal.c.
18119 (set_command): New function.
18120 (unset_command): New function.
18121 (insmod_command): New function.
18122 (rmmod_command): New function.
18123 (lsmod_command): New function.
18124 (pupa_command_init): Don't initialize the command terminal
18125 anymore. Initialize the commands set, unset, insmod, rmmod and
18126 lsmod.
18127 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
18128 (kernel_img_HEADERS): Add arg.h and env.h.
18129 (pupa_mkimage_LDFLAGS): Add kern/env.c.
18130 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
18131 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
18132 normal/arg.c.
18133 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
18134 terminal.mod.
18135 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
18136 (boot_mod_SOURCES): New variable.
18137 (terminal_mod_SOURCES): Likewise.
18138 (ls_mod_SOURCES): Likewise.
18139 (cmp_mod_SOURCES): Likewise.
18140 (cat_mod_SOURCES): Likewise.
18141
18142 * normal/arg.c: New file.
18143 * kern/env.c: Likewise.
18144 * include/pupa/arg.h: Likewise.
18145 * include/pupa/env.h: Likewise.
18146 * font/manager.c (font_command): Changed to match argument parsing
18147 interface changes.
18148 (PUPA_MOD_INIT): Likewise.
18149 * hello/hello.c (pupa_cmd_hello): Likewise.
18150 (PUPA_MOD_INIT): Likewise.
18151 * include/pupa/disk.h: Include <pupa/device.h>.
18152 (pupa_print_partinfo): New prototype.
18153 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
18154 (pupa_dl_get_prefix): Likewise.
18155 * include/pupa/misc.h: Include <pupa/err.h>.
18156 (pupa_isgraph): New prototype.
18157 (pupa_isdigit): Likewise.
18158 (pupa_split_cmdline): Likewise.
18159 * include/pupa/normal.h: Include <pupa/arg.h>.
18160 (pupa_command): Changed the prototype of the member `func' to
18161 match the argument parsing interface. Added member `options'.
18162 (pupa_register_command): Updated to match function.
18163 (pupa_arg_parse): New prototype.
18164 (pupa_hello_init) [PUPA_UTIL]: New prototype.
18165 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
18166 (pupa_ls_init) [PUPA_UTIL]: Likewise.
18167 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
18168 (pupa_cat_init) [PUPA_UTIL]: Likewise.
18169 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
18170 (pupa_boot_init) [PUPA_UTIL]: Likewise.
18171 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
18172 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
18173 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
18174 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
18175 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
18176 * kern/disk.c: Include <pupa/file.h>.
18177 (pupa_print_partinfo): New function.
18178 * kern/dl.c: Include <pupa/env.h>.
18179 (pupa_dl_dir): Variable removed.
18180 (pupa_dl_load): Use the environment variable `prefix' instead of
18181 the variable pupa_dl_dir.
18182 (pupa_dl_set_prefix): Function removed.
18183 (pupa_dl_get_prefix): Likewise.
18184 * kern/i386/pc/init.c: Include <pupa/env.h>.
18185 (pupa_machine_init): Use the environment variable `prefix' instead of
18186 using pupa_dl_set_prefix to set the prefix.
18187 * kern/main.c: Include <pupa/env.h>.
18188 (pupa_set_root_dev): Use the environment variable `prefix' instead of
18189 using pupa_dl_get_prefix to get the prefix.
18190 * kern/misc.c: Include <pupa/env.h>.
18191 (pupa_isdigit): New function.
18192 (pupa_isgraph): Likewise.
18193 (pupa_ftoa): Likewise.
18194 (pupa_vsprintf): Added support for printing values of the type
18195 `double'. Make it possible to format variable output when using
18196 formatting like `%1.2%f'.
18197 (pupa_split_cmdline): New function.
18198 * kern/rescue.c: Include <pupa/env.h>.
18199 (next_word): Removed function.
18200 (pupa_rescue_cmd_prefix): Likewise.
18201 (pupa_rescue_cmd_set): New function.
18202 (pupa_rescue_cmd_unset): New function.
18203 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
18204 split the command line instead of splitting it here. Added
18205 support for setting variables using the syntax `foo=bar'. Don't
18206 initialize the prefix command anymore. Initialized the set and
18207 unset commands.
18208 * normal/cmdline.c: Include <pupa/env.h>.
18209 (pupa_tab_complete): Added prototypes for print_simple_completion,
18210 print_partition_completion, add_completion, iterate_commands,
18211 iterate_dev, iterate_part and iterate_dir. Moved code to print
18212 partition information from here to kern/disk.c.
fe6b695a 18213 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 18214 * normal/main.c: Include <pupa/env.h>.
18215 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
18216 instead of using pupa_dl_get_prefix to get the prefix.
18217 * term/i386/pc/vga.c: Include <pupa/arg.h>.
18218 (check_vga_mem): Cast pointers to `void *' to silence a gcc
18219 warning.
18220 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
18221 (pupa_vga_setcolor): Declare unused variables with `__attribute__
18222 ((unused))' to silence a gcc warning.
18223 (pupa_vga_setcolor): Likewise.
18224 (debug_command): Changed to match argument parsing
18225 interface changes.
18226 * util/pupa-emu.c: Include <pupa/env.h>.
18227 (options): Added 0's for unused fields to silence a gcc warning.
18228 (argp): Likewise.
18229 (main): Use the environment variable `prefix' instead of using
18230 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
18231 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
18232 and terminal.
18233
18234 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
18235 * util/misc.c: Include <malloc.h>.
18236 (pupa_malloc): Rewritten so errors are correctly reported.
18237 (pupa_realloc): Likewise.
18238 (pupa_memalign): Likewise.
18239 (pupa_mm_init_region): Declare unused variables with
18240 `__attribute__ ((unused))' to silence a gcc warning.
18241 * normal/i386/setjmp.S: Remove tab at the end of the file to
18242 silence a gcc warning.
18243 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
18244 variables with `__attribute__ ((unused))' to silence a gcc
18245 warning.
18246 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
18247 local variable i unsigned to silence a gcc warning.
18248
18249 * kern/term.c: Include <pupa/misc.h>.
18250 (pupa_more_lines): New variable.
18251 (pupa_more): Likewise.
18252 (pupa_putcode): When the pager is active pause at the end of every
18253 screen.
18254 (pupa_set_more): New function.
18255 * include/pupa/term.h (pupa_set_more): New prototype.
18256
18257
3b1139cb 182582004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
18259
18260 Now this project is GRUB 2 rather than PUPA. The location of
18261 the CVS repository was moved to GRUB's.
f19dbdb7 18262
3b1139cb 18263 * configure.ac: Use bug-grub as the reporting address.
18264 Use GRUB instead of PUPA.
18265 Change the version number to 1.90.
18266
8367695c 182672004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
18268
18269 * genkernsyms.sh: Updated copyright information.
18270 * genmk.rb: Likewise.
18271 * genmodsrc.sh: Likewise.
18272 * gensymlist.sh: Likewise.
18273 * boot/i386/pc/boot.S: Likewise.
18274 * boot/i386/pc/diskboot.S: Likewise.
18275 * disk/i386/pc/biosdisk.c: Likewise.
18276 * disk/i386/pc/partition.c: Likewise.
18277 * font/manager.c: Likewise.
18278 * fs/ext2.c: Likewise.
18279 * fs/fat.c: Likewise.
18280 * include/pupa/boot.h: Likewise.
18281 * include/pupa/device.h: Likewise.
18282 * include/pupa/disk.h: Likewise.
18283 * include/pupa/dl.h: Likewise.
18284 * include/pupa/elf.h: Likewise.
18285 * include/pupa/err.h: Likewise.
18286 * include/pupa/file.h: Likewise.
18287 * include/pupa/font.h: Likewise.
18288 * include/pupa/fs.h: Likewise.
18289 * include/pupa/kernel.h: Likewise.
18290 * include/pupa/loader.h: Likewise.
18291 * include/pupa/misc.h: Likewise.
18292 * include/pupa/mm.h: Likewise.
18293 * include/pupa/net.h: Likewise.
18294 * include/pupa/normal.h: Likewise.
18295 * include/pupa/rescue.h: Likewise.
18296 * include/pupa/setjmp.h: Likewise.
18297 * include/pupa/symbol.h: Likewise.
18298 * include/pupa/term.h: Likewise.
18299 * include/pupa/types.h: Likewise.
18300 * include/pupa/i386/setjmp.h: Likewise.
18301 * include/pupa/i386/types.h: Likewise.
18302 * include/pupa/i386/pc/biosdisk.h: Likewise.
18303 * include/pupa/i386/pc/boot.h: Likewise.
18304 * include/pupa/i386/pc/console.h: Likewise.
18305 * include/pupa/i386/pc/init.h: Likewise.
18306 * include/pupa/i386/pc/kernel.h: Likewise.
18307 * include/pupa/i386/pc/linux.h: Likewise.
18308 * include/pupa/i386/pc/loader.h: Likewise.
18309 * include/pupa/i386/pc/memory.h: Likewise.
18310 * include/pupa/i386/pc/multiboot.h: Likewise.
18311 * include/pupa/i386/pc/partition.h: Likewise.
18312 * include/pupa/i386/pc/time.h: Likewise.
18313 * include/pupa/i386/pc/vga.h: Likewise.
18314 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
18315 * include/pupa/util/getroot.h: Likewise.
18316 * include/pupa/util/misc.h: Likewise.
18317 * include/pupa/util/resolve.h: Likewise.
18318 * kern/device.c: Likewise.
18319 * kern/disk.c: Likewise.
18320 * kern/dl.c: Likewise.
18321 * kern/err.c: Likewise.
18322 * kern/file.c: Likewise.
18323 * kern/fs.c: Likewise.
18324 * kern/loader.c: Likewise.
18325 * kern/main.c: Likewise.
18326 * kern/misc.c: Likewise.
18327 * kern/mm.c: Likewise.
18328 * kern/rescue.c: Likewise.
18329 * kern/term.c: Likewise.
18330 * kern/i386/dl.c: Likewise.
18331 * kern/i386/pc/init.c: Likewise.
18332 * kern/i386/pc/lzo1x.S: Likewise.
18333 * kern/i386/pc/startup.S: Likewise.
18334 * loader/i386/pc/chainloader.c: Likewise.
18335 * loader/i386/pc/linux.c: Likewise.
18336 * loader/i386/pc/multiboot.c: Likewise.
18337 * normal/cmdline.c: Likewise.
18338 * normal/command.c: Likewise.
18339 * normal/main.c: Likewise.
18340 * normal/menu.c: Likewise.
18341 * normal/i386/setjmp.S: Likewise.
18342 * term/i386/pc/console.c: Likewise.
18343 * term/i386/pc/vga.c: Likewise.
18344 * util/console.c: Likewise.
18345 * util/genmoddep.c: Likewise.
18346 * util/misc.c: Likewise.
18347 * util/pupa-emu.c: Likewise.
18348 * util/resolve.c: Likewise.
18349 * util/unifont2pff.rb: Likewise.
18350 * util/i386/pc/biosdisk.c: Likewise.
18351 * util/i386/pc/getroot.c: Likewise.
18352 * util/i386/pc/pupa-mkimage.c: Likewise.
18353 * util/i386/pc/pupa-setup.c: Likewise.
18354
e6eced71 183552004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
18356
18357 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
18358 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
18359 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
18360 reading and reset it after reading.
18361 (pupa_ext2_close): Return PUPA_ERR_NONE.
18362
18363 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
18364 Correct value.
18365 (struct linux_kernel_header): Add kernel_version and
18366 initrd_addr_max.
18367 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
18368 pupa_file_read succeeds.
18369 (pupa_rescue_cmd_initrd): Implement.
18370
5aded270 183712003-12-03 Marco Gerards <metgerards@student.han.nl>
18372
18373 * fs/ext2.c (pupa_ext2_label): New function.
18374 (pupa_ext2_fs): Added label.
18375 * fs/fat.c (pupa_fat_label): New function.
18376 (pupa_fat_fs): Added label.
18377 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
18378
18379 * kern/misc.c (pupa_strndup): New function.
18380 * include/pupa/misc.h (pupa_strndup): New prototype.
18381
18382 * include/pupa/normal.h: Include <pupa/err.h>.
18383 (pupa_set_history): New prototype.
18384 (pupa_iterate_commands): New prototype.
18385 * normal/cmdline.c: Include <pupa/machine/partition.h>,
18386 <pupa/disk.h>, <pupa/file.h>.
18387 (hist_size): New variable.
18388 (hist_lines): Likewise.
18389 (hist_end): Likewise.
18390 (hist_used): Likewise.
18391 (pupa_set_history): New function.
18392 (pupa_history_get): Likewise.
18393 (pupa_history_add): Likewise.
18394 (pupa_history_replace): Likewise.
18395 (pupa_tab_complete): Likewise.
18396 (pupa_cmdline_run): Added tab completion and history buffer. Tab
18397 completion shows partitionnames while completing partitions, this
18398 feature was suggested by Jeff Bailey.
18399 * normal/command.c (pupa_iterate_commands): New function.
18400 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
18401 (pupa_normal_init): Initialize history buffer.
18402 (PUPA_MOD_INIT): Likewise.
18403 (pupa_normal_fini): Free the history buffer.
18404 (PUPA_MOD_FINI): Likewise.
18405
18406 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
18407 key.
18408
18409 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
18410 * configure.ac [i386]: Check for regparam bug.
18411 (NESTED_FUNC_ATTR) [! i386]: Defined.
18412
1f7315a3 184132003-11-17 Marco Gerards <metgerards@student.han.nl>
18414
18415 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
18416 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
18417 (pupa_emu_SOURCES): New variable.
18418 (pupa_emu_LDFLAGS): Likewise.
18419 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
18420 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
18421 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
18422 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
18423 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
18424 (pupa_jmp_buf): New typedef.
18425 (pupa_setjmp) [PUPA_UTIL]: New macro.
18426 (pupa_longjmp) [PUPA_UTIL]: Likewise.
18427 * include/pupa/term.h (struct pupa_term): New member `refresh'.
18428 (pupa_refresh): New prototype.
18429 * include/pupa/util/getroot.h: New file.
18430 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
18431 it.
18432 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
18433 (pupa_rescue_cmd_cat): Likewise.
18434 (pupa_rescue_cmd_ls): Likewise.
18435 (pupa_rescue_cmd_testload): Likewise.
18436 (pupa_rescue_cmd_lsmod): Likewise.
18437 * normal/cmdline.c (pupa_cmdline_get): Likewise.
18438 * normal/menu.c (run_menu): Likewise.
18439 * kern/term.c (pupa_cls): Likewise.
18440 (pupa_refresh): New function.
18441 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
18442 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
18443 * util/console.c: New file.
f19dbdb7 18444
1f7315a3 18445 * util/i386/pc/getroot.c: New file.
18446 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
18447 (pupa_putchar): New function.
18448 (pupa_refresh): Likewise.
18449 (xgetcwd): Function moved to ...
18450 (strip_extra_slashes): Likewise.
18451 (get_prefix): Likewise.
f19dbdb7 18452 * util/i386/pc/getroot.c: ... here.
1f7315a3 18453 (find_root_device): Function moved and renamed to...
18454 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
18455 Changed all callers.
18456 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
18457 and renamed to...
18458 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
18459 Changed all callers.
18460 * util/misc.c (pupa_memalign): New function.
18461 (pupa_mm_init_region): Likewise.
18462 (pupa_register_exported_symbols): Likewise.
18463 (pupa_putchar): Function removed.
18464 * util/pupa-emu.c: New file.
18465
9a5c1ade 184662003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
18467
18468 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
18469 (_multiboot_mod_SOURCES): New variable.
18470 (_multiboot_mod_CFLAGS): Likewise.
18471 * loader/i386/pc/multiboot.c: New file.
18472 * include/pupa/i386/pc/multiboot.h: Likewise.
18473 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
18474 (pupa_multiboot_real_boot): New function.
18475 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
18476 (pupa_multiboot_real_boot): New prototype.
18477 (pupa_rescue_cmd_multiboot): Likewise
18478 (pupa_rescue_cmd_module): Likewise.
18479
18480 * kern/loader.c (pupa_loader_set): Continue when
18481 pupa_loader_unload_func() fails.
18482 (pupa_loader_unset): New function.
18483 * include/pupa/loader.h (pupa_loader_unset): New prototype.
18484
18485 * kern/misc.c (pupa_stpcpy): New function.
18486 * include/pupa/misc.h (pupa_stpcpy): New prototype.
18487
8e72a9c0 184882003-11-12 Marco Gerards <metgerards@student.han.nl>
18489
18490 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
18491 for available extensions.
18492
18493 * include/pupa/i386/pc/time.h: New file.
18494 * kern/disk.c: Include <pupa/machine/time.h>.
18495 (PUPA_CACHE_TIMEOUT): New macro.
18496 (pupa_last_time): New variable.
18497 (pupa_disk_open): Flush the cache when there was a timeout.
18498 (pupa_disk_close): Reset the timer.
18499 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
18500 pupa_currticks.
18501 * util/misc.c: Include <sys/times.h>
18502 (pupa_get_rtc): New function.
18503
c4adbd32 185042003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
18505
18506 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
18507 as blocks.
18508 (pupa_ext2_get_file_block): Use blocks member.
18509
18510 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
18511 first block. Return -1 instead of pupa_errno on error.
18512
bfd30f06 185132003-10-27 Marco Gerards <metgerards@student.han.nl>
18514
18515 * README: In the pupa-mkimage example use _chain instead of chain
18516 and ext2 instead of fat.
18517 * TODO: Replace ext2fs with jfs as an example. Add an item for
18518 adding journal playback for ext2fs.
18519 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
18520 (pkgdata_MODULES): Added ext2.mod.
18521 (ext2_mod_SOURCES): New variable.
18522 (ext2_mod_CFLAGS): Likewise.
18523 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
18524 * include/pupa/misc.h (pupa_strncpy): New prototype.
18525 (pupa_strcat): Likewise.
18526 (pupa_strncmp): Likewise.
18527 * kern/misc.c (pupa_strcat): Enable function.
18528 (pupa_strncpy): New function.
18529 (pupa_strncmp): Likewise.
18530 * fs/ext2.c: New file.
f19dbdb7 18531
bfd30f06 18532 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
18533 when the read failed before retrying.
18534 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
18535 (_FILE_OFFSET_BITS): Likewise.
18536 * configure.ac: Added AC_SYS_LARGEFILE.
18537
98d15063 185382003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
18539
18540 * genmk.rb (PModule#rule): Make sure to get only symbol names
18541 from the output of nm.
18542 Reported by Robert Millan <zeratul2@wanadoo.es>.
18543
18d9c7cd 185442003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
18545
18546 I forgot to check in these changes for a long time. This adds
18547 incomplete support for VGA console, and this is still very
18548 buggy. Also, a lot of consideration is required for I18N,
18549 UNICODE, and VGA font issues. Therefore, assume that this is
18550 such that "better than nothing".
f19dbdb7 18551
18d9c7cd 18552 * font/manager.c: New file.
18553 * include/pupa/font.h: Likewise.
18554 * include/pupa/i386/pc/vga.h: Likewise.
18555 * term/i386/pc/vga.c: Likewise.
18556 * util/unifont2pff.rb: Likewise.
18557
18558 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
18559 (pkgdata_MODULES): Added vga.mod and font.mod.
18560 (vga_mod_SOURCES): New variables.
18561 (vga_mod_CFLAGS): Likewise.
18562 (font_mod_SOURCES): Likewise.
18563 (font_mod_CFLAGS): Likewise.
18564
18565 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
18566
18567 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 18568 (struct pupa_term): Added init and fini.
18d9c7cd 18569 Changed the argument of putchar to pupa_uint32_t.
18570
18571 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
18572 (pupa_console_real_putchar): New prototype.
18573 (pupa_console_putchar): Removed.
18574 (pupa_console_checkkey): Exported.
18575 (pupa_console_getkey): Likewise.
18576
18577 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
18578 characters.
18579
18580 * kern/term.c (pupa_term_set_current): Rewritten.
18581 (pupa_putchar): Likewise.
18582 (pupa_putcode): New function.
18583
18584 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
18585 (pupa_console_real_putchar): ... this.
18586 (pupa_vga_set_mode): New function.
18587 (pupa_vga_get_font): Likewise.
18588
18589 * normal/command.c: Include pupa/term.h.
18590 (terminal_command): New function.
18591 (pupa_command_init): Register the command "terminal".
18592
18593 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
18594 (DISP_UP): Likewise.
18595 (DISP_RIGHT): Likewise.
18596 (DISP_DOWN): Likewise.
18597 (DISP_HLINE): Likewise.
18598 (DISP_VLINE): Likewise.
18599 (DISP_UL): Likewise.
18600 (DISP_UR): Likewise.
18601 (DISP_LL): Likewise.
18602 (DISP_LR): Likewise.
18603
18604 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 18605
977329f5 186062003-02-08 NIIBE Yutaka <gniibe@m17n.org>
18607
18608 * util/resolve.c (pupa_util_resolve_dependencies): BUG
18609 FIX. Reverse the path_list.
18610
18611 * include/pupa/normal.h: Export pupa_register_command and
18612 pupa_unregister_command.
18613
18614 * hello/hello.c (pupa_cmd_hello): New module.
18615 * conf/i386-pc.rmk: Added hello.mod.
18616
1f5ab428 186172003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
18618
18619 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 18620
1f5ab428 18621 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
18622 (compress_kernel): New variable.
18623 (generate_image): Heavily modified to support compressing a
18624 large part of the core image.
18625
18626 * util/misc.c (pupa_util_read_image): Fix a file descriptor
18627 leak.
18628 (pupa_util_load_image): New function.
18629
18630 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
18631 (pupa_compressed_size): New variable.
18632 (codestart): Enable Gate A20 here.
18633 Decompress the compressed part of the core image.
18634 Rearrange the code to put functions and variables which are
18635 required for initialization in the non-compressed part.
18636 Include lzo1x.S.
18637
18638 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
18639 here.
18640
18641 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
18642
f19dbdb7 18643 * include/pupa/i386/pc/kernel.h
1f5ab428 18644 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
18645 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
18646 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18647 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18648 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
18649
18650 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
18651
18652 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
18653 (Utility#rule): Likewise.
18654
18655 * configure.ac: Check if LZO is available.
18656
ce5bf700 186572003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
18658
18659 * include/pupa/normal.h: New file.
18660 * include/pupa/setjmp.h: Likewise.
18661 * include/pupa/i386/setjmp.h: Likewise.
18662 * normal/cmdline.c: Likewise.
18663 * normal/command.c: Likewise.
18664 * normal/main.c: Likewise.
18665 * normal/menu.c: Likewise.
18666 * normal/i386/setjmp.S: Likewise.
f19dbdb7 18667
ce5bf700 18668 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
18669 (pupa_rescue_cmd_initrd): Likewise.
18670
18671 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
18672 Likewise.
18673
18674 * kern/i386/pc/startup.S (translation_table): New variable.
18675 (translate_keycode): New function.
18676 (pupa_console_getkey): Call translate_keycode.
18677
18678 * kern/rescue.c (attempt_normal_mode): New function.
18679 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
18680 it failed, print a message.
18681
18682 * kern/mm.c (pupa_real_malloc): Print more information when a
18683 free magic is broken.
18684 (pupa_free): If the first free header is not free actually, set
18685 it to P.
18686
18687 * kern/main.c (pupa_load_normal_mode): Just load the module
18688 "normal".
18689 (pupa_main): Don't print the message
18690 "Entering into rescue mode..." here.
18691
18692 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
18693 Declared.
18694 (pupa_rescue_cmd_initrd): Likewise.
18695 (pupa_rescue_cmd_initrd): Likewise.
18696
18697 * include/pupa/symbol.h (FUNCTION): Specify the type.
18698 (VARIABLE): Likewise.
18699
18700 * include/pupa/err.h (pupa_err_t): Added
18701 PUPA_ERR_UNKNOWN_COMMAND.
18702
18703 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
18704 (pupa_dl_get_prefix): Likewise.
18705
18706 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
18707 Added _chain.mod and _linux.mod instead of chain.mod and
18708 linux.mod.
18709 (chain_mod_SOURCES): Renamed to ...
18710 (_chain_mod_SOURCES): ... this.
18711 (chain_mod_CFLAGS): Renamed to ...
18712 (_chain_mod_CFLAGS): ... this.
18713 (linux_mod_SOURCES): Renamed to ...
18714 (_linux_mod_SOURCES): ... this.
18715 (linux_mod_CFLAGS): Renamed to ...
18716 (_linux_mod_CFLAGS): ... this.
18717 (normal_mod_SOURCES): New variable.
18718 (normal_mod_CFLAGS): Likewise.
18719 (normal_mod_ASFLAGS): Likewise.
18720
187212003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
18722
18723 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
18724 possible.
18725
fe6b695a 18726 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 18727 recursively.
18728 (pupa_dl_unref): Unrefer depending modules recursively.
18729 Don't call pupa_dl_unload implicitly, because PUPA can crash if
18730 a module is unloaded before one depending on that module is
18731 unloaded.
18732 (pupa_dl_unload): Unload depending modules explicitly,
18733 if possible.
18734
c04da074 187352003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
18736
18737 * include/pupa/i386/pc/linux.h: New file.
18738 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 18739
c04da074 18740 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
18741 Removed.
18742 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18743 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18744 of PUPA_CHAINLOADER_BOOT_SECTOR.
18745
18746 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18747 (pupa_linux_prot_size): New variable.
18748 (pupa_linux_tmp_addr): Likewise.
18749 (pupa_linux_real_addr): Likewise.
18750 (pupa_linux_boot_zimage): New function.
18751 (pupa_linux_boot_bzimage): Likewise.
18752
18753 * kern/i386/pc/init.c (struct mem_region): New structure.
18754 (MAX_REGIONS): New macro.
18755 (mem_regions): New variable.
18756 (num_regions): Likewise.
18757 (pupa_os_area_addr): Likewise.
18758 (pupa_os_area_size): Likewise.
18759 (pupa_lower_mem): Likewise.
18760 (pupa_upper_mem): Likewise.
18761 (add_mem_region): New function.
18762 (compact_mem_regions): Likewise.
18763 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18764 the size of the conventional memory and that of so-called upper
18765 memory (before the first memory hole).
18766 Instead of adding each found region to free memory, use
18767 add_mem_region and add them after removing overlaps.
18768 Also, add only 1/4 of the upper memory to free memory. The rest
18769 is used for loading OS images. Maybe this is ad hoc, but this
18770 makes it much easier to relocate OS images when booting.
18771
18772 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18773 (pupa_enter_rescue_mode): Don't register initrd and module.
18774
18775 * kern/mm.c: Include pupa/dl.h.
18776
18777 * kern/main.c: Include pupa/file.h and pupa/device.h.
18778
18779 * kern/loader.c (pupa_loader_load_module_func): Removed.
18780 (pupa_loader_load_module): Likewise.
18781
18782 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
18783 ``.o''.
18784
18785 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
18786 (pupa_linux_tmp_addr): Likewise.
18787 (pupa_linux_real_addr): Likewise.
18788 (pupa_linux_boot_zimage): Likewise.
18789 (pupa_linux_boot_bzimage): Likewise.
18790
18791 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18792 (pupa_upper_mem): Likewise.
18793 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18794 module is too dangerous.
18795
18796 * include/pupa/loader.h (pupa_os_area_addr): Declared.
18797 (pupa_os_area_size): Likewise.
18798 (pupa_loader_set): Remove the first argument. Loader doesn't
18799 manage modules or initrd any longer.
18800 (pupa_loader_load_module): Removed.
18801
18802 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18803 (linux_mod_SOURCES): New variable.
18804 (linux_mod_CFLAGS): Likewise.
18805
a13f9237 188062003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
18807
18808 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18809 the length of a blocklist correctly.
18810
18811 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18812 Use ioctl only if the OS file is a block device.
18813 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18814 not very useful for normal files.
18815
18816 * kern/main.c (pupa_set_root_dev): New function.
18817 (pupa_load_normal_mode): Likewise.
18818 (pupa_main): Call those above.
18819
18820 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18821 pupa_uint16_t.
18822
18823 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18824
a5ffe966 188252003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
18826
18827 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18828 (setup): Configure the installed partition information and the
18829 dl prefix.
18830
18831 * loader/i386/pc/chainloader.c (my_mod): New variable.
18832 (pupa_chainloader_unload): New function.
18833 (pupa_rescue_cmd_chainloader): Refer itself.
18834 (PUPA_MOD_INIT): Save its own module in MY_MOD.
18835
18836 * kern/i386/pc/startup.S (install_partition): Removed.
18837 (version_string): Likewise.
18838 (config_file): Likewise.
18839 (pupa_install_dos_part): New variable.
18840 (pupa_install_bsd_part): Likewise.
18841 (pupa_prefix): Likewise.
18842 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18843
18844 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18845 and pupa/misc.h.
18846 (make_install_device): New function.
18847 (pupa_machine_init): Set the dl prefix.
18848
18849 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18850 (buf): Renamed to ...
18851 (linebuf): ... this.
18852 (pupa_rescue_cmd_prefix): New function.
18853 (pupa_rescue_cmd_insmod): Likewise.
18854 (pupa_rescue_cmd_rmmod): Likewise.
18855 (pupa_rescue_cmd_lsmod): Likewise.
18856 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18857 rmmod and lsmod.
18858
18859 * kern/mm.c (pupa_memalign): If failed even after invalidating
18860 disk caches, unload unneeded modules and retry.
18861
18862 * kern/misc.c (pupa_memmove): New function.
18863 (pupa_memcpy): Removed.
18864 (pupa_strcpy): New function.
18865 (pupa_itoa): Made static.
18866
18867 * kern/dl.c (pupa_dl_iterate): New function.
18868 (pupa_dl_ref): Likewise.
18869 (pupa_dl_unref): Likewise.
18870 (pupa_dl_unload): Return if succeeded or not.
18871 (pupa_dl_unload_unneeded): New function.
18872 (pupa_dl_unload_all): Likewise.
18873 (pupa_dl_init): Renamed to ...
18874 (pupa_dl_set_prefix): ... this.
18875 (pupa_dl_get_prefix): New function.
18876
18877 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18878 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18879 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18880 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18881 (pupa_install_dos_part): Declared.
18882 (pupa_install_bsd_part): Likewise.
18883 (pupa_prefix): Likewise.
18884 (pupa_boot_drive): Likewise.
18885
18886 * include/pupa/types.h: Fix a typo.
18887
18888 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18889 pupa_memmove.
18890 (pupa_memmove): Declared.
18891 (pupa_strcpy): Likewise.
18892
18893 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18894 pupa_mod_init takes one argument, its own module.
18895 (pupa_dl_unload_unneeded): Declared.
18896 (pupa_dl_unload_all): Likewise.
18897 (pupa_dl_ref): Likewise.
18898 (pupa_dl_unref): Likewise.
18899 (pupa_dl_iterate): Likewise.
18900 (pupa_dl_init): Renamed to ...
18901 (pupa_dl_set_prefix): ... this.
18902 (pupa_dl_get_prefix): Declared.
18903
18904 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 18905 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 18906 unloaded.
18907 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18908 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18909
18910 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18911 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18912
012d7999 189132003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18914
18915 * util/i386/pc/pupa-setup.c (setup): Define the internal
18916 function find_first_partition_start at the top level, because GCC
18917 3.0.x cannot compile internal functions in deeper scopes
18918 correctly.
18919 (find_root_device): Use lstat instead of stat.
18920 Don't follow symbolic links.
18921 Fix the path-constructing code.
18922
18923 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18924 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18925 by a BLKGETSIZE ioctl first, because block devices don't fill
18926 the member st_mode of the structure stat on Linux.
18927 [__linux__] (linux_find_partition): Use a temporary buffer
18928 REAL_DEV for the working space. Copy it to DEV before returning.
18929 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18930 buffer cache consistent.
18931 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18932 strncmp. The previous value was merely wrong.
18933 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18934
18935 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18936 FAT size is 12. The previous value was merely wrong.
18937
18938 * kern/main.c (pupa_main): Don't split the starting message from
18939 newlines.
18940
18941 * kern/term.c (pupa_putchar): Put CR after LF instead of before
18942 LF, because BIOS goes crazy about character attributes in this
18943 case.
18944
1cc73a62 189452003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
18946
18947 * include/i386/pc/util/biosdisk.h: New file.
18948 * util/i386/pc/biosdisk.c: Likewise.
18949 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 18950
1cc73a62 18951 * Makefile.in (INCLUDE_DISTFILES): Added
18952 include/pupa/i386/pc/util/biosdisk.h.
18953 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18954 directory util/i386/pc.
18955 (install-local): Added a rule for sbin_UTILITIES.
18956 (uninstall): Likewise.
18957
18958 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18959
18960 * util/misc.c (xrealloc): New function.
18961 (pupa_malloc): Likewise.
18962 (pupa_free): Likewise.
18963 (pupa_realloc): Likewise.
18964 (pupa_stop): Likewise.
18965 (pupa_putchar): Likewise.
18966
18967 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18968
18969 * include/pupa/util/misc.h (xrealloc): Declared.
18970
18971 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18972 macro.
18973 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18974 (PUPA_BOOT_MACHINE_BPB_END): ... this.
18975
18976 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18977 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18978
18979 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18980 way should be implemented.
18981 [PUPA_UTIL] (pupa_fat_fini): Likewise.
18982
18983 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18984 the size of NAME for safety.
18985 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18986 0x88.
18987
18988 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18989 (pupa_setup_SOURCES): Likewise.
18990
18991 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18992
08b70fe8 189932002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
18994
18995 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18996 bunch of pushl's from pusha, because this destroys the return
18997 value.
18998
62ddcc8f 189992002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
19000
19001 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
19002 This means that any missing prototypes could be fatal. Also, you
19003 must take care when writing assembly code. See the comments at
19004 the beginning of startup.S, for more details.
f19dbdb7 19005
62ddcc8f 19006 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
19007 compilation mechanism.
19008 (pupa_chainloader_real_boot): Likewise.
19009 (pupa_biosdisk_rw_int13_extensions): Likewise.
19010 (pupa_biosdisk_rw_standard): Likewise.
19011 (pupa_biosdisk_check_int13_extensions): Likewise.
19012 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
19013 (pupa_biosdisk_get_diskinfo_standard): Likewise.
19014 (pupa_get_memsize): Likewise.
19015 (pupa_get_mmap_entry): Likewise.
19016 (pupa_console_putchar): Likewise.
19017 (pupa_console_setcursor): Likewise.
19018 (pupa_getrtsecs): Use pushl instead of push.
19019
19020 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
19021 memory instead of the stack for a mmap entry, because some
19022 BIOSes may ignore the maximum size and overflow.
19023
19024 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
19025
19026 * genmk.rb (PModule#rule): Compile automatically generated
19027 sources with module-specific CFLAGS as well as other sources.
19028
9962ed99 190292002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
19030
19031 * configure.ac: Check ld.
19032 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
19033 respectively, before checking endianness and sizes.
19034
19035 * Makefile.in (LD): New variable.
f19dbdb7 19036
abdfc3c5 190372002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
19038
19039 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
19040
6a161fa9 190412002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
19042
19043 * Changelog: New file.
19044