1 2009-08-23 Colin Watson <cjwatson@ubuntu.com>
3 * util/grub-mkconfig.in: Export GRUB_DISABLE_OS_PROBER.
5 2009-08-23 Colin Watson <cjwatson@ubuntu.com>
7 * util/grub.d/30_os-prober.in: Disable os-prober if
8 `GRUB_DISABLE_OS_PROBER' was set to true.
10 2009-08-23 Robert Millan <rmh.grub@aybabtu.com>
12 * partmap/pc.c: Rename to ...
13 * partmap/msdos.c: ... this. Update all users.
14 (grub_pc_partition_map): Rename to ...
15 (grub_msdos_partition_map): ... this. Update all users.
17 * parttool/pcpart.c: Rename to ...
18 * parttool/msdospart.c: ... this. Update all users.
20 * include/grub/pc_partition.h: Rename to ...
21 * include/grub/msdos_partition.h: ... this. Update all users.
22 (grub_pc_partition_bsd_entry): Rename to ...
23 (grub_msdos_partition_bsd_entry): ... this. Update all users.
24 (grub_pc_partition_disk_label): Rename to ...
25 (grub_msdos_partition_disk_label): ... this. Update all users.
26 (grub_pc_partition_entry): Rename to ...
27 (grub_msdos_partition_entry): ... this. Update all users.
28 (grub_pc_partition_mbr): Rename to ...
29 (grub_msdos_partition_mbr): ... this. Update all users.
30 (grub_pc_partition): Rename to ...
31 (grub_msdos_partition): ... this. Update all users.
32 (grub_pc_partition_is_empty): Rename to ...
33 (grub_msdos_partition_is_empty): ... this. Update all users.
34 (grub_pc_partition_is_extended): Rename to ...
35 (grub_msdos_partition_is_extended): ... this. Update all users.
36 (grub_pc_partition_is_bsd): Rename to ...
37 (grub_msdos_partition_is_bsd): ... this. Update all users.
39 * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS)
40 (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS)
41 (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS)
42 (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS)
43 (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS)
44 (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS)
45 (gpt_mod_LDFLAGS): Rename to ...
46 (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS)
47 (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS)
48 (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS)
49 (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS)
50 (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS)
51 (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS)
52 (part_gpt_mod_LDFLAGS): ... this.
53 (pkglib_MODULES): Prefix partition modules with `part_'. Rename
54 `pcpart.mod' to `msdospart.mod'.
55 (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename
57 (msdospart_mod_SOURCES, msdospart_mod_CFLAGS)
58 (msdospart_mod_LDFLAGS): ... this.
60 2009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
62 * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
63 (openbsd_opts): Likewise.
64 (netbsd_opts): Likewise.
65 (freebsd_flags): Added 0 terminator.
66 (openbsd_flags): Likewise.
67 (netbsd_flags): Likewise.
68 (grub_bsd_parse_flags): Rewritten to use extcmd. All users updated.
69 (grub_cmd_freebsd): Transformed into extended command.
70 (grub_cmd_openbsd): Likewise.
71 (grub_cmd_netbsd): Likewise.
72 (cmd_freebsd): Changed type to grub_extcmd_t.
73 (cmd_openbsd): Likewise.
74 (cmd_netbsd): Likewise.
75 (GRUB_MOD_INIT (bsd)): Register grub_cmd_freebsd, grub_cmd_netbsd and
76 grub_cmd_openbsd as extended commands.
77 (GRUB_MOD_FINI (bsd)): Use grub_unregister_extcmd for cmd_freebsd,
78 cmd_netbsd and cmd_openbsd
80 2009-08-22 Vladimir Serbinenko <phcoder@gmail.com>
82 * commands/xnu_uuid.c (transform): Use grub_memcpy instead of memcpy.
84 2009-08-21 Pavel Roskin <proski@gnu.org>
86 * Makefile.in (install-local): When checking if a file is in the
87 build directory, use "test -e" to detect symlinks.
89 * Makefile.in (install-local): Remove all files in
90 $(DESTDIR)$(pkglibdir) before installing new files there.
92 2009-08-18 Felix Zielcke <fzielcke@z-51.de>
94 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Use
97 2009-08-18 Felix Zielcke <fzielcke@z-51.de>
99 * util/grub-mkconfig.in: Don't use gfxterm by default if not
100 explicitly specified by the user.
102 2009-08-18 Pavel Roskin <proski@gnu.org>
104 * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
105 grub_uint8_t pointer for data.
106 * include/grub/fbutil.h (struct grub_video_fbblit_info):
108 * video/fb/fbutil.c: Remove unnecessary casts.
110 2009-08-17 Michal Suchanek <hramrach@centrum.cz>
114 * video/i386/pc/vbe.c (vbe_mode_in_use): Removed (duplicate).
115 (grub_vbe_set_video_mode): Save active mode info
116 only after setting the mode.
117 (grub_video_vbe_setup): Call 'grub_vbe_set_video_mode' with NULL as
120 2009-08-17 Michal Suchanek <hramrach@centrum.cz>
122 Rename variables for clarity.
124 * video/i386/pc/vbe.c (active_mode_info): Renamed to ...
125 (active_vbe_mode_info): ... this. All users updated.
126 (framebuffer): Rename 'active_mode' to 'active_vbe_mode'.
128 (initial_mode): Rename to ...
129 (initial_vbe_mode): ... this. All users updated.
130 (mode_in_use): Rename to ..
131 (vbe_mode_in_use): ... this. All users updated.
132 (mode_list): Rename to ..
133 (vbe_mode_list): ... this. All users updated.
134 (grub_vbe_set_video_mode): Rename 'mode' to 'vbe_mode', 'mode_info' to
135 'vbe_mode_info' and 'old_mode' to 'old_vbe_mode'.
136 (grub_video_vbe_init): Rename 'rm_mode_list' to 'rm_vbe_mode_list' and
137 'mode_list_size' to 'vbe_mode_list_size'.
138 (grub_video_vbe_setup): Rename 'mode_info' to 'vbe_mode_info',
139 'best_mode_info' to 'best_vbe_mode_info' and
140 'best_mode' to 'best_vbe_mode'
142 2009-08-17 Michal Suchanek <hramrach@centrum.cz>
144 Remove duplicate grub_video_fb_get_video_ptr.
146 * include/grub/fbutil.h (get_data_ptr): Rename to ...
147 (grub_video_fb_get_video_ptr): ... this.
148 * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed.
149 * video/fb/fbutil.c: Add comment about addressing.
150 (get_data_ptr): Rename to ...
151 (grub_video_fb_get_video_ptr): ... this. All users updated.
152 * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
154 2009-08-17 Robert Millan <rmh.grub@aybabtu.com>
156 * fs/fat.c (grub_fat_read_data): Remove `#if 0' braces around the
157 grub_dprintf() that was just added.
159 2009-08-17 Robert Millan <rmh.grub@aybabtu.com>
161 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT)
162 (DEFAULT_VIDEO_MODE): Remove macros.
163 (grub_linux_boot): Remove assumption that Linux has FB support,
164 and use "text" as default video mode.
166 2009-08-15 Vladimir Serbinenko <phcoder@gmail.com>
168 * fs/affs.c (grub_affs_read_symlink): Change leftover grub_printf into
170 * fs/fat.c (grub_fat_read_data): Likewise.
172 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
174 * loader/i386/multiboot.c (grub_multiboot): Don't pass filename to
176 (grub_module): Likewise.
178 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
180 * loader/i386/multiboot.c (grub_multiboot_unload): Don't free mbi and
181 mbi->cmdline but free playground.
183 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
185 Handle group offset on UFS1.
187 * fs/ufs.c (grub_ufs_sblock): New field 'cylg_mask'.
188 (grub_ufs_read_inode) [!MODE_UFS2]: handle cylg_offset and cylg_mask.
190 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
192 Split ufs.mod into ufs1.mod and ufs2.mod.
194 * conf/common.rmk (grub_probe_SOURCES): Add fs/ufs2.c.
195 (grub_fstest_SOURCES): Likewise.
196 (pkglib_MODULES): Remove ufs.mod. Add ufs1.mod and ufs2.mod.
197 (ufs_mod_SOURCES): Remove.
198 (ufs_mod_CFLAGS): Likewise.
199 (ufs_mod_LDFLAGS): Likewise.
200 (ufs1_mod_SOURCES): New variable.
201 (ufs1_mod_CFLAGS): Likewise.
202 (ufs1_mod_LDFLAGS): Likewise.
203 (ufs2_mod_SOURCES): New variable.
204 (ufs2_mod_CFLAGS): Likewise.
205 (ufs2_mod_LDFLAGS): Likewise.
206 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add fs/ufs2.c.
207 * conf/i386-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
209 (grub_emu_SOURCES): Likewise.
210 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
211 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
212 (grub_setup_SOURCES): Likewise.
213 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
214 * conf/sparc64.rmk (grub_emu_SOURCES): Likewise.
215 (grub_setup_SOURCES): Likewise.
216 * conf/x86_64-efi.rmk (util/i386/efi/grub-mkimage.c_DEPENDENCIES):
218 * fs/ufs2.c: New file.
219 * fs/ufs.c: Separate UFS1 from UFS2 by using preprocessor.
221 2009-08-14 Vladimir Serbinenko <phcoder@gmail.com>
225 * commands/i386/pc/vbetest.c (grub_cmd_vbetest): Restore video
226 subsystem at the end.
227 * conf/common.rmk (pkglib_MODULES): Add video_fb.mod.
228 (video_fb_mod_SOURCES): New variable.
229 (video_fb_mod_CFLAGS): Likewise.
230 (video_fb_mod_LDFLAGS): Likewise.
231 * conf/i386-pc.rmk (vbe_mod_SOURCES): Remove video/i386/pc/vbeblit.c,
232 video/i386/pc/vbefill.c and video/i386/pc/vbeutil.c.
233 * video/i386/pc/vbeblit.c: Moved from here ...
234 * video/fb/fbblit.c: ..here. Replaced 'vbe' with 'fb'.
235 * video/i386/pc/vbefill.c: Moved from here ...
236 * video/fb/fbfill.c: ..here. Replaced 'vbe' with 'fb'.
237 * video/i386/pc/vbeutil.c: Moved from here ...
238 * video/fb/fbutil.c: ..here. Replaced 'vbe' with 'fb'.
239 * include/grub/i386/pc/vbeblit.h: Moved from here ...
240 * include/grub/fbblit.h: ... here. Replaced 'vbe' with 'fb'.
241 * include/grub/i386/pc/vbefill.h: Moved from here ...
242 * include/grub/fbfill.h: ... here. Replaced 'vbe' with 'fb'.
243 * include/grub/i386/pc/vbeutil.h: Moved from here ...
244 * include/grub/fbutil.h: ... here. Replaced 'vbe' with 'fb'.
245 * include/grub/i386/pc/vbe.h: Moved framebuffer part ...
246 * include/grub/video_fb.h: ... here. Replaced 'vbe' with 'fb'.
247 * include/grub/video.h (GRUB_VIDEO_RENDER_TARGET_FRONT_BUFFER): Removed.
248 (GRUB_VIDEO_RENDER_TARGET_BACK_BUFFER): Likewise.
249 (grub_video_adapter): Added 'get_info_and_fini'.
250 (grub_video_get_info_and_fini): New prototype.
251 (grub_video_set_mode): make modestring const char *.
252 * loader/i386/linux.c (grub_linux_setup_video): Use
253 grub_video_get_info_and_fini.
254 (grub_linux_boot): Move modesetting just before booting.
255 * loader/i386/pc/xnu.c (grub_xnu_set_video): Use
256 grub_video_get_info_and_fini.
257 * video/i386/pc/vbe.c: Moved framebuffer part ...
258 * video/fb/video_fb.c: ... here. Replaced 'vbe' with 'fb'.
259 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): Use
260 grub_video_fbstd_colors and grub_video_fb_set_palette.
261 (grub_video_vbe_init): Clear 'framebuffer' variable and use
263 (grub_video_vbe_fini): Use grub_video_fb_fini.
264 (grub_video_vbe_setup): Use framebuffer.render_target instead of
265 render_target and use grub_video_fb_set_active_render_target and
266 grub_video_fb_set_palette.
267 (grub_video_vbe_set_palette): Use grub_video_fb_set_palette.
268 (grub_video_vbe_set_viewport): Use grub_video_fb_set_viewport.
269 (grub_video_vbe_adapter): Use framebuffer.
270 * video/video.c (grub_video_get_info_and_fini): New function.
271 (grub_video_set_mode): Make modestring const char *.
272 (GRUB_MOD_INIT(video_video)): Don't set variables to 0 since these
273 values are already initialised.
275 2009-08-14 Pavel Roskin <proski@gnu.org>
277 * boot/i386/pc/cdboot.S: Use LOCAL for local labels. Eliminate
279 * boot/i386/pc/diskboot.S: Likewise.
280 * boot/i386/pc/lnxboot.S: Likewise. Hardcode the number of code
281 sectors allow compilation on MacOSX.
282 * conf/i386-pc.rmk: Enable unconditional compilation of
285 2009-08-13 Colin Watson <cjwatson@ubuntu.com>
287 * util/grub-mkconfig.in: Export GRUB_HIDDEN_TIMEOUT.
288 * util/grub.d/00_header.in: Enter interruptible sleep if
289 GRUB_HIDDEN_TIMEOUT is set.
291 2009-08-13 Yves Blusseau <blusseau@zetam.org>
293 * include/grub/symbol.h: Add the LOCAL macro.
294 * boot/i386/pc/boot.S: Use the LOCAL macro for all labels
297 2009-08-13 Pavel Roskin <proski@gnu.org>
299 * boot/i386/pc/boot.S: Remove ABS macro, it's not required by
300 any modern compilers we support.
302 * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
303 Use local labels starting with "L_" so that Apple assembler
304 knows they are local.
306 2009-08-10 Robert Millan <rmh.grub@aybabtu.com>
308 * include/grub/i386/bsd.h (KERNEL_TYPE_NONE, KERNEL_TYPE_FREEBSD)
309 (KERNEL_TYPE_OPENBSD, KERNEL_TYPE_NETBSD): Convert to ...
310 (bsd_kernel_types): ... this enum.
312 * loader/i386/bsd.c (grub_cmd_freebsd_loadenv, grub_cmd_freebsd_module)
313 (grub_cmd_freebsd_module_elf): Abort with "You need to load the
314 kernel first." when `kernel_type' is set to KERNEL_TYPE_NONE.
316 (grub_bsd_load_aout, grub_bsd_load, grub_cmd_freebsd_loadenv)
317 (grub_cmd_freebsd_module, grub_cmd_freebsd_module_elf)
318 (GRUB_MOD_INIT (bsd)): Fix capitalization in a few error
321 2009-08-08 Robert Millan <rmh.grub@aybabtu.com>
323 * util/grub-dumpdevtree: Moved from here ...
324 * util/i386/efi/grub-dumpdevtree: ... to here.
325 (hexify): New function. Converts a string to its hex version.
326 Generate hex versions of "efi" and "device-properties" by calling
327 hexify() on the ASCII strings rather than by hardcoding numbers.
329 2009-08-08 Robert Millan <rmh.grub@aybabtu.com>
331 * fs/jfs.c: Update copyright year.
333 2009-08-08 Felix Zielcke <fzielcke@z-51.de>
335 * util/grub.d/00_header.in: Fix a comment.
336 * util/grub.d/10_linux.in: Likewise.
337 * util/grub.d/10_windows.in: Likewise.
338 * util/grub.d/10_hurd.in: Likewise.
340 2009-08-08 Felix Zielcke <fzielcke@z-51.de>
342 * util/grub-mkconfig.in: Allow the user to specify the used font
345 2009-08-08 Pavel Roskin <proski@gnu.org>
347 * include/grub/powerpc/libgcc.h: Export __ashrdi3() if
348 available, xfs.mod needs it now.
350 * util/grub-mkconfig_lib.in (version_test_numeric): Don't use
351 the "g" modifier in sed when the intention is to strip something
352 once. This fixes comparison of kernels with multiple dashes.
354 * util/grub-mkconfig.in: Define datarootdir, datadir may depend
355 on it. Add missing space before closing bracket. Fix
356 misleading formatting.
358 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
360 * docs/grub.texi: Major overhaul. Remove all sections that are
361 specific to GRUB Legacy, or mostly composed of Legacy-specific
364 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
366 * docs/version.texi: New file. Provides version information for
369 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
371 * docs/grub.texi: Update CVS information to SVN.
372 Replace outdated "GRUB 2 will include" phrase with "GRUB 2 includes".
374 2009-08-07 Felix Zielcke <fzielcke@z-51.de>
376 * util/grub-mkconfig.in: Remove a wrong `fi'.
378 2009-08-07 Felix Zielcke <fzielcke@z-51.de>
380 * fs/uuid.c (grub_jfs_superblock): New fields unused2 and uuid.
381 (grub_jfs_uuid): New function.
382 (grub_jfs_fs): Set uuid field to grub_jfs_uuid.
384 2009-08-07 Felix Zielcke <fzielcke@z-51.de>
386 * util/grub-mkconfig_lib.in (font_path): Move the functionality
388 * util/grub-mkconfig.in: ... here. Prefer unicode.pf2 and
389 unifont.pf2 over ascii.pf2. Export LANG=C in case ascii.pf2 gets used.
391 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
393 * util/grub.d/10_linux.in (test_numeric): Moved from here ...
394 * util/grub-mkconfig_lib.in (version_test_numeric): ... to here.
397 * util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
398 not just "vmlinu[zx]".
400 * util/grub-mkconfig_lib.in (version_test_gt): ... to here. Update
403 * util/grub.d/10_linux.in (find_latest): Moved from here ...
404 * util/grub-mkconfig_lib.in (version_find_latest): ... to here. Update
407 2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
409 * util/grub.d/10_freebsd.in: Use an absolute device path for
410 `vfs.root.mountfrom'. Set `vfs.root.mountfrom.options=rw'.
412 2009-08-06 Felix Zielcke <fzielcke@z-51.de>
414 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
415 handling of multiple abstraction modules.
417 2009-08-04 Robert Millan <rmh.grub@aybabtu.com>
419 Fix a bug resulting in black screen when loading Linux using a
422 * kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
425 * include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
426 (grub_vbe_bios_getset_dac_palette_width): New function.
427 (grub_vbe_bios_get_dac_palette_width)
428 (grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
429 grub_vbe_bios_getset_dac_palette_width()).
431 * video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
432 check for return status.
433 (grub_vbe_get_video_mode_info): When getting information for a packed
434 mode (<= 8 bpp), obtain DAC palette width using
435 grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
436 {red,green,blue}_mark_size.
438 2009-08-04 Felix Zielcke <fzielcke@z-51.de>
440 * commands/search.c (options): Fix help output to match actual code.
442 2009-08-02 Vladimir Serbinenko <phcoder@gmail.com>
444 * commands/hexdump.c (grub_cmd_hexdump): Use grub_disk_read instead
447 2009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
449 * util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
452 2009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
454 Support Apple partition map with sector size different from 512 bytes.
456 * partmap/apple.c (grub_apple_header): New field 'blocksize'.
457 (apple_partition_map_iterate): Respect 'aheader.blocksize'
458 and 'apart.partmap_size'.
460 2009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
461 2009-08-01 Robert Millan <rmh.grub@aybabtu.com>
465 * commands/i386/cpuid.c (options): New variable.
466 (grub_cmd_cpuid): Return real error.
467 (GRUB_MOD_INIT(cpuid)): Declare options.
469 2009-07-31 Vladimir Serbinenko <phcoder@gmail.com>
471 * partmap/pc.c (pc_partition_map_iterate): Check that boot flags are
474 2009-07-31 Bean <bean123ch@gmail.com>
476 * fs/xfs.c (grub_xfs_sblock): Change unused5 field to log2_sect and
478 (grub_fshelp_node): Move inode field to the end.
479 (grub_xfs_data): Remove inode field.
480 (grub_xfs_inode_block): Calculate inode size using sblock.
481 (grub_xfs_inode_offset): Likewise.
482 (grub_xfs_read_inode): Calculate inode size using sblock.
483 (grub_xfs_read_block): Replace XFS_INODE_EXTENTS with nrec.
484 (grub_xfs_iterate_dir): Calculate inode size using sblock.
485 (grub_xfs_mount): Use grub_zalloc instead of grub_malloc. Realloc data
487 (grub_xfs_dir): goto mount_fail when mount fails, as data->diropen is
488 not accessible when data is null.
489 (grub_xfs_open): Likewise.
491 2009-07-31 Bean <bean123ch@gmail.com>
493 * disk/lvm.c (grub_lvm_scan_device): Ignore extra copy of metadata.
494 Don't change pv->disk if it's already set.
496 * disk/raid.c (grub_raid_scan_device): Merge this function into ...
497 (grub_raid_register): ... here.
498 (grub_raid_rescan): Removed.
500 * include/grub/raid.h (grub_raid_rescan): Removed.
502 * util/grub-fstest.c: Remove include file <grub/raid.h>.
503 (fstest): Replace grub_raid_rescan with module fini function followed
506 * util/grub-probe.c: Add include file <grub/raid.h>.
507 (probe_raid_level): New function.
508 (probe): Detect abstraction by walking the disk device, support two
509 level of abstraction (LVM on RAID) when detecting partition map.
511 2009-07-31 Pavel Roskin <proski@gnu.org>
513 * disk/raid5_recover.c (grub_raid5_recover): Revert conversion
514 to grub_zalloc(), it was erroneous.
515 Reported by Bean <bean123ch@gmail.com>
517 2009-07-30 Vladimir Serbinenko <phcoder@gmail.com>
519 * util/i386/pc/grub-setup.c (setup): Check that no partition is in
520 embeding zone, not only the first one.
522 2009-07-29 Joe Auricchio <jauricchio@gmail.com>
524 * term/gfxterm.c (clear_char): New function.
525 (grub_virtual_screen_setup): Use clear_char.
526 (scroll_up): Likewise.
527 (grub_virtual_screen_cls): Likewise.
529 2009-07-29 Felix Zielcke <fzielcke@z-51.de>
531 * util/deviceiter.c (get_acceleraid_disk_name): New static
533 (grub_util_iterate_devices): Handle Accelraid devices.
534 * util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
536 2009-07-28 Robert Millan <rmh.grub@aybabtu.com>
538 * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as
539 separator for the suggested gfxpayload string (';' collides with the
540 parser and needs escaping).
542 2009-07-28 Vladimir Serbinenko <phcoder@gmail.com>
544 * loader/i386/multiboot_helper.S (grub_multiboot_backward_relocator):
545 Clear direction flag before jumping to OS.
546 (grub_multiboot2_real_boot): Likewise.
548 2009-07-28 Felix Zielcke <fzielcke@z-51.de>
550 * util/i386/pc/grub-install: Fix parsing of --disk-module
553 2009-07-28 Felix Zielcke <fzielcke@z-51.de>
555 * util/i386/pc/grub-setup.c (setup): Fix 2 incorrect checks
558 2009-07-26 Felix Zielcke <fzielcke@z-51.de>
560 * util/grub-mkconfig.in (package_version): New variable.
561 Use it do display the version.
563 2009-07-25 Felix Zielcke <fzielcke@z-51.de>
565 * kern/file.c (grub_file_open): Revert to previous check with
568 2009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
570 * commands/probe.c (GRUB_MOD_INIT (probe)): Remove "[--target=target]"
571 from help line. It's out of sync with code.
573 2009-07-25 Vladimir Serbinenko <phcoder@gmail.com>
575 * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
576 entries on failed boot.
578 2009-07-25 Felix Zielcke <fzielcke@z-51.de>
580 * kern/file.c (grub_file_open): Fix an error check.
582 2009-07-24 Vladimir Serbinenko <phcoder@gmail.com>
584 * util/i386/pc/grub-setup.c (setup): Fix segmentation fault when
585 partition map couldn't be identified.
587 2009-07-23 Pavel Roskin <proski@gnu.org>
589 * commands/xnu_uuid.c (transform): Use GRUB_CPU_WORDS_BIGENDIAN
590 instead of WORDS_BIGENDIAN. Use grub_le_to_cpu32(), so that the
591 case of little endian words becomes just an optimization.
592 Respect const modifier.
593 (md5_final): Use code that doesn't depend on endianess.
595 * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr
596 to avoid loss of upper bits if align is unsigned and shorter
599 2009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
603 * fs/ufs.c (grub_ufs_sblock): Add uuidhi and uuidlow.
604 (grub_ufs_uuid): New function.
605 (grub_ufs_fs): add .uuid
607 2009-07-21 Pavel Roskin <proski@gnu.org>
609 * kern/dl.c (grub_dl_check_header): Make static.
611 2009-07-21 Felix Zielcke <fzielcke@z-51.de>
613 * util/grub.d/30_os-prober.in: Remove unused CHAINROOT. Don't
614 add drivemap for Vista. It breaks Windows 7.
616 2009-07-21 Vladimir Serbinenko <phcoder@gmail.com>
618 * fs/ufs.c (grub_ufs_sblock): Fix offset of mtime2 which was off by
621 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
625 * conf/common.rmk (grub_probe_SOURCES): Add fs/befs.c.
626 (grub_fstest_SOURCES): Likewise.
627 (pkglib_MODULES): Add befs.mod.
628 (befs_mod_SOURCES): New variable.
629 (befs_mod_CFLAGS): Likewise.
630 (befs_mod_LDFLAGS): Likewise.
631 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
632 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
633 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
634 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
635 (grub_setup_SOURCES): Likewise.
636 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
637 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
638 (grub_setup_SOURCES): Likewise.
639 * fs/befs.c: New file.
640 * fs/afs.c (GRUB_AFS_FSNAME): New declaration.
641 (GRUB_AFS_SBLOCK_SECTOR): Likewise.
642 (GRUB_AFS_SBLOCK_MAGIC1) [MODE_BFS]: New conditional declaration.
643 (GRUB_AFS_BTREE_MAGIC) [MODE_BFS]: Likewise
644 (B_KEY_INDEX_ALIGN): New declaration.
645 (B_KEY_INDEX_OFFSET): Use B_KEY_INDEX_ALIGN.
646 (grub_afs_bnode) [MODE_BFS]: Make key_count and key_size 16-bit
647 (grub_afs_btree) [MODE_BFS]: New conditional declaration.
648 (grub_afs_sblock) [MODE_BFS]: Remove link_count.
649 (grub_afs_validate_sblock) [MODE_BFS]: Support BFS
650 (grub_afs_mount) [MODE_BFS]: Likewise.
651 (grub_afs_dir) [MODE_BFS]: Divide mtime by 65536 and not 1000000.
652 (grub_afs_fs): Use GRUB_AFS_FSNAME
653 (GRUB_MOD_INIT (afs)) [MODE_BFS]: Rename to ...
654 (GRUB_MOD_INIT (befs)) [MODE_BFS]: ... this
655 (GRUB_MOD_FINI (afs)) [MODE_BFS]: Rename to ...
656 (GRUB_MOD_FINI (befs)) [MODE_BFS]: ... this
658 2009-07-19 Yves BLUSSEAU <yves.grub-devel@zetam.org>
660 * util/getroot.c (find_root_device): Add support for MacOSX.
661 * util/hostdisk.c: Likewise.
663 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
665 * font/font.c (find_glyph): Check whether a font is present to avoid
668 2009-07-20 Joe Auricchio <jauricchio@gmail.com>
670 * term/gfxterm.c (grub_virtual_screen_setup): Clear virtual_screen.
672 2009-07-20 Pavel Roskin <proski@gnu.org>
674 * configure.ac: Trim excessively wordy excuses.
676 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
678 Add symlink, mtime and label support to AtheFS.
680 * fs/afs.c (grub_afs_sblock): Declare `name' as char.
681 (grub_afs_iterate_dir): Handle symlinks.
682 (grub_afs_open): Use grub_afs_read_symlink.
683 (grub_afs_dir): Likewise.
685 (grub_afs_label): New function.
686 (grub_afs_fs): Add grub_afs_label.
687 (grub_afs_read_symlink): New function.
689 2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
693 * fs/afs.c: Fix comments style.
694 (grub_afs_blockrun): Declare as packed.
695 (grub_afs_datastream): Likewise.
696 (grub_afs_bnode): Likewise.
697 (grub_afs_btree): Likewise.
698 (grub_afs_sblock): Likewise.
699 Declare `name' as char.
700 (grub_afs_inode): Declare as packed.
701 Change void *vnode to grub_uint32_t unused.
702 (grub_afs_iterate_dir): Check that key_size is positive.
703 (grub_afs_mount): Don't read superblock twice.
704 (grub_afs_dir): Don't free node in case of error,
705 grub_fshelp_find_file already handles this.
706 (grub_afs_open): Likewise.
708 2009-07-19 Pavel Roskin <proski@gnu.org>
710 * Makefile.in: Remove LIBLZO and enable_lzo.
711 * conf/i386-pc.rmk: Remove lzo support.
712 * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
713 * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA. Remove lzo
715 * kern/i386/pc/lzo1x.S: Remove.
716 * kern/i386/pc/startup.S: Remove lzo support.
717 * util/i386/pc/grub-mkimage.c: Likewise.
719 2009-07-19 Vladimir Serbinenko <phcoder@gmail.com>
721 * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
722 * fs/xfs.c (grub_xfs_dir): Likewise.
723 * fs/afs.c (grub_afs_dir): Likewise.
724 * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
725 (grub_iso9660_open): Likewise.
726 * fs/jfs.c (grub_jfs_open): Likewise.
727 * fs/ext2.c (grub_ext2_dir): Likewise.
728 * include/grub/macho.h (grub_macho_fat_arch): Likewise.
729 * script/sh/lexer.c (grub_script_yylex): Likewise.
731 2009-07-16 Pavel Roskin <proski@gnu.org>
733 * configure.ac: Never add "-c" to CFLAGS.
735 * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
737 * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
738 grub_cv_cc_efiemu should be used.
740 * configure.ac: Typo fixes.
742 * kern/mm.c (grub_zalloc): New function.
743 (grub_debug_zalloc): Likewise.
744 * include/grub/mm.h: Declare grub_zalloc() and
746 * util/misc.c (grub_zalloc): New function.
747 * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
748 instead of grub_malloc(), remove unneeded initializations.
749 * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
750 * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
751 * commands/parttool.c (grub_cmd_parttool): Likewise.
752 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
753 * disk/raid5_recover.c (grub_raid5_recover): Likewise.
754 * disk/raid6_recover.c (grub_raid6_recover): Likewise.
755 * disk/usbms.c (grub_usbms_finddevs): Likewise.
756 * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
757 * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
758 (grub_cmd_efiemu_pnvram): Likewise.
759 * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
760 * fs/iso9660.c (grub_iso9660_mount): Likewise.
761 (grub_iso9660_iterate_dir): Likewise.
762 * fs/jfs.c (grub_jfs_opendir): Likewise.
763 * fs/ntfs.c (list_file): Likewise.
764 (grub_ntfs_mount): Likewise.
765 * kern/disk.c (grub_disk_open): Likewise.
766 * kern/dl.c (grub_dl_load_core): Likewise.
767 * kern/elf.c (grub_elf_file): Likewise.
768 * kern/env.c (grub_env_context_open): Likewise.
769 (grub_env_set): Likewise.
770 (grub_env_set_data_slot): Likewise.
771 * kern/file.c (grub_file_open): Likewise.
772 * kern/fs.c (grub_fs_blocklist_open): Likewise.
773 * loader/i386/multiboot.c (grub_module): Likewise.
774 * loader/xnu.c (grub_xnu_create_key): Likewise.
775 (grub_xnu_create_value): Likewise.
776 * normal/main.c (grub_normal_add_menu_entry): Likewise.
777 (read_config_file): Likewise.
778 * normal/menu_entry.c (make_screen): Likewise.
779 * partmap/sun.c (sun_partition_map_iterate): Likewise.
780 * script/sh/lexer.c (grub_script_lexer_init): Likewise.
781 * script/sh/script.c (grub_script_parse): Likewise.
782 * video/bitmap.c (grub_video_bitmap_create): Likewise.
783 * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
784 * video/readers/png.c (grub_png_output_byte): Likewise.
785 (grub_video_reader_png): Likewise.
787 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
789 Enable all targets that can be built by default
791 * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
792 grub-mkfont and grub-fstest if they can be built
794 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
796 Fix hang and segmentation fault in grub-emu-usb
798 * disk/scsi.c (grub_scsi_open): return err and not grub_errno
799 * util/usb.c (grub_libusb_devices): likewise
800 (grub_libusb_init): rename to ...
801 (GRUB_MOD_INIT (libusb)):...this
802 (grub_libusb_fini): rename to ..
803 (GRUB_MOD_FINI (libusb)):...this
804 * disk/usbms.c (grub_usbms_transfer): fix retry logic
805 * include/grub/disk.h (grub_raid_init): removed, it's useless
806 (grub_raid_fini): likewise
807 (grub_lvm_init): likewise
808 (grub_lvm_fini): likewise
809 * util/grub-emu.c (main): don't call grub_libusb_init, it's done
812 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
816 * Makefile.in (LIBUSB): new macro
817 * genmk.rb (Utility/print_tail): new method
818 (Utility/rule): use intermediary variable #{prefix}_OBJECTS
819 (top level): call util.print_tail at the end.
821 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
823 Make FreeBSD accept zpool.cache
825 * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
826 type is /boot/zfs/zpool.cache
828 2009-07-16 Vladimir Serbinenko <phcoder@gmail.com>
832 * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
833 correct wrong typedef
834 * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
836 2009-07-15 Pavel Roskin <proski@gnu.org>
838 * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
839 * kern/disk.c (struct grub_disk_cache): Likewise.
841 * commands/probe.c (options): Typo fix.
843 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
844 Increase to 0x5a to accommodate FAT32. Adjust other offsets
846 Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
848 * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
849 the end of "Error" to make the message more readable.
851 * boot/i386/pc/boot.S (kernel_segment): Remove.
852 (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
855 * boot/i386/pc/boot.S (boot_version): Remove.
856 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
859 * include/grub/i386/pc/boot.h: Sort all offsets.
860 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
861 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
862 * boot/i386/pc/boot.S: Assert location of every offset listed in
863 include/grub/i386/pc/boot.h.
865 2009-07-13 Pavel Roskin <proski@gnu.org>
867 * include/grub/i386/coreboot/machine.h: Rename
868 GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
869 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
870 multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
872 * kern/dl.c: Force native word size to suppress warnings when
875 * kern/device.c (grub_device_iterate): Change struct part_ent to
876 hold the name, not a pointer to it. Use one grub_malloc() per
877 partition, not two. Free partition_name if grub_malloc() fails.
878 Set ents to NULL only before grub_partition_iterate() is called.
880 2009-07-11 Bean <bean123ch@gmail.com>
882 * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
885 2009-07-10 Bean <bean123ch@gmail.com>
886 2009-07-10 Robert Millan <rmh.grub@aybabtu.com>
888 * kern/ieee1275/openfw.c (grub_children_iterate)
889 (grub_devalias_iterate): Fix size evaluation for property or path
890 strings, which was broken since r2132.
892 2009-07-07 Pavel Roskin <proski@gnu.org>
894 * commands/search.c (search_file): Merge into ...
895 (search_fs): ... this. Accept search type as argument.
896 (grub_cmd_search): Pass search type to search_fs().
898 * include/grub/util/console.h: New file.
899 * util/console.c: Use it instead of grub/machine/console.h.
900 * util/grub-emu.c: Likewise.
902 * lib/arg.c (find_long_option): Remove.
903 (find_long): Add `len' argument, make `s' const char *.
904 (grub_arg_parse): Parse long options in place, not in a
907 2009-07-06 Pavel Roskin <proski@gnu.org>
909 * commands/search.c (search_fs): Fix potential NULL pointer
912 * commands/search.c (search_fs): Replace QUID macro with quid_fn
915 2009-07-06 Daniel Mierswa <impulze@impulze.org>
917 * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
920 2009-07-05 Pavel Roskin <proski@gnu.org>
922 * include/grub/i386/linux.h (struct linux_kernel_params):
923 Restore padding3, it's still needed.
925 * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
927 * util/osdetect.lua: Likewise.
929 2009-07-05 Bean <bean123ch@gmail.com>
931 * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
933 * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
934 (grub_lua_getenv): Likewise.
935 (grub_lua_setenv): Likewise.
936 (save_errno): New function.
937 (push_result): Likewise.
938 (grub_lua_enum_device): Likewise.
939 (grub_lua_enum_file): Likewise.
940 (grub_lua_file_open): Likewise.
941 (grub_lua_file_close): Likewise.
942 (grub_lua_file_seek): Likewise.
943 (grub_lua_file_read): Likewise.
944 (grub_lua_file_getline): Likewise.
945 (grub_lua_file_getsize): Likewise.
946 (grub_lua_file_getpos): Likewise.
947 (grub_lua_file_eof): Likewise.
948 (grub_lua_file_exist): Likewise.
949 (grub_lua_add_menu): Likewise.
951 * script/lua/grub_lua.h (isupper): New inline function.
954 (isxdigit): Likewise.
955 (strcspn): Change to normal function.
956 (strpbkr): New function declaration.
959 * script/lua/grub_main.c (scan_str): New function.
964 * script/lua/linit.c (lualibs): Enable the string library.
966 * util/osdetect.lua: New file.
968 2009-07-04 Robert Millan <rmh.grub@aybabtu.com>
970 * include/grub/i386/linux.h (struct linux_kernel_params): Add
971 `capabilities' member.
973 2009-07-02 Pavel Roskin <proski@gnu.org>
975 * genparttoollist.sh: Add missing newline at the end.
977 2009-07-01 Pavel Roskin <proski@gnu.org>
979 * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
981 * util/hostdisk.c (open_device): Remove `const' from
982 `sysctl_size', as sysctlbyname() can change it (in this case it
983 doesn't actually happen).
985 * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
986 using signed long int constants.
988 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
989 constant to avoid a warning on FreeBSD.
991 * util/hostdisk.c (device_is_wholedisk): Compile only on systems
994 * Makefile.in: Install include/grub/machine symlink.
996 * Makefile.in: When installing symlinks, use "cp -fR", which
997 works on FreeBSD and MacOSX.
998 From Yves Blusseau <cl7m42e02@sneakemail.com>
1000 * kern/dl.c (grub_dl_resolve_symbol): Make static.
1001 * include/grub/dl.h: Remove grub_dl_resolve_symbol().
1003 * util/misc.c: Move grub_reboot() and grub_halt() ...
1004 * util/grub-emu.c: ... here. Make main_env static.
1005 * include/grub/util/misc.h: Remove main_env.
1007 * kern/mm.c: Use correct format to print size_t.
1009 * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
1010 * kern/i386/dl.c: Use ELF symbols without "32" or "64".
1011 * kern/powerpc/dl.c: Likewise.
1012 * kern/sparc64/dl.c: Likewise.
1013 * kern/x86_64/dl.c: Likewise.
1015 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
1017 Fix grub-emu build on sparc64-ieee1275.
1019 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Synchronize with ...
1020 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
1022 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
1024 * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
1025 (grub_reboot, grub_halt): New functions.
1027 * util/i386/pc/misc.c: Delete. Update all users.
1028 * util/sparc64/ieee1275/misc.c: Likewise.
1029 * util/powerpc/ieee1275/misc.c: Likewise.
1031 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
1033 * conf/i386.rmk (setjmp_mod_SOURCES)
1034 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
1035 * conf/common.rmk (setjmp_mod_SOURCES)
1036 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
1037 to use $(target_cpu).
1038 * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
1039 (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
1040 * conf/powerpc-ieee1275.rmk: Likewise.
1041 * conf/sparc64-ieee1275.rmk: Likewise.
1043 * conf/i386-pc.rmk (kernel_img_SOURCES): Use
1044 $(target_cpu) for kern/$(target_cpu)/dl.c.
1045 * conf/i386-efi.rmk: Likewise.
1046 * conf/i386-ieee1275.rmk: Likewise.
1047 * conf/x86_64-efi.rmk: Likewise.
1048 * conf/i386-coreboot.rmk: Likewise.
1049 * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
1050 $(target_cpu) for kern/$(target_cpu)/dl.c and for
1051 kern/$(target_cpu)/cache.S.
1052 * conf/sparc64-ieee1275.rmk: Likewise.
1054 2009-07-01 Robert Millan <rmh.grub@aybabtu.com>
1056 * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
1057 type to `grub_uint8_t', and adjust `padding9' accordingly.
1059 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
1061 * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
1063 * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
1064 assembly in final jump, using register constraints.
1066 (grub_linux_boot): For text mode, initialize `have_vga' using
1067 GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
1069 Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
1070 right before the final jump.
1072 Set `video_mode' to 0x3.
1074 Document initialization of `video_page', `video_mode' and
1077 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
1079 * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
1080 * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
1081 and set GRUB_LINUX_FLAG_QUIET appropriately.
1083 2009-06-29 Robert Millan <rmh.grub@aybabtu.com>
1085 Fix build on Debian / sparc.
1087 * configure.ac: Recognize `sparc' target_cpu (as sparc64).
1089 2009-06-28 Pavel Roskin <proski@gnu.org>
1091 * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
1094 * util/grub.d/10_linux.in: Match SUSE style initrd names.
1096 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
1098 * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
1101 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
1105 * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
1106 file can't be opened. grub_file_open() is already supposed to set
1107 grub_errno / grub_errmsg appropriately.
1108 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1110 2009-06-27 Pavel Roskin <proski@gnu.org>
1111 2009-06-27 Robert Millan <rmh.grub@aybabtu.com>
1113 * include/grub/dl.h: Include grub/elf.h.
1114 (struct grub_dl): Add symtab field.
1115 * kern/dl.c [GRUB_MACHINE_QEMU]: Define
1116 GRUB_MODULES_MACHINE_READONLY.
1117 (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
1118 of the header for read-only modules.
1119 (grub_dl_unload): Free mod->symtab for read-only modules.
1120 * kern/i386/dl.c: Use mod->symtab.
1121 * kern/powerpc/dl.c: Likewise.
1122 * kern/sparc64/dl.c: Likewise.
1123 * kern/x86_64/dl.c: Likewise.
1125 * conf/i386-qemu.rmk: New file.
1126 * kern/i386/qemu/startup.S: Likewise.
1127 * kern/i386/qemu/mmap.c: Likewise.
1128 * boot/i386/qemu/boot.S: Likewise.
1129 * include/grub/i386/qemu/time.h: Likewise.
1130 * include/grub/i386/qemu/serial.h: Likewise.
1131 * include/grub/i386/qemu/kernel.h: Likewise.
1132 * include/grub/i386/qemu/console.h: Likewise.
1133 * include/grub/i386/qemu/boot.h: Likewise.
1134 * include/grub/i386/qemu/init.h: Likewise.
1135 * include/grub/i386/qemu/machine.h: Likewise.
1136 * include/grub/i386/qemu/loader.h: Likewise.
1137 * include/grub/i386/qemu/memory.h: Likewise.
1139 * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
1140 (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
1141 [qemu] (pkglib_IMAGES): Add `boot.img'.
1142 [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
1143 [qemu] (boot_img_FORMAT): New variables.
1144 [qemu] (bin_UTILITIES): Add `grub-mkimage'.
1145 [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
1146 [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
1147 [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
1148 [qemu] (kernel_img_FORMAT): New variables.
1150 * configure.ac: Recognise `i386-qemu'.
1152 * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
1153 (for no compression).
1154 [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
1155 a valid i386 ROM image. Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
1156 `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
1157 `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
1160 2009-06-27 Pavel Roskin <proski@gnu.org>
1162 * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
1164 * efiemu/prepare32.c: Likewise.
1165 * efiemu/prepare64.c: Likewise.
1167 2009-06-26 Pavel Roskin <proski@gnu.org>
1169 * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
1170 * include/grub/elf.h: Define symbols without "32" or "64" based
1171 on GRUB_TARGET_WORDSIZE.
1172 * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
1173 * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
1175 * efiemu/loadcore64.c: Likewise.
1176 * loader/i386/bsd32.c: Likewise.
1177 * loader/i386/bsd64.c: Likewise.
1178 * kern/dl.c: Remove own ELF definitions.
1179 * util/i386/efi/grub-mkimage.c: Likewise.
1181 2009-06-23 Robert Millan <rmh.grub@aybabtu.com>
1183 * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
1184 segment 0x0 unconditionally, because the reference generated by
1185 GAS is an absolute address.
1187 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
1189 * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
1190 [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
1192 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
1194 * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
1195 indexes. Check for -f explicitly.
1196 (search_file): Improve error message.
1197 (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
1199 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
1201 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
1202 (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users.
1204 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
1206 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
1207 * conf/i386-ieee1275.rmk: Likewise.
1208 * conf/i386-coreboot.rmk: Likewise.
1210 * kern/i386/pc/startup.S (grub_stop): Remove function.
1211 * kern/i386/ieee1275/startup.S: Likewise.
1212 * kern/i386/coreboot/startup.S: Likewise.
1213 * kern/i386/misc.S (grub_stop): New function.
1215 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
1217 * kern/i386/pc/startup.S (real_to_prot): Move from here ...
1218 * kern/i386/realmode.S (real_to_prot): ... to here.
1220 2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
1222 * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
1224 (kernel_elf_SOURCES): Rename to ...
1225 (kernel_img_SOURCES): ... this.
1226 (kernel_elf_HEADERS): Rename to ...
1227 (kernel_img_HEADERS): ... this. Update all users.
1228 (kernel_elf_ASFLAGS): Rename to ...
1229 (kernel_img_ASFLAGS): ... this.
1230 (kernel_elf_CFLAGS): Rename to ...
1231 (kernel_img_CFLAGS): ... this.
1232 (kernel_elf_LDFLAGS): Rename to ...
1233 (kernel_img_LDFLAGS): ... this.
1234 * conf/i386-coreboot.rmk: Likewise.
1235 * conf/powerpc-ieee1275.rmk: Likewise.
1237 * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
1240 2009-06-21 Pavel Roskin <proski@gnu.org>
1242 * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
1243 to match nested functions.
1244 * loader/sparc64/ieee1275/linux.c: Likewise.
1246 * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
1248 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
1250 * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
1253 2009-06-21 Robert Millan <rmh.grub@aybabtu.com>
1255 Fix asm file handling on ELF, and remove workarounds.
1257 * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
1258 and -DASM_FILE=1 appropriately (copied from `class Images' stanza).
1259 * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
1260 * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
1262 2009-06-21 Vladimir Serbinenko <phcoder@gmail.com>
1264 Load BSD ELF modules
1266 * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
1267 and loader/i386/bsd64.c
1268 * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
1269 (FREEBSD_MODTYPE_ELF_MODULE): New definition
1270 (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
1271 (grub_freebsd_load_elfmodule32): New declaration
1272 (grub_freebsd_load_elfmoduleobj64): Likewise
1273 (grub_freebsd_load_elf_meta32): Likewise
1274 (grub_freebsd_load_elf_meta64): Likewise
1275 (grub_freebsd_add_meta): Likewise
1276 (grub_freebsd_add_meta_module): Likewise
1277 * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
1278 (grub_freebsd_add_meta_module): Likewise and move module-specific
1279 parts to grub_cmd_freebsd and grub_cmd_freebsd_module
1280 (grub_cmd_freebsd): Add elf-kernel specific parts
1281 based on grub_freebsd_add_meta_module
1282 (grub_cmd_freebsd_module): Add type parsing moved from
1283 grub_freebsd_add_meta_module
1284 (grub_cmd_freebsd_module_elf): New function
1285 (cmd_freebsd_module_elf): New variable
1286 (GRUB_MOD_INIT): Register freebsd_module_elf
1287 * loader/i386/bsd32.c: New file
1288 * loader/i386/bsd64.c: Likewise
1289 * loader/i386/bsdXX.c: Likewise
1290 * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
1291 (grub_elf64_load): Likewise
1292 * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
1294 (grub_elf64_load_hook_t): Likewise
1296 2009-06-21 Colin Watson <cjwatson@ubuntu.com>
1298 * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
1300 * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
1301 don't write a menu entry for recovery mode.
1303 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
1305 * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
1306 after it's no longer needed.
1308 2009-06-20 Robert Millan <rmh.grub@aybabtu.com>
1310 * include/grub/i386/loader.h (grub_linux_prot_size)
1311 (grub_linux_tmp_addr, grub_linux_real_addr)
1312 (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
1313 GRUB_MACHINE_PCBIOS.
1314 * util/i386/pc/grub-mkimage.c (compress_kernel): Move
1315 common grub_util_info() call to ...
1316 (generate_image): ... here.
1317 Fix use of uninitialized memory, comparison of signed with
1318 unsigned integers and memory leak.
1319 Remove bogus module address message.
1321 2009-06-20 Vladimir Serbinenko <phcoder@gmail.com>
1323 * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
1325 * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
1327 2009-06-19 Pavel Roskin <proski@gnu.org>
1329 * configure.ac: Remove stray AC_MSG_CHECKING.
1331 2009-06-19 Vladimir Serbinenko <phcoder@gmail.com>
1333 * disk/scsi.c (grub_scsi_open): use continue instead of big if
1335 2009-06-18 Pavel Roskin <proski@gnu.org>
1337 * conf/common.rmk: Add fs_file.mod.
1338 * disk/fs_file.c: New file.
1339 * include/grub/disk.h (enum grub_disk_dev_id): Add
1340 GRUB_DISK_DEVICE_FILE_ID.
1342 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
1344 Fix build with Apple's toolchain. Part 2
1346 * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
1349 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
1351 Fix build with Apple's toolchain. Part 1
1353 * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
1355 * configure.ac: remove a leftover AC_MSG_RESULT
1356 (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
1359 2009-06-18 Vladimir Serbinenko <phcoder@gmail.com>
1363 * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
1364 (decomp_block): initialize ch
1365 use grub_memcpy instead of memcpy
1367 2009-06-17 Pavel Roskin <proski@gnu.org>
1369 * include/grub/i386/coreboot/console.h: Don't use the i386-pc
1370 version, use declarations needed to use vga_text as the startup
1373 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
1374 term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
1376 * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
1377 and grub_at_keyboard_fini(), it's done on module load and
1380 2009-06-17 Felix Zielcke <fzielcke@z-51.de>
1382 * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
1383 file can't be found.
1384 * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
1386 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
1388 Fix newline handling
1390 * include/grub/script_sh.h (grub_lexer_param): new field was_newline
1391 * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
1392 (grub_script_yylex): don't segfault on unterminated script
1393 newline terminates command and variable
1395 2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
1397 avoid double grub_adjust_range call. Bug reported by David Simner
1399 * kern/disk.c (grub_disk_write): change to raw disk access before
1402 2009-06-17 Colin Watson <cjwatson@ubuntu.com>
1404 * util/elf/grub-mkimage.c (usage): Prefix each option line with two
1405 spaces, for the benefit of help2man.
1406 * util/i386/efi/grub-mkimage.c (usage): Likewise.
1408 2009-06-16 Pavel Roskin <proski@gnu.org>
1410 * kern/i386/halt.c: Include grub/machine/init.h.
1411 * kern/i386/reboot.c: Include grub/cpu/reboot.h.
1413 2009-06-16 Felix Zielcke <fzielcke@z-51.de>
1415 * util/grub.d/30_os-prober.in: Use ${root} in the generated
1418 2009-06-16 James Jarvis <James.Jarvis@ed.ac.uk>
1420 * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
1423 2009-06-16 Pavel Roskin <proski@gnu.org>
1425 * boot/i386/pc/boot.S: Remove root_drive. Assert offset of
1426 boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK. Don't
1427 save %dx, we only need %dl and we never change it.
1428 * boot/i386/pc/cdboot.S: Don't set the root drive.
1429 * boot/i386/pc/pxeboot.S: Likewise.
1430 * include/grub/i386/pc/boot.h: Remove
1431 GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
1432 GRUB_BOOT_MACHINE_DRIVE_CHECK.
1433 * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
1434 * kern/i386/pc/init.c (make_install_device): Remove references
1436 * kern/i386/pc/startup.S: Likewise.
1437 * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
1439 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
1443 * commands/xnu_uuid.c: new file
1444 * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
1445 (xnu_uuid_mod_SOURCES): new variable
1446 (xnu_uuid_mod_CFLAGS): likewise
1447 (xnu_uuid_mod_LDFLAGS): likewise
1448 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
1449 * conf/i386-ieee1275.rmk: likewise
1450 * conf/i386-pc.rmk: likewise
1451 * conf/powerpc-ieee1275.rmk: likewise
1452 * conf/sparc64-ieee1275.rmk: likewise
1453 * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
1455 2009-06-16 Pavel Roskin <proski@gnu.org>
1457 * configure.ac: Avoid '==' in test command, it's not portable.
1459 2009-06-16 Vladimir Serbinenko <phcoder@gmail.com>
1463 * commands/probe.c: new file
1464 * conf/common.rmk (pkglib_MODULES): add probe.mod
1465 (probe_mod_SOURCES): new variable
1466 (probe_mod_CFLAGS): likewise
1467 (probe_mod_LDFLAGS): likewise
1468 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
1469 * conf/i386-ieee1275.rmk: likewise
1470 * conf/i386-pc.rmk: likewise
1471 * conf/powerpc-ieee1275.rmk: likewise
1472 * conf/sparc64-ieee1275.rmk: likewise
1474 2009-06-15 Vladimir Serbinenko <phcoder@gmail.com>
1476 Fix handling of string like \"hello\" and "a
1479 * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
1480 (grub_script_yylex): fix parsing of quoting, escaping and newline
1482 2009-06-13 Vladimir Serbinenko <phcoder@gmail.com>
1484 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
1487 2009-06-13 Jun Inoue <jun.lambda@gmail.com>
1489 * util/grub-mkconfig.in: Fix parsing of --output option.
1491 2009-06-12 Pavel Roskin <proski@gnu.org>
1493 * Makefile.in (pkgdata_SRCDIR): Remove. genmodsrc.sh and
1494 genmk.rb don't need to be generated or installed.
1496 2009-06-12 Vladimir Serbinenko <phcoder@gmail.com>
1498 * commands/i386/pc/drivemap_int13h.S: add more comments
1500 2009-06-11 Pavel Roskin <proski@gnu.org>
1502 * Makefile.in (uninstall): Uninstall manuals.
1504 * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
1505 PKGLIB to SCRIPTS. This fixes installation of grub-mkconfig_lib
1506 and update-grub_lib in two places.
1507 * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
1509 * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
1512 * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
1513 `entry_lo' to fix variable shadowing.
1515 2009-06-11 Christian Franke <franke@computer.org>
1517 * kern/misc.c (__enable_execute_stack): Add missing return type
1518 to prevent gcc warning.
1520 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
1522 * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
1524 2009-06-11 Pavel Roskin <proski@gnu.org>
1526 * Makefile.in: Don't rely on any scripts being executable.
1527 Always use $(SHELL) to run shell scripts.
1529 * configure.ac: Always define ___main if using -nostdlib. This
1530 fixes tests on Cygwin.
1532 2009-06-11 Giuseppe Caizzone <acaizzo@gmail.com>
1536 * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
1537 is in bytes and not in blocks
1539 2009-06-11 Pavel Roskin <proski@gnu.org>
1541 * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
1544 2009-06-11 Felix Zielcke <fzielcke@z-51.de>
1546 * util/grub.d/30_os-prober.in: Fix a comment. Source
1547 ${libdir}/grub/grub-mkconfig_lib. Use prepare_grub_to_access_device
1548 to set the root device. Place drivemap command in the generated
1551 2009-06-11 Pavel Roskin <proski@gnu.org>
1553 * configure.ac: Remove host_m32. Issues with 64-bit utilities
1554 have long been resolved.
1556 2009-06-11 Colin Watson <cjwatson@ubuntu.com>
1558 * util/grub.d/10_linux.in: Capitalise "Linux".
1560 * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
1562 2009-06-11 Pavel Roskin <proski@gnu.org>
1564 * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
1565 fix a gcc warning and ensure that the function won't ever exit.
1567 * kern/i386/ieee1275/init.c: Add missing prototype for
1570 * loader/ieee1275/multiboot2.c [__i386__]: Include
1571 grub/cpu/multiboot.h.
1573 * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
1574 casts to short - they are not portable and cause warnings. Fix
1575 use of uninitialized values in input_buf. Use ARRAY_SIZE.
1577 2009-06-11 Vladimir Serbinenko <phcoder@gmail.com>
1581 * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
1583 (grub_get_root_biosnumber_saved): new variable
1584 (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
1585 (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
1586 * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
1587 %dx after the call if necessary
1588 * conf/common.rmk (pkglib_MODULES): remove boot.mod
1589 (boot_mod_SOURCES): remove
1590 (boot_mod_CFLAGS): remove
1591 (boot_mod_LDFLAGS): remove
1592 * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
1593 (boot_mod_SOURCES): new variable
1594 (boot_mod_CFLAGS): likewise
1595 (boot_mod_LDFLAGS): likewise
1596 * conf/i386-efi.rmk: likewise
1597 * conf/i386-ieee1275.rmk: likewise
1598 * conf/i386-pc.rmk: likewise
1599 * conf/powerpc-ieee1275.rmk: likewise
1600 * conf/sparc64-ieee1275.rmk: likewise
1601 * conf/x86_64-efi.rmk: likewise
1602 * include/grub/i386/pc/biosnum.h: new file
1603 * lib/i386/pc/biosnum.c: likewise
1604 * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
1605 * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
1606 * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
1608 2009-06-10 Pavel Roskin <proski@gnu.org>
1610 * io/gzio.c (test_header): Don't reuse one buffer for all data.
1611 Use separate variables. Read only the file size at the end, but
1612 not the checksum that we don't use.
1614 * kern/file.c (grub_file_read): Use void pointer for the buffer.
1617 * kern/ieee1275/openfw.c: Remove libc includes.
1618 * kern/ieee1275/cmain.c: Likewise.
1619 * include/grub/ieee1275/ieee1275.h: Likewise.
1621 * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
1624 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
1626 * Makefile.in: Remove all trailing whitespace.
1627 * conf/i386-pc.rmk: Likewise.
1628 * conf/powerpc-ieee1275.rmk: Likewise.
1629 * conf/sparc64-ieee1275.rmk: Likewise.
1630 * docs/grub.texi: Likewise.
1631 * docs/texinfo.tex: Likewise.
1632 * disk/fs_uuid.c: Likewise.
1633 * disk/lvm.c: Likewise.
1634 * disk/scsi.c: Likewise.
1635 * disk/ata.c: Likewise.
1636 * disk/ieee1275/ofdisk.c: Likewise.
1637 * disk/i386/pc/biosdisk.c: Likewise.
1638 * disk/host.c: Likewise.
1639 * disk/raid.c: Likewise.
1640 * disk/efi/efidisk.c: Likewise.
1641 * disk/usbms.c: Likewise.
1642 * disk/memdisk.c: Likewise.
1643 * disk/loopback.c: Likewise.
1644 * kern/powerpc/dl.c: Likewise.
1645 * kern/device.c: Likewise.
1646 * kern/dl.c: Likewise.
1647 * kern/sparc64/dl.c: Likewise.
1648 * kern/ieee1275/ieee1275.c: Likewise.
1649 * kern/term.c: Likewise.
1650 * kern/fs.c: Likewise.
1651 * kern/i386/dl.c: Likewise.
1652 * kern/i386/pc/startup.S: Likewise.
1653 * kern/i386/pc/init.c: Likewise.
1654 * kern/i386/pc/mmap.c: Likewise.
1655 * kern/i386/pc/lzo1x.S: Likewise.
1656 * kern/i386/ieee1275/init.c: Likewise.
1657 * kern/i386/realmode.S: Likewise.
1658 * kern/i386/tsc.c: Likewise.
1659 * kern/partition.c: Likewise.
1660 * kern/corecmd.c: Likewise.
1661 * kern/file.c: Likewise.
1662 * kern/efi/efi.c: Likewise.
1663 * kern/efi/init.c: Likewise.
1664 * kern/efi/mm.c: Likewise.
1665 * kern/main.c: Likewise.
1666 * kern/err.c: Likewise.
1667 * kern/env.c: Likewise.
1668 * kern/disk.c: Likewise.
1669 * kern/generic/millisleep.c: Likewise.
1670 * kern/generic/rtc_get_time_ms.c: Likewise.
1671 * kern/misc.c: Likewise.
1672 * kern/parser.c: Likewise.
1673 * genmk.rb: Likewise.
1674 * configure.ac: Likewise.
1675 * boot/i386/pc/diskboot.S: Likewise.
1676 * boot/i386/pc/pxeboot.S: Likewise.
1677 * boot/i386/pc/boot.S: Likewise.
1678 * boot/i386/pc/lnxboot.S: Likewise.
1679 * boot/i386/pc/cdboot.S: Likewise.
1680 * parttool/pcpart.c: Likewise.
1681 * video/readers/tga.c: Likewise.
1682 * video/video.c: Likewise.
1683 * video/bitmap.c: Likewise.
1684 * lib/envblk.c: Likewise.
1685 * lib/i386/setjmp.S: Likewise.
1686 * fs/xfs.c: Likewise.
1687 * fs/afs.c: Likewise.
1688 * fs/fat.c: Likewise.
1689 * fs/ntfs.c: Likewise.
1690 * fs/udf.c: Likewise.
1691 * fs/affs.c: Likewise.
1692 * fs/iso9660.c: Likewise.
1693 * fs/hfs.c: Likewise.
1694 * fs/fshelp.c: Likewise.
1695 * fs/ext2.c: Likewise.
1696 * fs/jfs.c: Likewise.
1697 * fs/reiserfs.c: Likewise.
1698 * fs/hfsplus.c: Likewise.
1699 * fs/minix.c: Likewise.
1700 * fs/cpio.c: Likewise.
1701 * fs/sfs.c: Likewise.
1702 * fs/ufs.c: Likewise.
1703 * efiemu/prepare.c: Likewise.
1704 * efiemu/loadcore_common.c: Likewise.
1705 * efiemu/runtime/efiemu.sh: Likewise.
1706 * efiemu/runtime/efiemu.S: Likewise.
1707 * efiemu/runtime/efiemu.c: Likewise.
1708 * efiemu/pnvram.c: Likewise.
1709 * efiemu/main.c: Likewise.
1710 * efiemu/i386/pc/cfgtables.c: Likewise.
1711 * efiemu/i386/loadcore64.c: Likewise.
1712 * efiemu/i386/loadcore32.c: Likewise.
1713 * efiemu/loadcore.c: Likewise.
1714 * efiemu/symbols.c: Likewise.
1715 * efiemu/mm.c: Likewise.
1716 * include/grub/autoefi.h: Likewise.
1717 * include/grub/datetime.h: Likewise.
1718 * include/grub/term.h: Likewise.
1719 * include/grub/hfs.h: Likewise.
1720 * include/grub/lvm.h: Likewise.
1721 * include/grub/i386/tsc.h: Likewise.
1722 * include/grub/i386/linux.h: Likewise.
1723 * include/grub/i386/xnu.h: Likewise.
1724 * include/grub/i386/efiemu.h: Likewise.
1725 * include/grub/i386/pc/biosdisk.h: Likewise.
1726 * include/grub/i386/pc/memory.h: Likewise.
1727 * include/grub/i386/pc/vbe.h: Likewise.
1728 * include/grub/parttool.h: Likewise.
1729 * include/grub/video.h: Likewise.
1730 * include/grub/memory.h: Likewise.
1731 * include/grub/fs.h: Likewise.
1732 * include/grub/partition.h: Likewise.
1733 * include/grub/xnu.h: Likewise.
1734 * include/grub/efi/api.h: Likewise.
1735 * include/grub/efi/pe32.h: Likewise.
1736 * include/grub/efi/memory.h: Likewise.
1737 * include/grub/multiboot.h: Likewise.
1738 * include/grub/usbdesc.h: Likewise.
1739 * include/grub/multiboot2.h: Likewise.
1740 * include/grub/acpi.h: Likewise.
1741 * include/grub/efiemu/efiemu.h: Likewise.
1742 * include/grub/disk.h: Likewise.
1743 * include/grub/ieee1275/ieee1275.h: Likewise.
1744 * include/grub/net.h: Likewise.
1745 * include/grub/machoload.h: Likewise.
1746 * include/grub/macho.h: Likewise.
1747 * include/multiboot.h: Likewise.
1748 * genmoddep.awk: Likewise.
1749 * normal/main.c: Likewise.
1750 * normal/menu_entry.c: Likewise.
1751 * normal/menu_viewer.c: Likewise.
1752 * normal/completion.c: Likewise.
1753 * normal/cmdline.c: Likewise.
1754 * normal/misc.c: Likewise.
1755 * normal/datetime.c: Likewise.
1756 * bus/usb/usbtrans.c: Likewise.
1757 * bus/usb/ohci.c: Likewise.
1758 * bus/usb/uhci.c: Likewise.
1759 * bus/usb/usb.c: Likewise.
1760 * mmap/efi/mmap.c: Likewise.
1761 * mmap/i386/pc/mmap_helper.S: Likewise.
1762 * mmap/i386/pc/mmap.c: Likewise.
1763 * mmap/i386/mmap.c: Likewise.
1764 * mmap/i386/uppermem.c: Likewise.
1765 * mmap/mmap.c: Likewise.
1766 * commands/acpi.c: Likewise.
1767 * commands/echo.c: Likewise.
1768 * commands/blocklist.c: Likewise.
1769 * commands/loadenv.c: Likewise.
1770 * commands/usbtest.c: Likewise.
1771 * commands/boot.c: Likewise.
1772 * commands/parttool.c: Likewise.
1773 * commands/search.c: Likewise.
1774 * commands/cat.c: Likewise.
1775 * commands/i386/pc/play.c: Likewise.
1776 * commands/i386/pc/drivemap.c: Likewise.
1777 * commands/i386/pc/vbeinfo.c: Likewise.
1778 * commands/i386/pc/acpi.c: Likewise.
1779 * commands/i386/pc/vbetest.c: Likewise.
1780 * commands/ls.c: Likewise.
1781 * commands/cmp.c: Likewise.
1782 * commands/test.c: Likewise.
1783 * commands/efi/acpi.c: Likewise.
1784 * commands/gptsync.c: Likewise.
1785 * commands/help.c: Likewise.
1786 * partmap/amiga.c: Likewise.
1787 * partmap/apple.c: Likewise.
1788 * partmap/acorn.c: Likewise.
1789 * partmap/pc.c: Likewise.
1790 * partmap/sun.c: Likewise.
1791 * partmap/gpt.c: Likewise.
1792 * script/sh/lexer.c: Likewise.
1793 * script/sh/function.c: Likewise.
1794 * font/font.c: Likewise.
1795 * font/font_cmd.c: Likewise.
1796 * loader/powerpc/ieee1275/linux.c: Likewise.
1797 * loader/efi/chainloader.c: Likewise.
1798 * loader/multiboot_loader.c: Likewise.
1799 * loader/macho.c: Likewise.
1800 * loader/i386/multiboot.c: Likewise.
1801 * loader/i386/linux.c: Likewise.
1802 * loader/i386/pc/linux.c: Likewise.
1803 * loader/i386/pc/multiboot2.c: Likewise.
1804 * loader/i386/pc/chainloader.c: Likewise.
1805 * loader/i386/pc/xnu.c: Likewise.
1806 * loader/i386/bsd_trampoline.S: Likewise.
1807 * loader/i386/efi/linux.c: Likewise.
1808 * loader/i386/multiboot_elfxx.c: Likewise.
1809 * loader/i386/bsd_helper.S: Likewise.
1810 * loader/i386/bsd.c: Likewise.
1811 * loader/i386/linux_trampoline.S: Likewise.
1812 * loader/i386/xnu_helper.S: Likewise.
1813 * loader/i386/xnu.c: Likewise.
1814 * loader/i386/bsd_pagetable.c: Likewise.
1815 * loader/i386/multiboot_helper.S: Likewise.
1816 * loader/xnu.c: Likewise.
1817 * loader/xnu_resume.c: Likewise.
1818 * io/gzio.c: Likewise.
1819 * term/efi/console.c: Likewise.
1820 * term/terminfo.c: Likewise.
1821 * term/ieee1275/ofconsole.c: Likewise.
1822 * term/i386/pc/serial.c: Likewise.
1823 * term/i386/pc/vesafb.c: Likewise.
1824 * term/i386/pc/vga.c: Likewise.
1825 * term/usb_keyboard.c: Likewise.
1826 * term/gfxterm.c: Likewise.
1827 * aclocal.m4: Likewise.
1828 * util/lvm.c: Likewise.
1829 * util/grub.d/30_os-prober.in: Likewise.
1830 * util/grub.d/10_hurd.in: Likewise.
1831 * util/console.c: Likewise.
1832 * util/grub-macho2img.c: Likewise.
1833 * util/grub-probe.c: Likewise.
1834 * util/hostfs.c: Likewise.
1835 * util/i386/pc/grub-mkimage.c: Likewise.
1836 * util/i386/pc/grub-setup.c: Likewise.
1837 * util/i386/efi/grub-mkimage.c: Likewise.
1838 * util/grub-mkconfig.in: Likewise.
1839 * util/raid.c: Likewise.
1840 * util/resolve.c: Likewise.
1841 * util/grub-mkdevicemap.c: Likewise.
1842 * util/grub-emu.c: Likewise.
1843 * util/getroot.c: Likewise.
1844 * util/hostdisk.c: Likewise.
1845 * util/usb.c: Likewise.
1846 * util/grub-editenv.c: Likewise.
1847 * util/misc.c: Likewise.
1849 2009-06-10 Felix Zielcke <fzielcke@z-51.de>
1851 * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
1852 `genparttoollist.sh'.
1853 (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
1854 Add `*.sh' to the list find searches for and change `mdate.sh'
1857 2009-06-10 Pavel Roskin <proski@gnu.org>
1859 * include/grub/multiboot2.h: Provide compatibility defines for
1861 * include/multiboot2.h: Include stdint.h only if needed, using
1863 * loader/i386/pc/multiboot2.c: Include multiboot2.h after
1865 * loader/ieee1275/multiboot2.c: Likewise.
1866 * loader/multiboot2.c: Likewise.
1867 * loader/multiboot_loader.c: Likewise.
1869 * configure.ac: Use -nostdlib when probing for the target. It
1870 should not be required to have libc for the target.
1872 * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
1873 they fail without libc headers for the target.
1874 * include/grub/powerpc/libgcc.h: Use weak attribute for all
1876 * include/grub/sparc64/libgcc.h: Likewise. Don't use
1877 preprocessor conditionals.
1879 * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c. The
1880 build system doesn't need to be aware of the tar.c internals.
1882 2009-06-09 Michel Hermier <michel.hermier@gmail.com>
1884 * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
1886 2009-06-09 Robert Millan <rmh.grub@aybabtu.com>
1888 * util/deviceiter.c (grub_util_iterate_devices): Increase number of
1889 disk limit to 26 for IDE, Virtio, Xen and SCSI.
1891 2009-06-09 Felix Zielcke <fzielcke@z-51.de>
1893 * util/i386/pc/grub-install.in: Change the error message if UUIDs
1894 aren't available if ata.mod gets used.
1896 2009-06-09 Oliver Henshaw <oliver.henshaw@gmail.com>
1898 * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
1899 initialising controller.
1900 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1902 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1904 * util/i386/pc/grub-install.in: Add a parameter --disk-module
1905 to choose between ata and biosdisk module on i386-pc.
1907 2009-06-08 Oliver Henshaw <oliver.henshaw@gmail.com>
1909 * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
1910 Subclass and Programming Interface fields in terms of the 3 byte
1911 Class Code register.
1912 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1914 * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
1915 interface is OHCI. Add grub_dprintf for symmetry with
1917 * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
1918 interface is UHCI. Add interf variable for programming
1919 interface. Print interface with class/subclass.
1921 * bus/usb/ohci.c: Set interf with correct field.
1923 * bus/usb/uhci.c: Remove unneeded doubled lines.
1924 * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
1925 Remove whitespace inside comment.
1927 2009-06-08 Robert Millan <rmh.grub@aybabtu.com>
1929 * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
1930 as fallback an equivalent option without depth.
1932 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1934 Not fail if unable to retrieve C/H/S on LBA disks
1936 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
1937 if unable to retrieve C/H/S on LBA disks
1939 2009-06-08 Pavel Roskin <proski@gnu.org>
1941 * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
1944 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1946 * Makefile.in (uninstall): Remove all $lib_DATA files.
1948 2009-06-08 Vladimir Serbinenko <phcoder@gmail.com>
1950 Bugfix: install on partitionless device
1952 * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
1955 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1957 * Makefile.in (uninstall): Remove all $include_DATA files.
1959 2009-06-08 Felix Zielcke <fzielcke@z-51.de>
1961 * commands/true.c: New file. Implement the true and false commands.
1962 * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1963 (true_mod_SOURCES): New variable.
1964 (true_mod_CFLAGS): Likewise.
1965 (true_mod_LDFLAGS): Likewise.
1967 2009-06-05 Colin D Bennett <colin@gibibit.com>
1969 Optimized font character lookup using binary search instead of linear
1970 search. Fonts now are required to have the character index ordered by
1973 * font/font.c (load_font_index): Verify that fonts have ordered
1975 (find_glyph): Use binary search instead of linear search to find a
1976 character in a font.
1978 2009-06-05 Michael Scherer <misc@mandriva.org>
1980 * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1981 uses case sensitive btree.
1982 (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1983 only for case insensitive filesystems.
1985 2009-06-05 Vladimir Serbinenko <phcoder@gmail.com>
1987 * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1988 * conf/common.rmk (search_mod_CFLAGS): likewise
1990 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1992 * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
1993 compensate a compiler bug
1995 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
1997 * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
2000 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2002 Definitions for creating asm symbols with Apple's CC
2004 * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
2005 [APPLE_CC] (VARIABLE): likewise
2007 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2009 Disable lnxboot.img when compiled
2012 * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
2013 pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
2014 * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
2015 [! APPLE_CC] (CODE_LENG): skip
2016 [! APPLE_CC] (setup_sects): likewise
2017 [! APPLE_CC]: skip filling
2019 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2021 Address in trampolines based on 32-bit registers when compiled
2024 * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
2026 * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
2028 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2030 Avoid aliases when compiling with Apple's CC for PCBIOS machine
2032 * kern/misc.c [APPLE_CC] (memcpy): new function
2033 [APPLE_CC] (memmove): likewise
2034 [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
2035 (memcpy): define alias conditionally on !APPLE_CC
2038 * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
2039 APPLE_CC are defined
2040 * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
2041 (grub_assert_fail): make prototype conditional
2043 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2045 Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
2047 * conf/common.rmk (bin_UTILITIES): add (on false on condition)
2049 (CLEANFILES): add grub-macho2img
2050 (grub_macho2img_SOURCES): new variable
2051 * kern/i386/pc/startup.S (bss_start): new variable
2053 * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
2054 * util/grub-macho2img.c: new file
2056 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2058 Use objconv when compiling with Apple's CC
2060 * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
2061 (efiemu64.o): likewise
2062 (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
2063 when compiling with Apple's CC
2064 (efiemu64_s.o): likewise
2065 * configure.ac: check for objconv when compiling with Apple's CC
2066 * genmk.rb: use objconv for modules when compiled with Apple's CC
2068 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2070 Define segment as well as section when compiling with
2073 * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
2074 (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
2075 (efiemu_convert_pointer): likewise
2076 (efiemu_set_virtual_address_map): likewise
2077 (efiemu_convert_pointer): likewise
2078 (efiemu_getcrc32): likewise
2079 (init_crc32_table): likewise
2081 * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
2082 (GRUB_MOD_DEP): likewise
2084 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2086 Allow a compilation without -mcmodel=large
2088 * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
2089 when compiled without -mcmodel=large
2090 (filter_memory_map): remove memory post 4 GiB when compiled
2091 without -mcmodel=large
2092 * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
2093 TARGET_CFLAGS when -mcmodel=large isn't supported
2095 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2097 Remove nested functions in efiemu core
2099 * efiemu/runtime/efiemu.c (reflect): make static instead of nested
2101 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2103 Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
2105 * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
2107 * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
2109 (grub_cpu_is_tsc_supported): likewise
2110 * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
2112 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2114 Absolute addressing through constant with Apple's cc
2116 * kern/i386/pc/startup.S: Define necessary constants
2117 and address through it when using ABS with Apple's CC
2118 * boot/i386/pc/diskboot.S: likewise
2119 * boot/i386/pc/boot.S: likewise
2120 * boot/i386/pc/lnxboot.S: likewise
2121 * boot/i386/pc/cdboot.S: likewise
2122 * mmap/i386/pc/mmap_helper.S: likewise
2123 * commands/i386/pc/drivemap_int13h.S: likewise
2125 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2127 Check if compiler is apple cc
2129 * Makefile.in (ASFLAGS): new variable
2130 (TARGET_ASFLAGS): likewise
2131 (TARGET_MODULE_FORMAT): likewise
2132 (TARGET_APPLE_CC): likewise
2134 (TARGET_IMG_CFLAGS): likewise
2135 (TARGET_CPPFLAGS): add includedir
2136 * configure.ac: call grub_apple_cc and grub_apple_target_cc
2137 (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
2138 Check for linker script only if compiler isn't Apple's CC
2139 (TARGET_MODULE_FORMAT): set
2140 (TARGET_APPLE_CC): likewise
2141 (TARGET_ASFLAGS): likewise
2143 Check for objcopy only if compiler isn't Apple's CC
2144 Check for BSS symbol only if compiler isn't Apple's CC
2145 * genmk.rb: adapt nm options if we use Apple's utils
2146 * aclocal.m4 (grub_apple_cc): new test
2147 (grub_apple_target_cc): likewise
2149 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2151 Simplify sed expressions and improve awk
2153 * Makefile.in (install-local): simplify sed expression
2154 * gencmdlist.sh: likewise
2155 * genmoddep.awk: avoid adding module as a dependency of itself
2157 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2159 Add missing start symbols
2161 * boot/i386/pc/boot.S: add start
2162 * boot/i386/pc/pxeboot.S: likewise
2164 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2166 Fix wrong assumptions with grub-mkimage on EFI
2168 * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
2169 (relocate_addresses): consider both r_addend and value at offset
2170 (make_mods_section): zerofill modinfo and header
2171 (convert_elf): write prefix here
2173 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2175 Use .asciz instead of .string
2177 * i386/pc/diskboot.S: use .asciz instead of .string
2178 * i386/pc/boot.S: likewise
2179 * include/grub/dl.h (GRUB_MOD_DEP): likewise
2180 (GRUB_MOD_NAME): likewise
2182 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2186 * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
2187 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
2188 (grub_video_setup): remove
2189 (grub_video_set_mode): new prototype
2190 * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
2192 (linux_vesafb_res): compile only on PCBIOS
2193 (grub_linux_boot): support gfxpayload
2194 * loader/i386/pc/xnu.c (video_hook): new function
2195 (grub_xnu_set_video): support gfxpayload
2196 * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
2197 (DEFAULT_VIDEO_HEIGHT): likewise
2198 (DEFAULT_VIDEO_FLAGS): likewise
2199 (DEFAULT_VIDEO_MODE): new definition
2200 (video_hook): new function
2201 (grub_gfxterm_init): use grub_video_set_mode
2202 * util/grub.d/30_os-prober.in: remove explicit modesetting before
2204 * video/video.c (grub_video_setup): removed
2205 (grub_video_set_mode): new function based on grub_gfxterm_init and
2208 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2210 Avoid calling biosdisk in drivemap
2212 * commands/i386/pc/drivemap.c (parse_biosdisk): remove
2213 (revparse_biosdisk): likewise
2214 (list_mappings): derive name from id directly
2215 (grub_cmd_drivemap): use tryparse_diskstring
2217 2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
2221 * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
2222 (grub_lexer_param): add tokenonhold
2223 (grub_script_create_cmdline): remove cmdline. All callers updated
2224 (grub_script_function_create): make functionname
2225 grub_script_arg. All callers updated
2226 (grub_script_execute_argument_to_string): new prototype
2227 * kern/parser.c (state_transitions): reorder
2228 (grub_parser_cmdline_state): fix a bug and make more compact
2229 * script/sh/execute.c (grub_script_execute_argument_to_string):
2231 (grub_script_execute_cmdline): use new format
2232 * script/sh/function.c (grub_script_function_create): make functionname
2233 grub_script_arg. All callers updated
2234 * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
2235 (grub_script_yylex): remove
2236 (grub_script_yylex2): renamed to ...
2237 (grub_script_yylex): ...renamed
2238 parse the expressions like a${b}c
2239 * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
2240 (GRUB_PARSER_TOKEN_VAR): remove
2241 (GRUB_PARSER_TOKEN_NAME): likewise
2242 ("if"): declare as typeless
2244 ("function"): likewise
2249 (argument): likewise
2250 (script): accept empty scripts and make exit on error
2251 (arguments): use GRUB_PARSER_TOKEN_ARG
2252 (function): likewise
2253 (command): move error handling to script
2254 (menuentry): move grub_script_lexer_ref before
2255 * script/sh/script.c (grub_script_create_cmdline): remove cmdline
2256 argument. All callers updated
2258 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
2260 Prevent GRUB from probing floppies during boot.
2262 * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
2263 * commands/search.c (options): Add --no-floppy.
2264 (search_fs, search_file, grub_cmd_search): Support --no-floppy.
2265 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
2266 --no-floppy when searching for UUIDs.
2268 2009-06-04 Robert Millan <rmh.grub@aybabtu.com>
2270 Simplify the code duplication in commands/search.c.
2272 * commands/search.c (search_label, search_fs_uuid): Merge into ...
2273 (search_fs): ... this. Update all users.
2275 2009-06-03 Felix Zielcke <fzielcke@z-51.de>
2277 * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
2279 2009-05-28 Pavel Roskin <proski@gnu.org>
2281 * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
2282 Remove the original symlink explicitly.
2284 * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
2285 just one slash. That's how grub_fshelp_find_file() does it.
2287 2009-05-26 Pavel Roskin <proski@gnu.org>
2289 * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
2292 * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
2295 2009-05-25 Christian Franke <franke@computer.org>
2297 * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
2299 (grub_atapi_identify): Add wait after drive select.
2300 (grub_ata_identify): Do more strict status register check before
2301 calling grub_atapi_identify (). Suppress error message if status
2302 register is 0x00 after command failure. Add status register
2303 check after PIO read to avoid bogus identify due to stuck DRQ.
2304 Thanks to Pavel Roskin for testing.
2305 (grub_device_initialize): Remove unsafe status register check.
2306 Thanks to 'phcoder' for problem report and patch.
2307 Prevent sign extension in debug message.
2309 2009-05-23 Colin D Bennett <colin@gibibit.com>
2311 Cleaned up `include/grub/normal.h'. Grouped prototypes by
2312 definition file, and functions defined in `normal/menu.c' have had
2313 their prototypes moved to `include/grub/menu.h' for consistency.
2315 * include/grub/menu.h (grub_menu_execute_callback): Added; moved
2317 (grub_menu_get_entry): Likewise.
2318 (grub_menu_get_timeout): Likewise.
2319 (grub_menu_set_timeout): Likewise.
2320 (grub_menu_execute_entry): Likewise.
2321 (grub_menu_execute_with_fallback): Likewise.
2322 (grub_menu_entry_run): Likewise.
2324 * include/grub/normal.h: Re-ordered and grouped function
2325 prototypes by file that the function is defined in.
2326 (grub_menu_execute_callback): Removed; moved to menu.h.
2327 (grub_menu_get_entry): Likewise.
2328 (grub_menu_get_timeout): Likewise.
2329 (grub_menu_set_timeout): Likewise.
2330 (grub_menu_execute_entry): Likewise.
2331 (grub_menu_execute_with_fallback): Likewise.
2332 (grub_menu_entry_run): Likewise.
2333 (grub_menu_addentry): Renamed from this ...
2334 (grub_normal_add_menu_entry): ... to this.
2336 * normal/main.c (grub_menu_addentry): Renamed from this ...
2337 (grub_normal_add_menu_entry): ... to this.
2339 * script/sh/execute.c (grub_script_execute_menuentry): Update
2340 reference to renamed grub_menu_addentry function.
2342 2009-05-23 Felix Zielcke <fzielcke@z-51.de>
2344 * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
2346 2009-05-22 Pavel Roskin <proski@gnu.org>
2348 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
2349 * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG. Define
2350 NESTED_FUNC_ATTR using AH_BOTTOM. Use regparm(1) only when
2351 compiling for the i386 targets, but not for the utilities.
2353 * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
2355 (grub_root_drive): Likewise.
2356 * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
2358 (grub_root_drive): Change size to byte.
2359 (grub_start_addr): Remove.
2360 (grub_end_addr): Likewise.
2361 (grub_apm_bios_info): Likewise.
2363 2009-05-21 Felix Zielcke <fzielcke@z-51.de>
2365 * normal/i386: Remove.
2366 * normal/powerpc: Likewise.
2367 * normal/sparc64: Likewise.
2368 * normal/x86_64: Likewise.
2370 2009-05-19 Vladimir Serbinenko <phcoder@gmail.com>
2372 * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
2373 * loader/i386/linux_trampoline.S: Fix indentation
2374 * loader/i386/xnu_helper.S: Likewise
2376 2009-05-18 Colin D Bennett <colin@gibibit.com>
2378 Display error messages when parsing a Lua statement fails.
2379 Previously, executing a syntactically invalid statement like
2380 ")foo" or "bar;" would silently fail.
2382 * script/lua/grub_main.c (handle_lua_error): New function.
2383 (grub_lua_parse_line): Improved reporting of Lua parser and
2386 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
2388 Remove -Werror which causes build to fail on some systems
2390 * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
2391 * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
2392 * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
2394 2009-05-17 Vladimir Serbinenko <phcoder@gmail.com>
2396 trampoline for linux on 64-bit platform
2398 * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
2399 loader/i386/efi/linux_trampoline.S
2400 * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
2402 * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
2404 * loader/i386/linux_trampoline.S: moved here
2405 * loader/i386/efi/linux.c (allocate_pages): reserve space for
2407 (jumpvector): removed
2408 (grub_linux_trampoline_start): new declaration
2409 (grub_linux_trampoline_end): likewise
2410 (grub_linux_boot): use trampoline when on 64-bit platform
2411 * loader/i386/linux.c: likewise
2413 2009-05-16 Pavel Roskin <proski@gnu.org>
2415 * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
2416 const to avoid a warning.
2417 (grub_lua_setenv): Likewise.
2418 * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
2419 lmsg to fix a warning.
2421 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
2423 * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
2424 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2425 * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
2426 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2427 * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2428 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2429 * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
2430 (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
2432 2009-05-16 Felix Zielcke <fzielcke@z-51.de>
2434 * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
2436 2009-05-16 Bean <bean123ch@gmail.com>
2438 * conf/common.rmk (pkglib_MODULES): Add lua.mod.
2439 (lua_mod_SOURCES): New variable.
2440 (lua_mod_CFLAGS): Likewise.
2441 (lua_mod_LDFLAGS): Likewise.
2443 * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
2444 (setjmp_mod_SOURCES): New variable.
2445 (setjmp_mod_CFLAGS): Likewise.
2446 (setjmp_LDFLAGS): Likewise.
2448 * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
2449 (setjmp_mod_SOURCES): New variable.
2450 (setjmp_mod_CFLAGS): Likewise.
2451 (setjmp_LDFLAGS): Likewise.
2453 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
2454 (setjmp_mod_SOURCES): New variable.
2455 (setjmp_mod_CFLAGS): Likewise.
2456 (setjmp_LDFLAGS): Likewise.
2458 * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
2459 (setjmp_mod_SOURCES): New variable.
2460 (setjmp_mod_CFLAGS): Likewise.
2461 (setjmp_LDFLAGS): Likewise.
2463 * normal/i386/setjmp.S: Moved from here ...
2464 * lib/i386/setjmp.S: ... Moved here
2465 * normal/x86_64/setjmp.S: Moved from here ...
2466 * lib/x86_64/setjmp.S: ... Moved here
2467 * normal/powerpc/setjmp.S: Moved from here ...
2468 * lib/powerpc/setjmp.S: ... Moved here
2469 * normal/sparc64/setjmp.S: Moved from here ...
2470 * lib/sparc64/setjmp.S: ... Moved here
2472 * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
2473 returns_twice in mingw.
2475 * script/lua/grub_lib.c: New file.
2476 * script/lua/grub_lib.h: Likewise.
2477 * script/lua/grub_lua.h: Likewise.
2478 * script/lua/grub_main.c: Likewise.
2479 * script/lua/lapi.c: Likewise.
2480 * script/lua/lapi.h: Likewise.
2481 * script/lua/lauxlib.c: Likewise.
2482 * script/lua/lauxlib.h: Likewise.
2483 * script/lua/lbaselib.c: Likewise.
2484 * script/lua/lcode.c: Likewise.
2485 * script/lua/lcode.h: Likewise.
2486 * script/lua/ldblib.c: Likewise.
2487 * script/lua/ldebug.c: Likewise.
2488 * script/lua/ldebug.h: Likewise.
2489 * script/lua/ldo.c: Likewise.
2490 * script/lua/ldo.h: Likewise.
2491 * script/lua/ldump.c: Likewise.
2492 * script/lua/lfunc.c: Likewise.
2493 * script/lua/lfunc.h: Likewise.
2494 * script/lua/lgc.c: Likewise.
2495 * script/lua/lgc.h: Likewise.
2496 * script/lua/linit.c: Likewise.
2497 * script/lua/liolib.c: Likewise.
2498 * script/lua/llex.c: Likewise.
2499 * script/lua/llex.h: Likewise.
2500 * script/lua/llimits.h: Likewise.
2501 * script/lua/lmathlib.c: Likewise.
2502 * script/lua/lmem.c: Likewise.
2503 * script/lua/lmem.h: Likewise.
2504 * script/lua/loadlib.c: Likewise.
2505 * script/lua/lobject.c: Likewise.
2506 * script/lua/lobject.h: Likewise.
2507 * script/lua/lopcodes.c: Likewise.
2508 * script/lua/lopcodes.h: Likewise.
2509 * script/lua/loslib.c: Likewise.
2510 * script/lua/lparser.c: Likewise.
2511 * script/lua/lparser.h: Likewise.
2512 * script/lua/lstate.c: Likewise.
2513 * script/lua/lstate.h: Likewise.
2514 * script/lua/lstring.c: Likewise.
2515 * script/lua/lstring.h: Likewise.
2516 * script/lua/lstrlib.c: Likewise.
2517 * script/lua/ltable.c: Likewise.
2518 * script/lua/ltable.h: Likewise.
2519 * script/lua/ltablib.c: Likewise.
2520 * script/lua/ltm.c: Likewise.
2521 * script/lua/ltm.h: Likewise.
2522 * script/lua/lua.h: Likewise.
2523 * script/lua/luaconf.h: Likewise.
2524 * script/lua/lualib.h: Likewise.
2525 * script/lua/lundump.c: Likewise.
2526 * script/lua/lundump.h: Likewise.
2527 * script/lua/lvm.c: Likewise.
2528 * script/lua/lvm.h: Likewise.
2529 * script/lua/lzio.c: Likewise.
2530 * script/lua/lzio.h: Likewise.
2532 2009-05-16 Bean <bean123ch@gmail.com>
2534 * include/grub/kernel.h (grub_module_header_types): Add type
2537 * kern/main.c (grub_load_config): New function.
2538 (grub_main): Call grub_load_config to read boot config.
2540 * grub-mkimage (generate_image): New parameter config_path.
2541 (options): New option --config.
2542 (main): Parse --config option, and pass it to generate_image.
2544 2009-05-14 Christian Franke <franke@computer.org>
2546 * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
2547 This fixes build on Cygwin.
2549 2009-05-14 Pavel Roskin <proski@gnu.org>
2551 * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
2552 jump. This saves two bytes, so the typical case of 2 swapped
2553 drives would fit 32 bytes.
2555 2009-05-13 Pavel Roskin <proski@gnu.org>
2557 * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
2558 grub_uint32_t to avoid a warning.
2560 * loader/i386/linux.c (allocate_pages): When assigning
2561 real_mode_mem, cast through grub_size_t to fix a warning. The
2562 code already makes sure that the value would fit a pointer.
2563 (grub_linux_setup_video): Cast render_target->data to
2564 grub_size_t to fix a warning.
2566 2009-05-13 Javier MartÃn <lordhabbit@gmail.com>
2568 * commands/i386/pc/drivemap.c: New file - implement drivemap
2570 * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
2571 * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
2573 2009-05-13 Pavel Roskin <proski@gnu.org>
2575 * util/i386/pc/grub-setup.c (setup): Remove unused variable
2576 embedding_area_exists.
2578 2009-05-13 Robert Millan <rmh.grub@aybabtu.com>
2580 * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
2581 it easier to understand / work with.
2582 Improve warning messages for cases where there's no embedding area,
2583 or when it is too small (or core.img too large).
2585 2009-05-13 Pavel Roskin <proski@gnu.org>
2587 * loader/i386/pc/multiboot2.c: Add necessary includes for
2588 grub_multiboot2_real_boot().
2590 * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
2591 PX record is always little-endian. We only need the lower 2
2594 * fs/cpio.c: Use the same name "struct head" for tar and cpio to
2595 facilitate code reuse.
2596 (grub_cpio_mount): Use "struct head", not a char buffer. This
2597 fixes a warning reported by gcc 4.4.
2599 * kernel/disk.c (grub_disk_read): Use void pointer for the
2601 (grub_disk_write): Use const void pointer for the buffer.
2602 Adjust all callers. Remove unnecessary casts.
2604 2009-05-10 Robert Millan <rmh.grub@aybabtu.com>
2606 * util/i386/pc/grub-install.in: Update copyright year.
2608 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2612 * commands/gptsync.c: new file
2613 * conf/common.rmk (pkglib_MODULES): add gptsync.mod
2614 (gptsync_mod_SOURCES): new variable
2615 (gptsync_mod_CFLAGS): likewise
2616 (gptsync_mod_LDFLAGS): likewise
2617 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
2619 (GRUB_PC_PARTITION_TYPE_HFS): likewise
2620 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
2621 * conf/i386-ieee1275.rmk: likewise
2622 * conf/i386-pc.rmk: likewise
2623 * conf/powerpc-ieee1275.rmk: likewise
2625 2009-05-09 Vladimir Serbinenko <phcoder@gmail.com>
2629 * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
2630 (grub_dl_ref): likewise
2632 2009-05-08 Robert Millan <rmh.grub@aybabtu.com>
2634 * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
2635 split in two functions (one for msdos and one for gpt).
2637 2009-05-08 Pavel Roskin <proski@gnu.org>
2639 * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
2642 * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
2643 uninitialized err[0] and err[1]. Rename them to bad1 and bad2.
2644 Initialize them with -1. Add sanity check for bad1. Eliminate
2647 2009-05-08 David S. Miller <davem@davemloft.net>
2649 * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
2651 2009-05-06 Robert Millan <rmh.grub@aybabtu.com>
2653 * util/i386/pc/grub-setup.c (setup): Fix check for embed region
2656 2009-05-05 Felix Zielcke <fzielcke@z-51.de>
2658 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2659 `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
2661 2009-05-05 David S. Miller <davem@davemloft.net>
2663 * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
2665 2009-05-05 Pavel Roskin <proski@gnu.org>
2667 * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
2668 of grub_dl_ref() and grub_dl_unref().
2669 * commands/parttool.c: Remove preprocessor conditionals around
2670 grub_dl_ref() and grub_dl_unref().
2671 * fs/affs.c: Likewise.
2672 * fs/afs.c: Likewise.
2673 * fs/cpio.c: Likewise.
2674 * fs/ext2.c: Likewise.
2675 * fs/fat.c: Likewise.
2676 * fs/hfs.c: Likewise.
2677 * fs/hfsplus.c: Likewise.
2678 * fs/iso9660.c: Likewise.
2679 * fs/jfs.c: Likewise.
2680 * fs/minix.c: Likewise.
2681 * fs/ntfs.c: Likewise.
2682 * fs/reiserfs.c: Likewise.
2683 * fs/sfs.c: Likewise.
2684 * fs/udf.c: Likewise.
2685 * fs/ufs.c: Likewise.
2686 * fs/xfs.c: Likewise.
2687 * include/grub/dl.h: Likewise.
2688 * loader/xnu.c: Likewise.
2690 2009-05-04 Pavel Roskin <proski@gnu.org>
2692 * commands/acpi.c: Remove unused variable my_mod.
2693 * partmap/amiga.c: Likewise.
2694 * partmap/apple.c: Likewise.
2695 * partmap/gpt.c: Likewise.
2696 * partmap/pc.c: Likewise.
2697 * partmap/sun.c: Likewise.
2698 * term/gfxterm.c: Likewise.
2699 * term/i386/pc/vesafb.c: Likewise.
2700 * term/i386/pc/vga.c: Likewise.
2702 2009-05-04 David S. Miller <davem@davemloft.net>
2704 * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
2705 pointer args to grub_ieee1275_get_property().
2707 * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
2709 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
2710 devices, and do not traverse down under controller nodes.
2712 * disk/ieee1275/ofdisk.c (compute_dev_path): New.
2713 (grub_ofdisk_open): Use it to un-escape "," characters.
2714 * kern/disk.c (find_part_sep): New.
2715 (grub_disk_open): Use it to find the first non-escaped ','
2716 character in the disk name.
2717 * util/ieee1275/devicemap.c (escape_of_path): New.
2718 (grub_util_emit_devicemap_entry): Use it.
2719 * util/sparc64/ieee1275/grub-install.in: Update script to
2720 strip partition specifiers properly by not triggering on
2721 '\' escaped ',' characters.
2723 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2725 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
2727 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
2729 (linux_vesafb_modes): Add a lot of additional modes to the list (based
2730 on documentation from Wikipedia).
2732 2009-05-04 Pavel Roskin <proski@gnu.org>
2734 * disk/ata.c: Spelling fixes.
2735 * disk/raid.c: Likewise.
2736 * disk/usbms.c: Likewise.
2737 * disk/dmraid_nvidia.c: Likewise.
2738 * kern/ieee1275/openfw.c: Likewise.
2739 * kern/ieee1275/init.c: Likewise.
2740 * kern/ieee1275/cmain.c: Likewise.
2741 * boot/i386/pc/cdboot.S: Likewise.
2742 * video/readers/png.c: Likewise.
2743 * video/i386/pc/vbe.c: Likewise.
2744 * fs/udf.c: Likewise.
2745 * fs/hfs.c: Likewise.
2746 * fs/reiserfs.c: Likewise.
2747 * efiemu/runtime/efiemu.c: Likewise.
2748 * efiemu/main.c: Likewise.
2749 * efiemu/mm.c: Likewise.
2750 * include/grub/elf.h: Likewise.
2751 * include/grub/xnu.h: Likewise.
2752 * include/grub/usbdesc.h: Likewise.
2753 * include/grub/usb.h: Likewise.
2754 * include/grub/script_sh.h: Likewise.
2755 * include/grub/lib/LzmaEnc.h: Likewise.
2756 * include/grub/efiemu/efiemu.h: Likewise.
2757 * include/grub/command.h: Likewise.
2758 * normal/menu.c: Likewise.
2759 * normal/main.c: Likewise.
2760 * normal/datetime.c: Likewise.
2761 * bus/usb/uhci.c: Likewise.
2762 * mmap/i386/uppermem.c: Likewise.
2763 * mmap/mmap.c: Likewise.
2764 * commands/acpi.c: Likewise.
2765 * commands/test.c: Likewise.
2766 * partmap/apple.c: Likewise.
2767 * font/font.c: Likewise.
2768 * loader/sparc64/ieee1275/linux.c: Likewise.
2769 * loader/macho.c: Likewise.
2770 * loader/i386/bsd_trampoline.S: Likewise.
2771 * loader/i386/bsd.c: Likewise.
2772 * loader/xnu.c: Likewise.
2773 * term/i386/pc/vesafb.c: Likewise.
2774 * term/usb_keyboard.c: Likewise.
2775 * util/resolve.c: Likewise.
2776 * util/getroot.c: Likewise.
2778 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
2780 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
2782 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2784 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
2787 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2789 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
2790 parameter only available on BIOS.
2792 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2794 Removed wrong semicolon in declaration
2796 * grub/misc.h (grub_dprintf): remove semicolon
2798 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2800 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
2801 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
2802 is done by grub_cmd_linux() now).
2803 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
2804 restore video to text mode.
2805 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
2806 indicates lack of "vga=" parameter. "vga=0" is mapped to
2807 `GRUB_LINUX_VID_MODE_NORMAL'.
2809 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
2811 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
2812 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
2813 and `normal/script.c'. Add `kern/rescue_reader.c',
2814 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
2815 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
2816 `grub_script.tab.c'.
2818 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2819 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2820 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2821 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2822 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2824 * Makefile.in: Remove duplicated 2008 in Copyright line.
2826 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
2828 * util/misc.c (grub_util_warn): New function. Emits a warning
2830 * include/grub/util/misc.h (grub_util_warn): New declaration.
2832 * util/i386/pc/grub-install.in: Understand --force and pass it down
2835 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
2837 (setup): Improve error messages and add warnings when requested to
2838 install in odd layouts. Refuse to install using blocklists unless
2841 2009-05-04 martin f. krafft <madduck@madduck.net>
2843 * disk/raid.c (grub_raid_scan_device): Improve debug message.
2845 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2847 Updated copyright year
2849 * fs/hfsplus.c: updated copyright year
2851 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
2855 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
2856 in the space previously used by unused3
2857 (grub_hfsplus_uuid): new function
2858 (grub_hfsplus_fs): added uuid field
2860 2009-05-03 Pavel Roskin <proski@gnu.org>
2862 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
2863 suppress warnings. It's no longer needed.
2864 * disk/host.c: Likewise.
2865 * disk/ata_pthru.c: Likewise.
2866 * disk/loopback.c: Likewise.
2867 * hook/datehook.c: Likewise.
2868 * parttool/pcpart.c: Likewise.
2869 * fs/i386/pc/pxe.c: Likewise.
2870 * fs/ntfscomp.c: Likewise.
2871 * efiemu/main.c: Likewise.
2872 * mmap/mmap.c: Likewise.
2873 * commands/crc.c: Likewise.
2874 * commands/hexdump.c: Likewise.
2875 * commands/hdparm.c: Likewise.
2876 * commands/acpi.c: Likewise.
2877 * commands/echo.c: Likewise.
2878 * commands/minicmd.c: Likewise.
2879 * commands/blocklist.c: Likewise.
2880 * commands/memrw.c: Likewise.
2881 * commands/loadenv.c: Likewise.
2882 * commands/usbtest.c: Likewise.
2883 * commands/lsmmap.c: Likewise.
2884 * commands/boot.c: Likewise.
2885 * commands/parttool.c: Likewise.
2886 * commands/configfile.c: Likewise.
2887 * commands/search.c: Likewise.
2888 * commands/ieee1275/suspend.c: Likewise.
2889 * commands/cat.c: Likewise.
2890 * commands/i386/pc/pxecmd.c: Likewise.
2891 * commands/i386/pc/play.c: Likewise.
2892 * commands/i386/pc/halt.c: Likewise.
2893 * commands/i386/pc/vbeinfo.c: Likewise.
2894 * commands/i386/pc/vbetest.c: Likewise.
2895 * commands/lspci.c: Likewise.
2896 * commands/date.c: Likewise.
2897 * commands/handler.c: Likewise.
2898 * commands/ls.c: Likewise.
2899 * commands/test.c: Likewise.
2900 * commands/cmp.c: Likewise.
2901 * commands/efi/loadbios.c: Likewise.
2902 * commands/efi/fixvideo.c: Likewise.
2903 * commands/halt.c: Likewise.
2904 * commands/help.c: Likewise.
2905 * commands/reboot.c: Likewise.
2906 * hello/hello.c: Likewise.
2907 * script/sh/main.c: Likewise.
2908 * loader/xnu.c: Likewise.
2909 * term/terminfo.c: Likewise.
2910 * term/i386/pc/serial.c: Likewise.
2911 * term/usb_keyboard.c: Likewise.
2913 2009-05-03 David S. Miller <davem@davemloft.net>
2915 * normal/menu.c: Include grub/parser.h
2917 2009-05-03 Pavel Roskin <proski@gnu.org>
2919 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
2921 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
2922 Suggested by Javier MartÃn <lordhabbit@gmail.com>
2924 * util/i386/pc/grub-mkrescue.in: Allow for the case when
2925 efiemu??.o doesn't exist.
2926 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
2929 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
2931 FreeBSD 64-bit support
2933 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
2934 and loader/i386/bsd_trampoline.S
2935 (bsd_mod_ASFLAGS): new variable
2936 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
2937 (FREEBSD_MODTYPE_KERNEL64): likewise
2938 (grub_bsd64_trampoline_start): likewise
2939 (grub_bsd64_trampoline_end): likewise
2940 (grub_bsd64_trampoline_selfjump): likewise
2941 (grub_bsd64_trampoline_gdt): likewise
2942 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
2943 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
2944 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
2945 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
2946 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2948 * loader/i386/bsd_pagetable.c: new file
2949 * loader/i386/bsd_trampoline.S: likewise
2950 * loader/i386/bsd.c (ALIGN_QWORD): new macro
2951 (ALIGN_VAR): likewise
2952 (entry_hi): new variable
2953 (kern_end_mdofs): likewise
2954 (is_64bit): likewise
2955 (grub_freebsd_add_meta): use ALIGN_VAR
2956 (grub_e820_mmap): new declaration
2957 (grub_freebsd_add_mmap): new function
2958 (grub_freebsd_add_meta_module): support 64 bit kernels
2959 (grub_freebsd_list_modules): use ALIGN_VAR
2960 (gdt_descriptor): new declaration
2961 (grub_freebsd_boot): support 64 bit kernels
2962 (grub_bsd_elf64_hook): new function
2963 (grub_bsd_load_elf): support elf64
2965 2009-05-03 Bean <bean123ch@gmail.com>
2967 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2968 after we get the result of if statement.
2970 2009-05-03 Bean <bean123ch@gmail.com>
2972 * Makefile.in (enable_efiemu): New variable.
2974 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2976 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2978 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2979 path, add -mno-red-zone option.
2980 (efiemu64_s.o): Likewise.
2981 (efiemu64.o): Use macro $^ for source file.
2983 * configure.ac (--enable-efiemu): New option.
2985 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
2989 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2990 (pkglib_MODULES): add xnu.mod
2991 (xnu_mod_SOURCES): new variable
2992 (xnu_mod_CFLAGS): likewise
2993 (xnu_mod_LDFLAGS): likewise
2994 (xnu_mod_ASFLAGS): likewise
2995 * conf/i386-pc.rmk: likewise
2996 * conf/x86_64-efi.rmk: likewise
2997 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
2999 * include/grub/i386/macho.h: new file
3000 * include/grub/i386/xnu.h: likewise
3001 * include/grub/macho.h: likewise
3002 * include/grub/machoload.h: likewise
3003 * include/grub/x86_64/macho.h: likewise
3004 * include/grub/x86_64/xnu.h: likewise
3005 * include/grub/xnu.h: likewise
3006 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
3007 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
3008 * loader/i386/efi/xnu.c: new file
3009 * loader/i386/pc/xnu.c: likewise
3010 * loader/i386/xnu.c: likewise
3011 * loader/i386/xnu_helper.S: likewise
3012 * loader/macho.c: likewise
3013 * loader/xnu.c: likewise
3014 * loader/xnu_resume.c: likewise
3015 * util/grub-dumpdevtree: likewise
3016 * include/grub/i386/pit.h: include grub/err.h
3017 (grub_pit_wait): export
3018 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
3020 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
3024 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
3025 _linux_efi, linux_efi.
3026 new files in grub-emu
3027 new targets efiemu32.o and efiemu64.o
3028 * loader/linux_normal_efiemu.c: likewise
3029 * loader/i386/efi/linux.c: added preliminary efiemu support
3030 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
3032 * include/grub/autoefi.h: new file
3033 * include/grub/i386/efiemu.h: likewise
3034 * include/grub/i386/pc/efiemu.h: likewise
3035 * include/grub/efi/api.h: add LL suffix when necessary
3036 new definitions relating to tables
3037 * include/grub/efiemu/efiemu.h: new file
3038 * include/grub/efiemu/runtime.h: likewise
3039 * efiemu/prepare.c: likewise
3040 * efiemu/loadcore_common.c: likewise
3041 * efiemu/loadcore64.c: likewise
3042 * efiemu/runtime/efiemu.sh: likewise
3043 * efiemu/runtime/efiemu.S: likewise
3044 * efiemu/runtime/efiemu.c: likewise
3045 * efiemu/runtime/config.h: likewise
3046 * efiemu/prepare32.c: likewise
3047 * efiemu/main.c: likewise
3048 * efiemu/modules/pnvram.c: likewise
3049 * efiemu/modules/i386: likewise
3050 * efiemu/modules/i386/pc: likewise
3051 * efiemu/modules/acpi.c: likewise
3052 * efiemu/i386/pc/cfgtables.c: likewise
3053 * efiemu/i386/loadcore64.c: likewise
3054 * efiemu/i386/loadcore32.c: likewise
3055 * efiemu/prepare64.c: likewise
3056 * efiemu/loadcore.c: likewise
3057 * efiemu/symbols.c: likewise
3058 * efiemu/mm.c: likewise
3059 * efiemu/loadcore32.c: likewise
3061 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
3065 * commands/acpi.c: new file
3066 * commands/i386/pc/acpi.c: likewise
3067 * commands/efi/acpi.c: likewise
3068 * include/grub/acpi.h: likewise
3069 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
3070 (acpi_mod_SOURCES): new variable
3071 (acpi_mod_CFLAGS): likewise
3072 (acpi_mod_LDFLAGS): likewise
3073 * conf/i386-efi.rmk: likewise
3074 * conf/x86_64-efi.rmk: likewise
3076 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
3078 Missing part from mmap patch
3080 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
3081 (grub_mmap_unregister)
3082 (grub_mmap_free_and_unregister): use grub_mmap_register
3084 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
3088 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
3089 * loader/i386/linux.c (find_mmap_size): likewise
3090 (allocate_pages): likewise
3091 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
3092 (grub_fill_multiboot_mmap): likewise
3093 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
3094 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
3095 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
3096 (OPENBSD_MMAP_RESERVED): likewise
3097 * include/grub/i386/pc/memory.h: include grub/memory.h
3098 (grub_lower_mem): removed
3099 (grub_upper_mem): likewise
3100 (GRUB_MACHINE_MEMORY_ACPI): new definition
3101 (GRUB_MACHINE_MEMORY_NVS): likewise
3102 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
3103 (GRUB_MACHINE_MEMORY_HOLE): likewise
3104 (grub_machine_mmap_register): likewise
3105 (grub_machine_mmap_unregister): likewise
3106 (grub_machine_get_upper): likewise
3107 (grub_machine_get_lower): likewise
3108 (grub_machine_get_post64): likewise
3109 * include/grub/i386/efi/memory.h: new file
3110 * include/grub/x86_64/efi/memory.h: likewise
3111 * include/grub/efi/memory.h: likewise
3112 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
3113 (mmap_mod_SOURCES): new variable
3114 (mmap_mod_LDFLAGS): likewise
3115 (mmap_mod_ASFLAGS): likewise
3116 * conf/i386-coreboot.rmk: likewise
3117 * conf/i386-ieee1275.rmk: likewise
3118 * conf/i386-efi.rmk: likewise
3119 * conf/x86_64-efi.rmk: likewise
3120 * include/grub/types.h (UINT_TO_PTR): new macro
3121 (PTR_TO_UINT32): likewise
3122 (PTR_TO_UINT64): likewise
3123 * include/grub/memory.h: new file
3124 * mmap/i386/pc/mmap.c: likewise
3125 * mmap/i386/pc/mmap_helper.S: likewise
3126 * mmap/i386/uppermem.c: likewise
3127 * mmap/mmap.c: likewise
3128 * mmap/efi/mmap.c: likewise
3129 * kern/i386/coreboot/init.c (grub_machine_init): don't use
3131 * kern/i386/pc/init.c (grub_lower_mem): removed variable
3132 (grub_upper_mem): likewise
3133 (grub_machine_init): don't use grub_upper_mem,
3134 make grub_lower_mem local
3135 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
3136 grub_mmap_iterate and grub_mmap_get_upper
3137 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
3139 2009-05-02 Bean <bean123ch@gmail.com>
3141 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
3143 (pkglib_MODULES): Add normal.mod and sh.mod.
3144 (normal_SOURCES): New variable.
3145 (normal_mod_CFLAGS): Likewise.
3146 (normal_mod_LDFLAGS): Likewise.
3147 (sh_mod_SOURCES): Likewise.
3148 (sh_mod_CFLAGS): Likewise.
3149 (sh_mod_LDFLAGS): Likewise.
3151 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
3152 script/sh/lexer.c_DEPENDENCIES.
3153 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
3154 kern/rescue_reader.c and kern/rescue_parser.c.
3155 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
3156 (grub_emu_SOURCES): Change source files.
3157 (pkglib_MODULES): Remove normal.mod.
3158 (normal_SOURCES): Removed.
3159 (normal_mod_CFLAGS): Likewise.
3160 (normal_mod_LDFLAGS): Likewise.
3161 * conf/i386-coreboot.rmk: Likewise.
3162 * conf/i386-efi.rmk: Likewise.
3163 * conf/i386-ieee1276.rmk: Likewise.
3164 * conf/powerpc-ieee1275.rmk: Likewise.
3165 * conf/sparc64-ieee1275.rmk: Likewise.
3166 * conf/x86_64-efi.rmk: Likewise.
3168 * include/grub/command.h (grub_command_execute): New inline function.
3170 * include/grub/menu.h (grub_menu_entry): Removed commands field.
3172 * include/grub/normal.h: Remove <grub/setjmp.h>.
3173 (grub_fs_module_list): Moved to normal/autofs.c.
3174 (grub_exit_env): Removed.
3175 (grub_command_execute): Likewise.
3176 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
3178 (read_command_list): New function declaration.
3179 (read_fs_list): Likewise.
3181 * include/parser.h: Include <grub/reader.h>.
3182 (grub_parser_split_cmdline): Change type of getline parameter.
3183 (grub_parser): New structure.
3184 (grub_parser_class): New variable.
3185 (grub_parser_execute): New function declaration.
3186 (grub_register_rescue_parser): Likewise.
3187 (grub_parser_register): New inline function.
3188 (grub_parser_unregister): Likewise.
3189 (grub_parser_get_current): Likewise.
3190 (grub_parser_set_current): Likewise.
3192 * include/grub/reader.h: New file.
3193 * kern/reader.c: Likewise.
3194 * kern/rescue_parser.c: Likewise.
3195 * kern/rescue_reader.c: Likewise.
3196 * normal/autofs.c: Likewise.
3197 * normal/dyncmd.c: Likewise.
3199 * include/grub/rescue.h: Removed.
3200 * normal/command.h: Likewise.
3202 * include/grub/script.h: Moved to ...
3203 * include/grub/script_sh.h: ... Moved here.
3204 * normal/execute.c: Moved to ...
3205 * script/sh/execute.c: ... Moved here.
3206 * normal/function.c: Moved to ...
3207 * script/sh/function.c: ... Moved here.
3208 * normal/lexer.c: Moved to ...
3209 * script/sh/lexer.c: ... Moved here.
3210 * normal/parser.y: Moved to ...
3211 * script/sh/parser.y: ... Moved here.
3212 * normal/script.c: Moved to ...
3213 * script/sh/script.c: ... Moved here.
3215 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
3217 (grub_exit_env): Removed.
3218 (fs_module_list): Moved to normal/autofs.c.
3219 (grub_file_getline): Don't handle comment here.
3220 (free_menu): Skip removed field entry->commands.
3221 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
3223 (read_config_file): Removed nested parameter, change getline function.
3224 (grub_enter_normal_mode): Removed.
3225 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
3226 (read_command_list): Likewise.
3227 (autoload_fs_module): Moved to normal/autofs.c.
3228 (read_fs_list): Likewise.
3229 (reader_nested): New variable.
3230 (grub_normal_execute): Run parser.sh to switch to sh parser.
3231 (grub_cmd_rescue): Removed.
3232 (cmd_normal): Removed.
3233 (grub_cmd_normal): Unregister itself at the beginning. Don't register
3235 (grub_cmdline_run): New function.
3236 (grub_normal_reader_init): Likewise.
3237 (grub_normal_read_line): Likewise.
3238 (grub_env_write_pager): Likewise.
3239 (cmdline): New variable.
3240 (grub_normal_reader): Likewise.
3241 (GRUB_MOD_INIT): Register normal reader and set as current, register
3242 pager hook, register normal command with grub_register_command_prio,
3243 so that it won't show up in command.lst.
3244 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
3245 grub_fs_autoload_hook.
3247 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
3248 (grub_menu_execute_entry): Replace grub_script_execute with
3249 grub_parser_execute, change parameter to grub_command_execute.
3251 * normal/menu_text.c: Remove <grub/script.h>.
3253 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
3254 and <grub/parser.h>.
3255 (run): Change editor_getline to use new parser interface. Change
3256 parameter to grub_command_execute.
3258 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
3259 <grub/reader.h> and <grub/parser.h>.
3260 (grub_load_normal_mode): Execute normal command.
3261 (grub_main): Call grub_register_core_commands,
3262 grub_register_rescue_parser and grub_register_rescue_reader, use
3263 grub_reader_loop to enter input loop.
3265 * kern/parser.c (grub_parser_split_cmdline): Change type of
3267 (grub_parser_class): New variable.
3268 (grub_parser_execute): New function.
3270 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
3271 * loader/multiboot2.c: Likewise.
3272 * loader/sparc64/ieee1275/linux.c: Likewise.
3274 * util/grub-emu.c (read_command_list): New dummy function.
3276 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
3278 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
3279 count to 16 for CCISS and IDA.
3281 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
3283 * normal/menu_text.c (grub_wait_after_message): Print a newline
3284 after waiting for user input.
3286 * loader/i386/linux.c: Include `<grub/normal.h>'.
3287 (grub_cmd_linux): Improve the error message about `ask' mode, by
3288 waiting for user input so it's not missed (we can do this, since
3289 user requested interaction).
3291 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
3293 Added missing lst to grub-mkrescue
3295 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
3296 and ${input_dir}/parttool.lst
3298 2009-04-30 David S. Miller <davem@davemloft.net>
3300 * util/hostdisk.c (device_is_wholedisk): New function.
3301 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
3302 zero only if device_is_wholedisk() returns true.
3304 * util/hostdisk.c (convert_system_partition_to_system_disk):
3305 Handle virtual disk devices named /dev/vdiskX as found on sparc
3308 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
3309 lettered partition specifier is found, convert to numbered.
3311 2009-04-29 David S. Miller <davem@davemloft.net>
3313 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
3314 * include/grub/sparc64/ieee1275/memory.h: Likewise.
3316 * normal/command.c: Add missing newline at end of file.
3318 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
3320 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
3321 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
3322 grub_ofdisk_read): Likewise, and deal similarly with the fact that
3323 ihandles have a 32-bit type but need to be stored in a "void *".
3325 2009-04-28 Pavel Roskin <proski@gnu.org>
3327 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
3328 not disk. Adjust all dependencies.
3329 (grub_fs_uuid_close): Use grub_device_close(), not
3332 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
3333 parent's partition, don't copy it by reference, as it gets freed
3336 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
3338 Preboot hooks support
3340 * commands/boot.c (struct grub_preboot_t): new declaration
3341 (preboots_head): new variable
3342 (preboots_tail): likewise
3343 (grub_loader_register_preboot_hook): new function
3344 (grub_loader_unregister_preboot_hook): likewise
3345 (grub_loader_set): launch preboot hooks
3346 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
3347 (grub_loader_register_preboot_hook): new declaration
3348 (grub_loader_unregister_preboot_hook): likewise
3350 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
3354 * disk/scsi.c (grub_scsi_open): added missing cast when
3355 calling grub_dprintf
3357 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
3359 Bug and warning fixes
3361 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
3363 * commands/test.c (test_parse): fixed bug with file tests and corrected
3364 declaration of find_file
3366 2009-04-26 Pavel Roskin <proski@gnu.org>
3368 * Makefile.in: Don't install empty manual pages if help2man is
3369 missing. Use help2man option for output, not shell redirection.
3371 2009-04-26 David S. Miller <davem@davemloft.net>
3373 * util/grub-mkdevicemap.c (make_device_map): Add missing
3374 NESTED_FUNC_ATTR to process_device().
3376 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
3380 * commands/test.c: rewritten to use bash-like test
3382 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
3384 Parttool autoloading and improvements
3386 * Makefile.in (pkglib_DATA): add parttool.lst
3387 (parttool.lst): new target
3388 * genmk.rb: generate parttool-*
3389 (CLEANFILES): add #{parttool}
3390 (PARTTOOLFILES): new variable
3391 * genparttoollist.sh: new file
3392 * parttool/pcpart.c (grub_pcpart_boot): more feedback
3393 (grub_pcpart_type): likewise
3394 * commands/parttool.c (helpmsg): new variable
3395 (grub_cmd_parttool): output help if not enough arguments are supplied
3397 (GRUB_MOD_INIT(parttool)): use helpmsg
3399 2009-04-24 David S. Miller <davem@davemloft.net>
3401 Avoiding opening same device multiple times in device iterator.
3403 * kern/device.c: (grub_device_iterate): Define struct part_ent,
3404 and use it to build a list of partitions in iterate_disk() and
3405 iterate_partition().
3407 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
3410 * disk/ieee1275/nand.c (grub_nand_iterate): Return
3411 grub_devalias_iterate() result instead of unconditional 0.
3412 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
3413 Also, capture hook return value, either directly or via
3414 grub_children_iterate(), and propagate to caller.
3415 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
3416 grub_children_iterate): Return value is now 'int' instead of
3418 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
3419 like a proper iterator, stopping when hooks return non-zero.
3420 (grub_devalias_iterate): Likewise.
3422 2009-04-23 David S. Miller <davem@davemloft.net>
3424 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
3426 2009-04-22 David S. Miller <davem@davemloft.net>
3428 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
3429 is larger than address_cells, use that value for address_cells too.
3431 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
3432 IEEE1275_MAX_PATH_LEN): Define.
3433 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
3434 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
3435 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
3436 'devtype'. Explicitly NULL terminate devalias expansion.
3438 * util/sparc64/ieee1275/misc.c: New file.
3439 * util/sparc64/ieee1275/grub-setup.c: New file.
3440 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
3441 * util/sparc64/ieee1275/grub-mkimage.c: New file.
3442 * util/sparc64/ieee1275/grub-install.in: New file.
3443 * util/ieee1275/ofpath.c: New file.
3444 * util/ieee1275/devicemap.c: New file.
3445 * util/devicemap.c: New file.
3446 * util/deviceiter.c: New file.
3447 * kern/sparc64/ieee1275/init.c: New file.
3448 * include/grub/util/ofpath.h: New file.
3449 * include/grub/util/deviceiter.h: New file.
3450 * util/grub-mkdevicemap.c: Include deviceiter.h.
3451 Implement using grub_util_emit_devicemap_entry and
3452 grub_util_iterate_devices.
3453 * conf/i386-corebook.rmk: Build util/deviceiter.c and
3454 util/devicemap.c into grub-mkdevicemap
3455 * conf/i386-efi.rmk: Likewise.
3456 * conf/i386-ieee1275.rmk: Likewise.
3457 * conf/i386-pc.rmk: Likewise.
3458 * conf/powerpc-ieee1275.rmk: Likewise.
3459 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
3460 images and installation utilities. Build kernel as image
3461 instead of as elf binary. Use common rules as much as possible.
3463 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
3465 Correct GPT definition
3467 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
3470 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
3472 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
3474 2009-04-19 David S. Miller <davem@davemloft.net>
3476 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
3477 (grub_rescue_cmd_linux): Rename to...
3478 (grub_cmd_linux): and fix prototype.
3479 (grub_rescue_cmd_initrd): Rename to...
3480 (grub_cmd_initrd): and fix prototype.
3481 (cmd_linux, cmd_initrd): New.
3482 (GRUB_MOD_INIT(linux)): Use grub_register_command().
3483 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
3485 2009-04-17 Pavel Roskin <proski@gnu.org>
3487 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
3489 (grub_ohci_transfer): Likewise.
3491 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
3493 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
3494 return without a value. Fix inconsistent indentation.
3496 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
3497 match struct grub_fs.
3499 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
3500 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
3501 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
3502 * commands/lspci.c (grub_lspci_iter): Likewise.
3504 2009-04-16 Bean <bean123ch@gmail.com>
3506 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
3509 2009-04-15 Pavel Roskin <proski@gnu.org>
3511 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
3512 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
3513 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
3516 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
3518 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
3519 that no multiple data or metadata areas are supported and `Unknown
3522 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
3524 Move loader out of the kernel
3526 * kern/loader.c: moved to ...
3527 * commands/boot.c: ... moved here
3528 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
3529 * commands/boot.c (grub_cmd_boot): moved here. All users updated
3530 * include/grub/kernel.h (grub_machine_fini): export
3531 * include/grub/loader.h (grub_loader_is_loaded): update declaration
3532 (grub_loader_set): likewise
3533 (grub_loader_unset): likewise
3534 (grub_loader_boot): likewise
3535 * conf/common.rmk: new module boot.mod
3536 (pkglib_MODULES): add boot.mod
3537 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
3538 (grub_emu_SOURCES): likewise
3539 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
3540 (grub_emu_SOURCES): likewise
3541 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
3542 (grub_emu_SOURCES): likewise
3543 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
3544 (grub_emu_SOURCES): likewise
3545 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
3546 (grub_emu_SOURCES): likewise
3547 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
3548 (grub_emu_SOURCES): likewise
3549 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
3550 (grub_emu_SOURCES): likewise
3552 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
3554 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
3556 * kern/misc.c (grub_itoa): Removed function
3557 (grub_ltoa): likewise
3558 (grub_vsprintf): use grub_lltoa
3560 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
3564 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
3565 * conf/i386-coreboot.rmk: likewise
3566 * conf/i386-ieee1275.rmk: likewise
3567 * conf/powerpc-ieee1275.rmk: likewise
3569 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
3571 * INSTALL: Add that `./autogen.sh' needs to be run before
3574 2009-04-14 Bean <bean123ch@gmail.com>
3576 * Makefile.in (pkglib_DATA): Add handler.lst.
3577 (handler.lst): New rule.
3579 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
3580 * conf/i386-coreboot.rmk: Likewise.
3581 * conf/i386-ieee1275.rmk: Likewise.
3582 * conf/i386-efi.rmk: Likewise.
3583 * conf/x86_64-efi.rmk: Likewise.
3584 * conf/powerpc-ieee1275.rmk: Likewise.
3585 * conf/sparc64-ieee1275.rmk: Likewise.
3587 * genhandlerlist.sh: New file.
3589 * genmk.rb: Add rules to generate handler.lst.
3591 * include/grub/normal.h (grub_file_getline): New function definition.
3592 (read_handler_list): Likewise.
3593 (free_handler_list): Likewise.
3595 * include/grub/term.h (grub_term_register_input): Add name parameter
3596 for auto generation of handler.lst.
3597 (grub_term_register_output): Likewise.
3599 * normal/handler.c: New file.
3601 * normal/main.c (get_line): Renamed to grub_file_getline.
3602 (read_config_file): Use the newly renamed grub_file_getline.
3603 (read_command_list): Likewise.
3604 (read_fs_list): Likewise.
3605 (grub_normal_execute): Call read_handler_list to parse handler.lst.
3606 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
3608 * term/efi/console.c (grub_console_init): Add name parameter for auto
3609 generation of handler.lst.
3610 * term/gfxterm.c: Likewise.
3611 * term/i386/pc/at_keyboard.c: Likewise.
3612 * term/i386/pc/console.c: Likewise.
3613 * term/i386/pc/serial.c: Likewise.
3614 * term/i386/pc/vesafb.c: Likewise.
3615 * term/i386/pc/vga.c: Likewise.
3616 * term/i386/pc/vga_text.c: Likewise.
3617 * term/ieee1275/ofconsole.c: Likewise.
3618 * term/usb_keyboard.c: Likewise.
3620 2009-04-14 Bean <bean123ch@gmail.com>
3622 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
3623 properly with null character.
3625 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
3627 * configure: Remove.
3628 * config.h.in: Likewise.
3629 * stamp-h.in: Likewise.
3630 * DISTLIST: Likewise.
3631 * conf/common.mk: Likewise.
3632 * conf/i386-coreboot.mk: Likewise.
3633 * conf/i386-efi.mk: Likewise.
3634 * conf/i386-ieee1275.mk: Likewise.
3635 * conf/i386.mk: Likewise.
3636 * conf/i386-pc.mk: Likewise.
3637 * conf/powerpc-ieee1275.mk: Likewise.
3638 * conf/sparc64-ieee1275.mk: Likewise.
3639 * conf/x86_64-efi.mk: Likewise.
3641 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
3644 2009-04-14 John Stanley <jpsinthemix@verizon.net>
3645 David S. Miller <davem@davemloft.net>
3647 * util/hostdisk.c (make_device_name): Fix buffer length
3650 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
3652 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
3653 <sys/param.h> and <sys/sysctl.h>.
3654 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
3655 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
3656 opening the device and reset them afterwards.
3658 2009-04-13 Pavel Roskin <proski@gnu.org>
3660 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
3661 Reported by John Stanley <jpsinthemix@verizon.net>
3663 2009-04-13 Robert Millan <rmh@aybabtu.com>
3665 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
3666 that name for menuentries when appropriate.
3668 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
3670 * util/grub.d/10_freebsd.in: Add a missing `fi'.
3672 2009-04-13 Robert Millan <rmh@aybabtu.com>
3674 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
3675 to Linux, simply abort telling the user it's no longer supported.
3677 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
3679 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
3680 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
3681 `freebsd_loadenv' only when devices.hints exist.
3683 2009-04-13 Pavel Roskin <proski@gnu.org>
3685 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
3687 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
3689 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
3691 (grub_drive): Likewise.
3693 2009-04-13 David S. Miller <davem@davemloft.net>
3695 * kern/sparc64/ieee1275/ieee1275.c: New file.
3696 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
3697 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
3698 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
3699 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
3700 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
3701 grub_ieee1275_alloc_physmem): Declare new exported functions.
3703 * include/grub/sparc64/ieee1275/loader.h: New file.
3704 * include/grub/sparc64/ieee1275/memory.h: Likewise.
3705 * include/grub/sparc64/kernel.h: Likewise.
3706 * loader/sparc64/ieee1275/linux.c: Likewise.
3708 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
3709 (grub_fstest_SOURCES): Likewise.
3711 * util/hostdisk.c (make_device_name): Do not make any assumptions
3712 about the length of drive names.
3714 * kern/dl.c (grub_dl_load_file): Close file immediately when
3715 we are done using it.
3717 2009-04-12 David S. Miller <davem@davemloft.net>
3719 * kern/misc.c (grub_ltoa): Fix cast when handling negative
3720 values. Noticed by Pavel Roskin.
3722 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
3725 * genmk.rb: Add more flexible image type specification, also
3726 pass --strip-unneeded to objcopy.
3727 * conf/i386-pc.rmk: Use *_FORMAT.
3728 * conf/i386-pc.mk: Rebuilt.
3730 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
3731 (OFDISK_HASH_SZ): Define.
3732 (ofdisk_hash): New hash table.
3733 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
3734 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
3735 instead of device phandle which is not unique.
3737 * kern/sparc64/ieee1275/init.c: Delete, replace with...
3738 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
3739 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
3740 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
3741 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
3742 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
3743 GRUB_KERNEL_MACHINE_DATA_END): Define.
3744 (grub_kernel_image_size, grub_total_module_size): Declare.
3746 2009-04-12 Pavel Roskin <proski@gnu.org>
3748 * configure.ac: Change the logic when we check for target tools.
3749 Do it when the target is specified and it's different from the
3750 specified value of the host.
3752 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
3754 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
3755 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
3756 GNU/kFreeBSD. Check if a device is a character device. Use
3757 DIOCGMEDIASIZE to get the size.
3758 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
3759 support for GNU/kFreeBSD.
3760 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
3761 is a character device instead of a block device. Add support for
3762 FreeBSD device names.
3764 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
3765 is a character device instead of a block device.
3767 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
3768 is a character device instead of a block device.
3770 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
3772 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
3773 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
3774 FreeBSD. Check if a device is a character device. Use
3775 DIOCGMEDIASIZE to get the size.
3776 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
3777 support for FreeBSD.
3778 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
3779 is a character device instead of a block device. Add support for
3780 FreeBSD device names.
3782 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
3783 a character device instead of a block device.
3784 (grub_util_check_char_device): New function.
3786 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
3787 a character device instead of a block device.
3789 * include/grub/util/getroot.h (grub_util_check_char_device): New
3792 2009-04-11 David S. Miller <davem@davemloft.net>
3794 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
3796 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
3797 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
3798 function, if present.
3799 (__bswapdi2): Likewise.
3801 * include/grub/sparc64/ieee1275/boot.h: New file.
3802 * boot/sparc64/ieee1275/boot.S: Likewise.
3803 * boot/sparc64/ieee1275/diskboot.S: Likewise.
3805 * kern/misc.c (grub_ltoa): New function.
3806 (grub_vsprintf): Use it to format 'long' integers.
3808 2009-04-10 David S. Miller <davem@davemloft.net>
3810 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
3811 slots are of type grub_ieee1275_cell_t.
3812 (grub_nand_read): Likewise.
3813 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
3814 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
3815 macros are used to compare values in arg/ret block of the call.
3816 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
3817 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
3818 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
3819 grub_ieee1275_instance_to_path, grub_ieee1275_write,
3820 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
3821 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
3822 grub_ieee1275_close, grub_ieee1275_set_property,
3823 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
3824 grub_ieee1275_cell_t.
3825 * kern/ieee1275/openfw.c (grub_map): Likewise.
3826 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
3827 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
3829 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
3830 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
3831 (grub_devalias_iterate): Likewise.
3833 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
3837 * fs/ufs.c (INODE_NBLOCKS): new definition
3838 (struct grub_ufs_dirent): added fields for non-BSD dirents
3839 (grub_ufs_get_file_block): fixed double indirect handling
3840 (grub_ufs_lookup_symlink): use more robust way to determine whether
3842 (grub_ufs_find_file): support for non-BSD dirents
3843 (grub_ufs_dir): support for non-BSD dirents
3845 2009-04-10 Bean <bean123ch@gnail.com>
3847 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
3848 attribute, otherwise the size would be wrong for i386 platform.
3850 * include/grub/pci.h (grub_pci_read_word): New inline function.
3851 (grub_pci_read_byte): Likewise.
3852 (grub_pci_write): Likewise.
3853 (grub_pci_write_word): Likewise.
3854 (grub_pci_write_byte): Likewise.
3856 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
3858 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
3859 (find_framebuf): Scan pci to locate the frame buffer address.
3861 * commands/efi/fixvideo.c: New file.
3863 * commands/efi/loadbios.c: Likewise.
3865 * commands/memrw.c: Likewise.
3867 * util/grub-dumpbios.in: Likewise.
3869 * conf/common.rmk (grub-dumpbios): New utility.
3870 (pkglib_MODULES): New module memrw.mod.
3871 (memrw_mod_SOURCE): New macro.
3872 (memrw_mod_CFLAGS): Likewise.
3873 (memrw_mod_LDFLAGS): Likewise.
3875 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
3877 (loadbios_mod_SOURCE): New macro.
3878 (loadbios_mod_CFLAGS): Likewise.
3879 (loadbios_mod_LDFLAGS): Likewise.
3880 (fixvideo_mod_SOURCE): Likewise.
3881 (fixvideo_mod_CFLAGS): Likewise.
3882 (fixvideo_mod_LDFLAGS): Likewise.
3884 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
3886 (loadbios_mod_SOURCE): New macro.
3887 (loadbios_mod_CFLAGS): Likewise.
3888 (loadbios_mod_LDFLAGS): Likewise.
3889 (fixvideo_mod_SOURCE): Likewise.
3890 (fixvideo_mod_CFLAGS): Likewise.
3891 (fixvideo_mod_LDFLAGS): Likewise.
3893 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
3895 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
3897 2009-04-07 David S. Miller <davem@davemloft.net>
3899 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
3900 support for R_SPARC_OLO10 relocations. Fix compile warning for
3901 R_SPARC_WDISP30 case.
3902 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
3904 2009-04-06 Pavel Roskin <proski@gnu.org>
3906 * include/grub/misc.h (ARRAY_SIZE): New macro.
3907 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
3909 * loader/i386/linux.c (allocate_pages): Use free_pages().
3910 (grub_linux_unload): Don't use free_pages().
3911 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
3912 wrong index. Treat all other modes as text modes.
3913 (grub_cmd_linux): Initialize vid_mode unconditionally to
3914 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
3916 * commands/help.c (print_command_help): Use cmd->prio, not
3917 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
3919 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
3923 * parttool/pcpart.c: new file
3924 * commands/parttool.c: likewise
3925 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
3926 (parttool_mod_SOURCES): new variable
3927 (parttool_mod_CFLAGS): likewise
3928 (parttool_mod_LDFLAGS): likewise
3929 (pcpart_mod_SOURCES): likewise
3930 (pcpart_mod_CFLAGS): likewise
3931 (pcpart_mod_LDFLAGS): likewise
3932 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
3933 and parttool/pcpart.c
3934 * conf/i386-efi.rmk: likewise
3935 * conf/i386-ieee1275.rmk: likewise
3936 * conf/i386-pc.rmk: likewise
3937 * conf/powerpc-ieee1275.rmk: likewise
3938 * conf/sparc64-ieee1275.rmk: likewise
3939 * conf/x86_64-ieee1275.rmk: likewise
3941 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3943 Support for mtime and further expandability of dir command
3945 * include/grub/lib/datetime.h: moved to ...
3946 * include/grub/datetime.h: ... moved here and added
3947 declaration of grub_unixtime2datetime. All users updated
3948 * include/grub/fs.h: new syntax for dir and mtime functions in
3950 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
3951 and GRUB_FSHELP_FLAGS_MASK
3952 * commands/ls.c (grub_ls_list_files): Write mtime in long format
3953 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
3954 (grub_ext2_mtime): new function
3955 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
3956 (grub_hfsplus_mtime): new function
3957 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
3958 (GRUB_UFS_ATTR_FILE): likewise
3959 (GRUB_UFS_ATTR_LNK): likewise
3960 (struct grub_ufs_sblock): new fields mtime
3961 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3963 (grub_ufs_dir): mtime support
3964 (grub_ufs_mtime): new function
3965 * fs/affs.c (grub_affs_dir): use new dir syntax
3966 * fs/afs.c (grub_afs_dir): likewise
3967 * fs/cpio.c (grub_cpio_dir): likewise
3968 * fs/fat.c (grub_fat_find_dir): likewise
3969 * fs/hfs.c (grub_hfs_dir): likewise
3970 * fs/iso9660.c (grub_iso9660_dir): likewise
3971 * fs/jfs.c (grub_jfs_dir): likewise
3972 * fs/minix.c (grub_minix_dir): likewise
3973 * fs/ntfs.c (grub_ntfs_dir): likewise
3974 * fs/reiserfs.c (grub_reiserfs_dir): likewise
3975 * fs/sfs.c (grub_sfs_dir): likewise
3976 * fs/xfs.c (grub_xfs_dir): likewise
3977 * util/hostfs.c (grub_hostfs_dir): likewise
3978 * lib/datetime.c: moved to ...
3979 * normal/datetime.c: ... moved here
3980 (grub_unixtime2datetime): new function
3981 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
3982 * normal/completion.c (iterate_dir): use new dir syntax
3983 * normal/misc.c (grub_normal_print_device_info): tell the
3984 last modification time of a volume
3985 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
3986 * conf/common.rmk: added lib/datetime.c to ls.mod
3987 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
3988 (normal_mod_SOURCES): likewise
3989 (datetime_mod_SOURCES): Removed lib/datetime.c
3990 * conf/i386-efi.rmk: likewise
3991 * conf/i386-ieee1275.rmk: likewise
3992 * conf/i386-pc.rmk: likewise
3993 * conf/powerpc-ieee1275.rmk: likewise
3994 * conf/sparc64-ieee1275.rmk: likewise
3995 * conf/x86_64-efi.rmk: likewise
3997 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
3999 Trim trailing spaces in FAT label and support mtools-like labels
4001 * fs/fat.c (grub_fat_iterate_dir): New function based
4002 on grub_fat_find_dir
4003 (grub_fat_find_dir): use grub_fat_iterate_dir
4004 (grub_fat_label): likewise
4006 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
4008 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
4010 remove extraneous kernel_elf_HEADERS
4012 2009-04-04 Bean <bean123ch@gnail.com>
4014 * include/grub/util/misc.h: Add dummy function fsync for mingw.
4016 * util/misc.c: Likewise.
4018 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
4020 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
4021 instead of grub_printf.
4023 2009-04-03 Robert Millan <rmh@aybabtu.com>
4025 * loader/i386/linux.c (grub_linux_setup_video): Fill
4026 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
4027 values from `mode info' structure instead of hardcoded
4030 2009-04-01 Pavel Roskin <proski@gnu.org>
4032 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
4034 * genmk.rb: Likewise.
4035 * configure.ac: Likewise.
4037 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
4039 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
4040 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
4042 2009-04-01 David S. Miller <davem@davemloft.net>
4044 * normal/sparc64/setjmp.S: Fix setjmp implementation.
4045 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
4046 (grub_setjmp): Mark with 'returns_twice' attribute.
4047 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
4048 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
4049 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
4051 2009-04-01 Robert Millan <rmh@aybabtu.com>
4053 Reapply fix from 2008-07-28 which was accidentally reverted; also
4054 perform the same fix to a similar check in same function.
4056 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4057 with the same number are found, just use issue a warning with
4058 grub_dprintf(), as this error has been reported to be non-fatal.
4060 2009-03-31 Pavel Roskin <proski@gnu.org>
4062 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
4063 for cross-compilation.
4065 2009-03-30 Robert Millan <rmh@aybabtu.com>
4067 Fix i386-ieee1275 build.
4069 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
4072 2009-03-30 Pavel Roskin <proski@gnu.org>
4074 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
4075 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
4076 zero-terminated, rely only on the strlen value. Fix comparison
4077 of strings differing in length.
4079 2009-03-30 Robert Millan <rmh@aybabtu.com>
4081 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
4082 checking for abi version. Improve error messages on BIOS to notify
4083 user about `linux16' command.
4085 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
4089 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
4090 in case of collision
4091 * disk/scsi.c (grub_scsi_open): free scsi in case of error
4093 2009-03-29 Robert Millan <rmh@aybabtu.com>
4095 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
4096 set `vid_mode' accordingly.
4097 (grub_linux_boot): Process `vid_mode' and set video mode.
4099 2009-03-29 Robert Millan <rmh@aybabtu.com>
4101 * util/grub.d/10_linux.in (linux_entry): New function.
4102 Factorize generation of Linux boot entries.
4104 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
4106 Make the format of Environment Block plain text. The boot loader
4107 part is not tested well yet.
4109 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
4112 (usage): Remove "info" and "clear". Add "unset". Update the
4113 description of "set", as this does not delete variables any
4115 (create_envblk_file): Complete rewrite.
4116 (open_envblk_file): Likewise.
4117 (cmd_info): Removed.
4118 (cmd_list): Likewise.
4119 (cmd_set): Likewise.
4120 (cmd_clear): Likewise.
4121 (list_variables): New function.
4122 (write_envblk): Likewise.
4123 (set_variables): Likewise.
4124 (unset_variables): Likewise.
4125 (main): Complete rewrite.
4127 * commands/loadenv.c (buffer): Removed.
4129 (open_envblk_file): New function.
4130 (read_envblk_file): Complete rewrite.
4131 (grub_cmd_load_env): Likewise.
4132 (grub_cmd_list_env): Likewise.
4133 (struct blocklist): New struct.
4134 (free_blocklists): New function.
4135 (check_blocklists): Likewise.
4136 (write_blocklists): Likewise.
4137 (grub_cmd_save_env): Complete rewrite.
4139 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
4140 a plain text signature.
4141 (GRUB_ENVBLK_MAXLEN): Removed.
4142 (struct grub_envblk): Complete rewrite.
4143 (grub_envblk_find): Removed.
4144 (grub_envblk_insert): Likewise.
4145 (grub_envblk_open): New prototype.
4146 (grub_envblk_set): Likewise.
4147 (grub_envblk_delete): Put const to VALUE.
4148 (grub_envblk_iterate): Put const to NAME and VALUE.
4149 (grub_envblk_close): New prototype.
4150 (grub_envblk_buffer): New inline function.
4151 (grub_envblk_size): Likewise.
4153 * lib/envblk.c: Include grub/mm.h.
4154 (grub_env_find): Removed.
4155 (grub_envblk_open): New function.
4156 (grub_envblk_close): Likewise.
4157 (escaped_value_len): Likewise.
4158 (find_next_line): Likewise.
4159 (grub_envblk_insert): Removed.
4160 (grub_envblk_set): New function.
4161 (grub_envblk_delete): Complete rewrite.
4162 (grub_envblk_iterate): Likewise.
4164 2009-03-28 Robert Millan <rmh@aybabtu.com>
4166 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
4167 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
4168 variables. Use 16-bit loader.
4169 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
4171 * kern/i386/loader.S (grub_linux_boot): Rename to ...
4172 (grub_linux16_boot): ... this. Update all users.
4173 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
4174 (grub_linux_boot): ... this. Update all users.
4176 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
4177 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
4178 commands to `linux16' and `initrd16'.
4179 (GRUB_MOD_FINI(linux)): Rename to ...
4180 (GRUB_MOD_FINI(linux16)): ... this.
4182 2009-03-24 Pavel Roskin <proski@gnu.org>
4184 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
4185 not just for compilation.
4187 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
4189 Move multiboot helper out of kernel
4191 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
4192 `loader/i386/multiboot_helper.S'.
4193 * conf/i386-coreboot.rmk: Likewise
4194 * conf/i386-ieee1275.rmk: Likewise
4196 * kern/i386/loader.S: Move multiboot helpers from here...
4197 * loader/i386/multiboot_helper.S: ...moved here
4198 * include/grub/i386/loader.h: Move declarations of multiboot
4199 helpers from here...
4200 * include/grub/i386/multiboot.h: ...moved here
4201 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
4203 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
4205 * kern/env.c (grub_env_context_open): Added an argument to specify
4206 whether a new context inherits exported variables from current
4207 one. This is useful when making a sandbox to interpret a config
4209 All callers updated.
4211 * include/grub/env.h (grub_env_context_open): Updated the prototype.
4213 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
4215 * kern/env.c (grub_env_context_close): Fix memory leaks.
4217 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
4219 * normal/main.c (grub_normal_execute): Added an argument
4220 BATCH to specify if an interactive interface should be provided
4221 after reading a config file.
4222 All callers updated.
4223 (read_command_list): Prevent being executed twice.
4224 (read_fs_list): Likewise.
4226 * include/grub/normal.h (grub_normal_execute): Updated the
4229 2009-03-22 Pavel Roskin <proski@gno.org>
4231 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
4233 * kern/i386/pc/startup.S: Likewise.
4234 * kern/i386/efi/startup.S: Likewise.
4235 * kern/i386/ieee1275/startup.S: Likewise.
4236 * kern/i386/coreboot/startup.S: Likewise.
4237 * kern/x86_64/efi/startup.S: Likewise.
4239 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
4240 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
4241 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
4243 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
4245 Bugfixes in multiboot for bugs uncovered by solaris kernel.
4247 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
4249 Use vaddr of correct segment for entry_point.
4251 2009-03-21 Bean <bean123ch@gmail.com>
4253 * commands/blocklist.c: Add include file <grub/command.h>, remove
4254 <grub/normal.h> and <grub/arg.h>.
4255 (grub_cmd_blocklist): Use the new command interface.
4256 (GRUB_MOD_INIT): Likewise.
4257 (GRUB_MOD_FINI): Likewise.
4258 * commands/boot.c: Likewise.
4259 * commands/cat.c: Likewise.
4260 * commands/cmp.c: Likewise.
4261 * commands/configfile.c: Likewise.
4262 * commands/crc.c: Likewise.
4263 * commands/echo.c: Likewise.
4264 * commands/halt.c: Likewise.
4265 * commands/handler.c: Likewise.
4266 * commands/hdparm.c: Likewise.
4267 * commands/help.c: Likewise.
4268 * commands/hexdump.c: Likewise.
4269 * commands/loadenv.c: Likewise.
4270 * commands/ls.c: Likewise.
4271 * commands/lsmmap.c: Likewise.
4272 * commands/lspci.c: Likewise.
4273 * commands/loadenv.c: Likewise.
4274 * commands/read.c: Likewise.
4275 * commands/reboot.c: Likewise.
4276 * commands/search.c: Likewise.
4277 * commands/sleep.c: Likewise.
4278 * commands/test.c: Likewise.
4279 * commands/usbtest.c: Likewise.
4280 * commands/videotest.c: Likewise.
4281 * commands/i386/cpuid.c: Likewise.
4282 * commands/i386/pc/halt.c: Likewise.
4283 * commands/i386/pc/play.c: Likewise.
4284 * commands/i386/pc/pxecmd.c: Likewise.
4285 * commands/i386/pc/vbeinfo.c: Likewise.
4286 * commands/i386/pc/vbetest.c: Likewise.
4287 * commands/ieee1275/suspend.c: Likewise.
4288 * disk/loopback.c: Likewise.
4289 * font/font_cmd.c: Likewise.
4290 * hello/hello.c: Likewise.
4291 * loader/efi/appleloader.c: Likewise.
4292 * loader/efi/chainloader.c: Likewise.
4293 * loader/i386/bsd.c: Likewise.
4294 * loader/i386/efi/linux.c: Likewise.
4295 * loader/i386/ieee1275/linux.c: Likewise.
4296 * loader/i386/linux.c: Likewise.
4297 * loader/i386/pc/chainloader.c: Likewise.
4298 * loader/i386/pc/linux.c: Likewise.
4299 * loader/powerpc/ieee1275/linux.c: Likewise.
4300 * loader/multiboot_loader.c: Likewise.
4301 * term/gfxterm.c: Likewise.
4302 * term/i386/pc/serial.c: Likewise.
4303 * term/terminfo.c: Likewise.
4305 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
4306 * term/i386/pc/vga.c: Likewise.
4307 * video/readers/jpeg.c: Likewise.
4308 * video/readers/png.c: Likewise.
4309 * video/readers/tga.c: Likewise.
4311 * util/grub-fstest (cmd_loopback): Removed.
4312 (cmd_blocklist): Likewise.
4314 (grub_register_command): Likewise.
4315 (grub_unregister_command): Likewise.
4316 (execute_command): Use grub_command_find to locate command and execute
4319 * include/grub/efi/chainloader.h: Removed.
4320 * loader/efi/chainloader_normal.c: Likewise.
4321 * loader/i386/bsd_normal.c: Likewise.
4322 * loader/i386/pc/chainloader_normal.c: Likewise.
4323 * loader/i386/pc/multiboot_normal.c: Likewise.
4324 * loader/linux_normal.c: Likewise.
4325 * loader/multiboot_loader_normal.c: Likewise.
4326 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4328 * gencmdlist.sh: Scan new registration command grub_register_extcmd
4329 and grub_register_command_p1.
4331 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
4332 kern/command.c, lib/arg.c and commands/extcmd.c.
4333 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
4334 (minicmd_mod_SOURCES): New variable.
4335 (minicmd_mod_CFLAGS): Likewise.
4336 (minicmd_mod_LDFLAGS): Likewise.
4337 (extcmd_mod_SOURCES): Likewise.
4338 (extcmd_mod_CFLAGS): Likewise.
4339 (extcmd_mod_LDFLAGS): Likewise.
4340 (boot_mod_SOURCES): Removed.
4341 (boot_mod_CFLAGS): Likewise.
4342 (boot_mod_LDFLAGS): Likewise.
4344 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
4346 (kernel_img_HEADERS): Add command.h.
4347 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
4348 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
4350 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
4351 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
4352 remove the corresponding normal mode command.
4353 (normal_mod_SOURCES): Remove normal/arg.c.
4354 * conf/i386-coreboot.rmk: Likewise.
4355 * conf/i386-efi.rmk: Likewise.
4356 * conf/i386-ieee1275.rmk: Likewise.
4357 * conf/powerpc-ieee1275.rmk: Likewise.
4358 * conf/x86_64-efi.rmk: Likewise.
4360 * include/grub/arg.h: Move from here ...
4361 * include/grub/lib/arg.h: ... to here.
4363 * normal/arg.c: Move from here ...
4364 * lib/arg.c: ... to here.
4366 * commands/extcmd.c: New file.
4367 * commands/minicmd.c: Likewise.
4368 * include/grub/command.h: Likewise.
4369 * include/grub/extcmd.h: Likewise.
4370 * kern/command.c: Likewise.
4371 * kern/corecmd.c: Likewise.
4373 * kern/list.c (grub_list_iterate): Return int instead of void.
4374 (grub_list_insert): New function.
4375 (grub_prio_list_insert): Likewise.
4377 * kern/rescue.c (grub_rescue_command): Removed.
4378 (grub_rescue_command_list): Likewise.
4379 (grub_rescue_register_command): Likewise.
4380 (grub_rescue_unregister_command): Likewise.
4381 (grub_rescue_cmd_boot): Move to minicmd.c
4382 (grub_rescue_cmd_help): Likewise.
4383 (grub_rescue_cmd_info): Likewise.
4384 (grub_rescue_cmd_boot): Likewise.
4385 (grub_rescue_cmd_testload): Likewise.
4386 (grub_rescue_cmd_dump): Likewise.
4387 (grub_rescue_cmd_rmmod): Likewise.
4388 (grub_rescue_cmd_lsmod): Likewise.
4389 (grub_rescue_cmd_exit): Likewise.
4390 (grub_rescue_print_devices): Moved to corecmd.c.
4391 (grub_rescue_print_files): Likewise.
4392 (grub_rescue_cmd_ls): Likewise.
4393 (grub_rescue_cmd_insmod): Likewise.
4394 (grub_rescue_cmd_set): Likewise.
4395 (grub_rescue_cmd_unset): Likewise.
4396 (attempt_normal_mode): Use grub_command_find to get normal module.
4397 (grub_enter_rescue_mode): Use grub_register_core_commands to register
4398 commands, remove grub_rescue_register_command calls.
4400 * normal/command.c (grub_register_command): Removed.
4401 (grub_unregister_command): Likewise.
4402 (grub_command_find): Likewise.
4403 (grub_iterate_commands): Likewise.
4404 (rescue_command): Likewise.
4405 (export_command): Moved to corecmd.c.
4406 (set_command): Removed.
4407 (unset_command): Likewise.
4408 (insmod_command): Likewise.
4409 (rmmod_command): Likewise.
4410 (lsmod_command): Likewise.
4411 (grub_command_init): Likewise.
4413 * normal/completion.c (iterate_command): Use cmd->prio to check for
4415 (complete_arguments): Use grub_extcmd_t structure to find options.
4416 (grub_normal_do_completion): Change function grub_iterate_commands to
4417 grub_command_iterate.
4419 * normal/execute.c (grub_script_execute_cmd): No need to parse
4422 * normal/main.c (grub_dyncmd_dispatcher): New function.
4423 (read_command_list): Register unload commands as dyncmd.
4424 (grub_cmd_normal): Use new command interface, register rescue,
4425 unregister normal at entry, register normal, unregister rescue at exit.
4427 * include/grub/list.h (grub_list_test_t): New type.
4428 (grub_list_iterate): Return int instead of void.
4429 (grub_list_insert): New function.
4430 (GRUB_AS_NAMED_LIST_P): New macro.
4431 (GRUB_AS_PRIO_LIST): Likewise.
4432 (GRUB_AS_PRIO_LIST_P): Likewise.
4433 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
4434 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
4435 (grub_prio_list): New structure.
4436 (grub_prio_list_insert): New function.
4437 (grub_prio_list_remove): New inline function.
4439 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
4440 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
4441 (GRUB_COMMAND_FLAG_MENU): Likewise.
4442 (GRUB_COMMAND_FLAG_BOTH): Likewise.
4443 (GRUB_COMMAND_FLAG_TITLE): Likewise.
4444 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
4445 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
4446 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
4447 (grub_command): Likewise.
4448 (grub_register_command): Likewise.
4449 (grub_command_find): Likewise.
4450 (grub_iterate_commands): Likewise.
4451 (grub_command_init): Likewise.
4452 (grub_arg_parse): Likewise.
4453 (grub_arg_show_help): Likewise.
4455 * include/grub/rescue.h (grub_rescue_register_command): Removed.
4456 (grub_rescue_unregister_command): Likewise.
4458 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
4459 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
4460 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
4462 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
4463 grub_rescue_cmd_initrd.
4464 * include/grub/i386/loader.h: Likewise.
4465 * include/grub/x86_64/loader.h: Likewise.
4467 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
4469 2009-03-21 Bean <bean123ch@gmail.com>
4471 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
4472 instead of stat in mingw environment.
4474 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
4476 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
4478 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
4481 2009-03-21 Bean <bean123ch@gmail.com>
4483 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
4486 2009-03-18 Michel Dänzer <michel@daenzer.net>
4488 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
4489 checking inode flags for EXT4_EXTENTS_FLAG.
4491 2009-03-18 Robert Millan <rmh@aybabtu.com>
4493 * loader/i386/linux.c: Include `<grub/video.h>' and
4494 `<grub/i386/pc/vbe.h>'..
4495 (grub_linux_setup_video): New function. Loosely based on the EFI one.
4496 (grub_linux32_boot): Attempt to configure video settings with
4497 grub_linux_setup_video().
4498 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
4499 to avoid grub_console_fini() which would step out of graphical mode
4502 2009-03-14 Robert Millan <rmh@aybabtu.com>
4504 Fix build on powerpc.
4505 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
4507 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
4509 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
4510 background image command.
4512 2009-03-12 Colin D Bennett <colin@gibibit.com>
4514 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
4515 (grub_gfxterm_putchar): Extract pairs of identical calls to
4516 draw_cursor out of conditional blocks.
4518 2009-03-11 Pavel Roskin <proski@gnu.org>
4520 * fs/hfs.c (grub_hfs_strncasecmp): New function.
4521 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
4523 2009-03-11 Robert Millan <rmh@aybabtu.com>
4525 * loader/i386/multiboot_elfxx.c
4526 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
4528 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
4530 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
4533 2009-03-11 Robert Millan <rmh@aybabtu.com>
4535 * loader/i386/multiboot.c (code_size): New variable.
4536 (grub_multiboot): Define offsets by adding to `code_size' rather
4537 than subtracting from `grub_multiboot_payload_size'. Provide
4538 4-byte alignment to MBI and others by increasing
4539 `boot_loader_name_length' appropriately.
4541 * loader/i386/multiboot_elfxx.c
4542 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
4544 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
4546 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
4549 2009-03-08 Robert Millan <rmh@aybabtu.com>
4551 Make loader/i386/linux.c usable on i386-pc again.
4553 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
4555 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
4558 2009-03-07 Bean <bean123ch@gmail.com>
4560 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
4563 2009-03-06 Robert Millan <rmh@aybabtu.com>
4565 Fix display issue on terminals with screen size other than 80x25
4566 (e.g. gfxterm with resolution higher than 640x480).
4568 * normal/main.c (grub_normal_init_page): Display title text in a
4569 position relative to the center of the terminal instead of relying
4570 on a hardcoded offset.
4572 2009-03-04 Robert Millan <rmh@aybabtu.com>
4574 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
4577 * Makefile.in (host_kernel): New variable.
4578 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
4579 scripts instead of just the windows one.
4580 * configure.ac: Initialize and AC_SUBST `host_kernel'.
4582 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
4584 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
4586 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4587 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4588 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4589 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4590 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4591 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4593 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
4595 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
4596 or if there's no space for the disk label and print the partition number on a
4599 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
4601 * util/misc.c: Include <time.h>.
4602 (grub_millisleep): New function.
4604 2009-03-04 Bean <bean123ch@gmail.com>
4606 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
4607 another option -mno-red-zone.
4609 * commands/handler.c: Change module description.
4611 * kern/handler.c: Add missing space at the end of description line.
4613 * kern/list.c: Likewise.
4615 2009-03-03 Robert Millan <rmh@aybabtu.com>
4617 Move more components to the relocation area, and fix mbi pointer
4618 handling to use the destination rather than the origin (thanks to
4619 Vladimir Serbinenko for spotting).
4621 * loader/i386/multiboot.c (mbi_dest): New variable.
4622 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
4623 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
4626 2009-03-01 Bean <bean123ch@gmail.com>
4628 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
4629 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
4630 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
4631 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
4633 * loader/i386/efi/linux.c (acpi_guid): New variable.
4634 (acpi_guid): Likewise.
4635 (EBDA_SEG_ADDR): New constant.
4636 (LOW_MEM_ADDR): Likewise.
4637 (FAKE_EBDA_SEG): Likewise.
4638 (fake_bios_data): New function.
4639 (grub_linux_boot): Call fake_bios_data.
4641 2009-03-01 Bean <bean123ch@gmail.com>
4643 * commands/terminal.c: Removed.
4645 * commands/handler.c: New file.
4647 * include/grub/list.h: Likewise.
4649 * include/grub/handler.h: Likewise.
4651 * kern/list.c: Likewise.
4653 * kern/handler.c: Likewise.
4655 * kern/term.h: Include header file <grub/handler.h>.
4656 (grub_term_input): Move next field to the beginning.
4657 (grub_term_output): Likewise.
4658 (grub_term_input_class): New variable.
4659 (grub_term_output_class): Likewise.
4660 (grub_term_register_input): Changed to inline function.
4661 (grub_term_register_output): Likewise.
4662 (grub_term_unregister_input): Likewise.
4663 (grub_term_unregister_output): Likewise.
4664 (grub_term_set_current_input): Likewise.
4665 (grub_term_set_current_output): Likewise.
4666 (grub_term_get_current_input): Likewise.
4667 (grub_term_get_current_output): Likewise.
4668 (grub_term_iterate_input): Removed.
4669 (grub_term_iterate_output): Likewise.
4671 * kern/term.c (grub_term_list_input): Removed.
4672 (grub_term_list_output): Likewise.
4673 (grub_term_input_class): New variable.
4674 (grub_term_output_class): Likewise.
4675 (grub_cur_term_input): Change variable as macro.
4676 (grub_cur_term_output): Likewise.
4677 (grub_term_register_input): Removed.
4678 (grub_term_register_output): Likewise.
4679 (grub_term_unregister_input): Likewise.
4680 (grub_term_unregister_output): Likewise.
4681 (grub_term_set_current_input): Likewise.
4682 (grub_term_set_current_output): Likewise.
4683 (grub_term_iterate_input): Likewise.
4684 (grub_term_iterate_output): Likewise.
4685 (grub_term_get_current_input): Likewise.
4686 (grub_term_get_current_output): Likewise.
4688 * util/grub-editenv.c: Include header file <grub/handler.h>.
4689 (grub_term_get_current_input): Removed.
4690 (grub_term_get_current_output): Likewise.
4691 (grub_term_input_class): New variable.
4692 (grub_term_output_class): Likewise.
4694 * util/grub-fstest.c (grub_term_get_current_input): Removed.
4695 (grub_term_get_current_output): Likewise.
4696 (grub_term_input_class): New variable.
4697 (grub_term_output_class): Likewise.
4699 * util/grub-probe.c (grub_term_get_current_input): Removed.
4700 (grub_term_get_current_output): Likewise.
4701 (grub_term_input_class): New variable.
4702 (grub_term_output_class): Likewise.
4704 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
4705 (grub_term_get_current_output): Likewise.
4706 (grub_term_input_class): New variable.
4707 (grub_term_output_class): Likewise.
4709 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
4710 (terminal_mod_SOURCES): Likewise.
4711 (terminal_mod_CFLAGS): Likewise.
4712 (terminal_mod_LDFLAGS): Likewise.
4714 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
4716 (kernel_img_SOURCES): Add list.c and handler.c.
4717 (kernel_img_HEADERS): Add list.h and handler.h.
4719 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
4721 (kernel_mod_SOURCES): Add list.c and handler.c.
4722 (kernel_mod_HEADERS): Add list.h and handler.h.
4724 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
4726 (kernel_elf_SOURCES): Add list.c and handler.c.
4727 (kernel_elf_HEADERS): Add list.h and handler.h.
4729 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
4731 (kernel_elf_SOURCES): Add list.c and handler.c.
4732 (kernel_elf_HEADERS): Add list.h and handler.h.
4734 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
4736 (kernel_mod_SOURCES): Add list.c and handler.c.
4737 (kernel_mod_HEADERS): Add list.h and handler.h.
4739 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
4741 (kernel_elf_SOURCES): Add list.c and handler.c.
4742 (kernel_elf_HEADERS): Add list.h and handler.h.
4744 2009-02-27 Robert Millan <rmh@aybabtu.com>
4746 Factorize elf32 / elf64 code in Multiboot loader. This will
4747 prevent it from getting out of sync again.
4749 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
4750 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
4751 grub_multiboot_load_elf64): Move from here ...
4752 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
4753 grub_multiboot_load_elf): ... to here (new file).
4755 2009-02-27 Robert Millan <rmh@aybabtu.com>
4757 * util/grub.d/10_linux.in: Rename "single-user mode" to
4760 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
4762 Don't leak in SCSI code.
4763 * disk/scsi.c (grub_scsi_close): free `scsi'.
4765 2009-02-27 Robert Millan <rmh@aybabtu.com>
4767 * loader/i386/pc/multiboot.c: Move from here ...
4768 * loader/i386/multiboot.c: ... to here. Update all users.
4770 2009-02-27 Robert Millan <rmh@aybabtu.com>
4772 Patch from Alexandre Bique <bique.alexandre@gmail.com>
4773 * util/i386/pc/grub-setup.c (setup): Fix directory path.
4775 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
4777 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
4780 2009-02-27 Robert Millan <rmh@aybabtu.com>
4782 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
4783 `0x' qualifier as 0 when base is specified as parameter).
4785 2009-02-24 Bean <bean123ch@gmail.com>
4787 * configure.ac: Check for -mcmodel=large in x86_64 target.
4789 * include/grub/efi/api.h (efi_call_10): New macro.
4790 (efi_wrap_10): New function.
4792 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
4793 (GRUB_PE32_REL_BASED_HIGH): Likewise.
4794 (GRUB_PE32_REL_BASED_LOW): Likewise.
4795 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
4796 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
4797 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
4798 (GRUB_PE32_REL_BASED_SECTION): Likewise.
4799 (GRUB_PE32_REL_BASED_REL): Likewise.
4800 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
4801 (GRUB_PE32_REL_BASED_DIR64): Likewise.
4802 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
4804 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
4807 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
4808 (efi_wrap_10): New function.
4810 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
4812 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
4813 MB/MBP model (NV chipset).
4814 (devdata_devs): Add devpath_5 to the list.
4816 * load/i386/efi/linux.c (video_base): Remove variable.
4817 (RGB_MASK): New macro.
4818 (RGB_MAGIC): Likewise.
4819 (LINE_MIN): Likewise.
4820 (LINE_MAX): Likewise.
4821 (FBTEST_STEP): Likewise.
4822 (FBTEST_COUNT): Likewise.
4823 (fb_list): New variable.
4824 (grub_find_video_card): Remove function.
4825 (find_framebuf): New function.
4826 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
4829 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
4832 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
4834 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
4836 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
4839 2009-02-22 Robert Millan <rmh@aybabtu.com>
4841 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
4842 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
4843 in our relocation, instead of using it directly from heap. Also
4844 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
4846 2009-02-21 Robert Millan <rmh@aybabtu.com>
4848 Implement USB keyboard support (based on patch by Marco Gerards)
4850 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
4851 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
4852 (usb_keyboard_mod_LDFLAGS): New variables.
4854 * term/usb_keyboard.c: New file.
4856 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
4858 Corrected wrong declaration
4860 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
4862 2009-02-14 Christian Franke <franke@computer.org>
4864 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
4865 (grub_lspci_iter): Print class code and programming interface byte.
4867 2009-02-14 Christian Franke <franke@computer.org>
4869 * gendistlist.sh: Ignore `.svn' directories.
4871 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
4873 * fs/fat.c: Add 2009 to Copyright line.
4875 2009-02-14 Christian Franke <franke@computer.org>
4877 * commands/hdparm.c: New file. Provides `hdparm' command
4878 which sends ATA commands via grub_disk_ata_pass_through ().
4880 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
4882 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
4883 and <grub/cpu/io.h> to include/grub/ata.h.
4884 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
4885 (GRUB_CDROM_SECTOR_SIZE): Remove.
4886 (GRUB_ATA_*): Move to include/grub/ata.h.
4887 (GRUB_ATAPI_*): Likewise.
4888 (enum grub_ata_commands): Likewise.
4889 (enum grub_ata_timeout_milliseconds): Likewise.
4890 (struct grub_ata_device): Likewise.
4891 (grub_ata_regset): Likewise.
4892 (grub_ata_regget): Likewise.
4893 (grub_ata_regset2): Likewise.
4894 (grub_ata_regget2): Likewise.
4895 (grub_ata_check_ready): Likewise.
4896 (grub_ata_wait_not_busy): Remove static, exported in
4898 (grub_ata_wait_drq): Likewise.
4899 (grub_ata_pio_read): Likewise.
4901 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
4902 function for hdparm.mod.
4904 * include/grub/ata.h: New file, contains declarations from
4906 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
4908 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
4909 (grub_disk_ata_pass_through): New exported variable.
4911 * kern/disk.c (grub_disk_ata_pass_through): New variable.
4913 2009-02-13 Colin D Bennett <colin@gibibit.com>
4915 Support multiple fallback entries, and provide an API to support
4916 executing default+fallback menu entries. Renamed the `terminal' menu
4919 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
4920 variable declaration.
4921 (grub_menu_execute_callback): New structure declaration.
4922 (grub_menu_execute_callback_t): New typedef.
4923 (grub_menu_execute_with_fallback): New function declaration.
4924 (grub_menu_get_entry): Likewise.
4925 (grub_menu_get_timeout): Likewise.
4926 (grub_menu_set_timeout): Likewise.
4928 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
4930 * normal/menu.c (grub_wait_after_message): Moved to
4931 `normal/menu_text.c'.
4932 (draw_border): Likewise.
4933 (print_message): Likewise.
4934 (print_entry): Likewise.
4935 (print_entries): Likewise.
4936 (grub_menu_init_page): Likewise.
4937 (get_entry_number): Likewise.
4938 (print_timeout): Likewise.
4939 (run_menu): Likewise.
4940 (grub_menu_execute_entry): Likewise.
4941 (show_text_menu): Likewise.
4942 (get_and_remove_first_entry_number): New function.
4943 (grub_menu_execute_with_fallback): Likewise.
4944 (get_entry): Renamed to ...
4945 (grub_menu_get_entry): .. this and made it global.
4946 (get_timeout): Renamed to ...
4947 (grub_menu_get_timeout): ... this and made it global.
4948 (set_timeout): Renamed to ...
4949 (grub_menu_set_timeout): ... this and made it global.
4950 (grub_normal_terminal_menu_viewer): Renamed to ...
4951 (grub_normal_text_menu_viewer): ... this.
4953 * normal/menu_text.c: New file. Extracted text-menu-specific code
4956 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
4957 (normal_mod_SOURCES): Likewise.
4959 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4960 (normal_mod_SOURCES): Likewise.
4962 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4963 (normal_mod_SOURCES): Likewise.
4965 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4966 (normal_mod_SOURCES): Likewise.
4968 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4969 (normal_mod_SOURCES): Likewise.
4971 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4972 (normal_mod_SOURCES): Likewise.
4974 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4975 (normal_mod_SOURCES): Likewise.
4977 2009-02-11 Robert Millan <rmh@aybabtu.com>
4979 * util/grub.d/00_header.in: Update old reference to `font' command.
4981 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
4983 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4985 Based on patch from Javier MartÃn.
4987 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
4989 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
4990 to avoid false positives with FAT.
4991 (grub_fstest_SOURCES): Likewise.
4992 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4993 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4994 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4995 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4996 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4997 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4999 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
5001 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
5002 bpb.version_specific.fat12_or_fat16.fstype and
5003 bpb.version_specific.fat32.fstype.
5005 2009-02-08 Robert Millan <rmh@aybabtu.com>
5007 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
5009 2009-02-08 Robert Millan <rmh@aybabtu.com>
5011 * Makefile.in (host_os, host_cpu): New variables.
5012 (target_os): Remove. Update all users.
5014 2009-02-08 Marco Gerards <marco@gnu.org>
5016 * Makefile.in (enable_grub_emu_usb): New variable.
5017 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
5018 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
5019 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
5020 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
5021 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
5022 `usbtest.mod' and `usbms.mod'.
5023 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
5024 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
5025 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
5026 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
5027 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
5030 * disk/usbms.c: New file.
5032 * include/grub/usb.h: Likewise.
5034 * include/grub/usbtrans.h: Likewise.
5036 * include/grub/usbdesc.h: Likewise.
5038 * bus/usb/usbtrans.c: Likewise.
5040 * bus/usb/ohci.c: Likewise.
5042 * bus/usb/uhci.c: Likewise.
5044 * bus/usb/usbhub.c: Likewise.
5046 * bus/usb/usb.c: Likewise.
5048 * commands/usbtest.c: Likewise.
5050 * util/usb.c: Likewise.
5052 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
5054 * configure.ac: Test for libusb presence.
5056 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
5058 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
5060 * kern/mm.c: Add more comments.
5062 2009-02-08 Robert Millan <rmh@aybabtu.com>
5064 Patch from Javier MartÃn.
5065 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
5066 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
5068 2009-02-08 Robert Millan <rmh@aybabtu.com>
5070 * fs/cpio.c: Split tar functionality to ...
5071 * fs/tar.c: ... here (new file). Update all users.
5073 2009-02-07 Robert Millan <rmh@aybabtu.com>
5075 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
5076 backward-incompatible features.
5078 Based on patch from Javier MartÃn, with some adjustments.
5080 2009-02-07 Michael Scherer <misc@mandriva.org>
5082 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
5084 2009-02-07 Robert Millan <rmh@aybabtu.com>
5086 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
5087 position of `disk/lvm.c' to ensure grub_init_all() always picks it
5088 after the RAID stuff.
5090 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
5092 Fixes problem when running vbetest command as reported by
5093 Vladimir Serbinenko <phcoder@gmail.com>.
5095 * (grub_vbe_set_video_mode): Fixed problem with text modes.
5097 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
5099 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
5100 /dev/md/NpN style mdraid devices.
5102 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
5104 * util/unifont2pff.rb: Remove.
5106 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
5108 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
5111 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
5113 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
5114 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5115 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5116 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
5117 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5118 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5119 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5121 2009-02-02 Christian Franke <franke@computer.org>
5123 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
5125 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
5127 * INSTALL: Note that we now require at least autoconf 2.59 and
5128 that LZO is optional.
5130 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
5132 Base on patch on bug #24154 created by Tomas Tintera
5135 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
5137 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
5139 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
5140 <bero@arklinux.org>.
5142 * normal/parser.y (script_init): Add missing semicolon.
5144 2009-01-31 Colin D Bennett <colin@gibibit.com>
5146 * normal/main.c: Add include to grub/menu_viewer.h.
5147 (free_menu_entry_classes): Added.
5148 (grub_normal_menu_addentry): Added class property handling.
5149 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
5150 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
5152 * normal/menu_viewer.c: New file.
5154 * normal/menu.c (run_menu_entry): Renamed to ...
5155 (grub_menu_execute_entry): ... this and made it as global.
5156 (grub_menu_run): Renamed to ...
5157 (show_text_menu): ... this and made it local.
5158 (show_text_menu): Adapt to new function names.
5159 (grub_normal_terminal_menu_viewer): New global variable.
5161 * include/grub/menu.h: New file.
5163 * include/grub/menu_viewer.h: New file.
5165 * include/grub/normal.h: Added include to grub/menu.h.
5166 (grub_menu_entry): Moved to include/grub/menu.h.
5167 (grub_menu_entry_t): Likewise.
5168 (grub_menu): Likewise.
5169 (grub_menu_t): Likewise.
5170 (grub_normal_terminal_menu_viewer): Added.
5171 (grub_menu_execute_entry): Likewise.
5172 (grub_menu_run): Removed.
5174 * DISTLIST: Added include/grub/menu.h.
5175 Added include/grub/menu_viewer.h.
5176 Added normal/menu_viewer.c.
5178 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
5180 * normal/execute.c (grub_script_execute_menuentry): Changed to use
5181 arglist for menutitle arguments.
5183 * normal/main.c (grub_normal_menu_addentry): Likewise.
5185 * normal/parser.y (menuentry): Likewise.
5187 * normal/script.c (grub_script_create_cmdmenu): Likewise.
5189 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
5190 (grub_script_create_cmdmenu): Likewise.
5192 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
5194 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
5197 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
5199 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
5201 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
5203 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5205 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5207 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
5209 2009-01-30 Christian Franke <franke@computer.org>
5211 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
5212 in option help text.
5214 2009-01-27 Pavel Roskin <proski@gnu.org>
5216 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
5218 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
5220 * commands/lsmmap.c: Add include to grub/machine/memory.h.
5222 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
5224 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
5225 unregister function.
5227 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
5229 * disk/scsi.c (grub_scsi_read): Fix sign problem.
5231 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
5233 * util/grub-mkfont.c (usage): Fix typo.
5235 * util/elf/grub-mkimage.c (load_modules): Fix warning.
5237 2009-01-26 Daniel Mierswa <impulze@impulze.org>
5239 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
5241 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
5243 * kern/misc.c (grub_strcasecmp): New function.
5244 (grub_strcasecmp): Use grub_size_t instead of int for length.
5246 * include/grub/misc.h: Update function prototypes.
5248 2009-01-26 Robert Millan <rmh@aybabtu.com>
5250 * configure.ac: Fix cross-compilation check.
5252 2009-01-22 Christian Franke <franke@computer.org>
5254 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
5255 (precision) digit string. Allow `.format2' without `format1' (width).
5256 Limit input chars for `%s' output to `format2' if specified. This is
5257 compatible with standard printf ().
5259 2009-01-22 Christian Franke <franke@computer.org>
5261 * disk/ata.c (grub_ata_wait_status): Replace by ...
5262 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
5263 other status bits may be invalid while BSY is asserted.
5264 (grub_ata_check_ready): New function.
5265 (grub_ata_cmd): Removed.
5266 (grub_ata_wait_drq): New function.
5267 (grub_ata_strncpy): Remove inline.
5268 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
5269 and error check now done by grub_ata_wait_drq ().
5270 (grub_ata_pio_write): Likewise.
5271 (grub_atapi_identify): Set DEV before check for !BSY. Use
5272 grub_ata_wait_drq () to wait for data.
5273 (grub_ata_device_initialize): Add status register check to
5274 detect missing SATA slave devices. Add debug messages.
5275 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
5276 (grub_atapi_packet): Set DEV before check for !BSY. Replace
5277 transfer loop by grub_ata_pio_write ().
5278 (grub_ata_identify): Set DEV before check for !BSY. Use
5279 grub_ata_wait_drq () to wait for data.
5280 (grub_ata_setaddress): Set DEV before check for !BSY.
5281 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
5282 read/write in one loop. Fix invalid command on write. Fix incomplete
5283 command on (size % batch) == 0. Add missing error check after write of
5284 last block. Add debug messages.
5285 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
5287 2009-01-19 Christian Franke <franke@computer.org>
5289 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
5290 (GRUB_ATAPI_IREASON_*): Likewise.
5291 (grub_ata_pio_write): Fix timeout error return.
5292 (grub_atapi_identify): Add grub_ata_wait () after cmd.
5293 (grub_atapi_wait_drq): New function.
5294 (grub_atapi_packet): New parameter `size'.
5295 Use grub_atapi_wait_drq () and direct write instead of
5296 grub_ata_pio_write ().
5297 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
5298 reads the number of bytes requested by the device for each DRQ
5300 (grub_atapi_write): Remove old implementation, return not
5301 implemented instead.
5303 2009-01-19 Christian Franke <franke@computer.org>
5305 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
5306 of 512 to calculate data size.
5307 (grub_scsi_read12): Likewise.
5308 (grub_scsi_write10): Likewise.
5309 (grub_scsi_write12): Likewise.
5310 (grub_scsi_read): Adjust size according to blocksize.
5311 Add checks for invalid blocksize and unaligned transfer.
5313 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
5315 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
5317 * term/gfxterm.c (write_char): Fix background rendering for wide
5320 2009-01-19 Robert Millan <rmh@aybabtu.com>
5322 * config.guess: Update to latest version from config git.
5323 * config.sub: Likewise.
5325 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
5327 * Makefile.in: Change font compilation to use new grub-mkfont instead
5330 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
5331 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
5332 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5333 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5334 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
5335 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
5336 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
5337 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
5338 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
5340 2009-01-16 Christian Franke <franke@computer.org>
5342 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
5343 (enum grub_ata_timeout_milliseconds): New enum.
5344 (grub_ata_wait_status): Add parameter milliseconds.
5345 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
5346 recovery from timed-out commands.
5347 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
5348 return grub_errno instead of REG_ERROR.
5349 (grub_ata_pio_write): Add parameter milliseconds.
5350 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
5351 Pass milliseconds to grub_ata_wait_status () and
5352 grub_ata_pio_read ().
5353 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
5354 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
5355 grub_ata_wait_status (). Fix IDENTIFY timeout check.
5356 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
5357 It is not suitable for device detection, because DEV bit is ignored,
5358 the command may run too long, and not all devices set the signature
5360 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
5361 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
5362 Fix device selection, DEV bit must be set first to address the registers
5363 of the correct device.
5364 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
5365 grub_ata_pio_read/write ().
5366 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
5367 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
5369 2009-01-13 Carles Pina i Estany <carles@pina.cat>
5371 * util/grub-editenv.c (main): Use fseeko(), not fseek().
5373 2009-01-13 Bean <bean123ch@gmail.com>
5375 * util/grub-mkfont.c (write_font): forget to remove some debug code.
5377 2009-01-13 Bean <bean123ch@gmail.com>
5379 * Makefile.in: (enable_grub_mkfont): New variable.
5380 (freetype_cflags): Likewise.
5381 (freetype_libs): Likewise.
5383 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
5384 (grub_mkfont_SOURCES): New variable.
5385 (grub_mkfont_CFLAGS): Likewise.
5386 (grub_mkfont_LDFLAGS): Likewise.
5388 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
5389 library if `--enable-grub-mkfont' is requested.
5390 (enable_grub_mkfont): New variable.
5391 (freetype_cflags): Likewise.
5392 (freetype_libs): Likewise.
5394 * util/grub-mkfont.c: New file.
5396 2009-01-12 Christian Franke <franke@computer.org>
5398 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
5399 mode check. Fix setting of compat_use[].
5401 2009-01-10 Robert Millan <rmh@aybabtu.com>
5403 Update a few copyright years which we forgot to do in 2008 (only for
5404 files whose changes made in 2008 were copyright-significant)
5406 * Makefile.in: Add 2008 to Copyright line.
5407 * disk/ieee1275/ofdisk.c: Likewise.
5408 * disk/efi/efidisk.c: Likewise.
5409 * kern/dl.c: Likewise.
5410 * kern/sparc64/ieee1275/init.c: Likewise.
5411 * kern/mm.c: Likewise.
5412 * kern/efi/mm.c: Likewise.
5413 * boot/i386/pc/boot.S: Likewise.
5414 * genfslist.sh: Likewise.
5415 * fs/iso9660.c: Likewise.
5416 * fs/hfs.c: Likewise.
5417 * fs/jfs.c: Likewise.
5418 * fs/minix.c: Likewise.
5419 * fs/ufs.c: Likewise.
5420 * gensymlist.sh.in: Likewise.
5421 * genkernsyms.sh.in: Likewise.
5422 * include/grub/misc.h: Likewise.
5423 * include/grub/types.h: Likewise.
5424 * include/grub/symbol.h: Likewise.
5425 * include/grub/elf.h: Likewise.
5426 * include/grub/kernel.h: Likewise.
5427 * include/grub/disk.h: Likewise.
5428 * include/grub/dl.h: Likewise.
5429 * include/grub/i386/linux.h: Likewise.
5430 * include/grub/i386/pc/biosdisk.h: Likewise.
5431 * include/grub/efi/api.h: Likewise.
5432 * include/grub/efi/pe32.h: Likewise.
5433 * include/grub/util/misc.h: Likewise.
5434 * normal/execute.c: Likewise.
5435 * normal/arg.c: Likewise.
5436 * normal/completion.c: Likewise.
5437 * normal/lexer.c: Likewise.
5438 * normal/parser.y: Likewise.
5439 * normal/misc.c: Likewise.
5440 * commands/i386/pc/vbeinfo.c: Likewise.
5441 * commands/hexdump.c: Likewise.
5442 * commands/terminal.c: Likewise.
5443 * commands/ls.c: Likewise.
5444 * commands/help.c: Likewise.
5445 * partmap/pc.c: Likewise.
5446 * loader/efi/chainloader.c: Likewise.
5447 * loader/multiboot_loader.c: Likewise.
5448 * loader/i386/pc/multiboot2.c: Likewise.
5449 * term/efi/console.c: Likewise.
5450 * term/i386/pc/serial.c: Likewise.
5451 * util/lvm.c: Likewise.
5452 * util/console.c: Likewise.
5453 * util/i386/efi/grub-mkimage.c: Likewise.
5454 * util/raid.c: Likewise.
5456 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
5458 * commands/videotest.c: Removed include to grub/machine/memory.h.
5460 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
5461 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
5462 (video_mod_SOURCES): Removed.
5463 (video_mod_CFLAGS): Likewise.
5464 (video_mod_LDFLAGS): Likewise.
5465 (gfxterm_mod_SOURCES): Likewise.
5466 (gfxterm_mod_CFLAGS): Likewise.
5467 (gfxterm_mod_LDFLAGS): Likewise.
5468 (videotest_mod_SOURCES): Likewise.
5469 (videotest_mod_CFLAGS): Likewise.
5470 (videotest_mod_LDFLAGS): Likewise.
5471 (bitmap_mod_SOURCES): Likewise.
5472 (bitmap_mod_CFLAGS): Likewise.
5473 (bitmap_mod_LDFLAGS): Likewise.
5474 (tga_mod_SOURCES): Likewise.
5475 (tga_mod_CFLAGS): Likewise.
5476 (tga_mod_LDFLAGS): Likewise.
5477 (jpeg_mod_SOURCES): Likewise.
5478 (jpeg_mod_CFLAGS): Likewise.
5479 (jpeg_mod_LDFLAGS): Likewise.
5480 (png_mod_SOURCES): Likewise.
5481 (png_mod_CFLAGS): Likewise.
5482 (png_mod_LDFLAGS): Likewise.
5484 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
5485 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
5486 (video_mod_SOURCES): Added.
5487 (video_mod_CFLAGS): Likewise.
5488 (video_mod_LDFLAGS): Likewise.
5489 (videotest_mod_SOURCES): Likewise.
5490 (videotest_mod_CFLAGS): Likewise.
5491 (videotest_mod_LDFLAGS): Likewise.
5492 (bitmap_mod_SOURCES): Likewise.
5493 (bitmap_mod_CFLAGS): Likewise.
5494 (bitmap_mod_LDFLAGS): Likewise.
5495 (tga_mod_SOURCES): Likewise.
5496 (tga_mod_CFLAGS): Likewise.
5497 (tga_mod_LDFLAGS): Likewise.
5498 (jpeg_mod_SOURCES): Likewise.
5499 (jpeg_mod_CFLAGS): Likewise.
5500 (jpeg_mod_LDFLAGS): Likewise.
5501 (png_mod_SOURCES): Likewise.
5502 (png_mod_CFLAGS): Likewise.
5503 (png_mod_LDFLAGS): Likewise.
5504 (gfxterm_mod_SOURCES): Likewise.
5505 (gfxterm_mod_CFLAGS): Likewise.
5506 (gfxterm_mod_LDFLAGS): Likewise.
5508 * term/gfxterm.c: Removed include to grub/machine/memory.h,
5509 grub/machine/console.h.
5511 2009-01-04 Jerone Young <jerone@gmail.com>
5513 Make on screen instructions clearer
5515 Based on patch created by Jidanni <jidanni@jidanni.org>
5517 * normal/menu.c: print clearer instructions on the screen
5519 2009-01-02 Colin D Bennett <colin@gibibit.com>
5523 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
5524 build system and fixed gfxterm.c to work with different sized fonts.
5526 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
5528 * configure: Re-generated.
5530 * DISTLIST: Removed font/manager.c.
5532 Added font/font_cmd.c.
5534 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
5537 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
5539 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
5541 * kern/term.c: Changed users of grub_utf8_to_ucs4.
5543 * normal/menu.c: Likewise.
5545 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
5546 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
5548 * include/grub/font.h: Replaced with new file.
5550 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
5551 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
5552 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
5553 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
5554 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
5555 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
5556 fg_red, fg_green, fg_blue, fg_alpha.
5557 (grub_video_adapter): Removed blit_glyph.
5558 (grub_video_blit_glyph): Removed.
5560 * font/manager.c: Removed file.
5562 * font/font.c: New file.
5564 * font/font_cmd.c: Likewise.
5566 * video/video.c (grub_video_blit_glyph): Removed.
5568 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
5569 (grub_video_vbe_map_rgba): Likewise.
5570 (grub_video_vbe_unmap_color_int): Likewise.
5571 (grub_video_vbe_blit_glyph): Removed.
5572 (grub_video_vbe_adapter): Removed blit_glyph.
5574 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
5575 (get_pixel): Likewise.
5576 (set_pixel): Likewise.
5578 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
5580 * term/gfxterm.c: Adapted to new font engine.
5582 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
5584 * term/i386/pc/vga.c: Likewise.
5586 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
5588 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
5590 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5592 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
5594 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
5596 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
5598 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
5600 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
5602 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
5604 * util/grub.d/00_header.in: Changed to use new loadfont command.
5606 * util/grub-mkconfig_lib.in: Changed font extension.
5608 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
5610 * util/getroot.c (grub_util_get_grub_dev): Add support for
5611 /dev/md/dNNpNN style partitionable mdraid devices.
5613 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
5615 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
5616 at a time limit of the PXE TFTP API correctly.
5617 (grub_pxefs_close): Likewise.
5619 2008-11-29 Robert Millan <rmh@aybabtu.com>
5621 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
5622 grub_ata_device_initialize() calls.
5624 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
5626 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
5628 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
5630 2008-11-28 Robert Millan <rmh@aybabtu.com>
5632 Fix build on powerpc-ieee1275. Based on patch created by
5633 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
5634 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5635 `kern/ieee1275/mmap.c'.
5636 * include/grub/powerpc/ieee1275/memory.h: New file.
5638 Provide grub-install on coreboot.
5639 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
5640 (grub_install_SOURCES): New variable.
5641 * util/i386/pc/grub-install.in: Add a few condition checks to make it
5644 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
5646 * util/grub-fstest.c (grub_term_get_current_input): Change return type
5647 to `grub_term_input_t'.
5648 (grub_term_get_current_output): Change return type to
5649 `grub_term_output_t'.
5651 2008-11-22 Robert Millan <rmh@aybabtu.com>
5653 Fix breakage on coreboot due to declaration mismatch.
5654 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
5655 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
5656 grub_vga_text_cls().
5658 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
5659 comments. Avoid copying one more byte than necessary (just in case).
5661 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
5662 to 0x200000 (avoids trouble with some OFW implementations, and matches
5663 with the one in Yaboot).
5664 Reported by Manoel Abranches
5666 2008-11-20 Robert Millan <rmh@aybabtu.com>
5668 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
5669 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
5671 * util/grub-mkconfig_lib.in (grub_warn): New function.
5672 (convert_system_path_to_grub_path): Use grub_warn() when issuing
5673 warnings, to obtain consistent formatting.
5674 * util/grub.d/00_header.in: Likewise.
5675 * util/update-grub_lib.in: Likewise.
5677 * loader/i386/linux.c (allocate_pages): Fix a warning.
5678 Move comment text to `#error' stanza.
5680 Harmonize ieee1275's grub_available_iterate() with the generic
5681 grub_machine_mmap_iterate() interface (fixes a recently-introduced
5682 build problem on i386-ieee1275):
5683 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
5684 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
5685 parameter `type'. Update all users of this function.
5686 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5687 `kern/ieee1275/mmap.c'.
5688 * kern/ieee1275/init.c
5689 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
5691 (grub_machine_mmap_iterate): ... this.
5692 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
5693 return type to `grub_err_t'. Update all implementations of this
5695 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
5698 Add `lsmmap' command (lists firmware-provided memory map):
5699 * commands/lsmmap.c: New file.
5700 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
5701 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
5703 * conf/powerpc-ieee1275.rmk: Likewise.
5704 * conf/i386-coreboot.rmk: Likewise.
5705 * conf/i386-ieee1275.rmk: Likewise.
5707 2008-11-19 Robert Millan <rmh@aybabtu.com>
5709 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
5710 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
5711 constraints to initrd allocation (based on code from
5712 loader/i386/pc/linux.c). Without them, initrd was allocated too high
5713 for Linux to find it.
5715 2008-11-14 Robert Millan <rmh@aybabtu.com>
5717 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
5718 order to cope with duplicate slashes.
5720 2008-11-14 Robert Millan <rmh@aybabtu.com>
5722 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
5723 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
5724 don't want to mess with lower memory, because it is used in the Linux
5727 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
5728 an appropriate place in lower memory, between 0x10000 and 0x90000,
5729 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
5730 is in our heap (probably as a result of it being corrupted during
5731 decompression). Add #error instance with comment to explain why this
5732 loader isn't currently usable on PC/BIOS.
5734 2008-11-14 Robert Millan <rmh@aybabtu.com>
5736 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
5737 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
5739 2008-11-12 Robert Millan <rmh@aybabtu.com>
5741 Make loader/i386/linux.c buildable on i386-pc (although disabled).
5743 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
5744 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
5746 * include/grub/i386/pc/memory.h: ... to here.
5748 2008-11-12 Robert Millan <rmh@aybabtu.com>
5750 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
5753 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
5754 (grub_console_cur_color, grub_console_real_putchar)
5755 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5756 (grub_console_setcolorstate, grub_console_setcolor)
5757 (grub_console_getcolor): Move from here ...
5758 * include/grub/i386/vga_common.h: ... to here (new file).
5760 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
5761 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
5763 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
5764 `<grub/i386/vga_common.h>'.
5766 2008-11-12 Robert Millan <rmh@aybabtu.com>
5768 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
5769 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
5770 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
5772 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5773 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
5775 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
5776 grub_console_init() with call to grub_vga_text_init().
5777 (grub_machine_fini): Replace call to
5778 grub_console_fini() with call to grub_vga_text_fini() and
5779 grub_at_keyboard_fini().
5781 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
5782 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
5783 (grub_console_setcolorstate, grub_console_setcolor)
5784 (grub_console_getcolor): New function prototypes.
5786 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
5787 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
5788 (grub_vga_text_setcursor): Static-ize.
5789 (grub_vga_text_term): New structure.
5790 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
5792 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
5793 (grub_console_cur_color, grub_console_standard_color)
5794 (grub_console_normal_color, grub_console_highlight_color)
5795 (map_char, grub_console_putchar, grub_console_getcharwidth)
5796 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
5797 (grub_console_getcolor): Move from here ...
5798 * term/i386/vga_common.c: ... to here (same function names).
5800 2008-11-12 Robert Millan <rmh@aybabtu.com>
5802 Use newly-added Multiboot support in coreboot.
5804 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
5805 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
5807 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
5808 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
5809 (codestart): Store the MBI in `startup_multiboot_info' when we're
5810 being loaded using Multiboot.
5812 * kern/i386/coreboot/init.c (grub_machine_init): Move
5813 grub_at_keyboard_init() call to beginning of function (useful for
5814 debugging). Call grub_machine_mmap_init() before attempting to use
5815 grub_machine_mmap_iterate().
5816 (grub_lower_mem, grub_upper_mem): Move from here ...
5817 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
5820 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
5823 2008-11-12 Robert Millan <rmh@aybabtu.com>
5825 Fix a regression introduced by the at_keyboard.mod split. Because
5826 some terminals are default on some platforms and non-default on
5827 others, the first terminal being registered determines which is
5828 going to be default.
5830 * kern/term.c (grub_term_register_input): If this is the first
5831 terminal being registered, set it as the current one.
5832 (grub_term_register_output): Likewise.
5834 * term/efi/console.c (grub_console_init): Do not call
5835 grub_term_set_current_output() or grub_term_set_current_input().
5836 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
5837 * term/i386/pc/console.c (grub_console_init): Likewise.
5838 (grub_console_fini): Do not call grub_term_set_current_input()
5839 (but leave grub_term_set_current_output() to restore text mode).
5841 2008-11-10 Robert Millan <rmh@aybabtu.com>
5843 * util/grub.d/00_header.in: Add backward compatibility check for
5844 versions of terminal.mod that don't understand `terminal_input' or
5847 2008-11-09 Robert Millan <rmh@aybabtu.com>
5849 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
5850 `terminal_input' / `terminal_output', not `terminal'.
5852 2008-11-08 Robert Millan <rmh@aybabtu.com>
5854 * Makefile.in (include_DATA): Fix srcdir=. assumption.
5855 (DISTCLEANFILES): Add `build_env.mk'.
5857 2008-11-08 Robert Millan <rmh@aybabtu.com>
5859 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
5860 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
5861 members. Update all users.
5862 * util/console.c (grub_ncurses_term): Split in ...
5863 (grub_ncurses_term_input): ... this, and ...
5864 (grub_ncurses_term_output): ... this. Update all users.
5865 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
5867 2008-11-08 Robert Millan <rmh@aybabtu.com>
5869 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
5870 (PKGDATA): Add $(pkgdata_SRCDIR).
5871 (pkglib_BUILDDIR): New variable.
5872 (pkgdata_SRCDIR): New variable.
5873 (build_env.mk): New target.
5874 (include_DATA): New variable.
5875 (install-local): Install $(include_DATA) files in $(includedir).
5877 2008-11-07 Pavel Roskin <proski@gnu.org>
5879 * gendistlist.sh: Use C locale for sorting to ensure consistent
5880 output on all systems.
5882 * util/grub.d/00_header.in: Remove incorrect space before
5885 2008-11-07 Robert Millan <rmh@aybabtu.com>
5887 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
5889 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
5890 * loader/multiboot_loader.c (find_multi_boot2_header): New function
5891 (based on find_multi_boot1_header).
5892 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
5893 using find_multi_boot2_header(), and abort if neither Multiboot or
5894 Multiboot headers were found.
5896 2008-11-07 Robert Millan <rmh@aybabtu.com>
5898 Modularize at_keyboard.mod:
5900 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
5901 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
5902 (at_keyboard_mod_LDFLAGS): New variables.
5904 Actual terminal split:
5906 * include/grub/term.h (struct grub_term): Split in ...
5907 (struct grub_term_input): ... this, and ...
5908 (struct grub_term_output): ... this. Update all users.
5909 (grub_term_set_current): Split in ...
5910 (grub_term_set_current_input): ... this, and ...
5911 (grub_term_set_current_output): ... this.
5912 (grub_term_get_current): Split in ...
5913 (grub_term_get_current_input): ... this, and ...
5914 (grub_term_get_current_output): ... this.
5915 (grub_term_register): Split in ...
5916 (grub_term_register_input): ... this, and ...
5917 (grub_term_register_output): ... this.
5918 (grub_term_unregister): Split in ...
5919 (grub_term_unregister_input): ... this, and ...
5920 (grub_term_unregister_output): ... this.
5921 (grub_term_iterate): Split in ...
5922 (grub_term_iterate_input): ... this, and ...
5923 (grub_term_iterate_output): ... this.
5925 * kern/term.c (grub_term_list): Split in ...
5926 (grub_term_list_input): ... this, and ...
5927 (grub_term_list_output): ... this. Update all users.
5928 (grub_cur_term): Split in ...
5929 (grub_cur_term_input): ... this, and ...
5930 (grub_cur_term_output): ... this. Update all users.
5931 (grub_term_set_current): Split in ...
5932 (grub_term_set_current_input): ... this, and ...
5933 (grub_term_set_current_output): ... this.
5934 (grub_term_get_current): Split in ...
5935 (grub_term_get_current_input): ... this, and ...
5936 (grub_term_get_current_output): ... this.
5937 (grub_term_register): Split in ...
5938 (grub_term_register_input): ... this, and ...
5939 (grub_term_register_output): ... this.
5940 (grub_term_unregister): Split in ...
5941 (grub_term_unregister_input): ... this, and ...
5942 (grub_term_unregister_output): ... this.
5943 (grub_term_iterate): Split in ...
5944 (grub_term_iterate_input): ... this, and ...
5945 (grub_term_iterate_output): ... this.
5947 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
5948 a check for input and one for output (and only attempt to get keys
5949 from user when input works).
5951 * util/grub-probe.c (grub_term_get_current): Split in ...
5952 (grub_term_get_current_input): ... this, and ...
5953 (grub_term_get_current_output): ... this.
5954 * util/grub-fstest.c: Likewise.
5955 * util/i386/pc/grub-setup.c: Likewise.
5956 * util/grub-editenv.c: Likewise.
5958 Portability adjustments:
5960 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
5961 `term/i386/pc/at_keyboard.c'.
5962 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5963 grub_keyboard_controller_init() (now handled by terminal .init).
5964 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5965 grub_at_keyboard_init().
5966 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5967 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5968 at_keyboard.mod via input terminal interface).
5969 * include/grub/i386/coreboot/console.h: Convert into a stub for
5970 `<grub/i386/pc/console.h>'.
5972 Migrate full terminals to new API:
5974 * term/efi/console.c (grub_console_term): Split into ...
5975 (grub_console_term_input): ... this, and ...
5976 (grub_console_term_output): ... this. Update all users.
5977 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5978 (grub_ofconsole_init): Split into ...
5979 (grub_ofconsole_init_input): ... this, and ...
5980 (grub_ofconsole_init_output): ... this.
5981 (grub_ofconsole_term): Split into ...
5982 (grub_ofconsole_term_input): ... this, and ...
5983 (grub_ofconsole_term_output): ... this. Update all users.
5984 * term/i386/pc/serial.c (grub_serial_term): Split into ...
5985 (grub_serial_term_input): ... this, and ...
5986 (grub_serial_term_output): ... this. Update all users.
5987 * term/i386/pc/console.c (grub_console_term): Split into ...
5988 (grub_console_term_input): ... this, and ...
5989 (grub_console_term_output): ... this. Update all users.
5990 (grub_console_term_input): Only enable it on PC/BIOS platform.
5991 (grub_console_init): Remove grub_keyboard_controller_init() call.
5993 Migrate input terminals to new API:
5995 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5996 `i386' and `i386/pc' to enable build on x86_64 (this driver is
5997 i386-specific anyway).
5998 (grub_console_checkkey): Rename to ...
5999 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
6001 (grub_keyboard_controller_orig): New variable.
6002 (grub_console_getkey): Rename to ...
6003 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
6005 (grub_keyboard_controller_init): Static-ize. Save original
6006 controller value so that it can be restored ...
6007 (grub_keyboard_controller_fini): ... here (new function).
6008 (grub_at_keyboard_term): New structure.
6009 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
6012 Migrate output terminals to new API:
6014 * term/i386/pc/vga.c (grub_vga_term): Change type to
6015 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
6016 members. Update all users.
6017 * term/gfxterm.c (grub_video_term): Change type to
6018 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
6019 members. Update all users.
6020 * include/grub/i386/pc/console.h (grub_console_checkkey)
6021 (grub_console_getkey): Do not export (no longer needed by gfxterm,
6024 Migrate `terminal' command and userland tools to new API:
6026 * commands/terminal.c (grub_cmd_terminal): Split into ...
6027 (grub_cmd_terminal_input): ... this, and ...
6028 (grub_cmd_terminal_output): ... this.
6029 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
6030 `terminal_input' and `terminal_output'.
6031 * util/grub.d/00_header.in: Adjust `terminal' calls to new
6032 `terminal_input' / `terminal_output' API.
6033 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
6034 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
6035 provided ${GRUB_TERMINAL}, convert it).
6037 2008-11-04 Robert Millan <rmh@aybabtu.com>
6039 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
6041 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
6043 2008-11-03 Bean <bean123ch@gmail.com>
6045 * kern/elf.c (grub_elf32_load): Revert to previous code.
6046 (grub_elf64_load): Likewise.
6048 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
6050 2008-11-01 Robert Millan <rmh@aybabtu.com>
6052 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
6053 (TARGET_CPPFLAGS): Likewise.
6054 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
6056 2008-11-01 Carles Pina i Estany <carles@pina.cat>
6058 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
6060 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
6062 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
6063 addition of objects until the code is not going to be able to fail.
6065 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
6067 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
6068 (add a missing NULL check, and correct them by moving the pointer
6069 operations after the actual check).
6071 2008-10-29 Robert Millan <rmh@aybabtu.com>
6073 * util/i386/pc/grub-install.in: Handle empty string as output from
6074 make_system_path_relative_to_its_root().
6076 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
6078 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
6079 circular metadata worst case scenario. If the metadata is circular
6080 then copy the wrap in place.
6081 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
6082 project lib/format_text/layout.h
6083 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
6085 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
6087 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
6089 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
6091 * util/update-grub_lib.in: Mention filename in warning message.
6093 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
6095 * NEWS: Update for rename of update-grub to grub-mkconfig.
6097 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
6099 * util/update-grub_lib.in: Copy to ...
6100 * util/grub-mkconfig_lib.in: ... this. Update all users.
6101 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
6102 * util/update-grub.in: Rename to ...
6103 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
6104 option. Add `--output' option to allow users to specify the generated
6105 configuration file. Default to stdout.
6106 (update_grub_dir): Rename to ...
6107 (grub_mkconfig_dir): ... this.
6108 (grub_cfg): Default to an empty string.
6109 * conf/common.rmk (update-grub): Rename to ...
6110 (grub-mkconfig): ... this.
6111 (update-grub_lib): Copy to ...
6112 (grub-mkconfig_lib): ... this.
6113 (update-grub_SCRIPTS): Copy to ...
6114 (grub-mkconfig_SCRIPTS): ... this. Update all users.
6115 (update-grub_DATA): Rename to ...
6116 (grub-mkconfig_DATA): ... this.
6118 2008-09-28 Robert Millan <rmh@aybabtu.com>
6120 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
6121 to `modified'. Add the real `created' field.
6122 (grub_iso9660_uuid): Use `modified' rather than `created' for
6123 constructing the UUID.
6125 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
6127 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
6128 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
6130 2008-09-28 Bean <bean123ch@gmail.com>
6132 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
6133 Thanks to Christian Franke for finding this bug.
6135 2008-09-25 Robert Millan <rmh@aybabtu.com>
6137 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
6138 instances of grub_util_get_disk_name() (see previous commit).
6140 2008-09-25 Robert Millan <rmh@aybabtu.com>
6142 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
6143 `util/i386/get_disk_name.c'.
6144 * conf/i386-efi.rmk: Likewise.
6145 * conf/x86_64-efi.rmk: Likewise.
6146 * conf/i386-coreboot.rmk: Likewise.
6147 * conf/i386-ieee1275.rmk: Likewise.
6148 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
6149 `util/ieee1275/get_disk_name.c'.
6150 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
6151 * util/ieee1275/get_disk_name.c: Remove file.
6152 * util/i386/get_disk_name.c: Remove file.
6153 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
6154 "hd%d" for device.map entries, rather than using
6155 grub_util_get_disk_name().
6157 2008-09-24 Carles Pina i Estany <carles@pina.cat>
6159 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
6161 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
6163 2008-09-24 Carles Pina i Estany <carles@pina.cat>
6165 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
6167 (GRUB_TERM_PPAGE): Changed to 0x4900.
6169 2008-09-24 Robert Millan <rmh@aybabtu.com>
6171 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
6172 macros (they were i386-pc specific).
6173 * include/grub/sparc64/ieee1275/console.h: Likewise.
6174 * include/grub/efi/console.h: Likewise.
6176 2008-09-22 Bean <bean123ch@gmail.com>
6178 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
6179 resident and in attribute list.
6181 * include/grub/ntfs.h (BMP_LEN): Removed.
6183 2008-09-22 Bean <bean123ch@gmail.com>
6185 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
6186 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
6188 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
6189 error occurs, as grub_disk_open will call grub_disk_close, which will
6190 call p->close (scsi).
6192 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
6194 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
6195 (AC_PREREQ): Bumped to 2.59.
6196 (AC_TRY_COMPILE): Replace obsolete macro with ...
6197 (AC_COMPILE_IFELSE): ... this.
6198 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
6199 (AC_LINK_IFELSE): ... this.
6201 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
6203 * autogen.sh: Add a call to `gendistlist.sh'.
6205 2008-09-19 Christian Franke <franke@computer.org>
6207 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
6208 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
6209 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
6210 Export __enable_execute_stack() to modules.
6211 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
6214 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
6216 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
6219 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
6221 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
6222 #include <grub/util/hostdisk.h>.
6224 2008-09-08 Robert Millan <rmh@aybabtu.com>
6226 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
6227 segments when their filesz is zero (grub_file_read() interprets
6228 zero-size as "read until EOF", which results in memory corruption).
6229 Use `lowest_segment' rather than 0 for calculating the current
6230 segment load address.
6232 2008-09-08 Robert Millan <rmh@aybabtu.com>
6234 * util/hostdisk.c (open_device): Replace a grub_util_info() call
6235 with grub_dprintf("hostdisk", ...), as it was so verbose that it
6236 clobbered useful information.
6238 2008-09-08 Robert Millan <rmh@aybabtu.com>
6240 * include/grub/util/biosdisk.h: Move to ...
6241 * include/grub/util/hostdisk.h: ... here. Update all users.
6242 * util/biosdisk.c: Move to ...
6243 * util/hostdisk.c: ... here. Update all users.
6245 2008-09-07 Robert Millan <rmh@aybabtu.com>
6247 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
6249 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
6250 and length can be stored directly in the `mbi->mmap_addr' and
6251 `mbi->mmap_length' struct fields.
6253 2008-09-07 Robert Millan <rmh@aybabtu.com>
6255 * conf/i386.rmk: New file. Provides declaration for building
6257 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
6258 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
6260 Include `conf/i386.mk'.
6261 * conf/i386-efi.rmk: Likewise.
6262 * conf/x86_64-efi.rmk: Likewise.
6263 * conf/i386-coreboot.rmk: Likewise.
6264 * conf/i386-ieee1275.rmk: Likewise.
6266 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
6268 Based on patch created by Colin D Bennett <colin@gibibit.com>.
6269 Adds optimization support for BGR based modes.
6271 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
6272 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6273 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6274 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6275 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6276 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6277 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6278 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6279 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6280 (grub_video_i386_vbeblit_index_index): Likewise.
6281 (grub_video_i386_vbeblit_replace_directN): Added.
6282 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6283 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6284 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6285 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6286 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6287 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6288 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6289 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6290 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6291 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6292 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6293 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6294 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6296 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
6297 (grub_video_i386_vbefill_R8G8B8): Likewise.
6298 (grub_video_i386_vbefill_index): Likewise.
6299 (grub_video_i386_vbefill_direct32): Added.
6300 (grub_video_i386_vbefill_direct24): Likewise.
6301 (grub_video_i386_vbefill_direct16): Likewise.
6302 (grub_video_i386_vbefill_direct8): Likewise.
6304 * include/grub/video.h (grub_video_blit_format): Removed
6305 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
6306 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
6307 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
6308 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
6309 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
6311 * video/video.c (grub_video_get_blit_format): Updated to use new
6312 blit formats. Added handling for 16 bit color modes.
6314 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
6316 (common_blitter): Updated to use new blitters.
6318 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
6320 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
6321 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6322 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6323 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6324 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6325 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6326 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6327 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6328 (grub_video_i386_vbeblit_index_index): Likewise.
6329 (grub_video_i386_vbeblit_replace_directN): Added.
6330 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
6331 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
6332 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
6333 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
6334 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
6335 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
6336 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
6337 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
6338 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
6339 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
6340 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
6341 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
6342 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
6344 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
6345 (grub_video_i386_vbefill_R8G8B8): Likewise.
6346 (grub_video_i386_vbefill_index): Likewise.
6347 (grub_video_i386_vbefill_direct32): Added.
6348 (grub_video_i386_vbefill_direct24): Likewise.
6349 (grub_video_i386_vbefill_direct16): Likewise.
6350 (grub_video_i386_vbefill_direct8): Likewise.
6352 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
6355 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
6358 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
6361 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
6364 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
6366 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
6369 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
6371 * fs/iso9660.c (grub_iso9660_date): New structure.
6372 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
6373 (grub_iso9660_uuid): New function.
6375 2008-09-05 Bean <bean123ch@gmail.com>
6377 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
6379 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
6380 insensitive bit for names in Win32 and Win32 & DOS namespace.
6382 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
6384 * include/grub/types.h (LONG_MAX): Likewise.
6386 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
6388 * util/getroot.c: Include <config.h>.
6389 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
6390 add support for /dev/md/N devices and handle LVM double dash escaping.
6392 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
6394 * config.guess: Update to latest version from config git.
6395 * config.sub: Likewise.
6397 2008-09-03 Robert Millan <rmh@aybabtu.com>
6399 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
6400 `disk->total_sectors'.
6402 2008-09-01 Colin D Bennett <colin@gibibit.com>
6404 * include/grub/normal.h: Fixed incorrect comment for
6405 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
6407 2008-09-01 Colin D Bennett <colin@gibibit.com>
6409 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
6410 values with defines.
6412 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
6413 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
6414 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
6415 (GRUB_VBE_MODEATTR_COLOR): Likewise.
6416 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
6417 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
6418 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
6419 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
6420 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
6421 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
6422 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
6423 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
6424 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
6425 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
6426 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
6427 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
6428 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
6429 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
6430 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
6432 2008-08-31 Robert Millan <rmh@aybabtu.com>
6434 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
6436 (grub_multiboot): Fix a few warnings.
6438 2008-08-31 Robert Millan <rmh@aybabtu.com>
6440 * loader/i386/pc/multiboot.c: Update comment not to say that
6441 boot_device support is unimplemented.
6443 2008-08-31 Robert Millan <rmh@aybabtu.com>
6445 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
6446 or memory map support are unimplemented.
6448 2008-08-31 Colin D Bennett <colin@gibibit.com>
6450 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
6452 2008-08-31 Colin D Bennett <colin@gibibit.com>
6454 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
6455 total video memory in 'vbeinfo' output; show color format details for
6458 2008-08-30 Pavel Roskin <proski@gnu.org>
6460 * util/genmoddep.c: Remove for real this time.
6461 * DISTLIST: Remove util/genmoddep.c.
6463 2008-08-30 Robert Millan <rmh@aybabtu.com>
6465 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
6466 as required by Multiboot spec (it was already 4-byte aligned, but
6469 2008-08-29 Pavel Roskin <proski@gnu.org>
6471 * kern/powerpc/ieee1275/crt0.S: Rename to ...
6472 * kern/powerpc/ieee1275/startup.S: ... this.
6473 * conf/powerpc-ieee1275.rmk: Adjust for the above.
6474 * DISTLIST: Likewise.
6476 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
6477 grub/cpu/kernel.h. Add start label for consistency with other
6478 platforms. Add grub_prefix immediately after start. Add jump
6479 to the code after grub_prefix.
6480 * include/grub/powerpc/kernel.h: Provide valid values for
6481 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
6483 2008-08-29 Bean <bean123ch@gmail.com>
6485 * configure.ac: Change host_os to cygwin for mingw.
6486 (asprintf): New check for function.
6488 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
6489 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
6491 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
6492 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6493 sync, sleep and grub_util_get_disk_size for mingw.
6495 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
6496 to get size in mingw.
6497 (open_device): Use flag O_BINARY if it's defined.
6498 (find_root_device): Add dummy code for mingw.
6500 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
6501 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
6502 (get_scsi_disk_name): Return 0 for mingw.
6504 * util/hostfs.c: #include <grub/util/misc.h>.
6505 (grub_hostfs_open): Use "rb" flag to open file, use
6506 grub_util_get_disk_size to get disk size for mingw.
6508 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
6509 (asprintf): New function if HAVE_ASPRINTF is not set.
6510 (sync): New function for mingw.
6512 (grub_util_get_disk_size): Likewise.
6514 2008-08-28 Pavel Roskin <proski@gnu.org>
6516 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6519 2008-08-28 Robert Millan <rmh@aybabtu.com>
6521 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
6523 2008-08-28 Robert Millan <rmh@aybabtu.com>
6525 Change find_grub_drive() syntax so it doesn't prevent it from
6526 detecting NULL names as errors.
6528 * util/biosdisk.c (find_grub_drive): Move free slot search code
6530 (find_free_slot): ... to here.
6531 (read_device_map): Use find_free_slot() to search for free slots.
6533 2008-08-27 Marco Gerards <marco@gnu.org>
6535 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
6536 (scsi_mod_SOURCES): New variable.
6537 (scsi_mod_CFLAGS): Likewise
6538 (scsi_mod_LDFLAGS): Likewise.
6540 * disk/scsi.c: New file.
6542 * include/grub/scsi.h: Likewise.
6544 * include/grub/scsicmd.h: Likewise.
6546 * disk/ata.c: Include <grub/scsi.h>.
6547 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
6549 (grub_ata_iterate): Skip ATAPI devices.
6550 (grub_ata_open): Only handle ATAPI devices.
6551 (struct grub_atapi_read): Removed.
6552 (grub_atapi_readsector): Likewise.
6553 (grub_ata_read): No longer handle ATAPI devices.
6554 (grub_ata_write): Likewise.
6555 (grub_atapi_iterate): New function.
6556 (grub_atapi_read): Likewise.
6557 (grub_atapi_write): Likewise.
6558 (grub_atapi_open): Likewise.
6559 (grub_atapi_close): Likewise.
6560 (grub_atapi_dev): New variable.
6561 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
6562 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
6564 * include/grub/disk.h (enum grub_disk_dev_id): Add
6565 `GRUB_DISK_DEVICE_SCSI_ID'.
6567 2008-08-26 Robert Millan <rmh@aybabtu.com>
6569 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
6570 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
6573 2008-08-23 Bean <bean123ch@gmail.com>
6575 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
6576 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
6577 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
6578 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
6580 (raid5rec_mod_SOURCES): New macro.
6581 (raid5rec_mod_CFLAGS): Likewise.
6582 (raid5rec_mod_LDFLAGS): Likewise.
6583 (raid6rec_mod_SOURCES): Likewise.
6584 (raid6rec_mod_CFLAGS): Likewise.
6585 (raid6rec_mod_LDFLAGS): Likewise.
6586 (mdraid_mod_SOURCES): Likewise.
6587 (mdraid_mod_CFLAGS): Likewise.
6588 (mdraid_mod_LDFLAGS): Likewise.
6589 (dm_nv_mod_SOURCES): Likewise.
6590 (dm_nv_mod_CFLAGS): Likewise.
6591 (dm_nv_mod_LDFLAGS): Likewise.
6593 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
6594 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
6595 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
6597 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
6598 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
6600 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6602 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6604 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6606 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6608 * disk/raid5_recover.c: New file.
6610 * disk/raid6_recover.c: Likewise.
6612 * disk/mdraid_linux.c: Likewise.
6614 * disk/dmraid_nvidia.c: Likewise.
6616 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
6619 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
6620 calculate the size of raid device.
6621 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
6622 different layout of raid5.
6623 (grub_raid_scan_device): Remove code specific to mdraid.
6624 (grub_raid_list): New variable.
6625 (free_array): New function.
6626 (grub_raid_register): Likewise.
6627 (grub_raid_unregister): Likewise.
6628 (grub_raid_rescan): Likewise.
6629 (GRUB_MOD_INIT): Don't iterate device here.
6630 (GRUB_MOD_FINI): Use free_array to release resource.
6632 * include/grub/raid.h: Remove macro and structure specific to mdraid.
6633 (grub_raid5_recover_func_t): New function variable type.
6634 (grub_raid6_recover_func_t): Likewise.
6635 (grub_raid5_recover_func): New variable.
6636 (grub_raid6_recover_func): Likewise.
6637 (grub_raid_register): New function.
6638 (grub_raid_unregister): Likewise.
6639 (grub_raid_rescan): Likewise.
6640 (grub_raid_block_xor): Likewise.
6642 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
6643 (CMD_CRC): New macro.
6645 (read_file): Handle device as well as file.
6646 (cmd_crc): New function.
6647 (fstest): Handle multiple disks.
6648 (options): Remove part, raw and long, add root and diskcount.
6649 (usage): Add crc, remove -p, -r, -l, add -r and -c.
6650 (main): Find the first non option entry and ignore subsequent options,
6651 add handling for the new options, support multiple disks.
6653 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
6655 2008-08-23 Bean <bean123ch@gmail.com>
6657 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
6659 * genfslist.sh: Ignore kernel.mod.
6661 * genpartmaplist.sh: Likewise.
6663 2008-08-23 Robert Millan <rmh@aybabtu.com>
6665 * util/getroot.c (find_root_device): Skip anything that starts with
6666 a dot, not just directories. This avoids things like /dev/.tmp.md0.
6668 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
6670 * util/update-grub.in (GRUB_GFXMODE): Export variable.
6671 * util/grub.d/00_header.in: Allow the administrator to change default
6672 gfxmode via ${GRUB_GFXMODE}.
6674 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
6676 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
6678 2008-08-21 Robert Millan <rmh@aybabtu.com>
6680 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
6682 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
6683 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
6685 2008-08-20 Carles Pina i Estany <carles@pina.cat>
6687 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
6688 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
6690 2008-08-19 Robert Millan <rmh@aybabtu.com>
6692 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
6693 (struct grub_virtual_screen): Remove `cursor_color'.
6694 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
6696 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
6698 2008-08-18 Robert Millan <rmh@aybabtu.com>
6700 Unify (identical) linux_normal.c files.
6701 * loader/i386/efi/linux_normal.c: Move from here ...
6702 * loader/linux_normal.c: ... to here. Update all users.
6703 * loader/i386/pc/linux_normal.c: Delete. Update all users.
6704 * loader/i386/ieee1275/linux_normal.c: Likewise.
6706 2008-08-18 Robert Millan <rmh@aybabtu.com>
6708 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
6709 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
6710 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
6711 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
6712 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
6714 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
6715 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
6716 (GRUB_LINUX_CL_END_OFFSET): ... to here.
6717 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
6718 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
6719 (GRUB_EFI_CL_END_OFFSET): Rename to ...
6720 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
6721 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
6722 Initialize `params->video_cursor_x' and `params->video_cursor_y'
6723 portably using grub_getxy().
6724 Replace `-EFI' with `-bzImage' in boot message.
6726 2008-08-17 Robert Millan <rmh@aybabtu.com>
6728 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
6730 2008-08-17 Robert Millan <rmh@aybabtu.com>
6732 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
6734 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
6735 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
6736 (grub_machine_mmap_iterate): New function declaration.
6737 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
6739 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
6742 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
6743 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
6744 Move e820 parsing from here ...
6745 * kern/i386/pc/mmap.c: New file.
6746 (grub_machine_mmap_iterate): ... to here.
6748 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
6749 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
6750 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
6751 (grub_available_iterate): Redeclare to return `void', and redeclare
6752 its hook to use grub_uint64_t as addr and size parameters, and rename
6754 (grub_machine_mmap_iterate): ... this. Update all users.
6756 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
6757 to make it more readable. Rename to ...
6758 (grub_machine_mmap_iterate): ... this.
6760 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
6761 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
6762 (grub_multiboot): Allocate an extra region after the payload, and fill
6763 it with a Multiboot memory map. Adjust a.out loader to calculate size
6764 with the extra space.
6765 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
6766 with the extra space.
6768 2008-08-17 Carles Pina i Estany <carles@pina.cat>
6770 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
6772 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
6774 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
6775 mdate-sh to the list `find' searches for.
6776 * DISTLIST: Regenerated.
6778 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
6780 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
6781 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
6782 genmoddep.awk, gensymlist.sh.in.
6783 (DISTDIRS): Add bus, docs, hook, lib.
6784 * DISTLIST: Regenerated.
6785 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
6787 2008-08-16 Robert Millan <rmh@aybabtu.com>
6789 * disk/raid.c (grub_raid_init): Handle/report errors set by
6790 grub_device_iterate().
6791 * disk/lvm.c (grub_lvm_init): Likewise.
6793 2008-08-15 Bean <bean123ch@gmail.com>
6795 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6797 (datetime_mod_SOURCES): New macro.
6798 (datetime_mod_CFLAGS): Likewise.
6799 (datetime_mod_LDFLAGS): Likewise.
6800 (date_mod_SOURCES): Likewise.
6801 (date_mod_CFLAGS): Likewise.
6802 (date_mod_LDFLAGS): Likewise.
6803 (datehook_mod_SOURCES): Likewise.
6804 (datehook_mod_CFLAGS): Likewise.
6805 (datehook_mod_LDFLAGS): Likewise.
6807 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6809 (datetime_mod_SOURCES): New macro.
6810 (datetime_mod_CFLAGS): Likewise.
6811 (datetime_mod_LDFLAGS): Likewise.
6812 (date_mod_SOURCES): Likewise.
6813 (date_mod_CFLAGS): Likewise.
6814 (date_mod_LDFLAGS): Likewise.
6815 (datehook_mod_SOURCES): Likewise.
6816 (datehook_mod_CFLAGS): Likewise.
6817 (datehook_mod_LDFLAGS): Likewise.
6819 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6821 (datetime_mod_SOURCES): New macro.
6822 (datetime_mod_CFLAGS): Likewise.
6823 (datetime_mod_LDFLAGS): Likewise.
6824 (date_mod_SOURCES): Likewise.
6825 (date_mod_CFLAGS): Likewise.
6826 (date_mod_LDFLAGS): Likewise.
6827 (datehook_mod_SOURCES): Likewise.
6828 (datehook_mod_CFLAGS): Likewise.
6829 (datehook_mod_LDFLAGS): Likewise.
6831 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6833 (datetime_mod_SOURCES): New macro.
6834 (datetime_mod_CFLAGS): Likewise.
6835 (datetime_mod_LDFLAGS): Likewise.
6836 (date_mod_SOURCES): Likewise.
6837 (date_mod_CFLAGS): Likewise.
6838 (date_mod_LDFLAGS): Likewise.
6839 (datehook_mod_SOURCES): Likewise.
6840 (datehook_mod_CFLAGS): Likewise.
6841 (datehook_mod_LDFLAGS): Likewise.
6843 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
6845 (datetime_mod_SOURCES): New macro.
6846 (datetime_mod_CFLAGS): Likewise.
6847 (datetime_mod_LDFLAGS): Likewise.
6848 (date_mod_SOURCES): Likewise.
6849 (date_mod_CFLAGS): Likewise.
6850 (date_mod_LDFLAGS): Likewise.
6851 (datehook_mod_SOURCES): Likewise.
6852 (datehook_mod_CFLAGS): Likewise.
6853 (datehook_mod_LDFLAGS): Likewise.
6855 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
6857 * commands/date.c: New file.
6859 * hook/datehook.c: Likewise.
6861 * include/grub/lib/datetime.h: Likewise.
6863 * include/grub/i386/cmos.h: Likewise.
6865 * lib/datetime.c: Likewise.
6867 * lib/i386/datetime.c: Likewise.
6869 * lib/efi/datetime.c: Likewise.
6871 2008-08-14 Robert Millan <rmh@aybabtu.com>
6873 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
6874 (grub_mkelfimage_SOURCES): New variable.
6875 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
6877 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
6878 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
6879 * conf/powerpc-ieee1275.rmk: Likewise.
6880 * conf/i386-ieee1275.rmk: Likewise.
6882 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
6883 * kern/i386/coreboot/init.c: Likewise.
6885 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
6886 with `<grub/cpu/kernel.h>'.
6887 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
6889 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
6890 * kern/i386/coreboot/startup.S: Likewise.
6892 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
6893 (GRUB_MOD_GAP): Remove.
6894 * include/grub/powerpc/kernel.h: New file.
6895 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
6896 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6897 * include/grub/i386/kernel.h: New file.
6898 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
6899 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
6900 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6902 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
6904 Use --directory when invoking grub_mkimage.
6906 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
6907 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
6908 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
6909 and GRUB_KERNEL_CPU_PREFIX.
6911 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
6913 * include/grub/err.h (grub_err_printf): New function prototype.
6914 * util/misc.c (grub_err_printf): New function.
6915 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
6917 * kern/err.c (grub_print_error): Use grub_err_printf.
6919 2008-08-13 Robert Millan <rmh@aybabtu.com>
6921 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
6923 2008-08-13 Robert Millan <rmh@aybabtu.com>
6925 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
6928 2008-08-12 Robert Millan <rmh@aybabtu.com>
6930 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
6931 of the relocation code from here ...
6932 (grub_multiboot): ... to here.
6933 (forward_relocator, backward_relocator): Move from here ...
6934 * kern/i386/loader.S (grub_multiboot_forward_relocator)
6935 (grub_multiboot_backward_relocator): ... to here.
6936 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
6937 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
6938 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
6939 (grub_multiboot_forward_relocator_end)
6940 (grub_multiboot_backward_relocator)
6941 (grub_multiboot_backward_relocator_end): New variables.
6943 2008-08-12 Bean <bean123ch@gmail.com>
6945 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
6947 2008-08-11 Robert Millan <rmh@aybabtu.com>
6949 * kern/i386/linuxbios/startup.S: Move from here ...
6950 * kern/i386/coreboot/startup.S: ... to here.
6952 * kern/i386/linuxbios/init.c: Move from here ...
6953 * kern/i386/coreboot/init.c: ... to here.
6955 * kern/i386/linuxbios/table.c: Move from here ...
6956 * kern/i386/coreboot/mmap.c: ... to here.
6958 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
6960 2008-08-11 Robert Millan <rmh@aybabtu.com>
6962 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6963 errors. Leave it to the upper layer to handle them.
6965 2008-08-09 Christian Franke <franke@computer.org>
6967 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6968 * conf/common.rmk: Install `grub-pe2elf' only if requested.
6969 Install `grub.d/10_windows' only on Cygwin.
6970 * configure.ac: Add subst of `target_os'.
6971 Check `target_os' also before setting TARGET_OBJ2ELF.
6972 Add `--enable-grub-pe2elf'.
6974 2008-08-08 Robert Millan <rmh@aybabtu.com>
6976 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6977 (grub_last_time): Change type to grub_uint64_t.
6978 (grub_disk_open): Migrate code from to using grub_get_time_ms().
6979 (grub_disk_close): Likewise.
6981 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6982 (run_menu): Migrate code from to using grub_get_time_ms().
6984 * util/misc.c (grub_get_time_ms): New function.
6986 2008-08-08 Marco Gerards <marco@gnu.org>
6988 * disk/ata.c (grub_ata_regget): Change return type to
6990 (grub_ata_regget2): Likewise.
6991 (grub_ata_wait_status): New function.
6992 (grub_ata_wait_busy): Removed function, updated all users to use
6993 `grub_ata_wait_status'.
6994 (grub_ata_wait_drq): Likewise.
6995 (grub_ata_cmd): New function.
6996 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
6998 (grub_ata_pio_write): Add error handling.
6999 (grub_atapi_identify): Likewise.
7000 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
7002 (grub_ata_identify): Use `grub_ata_cmd' and improve error
7003 handling. Actually use the detected registers. Reorder the
7004 detection logic such that it is easier to read.
7005 (grub_ata_pciinit): Do not assign the same ID to each controller.
7006 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
7008 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
7010 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
7012 2008-08-08 Marco Gerards <marco@gnu.org>
7016 2008-08-07 Bean <bean123ch@gmail.com>
7018 * include/grub/x86_64/pci.h: New file.
7020 2008-08-07 Christian Franke <franke@computer.org>
7022 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
7023 (TIMER2_GATE): Likewise.
7024 (grub_pit_wait): Add enable/disable of the timer2 gate
7025 bit of port 0x61. This fixes a possible infinite loop.
7027 2008-08-07 Bean <bean123ch@gmail.com>
7029 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
7030 kern/i386/tsc.c and kern/i386/pit.c.
7032 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
7035 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
7038 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
7040 2008-08-07 Bean <bean123ch@gmail.com>
7042 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
7044 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
7046 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
7047 multiple inclusion. Add #include <grub/types.h>.
7049 2008-08-06 Christian Franke <franke@computer.org>
7051 * conf/common.rmk: Build and install `10_windows'.
7052 * util/grub.d/10_windows.in: New script.
7054 2008-08-06 Pavel Roskin <proski@gnu.org>
7056 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
7058 2008-08-06 Robert Millan <rmh@aybabtu.com>
7060 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
7061 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
7063 2008-08-06 Bean <bean123ch@gmail.com>
7065 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
7066 (grub_pxefs_fs_int): Remove dummy definition.
7067 (grub_pxefs_open): Use data->block_size to store the current block
7069 (grub_pxefs_read): Use block size stored in data->block_size. As the
7070 value of grub_pxe_blksize can be changed after the file is opened.
7072 2008-08-06 Bean <bean123ch@gmail.com>
7074 * fs/i386/pc/pxe.c (curr_file): new variable.
7075 (grub_pxefs_open): Simply the handling of pxe file system. Don't
7076 require the dummy internal file system anymore.
7077 (grub_pxefs_read): Removed.
7078 (grub_pxefs_close): Likewise.
7079 (grub_pxefs_fs_int): Likewise.
7080 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
7081 connection when we switch file.
7082 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
7084 2008-08-06 Robert Millan <rmh@aybabtu.com>
7086 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
7088 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
7089 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
7091 * kern/i386/halt.c: New file.
7092 * kern/i386/reboot.c: Likewise.
7093 * include/grub/i386/reboot.h: Likewise.
7094 * include/grub/i386/halt.h: Likewise.
7096 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
7097 Include `<grub/cpu/halt.h>'.
7098 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
7099 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
7101 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
7102 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
7103 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
7104 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
7105 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
7106 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
7108 * include/grub/i386/at_keyboard.h: ... to here.
7110 2008-08-05 Robert Millan <rmh@aybabtu.com>
7112 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
7113 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
7114 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
7115 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7116 `kern/generic/millisleep.c'.
7118 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
7119 instead of grub_get_rtc().
7120 (grub_tsc_init): Initialize `tsc_boot_time'.
7122 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
7123 (grub_machine_init): Use grub_tsc_init() rather than
7124 installing an RTC-based handler via grub_install_get_time_ms().
7126 * kern/i386/pit.c: New file.
7127 * include/grub/i386/pit.h: Likewise.
7129 2008-08-05 Bean <bean123ch@gmail.com>
7131 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
7133 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
7134 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
7135 (pxe_mod_SOURCES): New macro.
7136 (pxe_mod_CFLAGS): Likewise.
7137 (pxe_mod_LDFLAGS): Likewise.
7138 (pxecmd_mod_SOURCES): Likewise.
7139 (pxecmd_mod_CFLAGS): Likewise.
7140 (pxecmd_mod_LDFLAGS): Likewise.
7142 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
7143 (grub_pxe_call): Likewise.
7145 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
7147 * commands/i386/pc/pxecmd.c: New file.
7149 * fs/i386/pc/pxe.c: Likewise.
7151 * include/grub/i386/pc/pxe.h: Likewise.
7153 2008-08-05 Bean <bean123ch@gmail.com>
7155 * util/console.c (grub_console_cur_color): New variable.
7156 (grub_console_standard_color): Likewise.
7157 (grub_console_normal_color): Likewise.
7158 (grub_console_highlight_color): Likewise.
7159 (color_map): Likewise.
7160 (use_color): Likewise.
7161 (NUM_COLORS): New macro.
7162 (grub_ncurses_setcolorstate): Handle color properly.
7163 (grub_ncurses_setcolor): Don't change color here, just remember the
7164 settings, color will be set in grub_ncurses_setcolorstate.
7165 (grub_ncurses_getcolor): New function.
7166 (grub_ncurses_init): Initialize color pairs.
7167 (grub_ncurses_term): New member grub_ncurses_getcolor.
7169 2008-08-05 Colin D Bennett <colin@gibibit.com>
7171 High resolution timer support. Implemented for x86 CPUs using TSC.
7172 Extracted generic grub_millisleep() so it's linked in only as needed.
7173 This requires a Pentium compatible CPU; if the RDTSC instruction is
7174 not supported, then it falls back on the generic grub_get_time_ms()
7175 implementation that uses the machine's RTC.
7177 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
7178 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
7179 `kern/generic/millisleep.c'.
7181 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
7182 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
7184 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
7185 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
7187 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7189 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
7190 `kern/generic/millisleep.c'.
7192 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7194 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
7196 * kern/generic/rtc_get_time_ms.c: New file.
7198 * kern/generic/millisleep.c: New file.
7200 * kern/misc.c: Don't include
7201 <kern/time.h> anymore.
7202 (grub_millisleep_generic): Removed.
7204 * commands/sleep.c (grub_interruptible_millisleep): Uses
7205 grub_get_time_ms() instead of grub_get_rtc().
7207 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
7209 (grub_cpu_is_cpuid_supported): New inline function.
7210 (grub_cpu_is_tsc_supported): New inline function.
7211 (grub_tsc_init): New function prototype.
7212 (grub_tsc_get_time_ms): New function prototype.
7214 * kern/i386/tsc.c (grub_get_time_ms): New file.
7216 * include/grub/time.h: Include <grub/types.h.
7217 (grub_millisleep_generic): Removed.
7218 (grub_get_time_ms): New prototype.
7219 (grub_install_get_time_ms): New prototype.
7220 (grub_rtc_get_time_ms): New prototype.
7222 * kern/time.c (grub_get_time_ms): New function.
7223 (grub_install_get_time_ms): New function.
7225 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
7226 <grub/time.h> anymore.
7227 (grub_millisleep): Removed.
7228 (grub_machine_init): Call grub_tsc_init.
7230 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
7231 get_time_ms() implementation.
7233 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
7234 (ieee1275_get_time_ms): New function.
7235 (grub_machine_init): Install get_time_ms() implementation.
7237 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
7238 (grub_machine_init): Call grub_tsc_init().
7239 (grub_millisleep): Removed.
7241 * kern/ieee1275/init.c (grub_millisleep): Removed.
7242 (grub_machine_init): Install ieee1275_get_time_ms()
7244 (ieee1275_get_time_ms): New function.
7245 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
7248 2008-08-05 Marco Gerards <marco@gnu.org>
7250 * disk/ata.c: Include <grub/pci.h>.
7251 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
7252 (grub_ata_initialize): Rewritten.
7253 (grub_ata_device_initialize): New function.
7255 2008-08-04 Pavel Roskin <proski@gnu.org>
7257 * kern/main.c: Include grub/mm.h.
7259 2008-08-04 Robert Millan <rmh@aybabtu.com>
7261 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
7262 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
7263 corruption problem).
7265 2008-08-04 Robert Millan <rmh@aybabtu.com>
7267 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
7268 warnings introduced in my last commit.
7270 2008-08-03 Robert Millan <rmh@aybabtu.com>
7272 Make PCI available on all i386 architectures.
7274 * include/grub/i386/pc/pci.h: Move from here ...
7275 * include/grub/i386/pci.h: ... to here.
7277 * include/grub/i386/pc/pci.h: Remove.
7278 * include/grub/i386/efi/pci.h: Remove.
7279 * include/grub/x86_64/efi/pci.h: Remove.
7281 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
7284 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
7285 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
7286 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
7288 * conf/i386-ieee1275.rmk: Likewise.
7290 2008-08-03 Robert Millan <rmh@aybabtu.com>
7292 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
7293 (grub_console_setcursor): Make it possible to set cursor off.
7295 2008-08-03 Robert Millan <rmh@aybabtu.com>
7297 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
7298 of modules instead of assuming which platform provides what.
7299 * util/update-grub.in: Likewise.
7301 2008-08-03 Robert Millan <rmh@aybabtu.com>
7303 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
7304 instead of `grub_install_dos_part' to determine whether a drive needs
7305 to be prepended to prefix (`grub_install_dos_part' is not reliable,
7306 because it can be overridden when loading GRUB via Multiboot).
7308 2008-08-02 Robert Millan <rmh@aybabtu.com>
7310 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
7312 2008-08-02 Robert Millan <rmh@aybabtu.com>
7314 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
7315 of informational grub_dprintf() calls.
7317 2008-08-02 Robert Millan <rmh@aybabtu.com>
7319 * disk/memdisk.c (memdisk_size): Don't initialize.
7320 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
7322 * include/grub/i386/pc/kernel.h
7323 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
7324 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
7325 (grub_memdisk_image_size, grub_arch_memdisk_addr)
7326 (grub_arch_memdisk_size): Remove.
7328 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
7329 field (was only used to transfer a constant). Add `type' field to
7330 support multiple module types.
7331 (grub_module_iterate): New function.
7333 * kern/device.c (grub_device_open): Do not hide error messages
7334 when grub_disk_open() fails. Use grub_print_error() instead.
7336 * kern/i386/pc/init.c (grub_arch_modules_addr)
7337 (grub_arch_memdisk_size): Remove functions.
7338 (grub_arch_modules_addr): Return the module address in high memory
7339 (now that it isn't copied anymore).
7341 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
7342 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
7343 decompression routine (grub_total_module_size already includes that
7344 now). Don't copy modules back to low memory.
7346 * kern/main.c: Include `<grub/mm.h>'.
7347 (grub_load_modules): Split out (and use) ...
7348 (grub_module_iterate): ... this function, which iterates through
7349 module objects and runs a hook.
7350 Comment out grub_mm_init_region() call, as it would cause non-ELF
7351 modules to be overwritten.
7353 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
7354 the memdisk image in its own region, make it part of the module list.
7355 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
7356 (main): Parse --memdisk|-m option, and pass user-provided path as
7357 parameter to generate_image().
7358 (add_segments): Pass `memdisk_path' down to load_modules().
7359 (load_modules): Embed memdisk image in module section when requested.
7360 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
7361 `header.type' instead of `header.offset'.
7363 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
7364 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
7365 (memdisk_mod_LDFLAGS): New variables.
7366 * conf/i386-coreboot.rmk: Likewise.
7367 * conf/i386-ieee1275.rmk: Likewise.
7369 2008-08-02 Robert Millan <rmh@aybabtu.com>
7371 * loader/i386/pc/multiboot.c (playground, forward_relocator)
7372 (backward_relocator): New variables. Used to allocate and relocate
7373 the payload, respectively.
7374 (grub_multiboot_load_elf32): Load into heap instead of requested
7375 address, install the appropriate relocator code in each bound of
7376 the payload, and set the entry point such that
7377 grub_multiboot_real_boot() will jump to one of them.
7379 * kern/i386/loader.S (grub_multiboot_payload_size)
7380 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7381 (grub_multiboot_payload_entry_offset): New variables.
7382 (grub_multiboot_real_boot): Set cpu context to what the relocator
7383 expects, and jump to the relocator instead of the payload.
7385 * include/grub/i386/loader.h (grub_multiboot_payload_size)
7386 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
7387 (grub_multiboot_payload_entry_offset): Export.
7389 2008-08-01 Bean <bean123ch@gmail.com>
7391 * normal/menu_entry.c (editor_getline): Don't return the original
7392 string as result, as it will be released by lexer once it has done
7395 2008-08-01 Robert Millan <rmh@aybabtu.com>
7397 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
7398 within menuentries, not before them.
7399 util/grub.d/10_hurd.in: Likewise.
7401 2008-08-01 Bean <bean123ch@gmail.com>
7403 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
7404 (bufio_mod_SOURCES): New macro.
7405 (bufio_mod_CFLAGS): Likewise.
7406 (bufio_mod_LDFLAGS): Likewise.
7408 * include/grub/bufio.h: New file.
7410 * io/bufio.c: Likewise.
7412 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
7413 (grub_video_reader_png): Use grub_buffile_open to open file.
7415 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
7416 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
7418 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
7419 (grub_video_reader_tga): Use grub_buffile_open to open file.
7421 * font/manager.c: Include <grub/bufio.h>.
7422 (add_font): Use grub_buffile_open to open file.
7424 2008-07-31 Robert Millan <rmh@aybabtu.com>
7426 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
7427 ELF segments, use a macro for arbitrarily accessing any of them instead
7428 of preparing a pointer that allows access to one at a time.
7429 (grub_multiboot_load_elf64): Likewise.
7431 2008-07-31 Bean <bean123ch@gmail.com>
7433 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
7434 GRUB_KERNEL_MACHINE_DATA_END.
7436 2008-07-30 Robert Millan <rmh@aybabtu.com>
7438 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
7439 Increase from 0x50 to 0x60.
7440 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
7441 use UUIDs to identify the root drive for them. If that's not
7443 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
7444 check, for cross-disk installs.
7446 2008-07-30 Robert Millan <rmh@aybabtu.com>
7448 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
7449 is non-empty, use it to set the `prefix' environment variable instead
7450 of the usual approach.
7451 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
7452 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
7453 environment variable instead of dummy make_install_device().
7455 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
7456 (start): Insert a data section, with `grub_prefix' variable.
7457 * kern/i386/linuxbios/startup.S: Likewise.
7459 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
7460 New variable reference.
7461 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
7462 New macro. Defines offset of `grub_prefix' within startup.S (relative
7464 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
7465 section within startup.S (relative to `start').
7466 * include/grub/i386/coreboot/kernel.h: Likewise.
7468 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
7469 Overwrite grub_prefix with its contents, at the beginning of the
7471 (main): Understand -p|--prefix.
7473 2008-07-30 Robert Millan <rmh@aybabtu.com>
7475 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
7477 2008-07-30 Robert Millan <rmh@aybabtu.com>
7479 * term/i386/pc/vga_text.c (grub_console_cls): Use
7480 grub_console_gotoxy() to go back to beginning of the screen.
7481 Found by Patrick Georgi <patrick.georgi@coresystems.de>
7483 2008-07-29 Christian Franke <franke@computer.org>
7485 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7486 Add conversion of emulated mount points on Cygwin.
7488 2008-07-29 Christian Franke <franke@computer.org>
7490 * util/update-grub.in: Add a check for admin
7492 Remove old `grub.cfg.new' before creation.
7493 Add `-f' to `mv' to handle the different filesystem
7494 semantics of Windows.
7496 2008-07-29 Bean <bean123ch@gmail.com>
7498 * normal/main.c (get_line): Fix buffer overflow bug.
7500 2008-07-28 Robert Millan <rmh@aybabtu.com>
7502 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
7503 (struct grub_apple_header): New struct. Describes the layout of
7505 (apple_partition_map_iterate): Check the header magic as well as the
7506 partition magic (which was already being checked).
7508 2008-07-28 Pavel Roskin <proski@gnu.org>
7510 * genmk.rb: Add a warning to the beginning of the output that
7511 it's a generated file and should not be edited.
7513 2008-07-28 Robert Millan <rmh@aybabtu.com>
7515 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
7516 with the same number are found, just use issue a warning with
7517 grub_dprintf(), as this error has been reported to be non-fatal.
7519 2008-07-27 Robert Millan <rmh@aybabtu.com>
7521 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
7524 2008-07-27 Bean <bean123ch@gmail.com>
7526 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
7527 (grub_fat_find_dir): Ignore case when comparing filename.
7529 2008-07-27 Bean <bean123ch@gmail.com>
7531 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
7532 smallino, as it's more descriptive, and i8count can be confused with
7533 the other field count.
7534 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
7537 2008-07-27 Bean <bean123ch@gmail.com>
7539 * commands/crc.c: New file.
7541 * lib/crc.c: Likewise.
7543 * include/grub/lib/crc.h: Likewise.
7545 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
7547 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
7548 (hexdump): Move this function to ...
7550 * lib/hexdump.c: ... here.
7552 * include/grub/hexdump.h: Renamed to ...
7554 * include/grub/lib/hexdump.h: ... this.
7556 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
7558 * util/grub-editenv.c: Likewise.
7560 * include/envblk.h: Renamed to ...
7562 * include/lib/envblk.h: ... this.
7564 * util/envblk.c: Renamed to ...
7566 * lib/envblk.c: ... this.
7568 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
7570 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
7571 (pkglib_MODULES): Add crc.mod.
7572 (hexdump_mod_SOURCES): Add lib/hexdump.c.
7573 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
7574 (crc_mod_SOURCES): New macro.
7575 (crc_mod_CFLAGS): Likewise.
7576 (crc_mod_LDFLAGS): Likewise.
7578 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
7580 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7582 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7584 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7586 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
7588 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
7590 * commands/help.c: Include <grub/term.h>.
7591 (TERM_WIDTH): Removed. Updated all users.
7593 2008-07-27 Pavel Roskin <proski@gnu.org>
7595 * util/getroot.c (find_root_device): Rephrase a comment to avoid
7596 spurious warnings about a comment within a comment.
7598 2008-07-25 Robert Millan <rmh@aybabtu.com>
7600 * util/getroot.c (find_root_device): Skip devices that match
7601 /dev/dm-[0-9]. This lets the real device be found for any type of
7602 abstraction (LVM, EVMS, RAID..).
7603 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
7604 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
7605 device is found first, find_root_device() will now skip it.
7607 2008-07-24 Pavel Roskin <proski@gnu.org>
7609 * include/grub/types.h: Use __builtin_bswap32() and
7610 __builtin_bswap64() with gcc 4.3 and newer.
7612 2008-07-24 Christian Franke <franke@computer.org>
7614 * util/i386/pc/grub-install.in: If `--debug' is specified,
7615 pass `--verbose' to grub-setup.
7616 Abort script if make_system_path_relative_to_its_root() fails.
7618 2008-07-24 Bean <bean123ch@gmail.com>
7620 * configure.ac: Fixed a bug caused by the previous cygwin patch,
7621 variable `target_platform' should be `platform'.
7623 2008-07-24 Bean <bean123ch@gmail.com>
7625 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
7626 (grub_png_init_fixed_block): New function.
7627 (grub_png_decode_image_data): Handle fixed huffman code compression.
7629 2008-07-24 Bean <bean123ch@gmail.com>
7631 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
7632 (grub_pe2elf_SOURCES): New macro.
7633 (CLEANFILES): Add grub-pe2elf.
7635 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
7636 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
7637 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
7638 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
7639 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
7640 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
7641 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
7642 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
7643 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
7644 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
7645 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
7646 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
7647 (GRUB_PE32_DT_FUNCTION): Likewise.
7648 (GRUB_PE32_REL_I386_DIR32): Likewise.
7649 (GRUB_PE32_REL_I386_REL32): Likewise.
7650 (grub_pe32_symbol): New structure.
7651 (grub_pe32_reloc): Likewise.
7653 * util/grub-pe2elf.c: New file.
7655 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
7656 start symbol in non pc platform.
7658 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
7660 The following patches are from Christian Franke.
7662 * include/grub/dl.h: Remove .previous, gas supports this only
7665 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
7666 Remove .type, gas supports this only for ELF format.
7668 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
7669 nullbytes in symbol table. This fixes an infinite loop if table is
7672 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
7673 TARGET_IMG_LDFLAGS and EXEEXT.
7675 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
7676 TARGET_IMG_LDFLAGS_AC.
7677 (grub_CHECK_STACK_ARG_PROBE): New function.
7679 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
7681 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
7683 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
7684 to set TARGET_IMG_LD* accordingly.
7685 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
7686 Add call to grub_CHECK_STACK_ARG_PROBE.
7687 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
7689 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
7691 * genmk.rb: Add EXEEXT to CLEANFILES.
7693 2008-07-23 Robert Millan <rmh@aybabtu.com>
7695 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
7696 define the codes for arrows and lines used for the menu).
7697 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
7700 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
7701 fonts, because the latter are too slow.
7703 2008-07-21 Bean <bean123ch@gmail.com>
7705 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
7706 a20. Run keyboard test last, as it will cause macbook to halt.
7708 2008-07-18 Pavel Roskin <proski@gnu.org>
7710 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
7711 load foreign architecture modules correctly anyway. Keep
7712 support for loading host architecture modules, whether we
7713 compile them or not.
7715 2008-07-17 Pavel Roskin <proski@gnu.org>
7717 * configure.ac: Use -m32 or -m64 regardless of whether we had to
7718 change target_cpu. The compiler default can mismatch target_cpu
7721 * disk/efi/efidisk.c: Fix format warnings on x86_64.
7722 * kern/efi/efi.c: Likewise.
7724 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
7725 target compiler is functional.
7726 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
7729 * configure.ac: Default to efi platform for x86_64-apple. Allow
7730 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
7731 adjustments from the rest, only do them if target is not
7732 explicitly given. Merge other adjustments with the final sanity
7733 check. Remove an extraneous check for supported CPU. Be
7734 specific which CPU and which platform is not supported.
7736 * configure.ac: Default to pc platform for x86_64.
7738 2008-07-17 Robert Millan <rmh@aybabtu.com>
7740 Partial LinuxBIOS -> Coreboot rename.
7742 * conf/i386-linuxbios.rmk: Renamed to ...
7743 * conf/i386-coreboot.rmk: ... this.
7744 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
7745 * configure.ac: Accept "coreboot" as input platform (but maintain
7746 compatibility with "linuxbios").
7747 * include/grub/i386/linuxbios: Renamed to ...
7748 * include/grub/i386/coreboot: ... this.
7750 2008-07-17 Bean <bean123ch@gmail.com>
7752 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
7753 (appleldr_mod_SOURCE): New variable.
7754 (appleldr_mod_CFLAGS): Likewise.
7755 (appleldr_mod_LDFLAGS): Likewise.
7756 (pci_mod_SOURCES): Likewise.
7757 (pci_mod_CFLAGS): Likewise.
7758 (pci_mod_LDFLAGS): Likewise.
7759 (lspci_mod_SOURCES): Likewise.
7760 (lspci_mod_CFLAGS): Likewise.
7761 (lspci_mod_LDFLAGS): Likewise.
7763 * conf/x86_64-efi.rmk: New file.
7765 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
7767 (grub_efidisk_write): Likewise.
7769 * include/efi/api.h (efi_call_0): New macro.
7770 (efi_call_1): Likewise.
7771 (efi_call_2): Likewise.
7772 (efi_call_3): Likewise.
7773 (efi_call_4): Likewise.
7774 (efi_call_5): Likewise.
7775 (efi_call_6): Likewise.
7777 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
7778 grub_rescue_cmd_chainloader.
7780 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
7781 (grub_pe32_optional_header): Change some fields based on i386 or
7783 (GRUB_PE32_PE32_MAGIC): Likewise.
7785 * include/grub/efi/uga_draw.h: New file.
7787 * include/grub/elf.h (STN_ABS): New constant.
7788 (R_X86_64_NONE): Relocation constant for x86_64.
7789 (R_X86_64_64): Likewise.
7790 (R_X86_64_PC32): Likewise.
7791 (R_X86_64_GOT32): Likewise.
7792 (R_X86_64_PLT32): Likewise.
7793 (R_X86_64_COPY): Likewise.
7794 (R_X86_64_GLOB_DAT): Likewise.
7795 (R_X86_64_JUMP_SLOT): Likewise.
7796 (R_X86_64_RELATIVE): Likewise.
7797 (R_X86_64_GOTPCREL): Likewise.
7798 (R_X86_64_32): Likewise.
7799 (R_X86_64_32S): Likewise.
7800 (R_X86_64_16): Likewise.
7801 (R_X86_64_PC16): Likewise.
7802 (R_X86_64_8): Likewise.
7803 (R_X86_64_PC8): Likewise.
7805 * include/grub/i386/efi/pci.h: New file.
7807 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
7808 Change it value based on platform.
7809 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
7810 (GRUB_E820_RAM): Likewise.
7811 (GRUB_E820_RESERVED): Likewise.
7812 (GRUB_E820_ACPI): Likewise.
7813 (GRUB_E820_NVS): Likewise.
7814 (GRUB_E820_EXEC_CODE): Likewise.
7815 (GRUB_E820_MAX_ENTRY): Likewise.
7816 (grub_e820_mmap): New structure.
7817 (linux_kernel_header): Change the efi field according to different
7818 kernel version, also field from linux_kernel_header.
7820 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
7822 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
7823 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
7824 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
7825 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
7826 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
7827 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
7828 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
7829 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
7830 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
7831 (GRUB_PCI_ADDR_IO_MASK): Likewise.
7833 * include/grub/x86_64/efi/kernel.h: New file.
7835 * include/grub/x86_64/efi/loader.h: Likewise.
7837 * include/grub/x86_64/efi/machine.h: Likewise.
7839 * include/grub/x86_64/efi/pci.h: Likewise.
7841 * include/grub/x86_64/efi/time.h: Likewise.
7843 * include/grub/x86_64/linux.h: Likewise.
7845 * include/grub/x86_64/setjmp.h: Likewise.
7847 * include/grub/x86_64/time.h: Likewise.
7849 * include/grub/x86_64/types.h: Likewise.
7851 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
7852 GRUB_TARGET_SIZEOF_VOID_P.
7854 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
7855 (grub_efi_locate_handle): Likewise.
7856 (grub_efi_open_protocol): Likewise.
7857 (grub_efi_set_text_mode): Likewise.
7858 (grub_efi_stall): Likewise.
7859 (grub_exit): Likewise.
7860 (grub_reboot): Likewise.
7861 (grub_halt): Likewise.
7862 (grub_efi_exit_boot_services): Likewise.
7863 (grub_get_rtc): Likewise.
7865 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
7866 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
7867 (grub_efi_allocate_pages): Wrap efi calls.
7868 (grub_efi_free_pages): Wrap efi calls.
7869 (grub_efi_get_memory_map): Wrap efi calls.
7871 * kern/x86_64/dl.c: New file.
7873 * kern/x86_64/efi/callwrap.S: Likewise.
7875 * kern/x86_64/efi/startup.S: Likewise.
7877 * loader/efi/appleloader.c: Likewise.
7879 * loader/efi/chainloader.c (cmdline): New variable.
7880 (grub_chainloader_unload): Wrap efi calls.
7881 (grub_chainloader_boot): Likewise.
7882 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
7885 * loader/efi/chainloader_normal.c (chainloader_command):
7886 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
7889 * loader/i386/efi/linux.c (allocate_pages): Change allocation
7891 (grub_e820_add_region): New function.
7892 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
7894 (grub_find_video_card): New function.
7895 (grub_linux_setup_video): New function.
7896 (grub_rescue_cmd_linux): Probe for video information.
7898 * normal/x86_64/setjmp.S: New file.
7900 * term/efi/console.c (map_char): New function.
7901 (grub_console_putchar): Map unicode char.
7902 (grub_console_checkkey): Wrap efi calls.
7903 (grub_console_getkey): Likewise.
7904 (grub_console_getwh): Likewise.
7905 (grub_console_gotoxy): Likewise.
7906 (grub_console_cls): Likewise.
7907 (grub_console_setcolorstate): Likewise.
7908 (grub_console_setcursor): Likewise.
7910 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
7912 2008-07-16 Pavel Roskin <proski@gnu.org>
7914 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
7917 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
7918 pointer, not an integer. This fixes a warning and prevents
7919 precision loss on 64-bit systems.
7920 (relocate_addresses): Remove unneeded cast.
7922 2008-07-15 Pavel Roskin <proski@gnu.org>
7924 * kern/i386/ieee1275/init.c: Include grub/cache.h.
7926 * term/ieee1275/ofconsole.c: Disable code unused on i386.
7928 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
7929 Fix comparison between signed and unsigned.
7931 * include/grub/i386/ieee1275/console.h: Declare
7932 grub_console_init() and grub_console_fini().
7934 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
7935 It's empty and unused.
7937 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
7938 beginning to avoid warnings with some compilers.
7940 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
7941 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
7943 2008-07-14 Pavel Roskin <proski@gnu.org>
7945 * kern/env.c (grub_register_variable_hook): Don't copy empty
7946 string, it leaks memory. Pass "" to grub_env_set(), it should
7947 handle constant strings.
7949 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
7950 * commands/cmp.c (grub_cmd_cmp): Likewise.
7951 * kern/dl.c (grub_dl_flush_cache): Likewise.
7952 (grub_dl_load_core): Likewise.
7953 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
7954 (grub_elf64_load_phdrs): Likewise.
7956 2008-07-13 Pavel Roskin <proski@gnu.org>
7958 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
7959 between signed and unsigned.
7960 (LzmaEnc_Finish): Fix warning about an unused parameter.
7962 2008-07-13 Bean <bean123ch@gmail.com>
7964 * Makefile.in (enable_lzo): New rule.
7966 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7968 * configure.ac (ENABLE_LZO): New option --enable-lzo.
7970 * boot/i386/pc/lnxboot.S: #include <config.h>.
7972 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
7973 its value according to the compression algorithm used, lzo or lzma.
7975 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7976 compression algorithm according to configure macro.
7978 * kern/i386/pc/startup.S (codestart): Likewise.
7980 * kern/i386/pc/lzma_decode.S: New file.
7982 * include/grub/lib/LzFind.h: Likewise.
7984 * include/grub/lib/LzHash.h: Likewise.
7986 * include/grub/lib/LzmaDec.h: Likewise.
7988 * include/grub/lib/LzmaEnc.h: Likewise.
7990 * include/grub/lib/LzmaTypes.h: Likewise.
7992 * lib/LzFind.c: Likewise.
7994 * lib/LzmaDec.c: Likewise.
7996 * lib/LzmaEnc.c: Likewise.
7998 2008-07-13 Bean <bean123ch@gmail.com>
8000 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
8001 (grub_ext4_extent_header): New structure.
8002 (grub_ext4_extent): Likewise.
8003 (grub_ext4_extent_idx): Likewise.
8004 (grub_ext4_find_leaf): New function.
8005 (grub_ext2_read_block): Handle extents.
8007 2008-07-12 Robert Millan <rmh@aybabtu.com>
8009 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
8011 2008-07-11 Robert Millan <rmh@aybabtu.com>
8013 * util/grub.d/40_custom.in: New file. Example on how to add custom
8014 entries to /etc/grub.d.
8015 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
8016 40_custom (implicitly, by merging all the grub.d rules).
8018 2008-07-11 Pavel Roskin <proski@gnu.org>
8020 * commands/read.c (grub_getline): Fix invalid memory access.
8021 Don't add newline to the variable value.
8023 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
8024 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
8025 (serial_hw_get_port): Check validity of the port number.
8026 (grub_cmd_serial): Check return value of serial_hw_get_port().
8028 2008-07-07 Pavel Roskin <proski@gnu.org>
8030 * boot/i386/pc/diskboot.S (notification_string): Replace
8031 "Loading kernel" with just "loading". This is shorter, less
8032 confusing and saves a few bytes for possible future changes.
8034 2008-07-05 Pavel Roskin <proski@gnu.org>
8036 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
8037 size for ATAPI devices, they are undefined. Output sector
8038 number in decimal form.
8040 * disk/ata.c: Use named constants for status bits.
8042 2008-07-04 Pavel Roskin <proski@gnu.org>
8044 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
8045 grub_addr_t before casting it to the void pointer to fix a
8046 warning. Non-addressable regions are discarded earlier.
8047 (grub_arch_modules_addr): Cast _end to grub_addr_t.
8048 * kern/i386/linuxbios/table.c: Include grub/misc.h.
8049 (check_signature): Don't shadow table_header.
8050 (grub_linuxbios_table_iterate): Cast numeric constants to
8051 grub_linuxbios_table_header_t.
8052 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
8055 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
8058 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
8059 pointer, which can cause warnings. Support 64-bit addresses.
8061 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
8062 of sizeof(long). This fixes PowerPC image generation on x86_64.
8064 2008-07-04 Robert Millan <rmh@aybabtu.com>
8066 This fixes a performance issue when pc & gpt partmap iterators
8067 didn't abort iteration even after our hook found what it was
8068 looking for (often causing expensive probes of non-existent drives).
8070 Some callers relied on previous buggy behaviour, since they would
8071 raise an error when their own hooks caused early abortion of its
8074 * kern/device.c (grub_device_open): Improve error message.
8075 * disk/lvm.c (grub_lvm_open): Likewise.
8076 * disk/raid.c (grub_raid_open): Likewise.
8078 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
8079 when hook requests it, independently of grub_errno.
8080 (pc_partition_map_probe): Do not fail when find_func() caused
8081 early abortion of pc_partition_map_iterate().
8083 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
8084 when hook requests it, independently of grub_errno.
8085 (gpt_partition_map_probe): Do not fail when find_func() caused
8086 early abortion of gpt_partition_map_iterate().
8088 * kern/partition.c (grub_partition_iterate): Abort parent iteration
8089 when hook requests it, independently of grub_errno. Do not fail when
8090 part_map_iterate_hook() caused early abortion of p->iterate().
8092 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
8093 when grub_partition_iterate() returned with non-zero.
8095 2008-07-03 Pavel Roskin <proski@gnu.org>
8097 * disk/ata.c (grub_ata_pio_write): Check status before writing,
8098 like we do in grub_ata_pio_read().
8099 (grub_ata_readwrite): Always write individual sectors. Fix the
8100 sector count for the remainder.
8101 (grub_ata_write): Enable writing to ATA devices. Correctly
8102 report error for ATAPI devices.
8104 2008-07-02 Pavel Roskin <proski@gnu.org>
8106 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
8109 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
8110 for every read sector, we already increment it for the whole
8111 batch. This fixes reading more than 256 sectors at once.
8113 * util/grub-editenv.c (cmd_info): Cast argument to long
8114 explicitly. ptrdiff_t reduces to int on i386.
8116 * util/grub-editenv.c (main): Be specific which parameter is
8119 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
8120 (memdisk): Make memdisk_orig_addr a pointer.
8122 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
8123 for file offsets, use grub_off_t instead. Fix printf format
8126 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
8127 there. Real unexpected warnings should not drown in the noise
8128 about known problems.
8130 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
8131 grub_disk_addr_t for memory addresses.
8133 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
8134 explicitly to fix a warning.
8136 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
8138 * Makefile.in (MODULE_LDFLAGS): New variable.
8139 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
8140 the linker accepts --build-id=none.
8141 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
8143 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
8145 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
8146 those in Linux XFS code. Provide a way to access 64-bit parent
8148 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
8149 the end of struct grub_xfs_dir_header.
8151 2008-07-02 Bean <bean123ch@gmail.com>
8153 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
8154 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8155 and GRUB_IEEE1275_FLAG_NO_ANSI.
8157 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
8158 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
8159 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
8161 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
8162 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
8164 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
8165 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
8167 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
8168 esc sequence on non ANSI terminal.
8169 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
8171 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
8174 2008-07-02 Bean <bean123ch@gmail.com>
8176 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
8177 (grub_editenv_SOURCES): New variable.
8178 (pkglib_MODULES): Add loadenv.mod.
8179 (loadenv_mod_SOURCES): New variable.
8180 (loadenv_mod_CFLAGS): Likewise.
8181 (loadenv_mod_LDFLAGS): Likewise.
8183 * include/grub/envblk.h: New file.
8185 * util/envblk.c: New file.
8187 * util/grub-editenv.c: New file.
8189 * commands/loadenv.c: New file.
8191 2008-07-01 Pavel Roskin <proski@gnu.org>
8193 * include/multiboot2.h (struct multiboot_tag_module): Use char,
8194 not unsigned char. This fixes warnings and is consistent with
8197 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
8199 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
8201 * term/tparm.c (analyze): Always set *popcount.
8203 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
8204 cast to fix a warning.
8206 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
8207 cast to suppress a warning.
8209 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
8210 grub_fshelp_read_file() expects.
8212 * fs/fat.c: Fix UUID calculation on big-endian systems. We
8213 write uuid as a 32-bit value in CPU byte order, so declare and
8216 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
8217 long if the format specifier expects it.
8218 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
8219 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8220 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
8221 long to fix a warning.
8222 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
8223 grub_dprintf() arguments to fix warnings.
8225 2008-06-30 Pavel Roskin <proski@gnu.org>
8227 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
8228 install_bsd_part immediately before core.img is embedded or
8229 modified on disk. This fixes core.img verification if core.img
8232 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
8233 core_path to calculate the blocklist.
8234 Patch from Javier MartÃn <lordhabbit@gmail.com>
8236 2008-06-29 Robert Millan <rmh@aybabtu.com>
8238 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
8239 block to disk block.
8240 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
8241 Patch from Niels Böhm <bitbucket@arcor.de>
8243 2008-06-29 Robert Millan <rmh@aybabtu.com>
8245 * util/update-grub_lib.in (font_path): Search for fonts in
8246 /boot/grub first, which is more likely to be readable (we aren't
8247 deciding where fonts live, just looking for them).
8249 2008-06-26 Pavel Roskin <proski@gnu.org>
8251 * util/biosdisk.c (read_device_map): Don't leave dead map
8252 entries for devices failing stat() check.
8254 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
8255 core_path_dev for the core.img path on the target device.
8257 2008-06-26 Robert Millan <rmh@aybabtu.com>
8259 * disk/fs_uuid.c: New file.
8260 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
8261 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
8262 (fs_uuid_mod_LDFLAGS): New variables.
8263 * include/grub/disk.h (grub_disk_dev_id): Add
8264 `GRUB_DISK_DEVICE_UUID_ID'.
8265 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
8266 implement iterate().
8268 2008-06-26 Robert Millan <rmh@aybabtu.com>
8270 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
8271 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
8272 Linux image includes no initrd.
8274 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
8276 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
8277 call to resolve the core image location that effectively appended the
8280 2008-06-21 Robert Millan <rmh@aybabtu.com>
8282 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
8285 * util/grub.d/10_hurd.in: ... to here ...
8286 * util/grub.d/10_linux.in: ... and here.
8288 2008-06-19 Robert Millan <rmh@aybabtu.com>
8290 * kern/main.c (grub_main): Export `prefix' variable immediately
8291 after it has been set by grub_machine_set_prefix().
8293 2008-06-19 Robert Millan <rmh@aybabtu.com>
8295 * commands/search.c (search_label, search_fs_uuid, search_file): Print
8296 search result when not saving to variable, not the other way around.
8297 When saving to variable, abort iteration as soon as a match is found.
8299 2008-06-19 Robert Millan <rmh@aybabtu.com>
8301 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
8302 check for partition that provides /boot/grub. Its logic is flawed,
8303 as it prevents prepare_grub_to_access_device() from being called
8306 2008-06-19 Robert Millan <rmh@aybabtu.com>
8308 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
8309 "insmod" command directly when abstraction modules are needed,
8310 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
8311 since it had already been processed).
8313 2008-06-19 Pavel Roskin <proski@gnu.org>
8315 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
8316 changed. This is needed in case GRUB_LIBDIR changes.
8317 * conf/i386-ieee1275.rmk: Likewise.
8318 * conf/i386-linuxbios.rmk: Likewise.
8319 * conf/i386-pc.rmk: Likewise.
8320 * conf/powerpc-ieee1275.rmk: Likewise.
8322 2008-06-18 Pavel Roskin <proski@gnu.org>
8324 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
8325 kernel_elf_symlist.c to symlist.c for consistency with other
8326 architectures. Update all users.
8327 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
8329 2008-06-18 Robert Millan <rmh@aybabtu.com>
8331 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
8334 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
8335 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
8336 a RAID device, run setup() for all members independently on whether
8337 LVM abstraction is being used.
8338 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
8339 If grub-mkimage has set `*install_dos_part == -2', don't override this
8341 Perform *install_dos_part adjustments independently on whether
8342 we're embedding or not.
8343 Clarify error message when image is too big for embedding.
8344 Remove duplicate *install_dos_part stanza.
8346 2008-06-17 Robert Millan <rmh@aybabtu.com>
8348 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
8349 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
8351 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
8352 values in grub_ofconsole_normal_color and
8353 grub_ofconsole_highlight_color (they're not directly related to
8354 background and foreground).
8355 (grub_ofconsole_setcolorstate): Extract background and foreground
8356 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
8358 2008-06-17 Robert Millan <rmh@aybabtu.com>
8360 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
8361 /boot/grub for the check in last commit, not /boot (they could be
8362 different partitions).
8364 2008-06-16 Robert Millan <rmh@aybabtu.com>
8366 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
8367 asked to setup access for the same partition that provides /boot,
8368 don't bother using UUIDs since our root already has the value we
8371 2008-06-16 Robert Millan <rmh@aybabtu.com>
8373 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
8375 Patch from Sven Mueller <sven@debian.org>.
8377 2008-06-16 Robert Millan <rmh@aybabtu.com>
8379 * util/update-grub.in: Check for $EUID instead of $UID.
8380 Reported by Vincent Zweije.
8382 2008-06-16 Bean <bean123ch@gmail.com>
8384 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
8385 (grub_ext2_read_block): Likewise.
8386 (grub_ext2_read_inode): Likewise.
8387 (grub_ext2_mount): Likewise.
8388 (grub_ext2_close): Likewise.
8389 (grub_ext3_get_journal): Removed.
8391 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
8392 (grub_reiserfs_read_symlink): Likewise.
8393 (grub_reiserfs_mount): Likewise.
8394 (grub_reiserfs_open): Likewise.
8395 (grub_reiserfs_read): Likewise.
8396 (grub_reiserfs_close): Likewise.
8397 (grub_reiserfs_get_journal): Removed.
8399 * fs/fshelp.c (grub_fshelp_read): Removed.
8400 (grub_fshelp_map_block): Likewise.
8402 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
8403 (grub_fshelp_journal): Likewise.
8404 (grub_fshelp_read): Likewise.
8405 (grub_fshelp_map_block): Likewise.
8407 2008-06-16 Pavel Roskin <proski@gnu.org>
8409 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
8410 floating point anymore.
8411 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
8413 2008-06-15 Pavel Roskin <proski@gnu.org>
8415 * commands/ls.c (grub_ls_list_files): Use integer calculations
8416 for human readable format, avoid floating point use.
8417 * kern/misc.c (grub_ftoa): Remove.
8418 (grub_vsprintf): Remove floating point support.
8420 2008-06-15 Robert Millan <rmh@aybabtu.com>
8422 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
8424 Reported by Max Vozeler.
8426 2008-06-15 Robert Millan <rmh@aybabtu.com>
8428 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
8429 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
8431 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
8432 the beginning of the prefix.
8434 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
8435 It is assumed that if we have a memdisk, grub-mkimage has set
8436 grub_prefix to include the "(memdisk)" drive in it.
8438 2008-06-15 Robert Millan <rmh@aybabtu.com>
8440 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
8441 Initialize keyboard controller after registering the terminal, so that
8442 grub_printf() can be called from grub_keyboard_controller_init().
8444 2008-06-15 Robert Millan <rmh@aybabtu.com>
8446 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
8447 extent-btree which is written as big endian on disk.
8448 Reported by Alain Greppin <al@chilibi.org>.
8450 2008-06-14 Robert Millan <rmh@aybabtu.com>
8452 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
8453 * util/i386/pc/grub-install.in (modules): Likewise.
8455 2008-06-13 Pavel Roskin <proski@gnu.org>
8457 * commands/ls.c (grub_ls_list_files): Fix format warnings.
8459 2008-06-13 Bean <bean123ch@gmail.com>
8461 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
8463 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
8465 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
8466 to indicate sparse block.
8468 2008-06-12 Pavel Roskin <proski@gnu.org>
8470 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
8471 number, grub_fshelp_read() does it for us.
8473 * fs/fshelp.c (grub_fshelp_read): New function. Implement
8474 linear disk read with journal translation.
8475 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
8476 * include/grub/fshelp.h: Declare grub_fshelp_read().
8478 2008-06-09 Pavel Roskin <proski@gnu.org>
8480 * fs/minix.c (grub_minix_mount): Handle error reading
8483 2008-06-08 Robert Millan <rmh@aybabtu.com>
8485 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
8486 don't append the RAID prefix afterwards.
8487 Reported by Clint Adams.
8489 2008-06-08 Robert Millan <rmh@aybabtu.com>
8491 Based on description from Pavel:
8492 * kern/disk.c (grub_disk_check_range): Rename to ...
8493 (grub_disk_adjust_range): ... this. Add a comment explaining the
8494 tasks performed by this function.
8496 2008-06-08 Robert Millan <rmh@aybabtu.com>
8498 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
8499 `num_serial' (for consistency with other variables).
8500 (struct grub_ntfs_data): Add `uuid' member.
8501 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
8502 (grub_ntfs_uuid): New function.
8503 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
8505 2008-06-07 Pavel Roskin <proski@gnu.org>
8507 * util/biosdisk.c (open_device): Revert last change to the
8508 function, it broke installation. The sector needs to be
8509 different dependent on which device is opened.
8511 2008-06-06 Robert Millan <rmh@aybabtu.com>
8513 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
8514 rest of GRUB, and breakage doesn't happen if its value were modified.
8516 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
8517 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
8518 a constant (same value).
8519 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
8520 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
8522 2008-06-06 Robert Millan <rmh@aybabtu.com>
8524 * util/biosdisk.c (open_device): Do not modify sector offset when
8525 accessing a partition. kern/disk.c already handles this for us.
8527 2008-06-06 Robert Millan <rmh@aybabtu.com>
8529 * util/grub-emu.c (grub_machine_init): Move code in this function from
8531 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
8532 segfault in case grub_printf() is called).
8534 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
8535 grub_probe. Update all users not to explicitly add it again.
8536 (grub_device): New variable; contains corresponding device for grubdir.
8537 (fs_module, partmap_module, devabstraction_module): Pass
8538 `--device ${grub_device}' to grub_probe to avoid traversing /dev
8541 2008-06-05 Robert Millan <rmh@aybabtu.com>
8543 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
8544 is found, print it (same layout as with labels).
8546 2008-06-04 Robert Millan <rmh@aybabtu.com>
8548 * util/biosdisk.c (get_drive): Rename to ...
8549 (find_grub_drive): ... this. Update all users.
8551 (get_os_disk): Rename to ...
8552 (convert_system_partition_to_system_disk): ... this. Update all users.
8554 (find_drive): Rename to ...
8555 (find_system_device): ... this. Update all users.
8557 2008-06-04 Robert Millan <rmh@aybabtu.com>
8559 * util/biosdisk.c (get_os_disk): Handle IDA devices.
8560 * util/grub-mkdevicemap.c (get_mmc_disk_name)
8561 (make_device_map): Likewise.
8563 2008-06-01 Robert Millan <rmh@aybabtu.com>
8565 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
8566 before dereferencing it.
8568 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
8569 union with fat12/fat16-specific ones. Add some new fields, including
8570 `num_serial' for both versions.
8571 (struct grub_fat_data): Add `uuid' member.
8572 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
8573 names. Initialize `data->uuid' using `num_serial'.
8574 (grub_fat_uuid): New function.
8575 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
8577 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
8578 (grub_reiserfs_uuid): New function.
8579 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
8582 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
8583 (grub_xfs_uuid): New function.
8584 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
8586 2008-06-01 Robert Millan <rmh@aybabtu.com>
8588 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
8589 code that is backward compatible with pre-uuid search command.
8591 2008-05-31 Robert Millan <rmh@aybabtu.com>
8593 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
8594 floppies after everything else, to ensure floppy drive isn't accessed
8595 unnecessarily (patch from Bean).
8597 2008-05-31 Robert Millan <rmh@aybabtu.com>
8599 * commands/search.c (search_label, search_fs_uuid, search_file): Do
8600 not print device names when we were asked to set a variable.
8602 2008-05-31 Robert Millan <rmh@aybabtu.com>
8604 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
8605 using "cursor-on" and "cursor-off" commands (understood at least by
8606 the Open Firmware flavour on OLPC).
8608 2008-05-31 Michael Gorven <michael@gorven.za.net>
8610 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
8611 on and off sequences.
8613 2008-05-31 Robert Millan <rmh@aybabtu.com>
8615 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
8616 * util/update-grub.in: Likewise.
8618 2008-05-30 Pavel Roskin <proski@gnu.org>
8620 * util/biosdisk.c (linux_find_partition): Simplify logic and
8621 make the code more universal. Keep special processing for
8622 devfs, but use a simple rule for all other devices. If the
8623 device ends with a number, append 'p' and the partition number.
8624 Otherwise, append only the partition number.
8626 2008-05-30 Robert Millan <rmh@aybabtu.com>
8628 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
8629 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
8630 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
8631 the `root' parameter to Linux.
8633 2008-05-30 Robert Millan <rmh@aybabtu.com>
8635 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
8636 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
8637 --fs_uuid with --fs-uuid.
8638 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
8639 all filesystems support them).
8641 2008-05-30 Robert Millan <rmh@aybabtu.com>
8643 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
8644 grub_printf() flags, since we're printing in units of 2 bytes.
8646 2008-05-30 Robert Millan <rmh@aybabtu.com>
8648 * util/grub.d/00_header.in: Remove obsolete comment referencing
8649 convert_system_path_to_grub_path().
8650 * util/update-grub.in: Likewise.
8651 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
8652 (convert_system_path_to_grub_path): Add a warning message explaining
8653 that this function is deprecated. Rely on is_path_readable_by_grub()
8654 for the readability checks.
8655 (font_path): Use is_path_readable_by_grub() for the readability
8656 check rather than convert_system_path_to_grub_path().
8658 2008-05-30 Robert Millan <rmh@aybabtu.com>
8660 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
8661 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
8662 converting it first.
8663 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
8664 grub.cfg for access to font file, and afterwards call it again to set
8667 2008-05-30 Robert Millan <rmh@aybabtu.com>
8669 * commands/search.c (options): Add --fs_uuid option.
8670 (search_fs_uuid): New function.
8671 (grub_cmd_search): Fix --set argument passing.
8672 Use search_fs_uuid() when requested via --fs_uuid.
8673 (grub_search_init): Update help message.
8674 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
8675 and redeclare it as an array of 16-bit words.
8676 (grub_ext2_uuid): New function.
8677 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
8678 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
8679 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
8680 (GRUB_DEVICE_BOOT_UUID): New variables.
8681 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
8682 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
8684 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
8685 just assume `root' variable has the right value.
8686 * util/grub.d/10_linux.in: Likewise.
8687 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
8689 (main): Recognise `-t fs_uuid' argument.
8691 2008-05-30 Robert Millan <rmh@aybabtu.com>
8693 * util/biosdisk.c (map): Redefine structure to hold information
8694 about GRUB drive name.
8695 (get_drive): Reimplement without assuming (and verifying) BIOS-like
8697 (call_hook): Remove.
8698 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
8699 member. Assume drive has partitions.
8700 (grub_util_biosdisk_open): Access device names via `.device' struct
8702 (open_device): Likewise.
8703 (find_drive): Likewise.
8704 (read_device_map): Adjust map[] usage to match the new struct
8705 definition. Don't check for duplicates (still possible, but not cheap
8707 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
8708 (make_device_name): Remove assumption of BIOS-like drive names.
8710 2008-05-30 Pavel Roskin <proski@gnu.org>
8712 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
8713 compiling execute.c doesn't need grub_script.tab.h anymore.
8714 (normal/command.c_DEPENDENCIES): Likewise.
8715 (normal/function.c_DEPENDENCIES): Likewise.
8716 * conf/i386-ieee1275.rmk: Likewise.
8717 * conf/i386-linuxbios.rmk: Likewise.
8718 * conf/i386-pc.rmk: Likewise.
8719 * conf/powerpc-ieee1275.rmk: Likewise.
8720 * conf/sparc64-ieee1275.rmk: Likewise.
8722 2008-05-29 Pavel Roskin <proski@gnu.org>
8724 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
8725 when scanning metadata for volume group name.
8727 * include/grub/script.h: Don't include grub_script.tab.h. It's
8728 a generated file, which may only be included from the files with
8729 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
8730 use union YYSTYPE, as the later allows forward declaration.
8731 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
8733 2008-05-29 Robert Millan <rmh@aybabtu.com>
8735 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
8736 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
8737 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
8738 (grub_console_checkkey): Add grub_dprintf() call to report unknown
8741 2008-05-29 Robert Millan <rmh@aybabtu.com>
8743 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
8744 control key combinations.
8746 2008-05-29 Robert Millan <rmh@aybabtu.com>
8748 * util/powerpc/ieee1275/grub-install.in: Move from here ...
8749 * util/ieee1275/grub-install.in: ... to here.
8750 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
8751 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
8752 (grub_install_SOURCES): Likewise.
8754 2008-05-29 Robert Millan <rmh@aybabtu.com>
8756 * fs/affs.c: Update copyright year.
8757 * fs/ext2.c: Likewise.
8758 * fs/fshelp.c: Likewise.
8759 * fs/hfsplus.c: Likewise.
8760 * fs/ntfs.c: Likewise.
8761 * fs/xfs.c: Likewise.
8762 * include/grub/fshelp.h: Likewise.
8763 * util/grub-mkdevicemap.c: Likewise.
8765 2008-05-28 Robert Millan <rmh@aybabtu.com>
8767 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
8768 might need to be fatfs to support some firmware implementations
8771 2008-05-28 Robert Millan <rmh@aybabtu.com>
8773 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
8775 * util/grub-mkdevicemap.c (get_mmc_disk_name)
8776 (make_device_map): Likewise.
8778 2008-05-20 Bean <bean123ch@gmail.com>
8780 * fs/fshelp.c (grub_fshelp_map_block): New function.
8781 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
8782 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
8784 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
8785 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
8786 (grub_fshelp_journal): New structure.
8787 (grub_fshelp_map_block): New function prototype.
8788 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
8789 (grub_fshelp_map_block): Likewise.
8791 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
8792 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
8793 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
8794 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
8795 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
8796 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
8797 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
8798 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
8799 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
8800 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
8801 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
8802 (grub_ext2_sblock): New members for journal support.
8803 (grub_ext3_journal_header): New structure.
8804 (grub_ext3_journal_revoke_header): Likewise.
8805 (grub_ext3_journal_block_tag): Likewise.
8806 (grub_ext3_journal_sblock): Likewise.
8807 (grub_fshelp_node): New members logfile and journal.
8808 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
8809 grub_fshelp_map_block to get real block number.
8810 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
8812 (grub_ext2_read_inode): Likewise.
8813 (grub_ext3_get_journal): New function.
8814 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
8815 (grub_ext2_close): Release memory used by journal.
8817 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
8818 (REISERFS_MAGIC_DESC_BLOCK): New macro.
8819 (grub_reiserfs_transaction_header): Renamed to
8820 grub_reiserfs_description_block, replace field data with real_blocks.
8821 (grub_reiserfs_commit_block): New structure.
8822 (grub_reiserfs_data): New member journal.
8823 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
8825 (grub_reiserfs_read_symlink): Likewise.
8826 (grub_reiserfs_iterate_dir): Likewise.
8827 (grub_reiserfs_open): Likewise.
8828 (grub_reiserfs_read): Likewise.
8829 (grub_reiserfs_get_journal): New function.
8830 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
8831 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
8832 using grub_reiserfs_get_journal.
8833 (grub_reiserfs_close): Release memory used by journal.
8835 * fs/affs.c (grub_affs_read_block): Change block type to
8836 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
8838 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
8840 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
8842 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
8844 * fs/udf.c (grub_udf_read_block): Change block type to
8845 grub_disk_addr_t. Use type cast to avoid warning.
8847 * fs/xfs.c (grub_xfs_read_block): Likewise.
8849 2008-05-16 Christian Franke <franke@computer.org>
8851 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
8852 to ensure that break with ESC will always work.
8853 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
8854 Remove ESC from keyboard queue.
8856 2008-05-16 Christian Franke <franke@computer.org>
8858 * util/biosdisk.c: [__CYGWIN__] Add includes.
8859 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
8860 (get_os_disk): Move variable declarations to OS specific
8861 parts to avoid warning.
8862 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
8863 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
8864 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
8866 * util/getroot.c: [__CYGWIN__] Add includes.
8867 (strip_extra_slashes): Fix "/" case.
8868 [__CYGWIN__] (get_win32_path): New function.
8869 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
8870 [__CYGWIN__] (find_root_device): Disable.
8871 [__CYGWIN__] (get_bootsec_serial): New function.
8872 [__CYGWIN__] (find_cygwin_root_device): Likewise.
8873 [__linux__] (grub_guess_root_device): Add early returns to simplify
8875 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
8876 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
8877 check for Linux only.
8879 2008-05-15 Bean <bean123ch@gmail.com>
8881 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
8882 keyboard hang problem in apple's intel mac.
8884 2008-05-09 Robert Millan <rmh@aybabtu.com>
8886 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
8888 * util/grub-mkdevicemap.c (get_virtio_disk_name)
8889 (make_device_map): Likewise.
8890 Reported by Aurelien Jarno <aurel32@debian.org>
8892 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
8894 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
8895 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
8896 (make_device_map): Output entries for xvd type disks.
8898 2008-05-07 Robert Millan <rmh@aybabtu.com>
8900 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
8902 * util/grub-mkdevicemap.c (get_cciss_disk_name)
8903 (make_device_map): Likewise.
8904 Reported by Roland Dreier <rdreier@cisco.com>
8906 2008-05-07 Robert Millan <rmh@aybabtu.com>
8908 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
8909 grub_strstr() call. Correct a few mistakes in failure path handling.
8911 2008-05-06 Robert Millan <rmh@aybabtu.com>
8913 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8914 Do not print a trailing slash (therefore, the root directory is an
8916 (convert_system_path_to_grub_path): Do not remove trailing slash
8917 from make_system_path_relative_to_its_root() output.
8919 * util/i386/pc/grub-install.in: Add trailing slash to output from
8920 make_system_path_relative_to_its_root().
8922 2008-05-06 Robert Millan <rmh@aybabtu.com>
8924 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
8925 ensures that output lines aren't intermangled with those sent to
8926 stderr (via grub_util_info()).
8927 * util/grub-probe.c (grub_refresh): Likewise.
8928 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8930 2008-05-05 Christian Franke <franke@computer.org>
8932 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
8933 Add Cygwin device names.
8934 (get_ide_disk_name) [__CYGWIN__]: Likewise.
8935 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
8936 (check_device): Return error instead of success on empty name.
8937 (make_device_map): Move label inside linux specific code to
8938 prevent compiler warning.
8940 2008-04-30 Robert Millan <rmh@aybabtu.com>
8942 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
8943 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
8945 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
8947 2008-04-29 Robert Millan <rmh@aybabtu.com>
8949 * docs/grub.cfg: New file (example GRUB configuration).
8951 2008-04-26 Robert Millan <rmh@aybabtu.com>
8953 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
8954 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
8955 and `disk/ieee1275/nand.c'.
8957 2008-04-25 Bean <bean123ch@gmail.com>
8959 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
8962 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8963 change the buffer size to 4096 for cdrom device.
8965 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8967 (_linux_mod_SOURCES): New variable.
8968 (_linux_mod_CFLAGS): Likewise.
8969 (_linux_mod_LDFLAGS): Likewise.
8970 (linux_mod_SOURCES): Likewise.
8971 (linux_mod_CFLAGS): Likewise.
8972 (linux_mod_LDFLAGS): Likewise.
8973 (nand_mod_SOURCES): Likewise.
8974 (nand_mod_CFLAGS): Likewise.
8975 (nand_mod_LDFLAGS): Likewise.
8977 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8978 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8979 type property. (nand device in olpc don't have this property)
8981 * include/grub/disk.h (grub_disk_dev_id): New macro
8982 GRUB_DISK_DEVICE_NAND_ID.
8984 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8986 (grub_rescue_cmd_initrd): Likewise.
8988 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8989 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8990 ofw_cif_handler and ofw_idt, adjust padding number.
8992 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8993 GRUB_MACHINE_IEEE1275 is defined.
8995 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8996 Use NESTED_FUNC_ATTR attribute on the hook parameter.
8998 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8999 on nested function heap_init.
9000 (grub_upper_mem): New variable for i386-ieee1275.
9001 (grub_get_extended_memory): New function for i386-ieee1275.
9002 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
9004 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
9005 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
9008 * loader/i386/ieee1275/linux.c: New file.
9010 * loader/i386/ieee1275/linux_normal.c: New file.
9012 * disk/ieee1275/nand.c: New file.
9014 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
9016 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
9018 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
9020 2008-04-18 Robert Millan <rmh@aybabtu.com>
9022 Restructures early code path on ieee1275 to unify grub_main() as
9023 the first C function that is executed in every platform.
9025 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
9026 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
9028 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
9029 * kern/ieee1275/cmain.c (cmain): Rename to ...
9030 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
9031 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
9034 2008-04-18 Robert Millan <rmh@aybabtu.com>
9036 * util/update-grub.in: Fix syntax error when setting
9037 `GRUB_PRELOAD_MODULES'.
9038 Reported by Stephane Chazelas <stephane@artesyncp.com>
9040 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
9042 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
9043 section into account, newer toolchains generate unique build ids
9044 * configure.ac: remove the test for --build-id=none acceptance,
9045 we want build ids to be preserved
9046 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
9047 far from other sections don't cause the raw binary images grow
9050 2008-04-15 Robert Millan <rmh@aybabtu.com>
9052 * disk/lvm.c: Update copyright year.
9053 * kern/misc.c: Likewise.
9055 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
9057 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
9058 there is no memory left for physical volume name.
9060 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
9062 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
9063 volume name mapping to support bigger than 9 character names properly.
9065 2008-04-13 Robert Millan <rmh@aybabtu.com>
9067 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
9068 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
9070 2008-04-13 Christian Franke <franke@computer.org>
9072 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
9073 to create a floppy emulation boot CD when non emulation mode
9075 Enable Joliet CD filesystem extension.
9077 2008-04-13 Robert Millan <rmh@aybabtu.com>
9079 * kern/misc.c (grub_strncat): Fix off-by-one error.
9080 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
9082 * kern/env.c (grub_env_context_close): Clear current context, not
9084 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
9086 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
9088 2008-04-13 Robert Millan <rmh@aybabtu.com>
9090 Improve robustness when handling LVM.
9092 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
9093 (and leave `*p' unmodified).
9094 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
9096 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
9097 iterating through it.
9098 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
9100 (grub_lvm_scan_device): Check the return value (and fail gracefully
9101 when due) on each grub_lvm_getvalue() or grub_strstr() call.
9102 Don't assume `vg->pvs != NULL' when iterating through it.
9104 2008-04-13 Robert Millan <rmh@aybabtu.com>
9106 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
9107 * genmk.rb (partmap): New variable.
9108 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
9109 (#{partmap}): New target rule.
9110 * genpartmaplist.sh: New file.
9111 * Makefile.in (pkglib_DATA): Add partmap.lst.
9112 (partmap.lst): New target rule.
9113 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
9114 modules (including all partition maps), instead of preloading them.
9116 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
9118 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
9119 `linux-boot-prober' (if installed) to detect other operating
9120 systems which are installed on the computer and add them to
9122 * conf/common.rmk: Build and install 30_os-prober.
9124 2008-04-12 Robert Millan <rmh@aybabtu.com>
9126 * kern/powerpc/ieee1275/init.c: Move from here ...
9127 * kern/ieee1275/init.c: ... to here. Update all users.
9129 * kern/powerpc/ieee1275/cmain.c: Move from here ...
9130 * kern/ieee1275/cmain.c: ... to here. Update all users.
9132 * kern/powerpc/ieee1275/openfw.c: Move from here ...
9133 * kern/ieee1275/openfw.c: ... to here. Update all users.
9135 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
9136 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
9138 2008-04-10 Pavel Roskin <proski@gnu.org>
9140 * configure.ac: Always use "_cv_" in cache variables for
9141 compatibility with Autoconf 2.62.
9143 2008-04-07 Robert Millan <rmh@aybabtu.com>
9145 Revert grub/machine/init.h addition by Pavel (since it breaks on
9146 i386-ieee1275 and others):
9147 * util/i386/pc/misc.c: Remove grub/machine/init.h.
9148 * util/powerpc/ieee1275/misc.c: Likewise.
9150 2008-04-07 Robert Millan <rmh@aybabtu.com>
9152 * util/grub-probe.c (probe): Improve error message.
9154 2008-04-07 Robert Millan <rmh@aybabtu.com>
9156 * util/biosdisk.c (read_device_map): Skip devices that don't exist
9157 (this prevents the presence of a bogus entry from ruining the whole
9160 2008-04-06 Pavel Roskin <proski@gnu.org>
9162 * util/biosdisk.c: Include grub/util/biosdisk.h.
9163 * util/grub-fstest.c (execute_command): Make static.
9164 * util/grub-mkdevicemap.c (check_device): Likewise.
9165 * util/i386/pc/misc.c: Include grub/machine/init.h.
9166 * util/powerpc/ieee1275/misc.c: Likewise.
9167 * util/lvm.c: Include grub/util/lvm.h.
9168 * util/misc.c: Include grub/kernel.h, grub/misc.h and
9170 * util/raid.c: Include grub/util/raid.h.
9171 (grub_util_getdiskname): Make static.
9173 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
9174 grub_hostfs_fini(), as they are called from grub_init_all() and
9175 grub_fini_all() respectively. This fixes an infinite loop in
9176 grub-fstest due to double registration of hostfs.
9177 Reported by Christian Franke <Christian.Franke@t-online.de>
9179 2008-04-05 Pavel Roskin <proski@gnu.org>
9181 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
9182 all 8 functions. Otherwise, probe function 0 only.
9184 2008-04-04 Pavel Roskin <proski@gnu.org>
9186 * commands/lspci.c (grub_lspci_iter): Print the bus number
9189 * commands/lspci.c (grub_pci_classes): Fix typos.
9190 (grub_lspci_iter): Don't print func twice. Print vendor ID
9191 before device ID, as it's normally done.
9193 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9194 Fix signedness warnings.
9195 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
9197 * util/ieee1275/get_disk_name.c: Include config.h so that
9198 _GNU_SOURCE is defined and getline() is declared. Mark an
9199 unused argument as such. Fix a signedness warning.
9201 2008-04-02 Pavel Roskin <proski@gnu.org>
9203 * genkernsyms.sh.in: Use more robust assignments for CC and
9204 srcdir. Quote srcdir.
9205 * gensymlist.sh.in: Likewise. Assert at the compile time that
9206 the symbol table is not empty.
9208 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
9209 * fs/cpio.c (grub_cpio_read): Likewise.
9211 2008-04-01 Pavel Roskin <proski@gnu.org>
9213 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
9214 * disk/host.c (grub_host_open): Likewise.
9215 * disk/loopback.c (grub_loopback_open): Likewise.
9216 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
9217 disk->id as in disk/host.c, not a multi-character constant.
9219 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
9220 later is obsolete, potentially dangerous and sets a bad example.
9221 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
9222 * util/misc.c (grub_util_get_image_size): Likewise.
9224 * disk/loopback.c (options): Improve help for "--partitions".
9226 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
9227 options to align them with the short options, e.g. "echo -e".
9229 2008-03-31 Bean <bean123ch@gmail.com>
9231 * video/reader/png.c (grub_png_data): New member is_16bit and
9233 (grub_png_decode_image_header): Detect 16 bit png image.
9234 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
9235 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
9236 (grub_video_reader_png): Release memory occupied by image_data.
9238 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
9240 (grub_nfs_mount): Skip the test for sector per cluster.
9242 * include/grub/ntfs.h (MAX_SPC): Removed.
9244 2008-03-31 Bean <bean123ch@gmail.com>
9246 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
9247 (grub_probe_SOURCES): Add fs/afs.c.
9248 (grub_fstest_SOURCES): Likewise.
9249 (afs_mod_SOURCES): New variable.
9250 (afs_mod_CFLAGS): Likewise.
9251 (afs_mod_LDFLAGS): Likewise.
9253 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
9254 (grub_emu_SOURCES): Likewise.
9256 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9258 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9260 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9262 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9264 * fs/afs.c: New file.
9266 2008-03-30 Pavel Roskin <proski@gnu.org>
9268 * disk/host.c: Include grub/misc.h to fix a warning.
9269 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
9270 warnings about implicit declarations.
9272 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
9274 * include/grub/i386/loader.h: Change declaration of
9275 grub_linux_boot() to match what grub_loader_set() expects.
9276 * util/getroot.c (grub_guess_root_device): Return const char* to
9278 * util/grub-probe.c (probe): Fix a warning about uninitialized
9279 abstraction_name variable.
9280 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
9281 second argument as unused to fix a warning.
9283 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
9284 missing grub_error() call.
9286 * util/update-grub_lib.in: Define datarootdir, since Autoconf
9287 2.60 and newer uses it to define datadir.
9289 * commands/sleep.c: Fix warning about implicit declaration.
9290 * disk/memdisk.c: Likewise.
9291 * loader/aout.c: Likewise.
9292 * loader/i386/bsd_normal.c: Likewise.
9293 * util/grub-probe.c: Likewise.
9295 * commands/i386/cpuid.c (has_longmode): Make static.
9296 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
9297 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
9299 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
9300 GDT. This is more robust, as %ds can change.
9301 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
9302 calling real_to_prot().
9303 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
9305 2008-03-28 Pavel Roskin <proski@gnu.org>
9307 * kern/i386/pc/startup.S: Assert that uncompressed functions
9308 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
9309 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
9310 code, as they push parts of the code (error handlers) beyond
9311 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
9312 code as correctness and size.
9314 2008-03-28 Pavel Roskin <proski@gnu.org>
9316 * kern/i386/pc/startup.S
9317 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
9318 data block address to the real mode, keep offset minimal. This
9319 works around a bug in AWARD BIOS on old Athlon systems, which
9320 makes CD detection hang.
9322 2008-03-26 Pavel Roskin <proski@gnu.org>
9324 * normal/color.c (grub_parse_color_name_pair): Make `name' a
9326 * include/grub/normal.h: Add grub_parse_color_name_pair()
9329 2008-03-24 Bean <bean123ch@gmail.com>
9331 * disk/i386/pc/biosdisk.c (cd_start): Removed.
9332 (cd_count): Removed.
9333 (cd_drive): New variable.
9334 (grub_biosdisk_get_drive): Don't check for (cdN) device.
9335 (grub_biosdisk_call_hook): Likewise.
9336 (grub_biosdisk_iterate): Change cdrom detection method.
9337 (grub_biosdisk_open): Replace cd_start with cd_drive.
9338 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
9339 detect cdrom device.
9341 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
9343 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
9344 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
9345 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
9346 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
9347 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
9348 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
9349 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
9350 (grub_biosdisk_cdrp): New structure.
9351 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
9353 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
9355 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
9358 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
9361 2008-03-20 Robert Millan <rmh@aybabtu.com>
9363 Remove 2 TiB limit in ata.mod.
9364 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
9365 (grub_ata_dumpinfo): Print sector count with 0x%llx.
9366 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
9367 grub_uint64_t instead of grub_uint32_t.
9369 2008-03-05 Bean <bean123ch@gmail.com>
9371 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
9372 (grub_multiboot): Set boot device.
9374 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
9376 2008-03-02 Bean <bean123ch@gmail.com>
9378 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
9381 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
9383 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
9386 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
9389 * docs/fdl.texi: New file.
9391 * docs/mdate-sh: New file. Copied from gnulib.
9392 * docs/texinfo.tex: Likewise.
9394 * config.guess: Updated from gnulib.
9395 * install-sh: Likewise.
9397 2008-02-28 Robert Millan <rmh@aybabtu.com>
9399 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
9400 (aout_mod_SOURCES): New variable.
9401 (aout_mod_CFLAGS): Likewise.
9402 (aout_mod_LDFLAGS): Likewise.
9404 * conf/i386-ieee1275.rmk: Likewise.
9406 2008-02-28 Robert Millan <rmh@aybabtu.com>
9408 * util/update-grub.in: Reorganise terminal validity check. Accept
9409 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
9410 Based on suggestion by Franklin PIAT.
9412 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
9414 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
9416 * util/getroot.c (grub_util_check_block_device): New function that
9417 returns the given argument if it is a block device and returns NULL else.
9418 * util/grub-probe.c (argument_is_device): New variable.
9419 (probe): Promote device_name from a variable to an argument. Receive
9420 device_name from grub_util_check_block_device() if path is NULL and from
9421 grub_guess_root_device() else. Do not free() device_name anymore.
9422 (options): Introduce new parameter '-d, --device'.
9423 (main): Add description of the new parameter to the help screen.
9424 Rename path variable to argument. Set argument_is_device if the '-d'
9425 option is given. Pass argument to probe() depending on
9428 2008-02-24 Bean <bean123ch@gmail.com>
9430 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
9431 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
9432 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
9433 (GRUB_ISO9660_VOLDESC_PART): Likewise.
9434 (GRUB_ISO9660_VOLDESC_END): Likewise.
9435 (grub_iso9660_primary_voldesc): New member escape.
9436 (grub_iso9660_data): New member joliet.
9437 (grub_iso9660_convert_string): New function.
9438 (grub_iso9660_mount): Detect joliet extension.
9439 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
9440 (grub_iso9660_iso9660_label): Likewise.
9442 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
9443 (grub_setup_SOURCES): Add fs/udf.c.
9444 (grub_fstest_SOURCES): Likewise.
9445 (udf_mod_SOURCES): New variable.
9446 (udf_mod_CFLAGS): Likewise.
9447 (udf_mod_LDFLAGS): Likewise.
9449 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
9450 (grub_emu_SOURCES): Likewise.
9452 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9454 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9456 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9458 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9460 * fs/udf.c: New file.
9462 2008-02-24 Robert Millan <rmh@aybabtu.com>
9464 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
9465 (normal/lexer.c_DEPENDENCIES): New variables.
9466 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9467 (normal/lexer.c_DEPENDENCIES): Likewise.
9468 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
9469 (normal/lexer.c_DEPENDENCIES): Likewise.
9470 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
9471 (normal/lexer.c_DEPENDENCIES): Likewise.
9472 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9473 (normal/lexer.c_DEPENDENCIES): Likewise.
9474 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
9475 (normal/lexer.c_DEPENDENCIES): Likewise.
9477 2008-02-23 Robert Millan <rmh@aybabtu.com>
9479 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
9480 since they were intended to be in hex. This didn't break previously
9481 because of a bug in gpt_partition_map_iterate() (see below).
9483 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
9484 when checking the validity of GPT header.
9485 Remove `partno', since it always provides the same information as `i'.
9487 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
9489 * include/grub/efi/time.h: Fix a wrong comment.
9491 2008-02-19 Pavel Roskin <proski@gnu.org>
9493 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
9496 2008-02-19 Bean <bean123ch@gmail.com>
9498 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
9499 (aout_mod_SOURCES): New variable.
9500 (aout_mod_CFLAGS): Likewise.
9501 (aout_mod_LDFLAGS): Likewise.
9502 (_bsd_mod_SOURCES): New variable.
9503 (_bsd_mod_CFLAGS): Likewise.
9504 (_bsd_mod_LDFLAGS): Likewise.
9505 (bsd_mod_SOURCES): New variable.
9506 (bsd_mod_CFLAGS): Likewise.
9507 (bsd_mod_LDFLAGS): Likewise.
9509 * include/grub/aout.h: New file.
9511 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
9513 * include/grub/i386/bsd.h: New file.
9515 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
9518 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
9519 function is called, so that it's possible to change it inside the hook.
9520 (grub_elf64_load): Likewise.
9521 (grub_elf_file): Don't close the file if elf header is not found.
9522 (grub_elf_close): Close the file if grub_elf_file fails (The new
9523 grub_elf_file won't close it).
9524 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
9525 (grub_elf64_size): Likewise.
9527 * kern/i386/loader.S (grub_unix_real_boot): New function.
9529 * loader/aout.c: New file.
9531 * loader/i386/bsd.c: New file.
9533 * loader/i386/bsd_normal.c: New file.
9535 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
9537 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
9538 can test other formats.
9540 2008-02-19 Robert Millan <rmh@aybabtu.com>
9542 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
9543 (grub_gpt_partition_type_empty): Redefine with macro from
9544 `<grub/gpt_partition.h>'.
9545 (gpt_partition_map_iterate): Adjust partition type comparison.
9547 Export `entry' as partmap-specific `part.data' struct.
9548 (grub_gpt_header, grub_gpt_partentry): Move from here ...
9550 * include/grub/gpt_partition.h (grub_gpt_header)
9551 (grub_gpt_partentry): ... to here (new file).
9553 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
9555 (grub_gpt_partition_type_bios_boot): New const variable, defined
9556 with macro from `<grub/gpt_partition.h>'.
9558 (setup): Replace `first_start' with `embed_region', which keeps
9559 track of the embed region (and is partmap-agnostic).
9561 Replace find_first_partition_start() with find_usable_region(),
9562 which finds a usable region for embedding using partmap-specific
9563 knowledge (supports PC/MSDOS and GPT).
9565 Fix all assumptions that the embed region start at sector 1, using
9566 `embed_region.start' from now on. Similarly, use `embed_region.end'
9567 rather than `first_start' to calculate available size.
9569 In grub_util_info() message, replace "into after the MBR" with an
9570 indication of the specific sector our embed region starts at.
9572 2008-02-19 Robert Millan <rmh@aybabtu.com>
9574 * DISTLIST: Replace `commands/ieee1275/halt.c' and
9575 `commands/ieee1275/reboot.c' with `commands/halt.c' and
9576 `commands/reboot.c'.
9577 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
9578 (halt_mod_SOURCES): Likewise.
9579 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
9580 (halt_mod_SOURCES): Likewise.
9582 2008-02-17 Christian Franke <franke@computer.org>
9584 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
9586 2008-02-17 Robert Millan <rmh@aybabtu.com>
9588 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
9589 set `first_start' to 0 for non-PC/MSDOS partition maps.
9591 2008-02-16 Robert Millan <rmh@aybabtu.com>
9593 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
9594 do not assume partition map is PC/MSDOS before performing checks that
9595 are specific to that layout.
9597 2008-02-13 Robert Millan <rmh@aybabtu.com>
9599 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
9600 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
9601 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
9603 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
9605 * configure.ac: Only a cosmetic change on the handling of
9606 -fno-stack-protector.
9608 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
9610 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
9611 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
9613 (grub_install_SOURCES): Add halt.mod and reboot.mod.
9614 (halt_mod_SOURCES): New variable.
9615 (halt_mod_CFLAGS): Likewise.
9616 (halt_mod_LDFLAGS): Likewise.
9617 (reboot_mod_SOURCES): Likewise.
9618 (reboot_mod_CFLAGS): Likewise.
9619 (reboot_mod_LDFLAGS): Likewise.
9621 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
9622 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
9624 (halt_mod_SOURCES): Likewise.
9625 (reboot_mod_SOURCES): Likewise.
9627 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
9628 commands/i386/pc/reboot.c by commands/reboot.c.
9629 (reboot_mod_SOURCES): Likewise.
9631 * commands/i386/pc/reboot.c: merge this file ...
9633 * commands/ieee1275/reboot.c: ... and this file ...
9635 * commands/reboot.c: ... to this file.
9636 Add some precompiler directive to include the correct header for
9639 * commands/ieee1275/halt.c: move this file ...
9641 * commands/halt.c: ... to here.
9642 Add some precompiler directive to include the correct header for
9645 * include/grub/efi/efi.h (grub_reboot): New function declaration.
9646 (grub_halt): Likewise.
9648 * kern/efi/efi.c (grub_reboot): New function.
9649 (grub_halt): Likewise.
9651 2008-02-12 Robert Millan <rmh@aybabtu.com>
9653 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
9654 /dev (like it is done for /dev/mapper). This doesn't provide support
9655 for EVMS, but at least it is now easy to identify the problem when it
9658 2008-02-11 Robert Millan <rmh@aybabtu.com>
9660 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
9661 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
9662 comparing it with -1, not 0.
9664 2008-02-10 Robert Millan <rmh@aybabtu.com>
9666 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
9668 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9669 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
9671 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
9672 `disk/lvm.c' to the end of the list.
9673 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9674 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9676 2008-02-10 Robert Millan <rmh@aybabtu.com>
9678 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
9679 grub_print_error() instead. This will let user know why we're entering
9681 Based on suggestions from Sam Morris.
9683 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
9685 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
9686 on remaining N args, instead of "--" arg N times.
9688 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
9690 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
9691 (fill_with_default_glyph): Changed to use unknown_glyph for fill
9692 pattern for unknown glyphs.
9694 2008-02-09 Robert Millan <rmh@aybabtu.com>
9696 * configure.ac: Probe for `help2man'.
9697 * Makefile.in (builddir): New variable.
9698 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
9699 or otherwise add a few flags/options to it.
9700 (install-local): For every executable utility or script that is
9701 installed, invoke $(HELP2MAN) to install a manpage based on --help
9704 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
9705 that it doesn't prevent --help from working in build tree.
9707 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
9708 with `bug-grub@gnu.org'.
9709 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
9710 * util/update-grub.in (usage): New function.
9711 Implement proper argument check, with support for --help and --version
9712 (as well as existing -y).
9714 2008-02-09 Christian Franke <franke@computer.org>
9716 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
9717 avoid overwriting previous output.
9718 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
9720 2008-02-09 Robert Millan <rmh@aybabtu.com>
9722 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
9725 2008-02-09 Robert Millan <rmh@aybabtu.com>
9727 * commands/sleep.c: New file.
9728 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
9729 (sleep_mod_SOURCES): New variable.
9730 (sleep_mod_CFLAGS): Likewise.
9731 (sleep_mod_LDFLAGS): Likewise.
9733 2008-02-09 Robert Millan <rmh@aybabtu.com>
9735 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
9736 situations in which we can deduce the RAID size and the superblock
9739 2008-02-09 Robert Millan <rmh@aybabtu.com>
9741 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
9742 and return a grub_diskmemberlist_t composed of LVM physical volumes.
9743 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
9745 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
9746 and return a grub_diskmemberlist_t composed of physical array members.
9747 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
9749 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
9751 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
9752 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
9753 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
9755 * util/grub-probe.c (probe): Move partmap probing code from here ...
9756 (probe_partmap): ... to here.
9757 (probe): Use probe_partmap() once for the disk we're probing, and
9758 additionally, when such disk contains a memberlist() struct member,
9759 once for each disk that is contained in the structure returned by
9762 2008-02-09 Robert Millan <rmh@aybabtu.com>
9764 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
9765 environment variable to 'all' in order to obtain debug output from
9767 * util/i386/pc/grub-setup.c (main): Likewise.
9769 2008-02-08 Robert Millan <rmh@aybabtu.com>
9771 * disk/raid.c (grub_raid_scan_device): Check for
9772 `array->device[sb.this_disk.number]' rather than for
9773 `array->device[sb.this_disk.number]->name', since the latter is not
9774 guaranteed to be accessible.
9776 2008-02-08 Robert Millan <rmh@aybabtu.com>
9778 * disk/raid.c: Update copyright.
9779 * fs/cpio.c: Likewise.
9780 * include/grub/raid.h: Likewise.
9781 * loader/i386/pc/multiboot.c: Likewise.
9782 * util/hostfs.c: Likewise.
9784 2008-02-08 Robert Millan <rmh@aybabtu.com>
9786 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
9787 to a grub_disk_t array.
9788 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
9790 (grub_raid_scan_device): Replace `device[x].name' accesses with
9791 `device[x]->name'. Simplify initialization of `array->device[x]'.
9793 2008-02-08 Robert Millan <rmh@aybabtu.com>
9795 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
9796 grub_dprintf() calls.
9797 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
9800 2008-02-07 Christian Franke <franke@computer.org>
9802 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
9803 instead of fseek and ftell to support large files.
9804 (grub_hostfs_read): Likewise.
9806 2008-02-07 Robert Millan <rmh@aybabtu.com>
9808 Patch from Jeroen Dekkers.
9809 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
9810 failure, since successfully reading all array members might not be
9813 2008-02-06 Robert Millan <rmh@aybabtu.com>
9815 * util/grub-probe.c (probe): Simplify partmap probing (with the
9816 assumption that the first word up to the underscore equals to
9819 2008-02-06 Christian Franke <franke@computer.org>
9821 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
9822 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
9823 last block of a cpio or tar stream.
9824 Check for "TRAILER!!!" instead of any empty data
9825 block to detect last block of a cpio stream.
9826 (grub_cpio_dir): Fix constness of variable np.
9827 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
9828 cpio or tar trailer is detected. This fixes a crash
9829 on open of a non existing file.
9831 2008-02-05 Bean <bean123ch@gmail.com>
9833 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
9835 (grub_multiboot_load_elf64): Likewise.
9836 (grub_multiboot): Initialize mbi structure.
9838 * util/grub-fstest.c: Don't include unused header file script.h.
9840 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
9842 (grub_fstest_SOURCES): Likewise.
9844 2008-02-05 Robert Millan <rmh@aybabtu.com>
9846 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
9847 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
9848 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
9849 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
9851 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
9852 (translation_table): Replace hardcoded values with macros
9853 provided by `<grub/term.h>'.
9855 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
9856 (keyboard_map): Correct/add a few values, with macros provided
9858 (keyboard_map_shift): Zero values that don't differ from their
9859 `keyboard_map' equivalents.
9860 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
9861 Discard the second scan code that is always sent by Caps lock.
9862 Only use `keyboard_map_shift' when it provides a non-zero value,
9863 otherwise fallback to `keyboard_map'.
9865 2008-02-04 Bean <bean123ch@gmail.com>
9867 * Makefile.in (enable_grub_fstest): New variable.
9869 * conf/common.rmk (grub_fstest_init.lst): New rule.
9870 (grub_fstest_init.h): Likewise.
9871 (grub_fstest_init.c): Likewise.
9872 (util/grub-fstest.c_DEPENDENCIES): New variable.
9873 (grub_fstest_SOURCES): Likewise.
9875 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
9877 * util/grub-fstest.c: New file.
9879 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9881 Make grub-setup handle a separate root device.
9883 * util/i386/pc/grub-setup.c (setup): Always open the root device,
9884 so that the root device can be compared with the destination
9886 When embedding the core image, if the root and destination devices
9887 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
9889 When not embedding, set ROOT_DRIVE to 0xFF.
9891 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9893 Add support for having a grub directory in a different drive. This
9894 is still only the data handling part.
9896 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
9897 (codestart): Save %dh in GRUB_ROOT_DRIVE.
9898 (grub_root_drive): New variable.
9900 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
9901 instead of GRUB_BOOT_DRIVE to construct a device name. Set
9902 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
9905 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
9907 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
9909 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
9911 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
9912 is bogus, because PXE booting does not specify any drive
9915 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
9916 am not sure if this is really correct.
9918 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
9919 is always identical to the boot drive when booting from a CD.
9921 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
9923 (root_drive): New variable.
9924 (real_start): Unconditionally set %dh to ROOT_DRIVE.
9925 (setup_sectors): Push %dx right after popping it, because %dh will
9927 (copy_buffer): Restore %dx.
9929 2008-02-03 Robert Millan <rmh@aybabtu.com>
9931 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
9932 use `cdboot.img' for cdrom images.
9934 2008-02-03 Robert Millan <rmh@aybabtu.com>
9936 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
9937 only setup gfxterm when `font' command has succeeded.
9939 2008-02-03 Robert Millan <rmh@aybabtu.com>
9941 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
9942 (grub_rescue_cmd_multiboot_loader)
9943 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
9945 2008-02-03 Pavel Roskin <proski@gnu.org>
9947 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
9948 %edx and %esi from stack only after grub_gate_a20() is called.
9949 grub_gate_a20() clobbers %edx.
9951 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
9953 * configure.ac (AC_INIT): Bumped to 1.96.
9955 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
9956 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
9957 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
9958 video/readers/png.c.
9960 2008-02-03 Bean <bean123ch@gmail.com>
9962 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9963 (cdboot_img_SOURCES): New variable.
9964 (cdboot_img_ASFLAGS): New variable.
9965 (cdboot_img_LDFLAGS): New variable.
9967 * boot/i386/pc/cdboot.S: New file.
9969 * disk/i386/pc/biosdisk.c (cd_start): New variable.
9970 (cd_count): Likewise.
9971 (grub_biosdisk_get_drive): Add support for cd device.
9972 (grub_biosdisk_call_hook): Likewise.
9973 (grub_biosdisk_iterate): Likewise.
9974 (grub_biosdisk_open): Likewise.
9975 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9976 (grub_biosdisk_rw): Support reading from cd device.
9977 (GRUB_MOD_INIT): Iterate cd devices.
9979 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9980 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9981 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9983 * kern/i386/pc/init.c (make_install_device): Check for cd device.
9985 2008-02-02 Robert Millan <rmh@aybabtu.com>
9987 * commands/read.c: New file.
9988 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9989 (read_mod_SOURCES): New variable.
9990 (read_mod_CFLAGS): Likewise.
9991 (read_mod_LDFLAGS): Likewise.
9993 2008-02-02 Robert Millan <rmh@aybabtu.com>
9995 * normal/main.c (grub_normal_execute): Check for `menu->size' when
9996 determining whether menu has to be displayed.
9998 2008-02-02 Marco Gerards <marco@gnu.org>
10000 * bus/pci.c: New file.
10002 * include/grub/pci.h: Likewise.
10004 * include/grub/i386/pc/pci.h: Likewise.
10006 * commands/lspci.c: Likewise.
10008 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
10010 (pci_mod_SOURCES): New variable.
10011 (pci_mod_CFLAGS): Likewise.
10012 (pci_mod_LDFLAGS): Likewise.
10013 (lspci_mod_SOURCES): Likewise.
10014 (lspci_mod_CFLAGS): Likewise.
10015 (lspci_mod_LDFLAGS): Likewise.
10017 2008-02-02 Bean <bean123ch@gmail.com>
10019 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
10020 (grub_ufs_get_file_block): Fix indirect block calculation problem.
10022 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
10023 (grub_xfs_btree_node): New structure.
10024 (grub_xfs_btree_root): New structure.
10025 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
10026 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
10027 (GRUB_XFS_EXTENT_BLOCK): Likewise.
10028 (GRUB_XFS_EXTENT_SIZE): Likewise.
10029 (grub_xfs_read_block): Support btree format type.
10030 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
10031 Use directory block as basic unit.
10033 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
10035 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
10036 __attribute__ ((__regparm__ (1))).
10038 2008-02-01 Robert Millan <rmh@aybabtu.com>
10040 Correct a mistake in previous commit.
10042 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
10044 (normal/command.c_DEPENDENCIES): New variable.
10046 2008-02-01 Robert Millan <rmh@aybabtu.com>
10048 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
10050 (normal/command.c_DEPENDENCIES): New variable.
10051 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
10052 * conf/i386-ieee1275.rmk: Likewise.
10053 * conf/i386-linuxbios.rmk: Likewise.
10054 * conf/i386-pc.rmk: Likewise.
10055 * conf/sparc64-ieee1275.rmk: Likewise.
10056 * conf/powerpc-ieee1275.rmk: Likewise.
10057 (grub_emu_SOURCES): Add `fs/fshelp.c'.
10059 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
10061 2008-02-01 Robert Millan <rmh@aybabtu.com>
10063 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
10064 call at beginning of function.
10066 2008-01-31 Pavel Roskin <proski@gnu.org>
10068 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
10069 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
10070 (grub_mkrescue_SOURCES): Likewise.
10071 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
10073 2008-01-30 Robert Millan <rmh@aybabtu.com>
10075 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
10076 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
10077 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
10078 (grub_probe_SOURCES): ... to here.
10080 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
10081 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
10082 * conf/i386-ieee1275.rmk: Likewise.
10083 * conf/i386-linuxbios.rmk: Likewise.
10084 * conf/powerpc-ieee1275.rmk: Likewise.
10086 2008-01-30 Tristan Gingold <gingold@free.fr>
10088 * kern/rescue.c: Silently accept empty lines.
10090 2008-01-29 Bean <bean123ch@gmail.com>
10092 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
10093 (real_code_2): Code cleanup and change comment style.
10094 (move_memory): Avoid using 32-bit address mode.
10096 2008-01-29 Bean <bean123ch@gmail.com>
10098 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
10099 (png_mod_SOURCES): New variable.
10100 (png_mod_CFLAGS): Likewise.
10101 (png_mod_LDFLAGS): Likewise.
10103 * video/readers/png.c: New file.
10105 2008-01-28 Robert Millan <rmh@aybabtu.com>
10107 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
10108 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
10109 `ifndef GRUB_MOD_GAP' hack.
10110 * util/elf/grub-mkimage.c (add_segments): Likewise.
10112 2008-01-27 Robert Millan <rmh@aybabtu.com>
10114 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
10115 `GRUB_MOD_GAP' for platforms in which it's not defined.
10116 * util/elf/grub-mkimage.c (add_segments): Likewise.
10118 2008-01-27 Robert Millan <rmh@aybabtu.com>
10120 Get grub-emu to build again (including parallel builds).
10122 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
10124 (util/grub-emu.c_DEPENDENCIES): ... this, ...
10125 (normal/execute.c_DEPENDENCIES): ... this, ...
10126 (grub-emu_DEPENDENCIES): ... and this.
10128 * conf/i386-efi.rmk: Likewise.
10129 * conf/i386-linuxbios.rmk: Likewise.
10130 * conf/i386-ieee1275.rmk: Likewise.
10131 * conf/powerpc-ieee1275.rmk: Likewise.
10132 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
10134 2008-01-27 Robert Millan <rmh@aybabtu.com>
10136 * NEWS: Add a few items.
10138 2008-01-27 Robert Millan <rmh@aybabtu.com>
10140 Fix parallel builds with grub-emu. Based on earlier commit for
10141 grub-probe and grub-setup.
10143 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10144 (util/grub-emu.c_DEPENDENCIES): ... this.
10145 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10146 (util/grub-emu.c_DEPENDENCIES): ... this.
10147 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10148 (util/grub-emu.c_DEPENDENCIES): ... this.
10149 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10150 (util/grub-emu.c_DEPENDENCIES): ... this.
10151 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
10152 (util/grub-emu.c_DEPENDENCIES): ... this.
10154 2008-01-27 Pavel Roskin <proski@gnu.org>
10156 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
10157 to create a gap between _end and the modules added to the image
10158 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
10159 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
10160 * util/elf/grub-mkimage.c (add_segments): Likewise.
10162 2008-01-26 Pavel Roskin <proski@gnu.org>
10164 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
10165 just return an error.
10167 2008-01-26 Bean <bean123ch@gmail.com>
10169 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
10170 (grub_reiserfs_get_item): Save offset of the next item.
10171 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
10173 2008-01-25 Robert Millan <rmh@aybabtu.com>
10175 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
10176 make all filesystem sources appear together (possibly fixing omissions
10178 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10179 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10180 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10181 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10183 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
10185 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
10186 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10187 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
10188 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
10190 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
10191 (probe): Add a sanity check to make sure of our ability to read
10192 requested files when probing for filesystem type.
10194 * genmk.rb: Update copyright year (2007).
10196 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
10197 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
10198 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
10199 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
10200 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
10201 : Remove function prototypes.
10203 2008-01-25 Robert Millan <rmh@aybabtu.com>
10205 Revert my previous commits (based on wrong assumption of how grub_errno
10208 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
10209 * kern/file.c (grub_file_open): Likewise.
10211 2008-01-24 Pavel Roskin <proski@gnu.org>
10213 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
10214 that hang if GRUB tries to setup colors.
10215 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
10216 colors for firmwares that don't support it.
10217 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
10218 Recognize Open Hack'Ware, set flags to work around its
10221 2008-01-24 Robert Millan <rmh@aybabtu.com>
10223 * kern/file.c (grub_file_open): Do not account previous failures of
10224 unrelated functions when grub_errno is checked for.
10225 Reported by Oleg Strikov.
10227 2008-01-24 Bean <bean123ch@gmail.com>
10229 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
10230 (grub_ufs_sblock): New member volume name.
10231 (grub_ufs_find_file): Fix string copy bug.
10232 (grub_ufs_label): Implement this function properly.
10234 * fs/hfs.c (grub_hfs_cnid_type): New enum.
10235 (grub_hfs_iterate_records): Use the correct file number for extents
10236 and catalog file. Fix problem in next index calculation.
10237 (grub_hfs_find_node): Replace recursive function call with loop.
10238 (grub_hfs_iterate_dir): Replace recursive function call with loop.
10240 2008-01-23 Robert Millan <rmh@aybabtu.com>
10242 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
10243 `<grub/symbol.h>' and `<grub/multiboot.h>'.
10244 (grub_multiboot2_real_boot): New function prototype.
10246 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
10247 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
10249 * kern/i386/ieee1275/init.c (grub_os_area_addr)
10250 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
10252 2008-01-23 Robert Millan <rmh@aybabtu.com>
10254 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
10255 #ifdef'ed out grub_printf().
10257 2008-01-23 Robert Millan <rmh@aybabtu.com>
10259 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
10260 grub_dprintf calls, since they make "debug=all" mode unusable.
10261 (grub_console_checkkey): Likewise.
10263 2008-01-23 Robert Millan <rmh@aybabtu.com>
10265 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
10266 `term/i386/pc/at_keyboard.c'.
10267 (pkglib_MODULES): Add `serial.mod'.
10268 (serial_mod_SOURCES): New variable.
10269 (serial_mod_CFLAGS): Likewise.
10270 (serial_mod_LDFLAGS): Likewise.
10272 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
10273 `<grub/powerpc/ieee1275/console.h>'.
10274 (grub_keyboard_controller_init): New function prototype.
10275 (grub_console_checkkey): Likewise.
10276 (grub_console_getkey): Likewise.
10278 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
10281 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
10282 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
10284 2008-01-23 Robert Millan <rmh@aybabtu.com>
10286 * kern/i386/pc/init.c (make_install_device): When memdisk image is
10287 present, "(memdisk)/boot/grub" becomes the default prefix.
10289 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
10290 a memdisk tarball with all the modules. Add --overlay=DIR option that
10291 allows users to overlay additional files into the image.
10293 2008-01-23 Robert Millan <rmh@aybabtu.com>
10295 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
10296 and `machine/memory.h'.
10297 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
10298 (_multiboot_mod_SOURCES): New variable.
10299 (_multiboot_mod_CFLAGS): Likewise.
10300 (_multiboot_mod_LDFLAGS): Likewise.
10301 (multiboot_mod_SOURCES): Likewise.
10302 (multiboot_mod_CFLAGS): Likewise.
10303 (multiboot_mod_LDFLAGS): Likewise.
10305 * include/grub/i386/ieee1275/loader.h: New file.
10307 * include/grub/i386/ieee1275/machine.h: Likewise.
10309 * include/grub/i386/ieee1275/memory.h: Likewise.
10311 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
10312 variable declaration.
10313 (grub_os_area_size): Likewise.
10315 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
10316 (grub_lower_mem, grub_upper_mem): New variables.
10317 (grub_stop_floppy): New function (just to make
10318 grub_multiboot2_real_boot() happy).
10320 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
10321 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
10322 (grub_stop): New function.
10323 Include `"../realmode.S"' and `"../loader.S"'.
10325 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
10326 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
10328 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
10329 rely on grub_multiboot2_real_boot() for final boot.
10331 2008-01-22 Robert Millan <rmh@aybabtu.com>
10333 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
10334 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
10335 device that doesn't look like an SD card.
10336 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10337 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
10338 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
10339 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
10342 2008-01-22 Robert Millan <rmh@aybabtu.com>
10344 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
10345 avoid claiming over our own code.
10347 2008-01-22 Bean <bean123ch@gmail.com>
10349 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
10350 (jpeg_mod_SOURCES): New variable.
10351 (jpeg_mod_CFLAGS): Likewise.
10352 (jpeg_mod_LDFLAGS): Likewise.
10354 * video/readers/jpeg.c : New file.
10356 2008-01-22 Bean <bean123ch@gmail.com>
10358 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
10359 there are no more items.
10361 2008-01-21 Robert Millan <rmh@aybabtu.com>
10363 * kern/mm.c (grub_mm_init_region): Improve debug message.
10365 2008-01-21 Robert Millan <rmh@aybabtu.com>
10367 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
10368 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
10370 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
10372 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
10373 Indicates start of upper memory.
10374 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
10375 (generate_image): Abort when image size is big enough to corrupt
10378 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
10379 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
10380 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10381 instead of hardcoding 0xA0000.
10382 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
10383 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
10384 instead of hardcoding 0xA0000.
10386 2008-01-21 Robert Millan <rmh@aybabtu.com>
10388 * disk/memdisk.c (memdisk_size): New variable.
10389 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
10391 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
10392 image to dynamic memory.
10393 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
10394 `memdisk_size'. Free memdisk block.
10396 2008-01-21 Robert Millan <rmh@aybabtu.com>
10398 Fix detection of very small filesystems (like tar).
10400 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
10401 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
10402 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
10403 a problem with this disk).
10405 2008-01-21 Robert Millan <rmh@aybabtu.com>
10407 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
10408 on grub_biosdisk_rw_standard() error.
10410 2008-01-21 Robert Millan <rmh@aybabtu.com>
10412 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
10414 * kern/elf.c: Likewise.
10415 * kern/ieee1275/ieee1275.c: Likewise.
10416 * kern/powerpc/ieee1275/openfw.c: Likewise.
10417 * term/ieee1275/ofconsole.c: Likewise.
10419 2008-01-21 Robert Millan <rmh@aybabtu.com>
10421 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
10423 * include/grub/kernel.h (grub_arch_memdisk_addr)
10424 (grub_arch_memdisk_size): Moved from here ...
10426 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
10427 (grub_arch_memdisk_size): ... to here.
10429 2008-01-21 Robert Millan <rmh@aybabtu.com>
10431 Mostly based on bugfix from Bean.
10433 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
10434 attribute with hook() parameter.
10435 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
10437 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
10438 attribute with hook() parameter.
10439 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
10442 2008-01-21 Robert Millan <rmh@aybabtu.com>
10444 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
10445 (pkglib_MODULES): Add `memdisk.mod'.
10446 (memdisk_mod_SOURCES): New variable.
10447 (memdisk_mod_CFLAGS): Likewise.
10448 (memdisk_mod_LDFLAGS): Likewise.
10450 * disk/memdisk.c: New file.
10452 * include/grub/disk.h (grub_disk_dev_id): Add
10453 `GRUB_DISK_DEVICE_MEMDISK_ID'.
10455 * include/grub/i386/pc/kernel.h
10456 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
10457 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
10458 (grub_kernel_image_size): New variable declaration.
10459 (grub_total_module_size): Likewise.
10460 (grub_memdisk_image_size): Likewise.
10462 * include/grub/i386/pc/memory.h
10463 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
10465 * include/grub/kernel.h: Include `<grub/symbol.h>'.
10466 (grub_arch_memdisk_addr): New variable declaration.
10467 (grub_arch_memdisk_size): Likewise.
10469 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
10470 (grub_arch_memdisk_size): Likewise.
10472 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
10473 (codestart): Replace hardcoded `0x100000' with
10474 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
10476 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
10477 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
10478 not NULL, append the contents of the file it refers to, at the end of
10479 the compressed kernel image. Initialize `grub_memdisk_image_size'
10480 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
10481 (options): Add "memdisk"|'m' option.
10482 (main): Parse --memdisk|-m option, and pass user-provided path as
10483 parameter to generate_image().
10485 2008-01-20 Robert Millan <rmh@aybabtu.com>
10487 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
10488 grub_dprintf() calls from here ...
10489 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
10491 2008-01-20 Robert Millan <rmh@aybabtu.com>
10493 Fix detection of "real mode" when /options/real-mode? doesn't exist.
10495 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
10497 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
10498 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
10499 `GRUB_IEEE1275_FLAG_REAL_MODE'.
10500 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
10502 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
10503 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
10505 2008-01-19 Robert Millan <rmh@aybabtu.com>
10507 Get rid of confusing function (superseded by
10508 `grub_ieee1275_get_integer_property')
10509 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
10511 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
10513 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
10514 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
10515 in native endianness from grub_ieee1275_get_integer_property().
10517 2008-01-19 Robert Millan <rmh@aybabtu.com>
10519 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
10520 command after "shut-down", since implementations differ on which
10521 the command for halt is.
10523 2008-01-19 Robert Millan <rmh@aybabtu.com>
10525 * include/grub/i386/linuxbios/console.h: Add header protection.
10526 (grub_keyboard_controller_init): New function prototype.
10527 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
10528 (KEYBOARD_COMMAND_READ): Likewise.
10529 (KEYBOARD_COMMAND_WRITE): Likewise.
10530 (KEYBOARD_SCANCODE_SET1): Likewise.
10531 (grub_keyboard_controller_write): New function.
10532 (grub_keyboard_controller_read): Likewise.
10533 (grub_keyboard_controller_init): Likewise.
10535 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
10536 (grub_console_init): On coreboot/LinuxBIOS, call
10537 grub_keyboard_controller_init().
10539 2008-01-19 Robert Millan <rmh@aybabtu.com>
10541 PowerPC changes provided by Pavel Roskin.
10543 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
10544 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
10545 don't rely on cmain() doing it.
10546 * kern/i386/ieee1275/startup.S (_start): Store %eax in
10547 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
10549 2008-01-16 Robert Millan <rmh@aybabtu.com>
10551 * include/grub/i386/linuxbios/memory.h
10552 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
10553 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
10554 receive `table_header' as argument. Instead, probe for it in the
10555 known memory ranges where it can be present.
10556 (grub_available_iterate): Do not pass a fixed `table_header' address
10557 to grub_linuxbios_table_iterate().
10559 2008-01-15 Robert Millan <rmh@aybabtu.com>
10561 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
10562 * conf/i386-ieee1275.rmk: New file.
10563 * include/grub/i386/ieee1275/console.h: Likewise.
10564 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
10565 * include/grub/i386/ieee1275/kernel.h: Likewise.
10566 * include/grub/i386/ieee1275/time.h: Likewise.
10567 * kern/i386/ieee1275/init.c: Likewise.
10568 * kern/i386/ieee1275/startup.S: Likewise.
10570 2008-01-15 Robert Millan <rmh@aybabtu.com>
10572 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
10573 when pointers are 32-bit (but still do set it to one when they are
10576 2008-01-15 Robert Millan <rmh@aybabtu.com>
10578 * include/grub/ieee1275/ieee1275.h
10579 (grub_ieee1275_get_integer_property): New function prototype.
10581 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
10582 (grub_ieee1275_get_integer_property): New function. Wraps around
10583 grub_ieee1275_get_property() to handle endianness.
10585 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
10586 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
10588 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
10589 (grub_map): Likewise.
10590 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
10592 2008-01-15 Bean <bean123ch@gmail.com>
10594 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
10595 (grub_script_execute_cmdline): Reset grub_errno.
10597 * normal/main.c (read_config_file): Reset grub_errno.
10599 * normal/parse.y (script_init): New.
10600 (script): Move function and menuentry here.
10602 (command): Add delimiter at the end of command.
10603 (commands): Adjust to match the new command.
10604 (commandblock): Remove grub_script_lexer_record_start.
10605 (menuentry): Add grub_script_lexer_record_start, use the new commands.
10606 (if): Use the new commands.
10608 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
10610 2008-01-15 Robert Millan <rmh@aybabtu.com>
10612 * normal/menu.c (run_menu): Move timeout message from here ...
10613 (print_timeout): ... to here.
10614 (run_menu): Use print_timeout() once during initial draw to print
10615 the whole message, and again in every clock tick to update only
10616 the number of seconds.
10618 2008-01-15 Robert Millan <rmh@aybabtu.com>
10620 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
10621 actual size of `available' from grub_ieee1275_get_property(), and
10622 restrict parsing to that bound.
10624 2008-01-15 Christian Franke <franke@computer.org>
10626 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
10627 (argp_program_version): Remove variable.
10628 (argp_program_bug_address): Likewise.
10629 (options): Convert from struct argp_option to struct option.
10630 (struct arguments): Remove.
10631 (parse_opt): Remove.
10632 (usage): New function.
10633 (main): Replace struct args members by simple variables.
10634 Replace argp_parse() by getopt_long().
10635 Add switch to evaluate options.
10636 Add missing "(...)" around root_dev in prefix string.
10638 2008-01-14 Robert Millan <rmh@aybabtu.com>
10640 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
10641 for grub_ieee1275_exit(), in order to improve portability.
10643 2008-01-14 Robert Millan <rmh@aybabtu.com>
10645 * util/grub.d/10_linux.in (prefix): Define.
10646 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
10648 2008-01-13 Pavel Roskin <proski@gnu.org>
10650 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
10651 grub_errno if no errors have been detected.
10653 2008-01-12 Robert Millan <rmh@aybabtu.com>
10655 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
10656 (grub_util_get_dev_abstraction): New function prototype.
10658 * util/getroot.c: Include `<grub/util/getroot.h>'
10659 (grub_util_get_grub_dev): Move detection of abstraction type to ...
10660 (grub_util_get_dev_abstraction): ... here (new function).
10662 * util/grub-probe.c: Convert PRINT_* to an enum. Add
10663 `PRINT_ABSTRACTION'.
10664 (probe): Probe for abstraction type when requested.
10665 (main): Understand `--target=abstraction'.
10667 * util/i386/efi/grub-install.in: Add abstraction module to core
10668 image when it is found to be necessary.
10669 * util/i386/pc/grub-install.in: Likewise.
10670 * util/powerpc/ieee1275/grub-install.in: Likewise.
10672 * util/update-grub_lib.in (font_path): Return system path without
10673 converting to GRUB path.
10674 * util/update-grub.in: Convert system path returned by font_path()
10675 to a GRUB path. Use `grub-probe -t abstraction' to determine what
10676 abstraction module is needed for loading fonts (if any). Export
10677 that as `GRUB_PRELOAD_MODULES'.
10678 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
10681 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
10683 Remove some unused code from reiserfs.
10685 * fs/reiserfs.c (struct grub_reiserfs_key)
10686 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
10687 (struct grub_reiserfs_node_body): Removed.
10688 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
10690 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10692 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10694 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
10696 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
10698 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
10700 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10701 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10702 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
10704 2008-01-10 Robert Millan <rmh@aybabtu.com>
10706 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
10707 Determines if a file is garbage left by packaging systems, etc.
10708 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
10709 for processing /etc/grub.d scripts.
10710 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
10711 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
10712 as a condition for processing Linux images.
10714 2008-01-10 Pavel Roskin <proski@gnu.org>
10716 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
10717 to compile reiserfs.c on PowerPC.
10719 2008-01-10 Robert Millan <rmh@aybabtu.com>
10721 * kern/device.c (grub_device_iterate): Do not abort device iteration
10722 when one of the devices cannot be opened.
10723 * kern/disk.c (grub_disk_open): Do not account previous failures of
10724 unrelated functions when grub_errno is checked for.
10726 2008-01-08 Robert Millan <rmh@aybabtu.com>
10728 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
10729 `! grub_linux_is_bzimage', change order of address comparison to make
10730 it more intuitive, and improve "too big zImage" error message.
10732 2008-01-08 Robert Millan <rmh@aybabtu.com>
10734 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
10735 `$(update-grub_DATA)'.
10736 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
10739 2008-01-07 Robert Millan <rmh@aybabtu.com>
10741 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
10742 which instruction is modified by grub-setup during installation
10743 (since it wasn't obvious by only looking at this file).
10745 2008-01-07 Robert Millan <rmh@aybabtu.com>
10747 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
10748 listing actual TODO items.
10750 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10752 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
10754 (grub_reiserfs_get_key_offset): Likewise.
10755 (grub_reiserfs_set_key_offset): Likewise.
10756 (grub_reiserfs_set_key_type): Likewise.
10757 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
10759 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
10760 better to remove the bitfield version completely.
10762 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10764 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
10765 allocated from the heap, due to the fshelp implementation.
10766 (grub_reiserfs_dir): Free NODE, due to the same reason.
10768 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
10770 Mostly from Vincent Pelletier:
10772 * fs/reiserfs.c: New file.
10774 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
10775 (reiserfs_mod_SOURCES): New variable.
10776 (reiserfs_mod_CFLAGS): Likewise.
10777 (reiserfs_mod_LDFLAGS): Likewise.
10779 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
10780 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
10781 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
10784 2008-01-06 Robert Millan <rmh@aybabtu.com>
10786 * normal/color.c: Remove `<grub/env.h>'.
10788 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
10790 * include/grub/normal.h: Include <grub/env.h>.
10792 2008-01-05 Robert Millan <rmh@aybabtu.com>
10794 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
10795 usage example with `(hd0,1)'.
10796 Reported by Samuel Thibault.
10798 2008-01-05 Robert Millan <rmh@aybabtu.com>
10800 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
10801 (grub_linux_boot_zimage): Rename to ...
10802 (grub_linux_boot): ... this.
10803 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
10804 (grub_linux_boot_zimage): Conditionalize zImage copy.
10806 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
10807 (grub_linux_boot_bzimage): Remove prototype.
10808 (grub_linux_boot_zimage): Rename to ...
10809 (grub_linux_boot): ... this.
10811 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
10812 (grub_linux_boot): Remove function.
10814 2008-01-05 Robert Millan <rmh@aybabtu.com>
10816 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
10817 (grub_env_write_color_highlight): Likewise.
10818 (grub_wait_after_message): Likewise.
10820 * normal/color.c: New file.
10822 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10823 (normal_mod_DEPENDENCIES): Likewise.
10825 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10826 (normal_mod_DEPENDENCIES): Likewise.
10828 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10829 (normal_mod_DEPENDENCIES): Likewise.
10831 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
10832 (normal_mod_DEPENDENCIES): Likewise.
10834 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
10835 for waiting after a message is printed.
10836 * normal/main.c (read_config_file): Likewise.
10837 (grub_normal_init): Register grub_env_write_color_normal() and
10838 grub_env_write_color_highlight() hooks. Mark `color_normal' and
10839 `color_highlight' variables as global.
10841 * normal/menu.c (grub_wait_after_message): New function.
10842 (grub_color_menu_normal): New variable. Replaces ...
10843 (GRUB_COLOR_MENU_NORMAL): ... this macro.
10844 (grub_color_menu_highlight): New variable. Replaces ...
10845 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
10846 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
10847 `GRUB_TERM_COLOR_STANDARD'.
10848 (print_message): Use `grub_setcolorstate' to reload colors. Rename
10849 `normal_code' and `highlight_code' to `old_color_normal' and
10850 `old_color_highlight', respectively.
10851 (grub_menu_init_page): Update colors when drawing the menu, based on
10852 `menu_color_normal' and `menu_color_highlight' variables.
10853 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
10854 a message is printed.
10856 2008-01-05 Robert Millan <rmh@aybabtu.com>
10858 * kern/env.c (grub_env_context_open): Propagate hooks for global
10859 variables to new context.
10861 * kern/main.c (grub_set_root_dev): Export `root' variable.
10863 2008-01-05 Robert Millan <rmh@aybabtu.com>
10865 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
10866 discs unconditionally, since udev and others have options to provide
10869 2008-01-05 Robert Millan <rmh@aybabtu.com>
10871 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
10873 2008-01-04 Christian Franke <franke@computer.org>
10875 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
10878 2008-01-03 Pavel Roskin <proski@gnu.org>
10880 * kern/i386/linuxbios/init.c: Put "void" to all function
10881 declarations with no arguments.
10882 * kern/powerpc/ieee1275/init.c: Likewise.
10883 * term/i386/pc/at_keyboard.c: Likewise.
10884 * term/i386/pc/vga_text.c: Likewise.
10885 * util/grub-mkdevicemap.c: Likewise.
10887 2008-01-02 Robert Millan <rmh@aybabtu.com>
10889 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
10890 message when loaded image is out of bounds.
10891 (grub_multiboot_load_elf64): Likewise.
10893 2008-01-02 Pavel Roskin <proski@gnu.org>
10895 * util/grub.d/10_linux.in: Try version without ".old" when
10896 looking for initrd. It's better to use initrd from the newer
10897 kernel of the same version than no initrd at all.
10899 2008-01-01 Robert Millan <rmh@aybabtu.com>
10901 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
10903 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
10905 * include/grub/video.h: Added grub_video_unmap_color and
10906 grub_video_get_active_render_target.
10907 (grub_video_adapter): Added unmap_color and get_active_render_target.
10909 * video/video.c: Added grub_video_unmap_color and
10910 grub_video_get_active_render_target.
10911 (grub_video_get_info): Changed method to accept NULL pointer as an
10912 argument to allow detection of active video adapter.
10914 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
10915 grub_video_vbe_unmap_color_int.
10916 Added grub_video_vbe_unmap_color and
10917 grub_video_vbe_get_active_render_target.
10918 (grub_video_vbe_adapter): Added unmap_color and
10919 get_active_render_target.
10921 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
10922 with grub_video_vbe_unmap_color_int.
10924 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
10925 (DEFAULT_NORMAL_COLOR): Likewise.
10926 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
10927 (DEFAULT_FG_COLOR): Removed.
10928 (DEFAULT_BG_COLOR): Likewise.
10929 (DEFAULT_CURSOR_COLOR): Changed value.
10930 (grub_virtual_screen): Added standard_color_setting,
10931 normal_color_setting, highlight_color_setting and term_color.
10932 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
10933 (bitmap_width): Added.
10934 (bitmap_height): Likewise.
10935 (bitmap): Likewise.
10936 (set_term_color): Likewise.
10937 (grub_virtual_screen_setup): Changed to use new terminal coloring
10939 (grub_gfxterm_init): Added init for bitmap.
10940 (grub_gfxterm_fini): Added destroy for bitmap.
10941 (redraw_screen_rect): Updated to use background bitmap and new
10943 (scroll_up): Added optimization for case when there is no bitmap.
10944 (grub_gfxterm_cls): Fixed to use correct background color.
10945 (grub_virtual_screen_setcolorstate): Changed to use new terminal
10947 (grub_virtual_screen_setcolor): Likewise.
10948 (grub_virtual_screen_getcolor): Added.
10949 (grub_gfxterm_background_image_cmd): Likewise.
10950 (grub_video_term): Added setcolor and getcolor.
10951 (MOD_INIT): Added registration of background_image command.
10952 (MOD_TERM): Added unregistration for background_image command.
10954 2007-12-30 Pavel Roskin <proski@gnu.org>
10956 * loader/multiboot_loader.c: Fix multiboot command
10957 unregistration. Fix all typos in the word "multiboot".
10959 2007-12-29 Pavel Roskin <proski@gnu.org>
10961 * util/grub.d/10_linux.in: Refactor search for initrd. Add
10962 support for initrd names used in Fedora.
10964 2007-12-26 Bean <bean123ch@gmail.com>
10966 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10967 (cpio_mod_SOURCES): New variable.
10968 (cpio_mod_CFLAGS): Likewise.
10969 (cpio_mod_LDFLAGS): Likewise.
10971 * fs/cpio.c: New file.
10973 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10975 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10977 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10979 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10981 2007-12-25 Robert Millan <rmh@aybabtu.com>
10983 * include/grub/term.h (struct grub_term): Add `getcolor' function.
10984 (grub_getcolor): New function.
10986 * kern/term.c (grub_getcolor): New function.
10987 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10988 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10989 (print_entry): Set normal and highlight colors to
10990 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10991 respectively, before printing and restore them to old
10993 (grub_menu_init_page): Likewise. Fill an additional colored space
10994 that would otherwise be left blank.
10996 * term/efi/console.c (grub_console_getcolor): New function.
10997 (struct grub_console_term.getcolor): New variable.
10998 * term/i386/pc/console.c (grub_console_getcolor): New function.
10999 (struct grub_console_term.getcolor): New variable.
11000 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
11001 (struct grub_console_term.getcolor): New variable.
11003 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
11004 (struct grub_console_term.setcolor): Remove variable.
11005 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
11006 (struct grub_console_term.setcolor): Remove variable.
11007 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
11008 (struct grub_console_term.setcolor): Remove variable.
11009 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
11010 (struct grub_console_term.setcolor): Remove variable.
11012 2007-12-25 Robert Millan <rmh@aybabtu.com>
11014 * configure.ac: Search for possible unifont.hex locations, and
11015 define UNIFONT_HEX if found.
11017 * Makefile.in (UNIFONT_HEX): Define variable.
11018 (DATA): Rename to ...
11019 (PKGLIB): ... this. Update all users.
11020 (PKGDATA): New variable.
11021 (pkgdata_IMAGES): Rename to ...
11022 (pkglib_IMAGES): ... this. Update all users.
11023 (pkgdata_MODULES): Rename to ...
11024 (pkglib_MODULES): ... this. Update all users.
11025 (pkgdata_PROGRAMS): Rename to ...
11026 (pkglib_PROGRAMS): ... this. Update all users.
11027 (pkgdata_DATA): Rename to ...
11028 (pkglib_DATA): ... this. Update all users.
11029 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
11030 (unicode.pff, ascii.pff): New rules.
11031 (all-local): Add `$(PKGDATA)' dependency.
11032 (install-local): Process `$(PKGDATA)'.
11034 * util/update-grub_lib.in (font_path): Search for *.pff files in
11035 a few more locations, including `${pkgdata}'.
11037 2007-12-23 Robert Millan <rmh@aybabtu.com>
11039 Patch from Bean <bean123ch@gmail.com>:
11040 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
11043 2007-12-21 Bean <bean123ch@gmail.com>
11045 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
11046 (ntfscomp_mod_SOURCES): New variable.
11047 (ntfscomp_mod_CFLAGS): Likewise.
11048 (ntfscomp_mod_LDFLAGS): Likewise.
11050 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
11051 (grub_probe_SOURCES): Likewise.
11052 (grub_emu_SOURCES): Likewise.
11054 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11055 (grub_emu_SOURCES): Likewise.
11057 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11058 (grub_emu_SOURCES): Likewise.
11060 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
11061 (grub_emu_SOURCES): Likewise.
11063 * fs/ntfs.c (grub_ntfscomp_func): New variable.
11064 (read_run_list): Renamed to grub_ntfs_read_run_list.
11065 (decomp_nextvcn): Moved to ntfscomp.c.
11066 (decomp_getch): Likewise.
11067 (decomp_get16): Likewise.
11068 (decomp_block): Likewise.
11069 (read_block): Likewise.
11070 (read_data): Partially moved to ntfscomp.c.
11071 (fixup): Change unsigned to grub_uint16_t.
11072 (read_mft): Change unsigned long to grub_uint32_t.
11073 (read_attr): Likewise.
11074 (read_data): Likewise.
11075 (read_run_data): Likewise.
11076 (read_run_list): Likewise.
11077 (read_mft): Likewise.
11079 * fs/ntfscomp.c: New file.
11081 * include/grub/ntfs.h: New file.
11083 2007-12-16 Robert Millan <rmh@aybabtu.com>
11085 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
11086 IDE disk check, since Linux is known to support 20 IDE disks.
11087 Reported by Colin Watson.
11089 2007-12-15 Bean <bean123ch@gmail.com>
11091 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
11092 (lnxboot_img_SOURCES): New variable.
11093 (lnxboot_img_ASFLAGS): Likewise.
11094 (lnxboot_img_LDFLAGS): Likewise.
11096 * boot/i386/pc/lnxboot.S: New file.
11098 2007-11-24 Pavel Roskin <proski@gnu.org>
11100 * configure.ac: Test if '--build-id=none' is supported by the
11101 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
11102 objcopy to generate incorrect binary files (binutils
11103 2.17.50.0.18-1 as shipped by Fedora 8).
11104 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
11105 linking, so that build ID doesn't break the test.
11107 2007-11-24 Pavel Roskin <proski@gnu.org>
11109 * include/grub/i386/time.h: use "void" in the argument list
11110 of grub_cpu_idle().
11111 * include/grub/powerpc/time.h: Likewise.
11112 * include/grub/sparc64/time.h: Likewise.
11114 2007-11-18 Christian Franke <franke@computer.org>
11116 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
11117 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
11118 This fixes the problem that function keys did not work in grub-emu.
11120 2007-11-18 Christian Franke <franke@computer.org>
11122 * disk/host.c (grub_host_open): Remove attribute unused from
11123 name parameter. Add check for "host". This fixes the problem
11124 that grub-emu does not find partitions.
11126 2007-11-18 Christian Franke <franke@computer.org>
11128 * util/hostfs.c (is_dir): New function.
11129 (grub_hostfs_dir): Handle missing dirent.d_type case.
11130 (grub_hostfs_read): Add missing fseek().
11131 (grub_hostfs_label): Clear label pointer. This fixes a crash
11132 of grub-emu on "ls (host)".
11134 2007-11-18 Christian Franke <franke@computer.org>
11136 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
11137 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
11138 to 64 bit boundary by default.
11140 2007-11-18 Bean <bean123ch@gmail.com>
11142 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
11143 (hexdump_mod_SOURCES): New variable.
11144 (hexdump_mod_CFLAGS): Likewise.
11145 (hexdump_mod_LDFLAGS): Likewise.
11147 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11149 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11151 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11153 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
11155 * include/grub/hexdump.h: New file.
11157 * commands/hexdump.c: New file.
11159 2007-11-10 Robert Millan <rmh@aybabtu.com>
11161 * commands/i386/pc/play.c (beep_off): Switch order of arguments
11162 in grub_outb() calls.
11163 (beep_on): Likewise.
11165 2007-11-10 Christian Franke <franke@computer.org>
11167 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
11168 (grub_menu_run): Likewise.
11170 2007-11-10 Robert Millan <rmh@aybabtu.com>
11172 * include/grub/i386/efi/machine.h: New file.
11173 * include/grub/i386/linuxbios/machine.h: Likewise.
11174 * include/grub/i386/pc/machine.h: Likewise.
11175 * include/grub/powerpc/ieee1275/machine.h: Likewise.
11176 * include/grub/sparc64/ieee1275/machine.h: Likewise.
11178 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
11179 (serial_hw_io_addr): New variable.
11180 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
11181 instead of `(unsigned short *) 0x400'.
11183 2007-11-10 Bean <bean123ch@gmail.com>
11185 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
11187 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
11189 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
11190 (vga_mod_SOURCES): Added.
11191 (vga_mod_CFLAGS): Likewise.
11192 (vga_mod_LDFLAGS): Likewise.
11194 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
11196 (set_map_mask): Likewise.
11197 (set_read_map): Likewise.
11198 (set_read_address): Likewise.
11199 (vga_font): Removed variable.
11200 (get_vga_glyph): Removed function.
11201 (invalidate_char): Likewise.
11202 (write_char): Changed to use grub_font_get_glyph() for font
11204 (grub_vga_putchar): Likewise.
11205 (grub_vga_getcharwidth): Likewise.
11207 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
11209 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
11211 (pxeboot_img_LDFLAGS): Likewise.
11212 (diskboot_img_LDFLAGS): Likewise.
11213 (kernel_img_LDFLAGS): Likewise.
11215 2007-11-06 Robert Millan <rmh@aybabtu.com>
11217 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
11218 in grub_outb() calls.
11219 (serial_hw_init): Likewise.
11221 2007-11-05 Robert Millan <rmh@aybabtu.com>
11223 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
11224 spaces. Skip non-regular files.
11226 2007-11-05 Robert Millan <rmh@aybabtu.com>
11228 * kern/disk.c (grub_disk_firmware_fini)
11229 (grub_disk_firmware_is_tainted): New variables.
11231 * include/grub/disk.h (grub_disk_firmware_fini)
11232 (grub_disk_firmware_is_tainted): Likewise.
11234 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
11235 (grub_disk_biosdisk_fini): ... to here.
11236 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
11237 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
11238 is set. Register grub_disk_biosdisk_fini() in
11239 `grub_disk_firmware_fini'.
11241 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
11242 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
11243 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
11244 to finish existing firmware disk interface.
11246 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
11247 (ata_mod_SOURCES): New variable.
11248 (ata_mod_CFLAGS): Likewise.
11249 (ata_mod_LDFLAGS): Likewise.
11251 2007-11-05 Robert Millan <rmh@aybabtu.com>
11253 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
11254 (grub_ata_wait): Reimplement using grub_millisleep().
11256 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
11257 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
11259 2007-11-03 Marco Gerards <marco@gnu.org>
11261 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
11262 (CRTC_ADDR_PORT): New macro.
11263 (CRTC_DATA_PORT): Likewise.
11264 (CRTC_CURSOR): Likewise.
11265 (CRTC_CURSOR_ADDR_HIGH): Likewise.
11266 (CRTC_CURSOR_ADDR_LOW): Likewise.
11267 (update_cursor): New function.
11268 (grub_console_real_putchar): Call `update_cursor'.
11269 (grub_console_gotoxy): Likewise.
11270 (grub_console_cls): Set the default color when clearing the
11272 (grub_console_setcursor): Implemented.
11274 2007-11-03 Marco Gerards <marco@gnu.org>
11276 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
11278 (grub_ata_pio_write): Likewise.
11280 (grub_atapi_identify): Wait after issuing an ATA command.
11281 (grub_atapi_packet): Likewise.
11282 (grub_ata_identify): Likewise.
11283 (grub_ata_readwrite): Likewise.
11285 2007-11-03 Marco Gerards <marco@gnu.org>
11287 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
11288 (grub_ata_pio_write): Likewise.
11289 (grub_ata_readwrite): Use `grub_error', instead of
11290 returning `grub_errno'.
11292 2007-11-03 Marco Gerards <marco@gnu.org>
11294 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
11295 grub_ata_pio_write once for every single sector, instead of for
11298 2007-10-31 Robert Millan <rmh@aybabtu.com>
11300 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
11302 * conf/i386-linuxbios.rmk: New file.
11304 * kern/i386/pc/hardware.c: Likewise.
11305 * term/i386/pc/at_keyboard.c: Likewise.
11306 * term/i386/pc/vga_text.c: Likewise.
11308 * include/grub/i386/linuxbios/boot.h: Likewise.
11309 * include/grub/i386/linuxbios/console.h: Likewise.
11310 * include/grub/i386/linuxbios/init.h: Likewise.
11311 * include/grub/i386/linuxbios/kernel.h: Likewise.
11312 * include/grub/i386/linuxbios/loader.h: Likewise.
11313 * include/grub/i386/linuxbios/memory.h: Likewise.
11314 * include/grub/i386/linuxbios/serial.h: Likewise.
11315 * include/grub/i386/linuxbios/time.h: Likewise.
11317 * kern/i386/linuxbios/init.c: Likewise.
11318 * kern/i386/linuxbios/startup.S: Likewise.
11319 * kern/i386/linuxbios/table.c: Likewise.
11321 2007-10-31 Marco Gerards <marco@gnu.org>
11323 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
11324 (ata_mod_SOURCES): New variable.
11325 (ata_mod_CFLAGS): Likewise.
11326 (ata_mod_LDFLAGS): Likewise.
11328 * disk/ata.c: New file.
11330 * include/grub/disk.h (grub_disk_dev_id): Add
11331 `GRUB_DISK_DEV_ATA_ID'.
11333 2007-10-31 Robert Millan <rmh@aybabtu.com>
11335 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
11336 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
11338 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
11339 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
11341 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
11344 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
11346 2007-10-27 Robert Millan <rmh@aybabtu.com>
11348 * include/grub/types.h (ULONG_MAX): Define macro.
11350 2007-10-22 Robert Millan <rmh@aybabtu.com>
11352 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
11354 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
11356 2007-10-22 Robert Millan <rmh@aybabtu.com>
11358 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
11359 (pkgdata_MODULES): Add `biosdisk.mod'.
11360 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
11363 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
11364 (grub_biosdisk_init): Replace with ...
11365 (GRUB_MOD_INIT(biosdisk)): ... this.
11366 (grub_biosdisk_fini): Replace with ...
11367 (GRUB_MOD_FINI(biosdisk)): ... this.
11369 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
11370 (grub_machine_init): Remove call to grub_biosdisk_init().
11371 (grub_machine_fini): Remove call to grub_machine_fini().
11373 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
11375 2007-10-22 Robert Millan <rmh@aybabtu.com>
11377 * include/grub/time.h: New file.
11378 * include/grub/i386/time.h: Likewise.
11379 * include/grub/powerpc/time.h: Likewise.
11380 * include/grub/sparc64/time.h: Likewise.
11382 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
11384 (KERNEL_MACHINE_TIME_HEADER): ... this.
11385 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11387 (KERNEL_MACHINE_TIME_HEADER): ... this.
11388 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
11390 (KERNEL_MACHINE_TIME_HEADER): ... this.
11392 * kern/i386/efi/init.c: Include `<grub/time.h>'.
11393 (grub_millisleep): New function.
11394 * kern/i386/pc/init.c: Include `<grub/time.h>'.
11395 (grub_millisleep): New function.
11396 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
11397 Remove `grub/machine/time.h' include.
11398 (grub_millisleep): New function.
11399 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
11400 Remove `grub/machine/time.h' include.
11401 (grub_millisleep): New function.
11403 * include/grub/misc.h (grub_div_roundup): New function.
11405 * kern/misc.c: Include `<grub/time.h>'.
11406 (grub_millisleep_generic): New function.
11408 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
11410 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
11412 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
11413 `machine/time.h'. Add `time.h'.
11414 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11416 2007-10-21 Robert Millan <rmh@aybabtu.com>
11418 * include/grub/misc.h (grub_max): New function.
11420 2007-10-21 Robert Millan <rmh@aybabtu.com>
11422 * util/misc.c (grub_util_info): Call fflush() before returning.
11424 2007-10-20 Robert Millan <rmh@aybabtu.com>
11426 * genmk.rb (Image): Copy `extra_flags' from here ...
11427 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
11429 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
11430 to `argc' and `args' arguments.
11432 2007-10-17 Robert Millan <rmh@aybabtu.com>
11434 * kern/i386/loader.S: New file.
11436 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
11437 * kern/i386/loader.S (grub_linux_prot_size)... to here.
11438 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
11439 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
11440 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
11441 * kern/i386/loader.S (grub_linux_real_addr)... to here.
11442 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
11443 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
11444 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
11445 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
11446 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
11447 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
11448 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
11449 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
11451 * kern/i386/realmode.S: New file.
11453 * kern/i386/pc/startup.S (protstack): Moved from here ...
11454 * kern/i386/realmode.S (protstack)... to here.
11455 * kern/i386/pc/startup.S (gdt): Moved from here ...
11456 * kern/i386/realmode.S (gdt)... to here.
11457 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
11458 * kern/i386/realmode.S (prot_to_real)... to here.
11460 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
11461 `kern/i386/realmode.S'.
11463 2007-10-17 Robert Millan <rmh@aybabtu.com>
11465 * include/grub/i386/loader.h: New file.
11467 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
11468 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
11469 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
11470 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
11471 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
11472 * include/grub/i386/loader.h (grub_linux_prot_size)
11473 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
11474 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
11475 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
11476 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
11478 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
11480 2007-10-15 Robert Millan <rmh@aybabtu.com>
11482 * normal/misc.c (grub_normal_print_device_info): Do not probe for
11483 filesystem when dev->disk is unset.
11484 Do probe for filesystem even when dev->disk->has_partitions is set.
11485 In case a filesystem is found, always report it.
11486 In case it isn't, if dev->disk->has_partitions is set, report that
11487 a partition table was found instead of reporting that no filesystem
11488 could be identified.
11490 2007-10-12 Robert Millan <rmh@aybabtu.com>
11492 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
11493 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
11495 * include/grub/types.h (grub_host_to_target16): New macro.
11496 (grub_host_to_target32): Likewise.
11497 (grub_host_to_target64): Likewise.
11498 (grub_target_to_host16): Likewise.
11499 (grub_target_to_host32): Likewise.
11500 (grub_target_to_host64): Likewise.
11502 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11503 Renamed from to ...
11504 (GRUB_MOD_ALIGN): ...this. Update all users.
11506 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
11507 grub_host_to_target32.
11508 Replace grub_be_to_cpu32 with grub_target_to_host32.
11509 (load_modules): Likewise.
11510 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
11511 Replace grub_be_to_cpu32 with grub_target_to_host32.
11512 Replace grub_cpu_to_be16 with grub_host_to_target16.
11513 Replace grub_cpu_to_be32 grub_host_to_target32.
11515 2007-10-12 Robert Millan <rmh@aybabtu.com>
11517 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
11518 * util/elf/grub-mkimage.c: ... here.
11520 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
11521 `util/powerpc/ieee1275/grub-mkimage.c'.
11523 2007-10-07 Robert Millan <rmh@aybabtu.com>
11525 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
11526 and make it easier to figure out.
11527 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
11528 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
11529 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
11530 leave us with less than HEAP_MIN_SIZE total heap.
11531 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
11533 2007-10-03 Robert Millan <rmh@aybabtu.com>
11535 * include/grub/i386/io.h: New file.
11536 * commands/i386/pc/play.c (inb): Removed.
11538 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
11540 * term/i386/pc/serial.c (inb): Removed.
11542 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
11544 * term/i386/pc/vga.c (inb): Removed.
11546 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
11549 2007-10-02 Robert Millan <rmh@aybabtu.com>
11551 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
11552 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11553 Reported by Marcin Kurek.
11555 2007-09-07 Robert Millan <rmh@aybabtu.com>
11557 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
11558 SmartFirmware version updates (as released by Sven Luther), and avoid
11559 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
11560 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
11563 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11565 From Hitoshi Ozeki:
11566 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
11567 when merging two regions.
11569 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11571 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
11572 * normal/completion.c (grub_normal_do_completion): Likewise.
11573 Reported by Hitoshi Ozeki.
11575 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11577 Do not use devices at boot in chainloading.
11579 * loader/i386/pc/chainloader.c (boot_drive): New variable.
11580 (boot_part_addr): Likewise.
11581 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
11582 with BOOT_DRIVE and BOOT_PART_ADDR.
11583 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
11584 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
11586 2007-08-29 Robert Millan <rmh@aybabtu.com>
11588 Patch from Simon Peter <dn.tlp@gmx.net>:
11589 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
11590 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
11591 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
11592 util/i386/pc/grub-setup.c_DEPENDENCIES.
11593 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
11594 util/grub-probe.c_DEPENDENCIES.
11595 * conf/powerpc-ieee1275.rmk: Likewise.
11597 2007-08-28 Robert Millan <rmh@aybabtu.com>
11599 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
11600 to tell grub-mkdevicemap how to name devices.
11601 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
11604 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
11605 util/i386/get_disk_name.c.
11606 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
11607 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
11608 util/ieee1275/get_disk_name.c.
11610 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
11612 * DISTLIST: Add util/i386/get_disk_name.c and
11613 util/ieee1275/get_disk_name.c.
11615 * util/grub-mkdevicemap.c: Replace device naming logic with
11616 grub_util_get_disk_name() calls.
11618 2007-08-20 Robert Millan <rmh@aybabtu.com>
11620 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
11621 (so that it works for both plural and singular quantities).
11623 2007-08-05 Robert Millan <rmh@aybabtu.com>
11625 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
11626 so that [xz] isn't taken into account when determining order.
11628 2007-08-02 Marco Gerards <marco@gnu.org>
11630 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
11631 `include/multiboot2.h', `include/grub/elfload.h',
11632 `include/multiboot.h', `include/grub/multiboot.h',
11633 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
11634 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
11635 `kern/elf.c', `loader/multiboot_loader.c',
11636 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
11637 `loader/i386/pc/multiboot2.c',
11638 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
11639 `util/i386/pc/grub-mkrescue.in'. Remove
11640 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
11641 `include/grub/i386/pc/util/biosdisk.h' and
11642 `include/grub/powerpc/ieee1275/multiboot.h'.
11644 2007-08-02 Bean <bean123ch@gmail.com>
11646 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
11647 (ntfs_mod_SOURCES): New variable.
11648 (ntfs_mod_CFLAGS): Likewise.
11649 (ntfs_mod_LDFLAGS): Likewise.
11651 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
11652 (grub_probe_SOURCES): Likewise.
11653 (grub_emu_SOURCES): Likewise.
11655 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
11656 (grub_emu_SOURCES): Likewise.
11658 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
11659 (grub_emu_SOURCES): Likewise.
11661 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
11663 * fs/ntfs.c: New file.
11665 2007-08-02 Bean <bean123ch@gmail.com>
11667 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
11669 * file.h (grub_file): Likewise.
11671 * fshelp.h (grub_fshelp_read_file): Likewise.
11673 * util/i386/pc/grub-setup.c (setup): Likewise.
11674 (save_first_sector): Likewise.
11675 (save_blocklists): Likewise.
11677 * fs/affs.c (grub_affs_read_file): Likewise.
11679 * fs/ext2.c (grub_ext2_read_file): Likewise.
11681 * fs/fat.c (grub_fat_read_data): Likewise.
11683 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
11685 * fs/hfs.c (grub_hfs_read_file): Likewise.
11687 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11689 * fs/jfs.c (grub_jfs_read_file): Likewise.
11691 * fs/minix.c (grub_minix_read_file): Likewise.
11693 * fs/sfs.c (grub_sfs_read_file): Likewise.
11695 * fs/ufs.c (grub_ufs_read_file): Likewise.
11697 * fs/xfs.c (grub_xfs_read_file): Likewise.
11699 * command/blocklist.c (read_blocklist): Likewise.
11700 (print_blocklist): Likewise.
11702 2007-08-02 Marco Gerards <marco@gnu.org>
11704 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
11707 * disk/host.c: New file.
11709 * util/hostfs.c: Likewise.
11711 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
11712 return `GRUB_ERR_BAD_FS'.
11713 * fs/sfs.c (grub_sfs_mount): Likewise.
11714 * fs/xfs.c (grub_xfs_mount): Likewise.
11716 * include/grub/disk.h (enum grub_disk_dev_id): Add
11717 `GRUB_DISK_DEVICE_HOST_ID'.
11719 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
11721 2007-07-24 Jerone Young <jerone@gmail.com>
11723 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
11724 modules for compilation.
11725 * conf/powerpc-ieee1275.rmk: Likewise.
11727 * include/multiboot.h: Move multiboot definitions to one file. Rename
11728 many definitions to not get grub specific.
11729 * include/multiboot2.h: Create header with multiboot 2 definitions.
11730 * include/grub/multiboot.h: Header for grub specific function
11731 prototypes and definitions.
11732 * include/grub/multiboot2.h: Likewise.
11733 * include/grub/multiboot_loader.h: Likewise.
11734 * include/grub/i386/pc/multiboot.h: Removed.
11735 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
11737 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
11738 and 2 to allow for one multiboot and module commands.
11739 * loader/multiboot2.c: Add multiboot2 functionality.
11740 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
11741 and definition names.
11742 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
11744 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
11745 ieee1275 specific multiboot2 code.
11747 * kern/i386/pc/startup.S: Change headers and definition names for
11748 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
11750 2007-07-22 Robert Millan <rmh@aybabtu.com>
11752 * geninitheader.sh: Process file specified in first parameter rather
11753 than hardcoding grub_modules_init.lst.
11754 * geninit.sh: Likewise. Also, construct header name dynamically rather
11755 than hardcoding grub_modules_init.h.
11757 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
11758 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
11759 grub_probe_init.[ch] and grub_setup_init.[ch].
11761 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
11762 grub_modules_init.h with grub_emu_init.h.
11763 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
11764 grub_probe_init.[ch] files.
11765 * conf/i386-efi.rmk: Likewise.
11766 * conf/i386-pc.rmk: Likewise.
11767 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
11768 grub_setup_init.[ch] files.
11770 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
11771 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
11772 to initialize modules rather than a list of hardcoded functions.
11773 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
11774 grub_init_all() to initialize modules rather than a list of hardcoded
11777 2007-07-22 Robert Millan <rmh@aybabtu.com>
11779 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
11780 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
11782 2007-07-22 Robert Millan <rmh@aybabtu.com>
11784 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
11785 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
11786 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
11787 flag when running on SmartFirmware.
11788 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
11789 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
11792 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11793 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
11794 rather than decreasing it.
11796 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
11797 there's not enough space to do it, fail in the same way as when it
11798 can't be done because there are no partitions.
11800 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
11801 when nvsetenv failed.
11803 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
11805 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
11806 because this rule is automatically generated.
11807 (grub-mkrescue): Removed for the same reason as above.
11809 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
11811 Migrate to GNU General Public License Version 3.
11813 * COPYING: Replaced with the plain text version of GPLv3.
11815 * config.guess: Updated from gnulib.
11816 * config.sub: Likewise.
11818 * geninit.sh: Output a GPLv3 copyright notice.
11819 * geninitheader.sh: Likewise.
11820 * genmodsrc.sh: Likewise.
11821 * gensymlist.sh.in: Likewise.
11823 * boot/i386/pc/boot.S: Upgraded to GPLv3.
11824 * boot/i386/pc/diskboot.S: Likewise.
11825 * boot/i386/pc/pxeboot.S: Likewise.
11826 * commands/blocklist.c: Likewise.
11827 * commands/boot.c: Likewise.
11828 * commands/cat.c: Likewise.
11829 * commands/cmp.c: Likewise.
11830 * commands/configfile.c: Likewise.
11831 * commands/echo.c: Likewise.
11832 * commands/help.c: Likewise.
11833 * commands/ls.c: Likewise.
11834 * commands/search.c: Likewise.
11835 * commands/terminal.c: Likewise.
11836 * commands/test.c: Likewise.
11837 * commands/videotest.c: Likewise.
11838 * commands/i386/cpuid.c: Likewise.
11839 * commands/i386/pc/halt.c: Likewise.
11840 * commands/i386/pc/play.c: Likewise.
11841 * commands/i386/pc/reboot.c: Likewise.
11842 * commands/i386/pc/vbeinfo.c: Likewise.
11843 * commands/i386/pc/vbetest.c: Likewise.
11844 * commands/ieee1275/halt.c: Likewise.
11845 * commands/ieee1275/reboot.c: Likewise.
11846 * commands/ieee1275/suspend.c: Likewise.
11847 * disk/loopback.c: Likewise.
11848 * disk/lvm.c: Likewise.
11849 * disk/raid.c: Likewise.
11850 * disk/efi/efidisk.c: Likewise.
11851 * disk/i386/pc/biosdisk.c: Likewise.
11852 * disk/ieee1275/ofdisk.c: Likewise.
11853 * font/manager.c: Likewise.
11854 * fs/affs.c: Likewise.
11855 * fs/ext2.c: Likewise.
11856 * fs/fat.c: Likewise.
11857 * fs/fshelp.c: Likewise.
11858 * fs/hfs.c: Likewise.
11859 * fs/hfsplus.c: Likewise.
11860 * fs/iso9660.c: Likewise.
11861 * fs/jfs.c: Likewise.
11862 * fs/minix.c: Likewise.
11863 * fs/sfs.c: Likewise.
11864 * fs/ufs.c: Likewise.
11865 * fs/xfs.c: Likewise.
11866 * hello/hello.c: Likewise.
11867 * include/grub/acorn_filecore.h: Likewise.
11868 * include/grub/arg.h: Likewise.
11869 * include/grub/bitmap.h: Likewise.
11870 * include/grub/boot.h: Likewise.
11871 * include/grub/cache.h: Likewise.
11872 * include/grub/device.h: Likewise.
11873 * include/grub/disk.h: Likewise.
11874 * include/grub/dl.h: Likewise.
11875 * include/grub/elfload.h: Likewise.
11876 * include/grub/env.h: Likewise.
11877 * include/grub/err.h: Likewise.
11878 * include/grub/file.h: Likewise.
11879 * include/grub/font.h: Likewise.
11880 * include/grub/fs.h: Likewise.
11881 * include/grub/fshelp.h: Likewise.
11882 * include/grub/gzio.h: Likewise.
11883 * include/grub/hfs.h: Likewise.
11884 * include/grub/kernel.h: Likewise.
11885 * include/grub/loader.h: Likewise.
11886 * include/grub/lvm.h: Likewise.
11887 * include/grub/misc.h: Likewise.
11888 * include/grub/mm.h: Likewise.
11889 * include/grub/net.h: Likewise.
11890 * include/grub/normal.h: Likewise.
11891 * include/grub/parser.h: Likewise.
11892 * include/grub/partition.h: Likewise.
11893 * include/grub/pc_partition.h: Likewise.
11894 * include/grub/raid.h: Likewise.
11895 * include/grub/rescue.h: Likewise.
11896 * include/grub/script.h: Likewise.
11897 * include/grub/setjmp.h: Likewise.
11898 * include/grub/symbol.h: Likewise.
11899 * include/grub/term.h: Likewise.
11900 * include/grub/terminfo.h: Likewise.
11901 * include/grub/tparm.h: Likewise.
11902 * include/grub/types.h: Likewise.
11903 * include/grub/video.h: Likewise.
11904 * include/grub/efi/api.h: Likewise.
11905 * include/grub/efi/chainloader.h: Likewise.
11906 * include/grub/efi/console.h: Likewise.
11907 * include/grub/efi/console_control.h: Likewise.
11908 * include/grub/efi/disk.h: Likewise.
11909 * include/grub/efi/efi.h: Likewise.
11910 * include/grub/efi/pe32.h: Likewise.
11911 * include/grub/efi/time.h: Likewise.
11912 * include/grub/i386/linux.h: Likewise.
11913 * include/grub/i386/setjmp.h: Likewise.
11914 * include/grub/i386/types.h: Likewise.
11915 * include/grub/i386/efi/kernel.h: Likewise.
11916 * include/grub/i386/efi/loader.h: Likewise.
11917 * include/grub/i386/efi/time.h: Likewise.
11918 * include/grub/i386/pc/biosdisk.h: Likewise.
11919 * include/grub/i386/pc/boot.h: Likewise.
11920 * include/grub/i386/pc/chainloader.h: Likewise.
11921 * include/grub/i386/pc/console.h: Likewise.
11922 * include/grub/i386/pc/init.h: Likewise.
11923 * include/grub/i386/pc/kernel.h: Likewise.
11924 * include/grub/i386/pc/loader.h: Likewise.
11925 * include/grub/i386/pc/memory.h: Likewise.
11926 * include/grub/i386/pc/multiboot.h: Likewise.
11927 * include/grub/i386/pc/serial.h: Likewise.
11928 * include/grub/i386/pc/time.h: Likewise.
11929 * include/grub/i386/pc/vbe.h: Likewise.
11930 * include/grub/i386/pc/vbeblit.h: Likewise.
11931 * include/grub/i386/pc/vbefill.h: Likewise.
11932 * include/grub/i386/pc/vbeutil.h: Likewise.
11933 * include/grub/i386/pc/vga.h: Likewise.
11934 * include/grub/ieee1275/ieee1275.h: Likewise.
11935 * include/grub/ieee1275/ofdisk.h: Likewise.
11936 * include/grub/powerpc/libgcc.h: Likewise.
11937 * include/grub/powerpc/setjmp.h: Likewise.
11938 * include/grub/powerpc/types.h: Likewise.
11939 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
11940 * include/grub/powerpc/ieee1275/console.h: Likewise.
11941 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
11942 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
11943 * include/grub/powerpc/ieee1275/loader.h: Likewise.
11944 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
11945 * include/grub/powerpc/ieee1275/time.h: Likewise.
11946 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
11947 * include/grub/sparc64/libgcc.h: Likewise.
11948 * include/grub/sparc64/setjmp.h: Likewise.
11949 * include/grub/sparc64/types.h: Likewise.
11950 * include/grub/sparc64/ieee1275/console.h: Likewise.
11951 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11952 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11953 * include/grub/sparc64/ieee1275/time.h: Likewise.
11954 * include/grub/util/biosdisk.h: Likewise.
11955 * include/grub/util/getroot.h: Likewise.
11956 * include/grub/util/lvm.h: Likewise.
11957 * include/grub/util/misc.h: Likewise.
11958 * include/grub/util/raid.h: Likewise.
11959 * include/grub/util/resolve.h: Likewise.
11960 * io/gzio.c: Likewise.
11961 * kern/device.c: Likewise.
11962 * kern/disk.c: Likewise.
11963 * kern/dl.c: Likewise.
11964 * kern/elf.c: Likewise.
11965 * kern/env.c: Likewise.
11966 * kern/err.c: Likewise.
11967 * kern/file.c: Likewise.
11968 * kern/fs.c: Likewise.
11969 * kern/loader.c: Likewise.
11970 * kern/main.c: Likewise.
11971 * kern/misc.c: Likewise.
11972 * kern/mm.c: Likewise.
11973 * kern/parser.c: Likewise.
11974 * kern/partition.c: Likewise.
11975 * kern/rescue.c: Likewise.
11976 * kern/term.c: Likewise.
11977 * kern/efi/efi.c: Likewise.
11978 * kern/efi/init.c: Likewise.
11979 * kern/efi/mm.c: Likewise.
11980 * kern/i386/dl.c: Likewise.
11981 * kern/i386/efi/init.c: Likewise.
11982 * kern/i386/efi/startup.S: Likewise.
11983 * kern/i386/pc/init.c: Likewise.
11984 * kern/i386/pc/lzo1x.S: Likewise.
11985 * kern/i386/pc/startup.S: Likewise.
11986 * kern/ieee1275/ieee1275.c: Likewise.
11987 * kern/powerpc/cache.S: Likewise.
11988 * kern/powerpc/dl.c: Likewise.
11989 * kern/powerpc/ieee1275/cmain.c: Likewise.
11990 * kern/powerpc/ieee1275/crt0.S: Likewise.
11991 * kern/powerpc/ieee1275/init.c: Likewise.
11992 * kern/powerpc/ieee1275/openfw.c: Likewise.
11993 * kern/sparc64/cache.S: Likewise.
11994 * kern/sparc64/dl.c: Likewise.
11995 * kern/sparc64/ieee1275/init.c: Likewise.
11996 * kern/sparc64/ieee1275/openfw.c: Likewise.
11997 * loader/efi/chainloader.c: Likewise.
11998 * loader/efi/chainloader_normal.c: Likewise.
11999 * loader/i386/efi/linux.c: Likewise.
12000 * loader/i386/efi/linux_normal.c: Likewise.
12001 * loader/i386/pc/chainloader.c: Likewise.
12002 * loader/i386/pc/chainloader_normal.c: Likewise.
12003 * loader/i386/pc/linux.c: Likewise.
12004 * loader/i386/pc/linux_normal.c: Likewise.
12005 * loader/i386/pc/multiboot.c: Likewise.
12006 * loader/i386/pc/multiboot_normal.c: Likewise.
12007 * loader/powerpc/ieee1275/linux.c: Likewise.
12008 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12009 * normal/arg.c: Likewise.
12010 * normal/cmdline.c: Likewise.
12011 * normal/command.c: Likewise.
12012 * normal/completion.c: Likewise.
12013 * normal/execute.c: Likewise.
12014 * normal/function.c: Likewise.
12015 * normal/lexer.c: Likewise.
12016 * normal/main.c: Likewise.
12017 * normal/menu.c: Likewise.
12018 * normal/menu_entry.c: Likewise.
12019 * normal/misc.c: Likewise.
12020 * normal/parser.y: Likewise.
12021 * normal/script.c: Likewise.
12022 * normal/i386/setjmp.S: Likewise.
12023 * normal/powerpc/setjmp.S: Likewise.
12024 * normal/sparc64/setjmp.S: Likewise.
12025 * partmap/acorn.c: Likewise.
12026 * partmap/amiga.c: Likewise.
12027 * partmap/apple.c: Likewise.
12028 * partmap/gpt.c: Likewise.
12029 * partmap/pc.c: Likewise.
12030 * partmap/sun.c: Likewise.
12031 * term/gfxterm.c: Likewise.
12032 * term/terminfo.c: Likewise.
12033 * term/efi/console.c: Likewise.
12034 * term/i386/pc/console.c: Likewise.
12035 * term/i386/pc/serial.c: Likewise.
12036 * term/i386/pc/vesafb.c: Likewise.
12037 * term/i386/pc/vga.c: Likewise.
12038 * term/ieee1275/ofconsole.c: Likewise.
12039 * util/biosdisk.c: Likewise.
12040 * util/console.c: Likewise.
12041 * util/genmoddep.c: Likewise.
12042 * util/getroot.c: Likewise.
12043 * util/grub-emu.c: Likewise.
12044 * util/grub-mkdevicemap.c: Likewise.
12045 * util/grub-probe.c: Likewise.
12046 * util/lvm.c: Likewise.
12047 * util/misc.c: Likewise.
12048 * util/raid.c: Likewise.
12049 * util/resolve.c: Likewise.
12050 * util/update-grub.in: Likewise.
12051 * util/update-grub_lib.in: Likewise.
12052 * util/grub.d/00_header.in: Likewise.
12053 * util/grub.d/10_hurd.in: Likewise.
12054 * util/grub.d/10_linux.in: Likewise.
12055 * util/i386/efi/grub-install.in: Likewise.
12056 * util/i386/efi/grub-mkimage.c: Likewise.
12057 * util/i386/pc/grub-install.in: Likewise.
12058 * util/i386/pc/grub-mkimage.c: Likewise.
12059 * util/i386/pc/grub-mkrescue.in: Likewise.
12060 * util/i386/pc/grub-setup.c: Likewise.
12061 * util/i386/pc/misc.c: Likewise.
12062 * util/powerpc/ieee1275/grub-install.in: Likewise.
12063 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
12064 * util/powerpc/ieee1275/misc.c: Likewise.
12065 * video/bitmap.c: Likewise.
12066 * video/video.c: Likewise.
12067 * video/i386/pc/vbe.c: Likewise.
12068 * video/i386/pc/vbeblit.c: Likewise.
12069 * video/i386/pc/vbefill.c: Likewise.
12070 * video/i386/pc/vbeutil.c: Likewise.
12071 * video/readers/tga.c: Likewise.
12073 2007-07-02 Robert Millan <rmh@aybabtu.com>
12075 * conf/i386-efi.rmk: Replace obsolete reference to
12076 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
12077 with util/getroot.c.
12078 * conf/powerpc-ieee1275.rmk: Likewise.
12079 * conf/sparc64-ieee1275.rmk: Likewise.
12081 * util/grub-emu.c (main): Fix unchecked pointer handling.
12083 2007-07-02 Robert Millan <rmh@aybabtu.com>
12085 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
12086 invocation to fail, in order to support partition-less media.
12088 * util/i386/pc/grub-install.in: Likewise.
12090 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
12091 which fs or partmap modules are needed (akin to its sister scripts).
12093 Also use grub-probe to get rid of unportable /proc/mounts check.
12095 Print the same informational message that the other scripts do, before
12098 2007-06-23 Robert Millan <rmh@aybabtu.com>
12100 * util/update-grub_lib.in (font_path): New function. Determine whether
12101 a font file can be found and, if so, echo the GRUB path to it.
12103 * util/update-grub.in: Handle multiple terminals depending on user
12104 input, platform availability and font file presence. Propagate
12105 variables of our findings to /etc/grub.d/ children.
12107 * util/grub.d/00_header.in: Handle multiple terminals, based on
12108 environment setup by update-grub.
12110 2007-06-23 Robert Millan <rmh@aybabtu.com>
12112 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
12114 2007-06-21 Robert Millan <rmh@aybabtu.com>
12116 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
12117 indicate end of data section in kernel image.
12118 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
12119 GRUB_KERNEL_MACHINE_DATA_END.
12121 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
12123 * kern/i386/efi/startup.S: Likewise.
12125 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
12126 during image generation. Implement --prefix option to override this
12128 * util/i386/efi/grub-mkimage.c: Likewise.
12130 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
12131 code to make path relative to its root into a separate function.
12133 * util/i386/pc/grub-install.in: Use newly provided
12134 make_system_path_relative_to_its_root() to convert ${grubdir}, then
12135 pass the result to grub-install --prefix.
12137 2007-06-13 Robert Millan <rmh@aybabtu.com>
12139 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
12140 DEFAULT_DEVICE_MAP.
12141 * util/grub-emu.c: Use above definitions from misc.h instead of
12143 * util/grub-mkdevicemap.c: Likewise.
12144 * util/i386/pc/grub-setup.c: Likewise.
12145 * util/grub-probe.c: Likewise.
12146 (probe): Abort with grub_util_error() when either
12147 grub_guess_root_device or grub_util_get_grub_dev fails.
12149 2007-06-12 Robert Millan <rmh@aybabtu.com>
12151 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
12152 "pager" assignment.
12153 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
12155 * util/grub-probe.c (probe): Likewise for "drive_name".
12157 2007-06-11 Robert Millan <rmh@aybabtu.com>
12159 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
12160 not just the cdrom one.
12162 2007-06-11 Robert Millan <rmh@aybabtu.com>
12164 * util/i386/pc/grub-mkrescue.in: Add "set -e".
12165 Add --pkglibdir=DIR option to override pkglibdir.
12166 Mention --image-type=TYPE in help output.
12167 Fix --grub-mkimage (it was a no-op).
12168 Abort gracefully when no parameter is given.
12170 2007-06-11 Robert Millan <rmh@aybabtu.com>
12172 * util/i386/pc/grub-mkrescue.in: New file.
12173 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
12174 * Makefile.in: Handle bin_SCRIPTS.
12176 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
12178 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
12179 list of video modes.
12181 2007-06-06 Robert Millan <rmh@aybabtu.com>
12183 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
12184 file doesn't exist, or if it is in a filesystem grub can't read.
12186 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
12187 not abort if GRUB_DRIVE could not be defined. Rearrange generated
12188 header comment to fit in 80 columns when the variables are resolved.
12190 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
12191 could be identified by update-grub. Remove redundant check for
12192 unifont.pff existence (since convert_system_path_to_grub_path now
12195 2007-06-04 Robert Millan <rmh@aybabtu.com>
12197 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
12199 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
12201 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
12203 2007-06-04 Robert Millan <rmh@aybabtu.com>
12205 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
12207 * include/grub/partition.h: Declare grub_apple_partition_map_init and
12208 grub_apple_partition_map_fini.
12211 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
12212 to access >2 TiB disks).
12214 Print disk->total_sectors with %llu instead of %lu, since this
12215 variable is always 64-bit (prevents wrong disk size from being displayed
12216 on either >2 TiB disk or big-endian CPU).
12218 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
12219 into a generic case that supports all (sane) partition maps.
12221 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
12224 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
12225 and grub_apple_partition_map_fini() after that.
12227 2007-06-01 Robert Millan <rmh@aybabtu.com>
12229 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
12231 * util/grub.d/00_header.in: Only enable gfxterm when
12232 convert_system_path_to_grub_path() succeeds.
12234 2007-05-20 Robert Millan <rmh@aybabtu.com>
12236 * util/update-grub_lib.in: New file.
12237 * DISTLIST: Add update-grub_lib.in.
12238 * conf/common.rmk: Generate update-grub_lib and install it in
12240 * Makefile.in: Add install routine for $(lib_DATA).
12242 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
12243 function provided by update-grub_lib to support arbitrary paths of
12245 * util/update-grub.in: Use convert_system_path_to_grub_path() to
12246 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
12248 2007-05-19 Robert Millan <rmh@aybabtu.com>
12250 * commands/i386/cpuid.c: New module.
12251 * DISTLIST: Add it.
12252 * conf/i386-efi.rmk: Enable cpuid.mod.
12253 * conf/i386-pc.rmk: Likewise.
12255 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
12257 * kern/disk.c (grub_disk_read): Check return value of
12260 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
12262 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
12264 * disk/raid.c (grub_raid_open): Likewise.
12266 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
12268 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
12269 stack instead of on the heap.
12271 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
12272 before doing a read on it.
12274 * configure.ac: Only use -fno-stack-protector for the target
12277 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
12279 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
12280 __attribute_ ((unused)) to mode_type argument.
12282 * util/getroot.c (grub_guess_root_device): Fix #endif.
12284 * kern/misc.c (memcmp): Fix prototype.
12286 * include/grub/partition.h [GRUB_UTIL]
12287 (grub_gpt_partition_map_init): Add prototype.
12288 (grub_gpt_partition_map_fini): Likewise.
12290 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
12291 at the right place.
12293 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
12294 (grub_fat_read_data): Likewise.
12295 (grub_fat_find_dir): Likewise.
12297 * font/manager.c (find_glyph): Make table a const.
12298 (grub_font_get_glyph): Remove bitmap from if statement.
12300 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
12302 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
12303 code, first search for device in /dev/mapper, then in /dev.
12304 (grub_util_get_grub_dev): New function.
12305 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
12307 * util/grub-probe.c (probe): Remove check for RAID, call
12308 grub_util_get_grub_dev() instead of
12309 grub_util_biosdisk_get_grub_dev().
12310 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
12311 grub_util_biosdisk_get_grub_dev().
12312 * util/i386/pc/grub-setup.c (main): Likewise.
12314 2007-05-16 Robert Millan <rmh@aybabtu.com>
12316 * DISTLIST: Update for the latest changes.
12317 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
12318 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
12319 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
12320 grub/util/biosdisk.h.
12321 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
12322 grub/util/biosdisk.h.
12324 2007-05-16 Robert Millan <rmh@aybabtu.com>
12326 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
12328 2007-05-16 Robert Millan <rmh@aybabtu.com>
12330 * util/i386/efi/grub-install.in: New.
12331 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
12332 newly added grub-install.
12333 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
12335 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
12336 grub/util/biosdisk.h.
12337 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
12338 grub/util/biosdisk.h.
12340 2007-05-16 Robert Millan <rmh@aybabtu.com>
12342 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
12343 * include/grub/util/biosdisk.h: ... here.
12344 * util/i386/pc/biosdisk.c: Moved to ...
12345 * util/biosdisk.c: ... here.
12346 * util/i386/pc/getroot.c: Moved to ...
12347 * util/getroot.c: ... here.
12348 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
12349 * util/grub-mkdevicemap.c: ... here.
12350 * util/i386/pc/grub-probe.c: Moved to ...
12351 * util/grub-probe.c: ... here.
12353 2007-05-15 Robert Millan <rmh@aybabtu.com>
12355 * util/update-grub.in: Remove duplicated line in grub.cfg header
12358 2007-05-13 Robert Millan <rmh@aybabtu.com>
12360 * util/update-grub.in: Fix a few assumptions about the devices holding
12361 /, /boot and /boot/grub being the same.
12362 * util/grub.d/00_header.in: Likewise.
12363 * util/grub.d/10_hurd.in: Likewise.
12364 * util/grub.d/10_linux.in: Likewise.
12366 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
12367 patterns. Use that to define the `.old' suffix as older than `'.
12369 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
12371 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
12372 the grub.cfg header message.
12374 2007-05-11 Robert Millan <rmh@aybabtu.com>
12376 * util/update-grub.in: Create device.map if it doesn't already exist,
12377 before attempting to run grub-probe.
12378 Check for grub-probe and grub-mkdevicemap with the same code
12379 grub-install is using.
12382 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
12384 * Makefile.in: Add the datarootdir autoconf variable.
12386 2007-05-09 Robert Millan <rmh@aybabtu.com>
12388 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
12389 fail gracefully if dev->disk->partition == NULL.
12391 2007-05-07 Robert Millan <rmh@aybabtu.com>
12393 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
12394 determine partition map module.
12395 * util/i386/pc/grub-install.in: Use this feature to decide which
12396 partition module to load, instead of hardcoding pc and gpt.
12398 2007-05-07 Robert Millan <rmh@aybabtu.com>
12400 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
12401 source directory differs from build directory.
12403 2007-05-05 Robert Millan <rmh@aybabtu.com>
12405 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
12408 2007-05-05 Robert Millan <rmh@aybabtu.com>
12410 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
12412 2007-05-05 Robert Millan <rmh@aybabtu.com>
12414 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
12415 command-line arguments via ${GRUB_CMDLINE_LINUX}.
12417 2007-05-05 Robert Millan <rmh@aybabtu.com>
12419 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
12420 (grub_probe_SOURCES): Likewise.
12421 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
12422 GPT and initialize dos_part and bsd_part accordingly.
12423 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
12425 (main): Activate gpt module for use during partition identification,
12426 and deactivate it afterwards.
12427 * util/i386/pc/grub-install.in: Add gpt module to core.img.
12428 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
12429 partition identification, and deactivate it afterwards.
12431 2007-05-05 Robert Millan <rmh@aybabtu.com>
12433 * term/i386/pc/console.c (grub_console_fini): Call
12434 grub_term_set_current() before grub_term_unregister().
12436 2007-05-04 Robert Millan <rmh@aybabtu.com>
12438 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
12439 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
12440 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
12441 and update-grub_DATA.
12442 * conf/common.rmk: Build and install update-grub components.
12443 * conf/common.mk: Regenerate.
12444 * util/update-grub.in: New. Core of update-grub.
12445 * util/grub.d/00_header.in: New. Generates grub.cfg header.
12446 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
12447 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
12448 * util/grub.d/README: New. Document grub.d directory layout.
12450 2007-05-01 Robert Millan <rmh@aybabtu.com>
12452 * util/grub-emu.c: Move initialization functions
12453 grub_util_biosdisk_init() and grub_init_all() before
12454 grub_util_biosdisk_get_grub_dev(), which relies on them.
12456 2007-04-19 Robert Millan <rmh@aybabtu.com>
12458 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
12461 2007-04-18 Jerone Young <jerone@gmail.com>
12463 * kernel/elf.c: Add missing parenthesis for conditional statement
12466 2007-04-10 Jerone Young <jerone@gmail.com>
12468 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
12469 continue on and look for device node with real device name.
12471 2007-04-10 Jerone Young <jerone@gmail.com>
12473 * configure.ac: Add argument for autoconf to use transformation
12475 * Makefile.in: Add autoconf package transformation code.
12476 * util/i386/pc/grub-install.in: Likewise.
12477 * util/powerpc/ieee1275/grub-install.in: Likewise.
12479 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
12481 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
12482 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
12483 (EXT2_REVISION): Likewise.
12484 (EXT2_INODE_SIZE): Likewise.
12485 (struct grub_ext2_block_group): Added a missing member
12487 (grub_ext2_read_inode): Divide by the inode size in a superblock
12488 instead of 128 to obtain INODES_PER_BLOCK.
12489 Use the macro EXT2_INODE_SIZE instead of directly using
12490 SBLOCK->INODE_SIZE.
12492 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
12494 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
12495 superblock instead of the structure size to compute an
12496 offset. This fixes the problem that GRUB could not read a
12497 filesystem when inode size is different from 128-byte.
12499 2007-03-05 Marco Gerards <marco@gnu.org>
12501 * normal/main.c (read_config_file): When "menu" is not set, create
12502 an initial context.
12504 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
12506 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
12507 (HEAP_LIMIT): New macro.
12508 (grub_claim_heap): Claim memory up to `heaplimit'.
12510 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
12512 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
12513 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
12514 (_start): Likewise.
12515 (grub_arch_modules_addr): Return address after `_end'.
12516 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
12517 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
12518 (add_segments): Calculate `_end' from phdr size and location.
12519 (ALIGN_UP): Moved to ...
12520 * include/grub/misc.h: here.
12521 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
12523 (GRUB_IEEE1275_MODULE_BASE): Removed.
12525 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
12527 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
12530 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
12532 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
12534 (grub_elf64_load_hook_t): Likewise.
12535 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
12538 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
12540 * kern/mm.c: Update copyright.
12541 (grub_mm_debug): Correct syntax error.
12542 (grub_mm_dump_free): New function.
12543 (grub_debug_free): Call `grub_free'.
12544 * include/grub/mm.h: Update copyright.
12545 (grub_mm_dump_free): Add declaration.
12547 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
12549 * include/grub/ieee1275/ieee1275.h: Update copyright.
12550 * kern/powerpc/ieee1275/init.c: Likewise.
12551 * kern/powerpc/ieee1275/openfw.c: Likewise.
12553 * loader/powerpc/ieee1275/linux.c: Likewise.
12554 * include/grub/elfload.h: Likewise.
12555 * kern/elf.c: Likewise.
12556 (grub_elf32_load): Pass `base' and `size' parameters. Update all
12558 (grub_elf64_load): Likewise.
12559 (grub_elf32_load_segment): Move to a nested function.
12560 (grub_elf64_load_segment): Likewise.
12562 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
12564 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
12566 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
12567 (grub_heap_len): Likewise.
12568 (HEAP_SIZE): New macro.
12569 (grub_claim_heap): New function.
12570 (grub_machine_init): Don't claim heap directly. Call
12572 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
12573 (grub_available_iterate): New function.
12575 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
12577 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
12578 * configure.ac: Use it for testing the HOST and TARGET compilers.
12580 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
12582 * Makefile.in (enable_grub_emu): New variable.
12583 * configure.ac (--enable-grub-emu): New option.
12584 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
12585 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
12586 * conf/i386-pc.rmk: Likewise.
12587 * conf/powerpc-ieee1275.rmk: Likewise.
12588 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
12590 2006-12-12 Marco Gerards <marco@gnu.org>
12592 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
12594 * kern/env.c (grub_env_unset): Don't free the member `value' when
12595 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
12598 * normal/main.c (current_menu): Removed.
12599 (free_menu): Unset the `menu' environment variable.
12600 (grub_normal_menu_addentry): Make use of the environment variable
12601 `menu', instead of using the global `current_menu'. Allocate
12602 memory for the sourcecode of this entry.
12603 (read_config_file): New argument `nested', changed all callers.
12604 Only in the case of a new context, initialize a new menu. Set the
12605 `menu' environment variable.
12606 (grub_normal_execute): Don't set and unset the environment
12607 variable `menu' here anymore. Only free the menu when leaving the
12610 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
12613 2006-12-11 Marco Gerards <marco@gnu.org>
12615 * normal/menu_entry.c (run): Fix off by one bug so the last line
12616 is executed. Move the loader check to outside the loop.
12618 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
12620 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
12622 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
12624 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
12625 the number of sectors. Reported by Andrey Shuvikov
12626 <mr_hyro@yahoo.com>.
12628 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
12630 * kern/disk.c (grub_disk_read): When there is a read error, always
12631 try to read only the necessary data.
12633 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
12635 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
12637 [GRUB_UTIL] (grub_raid_fini): Likewise.
12638 [GRUB_UTIL] (grub_lvm_init): Likewise.
12639 [GRUB_UTIL] (grub_lvm_fini): Likewise.
12640 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
12641 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
12642 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
12643 and grub_raid_fini().
12645 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
12647 * include/grub/types.h (__unused): Rename to UNUSED.
12648 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
12649 (grub_elf64_size): Likewise.
12651 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
12653 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
12654 grub_error_push and grub_error_pop in the error-handling path.
12655 (grub_elf32_load_segment): Only call grub_file_read with non-zero
12658 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
12660 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
12661 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
12662 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12663 (kernel_elf_SOURCES): Likewise.
12664 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
12665 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
12666 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
12667 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
12668 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
12669 (elf_mod_SOURCES): New variable.
12670 (elf_mod_CFLAGS): Likewise.
12671 (elf_mod_LDFLAGS): Likewise.
12672 * include/grub/types.h (__unused): New macro.
12673 * include/grub/elfload.h: New file.
12674 * kern/elf.c: Likewise.
12675 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
12676 (ELF32_LOADMASK): New macro.
12677 (ELF64_LOADMASK): Likewise.
12678 (vmlinux): Removed.
12679 (grub_linux_load32): New function.
12680 (grub_linux_load64): Likewise.
12681 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
12682 Use grub_elf_t instead of grub_file_t.
12684 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
12686 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
12687 `catch_result' to struct set_color_args.
12689 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
12691 * normal/menu.c: Include grub/script.h.
12692 * normal/menu_entry.c: Likewise.
12693 * include/grub/normal.h: Do not include grub/script.h.
12695 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
12697 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
12699 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
12701 * kern/disk.c (grub_disk_open): Print debug messages when opening a
12703 (grub_disk_close): Print debug messages when closing a disk.
12704 (grub_disk_read): Print debug messages when disk read fails.
12705 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
12707 * kern/partition.c: Include misc.h.
12708 (grub_partition_iterate): Print debug messages when detecting
12711 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
12713 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
12715 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
12717 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
12719 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
12720 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
12722 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
12724 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
12725 instead of sizeof(lv). Patch by Michael Guntsche.
12727 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
12729 * disk/lvm.c: Rename VGS to VG_LIST.
12730 (grub_lvm_iterate): Change VGS->LV to VG-LV.
12731 (grub_lvm_open): Likewise.
12732 Thanks to Michael Guntsche for finding this bug.
12734 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12736 * configure.ac (AC_INIT): Bumped to 1.95.
12738 2006-10-14 Robert Millan <rmh@aybabtu.com>
12740 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
12741 with "/dev/.static/dev/md".
12743 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
12745 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
12746 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
12747 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
12748 DRIVE_NAME are always freed.
12750 * util/i386/pc/biosdisk.c (make_device_name): Add one into
12751 DOS_PART, as a DOS partition is counted from one instead of zero
12752 now. Reported by Robert Millan.
12754 2006-10-14 Robert Millan <rmh@aybabtu.com>
12756 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
12757 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
12758 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
12759 string returned by grub_guess_root_device.
12760 * util/i386/pc/grub-setup.c: Likewise.
12761 * util/i386/pc/grub-probefs.c: Likewise.
12763 * util/i386/pc/grub-probefs.c: Rename to ...
12764 * util/i386/pc/grub-probe.c: ... this.
12765 * DISTLIST: Remove grub-probefs, add grub-probe.
12766 * conf/i386-efi.rmk: Likewise.
12767 * conf/i386-pc.rmk: Likewise.
12768 * util/i386/pc/grub-install.in: Likewise.
12770 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
12771 choose which information we want to print.
12773 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
12775 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
12776 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
12777 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
12778 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
12779 video/readers/tga.c and video/i386/pc/vbeutil.c.
12781 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
12783 Added support for RAID and LVM.
12785 * disk/lvm.c: New file.
12786 * disk/raid.c: Likewise.
12787 * include/grub/lvm.h: Likewise.
12788 * include/grub/raid.h: Likewise.
12789 * include/grub/util/lvm.h: Likewise.
12790 * include/grub/util/raid.h: Likewise.
12791 * util/lvm.c: Likewise.
12792 * util/raid.c: Likewise.
12794 * include/grub/disk.h (grub_disk_dev_id): Add
12795 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
12796 (grub_disk_get_size): New prototype.
12797 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
12798 returns a partition.
12799 (grub_disk_get_size): New function.
12801 * kern/i386/pc/init.c (make_install_device): Copy the prefix
12802 verbatim if grub_install_dos_part is -2.
12804 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
12807 * util/i386/pc/grub-setup.c (setup): New argument
12808 MUST_EMBED. Force embedding of GRUB when the argument is
12809 true. Close FILE before returning.
12810 (main): Add support for RAID and LVM.
12812 * conf/common.rmk: Add RAID and LVM modules.
12813 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
12815 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
12817 * kern/misc.c (grub_strstr): New function.
12818 * include/grub/misc.h (grub_strstr): New prototype.
12820 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
12822 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
12824 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
12826 * kern/misc.c (grub_strtoull): Guess the base only if not
12829 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12831 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
12834 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12836 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
12838 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
12839 Remove `flags' argument. All callers changed.
12840 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
12841 (IEEE1275_IHANDLE_INVALID): New variable.
12842 (IEEE1275_CELL_INVALID): New variable.
12843 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
12844 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
12845 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
12846 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
12847 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
12848 codes from Open Firmware. All callers updated.
12849 (grub_ieee1275_next_property): Directly return Open Firmware return
12851 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
12852 Standardize error checking from `grub_ieee1275_get_property'.
12853 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
12854 `devalias' to `aliases'. Correct comments. Consolidate error paths.
12856 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
12858 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
12859 `instance_to_package_args' to `instance_to_path_args'.
12861 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
12862 `grub_ieee1275_chosen'.
12864 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
12865 `grub_ieee1275_interpret'.
12867 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
12869 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
12871 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
12873 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
12874 (__cmpdi): Likewise.
12876 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
12877 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
12880 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
12882 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
12883 to type `grub_ssize_t'.
12884 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
12886 2006-09-22 Marco Gerards <marco@gnu.org>
12888 * normal/script.c (grub_script_create_cmdmenu): Skip leading
12891 2006-09-22 Marco Gerards <marco@gnu.org>
12893 * commands/echo.c: New file.
12895 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
12897 * conf/common.rmk (echo_mod_SOURCES): New variable.
12898 (echo_mod_CFLAGS): Likewise.
12899 (echo_mod_LDFLAGS): Likewise.
12901 2006-09-22 Marco Gerards <marco@gnu.org>
12903 * normal/main.c (get_line): Malloc memory instead of using
12904 preallocated memory. Removed the arguments `cmdline' and
12905 `max_len'. Updated all callers.
12907 2006-09-22 Marco Gerards <marco@gnu.org>
12909 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
12910 (normal_mod_DEPENDENCIES): Likewise.
12912 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
12913 (normal_mod_DEPENDENCIES): Likewise.
12915 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
12917 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
12919 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
12921 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
12922 (normal_mod_DEPENDENCIES): Likewise.
12923 * conf/i386-pc.mk: Regenerate.
12924 * conf/i386-efi.mk: Likewise
12925 * conf/common.mk: Likewise.
12926 * conf/powerpc-ieee1275.mk: Likewise.
12927 * conf/sparc64-ieee1275.mk: Likewise.
12929 2006-09-22 Robert Millan <rmh@aybabtu.com>
12931 Sync with i386 version.
12932 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
12933 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
12935 2006-09-21 Robert Millan <rmh@aybabtu.com>
12937 Import from GRUB Legacy (lib/device.c):
12938 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
12939 (init_device_map) [__linux__]: Add support for I2O devices.
12941 2006-09-14 Marco Gerards <marco@gnu.org>
12943 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
12946 2006-09-14 Robert Millan <rmh@aybabtu.com>
12948 * util/i386/pc/grub-install.in: Skip menu.lst when removing
12951 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
12953 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
12954 before adding it to device.map.
12956 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
12958 * genmk.rb: Let GCC generate dependencies the first time it
12959 compiles a file; using the -MD option.
12960 * conf/common.mk: Regenerate.
12961 * conf/i386-pc.mk: Likewise.
12962 * conf/i386-efi.mk: Likewise.
12963 * conf/powerpc-ieee1275.mk: Likewise.
12964 * conf/sparc64-ieee1275.mk: Likewise.
12966 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
12968 Move the prototypes of grub_setjmp and grub_longjmp to
12969 cpu/setjmp.h, so that each architecture may specify different
12972 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12973 (grub_longjmp): Likewise.
12974 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12975 (grub_longjmp): Likewise.
12976 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12977 (grub_longjmp): Likewise.
12979 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12980 [!GRUB_UTIL] (grub_longjmp): Removed.
12982 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
12984 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12985 "color!" method does not return any value.
12987 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
12989 * include/grub/bitmap.h: New file.
12991 * include/grub/i386/pc/vbeutil.h: Likewise.
12993 * video/bitmap.c: Likewise.
12995 * video/readers/tga.c: Likewise.
12997 * video/i386/pc/vbeutil.c: Likewise.
12999 * commands/videotest.c: Code cleanup and updated to reflect to new
13002 * term/gfxterm.c: Likewise.
13004 * video/video.c: Likewise.
13006 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
13007 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
13008 (bitmap_mod_SOURCES): New entry.
13009 (bitmap_mod_CFLAGS): Likewise.
13010 (bitmap_mod_LDFLAGS): Likewise.
13011 (tga_mod_SOURCES): Likewise.
13012 (tga_mod_CFLAGS): Likewise.
13013 (tga_mod_LDFLAGS): Likewise.
13015 * include/grub/video.h (grub_video_blit_operators): New enum type.
13016 (grub_video_render_target): Changed as forward declaration and moved
13017 actual definition to be video driver specific.
13018 (grub_video_adapter.blit_bitmap): Added blitting operator.
13019 (grub_video_adapter.blit_render_target): Likewise.
13020 (grub_video_blit_bitmap): Likewise.
13021 (grub_video_blit_render_target): Likewise.
13023 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
13024 driver specific render target definition.
13025 (grub_video_vbe_map_rgba): Added driver internal helper.
13026 (grub_video_vbe_unmap_color): Updated to use
13027 grub_video_i386_vbeblit_info.
13028 (grub_video_vbe_get_video_ptr): Likewise.
13030 * include/grub/i386/pc/vbeblit.h
13031 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
13032 grub_video_i386_vbeblit_info.
13033 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
13034 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
13035 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
13036 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
13037 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
13038 (grub_video_i386_vbeblit_index_index): Likewise.
13039 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
13040 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
13041 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
13042 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
13044 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
13047 * video/i386/pc/vbeblit.c: Updated to reflect changes on
13048 include/grub/i386/pc/vbeblit.h.
13050 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
13051 Updated to use grub_video_i386_vbeblit_info.
13052 (grub_video_i386_vbefill_R8G8B8): Likewise.
13053 (grub_video_i386_vbefill_index): Likewise.
13054 (grub_video_i386_vbefill): Added generic filler.
13056 * video/i386/pc/vbefill.c: Updated to reflect changes on
13057 include/grub/i386/pc/vbefill.h.
13059 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
13060 grub_video_i386_vbeblit_info.
13061 (grub_video_vbe_unmap_color): Likewise.
13062 (grub_video_vbe_blit_glyph): Likewise.
13063 (grub_video_vbe_scroll): Likewise.
13064 (grub_video_vbe_draw_pixel): Removed function.
13065 (grub_video_vbe_get_pixel): Likewise.
13066 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
13067 updated code to use it.
13068 (common_blitter): Added common blitter for render target and bitmap.
13069 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
13070 (grub_video_vbe_blit_render_target): Likewise.
13072 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
13074 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
13075 is in text mode if there is no console control protocol instance
13078 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
13080 * include/grub/video.h: Code cleanup.
13082 * include/grub/i386/pc/vbe.h: Likewise.
13084 * video/i386/pc/vbe.c: Likewise.
13086 * video/i386/pc/vbeblit.c: Likewise.
13088 * video/i386/pc/vbefill.c: Likewise.
13090 * video/video.c: Likewise. Also added more comments.
13092 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
13094 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
13095 (struct grub_biosdisk_dap): Likewise.
13097 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
13098 linkage settings for all functions.
13100 2006-07-12 Marco Gerards <marco@gnu.org>
13102 * configure.ac (--enable-mm-debug): Fix typo.
13104 * genkernsyms.sh.in: Use proper quoting for `CC'.
13106 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
13108 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
13109 (normal_mod_ASFLAGS): Remove "-m32".
13111 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
13113 * util/misc.c: Include config.h.
13114 [!HAVE_MEMALIGN]: Do not include malloc.h.
13115 (grub_memalign): Use posix_memalign, if present. Then, use
13116 memalign, if present. Otherwise, emit an error.
13118 * util/grub-emu.c: Do not include malloc.h.
13120 * include/grub/util/misc.h: Include unistd.h. This is required for
13121 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
13122 D. Eades III <hde@foobar-qux.org>.
13124 * configure.ac (AC_GNU_SOURCE): Added.
13125 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
13128 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
13130 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
13131 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
13133 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
13135 * include/grub/types.h (grub_host_addr_t): Rename to
13136 grub_target_addr_t.
13137 (grub_host_off_t): Rename to grub_target_off_t.
13138 (grub_host_size_t): Rename to grub_target_size_t.
13139 (grub_host_ssize_t): Rename to grub_target_ssize_t.
13140 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
13142 * include/grub/kernel.h (struct grub_module_header): Change type
13143 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
13144 (grub_module_info): Likewise.
13146 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
13148 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
13149 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
13150 Velazquez <jesus.velazquez@gmail.com>.
13152 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
13154 Count partitions from 1 instead of 0 in the string representation
13155 of partitions. Still use 0-based internally.
13157 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
13158 (sun_partition_map_iterate): Use grub_partition_t instead of
13159 struct grub_partition *. Cast DESC->START_CYLINDER to
13160 grub_uint64_t after converting the endian.
13161 (sun_partition_map_probe): Subtract 1 for PARTNUM.
13162 (sun_partition_map_get_name): Add 1 to P->INDEX.
13164 * partmap/pc.c (grub_partition_parse): Subtract 1 for
13166 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
13168 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
13169 zero instead of one.
13170 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
13171 (gpt_partition_map_get_name): Add 1 into P->INDEX.
13173 * partmap/apple.c (apple_partition_map_iterate): Change the type
13174 of POS to unsigned.
13175 (apple_partition_map_probe): Subtract 1 for PARTNUM.
13176 (apple_partition_map_get_name): Add 1 into P->INDEX.
13178 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
13179 of POS to unsigned.
13180 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
13181 calculate the offset of a partition.
13182 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
13183 (amiga_partition_map_get_name): Add 1 into P->INDEX.
13185 * partmap/acorn.c (acorn_partition_map_find): Change the type of
13186 SECTOR to grub_disk_addr_t.
13187 (acorn_partition_map_iterate): Likewise.
13188 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
13189 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
13191 (acorn_partition_map_get_name): Add 1 into P->INDEX.
13193 * kern/i386/pc/init.c (make_install_device): Add 1 into
13194 GRUB_INSTALL_DOS_PART.
13196 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
13199 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
13201 Clean up the code to support 64-bit addressing in disks and
13202 files. This change is not enough for filesystems yet.
13204 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
13205 type of "start" to grub_uint64_t.
13206 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
13207 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
13208 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
13211 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
13212 to grub_disk_addr_t.
13214 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
13217 * partmap/pc.c (pc_partition_map_iterate): Likewise.
13219 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
13222 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
13224 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
13226 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
13228 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
13229 to grub_off_t, to detect an error from grub_file_seek.
13230 (grub_multiboot_load_elf32): Likewise.
13232 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
13233 maximum unsigned long value when an overflow is detected.
13234 (grub_strtoull): New function.
13235 (grub_divmod64): Likewise.
13236 (grub_lltoa): use grub_divmod64.
13238 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
13240 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
13241 the pointer to next character. Use grub_strtoull instead of
13243 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
13244 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
13247 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
13248 return value is signed.
13249 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
13250 test if OFFSET is less than zero, as OFFSET is unsigned now.
13252 * kern/disk.c (struct grub_disk_cache): Change the type of
13253 "sector" to grub_disk_addr_t.
13254 (grub_disk_cache_get_index): Change the type of SECTOR to
13255 grub_disk_addr_t. Calculate the hash with SECTOR casted to
13256 unsigned after shifting.
13257 (grub_disk_cache_invalidate): Change the type of SECTOR to
13259 (grub_disk_cache_unlock): Likewise.
13260 (grub_disk_cache_store): Likewise.
13261 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
13262 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
13263 grub_disk_addr_t and grub_uint64_t, respectively.
13264 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
13265 body, as the value of OFFSET is tweaked by
13266 grub_disk_check_range. Change the types of START_SECTOR, LEN and
13267 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
13269 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
13270 body, as the value of OFFSET is tweaked by
13271 grub_disk_check_range. Change the types of LEN and N to
13274 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
13275 and "saved_offset" to grub_off_t.
13276 (test_header): Cast BUF to char *.
13277 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
13279 (grub_gzio_read): Change the types of OFFSET and SIZE to
13280 grub_off_t and grub_size_t, respectively.
13282 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
13284 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
13285 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
13286 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
13287 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
13288 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
13290 * include/grub/types.h (grub_off_t): Unconditionally set to
13292 (grub_disk_addr_t): Changed to grub_uint64_t.
13294 * include/grub/partition.h (struct grub_partition): Change the
13295 types of "start", "len" and "offset" to grub_disk_addr_t,
13296 grub_uint64_t and grub_disk_addr_t, respectively.
13297 (grub_partition_get_start): Return grub_disk_addr_t.
13298 (grub_partition_get_len): Return grub_uint64_t.
13300 * include/grub/misc.h (grub_strtoull): New prototype.
13301 (grub_divmod64): Likewise.
13303 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
13304 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
13305 grub_off_t, respectively.
13306 All callers and references changed.
13308 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
13309 grub_size_t in "read".
13310 All callers and references changed.
13312 * include/grub/file.h (struct grub_file): Change the types of
13313 "offset" and "size" to grub_off_t and grub_off_t,
13314 respectively. Change the type of SECTOR to grub_disk_addr_t in
13316 (grub_file_read): Change the type of LEN to grub_size_t.
13317 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
13319 (grub_file_size): Return grub_off_t.
13320 (grub_file_tell): Likewise.
13321 All callers and references changed.
13323 * include/grub/disk.h (struct grub_disk_dev): Change the types of
13324 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
13326 (struct grub_disk): Change the type of "total_sectors" to
13327 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
13329 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
13330 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
13331 (grub_disk_write): Likewise.
13332 All callers and references changed.
13334 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
13335 char * for grub_strncmp to silence gcc.
13336 (grub_iso9660_mount): Likewise.
13337 (grub_iso9660_mount): Likewise.
13338 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
13340 (grub_iso9660_iterate_dir): Likewise.
13341 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
13343 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
13344 LEN to grub_disk_addr_t and grub_size_t, respectively.
13346 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
13348 * fs/jfs.c (grub_jfs_read_file): Likewise.
13350 * fs/minix.c (grub_jfs_read_file): Likewise.
13352 * fs/sfs.c (grub_jfs_read_file): Likewise.
13354 * fs/ufs.c (grub_jfs_read_file): Likewise.
13356 * fs/xfs.c (grub_jfs_read_file): Likewise.
13358 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
13359 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
13362 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
13363 BLKNR to -1 instead of returning GRUB_ERRNO.
13364 (grub_ext2_read_file): Change the types of SECTOR and
13365 LEN to grub_disk_addr_t and grub_size_t, respectively.
13367 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
13368 LEN to grub_disk_addr_t and grub_size_t, respectively.
13370 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
13373 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
13374 string. Do not cast SECTOR explicitly.
13376 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
13377 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
13378 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
13379 grub_disk_addr_t and grub_size_t, respectively. If the sector is
13380 over 2TB and LBA mode is not supported, raise an error.
13381 (get_safe_sectors): New function.
13382 (grub_biosdisk_read): Use get_safe_sectors.
13383 (grub_biosdisk_write): Likewise.
13385 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
13386 (grub_efidisk_write): Likewise.
13388 * disk/loopback.c (delete_loopback): Cosmetic changes.
13389 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
13391 (grub_loopback_open): Likewise.
13392 (grub_loopback_read): Likewise. Also, change the type of POS to
13393 grub_off_t, and fix the usage of grub_memset.
13395 * commands/i386/pc/play.c: Include grub/machine/time.h.
13397 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
13400 * commands/configfile.c: Include grub/env.h.
13402 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
13403 GRUB_ERRNO directly instead. Change the type of POS to
13404 grub_off_t. Follow the coding standard.
13406 * commands/blocklist.c: Include grub/partition.h.
13407 (grub_cmd_blocklist): Return an error if the underlying device is
13408 not a disk. Take the starting sector of a partition into account,
13409 if a partition is used.
13411 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
13413 (lba_mode): Support 64-bit addresses.
13414 (chs_mode): Likewise.
13415 (copy_buffer): Adapted to the new offsets of a length field and a
13417 (blocklist_default_start): Allocate 64-bit space.
13419 * boot/i386/pc/boot.S (force_lba): Removed.
13420 (boot_drive): Moved to under KERNEL_SECTOR.
13421 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
13423 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
13425 (lba_mode): Refactored to support a 64-bit address. More size
13427 (setup_sectors): Likewise.
13429 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
13431 * DISTLIST: Added include/grub/i386/linux.h. Removed
13432 include/grub/i386/pc/linux.h
13434 * configure.ac (AC_INIT): Bumped to 1.94.
13436 * config.guess: Updated from gnulib.
13437 * config.sub: Likewise.
13438 * install-sh: Likewise.
13439 * mkinstalldirs: Likewise.
13441 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
13443 * conf/common.rmk (grub_modules_init.lst): Depended on
13444 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
13447 * genmk.rb (PModule::rule): Reverted the previous change.
13449 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
13451 * conf/common.rmk (grub_modules_init.lst): Depends on
13452 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
13453 that the target does not exist before producing.
13454 (grub_modules_init.h): Remove the target before generating.
13455 (grub_emu_init.c): Likewise.
13457 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
13459 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
13461 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
13462 for the target-specific tests. Make sure that we also have the
13463 up-to-date target variables for those tests.
13465 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
13467 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
13468 (PModule::rule): Likewise.
13470 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
13472 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
13473 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
13474 target-specific flags should be prefixed.
13475 (PModule::rule): Likewise.
13477 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
13479 * configure.ac (CMP): Check if cmp is available explicitly.
13481 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
13483 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
13484 (target_cpu): New variable.
13485 (pkglibdir): Use target_cpu instead of host_cpu.
13487 * util/i386/pc/grub-install.in (host_cpu): Removed.
13488 (target_cpu): New variable.
13489 (pkglibdir): Use target_cpu instead of host_cpu.
13491 * util/genmoddep.c: Removed.
13493 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
13494 instead of GRUB_HOST_SIZEOF_VOID_P.
13495 * kern/dl.c: Likewise.
13497 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
13499 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
13500 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
13501 (GRUB_TARGET_SIZEOF_LONG): ... this.
13502 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
13503 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
13504 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
13506 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
13507 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
13508 (GRUB_TARGET_SIZEOF_LONG): ... this.
13509 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
13510 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
13511 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
13513 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
13514 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
13515 (GRUB_TARGET_SIZEOF_LONG): ... this.
13516 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
13517 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
13519 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
13520 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
13521 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
13522 instead of GRUB_HOST_SIZEOF_LONG.
13523 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
13524 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
13525 GRUB_CPU_WORDS_BIGENDIAN.
13526 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
13527 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
13530 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
13531 (genmoddep_SOURCES): Likewise.
13532 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
13533 (genmoddep_SOURCES): Likewise.
13534 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
13535 (genmoddep_SOURCES): Likewise.
13536 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
13538 (genmoddep_SOURCES): Likewise.
13540 * genmoddep.awk: New file.
13542 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
13543 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
13544 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
13545 (PModule::rule): Likewise.
13546 (Program::rule): Likewise.
13547 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
13548 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
13551 * configure.ac: Rewritten intensively to use host and target
13552 instead of build and host, respectively.
13554 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
13555 (host_cpu): Removed.
13556 (target_cpu): New variable.
13557 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
13558 (BUILD_CC): Removed.
13559 (BUILD_CFLAGS): Likewise.
13560 (BUILD_CPPFLAGS): Likewise.
13561 (TARGET_CC): New variable.
13562 (TARGET_CFLAGS): Likewise.
13563 (TARGET_CPPFLAGS): Likewise.
13564 (TARGET_LDFLAGS): Likewise.
13566 (include): Use target_cpu instead of host_cpu.
13567 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
13569 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
13571 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
13573 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
13574 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
13575 field 'false' to 'exec_on_false'.
13576 (grub_script_create_cmdif): Renamed argument names to reflect above
13579 * normal/execute.c (grub_script_execute_cmdif): Likewise.
13581 * normal/script.c (grub_script_create_cmdif): Likewise.
13583 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
13585 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
13587 (grub_hfsplus_btree_recptr): Likewise.
13588 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
13589 FILEBLOCK both to pass a block number and store next block
13591 (grub_hfsplus_read_block): Rewritten heavily to support an extent
13592 overflow file correctly. Specify errors appropriately, because
13593 fshelp expects that GRUB_ERRNO is set when fails. Reuse
13594 grub_hfsplus_btree_recptr to get the pointer to a found key.
13595 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
13598 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
13600 (_linux_mod_SOURCES): New variable.
13601 (_linux_mod_CFLAGS): Likewise.
13602 (_linux_mod_LDFLAGS): Likewise.
13603 (linux_mod_SOURCES): Likewise.
13604 (linux_mod_CFLAGS): Likewise.
13605 (linux_mod_LDFLAGS): Likewise.
13607 * DISTLIST: Added loader/i386/efi/linux.c,
13608 loader/i386/efi/linux_normal.c and
13609 include/grub/i386/efi/loader.h.
13611 * loader/i386/efi/linux.c: New file.
13612 * loader/i386/efi/linux_normal.c: Likewise.
13613 * include/grub/i386/efi/loader.h: Likewise.
13615 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
13617 * commands/blocklist.c: New file.
13619 * DISTLIST: Added commands/blocklist.c.
13621 * term/efi/console.c (grub_console_highlight_color): Use a lighter
13622 color for the background, and a darker color for the foreground.
13623 (grub_console_checkkey): Return READ_KEY.
13624 (grub_console_cls): Set the background to
13625 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
13627 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
13629 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
13630 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
13632 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
13635 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
13636 BG. The spec is wrong again.
13638 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
13640 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
13642 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
13643 commands/blocklist.c.
13644 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13646 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
13647 (blocklist_mod_SOURCES): New variable.
13648 (blocklist_mod_CFLAGS): Likewise.
13649 (blocklist_mod_LDFLAGS): Likewise.
13651 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
13653 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
13655 (lba_mode): Use %eax more intensively to reduce the code size.
13657 2006-05-20 Marco Gerards <marco@gnu.org>
13659 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
13661 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
13663 (script): Accept leading newlines.
13664 (newlines): New rule to describe 0 or more newlines.
13665 (commands): Accept `command' with trailing newline. Fixed the
13666 order in which arguments were passed to `grub_script_add_cmd'.
13667 Accept commands separated by newlines.
13668 (function): Changed to accept newlines.
13669 (menuentry) Rewritten.
13671 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
13672 front of the list, instead of to the end.
13674 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
13676 * util/i386/pc/grub-install.in (bindir): New variable.
13677 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
13678 Shaver <lbgwjl@gmail.com>.
13680 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
13682 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
13683 grub/machine/linux.h
13684 * loader/i386/pc/linux.c: Likewise.
13686 * include/grub/i386/pc/linux.h: Moved to ...
13687 * include/grub/i386/linux.h: ... here.
13689 * include/grub/i386/linux.h (struct linux_kernel_params): New
13692 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
13694 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
13696 (grub_video_vbe_blit_glyph): Likewise.
13697 (grub_video_vbe_blit_bitmap): Likewise.
13698 (grub_video_vbe_blit_render_target): Likewise.
13700 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
13702 * configure.ac (--with-platform): Properly quote the square
13705 2006-05-08 Marco Gerards <marco@gnu.org>
13707 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
13709 (kernel_elf_HEADERS): ...to this. Updated all users.
13710 (grubof_symlist.c): Renamed from this...
13711 (kernel_elf_symlist.c): ...to this. Updated all users.
13712 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
13713 (grubof_SOURCES): Renamed from this...
13714 (kernel_elf_SOURCES): ...to this.
13715 (grubof_HEADERS): Renamed from this...
13716 (kernel_elf_HEADERS): ...to this.
13717 (grubof_CFLAGS): Renamed from this...
13718 (kernel_elf_CFLAGS): ...to this.
13719 (grubof_ASFLAGS): Renamed from this...
13720 (kernel_elf_ASFLAGS): ...to this.
13721 (grubof_LDFLAGS): Renamed from this...
13722 (kernel_elf_LDFLAGS): ...to this.
13724 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
13726 (kernel_elf_HEADERS): ...to this. Updated all users.
13727 (grubof_symlist.c): Renamed from this...
13728 (kernel_elf_symlist.c): ...to this. Updated all users.
13729 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
13730 (grubof_SOURCES): Renamed from this...
13731 (kernel_elf_SOURCES): ...to this.
13732 (grubof_HEADERS): Renamed from this...
13733 (kernel_elf_HEADERS): ...to this.
13734 (grubof_CFLAGS): Renamed from this...
13735 (kernel_elf_CFLAGS): ...to this.
13736 (grubof_ASFLAGS): Renamed from this...
13737 (kernel_elf_ASFLAGS): ...to this.
13738 (grubof_LDFLAGS): Renamed from this...
13739 (kernel_elf_LDFLAGS): ...to this.
13741 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
13742 `kernel.elf' instead of `grubof'.
13744 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
13746 Add --with-platform to configure. Use pkglibdir instead of
13747 pkgdatadir. This is reported by Roger Leigh.
13749 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
13750 (host_vendor): Likewise.
13751 (host_os): Likewise.
13752 (pkgdatadir): Likewise.
13753 (platform): New variable.
13754 (pkglibdir): Likewise.
13755 Use PKGLIBDIR instead of PKGDATADIR.
13757 * util/i386/pc/grub-install.in (datadir): Removed.
13758 (host_vendor): Likewise.
13759 (host_os): Likewise.
13760 (pkgdatadir): Likewise.
13761 (platform): New variable.
13762 (pkglibdir): Likewise.
13763 Use PKGLIBDIR instead of PKGDATADIR.
13765 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
13766 instead of GRUB_DATADIR.
13768 * util/i386/pc/grub-mkimage.c (usage): Likewise.
13770 * util/i386/efi/grub-mkimage.c (usage): Likewise.
13773 * configure.ac (--with-platform): New option.
13774 Use PLATFORM instead of HOST_VENDOR to specify a platform.
13776 * Makefile.in: Include a makefile based on PLATFORM instead of
13778 (pkgdatadir): Not appended by the machine type.
13779 (pkglibdir): Appended by the machine type.
13780 (host_vendor): Removed.
13781 (platform): New variable.
13782 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
13783 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
13784 (uninstall): Likewise.
13786 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
13788 Use the environment context in the menu. Remove the commands
13789 "default" and "timeout", and use variables instead.
13791 * normal/menu.c: Include grub/env.h.
13792 (print_entry): Cast TITLE to silence gcc.
13793 (get_timeout): New function.
13794 (set_timeout): Likewise.
13795 (get_entry_number): Likewise.
13796 (run_menu): Use a default entry, a fallback entry and a timeout
13797 in the environment variables "default", "fallback" and
13798 "timeout". Also, tweak the default entry if it is not within the
13799 current menu entries.
13800 (grub_menu_run): Use a fallback entry in the environment variable
13803 * normal/main.c (read_config_file): Do not initialize
13804 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
13806 (grub_normal_execute): Use a data slot to store the menu.
13808 * include/grub/normal.h (struct grub_menu): Removed default_entry,
13809 fallback_entry and timeout.
13810 (struct grub_menu_list): Removed.
13811 (grub_menu_list_t): Likewise.
13812 (struct grub_context): Likewise.
13813 (grub_context_t): Likewise.
13814 (grub_context_get): Likewise.
13815 (grub_context_get_current_menu): Likewise.
13816 (grub_context_push_menu): Likewise.
13817 (grub_context_pop_menu): Likewise.
13818 (grub_default_init): Likewise.
13819 (grub_default_fini): Likewise.
13820 (grub_timeout_init): Likewise.
13821 (grub_timeout_fini): Likewise.
13823 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
13825 (normal_mod_SOURCES): Removed normal/context.c.
13827 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
13828 commands/default.c, commands/timeout.c and normal/context.c.
13829 (normal_mod_SOURCES): Removed normal/context.c.
13831 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
13832 commands/timeout.c and normal/context.c.
13833 (normal_mod_SOURCES): Removed normal/context.c.
13835 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
13836 commands/default.c, commands/timeout.c and normal/context.c.
13837 (normal_mod_SOURCES): Removed normal/context.c.
13839 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
13841 (default_mod_SOURCES): Removed.
13842 (default_mod_CFLAGS): Likewise.
13843 (default_mod_LDFLAGS): Likewise.
13844 (timeout_mod_SOURCES): Removed.
13845 (timeout_mod_CFLAGS): Likewise.
13846 (timeout_mod_LDFLAGS): Likewise.
13848 * DISTLIST: Removed commands/default.c, commands/timeout.c and
13851 * commands/default.c: Removed.
13852 * commands/timeout.c: Likewise.
13853 * normal/context.c: Likewise.
13855 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
13857 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
13859 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
13861 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
13862 "next" to "prev" for readability.
13863 (struct grub_env_sorted_var): New struct.
13864 (grub_env_context): Renamed to ...
13865 (initial_context): ... this.
13866 (grub_env_var_context): Renamed to ...
13867 (current_context): ... this.
13868 (grub_env_find): Look only at CURRENT_CONTEXT.
13869 (grub_env_context_open): Rewritten to copy exported variables from
13871 (grub_env_context_close): Rewritten according to the new
13872 scheme. Also, add an assertion to prevent the initial context from
13874 (grub_env_insert): Removed the code for the sorted list.
13875 (grub_env_remove): Likewise.
13876 (grub_env_export): Simply mark the variable with
13877 GRUB_ENV_VAR_GLOBAL.
13878 (grub_env_set): A cosmetic change for naming consistency.
13879 (grub_env_get): Likewise.
13880 (grub_env_unset): Likewise.
13881 (grub_env_iterate): Rewritten to sort variables within this
13883 (grub_register_variable_hook): Fixed for naming consistency. Call
13884 grub_env_find again, only if NAME is not found at the first time.
13885 (mangle_data_slot_name): New function.
13886 (grub_env_set_data_slot): Likewise.
13887 (grub_env_get_data_slot): Likewise.
13888 (grub_env_unset_data_slot): Likewise.
13890 * include/grub/env.h (grub_env_var_type): New enum.
13891 (GRUB_ENV_VAR_LOCAL): New constant.
13892 (GRUB_ENV_VAR_GLOBAL): Likewise.
13893 (GRUB_ENV_VAR_DATA): Likewise.
13894 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
13896 (grub_env_set): Replace VAR with NAME for consistency.
13897 (grub_register_variable_hook): Likewise.
13898 (grub_env_export): Specify the name of the argument.
13899 (grub_env_set_data_slot): New prototype.
13900 (grub_env_get_data_slot): Likewise.
13901 (grub_env_unset_data_slot): Likewise.
13903 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13905 Extend the loader so that GRUB can accept a loader which comes
13906 back to GRUB when a loaded image exits. Also, this change adds
13907 support for a chainloader on EFI.
13909 * term/efi/console.c: Include grub/misc.h.
13910 (grub_console_checkkey): Display a scan code on the top for
13911 debugging. This will be removed once the EFI port gets stable.
13912 Correct the scan code mapping.
13914 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
13915 allocate memory from larger regions, in order to reduce the number
13916 of allocated regions. Otherwise, the MacOSX loader panics.
13917 (filter_memory_map): Avoid less than 1MB for compatibility with
13919 (add_memory_regions): Allocate from the tail of a region, if
13920 possible, to avoid allocating a region near to 1MB, for the MacOSX
13923 * kern/efi/init.c (grub_efi_set_prefix): Specify
13924 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
13926 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
13927 argument IMAGE_HANDLE and specify it to get a loaded image.
13928 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
13929 grub_efi_get_loaded_image.
13930 (grub_efi_get_filename): Divide the length by the size of
13932 (grub_efi_get_device_path): New function.
13933 (grub_efi_print_device_path): Print End Device Path nodes. Divide
13934 the length by the size of grub_efi_char16_t for a file path device
13937 * kern/loader.c (grub_loader_noreturn): New variable.
13938 (grub_loader_set): Accept a new argument NORETURN. Set
13939 GRUB_LOADER_NORETURN to NORETURN.
13940 All callers changed.
13941 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
13944 * include/grub/efi/efi.h (grub_efi_get_device_path): New
13946 (grub_efi_get_loaded_image): Take an argument to specify an image
13949 * include/grub/loader.h (grub_loader_set): Added one more argument
13952 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
13953 instead of grub_efi_open_protocol.
13954 (grub_efidisk_get_device_name): Likewise.
13955 (grub_efidisk_close): Print a newline.
13956 (grub_efidisk_get_device_handle): Fixed to use
13957 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
13958 GRUB_EFI_DEVICE_PATH_TYPE.
13960 * disk/efi/efidisk.c (device_path_guid): Moved to ...
13961 * kern/efi/efi.c (device_path_guid): ... here.
13963 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13965 (kernel_mod_HEADERS): Added efi/disk.h.
13966 (_chain_mod_SOURCES): New variable.
13967 (_chain_mod_CFLAGS): Likewise.
13968 (_chain_mod_LDFLAGS): Likewise.
13969 (chain_mod_SOURCES): Likewise.
13970 (chain_mod_CFLAGS): Likewise.
13971 (chain_mod_LDFLAGS): Likewise.
13973 * DISTLIST: Added include/grub/efi/chainloader.h,
13974 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13976 * include/grub/efi/chainloader.h: New file.
13977 * loader/efi/chainloader.c: Likewise.
13978 * loader/efi/chainloader_normal.c: Likewise.
13980 2006-04-30 Marco Gerards <marco@gnu.org>
13982 * commands/configfile.c (grub_cmd_source): New function.
13983 (GRUB_MOD_INIT): Register the commands `source' and `.'.
13984 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13986 2006-04-30 Marco Gerards <marco@gnu.org>
13988 * normal/execute.c (grub_script_execute_cmd): Change the return
13989 type to `grub_err_t'. Correctly return the error.
13990 (grub_script_execute_cmdline): In case a command line is not a
13991 command or a function, try to interpret it as an assignment.
13993 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
13995 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13996 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13997 skip a node whose name is obviously invalid as UTF-16,
13998 i.e. contains a NUL character. Stop the iteration when the last
13999 directory entry is found. Instead of using the return value of
14000 grub_hfsplus_btree_iterate_node, store the value in RET and use
14001 it, because the iterator can be stopped by the last directory
14004 2006-04-30 Marco Gerards <marco@gnu.org>
14006 * include/grub/env.h (grub_env_export): New prototype. Reported
14007 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
14009 2006-04-30 Marco Gerards <marco@gnu.org>
14011 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
14012 size of the extents in a catalog file record.
14014 2006-04-29 Marco Gerards <marco@gnu.org>
14016 * commands/configfile.c (grub_cmd_configfile): Execute the
14017 configfile within its own context.
14019 * include/grub/env.h (grub_env_context_open): New prototype.
14020 (grub_env_context_close): Likewise.
14022 * kern/env.c (grub_env): Removed.
14023 (grub_env_sorted): Likewise.
14024 (grub_env_context): New variable.
14025 (grub_env_var_context): Likewise.
14026 (grub_env_find): Search both the active context and the global
14028 (grub_env_context_open): New function.
14029 (grub_env_context_close): Likewise.
14030 (grub_env_insert): Likewise.
14031 (grub_env_remove): Likewise.
14032 (grub_env_export): Likewise.
14033 (grub_env_set): Changed to use helper functions to avoid code
14035 (grub_env_iterate): Rewritten so both the current context and the
14036 global context are being used.
14038 * normal/command.c (export_command): New function.
14039 (grub_command_init): Register the `export' function.
14041 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
14043 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
14044 explicitly to suppress gcc's warnings.
14045 * fs/fat.c (grub_fat_find_dir): Likewise.
14046 (grub_fat_label): Likewise.
14047 * fs/xfs.c (grub_xfs_read_inode): Likewise.
14048 (grub_xfs_mount): Likewise.
14049 (grub_xfs_label): Likewise.
14050 * fs/affs.c (grub_affs_mount): Likewise.
14051 (grub_affs_label): Likewise.
14052 (grub_affs_iterate_dir): Likewise.
14053 * fs/sfs.c (grub_sfs_mount): Likewise.
14054 (grub_sfs_iterate_dir): Likewise.
14055 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
14056 * fs/hfs.c (grub_hfs_mount): Likewise.
14057 (grub_hfs_cmp_catkeys): Likewise.
14058 (grub_hfs_find_dir): Likewise.
14059 (grub_hfs_dir): Likewise.
14060 (grub_hfs_label): Likewise.
14061 * fs/jfs.c (grub_jfs_mount): Likewise.
14062 (grub_jfs_opendir): Likewise.
14063 (grub_jfs_getent): Likewise.
14064 (grub_jfs_lookup_symlink): Likewise.
14065 (grub_jfs_label): Likewise.
14066 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
14067 (grub_hfsplus_iterate_dir): Likewise.
14068 (grub_hfsplus_btree_iterate_node): Made static.
14070 * util/grub-emu.c (prefix): New variable.
14071 (grub_machine_set_prefix): New function.
14072 (main): Do not set the environment variable "prefix" here. Only
14073 set PREFIX, which is used later by grub_machine_set_prefix.
14075 * include/grub/video.h: Do not include grub/symbol.h.
14076 (grub_video_register): Not exported. This symbol is not defined in
14078 (grub_video_unregister): Likewise.
14079 (grub_video_iterate): Likewise.
14080 (grub_video_setup): Likewise.
14081 (grub_video_restore): Likewise.
14082 (grub_video_get_info): Likewise.
14083 (grub_video_get_blit_format): Likewise.
14084 (grub_video_set_palette): Likewise.
14085 (grub_video_get_palette): Likewise.
14086 (grub_video_set_viewport): Likewise.
14087 (grub_video_get_viewport): Likewise.
14088 (grub_video_map_color): Likewise.
14089 (grub_video_map_rgb): Likewise.
14090 (grub_video_map_rgba): Likewise.
14091 (grub_video_fill_rect): Likewise.
14092 (grub_video_blit_glyph): Likewise.
14093 (grub_video_blit_bitmap): Likewise.
14094 (grub_video_blit_render_target): Likewise.
14095 (grub_video_scroll): Likewise.
14096 (grub_video_swap_buffers): Likewise.
14097 (grub_video_create_render_target): Likewise.
14098 (grub_video_delete_render_target): Likewise.
14099 (grub_video_set_active_render_target): Likewise.
14101 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
14103 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
14105 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
14106 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14107 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14108 instead of $(srcdir)/genkernsyms.sh.
14110 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
14111 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14112 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14113 instead of $(srcdir)/genkernsyms.sh.
14115 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
14116 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14117 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14118 instead of $(srcdir)/genkernsyms.sh.
14120 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
14121 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
14122 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
14123 instead of $(srcdir)/genkernsyms.sh.
14125 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
14128 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
14130 (gensymlist.sh): New target.
14131 (genkernsyms.sh): Likewise.
14133 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
14134 genkernsyms.sh.in and gensymlist.sh.in.
14136 * genkernsyms.sh: Removed.
14137 * gensymlist.sh: Likewise.
14139 * genkernsyms.sh.in: New file.
14140 * gensymlist.sh.in: Likewise.
14142 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
14144 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
14145 clobber "prefix", since we may have already set it manually.
14147 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
14149 * kern/misc.c (abort): New alias for grub_abort.
14151 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
14153 A new machine-specific function "grub_machine_set_prefix" is
14154 defined. This is called after loading modules, so that a prefix
14155 initialization can use modules. Also, this change adds an
14156 intensive debugging feature for the memory manager via the
14157 configure option "--enable-mm-debug".
14159 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
14162 * kern/sparc64/ieee1275/init.c (abort): Removed.
14163 (grub_stop): Likewise.
14164 (grub_exit): New function.
14165 (grub_set_prefix): Renamed to ...
14166 (grub_machine_set_prefix): ... this.
14167 (grub_machine_init): Do not call grub_set_prefix.
14169 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
14170 (grub_machine_set_prefix): ... this.
14171 (grub_machine_init): Do not call grub_set_prefix.
14173 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
14174 (grub_machine_init): Do not set the prefix here.
14176 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
14178 * kern/efi/init.c: Include grub/mm.h.
14179 (grub_efi_set_prefix): New function.
14181 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
14182 (grub_efi_get_filename): New function.
14183 (grub_print_device_path): Renamed to ...
14184 (grub_efi_print_device_path): ... this.
14186 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
14187 [MM_DEBUG] (grub_realloc): Likewise.
14188 [MM_DEBUG] (grub_free): Likewise.
14189 [MM_DEBUG] (grub_memalign): Likewise.
14190 [MM_DEBUG] (grub_mm_debug): New variable.
14191 [MM_DEBUG] (grub_debug_malloc): New function.
14192 [MM_DEBUG] (grub_debug_free): New function.
14193 [MM_DEBUG] (grub_debug_realloc): New function.
14194 [MM_DEBUG] (grub_debug_memalign): New function.
14196 * kern/misc.c (grub_abort): Print a newline to distinguish
14199 * kern/main.c (grub_main): Call grub_machine_set_prefix and
14200 grub_set_root_dev after loading modules. This is necessary when
14201 setting a prefix depends on modules.
14203 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
14204 (grub_efi_print_device_path): ... this.
14205 (grub_efi_get_filename): New prototype.
14206 (grub_efi_set_prefix): Likewise.
14208 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
14210 (grub_efidisk_get_device_handle): New prototype.
14211 (grub_efidisk_get_device_name): Likewise.
14213 * include/grub/mm.h: Include config.h.
14214 (MM_DEBUG): Removed.
14215 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
14216 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
14217 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
14218 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
14219 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
14220 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
14221 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
14222 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
14223 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
14225 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
14227 * disk/efi/efidisk.c: Include grub/partition.h.
14228 (iterate_child_devices): New function.
14229 (add_device): First, compare only last device path nodes, so that
14230 devices are sorted by the types.
14231 (grub_efidisk_get_device_handle): New function.
14232 (grub_efidisk_get_device_name): Likewise.
14234 * configure.ac (--enable-mm-debug): New option to enable the
14235 memory manager debugging feature. This makes the binary much
14236 bigger, so is disabled by default.
14238 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
14240 Use grub_abort instead of grub_stop, and grub_exit must be
14241 define in each architecture now. Also, this change adds support
14244 * util/i386/pc/grub-probefs.c: Include grub/term.h.
14245 (grub_getkey): New function.
14246 (grub_term_get_current): Likewise.
14248 * util/i386/pc/grub-setup.c: Include grub/term.h.
14249 (grub_getkey): New function.
14250 (grub_term_get_current): Likewise.
14252 * util/misc.c (grub_stop): Renamed to ...
14253 (grub_exit): ... this.
14255 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
14256 (grub_exit): ... this.
14257 (grub_machine_init): Use grub_abort instead of abort.
14258 (grub_stop): Removed.
14260 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
14263 * kern/i386/pc/startup.S (grub_exit): New function.
14264 (cold_reboot): New label.
14266 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
14267 (grub_efi_init): Call grub_efidisk_init.
14268 (grub_efi_fini): Call grub_efidisk_fini.
14270 * kern/efi/efi.c: Include grub/mm.h.
14271 (grub_efi_console_control_guid): Renamed to ...
14272 (console_control_guid): ... this.
14273 (grub_efi_loaded_image_guid): Renamed to ...
14274 (loaded_image_guid): ... this.
14275 (grub_efi_locate_handle): New function.
14276 (grub_efi_open_protocol): Likewise.
14277 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
14278 GRUB_EFI_CONSOLE_CONTROL_GUID.
14279 (grub_efi_exit): Removed.
14280 (grub_stop): Likewise.
14281 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
14282 (grub_exit): New function.
14283 (grub_print_device_path): Likewise.
14285 * kern/rescue.c (grub_rescue_cmd_exit): New function.
14286 (grub_enter_rescue_mode): Register "exit".
14288 * kern/misc.c (grub_real_dprintf): A cosmetic change.
14289 (grub_abort): New function.
14291 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
14293 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
14295 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
14297 * include/grub/efi/efi.h (grub_efi_exit): Removed.
14298 (grub_print_device_path): New prototype.
14299 (grub_efi_locate_handle): Likewise.
14300 (grub_efi_open_protocol): Likewise.
14302 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
14303 * disk/efi/efidisk.c: Likewise.
14305 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
14307 * include/grub/efi/console_control.h
14308 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
14310 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
14311 last 8 bytes as an array.
14312 (GRUB_EFI_DISK_IO_GUID): New macro.
14313 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
14314 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
14315 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
14317 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
14318 (struct grub_efi_device_path): Rename the member "sub_type" to
14320 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
14321 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
14322 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
14323 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
14324 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
14325 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
14326 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
14327 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
14328 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
14329 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
14330 (struct grub_efi_pci_device_path): New structure.
14331 (grub_efi_pci_device_path_t): New type.
14332 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
14333 (struct grub_efi_pccard_device_path): New structure.
14334 (grub_efi_pccard_device_path_t): New type.
14335 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
14336 (struct grub_efi_memory_mapped_device_path): New structure.
14337 (grub_efi_memory_mapped_device_path_t): New type.
14338 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
14339 (struct grub_efi_vendor_device_path): New structure.
14340 (grub_efi_vendor_device_path_t): New type.
14341 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
14342 (struct grub_efi_controller_device_path): New structure.
14343 (grub_efi_controller_device_path_t): New type.
14344 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
14345 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
14346 (struct grub_efi_acpi_device_path): New structure.
14347 (grub_efi_acpi_device_path_t): New type.
14348 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
14349 (struct grub_efi_expanded_acpi_device_path): New structure.
14350 (grub_efi_expanded_acpi_device_path_t): New type.
14351 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
14352 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
14353 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
14354 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
14355 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
14356 (struct grub_efi_atapi_device_path): New structure.
14357 (grub_efi_atapi_device_path_t): New type.
14358 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
14359 (struct grub_efi_fibre_channel_device_path): New structure.
14360 (grub_efi_fibre_channel_device_path_t): New type.
14361 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
14362 (struct grub_efi_1394_device_path): New structure.
14363 (grub_efi_1394_device_path_t): New type.
14364 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
14365 (struct grub_efi_usb_device_path): New structure.
14366 (grub_efi_usb_device_path_t): New type.
14367 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
14368 (struct grub_efi_usb_class_device_path): New structure.
14369 (grub_efi_usb_class_device_path_t): New type.
14370 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
14371 (struct grub_efi_i2o_device_path): New structure.
14372 (grub_efi_i2o_device_path_t): New type.
14373 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
14374 (struct grub_efi_mac_address_device_path): New structure.
14375 (grub_efi_mac_address_device_path_t): New type.
14376 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
14377 (struct grub_efi_ipv4_device_path): New structure.
14378 (grub_efi_ipv4_device_path_t): New type.
14379 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
14380 (struct grub_efi_ipv6_device_path): New structure.
14381 (grub_efi_ipv6_device_path_t): New type.
14382 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
14383 (struct grub_efi_infiniband_device_path): New structure.
14384 (grub_efi_infiniband_device_path_t): New type.
14385 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
14386 (struct grub_efi_uart_device_path): New structure.
14387 (grub_efi_uart_device_path_t): New type.
14388 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
14389 (struct grub_efi_vendor_messaging_device_path): New structure.
14390 (grub_efi_vendor_messaging_device_path_t): New type.
14391 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
14392 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
14393 (struct grub_efi_hard_drive_device_path): New structure.
14394 (grub_efi_hard_drive_device_path_t): New type.
14395 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
14396 (struct grub_efi_cdrom_device_path): New structure.
14397 (grub_efi_cdrom_device_path_t): New type.
14398 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
14399 (struct grub_efi_vendor_media_device_path): New structure.
14400 (grub_efi_vendor_media_device_path_t): New type.
14401 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
14402 (struct grub_efi_file_path_device_path): New structure.
14403 (grub_efi_file_path_device_path_t): New type.
14404 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
14405 (struct grub_efi_protocol_device_path): New structure.
14406 (grub_efi_protocol_device_path_t): New type.
14407 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
14408 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
14409 (struct grub_efi_bios_device_path): New structure.
14410 (grub_efi_bios_device_path_t): New type.
14411 (struct grub_efi_disk_io): New structure.
14412 (grub_efi_disk_io_t): New type.
14413 (struct grub_efi_block_io_media): New structure.
14414 (grub_efi_block_io_media_t): New type.
14415 (struct grub_efi_block_io): New structure.
14416 (grub_efi_block_io_t): New type.
14418 * include/grub/misc.h (grub_stop): Removed.
14419 (grub_exit): New prototype.
14420 (grub_abort): Likewise.
14422 * include/grub/disk.h (enum grub_disk_dev_id): Added
14423 GRUB_DISK_DEVICE_EFIDISK_ID.
14425 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
14426 disk/efi/efidisk.c.
14427 (kernel_syms.lst): Remove the target if an error occurs.
14429 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
14431 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
14432 as it was simply too buggy.
14434 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
14436 * kern/misc.c (grub_lltoa): New function.
14437 (grub_vsprintf): Added support for the long long suffix,
14440 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
14442 * Makefile.in (LDFLAGS): Add variable.
14443 (LD): Remove variable.
14444 * configure.ac: Add -m32 to LDFLAGS.
14445 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
14446 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
14447 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
14448 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
14449 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
14451 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
14452 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
14453 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
14455 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
14457 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
14458 length for unknown glyph.
14460 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
14462 Add support for pre-loaded modules into the EFI port.
14464 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
14465 completely. Accept one more argument DIR. The caller has changed.
14467 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
14469 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
14470 (grub_efi_loaded_image_guid): New variable.
14471 (grub_efi_get_loaded_image): New function.
14472 (grub_arch_modules_addr): Likewise.
14474 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
14477 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
14478 (struct grub_efi_loaded_image): New structure.
14479 (grub_efi_loaded_image_t): New type.
14481 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
14483 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
14484 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
14485 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
14487 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
14489 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
14491 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
14493 * DISTLIST: Added include/grub/efi/console.h,
14494 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
14495 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
14497 * include/grub/efi/console.h: New file.
14498 * include/grub/efi/time.h: Likewise.
14499 * include/grub/i386/efi/kernel.h: Likewise.
14500 * kern/efi/init.c: Likewise.
14501 * kern/efi/mm.c: Likewise.
14502 * term/efi/console.c: Likewise.
14504 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
14505 (grub_stop): Removed.
14506 (grub_get_rtc): Likewise.
14507 (grub_machine_init): Simply call grub_efi_init.
14508 (grub_machine_fini): Call grub_efi_fini.
14510 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
14511 (grub_efi_output_string): Removed.
14512 (grub_efi_stall): New function.
14513 (grub_stop): Likewise.
14514 (grub_get_rtc): Likewise.
14516 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
14517 (grub_efi_stall): New prototype.
14518 (grub_efi_allocate_pages): Likewise.
14519 (grub_efi_free_pages): Likewise.
14520 (grub_efi_get_memory_map): Likewise.
14521 (grub_efi_mm_init): Likewise.
14522 (grub_efi_mm_fini): Likewise.
14523 (grub_efi_init): Likewise.
14524 (grub_efi_fini): Likewise.
14526 * include/grub/i386/efi/time.h: Do not include
14527 grub/symbol.h. Include grub/efi/time.h.
14528 (GRUB_TICKS_PER_SECOND): Removed.
14529 (grub_get_rtc): Likewise.
14531 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
14532 Added padding. The EFI spec is buggy.
14533 (GRUB_EFI_BLACK): New macro.
14534 (GRUB_EFI_BLUE): Likewise.
14535 (GRUB_EFI_GREEN): Likewise.
14536 (GRUB_EFI_CYAN): Likewise.
14537 (GRUB_EFI_RED): Likewise.
14538 (GRUB_EFI_MAGENTA): Likewise.
14539 (GRUB_EFI_BROWN): Likewise.
14540 (GRUB_EFI_LIGHTGRAY): Likewise.
14541 (GRUB_EFI_BRIGHT): Likewise.
14542 (GRUB_EFI_DARKGRAY): Likewise.
14543 (GRUB_EFI_LIGHTBLUE): Likewise.
14544 (GRUB_EFI_LIGHTGREEN): Likewise.
14545 (GRUB_EFI_LIGHTCYAN): Likewise.
14546 (GRUB_EFI_LIGHTRED): Likewise.
14547 (GRUB_EFI_LIGHTMAGENTA): Likewise.
14548 (GRUB_EFI_YELLOW): Likewise.
14549 (GRUB_EFI_WHITE): Likewise.
14550 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
14551 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
14552 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
14553 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
14554 (GRUB_EFI_BACKGROUND_RED): Likewise.
14555 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
14556 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
14557 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
14558 (GRUB_EFI_TEXT_ATTR): Likewise.
14560 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
14561 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
14562 (kernel_mod_HEADERS): Added efi/time.h.
14564 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
14566 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
14567 include/grub/efi/api.h, include/grub/efi/console_control.h,
14568 include/grub/efi/efi.h, include/grub/efi/pe32.h,
14569 include/grub/i386/efi/time.h, kern/efi/efi.c,
14570 kern/i386/efi/init.c, kern/i386/efi/startup.S,
14571 and util/i386/efi/grub-mkimage.c.
14573 * Makefile.in (RMKFILES): Added i386-efi.rmk.
14575 * genmk.rb (PModule#rule): Do not export symbols if
14576 #{prefix}_EXPORTS is set to "no".
14578 * conf/i386-efi.mk: New file.
14579 * conf/i386-efi.rmk: Likewise.
14580 * include/grub/efi/api.h: Likewise.
14581 * include/grub/efi/console_control.h: Likewise.
14582 * include/grub/efi/efi.h: Likewise.
14583 * include/grub/efi/pe32.h: Likewise.
14584 * include/grub/i386/efi/time.h: Likewise.
14585 * kern/efi/efi.c: Likewise.
14586 * kern/i386/efi/init.c: Likewise.
14587 * kern/i386/efi/startup.S: Likewise.
14588 * util/i386/efi/grub-mkimage.c: Likewise.
14590 2006-04-17 Marco Gerards <marco@gnu.org>
14592 * include/grub/script.h: Include <grub/parser.h> and
14593 "grub_script.tab.h".
14594 (struct grub_lexer_param): New struct.
14595 (struct grub_parser_param): Likewise.
14596 (grub_script_create_arglist): Pass the state in an argument.
14597 (grub_script_add_arglist): Likewise.
14598 (grub_script_create_cmdline): Likewise.
14599 (grub_script_create_cmdblock): Likewise.
14600 (grub_script_create_cmdif): Likewise.
14601 (grub_script_create_cmdmenu): Likewise.
14602 (grub_script_add_cmd): Likewise.
14603 (grub_script_arg_add): Likewise.
14604 (grub_script_lexer_ref): Likewise.
14605 (grub_script_lexer_deref): Likewise.
14606 (grub_script_lexer_record_start): Likewise.
14607 (grub_script_lexer_record_stop): Likewise.
14608 (grub_script_mem_record): Likewise.
14609 (grub_script_mem_record_stop): Likewise.
14610 (grub_script_malloc): Likewise.
14611 (grub_script_yylex): Likewise.
14612 (grub_script_yyparse): Likewise.
14613 (grub_script_yyerror): Likewise.
14614 (grub_script_yylex): Likewise.
14615 (grub_script_lexer_init): Return the state.
14617 * normal/lexer.c (grub_script_lexer_state): Removed variable.
14618 (grub_script_lexer_done): Likewise.
14619 (grub_script_lexer_getline): Likewise.
14620 (grub_script_lexer_refs): Likewise.
14621 (script): Likewise.
14622 (newscript): Likewise.
14623 (record): Likewise.
14624 (recording): Likewise.
14625 (recordpos): Likewise.
14626 (recordlen): Likewise.
14627 (grub_script_lexer_init): Return the state instead of setting
14629 (grub_script_lexer_ref): Use the newly added argument for state
14630 instead of globals.
14631 (grub_script_lexer_deref): Likewise.
14632 (grub_script_lexer_record_start): Likewise.
14633 (grub_script_lexer_record_stop): Likewise.
14634 (recordchar): Likewise.
14635 (nextchar): Likewise.
14636 (grub_script_yylex2): Likewise.
14637 (grub_script_yylex): Likewise.
14638 (grub_script_yyerror): Likewise.
14640 * normal/parser.y (func_mem): Removed variable.
14641 (menu_entry): Likewise.
14643 (%lex-param): New parser option.
14644 (%parse-param): Likewise.
14645 (script): Always return the AST.
14646 (argument): Pass the state around.
14647 (arguments): Likewise.
14648 (grubcmd): Likewise.
14649 (commands): Likewise.
14650 (function): Likewise.
14651 (menuentry): Likewise.
14652 (if_statement): Likewise.
14655 * normal/script.c (grub_script_memused): Removed variable.
14656 (grub_script_parsed): Likewise.
14657 (grub_script_malloc): Added a state argument. Use that instead of
14659 (grub_script_mem_record): Likewise.
14660 (grub_script_mem_record_stop): Likewise.
14661 (grub_script_arg_add): Likewise.
14662 (grub_script_add_arglist): Likewise.
14663 (grub_script_create_cmdline): Likewise.
14664 (grub_script_create_cmdif): Likewise.
14665 (grub_script_create_cmdmenu): Likewise.
14666 (grub_script_add_cmd): Likewise.
14667 (grub_script_parse): Setup the state before calling the parser.
14669 2006-04-16 Marco Gerards <marco@gnu.org>
14671 * normal/command.c (grub_command_init): Remove the title command.
14673 * normal/lexer.c (grub_script_yylex): Renamed from this...
14674 (grub_script_yylex2): ... to this.
14675 (grub_script_yylex): New function. Temporary
14676 introduced to filter some tokens.
14677 (grub_script_yyerror): Print a newline.
14679 * normal/main.c (read_config_file): Output information about the
14680 lines that contain errors. Wait for a key after all lines have
14681 been processed. Don't return an empty menu.
14683 * normal/parser.y (func_mem): Don't initialize.
14684 (menu_entry): Likewise.
14685 (err): New variable.
14686 (script): Don't return anything when an error was encountered.
14687 (ws, returns): Removed rules.
14688 (argument): Disabled concatenated variable support.
14689 (arguments): Remove explicit separators.
14690 (grubcmd): Likewise.
14691 (function): Likewise.
14692 (menuentry): Likewise.
14694 (commands): Likewise. Add error handling.
14696 * normal/script.c (grub_script_create_cmdline): If
14697 `grub_script_parsed' is 0, assume the parser encountered an error.
14699 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
14701 * configure.ac: Add support for EFI. Fix the typo
14702 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
14704 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
14706 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
14707 foreign multibyte characters should be shown correctly.
14709 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
14711 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
14713 (read_config_file): Made it to close file before returning.
14715 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
14717 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
14718 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
14719 video/i386/pc/vbefill.c.
14721 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
14722 video/i386/pc/vbefill.c.
14724 * include/grub/video.h (grub_video_blit_format): New enum.
14725 (grub_video_mode_info): Added new member blit_format.
14726 (grub_video_get_blit_format): New function prototype.
14728 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
14729 function prototype.
14730 (grub_video_vbe_map_rgb): Likewise.
14731 (grub_video_vbe_unmap_color): Likewise.
14733 * include/grub/i386/pc/vbeblit.h: New file.
14735 * include/grub/i386/pc/vbefill.h: New file.
14737 * video/video.c (grub_video_get_blit_format): New function.
14738 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
14739 (grub_video_vbe_map_rgb): Likewise.
14740 (grub_video_vbe_unmap_color): Likewise.
14742 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
14744 (grub_video_vbe_blit_render_target): Changed to use more optimized
14746 (grub_video_vbe_setup): Added detection for optimized settings.
14747 (grub_video_vbe_create_render_target): Likewise.
14749 * video/i386/pc/vbeblit.c: New file.
14751 * video/i386/pc/vbefill.c: New file.
14753 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
14755 * font/manager.c (grub_font_get_glyph): Removed font fixup from
14758 * util/unifont2pff.rb: ... and moved it to here. Improved argument
14759 parsing to support both hex and dec ranges. If filename was missing
14760 show usage information.
14762 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
14764 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
14765 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
14767 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
14768 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
14769 (video_mod_SOURCES): Added.
14770 (video_mod_CFLAGS): Likewise.
14771 (video_mod_LDFLAGS): Likewise.
14772 (gfxterm_mod_SOURCES): Likewise.
14773 (gfxterm_mod_CFLAGS): Likewise.
14774 (gfxterm_mod_LDFLAGS): Likewise.
14775 (videotest_mod_SOURCES): Likewise.
14776 (videotest_mod_CFLAGS): Likewise.
14777 (videotest_mod_LDFLAGS): Likewise.
14778 (vesafb_mod_SOURCES): Removed.
14779 (vesafb_mod_CFLAGS): Likewise.
14780 (vesafb_mod_LDFLAGS): Likewise.
14781 (vga_mod_SOURCES): Likewise.
14782 (vga_mod_CFLAGS): Likewise.
14783 (vga_mod_LDFLAGS): Likewise.
14785 * commands/videotest.c: New file.
14787 * font/manager.c (fill_with_default_glyph): Modified to use
14789 (grub_font_get_glyph): Likewise.
14790 (fontmanager): Renamed from this...
14791 (font_manager): ... to this.
14793 * include/grub/font.h (grub_font_glyph): Added new structure.
14794 (grub_font_get_glyph): Modified to use grub_font_glyph.
14796 * include/grub/misc.h (grub_abs): Added as inline function.
14798 * include/grub/video.h: New file.
14800 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
14801 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
14802 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
14803 (grub_vbe_get_controller_info): Renamed from this...
14804 (grub_vbe_bios_get_controller_info): ... to this.
14805 (grub_vbe_get_mode_info): Renamed from this...
14806 (grub_vbe_bios_get_mode_info): ... to this.
14807 (grub_vbe_set_mode): Renamed from this...
14808 (grub_vbe_bios_set_mode): ... to this.
14809 (grub_vbe_get_mode): Renamed from this...
14810 (grub_vbe_bios_get_mode): ... to this.
14811 (grub_vbe_set_memory_window): Renamed from this...
14812 (grub_vbe_bios_set_memory_window): ... to this.
14813 (grub_vbe_get_memory_window): Renamed from this...
14814 (grub_vbe_bios_get_memory_window): ... to this.
14815 (grub_vbe_set_scanline_length): Renamed from this...
14816 (grub_vbe_set_scanline_length): ... to this.
14817 (grub_vbe_get_scanline_length): Renamed from this...
14818 (grub_vbe_bios_get_scanline_length): ... to this.
14819 (grub_vbe_set_display_start): Renamed from this...
14820 (grub_vbe_bios_set_display_start): ... to this.
14821 (grub_vbe_get_display_start): Renamed from this...
14822 (grub_vbe_bios_get_display_start): ... to this.
14823 (grub_vbe_set_palette_data): Renamed from this...
14824 (grub_vbe_bios_set_palette_data): ... to this.
14825 (grub_vbe_set_pixel_rgb): Removed.
14826 (grub_vbe_set_pixel_index): Likewise.
14828 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
14830 (grub_vbe_bios_get_controller_info): ... to this.
14831 (grub_vbe_get_mode_info): Renamed from this...
14832 (grub_vbe_bios_get_mode_info): ... to this.
14833 (grub_vbe_set_mode): Renamed from this...
14834 (grub_vbe_bios_set_mode): ... to this.
14835 (grub_vbe_get_mode): Renamed from this...
14836 (grub_vbe_bios_get_mode): ... to this.
14837 (grub_vbe_set_memory_window): Renamed from this...
14838 (grub_vbe_bios_set_memory_window): ... to this.
14839 (grub_vbe_get_memory_window): Renamed from this...
14840 (grub_vbe_bios_get_memory_window): ... to this.
14841 (grub_vbe_set_scanline_length): Renamed from this...
14842 (grub_vbe_set_scanline_length): ... to this.
14843 (grub_vbe_get_scanline_length): Renamed from this...
14844 (grub_vbe_bios_get_scanline_length): ... to this.
14845 (grub_vbe_set_display_start): Renamed from this...
14846 (grub_vbe_bios_set_display_start): ... to this.
14847 (grub_vbe_get_display_start): Renamed from this...
14848 (grub_vbe_bios_get_display_start): ... to this.
14849 (grub_vbe_set_palette_data): Renamed from this...
14850 (grub_vbe_bios_set_palette_data): ... to this.
14851 (grub_vbe_bios_get_controller_info): Fixed problem with registers
14852 getting corrupted after calling it. Added more pushes and pops.
14853 (grub_vbe_bios_set_mode): Likewise.
14854 (grub_vbe_bios_get_mode): Likewise.
14855 (grub_vbe_bios_get_memory_window): Likewise.
14856 (grub_vbe_bios_set_scanline_length): Likewise.
14857 (grub_vbe_bios_get_scanline_length): Likewise.
14858 (grub_vbe_bios_get_display_start): Likewise.
14859 (grub_vbe_bios_set_palette_data): Likewise.
14861 * normal/cmdline.c (cl_set_pos): Refresh the screen.
14862 (cl_insert): Likewise.
14863 (cl_delete): Likewise.
14865 * term/gfxterm.c: New file.
14867 * term/i386/pc/vesafb.c: Removed file.
14869 * video/video.c: New file.
14871 * video/i386/pc/vbe.c (real2pm): Added new function.
14872 (grub_video_vbe_draw_pixel): Likewise.
14873 (grub_video_vbe_get_video_ptr): Likewise.
14874 (grub_video_vbe_get_pixel): Likewise
14875 (grub_video_vbe_init): Likewise.
14876 (grub_video_vbe_fini): Likewise.
14877 (grub_video_vbe_setup): Likewise.
14878 (grub_video_vbe_get_info): Likewise.
14879 (grub_video_vbe_set_palette): Likewise.
14880 (grub_video_vbe_get_palette): Likewise.
14881 (grub_video_vbe_set_viewport): Likewise.
14882 (grub_video_vbe_get_viewport): Likewise.
14883 (grub_video_vbe_map_color): Likewise.
14884 (grub_video_vbe_map_rgb): Likewise.
14885 (grub_video_vbe_map_rgba): Likewise.
14886 (grub_video_vbe_unmap_color): Likewise.
14887 (grub_video_vbe_fill_rect): Likewise.
14888 (grub_video_vbe_blit_glyph): Likewise.
14889 (grub_video_vbe_blit_bitmap): Likewise.
14890 (grub_video_vbe_blit_render_target): Likewise.
14891 (grub_video_vbe_scroll): Likewise.
14892 (grub_video_vbe_swap_buffers): Likewise.
14893 (grub_video_vbe_create_render_target): Likewise.
14894 (grub_video_vbe_delete_render_target): Likewise.
14895 (grub_video_vbe_set_active_render_target): Likewise.
14896 (grub_vbe_set_pixel_rgb): Remove function.
14897 (grub_vbe_set_pixel_index): Likewise.
14898 (index_color_mode): Remove static variable.
14899 (active_mode): Likewise.
14900 (framebuffer): Likewise.
14901 (bytes_per_scan_line): Likewise.
14902 (grub_video_vbe_adapter): Added new static variable.
14903 (framebuffer): Likewise.
14904 (render_target): Likewise.
14905 (initial_mode): Likewise.
14906 (mode_in_use): Likewise.
14907 (mode_list): Likewise.
14909 2006-03-10 Marco Gerards <marco@gnu.org>
14911 * configure.ac (AC_INIT): Bumped to 1.93.
14913 * DISTLIST: Added `include/grub/hfs.h'.
14915 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
14917 * boot/i386/pc/boot.S (general_error): Before looping, try INT
14918 18H, which might help the BIOS falling back to next boot media.
14920 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
14922 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
14923 Poe Chen <poe.poechen@gmail.com>.
14925 2006-01-17 Marco Gerards <marco@gnu.org>
14927 * include/grub/normal.h: Include <grub/script.h>.
14928 (grub_command_list): Removed struct.
14929 (grub_command_list_t): Removed type.
14930 (grub_menu_entry): Remove members `num' and `command_list'. Add
14931 members `commands' and `sourcecode'.
14932 * include/grub/script.h: Add inclusion guards.
14933 (grub_script_cmd_menuentry): New struct.
14934 (grub_script_execute_menuentry): New prototype.
14935 (grub_script_lexer_record_start): Likewise.
14936 (grub_script_lexer_record_stop): Likewise.
14937 * normal/execute.c (grub_script_execute_menuentry): New function.
14938 * normal/lexer.c (record, recording, recordpos, recordlen): New
14940 (grub_script_lexer_record_start): New function.
14941 (grub_script_lexer_record_stop): Likewise.
14942 (recordchar): Likewise.
14943 (nextchar): Likewise.
14944 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
14945 2048 as the buffer size. Add the tokens `menuentry' and `@'.
14946 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
14947 (current_menu): New variable.
14948 (free_menu): Mainly rewritten.
14949 (grub_normal_menu_addentry): New function.
14950 (read_config_file): Rewritten.
14951 * normal/menu.c (run_menu_entry): Mainly rewritten.
14952 * normal/menu_entry.c (make_screen): Rewritten the code to insert
14954 (run): Mainly rewritten.
14955 * normal/parser.y (menu_entry): New variable.
14956 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
14957 (menuentry): New rule.
14958 (command): Add `menuentry'.
14959 (if_statement): Allow additional returns before `fi'.
14960 * normal/script.c (grub_script_create_cmdmenu): New function.
14962 2006-01-03 Marco Gerards <marco@gnu.org>
14964 * INSTALL: GNU Bison is required.
14965 * configure.ac: Rewritten the test to detect Bison.
14966 * Makefile.in (YACC): New variable. Reported by Xun Sun
14967 <xun.sun.cn@gmail.com>.
14969 2006-01-03 Marco Gerards <marco@gnu.org>
14971 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14972 the HFS+ filesystem to filesystem blocks.
14973 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14974 GCC warning is silenced.
14976 2006-01-03 Marco Gerards <marco@gnu.org>
14978 * partmap/apple.c (apple_partition_map_iterate): Convert the data
14979 read from disk from big endian to host byte order.
14981 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
14983 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
14985 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14986 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14987 embedded HFS+ filesystem.
14988 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14989 (grub_hfs_sblock): Move from here...
14990 * include/grub/hfs.h: To here... New file.
14991 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
14993 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14995 (grub_hfsplus_volheader): Change type of member `magic' to
14997 (grub_hfsplus_data): Add new member `embedded_offset'.
14998 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
15000 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
15001 Calculate the offset.
15003 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
15005 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
15007 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
15009 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
15011 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
15012 ENV->NAME is NULL after allocating ENV->VALUE.
15014 2005-12-25 Marco Gerards <marco@gnu.org>
15016 * kern/env.c (grub_env_set): Rewritten the error handling code.
15018 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
15020 * geninit.sh: Made more robust, and more portable.
15022 2005-12-25 Marco Gerards <marco@gnu.org>
15024 Add support for Apple HFS+ filesystems.
15026 * fs/hfsplus.c: New file.
15028 * DISTLIST: Added `fs/hfsplus.c'.
15030 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
15031 (hfsplus_mod_SOURCES): New variable.
15032 (hfsplus_mod_CFLAGS): Likewise.
15033 (hfsplus_mod_LDFLAGS): Likewise.
15034 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
15035 (grub_setup_SOURCES): Likewise.
15036 (grub_mkdevicemap_SOURCES): Likewise.
15037 (grub_emu_SOURCES): Likewise.
15038 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15040 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
15042 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
15044 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
15046 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
15047 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
15048 include/grub/parser.h, include/grub/script.h, kern/parser.c,
15049 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
15050 normal/lexer.c, normal/parser.y, normal/script.c, and
15052 Removed kern/sparc64/cache.c.
15054 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
15055 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
15058 * configure.ac (AC_INIT): Bumped to 1.92.
15060 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
15062 * kern/err.c (grub_error_push): Added new function to support error
15064 (grub_error_pop): Likewise.
15065 (grub_error_stack_items): New local variable to support error stacks.
15066 (grub_error_stack_pos): Likewise.
15067 (grub_error_stack_assert): Likewise.
15068 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
15070 (grub_print_error): Added support to print errors from error stack.
15072 * include/grub/err.h (grub_error_push): Added function prototype.
15073 (grub_error_pop): Likewise.
15075 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
15077 * configure.ac: Accept `powerpc64' as host_cpu.
15078 (amd64): Rename to `biarch32'.
15080 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
15081 non-cacheline-aligned addresses.
15083 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
15084 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
15085 if `size' is non-zero.
15087 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
15089 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
15090 and `cd' to make sure the filename is not prefixed with a
15092 (pkgdata_MODULES): Add `gpt.mod'.
15093 (gpt_mod_SOURCES): New variable.
15094 (gpt_mod_CFLAGS): Likewise.
15095 (gpt_mod_LDFLAGS): Likewise.
15097 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
15099 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
15102 * partmap/gpt.c: New file.
15104 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
15105 GPT partition map is detected.
15107 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
15109 * commands/i386/pc/play.c: New file.
15110 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
15111 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
15114 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
15116 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
15117 ((unused))' to silence gcc warning.
15119 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
15121 * configure.ac: Correct `AC_PROG_YACC' test.
15123 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
15125 * util/powerpc/ieee1275/grub-install.in: Run the mount point
15126 check before installing files.
15128 2005-11-22 Mike Small <smallm@panix.com>
15130 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
15131 number regex so multidigit numbers are recognized correctly.
15133 2005-11-22 Mike Small <smallm@panix.com>
15135 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
15136 debugging message before attempting to claim memory.
15137 (grub_rescue_cmd_initrd): Add a claim debugging message and try
15138 multiple addresses in case of failure.
15140 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
15142 * term/tparm.c (get_space): Remove empty `if' statement.
15144 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
15146 * kern/parser.c (check_varstate): Rename `state' to 's'.
15148 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
15150 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
15151 variable definitions to the beginning of each function. Sort stack
15153 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
15154 `buf' argument to `char *'.
15156 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
15158 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
15159 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15160 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15161 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15162 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15163 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15164 configfile.mod, search.mod, gzio.mod and test.mod.
15165 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15166 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15167 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15168 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15169 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15170 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15171 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15172 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15173 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15174 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15175 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15176 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15177 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15178 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15179 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15180 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15181 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15182 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15183 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15184 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15185 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15186 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15187 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
15189 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
15191 (pkgdata_MODULES): Add test.mod.
15193 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15195 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
15196 appending to variables with "+=".
15197 (PModule): Use full pathname to generate *.lst filenames.
15199 * Makefile.in: Fixed list rules moved from genmk.rb.
15200 (.DELETE_ON_ERROR): New special target.
15201 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
15203 * conf/i386-pc.rmk: Include conf/common.mk.
15204 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
15205 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
15206 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
15207 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
15208 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
15209 configfile.mod, search.mod, gzio.mod and test.mod.
15210 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
15211 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
15212 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
15213 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
15214 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
15215 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
15216 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
15217 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
15218 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
15219 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
15220 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15221 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15222 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
15223 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
15224 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
15225 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
15226 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15227 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
15228 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
15229 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
15230 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
15231 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
15232 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
15234 * conf/common.rmk: ... to here. New file.
15236 * conf/common.mk: New file.
15238 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
15240 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
15241 (grub_script.tab.c): ... here.
15243 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
15244 (grub_script.tab.c): ... here.
15246 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
15247 (grub_script.tab.c): ... here.
15249 * normal/command.c (grub_command_find): Fixed a memory leak of
15250 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
15252 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15254 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
15255 "@" which marks the start of a comment on ARM.
15256 (VARIABLE): Likewise.
15258 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15260 Add support for Linux/ADFS partition tables.
15262 * partmap/acorn.c: New file.
15264 * include/grub/acorn_filecore.h: Likewise.
15266 * DISTLIST: Added `partmap/acorn.c' and
15267 `include/grub/acorn_filecore.h'.
15269 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15271 (pkgdata_MODULES): Add `acorn.mod'.
15272 (acorn_mod_SOURCES): New variable.
15273 (acorn_mod_CFLAGS): Likewise.
15275 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15277 (pkgdata_MODULES): Add `acorn.mod'.
15278 (acorn_mod_SOURCES): New variable.
15279 (acorn_mod_CFLAGS): Likewise.
15281 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
15282 (pkgdata_MODULES): Add `acorn.mod'.
15283 (acorn_mod_SOURCES): New variable.
15284 (acorn_mod_CFLAGS): Likewise.
15285 (acorn_mod_LDFLAGS): Likewise.
15287 * include/types.h (grub_disk_addr_t): New typedef.
15289 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
15291 * geninit.sh: New file.
15293 * geninitheader.sh: Likewise.
15295 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
15296 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
15297 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
15298 * commands/configfile.c (grub_configfile_init)
15299 (grub_configfile_fini): Likewise.
15300 * commands/default.c (grub_default_init, grub_default_fini):
15302 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
15303 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
15304 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
15305 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
15307 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
15308 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
15310 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
15311 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
15313 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
15315 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
15317 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
15318 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
15319 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
15320 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
15321 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
15322 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
15323 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
15324 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
15325 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
15326 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
15327 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
15328 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
15329 * partmap/amiga.c (grub_amiga_partition_map_init)
15330 (grub_amiga_partition_map_fini): Likewise.
15331 * partmap/apple.c (grub_apple_partition_map_init)
15332 (grub_apple_partition_map_fini): Likewise.
15333 * partmap/pc.c (grub_pc_partition_map_init)
15334 (grub_pc_partition_map_fini): Likewise.
15335 * partmap/sun.c (grub_sun_partition_map_init,
15336 grub_sun_partition_map_fini): Likewise.
15337 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
15340 * util/grub-emu.c: Include <grub_modules_init.h>.
15341 (main): Don't initialize and de-initialize any modules directly,
15342 use `grub_init_all' and `grub_fini_all' instead.
15344 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
15345 `grub_vesafb_mod_init'.
15346 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
15348 * term/i386/pc/vga.c (grub_vga_init): Renamed to
15349 `grub_vga_mod_init'. Updated all users.
15350 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
15352 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
15353 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
15356 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
15357 Generate a function to initialize the module in utilities.
15358 Updated all callers.
15359 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
15360 initialize the module in utilities. Updated all callers.
15362 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
15364 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
15365 escape sequence and a literal ^L to clear the screen.
15367 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
15368 when returning from Open Firmware.
15370 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
15372 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
15373 (grub_ofconsole_height): Likewise.
15374 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
15375 manually insert a '\n'.
15376 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
15377 `grub_ofconsole_height'. Return early if these are already set.
15379 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
15381 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
15382 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
15383 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
15384 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
15385 and `normal/script.c'.
15386 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15387 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15388 (test_mod_SOURCES): New variable.
15389 (test_mod_CFLAGS): Likewise.
15390 (test_mod_LDFLAGS): Likewise.
15391 (pkgdata_MODULES): Add `test.mod'.
15392 (grub_script.tab.c): New rule.
15393 (grub_script.tab.h): Likewise.
15395 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
15397 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15398 `commands/test.c', `normal/execute.c', `normal/lexer.c',
15399 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15400 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15401 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15402 (test_mod_SOURCES): New variable.
15403 (test_mod_CFLAGS): Likewise.
15404 (pkgdata_MODULES): Add `test.mod'.
15405 (grub_script.tab.c): New rule.
15406 (grub_script.tab.h): Likewise.
15408 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
15410 Add initial scripting support.
15412 * commands/test.c: New file.
15413 * include/grub/script.h: Likewise.
15414 * normal/execute.c: Likewise.
15415 * normal/function.c: Likewise.
15416 * normal/lexer.c: Likewise.
15417 * normal/parser.y: Likewise.
15418 * normal/script.c: Likewise.
15420 * configure.ac: Add `AC_PROG_YACC' test.
15422 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
15423 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
15424 `normal/function.c' and `normal/script.c'.
15425 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
15426 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
15427 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
15429 (pkgdata_MODULES): Add `test.mod'.
15430 (grub_script.tab.c): New rule.
15431 (grub_script.tab.h): Likewise.
15433 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
15435 * include/grub/normal.h (grub_test_init): New prototype.
15436 (grub_test_fini): Likewise.
15438 * normal/command.c: Include <grub/script.h>.
15439 (grub_command_execute): Rewritten.
15441 * util/grub-emu.c (main): Call `grub_test_init' and
15444 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
15446 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
15448 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
15449 there are no pending characters.
15451 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
15453 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
15454 `grub_strndup' to drop device arguments. Replace unnecessary
15455 `grub_strndup' with `grub_strdup'.
15457 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
15459 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
15460 `debug' environment variable has been set.
15462 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
15464 * Makefile.in (install-local): Use $(DATA).
15465 (uninstall): Likewise.
15466 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
15467 (sbin_UTILITIES): ... to here.
15468 (sbin_SCRIPTS): New variable.
15469 (grub_install_SOURCES): New variable.
15470 * util/powerpc/ieee1275/grub-install.in: New file.
15471 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
15473 (add_segments): Call `grub_util_get_path'.
15475 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
15477 From Timothy Baldwin:
15478 * commands/ls.c (grub_ls_list_files): Close FILE with
15480 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
15482 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
15484 * include/grub/parser.h: New file.
15486 * kern/parser.c: Likewise.
15488 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
15489 (grub_setup_SOURCES): Likewise.
15490 (grub_probefs_SOURCES): Likewise.
15491 (grub_emu_SOURCES): Likewise.
15492 (kernel_img_HEADERS): Add `parser.h'.
15494 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
15495 (grub_emu_SOURCES): Add `kern/parser.c'.
15496 (grubof_SOURCES): Likewise.
15498 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
15499 (grubof_SOURCES): Add `kern/parser.c'.
15501 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
15503 * kern/misc.c (grub_split_cmdline): Removed function.
15505 * kern/rescue.c: Include <grub/parser.h>.
15506 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
15507 of `grub_split_cmdline'.
15509 * normal/command.c: Include <grub/parser.h>.
15510 (grub_command_execute): Use `grub_parser_split_cmdline' instead
15511 of `grub_split_cmdline'.
15513 * normal/completion.c: Include <grub/parser.h>.
15514 (cmdline_state): New variable.
15515 (iterate_dir): End the filename with a quote depending on the
15516 command line state.
15517 (get_state): new function.
15518 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
15519 split the arguments and determine the current argument. When the
15520 argument string is not quoted, escape all spaces.
15522 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
15524 * normal/sparc64/setjmp.S: New file.
15526 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
15528 * include/grub/sparc64/libgcc.h: New file.
15529 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
15530 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
15531 normal/sparc64/setjmp.c.
15533 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
15535 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
15536 * kern/sparc64/cache.S: New file.
15537 * kern/sparc64/cache.c: Removed.
15538 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
15539 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
15541 (COMMON_LDFLAGS): Add -melf64_sparc.
15542 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
15543 (grubof_SOURCES): Use cache.S instead of cache.c.
15544 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
15545 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
15546 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
15548 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
15549 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
15550 (linux_mod_CFLAGS): Commented out.
15551 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
15552 out because module isn't built.
15553 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
15554 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
15555 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
15556 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
15557 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
15558 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
15559 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
15560 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
15561 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
15562 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
15563 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
15564 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
15565 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
15566 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
15568 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
15570 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
15571 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
15572 longer, because HFS should not be used on PC.
15574 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
15576 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
15577 consistently within the loop.
15579 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
15581 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
15582 directory can not be read.
15584 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
15586 * configure.ac (AC_INIT): Increase the version number to 1.91.
15588 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
15589 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
15590 term/i386/pc/serial.c.
15592 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
15594 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
15595 file size must be permitted.
15597 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
15598 between %ah and %al.
15600 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
15602 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
15604 Call the hook with a NUL-terminated filename.
15605 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
15608 * kern/term.c (cursor_state): New variable.
15609 (grub_term_set_current): Reset the cursor state on a new
15611 (grub_setcursor): Rewritten to use CURSOR_STATE.
15612 (grub_getcursor): New function.
15614 * include/grub/term.h (grub_getcursor): New prototype.
15616 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
15617 integers on ARM. Reported by Timothy Baldwin
15618 <T.E.Baldwin99@members.leeds.ac.uk>.
15620 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
15622 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
15624 (grub_sfs_dir): Likewise.
15626 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
15628 Add support for the SFS filesystem.
15630 * fs/sfs.c: New file.
15632 * DISTLIST: Added `fs/sfs.c'.
15634 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
15635 (grub_probefs_SOURCES): Likewise.
15636 (grub_emu_SOURCES): Likewise.
15637 (pkgdata_MODULES): Add `sfs.mod'.
15638 (sfs_mod_SOURCES): New variable.
15639 (sfs_mod_CFLAGS): Likewise.
15640 (sfs_mod_LDFLAGS): Likewise.
15642 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
15643 (pkgdata_MODULES): Add `sfs.mod'.
15644 (sfs_mod_SOURCES): New variable.
15645 (sfs_mod_CFLAGS): Likewise.
15647 * util/grub-emu.c (main): Call `grub_sfs_init' and
15650 * include/grub/fs.h (grub_sfs_init): New prototype.
15651 (grub_sfs_fini): Likewise.
15653 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
15655 Add support for the AFFS filesystem.
15657 * fs/affs.c: New file.
15659 * DISTLIST: Added `fs/affs.c'.
15661 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
15662 (grub_probefs_SOURCES): Likewise.
15663 (grub_emu_SOURCES): Likewise.
15664 (pkgdata_MODULES): Add `affs.mod'.
15665 (affs_mod_SOURCES): New variable.
15666 (affs_mod_CFLAGS): Likewise.
15667 (affs_mod_LDFLAGS): Likewise.
15669 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
15670 (pkgdata_MODULES): Add `affs.mod'.
15671 (affs_mod_SOURCES): New variable.
15672 (affs_mod_CFLAGS): Likewise.
15674 * util/grub-emu.c (main): Call `grub_affs_init' and
15677 * include/grub/fs.h (grub_affs_init): New prototype.
15678 (grub_affs_fini): Likewise.
15680 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
15682 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
15684 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
15686 * configure.ac: Accept `x86_64' as host_cpu. In that case add
15689 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
15692 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
15693 (COMMON_LDFLAGS): New variable.
15694 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
15695 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
15696 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
15697 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
15698 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
15699 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
15700 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
15701 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
15702 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
15703 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
15704 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
15705 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
15706 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
15707 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
15708 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
15710 (normal_mod_ASFLAGS): Add `-m32'.
15712 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
15713 (grub_host_size_t, grub_host_ssize_t): New types.
15714 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
15715 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
15716 `GRUB_HOST_SIZEOF_VOID_P'.
15718 * include/grub/kernel.h (struct grub_module_header): Type of
15719 member offset changed to `grub_host_off_t'. Type of member size
15720 changed to `grub_host_size_t'.
15721 (struct grub_module_info): Type of member offset changed to
15722 `grub_host_off_t'. Type of member size changed to
15723 `grub_host_size_t'.
15725 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
15727 Make GRUB's kernel compliant to Multiboot Specification.
15729 * kern/i386/pc/startup.S (multiboot_header): New label.
15730 (multiboot_entry): Likewise.
15731 (multiboot_trampoline): Likewise.
15733 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15734 Increased to 0x4A0.
15736 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
15737 put parentheses after a question mark.
15738 [!GRUB_UTIL] (my_mod): New variable.
15740 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
15742 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
15744 Adds support for the XFS filesystem. Btrees are not supported
15747 * fs/xfs.c: New file.
15749 * DISTLIST: Added `fs/xfs.c'.
15751 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
15752 (grub_probefs_SOURCES): Likewise.
15753 (grub_emu_SOURCES): Likewise.
15754 (pkgdata_MODULES): Add `xfs.mod'.
15755 (xfs_mod_SOURCES): New variable.
15756 (xfs_mod_CFLAGS): Likewise.
15758 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
15759 (pkgdata_MODULES): Add `xfs.mod'.
15760 (xfs_mod_SOURCES): New variable.
15761 (xfs_mod_CFLAGS): Likewise.
15763 * util/grub-emu.c (main): Call `grub_xfs_init' and
15766 * include/grub/fs.h (grub_xfs_init): New prototype.
15767 (grub_xfs_fini): Likewise.
15770 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
15772 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
15773 color modes, allow greater than 16 colors to be configured as
15776 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
15778 * normal/completion.c (complete_arguments): Add the qualifier
15779 const into OPTIONS.
15781 From Omniflux <omniflux+lists@omniflux.com>:
15782 * include/grub/terminfo.h: New file.
15783 * include/grub/tparm.h: Likewise.
15784 * include/grub/i386/pc/serial.h: Likewise.
15785 * term/terminfo.c: Likewise.
15786 * term/tparm.c: Likewise.
15787 * term/i386/pc/serial.c: Likewise.
15788 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
15790 (terminfo_mod_SOURCES): New variable.
15791 (terminfo_mod_CFLAGS): Likewise.
15792 (serial_mod_SOURCES): Likewise.
15793 (serial_mod_CFLAGS): Likewise.
15795 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
15797 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
15798 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
15799 and kern/powerpc/ieee1275/cmain.c, respectively.
15801 * boot/powerpc/ieee1275/crt0.S: Moved to ...
15802 * kern/powerpc/ieee1275/crt0.S: ... here.
15804 * boot/powerpc/ieee1275/cmain.c: Moved to ...
15805 * kern/powerpc/ieee1275/cmain.c: ... here.
15807 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
15808 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
15809 instead of boot/powerpc/ieee1275/crt0.S and
15810 boot/powerpc/ieee1275/cmain.c, respectively.
15812 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
15813 sectors. It was not used anyway.
15815 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
15817 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
15818 `unused parameter' warning.
15820 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
15822 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
15824 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
15827 2005-08-28 Marco Gerards <metgerards@student.han.nl>
15829 * include/grub/normal.h (enum grub_completion_type): Added
15830 `GRUB_COMPLETION_TYPE_ARGUMENT'.
15832 * normal/cmdline.c (print_completion): Handle
15833 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
15834 * normal/menu_entry.c (store_completion): Likewise.
15836 * normal/completion.c (complete_arguments): New function.
15837 (grub_normal_do_completion): Call `complete_arguments' when the
15838 current words start with a dash.
15840 2005-08-27 Marco Gerards <metgerards@student.han.nl>
15842 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
15843 `gzio.mod' instead of `io.mod').
15845 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
15847 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
15848 (DISTDIRS): Added io and video.
15849 Rewrite the search routine to make an output consistently.
15851 * DISTLIST: Added conf/sparc64-ieee1275.mk,
15852 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
15853 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
15854 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
15855 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
15856 util/powerpc/ieee1275/misc.c.
15858 * include/grub/gzio.h: New file.
15859 * io/gzio.c: Likewise.
15861 * kern/file.c (grub_file_close): Call grub_device_close only if
15862 FILE->DEVICE is not NULL.
15864 * include/grub/mm.h [!NULL] (NULL): New macro.
15866 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
15868 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
15869 (pkgdata_MODULES): Added gzio.mod.
15870 (gzio_mod_SOURCES): New variable.
15871 (gzio_mod_CFLAGS): Likewise.
15873 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
15874 (pkgdata_MODULES): Added gzio.mod.
15875 (gzio_mod_SOURCES): New variable.
15876 (gzio_mod_CFLAGS): Likewise.
15878 * commands/cat.c: Include grub/gzio.h.
15879 (grub_cmd_cat): Use grub_gzfile_open instead of
15882 * commands/cmp.c: Include grub/gzio.h.
15883 (grub_cmd_cmp): Use grub_gzfile_open instead of
15886 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
15887 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
15889 (grub_rescue_cmd_module): Likewise.
15891 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15893 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
15894 kern/sparc64/ieee1275/init.c because it contains _start.
15895 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
15897 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
15899 * configure.ac: Add support for sparc64 host with ieee1275
15901 * configure: Generated from configure.ac.
15902 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
15904 (grub_ofdisk_read): Likewise.
15905 (grub_ofdisk_open): Use %p to print pointer values, and cast the
15906 pointers as (void *) to remove a warning.
15907 (grub_ofdisk_close): Likewise.
15908 (grub_ofdisk_read): Likewise.
15909 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
15910 returns, so make it return void to remove a warning.
15911 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
15912 Corresponding prototype change.
15913 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
15914 values, and cast the pointers as (void *) to remove a warning.
15915 (grub_mm_dump): Likewise.
15916 * conf/sparc64-ieee1275.mk: New file.
15917 * conf/sparc64-ieee1275.rmk: Likewise.
15918 * include/grub/sparc64/setjmp.h: Likewise.
15919 * include/grub/sparc64/types.h: Likewise.
15920 * include/grub/sparc64/ieee1275/console.h: Likewise.
15921 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
15922 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
15923 * include/grub/sparc64/ieee1275/time.h: Likewise.
15924 * kern/sparc64/cache.c: Likewise.
15925 * kern/sparc64/dl.c: Likewise.
15926 * kern/sparc64/ieee1275/init.c: Likewise.
15927 * kern/sparc64/ieee1275/openfw.c: Likewise.
15929 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15931 * util/console.c (grub_ncurses_putchar): If C is greater than
15932 0x7f, set C to a question mark.
15933 (grub_ncurses_getcharwidth): New function.
15934 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
15937 * normal/menu.c (print_entry): Made aware of Unicode. First,
15938 convert TITLE to UCS-4, and predict the cursor position by
15941 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
15943 * kern/misc.c (grub_utf16_to_utf8): Likewise.
15945 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15947 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
15948 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15951 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
15952 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15953 grub_strcpy and grub_strlen. Take it into account that a space
15954 character is inserted as a delimiter.
15956 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
15958 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
15959 invalid magic in the error.
15961 * commands/search.c: New file.
15963 * util/grub-emu.c (main): Call grub_search_init and
15966 * kern/rescue.c (grub_rescue_print_disks): Removed.
15967 (grub_rescue_print_devices): New function.
15968 (grub_rescue_cmd_ls): Use grub_device_iterate with
15969 grub_rescue_print_devices instead of grub_disk_dev_iterate with
15970 grub_rescue_print_disks.
15972 * kern/partition.c (grub_partition_iterate): Return the result of
15973 PARTMAP->ITERATE instead of GRUB_ERRNO.
15975 * kern/device.c: Include grub/partition.h.
15976 (grub_device_iterate): New function.
15978 * include/grub/partition.h (grub_partition_iterate): Return int
15979 instead of grub_err_t.
15981 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15983 [GRUB_UTIL] (grub_search_fini): Likewise.
15985 * include/grub/device.h (grub_device_iterate): New prototype.
15987 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15989 (pkgdata_MODULES): Added search.mod.
15990 (search_mod_SOURCES): New variable.
15991 (search_mod_CFLAGS): Likewise.
15993 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15994 (pkgdata_MODULES): Added search.mod.
15995 (search_mod_SOURCES): New variable.
15996 (search_mod_CFLAGS): Likewise.
15998 * commands/ls.c (grub_ls_list_disks): Renamed to ...
15999 (grub_ls_list_devices): ... this, and use grub_device_iterate.
16000 All callers changed.
16002 * DISTLIST: Added commands/search.c.
16004 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
16006 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
16008 (grub_getcharwidth): New function.
16010 * kern/misc.c (grub_utf8_to_ucs4): New function.
16012 * include/grub/term.h (struct grub_term): Added a new member
16014 (grub_getcharwidth): New prototype.
16016 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
16018 * term/i386/pc/console.c (map_char): New function. Segregated from
16019 grub_console_putchar.
16020 (grub_console_putchar): Use map_char.
16021 (grub_console_getcharwidth): New function.
16022 (grub_console_term): Specified grub_console_getcharwidth as
16025 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
16026 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
16028 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
16030 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
16031 on grub_strtoul completely.
16032 (write_char): Declare local variables in the beginning of the
16034 (grub_vesafb_getcharwidth): New function.
16035 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
16038 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
16040 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
16041 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
16042 commands/i386/pc/vbetest.c.
16044 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
16045 call grub_vbe_get_controller_info again, because the returned
16046 information is volatile.
16047 (grub_vbe_set_video_mode): Mostly rewritten.
16048 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
16049 grub_vbe_status_t correctly.
16050 (grub_vbe_get_video_mode_info): Likewise.
16051 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
16052 several if statements.
16054 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
16055 * commands/i386/pc/vbeinfo.c: ... this.
16057 * commands/i386/pc/vbe_test.c: Renamed to ...
16058 * commands/i386/pc/vbetest.c: ... this.
16060 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
16062 (grub_cmd_vbeinfo): ... this. Save video modes before
16063 iterating. Skip a video mode, if it is not available, not enough
16064 information is given or it is monochrome. Show the memory
16065 model. Leave the interpretation of MODEVAR to grub_strtoul
16067 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
16068 (GRUB_MOD_FINI): Likewise.
16070 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
16071 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
16072 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
16073 duplicated grub_env_get. Leave the interpretation of MODEVAR to
16074 grub_strtoul completely.
16075 (real2pm): Removed.
16076 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
16077 (GRUB_MOD_FINI): Likewise.
16079 * normal/misc.c: Include grub/mm.h.
16081 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
16082 vbe_list_modes with vbetest.mod and vbeinfo.mod.
16083 (vbe_list_modes_mod_SOURCES): Removed.
16084 (vbe_list_modes_mod_CFLAGS): Likewise.
16085 (vbe_test_mod_SOURCES): Likewise.
16086 (vbe_test_mod_CFLAGS): Likewise.
16087 (vbeinfo_mod_SOURCES): New variable.
16088 (vbeinfo_mod_CFLAGS): Likewise.
16089 (vbetest_mod_SOURCES): Likewise.
16090 (vbetest_mod_CFLAGS): Likewise.
16092 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
16094 * normal/misc.c: New file.
16096 * DISTLIST: Added normal/misc.c.
16098 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
16099 DISK to HOOK. Call HOOK with DISK.
16100 * partmap/apple.c (apple_partition_map_iterate): Likewise.
16101 * partmap/pc.c (pc_partition_map_iterate): Likewise.
16102 * partmap/sun.c (sun_partition_map_iterate): Likewise.
16104 * normal/menu_entry.c (struct screen): Added a new member
16105 "completion_shown".
16106 (completion_buffer): New global variable.
16107 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
16108 (store_completion): New function.
16109 (complete): Likewise.
16110 (clear_completions): Likewise.
16111 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
16112 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
16113 a tab, call complete.
16115 * normal/completion.c (disk_dev): Removed.
16116 (print_simple_completion): Likewise.
16117 (print_partition_completion): Likewise.
16118 (print_func): New global variable.
16119 (add_completion): Do not take the arguments WHAT or PRINT any
16120 longer. Added a new argument TYPE. Instead of printing directly,
16121 call PRINT_FUNC if not NULL.
16122 All callers changed.
16123 (complete_device): Use a local variable DEV instead of
16124 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
16125 (grub_normal_do_completion): Take a new argument HOOK. Do not
16126 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
16127 empty string, return NULL instead.
16128 All callers changed.
16130 * normal/cmdline.c (print_completion): New function.
16132 * kern/partition.c (grub_partition_iterate): Add an argument DISK
16134 All callers changed.
16136 * kern/disk.c (grub_print_partinfo): Removed.
16138 * include/grub/partition.h (struct grub_partition_map): Add a new
16139 argument DISK into HOOK of ITERATE.
16140 (grub_partition_iterate): Add a new argument DISK to HOOK.
16142 * include/grub/normal.h (enum grub_completion_type): New enum.
16143 (grub_completion_type_t): New type.
16144 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
16145 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
16146 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
16147 (GRUB_COMPLETION_TYPE_FILE): Likewise.
16148 (grub_normal_do_completion): Added a new argument HOOK.
16149 (grub_normal_print_device_info): New prototype.
16151 * include/grub/disk.h (grub_print_partinfo): Removed.
16153 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
16154 (normal_mod_SOURCES): Likewise.
16155 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16156 (normal_mod_SOURCES): Likewise.
16158 * commands/ls.c (grub_ls_list_disks): Use
16159 grub_normal_print_device_info instead of grub_print_partinfo. Free
16161 (grub_ls_list_files): Use grub_normal_print_device_info instead of
16162 duplicating the code.
16164 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
16166 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
16167 follow GCS more precisely.
16168 * commands/i386/pc/vbe_test.c: Likewise.
16169 * include/grub/i386/pc/vbe.h: Likewise.
16170 * term/i386/pc/vesafb.c: Likewise.
16171 * video/i386/pc/vbe.c: Likewise.
16173 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
16175 * DISTLIST: Added term/i386/pc/vesafb.c
16176 DISTLIST: Added video/i386/pc/vbe.c
16177 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
16178 DISTLIST: Added commands/i386/pc/vbe_test.c.
16179 * commands/i386/pc/vbe_list_modes.c: New file.
16180 * commands/i386/pc/vbe_test.c: Likewise.
16181 * term/i386/pc/vesafb.c: Likewise.
16182 * video/i386/pc/vbe.c: Likewise.
16183 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
16184 (grub_vbe_probe) Added prototype.
16185 (grub_vbe_set_video_mode) Likewise.
16186 (grub_vbe_get_video_mode) Likewise.
16187 (grub_vbe_get_video_mode_info) Likewise.
16188 (grub_vbe_set_pixel_rgb) Likewise.
16189 (grub_vbe_set_pixel_index) Likewise.
16190 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
16191 (pkgdata_MODULES): Added vesafb.mod.
16192 (pkgdata_MODULES): Added vbe_list_modes.mod.
16193 (pkgdata_MODULES): Added vbe_test.mod.
16194 (vbe_mod_SOURCES): Added.
16195 (vbe_mod_CFLAGS): Likewise.
16196 (vesafb_mod_SOURCES): Likewise.
16197 (vesafb_mod_CFLAGS): Likewise.
16198 (vbe_list_modes_mod_SOURCES): Likewise.
16199 (vbe_list_modes_mod_CFLAGS): Likewise.
16200 (vbe_test_mod_SOURCES): Likewise.
16201 (vbe_test_mod_CFLAGS): Likewise.
16203 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
16205 * normal/command.c (grub_command_execute): If INTERACTIVE is
16206 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
16207 CMDLINE. Disable the pager if INTERACTIVE is true.
16208 All callers are changed.
16210 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
16211 before reading a config file.
16212 * normal/main.c (read_config_file): Even if a command is not
16213 found, register it if it is within an entry.
16215 * util/grub-emu.c: Include sys/types.h and unistd.h.
16216 (options): Added --hold.
16217 (struct arguments): Added a new member "hold".
16218 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
16220 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
16221 cleared by a debugger, if it is not zero.
16223 * include/grub/normal.h (grub_command_execute): Add an argument
16226 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
16228 * DISTLIST: Added include/grub/i386/pc/vbe.h.
16230 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
16232 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
16233 program with another one, because the old one didn't detect a bug
16234 in gcc-3.4. Always use regparm 2, because the new test is still
16235 not enough for gcc-4.0. Someone must investigate a simple test
16236 case which detects a bug in gcc-4.0.
16238 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
16240 * DISTLIST: Added normal/completion.c.
16242 * normal/completion.c: New file.
16244 * term/i386/pc/console.c (grub_console_getwh): New function.
16245 (grub_console_term): Assign grub_console_getwh to getwh.
16247 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
16248 function is defined in normal/completion.c as
16249 grub_normal_do_completion.
16250 (grub_cmdline_get): Use grub_normal_do_completion instead of
16253 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
16254 returns non-zero, otherwise return 0.
16255 (grub_partition_iterate): First, probe the partition map. Then,
16256 call ITERATE only for this partition map.
16258 * kern/misc.c (grub_strncmp): Rewritten.
16260 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
16261 returns non-zero. Otherwise return 0.
16263 * include/grub/partition.h (grub_partition_map_iterate): Return
16264 int instead of void.
16266 * include/grub/normal.h (grub_normal_do_completion): New prototype.
16268 * include/grub/misc.h (grub_strncmp): Change the type of N to
16271 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
16274 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
16275 unsigned explicitly before comparing it with I.
16277 * kern/main.c (grub_env_write_root): Add the attribute unused into
16280 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16281 normal/completion.c.
16282 (normal_mod_SOURCES): Likewise.
16283 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
16284 (normal_mod_SOURCES): Likewise.
16286 * normal/command.c (grub_iterate_commands): If ITERATE returns
16287 non-zero, return one immediately.
16289 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
16291 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
16292 * kern/i386/pc/startup.S: Updated Global Descriptor table's
16294 (grub_vbe_get_controller_info): New function.
16295 (grub_vbe_get_mode_info): Likewise.
16296 (grub_vbe_set_mode): Likewise.
16297 (grub_vbe_get_mode): Likewise.
16298 (grub_vbe_set_memory_window): Likewise.
16299 (grub_vbe_get_memory_window): Likewise.
16300 (grub_vbe_set_scanline_length): Likewise.
16301 (grub_vbe_get_scanline_length): Likewise.
16302 (grub_vbe_set_display_start): Likewise.
16303 (grub_vbe_get_display_start): Likewise.
16304 (grub_vbe_set_palette_data): Likewise.
16305 * include/grub/i386/pc/vbe.h: New file.
16307 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
16309 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16310 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
16311 * DISTLIST: Likewise.
16312 * kern/ieee1275/of.c: Moved to ...
16313 * kern/ieee1275/ieee1275.c: ... here.
16315 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
16317 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
16318 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
16319 Pass 0 as `end' parameter to grub_strtoul().
16321 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
16323 * include/grub/powerpc/ieee1275/console.h: Do not include
16324 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
16326 (grub_console_cur_color): Remove i386-specific prototype.
16327 (grub_console_real_putchar): Likewise.
16328 (grub_console_checkkey): Likewise.
16329 (grub_console_getkey): Likewise.
16330 (grub_console_getxy): Likewise.
16331 (grub_console_gotoxy): Likewise.
16332 (grub_console_cls): Likewise.
16333 (grub_console_setcursor): Likewise.
16334 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
16335 Include <grub/machine/console.h>.
16336 * term/ieee1275/ofconsole.c: Likewise.
16338 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
16340 * Makefile.in (LIBLZO): New variable.
16342 * configure.ac: Check for LZO version 2.
16344 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
16345 lzo/lzo1x.h instead of lzo1x.h.
16347 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
16350 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
16351 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
16353 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
16354 copying the data from PARTITION to P.
16356 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
16358 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
16359 negative, unload the module.
16361 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
16362 map is "pc_partition_map" but not "pc".
16363 (usage): Fix the description. The options are --boot-image and
16364 --core-image but not --boot-file or --core-file.
16365 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
16366 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
16369 * util/i386/pc/grub-install.in: Do not specify --boot-file or
16370 --core-file. Specify INSTALL_DEVICE as an argument.
16372 * util/console.c: Include config.h.
16373 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
16374 [HAVE_NCURSES_H]: Include ncurses.h.
16375 [HAVE_CURSES_H]: Include curses.h.
16376 [!A_NORMAL] (A_NORMAL): Defined as zero.
16377 [!A_STANDOUT] (A_STANDOUT): Likewise.
16379 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
16381 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
16383 * configure.ac: Check for curses libraries and headers.
16385 * Makefile.in (LIBCURSES): New variable.
16387 * genmk.rb (Script::rule): Set the executable bits.
16389 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
16390 name of the PC partition map is "pc_partition_map" but not "pc".
16392 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
16394 * util/i386/pc/grub-install.in (grub_probefs): New variable.
16395 (modules): Likewise.
16396 (usage): Added descriptions for --modules and --grub-probefs.
16397 Handle --modules and --grub-probefs. Save the arguments in MODULES
16398 and GRUB_PROBEFS, respectively.
16399 Auto-detect a filesystem module against GRUBDIR. If the result is
16400 empty and modules are not specified explicitly, abort the
16401 installation. Add the result to MODULES.
16403 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
16404 disk/powerpc/ieee1275/ofdisk.c,
16405 include/grub/powerpc/ieee1275/init.h and
16406 term/powerpc/ieee1275/ofconsole.c.
16407 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
16408 term/ieee1275/ofconsole.c.
16410 * include/grub/powerpc/ieee1275/console.h: Resurrected.
16412 * COPYING: Upgraded to the latest version. Only the address of the
16413 FSF office has changed.
16415 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
16417 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
16418 kern/ieee1275.c with kern/ieee1275/of.c.
16420 * kern/ieee1275.c: Moved to ...
16421 * kern/ieee1275/of.c: ... here.
16423 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
16425 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
16428 * config.guess: Updated to the latest version from gnulib.
16429 * config.sub: Likewise.
16430 * install.sh: Likewise.
16431 * mkinstalldirs: Likewise.
16433 * include/grub/console.h: Removed. This file is arch-specific. Do
16434 not put this in include/grub.
16436 * include/grub/i386/pc/console.h: Resurrected.
16438 * util/console.c: Include grub/machine/console.h instead of
16440 * util/grub-emu.c: Likewise.
16442 2005-08-04 Marco Gerards <metgerards@student.han.nl>
16444 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
16447 From Vincent Pelletier <subdino2004@yahoo.fr>
16448 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
16449 Redefined to use grub_getwh.
16450 (grub_term): New member named getwh.
16451 (grub_getwh): New prototype.
16452 * kern/term.c (grub_getwh): New function.
16453 * term/i386/pc/console.c (grub_console_getwh): New function.
16454 (grub_console_term): New member `getwh'.
16455 * term/i386/pc/vga.c (grub_vga_getwh): New function.
16456 (grub_vga_term): New member `getwh'.
16457 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
16459 (grub_ofconsole_getw): New function.
16460 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
16461 (grub_ofconsole_term): New field named getwh and new initial
16464 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
16466 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
16467 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
16468 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
16469 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
16470 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
16471 of <grub/machine/ieee1275.h>.
16472 * commands/ieee1275/reboot.c: Likewise.
16473 * boot/powerpc/ieee1275/ieee1275.c: Move ...
16474 * kern/ieee1275.c: ... to here. All users updated. Change all
16475 parameter structs to use new type `grub_ieee1275_cell_t'.
16476 * term/powerpc/ieee1275/ofconsole.c: Move ...
16477 * term/ieee1275/ofconsole.c: ... to here. All users updated.
16478 * disk/powerpc/ieee1275/ofdisk.c: Move ...
16479 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
16480 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
16482 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
16483 Remove unused prototypes. All users updated.
16484 * include/grub/powerpc/ieee1275/console.h: Removed.
16485 * include/grub/powerpc/ieee1275/ieee1275.h: Define
16486 `grub_ieee1275_cell_t'.
16487 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
16488 Cast comparisons with -1 to the correct type.
16489 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
16490 type to match `grub_ieee1275_entry_fn'.
16492 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
16494 * DISTLIST: Added util/i386/pc/grub-probefs.c.
16496 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
16497 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
16499 (grub_probefs_SOURCES): New variable.
16501 * util/i386/pc/grub-probefs.c: New file.
16503 * util/i386/pc/grub-setup.c (main): Call
16504 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
16505 grub_hfs_init and grub_jfs_init to initialize the system. Call
16506 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
16507 grub_pc_partition_map_fini to finish the system.
16509 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
16511 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
16513 (grub_multiboot_load_elf32): Likewise.
16514 (grub_multiboot_is_elf64): Likewise.
16515 (grub_multiboot_load_elf64): Likewise.
16516 (grub_multiboot_load_elf): Likewise.
16517 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
16518 an ELF32 or ELF64 file.
16519 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
16521 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
16522 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
16523 NULL before calling FS->LABEL.
16524 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
16525 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
16526 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
16527 before calling FS->LABEL.
16529 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
16531 * util/i386/pc/grub-install.in (datadir): New variable.
16533 (pkgdatadir): New variable.
16534 (pkglibdir): Removed.
16536 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
16538 * DISTLIST: Added util/i386/pc/grub-install.in.
16540 * util/i386/pc/grub-install.in: New file.
16542 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
16543 (grub_install_SOURCES): Likewise.
16545 * genmk.rb: Added support for scripts.
16546 (Script): New class.
16547 (scripts): New variable.
16549 * Makefile.in (install-local): Install sbin_SCRIPTS by
16551 (uninstall): Remove sbin_SCRIPTS.
16553 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
16554 device, try to get a GRUB device by
16555 grub_util_biosdisk_get_grub_dev.
16558 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
16559 description for --device-map.
16561 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
16563 Change the semantics of variable hooks. They now return strings
16564 instead of error values.
16566 * util/i386/pc/grub-setup.c: Include grub/env.h.
16567 (setup): Use grub_device_set_root instead of grub_env_set.
16569 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
16570 grub_env_get instead of grub_device_set_root and
16571 grub_device_get_root, respectively.
16573 * kern/main.c (grub_env_write_root): New function.
16574 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
16575 grub_env_set instead of grub_device_set_root.
16577 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
16579 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
16580 rather than calling ENV->WRITE_HOOK afterwards.
16581 (grub_env_get): Return the result of ENV->READ_HOOK rather than
16582 passing a pointer of a pointer.
16583 (grub_register_variable_hook): Change the types of "read_hook" and
16584 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
16586 Allocate the default empty string on the heap, because this string
16587 may be freed later.
16589 * kern/device.c: Include grub/env.h.
16590 (grub_device_set_root): Removed.
16591 (grub_device_get_root): Likewise.
16592 (grub_device_open): Use grub_env_get instead of
16593 grub_device_get_root.
16595 * include/grub/env.h (grub_env_read_hook_t): New type.
16596 (grub_env_write_hook_t): Likewise.
16597 (grub_env_var): Change the types of "read_hook" and "write_hook"
16598 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
16599 (grub_register_variable_hook): Likewise.
16601 * include/grub/device.h (grub_device_set_root): Removed.
16602 (grub_device_set_root): Likewise.
16604 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
16605 make sure that DIRNAME terminates with '/', so that
16606 grub_fat_find_dir will fail if PATH is not a directory.
16608 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
16610 Use the qualifier auto for print_files and print_files_long.
16611 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
16613 Put a newline only if there is no error.
16614 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
16617 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
16619 * kern/partition.c (grub_partition_probe): Initialize PART to
16620 NULL. Otherwise, when no partition map is registered, this returns
16623 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
16625 * partmap/apple.c (apple_partition_map_iterate): Check if POS
16626 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
16629 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
16631 * commands/ls.c (grub_ls_list_disks): Print the filesystem
16632 information on each device, if it does not have partitions. Print
16633 "Device" instead of "Disk", because this function is not specific
16636 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
16637 static to ensure that it is put on the memory rather than a
16640 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
16642 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
16643 (grub_cat_init): Likewise.
16644 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
16645 (options): Likewise.
16646 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
16647 (grub_configfile_init): Likewise.
16648 * font/manager.c (GRUB_MOD_INIT): Likewise.
16649 * commands/help.c (GRUB_MOD_INIT): Likewise.
16650 (grub_help_init): Likewise.
16651 * normal/command.c (grub_command_init): Likewise.
16652 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
16653 * disk/loopback.c (grub_loop_init): Likewise.
16654 (GRUB_MOD_INIT): Likewise.
16655 * commands/ls.c (grub_ls_init): Likewise.
16656 (GRUB_MOD_INIT): Likewise.
16657 (options): Likewise.
16658 * commands/boot.c (grub_boot_init): Likewise.
16659 (GRUB_MOD_INIT): Likewise.
16660 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
16661 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
16662 (GRUB_MOD_INIT): Likewise.
16663 * commands/cmp.c (grub_cmp_init): Likewise.
16664 (GRUB_MOD_INIT): Likewise.
16666 * normal/arg.c: Use <> instead of "" to include header files.
16667 (SHORT_ARG_HELP): New macro.
16668 (SHORT_ARG_USAGE): Likewise.
16669 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
16670 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
16672 (find_short): Check if C is 'h' or 'u' explicitly.
16673 (grub_arg_show_help): Use space characters instead of tabs. Treat
16674 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
16675 are shown with --help and --usage only if they are not used for
16676 the command itself.
16677 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
16680 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
16681 const into "longarg". Change the type of "shortarg" to int.
16683 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
16685 * boot/i386/pc/boot.S (boot_drive_check): New label.
16687 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
16690 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
16691 which do not pass a boot drive correctly. Copied from GRUB Legacy.
16693 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
16695 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
16696 When turning off Gate A20, skip the check and return immediately,
16697 because this is not fatal usually.
16699 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
16701 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
16702 be 0x7C00 instead of 0x8000.
16704 * boot/i386/pc/pxeboot.S: Rewritten.
16706 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
16708 (gate_a20_check_state): Read a byte from 0x108000. Invert the
16711 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
16713 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
16714 robustness. This routine now supports a BIOS call and System
16715 Control Port A to modify the gate A20.
16717 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
16718 Increased to 0x440.
16720 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
16722 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
16723 device path and resulting ihandle.
16724 (grub_ofdisk_close): dprintf the ihandle being closed.
16725 (grub_ofdisk_read): dprintf function parameters.
16726 * kern/mm.c (grub_mm_init_region): Likewise.
16727 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
16728 (grub_linux_boot): dprintf the Linux entry point, initrd address and
16729 size, and boot arguments.
16730 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
16731 before loading into memory.
16732 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
16733 before loading into memory.
16735 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
16737 * kern/mm.c: Added much documentation.
16738 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
16739 8, set to 5 instead of 8.
16741 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
16743 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
16745 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
16746 (grub_mkdevicemap_SOURCES): New variable.
16748 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
16749 lib/device.c of GRUB Legacy.
16751 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
16753 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
16754 instead of PATH is NULL.
16756 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
16758 * commands/cmp.c (BUFFER_SIZE): New macro.
16759 (grub_cmd_cmp): Close the right file at the right time. Compare
16760 only data just read. Don't report files of different size as
16761 identical. Dynamically allocate buffers. Move variable
16762 declarations at the beginning of function.
16764 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
16766 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
16769 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
16771 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
16772 when backspace is pressed at beginning of line.
16774 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
16776 * DISTLIST: Added genfslist.sh.
16778 * normal/main.c (fs_module_list): New variable.
16779 (autoload_fs_module): New function.
16780 (read_fs_list): Likewise.
16781 (grub_normal_execute): Call read_fs_list.
16783 * kern/fs.c (grub_fs_autoload_hook): New variable.
16784 (grub_fs_probe): Added support for auto-loading.
16786 * include/grub/normal.h (struct grub_fs_module_list): New struct.
16787 (grub_fs_module_list_t): New type.
16789 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
16790 (grub_fs_autoload_hook): New prototype.
16792 * genfslist.sh: New file.
16794 * genmk.rb: Added a rule to generate a filesystem list.
16796 2005-06-30 Marco Gerards <metgerards@student.han.nl>
16798 * configure.ac: Fix the test for cross-compiling.
16800 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
16801 define GRUB_UTIL anymore.
16803 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
16804 so this function works on other systems than just big endian.
16805 (load_modules): Likewise.
16806 (add_segments): Likewise.
16808 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
16810 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
16811 contains `l' modifier, get a long from va_arg().
16813 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
16815 * kern/mm.c (grub_free): If the next free block which is being
16816 merged is the first free block, set the first block to the block
16818 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
16820 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
16822 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
16823 `grub_ieee1275_chosen'.
16825 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
16827 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
16828 (grub_ieee1275_chosen): New variable.
16829 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
16831 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
16832 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16833 Rename first argument to `phandle' for consistency.
16834 (grub_ieee1275_get_property_length): Likewise.
16835 (grub_ieee1275_next_property): Likewise. Change type of first argument
16836 to grub_ieee1275_phandle_t.
16837 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
16838 Move export next to declaration.
16839 (grub_ieee1275_chosen): New variable.
16840 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
16841 Correct cosmetic typo.
16842 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
16843 `grub_ieee1275_chosen'.
16844 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
16845 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
16846 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
16847 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
16848 `grub_ieee1275_chosen'.
16850 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
16852 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
16854 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
16855 /chosen/bootargs as "variable=value" pairs.
16857 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
16859 * include/grub/misc.h (grub_dprintf): New macro.
16860 (grub_real_dprintf): New prototype.
16861 (grub_strword): Likewise.
16862 (grub_iswordseparator): Likewise.
16863 * kern/misc.c (grub_real_dprintf): New function.
16864 (grub_strword): Likewise.
16865 (grub_iswordseparator): Likewise.
16867 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
16869 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
16870 (roundup): Remove macro.
16871 (grub_ieee1275_flags): Make static.
16872 (grub_ieee1275_realmode): Remove.
16873 (grub_ieee1275_test_flag): New function.
16874 (grub_ieee1275_set_flag): Likewise.
16875 (find_options): Rename to `grub_ieee1275_find_options'; update
16876 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
16877 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
16878 (cmain): New prototype.
16879 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
16880 `grub_ieee1275_flags' directly.
16881 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
16882 machine/biosdisk.h.
16883 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
16884 Don't include grub/machine/init.h.
16885 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
16886 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16888 (grub_ieee1275_realmode): Likewise.
16889 (grub_ieee1275_flag): New enum.
16890 (grub_ieee1275_test_flag): New prototype.
16891 (grub_ieee1275_set_flag): New prototype.
16892 * include/grub/powerpc/ieee1275/init.h: Remove file.
16893 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
16894 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
16895 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
16896 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
16898 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
16899 `grub_ieee1275_test_flag'.
16900 (grub_ieee1275_encode_devname): Likewise.
16902 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
16904 * include/grub/powerpc/ieee1275/ieee1275.h
16905 (grub_ieee1275_encode_devname): New prototype.
16906 (grub_ieee1275_get_filename): Likewise.
16907 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
16909 (grub_set_prefix): Likewise.
16910 (grub_machine_init): Call grub_set_prefix.
16911 * kern/powerpc/ieee1275/openfw.c: Fix typos.
16912 (grub_parse_type): New enum.
16913 (grub_ieee1275_get_devargs): New function.
16914 (grub_ieee1275_get_devname): Likewise.
16915 (grub_ieee1275_parse_args): Likewise.
16916 (grub_ieee1275_get_filename): Likewise.
16917 (grub_ieee1275_encode_devname): Likewise.
16919 2005-03-30 Marco Gerards <metgerards@student.han.nl>
16921 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
16922 `grub_loader_unset'.
16924 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
16926 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
16927 instead of grub_ieee1275_interpret.
16928 (grub_halt_init): New function.
16929 (grub_halt_fini): Likewise.
16930 (GRUB_MOD_INIT): Correct message grammar.
16931 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
16932 instead of grub_ieee1275_interpret.
16933 (grub_reboot_init): New function.
16934 (grub_reboot_fini): Likewise.
16935 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
16936 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
16937 util/i386/pc/misc.c with commands/ieee1275/halt.c,
16938 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
16939 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
16941 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
16943 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
16945 (grub_halt): Likewise.
16946 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
16947 (cmain): Remove __attribute__((unused)).
16948 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
16949 (grub_heap_len): Likewise.
16950 (grub_machine_fini): New function.
16951 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
16952 (grub_halt): Likewise.
16953 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
16955 * util/powerpc/ieee1275/misc.c: New file.
16957 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
16959 * DISTLIST: New file.
16960 * gendistlist.sh: Likewise.
16962 * Makefile.in (COMMON_DISTFILES): Removed.
16963 (BOOT_DISTFILES): Likewise.
16964 (CONF_DISTFILES): Likewise.
16965 (DISK_DISTFILES): Likewise.
16966 (FS_DISTFILES): Likewise.
16967 (INCLUDE_DISTFILES): Likewise.
16968 (KERN_DISTFILES): Likewise.
16969 (LOADER_DISTFILES): Likewise.
16970 (TERM_DISTFILES): Likewise.
16971 (UTIL_DISTFILES): Likewise.
16972 (DISTFILES): Likewise.
16973 (uninstall): Uninstall files in $(pkgdata_DATA).
16974 (DISTLIST): New target.
16975 (distdir): Use the contents of the file DISTLIST to get a list of
16978 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
16980 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16981 descriptor. This is ported from GRUB Legacy.
16983 * gencmdlist.sh: Added an extra semicolon to make it work with
16984 old sed versions. Reported by Robert Bihlmeyer
16985 <robbe@orcus.priv.at>.
16987 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
16989 Automatic loading of commands is supported.
16991 * normal/main.c (read_command_list): New function.
16992 (grub_normal_execute): Call read_command_list.
16994 * normal/command.c (grub_register_command): Return zero or CMD.
16995 Allocate CMD->NAME from the heap.
16996 Initialize CMD->MODULE_NAME to zero.
16997 Find the same name as well. If the same command is found and it is
16998 a dummy command, overwrite members. If it is not a dummy command,
17000 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
17001 (grub_command_find): If a dummy command is found, load a module
17002 and retry to find a command only once.
17004 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
17005 make sure that each command is loaded.
17007 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
17009 (struct grub_command): Remove const from the member `name'.
17010 Add a new member `module_name'.
17011 (grub_register_command): Return grub_command_t.
17013 * commands/help.c (grub_cmd_help): Call grub_command_find to make
17014 sure that each command is loaded.
17016 * genmk.rb (PModule::rule): Specify a module name without the
17017 suffix ".mod" to gencmdlist.sh.
17019 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
17021 * gencmdlist.sh: New file.
17023 * genmk.rb (PModule::rule): Generate a rule for a command list.
17025 Generate command.lst from $(COMMANDFILES).
17027 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
17028 (DATA): Added $(pkgdata_DATA).
17029 (install-local): Install files in $(pkgdata_DATA).
17031 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
17033 * term/i386/pc/vga.c (debug_command): Removed.
17034 (GRUB_MOD_INIT): Do not register the command "debug".
17036 From Hollis Blanchard:
17037 * commands/configfile.c: New file.
17038 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17039 commands/configfile.c.
17040 (pkgdata_MODULES): Added configfile.mod.
17041 (configfile_mod_SOURCES): New variable.
17042 (configfile_mod_CFLAGS): Likewise.
17043 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
17044 commands/configfile.c.
17045 (pkgdata_MODULES): Added configfile.mod.
17046 (configfile_mod_SOURCES): New variable.
17047 (configfile_mod_CFLAGS): Likewise.
17048 * util/grub-emu.c (main): Call grub_configfile_init and
17049 grub_configfile_fini.
17050 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
17052 [GRUB_UTIL] (grub_configfile_fini): Likewise.
17054 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
17056 * normal/arg.c (grub_arg_show_help): Do not show the bug report
17059 * commands/help.c (grub_cmd_help): Do not print newlines after
17060 the last command in print_command_help.
17062 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
17064 * commands/default.h: New file.
17065 * commands/timeout.h: Likewise.
17066 * normal/context.c: Likewise.
17068 * util/misc.c: Do not include sys/times.h.
17069 Include sys/time.h and grub/machine/time.h.
17070 (grub_get_rtc): Rewritten with gettimeofday.
17072 * util/grub-emu.c (main): Call grub_default_init and
17073 grub_timeout_init before grub_normal_init, and call
17074 grub_timeout_fini and grub_default_fini after grub_main.
17076 * util/console.c (grub_ncurses_checkkey): Return the read
17079 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
17082 * normal/main.c (read_config_file): Push MENU. If this fails,
17083 print an error and wait for a user input.
17084 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
17085 If a menu is empty or an error occurs, pop MENU.
17086 (grub_normal_execute): Pop and free MENU after grub_menu_run
17089 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
17091 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
17093 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17095 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
17097 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
17100 * include/grub/normal.h (struct grub_menu_list): New struct.
17101 (grub_menu_list_t): New type.
17102 (struct grub_context): New struct.
17103 (grub_context_t): New type.
17104 (grub_register_command): Got rid of EXPORT_FUNC.
17105 (grub_unregister_command): Likewise.
17106 (grub_context_get): New prototype.
17107 (grub_context_get_current_menu): Likewise.
17108 (grub_context_push_menu): Likewise.
17109 (grub_context_pop_menu): Likewise.
17110 [GRUB_UTIL] (grub_default_init): Likewise.
17111 [GRUB_UTIL] (grub_default_fini): Likewise.
17112 [GRUB_UTIL] (grub_timeout_init): Likewise.
17113 [GRUB_UTIL] (grub_timeout_fini): Likewise.
17115 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
17116 commands/timeout.c and normal/context.c.
17117 (pkgdata_MODULES): Added default.mod and timeout.mod.
17118 (normal_mod_SOURCES): Added normal/context.c.
17119 (default_mod_SOURCES): New variable.
17120 (default_mod_CFLAGS): Likewise.
17121 (timeout_mod_SOURCES): Likewise.
17122 (timeout_mod_CFLAGS): Likewise.
17123 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
17125 (pkgdata_MODULES): Added default.mod and timeout.mod.
17126 (normal_mod_SOURCES): Added normal/context.c.
17127 (default_mod_SOURCES): New variable.
17128 (default_mod_CFLAGS): Likewise.
17129 (timeout_mod_SOURCES): Likewise.
17130 (timeout_mod_CFLAGS): Likewise.
17132 * Makefile.in (all-local): Added $(MKFILES).
17134 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
17136 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
17137 (grub_emu_SOURCES): Likewise.
17138 (pkgdata_MODULES): Add `sun.mod'.
17139 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17140 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17142 (pkgdata_MODULES): Add `sun.mod'.
17143 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
17144 * include/grub/partition.h (grub_sun_partition_map_init): New
17146 (grub_sun_partition_map_fini): Likewise.
17147 * partmap/sun.c: New file.
17148 * util/grub-emu.c (main): Initialize and de-initialize the sun
17149 partitionmap support.
17151 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
17153 This implements an Emacs-like menu entry editor.
17155 * normal/menu_entry.c: New file.
17157 * util/console.c (grub_ncurses_putchar): Translate some Unicode
17158 characters to ASCII.
17159 (saved_char): New variable.
17160 (grub_ncurses_checkkey): Rewritten completely.
17161 (grub_ncurses_getkey): Likewise.
17162 (grub_ncurses_init): Call raw instead of cbreak.
17164 * normal/menu.c (print_entry): Do not put a space.
17165 (init_page): Renamed to ...
17166 (grub_menu_init_page): ... this. All callers changed.
17167 (edit_menu_entry): Removed.
17168 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
17170 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
17172 * kern/misc.c (grub_vprintf): Call grub_refresh.
17174 * normal/menu.c (DISP_LEFT): Renamed to ...
17175 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
17176 * normal/menu.c (DISP_UP): Renamed to ...
17177 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
17178 * normal/menu.c (DISP_RIGHT): Renamed to ...
17179 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
17180 * normal/menu.c (DISP_DOWN): Renamed to ...
17181 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
17182 * normal/menu.c (DISP_HLINE): Renamed to ...
17183 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
17184 * normal/menu.c (DISP_VLINE): Renamed to ...
17185 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
17186 * normal/menu.c (DISP_UL): Renamed to ...
17187 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
17188 * normal/menu.c (DISP_UR): Renamed to ...
17189 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
17190 * normal/menu.c (DISP_LL): Renamed to ...
17191 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
17192 * normal/menu.c (DISP_LR): Renamed to ...
17193 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
17194 * normal/menu.c (TERM_WIDTH): Renamed to ...
17195 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
17196 * normal/menu.c (TERM_HEIGHT): Renamed to ...
17197 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
17198 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
17199 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
17200 * normal/menu.c (TERM_MARGIN): Renamed to ...
17201 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
17202 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
17203 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
17204 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
17205 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
17206 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
17207 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
17208 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
17209 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
17210 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
17211 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
17212 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
17213 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
17214 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
17215 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
17216 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
17217 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
17218 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
17219 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
17220 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
17221 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
17222 All callers changed.
17224 * include/grub/normal.h: New prototype.
17226 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17227 normal/menu_entry.c.
17228 (normal_mod_SOURCES): Likewise.
17229 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
17230 (normal_mod_SOURCES): Likewise.
17232 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
17234 * include/grub/normal.h (grub_halt_init): New prototype.
17235 (grub_halt_fini): Likewise.
17236 (grub_reboot_init): Likewise.
17237 (grub_reboot_fini): Likewise.
17239 * util/grub-emu.c: Include signal.h.
17240 (main_env): New global variable.
17241 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
17243 (grub_machine_fini): New function.
17244 (main): Call grub_halt_init and grub_reboot_init before
17245 grub_main, and grub_reboot_fini and grub_halt_fini after it.
17246 Call setjmp with MAIN_ENV to go back afterwards.
17247 Call grub_machine_fini right before return.
17249 * include/grub/util/misc.h: Include setjmp.h.
17250 (main_env): New prototype.
17252 * include/grub/kernel.h (grub_machine_fini): New prototype.
17253 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
17254 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
17256 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
17257 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
17258 * term/i386/pc/console.c (grub_console_fini): Likewise.
17260 * util/i386/pc/misc.c: New file.
17262 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
17263 util/i386/pc/misc.c, commands/i386/pc/halt.c and
17264 commands/i386/pc/reboot.c.
17266 2005-02-14 Guillem Jover <guillem@hadrons.org>
17268 * include/grub/dl.h (grub_dl_check_header): New prototype.
17269 (grub_arch_dl_check_header): Change return type to grub_err_t,
17270 remove size parameter and export function. Update all callers.
17271 * kern/dl.c (grub_dl_check_header): New function.
17272 (grub_dl_load_core): Use `grub_dl_check_header' instead of
17273 `grub_arch_dl_check_header'. Check ELF type. Check if sections
17274 are inside the core.
17275 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
17276 independent ELF header checks.
17277 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
17278 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
17279 `grub_dl_check_header' instead of explicit checks. Check for the
17281 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
17282 `grub_dl_check_header' instead of explicit checks. Remove arch
17283 specific ELF header checks.
17285 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
17288 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
17290 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
17291 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
17293 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
17295 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
17296 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
17297 (part_map_iterate): Clear `grub_errno' and return 0 if
17298 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
17299 * partmap/amiga.c (amiga_partition_map_iterate): Return
17300 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
17301 * partmap/apple.c (apple_partition_map_iterate): Likewise.
17303 2005-02-01 Guillem Jover <guillem@hadrons.org>
17305 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
17308 2005-01-31 Marco Gerards <metgerards@student.han.nl>
17310 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
17312 (grub_rescue_cmd_linux): New prototype.
17313 (grub_rescue_cmd_initrd): Likewise.
17314 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
17316 (grub_linux_release_mem): Release the memory for the initrd.
17317 (grub_load_linux): Renamed from this...
17318 (grub_rescue_cmd_linux): ...To this. Changed all callers.
17319 Changed `entry' not to be static. Loop over memory regions to
17320 find another one when the default fails.
17321 (grub_rescue_cmd_initrd): New function.
17322 (grub_linux_init): Remove function.
17323 (grub_linux_fini): Likewise.
17324 (GRUB_MOD_INIT): Register `initrd'.
17325 (GRUB_MOD_FINI): Unregister `initrd'.
17326 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
17328 (grub_linux_normal_fini): Likewise.
17329 (GRUB_MOD_INIT): Register `initrd'.
17330 (GRUB_MOD_FINI): Unregister `initrd'.
17332 2005-01-31 Marco Gerards <metgerards@student.han.nl>
17334 * commands/help.c: New file.
17335 * normal/arg.c (show_help): Renamed to...
17336 (grub_arg_show_help): ... this.
17337 * commands/i386/pc/halt.c: New file.
17338 * commands/i386/pc/reboot.c: Likewise.
17339 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
17340 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
17341 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
17342 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
17344 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17346 (pkgdata_MODULES): Add `help.mod'.
17347 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
17348 * grub/i386/pc/init.h (grub_reboot): New prototype.
17349 (grub_halt): Likewise.
17350 * include/grub/normal.h (grub_arg_show_help): New prototype.
17351 (grub_help_init): Likewise.
17352 (grub_help_fini): Likewise.
17353 * util/grub-emu.c (main): Initialize and deinitialize the help
17356 * normal/cmdline.c (grub_cmdline_get): Doc fix.
17358 * normal/command.c (grub_command_init): Fixed the description of
17359 the `set' and `unset' commands.
17361 2005-01-31 Marco Gerards <metgerards@student.han.nl>
17363 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
17365 * commands/ieee1275/halt.c: New file.
17366 * commands/ieee1275/reboot.c: Likewise.
17367 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
17368 `__attribute__ ((unused))'. Some GCS related fixed.
17369 (grub_suspend_init) [GRUB_UTIL]: Function removed.
17370 (grub_suspend_fini): Likewise.
17371 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
17373 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
17374 (halt_mod_CFLAGS): New variables.
17375 * include/grub/powerpc/ieee1275/ieee1275.h
17376 (grub_ieee1275_interpret): New prototype.
17378 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
17380 * include/grub/misc.h (memmove): New prototype.
17381 (memcpy): Likewise.
17383 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
17385 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
17386 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
17388 2005-01-22 Marco Gerards <metgerards@student.han.nl>
17390 * kern/misc.c (grub_strndup): Function rewritten.
17392 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
17394 * normal/menu.c (TERM_WIDTH): Macro redefined.
17395 (TERM_TOP_BORDER_Y): Likewise.
17396 (draw_border): Replaced while-loop by a for-loop. Make the number
17397 of lines consistent with the number of lines displayed in
17398 print_entries. Added a margin below the rectangle.
17399 (print_entry): Make the entry fit in the rectangle.
17400 (print_entries): Display the scroll arrows next to the right
17403 2005-01-21 Marco Gerards <metgerards@student.han.nl>
17405 * fs/minix.c (grub_minix_find_file): Reserve more space for
17406 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
17407 `grub_strncpy' to copy `path' into it.
17409 2005-01-21 Marco Gerards <metgerards@student.han.nl>
17411 Add the loopback device, a device via which files can be accessed
17414 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
17415 (pkgdata_MODULES): Add loopback.mod.
17416 (loopback_mod_SOURCES): New variable.
17417 (loopback_mod_CFLAGS): Likewise.
17418 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
17420 (pkgdata_MODULES): Add loopback.mod.
17421 (loopback_mod_SOURCES): New variable.
17422 (loopback_mod_CFLAGS): Likewise.
17423 * disk/loopback.c: new file.
17424 * include/grub/normal.h (grub_loop_init): New prototype.
17425 (grub_loop_fini): New prototype.
17426 * util/grub-emu.c (main): Initialize and de-initialize loopback
17428 * include/grub/disk.h (grub_disk_dev_id): Add
17429 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
17431 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
17433 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
17435 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
17436 (suspend_mod_SOURCES): New variable.
17437 (suspend_mod_CFLAGS): Likewise.
17438 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
17440 * commands/ieee1275/suspend.c: New file.
17442 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
17444 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
17445 ((unused))' to `__attribute__ ((used))'.
17446 (GRUB_MOD_FINI): Likewise.
17447 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
17448 * genmk.rb (PModule): Assign space to common symbols when linking
17451 2005-01-20 Marco Gerards <metgerards@student.han.nl>
17453 * include/grub/mm.h (grub_mm_init_region): Change the type of the
17454 `unsigned' arguments to `grub_size_t'.
17455 (grub_malloc): Likewise.
17456 (grub_realloc): Likewise.
17457 (grub_memalign): Likewise.
17458 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
17459 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
17460 * util/misc.c (grub_malloc): Likewise.
17461 (grub_realloc): Likewise.
17462 * kern/mm.c (get_header_from_pointer): Change the casts to
17463 `unsigned' into a cast to `grub_size_t'.
17465 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
17466 point to `currnode' when `currnode' is changed.
17468 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
17469 Schottelius <nico-linux@schottelius.org>.
17471 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
17473 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
17474 (note_path): Remove variable.
17475 (GRUB_IEEE1275_NOTE_NAME): New macro.
17476 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
17477 (grub_ieee1275_note_hdr): New structure.
17478 (grub_ieee1275_note_desc): Likewise.
17479 (grub_ieee1275_note): Likewise.
17480 (load_note): Remove `dir' argument. All callers updated. Remove
17481 `note_img' and `path'. Do not load a file from `note_path'.
17482 Initialize a struct grub_ieee1275_note and write that to `out'.
17483 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
17485 2005-01-05 Marco Gerards <metgerards@student.han.nl>
17487 * util/misc.c (grub_util_read_image): Revert last change. It
17488 called `grub_util_read_at', which seeks from the beginning of the
17491 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
17493 * TODO: Add note about endianness in grub-mkimage.
17494 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
17496 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
17497 (grub_mkimage_SOURCES): New target.
17498 * include/grub/kernel.h (grub_start_addr): Remove variable.
17499 (grub_end_addr): Likewise.
17500 (grub_total_module_size): Likewise.
17501 (grub_kernel_image_size): Likewise.
17502 (GRUB_MODULE_MAGIC): New constant.
17503 (grub_module_info): New structure.
17504 (grub_arch_modules_addr): New prototype.
17505 (grub_get_end_addr): Remove prototype.
17506 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
17507 * include/grub/powerpc/ieee1275/kernel.h: New file.
17508 * include/grub/util/misc.h (grub_util_get_fp_size): New
17510 (grub_util_read_at): Likewise.
17511 (grub_util_write_image_at): Likewise.
17512 * kern/main.c (grub_get_end_addr): Remove function.
17513 (grub_load_modules): Call grub_arch_modules_addr instead of using
17514 grub_end_addr. Look for a grub_module_info struct in memory. Use
17515 the grub_module_info fields instead of calling grub_get_end_addr
17516 as loop conditions. Move grub_add_unused_region code here.
17517 (grub_add_unused_region): Remove function.
17518 * kern/i386/pc/init.c: Include grub/cache.h.
17519 (grub_machine_init): Remove call to grub_get_end_addr. Remove
17520 one call to add_mem_region.
17521 (grub_arch_modules_addr): New function.
17522 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
17523 (grub_total_module_size): Likewise.
17524 Include grub/machine/kernel.h.
17525 (grub_arch_modules_addr): New function.
17526 * util/grub-emu.c (grub_end_addr): Remove variable.
17527 (grub_total_module_size): Likewise.
17528 (grub_arch_modules_addr): New function.
17529 * util/misc.c: Include unistd.h.
17530 (grub_util_get_fp_size): New function.
17531 (grub_util_read_at): Likewise.
17532 (grub_util_write_image_at): Likewise.
17533 (grub_util_read_image): Call grub_util_read_at.
17534 (grub_util_write_image): Call grub_util_write_image_at.
17535 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
17536 additional memory in kernel_img for a struct grub_module_info.
17537 Fill in that grub_module_info.
17538 * util/powerpc/ieee1275/grub-mkimage.c: New file.
17540 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
17542 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
17544 * include/grub/powerpc/ieee1275/ieee1275.h
17545 (grub_ieee1275_milliseconds): New prototype.
17546 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
17548 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
17549 grub_ieee1275_milliseconds.
17551 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
17553 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
17555 (find_options): New function.
17556 (cmain): Call find_options.
17557 * include/grub/powerpc/ieee1275/ieee1275.h
17558 (grub_ieee1275_realmode): New extern variable.
17559 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
17560 grub_map if grub_ieee1275_realmode is false.
17562 2004-12-29 Marco Gerards <metgerards@student.han.nl>
17564 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
17565 lines are inserted and make it work like readline. Reported by
17566 Vincent Pelletier <subdino2004@yahoo.fr>.
17568 2004-12-28 Marco Gerards <metgerards@student.han.nl>
17570 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
17572 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
17573 `kern/powerpc/cache.S'.
17575 2004-12-27 Marco Gerards <metgerards@student.han.nl>
17577 * genmk.rb: Handle the `Program' class in the main loop. Written
17578 by Johan Rydberg <jrydberg@gnu.org>.
17579 (Program): New class.
17580 (programs): New variable.
17581 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
17582 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
17583 instead of "grub/kernel.h". Include <grub/machine/init.h>.
17584 (help_arch): Function removed.
17585 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
17586 `powerpc/libgcc.h' and `loader.h'.
17587 (pkgdata_PROGRAMS): New variable.
17588 (sbin_UTILITIES): Variable removed.
17589 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
17590 (grubof_SOURCES): Variable re-defined so it only includes the
17591 core functionality.
17592 (grubof_CFLAGS): Remove `-DGRUBOF'.
17593 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
17594 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
17595 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
17596 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
17597 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
17598 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
17599 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
17600 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
17601 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
17602 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
17603 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
17604 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
17605 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
17606 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
17607 (pc_mod_CFLAGS): New variables.
17608 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
17609 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
17610 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
17611 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
17613 * include/grub/i386/pc/init.h (grub_os_area_addr)
17614 (rub_os_area_size): ... to here.
17615 * include/grub/powerpc/ieee1275/ieee1275.h
17616 (grub_ieee1275_entry_fn): Export symbol.
17617 * include/grub/powerpc/ieee1275/init.h: New file.
17618 * include/grub/powerpc/libgcc.h: Likewise.
17619 * include/grub/cache.h: Likewise.
17620 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
17621 <hollis@penguinppc.org>.
17622 * kern/dl.c: Include <grub/cache.h>.
17623 (grub_dl_flush_cache): New function.
17624 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
17626 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
17627 (grub_console_init): Removed prototypes.
17628 (grub_machine_init): Don't initialize the modules anymore.
17629 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
17631 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
17632 Macro undef removed.
17633 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
17634 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
17635 relocation `R_PPC_REL32'. Return an error when the relocation is
17637 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
17638 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
17639 * util/misc.c (grub_arch_sync_caches): Likewise.
17641 2004-12-19 Marco Gerards <metgerards@student.han.nl>
17643 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
17644 `symlist.c', add `grubof_symlist.c'.
17645 (symlist.c): Variable removed.
17646 (grubof_HEADERS): Variable added.
17647 (grubof_symlist.c): New target.
17648 (kernel_syms.lst): Use `grubof_HEADERS' instead of
17649 `kernel_img_HEADERS'.
17650 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
17651 * kern/powerpc/dl.c: New file.
17652 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
17654 (grub_arch_dl_relocate_symbols): Likewise.
17655 (grub_register_exported_symbols): Likewise.
17657 2004-12-13 Marco Gerards <metgerards@student.han.nl>
17659 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
17660 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
17661 to fail instead. Reported by Vincent Pelletier
17662 <subdino2004@yahoo.fr>.
17664 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
17665 it is not allocated. Reported by Vincent Pelletier
17666 <subdino2004@yahoo.fr>.
17668 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
17669 output so the output looks better.
17671 2004-12-04 Marco Gerards <metgerards@student.han.nl>
17673 Modulize the partition map support and add support for the amiga
17676 * commands/ls.c: Include <grub/partition.h> instead of
17677 <grub/machine/partition.h>.
17678 * kern/disk.c: Likewise.
17679 * kern/rescue.c: Likewise.
17680 * loader/i386/pc/chainloader.c: Likewise.
17681 * normal/cmdline.c: Likewise.
17682 * kern/powerpc/ieee1275/init.c: Likewise.
17683 (grub_machine_init): Call `grub_pc_partition_map_init',
17684 `grub_amiga_partition_map_init' and
17685 `grub_apple_partition_map_init'.
17686 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
17687 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
17688 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
17689 `partition.h' and `pc_partition.h'.
17690 (grub_setup_SOURCES): Remove
17691 `disk/i386/pc/partition.c'. Add `kern/partition.c',
17692 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
17693 (grub_emu_SOURCES): Likewise.
17694 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
17695 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
17696 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
17697 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
17698 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
17699 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
17700 (grubof_SOURCES): Likewise.
17701 * disk/i386/pc/partition.c: File removed.
17702 * disk/powerpc/ieee1275/partition.c: Likewise.
17703 * include/grub/powerpc/ieee1275/partition.h: Likewise.
17704 * include/grub/i386/pc/partition.h: Likewise.
17705 * kern/partition.c: New file.
17706 * partmap/amiga.c: Likewise.
17707 * partmap/apple.c: Likewise.
17708 * partmap/pc.c: Likewise.
17709 * include/grub/partition.h: Likewise..
17710 * include/grub/pc_partition.h: Likewise.
17711 * util/grub-emu.c: Include <grub/partition.h> instead of
17712 <grub/machine/partition.h>.
17713 (main): Call `grub_pc_partition_map_init',
17714 `grub_amiga_partition_map_init' and
17715 `grub_apple_partition_map_init' and deinitialize afterwards.
17716 * util/i386/pc/biosdisk.c: Include `#include
17717 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
17718 `<grub/machine/partition.h>'.
17719 * util/i386/pc/grub-setup.c: Likewise.
17720 * util/i386/pc/biosdisk.c: Likewise.
17721 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
17722 partition information in case of a PC partition.
17723 * util/i386/pc/grub-setup.c: Include `#include
17724 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
17725 `<grub/machine/partition.h>'.
17726 (setup): Only access the PC specific partition information in case
17729 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
17731 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
17732 (grub_longjmp): Likewise.
17733 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
17735 * normal/powerpc/setjmp.S: New file.
17736 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17737 `normal/powerpc/setjmp.S'.
17738 (grubof_CFLAGS): Add `-DGRUBOF'.
17739 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
17740 [GRUB_UTIL && !GRUBOF].
17742 2004-11-16 Marco Gerards <metgerards@student.han.nl>
17744 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
17745 property named `name'. Correctly handle the error returned by
17746 `grub_ieee1275_finddevice' if a device can not be opened.
17748 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
17750 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
17751 `actual' for negativity.
17752 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
17755 2004-11-01 Marco Gerards <metgerards@student.han.nl>
17757 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
17758 (PAGE_OFFSET): New macro.
17759 (CRTC_ADDR_PORT): Likewise.
17760 (CRTC_DATA_PORT): Likewise.
17761 (START_ADDR_HIGH_REGISTER): Likewise.
17762 (START_ADDR_LOW_REGISTER): Likewise.
17763 (GRAPHICS_ADDR_PORT): Likewise.
17764 (GRAPHICS_DATA_PORT): Likewise.
17765 (READ_MAP_REGISTER): Likewise.
17766 (INPUT_STATUS1_REGISTER): Likewise.
17767 (INPUT_STATUS1_VERTR_BIT): Likewise.
17768 (page): New variable.
17769 (wait_vretrace): New function.
17770 (set_read_map): Likewise.
17771 (set_start_address): Likewise.
17772 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
17774 (check_vga_mem): Take the page into account.
17775 (write_char): Likewise.
17776 (write_cursor): Likewise.
17777 (scroll_up): Likewise. Copy the page to the page that is not
17778 shown and switch between both pages.
17779 (grub_vga_putchar): Fix off by one error.
17780 (grub_vga_cls): Wait for the vertical retrace. Take the page into
17783 2004-11-01 Marco Gerards <metgerards@student.han.nl>
17785 Add support for iso9660 (including rockridge).
17787 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17788 (iso9660_mod_SOURCES): New variable.
17789 (iso9660_mod_CFLAGS): Likewise.
17790 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
17791 * include/grub/fs.h (grub_iso9660_init): New prototype.
17792 * util/grub-emu.c (main): Call `grub_iso9660_init'.
17793 * fs/iso9660.c: New file.
17795 * include/grub/misc.h (grub_strncat): New prototype.
17796 * kern/misc.c (grub_strncat): New function.
17798 * fs/hfs.c (grub_hfs_mount): Translate the error
17799 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
17800 * fs/jfs.c (grub_jfs_mount): Likewise.
17801 * fs/ufs.c (grub_ufs_mount): Likewise.
17803 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
17805 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
17806 which initialized BAT registers.
17807 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
17808 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17810 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
17811 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
17813 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
17814 (grub_mapclaim): Likewise.
17815 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
17816 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
17819 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
17821 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
17822 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
17823 -ffreestanding and -msoft-float.
17825 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
17827 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
17828 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
17829 set in grub_ieee1275_flags.
17831 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
17833 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
17835 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
17836 grub_console_init first.
17837 Change the memory range used for grub_ieee1275_claim and
17838 grub_mm_init_region.
17839 Print an error message if the claim fails.
17840 Include <grub/misc.h>.
17842 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
17844 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
17845 Call grub_children_iterate for device nodes of type `scsi',
17847 (grub_ofdisk_open): Remove manual device alias resolution.
17848 Fix memory leak when device cannot be opened.
17849 * include/grub/powerpc/ieee1275/ieee1275.h
17850 (grub_children_iterate): New prototype.
17851 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
17853 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17854 Return -1 if args.size was -1.
17856 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17858 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
17859 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
17860 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
17861 Open Firmware's memory for it; claim memory from _start to _end.
17862 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
17863 (_end): New extern.
17864 (_start): Zero BSS from __bss_start to _end.
17865 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
17867 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
17869 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
17871 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
17872 -1 if args.base was -1.
17874 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
17876 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
17877 escape sequence instead of a literal ^L. Also call
17878 grub_ofconsole_gotoxy.
17880 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
17882 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
17883 void * arguments to grub_addr_t. All callers updated. Also make
17884 the `result' argument optional.
17885 (grub_ieee1275_release): change void * arguments to grub_addr_t.
17886 All callers updated.
17888 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
17890 * commands/ls.c (grub_ls_list_files): Use the string following the
17891 initial ')', if present, as the filesystem path.
17892 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
17894 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
17896 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
17898 Make the source code of the menu interface more readable.
17900 * normal/menu.c: Include grub/mm.h.
17901 (TERM_WIDTH): New macro.
17902 (TERM_HEIGHT): Likewise.
17903 (TERM_INFO_HEIGHT): Likewise.
17904 (TERM_MARGIN): Likewise.
17905 (TERM_SCROLL_WIDTH): Likewise.
17906 (TERM_TOP_BORDER_Y): Likewise.
17907 (TERM_LEFT_BORDER_X): Likewise.
17908 (TERM_BORDER_WIDTH): Likewise.
17909 (TERM_MESSAGE_HEIGHT): Likewise.
17910 (TERM_BORDER_HEIGHT): Likewise.
17911 (TERM_NUM_ENTRIES): Likewise.
17912 (TERM_FIRST_ENTRY_Y): Likewise.
17913 (TERM_ENTRY_WIDTH): Likewise.
17914 (TERM_CURSOR_X): Likewise.
17915 (draw_border): Use macros instead of magic numbers.
17916 (print_entry): Likewise.
17917 (print_entries): Likewise.
17918 (run_menu): Likewise. Also, handle the key 'e'.
17919 (run_menu_entry): Ignore empty command lines.
17920 (print_message): Added a new argument EDIT. If EDIT is true,
17921 print a different message.
17922 (init_page): Likewise.
17923 (edit_menu_entry): New function. Not implemented yet.
17925 2004-09-17 Marco Gerards <metgerards@student.han.nl>
17927 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
17928 can be loaded from normal mode.
17930 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
17932 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
17933 (multiboot_mod_CFLAGS): New variables.
17934 * loader/i386/pc/linux_normal.c: New file.
17935 * loader/i386/pc/multiboot_normal.c: Likewise.
17937 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
17938 attribute `unused'.
17940 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
17941 `fdiro' to read the mode information from instead of `diro'.
17943 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
17944 looking up a symlink.
17946 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
17948 * normal/command.c (grub_command_execute): Don't parse the
17949 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
17950 flags of the command.
17952 * normal/menu.c (grub_menu_run): Fix typo.
17954 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
17956 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
17958 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
17959 `y + 1' instead of `y - 1'.
17961 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
17963 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
17965 From Hollis Blanchard <hollis@penguinppc.org>:
17966 * kern/misc.c (memmove): New alias for grub_memmove.
17967 (memcmp): New alias for grub_memcmp.
17968 (memset): New alias for grub_memset.
17969 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17970 Change "int handle" to "grub_ieee1275_phandle_t handle".
17971 * include/grub/powerpc/ieee1275/ieee1275.h
17972 (grub_ieee1275_get_property): Likewise.
17974 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
17976 Added normal mode command `chainloader' as module chain.mod, which
17977 depends on normal.mod and _chain.mod.
17979 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17980 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17981 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17983 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17984 but arguments parsing moved to ...
17985 (grub_chainloader_cmd): ... here. New function.
17986 * include/grub/i386/pc/chainloader.h: New file.
17987 * loader/i386/pc/chainloader_normal.c: Likewise.
17989 2004-09-11 Marco Gerards <metgerards@student.han.nl>
17991 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17992 (grub_mkimage_LDFLAGS): Likewise.
17993 (grub_emu_SOURCES): Likewise.
17994 (kernel_img_HEADERS): Added fshelp.h.
17995 * fs/ext2.c: Include <grub/fshelp.h>.
17996 (FILETYPE_REG): New macro.
17997 (FILETYPE_INO_REG): Likewise.
17998 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
18000 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
18002 (grub_fshelp_node): New struct.
18003 (grub_ext2_data): Added member `diropen'. Changed member `inode'
18005 (grub_ext2_get_file_block): Removed function.
18006 (grub_ext2_read_block): New function.
18007 (grub_ext2_read_file): Replaced parameter `data' by `node'.
18008 This function was written.
18009 (grub_ext2_mount): Read the root inode. Create a diropen struct.
18010 (grub_ext2_find_file): Removed function.
18011 (grub_ext2_read_symlink): New function.
18012 (grub_ext2_iterate_dir): Likewise.
18013 (grub_ext2_open): Rewritten.
18014 (grub_ext2_dir): Rewritten.
18015 * include/grub/fshelp.h: New file.
18016 * fs/fshelp.c: Likewise.
18018 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
18020 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
18021 (print_message): Add a missing newline.
18022 (run_menu): Added timeout support.
18023 (run_menu_entry): New local function.
18024 (grub_menu_run): Added support for booting.
18026 * kern/loader.c (grub_loader_is_loaded): New function.
18028 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
18029 (grub_get_rtc): Exported.
18031 * include/grub/i386/pc/time.h: Include grub/symbol.h.
18032 (grub_get_rtc): Exported.
18034 * include/grub/normal.h (struct grub_command_list): Remove
18035 constant from the member `command'.
18037 * include/grub/loader.h (grub_loader_is_loaded): Declared.
18039 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
18041 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
18043 2004-08-28 Marco Gerards <metgerards@student.han.nl>
18045 Add support for the JFS filesystem.
18047 * fs/jfs.c: New file.
18048 * include/grub/fs.h (grub_jfs_init): New prototype.
18049 (grub_jfs_fini): New prototype.
18050 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
18051 (grub_emu_SOURCES): Likewise.
18052 (pkgdata_MODULES): Add jfs.mod.
18053 (jfs_mod_SOURCES): New variable.
18054 (jfs_mod_CFLAGS): Likewise.
18055 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
18056 (grubof_SOURCES): Likewise.
18057 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
18059 * fs/fat.c (grub_fat_find_dir): Convert the filename little
18060 endian to the host endian.
18061 (grub_fat_utf16_to_utf8): Move function from there...
18062 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
18063 the endianness of the source string anymore.
18064 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
18066 2004-08-24 Marco Gerards <metgerards@student.han.nl>
18068 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
18069 (grub_boot_fini) [GRUB_UTIL]: Likewise.
18070 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
18071 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
18073 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
18074 (grub_hfs_iterate_dir): Make the function static. Add prototypes
18075 for `node_found' and `it_dir'.
18076 (grub_hfs_dir): Add prototype for `dir_hook'.
18078 * fs/minix.c (grub_minix_get_file_block): Add prototype for
18079 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
18080 and `indir32' to silence a gcc warning.
18082 * include/grub/fs.h (grub_hfs_init): New prototype.
18083 (grub_hfs_fini): Likewise.
18086 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
18088 Each disk device has its own id now. This is useful to make use
18089 of multiple disk devices.
18091 * include/grub/disk.h (grub_disk_dev_id): New enum.
18092 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
18093 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
18095 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
18096 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18098 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
18099 GRUB_DISK_DEVICE_OFDISK_ID as an id.
18101 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
18102 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
18104 * include/grub/disk.h (struct grub_disk_dev): Added a new member
18105 "id" which is used by the cache manager.
18107 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
18110 2004-08-18 Marco Gerards <metgerards@student.han.nl>
18112 * fs/hfs.c: New file.
18113 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
18114 (grub_emu_SOURCES): Likewise.
18115 (pkgdata_MODULES): Add hfs.mod.
18116 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
18117 (grubof_SOURCES): Likewise.
18118 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
18120 * include/grub/misc.h (grub_strncasecmp): Add prototype.
18121 * kern/misc.c (grub_strncasecmp): Add function.
18123 2004-08-14 Marco Gerards <metgerards@student.han.nl>
18125 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
18128 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
18129 (grub_ext2_dir): In case the directory entry type is unknown, read
18132 2004-08-02 Peter Bruin <pjbruin@dds.nl>
18134 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
18135 grub_load_linux instead of grub_rescue_cmd_linux as second
18136 argument of grub_rescue_register_command.
18138 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
18140 2004-07-27 Marco Gerards <metgerards@student.han.nl>
18142 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
18144 * commands/boot.c: Remove the check for `GRUB_UTIL'.
18145 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
18146 `loader/powerpc/ieee1275/linux.c',
18147 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
18148 * include/grub/powerpc/ieee1275/ieee1275.h
18149 (grub_ieee1275_release): New prototype.
18150 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
18151 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
18152 normal, boot, linux and linux_normal.
18153 * loader/powerpc/ieee1275/linux.c: New file.
18154 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
18156 2004-07-12 Marco Gerards <metgerards@student.han.nl>
18158 * normal/arg.c (grub_arg_parse): Correct error handling after
18159 reallocating the argumentlist (check if `argl' is not null instead
18160 of checking if `args' is not null).
18161 * kern/mm.c (grub_realloc): Return the same pointer when using the
18162 same region, instead of returning the header address.
18164 2004-07-11 Marco Gerards <metgerards@student.han.nl>
18166 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
18167 one block instead of two when looking for the initial partition.
18168 (grub_partition_probe): Initialize the local variable `p' with 0.
18169 Use base 10 for the grub_strtoul call.
18170 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
18171 need for one local variable.
18172 (grub_strtoul): Don't add the new value to `num', instead of that
18175 2004-07-11 Marco Gerards <metgerards@student.han.nl>
18177 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
18178 (pxeboot_img_SOURCES): New variable.
18179 (pxeboot_img_ASFLAGS): Likewise.
18180 (pxeboot_img_LDFLAGS): Likewise.
18181 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
18182 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
18183 <lode_leroy@hotmail.com>.
18185 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
18187 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
18188 there was no input.
18190 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
18192 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
18193 the history buffer logic.
18195 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
18197 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
18198 (FILETYPE_INO_SYMLINK): New macros.
18199 (grub_ext2_find_file): Check if the node is a directory using the
18200 inode stat information instead of using the filetype in the
18201 dirent. Exclude the first character of an absolute symlink.
18202 (grub_ext2_dir): Mask out the filetype part of the mode member of
18205 2004-05-24 Marco Gerards <metgerards@student.han.nl>
18207 Add support for UFS version 1 and 2. Add support for the minix
18208 filesystem version 1 and 2, both the variants with 14 and 30 long
18211 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
18213 (grub_emu_SOURCES): Likewise.
18214 (pkgdata_MODULES): Add ufs.mod and minix.mod.
18215 (ufs_mod_SOURCES): New variable.
18216 (ufs_mod_CFLAGS): Likewise.
18217 (minix_mod_SOURCES): Likewise.
18218 (minix_mod_CFLAGS): Likewise.
18219 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
18221 (grubof_SOURCES): Likewise.
18222 * fs/ufs.c: New file.
18223 * fs/minix.c: New file.
18224 * include/grub/fs.h (grub_ufs_init): New prototype.
18225 (grub_ufs_fini): Likewise.
18226 (grub_minix_init): Likewise.
18227 (grub_minix_fini): Likewise.
18228 * util/grub-emu.c (main): Initialize and deinitialize UFS and
18231 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
18233 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
18234 commands/ls.c, commands/terminal.c, commands/boot.c,
18235 commands/cmp.c and commands/cat.c.
18236 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
18238 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
18241 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
18243 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
18244 and grub_, respectively. Because the conversion is trivial and
18245 mechanical, I omit the details here. Please refer to the CVS
18246 if you need more information.
18248 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
18250 * include/pupa: Renamed to ...
18251 * include/grub: ... this.
18252 * util/i386/pc/pupa-mkimage.c: Renamed to ...
18253 * util/i386/pc/grub-mkimage.c: ... this.
18254 * util/i386/pc/pupa-setup.c: Renamed to ...
18255 * util/i386/pc/grub-setup.c: ... this.
18256 * util/pupa-emu.c: Renamed to ...
18257 * util/grub-emu.c: ... this.
18259 2004-03-29 Marco Gerards <metgerards@student.han.nl>
18261 Add support for the newworld apple macintosh (PPC). This has been
18262 tested on the powerbook 2000 only. It only adds support for
18263 generic ieee1275 functions, console and disk support. This should
18264 be easy to port to other architectures with support for Open
18267 * configure.ac: Accept the powerpc as host_cpu. In the case of
18268 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
18269 specific tests are only executed while building for the i386.
18270 Inverse test for crosscompile.
18271 * genmk.rb (Utility): Allow assembler files.
18272 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
18273 * conf/powerpc-ieee1275.rmk: New file.
18274 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
18275 * disk/powerpc/ieee1275/partition.c: Likewise.
18276 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
18277 * include/pupa/powerpc/ieee1275/console.h: Likewise.
18278 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
18279 * include/pupa/powerpc/ieee1275/time.h: Likewise.
18280 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
18281 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
18282 * include/pupa/powerpc/ieee1275/loader.h
18283 * include/pupa/powerpc/setjmp.h: Likewise.
18284 * include/pupa/powerpc/types.h: Likewise.
18285 * kern/powerpc/ieee1275/init.c: Likewise.
18286 * kern/powerpc/ieee1275/openfw.c: Likewise.
18287 * term/powerpc/ieee1275/ofconsole.c: Likewise.
18289 These files were written by Johan Rydberg
18290 (jrydberg@night.trouble.net) and I only modified them slightly.
18292 * boot/powerpc/ieee1275/cmain.c: New file.
18293 * boot/powerpc/ieee1275/crt0.S: Likewise.
18294 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
18295 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
18297 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
18299 * Makefile.in: Update copyright.
18300 * genmodsrc.sh: Likewise.
18301 * gensymlist.sh: Likewise.
18302 * term/i386/pc/vga.c: Indent correctly.
18304 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
18305 bugreporting address.
18306 * util/i386/pc/pupa-setup.c (usage): Likewise,
18307 (main): Call pupa_ext2_init and pupa_ext2_fini.
18309 * fs/fat.c (log2): Renamed to ...
18310 (fat_log2): ... this.
18311 All callers changed.
18312 * kern/misc.c (memcpy): Alias to pupa_memmove.
18313 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
18315 * util/console.c (pupa_ncurses_fini): Return 0.
18317 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
18318 Move fail label here.
18319 [__GNU__]: Don't warn when using stat.
18320 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
18321 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
18322 long int. Use strtol instead of strtoul.
18324 2004-03-14 Marco Gerards <metgerards@student.han.nl>
18326 * commands/boot.c: New file.
18327 * commands/cat.c: Likewise.
18328 * commands/cmp.c: Likewise.
18329 * commands/ls.c: Likewise.
18330 * commands/terminal.c: Likewise.
18331 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
18332 (pupa_register_command): Changed interface to match the new
18334 (pupa_command_execute): Changed (almost rewritten) so it uses
18335 pupa_split_command. Added support for setting variables using the
18337 (rescue_command): Changed to work with the new argument parser.
18338 (terminal_command): Moved from here to commands/terminal.c.
18339 (set_command): New function.
18340 (unset_command): New function.
18341 (insmod_command): New function.
18342 (rmmod_command): New function.
18343 (lsmod_command): New function.
18344 (pupa_command_init): Don't initialize the command terminal
18345 anymore. Initialize the commands set, unset, insmod, rmmod and
18347 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
18348 (kernel_img_HEADERS): Add arg.h and env.h.
18349 (pupa_mkimage_LDFLAGS): Add kern/env.c.
18350 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
18351 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
18353 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
18355 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
18356 (boot_mod_SOURCES): New variable.
18357 (terminal_mod_SOURCES): Likewise.
18358 (ls_mod_SOURCES): Likewise.
18359 (cmp_mod_SOURCES): Likewise.
18360 (cat_mod_SOURCES): Likewise.
18362 * normal/arg.c: New file.
18363 * kern/env.c: Likewise.
18364 * include/pupa/arg.h: Likewise.
18365 * include/pupa/env.h: Likewise.
18366 * font/manager.c (font_command): Changed to match argument parsing
18368 (PUPA_MOD_INIT): Likewise.
18369 * hello/hello.c (pupa_cmd_hello): Likewise.
18370 (PUPA_MOD_INIT): Likewise.
18371 * include/pupa/disk.h: Include <pupa/device.h>.
18372 (pupa_print_partinfo): New prototype.
18373 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
18374 (pupa_dl_get_prefix): Likewise.
18375 * include/pupa/misc.h: Include <pupa/err.h>.
18376 (pupa_isgraph): New prototype.
18377 (pupa_isdigit): Likewise.
18378 (pupa_split_cmdline): Likewise.
18379 * include/pupa/normal.h: Include <pupa/arg.h>.
18380 (pupa_command): Changed the prototype of the member `func' to
18381 match the argument parsing interface. Added member `options'.
18382 (pupa_register_command): Updated to match function.
18383 (pupa_arg_parse): New prototype.
18384 (pupa_hello_init) [PUPA_UTIL]: New prototype.
18385 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
18386 (pupa_ls_init) [PUPA_UTIL]: Likewise.
18387 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
18388 (pupa_cat_init) [PUPA_UTIL]: Likewise.
18389 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
18390 (pupa_boot_init) [PUPA_UTIL]: Likewise.
18391 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
18392 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
18393 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
18394 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
18395 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
18396 * kern/disk.c: Include <pupa/file.h>.
18397 (pupa_print_partinfo): New function.
18398 * kern/dl.c: Include <pupa/env.h>.
18399 (pupa_dl_dir): Variable removed.
18400 (pupa_dl_load): Use the environment variable `prefix' instead of
18401 the variable pupa_dl_dir.
18402 (pupa_dl_set_prefix): Function removed.
18403 (pupa_dl_get_prefix): Likewise.
18404 * kern/i386/pc/init.c: Include <pupa/env.h>.
18405 (pupa_machine_init): Use the environment variable `prefix' instead of
18406 using pupa_dl_set_prefix to set the prefix.
18407 * kern/main.c: Include <pupa/env.h>.
18408 (pupa_set_root_dev): Use the environment variable `prefix' instead of
18409 using pupa_dl_get_prefix to get the prefix.
18410 * kern/misc.c: Include <pupa/env.h>.
18411 (pupa_isdigit): New function.
18412 (pupa_isgraph): Likewise.
18413 (pupa_ftoa): Likewise.
18414 (pupa_vsprintf): Added support for printing values of the type
18415 `double'. Make it possible to format variable output when using
18416 formatting like `%1.2%f'.
18417 (pupa_split_cmdline): New function.
18418 * kern/rescue.c: Include <pupa/env.h>.
18419 (next_word): Removed function.
18420 (pupa_rescue_cmd_prefix): Likewise.
18421 (pupa_rescue_cmd_set): New function.
18422 (pupa_rescue_cmd_unset): New function.
18423 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
18424 split the command line instead of splitting it here. Added
18425 support for setting variables using the syntax `foo=bar'. Don't
18426 initialize the prefix command anymore. Initialized the set and
18428 * normal/cmdline.c: Include <pupa/env.h>.
18429 (pupa_tab_complete): Added prototypes for print_simple_completion,
18430 print_partition_completion, add_completion, iterate_commands,
18431 iterate_dev, iterate_part and iterate_dir. Moved code to print
18432 partition information from here to kern/disk.c.
18433 (pupa_cmdline_run): Don't check if the function exists anymore.
18434 * normal/main.c: Include <pupa/env.h>.
18435 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
18436 instead of using pupa_dl_get_prefix to get the prefix.
18437 * term/i386/pc/vga.c: Include <pupa/arg.h>.
18438 (check_vga_mem): Cast pointers to `void *' to silence a gcc
18440 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
18441 (pupa_vga_setcolor): Declare unused variables with `__attribute__
18442 ((unused))' to silence a gcc warning.
18443 (pupa_vga_setcolor): Likewise.
18444 (debug_command): Changed to match argument parsing
18446 * util/pupa-emu.c: Include <pupa/env.h>.
18447 (options): Added 0's for unused fields to silence a gcc warning.
18449 (main): Use the environment variable `prefix' instead of using
18450 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
18451 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
18454 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
18455 * util/misc.c: Include <malloc.h>.
18456 (pupa_malloc): Rewritten so errors are correctly reported.
18457 (pupa_realloc): Likewise.
18458 (pupa_memalign): Likewise.
18459 (pupa_mm_init_region): Declare unused variables with
18460 `__attribute__ ((unused))' to silence a gcc warning.
18461 * normal/i386/setjmp.S: Remove tab at the end of the file to
18462 silence a gcc warning.
18463 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
18464 variables with `__attribute__ ((unused))' to silence a gcc
18466 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
18467 local variable i unsigned to silence a gcc warning.
18469 * kern/term.c: Include <pupa/misc.h>.
18470 (pupa_more_lines): New variable.
18471 (pupa_more): Likewise.
18472 (pupa_putcode): When the pager is active pause at the end of every
18474 (pupa_set_more): New function.
18475 * include/pupa/term.h (pupa_set_more): New prototype.
18478 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
18480 Now this project is GRUB 2 rather than PUPA. The location of
18481 the CVS repository was moved to GRUB's.
18483 * configure.ac: Use bug-grub as the reporting address.
18484 Use GRUB instead of PUPA.
18485 Change the version number to 1.90.
18487 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
18489 * genkernsyms.sh: Updated copyright information.
18490 * genmk.rb: Likewise.
18491 * genmodsrc.sh: Likewise.
18492 * gensymlist.sh: Likewise.
18493 * boot/i386/pc/boot.S: Likewise.
18494 * boot/i386/pc/diskboot.S: Likewise.
18495 * disk/i386/pc/biosdisk.c: Likewise.
18496 * disk/i386/pc/partition.c: Likewise.
18497 * font/manager.c: Likewise.
18498 * fs/ext2.c: Likewise.
18499 * fs/fat.c: Likewise.
18500 * include/pupa/boot.h: Likewise.
18501 * include/pupa/device.h: Likewise.
18502 * include/pupa/disk.h: Likewise.
18503 * include/pupa/dl.h: Likewise.
18504 * include/pupa/elf.h: Likewise.
18505 * include/pupa/err.h: Likewise.
18506 * include/pupa/file.h: Likewise.
18507 * include/pupa/font.h: Likewise.
18508 * include/pupa/fs.h: Likewise.
18509 * include/pupa/kernel.h: Likewise.
18510 * include/pupa/loader.h: Likewise.
18511 * include/pupa/misc.h: Likewise.
18512 * include/pupa/mm.h: Likewise.
18513 * include/pupa/net.h: Likewise.
18514 * include/pupa/normal.h: Likewise.
18515 * include/pupa/rescue.h: Likewise.
18516 * include/pupa/setjmp.h: Likewise.
18517 * include/pupa/symbol.h: Likewise.
18518 * include/pupa/term.h: Likewise.
18519 * include/pupa/types.h: Likewise.
18520 * include/pupa/i386/setjmp.h: Likewise.
18521 * include/pupa/i386/types.h: Likewise.
18522 * include/pupa/i386/pc/biosdisk.h: Likewise.
18523 * include/pupa/i386/pc/boot.h: Likewise.
18524 * include/pupa/i386/pc/console.h: Likewise.
18525 * include/pupa/i386/pc/init.h: Likewise.
18526 * include/pupa/i386/pc/kernel.h: Likewise.
18527 * include/pupa/i386/pc/linux.h: Likewise.
18528 * include/pupa/i386/pc/loader.h: Likewise.
18529 * include/pupa/i386/pc/memory.h: Likewise.
18530 * include/pupa/i386/pc/multiboot.h: Likewise.
18531 * include/pupa/i386/pc/partition.h: Likewise.
18532 * include/pupa/i386/pc/time.h: Likewise.
18533 * include/pupa/i386/pc/vga.h: Likewise.
18534 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
18535 * include/pupa/util/getroot.h: Likewise.
18536 * include/pupa/util/misc.h: Likewise.
18537 * include/pupa/util/resolve.h: Likewise.
18538 * kern/device.c: Likewise.
18539 * kern/disk.c: Likewise.
18540 * kern/dl.c: Likewise.
18541 * kern/err.c: Likewise.
18542 * kern/file.c: Likewise.
18543 * kern/fs.c: Likewise.
18544 * kern/loader.c: Likewise.
18545 * kern/main.c: Likewise.
18546 * kern/misc.c: Likewise.
18547 * kern/mm.c: Likewise.
18548 * kern/rescue.c: Likewise.
18549 * kern/term.c: Likewise.
18550 * kern/i386/dl.c: Likewise.
18551 * kern/i386/pc/init.c: Likewise.
18552 * kern/i386/pc/lzo1x.S: Likewise.
18553 * kern/i386/pc/startup.S: Likewise.
18554 * loader/i386/pc/chainloader.c: Likewise.
18555 * loader/i386/pc/linux.c: Likewise.
18556 * loader/i386/pc/multiboot.c: Likewise.
18557 * normal/cmdline.c: Likewise.
18558 * normal/command.c: Likewise.
18559 * normal/main.c: Likewise.
18560 * normal/menu.c: Likewise.
18561 * normal/i386/setjmp.S: Likewise.
18562 * term/i386/pc/console.c: Likewise.
18563 * term/i386/pc/vga.c: Likewise.
18564 * util/console.c: Likewise.
18565 * util/genmoddep.c: Likewise.
18566 * util/misc.c: Likewise.
18567 * util/pupa-emu.c: Likewise.
18568 * util/resolve.c: Likewise.
18569 * util/unifont2pff.rb: Likewise.
18570 * util/i386/pc/biosdisk.c: Likewise.
18571 * util/i386/pc/getroot.c: Likewise.
18572 * util/i386/pc/pupa-mkimage.c: Likewise.
18573 * util/i386/pc/pupa-setup.c: Likewise.
18575 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
18577 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
18578 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
18579 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
18580 reading and reset it after reading.
18581 (pupa_ext2_close): Return PUPA_ERR_NONE.
18583 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
18585 (struct linux_kernel_header): Add kernel_version and
18587 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
18588 pupa_file_read succeeds.
18589 (pupa_rescue_cmd_initrd): Implement.
18591 2003-12-03 Marco Gerards <metgerards@student.han.nl>
18593 * fs/ext2.c (pupa_ext2_label): New function.
18594 (pupa_ext2_fs): Added label.
18595 * fs/fat.c (pupa_fat_label): New function.
18596 (pupa_fat_fs): Added label.
18597 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
18599 * kern/misc.c (pupa_strndup): New function.
18600 * include/pupa/misc.h (pupa_strndup): New prototype.
18602 * include/pupa/normal.h: Include <pupa/err.h>.
18603 (pupa_set_history): New prototype.
18604 (pupa_iterate_commands): New prototype.
18605 * normal/cmdline.c: Include <pupa/machine/partition.h>,
18606 <pupa/disk.h>, <pupa/file.h>.
18607 (hist_size): New variable.
18608 (hist_lines): Likewise.
18609 (hist_end): Likewise.
18610 (hist_used): Likewise.
18611 (pupa_set_history): New function.
18612 (pupa_history_get): Likewise.
18613 (pupa_history_add): Likewise.
18614 (pupa_history_replace): Likewise.
18615 (pupa_tab_complete): Likewise.
18616 (pupa_cmdline_run): Added tab completion and history buffer. Tab
18617 completion shows partitionnames while completing partitions, this
18618 feature was suggested by Jeff Bailey.
18619 * normal/command.c (pupa_iterate_commands): New function.
18620 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
18621 (pupa_normal_init): Initialize history buffer.
18622 (PUPA_MOD_INIT): Likewise.
18623 (pupa_normal_fini): Free the history buffer.
18624 (PUPA_MOD_FINI): Likewise.
18626 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
18629 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
18630 * configure.ac [i386]: Check for regparam bug.
18631 (NESTED_FUNC_ATTR) [! i386]: Defined.
18633 2003-11-17 Marco Gerards <metgerards@student.han.nl>
18635 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
18636 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
18637 (pupa_emu_SOURCES): New variable.
18638 (pupa_emu_LDFLAGS): Likewise.
18639 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
18640 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
18641 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
18642 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
18643 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
18644 (pupa_jmp_buf): New typedef.
18645 (pupa_setjmp) [PUPA_UTIL]: New macro.
18646 (pupa_longjmp) [PUPA_UTIL]: Likewise.
18647 * include/pupa/term.h (struct pupa_term): New member `refresh'.
18648 (pupa_refresh): New prototype.
18649 * include/pupa/util/getroot.h: New file.
18650 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
18652 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
18653 (pupa_rescue_cmd_cat): Likewise.
18654 (pupa_rescue_cmd_ls): Likewise.
18655 (pupa_rescue_cmd_testload): Likewise.
18656 (pupa_rescue_cmd_lsmod): Likewise.
18657 * normal/cmdline.c (pupa_cmdline_get): Likewise.
18658 * normal/menu.c (run_menu): Likewise.
18659 * kern/term.c (pupa_cls): Likewise.
18660 (pupa_refresh): New function.
18661 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
18662 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
18663 * util/console.c: New file.
18665 * util/i386/pc/getroot.c: New file.
18666 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
18667 (pupa_putchar): New function.
18668 (pupa_refresh): Likewise.
18669 (xgetcwd): Function moved to ...
18670 (strip_extra_slashes): Likewise.
18671 (get_prefix): Likewise.
18672 * util/i386/pc/getroot.c: ... here.
18673 (find_root_device): Function moved and renamed to...
18674 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
18675 Changed all callers.
18676 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
18678 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
18679 Changed all callers.
18680 * util/misc.c (pupa_memalign): New function.
18681 (pupa_mm_init_region): Likewise.
18682 (pupa_register_exported_symbols): Likewise.
18683 (pupa_putchar): Function removed.
18684 * util/pupa-emu.c: New file.
18686 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
18688 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
18689 (_multiboot_mod_SOURCES): New variable.
18690 (_multiboot_mod_CFLAGS): Likewise.
18691 * loader/i386/pc/multiboot.c: New file.
18692 * include/pupa/i386/pc/multiboot.h: Likewise.
18693 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
18694 (pupa_multiboot_real_boot): New function.
18695 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
18696 (pupa_multiboot_real_boot): New prototype.
18697 (pupa_rescue_cmd_multiboot): Likewise
18698 (pupa_rescue_cmd_module): Likewise.
18700 * kern/loader.c (pupa_loader_set): Continue when
18701 pupa_loader_unload_func() fails.
18702 (pupa_loader_unset): New function.
18703 * include/pupa/loader.h (pupa_loader_unset): New prototype.
18705 * kern/misc.c (pupa_stpcpy): New function.
18706 * include/pupa/misc.h (pupa_stpcpy): New prototype.
18708 2003-11-12 Marco Gerards <metgerards@student.han.nl>
18710 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
18711 for available extensions.
18713 * include/pupa/i386/pc/time.h: New file.
18714 * kern/disk.c: Include <pupa/machine/time.h>.
18715 (PUPA_CACHE_TIMEOUT): New macro.
18716 (pupa_last_time): New variable.
18717 (pupa_disk_open): Flush the cache when there was a timeout.
18718 (pupa_disk_close): Reset the timer.
18719 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
18721 * util/misc.c: Include <sys/times.h>
18722 (pupa_get_rtc): New function.
18724 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
18726 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
18728 (pupa_ext2_get_file_block): Use blocks member.
18730 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
18731 first block. Return -1 instead of pupa_errno on error.
18733 2003-10-27 Marco Gerards <metgerards@student.han.nl>
18735 * README: In the pupa-mkimage example use _chain instead of chain
18736 and ext2 instead of fat.
18737 * TODO: Replace ext2fs with jfs as an example. Add an item for
18738 adding journal playback for ext2fs.
18739 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
18740 (pkgdata_MODULES): Added ext2.mod.
18741 (ext2_mod_SOURCES): New variable.
18742 (ext2_mod_CFLAGS): Likewise.
18743 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
18744 * include/pupa/misc.h (pupa_strncpy): New prototype.
18745 (pupa_strcat): Likewise.
18746 (pupa_strncmp): Likewise.
18747 * kern/misc.c (pupa_strcat): Enable function.
18748 (pupa_strncpy): New function.
18749 (pupa_strncmp): Likewise.
18750 * fs/ext2.c: New file.
18752 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
18753 when the read failed before retrying.
18754 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
18755 (_FILE_OFFSET_BITS): Likewise.
18756 * configure.ac: Added AC_SYS_LARGEFILE.
18758 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
18760 * genmk.rb (PModule#rule): Make sure to get only symbol names
18761 from the output of nm.
18762 Reported by Robert Millan <zeratul2@wanadoo.es>.
18764 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
18766 I forgot to check in these changes for a long time. This adds
18767 incomplete support for VGA console, and this is still very
18768 buggy. Also, a lot of consideration is required for I18N,
18769 UNICODE, and VGA font issues. Therefore, assume that this is
18770 such that "better than nothing".
18772 * font/manager.c: New file.
18773 * include/pupa/font.h: Likewise.
18774 * include/pupa/i386/pc/vga.h: Likewise.
18775 * term/i386/pc/vga.c: Likewise.
18776 * util/unifont2pff.rb: Likewise.
18778 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
18779 (pkgdata_MODULES): Added vga.mod and font.mod.
18780 (vga_mod_SOURCES): New variables.
18781 (vga_mod_CFLAGS): Likewise.
18782 (font_mod_SOURCES): Likewise.
18783 (font_mod_CFLAGS): Likewise.
18785 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
18787 * include/pupa/term.h: Include pupa/err.h.
18788 (struct pupa_term): Added init and fini.
18789 Changed the argument of putchar to pupa_uint32_t.
18791 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
18792 (pupa_console_real_putchar): New prototype.
18793 (pupa_console_putchar): Removed.
18794 (pupa_console_checkkey): Exported.
18795 (pupa_console_getkey): Likewise.
18797 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
18800 * kern/term.c (pupa_term_set_current): Rewritten.
18801 (pupa_putchar): Likewise.
18802 (pupa_putcode): New function.
18804 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
18805 (pupa_console_real_putchar): ... this.
18806 (pupa_vga_set_mode): New function.
18807 (pupa_vga_get_font): Likewise.
18809 * normal/command.c: Include pupa/term.h.
18810 (terminal_command): New function.
18811 (pupa_command_init): Register the command "terminal".
18813 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
18814 (DISP_UP): Likewise.
18815 (DISP_RIGHT): Likewise.
18816 (DISP_DOWN): Likewise.
18817 (DISP_HLINE): Likewise.
18818 (DISP_VLINE): Likewise.
18819 (DISP_UL): Likewise.
18820 (DISP_UR): Likewise.
18821 (DISP_LL): Likewise.
18822 (DISP_LR): Likewise.
18824 * term/i386/pc/console.c (pupa_console_putchar): New function.
18826 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
18828 * util/resolve.c (pupa_util_resolve_dependencies): BUG
18829 FIX. Reverse the path_list.
18831 * include/pupa/normal.h: Export pupa_register_command and
18832 pupa_unregister_command.
18834 * hello/hello.c (pupa_cmd_hello): New module.
18835 * conf/i386-pc.rmk: Added hello.mod.
18837 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
18839 * kern/i386/pc/lzo1x.S: New file.
18841 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
18842 (compress_kernel): New variable.
18843 (generate_image): Heavily modified to support compressing a
18844 large part of the core image.
18846 * util/misc.c (pupa_util_read_image): Fix a file descriptor
18848 (pupa_util_load_image): New function.
18850 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
18851 (pupa_compressed_size): New variable.
18852 (codestart): Enable Gate A20 here.
18853 Decompress the compressed part of the core image.
18854 Rearrange the code to put functions and variables which are
18855 required for initialization in the non-compressed part.
18858 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
18861 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
18863 * include/pupa/i386/pc/kernel.h
18864 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
18865 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
18866 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18867 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18868 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
18870 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
18872 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
18873 (Utility#rule): Likewise.
18875 * configure.ac: Check if LZO is available.
18877 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
18879 * include/pupa/normal.h: New file.
18880 * include/pupa/setjmp.h: Likewise.
18881 * include/pupa/i386/setjmp.h: Likewise.
18882 * normal/cmdline.c: Likewise.
18883 * normal/command.c: Likewise.
18884 * normal/main.c: Likewise.
18885 * normal/menu.c: Likewise.
18886 * normal/i386/setjmp.S: Likewise.
18888 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
18889 (pupa_rescue_cmd_initrd): Likewise.
18891 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
18894 * kern/i386/pc/startup.S (translation_table): New variable.
18895 (translate_keycode): New function.
18896 (pupa_console_getkey): Call translate_keycode.
18898 * kern/rescue.c (attempt_normal_mode): New function.
18899 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
18900 it failed, print a message.
18902 * kern/mm.c (pupa_real_malloc): Print more information when a
18903 free magic is broken.
18904 (pupa_free): If the first free header is not free actually, set
18907 * kern/main.c (pupa_load_normal_mode): Just load the module
18909 (pupa_main): Don't print the message
18910 "Entering into rescue mode..." here.
18912 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
18914 (pupa_rescue_cmd_initrd): Likewise.
18915 (pupa_rescue_cmd_initrd): Likewise.
18917 * include/pupa/symbol.h (FUNCTION): Specify the type.
18918 (VARIABLE): Likewise.
18920 * include/pupa/err.h (pupa_err_t): Added
18921 PUPA_ERR_UNKNOWN_COMMAND.
18923 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
18924 (pupa_dl_get_prefix): Likewise.
18926 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
18927 Added _chain.mod and _linux.mod instead of chain.mod and
18929 (chain_mod_SOURCES): Renamed to ...
18930 (_chain_mod_SOURCES): ... this.
18931 (chain_mod_CFLAGS): Renamed to ...
18932 (_chain_mod_CFLAGS): ... this.
18933 (linux_mod_SOURCES): Renamed to ...
18934 (_linux_mod_SOURCES): ... this.
18935 (linux_mod_CFLAGS): Renamed to ...
18936 (_linux_mod_CFLAGS): ... this.
18937 (normal_mod_SOURCES): New variable.
18938 (normal_mod_CFLAGS): Likewise.
18939 (normal_mod_ASFLAGS): Likewise.
18941 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
18943 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
18946 * kern/dl.c (pupa_dl_ref): Refer depending modules
18948 (pupa_dl_unref): Unrefer depending modules recursively.
18949 Don't call pupa_dl_unload implicitly, because PUPA can crash if
18950 a module is unloaded before one depending on that module is
18952 (pupa_dl_unload): Unload depending modules explicitly,
18955 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
18957 * include/pupa/i386/pc/linux.h: New file.
18958 * loader/i386/pc/linux.c: Likewise.
18960 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
18962 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18963 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18964 of PUPA_CHAINLOADER_BOOT_SECTOR.
18966 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18967 (pupa_linux_prot_size): New variable.
18968 (pupa_linux_tmp_addr): Likewise.
18969 (pupa_linux_real_addr): Likewise.
18970 (pupa_linux_boot_zimage): New function.
18971 (pupa_linux_boot_bzimage): Likewise.
18973 * kern/i386/pc/init.c (struct mem_region): New structure.
18974 (MAX_REGIONS): New macro.
18975 (mem_regions): New variable.
18976 (num_regions): Likewise.
18977 (pupa_os_area_addr): Likewise.
18978 (pupa_os_area_size): Likewise.
18979 (pupa_lower_mem): Likewise.
18980 (pupa_upper_mem): Likewise.
18981 (add_mem_region): New function.
18982 (compact_mem_regions): Likewise.
18983 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18984 the size of the conventional memory and that of so-called upper
18985 memory (before the first memory hole).
18986 Instead of adding each found region to free memory, use
18987 add_mem_region and add them after removing overlaps.
18988 Also, add only 1/4 of the upper memory to free memory. The rest
18989 is used for loading OS images. Maybe this is ad hoc, but this
18990 makes it much easier to relocate OS images when booting.
18992 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18993 (pupa_enter_rescue_mode): Don't register initrd and module.
18995 * kern/mm.c: Include pupa/dl.h.
18997 * kern/main.c: Include pupa/file.h and pupa/device.h.
18999 * kern/loader.c (pupa_loader_load_module_func): Removed.
19000 (pupa_loader_load_module): Likewise.
19002 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
19005 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
19006 (pupa_linux_tmp_addr): Likewise.
19007 (pupa_linux_real_addr): Likewise.
19008 (pupa_linux_boot_zimage): Likewise.
19009 (pupa_linux_boot_bzimage): Likewise.
19011 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
19012 (pupa_upper_mem): Likewise.
19013 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
19014 module is too dangerous.
19016 * include/pupa/loader.h (pupa_os_area_addr): Declared.
19017 (pupa_os_area_size): Likewise.
19018 (pupa_loader_set): Remove the first argument. Loader doesn't
19019 manage modules or initrd any longer.
19020 (pupa_loader_load_module): Removed.
19022 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
19023 (linux_mod_SOURCES): New variable.
19024 (linux_mod_CFLAGS): Likewise.
19026 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
19028 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
19029 the length of a blocklist correctly.
19031 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
19032 Use ioctl only if the OS file is a block device.
19033 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
19034 not very useful for normal files.
19036 * kern/main.c (pupa_set_root_dev): New function.
19037 (pupa_load_normal_mode): Likewise.
19038 (pupa_main): Call those above.
19040 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
19043 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
19045 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
19047 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
19048 (setup): Configure the installed partition information and the
19051 * loader/i386/pc/chainloader.c (my_mod): New variable.
19052 (pupa_chainloader_unload): New function.
19053 (pupa_rescue_cmd_chainloader): Refer itself.
19054 (PUPA_MOD_INIT): Save its own module in MY_MOD.
19056 * kern/i386/pc/startup.S (install_partition): Removed.
19057 (version_string): Likewise.
19058 (config_file): Likewise.
19059 (pupa_install_dos_part): New variable.
19060 (pupa_install_bsd_part): Likewise.
19061 (pupa_prefix): Likewise.
19062 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
19064 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
19066 (make_install_device): New function.
19067 (pupa_machine_init): Set the dl prefix.
19069 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
19070 (buf): Renamed to ...
19071 (linebuf): ... this.
19072 (pupa_rescue_cmd_prefix): New function.
19073 (pupa_rescue_cmd_insmod): Likewise.
19074 (pupa_rescue_cmd_rmmod): Likewise.
19075 (pupa_rescue_cmd_lsmod): Likewise.
19076 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
19079 * kern/mm.c (pupa_memalign): If failed even after invalidating
19080 disk caches, unload unneeded modules and retry.
19082 * kern/misc.c (pupa_memmove): New function.
19083 (pupa_memcpy): Removed.
19084 (pupa_strcpy): New function.
19085 (pupa_itoa): Made static.
19087 * kern/dl.c (pupa_dl_iterate): New function.
19088 (pupa_dl_ref): Likewise.
19089 (pupa_dl_unref): Likewise.
19090 (pupa_dl_unload): Return if succeeded or not.
19091 (pupa_dl_unload_unneeded): New function.
19092 (pupa_dl_unload_all): Likewise.
19093 (pupa_dl_init): Renamed to ...
19094 (pupa_dl_set_prefix): ... this.
19095 (pupa_dl_get_prefix): New function.
19097 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
19098 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
19099 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
19100 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
19101 (pupa_install_dos_part): Declared.
19102 (pupa_install_bsd_part): Likewise.
19103 (pupa_prefix): Likewise.
19104 (pupa_boot_drive): Likewise.
19106 * include/pupa/types.h: Fix a typo.
19108 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
19110 (pupa_memmove): Declared.
19111 (pupa_strcpy): Likewise.
19113 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
19114 pupa_mod_init takes one argument, its own module.
19115 (pupa_dl_unload_unneeded): Declared.
19116 (pupa_dl_unload_all): Likewise.
19117 (pupa_dl_ref): Likewise.
19118 (pupa_dl_unref): Likewise.
19119 (pupa_dl_iterate): Likewise.
19120 (pupa_dl_init): Renamed to ...
19121 (pupa_dl_set_prefix): ... this.
19122 (pupa_dl_get_prefix): Declared.
19124 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
19125 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
19127 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
19128 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
19130 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
19131 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
19133 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
19135 * util/i386/pc/pupa-setup.c (setup): Define the internal
19136 function find_first_partition_start at the top level, because GCC
19137 3.0.x cannot compile internal functions in deeper scopes
19139 (find_root_device): Use lstat instead of stat.
19140 Don't follow symbolic links.
19141 Fix the path-constructing code.
19143 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
19144 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
19145 by a BLKGETSIZE ioctl first, because block devices don't fill
19146 the member st_mode of the structure stat on Linux.
19147 [__linux__] (linux_find_partition): Use a temporary buffer
19148 REAL_DEV for the working space. Copy it to DEV before returning.
19149 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
19150 buffer cache consistent.
19151 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
19152 strncmp. The previous value was merely wrong.
19153 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
19155 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
19156 FAT size is 12. The previous value was merely wrong.
19158 * kern/main.c (pupa_main): Don't split the starting message from
19161 * kern/term.c (pupa_putchar): Put CR after LF instead of before
19162 LF, because BIOS goes crazy about character attributes in this
19165 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
19167 * include/i386/pc/util/biosdisk.h: New file.
19168 * util/i386/pc/biosdisk.c: Likewise.
19169 * util/i386/pc/pupa-setup.c: Likewise.
19171 * Makefile.in (INCLUDE_DISTFILES): Added
19172 include/pupa/i386/pc/util/biosdisk.h.
19173 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
19174 directory util/i386/pc.
19175 (install-local): Added a rule for sbin_UTILITIES.
19176 (uninstall): Likewise.
19178 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
19180 * util/misc.c (xrealloc): New function.
19181 (pupa_malloc): Likewise.
19182 (pupa_free): Likewise.
19183 (pupa_realloc): Likewise.
19184 (pupa_stop): Likewise.
19185 (pupa_putchar): Likewise.
19187 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
19189 * include/pupa/util/misc.h (xrealloc): Declared.
19191 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
19193 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
19194 (PUPA_BOOT_MACHINE_BPB_END): ... this.
19196 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
19197 [PUPA_UTIL] (pupa_fat_fini): Likewise.
19199 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
19200 way should be implemented.
19201 [PUPA_UTIL] (pupa_fat_fini): Likewise.
19203 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
19204 the size of NAME for safety.
19205 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
19208 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
19209 (pupa_setup_SOURCES): Likewise.
19211 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
19213 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
19215 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
19216 bunch of pushl's from pusha, because this destroys the return
19219 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
19221 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
19222 This means that any missing prototypes could be fatal. Also, you
19223 must take care when writing assembly code. See the comments at
19224 the beginning of startup.S, for more details.
19226 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
19227 compilation mechanism.
19228 (pupa_chainloader_real_boot): Likewise.
19229 (pupa_biosdisk_rw_int13_extensions): Likewise.
19230 (pupa_biosdisk_rw_standard): Likewise.
19231 (pupa_biosdisk_check_int13_extensions): Likewise.
19232 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
19233 (pupa_biosdisk_get_diskinfo_standard): Likewise.
19234 (pupa_get_memsize): Likewise.
19235 (pupa_get_mmap_entry): Likewise.
19236 (pupa_console_putchar): Likewise.
19237 (pupa_console_setcursor): Likewise.
19238 (pupa_getrtsecs): Use pushl instead of push.
19240 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
19241 memory instead of the stack for a mmap entry, because some
19242 BIOSes may ignore the maximum size and overflow.
19244 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
19246 * genmk.rb (PModule#rule): Compile automatically generated
19247 sources with module-specific CFLAGS as well as other sources.
19249 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
19251 * configure.ac: Check ld.
19252 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
19253 respectively, before checking endianness and sizes.
19255 * Makefile.in (LD): New variable.
19257 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
19259 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
19261 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
19263 * Changelog: New file.