1 2008-11-04 Robert Millan <rmh@aybabtu.com>
3 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
5 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
7 2008-11-03 Bean <bean123ch@gmail.com>
9 * kern/elf.c (grub_elf32_load): Revert to previous code.
10 (grub_elf64_load): Likewise.
12 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
14 2008-11-01 Robert Millan <rmh@aybabtu.com>
16 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
17 (TARGET_CPPFLAGS): Likewise.
18 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
20 2008-11-01 Carles Pina i Estany <carles@pina.cat>
22 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
24 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
26 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
27 addition of objects until the code is not going to be able to fail.
29 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
31 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
32 (add a missing NULL check, and correct them by moving the pointer
33 operations after the actual check).
35 2008-10-29 Robert Millan <rmh@aybabtu.com>
37 * util/i386/pc/grub-install.in: Handle empty string as output from
38 make_system_path_relative_to_its_root().
40 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
42 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
43 circular metadata worst case scenario. If the metadata is circular
44 then copy the wrap in place.
45 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
46 project lib/format_text/layout.h
47 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
49 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
51 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
53 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
55 * util/update-grub_lib.in: Mention filename in warning message.
57 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
59 * NEWS: Update for rename of update-grub to grub-mkconfig.
61 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
63 * util/update-grub_lib.in: Copy to ...
64 * util/grub-mkconfig_lib.in: ... this. Update all users.
65 * util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
66 * util/update-grub.in: Rename to ...
67 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
68 option. Add `--output' option to allow users to specify the generated
69 configuration file. Default to stdout.
70 (update_grub_dir): Rename to ...
71 (grub_mkconfig_dir): ... this.
72 (grub_cfg): Default to an empty string.
73 * conf/common.rmk (update-grub): Rename to ...
74 (grub-mkconfig): ... this.
75 (update-grub_lib): Copy to ...
76 (grub-mkconfig_lib): ... this.
77 (update-grub_SCRIPTS): Copy to ...
78 (grub-mkconfig_SCRIPTS): ... this. Update all users.
79 (update-grub_DATA): Rename to ...
80 (grub-mkconfig_DATA): ... this.
82 2008-09-28 Robert Millan <rmh@aybabtu.com>
84 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
85 to `modified'. Add the real `created' field.
86 (grub_iso9660_uuid): Use `modified' rather than `created' for
87 constructing the UUID.
89 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
91 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
92 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
94 2008-09-28 Bean <bean123ch@gmail.com>
96 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
97 Thanks to Christian Franke for finding this bug.
99 2008-09-25 Robert Millan <rmh@aybabtu.com>
101 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
102 instances of grub_util_get_disk_name() (see previous commit).
104 2008-09-25 Robert Millan <rmh@aybabtu.com>
106 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
107 `util/i386/get_disk_name.c'.
108 * conf/i386-efi.rmk: Likewise.
109 * conf/x86_64-efi.rmk: Likewise.
110 * conf/i386-coreboot.rmk: Likewise.
111 * conf/i386-ieee1275.rmk: Likewise.
112 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
113 `util/ieee1275/get_disk_name.c'.
114 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
115 * util/ieee1275/get_disk_name.c: Remove file.
116 * util/i386/get_disk_name.c: Remove file.
117 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
118 "hd%d" for device.map entries, rather than using
119 grub_util_get_disk_name().
121 2008-09-24 Carles Pina i Estany <carles@pina.cat>
123 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
125 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
127 2008-09-24 Carles Pina i Estany <carles@pina.cat>
129 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
131 (GRUB_TERM_PPAGE): Changed to 0x4900.
133 2008-09-24 Robert Millan <rmh@aybabtu.com>
135 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
136 macros (they were i386-pc specific).
137 * include/grub/sparc64/ieee1275/console.h: Likewise.
138 * include/grub/efi/console.h: Likewise.
140 2008-09-22 Bean <bean123ch@gmail.com>
142 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
143 resident and in attribute list.
145 * include/grub/ntfs.h (BMP_LEN): Removed.
147 2008-09-22 Bean <bean123ch@gmail.com>
149 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
150 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
152 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
153 error occurs, as grub_disk_open will call grub_disk_close, which will
154 call p->close (scsi).
156 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
158 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
159 (AC_PREREQ): Bumped to 2.59.
160 (AC_TRY_COMPILE): Replace obsolete macro with ...
161 (AC_COMPILE_IFELSE): ... this.
162 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
163 (AC_LINK_IFELSE): ... this.
165 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
167 * autogen.sh: Add a call to `gendistlist.sh'.
169 2008-09-19 Christian Franke <franke@computer.org>
171 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
172 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
173 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
174 Export __enable_execute_stack() to modules.
175 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
178 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
180 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
183 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
185 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
186 #include <grub/util/hostdisk.h>.
188 2008-09-08 Robert Millan <rmh@aybabtu.com>
190 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
191 segments when their filesz is zero (grub_file_read() interprets
192 zero-size as "read until EOF", which results in memory corruption).
193 Use `lowest_segment' rather than 0 for calculating the current
194 segment load address.
196 2008-09-08 Robert Millan <rmh@aybabtu.com>
198 * util/hostdisk.c (open_device): Replace a grub_util_info() call
199 with grub_dprintf("hostdisk", ...), as it was so verbose that it
200 clobbered useful information.
202 2008-09-08 Robert Millan <rmh@aybabtu.com>
204 * include/grub/util/biosdisk.h: Move to ...
205 * include/grub/util/hostdisk.h: ... here. Update all users.
206 * util/biosdisk.c: Move to ...
207 * util/hostdisk.c: ... here. Update all users.
209 2008-09-07 Robert Millan <rmh@aybabtu.com>
211 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
213 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
214 and length can be stored directly in the `mbi->mmap_addr' and
215 `mbi->mmap_length' struct fields.
217 2008-09-07 Robert Millan <rmh@aybabtu.com>
219 * conf/i386.rmk: New file. Provides declaration for building
221 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
222 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
224 Include `conf/i386.mk'.
225 * conf/i386-efi.rmk: Likewise.
226 * conf/x86_64-efi.rmk: Likewise.
227 * conf/i386-coreboot.rmk: Likewise.
228 * conf/i386-ieee1275.rmk: Likewise.
230 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
232 Based on patch created by Colin D Bennett <colin@gibibit.com>.
233 Adds optimization support for BGR based modes.
235 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
236 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
237 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
238 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
239 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
240 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
241 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
242 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
243 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
244 (grub_video_i386_vbeblit_index_index): Likewise.
245 (grub_video_i386_vbeblit_replace_directN): Added.
246 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
247 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
248 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
249 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
250 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
251 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
252 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
253 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
254 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
255 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
256 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
257 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
258 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
260 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
261 (grub_video_i386_vbefill_R8G8B8): Likewise.
262 (grub_video_i386_vbefill_index): Likewise.
263 (grub_video_i386_vbefill_direct32): Added.
264 (grub_video_i386_vbefill_direct24): Likewise.
265 (grub_video_i386_vbefill_direct16): Likewise.
266 (grub_video_i386_vbefill_direct8): Likewise.
268 * include/grub/video.h (grub_video_blit_format): Removed
269 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
270 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
271 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
272 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
273 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
275 * video/video.c (grub_video_get_blit_format): Updated to use new
276 blit formats. Added handling for 16 bit color modes.
278 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
280 (common_blitter): Updated to use new blitters.
282 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
284 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
285 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
286 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
287 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
288 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
289 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
290 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
291 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
292 (grub_video_i386_vbeblit_index_index): Likewise.
293 (grub_video_i386_vbeblit_replace_directN): Added.
294 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
295 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
296 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
297 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
298 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
299 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
300 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
301 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
302 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
303 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
304 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
305 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
306 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
308 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
309 (grub_video_i386_vbefill_R8G8B8): Likewise.
310 (grub_video_i386_vbefill_index): Likewise.
311 (grub_video_i386_vbefill_direct32): Added.
312 (grub_video_i386_vbefill_direct24): Likewise.
313 (grub_video_i386_vbefill_direct16): Likewise.
314 (grub_video_i386_vbefill_direct8): Likewise.
316 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
319 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
322 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
325 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
328 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
330 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
333 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
335 * fs/iso9660.c (grub_iso9660_date): New structure.
336 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
337 (grub_iso9660_uuid): New function.
339 2008-09-05 Bean <bean123ch@gmail.com>
341 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
343 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
344 insensitive bit for names in Win32 and Win32 & DOS namespace.
346 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
348 * include/grub/types.h (LONG_MAX): Likewise.
350 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
352 * util/getroot.c: Include <config.h>.
353 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
354 add support for /dev/md/N devices and handle LVM double dash escaping.
356 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
358 * config.guess: Update to latest version from config git.
359 * config.sub: Likewise.
361 2008-09-03 Robert Millan <rmh@aybabtu.com>
363 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
364 `disk->total_sectors'.
366 2008-09-01 Colin D Bennett <colin@gibibit.com>
368 * include/grub/normal.h: Fixed incorrect comment for
369 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
371 2008-09-01 Colin D Bennett <colin@gibibit.com>
373 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
376 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
377 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
378 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
379 (GRUB_VBE_MODEATTR_COLOR): Likewise.
380 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
381 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
382 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
383 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
384 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
385 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
386 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
387 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
388 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
389 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
390 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
391 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
392 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
393 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
394 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
396 2008-08-31 Robert Millan <rmh@aybabtu.com>
398 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
400 (grub_multiboot): Fix a few warnings.
402 2008-08-31 Robert Millan <rmh@aybabtu.com>
404 * loader/i386/pc/multiboot.c: Update comment not to say that
405 boot_device support is unimplemented.
407 2008-08-31 Robert Millan <rmh@aybabtu.com>
409 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
410 or memory map support are unimplemented.
412 2008-08-31 Colin D Bennett <colin@gibibit.com>
414 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
416 2008-08-31 Colin D Bennett <colin@gibibit.com>
418 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
419 total video memory in 'vbeinfo' output; show color format details for
422 2008-08-30 Pavel Roskin <proski@gnu.org>
424 * util/genmoddep.c: Remove for real this time.
425 * DISTLIST: Remove util/genmoddep.c.
427 2008-08-30 Robert Millan <rmh@aybabtu.com>
429 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
430 as required by Multiboot spec (it was already 4-byte aligned, but
433 2008-08-29 Pavel Roskin <proski@gnu.org>
435 * kern/powerpc/ieee1275/crt0.S: Rename to ...
436 * kern/powerpc/ieee1275/startup.S: ... this.
437 * conf/powerpc-ieee1275.rmk: Adjust for the above.
438 * DISTLIST: Likewise.
440 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
441 grub/cpu/kernel.h. Add start label for consistency with other
442 platforms. Add grub_prefix immediately after start. Add jump
443 to the code after grub_prefix.
444 * include/grub/powerpc/kernel.h: Provide valid values for
445 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
447 2008-08-29 Bean <bean123ch@gmail.com>
449 * configure.ac: Change host_os to cygwin for mingw.
450 (asprintf): New check for function.
452 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
453 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
455 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
456 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
457 sync, sleep and grub_util_get_disk_size for mingw.
459 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
460 to get size in mingw.
461 (open_device): Use flag O_BINARY if it's defined.
462 (find_root_device): Add dummy code for mingw.
464 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
465 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
466 (get_scsi_disk_name): Return 0 for mingw.
468 * util/hostfs.c: #include <grub/util/misc.h>.
469 (grub_hostfs_open): Use "rb" flag to open file, use
470 grub_util_get_disk_size to get disk size for mingw.
472 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
473 (asprintf): New function if HAVE_ASPRINTF is not set.
474 (sync): New function for mingw.
476 (grub_util_get_disk_size): Likewise.
478 2008-08-28 Pavel Roskin <proski@gnu.org>
480 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
483 2008-08-28 Robert Millan <rmh@aybabtu.com>
485 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
487 2008-08-28 Robert Millan <rmh@aybabtu.com>
489 Change find_grub_drive() syntax so it doesn't prevent it from
490 detecting NULL names as errors.
492 * util/biosdisk.c (find_grub_drive): Move free slot search code
494 (find_free_slot): ... to here.
495 (read_device_map): Use find_free_slot() to search for free slots.
497 2008-08-27 Marco Gerards <marco@gnu.org>
499 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
500 (scsi_mod_SOURCES): New variable.
501 (scsi_mod_CFLAGS): Likewise
502 (scsi_mod_LDFLAGS): Likewise.
504 * disk/scsi.c: New file.
506 * include/grub/scsi.h: Likewise.
508 * include/grub/scsicmd.h: Likewise.
510 * disk/ata.c: Include <grub/scsi.h>.
511 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
513 (grub_ata_iterate): Skip ATAPI devices.
514 (grub_ata_open): Only handle ATAPI devices.
515 (struct grub_atapi_read): Removed.
516 (grub_atapi_readsector): Likewise.
517 (grub_ata_read): No longer handle ATAPI devices.
518 (grub_ata_write): Likewise.
519 (grub_atapi_iterate): New function.
520 (grub_atapi_read): Likewise.
521 (grub_atapi_write): Likewise.
522 (grub_atapi_open): Likewise.
523 (grub_atapi_close): Likewise.
524 (grub_atapi_dev): New variable.
525 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
526 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
528 * include/grub/disk.h (enum grub_disk_dev_id): Add
529 `GRUB_DISK_DEVICE_SCSI_ID'.
531 2008-08-26 Robert Millan <rmh@aybabtu.com>
533 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
534 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
537 2008-08-23 Bean <bean123ch@gmail.com>
539 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
540 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
541 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
542 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
544 (raid5rec_mod_SOURCES): New macro.
545 (raid5rec_mod_CFLAGS): Likewise.
546 (raid5rec_mod_LDFLAGS): Likewise.
547 (raid6rec_mod_SOURCES): Likewise.
548 (raid6rec_mod_CFLAGS): Likewise.
549 (raid6rec_mod_LDFLAGS): Likewise.
550 (mdraid_mod_SOURCES): Likewise.
551 (mdraid_mod_CFLAGS): Likewise.
552 (mdraid_mod_LDFLAGS): Likewise.
553 (dm_nv_mod_SOURCES): Likewise.
554 (dm_nv_mod_CFLAGS): Likewise.
555 (dm_nv_mod_LDFLAGS): Likewise.
557 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
558 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
559 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
561 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
562 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
564 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
566 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
568 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
570 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
572 * disk/raid5_recover.c: New file.
574 * disk/raid6_recover.c: Likewise.
576 * disk/mdraid_linux.c: Likewise.
578 * disk/dmraid_nvidia.c: Likewise.
580 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
583 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
584 calculate the size of raid device.
585 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
586 different layout of raid5.
587 (grub_raid_scan_device): Remove code specific to mdraid.
588 (grub_raid_list): New variable.
589 (free_array): New function.
590 (grub_raid_register): Likewise.
591 (grub_raid_unregister): Likewise.
592 (grub_raid_rescan): Likewise.
593 (GRUB_MOD_INIT): Don't iterate device here.
594 (GRUB_MOD_FINI): Use free_array to release resource.
596 * include/grub/raid.h: Remove macro and structure specific to mdraid.
597 (grub_raid5_recover_func_t): New function variable type.
598 (grub_raid6_recover_func_t): Likewise.
599 (grub_raid5_recover_func): New variable.
600 (grub_raid6_recover_func): Likewise.
601 (grub_raid_register): New function.
602 (grub_raid_unregister): Likewise.
603 (grub_raid_rescan): Likewise.
604 (grub_raid_block_xor): Likewise.
606 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
607 (CMD_CRC): New macro.
609 (read_file): Handle device as well as file.
610 (cmd_crc): New function.
611 (fstest): Handle multiple disks.
612 (options): Remove part, raw and long, add root and diskcount.
613 (usage): Add crc, remove -p, -r, -l, add -r and -c.
614 (main): Find the first non option entry and ignore subsequence options,
615 add handling for the new options, support multiple disks.
617 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
619 2008-08-23 Bean <bean123ch@gmail.com>
621 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
623 * genfslist.sh: Ignore kernel.mod.
625 * genpartmaplist.sh: Likewise.
627 2008-08-23 Robert Millan <rmh@aybabtu.com>
629 * util/getroot.c (find_root_device): Skip anything that starts with
630 a dot, not just directories. This avoids things like /dev/.tmp.md0.
632 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
634 * util/update-grub.in (GRUB_GFXMODE): Export variable.
635 * util/grub.d/00_header.in: Allow the administrator to change default
636 gfxmode via ${GRUB_GFXMODE}.
638 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
640 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
642 2008-08-21 Robert Millan <rmh@aybabtu.com>
644 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
646 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
647 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
649 2008-08-20 Carles Pina i Estany <carles@pina.cat>
651 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
652 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
654 2008-08-19 Robert Millan <rmh@aybabtu.com>
656 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
657 (struct grub_virtual_screen): Remove `cursor_color'.
658 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
660 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
662 2008-08-18 Robert Millan <rmh@aybabtu.com>
664 Unify (identical) linux_normal.c files.
665 * loader/i386/efi/linux_normal.c: Move from here ...
666 * loader/linux_normal.c: ... to here. Update all users.
667 * loader/i386/pc/linux_normal.c: Delete. Update all users.
668 * loader/i386/ieee1275/linux_normal.c: Likewise.
670 2008-08-18 Robert Millan <rmh@aybabtu.com>
672 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
673 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
674 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
675 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
676 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
678 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
679 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
680 (GRUB_LINUX_CL_END_OFFSET): ... to here.
681 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
682 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
683 (GRUB_EFI_CL_END_OFFSET): Rename to ...
684 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
685 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
686 Initialize `params->video_cursor_x' and `params->video_cursor_y'
687 portably using grub_getxy().
688 Replace `-EFI' with `-bzImage' in boot message.
690 2008-08-17 Robert Millan <rmh@aybabtu.com>
692 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
694 2008-08-17 Robert Millan <rmh@aybabtu.com>
696 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
698 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
699 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
700 (grub_machine_mmap_iterate): New function declaration.
701 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
703 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
706 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
707 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
708 Move e820 parsing from here ...
709 * kern/i386/pc/mmap.c: New file.
710 (grub_machine_mmap_iterate): ... to here.
712 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
713 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
714 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
715 (grub_available_iterate): Redeclare to return `void', and redeclare
716 its hook to use grub_uint64_t as addr and size parameters, and rename
718 (grub_machine_mmap_iterate): ... this. Update all users.
720 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
721 to make it more readable. Rename to ...
722 (grub_machine_mmap_iterate): ... this.
724 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
725 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
726 (grub_multiboot): Allocate an extra region after the payload, and fill
727 it with a Multiboot memory map. Adjust a.out loader to calculate size
728 with the extra space.
729 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
730 with the extra space.
732 2008-08-17 Carles Pina i Estany <carles@pina.cat>
734 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
736 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
738 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
739 mdate-sh to the list `find' searches for.
740 * DISTLIST: Regenerated.
742 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
744 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
745 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
746 genmoddep.awk, gensymlist.sh.in.
747 (DISTDIRS): Add bus, docs, hook, lib.
748 * DISTLIST: Regenerated.
749 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
751 2008-08-16 Robert Millan <rmh@aybabtu.com>
753 * disk/raid.c (grub_raid_init): Handle/report errors set by
754 grub_device_iterate().
755 * disk/lvm.c (grub_lvm_init): Likewise.
757 2008-08-15 Bean <bean123ch@gmail.com>
759 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
761 (datetime_mod_SOURCES): New macro.
762 (datetime_mod_CFLAGS): Likewise.
763 (datetime_mod_LDFLAGS): Likewise.
764 (date_mod_SOURCES): Likewise.
765 (date_mod_CFLAGS): Likewise.
766 (date_mod_LDFLAGS): Likewise.
767 (datehook_mod_SOURCES): Likewise.
768 (datehook_mod_CFLAGS): Likewise.
769 (datehook_mod_LDFLAGS): Likewise.
771 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
773 (datetime_mod_SOURCES): New macro.
774 (datetime_mod_CFLAGS): Likewise.
775 (datetime_mod_LDFLAGS): Likewise.
776 (date_mod_SOURCES): Likewise.
777 (date_mod_CFLAGS): Likewise.
778 (date_mod_LDFLAGS): Likewise.
779 (datehook_mod_SOURCES): Likewise.
780 (datehook_mod_CFLAGS): Likewise.
781 (datehook_mod_LDFLAGS): Likewise.
783 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
785 (datetime_mod_SOURCES): New macro.
786 (datetime_mod_CFLAGS): Likewise.
787 (datetime_mod_LDFLAGS): Likewise.
788 (date_mod_SOURCES): Likewise.
789 (date_mod_CFLAGS): Likewise.
790 (date_mod_LDFLAGS): Likewise.
791 (datehook_mod_SOURCES): Likewise.
792 (datehook_mod_CFLAGS): Likewise.
793 (datehook_mod_LDFLAGS): Likewise.
795 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
797 (datetime_mod_SOURCES): New macro.
798 (datetime_mod_CFLAGS): Likewise.
799 (datetime_mod_LDFLAGS): Likewise.
800 (date_mod_SOURCES): Likewise.
801 (date_mod_CFLAGS): Likewise.
802 (date_mod_LDFLAGS): Likewise.
803 (datehook_mod_SOURCES): Likewise.
804 (datehook_mod_CFLAGS): Likewise.
805 (datehook_mod_LDFLAGS): Likewise.
807 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
809 (datetime_mod_SOURCES): New macro.
810 (datetime_mod_CFLAGS): Likewise.
811 (datetime_mod_LDFLAGS): Likewise.
812 (date_mod_SOURCES): Likewise.
813 (date_mod_CFLAGS): Likewise.
814 (date_mod_LDFLAGS): Likewise.
815 (datehook_mod_SOURCES): Likewise.
816 (datehook_mod_CFLAGS): Likewise.
817 (datehook_mod_LDFLAGS): Likewise.
819 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
821 * commands/date.c: New file.
823 * hook/datehook.c: Likewise.
825 * include/grub/lib/datetime.h: Likewise.
827 * include/grub/i386/cmos.h: Likewise.
829 * lib/datetime.c: Likewise.
831 * lib/i386/datetime.c: Likewise.
833 * lib/efi/datetime.c: Likewise.
835 2008-08-14 Robert Millan <rmh@aybabtu.com>
837 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
838 (grub_mkelfimage_SOURCES): New variable.
839 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
841 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
842 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
843 * conf/powerpc-ieee1275.rmk: Likewise.
844 * conf/i386-ieee1275.rmk: Likewise.
846 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
847 * kern/i386/coreboot/init.c: Likewise.
849 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
850 with `<grub/cpu/kernel.h>'.
851 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
853 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
854 * kern/i386/coreboot/startup.S: Likewise.
856 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
857 (GRUB_MOD_GAP): Remove.
858 * include/grub/powerpc/kernel.h: New file.
859 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
860 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
861 * include/grub/i386/kernel.h: New file.
862 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
863 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
864 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
866 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
868 Use --directory when invoking grub_mkimage.
870 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
871 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
872 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
873 and GRUB_KERNEL_CPU_PREFIX.
875 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
877 * include/grub/err.h (grub_err_printf): New function prototype.
878 * util/misc.c (grub_err_printf): New function.
879 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
881 * kern/err.c (grub_print_error): Use grub_err_printf.
883 2008-08-13 Robert Millan <rmh@aybabtu.com>
885 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
887 2008-08-13 Robert Millan <rmh@aybabtu.com>
889 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
892 2008-08-12 Robert Millan <rmh@aybabtu.com>
894 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
895 of the relocation code from here ...
896 (grub_multiboot): ... to here.
897 (forward_relocator, backward_relocator): Move from here ...
898 * kern/i386/loader.S (grub_multiboot_forward_relocator)
899 (grub_multiboot_backward_relocator): ... to here.
900 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
901 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
902 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
903 (grub_multiboot_forward_relocator_end)
904 (grub_multiboot_backward_relocator)
905 (grub_multiboot_backward_relocator_end): New variables.
907 2008-08-12 Bean <bean123ch@gmail.com>
909 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
911 2008-08-11 Robert Millan <rmh@aybabtu.com>
913 * kern/i386/linuxbios/startup.S: Move from here ...
914 * kern/i386/coreboot/startup.S: ... to here.
916 * kern/i386/linuxbios/init.c: Move from here ...
917 * kern/i386/coreboot/init.c: ... to here.
919 * kern/i386/linuxbios/table.c: Move from here ...
920 * kern/i386/coreboot/mmap.c: ... to here.
922 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
924 2008-08-11 Robert Millan <rmh@aybabtu.com>
926 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
927 errors. Leave it to the upper layer to handle them.
929 2008-08-09 Christian Franke <franke@computer.org>
931 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
932 * conf/common.rmk: Install `grub-pe2elf' only if requested.
933 Install `grub.d/10_windows' only on Cygwin.
934 * configure.ac: Add subst of `target_os'.
935 Check `target_os' also before setting TARGET_OBJ2ELF.
936 Add `--enable-grub-pe2elf'.
938 2008-08-08 Robert Millan <rmh@aybabtu.com>
940 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
941 (grub_last_time): Change type to grub_uint64_t.
942 (grub_disk_open): Migrate code from to using grub_get_time_ms().
943 (grub_disk_close): Likewise.
945 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
946 (run_menu): Migrate code from to using grub_get_time_ms().
948 * util/misc.c (grub_get_time_ms): New function.
950 2008-08-08 Marco Gerards <marco@gnu.org>
952 * disk/ata.c (grub_ata_regget): Change return type to
954 (grub_ata_regget2): Likewise.
955 (grub_ata_wait_status): New function.
956 (grub_ata_wait_busy): Removed function, updated all users to use
957 `grub_ata_wait_status'.
958 (grub_ata_wait_drq): Likewise.
959 (grub_ata_cmd): New function.
960 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
962 (grub_ata_pio_write): Add error handling.
963 (grub_atapi_identify): Likewise.
964 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
966 (grub_ata_identify): Use `grub_ata_cmd' and improve error
967 handling. Actually use the detected registers. Reorder the
968 detection logic such that it is easier to read.
969 (grub_ata_pciinit): Do not assign the same ID to each controller.
970 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
972 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
974 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
976 2008-08-08 Marco Gerards <marco@gnu.org>
980 2008-08-07 Bean <bean123ch@gmail.com>
982 * include/grub/x86_64/pci.h: New file.
984 2008-08-07 Christian Franke <franke@computer.org>
986 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
987 (TIMER2_GATE): Likewise.
988 (grub_pit_wait): Add enable/disable of the timer2 gate
989 bit of port 0x61. This fixes a possible infinite loop.
991 2008-08-07 Bean <bean123ch@gmail.com>
993 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
994 kern/i386/tsc.c and kern/i386/pit.c.
996 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
999 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
1002 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
1004 2008-08-07 Bean <bean123ch@gmail.com>
1006 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
1008 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
1010 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
1011 multiple inclusion. Add #include <grub/types.h>.
1013 2008-08-06 Christian Franke <franke@computer.org>
1015 * conf/common.rmk: Build and install `10_windows'.
1016 * util/grub.d/10_windows.in: New script.
1018 2008-08-06 Pavel Roskin <proski@gnu.org>
1020 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
1022 2008-08-06 Robert Millan <rmh@aybabtu.com>
1024 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
1025 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
1027 2008-08-06 Bean <bean123ch@gmail.com>
1029 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
1030 (grub_pxefs_fs_int): Remove dummy definition.
1031 (grub_pxefs_open): Use data->block_size to store the current block
1033 (grub_pxefs_read): Use block size stored in data->block_size. As the
1034 value of grub_pxe_blksize can be changed after the file is opened.
1036 2008-08-06 Bean <bean123ch@gmail.com>
1038 * fs/i386/pc/pxe.c (curr_file): new variable.
1039 (grub_pxefs_open): Simply the handling of pxe file system. Don't
1040 require the dummy internal file system anymore.
1041 (grub_pxefs_read): Removed.
1042 (grub_pxefs_close): Likewise.
1043 (grub_pxefs_fs_int): Likewise.
1044 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
1045 connection when we switch file.
1046 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
1048 2008-08-06 Robert Millan <rmh@aybabtu.com>
1050 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
1052 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
1053 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
1055 * kern/i386/halt.c: New file.
1056 * kern/i386/reboot.c: Likewise.
1057 * include/grub/i386/reboot.h: Likewise.
1058 * include/grub/i386/halt.h: Likewise.
1060 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1061 Include `<grub/cpu/halt.h>'.
1062 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1063 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1065 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
1066 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
1067 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
1068 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
1069 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
1070 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
1072 * include/grub/i386/at_keyboard.h: ... to here.
1074 2008-08-05 Robert Millan <rmh@aybabtu.com>
1076 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
1077 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
1078 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
1079 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1080 `kern/generic/millisleep.c'.
1082 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
1083 instead of grub_get_rtc().
1084 (grub_tsc_init): Initialize `tsc_boot_time'.
1086 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
1087 (grub_machine_init): Use grub_tsc_init() rather than
1088 installing an RTC-based handler via grub_install_get_time_ms().
1090 * kern/i386/pit.c: New file.
1091 * include/grub/i386/pit.h: Likewise.
1093 2008-08-05 Bean <bean123ch@gmail.com>
1095 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
1097 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
1098 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
1099 (pxe_mod_SOURCES): New macro.
1100 (pxe_mod_CFLAGS): Likewise.
1101 (pxe_mod_LDFLAGS): Likewise.
1102 (pxecmd_mod_SOURCES): Likewise.
1103 (pxecmd_mod_CFLAGS): Likewise.
1104 (pxecmd_mod_LDFLAGS): Likewise.
1106 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1107 (grub_pxe_call): Likewise.
1109 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1111 * commands/i386/pc/pxecmd.c: New file.
1113 * fs/i386/pc/pxe.c: Likewise.
1115 * include/grub/i386/pc/pxe.h: Likewise.
1117 2008-08-05 Bean <bean123ch@gmail.com>
1119 * util/console.c (grub_console_cur_color): New variable.
1120 (grub_console_standard_color): Likewise.
1121 (grub_console_normal_color): Likewise.
1122 (grub_console_highlight_color): Likewise.
1123 (color_map): Likewise.
1124 (use_color): Likewise.
1125 (NUM_COLORS): New macro.
1126 (grub_ncurses_setcolorstate): Handle color properly.
1127 (grub_ncurses_setcolor): Don't change color here, just remember the
1128 settings, color will be set in grub_ncurses_setcolorstate.
1129 (grub_ncurses_getcolor): New function.
1130 (grub_ncurses_init): Initialize color pairs.
1131 (grub_ncurses_term): New member grub_ncurses_getcolor.
1133 2008-08-05 Colin D Bennett <colin@gibibit.com>
1135 High resolution timer support. Implemented for x86 CPUs using TSC.
1136 Extracted generic grub_millisleep() so it's linked in only as needed.
1137 This requires a Pentium compatible CPU; if the RDTSC instruction is
1138 not supported, then it falls back on the generic grub_get_time_ms()
1139 implementation that uses the machine's RTC.
1141 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1142 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1143 `kern/generic/millisleep.c'.
1145 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1146 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1148 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1149 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1151 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1153 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1154 `kern/generic/millisleep.c'.
1156 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1158 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1160 * kern/generic/rtc_get_time_ms.c: New file.
1162 * kern/generic/millisleep.c: New file.
1164 * kern/misc.c: Don't include
1165 <kern/time.h> anymore.
1166 (grub_millisleep_generic): Removed.
1168 * commands/sleep.c (grub_interruptible_millisleep): Uses
1169 grub_get_time_ms() instead of grub_get_rtc().
1171 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
1173 (grub_cpu_is_cpuid_supported): New inline function.
1174 (grub_cpu_is_tsc_supported): New inline function.
1175 (grub_tsc_init): New function prototype.
1176 (grub_tsc_get_time_ms): New function prototype.
1178 * kern/i386/tsc.c (grub_get_time_ms): New file.
1180 * include/grub/time.h: Include <grub/types.h.
1181 (grub_millisleep_generic): Removed.
1182 (grub_get_time_ms): New prototype.
1183 (grub_install_get_time_ms): New prototype.
1184 (grub_rtc_get_time_ms): New prototype.
1186 * kern/time.c (grub_get_time_ms): New function.
1187 (grub_install_get_time_ms): New function.
1189 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
1190 <grub/time.h> anymore.
1191 (grub_millisleep): Removed.
1192 (grub_machine_init): Call grub_tsc_init.
1194 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1195 get_time_ms() implementation.
1197 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1198 (ieee1275_get_time_ms): New function.
1199 (grub_machine_init): Install get_time_ms() implementation.
1201 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1202 (grub_machine_init): Call grub_tsc_init().
1203 (grub_millisleep): Removed.
1205 * kern/ieee1275/init.c (grub_millisleep): Removed.
1206 (grub_machine_init): Install ieee1275_get_time_ms()
1208 (ieee1275_get_time_ms): New function.
1209 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1212 2008-08-05 Marco Gerards <marco@gnu.org>
1214 * disk/ata.c: Include <grub/pci.h>.
1215 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1216 (grub_ata_initialize): Rewritten.
1217 (grub_ata_device_initialize): New function.
1219 2008-08-04 Pavel Roskin <proski@gnu.org>
1221 * kern/main.c: Include grub/mm.h.
1223 2008-08-04 Robert Millan <rmh@aybabtu.com>
1225 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1226 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1227 corruption problem).
1229 2008-08-04 Robert Millan <rmh@aybabtu.com>
1231 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1232 warnings introduced in my last commit.
1234 2008-08-03 Robert Millan <rmh@aybabtu.com>
1236 Make PCI available on all i386 architectures.
1238 * include/grub/i386/pc/pci.h: Move from here ...
1239 * include/grub/i386/pci.h: ... to here.
1241 * include/grub/i386/pc/pci.h: Remove.
1242 * include/grub/i386/efi/pci.h: Remove.
1243 * include/grub/x86_64/efi/pci.h: Remove.
1245 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1248 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1249 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1250 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1252 * conf/i386-ieee1275.rmk: Likewise.
1254 2008-08-03 Robert Millan <rmh@aybabtu.com>
1256 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1257 (grub_console_setcursor): Make it possible to set cursor off.
1259 2008-08-03 Robert Millan <rmh@aybabtu.com>
1261 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
1262 of modules instead of assuming which platform provides what.
1263 * util/update-grub.in: Likewise.
1265 2008-08-03 Robert Millan <rmh@aybabtu.com>
1267 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1268 instead of `grub_install_dos_part' to determine whether a drive needs
1269 to be prepended to prefix (`grub_install_dos_part' is not reliable,
1270 because it can be overridden when loading GRUB via Multiboot).
1272 2008-08-02 Robert Millan <rmh@aybabtu.com>
1274 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1276 2008-08-02 Robert Millan <rmh@aybabtu.com>
1278 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1279 of informational grub_dprintf() calls.
1281 2008-08-02 Robert Millan <rmh@aybabtu.com>
1283 * disk/memdisk.c (memdisk_size): Don't initialize.
1284 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
1286 * include/grub/i386/pc/kernel.h
1287 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
1288 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
1289 (grub_memdisk_image_size, grub_arch_memdisk_addr)
1290 (grub_arch_memdisk_size): Remove.
1292 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
1293 field (was only used to transfer a constant). Add `type' field to
1294 support multiple module types.
1295 (grub_module_iterate): New function.
1297 * kern/device.c (grub_device_open): Do not hide error messages
1298 when grub_disk_open() fails. Use grub_print_error() instead.
1300 * kern/i386/pc/init.c (grub_arch_modules_addr)
1301 (grub_arch_memdisk_size): Remove functions.
1302 (grub_arch_modules_addr): Return the module address in high memory
1303 (now that it isn't copied anymore).
1305 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
1306 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
1307 decompression routine (grub_total_module_size already includes that
1308 now). Don't copy modules back to low memory.
1310 * kern/main.c: Include `<grub/mm.h>'.
1311 (grub_load_modules): Split out (and use) ...
1312 (grub_module_iterate): ... this function, which iterates through
1313 module objects and runs a hook.
1314 Comment out grub_mm_init_region() call, as it would cause non-ELF
1315 modules to be overwritten.
1317 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
1318 the memdisk image in its own region, make it part of the module list.
1319 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
1320 (main): Parse --memdisk|-m option, and pass user-provided path as
1321 parameter to generate_image().
1322 (add_segments): Pass `memdisk_path' down to load_modules().
1323 (load_modules): Embed memdisk image in module section when requested.
1324 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
1325 `header.type' instead of `header.offset'.
1327 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
1328 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
1329 (memdisk_mod_LDFLAGS): New variables.
1330 * conf/i386-coreboot.rmk: Likewise.
1331 * conf/i386-ieee1275.rmk: Likewise.
1333 2008-08-02 Robert Millan <rmh@aybabtu.com>
1335 * loader/i386/pc/multiboot.c (playground, forward_relocator)
1336 (backward_relocator): New variables. Used to allocate and relocate
1337 the payload, respectively.
1338 (grub_multiboot_load_elf32): Load into heap instead of requested
1339 address, install the appropriate relocator code in each bound of
1340 the payload, and set the entry point such that
1341 grub_multiboot_real_boot() will jump to one of them.
1343 * kern/i386/loader.S (grub_multiboot_payload_size)
1344 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1345 (grub_multiboot_payload_entry_offset): New variables.
1346 (grub_multiboot_real_boot): Set cpu context to what the relocator
1347 expects, and jump to the relocator instead of the payload.
1349 * include/grub/i386/loader.h (grub_multiboot_payload_size)
1350 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1351 (grub_multiboot_payload_entry_offset): Export.
1353 2008-08-01 Bean <bean123ch@gmail.com>
1355 * normal/menu_entry.c (editor_getline): Don't return the original
1356 string as result, as it will be released by lexer once it has done
1359 2008-08-01 Robert Millan <rmh@aybabtu.com>
1361 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
1362 within menuentries, not before them.
1363 util/grub.d/10_hurd.in: Likewise.
1365 2008-08-01 Bean <bean123ch@gmail.com>
1367 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
1368 (bufio_mod_SOURCES): New macro.
1369 (bufio_mod_CFLAGS): Likewise.
1370 (bufio_mod_LDFLAGS): Likewise.
1372 * include/grub/bufio.h: New file.
1374 * io/bufio.c: Likewise.
1376 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
1377 (grub_video_reader_png): Use grub_buffile_open to open file.
1379 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
1380 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
1382 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
1383 (grub_video_reader_tga): Use grub_buffile_open to open file.
1385 * font/manager.c: Include <grub/bufio.h>.
1386 (add_font): Use grub_buffile_open to open file.
1388 2008-07-31 Robert Millan <rmh@aybabtu.com>
1390 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
1391 ELF segments, use a macro for arbitrarily accessing any of them instead
1392 of preparing a pointer that allows access to one at a time.
1393 (grub_multiboot_load_elf64): Likewise.
1395 2008-07-31 Bean <bean123ch@gmail.com>
1397 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
1398 GRUB_KERNEL_MACHINE_DATA_END.
1400 2008-07-30 Robert Millan <rmh@aybabtu.com>
1402 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
1403 Increase from 0x50 to 0x60.
1404 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
1405 use UUIDs to identify the root drive for them. If that's not
1407 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
1408 check, for cross-disk installs.
1410 2008-07-30 Robert Millan <rmh@aybabtu.com>
1412 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1413 is non-empty, use it to set the `prefix' environment variable instead
1414 of the usual approach.
1415 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1416 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1417 environment variable instead of dummy make_install_device().
1419 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1420 (start): Insert a data section, with `grub_prefix' variable.
1421 * kern/i386/linuxbios/startup.S: Likewise.
1423 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1424 New variable reference.
1425 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1426 New macro. Defines offset of `grub_prefix' within startup.S (relative
1428 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
1429 section within startup.S (relative to `start').
1430 * include/grub/i386/coreboot/kernel.h: Likewise.
1432 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1433 Overwrite grub_prefix with its contents, at the beginning of the
1435 (main): Understand -p|--prefix.
1437 2008-07-30 Robert Millan <rmh@aybabtu.com>
1439 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1441 2008-07-30 Robert Millan <rmh@aybabtu.com>
1443 * term/i386/pc/vga_text.c (grub_console_cls): Use
1444 grub_console_gotoxy() to go back to beginning of the screen.
1445 Found by Patrick Georgi <patrick.georgi@coresystems.de>
1447 2008-07-29 Christian Franke <franke@computer.org>
1449 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1450 Add conversion of emulated mount points on Cygwin.
1452 2008-07-29 Christian Franke <franke@computer.org>
1454 * util/update-grub.in: Add a check for admin
1456 Remove old `grub.cfg.new' before creation.
1457 Add `-f' to `mv' to handle the different filesystem
1458 semantics of Windows.
1460 2008-07-29 Bean <bean123ch@gmail.com>
1462 * normal/main.c (get_line): Fix buffer overflow bug.
1464 2008-07-28 Robert Millan <rmh@aybabtu.com>
1466 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1467 (struct grub_apple_header): New struct. Describes the layout of
1469 (apple_partition_map_iterate): Check the header magic as well as the
1470 partition magic (which was already being checked).
1472 2008-07-28 Pavel Roskin <proski@gnu.org>
1474 * genmk.rb: Add a warning to the beginning of the output that
1475 it's a generated file and should not be edited.
1477 2008-07-28 Robert Millan <rmh@aybabtu.com>
1479 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1480 with the same number are found, just use issue a warning with
1481 grub_dprintf(), as this error has been reported to be non-fatal.
1483 2008-07-27 Robert Millan <rmh@aybabtu.com>
1485 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1488 2008-07-27 Bean <bean123ch@gmail.com>
1490 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1491 (grub_fat_find_dir): Ignore case when comparing filename.
1493 2008-07-27 Bean <bean123ch@gmail.com>
1495 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1496 smallino, as it's more descriptive, and i8count can be confused with
1497 the other field count.
1498 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1501 2008-07-27 Bean <bean123ch@gmail.com>
1503 * commands/crc.c: New file.
1505 * lib/crc.c: Likewise.
1507 * include/grub/lib/crc.h: Likewise.
1509 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1511 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1512 (hexdump): Move this function to ...
1514 * lib/hexdump.c: ... here.
1516 * include/grub/hexdump.h: Renamed to ...
1518 * include/grub/lib/hexdump.h: ... this.
1520 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1522 * util/grub-editenv.c: Likewise.
1524 * include/envblk.h: Renamed to ...
1526 * include/lib/envblk.h: ... this.
1528 * util/envblk.c: Renamed to ...
1530 * lib/envblk.c: ... this.
1532 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1534 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1535 (pkglib_MODULES): Add crc.mod.
1536 (hexdump_mod_SOURCES): Add lib/hexdump.c.
1537 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1538 (crc_mod_SOURCES): New macro.
1539 (crc_mod_CFLAGS): Likewise.
1540 (crc_mod_LDFLAGS): Likewise.
1542 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1544 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1546 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1548 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1550 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1552 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
1554 * commands/help.c: Include <grub/term.h>.
1555 (TERM_WIDTH): Removed. Updated all users.
1557 2008-07-27 Pavel Roskin <proski@gnu.org>
1559 * util/getroot.c (find_root_device): Rephrase a comment to avoid
1560 spurious warnings about a comment within a comment.
1562 2008-07-25 Robert Millan <rmh@aybabtu.com>
1564 * util/getroot.c (find_root_device): Skip devices that match
1565 /dev/dm-[0-9]. This lets the real device be found for any type of
1566 abstraction (LVM, EVMS, RAID..).
1567 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1568 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
1569 device is found first, find_root_device() will now skip it.
1571 2008-07-24 Pavel Roskin <proski@gnu.org>
1573 * include/grub/types.h: Use __builtin_bswap32() and
1574 __builtin_bswap64() with gcc 4.3 and newer.
1576 2008-07-24 Christian Franke <franke@computer.org>
1578 * util/i386/pc/grub-install.in: If `--debug' is specified,
1579 pass `--verbose' to grub-setup.
1580 Abort script if make_system_path_relative_to_its_root() fails.
1582 2008-07-24 Bean <bean123ch@gmail.com>
1584 * configure.ac: Fixed a bug caused by the previous cygwin patch,
1585 variable `target_platform' should be `platform'.
1587 2008-07-24 Bean <bean123ch@gmail.com>
1589 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1590 (grub_png_init_fixed_block): New function.
1591 (grub_png_decode_image_data): Handle fixed huffman code compression.
1593 2008-07-24 Bean <bean123ch@gmail.com>
1595 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1596 (grub_pe2elf_SOURCES): New macro.
1597 (CLEANFILES): Add grub-pe2elf.
1599 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1600 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1601 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1602 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1603 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1604 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1605 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1606 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
1607 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
1608 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
1609 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
1610 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
1611 (GRUB_PE32_DT_FUNCTION): Likewise.
1612 (GRUB_PE32_REL_I386_DIR32): Likewise.
1613 (GRUB_PE32_REL_I386_REL32): Likewise.
1614 (grub_pe32_symbol): New structure.
1615 (grub_pe32_reloc): Likewise.
1617 * util/grub-pe2elf.c: New file.
1619 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
1620 start symbol in non pc platform.
1622 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
1624 The following patches are from Christian Franke.
1626 * include/grub/dl.h: Remove .previous, gas supports this only
1629 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
1630 Remove .type, gas supports this only for ELF format.
1632 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
1633 nullbytes in symbol table. This fixes an infinite loop if table is
1636 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
1637 TARGET_IMG_LDFLAGS and EXEEXT.
1639 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
1640 TARGET_IMG_LDFLAGS_AC.
1641 (grub_CHECK_STACK_ARG_PROBE): New function.
1643 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
1645 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
1647 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
1648 to set TARGET_IMG_LD* accordingly.
1649 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
1650 Add call to grub_CHECK_STACK_ARG_PROBE.
1651 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
1653 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
1655 * genmk.rb: Add EXEEXT to CLEANFILES.
1657 2008-07-23 Robert Millan <rmh@aybabtu.com>
1659 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
1660 define the codes for arrows and lines used for the menu).
1661 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
1664 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
1665 fonts, because the latter are too slow.
1667 2008-07-21 Bean <bean123ch@gmail.com>
1669 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
1670 a20. Run keyboard test last, as it will cause macbook to halt.
1672 2008-07-18 Pavel Roskin <proski@gnu.org>
1674 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
1675 load foreign architecture modules correctly anyway. Keep
1676 support for loading host architecture modules, whether we
1677 compile them or not.
1679 2008-07-17 Pavel Roskin <proski@gnu.org>
1681 * configure.ac: Use -m32 or -m64 regardless of whether we had to
1682 change target_cpu. The compiler default can mismatch target_cpu
1685 * disk/efi/efidisk.c: Fix format warnings on x86_64.
1686 * kern/efi/efi.c: Likewise.
1688 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
1689 target compiler is functional.
1690 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
1693 * configure.ac: Default to efi platform for x86_64-apple. Allow
1694 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
1695 adjustments from the rest, only do them if target is not
1696 explicitly given. Merge other adjustments with the final sanity
1697 check. Remove an extraneous check for supported CPU. Be
1698 specific which CPU and which platform is not supported.
1700 * configure.ac: Default to pc platform for x86_64.
1702 2008-07-17 Robert Millan <rmh@aybabtu.com>
1704 Partial LinuxBIOS -> Coreboot rename.
1706 * conf/i386-linuxbios.rmk: Renamed to ...
1707 * conf/i386-coreboot.rmk: ... this.
1708 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
1709 * configure.ac: Accept "coreboot" as input platform (but maintain
1710 compatibility with "linuxbios").
1711 * include/grub/i386/linuxbios: Renamed to ...
1712 * include/grub/i386/coreboot: ... this.
1714 2008-07-17 Bean <bean123ch@gmail.com>
1716 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
1717 (appleldr_mod_SOURCE): New variable.
1718 (appleldr_mod_CFLAGS): Likewise.
1719 (appleldr_mod_LDFLAGS): Likewise.
1720 (pci_mod_SOURCES): Likewise.
1721 (pci_mod_CFLAGS): Likewise.
1722 (pci_mod_LDFLAGS): Likewise.
1723 (lspci_mod_SOURCES): Likewise.
1724 (lspci_mod_CFLAGS): Likewise.
1725 (lspci_mod_LDFLAGS): Likewise.
1727 * conf/x86_64-efi.rmk: New file.
1729 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
1731 (grub_efidisk_write): Likewise.
1733 * include/efi/api.h (efi_call_0): New macro.
1734 (efi_call_1): Likewise.
1735 (efi_call_2): Likewise.
1736 (efi_call_3): Likewise.
1737 (efi_call_4): Likewise.
1738 (efi_call_5): Likewise.
1739 (efi_call_6): Likewise.
1741 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
1742 grub_rescue_cmd_chainloader.
1744 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
1745 (grub_pe32_optional_header): Change some fields based on i386 or
1747 (GRUB_PE32_PE32_MAGIC): Likewise.
1749 * include/grub/efi/uga_draw.h: New file.
1751 * include/grub/elf.h (STN_ABS): New constant.
1752 (R_X86_64_NONE): Relocation constant for x86_64.
1753 (R_X86_64_64): Likewise.
1754 (R_X86_64_PC32): Likewise.
1755 (R_X86_64_GOT32): Likewise.
1756 (R_X86_64_PLT32): Likewise.
1757 (R_X86_64_COPY): Likewise.
1758 (R_X86_64_GLOB_DAT): Likewise.
1759 (R_X86_64_JUMP_SLOT): Likewise.
1760 (R_X86_64_RELATIVE): Likewise.
1761 (R_X86_64_GOTPCREL): Likewise.
1762 (R_X86_64_32): Likewise.
1763 (R_X86_64_32S): Likewise.
1764 (R_X86_64_16): Likewise.
1765 (R_X86_64_PC16): Likewise.
1766 (R_X86_64_8): Likewise.
1767 (R_X86_64_PC8): Likewise.
1769 * include/grub/i386/efi/pci.h: New file.
1771 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
1772 Change it value based on platform.
1773 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
1774 (GRUB_E820_RAM): Likewise.
1775 (GRUB_E820_RESERVED): Likewise.
1776 (GRUB_E820_ACPI): Likewise.
1777 (GRUB_E820_NVS): Likewise.
1778 (GRUB_E820_EXEC_CODE): Likewise.
1779 (GRUB_E820_MAX_ENTRY): Likewise.
1780 (grub_e820_mmap): New structure.
1781 (linux_kernel_header): Change the efi field according to different
1782 kernel version, also field from linux_kernel_header.
1784 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
1786 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
1787 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
1788 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
1789 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
1790 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
1791 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
1792 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
1793 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
1794 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
1795 (GRUB_PCI_ADDR_IO_MASK): Likewise.
1797 * include/grub/x86_64/efi/kernel.h: New file.
1799 * include/grub/x86_64/efi/loader.h: Likewise.
1801 * include/grub/x86_64/efi/machine.h: Likewise.
1803 * include/grub/x86_64/efi/pci.h: Likewise.
1805 * include/grub/x86_64/efi/time.h: Likewise.
1807 * include/grub/x86_64/linux.h: Likewise.
1809 * include/grub/x86_64/setjmp.h: Likewise.
1811 * include/grub/x86_64/time.h: Likewise.
1813 * include/grub/x86_64/types.h: Likewise.
1815 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
1816 GRUB_TARGET_SIZEOF_VOID_P.
1818 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
1819 (grub_efi_locate_handle): Likewise.
1820 (grub_efi_open_protocol): Likewise.
1821 (grub_efi_set_text_mode): Likewise.
1822 (grub_efi_stall): Likewise.
1823 (grub_exit): Likewise.
1824 (grub_reboot): Likewise.
1825 (grub_halt): Likewise.
1826 (grub_efi_exit_boot_services): Likewise.
1827 (grub_get_rtc): Likewise.
1829 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
1830 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
1831 (grub_efi_allocate_pages): Wrap efi calls.
1832 (grub_efi_free_pages): Wrap efi calls.
1833 (grub_efi_get_memory_map): Wrap efi calls.
1835 * kern/x86_64/dl.c: New file.
1837 * kern/x86_64/efi/callwrap.S: Likewise.
1839 * kern/x86_64/efi/startup.S: Likewise.
1841 * loader/efi/appleloader.c: Likewise.
1843 * loader/efi/chainloader.c (cmdline): New variable.
1844 (grub_chainloader_unload): Wrap efi calls.
1845 (grub_chainloader_boot): Likewise.
1846 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
1849 * loader/efi/chainloader_normal.c (chainloader_command):
1850 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
1853 * loader/i386/efi/linux.c (allocate_pages): Change allocation
1855 (grub_e820_add_region): New function.
1856 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
1858 (grub_find_video_card): New function.
1859 (grub_linux_setup_video): New function.
1860 (grub_rescue_cmd_linux): Probe for video information.
1862 * normal/x86_64/setjmp.S: New file.
1864 * term/efi/console.c (map_char): New function.
1865 (grub_console_putchar): Map unicode char.
1866 (grub_console_checkkey): Wrap efi calls.
1867 (grub_console_getkey): Likewise.
1868 (grub_console_getwh): Likewise.
1869 (grub_console_gotoxy): Likewise.
1870 (grub_console_cls): Likewise.
1871 (grub_console_setcolorstate): Likewise.
1872 (grub_console_setcursor): Likewise.
1874 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
1876 2008-07-16 Pavel Roskin <proski@gnu.org>
1878 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
1881 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
1882 pointer, not an integer. This fixes a warning and prevents
1883 precision loss on 64-bit systems.
1884 (relocate_addresses): Remove unneeded cast.
1886 2008-07-15 Pavel Roskin <proski@gnu.org>
1888 * kern/i386/ieee1275/init.c: Include grub/cache.h.
1890 * term/ieee1275/ofconsole.c: Disable code unused on i386.
1892 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
1893 Fix comparison between signed and unsigned.
1895 * include/grub/i386/ieee1275/console.h: Declare
1896 grub_console_init() and grub_console_fini().
1898 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
1899 It's empty and unused.
1901 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
1902 beginning to avoid warnings with some compilers.
1904 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
1905 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
1907 2008-07-14 Pavel Roskin <proski@gnu.org>
1909 * kern/env.c (grub_register_variable_hook): Don't copy empty
1910 string, it leaks memory. Pass "" to grub_env_set(), it should
1911 handle constant strings.
1913 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
1914 * commands/cmp.c (grub_cmd_cmp): Likewise.
1915 * kern/dl.c (grub_dl_flush_cache): Likewise.
1916 (grub_dl_load_core): Likewise.
1917 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
1918 (grub_elf64_load_phdrs): Likewise.
1920 2008-07-13 Pavel Roskin <proski@gnu.org>
1922 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
1923 between signed and unsigned.
1924 (LzmaEnc_Finish): Fix warning about an unused parameter.
1926 2008-07-13 Bean <bean123ch@gmail.com>
1928 * Makefile.in (enable_lzo): New rule.
1930 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
1932 * configure.ac (ENABLE_LZO): New option --enable-lzo.
1934 * boot/i386/pc/lnxboot.S: #include <config.h>.
1936 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
1937 its value according to the compression algorithm used, lzo or lzma.
1939 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
1940 compression algorithm according to configure macro.
1942 * kern/i386/pc/startup.S (codestart): Likewise.
1944 * kern/i386/pc/lzma_decode.S: New file.
1946 * include/grub/lib/LzFind.h: Likewise.
1948 * include/grub/lib/LzHash.h: Likewise.
1950 * include/grub/lib/LzmaDec.h: Likewise.
1952 * include/grub/lib/LzmaEnc.h: Likewise.
1954 * include/grub/lib/LzmaTypes.h: Likewise.
1956 * lib/LzFind.c: Likewise.
1958 * lib/LzmaDec.c: Likewise.
1960 * lib/LzmaEnc.c: Likewise.
1962 2008-07-13 Bean <bean123ch@gmail.com>
1964 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
1965 (grub_ext4_extent_header): New structure.
1966 (grub_ext4_extent): Likewise.
1967 (grub_ext4_extent_idx): Likewise.
1968 (grub_ext4_find_leaf): New function.
1969 (grub_ext2_read_block): Handle extents.
1971 2008-07-12 Robert Millan <rmh@aybabtu.com>
1973 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
1975 2008-07-11 Robert Millan <rmh@aybabtu.com>
1977 * util/grub.d/40_custom.in: New file. Example on how to add custom
1978 entries to /etc/grub.d.
1979 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
1980 40_custom (implicitly, by merging all the grub.d rules).
1982 2008-07-11 Pavel Roskin <proski@gnu.org>
1984 * commands/read.c (grub_getline): Fix invalid memory access.
1985 Don't add newline to the variable value.
1987 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
1988 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
1989 (serial_hw_get_port): Check validity of the port number.
1990 (grub_cmd_serial): Check return value of serial_hw_get_port().
1992 2008-07-07 Pavel Roskin <proski@gnu.org>
1994 * boot/i386/pc/diskboot.S (notification_string): Replace
1995 "Loading kernel" with just "loading". This is shorter, less
1996 confusing and saves a few bytes for possible future changes.
1998 2008-07-05 Pavel Roskin <proski@gnu.org>
2000 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
2001 size for ATAPI devices, they are undefined. Output sector
2002 number in decimal form.
2004 * disk/ata.c: Use named constants for status bits.
2006 2008-07-04 Pavel Roskin <proski@gnu.org>
2008 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
2009 grub_addr_t before casting it to the void pointer to fix a
2010 warning. Non-addressable regions are discarded earlier.
2011 (grub_arch_modules_addr): Cast _end to grub_addr_t.
2012 * kern/i386/linuxbios/table.c: Include grub/misc.h.
2013 (check_signature): Don't shadow table_header.
2014 (grub_linuxbios_table_iterate): Cast numeric constants to
2015 grub_linuxbios_table_header_t.
2016 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
2019 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
2022 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
2023 pointer, which can cause warnings. Support 64-bit addresses.
2025 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
2026 of sizeof(long). This fixes PowerPC image generation on x86_64.
2028 2008-07-04 Robert Millan <rmh@aybabtu.com>
2030 This fixes a performance issue when pc & gpt partmap iterators
2031 didn't abort iteration even after our hook found what it was
2032 looking for (often causing expensive probes of non-existent drives).
2034 Some callers relied on previous buggy behaviour, since they would
2035 rise an error when their own hooks caused early abortion of its
2038 * kern/device.c (grub_device_open): Improve error message.
2039 * disk/lvm.c (grub_lvm_open): Likewise.
2040 * disk/raid.c (grub_raid_open): Likewise.
2042 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
2043 when hook requests it, independently of grub_errno.
2044 (pc_partition_map_probe): Do not fail when find_func() caused
2045 early abortion of pc_partition_map_iterate().
2047 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
2048 when hook requests it, independently of grub_errno.
2049 (gpt_partition_map_probe): Do not fail when find_func() caused
2050 early abortion of gpt_partition_map_iterate().
2052 * kern/partition.c (grub_partition_iterate): Abort parent iteration
2053 when hook requests it, independently of grub_errno. Do not fail when
2054 part_map_iterate_hook() caused early abortion of p->iterate().
2056 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2057 when grub_partition_iterate() returned with non-zero.
2059 2008-07-03 Pavel Roskin <proski@gnu.org>
2061 * disk/ata.c (grub_ata_pio_write): Check status before writing,
2062 like we do in grub_ata_pio_read().
2063 (grub_ata_readwrite): Always write individual sectors. Fix the
2064 sector count for the remainder.
2065 (grub_ata_write): Enable writing to ATA devices. Correctly
2066 report error for ATAPI devices.
2068 2008-07-02 Pavel Roskin <proski@gnu.org>
2070 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
2073 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
2074 for every read sector, we already increment it for the whole
2075 batch. This fixes reading more than 256 sectors at once.
2077 * util/grub-editenv.c (cmd_info): Cast argument to long
2078 explicitly. ptrdiff_t reduces to int on i386.
2080 * util/grub-editenv.c (main): Be specific which parameter is
2083 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
2084 (memdisk): Make memdisk_orig_addr a pointer.
2086 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
2087 for file offsets, use grub_off_t instead. Fix printf format
2090 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
2091 there. Real unexpected warnings should not drown in the noise
2092 about known problems.
2094 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
2095 grub_disk_addr_t for memory addresses.
2097 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
2098 explicitly to fix a warning.
2100 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
2102 * Makefile.in (MODULE_LDFLAGS): New variable.
2103 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
2104 the linker accepts --build-id=none.
2105 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
2107 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2109 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2110 those in Linux XFS code. Provide a way to access 64-bit parent
2112 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
2113 the end of struct grub_xfs_dir_header.
2115 2008-07-02 Bean <bean123ch@gmail.com>
2117 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2118 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2119 and GRUB_IEEE1275_FLAG_NO_ANSI.
2121 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2122 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2123 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2125 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2126 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2128 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2129 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2131 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2132 esc sequence on non ANSI terminal.
2133 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2135 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2138 2008-07-02 Bean <bean123ch@gmail.com>
2140 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2141 (grub_editenv_SOURCES): New variable.
2142 (pkglib_MODULES): Add loadenv.mod.
2143 (loadenv_mod_SOURCES): New variable.
2144 (loadenv_mod_CFLAGS): Likewise.
2145 (loadenv_mod_LDFLAGS): Likewise.
2147 * include/grub/envblk.h: New file.
2149 * util/envblk.c: New file.
2151 * util/grub-editenv.c: New file.
2153 * commands/loadenv.c: New file.
2155 2008-07-01 Pavel Roskin <proski@gnu.org>
2157 * include/multiboot2.h (struct multiboot_tag_module): Use char,
2158 not unsigned char. This fixes warnings and is consistent with
2161 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2163 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2165 * term/tparm.c (analyze): Always set *popcount.
2167 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2168 cast to fix a warning.
2170 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2171 cast to suppress a warning.
2173 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2174 grub_fshelp_read_file() expects.
2176 * fs/fat.c: Fix UUID calculation on big-endian systems. We
2177 write uuid as a 32-bit value in CPU byte order, so declare and
2180 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2181 long if the format specifier expects it.
2182 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2183 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2184 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2185 long to fix a warning.
2186 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2187 grub_dprintf() arguments to fix warnings.
2189 2008-06-30 Pavel Roskin <proski@gnu.org>
2191 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2192 install_bsd_part immediately before core.img is embedded or
2193 modified on disk. This fixes core.img verification if core.img
2196 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2197 core_path to calculate the blocklist.
2198 Patch from Javier Martín <lordhabbit@gmail.com>
2200 2008-06-29 Robert Millan <rmh@aybabtu.com>
2202 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
2203 block to disk block.
2204 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2205 Patch from Niels Böhm <bitbucket@arcor.de>
2207 2008-06-29 Robert Millan <rmh@aybabtu.com>
2209 * util/update-grub_lib.in (font_path): Search for fonts in
2210 /boot/grub first, which is more likely to be readable (we aren't
2211 deciding where fonts live, just looking for them).
2213 2008-06-26 Pavel Roskin <proski@gnu.org>
2215 * util/biosdisk.c (read_device_map): Don't leave dead map
2216 entries for devices failing stat() check.
2218 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2219 core_path_dev for the core.img path on the target device.
2221 2008-06-26 Robert Millan <rmh@aybabtu.com>
2223 * disk/fs_uuid.c: New file.
2224 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2225 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2226 (fs_uuid_mod_LDFLAGS): New variables.
2227 * include/grub/disk.h (grub_disk_dev_id): Add
2228 `GRUB_DISK_DEVICE_UUID_ID'.
2229 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2230 implement iterate().
2232 2008-06-26 Robert Millan <rmh@aybabtu.com>
2234 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2235 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2236 Linux image includes no initrd.
2238 2008-06-21 Javier Martín <lordhabbit@gmail.com>
2240 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2241 call to resolve the core image location that effectively appended the
2244 2008-06-21 Robert Millan <rmh@aybabtu.com>
2246 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2249 * util/grub.d/10_hurd.in: ... to here ...
2250 * util/grub.d/10_linux.in: ... and here.
2252 2008-06-19 Robert Millan <rmh@aybabtu.com>
2254 * kern/main.c (grub_main): Export `prefix' variable immediately
2255 after it has been set by grub_machine_set_prefix().
2257 2008-06-19 Robert Millan <rmh@aybabtu.com>
2259 * commands/search.c (search_label, search_fs_uuid, search_file): Print
2260 search result when not saving to variable, not the other way around.
2261 When saving to variable, abort iteration as soon as a match is found.
2263 2008-06-19 Robert Millan <rmh@aybabtu.com>
2265 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2266 check for partition that provides /boot/grub. Its logic is flawed,
2267 as it prevents prepare_grub_to_access_device() from being called
2270 2008-06-19 Robert Millan <rmh@aybabtu.com>
2272 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2273 "insmod" command directly when abstraction modules are needed,
2274 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
2275 since it had already been processed).
2277 2008-06-19 Pavel Roskin <proski@gnu.org>
2279 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2280 changed. This is needed in case GRUB_LIBDIR changes.
2281 * conf/i386-ieee1275.rmk: Likewise.
2282 * conf/i386-linuxbios.rmk: Likewise.
2283 * conf/i386-pc.rmk: Likewise.
2284 * conf/powerpc-ieee1275.rmk: Likewise.
2286 2008-06-18 Pavel Roskin <proski@gnu.org>
2288 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
2289 kernel_elf_symlist.c to symlist.c for consistency with other
2290 architectures. Update all users.
2291 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2293 2008-06-18 Robert Millan <rmh@aybabtu.com>
2295 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
2298 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
2299 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
2300 a RAID device, run setup() for all members independently on whether
2301 LVM abstraction is being used.
2302 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
2303 If grub-mkimage has set `*install_dos_part == -2', don't override this
2305 Perform *install_dos_part adjustments independently on whether
2306 we're embedding or not.
2307 Clarify error message when image is too big for embedding.
2308 Remove duplicate *install_dos_part stanza.
2310 2008-06-17 Robert Millan <rmh@aybabtu.com>
2312 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
2313 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
2315 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
2316 values in grub_ofconsole_normal_color and
2317 grub_ofconsole_highlight_color (they're not directly related to
2318 background and foreground).
2319 (grub_ofconsole_setcolorstate): Extract background and foreground
2320 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
2322 2008-06-17 Robert Millan <rmh@aybabtu.com>
2324 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
2325 /boot/grub for the check in last commit, not /boot (they could be
2326 different partitions).
2328 2008-06-16 Robert Millan <rmh@aybabtu.com>
2330 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
2331 asked to setup access for the same partition that provides /boot,
2332 don't bother using UUIDs since our root already has the value we
2335 2008-06-16 Robert Millan <rmh@aybabtu.com>
2337 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
2339 Patch from Sven Mueller <sven@debian.org>.
2341 2008-06-16 Robert Millan <rmh@aybabtu.com>
2343 * util/update-grub.in: Check for $EUID instead of $UID.
2344 Reported by Vincent Zweije.
2346 2008-06-16 Bean <bean123ch@gmail.com>
2348 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
2349 (grub_ext2_read_block): Likewise.
2350 (grub_ext2_read_inode): Likewise.
2351 (grub_ext2_mount): Likewise.
2352 (grub_ext2_close): Likewise.
2353 (grub_ext3_get_journal): Removed.
2355 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
2356 (grub_reiserfs_read_symlink): Likewise.
2357 (grub_reiserfs_mount): Likewise.
2358 (grub_reiserfs_open): Likewise.
2359 (grub_reiserfs_read): Likewise.
2360 (grub_reiserfs_close): Likewise.
2361 (grub_reiserfs_get_journal): Removed.
2363 * fs/fshelp.c (grub_fshelp_read): Removed.
2364 (grub_fshelp_map_block): Likewise.
2366 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
2367 (grub_fshelp_journal): Likewise.
2368 (grub_fshelp_read): Likewise.
2369 (grub_fshelp_map_block): Likewise.
2371 2008-06-16 Pavel Roskin <proski@gnu.org>
2373 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
2374 floating point anymore.
2375 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
2377 2008-06-15 Pavel Roskin <proski@gnu.org>
2379 * commands/ls.c (grub_ls_list_files): Use integer calculations
2380 for human readable format, avoid floating point use.
2381 * kern/misc.c (grub_ftoa): Remove.
2382 (grub_vsprintf): Remove floating point support.
2384 2008-06-15 Robert Millan <rmh@aybabtu.com>
2386 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
2388 Reported by Max Vozeler.
2390 2008-06-15 Robert Millan <rmh@aybabtu.com>
2392 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
2393 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
2395 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
2396 the beginning of the prefix.
2398 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
2399 It is assumed that if we have a memdisk, grub-mkimage has set
2400 grub_prefix to include the "(memdisk)" drive in it.
2402 2008-06-15 Robert Millan <rmh@aybabtu.com>
2404 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
2405 Initialize keyboard controller after registering the terminal, so that
2406 grub_printf() can be called from grub_keyboard_controller_init().
2408 2008-06-15 Robert Millan <rmh@aybabtu.com>
2410 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2411 extent-btree which is written as big endian on disk.
2412 Reported by Alain Greppin <al@chilibi.org>.
2414 2008-06-14 Robert Millan <rmh@aybabtu.com>
2416 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2417 * util/i386/pc/grub-install.in (modules): Likewise.
2419 2008-06-13 Pavel Roskin <proski@gnu.org>
2421 * commands/ls.c (grub_ls_list_files): Fix format warnings.
2423 2008-06-13 Bean <bean123ch@gmail.com>
2425 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2427 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2429 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2430 to indicate sparse block.
2432 2008-06-12 Pavel Roskin <proski@gnu.org>
2434 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2435 number, grub_fshelp_read() does it for us.
2437 * fs/fshelp.c (grub_fshelp_read): New function. Implement
2438 linear disk read with journal translation.
2439 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2440 * include/grub/fshelp.h: Declare grub_fshelp_read().
2442 2008-06-09 Pavel Roskin <proski@gnu.org>
2444 * fs/minix.c (grub_minix_mount): Handle error reading
2447 2008-06-08 Robert Millan <rmh@aybabtu.com>
2449 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2450 don't append the RAID prefix afterwards.
2451 Reported by Clint Adams.
2453 2008-06-08 Robert Millan <rmh@aybabtu.com>
2455 Based on description from Pavel:
2456 * kern/disk.c (grub_disk_check_range): Rename to ...
2457 (grub_disk_adjust_range): ... this. Add a comment explaining the
2458 tasks performed by this function.
2460 2008-06-08 Robert Millan <rmh@aybabtu.com>
2462 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2463 `num_serial' (for consistency with other variables).
2464 (struct grub_ntfs_data): Add `uuid' member.
2465 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2466 (grub_ntfs_uuid): New function.
2467 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2469 2008-06-07 Pavel Roskin <proski@gnu.org>
2471 * util/biosdisk.c (open_device): Revert last change to the
2472 function, it broke installation. The sector needs to be
2473 different dependent on which device is opened.
2475 2008-06-06 Robert Millan <rmh@aybabtu.com>
2477 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2478 rest of GRUB, and breakage doesn't happen if its value were modified.
2480 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2481 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2482 a constant (same value).
2483 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2484 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2486 2008-06-06 Robert Millan <rmh@aybabtu.com>
2488 * util/biosdisk.c (open_device): Do not modify sector offset when
2489 accessing a partition. kern/disk.c already handles this for us.
2491 2008-06-06 Robert Millan <rmh@aybabtu.com>
2493 * util/grub-emu.c (grub_machine_init): Move code in this function from
2495 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2496 segfault in case grub_printf() is called).
2498 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2499 grub_probe. Update all users not to explicitly add it again.
2500 (grub_device): New variable; contains corresponding device for grubdir.
2501 (fs_module, partmap_module, devabstraction_module): Pass
2502 `--device ${grub_device}' to grub_probe to avoid traversing /dev
2505 2008-06-05 Robert Millan <rmh@aybabtu.com>
2507 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2508 is found, print it (same layout as with labels).
2510 2008-06-04 Robert Millan <rmh@aybabtu.com>
2512 * util/biosdisk.c (get_drive): Rename to ...
2513 (find_grub_drive): ... this. Update all users.
2515 (get_os_disk): Rename to ...
2516 (convert_system_partition_to_system_disk): ... this. Update all users.
2518 (find_drive): Rename to ...
2519 (find_system_device): ... this. Update all users.
2521 2008-06-04 Robert Millan <rmh@aybabtu.com>
2523 * util/biosdisk.c (get_os_disk): Handle IDA devices.
2524 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2525 (make_device_map): Likewise.
2527 2008-06-01 Robert Millan <rmh@aybabtu.com>
2529 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2530 before dereferencing it.
2532 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2533 union with fat12/fat16-specific ones. Add some new fields, including
2534 `num_serial' for both versions.
2535 (struct grub_fat_data): Add `uuid' member.
2536 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2537 names. Initialize `data->uuid' using `num_serial'.
2538 (grub_fat_uuid): New function.
2539 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2541 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2542 (grub_reiserfs_uuid): New function.
2543 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2546 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2547 (grub_xfs_uuid): New function.
2548 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2550 2008-06-01 Robert Millan <rmh@aybabtu.com>
2552 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2553 code that is backward compatible with pre-uuid search command.
2555 2008-05-31 Robert Millan <rmh@aybabtu.com>
2557 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2558 floppies after everything else, to ensure floppy drive isn't accessed
2559 unnecessarily (patch from Bean).
2561 2008-05-31 Robert Millan <rmh@aybabtu.com>
2563 * commands/search.c (search_label, search_fs_uuid, search_file): Do
2564 not print device names when we were asked to set a variable.
2566 2008-05-31 Robert Millan <rmh@aybabtu.com>
2568 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2569 using "cursor-on" and "cursor-off" commands (understood at least by
2570 the Open Firmware flavour on OLPC).
2572 2008-05-31 Michael Gorven <michael@gorven.za.net>
2574 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2575 on and off sequences.
2577 2008-05-31 Robert Millan <rmh@aybabtu.com>
2579 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2580 * util/update-grub.in: Likewise.
2582 2008-05-30 Pavel Roskin <proski@gnu.org>
2584 * util/biosdisk.c (linux_find_partition): Simplify logic and
2585 make the code more universal. Keep special processing for
2586 devfs, but use a simple rule for all other devices. If the
2587 device ends with a number, append 'p' and the partition number.
2588 Otherwise, append only the partition number.
2590 2008-05-30 Robert Millan <rmh@aybabtu.com>
2592 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2593 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2594 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2595 the `root' parameter to Linux.
2597 2008-05-30 Robert Millan <rmh@aybabtu.com>
2599 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2600 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2601 --fs_uuid with --fs-uuid.
2602 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2603 all filesystems support them).
2605 2008-05-30 Robert Millan <rmh@aybabtu.com>
2607 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
2608 grub_printf() flags, since we're printing in units of 2 bytes.
2610 2008-05-30 Robert Millan <rmh@aybabtu.com>
2612 * util/grub.d/00_header.in: Remove obsolete comment referencing
2613 convert_system_path_to_grub_path().
2614 * util/update-grub.in: Likewise.
2615 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
2616 (convert_system_path_to_grub_path): Add a warning message explaining
2617 that this function is deprecated. Rely on is_path_readable_by_grub()
2618 for the readability checks.
2619 (font_path): Use is_path_readable_by_grub() for the readability
2620 check rather than convert_system_path_to_grub_path().
2622 2008-05-30 Robert Millan <rmh@aybabtu.com>
2624 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
2625 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
2626 converting it first.
2627 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
2628 grub.cfg for access to font file, and afterwards call it again to set
2631 2008-05-30 Robert Millan <rmh@aybabtu.com>
2633 * commands/search.c (options): Add --fs_uuid option.
2634 (search_fs_uuid): New function.
2635 (grub_cmd_search): Fix --set argument passing.
2636 Use search_fs_uuid() when requested via --fs_uuid.
2637 (grub_search_init): Update help message.
2638 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
2639 and redeclare it as an array of 16-bit words.
2640 (grub_ext2_uuid): New function.
2641 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
2642 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
2643 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
2644 (GRUB_DEVICE_BOOT_UUID): New variables.
2645 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
2646 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
2648 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
2649 just assume `root' variable has the right value.
2650 * util/grub.d/10_linux.in: Likewise.
2651 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
2653 (main): Recognise `-t fs_uuid' argument.
2655 2008-05-30 Robert Millan <rmh@aybabtu.com>
2657 * util/biosdisk.c (map): Redefine structure to hold information
2658 about GRUB drive name.
2659 (get_drive): Reimplement without assuming (and verifying) BIOS-like
2661 (call_hook): Remove.
2662 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
2663 member. Assume drive has partitions.
2664 (grub_util_biosdisk_open): Access device names via `.device' struct
2666 (open_device): Likewise.
2667 (find_drive): Likewise.
2668 (read_device_map): Adjust map[] usage to match the new struct
2669 definition. Don't check for duplicates (still possible, but not cheap
2671 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
2672 (make_device_name): Remove assumption of BIOS-like drive names.
2674 2008-05-30 Pavel Roskin <proski@gnu.org>
2676 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
2677 compiling execute.c doesn't need grub_script.tab.h anymore.
2678 (normal/command.c_DEPENDENCIES): Likewise.
2679 (normal/function.c_DEPENDENCIES): Likewise.
2680 * conf/i386-ieee1275.rmk: Likewise.
2681 * conf/i386-linuxbios.rmk: Likewise.
2682 * conf/i386-pc.rmk: Likewise.
2683 * conf/powerpc-ieee1275.rmk: Likewise.
2684 * conf/sparc64-ieee1275.rmk: Likewise.
2686 2008-05-29 Pavel Roskin <proski@gnu.org>
2688 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
2689 when scanning metadata for volume group name.
2691 * include/grub/script.h: Don't include grub_script.tab.h. It's
2692 a generated file, which may only be included from the files with
2693 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
2694 use union YYSTYPE, as the later allows forward declaration.
2695 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
2697 2008-05-29 Robert Millan <rmh@aybabtu.com>
2699 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
2700 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
2701 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
2702 (grub_console_checkkey): Add grub_dprintf() call to report unknown
2705 2008-05-29 Robert Millan <rmh@aybabtu.com>
2707 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
2708 control key combinations.
2710 2008-05-29 Robert Millan <rmh@aybabtu.com>
2712 * util/powerpc/ieee1275/grub-install.in: Move from here ...
2713 * util/ieee1275/grub-install.in: ... to here.
2714 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
2715 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
2716 (grub_install_SOURCES): Likewise.
2718 2008-05-29 Robert Millan <rmh@aybabtu.com>
2720 * fs/affs.c: Update copyright year.
2721 * fs/ext2.c: Likewise.
2722 * fs/fshelp.c: Likewise.
2723 * fs/hfsplus.c: Likewise.
2724 * fs/ntfs.c: Likewise.
2725 * fs/xfs.c: Likewise.
2726 * include/grub/fshelp.h: Likewise.
2727 * util/grub-mkdevicemap.c: Likewise.
2729 2008-05-28 Robert Millan <rmh@aybabtu.com>
2731 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
2732 might need to be fatfs to support some firmware implementations
2735 2008-05-28 Robert Millan <rmh@aybabtu.com>
2737 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
2739 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2740 (make_device_map): Likewise.
2742 2008-05-20 Bean <bean123ch@gmail.com>
2744 * fs/fshelp.c (grub_fshelp_map_block): New function.
2745 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
2746 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
2748 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
2749 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
2750 (grub_fshelp_journal): New structure.
2751 (grub_fshelp_map_block): New function prototype.
2752 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
2753 (grub_fshelp_map_block): Likewise.
2755 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
2756 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
2757 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
2758 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
2759 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
2760 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
2761 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
2762 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
2763 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
2764 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
2765 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
2766 (grub_ext2_sblock): New members for journal support.
2767 (grub_ext3_journal_header): New structure.
2768 (grub_ext3_journal_revoke_header): Likewise.
2769 (grub_ext3_journal_block_tag): Likewise.
2770 (grub_ext3_journal_sblock): Likewise.
2771 (grub_fshelp_node): New members logfile and journal.
2772 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
2773 grub_fshelp_map_block to get real block number.
2774 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
2776 (grub_ext2_read_inode): Likewise.
2777 (grub_ext3_get_journal): New function.
2778 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
2779 (grub_ext2_close): Release memory used by journal.
2781 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
2782 (REISERFS_MAGIC_DESC_BLOCK): New macro.
2783 (grub_reiserfs_transaction_header): Renamed to
2784 grub_reiserfs_description_block, replace field data with real_blocks.
2785 (grub_reiserfs_commit_block): New structure.
2786 (grub_reiserfs_data): New member journal.
2787 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
2789 (grub_reiserfs_read_symlink): Likewise.
2790 (grub_reiserfs_iterate_dir): Likewise.
2791 (grub_reiserfs_open): Likewise.
2792 (grub_reiserfs_read): Likewise.
2793 (grub_reiserfs_get_journal): New function.
2794 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
2795 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
2796 using grub_reiserfs_get_journal.
2797 (grub_reiserfs_close): Release memory used by journal.
2799 * fs/affs.c (grub_affs_read_block): Change block type to
2800 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
2802 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
2804 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
2806 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
2808 * fs/udf.c (grub_udf_read_block): Change block type to
2809 grub_disk_addr_t. Use type cast to avoid warning.
2811 * fs/xfs.c (grub_xfs_read_block): Likewise.
2813 2008-05-16 Christian Franke <franke@computer.org>
2815 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
2816 to ensure that break with ESC will always work.
2817 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
2818 Remove ESC from keyboard queue.
2820 2008-05-16 Christian Franke <franke@computer.org>
2822 * util/biosdisk.c: [__CYGWIN__] Add includes.
2823 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
2824 (get_os_disk): Move variable declarations to OS specific
2825 parts to avoid warning.
2826 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
2827 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
2828 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
2830 * util/getroot.c: [__CYGWIN__] Add includes.
2831 (strip_extra_slashes): Fix "/" case.
2832 [__CYGWIN__] (get_win32_path): New function.
2833 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
2834 [__CYGWIN__] (find_root_device): Disable.
2835 [__CYGWIN__] (get_bootsec_serial): New function.
2836 [__CYGWIN__] (find_cygwin_root_device): Likewise.
2837 [__linux__] (grub_guess_root_device): Add early returns to simplify
2839 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
2840 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
2841 check for Linux only.
2843 2008-05-15 Bean <bean123ch@gmail.com>
2845 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
2846 keyboard hang problem in apple's intel mac.
2848 2008-05-09 Robert Millan <rmh@aybabtu.com>
2850 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
2852 * util/grub-mkdevicemap.c (get_virtio_disk_name)
2853 (make_device_map): Likewise.
2854 Reported by Aurelien Jarno <aurel32@debian.org>
2856 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
2858 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
2859 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
2860 (make_device_map): Output entries for xvd type disks.
2862 2008-05-07 Robert Millan <rmh@aybabtu.com>
2864 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
2866 * util/grub-mkdevicemap.c (get_cciss_disk_name)
2867 (make_device_map): Likewise.
2868 Reported by Roland Dreier <rdreier@cisco.com>
2870 2008-05-07 Robert Millan <rmh@aybabtu.com>
2872 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
2873 grub_strstr() call. Correct a few mistakes in failure path handling.
2875 2008-05-06 Robert Millan <rmh@aybabtu.com>
2877 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2878 Do not print a trailing slash (therefore, the root directory is an
2880 (convert_system_path_to_grub_path): Do not remove trailing slash
2881 from make_system_path_relative_to_its_root() output.
2883 * util/i386/pc/grub-install.in: Add trailing slash to output from
2884 make_system_path_relative_to_its_root().
2886 2008-05-06 Robert Millan <rmh@aybabtu.com>
2888 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
2889 ensures that output lines aren't intermangled with those sent to
2890 stderr (via grub_util_info()).
2891 * util/grub-probe.c (grub_refresh): Likewise.
2892 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
2894 2008-05-05 Christian Franke <franke@computer.org>
2896 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
2897 Add Cygwin device names.
2898 (get_ide_disk_name) [__CYGWIN__]: Likewise.
2899 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
2900 (check_device): Return error instead of success on empty name.
2901 (make_device_map): Move label inside linux specific code to
2902 prevent compiler warning.
2904 2008-04-30 Robert Millan <rmh@aybabtu.com>
2906 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
2907 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
2909 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
2911 2008-04-29 Robert Millan <rmh@aybabtu.com>
2913 * docs/grub.cfg: New file (example GRUB configuration).
2915 2008-04-26 Robert Millan <rmh@aybabtu.com>
2917 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
2918 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
2919 and `disk/ieee1275/nand.c'.
2921 2008-04-25 Bean <bean123ch@gmail.com>
2923 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
2926 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
2927 change the buffer size to 4096 for cdrom device.
2929 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
2931 (_linux_mod_SOURCES): New variable.
2932 (_linux_mod_CFLAGS): Likewise.
2933 (_linux_mod_LDFLAGS): Likewise.
2934 (linux_mod_SOURCES): Likewise.
2935 (linux_mod_CFLAGS): Likewise.
2936 (linux_mod_LDFLAGS): Likewise.
2937 (nand_mod_SOURCES): Likewise.
2938 (nand_mod_CFLAGS): Likewise.
2939 (nand_mod_LDFLAGS): Likewise.
2941 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
2942 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
2943 type property. (nand device in olpc don't have this property)
2945 * include/grub/disk.h (grub_disk_dev_id): New macro
2946 GRUB_DISK_DEVICE_NAND_ID.
2948 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
2950 (grub_rescue_cmd_initrd): Likewise.
2952 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
2953 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
2954 ofw_cif_handler and ofw_idt, adjust padding number.
2956 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
2957 GRUB_MACHINE_IEEE1275 is defined.
2959 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
2960 Use NESTED_FUNC_ATTR attribute on the hook parameter.
2962 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
2963 on nested function heap_init.
2964 (grub_upper_mem): New variable for i386-ieee1275.
2965 (grub_get_extended_memory): New function for i386-ieee1275.
2966 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
2968 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
2969 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
2972 * loader/i386/ieee1275/linux.c: New file.
2974 * loader/i386/ieee1275/linux_normal.c: New file.
2976 * disk/ieee1275/nand.c: New file.
2978 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
2980 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
2982 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
2984 2008-04-18 Robert Millan <rmh@aybabtu.com>
2986 Restructures early code path on ieee1275 to unify grub_main() as
2987 the first C function that is executed in every platform.
2989 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
2990 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
2992 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
2993 * kern/ieee1275/cmain.c (cmain): Rename to ...
2994 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
2995 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
2998 2008-04-18 Robert Millan <rmh@aybabtu.com>
3000 * util/update-grub.in: Fix syntax error when setting
3001 `GRUB_PRELOAD_MODULES'.
3002 Reported by Stephane Chazelas <stephane@artesyncp.com>
3004 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
3006 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
3007 section into account, newer toolchains generate unique build ids
3008 * configure.ac: remove the test for --build-id=none acceptance,
3009 we want build ids to be preserved
3010 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
3011 far from other sections don't cause the raw binary images grow
3014 2008-04-15 Robert Millan <rmh@aybabtu.com>
3016 * disk/lvm.c: Update copyright year.
3017 * kern/misc.c: Likewise.
3019 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3021 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
3022 there is no memory left for physical volume name.
3024 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
3026 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
3027 volume name mapping to support bigger than 9 character names properly.
3029 2008-04-13 Robert Millan <rmh@aybabtu.com>
3031 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
3032 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
3034 2008-04-13 Christian Franke <franke@computer.org>
3036 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
3037 to create a floppy emulation boot CD when non emulation mode
3039 Enable Joliet CD filesystem extension.
3041 2008-04-13 Robert Millan <rmh@aybabtu.com>
3043 * kern/misc.c (grub_strncat): Fix off-by-one error.
3044 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
3046 * kern/env.c (grub_env_context_close): Clear current context, not
3048 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
3050 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
3052 2008-04-13 Robert Millan <rmh@aybabtu.com>
3054 Improve robustness when handling LVM.
3056 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
3057 (and leave `*p' unmodified).
3058 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3060 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3061 iterating through it.
3062 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3064 (grub_lvm_scan_device): Check the return value (and fail gracefully
3065 when due) on each grub_lvm_getvalue() or grub_strstr() call.
3066 Don't assume `vg->pvs != NULL' when iterating through it.
3068 2008-04-13 Robert Millan <rmh@aybabtu.com>
3070 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
3071 * genmk.rb (partmap): New variable.
3072 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
3073 (#{partmap}): New target rule.
3074 * genpartmaplist.sh: New file.
3075 * Makefile.in (pkglib_DATA): Add partmap.lst.
3076 (partmap.lst): New target rule.
3077 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
3078 modules (including all partition maps), instead of preloading them.
3080 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
3082 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
3083 `linux-boot-prober' (if installed) to detect other operating
3084 systems which are installed on the computer and add them to
3086 * conf/common.rmk: Build and install 30_os-prober.
3088 2008-04-12 Robert Millan <rmh@aybabtu.com>
3090 * kern/powerpc/ieee1275/init.c: Move from here ...
3091 * kern/ieee1275/init.c: ... to here. Update all users.
3093 * kern/powerpc/ieee1275/cmain.c: Move from here ...
3094 * kern/ieee1275/cmain.c: ... to here. Update all users.
3096 * kern/powerpc/ieee1275/openfw.c: Move from here ...
3097 * kern/ieee1275/openfw.c: ... to here. Update all users.
3099 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
3100 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
3102 2008-04-10 Pavel Roskin <proski@gnu.org>
3104 * configure.ac: Always use "_cv_" in cache variables for
3105 compatibility with Autoconf 2.62.
3107 2008-04-07 Robert Millan <rmh@aybabtu.com>
3109 Revert grub/machine/init.h addition by Pavel (since it breaks on
3110 i386-ieee1275 and others):
3111 * util/i386/pc/misc.c: Remove grub/machine/init.h.
3112 * util/powerpc/ieee1275/misc.c: Likewise.
3114 2008-04-07 Robert Millan <rmh@aybabtu.com>
3116 * util/grub-probe.c (probe): Improve error message.
3118 2008-04-07 Robert Millan <rmh@aybabtu.com>
3120 * util/biosdisk.c (read_device_map): Skip devices that don't exist
3121 (this prevents the presence of a bogus entry from ruining the whole
3124 2008-04-06 Pavel Roskin <proski@gnu.org>
3126 * util/biosdisk.c: Include grub/util/biosdisk.h.
3127 * util/grub-fstest.c (execute_command): Make static.
3128 * util/grub-mkdevicemap.c (check_device): Likewise.
3129 * util/i386/pc/misc.c: Include grub/machine/init.h.
3130 * util/powerpc/ieee1275/misc.c: Likewise.
3131 * util/lvm.c: Include grub/util/lvm.h.
3132 * util/misc.c: Include grub/kernel.h, grub/misc.h and
3134 * util/raid.c: Include grub/util/raid.h.
3135 (grub_util_getdiskname): Make static.
3137 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3138 grub_hostfs_fini(), as they are called from grub_init_all() and
3139 grub_fini_all() respectively. This fixes an infinite loop in
3140 grub-fstest due to double registration of hostfs.
3141 Reported by Christian Franke <Christian.Franke@t-online.de>
3143 2008-04-05 Pavel Roskin <proski@gnu.org>
3145 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3146 all 8 functions. Otherwise, probe function 0 only.
3148 2008-04-04 Pavel Roskin <proski@gnu.org>
3150 * commands/lspci.c (grub_lspci_iter): Print the bus number
3153 * commands/lspci.c (grub_pci_classes): Fix typos.
3154 (grub_lspci_iter): Don't print func twice. Print vendor ID
3155 before device ID, as it's normally done.
3157 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3158 Fix signedness warnings.
3159 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3161 * util/ieee1275/get_disk_name.c: Include config.h so that
3162 _GNU_SOURCE is defined and getline() is declared. Mark an
3163 unused argument as such. Fix a signedness warning.
3165 2008-04-02 Pavel Roskin <proski@gnu.org>
3167 * genkernsyms.sh.in: Use more robust assignments for CC and
3168 srcdir. Quote srcdir.
3169 * gensymlist.sh.in: Likewise. Assert at the compile time that
3170 the symbol table is not empty.
3172 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3173 * fs/cpio.c (grub_cpio_read): Likewise.
3175 2008-04-01 Pavel Roskin <proski@gnu.org>
3177 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3178 * disk/host.c (grub_host_open): Likewise.
3179 * disk/loopback.c (grub_loopback_open): Likewise.
3180 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3181 disk->id as in disk/host.c, not a multi-character constant.
3183 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
3184 later is obsolete, potentially dangerous and sets a bad example.
3185 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3186 * util/misc.c (grub_util_get_image_size): Likewise.
3188 * disk/loopback.c (options): Improve help for "--partitions".
3190 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3191 options to align them with the short options, e.g. "echo -e".
3193 2008-03-31 Bean <bean123ch@gmail.com>
3195 * video/reader/png.c (grub_png_data): New member is_16bit and
3197 (grub_png_decode_image_header): Detect 16 bit png image.
3198 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3199 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3200 (grub_video_reader_png): Release memory occupied by image_data.
3202 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3204 (grub_nfs_mount): Skip the test for sector per cluster.
3206 * include/grub/ntfs.h (MAX_SPC): Removed.
3208 2008-03-31 Bean <bean123ch@gmail.com>
3210 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3211 (grub_probe_SOURCES): Add fs/afs.c.
3212 (grub_fstest_SOURCES): Likewise.
3213 (afs_mod_SOURCES): New variable.
3214 (afs_mod_CFLAGS): Likewise.
3215 (afs_mod_LDFLAGS): Likewise.
3217 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3218 (grub_emu_SOURCES): Likewise.
3220 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3222 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3224 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3226 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3228 * fs/afs.c: New file.
3230 2008-03-30 Pavel Roskin <proski@gnu.org>
3232 * disk/host.c: Include grub/misc.h to fix a warning.
3233 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3234 warnings about implicit declarations.
3236 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3238 * include/grub/i386/loader.h: Change declaration of
3239 grub_linux_boot() to match what grub_loader_set() expects.
3240 * util/getroot.c (grub_guess_root_device): Return const char* to
3242 * util/grub-probe.c (probe): Fix a warning about uninitialized
3243 abstraction_name variable.
3244 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3245 second argument as unused to fix a warning.
3247 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3248 missing grub_error() call.
3250 * util/update-grub_lib.in: Define datarootdir, since Autoconf
3251 2.60 and newer uses it to define datadir.
3253 * commands/sleep.c: Fix warning about implicit declaration.
3254 * disk/memdisk.c: Likewise.
3255 * loader/aout.c: Likewise.
3256 * loader/i386/bsd_normal.c: Likewise.
3257 * util/grub-probe.c: Likewise.
3259 * commands/i386/cpuid.c (has_longmode): Make static.
3260 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3261 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3263 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3264 GDT. This is more robust, as %ds can change.
3265 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3266 calling real_to_prot().
3267 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3269 2008-03-28 Pavel Roskin <proski@gnu.org>
3271 * kern/i386/pc/startup.S: Assert that uncompressed functions
3272 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3273 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3274 code, as they push parts of the code (error handlers) beyond
3275 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
3276 code as correctness and size.
3278 2008-03-28 Pavel Roskin <proski@gnu.org>
3280 * kern/i386/pc/startup.S
3281 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3282 data block address to the real mode, keep offset minimal. This
3283 works around a bug in AWARD BIOS on old Athlon systems, which
3284 makes CD detection hang.
3286 2008-03-26 Pavel Roskin <proski@gnu.org>
3288 * normal/color.c (grub_parse_color_name_pair): Make `name' a
3290 * include/grub/normal.h: Add grub_parse_color_name_pair()
3293 2008-03-24 Bean <bean123ch@gmail.com>
3295 * disk/i386/pc/biosdisk.c (cd_start): Removed.
3296 (cd_count): Removed.
3297 (cd_drive): New variable.
3298 (grub_biosdisk_get_drive): Don't check for (cdN) device.
3299 (grub_biosdisk_call_hook): Likewise.
3300 (grub_biosdisk_iterate): Change cdrom detection method.
3301 (grub_biosdisk_open): Replace cd_start with cd_drive.
3302 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
3303 detect cdrom device.
3305 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
3307 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
3308 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
3309 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
3310 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
3311 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
3312 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
3313 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
3314 (grub_biosdisk_cdrp): New structure.
3315 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
3317 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
3319 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
3322 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
3325 2008-03-20 Robert Millan <rmh@aybabtu.com>
3327 Remove 2 TiB limit in ata.mod.
3328 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
3329 (grub_ata_dumpinfo): Print sector count with 0x%llx.
3330 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
3331 grub_uint64_t instead of grub_uint32_t.
3333 2008-03-05 Bean <bean123ch@gmail.com>
3335 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
3336 (grub_multiboot): Set boot device.
3338 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
3340 2008-03-02 Bean <bean123ch@gmail.com>
3342 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
3345 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
3347 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
3350 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
3353 * docs/fdl.texi: New file.
3355 * docs/mdate-sh: New file. Copied from gnulib.
3356 * docs/texinfo.tex: Likewise.
3358 * config.guess: Updated from gnulib.
3359 * install-sh: Likewise.
3361 2008-02-28 Robert Millan <rmh@aybabtu.com>
3363 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
3364 (aout_mod_SOURCES): New variable.
3365 (aout_mod_CFLAGS): Likewise.
3366 (aout_mod_LDFLAGS): Likewise.
3368 * conf/i386-ieee1275.rmk: Likewise.
3370 2008-02-28 Robert Millan <rmh@aybabtu.com>
3372 * util/update-grub.in: Reorganise terminal validity check. Accept
3373 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
3374 Based on suggestion by Franklin PIAT.
3376 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
3378 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
3380 * util/getroot.c (grub_util_check_block_device): New function that
3381 returns the given argument if it is a block device and returns NULL else.
3382 * util/grub-probe.c (argument_is_device): New variable.
3383 (probe): Promote device_name from a variable to an argument. Receive
3384 device_name from grub_util_check_block_device() if path is NULL and from
3385 grub_guess_root_device() else. Do not free() device_name anymore.
3386 (options): Introduce new parameter '-d, --device'.
3387 (main): Add description of the new parameter to the help screen.
3388 Rename path variable to argument. Set argument_is_device if the '-d'
3389 option is given. Pass argument to probe() depending on
3392 2008-02-24 Bean <bean123ch@gmail.com>
3394 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
3395 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
3396 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
3397 (GRUB_ISO9660_VOLDESC_PART): Likewise.
3398 (GRUB_ISO9660_VOLDESC_END): Likewise.
3399 (grub_iso9660_primary_voldesc): New member escape.
3400 (grub_iso9660_data): New member joliet.
3401 (grub_iso9660_convert_string): New function.
3402 (grub_iso9660_mount): Detect joliet extension.
3403 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
3404 (grub_iso9660_iso9660_label): Likewise.
3406 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
3407 (grub_setup_SOURCES): Add fs/udf.c.
3408 (grub_fstest_SOURCES): Likewise.
3409 (udf_mod_SOURCES): New variable.
3410 (udf_mod_CFLAGS): Likewise.
3411 (udf_mod_LDFLAGS): Likewise.
3413 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3414 (grub_emu_SOURCES): Likewise.
3416 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3418 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3420 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3422 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3424 * fs/udf.c: New file.
3426 2008-02-24 Robert Millan <rmh@aybabtu.com>
3428 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3429 (normal/lexer.c_DEPENDENCIES): New variables.
3430 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3431 (normal/lexer.c_DEPENDENCIES): Likewise.
3432 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3433 (normal/lexer.c_DEPENDENCIES): Likewise.
3434 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3435 (normal/lexer.c_DEPENDENCIES): Likewise.
3436 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3437 (normal/lexer.c_DEPENDENCIES): Likewise.
3438 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3439 (normal/lexer.c_DEPENDENCIES): Likewise.
3441 2008-02-23 Robert Millan <rmh@aybabtu.com>
3443 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3444 since they were intended to be in hex. This didn't break previously
3445 because of a bug in gpt_partition_map_iterate() (see below).
3447 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3448 when checking the validity of GPT header.
3449 Remove `partno', since it always provides the same information as `i'.
3451 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
3453 * include/grub/efi/time.h: Fix a wrong comment.
3455 2008-02-19 Pavel Roskin <proski@gnu.org>
3457 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3460 2008-02-19 Bean <bean123ch@gmail.com>
3462 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3463 (aout_mod_SOURCES): New variable.
3464 (aout_mod_CFLAGS): Likewise.
3465 (aout_mod_LDFLAGS): Likewise.
3466 (_bsd_mod_SOURCES): New variable.
3467 (_bsd_mod_CFLAGS): Likewise.
3468 (_bsd_mod_LDFLAGS): Likewise.
3469 (bsd_mod_SOURCES): New variable.
3470 (bsd_mod_CFLAGS): Likewise.
3471 (bsd_mod_LDFLAGS): Likewise.
3473 * include/grub/aout.h: New file.
3475 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3477 * include/grub/i386/bsd.h: New file.
3479 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3482 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3483 function is called, so that it's possible to change it inside the hook.
3484 (grub_elf64_load): Likewise.
3485 (grub_elf_file): Don't close the file if elf header is not found.
3486 (grub_elf_close): Close the file if grub_elf_file fails (The new
3487 grub_elf_file won't close it).
3488 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3489 (grub_elf64_size): Likewise.
3491 * kern/i386/loader.S (grub_unix_real_boot): New function.
3493 * loader/aout.c: New file.
3495 * loader/i386/bsd.c: New file.
3497 * loader/i386/bsd_normal.c: New file.
3499 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3501 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3502 can test other formats.
3504 2008-02-19 Robert Millan <rmh@aybabtu.com>
3506 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3507 (grub_gpt_partition_type_empty): Redefine with macro from
3508 `<grub/gpt_partition.h>'.
3509 (gpt_partition_map_iterate): Adjust partition type comparison.
3511 Export `entry' as partmap-specific `part.data' struct.
3512 (grub_gpt_header, grub_gpt_partentry): Move from here ...
3514 * include/grub/gpt_partition.h (grub_gpt_header)
3515 (grub_gpt_partentry): ... to here (new file).
3517 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3519 (grub_gpt_partition_type_bios_boot): New const variable, defined
3520 with macro from `<grub/gpt_partition.h>'.
3522 (setup): Replace `first_start' with `embed_region', which keeps
3523 track of the embed region (and is partmap-agnostic).
3525 Replace find_first_partition_start() with find_usable_region(),
3526 which finds a usable region for embedding using partmap-specific
3527 knowledge (supports PC/MSDOS and GPT).
3529 Fix all assumptions that the embed region start at sector 1, using
3530 `embed_region.start' from now on. Similarly, use `embed_region.end'
3531 rather than `first_start' to calculate available size.
3533 In grub_util_info() message, replace "into after the MBR" with an
3534 indication of the specific sector our embed region starts at.
3536 2008-02-19 Robert Millan <rmh@aybabtu.com>
3538 * DISTLIST: Replace `commands/ieee1275/halt.c' and
3539 `commands/ieee1275/reboot.c' with `commands/halt.c' and
3540 `commands/reboot.c'.
3541 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3542 (halt_mod_SOURCES): Likewise.
3543 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3544 (halt_mod_SOURCES): Likewise.
3546 2008-02-17 Christian Franke <franke@computer.org>
3548 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3550 2008-02-17 Robert Millan <rmh@aybabtu.com>
3552 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3553 set `first_start' to 0 for non-PC/MSDOS partition maps.
3555 2008-02-16 Robert Millan <rmh@aybabtu.com>
3557 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3558 do not assume partition map is PC/MSDOS before performing checks that
3559 are specific to that layout.
3561 2008-02-13 Robert Millan <rmh@aybabtu.com>
3563 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3564 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3565 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3567 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
3569 * configure.ac: Only a cosmetic change on the handling of
3570 -fno-stack-protector.
3572 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
3574 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3575 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3577 (grub_install_SOURCES): Add halt.mod and reboot.mod.
3578 (halt_mod_SOURCES): New variable.
3579 (halt_mod_CFLAGS): Likewise.
3580 (halt_mod_LDFLAGS): Likewise.
3581 (reboot_mod_SOURCES): Likewise.
3582 (reboot_mod_CFLAGS): Likewise.
3583 (reboot_mod_LDFLAGS): Likewise.
3585 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3586 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3588 (halt_mod_SOURCES): Likewise.
3589 (reboot_mod_SOURCES): Likewise.
3591 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3592 commands/i386/pc/reboot.c by commands/reboot.c.
3593 (reboot_mod_SOURCES): Likewise.
3595 * commands/i386/pc/reboot.c: merge this file ...
3597 * commands/ieee1275/reboot.c: ... and this file ...
3599 * commands/reboot.c: ... to this file.
3600 Add some precompiler directive to include the correct header for
3603 * commands/ieee1275/halt.c: move this file ...
3605 * commands/halt.c: ... to here.
3606 Add some precompiler directive to include the correct header for
3609 * include/grub/efi/efi.h (grub_reboot): New function declaration.
3610 (grub_halt): Likewise.
3612 * kern/efi/efi.c (grub_reboot): New function.
3613 (grub_halt): Likewise.
3615 2008-02-12 Robert Millan <rmh@aybabtu.com>
3617 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
3618 /dev (like it is done for /dev/mapper). This doesn't provide support
3619 for EVMS, but at least it is now easy to identify the problem when it
3622 2008-02-11 Robert Millan <rmh@aybabtu.com>
3624 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
3625 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
3626 comparing it with -1, not 0.
3628 2008-02-10 Robert Millan <rmh@aybabtu.com>
3630 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
3632 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3633 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
3635 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
3636 `disk/lvm.c' to the end of the list.
3637 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3638 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3640 2008-02-10 Robert Millan <rmh@aybabtu.com>
3642 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
3643 grub_print_error() instead. This will let user know why we're entering
3645 Based on suggestions from Sam Morris.
3647 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
3649 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
3650 on remaining N args, instead of "--" arg N times.
3652 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
3654 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
3655 (fill_with_default_glyph): Changed to use unknown_glyph for fill
3656 pattern for unknown glyphs.
3658 2008-02-09 Robert Millan <rmh@aybabtu.com>
3660 * configure.ac: Probe for `help2man'.
3661 * Makefile.in (builddir): New variable.
3662 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
3663 or otherwise add a few flags/options to it.
3664 (install-local): For every executable utility or script that is
3665 installed, invoke $(HELP2MAN) to install a manpage based on --help
3668 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
3669 that it doesn't prevent --help from working in build tree.
3671 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
3672 with `bug-grub@gnu.org'.
3673 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
3674 * util/update-grub.in (usage): New function.
3675 Implement proper argument check, with support for --help and --version
3676 (as well as existing -y).
3678 2008-02-09 Christian Franke <franke@computer.org>
3680 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
3681 avoid overwriting previous output.
3682 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
3684 2008-02-09 Robert Millan <rmh@aybabtu.com>
3686 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
3689 2008-02-09 Robert Millan <rmh@aybabtu.com>
3691 * commands/sleep.c: New file.
3692 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
3693 (sleep_mod_SOURCES): New variable.
3694 (sleep_mod_CFLAGS): Likewise.
3695 (sleep_mod_LDFLAGS): Likewise.
3697 2008-02-09 Robert Millan <rmh@aybabtu.com>
3699 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
3700 situations in which we can deduce the RAID size and the superblock
3703 2008-02-09 Robert Millan <rmh@aybabtu.com>
3705 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
3706 and return a grub_diskmemberlist_t composed of LVM physical volumes.
3707 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
3709 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
3710 and return a grub_diskmemberlist_t composed of physical array members.
3711 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
3713 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
3715 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
3716 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
3717 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
3719 * util/grub-probe.c (probe): Move partmap probing code from here ...
3720 (probe_partmap): ... to here.
3721 (probe): Use probe_partmap() once for the disk we're probing, and
3722 additionally, when such disk contains a memberlist() struct member,
3723 once for each disk that is contained in the structure returned by
3726 2008-02-09 Robert Millan <rmh@aybabtu.com>
3728 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
3729 environment variable to 'all' in order to obtain debug output from
3731 * util/i386/pc/grub-setup.c (main): Likewise.
3733 2008-02-08 Robert Millan <rmh@aybabtu.com>
3735 * disk/raid.c (grub_raid_scan_device): Check for
3736 `array->device[sb.this_disk.number]' rather than for
3737 `array->device[sb.this_disk.number]->name', since the latter is not
3738 guaranteed to be accessible.
3740 2008-02-08 Robert Millan <rmh@aybabtu.com>
3742 * disk/raid.c: Update copyright.
3743 * fs/cpio.c: Likewise.
3744 * include/grub/raid.h: Likewise.
3745 * loader/i386/pc/multiboot.c: Likewise.
3746 * util/hostfs.c: Likewise.
3748 2008-02-08 Robert Millan <rmh@aybabtu.com>
3750 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
3751 to a grub_disk_t array.
3752 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
3754 (grub_raid_scan_device): Replace `device[x].name' accesses with
3755 `device[x]->name'. Simplify initialization of `array->device[x]'.
3757 2008-02-08 Robert Millan <rmh@aybabtu.com>
3759 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
3760 grub_dprintf() calls.
3761 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
3764 2008-02-07 Christian Franke <franke@computer.org>
3766 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
3767 instead of fseek and ftell to support large files.
3768 (grub_hostfs_read): Likewise.
3770 2008-02-07 Robert Millan <rmh@aybabtu.com>
3772 Patch from Jeroen Dekkers.
3773 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
3774 failure, since successfully reading all array members might not be
3777 2008-02-06 Robert Millan <rmh@aybabtu.com>
3779 * util/grub-probe.c (probe): Simplify partmap probing (with the
3780 assumption that the first word up to the underscore equals to
3783 2008-02-06 Christian Franke <franke@computer.org>
3785 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
3786 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
3787 last block of a cpio or tar stream.
3788 Check for "TRAILER!!!" instead of any empty data
3789 block to detect last block of a cpio stream.
3790 (grub_cpio_dir): Fix constness of variable np.
3791 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
3792 cpio or tar trailer is detected. This fixes a crash
3793 on open of a non existing file.
3795 2008-02-05 Bean <bean123ch@gmail.com>
3797 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
3799 (grub_multiboot_load_elf64): Likewise.
3800 (grub_multiboot): Initialize mbi structure.
3802 * util/grub-fstest.c: Don't include unused header file script.h.
3804 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
3806 (grub_fstest_SOURCES): Likewise.
3808 2008-02-05 Robert Millan <rmh@aybabtu.com>
3810 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
3811 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
3812 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
3813 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
3815 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
3816 (translation_table): Replace hardcoded values with macros
3817 provided by `<grub/term.h>'.
3819 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
3820 (keyboard_map): Correct/add a few values, with macros provided
3822 (keyboard_map_shift): Zero values that don't differ from their
3823 `keyboard_map' equivalents.
3824 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
3825 Discard the second scan code that is always sent by Caps lock.
3826 Only use `keyboard_map_shift' when it provides a non-zero value,
3827 otherwise fallback to `keyboard_map'.
3829 2008-02-04 Bean <bean123ch@gmail.com>
3831 * Makefile.in (enable_grub_fstest): New variable.
3833 * conf/common.rmk (grub_fstest_init.lst): New rule.
3834 (grub_fstest_init.h): Likewise.
3835 (grub_fstest_init.c): Likewise.
3836 (util/grub-fstest.c_DEPENDENCIES): New variable.
3837 (grub_fstest_SOURCES): Likewise.
3839 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
3841 * util/grub-fstest.c: New file.
3843 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3845 Make grub-setup handle a separate root device.
3847 * util/i386/pc/grub-setup.c (setup): Always open the root device,
3848 so that the root device can be compared with the destination
3850 When embedding the core image, if the root and destination devices
3851 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
3853 When not embedding, set ROOT_DRIVE to 0xFF.
3855 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3857 Add support for having a grub directory in a different drive. This
3858 is still only the data handling part.
3860 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
3861 (codestart): Save %dh in GRUB_ROOT_DRIVE.
3862 (grub_root_drive): New variable.
3864 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
3865 instead of GRUB_BOOT_DRIVE to construct a device name. Set
3866 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
3869 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
3871 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
3873 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
3875 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
3876 is bogus, because PXE booting does not specify any drive
3879 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
3880 am not sure if this is really correct.
3882 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
3883 is always identical to the boot drive when booting from a CD.
3885 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
3887 (root_drive): New variable.
3888 (real_start): Unconditionally set %dh to ROOT_DRIVE.
3889 (setup_sectors): Push %dx right after popping it, because %dh will
3891 (copy_buffer): Restore %dx.
3893 2008-02-03 Robert Millan <rmh@aybabtu.com>
3895 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
3896 use `cdboot.img' for cdrom images.
3898 2008-02-03 Robert Millan <rmh@aybabtu.com>
3900 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
3901 only setup gfxterm when `font' command has succeeded.
3903 2008-02-03 Robert Millan <rmh@aybabtu.com>
3905 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
3906 (grub_rescue_cmd_multiboot_loader)
3907 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
3909 2008-02-03 Pavel Roskin <proski@gnu.org>
3911 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
3912 %edx and %esi from stack only after grub_gate_a20() is called.
3913 grub_gate_a20() clobbers %edx.
3915 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3917 * configure.ac (AC_INIT): Bumped to 1.96.
3919 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
3920 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
3921 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
3922 video/readers/png.c.
3924 2008-02-03 Bean <bean123ch@gmail.com>
3926 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
3927 (cdboot_img_SOURCES): New variable.
3928 (cdboot_img_ASFLAGS): New variable.
3929 (cdboot_img_LDFLAGS): New variable.
3931 * boot/i386/pc/cdboot.S: New file.
3933 * disk/i386/pc/biosdisk.c (cd_start): New variable.
3934 (cd_count): Likewise.
3935 (grub_biosdisk_get_drive): Add support for cd device.
3936 (grub_biosdisk_call_hook): Likewise.
3937 (grub_biosdisk_iterate): Likewise.
3938 (grub_biosdisk_open): Likewise.
3939 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
3940 (grub_biosdisk_rw): Support reading from cd device.
3941 (GRUB_MOD_INIT): Iterate cd devices.
3943 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
3944 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
3945 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
3947 * kern/i386/pc/init.c (make_install_device): Check for cd device.
3949 2008-02-02 Robert Millan <rmh@aybabtu.com>
3951 * commands/read.c: New file.
3952 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
3953 (read_mod_SOURCES): New variable.
3954 (read_mod_CFLAGS): Likewise.
3955 (read_mod_LDFLAGS): Likewise.
3957 2008-02-02 Robert Millan <rmh@aybabtu.com>
3959 * normal/main.c (grub_normal_execute): Check for `menu->size' when
3960 determining whether menu has to be displayed.
3962 2008-02-02 Marco Gerards <marco@gnu.org>
3964 * bus/pci.c: New file.
3966 * include/grub/pci.h: Likewise.
3968 * include/grub/i386/pc/pci.h: Likewise.
3970 * commands/lspci.c: Likewise.
3972 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
3974 (pci_mod_SOURCES): New variable.
3975 (pci_mod_CFLAGS): Likewise.
3976 (pci_mod_LDFLAGS): Likewise.
3977 (lspci_mod_SOURCES): Likewise.
3978 (lspci_mod_CFLAGS): Likewise.
3979 (lspci_mod_LDFLAGS): Likewise.
3981 2008-02-02 Bean <bean123ch@gmail.com>
3983 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
3984 (grub_ufs_get_file_block): Fix indirect block calculation problem.
3986 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
3987 (grub_xfs_btree_node): New structure.
3988 (grub_xfs_btree_root): New structure.
3989 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
3990 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
3991 (GRUB_XFS_EXTENT_BLOCK): Likewise.
3992 (GRUB_XFS_EXTENT_SIZE): Likewise.
3993 (grub_xfs_read_block): Support btree format type.
3994 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
3995 Use directory block as basic unit.
3997 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
3999 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
4000 __attribute__ ((__regparm__ (1))).
4002 2008-02-01 Robert Millan <rmh@aybabtu.com>
4004 Correct a mistake in previous commit.
4006 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
4008 (normal/command.c_DEPENDENCIES): New variable.
4010 2008-02-01 Robert Millan <rmh@aybabtu.com>
4012 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
4014 (normal/command.c_DEPENDENCIES): New variable.
4015 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
4016 * conf/i386-ieee1275.rmk: Likewise.
4017 * conf/i386-linuxbios.rmk: Likewise.
4018 * conf/i386-pc.rmk: Likewise.
4019 * conf/sparc64-ieee1275.rmk: Likewise.
4020 * conf/powerpc-ieee1275.rmk: Likewise.
4021 (grub_emu_SOURCES): Add `fs/fshelp.c'.
4023 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
4025 2008-02-01 Robert Millan <rmh@aybabtu.com>
4027 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
4028 call at beginning of function.
4030 2008-01-31 Pavel Roskin <proski@gnu.org>
4032 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
4033 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
4034 (grub_mkrescue_SOURCES): Likewise.
4035 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
4037 2008-01-30 Robert Millan <rmh@aybabtu.com>
4039 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4040 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
4041 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
4042 (grub_probe_SOURCES): ... to here.
4044 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
4045 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
4046 * conf/i386-ieee1275.rmk: Likewise.
4047 * conf/i386-linuxbios.rmk: Likewise.
4048 * conf/powerpc-ieee1275.rmk: Likewise.
4050 2008-01-30 Tristan Gingold <gingold@free.fr>
4052 * kern/rescue.c: Silently accept empty lines.
4054 2008-01-29 Bean <bean123ch@gmail.com>
4056 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4057 (real_code_2): Code cleanup and change comment style.
4058 (move_memory): Avoid using 32-bit address mode.
4060 2008-01-29 Bean <bean123ch@gmail.com>
4062 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4063 (png_mod_SOURCES): New variable.
4064 (png_mod_CFLAGS): Likewise.
4065 (png_mod_LDFLAGS): Likewise.
4067 * video/readers/png.c: New file.
4069 2008-01-28 Robert Millan <rmh@aybabtu.com>
4071 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
4072 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
4073 `ifndef GRUB_MOD_GAP' hack.
4074 * util/elf/grub-mkimage.c (add_segments): Likewise.
4076 2008-01-27 Robert Millan <rmh@aybabtu.com>
4078 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
4079 `GRUB_MOD_GAP' for platforms in which it's not defined.
4080 * util/elf/grub-mkimage.c (add_segments): Likewise.
4082 2008-01-27 Robert Millan <rmh@aybabtu.com>
4084 Get grub-emu to build again (including parallel builds).
4086 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
4088 (util/grub-emu.c_DEPENDENCIES): ... this, ...
4089 (normal/execute.c_DEPENDENCIES): ... this, ...
4090 (grub-emu_DEPENDENCIES): ... and this.
4092 * conf/i386-efi.rmk: Likewise.
4093 * conf/i386-linuxbios.rmk: Likewise.
4094 * conf/i386-ieee1275.rmk: Likewise.
4095 * conf/powerpc-ieee1275.rmk: Likewise.
4096 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
4098 2008-01-27 Robert Millan <rmh@aybabtu.com>
4100 * NEWS: Add a few items.
4102 2008-01-27 Robert Millan <rmh@aybabtu.com>
4104 Fix parallel builds with grub-emu. Based on earlier commit for
4105 grub-probe and grub-setup.
4107 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4108 (util/grub-emu.c_DEPENDENCIES): ... this.
4109 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4110 (util/grub-emu.c_DEPENDENCIES): ... this.
4111 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4112 (util/grub-emu.c_DEPENDENCIES): ... this.
4113 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4114 (util/grub-emu.c_DEPENDENCIES): ... this.
4115 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4116 (util/grub-emu.c_DEPENDENCIES): ... this.
4118 2008-01-27 Pavel Roskin <proski@gnu.org>
4120 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4121 to create a gap between _end and the modules added to the image
4122 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
4123 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4124 * util/elf/grub-mkimage.c (add_segments): Likewise.
4126 2008-01-26 Pavel Roskin <proski@gnu.org>
4128 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4129 just return an error.
4131 2008-01-26 Bean <bean123ch@gmail.com>
4133 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4134 (grub_reiserfs_get_item): Save offset of the next item.
4135 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4137 2008-01-25 Robert Millan <rmh@aybabtu.com>
4139 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4140 make all filesystem sources appear together (possibly fixing omissions
4142 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4143 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4144 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4145 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4147 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
4149 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4150 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4151 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4152 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4154 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4155 (probe): Add a sanity check to make sure of our ability to read
4156 requested files when probing for filesystem type.
4158 * genmk.rb: Update copyright year (2007).
4160 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4161 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4162 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4163 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4164 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4165 : Remove function prototypes.
4167 2008-01-25 Robert Millan <rmh@aybabtu.com>
4169 Revert my previous commits (based on wrong assumption of how grub_errno
4172 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
4173 * kern/file.c (grub_file_open): Likewise.
4175 2008-01-24 Pavel Roskin <proski@gnu.org>
4177 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4178 that hang if GRUB tries to setup colors.
4179 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4180 colors for firmwares that don't support it.
4181 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4182 Recognize Open Hack'Ware, set flags to work around its
4185 2008-01-24 Robert Millan <rmh@aybabtu.com>
4187 * kern/file.c (grub_file_open): Do not account previous failures of
4188 unrelated functions when grub_errno is checked for.
4189 Reported by Oleg Strikov.
4191 2008-01-24 Bean <bean123ch@gmail.com>
4193 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4194 (grub_ufs_sblock): New member volume name.
4195 (grub_ufs_find_file): Fix string copy bug.
4196 (grub_ufs_label): Implement this function properly.
4198 * fs/hfs.c (grub_hfs_cnid_type): New enum.
4199 (grub_hfs_iterate_records): Use the correct file number for extents
4200 and catalog file. Fix problem in next index calculation.
4201 (grub_hfs_find_node): Replace recursive function call with loop.
4202 (grub_hfs_iterate_dir): Replace recursive function call with loop.
4204 2008-01-23 Robert Millan <rmh@aybabtu.com>
4206 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4207 `<grub/symbol.h>' and `<grub/multiboot.h>'.
4208 (grub_multiboot2_real_boot): New function prototype.
4210 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4211 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4213 * kern/i386/ieee1275/init.c (grub_os_area_addr)
4214 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4216 2008-01-23 Robert Millan <rmh@aybabtu.com>
4218 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4219 #ifdef'ed out grub_printf().
4221 2008-01-23 Robert Millan <rmh@aybabtu.com>
4223 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4224 grub_dprintf calls, since they make "debug=all" mode unusable.
4225 (grub_console_checkkey): Likewise.
4227 2008-01-23 Robert Millan <rmh@aybabtu.com>
4229 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4230 `term/i386/pc/at_keyboard.c'.
4231 (pkglib_MODULES): Add `serial.mod'.
4232 (serial_mod_SOURCES): New variable.
4233 (serial_mod_CFLAGS): Likewise.
4234 (serial_mod_LDFLAGS): Likewise.
4236 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
4237 `<grub/powerpc/ieee1275/console.h>'.
4238 (grub_keyboard_controller_init): New function prototype.
4239 (grub_console_checkkey): Likewise.
4240 (grub_console_getkey): Likewise.
4242 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4245 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4246 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4248 2008-01-23 Robert Millan <rmh@aybabtu.com>
4250 * kern/i386/pc/init.c (make_install_device): When memdisk image is
4251 present, "(memdisk)/boot/grub" becomes the default prefix.
4253 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4254 a memdisk tarball with all the modules. Add --overlay=DIR option that
4255 allows users to overlay additional files into the image.
4257 2008-01-23 Robert Millan <rmh@aybabtu.com>
4259 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4260 and `machine/memory.h'.
4261 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4262 (_multiboot_mod_SOURCES): New variable.
4263 (_multiboot_mod_CFLAGS): Likewise.
4264 (_multiboot_mod_LDFLAGS): Likewise.
4265 (multiboot_mod_SOURCES): Likewise.
4266 (multiboot_mod_CFLAGS): Likewise.
4267 (multiboot_mod_LDFLAGS): Likewise.
4269 * include/grub/i386/ieee1275/loader.h: New file.
4271 * include/grub/i386/ieee1275/machine.h: Likewise.
4273 * include/grub/i386/ieee1275/memory.h: Likewise.
4275 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4276 variable declaration.
4277 (grub_os_area_size): Likewise.
4279 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4280 (grub_lower_mem, grub_upper_mem): New variables.
4281 (grub_stop_floppy): New function (just to make
4282 grub_multiboot2_real_boot() happy).
4284 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
4285 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
4286 (grub_stop): New function.
4287 Include `"../realmode.S"' and `"../loader.S"'.
4289 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
4290 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
4292 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
4293 rely on grub_multiboot2_real_boot() for final boot.
4295 2008-01-22 Robert Millan <rmh@aybabtu.com>
4297 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
4298 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
4299 device that doesn't look like an SD card.
4300 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4301 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
4302 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
4303 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
4306 2008-01-22 Robert Millan <rmh@aybabtu.com>
4308 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
4309 avoid claiming over our own code.
4311 2008-01-22 Bean <bean123ch@gmail.com>
4313 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
4314 (jpeg_mod_SOURCES): New variable.
4315 (jpeg_mod_CFLAGS): Likewise.
4316 (jpeg_mod_LDFLAGS): Likewise.
4318 * video/readers/jpeg.c : New file.
4320 2008-01-22 Bean <bean123ch@gmail.com>
4322 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
4323 there are no more items.
4325 2008-01-21 Robert Millan <rmh@aybabtu.com>
4327 * kern/mm.c (grub_mm_init_region): Improve debug message.
4329 2008-01-21 Robert Millan <rmh@aybabtu.com>
4331 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
4332 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
4334 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
4336 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
4337 Indicates start of upper memory.
4338 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
4339 (generate_image): Abort when image size is big enough to corrupt
4342 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
4343 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
4344 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4345 instead of hardcoding 0xA0000.
4346 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
4347 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4348 instead of hardcoding 0xA0000.
4350 2008-01-21 Robert Millan <rmh@aybabtu.com>
4352 * disk/memdisk.c (memdisk_size): New variable.
4353 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
4355 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
4356 image to dynamic memory.
4357 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
4358 `memdisk_size'. Free memdisk block.
4360 2008-01-21 Robert Millan <rmh@aybabtu.com>
4362 Fix detection of very small filesystems (like tar).
4364 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
4365 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
4366 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
4367 a problem with this disk).
4369 2008-01-21 Robert Millan <rmh@aybabtu.com>
4371 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
4372 on grub_biosdisk_rw_standard() error.
4374 2008-01-21 Robert Millan <rmh@aybabtu.com>
4376 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
4378 * kern/elf.c: Likewise.
4379 * kern/ieee1275/ieee1275.c: Likewise.
4380 * kern/powerpc/ieee1275/openfw.c: Likewise.
4381 * term/ieee1275/ofconsole.c: Likewise.
4383 2008-01-21 Robert Millan <rmh@aybabtu.com>
4385 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
4387 * include/grub/kernel.h (grub_arch_memdisk_addr)
4388 (grub_arch_memdisk_size): Moved from here ...
4390 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
4391 (grub_arch_memdisk_size): ... to here.
4393 2008-01-21 Robert Millan <rmh@aybabtu.com>
4395 Mostly based on bugfix from Bean.
4397 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
4398 attribute with hook() parameter.
4399 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
4401 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
4402 attribute with hook() parameter.
4403 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
4406 2008-01-21 Robert Millan <rmh@aybabtu.com>
4408 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
4409 (pkglib_MODULES): Add `memdisk.mod'.
4410 (memdisk_mod_SOURCES): New variable.
4411 (memdisk_mod_CFLAGS): Likewise.
4412 (memdisk_mod_LDFLAGS): Likewise.
4414 * disk/memdisk.c: New file.
4416 * include/grub/disk.h (grub_disk_dev_id): Add
4417 `GRUB_DISK_DEVICE_MEMDISK_ID'.
4419 * include/grub/i386/pc/kernel.h
4420 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4421 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4422 (grub_kernel_image_size): New variable declaration.
4423 (grub_total_module_size): Likewise.
4424 (grub_memdisk_image_size): Likewise.
4426 * include/grub/i386/pc/memory.h
4427 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4429 * include/grub/kernel.h: Include `<grub/symbol.h>'.
4430 (grub_arch_memdisk_addr): New variable declaration.
4431 (grub_arch_memdisk_size): Likewise.
4433 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4434 (grub_arch_memdisk_size): Likewise.
4436 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4437 (codestart): Replace hardcoded `0x100000' with
4438 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4440 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4441 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
4442 not NULL, append the contents of the file it refers to, at the end of
4443 the compressed kernel image. Initialize `grub_memdisk_image_size'
4444 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4445 (options): Add "memdisk"|'m' option.
4446 (main): Parse --memdisk|-m option, and pass user-provided path as
4447 parameter to generate_image().
4449 2008-01-20 Robert Millan <rmh@aybabtu.com>
4451 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4452 grub_dprintf() calls from here ...
4453 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4455 2008-01-20 Robert Millan <rmh@aybabtu.com>
4457 Fix detection of "real mode" when /options/real-mode? doesn't exist.
4459 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4461 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4462 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4463 `GRUB_IEEE1275_FLAG_REAL_MODE'.
4464 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4466 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4467 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4469 2008-01-19 Robert Millan <rmh@aybabtu.com>
4471 Get rid of confusing function (superseded by
4472 `grub_ieee1275_get_integer_property')
4473 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4475 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4477 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4478 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4479 in native endianness from grub_ieee1275_get_integer_property().
4481 2008-01-19 Robert Millan <rmh@aybabtu.com>
4483 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4484 command after "shut-down", since implementations differ on which
4485 the command for halt is.
4487 2008-01-19 Robert Millan <rmh@aybabtu.com>
4489 * include/grub/i386/linuxbios/console.h: Add header protection.
4490 (grub_keyboard_controller_init): New function prototype.
4491 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4492 (KEYBOARD_COMMAND_READ): Likewise.
4493 (KEYBOARD_COMMAND_WRITE): Likewise.
4494 (KEYBOARD_SCANCODE_SET1): Likewise.
4495 (grub_keyboard_controller_write): New function.
4496 (grub_keyboard_controller_read): Likewise.
4497 (grub_keyboard_controller_init): Likewise.
4499 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4500 (grub_console_init): On coreboot/LinuxBIOS, call
4501 grub_keyboard_controller_init().
4503 2008-01-19 Robert Millan <rmh@aybabtu.com>
4505 PowerPC changes provided by Pavel Roskin.
4507 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4508 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4509 don't rely on cmain() doing it.
4510 * kern/i386/ieee1275/startup.S (_start): Store %eax in
4511 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4513 2008-01-16 Robert Millan <rmh@aybabtu.com>
4515 * include/grub/i386/linuxbios/memory.h
4516 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4517 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4518 receive `table_header' as argument. Instead, probe for it in the
4519 known memory ranges where it can be present.
4520 (grub_available_iterate): Do not pass a fixed `table_header' address
4521 to grub_linuxbios_table_iterate().
4523 2008-01-15 Robert Millan <rmh@aybabtu.com>
4525 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4526 * conf/i386-ieee1275.rmk: New file.
4527 * include/grub/i386/ieee1275/console.h: Likewise.
4528 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4529 * include/grub/i386/ieee1275/kernel.h: Likewise.
4530 * include/grub/i386/ieee1275/time.h: Likewise.
4531 * kern/i386/ieee1275/init.c: Likewise.
4532 * kern/i386/ieee1275/startup.S: Likewise.
4534 2008-01-15 Robert Millan <rmh@aybabtu.com>
4536 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4537 when pointers are 32-bit (but still do set it to one when they are
4540 2008-01-15 Robert Millan <rmh@aybabtu.com>
4542 * include/grub/ieee1275/ieee1275.h
4543 (grub_ieee1275_get_integer_property): New function prototype.
4545 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4546 (grub_ieee1275_get_integer_property): New function. Wraps around
4547 grub_ieee1275_get_property() to handle endianness.
4549 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4550 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4552 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4553 (grub_map): Likewise.
4554 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4556 2008-01-15 Bean <bean123ch@gmail.com>
4558 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4559 (grub_script_execute_cmdline): Reset grub_errno.
4561 * normal/main.c (read_config_file): Reset grub_errno.
4563 * normal/parse.y (script_init): New.
4564 (script): Move function and menuentry here.
4566 (command): Add delimiter at the end of command.
4567 (commands): Adjust to match the new command.
4568 (commandblock): Remove grub_script_lexer_record_start.
4569 (menuentry): Add grub_script_lexer_record_start, use the new commands.
4570 (if): Use the new commands.
4572 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4574 2008-01-15 Robert Millan <rmh@aybabtu.com>
4576 * normal/menu.c (run_menu): Move timeout message from here ...
4577 (print_timeout): ... to here.
4578 (run_menu): Use print_timeout() once during initial draw to print
4579 the whole message, and again in every clock tick to update only
4580 the number of seconds.
4582 2008-01-15 Robert Millan <rmh@aybabtu.com>
4584 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4585 actual size of `available' from grub_ieee1275_get_property(), and
4586 restrict parsing to that bound.
4588 2008-01-15 Christian Franke <franke@computer.org>
4590 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4591 (argp_program_version): Remove variable.
4592 (argp_program_bug_address): Likewise.
4593 (options): Convert from struct argp_option to struct option.
4594 (struct arguments): Remove.
4595 (parse_opt): Remove.
4596 (usage): New function.
4597 (main): Replace struct args members by simple variables.
4598 Replace argp_parse() by getopt_long().
4599 Add switch to evaluate options.
4600 Add missing "(...)" around root_dev in prefix string.
4602 2008-01-14 Robert Millan <rmh@aybabtu.com>
4604 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4605 for grub_ieee1275_exit(), in order to improve portability.
4607 2008-01-14 Robert Millan <rmh@aybabtu.com>
4609 * util/grub.d/10_linux.in (prefix): Define.
4610 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
4612 2008-01-13 Pavel Roskin <proski@gnu.org>
4614 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
4615 grub_errno if no errors have been detected.
4617 2008-01-12 Robert Millan <rmh@aybabtu.com>
4619 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
4620 (grub_util_get_dev_abstraction): New function prototype.
4622 * util/getroot.c: Include `<grub/util/getroot.h>'
4623 (grub_util_get_grub_dev): Move detection of abstraction type to ...
4624 (grub_util_get_dev_abstraction): ... here (new function).
4626 * util/grub-probe.c: Convert PRINT_* to an enum. Add
4627 `PRINT_ABSTRACTION'.
4628 (probe): Probe for abstraction type when requested.
4629 (main): Understand `--target=abstraction'.
4631 * util/i386/efi/grub-install.in: Add abstraction module to core
4632 image when it is found to be necessary.
4633 * util/i386/pc/grub-install.in: Likewise.
4634 * util/powerpc/ieee1275/grub-install.in: Likewise.
4636 * util/update-grub_lib.in (font_path): Return system path without
4637 converting to GRUB path.
4638 * util/update-grub.in: Convert system path returned by font_path()
4639 to a GRUB path. Use `grub-probe -t abstraction' to determine what
4640 abstraction module is needed for loading fonts (if any). Export
4641 that as `GRUB_PRELOAD_MODULES'.
4642 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
4645 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
4647 Remove some unused code from reiserfs.
4649 * fs/reiserfs.c (struct grub_reiserfs_key)
4650 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
4651 (struct grub_reiserfs_node_body): Removed.
4652 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4654 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4656 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4658 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4660 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4662 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
4664 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4665 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4666 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4668 2008-01-10 Robert Millan <rmh@aybabtu.com>
4670 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
4671 Determines if a file is garbage left by packaging systems, etc.
4672 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
4673 for processing /etc/grub.d scripts.
4674 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
4675 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
4676 as a condition for processing Linux images.
4678 2008-01-10 Pavel Roskin <proski@gnu.org>
4680 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
4681 to compile reiserfs.c on PowerPC.
4683 2008-01-10 Robert Millan <rmh@aybabtu.com>
4685 * kern/device.c (grub_device_iterate): Do not abort device iteration
4686 when one of the devices cannot be opened.
4687 * kern/disk.c (grub_disk_open): Do not account previous failures of
4688 unrelated functions when grub_errno is checked for.
4690 2008-01-08 Robert Millan <rmh@aybabtu.com>
4692 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
4693 `! grub_linux_is_bzimage', change order of address comparison to make
4694 it more intuitive, and improve "too big zImage" error message.
4696 2008-01-08 Robert Millan <rmh@aybabtu.com>
4698 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
4699 `$(update-grub_DATA)'.
4700 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
4703 2008-01-07 Robert Millan <rmh@aybabtu.com>
4705 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
4706 which instruction is modified by grub-setup during installation
4707 (since it wasn't obvious by only looking at this file).
4709 2008-01-07 Robert Millan <rmh@aybabtu.com>
4711 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
4712 listing actual TODO items.
4714 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4716 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
4718 (grub_reiserfs_get_key_offset): Likewise.
4719 (grub_reiserfs_set_key_offset): Likewise.
4720 (grub_reiserfs_set_key_type): Likewise.
4721 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
4723 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
4724 better to remove the bitfield version completely.
4726 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4728 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
4729 allocated from the heap, due to the fshelp implementation.
4730 (grub_reiserfs_dir): Free NODE, due to the same reason.
4732 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4734 Mostly from Vincent Pelletier:
4736 * fs/reiserfs.c: New file.
4738 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
4739 (reiserfs_mod_SOURCES): New variable.
4740 (reiserfs_mod_CFLAGS): Likewise.
4741 (reiserfs_mod_LDFLAGS): Likewise.
4743 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
4744 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
4745 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
4748 2008-01-06 Robert Millan <rmh@aybabtu.com>
4750 * normal/color.c: Remove `<grub/env.h>'.
4752 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
4754 * include/grub/normal.h: Include <grub/env.h>.
4756 2008-01-05 Robert Millan <rmh@aybabtu.com>
4758 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
4759 usage example with `(hd0,1)'.
4760 Reported by Samuel Thibault.
4762 2008-01-05 Robert Millan <rmh@aybabtu.com>
4764 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
4765 (grub_linux_boot_zimage): Rename to ...
4766 (grub_linux_boot): ... this.
4767 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
4768 (grub_linux_boot_zimage): Conditionalize zImage copy.
4770 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
4771 (grub_linux_boot_bzimage): Remove prototype.
4772 (grub_linux_boot_zimage): Rename to ...
4773 (grub_linux_boot): ... this.
4775 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
4776 (grub_linux_boot): Remove function.
4778 2008-01-05 Robert Millan <rmh@aybabtu.com>
4780 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
4781 (grub_env_write_color_highlight): Likewise.
4782 (grub_wait_after_message): Likewise.
4784 * normal/color.c: New file.
4786 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4787 (normal_mod_DEPENDENCIES): Likewise.
4789 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4790 (normal_mod_DEPENDENCIES): Likewise.
4792 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4793 (normal_mod_DEPENDENCIES): Likewise.
4795 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4796 (normal_mod_DEPENDENCIES): Likewise.
4798 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
4799 for waiting after a message is printed.
4800 * normal/main.c (read_config_file): Likewise.
4801 (grub_normal_init): Register grub_env_write_color_normal() and
4802 grub_env_write_color_highlight() hooks. Mark `color_normal' and
4803 `color_highlight' variables as global.
4805 * normal/menu.c (grub_wait_after_message): New function.
4806 (grub_color_menu_normal): New variable. Replaces ...
4807 (GRUB_COLOR_MENU_NORMAL): ... this macro.
4808 (grub_color_menu_highlight): New variable. Replaces ...
4809 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
4810 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
4811 `GRUB_TERM_COLOR_STANDARD'.
4812 (print_message): Use `grub_setcolorstate' to reload colors. Rename
4813 `normal_code' and `highlight_code' to `old_color_normal' and
4814 `old_color_highlight', respectively.
4815 (grub_menu_init_page): Update colors when drawing the menu, based on
4816 `menu_color_normal' and `menu_color_highlight' variables.
4817 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
4818 a message is printed.
4820 2008-01-05 Robert Millan <rmh@aybabtu.com>
4822 * kern/env.c (grub_env_context_open): Propagate hooks for global
4823 variables to new context.
4825 * kern/main.c (grub_set_root_dev): Export `root' variable.
4827 2008-01-05 Robert Millan <rmh@aybabtu.com>
4829 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
4830 discs unconditionally, since udev and others have options to provide
4833 2008-01-05 Robert Millan <rmh@aybabtu.com>
4835 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
4837 2008-01-04 Christian Franke <franke@computer.org>
4839 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
4842 2008-01-03 Pavel Roskin <proski@gnu.org>
4844 * kern/i386/linuxbios/init.c: Put "void" to all function
4845 declarations with no arguments.
4846 * kern/powerpc/ieee1275/init.c: Likewise.
4847 * term/i386/pc/at_keyboard.c: Likewise.
4848 * term/i386/pc/vga_text.c: Likewise.
4849 * util/grub-mkdevicemap.c: Likewise.
4851 2008-01-02 Robert Millan <rmh@aybabtu.com>
4853 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
4854 message when loaded image is out of bounds.
4855 (grub_multiboot_load_elf64): Likewise.
4857 2008-01-02 Pavel Roskin <proski@gnu.org>
4859 * util/grub.d/10_linux.in: Try version without ".old" when
4860 looking for initrd. It's better to use initrd from the newer
4861 kernel of the same version than no initrd at all.
4863 2008-01-01 Robert Millan <rmh@aybabtu.com>
4865 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
4867 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
4869 * include/grub/video.h: Added grub_video_unmap_color and
4870 grub_video_get_active_render_target.
4871 (grub_video_adapter): Added unmap_color and get_active_render_target.
4873 * video/video.c: Added grub_video_unmap_color and
4874 grub_video_get_active_render_target.
4875 (grub_video_get_info): Changed method to accept NULL pointer as an
4876 argument to allow detection of active video adapter.
4878 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
4879 grub_video_vbe_unmap_color_int.
4880 Added grub_video_vbe_unmap_color and
4881 grub_video_vbe_get_active_render_target.
4882 (grub_video_vbe_adapter): Added unmap_color and
4883 get_active_render_target.
4885 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
4886 with grub_video_vbe_unmap_color_int.
4888 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
4889 (DEFAULT_NORMAL_COLOR): Likewise.
4890 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
4891 (DEFAULT_FG_COLOR): Removed.
4892 (DEFAULT_BG_COLOR): Likewise.
4893 (DEFAULT_CURSOR_COLOR): Changed value.
4894 (grub_virtual_screen): Added standard_color_setting,
4895 normal_color_setting, highlight_color_setting and term_color.
4896 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
4897 (bitmap_width): Added.
4898 (bitmap_height): Likewise.
4900 (set_term_color): Likewise.
4901 (grub_virtual_screen_setup): Changed to use new terminal coloring
4903 (grub_gfxterm_init): Added init for bitmap.
4904 (grub_gfxterm_fini): Added destroy for bitmap.
4905 (redraw_screen_rect): Updated to use background bitmap and new
4907 (scroll_up): Added optimization for case when there is no bitmap.
4908 (grub_gfxterm_cls): Fixed to use correct background color.
4909 (grub_virtual_screen_setcolorstate): Changed to use new terminal
4911 (grub_virtual_screen_setcolor): Likewise.
4912 (grub_virtual_screen_getcolor): Added.
4913 (grub_gfxterm_background_image_cmd): Likewise.
4914 (grub_video_term): Added setcolor and getcolor.
4915 (MOD_INIT): Added registration of background_image command.
4916 (MOD_TERM): Added unregistration for background_image command.
4918 2007-12-30 Pavel Roskin <proski@gnu.org>
4920 * loader/multiboot_loader.c: Fix multiboot command
4921 unregistration. Fix all typos in the word "multiboot".
4923 2007-12-29 Pavel Roskin <proski@gnu.org>
4925 * util/grub.d/10_linux.in: Refactor search for initrd. Add
4926 support for initrd names used in Fedora.
4928 2007-12-26 Bean <bean123ch@gmail.com>
4930 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
4931 (cpio_mod_SOURCES): New variable.
4932 (cpio_mod_CFLAGS): Likewise.
4933 (cpio_mod_LDFLAGS): Likewise.
4935 * fs/cpio.c: New file.
4937 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
4939 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4941 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4943 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4945 2007-12-25 Robert Millan <rmh@aybabtu.com>
4947 * include/grub/term.h (struct grub_term): Add `getcolor' function.
4948 (grub_getcolor): New function.
4950 * kern/term.c (grub_getcolor): New function.
4951 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
4952 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
4953 (print_entry): Set normal and highlight colors to
4954 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
4955 respectively, before printing and restore them to old
4957 (grub_menu_init_page): Likewise. Fill an additional colored space
4958 that would otherwise be left blank.
4960 * term/efi/console.c (grub_console_getcolor): New function.
4961 (struct grub_console_term.getcolor): New variable.
4962 * term/i386/pc/console.c (grub_console_getcolor): New function.
4963 (struct grub_console_term.getcolor): New variable.
4964 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
4965 (struct grub_console_term.getcolor): New variable.
4967 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
4968 (struct grub_console_term.setcolor): Remove variable.
4969 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
4970 (struct grub_console_term.setcolor): Remove variable.
4971 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
4972 (struct grub_console_term.setcolor): Remove variable.
4973 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
4974 (struct grub_console_term.setcolor): Remove variable.
4976 2007-12-25 Robert Millan <rmh@aybabtu.com>
4978 * configure.ac: Search for possible unifont.hex locations, and
4979 define UNIFONT_HEX if found.
4981 * Makefile.in (UNIFONT_HEX): Define variable.
4982 (DATA): Rename to ...
4983 (PKGLIB): ... this. Update all users.
4984 (PKGDATA): New variable.
4985 (pkgdata_IMAGES): Rename to ...
4986 (pkglib_IMAGES): ... this. Update all users.
4987 (pkgdata_MODULES): Rename to ...
4988 (pkglib_MODULES): ... this. Update all users.
4989 (pkgdata_PROGRAMS): Rename to ...
4990 (pkglib_PROGRAMS): ... this. Update all users.
4991 (pkgdata_DATA): Rename to ...
4992 (pkglib_DATA): ... this. Update all users.
4993 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
4994 (unicode.pff, ascii.pff): New rules.
4995 (all-local): Add `$(PKGDATA)' dependency.
4996 (install-local): Process `$(PKGDATA)'.
4998 * util/update-grub_lib.in (font_path): Search for *.pff files in
4999 a few more locations, including `${pkgdata}'.
5001 2007-12-23 Robert Millan <rmh@aybabtu.com>
5003 Patch from Bean <bean123ch@gmail.com>:
5004 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
5007 2007-12-21 Bean <bean123ch@gmail.com>
5009 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
5010 (ntfscomp_mod_SOURCES): New variable.
5011 (ntfscomp_mod_CFLAGS): Likewise.
5012 (ntfscomp_mod_LDFLAGS): Likewise.
5014 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
5015 (grub_probe_SOURCES): Likewise.
5016 (grub_emu_SOURCES): Likewise.
5018 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5019 (grub_emu_SOURCES): Likewise.
5021 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5022 (grub_emu_SOURCES): Likewise.
5024 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
5025 (grub_emu_SOURCES): Likewise.
5027 * fs/ntfs.c (grub_ntfscomp_func): New variable.
5028 (read_run_list): Renamed to grub_ntfs_read_run_list.
5029 (decomp_nextvcn): Moved to ntfscomp.c.
5030 (decomp_getch): Likewise.
5031 (decomp_get16): Likewise.
5032 (decomp_block): Likewise.
5033 (read_block): Likewise.
5034 (read_data): Partially moved to ntfscomp.c.
5035 (fixup): Change unsigned to grub_uint16_t.
5036 (read_mft): Change unsigned long to grub_uint32_t.
5037 (read_attr): Likewise.
5038 (read_data): Likewise.
5039 (read_run_data): Likewise.
5040 (read_run_list): Likewise.
5041 (read_mft): Likewise.
5043 * fs/ntfscomp.c: New file.
5045 * include/grub/ntfs.h: New file.
5047 2007-12-16 Robert Millan <rmh@aybabtu.com>
5049 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
5050 IDE disk check, since Linux is known to support 20 IDE disks.
5051 Reported by Colin Watson.
5053 2007-12-15 Bean <bean123ch@gmail.com>
5055 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5056 (lnxboot_img_SOURCES): New variable.
5057 (lnxboot_img_ASFLAGS): Likewise.
5058 (lnxboot_img_LDFLAGS): Likewise.
5060 * boot/i386/pc/lnxboot.S: New file.
5062 2007-11-24 Pavel Roskin <proski@gnu.org>
5064 * configure.ac: Test if '--build-id=none' is supported by the
5065 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
5066 objcopy to generate incorrect binary files (binutils
5067 2.17.50.0.18-1 as shipped by Fedora 8).
5068 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
5069 linking, so that build ID doesn't break the test.
5071 2007-11-24 Pavel Roskin <proski@gnu.org>
5073 * include/grub/i386/time.h: use "void" in the argument list
5075 * include/grub/powerpc/time.h: Likewise.
5076 * include/grub/sparc64/time.h: Likewise.
5078 2007-11-18 Christian Franke <franke@computer.org>
5080 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
5081 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
5082 This fixes the problem that function keys did not work in grub-emu.
5084 2007-11-18 Christian Franke <franke@computer.org>
5086 * disk/host.c (grub_host_open): Remove attribute unused from
5087 name parameter. Add check for "host". This fixes the problem
5088 that grub-emu does not find partitions.
5090 2007-11-18 Christian Franke <franke@computer.org>
5092 * util/hostfs.c (is_dir): New function.
5093 (grub_hostfs_dir): Handle missing dirent.d_type case.
5094 (grub_hostfs_read): Add missing fseek().
5095 (grub_hostfs_label): Clear label pointer. This fixes a crash
5096 of grub-emu on "ls (host)".
5098 2007-11-18 Christian Franke <franke@computer.org>
5100 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
5101 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
5102 to 64 bit boundary by default.
5104 2007-11-18 Bean <bean123ch@gmail.com>
5106 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5107 (hexdump_mod_SOURCES): New variable.
5108 (hexdump_mod_CFLAGS): Likewise.
5109 (hexdump_mod_LDFLAGS): Likewise.
5111 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5113 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5115 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5117 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5119 * include/grub/hexdump.h: New file.
5121 * commands/hexdump.c: New file.
5123 2007-11-10 Robert Millan <rmh@aybabtu.com>
5125 * commands/i386/pc/play.c (beep_off): Switch order of arguments
5126 in grub_outb() calls.
5127 (beep_on): Likewise.
5129 2007-11-10 Christian Franke <franke@computer.org>
5131 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5132 (grub_menu_run): Likewise.
5134 2007-11-10 Robert Millan <rmh@aybabtu.com>
5136 * include/grub/i386/efi/machine.h: New file.
5137 * include/grub/i386/linuxbios/machine.h: Likewise.
5138 * include/grub/i386/pc/machine.h: Likewise.
5139 * include/grub/powerpc/ieee1275/machine.h: Likewise.
5140 * include/grub/sparc64/ieee1275/machine.h: Likewise.
5142 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5143 (serial_hw_io_addr): New variable.
5144 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5145 instead of `(unsigned short *) 0x400'.
5147 2007-11-10 Bean <bean123ch@gmail.com>
5149 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5151 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5153 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5154 (vga_mod_SOURCES): Added.
5155 (vga_mod_CFLAGS): Likewise.
5156 (vga_mod_LDFLAGS): Likewise.
5158 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5160 (set_map_mask): Likewise.
5161 (set_read_map): Likewise.
5162 (set_read_address): Likewise.
5163 (vga_font): Removed variable.
5164 (get_vga_glyph): Removed function.
5165 (invalidate_char): Likewise.
5166 (write_char): Changed to use grub_font_get_glyph() for font
5168 (grub_vga_putchar): Likewise.
5169 (grub_vga_getcharwidth): Likewise.
5171 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5173 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5175 (pxeboot_img_LDFLAGS): Likewise.
5176 (diskboot_img_LDFLAGS): Likewise.
5177 (kernel_img_LDFLAGS): Likewise.
5179 2007-11-06 Robert Millan <rmh@aybabtu.com>
5181 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5182 in grub_outb() calls.
5183 (serial_hw_init): Likewise.
5185 2007-11-05 Robert Millan <rmh@aybabtu.com>
5187 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5188 spaces. Skip non-regular files.
5190 2007-11-05 Robert Millan <rmh@aybabtu.com>
5192 * kern/disk.c (grub_disk_firmware_fini)
5193 (grub_disk_firmware_is_tainted): New variables.
5195 * include/grub/disk.h (grub_disk_firmware_fini)
5196 (grub_disk_firmware_is_tainted): Likewise.
5198 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5199 (grub_disk_biosdisk_fini): ... to here.
5200 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5201 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5202 is set. Register grub_disk_biosdisk_fini() in
5203 `grub_disk_firmware_fini'.
5205 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5206 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5207 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5208 to finish existing firmware disk interface.
5210 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5211 (ata_mod_SOURCES): New variable.
5212 (ata_mod_CFLAGS): Likewise.
5213 (ata_mod_LDFLAGS): Likewise.
5215 2007-11-05 Robert Millan <rmh@aybabtu.com>
5217 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
5218 (grub_ata_wait): Reimplement using grub_millisleep().
5220 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5221 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5223 2007-11-03 Marco Gerards <marco@gnu.org>
5225 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5226 (CRTC_ADDR_PORT): New macro.
5227 (CRTC_DATA_PORT): Likewise.
5228 (CRTC_CURSOR): Likewise.
5229 (CRTC_CURSOR_ADDR_HIGH): Likewise.
5230 (CRTC_CURSOR_ADDR_LOW): Likewise.
5231 (update_cursor): New function.
5232 (grub_console_real_putchar): Call `update_cursor'.
5233 (grub_console_gotoxy): Likewise.
5234 (grub_console_cls): Set the default color when clearing the
5236 (grub_console_setcursor): Implemented.
5238 2007-11-03 Marco Gerards <marco@gnu.org>
5240 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5242 (grub_ata_pio_write): Likewise.
5244 (grub_atapi_identify): Wait after issuing an ATA command.
5245 (grub_atapi_packet): Likewise.
5246 (grub_ata_identify): Likewise.
5247 (grub_ata_readwrite): Likewise.
5249 2007-11-03 Marco Gerards <marco@gnu.org>
5251 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5252 (grub_ata_pio_write): Likewise.
5253 (grub_ata_readwrite): Use `grub_error', instead of
5254 returning `grub_errno'.
5256 2007-11-03 Marco Gerards <marco@gnu.org>
5258 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5259 grub_ata_pio_write once for every single sector, instead of for
5262 2007-10-31 Robert Millan <rmh@aybabtu.com>
5264 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5266 * conf/i386-linuxbios.rmk: New file.
5268 * kern/i386/pc/hardware.c: Likewise.
5269 * term/i386/pc/at_keyboard.c: Likewise.
5270 * term/i386/pc/vga_text.c: Likewise.
5272 * include/grub/i386/linuxbios/boot.h: Likewise.
5273 * include/grub/i386/linuxbios/console.h: Likewise.
5274 * include/grub/i386/linuxbios/init.h: Likewise.
5275 * include/grub/i386/linuxbios/kernel.h: Likewise.
5276 * include/grub/i386/linuxbios/loader.h: Likewise.
5277 * include/grub/i386/linuxbios/memory.h: Likewise.
5278 * include/grub/i386/linuxbios/serial.h: Likewise.
5279 * include/grub/i386/linuxbios/time.h: Likewise.
5281 * kern/i386/linuxbios/init.c: Likewise.
5282 * kern/i386/linuxbios/startup.S: Likewise.
5283 * kern/i386/linuxbios/table.c: Likewise.
5285 2007-10-31 Marco Gerards <marco@gnu.org>
5287 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
5288 (ata_mod_SOURCES): New variable.
5289 (ata_mod_CFLAGS): Likewise.
5290 (ata_mod_LDFLAGS): Likewise.
5292 * disk/ata.c: New file.
5294 * include/grub/disk.h (grub_disk_dev_id): Add
5295 `GRUB_DISK_DEV_ATA_ID'.
5297 2007-10-31 Robert Millan <rmh@aybabtu.com>
5299 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
5300 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
5302 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
5303 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
5305 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
5308 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
5310 2007-10-27 Robert Millan <rmh@aybabtu.com>
5312 * include/grub/types.h (ULONG_MAX): Define macro.
5314 2007-10-22 Robert Millan <rmh@aybabtu.com>
5316 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
5318 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
5320 2007-10-22 Robert Millan <rmh@aybabtu.com>
5322 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
5323 (pkgdata_MODULES): Add `biosdisk.mod'.
5324 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
5327 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
5328 (grub_biosdisk_init): Replace with ...
5329 (GRUB_MOD_INIT(biosdisk)): ... this.
5330 (grub_biosdisk_fini): Replace with ...
5331 (GRUB_MOD_FINI(biosdisk)): ... this.
5333 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
5334 (grub_machine_init): Remove call to grub_biosdisk_init().
5335 (grub_machine_fini): Remove call to grub_machine_fini().
5337 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
5339 2007-10-22 Robert Millan <rmh@aybabtu.com>
5341 * include/grub/time.h: New file.
5342 * include/grub/i386/time.h: Likewise.
5343 * include/grub/powerpc/time.h: Likewise.
5344 * include/grub/sparc64/time.h: Likewise.
5346 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
5348 (KERNEL_MACHINE_TIME_HEADER): ... this.
5349 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5351 (KERNEL_MACHINE_TIME_HEADER): ... this.
5352 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5354 (KERNEL_MACHINE_TIME_HEADER): ... this.
5356 * kern/i386/efi/init.c: Include `<grub/time.h>'.
5357 (grub_millisleep): New function.
5358 * kern/i386/pc/init.c: Include `<grub/time.h>'.
5359 (grub_millisleep): New function.
5360 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
5361 Remove `grub/machine/time.h' include.
5362 (grub_millisleep): New function.
5363 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
5364 Remove `grub/machine/time.h' include.
5365 (grub_millisleep): New function.
5367 * include/grub/misc.h (grub_div_roundup): New function.
5369 * kern/misc.c: Include `<grub/time.h>'.
5370 (grub_millisleep_generic): New function.
5372 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
5374 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
5376 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
5377 `machine/time.h'. Add `time.h'.
5378 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5380 2007-10-21 Robert Millan <rmh@aybabtu.com>
5382 * include/grub/misc.h (grub_max): New function.
5384 2007-10-21 Robert Millan <rmh@aybabtu.com>
5386 * util/misc.c (grub_util_info): Call fflush() before returning.
5388 2007-10-20 Robert Millan <rmh@aybabtu.com>
5390 * genmk.rb (Image): Copy `extra_flags' from here ...
5391 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
5393 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
5394 to `argc' and `args' arguments.
5396 2007-10-17 Robert Millan <rmh@aybabtu.com>
5398 * kern/i386/loader.S: New file.
5400 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
5401 * kern/i386/loader.S (grub_linux_prot_size)... to here.
5402 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
5403 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
5404 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
5405 * kern/i386/loader.S (grub_linux_real_addr)... to here.
5406 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
5407 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
5408 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
5409 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
5410 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5411 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5412 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5413 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5415 * kern/i386/realmode.S: New file.
5417 * kern/i386/pc/startup.S (protstack): Moved from here ...
5418 * kern/i386/realmode.S (protstack)... to here.
5419 * kern/i386/pc/startup.S (gdt): Moved from here ...
5420 * kern/i386/realmode.S (gdt)... to here.
5421 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5422 * kern/i386/realmode.S (prot_to_real)... to here.
5424 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5425 `kern/i386/realmode.S'.
5427 2007-10-17 Robert Millan <rmh@aybabtu.com>
5429 * include/grub/i386/loader.h: New file.
5431 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5432 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5433 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5434 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5435 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5436 * include/grub/i386/loader.h (grub_linux_prot_size)
5437 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5438 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5439 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5440 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5442 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5444 2007-10-15 Robert Millan <rmh@aybabtu.com>
5446 * normal/misc.c (grub_normal_print_device_info): Do not probe for
5447 filesystem when dev->disk is unset.
5448 Do probe for filesystem even when dev->disk->has_partitions is set.
5449 In case a filesystem is found, always report it.
5450 In case it isn't, if dev->disk->has_partitions is set, report that
5451 a partition table was found instead of reporting that no filesystem
5452 could be identified.
5454 2007-10-12 Robert Millan <rmh@aybabtu.com>
5456 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5457 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5459 * include/grub/types.h (grub_host_to_target16): New macro.
5460 (grub_host_to_target32): Likewise.
5461 (grub_host_to_target64): Likewise.
5462 (grub_target_to_host16): Likewise.
5463 (grub_target_to_host32): Likewise.
5464 (grub_target_to_host64): Likewise.
5466 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5468 (GRUB_MOD_ALIGN): ...this. Update all users.
5470 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5471 grub_host_to_target32.
5472 Replace grub_be_to_cpu32 with grub_target_to_host32.
5473 (load_modules): Likewise.
5474 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5475 Replace grub_be_to_cpu32 with grub_target_to_host32.
5476 Replace grub_cpu_to_be16 with grub_host_to_target16.
5477 Replace grub_cpu_to_be32 grub_host_to_target32.
5479 2007-10-12 Robert Millan <rmh@aybabtu.com>
5481 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5482 * util/elf/grub-mkimage.c: ... here.
5484 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
5485 `util/powerpc/ieee1275/grub-mkimage.c'.
5487 2007-10-07 Robert Millan <rmh@aybabtu.com>
5489 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5490 and make it easier to figure out.
5491 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5492 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5493 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5494 leave us with less than HEAP_MIN_SIZE total heap.
5495 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5497 2007-10-03 Robert Millan <rmh@aybabtu.com>
5499 * include/grub/i386/io.h: New file.
5500 * commands/i386/pc/play.c (inb): Removed.
5502 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5504 * term/i386/pc/serial.c (inb): Removed.
5506 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5508 * term/i386/pc/vga.c (inb): Removed.
5510 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5513 2007-10-02 Robert Millan <rmh@aybabtu.com>
5515 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5516 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5517 Reported by Marcin Kurek.
5519 2007-09-07 Robert Millan <rmh@aybabtu.com>
5521 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5522 SmartFirmware version updates (as released by Sven Luther), and avoid
5523 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5524 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5527 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5530 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5531 when merging two regions.
5533 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5535 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5536 * normal/completion.c (grub_normal_do_completion): Likewise.
5537 Reported by Hitoshi Ozeki.
5539 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5541 Do not use devices at boot in chainloading.
5543 * loader/i386/pc/chainloader.c (boot_drive): New variable.
5544 (boot_part_addr): Likewise.
5545 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5546 with BOOT_DRIVE and BOOT_PART_ADDR.
5547 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5548 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5550 2007-08-29 Robert Millan <rmh@aybabtu.com>
5552 Patch from Simon Peter <dn.tlp@gmx.net>:
5553 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5554 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5555 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
5556 util/i386/pc/grub-setup.c_DEPENDENCIES.
5557 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5558 util/grub-probe.c_DEPENDENCIES.
5559 * conf/powerpc-ieee1275.rmk: Likewise.
5561 2007-08-28 Robert Millan <rmh@aybabtu.com>
5563 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
5564 to tell grub-mkdevicemap how to name devices.
5565 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5568 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5569 util/i386/get_disk_name.c.
5570 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5571 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5572 util/ieee1275/get_disk_name.c.
5574 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5576 * DISTLIST: Add util/i386/get_disk_name.c and
5577 util/ieee1275/get_disk_name.c.
5579 * util/grub-mkdevicemap.c: Replace device naming logic with
5580 grub_util_get_disk_name() calls.
5582 2007-08-20 Robert Millan <rmh@aybabtu.com>
5584 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5585 (so that it works for both plural and singular quantities).
5587 2007-08-05 Robert Millan <rmh@aybabtu.com>
5589 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5590 so that [xz] isn't taken into account when determining order.
5592 2007-08-02 Marco Gerards <marco@gnu.org>
5594 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5595 `include/multiboot2.h', `include/grub/elfload.h',
5596 `include/multiboot.h', `include/grub/multiboot.h',
5597 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5598 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5599 `kern/elf.c', `loader/multiboot_loader.c',
5600 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5601 `loader/i386/pc/multiboot2.c',
5602 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5603 `util/i386/pc/grub-mkrescue.in'. Remove
5604 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5605 `include/grub/i386/pc/util/biosdisk.h' and
5606 `include/grub/powerpc/ieee1275/multiboot.h'.
5608 2007-08-02 Bean <bean123ch@gmail.com>
5610 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
5611 (ntfs_mod_SOURCES): New variable.
5612 (ntfs_mod_CFLAGS): Likewise.
5613 (ntfs_mod_LDFLAGS): Likewise.
5615 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
5616 (grub_probe_SOURCES): Likewise.
5617 (grub_emu_SOURCES): Likewise.
5619 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5620 (grub_emu_SOURCES): Likewise.
5622 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5623 (grub_emu_SOURCES): Likewise.
5625 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
5627 * fs/ntfs.c: New file.
5629 2007-08-02 Bean <bean123ch@gmail.com>
5631 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
5633 * file.h (grub_file): Likewise.
5635 * fshelp.h (grub_fshelp_read_file): Likewise.
5637 * util/i386/pc/grub-setup.c (setup): Likewise.
5638 (save_first_sector): Likewise.
5639 (save_blocklists): Likewise.
5641 * fs/affs.c (grub_affs_read_file): Likewise.
5643 * fs/ext2.c (grub_ext2_read_file): Likewise.
5645 * fs/fat.c (grub_fat_read_data): Likewise.
5647 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
5649 * fs/hfs.c (grub_hfs_read_file): Likewise.
5651 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5653 * fs/jfs.c (grub_jfs_read_file): Likewise.
5655 * fs/minix.c (grub_minix_read_file): Likewise.
5657 * fs/sfs.c (grub_sfs_read_file): Likewise.
5659 * fs/ufs.c (grub_ufs_read_file): Likewise.
5661 * fs/xfs.c (grub_xfs_read_file): Likewise.
5663 * command/blocklist.c (read_blocklist): Likewise.
5664 (print_blocklist): Likewise.
5666 2007-08-02 Marco Gerards <marco@gnu.org>
5668 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
5671 * disk/host.c: New file.
5673 * util/hostfs.c: Likewise.
5675 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
5676 return `GRUB_ERR_BAD_FS'.
5677 * fs/sfs.c (grub_sfs_mount): Likewise.
5678 * fs/xfs.c (grub_xfs_mount): Likewise.
5680 * include/grub/disk.h (enum grub_disk_dev_id): Add
5681 `GRUB_DISK_DEVICE_HOST_ID'.
5683 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
5685 2007-07-24 Jerone Young <jerone@gmail.com>
5687 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
5688 modules for compilation.
5689 * conf/powerpc-ieee1275.rmk: Likewise.
5691 * include/multiboot.h: Move multiboot definitions to one file. Rename
5692 many definitions to not get grub specific.
5693 * include/multiboot2.h: Create header with multiboot 2 definitions.
5694 * include/grub/multiboot.h: Header for grub specific function
5695 prototypes and definitions.
5696 * include/grub/multiboot2.h: Likewise.
5697 * include/grub/multiboot_loader.h: Likewise.
5698 * include/grub/i386/pc/multiboot.h: Removed.
5699 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
5701 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
5702 and 2 to allow for one multiboot and module commands.
5703 * loader/multiboot2.c: Add multiboot2 functionality.
5704 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
5705 and definition names.
5706 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
5708 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
5709 ieee1275 specific multiboot2 code.
5711 * kern/i386/pc/startup.S: Change headers and definition names for
5712 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
5714 2007-07-22 Robert Millan <rmh@aybabtu.com>
5716 * geninitheader.sh: Process file specified in first parameter rather
5717 than hardcoding grub_modules_init.lst.
5718 * geninit.sh: Likewise. Also, construct header name dynamically rather
5719 than hardcoding grub_modules_init.h.
5721 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
5722 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
5723 grub_probe_init.[ch] and grub_setup_init.[ch].
5725 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
5726 grub_modules_init.h with grub_emu_init.h.
5727 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
5728 grub_probe_init.[ch] files.
5729 * conf/i386-efi.rmk: Likewise.
5730 * conf/i386-pc.rmk: Likewise.
5731 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
5732 grub_setup_init.[ch] files.
5734 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
5735 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
5736 to initialize modules rather than a list of hardcoded functions.
5737 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
5738 grub_init_all() to initialize modules rather than a list of hardcoded
5741 2007-07-22 Robert Millan <rmh@aybabtu.com>
5743 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
5744 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
5746 2007-07-22 Robert Millan <rmh@aybabtu.com>
5748 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5749 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
5750 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
5751 flag when running on SmartFirmware.
5752 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
5753 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
5756 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5757 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
5758 rather than decreasing it.
5760 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
5761 there's not enough space to do it, fail in the same way as when it
5762 can't be done because there are no partitions.
5764 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
5765 when nvsetenv failed.
5767 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5769 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
5770 because this rule is automatically generated.
5771 (grub-mkrescue): Removed for the same reason as above.
5773 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5775 Migrate to GNU General Public License Version 3.
5777 * COPYING: Replaced with the plain text version of GPLv3.
5779 * config.guess: Updated from gnulib.
5780 * config.sub: Likewise.
5782 * geninit.sh: Output a GPLv3 copyright notice.
5783 * geninitheader.sh: Likewise.
5784 * genmodsrc.sh: Likewise.
5785 * gensymlist.sh.in: Likewise.
5787 * boot/i386/pc/boot.S: Upgraded to GPLv3.
5788 * boot/i386/pc/diskboot.S: Likewise.
5789 * boot/i386/pc/pxeboot.S: Likewise.
5790 * commands/blocklist.c: Likewise.
5791 * commands/boot.c: Likewise.
5792 * commands/cat.c: Likewise.
5793 * commands/cmp.c: Likewise.
5794 * commands/configfile.c: Likewise.
5795 * commands/echo.c: Likewise.
5796 * commands/help.c: Likewise.
5797 * commands/ls.c: Likewise.
5798 * commands/search.c: Likewise.
5799 * commands/terminal.c: Likewise.
5800 * commands/test.c: Likewise.
5801 * commands/videotest.c: Likewise.
5802 * commands/i386/cpuid.c: Likewise.
5803 * commands/i386/pc/halt.c: Likewise.
5804 * commands/i386/pc/play.c: Likewise.
5805 * commands/i386/pc/reboot.c: Likewise.
5806 * commands/i386/pc/vbeinfo.c: Likewise.
5807 * commands/i386/pc/vbetest.c: Likewise.
5808 * commands/ieee1275/halt.c: Likewise.
5809 * commands/ieee1275/reboot.c: Likewise.
5810 * commands/ieee1275/suspend.c: Likewise.
5811 * disk/loopback.c: Likewise.
5812 * disk/lvm.c: Likewise.
5813 * disk/raid.c: Likewise.
5814 * disk/efi/efidisk.c: Likewise.
5815 * disk/i386/pc/biosdisk.c: Likewise.
5816 * disk/ieee1275/ofdisk.c: Likewise.
5817 * font/manager.c: Likewise.
5818 * fs/affs.c: Likewise.
5819 * fs/ext2.c: Likewise.
5820 * fs/fat.c: Likewise.
5821 * fs/fshelp.c: Likewise.
5822 * fs/hfs.c: Likewise.
5823 * fs/hfsplus.c: Likewise.
5824 * fs/iso9660.c: Likewise.
5825 * fs/jfs.c: Likewise.
5826 * fs/minix.c: Likewise.
5827 * fs/sfs.c: Likewise.
5828 * fs/ufs.c: Likewise.
5829 * fs/xfs.c: Likewise.
5830 * hello/hello.c: Likewise.
5831 * include/grub/acorn_filecore.h: Likewise.
5832 * include/grub/arg.h: Likewise.
5833 * include/grub/bitmap.h: Likewise.
5834 * include/grub/boot.h: Likewise.
5835 * include/grub/cache.h: Likewise.
5836 * include/grub/device.h: Likewise.
5837 * include/grub/disk.h: Likewise.
5838 * include/grub/dl.h: Likewise.
5839 * include/grub/elfload.h: Likewise.
5840 * include/grub/env.h: Likewise.
5841 * include/grub/err.h: Likewise.
5842 * include/grub/file.h: Likewise.
5843 * include/grub/font.h: Likewise.
5844 * include/grub/fs.h: Likewise.
5845 * include/grub/fshelp.h: Likewise.
5846 * include/grub/gzio.h: Likewise.
5847 * include/grub/hfs.h: Likewise.
5848 * include/grub/kernel.h: Likewise.
5849 * include/grub/loader.h: Likewise.
5850 * include/grub/lvm.h: Likewise.
5851 * include/grub/misc.h: Likewise.
5852 * include/grub/mm.h: Likewise.
5853 * include/grub/net.h: Likewise.
5854 * include/grub/normal.h: Likewise.
5855 * include/grub/parser.h: Likewise.
5856 * include/grub/partition.h: Likewise.
5857 * include/grub/pc_partition.h: Likewise.
5858 * include/grub/raid.h: Likewise.
5859 * include/grub/rescue.h: Likewise.
5860 * include/grub/script.h: Likewise.
5861 * include/grub/setjmp.h: Likewise.
5862 * include/grub/symbol.h: Likewise.
5863 * include/grub/term.h: Likewise.
5864 * include/grub/terminfo.h: Likewise.
5865 * include/grub/tparm.h: Likewise.
5866 * include/grub/types.h: Likewise.
5867 * include/grub/video.h: Likewise.
5868 * include/grub/efi/api.h: Likewise.
5869 * include/grub/efi/chainloader.h: Likewise.
5870 * include/grub/efi/console.h: Likewise.
5871 * include/grub/efi/console_control.h: Likewise.
5872 * include/grub/efi/disk.h: Likewise.
5873 * include/grub/efi/efi.h: Likewise.
5874 * include/grub/efi/pe32.h: Likewise.
5875 * include/grub/efi/time.h: Likewise.
5876 * include/grub/i386/linux.h: Likewise.
5877 * include/grub/i386/setjmp.h: Likewise.
5878 * include/grub/i386/types.h: Likewise.
5879 * include/grub/i386/efi/kernel.h: Likewise.
5880 * include/grub/i386/efi/loader.h: Likewise.
5881 * include/grub/i386/efi/time.h: Likewise.
5882 * include/grub/i386/pc/biosdisk.h: Likewise.
5883 * include/grub/i386/pc/boot.h: Likewise.
5884 * include/grub/i386/pc/chainloader.h: Likewise.
5885 * include/grub/i386/pc/console.h: Likewise.
5886 * include/grub/i386/pc/init.h: Likewise.
5887 * include/grub/i386/pc/kernel.h: Likewise.
5888 * include/grub/i386/pc/loader.h: Likewise.
5889 * include/grub/i386/pc/memory.h: Likewise.
5890 * include/grub/i386/pc/multiboot.h: Likewise.
5891 * include/grub/i386/pc/serial.h: Likewise.
5892 * include/grub/i386/pc/time.h: Likewise.
5893 * include/grub/i386/pc/vbe.h: Likewise.
5894 * include/grub/i386/pc/vbeblit.h: Likewise.
5895 * include/grub/i386/pc/vbefill.h: Likewise.
5896 * include/grub/i386/pc/vbeutil.h: Likewise.
5897 * include/grub/i386/pc/vga.h: Likewise.
5898 * include/grub/ieee1275/ieee1275.h: Likewise.
5899 * include/grub/ieee1275/ofdisk.h: Likewise.
5900 * include/grub/powerpc/libgcc.h: Likewise.
5901 * include/grub/powerpc/setjmp.h: Likewise.
5902 * include/grub/powerpc/types.h: Likewise.
5903 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
5904 * include/grub/powerpc/ieee1275/console.h: Likewise.
5905 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
5906 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
5907 * include/grub/powerpc/ieee1275/loader.h: Likewise.
5908 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
5909 * include/grub/powerpc/ieee1275/time.h: Likewise.
5910 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
5911 * include/grub/sparc64/libgcc.h: Likewise.
5912 * include/grub/sparc64/setjmp.h: Likewise.
5913 * include/grub/sparc64/types.h: Likewise.
5914 * include/grub/sparc64/ieee1275/console.h: Likewise.
5915 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
5916 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
5917 * include/grub/sparc64/ieee1275/time.h: Likewise.
5918 * include/grub/util/biosdisk.h: Likewise.
5919 * include/grub/util/getroot.h: Likewise.
5920 * include/grub/util/lvm.h: Likewise.
5921 * include/grub/util/misc.h: Likewise.
5922 * include/grub/util/raid.h: Likewise.
5923 * include/grub/util/resolve.h: Likewise.
5924 * io/gzio.c: Likewise.
5925 * kern/device.c: Likewise.
5926 * kern/disk.c: Likewise.
5927 * kern/dl.c: Likewise.
5928 * kern/elf.c: Likewise.
5929 * kern/env.c: Likewise.
5930 * kern/err.c: Likewise.
5931 * kern/file.c: Likewise.
5932 * kern/fs.c: Likewise.
5933 * kern/loader.c: Likewise.
5934 * kern/main.c: Likewise.
5935 * kern/misc.c: Likewise.
5936 * kern/mm.c: Likewise.
5937 * kern/parser.c: Likewise.
5938 * kern/partition.c: Likewise.
5939 * kern/rescue.c: Likewise.
5940 * kern/term.c: Likewise.
5941 * kern/efi/efi.c: Likewise.
5942 * kern/efi/init.c: Likewise.
5943 * kern/efi/mm.c: Likewise.
5944 * kern/i386/dl.c: Likewise.
5945 * kern/i386/efi/init.c: Likewise.
5946 * kern/i386/efi/startup.S: Likewise.
5947 * kern/i386/pc/init.c: Likewise.
5948 * kern/i386/pc/lzo1x.S: Likewise.
5949 * kern/i386/pc/startup.S: Likewise.
5950 * kern/ieee1275/ieee1275.c: Likewise.
5951 * kern/powerpc/cache.S: Likewise.
5952 * kern/powerpc/dl.c: Likewise.
5953 * kern/powerpc/ieee1275/cmain.c: Likewise.
5954 * kern/powerpc/ieee1275/crt0.S: Likewise.
5955 * kern/powerpc/ieee1275/init.c: Likewise.
5956 * kern/powerpc/ieee1275/openfw.c: Likewise.
5957 * kern/sparc64/cache.S: Likewise.
5958 * kern/sparc64/dl.c: Likewise.
5959 * kern/sparc64/ieee1275/init.c: Likewise.
5960 * kern/sparc64/ieee1275/openfw.c: Likewise.
5961 * loader/efi/chainloader.c: Likewise.
5962 * loader/efi/chainloader_normal.c: Likewise.
5963 * loader/i386/efi/linux.c: Likewise.
5964 * loader/i386/efi/linux_normal.c: Likewise.
5965 * loader/i386/pc/chainloader.c: Likewise.
5966 * loader/i386/pc/chainloader_normal.c: Likewise.
5967 * loader/i386/pc/linux.c: Likewise.
5968 * loader/i386/pc/linux_normal.c: Likewise.
5969 * loader/i386/pc/multiboot.c: Likewise.
5970 * loader/i386/pc/multiboot_normal.c: Likewise.
5971 * loader/powerpc/ieee1275/linux.c: Likewise.
5972 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5973 * normal/arg.c: Likewise.
5974 * normal/cmdline.c: Likewise.
5975 * normal/command.c: Likewise.
5976 * normal/completion.c: Likewise.
5977 * normal/execute.c: Likewise.
5978 * normal/function.c: Likewise.
5979 * normal/lexer.c: Likewise.
5980 * normal/main.c: Likewise.
5981 * normal/menu.c: Likewise.
5982 * normal/menu_entry.c: Likewise.
5983 * normal/misc.c: Likewise.
5984 * normal/parser.y: Likewise.
5985 * normal/script.c: Likewise.
5986 * normal/i386/setjmp.S: Likewise.
5987 * normal/powerpc/setjmp.S: Likewise.
5988 * normal/sparc64/setjmp.S: Likewise.
5989 * partmap/acorn.c: Likewise.
5990 * partmap/amiga.c: Likewise.
5991 * partmap/apple.c: Likewise.
5992 * partmap/gpt.c: Likewise.
5993 * partmap/pc.c: Likewise.
5994 * partmap/sun.c: Likewise.
5995 * term/gfxterm.c: Likewise.
5996 * term/terminfo.c: Likewise.
5997 * term/efi/console.c: Likewise.
5998 * term/i386/pc/console.c: Likewise.
5999 * term/i386/pc/serial.c: Likewise.
6000 * term/i386/pc/vesafb.c: Likewise.
6001 * term/i386/pc/vga.c: Likewise.
6002 * term/ieee1275/ofconsole.c: Likewise.
6003 * util/biosdisk.c: Likewise.
6004 * util/console.c: Likewise.
6005 * util/genmoddep.c: Likewise.
6006 * util/getroot.c: Likewise.
6007 * util/grub-emu.c: Likewise.
6008 * util/grub-mkdevicemap.c: Likewise.
6009 * util/grub-probe.c: Likewise.
6010 * util/lvm.c: Likewise.
6011 * util/misc.c: Likewise.
6012 * util/raid.c: Likewise.
6013 * util/resolve.c: Likewise.
6014 * util/update-grub.in: Likewise.
6015 * util/update-grub_lib.in: Likewise.
6016 * util/grub.d/00_header.in: Likewise.
6017 * util/grub.d/10_hurd.in: Likewise.
6018 * util/grub.d/10_linux.in: Likewise.
6019 * util/i386/efi/grub-install.in: Likewise.
6020 * util/i386/efi/grub-mkimage.c: Likewise.
6021 * util/i386/pc/grub-install.in: Likewise.
6022 * util/i386/pc/grub-mkimage.c: Likewise.
6023 * util/i386/pc/grub-mkrescue.in: Likewise.
6024 * util/i386/pc/grub-setup.c: Likewise.
6025 * util/i386/pc/misc.c: Likewise.
6026 * util/powerpc/ieee1275/grub-install.in: Likewise.
6027 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
6028 * util/powerpc/ieee1275/misc.c: Likewise.
6029 * video/bitmap.c: Likewise.
6030 * video/video.c: Likewise.
6031 * video/i386/pc/vbe.c: Likewise.
6032 * video/i386/pc/vbeblit.c: Likewise.
6033 * video/i386/pc/vbefill.c: Likewise.
6034 * video/i386/pc/vbeutil.c: Likewise.
6035 * video/readers/tga.c: Likewise.
6037 2007-07-02 Robert Millan <rmh@aybabtu.com>
6039 * conf/i386-efi.rmk: Replace obsolete reference to
6040 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
6041 with util/getroot.c.
6042 * conf/powerpc-ieee1275.rmk: Likewise.
6043 * conf/sparc64-ieee1275.rmk: Likewise.
6045 * util/grub-emu.c (main): Fix unchecked pointer handling.
6047 2007-07-02 Robert Millan <rmh@aybabtu.com>
6049 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
6050 invocation to fail, in order to support partition-less media.
6052 * util/i386/pc/grub-install.in: Likewise.
6054 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
6055 which fs or partmap modules are needed (akin to its sister scripts).
6057 Also use grub-probe to get rid of unportable /proc/mounts check.
6059 Print the same informational message that the other scripts do, before
6062 2007-06-23 Robert Millan <rmh@aybabtu.com>
6064 * util/update-grub_lib.in (font_path): New function. Determine whether
6065 a font file can be found and, if so, echo the GRUB path to it.
6067 * util/update-grub.in: Handle multiple terminals depending on user
6068 input, platform availability and font file presence. Propagate
6069 variables of our findings to /etc/grub.d/ children.
6071 * util/grub.d/00_header.in: Handle multiple terminals, based on
6072 environment setup by update-grub.
6074 2007-06-23 Robert Millan <rmh@aybabtu.com>
6076 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
6078 2007-06-21 Robert Millan <rmh@aybabtu.com>
6080 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
6081 indicate end of data section in kernel image.
6082 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
6083 GRUB_KERNEL_MACHINE_DATA_END.
6085 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
6087 * kern/i386/efi/startup.S: Likewise.
6089 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
6090 during image generation. Implement --prefix option to override this
6092 * util/i386/efi/grub-mkimage.c: Likewise.
6094 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
6095 code to make path relative to its root into a separate function.
6097 * util/i386/pc/grub-install.in: Use newly provided
6098 make_system_path_relative_to_its_root() to convert ${grubdir}, then
6099 pass the result to grub-install --prefix.
6101 2007-06-13 Robert Millan <rmh@aybabtu.com>
6103 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6105 * util/grub-emu.c: Use above definitions from misc.h instead of
6107 * util/grub-mkdevicemap.c: Likewise.
6108 * util/i386/pc/grub-setup.c: Likewise.
6109 * util/grub-probe.c: Likewise.
6110 (probe): Abort with grub_util_error() when either
6111 grub_guess_root_device or grub_util_get_grub_dev fails.
6113 2007-06-12 Robert Millan <rmh@aybabtu.com>
6115 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6117 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6119 * util/grub-probe.c (probe): Likewise for "drive_name".
6121 2007-06-11 Robert Millan <rmh@aybabtu.com>
6123 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6124 not just the cdrom one.
6126 2007-06-11 Robert Millan <rmh@aybabtu.com>
6128 * util/i386/pc/grub-mkrescue.in: Add "set -e".
6129 Add --pkglibdir=DIR option to override pkglibdir.
6130 Mention --image-type=TYPE in help output.
6131 Fix --grub-mkimage (it was a no-op).
6132 Abort gracefully when no parameter is given.
6134 2007-06-11 Robert Millan <rmh@aybabtu.com>
6136 * util/i386/pc/grub-mkrescue.in: New file.
6137 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
6138 * Makefile.in: Handle bin_SCRIPTS.
6140 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
6142 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6143 list of video modes.
6145 2007-06-06 Robert Millan <rmh@aybabtu.com>
6147 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6148 file doesn't exist, or if it is in a filesystem grub can't read.
6150 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
6151 not abort if GRUB_DRIVE could not be defined. Rearrange generated
6152 header comment to fit in 80 columns when the variables are resolved.
6154 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6155 could be identified by update-grub. Remove redundant check for
6156 unifont.pff existence (since convert_system_path_to_grub_path now
6159 2007-06-04 Robert Millan <rmh@aybabtu.com>
6161 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6163 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6165 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6167 2007-06-04 Robert Millan <rmh@aybabtu.com>
6169 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6171 * include/grub/partition.h: Declare grub_apple_partition_map_init and
6172 grub_apple_partition_map_fini.
6175 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6176 to access >2 TiB disks).
6178 Print disk->total_sectors with %llu instead of %lu, since this
6179 variable is always 64-bit (prevents wrong disk size from being displayed
6180 on either >2 TiB disk or big-endian CPU).
6182 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6183 into a generic case that supports all (sane) partition maps.
6185 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6188 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6189 and grub_apple_partition_map_fini() after that.
6191 2007-06-01 Robert Millan <rmh@aybabtu.com>
6193 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6195 * util/grub.d/00_header.in: Only enable gfxterm when
6196 convert_system_path_to_grub_path() succeeds.
6198 2007-05-20 Robert Millan <rmh@aybabtu.com>
6200 * util/update-grub_lib.in: New file.
6201 * DISTLIST: Add update-grub_lib.in.
6202 * conf/common.rmk: Generate update-grub_lib and install it in
6204 * Makefile.in: Add install routine for $(lib_DATA).
6206 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6207 function provided by update-grub_lib to support arbitrary paths of
6209 * util/update-grub.in: Use convert_system_path_to_grub_path() to
6210 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6212 2007-05-19 Robert Millan <rmh@aybabtu.com>
6214 * commands/i386/cpuid.c: New module.
6216 * conf/i386-efi.rmk: Enable cpuid.mod.
6217 * conf/i386-pc.rmk: Likewise.
6219 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6221 * kern/disk.c (grub_disk_read): Check return value of
6224 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6226 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6228 * disk/raid.c (grub_raid_open): Likewise.
6230 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6232 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6233 stack instead of on the heap.
6235 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6236 before doing a read on it.
6238 * configure.ac: Only use -fno-stack-protector for the target
6241 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6243 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6244 __attribute_ ((unused)) to mode_type argument.
6246 * util/getroot.c (grub_guess_root_device): Fix #endif.
6248 * kern/misc.c (memcmp): Fix prototype.
6250 * include/grub/partition.h [GRUB_UTIL]
6251 (grub_gpt_partition_map_init): Add prototype.
6252 (grub_gpt_partition_map_fini): Likewise.
6254 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6257 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6258 (grub_fat_read_data): Likewise.
6259 (grub_fat_find_dir): Likewise.
6261 * font/manager.c (find_glyph): Make table a const.
6262 (grub_font_get_glyph): Remove bitmap from if statement.
6264 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
6266 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6267 code, first search for device in /dev/mapper, then in /dev.
6268 (grub_util_get_grub_dev): New function.
6269 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6271 * util/grub-probe.c (probe): Remove check for RAID, call
6272 grub_util_get_grub_dev() instead of
6273 grub_util_biosdisk_get_grub_dev().
6274 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6275 grub_util_biosdisk_get_grub_dev().
6276 * util/i386/pc/grub-setup.c (main): Likewise.
6278 2007-05-16 Robert Millan <rmh@aybabtu.com>
6280 * DISTLIST: Update for the latest changes.
6281 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6282 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
6283 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
6284 grub/util/biosdisk.h.
6285 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
6286 grub/util/biosdisk.h.
6288 2007-05-16 Robert Millan <rmh@aybabtu.com>
6290 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
6292 2007-05-16 Robert Millan <rmh@aybabtu.com>
6294 * util/i386/efi/grub-install.in: New.
6295 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
6296 newly added grub-install.
6297 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
6299 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
6300 grub/util/biosdisk.h.
6301 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
6302 grub/util/biosdisk.h.
6304 2007-05-16 Robert Millan <rmh@aybabtu.com>
6306 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
6307 * include/grub/util/biosdisk.h: ... here.
6308 * util/i386/pc/biosdisk.c: Moved to ...
6309 * util/biosdisk.c: ... here.
6310 * util/i386/pc/getroot.c: Moved to ...
6311 * util/getroot.c: ... here.
6312 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
6313 * util/grub-mkdevicemap.c: ... here.
6314 * util/i386/pc/grub-probe.c: Moved to ...
6315 * util/grub-probe.c: ... here.
6317 2007-05-15 Robert Millan <rmh@aybabtu.com>
6319 * util/update-grub.in: Remove duplicated line in grub.cfg header
6322 2007-05-13 Robert Millan <rmh@aybabtu.com>
6324 * util/update-grub.in: Fix a few assumptions about the devices holding
6325 /, /boot and /boot/grub being the same.
6326 * util/grub.d/00_header.in: Likewise.
6327 * util/grub.d/10_hurd.in: Likewise.
6328 * util/grub.d/10_linux.in: Likewise.
6330 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
6331 patterns. Use that to define the `.old' suffix as older than `'.
6333 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
6335 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
6336 the grub.cfg header message.
6338 2007-05-11 Robert Millan <rmh@aybabtu.com>
6340 * util/update-grub.in: Create device.map if it doesn't already exist,
6341 before attempting to run grub-probe.
6342 Check for grub-probe and grub-mkdevicemap with the same code
6343 grub-install is using.
6346 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
6348 * Makefile.in: Add the datarootdir autoconf variable.
6350 2007-05-09 Robert Millan <rmh@aybabtu.com>
6352 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
6353 fail gracefully if dev->disk->partition == NULL.
6355 2007-05-07 Robert Millan <rmh@aybabtu.com>
6357 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
6358 determine partition map module.
6359 * util/i386/pc/grub-install.in: Use this feature to decide which
6360 partition module to load, instead of hardcoding pc and gpt.
6362 2007-05-07 Robert Millan <rmh@aybabtu.com>
6364 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
6365 source directory differs from build directory.
6367 2007-05-05 Robert Millan <rmh@aybabtu.com>
6369 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
6372 2007-05-05 Robert Millan <rmh@aybabtu.com>
6374 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
6376 2007-05-05 Robert Millan <rmh@aybabtu.com>
6378 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
6379 command-line arguments via ${GRUB_CMDLINE_LINUX}.
6381 2007-05-05 Robert Millan <rmh@aybabtu.com>
6383 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
6384 (grub_probe_SOURCES): Likewise.
6385 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
6386 GPT and initialize dos_part and bsd_part accordingly.
6387 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
6389 (main): Activate gpt module for use during partition identification,
6390 and deactivate it afterwards.
6391 * util/i386/pc/grub-install.in: Add gpt module to core.img.
6392 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
6393 partition identification, and deactivate it afterwards.
6395 2007-05-05 Robert Millan <rmh@aybabtu.com>
6397 * term/i386/pc/console.c (grub_console_fini): Call
6398 grub_term_set_current() before grub_term_unregister().
6400 2007-05-04 Robert Millan <rmh@aybabtu.com>
6402 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
6403 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
6404 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
6405 and update-grub_DATA.
6406 * conf/common.rmk: Build and install update-grub components.
6407 * conf/common.mk: Regenerate.
6408 * util/update-grub.in: New. Core of update-grub.
6409 * util/grub.d/00_header.in: New. Generates grub.cfg header.
6410 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
6411 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
6412 * util/grub.d/README: New. Document grub.d directory layout.
6414 2007-05-01 Robert Millan <rmh@aybabtu.com>
6416 * util/grub-emu.c: Move initialization functions
6417 grub_util_biosdisk_init() and grub_init_all() before
6418 grub_util_biosdisk_get_grub_dev(), which relies on them.
6420 2007-04-19 Robert Millan <rmh@aybabtu.com>
6422 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6425 2007-04-18 Jerone Young <jerone@gmail.com>
6427 * kernel/elf.c: Add missing parenthesis for conditional statement
6430 2007-04-10 Jerone Young <jerone@gmail.com>
6432 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6433 continue on and look for device node with real device name.
6435 2007-04-10 Jerone Young <jerone@gmail.com>
6437 * configure.ac: Add argument for autoconf to use transformation
6439 * Makefile.in: Add autoconf package transformation code.
6440 * util/i386/pc/grub-install.in: Likewise.
6441 * util/powerpc/ieee1275/grub-install.in: Likewise.
6443 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
6445 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6446 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6447 (EXT2_REVISION): Likewise.
6448 (EXT2_INODE_SIZE): Likewise.
6449 (struct grub_ext2_block_group): Added a missing member
6451 (grub_ext2_read_inode): Divide by the inode size in a superblock
6452 instead of 128 to obtain INODES_PER_BLOCK.
6453 Use the macro EXT2_INODE_SIZE instead of directly using
6456 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
6458 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6459 superblock instead of the structure size to compute an
6460 offset. This fixes the problem that GRUB could not read a
6461 filesystem when inode size is different from 128-byte.
6463 2007-03-05 Marco Gerards <marco@gnu.org>
6465 * normal/main.c (read_config_file): When "menu" is not set, create
6468 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6470 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6471 (HEAP_LIMIT): New macro.
6472 (grub_claim_heap): Claim memory up to `heaplimit'.
6474 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6476 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6477 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6479 (grub_arch_modules_addr): Return address after `_end'.
6480 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6481 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6482 (add_segments): Calculate `_end' from phdr size and location.
6483 (ALIGN_UP): Moved to ...
6484 * include/grub/misc.h: here.
6485 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6487 (GRUB_IEEE1275_MODULE_BASE): Removed.
6489 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6491 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6494 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6496 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6498 (grub_elf64_load_hook_t): Likewise.
6499 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6502 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6504 * kern/mm.c: Update copyright.
6505 (grub_mm_debug): Correct syntax error.
6506 (grub_mm_dump_free): New function.
6507 (grub_debug_free): Call `grub_free'.
6508 * include/grub/mm.h: Update copyright.
6509 (grub_mm_dump_free): Add declaration.
6511 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6513 * include/grub/ieee1275/ieee1275.h: Update copyright.
6514 * kern/powerpc/ieee1275/init.c: Likewise.
6515 * kern/powerpc/ieee1275/openfw.c: Likewise.
6517 * loader/powerpc/ieee1275/linux.c: Likewise.
6518 * include/grub/elfload.h: Likewise.
6519 * kern/elf.c: Likewise.
6520 (grub_elf32_load): Pass `base' and `size' parameters. Update all
6522 (grub_elf64_load): Likewise.
6523 (grub_elf32_load_segment): Move to a nested function.
6524 (grub_elf64_load_segment): Likewise.
6526 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6528 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6530 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6531 (grub_heap_len): Likewise.
6532 (HEAP_SIZE): New macro.
6533 (grub_claim_heap): New function.
6534 (grub_machine_init): Don't claim heap directly. Call
6536 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6537 (grub_available_iterate): New function.
6539 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
6541 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6542 * configure.ac: Use it for testing the HOST and TARGET compilers.
6544 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
6546 * Makefile.in (enable_grub_emu): New variable.
6547 * configure.ac (--enable-grub-emu): New option.
6548 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6549 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6550 * conf/i386-pc.rmk: Likewise.
6551 * conf/powerpc-ieee1275.rmk: Likewise.
6552 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6554 2006-12-12 Marco Gerards <marco@gnu.org>
6556 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6558 * kern/env.c (grub_env_unset): Don't free the member `value' when
6559 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6562 * normal/main.c (current_menu): Removed.
6563 (free_menu): Unset the `menu' environment variable.
6564 (grub_normal_menu_addentry): Make use of the environment variable
6565 `menu', instead of using the global `current_menu'. Allocate
6566 memory for the sourcecode of this entry.
6567 (read_config_file): New argument `nested', changed all callers.
6568 Only in the case of a new context, initialize a new menu. Set the
6569 `menu' environment variable.
6570 (grub_normal_execute): Don't set and unset the environment
6571 variable `menu' here anymore. Only free the menu when leaving the
6574 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6577 2006-12-11 Marco Gerards <marco@gnu.org>
6579 * normal/menu_entry.c (run): Fix off by one bug so the last line
6580 is executed. Move the loader check to outside the loop.
6582 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
6584 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6586 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
6588 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6589 the number of sectors. Reported by Andrey Shuvikov
6590 <mr_hyro@yahoo.com>.
6592 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
6594 * kern/disk.c (grub_disk_read): When there is a read error, always
6595 try to read only the necessary data.
6597 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6599 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6601 [GRUB_UTIL] (grub_raid_fini): Likewise.
6602 [GRUB_UTIL] (grub_lvm_init): Likewise.
6603 [GRUB_UTIL] (grub_lvm_fini): Likewise.
6604 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6605 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6606 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
6607 and grub_raid_fini().
6609 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
6611 * include/grub/types.h (__unused): Rename to UNUSED.
6612 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
6613 (grub_elf64_size): Likewise.
6615 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6617 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
6618 grub_error_push and grub_error_pop in the error-handling path.
6619 (grub_elf32_load_segment): Only call grub_file_read with non-zero
6622 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6624 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
6625 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6626 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6627 (kernel_elf_SOURCES): Likewise.
6628 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
6629 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
6630 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6631 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6632 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
6633 (elf_mod_SOURCES): New variable.
6634 (elf_mod_CFLAGS): Likewise.
6635 (elf_mod_LDFLAGS): Likewise.
6636 * include/grub/types.h (__unused): New macro.
6637 * include/grub/elfload.h: New file.
6638 * kern/elf.c: Likewise.
6639 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
6640 (ELF32_LOADMASK): New macro.
6641 (ELF64_LOADMASK): Likewise.
6643 (grub_linux_load32): New function.
6644 (grub_linux_load64): Likewise.
6645 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
6646 Use grub_elf_t instead of grub_file_t.
6648 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
6650 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
6651 `catch_result' to struct set_color_args.
6653 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
6655 * normal/menu.c: Include grub/script.h.
6656 * normal/menu_entry.c: Likewise.
6657 * include/grub/normal.h: Do not include grub/script.h.
6659 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6661 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
6663 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6665 * kern/disk.c (grub_disk_open): Print debug messages when opening a
6667 (grub_disk_close): Print debug messages when closing a disk.
6668 (grub_disk_read): Print debug messages when disk read fails.
6669 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
6671 * kern/partition.c: Include misc.h.
6672 (grub_partition_iterate): Print debug messages when detecting
6675 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6677 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
6679 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
6681 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
6683 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6684 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
6686 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
6688 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
6689 instead of sizeof(lv). Patch by Michael Guntsche.
6691 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
6693 * disk/lvm.c: Rename VGS to VG_LIST.
6694 (grub_lvm_iterate): Change VGS->LV to VG-LV.
6695 (grub_lvm_open): Likewise.
6696 Thanks to Michael Guntsche for finding this bug.
6698 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6700 * configure.ac (AC_INIT): Bumped to 1.95.
6702 2006-10-14 Robert Millan <rmh@aybabtu.com>
6704 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
6705 with "/dev/.static/dev/md".
6707 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
6709 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
6710 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
6711 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
6712 DRIVE_NAME are always freed.
6714 * util/i386/pc/biosdisk.c (make_device_name): Add one into
6715 DOS_PART, as a DOS partition is counted from one instead of zero
6716 now. Reported by Robert Millan.
6718 2006-10-14 Robert Millan <rmh@aybabtu.com>
6720 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
6721 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
6722 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
6723 string returned by grub_guess_root_device.
6724 * util/i386/pc/grub-setup.c: Likewise.
6725 * util/i386/pc/grub-probefs.c: Likewise.
6727 * util/i386/pc/grub-probefs.c: Rename to ...
6728 * util/i386/pc/grub-probe.c: ... this.
6729 * DISTLIST: Remove grub-probefs, add grub-probe.
6730 * conf/i386-efi.rmk: Likewise.
6731 * conf/i386-pc.rmk: Likewise.
6732 * util/i386/pc/grub-install.in: Likewise.
6734 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
6735 choose which information we want to print.
6737 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
6739 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
6740 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
6741 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
6742 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
6743 video/readers/tga.c and video/i386/pc/vbeutil.c.
6745 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
6747 Added support for RAID and LVM.
6749 * disk/lvm.c: New file.
6750 * disk/raid.c: Likewise.
6751 * include/grub/lvm.h: Likewise.
6752 * include/grub/raid.h: Likewise.
6753 * include/grub/util/lvm.h: Likewise.
6754 * include/grub/util/raid.h: Likewise.
6755 * util/lvm.c: Likewise.
6756 * util/raid.c: Likewise.
6758 * include/grub/disk.h (grub_disk_dev_id): Add
6759 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
6760 (grub_disk_get_size): New prototype.
6761 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
6762 returns a partition.
6763 (grub_disk_get_size): New function.
6765 * kern/i386/pc/init.c (make_install_device): Copy the prefix
6766 verbatim if grub_install_dos_part is -2.
6768 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
6771 * util/i386/pc/grub-setup.c (setup): New argument
6772 MUST_EMBED. Force embedding of GRUB when the argument is
6773 true. Close FILE before returning.
6774 (main): Add support for RAID and LVM.
6776 * conf/common.rmk: Add RAID and LVM modules.
6777 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
6779 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
6781 * kern/misc.c (grub_strstr): New function.
6782 * include/grub/misc.h (grub_strstr): New prototype.
6784 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
6786 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
6788 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
6790 * kern/misc.c (grub_strtoull): Guess the base only if not
6793 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6795 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
6798 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6800 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
6802 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
6803 Remove `flags' argument. All callers changed.
6804 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
6805 (IEEE1275_IHANDLE_INVALID): New variable.
6806 (IEEE1275_CELL_INVALID): New variable.
6807 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
6808 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
6809 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
6810 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
6811 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
6812 codes from Open Firmware. All callers updated.
6813 (grub_ieee1275_next_property): Directly return Open Firmware return
6815 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6816 Standardize error checking from `grub_ieee1275_get_property'.
6817 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
6818 `devalias' to `aliases'. Correct comments. Consolidate error paths.
6820 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6822 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
6823 `instance_to_package_args' to `instance_to_path_args'.
6825 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
6826 `grub_ieee1275_chosen'.
6828 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
6829 `grub_ieee1275_interpret'.
6831 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6833 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
6835 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6837 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
6838 (__cmpdi): Likewise.
6840 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
6841 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
6844 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
6846 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
6847 to type `grub_ssize_t'.
6848 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
6850 2006-09-22 Marco Gerards <marco@gnu.org>
6852 * normal/script.c (grub_script_create_cmdmenu): Skip leading
6855 2006-09-22 Marco Gerards <marco@gnu.org>
6857 * commands/echo.c: New file.
6859 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
6861 * conf/common.rmk (echo_mod_SOURCES): New variable.
6862 (echo_mod_CFLAGS): Likewise.
6863 (echo_mod_LDFLAGS): Likewise.
6865 2006-09-22 Marco Gerards <marco@gnu.org>
6867 * normal/main.c (get_line): Malloc memory instead of using
6868 preallocated memory. Removed the arguments `cmdline' and
6869 `max_len'. Updated all callers.
6871 2006-09-22 Marco Gerards <marco@gnu.org>
6873 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
6874 (normal_mod_DEPENDENCIES): Likewise.
6876 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
6877 (normal_mod_DEPENDENCIES): Likewise.
6879 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
6881 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
6883 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
6885 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
6886 (normal_mod_DEPENDENCIES): Likewise.
6887 * conf/i386-pc.mk: Regenerate.
6888 * conf/i386-efi.mk: Likewise
6889 * conf/common.mk: Likewise.
6890 * conf/powerpc-ieee1275.mk: Likewise.
6891 * conf/sparc64-ieee1275.mk: Likewise.
6893 2006-09-22 Robert Millan <rmh@aybabtu.com>
6895 Sync with i386 version.
6896 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
6897 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
6899 2006-09-21 Robert Millan <rmh@aybabtu.com>
6901 Import from GRUB Legacy (lib/device.c):
6902 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
6903 (init_device_map) [__linux__]: Add support for I2O devices.
6905 2006-09-14 Marco Gerards <marco@gnu.org>
6907 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
6910 2006-09-14 Robert Millan <rmh@aybabtu.com>
6912 * util/i386/pc/grub-install.in: Skip menu.lst when removing
6915 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6917 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
6918 before adding it to device.map.
6920 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
6922 * genmk.rb: Let GCC generate dependencies the first time it
6923 compiles a file; using the -MD option.
6924 * conf/common.mk: Regenerate.
6925 * conf/i386-pc.mk: Likewise.
6926 * conf/i386-efi.mk: Likewise.
6927 * conf/powerpc-ieee1275.mk: Likewise.
6928 * conf/sparc64-ieee1275.mk: Likewise.
6930 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
6932 Move the prototypes of grub_setjmp and grub_longjmp to
6933 cpu/setjmp.h, so that each architecture may specify different
6936 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
6937 (grub_longjmp): Likewise.
6938 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
6939 (grub_longjmp): Likewise.
6940 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
6941 (grub_longjmp): Likewise.
6943 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
6944 [!GRUB_UTIL] (grub_longjmp): Removed.
6946 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
6948 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
6949 "color!" method does not return any value.
6951 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6953 * include/grub/bitmap.h: New file.
6955 * include/grub/i386/pc/vbeutil.h: Likewise.
6957 * video/bitmap.c: Likewise.
6959 * video/readers/tga.c: Likewise.
6961 * video/i386/pc/vbeutil.c: Likewise.
6963 * commands/videotest.c: Code cleanup and updated to reflect to new
6966 * term/gfxterm.c: Likewise.
6968 * video/video.c: Likewise.
6970 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
6971 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
6972 (bitmap_mod_SOURCES): New entry.
6973 (bitmap_mod_CFLAGS): Likewise.
6974 (bitmap_mod_LDFLAGS): Likewise.
6975 (tga_mod_SOURCES): Likewise.
6976 (tga_mod_CFLAGS): Likewise.
6977 (tga_mod_LDFLAGS): Likewise.
6979 * include/grub/video.h (grub_video_blit_operators): New enum type.
6980 (grub_video_render_target): Changed as forward declaration and moved
6981 actual definition to be video driver specific.
6982 (grub_video_adapter.blit_bitmap): Added blitting operator.
6983 (grub_video_adapter.blit_render_target): Likewise.
6984 (grub_video_blit_bitmap): Likewise.
6985 (grub_video_blit_render_target): Likewise.
6987 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
6988 driver specific render target definition.
6989 (grub_video_vbe_map_rgba): Added driver internal helper.
6990 (grub_video_vbe_unmap_color): Updated to use
6991 grub_video_i386_vbeblit_info.
6992 (grub_video_vbe_get_video_ptr): Likewise.
6994 * include/grub/i386/pc/vbeblit.h
6995 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
6996 grub_video_i386_vbeblit_info.
6997 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6998 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6999 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
7000 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
7001 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
7002 (grub_video_i386_vbeblit_index_index): Likewise.
7003 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
7004 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
7005 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
7006 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
7008 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
7011 * video/i386/pc/vbeblit.c: Updated to reflect changes on
7012 include/grub/i386/pc/vbeblit.h.
7014 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
7015 Updated to use grub_video_i386_vbeblit_info.
7016 (grub_video_i386_vbefill_R8G8B8): Likewise.
7017 (grub_video_i386_vbefill_index): Likewise.
7018 (grub_video_i386_vbefill): Added generic filler.
7020 * video/i386/pc/vbefill.c: Updated to reflect changes on
7021 include/grub/i386/pc/vbefill.h.
7023 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
7024 grub_video_i386_vbeblit_info.
7025 (grub_video_vbe_unmap_color): Likewise.
7026 (grub_video_vbe_blit_glyph): Likewise.
7027 (grub_video_vbe_scroll): Likewise.
7028 (grub_video_vbe_draw_pixel): Removed function.
7029 (grub_video_vbe_get_pixel): Likewise.
7030 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
7031 updated code to use it.
7032 (common_blitter): Added common blitter for render target and bitmap.
7033 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
7034 (grub_video_vbe_blit_render_target): Likewise.
7036 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
7038 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
7039 is in text mode if there is no console control protocol instance
7042 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7044 * include/grub/video.h: Code cleanup.
7046 * include/grub/i386/pc/vbe.h: Likewise.
7048 * video/i386/pc/vbe.c: Likewise.
7050 * video/i386/pc/vbeblit.c: Likewise.
7052 * video/i386/pc/vbefill.c: Likewise.
7054 * video/video.c: Likewise. Also added more comments.
7056 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7058 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7059 (struct grub_biosdisk_dap): Likewise.
7061 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
7062 linkage settings for all functions.
7064 2006-07-12 Marco Gerards <marco@gnu.org>
7066 * configure.ac (--enable-mm-debug): Fix typo.
7068 * genkernsyms.sh.in: Use proper quoting for `CC'.
7070 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
7072 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
7073 (normal_mod_ASFLAGS): Remove "-m32".
7075 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
7077 * util/misc.c: Include config.h.
7078 [!HAVE_MEMALIGN]: Do not include malloc.h.
7079 (grub_memalign): Use posix_memalign, if present. Then, use
7080 memalign, if present. Otherwise, emit an error.
7082 * util/grub-emu.c: Do not include malloc.h.
7084 * include/grub/util/misc.h: Include unistd.h. This is required for
7085 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
7086 D. Eades III <hde@foobar-qux.org>.
7088 * configure.ac (AC_GNU_SOURCE): Added.
7089 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
7092 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
7094 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
7095 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
7097 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
7099 * include/grub/types.h (grub_host_addr_t): Rename to
7101 (grub_host_off_t): Rename to grub_target_off_t.
7102 (grub_host_size_t): Rename to grub_target_size_t.
7103 (grub_host_ssize_t): Rename to grub_target_ssize_t.
7104 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7106 * include/grub/kernel.h (struct grub_module_header): Change type
7107 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7108 (grub_module_info): Likewise.
7110 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7112 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7113 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7114 Velazquez <jesus.velazquez@gmail.com>.
7116 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7118 Count partitions from 1 instead of 0 in the string representation
7119 of partitions. Still use 0-based internally.
7121 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7122 (sun_partition_map_iterate): Use grub_partition_t instead of
7123 struct grub_partition *. Cast DESC->START_CYLINDER to
7124 grub_uint64_t after converting the endian.
7125 (sun_partition_map_probe): Subtract 1 for PARTNUM.
7126 (sun_partition_map_get_name): Add 1 to P->INDEX.
7128 * partmap/pc.c (grub_partition_parse): Subtract 1 for
7130 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7132 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7133 zero instead of one.
7134 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7135 (gpt_partition_map_get_name): Add 1 into P->INDEX.
7137 * partmap/apple.c (apple_partition_map_iterate): Change the type
7139 (apple_partition_map_probe): Subtract 1 for PARTNUM.
7140 (apple_partition_map_get_name): Add 1 into P->INDEX.
7142 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7144 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7145 calculate the offset of a partition.
7146 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7147 (amiga_partition_map_get_name): Add 1 into P->INDEX.
7149 * partmap/acorn.c (acorn_partition_map_find): Change the type of
7150 SECTOR to grub_disk_addr_t.
7151 (acorn_partition_map_iterate): Likewise.
7152 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7153 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7155 (acorn_partition_map_get_name): Add 1 into P->INDEX.
7157 * kern/i386/pc/init.c (make_install_device): Add 1 into
7158 GRUB_INSTALL_DOS_PART.
7160 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7163 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7165 Clean up the code to support 64-bit addressing in disks and
7166 files. This change is not enough for filesystems yet.
7168 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7169 type of "start" to grub_uint64_t.
7170 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7171 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7172 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7175 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7176 to grub_disk_addr_t.
7178 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7181 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7183 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7186 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7188 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7190 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7192 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7193 to grub_off_t, to detect an error from grub_file_seek.
7194 (grub_multiboot_load_elf32): Likewise.
7196 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7197 maximum unsigned long value when an overflow is detected.
7198 (grub_strtoull): New function.
7199 (grub_divmod64): Likewise.
7200 (grub_lltoa): use grub_divmod64.
7202 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7204 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7205 the pointer to next character. Use grub_strtoull instead of
7207 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7208 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7211 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
7212 return value is signed.
7213 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7214 test if OFFSET is less than zero, as OFFSET is unsigned now.
7216 * kern/disk.c (struct grub_disk_cache): Change the type of
7217 "sector" to grub_disk_addr_t.
7218 (grub_disk_cache_get_index): Change the type of SECTOR to
7219 grub_disk_addr_t. Calculate the hash with SECTOR casted to
7220 unsigned after shifting.
7221 (grub_disk_cache_invalidate): Change the type of SECTOR to
7223 (grub_disk_cache_unlock): Likewise.
7224 (grub_disk_cache_store): Likewise.
7225 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7226 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7227 grub_disk_addr_t and grub_uint64_t, respectively.
7228 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
7229 body, as the value of OFFSET is tweaked by
7230 grub_disk_check_range. Change the types of START_SECTOR, LEN and
7231 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7233 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7234 body, as the value of OFFSET is tweaked by
7235 grub_disk_check_range. Change the types of LEN and N to
7238 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7239 and "saved_offset" to grub_off_t.
7240 (test_header): Cast BUF to char *.
7241 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7243 (grub_gzio_read): Change the types of OFFSET and SIZE to
7244 grub_off_t and grub_size_t, respectively.
7246 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7248 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7249 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7250 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7251 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7252 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7254 * include/grub/types.h (grub_off_t): Unconditionally set to
7256 (grub_disk_addr_t): Changed to grub_uint64_t.
7258 * include/grub/partition.h (struct grub_partition): Change the
7259 types of "start", "len" and "offset" to grub_disk_addr_t,
7260 grub_uint64_t and grub_disk_addr_t, respectively.
7261 (grub_partition_get_start): Return grub_disk_addr_t.
7262 (grub_partition_get_len): Return grub_uint64_t.
7264 * include/grub/misc.h (grub_strtoull): New prototype.
7265 (grub_divmod64): Likewise.
7267 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7268 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7269 grub_off_t, respectively.
7270 All callers and references changed.
7272 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7273 grub_size_t in "read".
7274 All callers and references changed.
7276 * include/grub/file.h (struct grub_file): Change the types of
7277 "offset" and "size" to grub_off_t and grub_off_t,
7278 respectively. Change the type of SECTOR to grub_disk_addr_t in
7280 (grub_file_read): Change the type of LEN to grub_size_t.
7281 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7283 (grub_file_size): Return grub_off_t.
7284 (grub_file_tell): Likewise.
7285 All callers and references changed.
7287 * include/grub/disk.h (struct grub_disk_dev): Change the types of
7288 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
7290 (struct grub_disk): Change the type of "total_sectors" to
7291 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
7293 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
7294 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
7295 (grub_disk_write): Likewise.
7296 All callers and references changed.
7298 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
7299 char * for grub_strncmp to silence gcc.
7300 (grub_iso9660_mount): Likewise.
7301 (grub_iso9660_mount): Likewise.
7302 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
7304 (grub_iso9660_iterate_dir): Likewise.
7305 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
7307 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
7308 LEN to grub_disk_addr_t and grub_size_t, respectively.
7310 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7312 * fs/jfs.c (grub_jfs_read_file): Likewise.
7314 * fs/minix.c (grub_jfs_read_file): Likewise.
7316 * fs/sfs.c (grub_jfs_read_file): Likewise.
7318 * fs/ufs.c (grub_jfs_read_file): Likewise.
7320 * fs/xfs.c (grub_jfs_read_file): Likewise.
7322 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
7323 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
7326 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
7327 BLKNR to -1 instead of returning GRUB_ERRNO.
7328 (grub_ext2_read_file): Change the types of SECTOR and
7329 LEN to grub_disk_addr_t and grub_size_t, respectively.
7331 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
7332 LEN to grub_disk_addr_t and grub_size_t, respectively.
7334 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
7337 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
7338 string. Do not cast SECTOR explicitly.
7340 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
7341 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
7342 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
7343 grub_disk_addr_t and grub_size_t, respectively. If the sector is
7344 over 2TB and LBA mode is not supported, raise an error.
7345 (get_safe_sectors): New function.
7346 (grub_biosdisk_read): Use get_safe_sectors.
7347 (grub_biosdisk_write): Likewise.
7349 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
7350 (grub_efidisk_write): Likewise.
7352 * disk/loopback.c (delete_loopback): Cosmetic changes.
7353 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
7355 (grub_loopback_open): Likewise.
7356 (grub_loopback_read): Likewise. Also, change the type of POS to
7357 grub_off_t, and fix the usage of grub_memset.
7359 * commands/i386/pc/play.c: Include grub/machine/time.h.
7361 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
7364 * commands/configfile.c: Include grub/env.h.
7366 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
7367 GRUB_ERRNO directly instead. Change the type of POS to
7368 grub_off_t. Follow the coding standard.
7370 * commands/blocklist.c: Include grub/partition.h.
7371 (grub_cmd_blocklist): Return an error if the underlying device is
7372 not a disk. Take the starting sector of a partition into account,
7373 if a partition is used.
7375 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
7377 (lba_mode): Support 64-bit addresses.
7378 (chs_mode): Likewise.
7379 (copy_buffer): Adapted to the new offsets of a length field and a
7381 (blocklist_default_start): Allocate 64-bit space.
7383 * boot/i386/pc/boot.S (force_lba): Removed.
7384 (boot_drive): Moved to under KERNEL_SECTOR.
7385 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
7387 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
7389 (lba_mode): Refactored to support a 64-bit address. More size
7391 (setup_sectors): Likewise.
7393 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7395 * DISTLIST: Added include/grub/i386/linux.h. Removed
7396 include/grub/i386/pc/linux.h
7398 * configure.ac (AC_INIT): Bumped to 1.94.
7400 * config.guess: Updated from gnulib.
7401 * config.sub: Likewise.
7402 * install-sh: Likewise.
7403 * mkinstalldirs: Likewise.
7405 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7407 * conf/common.rmk (grub_modules_init.lst): Depended on
7408 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7411 * genmk.rb (PModule::rule): Reverted the previous change.
7413 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7415 * conf/common.rmk (grub_modules_init.lst): Depends on
7416 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7417 that the target does not exist before producing.
7418 (grub_modules_init.h): Remove the target before generating.
7419 (grub_emu_init.c): Likewise.
7421 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7423 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
7425 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7426 for the target-specific tests. Make sure that we also have the
7427 up-to-date target variables for those tests.
7429 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7431 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7432 (PModule::rule): Likewise.
7434 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7436 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7437 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7438 target-specific flags should be prefixed.
7439 (PModule::rule): Likewise.
7441 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
7443 * configure.ac (CMP): Check if cmp is available explicitly.
7445 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
7447 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7448 (target_cpu): New variable.
7449 (pkglibdir): Use target_cpu instead of host_cpu.
7451 * util/i386/pc/grub-install.in (host_cpu): Removed.
7452 (target_cpu): New variable.
7453 (pkglibdir): Use target_cpu instead of host_cpu.
7455 * util/genmoddep.c: Removed.
7457 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7458 instead of GRUB_HOST_SIZEOF_VOID_P.
7459 * kern/dl.c: Likewise.
7461 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7463 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7464 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7465 (GRUB_TARGET_SIZEOF_LONG): ... this.
7466 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7467 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7468 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7470 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7471 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7472 (GRUB_TARGET_SIZEOF_LONG): ... this.
7473 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7474 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7475 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7477 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7478 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7479 (GRUB_TARGET_SIZEOF_LONG): ... this.
7480 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7481 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7483 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7484 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7485 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7486 instead of GRUB_HOST_SIZEOF_LONG.
7487 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7488 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7489 GRUB_CPU_WORDS_BIGENDIAN.
7490 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7491 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7494 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7495 (genmoddep_SOURCES): Likewise.
7496 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7497 (genmoddep_SOURCES): Likewise.
7498 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7499 (genmoddep_SOURCES): Likewise.
7500 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7502 (genmoddep_SOURCES): Likewise.
7504 * genmoddep.awk: New file.
7506 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7507 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7508 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7509 (PModule::rule): Likewise.
7510 (Program::rule): Likewise.
7511 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7512 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7515 * configure.ac: Rewritten intensively to use host and target
7516 instead of build and host, respectively.
7518 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7519 (host_cpu): Removed.
7520 (target_cpu): New variable.
7521 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7522 (BUILD_CC): Removed.
7523 (BUILD_CFLAGS): Likewise.
7524 (BUILD_CPPFLAGS): Likewise.
7525 (TARGET_CC): New variable.
7526 (TARGET_CFLAGS): Likewise.
7527 (TARGET_CPPFLAGS): Likewise.
7528 (TARGET_LDFLAGS): Likewise.
7530 (include): Use target_cpu instead of host_cpu.
7531 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7533 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7535 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
7537 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7538 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
7539 field 'false' to 'exec_on_false'.
7540 (grub_script_create_cmdif): Renamed argument names to reflect above
7543 * normal/execute.c (grub_script_execute_cmdif): Likewise.
7545 * normal/script.c (grub_script_create_cmdif): Likewise.
7547 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
7549 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7551 (grub_hfsplus_btree_recptr): Likewise.
7552 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7553 FILEBLOCK both to pass a block number and store next block
7555 (grub_hfsplus_read_block): Rewritten heavily to support an extent
7556 overflow file correctly. Specify errors appropriately, because
7557 fshelp expects that GRUB_ERRNO is set when fails. Reuse
7558 grub_hfsplus_btree_recptr to get the pointer to a found key.
7559 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7562 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7564 (_linux_mod_SOURCES): New variable.
7565 (_linux_mod_CFLAGS): Likewise.
7566 (_linux_mod_LDFLAGS): Likewise.
7567 (linux_mod_SOURCES): Likewise.
7568 (linux_mod_CFLAGS): Likewise.
7569 (linux_mod_LDFLAGS): Likewise.
7571 * DISTLIST: Added loader/i386/efi/linux.c,
7572 loader/i386/efi/linux_normal.c and
7573 include/grub/i386/efi/loader.h.
7575 * loader/i386/efi/linux.c: New file.
7576 * loader/i386/efi/linux_normal.c: Likewise.
7577 * include/grub/i386/efi/loader.h: Likewise.
7579 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
7581 * commands/blocklist.c: New file.
7583 * DISTLIST: Added commands/blocklist.c.
7585 * term/efi/console.c (grub_console_highlight_color): Use a lighter
7586 color for the background, and a darker color for the foreground.
7587 (grub_console_checkkey): Return READ_KEY.
7588 (grub_console_cls): Set the background to
7589 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7591 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7593 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7594 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7596 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7599 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7600 BG. The spec is wrong again.
7602 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7604 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7606 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7607 commands/blocklist.c.
7608 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7610 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
7611 (blocklist_mod_SOURCES): New variable.
7612 (blocklist_mod_CFLAGS): Likewise.
7613 (blocklist_mod_LDFLAGS): Likewise.
7615 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
7617 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
7619 (lba_mode): Use %eax more intensively to reduce the code size.
7621 2006-05-20 Marco Gerards <marco@gnu.org>
7623 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
7625 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
7627 (script): Accept leading newlines.
7628 (newlines): New rule to describe 0 or more newlines.
7629 (commands): Accept `command' with trailing newline. Fixed the
7630 order in which arguments were passed to `grub_script_add_cmd'.
7631 Accept commands separated by newlines.
7632 (function): Changed to accept newlines.
7633 (menuentry) Rewritten.
7635 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
7636 front of the list, instead of to the end.
7638 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
7640 * util/i386/pc/grub-install.in (bindir): New variable.
7641 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
7642 Shaver <lbgwjl@gmail.com>.
7644 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
7646 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
7647 grub/machine/linux.h
7648 * loader/i386/pc/linux.c: Likewise.
7650 * include/grub/i386/pc/linux.h: Moved to ...
7651 * include/grub/i386/linux.h: ... here.
7653 * include/grub/i386/linux.h (struct linux_kernel_params): New
7656 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
7658 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
7660 (grub_video_vbe_blit_glyph): Likewise.
7661 (grub_video_vbe_blit_bitmap): Likewise.
7662 (grub_video_vbe_blit_render_target): Likewise.
7664 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
7666 * configure.ac (--with-platform): Properly quote the square
7669 2006-05-08 Marco Gerards <marco@gnu.org>
7671 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
7673 (kernel_elf_HEADERS): ...to this. Updated all users.
7674 (grubof_symlist.c): Renamed from this...
7675 (kernel_elf_symlist.c): ...to this. Updated all users.
7676 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7677 (grubof_SOURCES): Renamed from this...
7678 (kernel_elf_SOURCES): ...to this.
7679 (grubof_HEADERS): Renamed from this...
7680 (kernel_elf_HEADERS): ...to this.
7681 (grubof_CFLAGS): Renamed from this...
7682 (kernel_elf_CFLAGS): ...to this.
7683 (grubof_ASFLAGS): Renamed from this...
7684 (kernel_elf_ASFLAGS): ...to this.
7685 (grubof_LDFLAGS): Renamed from this...
7686 (kernel_elf_LDFLAGS): ...to this.
7688 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
7690 (kernel_elf_HEADERS): ...to this. Updated all users.
7691 (grubof_symlist.c): Renamed from this...
7692 (kernel_elf_symlist.c): ...to this. Updated all users.
7693 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7694 (grubof_SOURCES): Renamed from this...
7695 (kernel_elf_SOURCES): ...to this.
7696 (grubof_HEADERS): Renamed from this...
7697 (kernel_elf_HEADERS): ...to this.
7698 (grubof_CFLAGS): Renamed from this...
7699 (kernel_elf_CFLAGS): ...to this.
7700 (grubof_ASFLAGS): Renamed from this...
7701 (kernel_elf_ASFLAGS): ...to this.
7702 (grubof_LDFLAGS): Renamed from this...
7703 (kernel_elf_LDFLAGS): ...to this.
7705 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
7706 `kernel.elf' instead of `grubof'.
7708 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
7710 Add --with-platform to configure. Use pkglibdir instead of
7711 pkgdatadir. This is reported by Roger Leigh.
7713 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
7714 (host_vendor): Likewise.
7715 (host_os): Likewise.
7716 (pkgdatadir): Likewise.
7717 (platform): New variable.
7718 (pkglibdir): Likewise.
7719 Use PKGLIBDIR instead of PKGDATADIR.
7721 * util/i386/pc/grub-install.in (datadir): Removed.
7722 (host_vendor): Likewise.
7723 (host_os): Likewise.
7724 (pkgdatadir): Likewise.
7725 (platform): New variable.
7726 (pkglibdir): Likewise.
7727 Use PKGLIBDIR instead of PKGDATADIR.
7729 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
7730 instead of GRUB_DATADIR.
7732 * util/i386/pc/grub-mkimage.c (usage): Likewise.
7734 * util/i386/efi/grub-mkimage.c (usage): Likewise.
7737 * configure.ac (--with-platform): New option.
7738 Use PLATFORM instead of HOST_VENDOR to specify a platform.
7740 * Makefile.in: Include a makefile based on PLATFORM instead of
7742 (pkgdatadir): Not appended by the machine type.
7743 (pkglibdir): Appended by the machine type.
7744 (host_vendor): Removed.
7745 (platform): New variable.
7746 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
7747 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
7748 (uninstall): Likewise.
7750 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
7752 Use the environment context in the menu. Remove the commands
7753 "default" and "timeout", and use variables instead.
7755 * normal/menu.c: Include grub/env.h.
7756 (print_entry): Cast TITLE to silence gcc.
7757 (get_timeout): New function.
7758 (set_timeout): Likewise.
7759 (get_entry_number): Likewise.
7760 (run_menu): Use a default entry, a fallback entry and a timeout
7761 in the environment variables "default", "fallback" and
7762 "timeout". Also, tweak the default entry if it is not within the
7763 current menu entries.
7764 (grub_menu_run): Use a fallback entry in the environment variable
7767 * normal/main.c (read_config_file): Do not initialize
7768 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
7770 (grub_normal_execute): Use a data slot to store the menu.
7772 * include/grub/normal.h (struct grub_menu): Removed default_entry,
7773 fallback_entry and timeout.
7774 (struct grub_menu_list): Removed.
7775 (grub_menu_list_t): Likewise.
7776 (struct grub_context): Likewise.
7777 (grub_context_t): Likewise.
7778 (grub_context_get): Likewise.
7779 (grub_context_get_current_menu): Likewise.
7780 (grub_context_push_menu): Likewise.
7781 (grub_context_pop_menu): Likewise.
7782 (grub_default_init): Likewise.
7783 (grub_default_fini): Likewise.
7784 (grub_timeout_init): Likewise.
7785 (grub_timeout_fini): Likewise.
7787 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
7789 (normal_mod_SOURCES): Removed normal/context.c.
7791 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
7792 commands/default.c, commands/timeout.c and normal/context.c.
7793 (normal_mod_SOURCES): Removed normal/context.c.
7795 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
7796 commands/timeout.c and normal/context.c.
7797 (normal_mod_SOURCES): Removed normal/context.c.
7799 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
7800 commands/default.c, commands/timeout.c and normal/context.c.
7801 (normal_mod_SOURCES): Removed normal/context.c.
7803 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
7805 (default_mod_SOURCES): Removed.
7806 (default_mod_CFLAGS): Likewise.
7807 (default_mod_LDFLAGS): Likewise.
7808 (timeout_mod_SOURCES): Removed.
7809 (timeout_mod_CFLAGS): Likewise.
7810 (timeout_mod_LDFLAGS): Likewise.
7812 * DISTLIST: Removed commands/default.c, commands/timeout.c and
7815 * commands/default.c: Removed.
7816 * commands/timeout.c: Likewise.
7817 * normal/context.c: Likewise.
7819 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
7821 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
7823 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
7825 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
7826 "next" to "prev" for readability.
7827 (struct grub_env_sorted_var): New struct.
7828 (grub_env_context): Renamed to ...
7829 (initial_context): ... this.
7830 (grub_env_var_context): Renamed to ...
7831 (current_context): ... this.
7832 (grub_env_find): Look only at CURRENT_CONTEXT.
7833 (grub_env_context_open): Rewritten to copy exported variables from
7835 (grub_env_context_close): Rewritten according to the new
7836 scheme. Also, add an assertion to prevent the initial context from
7838 (grub_env_insert): Removed the code for the sorted list.
7839 (grub_env_remove): Likewise.
7840 (grub_env_export): Simply mark the variable with
7841 GRUB_ENV_VAR_GLOBAL.
7842 (grub_env_set): A cosmetic change for naming consistency.
7843 (grub_env_get): Likewise.
7844 (grub_env_unset): Likewise.
7845 (grub_env_iterate): Rewritten to sort variables within this
7847 (grub_register_variable_hook): Fixed for naming consistency. Call
7848 grub_env_find again, only if NAME is not found at the first time.
7849 (mangle_data_slot_name): New function.
7850 (grub_env_set_data_slot): Likewise.
7851 (grub_env_get_data_slot): Likewise.
7852 (grub_env_unset_data_slot): Likewise.
7854 * include/grub/env.h (grub_env_var_type): New enum.
7855 (GRUB_ENV_VAR_LOCAL): New constant.
7856 (GRUB_ENV_VAR_GLOBAL): Likewise.
7857 (GRUB_ENV_VAR_DATA): Likewise.
7858 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
7860 (grub_env_set): Replace VAR with NAME for consistency.
7861 (grub_register_variable_hook): Likewise.
7862 (grub_env_export): Specify the name of the argument.
7863 (grub_env_set_data_slot): New prototype.
7864 (grub_env_get_data_slot): Likewise.
7865 (grub_env_unset_data_slot): Likewise.
7867 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7869 Extend the loader so that GRUB can accept a loader which comes
7870 back to GRUB when a loaded image exits. Also, this change adds
7871 support for a chainloader on EFI.
7873 * term/efi/console.c: Include grub/misc.h.
7874 (grub_console_checkkey): Display a scan code on the top for
7875 debugging. This will be removed once the EFI port gets stable.
7876 Correct the scan code mapping.
7878 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
7879 allocate memory from larger regions, in order to reduce the number
7880 of allocated regions. Otherwise, the MacOSX loader panics.
7881 (filter_memory_map): Avoid less than 1MB for compatibility with
7883 (add_memory_regions): Allocate from the tail of a region, if
7884 possible, to avoid allocating a region near to 1MB, for the MacOSX
7887 * kern/efi/init.c (grub_efi_set_prefix): Specify
7888 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
7890 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
7891 argument IMAGE_HANDLE and specify it to get a loaded image.
7892 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
7893 grub_efi_get_loaded_image.
7894 (grub_efi_get_filename): Divide the length by the size of
7896 (grub_efi_get_device_path): New function.
7897 (grub_efi_print_device_path): Print End Device Path nodes. Divide
7898 the length by the size of grub_efi_char16_t for a file path device
7901 * kern/loader.c (grub_loader_noreturn): New variable.
7902 (grub_loader_set): Accept a new argument NORETURN. Set
7903 GRUB_LOADER_NORETURN to NORETURN.
7904 All callers changed.
7905 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
7908 * include/grub/efi/efi.h (grub_efi_get_device_path): New
7910 (grub_efi_get_loaded_image): Take an argument to specify an image
7913 * include/grub/loader.h (grub_loader_set): Added one more argument
7916 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
7917 instead of grub_efi_open_protocol.
7918 (grub_efidisk_get_device_name): Likewise.
7919 (grub_efidisk_close): Print a newline.
7920 (grub_efidisk_get_device_handle): Fixed to use
7921 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
7922 GRUB_EFI_DEVICE_PATH_TYPE.
7924 * disk/efi/efidisk.c (device_path_guid): Moved to ...
7925 * kern/efi/efi.c (device_path_guid): ... here.
7927 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
7929 (kernel_mod_HEADERS): Added efi/disk.h.
7930 (_chain_mod_SOURCES): New variable.
7931 (_chain_mod_CFLAGS): Likewise.
7932 (_chain_mod_LDFLAGS): Likewise.
7933 (chain_mod_SOURCES): Likewise.
7934 (chain_mod_CFLAGS): Likewise.
7935 (chain_mod_LDFLAGS): Likewise.
7937 * DISTLIST: Added include/grub/efi/chainloader.h,
7938 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
7940 * include/grub/efi/chainloader.h: New file.
7941 * loader/efi/chainloader.c: Likewise.
7942 * loader/efi/chainloader_normal.c: Likewise.
7944 2006-04-30 Marco Gerards <marco@gnu.org>
7946 * commands/configfile.c (grub_cmd_source): New function.
7947 (GRUB_MOD_INIT): Register the commands `source' and `.'.
7948 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
7950 2006-04-30 Marco Gerards <marco@gnu.org>
7952 * normal/execute.c (grub_script_execute_cmd): Change the return
7953 type to `grub_err_t'. Correctly return the error.
7954 (grub_script_execute_cmdline): In case a command line is not a
7955 command or a function, try to interpret it as an assignment.
7957 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7959 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
7960 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
7961 skip a node whose name is obviously invalid as UTF-16,
7962 i.e. contains a NUL character. Stop the iteration when the last
7963 directory entry is found. Instead of using the return value of
7964 grub_hfsplus_btree_iterate_node, store the value in RET and use
7965 it, because the iterator can be stopped by the last directory
7968 2006-04-30 Marco Gerards <marco@gnu.org>
7970 * include/grub/env.h (grub_env_export): New prototype. Reported
7971 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
7973 2006-04-30 Marco Gerards <marco@gnu.org>
7975 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
7976 size of the extents in a catalog file record.
7978 2006-04-29 Marco Gerards <marco@gnu.org>
7980 * commands/configfile.c (grub_cmd_configfile): Execute the
7981 configfile within its own context.
7983 * include/grub/env.h (grub_env_context_open): New prototype.
7984 (grub_env_context_close): Likewise.
7986 * kern/env.c (grub_env): Removed.
7987 (grub_env_sorted): Likewise.
7988 (grub_env_context): New variable.
7989 (grub_env_var_context): Likewise.
7990 (grub_env_find): Search both the active context and the global
7992 (grub_env_context_open): New function.
7993 (grub_env_context_close): Likewise.
7994 (grub_env_insert): Likewise.
7995 (grub_env_remove): Likewise.
7996 (grub_env_export): Likewise.
7997 (grub_env_set): Changed to use helper functions to avoid code
7999 (grub_env_iterate): Rewritten so both the current context and the
8000 global context are being used.
8002 * normal/command.c (export_command): New function.
8003 (grub_command_init): Register the `export' function.
8005 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
8007 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
8008 explicitly to suppress gcc's warnings.
8009 * fs/fat.c (grub_fat_find_dir): Likewise.
8010 (grub_fat_label): Likewise.
8011 * fs/xfs.c (grub_xfs_read_inode): Likewise.
8012 (grub_xfs_mount): Likewise.
8013 (grub_xfs_label): Likewise.
8014 * fs/affs.c (grub_affs_mount): Likewise.
8015 (grub_affs_label): Likewise.
8016 (grub_affs_iterate_dir): Likewise.
8017 * fs/sfs.c (grub_sfs_mount): Likewise.
8018 (grub_sfs_iterate_dir): Likewise.
8019 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
8020 * fs/hfs.c (grub_hfs_mount): Likewise.
8021 (grub_hfs_cmp_catkeys): Likewise.
8022 (grub_hfs_find_dir): Likewise.
8023 (grub_hfs_dir): Likewise.
8024 (grub_hfs_label): Likewise.
8025 * fs/jfs.c (grub_jfs_mount): Likewise.
8026 (grub_jfs_opendir): Likewise.
8027 (grub_jfs_getent): Likewise.
8028 (grub_jfs_lookup_symlink): Likewise.
8029 (grub_jfs_label): Likewise.
8030 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
8031 (grub_hfsplus_iterate_dir): Likewise.
8032 (grub_hfsplus_btree_iterate_node): Made static.
8034 * util/grub-emu.c (prefix): New variable.
8035 (grub_machine_set_prefix): New function.
8036 (main): Do not set the environment variable "prefix" here. Only
8037 set PREFIX, which is used later by grub_machine_set_prefix.
8039 * include/grub/video.h: Do not include grub/symbol.h.
8040 (grub_video_register): Not exported. This symbol is not defined in
8042 (grub_video_unregister): Likewise.
8043 (grub_video_iterate): Likewise.
8044 (grub_video_setup): Likewise.
8045 (grub_video_restore): Likewise.
8046 (grub_video_get_info): Likewise.
8047 (grub_video_get_blit_format): Likewise.
8048 (grub_video_set_palette): Likewise.
8049 (grub_video_get_palette): Likewise.
8050 (grub_video_set_viewport): Likewise.
8051 (grub_video_get_viewport): Likewise.
8052 (grub_video_map_color): Likewise.
8053 (grub_video_map_rgb): Likewise.
8054 (grub_video_map_rgba): Likewise.
8055 (grub_video_fill_rect): Likewise.
8056 (grub_video_blit_glyph): Likewise.
8057 (grub_video_blit_bitmap): Likewise.
8058 (grub_video_blit_render_target): Likewise.
8059 (grub_video_scroll): Likewise.
8060 (grub_video_swap_buffers): Likewise.
8061 (grub_video_create_render_target): Likewise.
8062 (grub_video_delete_render_target): Likewise.
8063 (grub_video_set_active_render_target): Likewise.
8065 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
8067 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
8069 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
8070 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8071 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8072 instead of $(srcdir)/genkernsyms.sh.
8074 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
8075 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8076 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8077 instead of $(srcdir)/genkernsyms.sh.
8079 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
8080 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8081 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8082 instead of $(srcdir)/genkernsyms.sh.
8084 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
8085 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8086 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8087 instead of $(srcdir)/genkernsyms.sh.
8089 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
8092 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
8094 (gensymlist.sh): New target.
8095 (genkernsyms.sh): Likewise.
8097 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
8098 genkernsyms.sh.in and gensymlist.sh.in.
8100 * genkernsyms.sh: Removed.
8101 * gensymlist.sh: Likewise.
8103 * genkernsyms.sh.in: New file.
8104 * gensymlist.sh.in: Likewise.
8106 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8108 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8109 clobber "prefix", since we may have already set it manually.
8111 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8113 * kern/misc.c (abort): New alias for grub_abort.
8115 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
8117 A new machine-specific function "grub_machine_set_prefix" is
8118 defined. This is called after loading modules, so that a prefix
8119 initialization can use modules. Also, this change adds an
8120 intensive debugging feature for the memory manager via the
8121 configure option "--enable-mm-debug".
8123 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8126 * kern/sparc64/ieee1275/init.c (abort): Removed.
8127 (grub_stop): Likewise.
8128 (grub_exit): New function.
8129 (grub_set_prefix): Renamed to ...
8130 (grub_machine_set_prefix): ... this.
8131 (grub_machine_init): Do not call grub_set_prefix.
8133 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8134 (grub_machine_set_prefix): ... this.
8135 (grub_machine_init): Do not call grub_set_prefix.
8137 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8138 (grub_machine_init): Do not set the prefix here.
8140 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8142 * kern/efi/init.c: Include grub/mm.h.
8143 (grub_efi_set_prefix): New function.
8145 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8146 (grub_efi_get_filename): New function.
8147 (grub_print_device_path): Renamed to ...
8148 (grub_efi_print_device_path): ... this.
8150 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8151 [MM_DEBUG] (grub_realloc): Likewise.
8152 [MM_DEBUG] (grub_free): Likewise.
8153 [MM_DEBUG] (grub_memalign): Likewise.
8154 [MM_DEBUG] (grub_mm_debug): New variable.
8155 [MM_DEBUG] (grub_debug_malloc): New function.
8156 [MM_DEBUG] (grub_debug_free): New function.
8157 [MM_DEBUG] (grub_debug_realloc): New function.
8158 [MM_DEBUG] (grub_debug_memalign): New function.
8160 * kern/misc.c (grub_abort): Print a newline to distinguish
8163 * kern/main.c (grub_main): Call grub_machine_set_prefix and
8164 grub_set_root_dev after loading modules. This is necessary when
8165 setting a prefix depends on modules.
8167 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8168 (grub_efi_print_device_path): ... this.
8169 (grub_efi_get_filename): New prototype.
8170 (grub_efi_set_prefix): Likewise.
8172 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8174 (grub_efidisk_get_device_handle): New prototype.
8175 (grub_efidisk_get_device_name): Likewise.
8177 * include/grub/mm.h: Include config.h.
8178 (MM_DEBUG): Removed.
8179 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8180 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8181 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8182 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8183 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8184 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8185 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8186 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8187 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8189 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8191 * disk/efi/efidisk.c: Include grub/partition.h.
8192 (iterate_child_devices): New function.
8193 (add_device): First, compare only last device path nodes, so that
8194 devices are sorted by the types.
8195 (grub_efidisk_get_device_handle): New function.
8196 (grub_efidisk_get_device_name): Likewise.
8198 * configure.ac (--enable-mm-debug): New option to enable the
8199 memory manager debugging feature. This makes the binary much
8200 bigger, so is disabled by default.
8202 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
8204 Use grub_abort instead of grub_stop, and grub_exit must be
8205 define in each architecture now. Also, this change adds support
8208 * util/i386/pc/grub-probefs.c: Include grub/term.h.
8209 (grub_getkey): New function.
8210 (grub_term_get_current): Likewise.
8212 * util/i386/pc/grub-setup.c: Include grub/term.h.
8213 (grub_getkey): New function.
8214 (grub_term_get_current): Likewise.
8216 * util/misc.c (grub_stop): Renamed to ...
8217 (grub_exit): ... this.
8219 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8220 (grub_exit): ... this.
8221 (grub_machine_init): Use grub_abort instead of abort.
8222 (grub_stop): Removed.
8224 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8227 * kern/i386/pc/startup.S (grub_exit): New function.
8228 (cold_reboot): New label.
8230 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8231 (grub_efi_init): Call grub_efidisk_init.
8232 (grub_efi_fini): Call grub_efidisk_fini.
8234 * kern/efi/efi.c: Include grub/mm.h.
8235 (grub_efi_console_control_guid): Renamed to ...
8236 (console_control_guid): ... this.
8237 (grub_efi_loaded_image_guid): Renamed to ...
8238 (loaded_image_guid): ... this.
8239 (grub_efi_locate_handle): New function.
8240 (grub_efi_open_protocol): Likewise.
8241 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8242 GRUB_EFI_CONSOLE_CONTROL_GUID.
8243 (grub_efi_exit): Removed.
8244 (grub_stop): Likewise.
8245 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8246 (grub_exit): New function.
8247 (grub_print_device_path): Likewise.
8249 * kern/rescue.c (grub_rescue_cmd_exit): New function.
8250 (grub_enter_rescue_mode): Register "exit".
8252 * kern/misc.c (grub_real_dprintf): A cosmetic change.
8253 (grub_abort): New function.
8255 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8257 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8259 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8261 * include/grub/efi/efi.h (grub_efi_exit): Removed.
8262 (grub_print_device_path): New prototype.
8263 (grub_efi_locate_handle): Likewise.
8264 (grub_efi_open_protocol): Likewise.
8266 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8267 * disk/efi/efidisk.c: Likewise.
8269 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8271 * include/grub/efi/console_control.h
8272 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8274 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8275 last 8 bytes as an array.
8276 (GRUB_EFI_DISK_IO_GUID): New macro.
8277 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8278 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8279 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8281 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8282 (struct grub_efi_device_path): Rename the member "sub_type" to
8284 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
8285 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
8286 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
8287 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
8288 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
8289 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
8290 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
8291 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
8292 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
8293 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
8294 (struct grub_efi_pci_device_path): New structure.
8295 (grub_efi_pci_device_path_t): New type.
8296 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
8297 (struct grub_efi_pccard_device_path): New structure.
8298 (grub_efi_pccard_device_path_t): New type.
8299 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
8300 (struct grub_efi_memory_mapped_device_path): New structure.
8301 (grub_efi_memory_mapped_device_path_t): New type.
8302 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
8303 (struct grub_efi_vendor_device_path): New structure.
8304 (grub_efi_vendor_device_path_t): New type.
8305 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
8306 (struct grub_efi_controller_device_path): New structure.
8307 (grub_efi_controller_device_path_t): New type.
8308 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
8309 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
8310 (struct grub_efi_acpi_device_path): New structure.
8311 (grub_efi_acpi_device_path_t): New type.
8312 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
8313 (struct grub_efi_expanded_acpi_device_path): New structure.
8314 (grub_efi_expanded_acpi_device_path_t): New type.
8315 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
8316 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
8317 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
8318 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
8319 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
8320 (struct grub_efi_atapi_device_path): New structure.
8321 (grub_efi_atapi_device_path_t): New type.
8322 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
8323 (struct grub_efi_fibre_channel_device_path): New structure.
8324 (grub_efi_fibre_channel_device_path_t): New type.
8325 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
8326 (struct grub_efi_1394_device_path): New structure.
8327 (grub_efi_1394_device_path_t): New type.
8328 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
8329 (struct grub_efi_usb_device_path): New structure.
8330 (grub_efi_usb_device_path_t): New type.
8331 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
8332 (struct grub_efi_usb_class_device_path): New structure.
8333 (grub_efi_usb_class_device_path_t): New type.
8334 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
8335 (struct grub_efi_i2o_device_path): New structure.
8336 (grub_efi_i2o_device_path_t): New type.
8337 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
8338 (struct grub_efi_mac_address_device_path): New structure.
8339 (grub_efi_mac_address_device_path_t): New type.
8340 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
8341 (struct grub_efi_ipv4_device_path): New structure.
8342 (grub_efi_ipv4_device_path_t): New type.
8343 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
8344 (struct grub_efi_ipv6_device_path): New structure.
8345 (grub_efi_ipv6_device_path_t): New type.
8346 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
8347 (struct grub_efi_infiniband_device_path): New structure.
8348 (grub_efi_infiniband_device_path_t): New type.
8349 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
8350 (struct grub_efi_uart_device_path): New structure.
8351 (grub_efi_uart_device_path_t): New type.
8352 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
8353 (struct grub_efi_vendor_messaging_device_path): New structure.
8354 (grub_efi_vendor_messaging_device_path_t): New type.
8355 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
8356 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
8357 (struct grub_efi_hard_drive_device_path): New structure.
8358 (grub_efi_hard_drive_device_path_t): New type.
8359 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
8360 (struct grub_efi_cdrom_device_path): New structure.
8361 (grub_efi_cdrom_device_path_t): New type.
8362 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
8363 (struct grub_efi_vendor_media_device_path): New structure.
8364 (grub_efi_vendor_media_device_path_t): New type.
8365 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
8366 (struct grub_efi_file_path_device_path): New structure.
8367 (grub_efi_file_path_device_path_t): New type.
8368 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
8369 (struct grub_efi_protocol_device_path): New structure.
8370 (grub_efi_protocol_device_path_t): New type.
8371 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
8372 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
8373 (struct grub_efi_bios_device_path): New structure.
8374 (grub_efi_bios_device_path_t): New type.
8375 (struct grub_efi_disk_io): New structure.
8376 (grub_efi_disk_io_t): New type.
8377 (struct grub_efi_block_io_media): New structure.
8378 (grub_efi_block_io_media_t): New type.
8379 (struct grub_efi_block_io): New structure.
8380 (grub_efi_block_io_t): New type.
8382 * include/grub/misc.h (grub_stop): Removed.
8383 (grub_exit): New prototype.
8384 (grub_abort): Likewise.
8386 * include/grub/disk.h (enum grub_disk_dev_id): Added
8387 GRUB_DISK_DEVICE_EFIDISK_ID.
8389 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
8391 (kernel_syms.lst): Remove the target if an error occurs.
8393 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
8395 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
8396 as it was simply too buggy.
8398 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
8400 * kern/misc.c (grub_lltoa): New function.
8401 (grub_vsprintf): Added support for the long long suffix,
8404 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
8406 * Makefile.in (LDFLAGS): Add variable.
8407 (LD): Remove variable.
8408 * configure.ac: Add -m32 to LDFLAGS.
8409 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
8410 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8411 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8412 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8413 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8415 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8416 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8417 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8419 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
8421 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8422 length for unknown glyph.
8424 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8426 Add support for pre-loaded modules into the EFI port.
8428 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8429 completely. Accept one more argument DIR. The caller has changed.
8431 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8433 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8434 (grub_efi_loaded_image_guid): New variable.
8435 (grub_efi_get_loaded_image): New function.
8436 (grub_arch_modules_addr): Likewise.
8438 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8441 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8442 (struct grub_efi_loaded_image): New structure.
8443 (grub_efi_loaded_image_t): New type.
8445 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8447 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8448 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8449 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8451 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
8453 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8455 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
8457 * DISTLIST: Added include/grub/efi/console.h,
8458 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8459 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8461 * include/grub/efi/console.h: New file.
8462 * include/grub/efi/time.h: Likewise.
8463 * include/grub/i386/efi/kernel.h: Likewise.
8464 * kern/efi/init.c: Likewise.
8465 * kern/efi/mm.c: Likewise.
8466 * term/efi/console.c: Likewise.
8468 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8469 (grub_stop): Removed.
8470 (grub_get_rtc): Likewise.
8471 (grub_machine_init): Simply call grub_efi_init.
8472 (grub_machine_fini): Call grub_efi_fini.
8474 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8475 (grub_efi_output_string): Removed.
8476 (grub_efi_stall): New function.
8477 (grub_stop): Likewise.
8478 (grub_get_rtc): Likewise.
8480 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8481 (grub_efi_stall): New prototype.
8482 (grub_efi_allocate_pages): Likewise.
8483 (grub_efi_free_pages): Likewise.
8484 (grub_efi_get_memory_map): Likewise.
8485 (grub_efi_mm_init): Likewise.
8486 (grub_efi_mm_fini): Likewise.
8487 (grub_efi_init): Likewise.
8488 (grub_efi_fini): Likewise.
8490 * include/grub/i386/efi/time.h: Do not include
8491 grub/symbol.h. Include grub/efi/time.h.
8492 (GRUB_TICKS_PER_SECOND): Removed.
8493 (grub_get_rtc): Likewise.
8495 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8496 Added padding. The EFI spec is buggy.
8497 (GRUB_EFI_BLACK): New macro.
8498 (GRUB_EFI_BLUE): Likewise.
8499 (GRUB_EFI_GREEN): Likewise.
8500 (GRUB_EFI_CYAN): Likewise.
8501 (GRUB_EFI_RED): Likewise.
8502 (GRUB_EFI_MAGENTA): Likewise.
8503 (GRUB_EFI_BROWN): Likewise.
8504 (GRUB_EFI_LIGHTGRAY): Likewise.
8505 (GRUB_EFI_BRIGHT): Likewise.
8506 (GRUB_EFI_DARKGRAY): Likewise.
8507 (GRUB_EFI_LIGHTBLUE): Likewise.
8508 (GRUB_EFI_LIGHTGREEN): Likewise.
8509 (GRUB_EFI_LIGHTCYAN): Likewise.
8510 (GRUB_EFI_LIGHTRED): Likewise.
8511 (GRUB_EFI_LIGHTMAGENTA): Likewise.
8512 (GRUB_EFI_YELLOW): Likewise.
8513 (GRUB_EFI_WHITE): Likewise.
8514 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8515 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8516 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8517 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8518 (GRUB_EFI_BACKGROUND_RED): Likewise.
8519 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8520 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8521 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8522 (GRUB_EFI_TEXT_ATTR): Likewise.
8524 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8525 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8526 (kernel_mod_HEADERS): Added efi/time.h.
8528 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
8530 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8531 include/grub/efi/api.h, include/grub/efi/console_control.h,
8532 include/grub/efi/efi.h, include/grub/efi/pe32.h,
8533 include/grub/i386/efi/time.h, kern/efi/efi.c,
8534 kern/i386/efi/init.c, kern/i386/efi/startup.S,
8535 and util/i386/efi/grub-mkimage.c.
8537 * Makefile.in (RMKFILES): Added i386-efi.rmk.
8539 * genmk.rb (PModule#rule): Do not export symbols if
8540 #{prefix}_EXPORTS is set to "no".
8542 * conf/i386-efi.mk: New file.
8543 * conf/i386-efi.rmk: Likewise.
8544 * include/grub/efi/api.h: Likewise.
8545 * include/grub/efi/console_control.h: Likewise.
8546 * include/grub/efi/efi.h: Likewise.
8547 * include/grub/efi/pe32.h: Likewise.
8548 * include/grub/i386/efi/time.h: Likewise.
8549 * kern/efi/efi.c: Likewise.
8550 * kern/i386/efi/init.c: Likewise.
8551 * kern/i386/efi/startup.S: Likewise.
8552 * util/i386/efi/grub-mkimage.c: Likewise.
8554 2006-04-17 Marco Gerards <marco@gnu.org>
8556 * include/grub/script.h: Include <grub/parser.h> and
8557 "grub_script.tab.h".
8558 (struct grub_lexer_param): New struct.
8559 (struct grub_parser_param): Likewise.
8560 (grub_script_create_arglist): Pass the state in an argument.
8561 (grub_script_add_arglist): Likewise.
8562 (grub_script_create_cmdline): Likewise.
8563 (grub_script_create_cmdblock): Likewise.
8564 (grub_script_create_cmdif): Likewise.
8565 (grub_script_create_cmdmenu): Likewise.
8566 (grub_script_add_cmd): Likewise.
8567 (grub_script_arg_add): Likewise.
8568 (grub_script_lexer_ref): Likewise.
8569 (grub_script_lexer_deref): Likewise.
8570 (grub_script_lexer_record_start): Likewise.
8571 (grub_script_lexer_record_stop): Likewise.
8572 (grub_script_mem_record): Likewise.
8573 (grub_script_mem_record_stop): Likewise.
8574 (grub_script_malloc): Likewise.
8575 (grub_script_yylex): Likewise.
8576 (grub_script_yyparse): Likewise.
8577 (grub_script_yyerror): Likewise.
8578 (grub_script_yylex): Likewise.
8579 (grub_script_lexer_init): Return the state.
8581 * normal/lexer.c (grub_script_lexer_state): Removed variable.
8582 (grub_script_lexer_done): Likewise.
8583 (grub_script_lexer_getline): Likewise.
8584 (grub_script_lexer_refs): Likewise.
8586 (newscript): Likewise.
8588 (recording): Likewise.
8589 (recordpos): Likewise.
8590 (recordlen): Likewise.
8591 (grub_script_lexer_init): Return the state instead of setting
8593 (grub_script_lexer_ref): Use the newly added argument for state
8595 (grub_script_lexer_deref): Likewise.
8596 (grub_script_lexer_record_start): Likewise.
8597 (grub_script_lexer_record_stop): Likewise.
8598 (recordchar): Likewise.
8599 (nextchar): Likewise.
8600 (grub_script_yylex2): Likewise.
8601 (grub_script_yylex): Likewise.
8602 (grub_script_yyerror): Likewise.
8604 * normal/parser.y (func_mem): Removed variable.
8605 (menu_entry): Likewise.
8607 (%lex-param): New parser option.
8608 (%parse-param): Likewise.
8609 (script): Always return the AST.
8610 (argument): Pass the state around.
8611 (arguments): Likewise.
8612 (grubcmd): Likewise.
8613 (commands): Likewise.
8614 (function): Likewise.
8615 (menuentry): Likewise.
8616 (if_statement): Likewise.
8619 * normal/script.c (grub_script_memused): Removed variable.
8620 (grub_script_parsed): Likewise.
8621 (grub_script_malloc): Added a state argument. Use that instead of
8623 (grub_script_mem_record): Likewise.
8624 (grub_script_mem_record_stop): Likewise.
8625 (grub_script_arg_add): Likewise.
8626 (grub_script_add_arglist): Likewise.
8627 (grub_script_create_cmdline): Likewise.
8628 (grub_script_create_cmdif): Likewise.
8629 (grub_script_create_cmdmenu): Likewise.
8630 (grub_script_add_cmd): Likewise.
8631 (grub_script_parse): Setup the state before calling the parser.
8633 2006-04-16 Marco Gerards <marco@gnu.org>
8635 * normal/command.c (grub_command_init): Remove the title command.
8637 * normal/lexer.c (grub_script_yylex): Renamed from this...
8638 (grub_script_yylex2): ... to this.
8639 (grub_script_yylex): New function. Temporary
8640 introduced to filter some tokens.
8641 (grub_script_yyerror): Print a newline.
8643 * normal/main.c (read_config_file): Output information about the
8644 lines that contain errors. Wait for a key after all lines have
8645 been processed. Don't return an empty menu.
8647 * normal/parser.y (func_mem): Don't initialize.
8648 (menu_entry): Likewise.
8649 (err): New variable.
8650 (script): Don't return anything when an error was encountered.
8651 (ws, returns): Removed rules.
8652 (argument): Disabled concatenated variable support.
8653 (arguments): Remove explicit separators.
8654 (grubcmd): Likewise.
8655 (function): Likewise.
8656 (menuentry): Likewise.
8658 (commands): Likewise. Add error handling.
8660 * normal/script.c (grub_script_create_cmdline): If
8661 `grub_script_parsed' is 0, assume the parser encountered an error.
8663 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
8665 * configure.ac: Add support for EFI. Fix the typo
8666 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
8668 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8670 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
8671 foreign multibyte characters should be shown correctly.
8673 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8675 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
8677 (read_config_file): Made it to close file before returning.
8679 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
8681 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
8682 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
8683 video/i386/pc/vbefill.c.
8685 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
8686 video/i386/pc/vbefill.c.
8688 * include/grub/video.h (grub_video_blit_format): New enum.
8689 (grub_video_mode_info): Added new member blit_format.
8690 (grub_video_get_blit_format): New function prototype.
8692 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
8694 (grub_video_vbe_map_rgb): Likewise.
8695 (grub_video_vbe_unmap_color): Likewise.
8697 * include/grub/i386/pc/vbeblit.h: New file.
8699 * include/grub/i386/pc/vbefill.h: New file.
8701 * video/video.c (grub_video_get_blit_format): New function.
8702 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
8703 (grub_video_vbe_map_rgb): Likewise.
8704 (grub_video_vbe_unmap_color): Likewise.
8706 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
8708 (grub_video_vbe_blit_render_target): Changed to use more optimized
8710 (grub_video_vbe_setup): Added detection for optimized settings.
8711 (grub_video_vbe_create_render_target): Likewise.
8713 * video/i386/pc/vbeblit.c: New file.
8715 * video/i386/pc/vbefill.c: New file.
8717 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
8719 * font/manager.c (grub_font_get_glyph): Removed font fixup from
8722 * util/unifont2pff.rb: ... and moved it to here. Improved argument
8723 parsing to support both hex and dec ranges. If filename was missing
8724 show usage information.
8726 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
8728 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
8729 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
8731 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
8732 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
8733 (video_mod_SOURCES): Added.
8734 (video_mod_CFLAGS): Likewise.
8735 (video_mod_LDFLAGS): Likewise.
8736 (gfxterm_mod_SOURCES): Likewise.
8737 (gfxterm_mod_CFLAGS): Likewise.
8738 (gfxterm_mod_LDFLAGS): Likewise.
8739 (videotest_mod_SOURCES): Likewise.
8740 (videotest_mod_CFLAGS): Likewise.
8741 (videotest_mod_LDFLAGS): Likewise.
8742 (vesafb_mod_SOURCES): Removed.
8743 (vesafb_mod_CFLAGS): Likewise.
8744 (vesafb_mod_LDFLAGS): Likewise.
8745 (vga_mod_SOURCES): Likewise.
8746 (vga_mod_CFLAGS): Likewise.
8747 (vga_mod_LDFLAGS): Likewise.
8749 * commands/videotest.c: New file.
8751 * font/manager.c (fill_with_default_glyph): Modified to use
8753 (grub_font_get_glyph): Likewise.
8754 (fontmanager): Renamed from this...
8755 (font_manager): ... to this.
8757 * include/grub/font.h (grub_font_glyph): Added new structure.
8758 (grub_font_get_glyph): Modified to use grub_font_glyph.
8760 * include/grub/misc.h (grub_abs): Added as inline function.
8762 * include/grub/video.h: New file.
8764 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
8765 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
8766 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
8767 (grub_vbe_get_controller_info): Renamed from this...
8768 (grub_vbe_bios_get_controller_info): ... to this.
8769 (grub_vbe_get_mode_info): Renamed from this...
8770 (grub_vbe_bios_get_mode_info): ... to this.
8771 (grub_vbe_set_mode): Renamed from this...
8772 (grub_vbe_bios_set_mode): ... to this.
8773 (grub_vbe_get_mode): Renamed from this...
8774 (grub_vbe_bios_get_mode): ... to this.
8775 (grub_vbe_set_memory_window): Renamed from this...
8776 (grub_vbe_bios_set_memory_window): ... to this.
8777 (grub_vbe_get_memory_window): Renamed from this...
8778 (grub_vbe_bios_get_memory_window): ... to this.
8779 (grub_vbe_set_scanline_length): Renamed from this...
8780 (grub_vbe_set_scanline_length): ... to this.
8781 (grub_vbe_get_scanline_length): Renamed from this...
8782 (grub_vbe_bios_get_scanline_length): ... to this.
8783 (grub_vbe_set_display_start): Renamed from this...
8784 (grub_vbe_bios_set_display_start): ... to this.
8785 (grub_vbe_get_display_start): Renamed from this...
8786 (grub_vbe_bios_get_display_start): ... to this.
8787 (grub_vbe_set_palette_data): Renamed from this...
8788 (grub_vbe_bios_set_palette_data): ... to this.
8789 (grub_vbe_set_pixel_rgb): Removed.
8790 (grub_vbe_set_pixel_index): Likewise.
8792 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
8794 (grub_vbe_bios_get_controller_info): ... to this.
8795 (grub_vbe_get_mode_info): Renamed from this...
8796 (grub_vbe_bios_get_mode_info): ... to this.
8797 (grub_vbe_set_mode): Renamed from this...
8798 (grub_vbe_bios_set_mode): ... to this.
8799 (grub_vbe_get_mode): Renamed from this...
8800 (grub_vbe_bios_get_mode): ... to this.
8801 (grub_vbe_set_memory_window): Renamed from this...
8802 (grub_vbe_bios_set_memory_window): ... to this.
8803 (grub_vbe_get_memory_window): Renamed from this...
8804 (grub_vbe_bios_get_memory_window): ... to this.
8805 (grub_vbe_set_scanline_length): Renamed from this...
8806 (grub_vbe_set_scanline_length): ... to this.
8807 (grub_vbe_get_scanline_length): Renamed from this...
8808 (grub_vbe_bios_get_scanline_length): ... to this.
8809 (grub_vbe_set_display_start): Renamed from this...
8810 (grub_vbe_bios_set_display_start): ... to this.
8811 (grub_vbe_get_display_start): Renamed from this...
8812 (grub_vbe_bios_get_display_start): ... to this.
8813 (grub_vbe_set_palette_data): Renamed from this...
8814 (grub_vbe_bios_set_palette_data): ... to this.
8815 (grub_vbe_bios_get_controller_info): Fixed problem with registers
8816 getting corrupted after calling it. Added more pushes and pops.
8817 (grub_vbe_bios_set_mode): Likewise.
8818 (grub_vbe_bios_get_mode): Likewise.
8819 (grub_vbe_bios_get_memory_window): Likewise.
8820 (grub_vbe_bios_set_scanline_length): Likewise.
8821 (grub_vbe_bios_get_scanline_length): Likewise.
8822 (grub_vbe_bios_get_display_start): Likewise.
8823 (grub_vbe_bios_set_palette_data): Likewise.
8825 * normal/cmdline.c (cl_set_pos): Refresh the screen.
8826 (cl_insert): Likewise.
8827 (cl_delete): Likewise.
8829 * term/gfxterm.c: New file.
8831 * term/i386/pc/vesafb.c: Removed file.
8833 * video/video.c: New file.
8835 * video/i386/pc/vbe.c (real2pm): Added new function.
8836 (grub_video_vbe_draw_pixel): Likewise.
8837 (grub_video_vbe_get_video_ptr): Likewise.
8838 (grub_video_vbe_get_pixel): Likewise
8839 (grub_video_vbe_init): Likewise.
8840 (grub_video_vbe_fini): Likewise.
8841 (grub_video_vbe_setup): Likewise.
8842 (grub_video_vbe_get_info): Likewise.
8843 (grub_video_vbe_set_palette): Likewise.
8844 (grub_video_vbe_get_palette): Likewise.
8845 (grub_video_vbe_set_viewport): Likewise.
8846 (grub_video_vbe_get_viewport): Likewise.
8847 (grub_video_vbe_map_color): Likewise.
8848 (grub_video_vbe_map_rgb): Likewise.
8849 (grub_video_vbe_map_rgba): Likewise.
8850 (grub_video_vbe_unmap_color): Likewise.
8851 (grub_video_vbe_fill_rect): Likewise.
8852 (grub_video_vbe_blit_glyph): Likewise.
8853 (grub_video_vbe_blit_bitmap): Likewise.
8854 (grub_video_vbe_blit_render_target): Likewise.
8855 (grub_video_vbe_scroll): Likewise.
8856 (grub_video_vbe_swap_buffers): Likewise.
8857 (grub_video_vbe_create_render_target): Likewise.
8858 (grub_video_vbe_delete_render_target): Likewise.
8859 (grub_video_vbe_set_active_render_target): Likewise.
8860 (grub_vbe_set_pixel_rgb): Remove function.
8861 (grub_vbe_set_pixel_index): Likewise.
8862 (index_color_mode): Remove static variable.
8863 (active_mode): Likewise.
8864 (framebuffer): Likewise.
8865 (bytes_per_scan_line): Likewise.
8866 (grub_video_vbe_adapter): Added new static variable.
8867 (framebuffer): Likewise.
8868 (render_target): Likewise.
8869 (initial_mode): Likewise.
8870 (mode_in_use): Likewise.
8871 (mode_list): Likewise.
8873 2006-03-10 Marco Gerards <marco@gnu.org>
8875 * configure.ac (AC_INIT): Bumped to 1.93.
8877 * DISTLIST: Added `include/grub/hfs.h'.
8879 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
8881 * boot/i386/pc/boot.S (general_error): Before looping, try INT
8882 18H, which might help the BIOS falling back to next boot media.
8884 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
8886 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
8887 Poe Chen <poe.poechen@gmail.com>.
8889 2006-01-17 Marco Gerards <marco@gnu.org>
8891 * include/grub/normal.h: Include <grub/script.h>.
8892 (grub_command_list): Removed struct.
8893 (grub_command_list_t): Removed type.
8894 (grub_menu_entry): Remove members `num' and `command_list'. Add
8895 members `commands' and `sourcecode'.
8896 * include/grub/script.h: Add inclusion guards.
8897 (grub_script_cmd_menuentry): New struct.
8898 (grub_script_execute_menuentry): New prototype.
8899 (grub_script_lexer_record_start): Likewise.
8900 (grub_script_lexer_record_stop): Likewise.
8901 * normal/execute.c (grub_script_execute_menuentry): New function.
8902 * normal/lexer.c (record, recording, recordpos, recordlen): New
8904 (grub_script_lexer_record_start): New function.
8905 (grub_script_lexer_record_stop): Likewise.
8906 (recordchar): Likewise.
8907 (nextchar): Likewise.
8908 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
8909 2048 as the buffer size. Add the tokens `menuentry' and `@'.
8910 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
8911 (current_menu): New variable.
8912 (free_menu): Mainly rewritten.
8913 (grub_normal_menu_addentry): New function.
8914 (read_config_file): Rewritten.
8915 * normal/menu.c (run_menu_entry): Mainly rewritten.
8916 * normal/menu_entry.c (make_screen): Rewritten the code to insert
8918 (run): Mainly rewritten.
8919 * normal/parser.y (menu_entry): New variable.
8920 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
8921 (menuentry): New rule.
8922 (command): Add `menuentry'.
8923 (if_statement): Allow additional returns before `fi'.
8924 * normal/script.c (grub_script_create_cmdmenu): New function.
8926 2006-01-03 Marco Gerards <marco@gnu.org>
8928 * INSTALL: GNU Bison is required.
8929 * configure.ac: Rewritten the test to detect Bison.
8930 * Makefile.in (YACC): New variable. Reported by Xun Sun
8931 <xun.sun.cn@gmail.com>.
8933 2006-01-03 Marco Gerards <marco@gnu.org>
8935 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
8936 the HFS+ filesystem to filesystem blocks.
8937 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
8938 GCC warning is silenced.
8940 2006-01-03 Marco Gerards <marco@gnu.org>
8942 * partmap/apple.c (apple_partition_map_iterate): Convert the data
8943 read from disk from big endian to host byte order.
8945 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
8947 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
8949 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
8950 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
8951 embedded HFS+ filesystem.
8952 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
8953 (grub_hfs_sblock): Move from here...
8954 * include/grub/hfs.h: To here... New file.
8955 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
8957 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
8959 (grub_hfsplus_volheader): Change type of member `magic' to
8961 (grub_hfsplus_data): Add new member `embedded_offset'.
8962 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
8964 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
8965 Calculate the offset.
8967 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8969 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
8971 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
8973 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8975 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
8976 ENV->NAME is NULL after allocating ENV->VALUE.
8978 2005-12-25 Marco Gerards <marco@gnu.org>
8980 * kern/env.c (grub_env_set): Rewritten the error handling code.
8982 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8984 * geninit.sh: Made more robust, and more portable.
8986 2005-12-25 Marco Gerards <marco@gnu.org>
8988 Add support for Apple HFS+ filesystems.
8990 * fs/hfsplus.c: New file.
8992 * DISTLIST: Added `fs/hfsplus.c'.
8994 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
8995 (hfsplus_mod_SOURCES): New variable.
8996 (hfsplus_mod_CFLAGS): Likewise.
8997 (hfsplus_mod_LDFLAGS): Likewise.
8998 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
8999 (grub_setup_SOURCES): Likewise.
9000 (grub_mkdevicemap_SOURCES): Likewise.
9001 (grub_emu_SOURCES): Likewise.
9002 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9004 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
9006 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
9008 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
9010 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
9011 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
9012 include/grub/parser.h, include/grub/script.h, kern/parser.c,
9013 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
9014 normal/lexer.c, normal/parser.y, normal/script.c, and
9016 Removed kern/sparc64/cache.c.
9018 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
9019 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
9022 * configure.ac (AC_INIT): Bumped to 1.92.
9024 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
9026 * kern/err.c (grub_error_push): Added new function to support error
9028 (grub_error_pop): Likewise.
9029 (grub_error_stack_items): New local variable to support error stacks.
9030 (grub_error_stack_pos): Likewise.
9031 (grub_error_stack_assert): Likewise.
9032 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
9034 (grub_print_error): Added support to print errors from error stack.
9036 * include/grub/err.h (grub_error_push): Added function prototype.
9037 (grub_error_pop): Likewise.
9039 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
9041 * configure.ac: Accept `powerpc64' as host_cpu.
9042 (amd64): Rename to `biarch32'.
9044 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
9045 non-cacheline-aligned addresses.
9047 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
9048 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
9049 if `size' is non-zero.
9051 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
9053 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
9054 and `cd' to make sure the filename is not prefixed with a
9056 (pkgdata_MODULES): Add `gpt.mod'.
9057 (gpt_mod_SOURCES): New variable.
9058 (gpt_mod_CFLAGS): Likewise.
9059 (gpt_mod_LDFLAGS): Likewise.
9061 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9063 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9066 * partmap/gpt.c: New file.
9068 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
9069 GPT partition map is detected.
9071 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
9073 * commands/i386/pc/play.c: New file.
9074 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
9075 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
9078 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
9080 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
9081 ((unused))' to silence gcc warning.
9083 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
9085 * configure.ac: Correct `AC_PROG_YACC' test.
9087 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9089 * util/powerpc/ieee1275/grub-install.in: Run the mount point
9090 check before installing files.
9092 2005-11-22 Mike Small <smallm@panix.com>
9094 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
9095 number regex so multidigit numbers are recognized correctly.
9097 2005-11-22 Mike Small <smallm@panix.com>
9099 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
9100 debugging message before attempting to claim memory.
9101 (grub_rescue_cmd_initrd): Add a claim debugging message and try
9102 multiple addresses in case of failure.
9104 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9106 * term/tparm.c (get_space): Remove empty `if' statement.
9108 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9110 * kern/parser.c (check_varstate): Rename `state' to 's'.
9112 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9114 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
9115 variable definitions to the beginning of each function. Sort stack
9117 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
9118 `buf' argument to `char *'.
9120 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9122 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9123 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9124 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9125 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9126 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9127 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9128 configfile.mod, search.mod, gzio.mod and test.mod.
9129 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9130 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9131 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9132 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9133 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9134 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9135 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9136 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9137 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9138 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9139 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9140 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9141 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9142 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9143 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9144 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9145 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9146 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9147 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9148 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9149 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9150 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9151 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9153 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9155 (pkgdata_MODULES): Add test.mod.
9157 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9159 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
9160 appending to variables with "+=".
9161 (PModule): Use full pathname to generate *.lst filenames.
9163 * Makefile.in: Fixed list rules moved from genmk.rb.
9164 (.DELETE_ON_ERROR): New special target.
9165 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9167 * conf/i386-pc.rmk: Include conf/common.mk.
9168 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9169 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9170 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9171 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9172 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9173 configfile.mod, search.mod, gzio.mod and test.mod.
9174 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9175 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9176 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9177 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9178 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9179 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9180 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9181 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9182 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9183 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9184 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9185 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9186 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9187 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9188 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9189 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9190 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9191 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9192 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9193 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9194 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9195 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9196 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9198 * conf/common.rmk: ... to here. New file.
9200 * conf/common.mk: New file.
9202 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
9204 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9205 (grub_script.tab.c): ... here.
9207 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9208 (grub_script.tab.c): ... here.
9210 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9211 (grub_script.tab.c): ... here.
9213 * normal/command.c (grub_command_find): Fixed a memory leak of
9214 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9216 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9218 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9219 "@" which marks the start of a comment on ARM.
9220 (VARIABLE): Likewise.
9222 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9224 Add support for Linux/ADFS partition tables.
9226 * partmap/acorn.c: New file.
9228 * include/grub/acorn_filecore.h: Likewise.
9230 * DISTLIST: Added `partmap/acorn.c' and
9231 `include/grub/acorn_filecore.h'.
9233 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9235 (pkgdata_MODULES): Add `acorn.mod'.
9236 (acorn_mod_SOURCES): New variable.
9237 (acorn_mod_CFLAGS): Likewise.
9239 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9241 (pkgdata_MODULES): Add `acorn.mod'.
9242 (acorn_mod_SOURCES): New variable.
9243 (acorn_mod_CFLAGS): Likewise.
9245 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9246 (pkgdata_MODULES): Add `acorn.mod'.
9247 (acorn_mod_SOURCES): New variable.
9248 (acorn_mod_CFLAGS): Likewise.
9249 (acorn_mod_LDFLAGS): Likewise.
9251 * include/types.h (grub_disk_addr_t): New typedef.
9253 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
9255 * geninit.sh: New file.
9257 * geninitheader.sh: Likewise.
9259 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9260 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9261 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9262 * commands/configfile.c (grub_configfile_init)
9263 (grub_configfile_fini): Likewise.
9264 * commands/default.c (grub_default_init, grub_default_fini):
9266 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9267 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9268 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9269 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9271 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9272 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9274 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
9275 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
9277 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9279 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
9281 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9282 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
9283 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
9284 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
9285 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
9286 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
9287 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
9288 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
9289 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
9290 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
9291 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
9292 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
9293 * partmap/amiga.c (grub_amiga_partition_map_init)
9294 (grub_amiga_partition_map_fini): Likewise.
9295 * partmap/apple.c (grub_apple_partition_map_init)
9296 (grub_apple_partition_map_fini): Likewise.
9297 * partmap/pc.c (grub_pc_partition_map_init)
9298 (grub_pc_partition_map_fini): Likewise.
9299 * partmap/sun.c (grub_sun_partition_map_init,
9300 grub_sun_partition_map_fini): Likewise.
9301 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
9304 * util/grub-emu.c: Include <grub_modules_init.h>.
9305 (main): Don't initialize and de-initialize any modules directly,
9306 use `grub_init_all' and `grub_fini_all' instead.
9308 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
9309 `grub_vesafb_mod_init'.
9310 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
9312 * term/i386/pc/vga.c (grub_vga_init): Renamed to
9313 `grub_vga_mod_init'. Updated all users.
9314 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
9316 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
9317 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
9320 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
9321 Generate a function to initialize the module in utilities.
9322 Updated all callers.
9323 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
9324 initialize the module in utilities. Updated all callers.
9326 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9328 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
9329 escape sequence and a literal ^L to clear the screen.
9331 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
9332 when returning from Open Firmware.
9334 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9336 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
9337 (grub_ofconsole_height): Likewise.
9338 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
9339 manually insert a '\n'.
9340 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
9341 `grub_ofconsole_height'. Return early if these are already set.
9343 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
9345 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9346 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
9347 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
9348 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
9349 and `normal/script.c'.
9350 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9351 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9352 (test_mod_SOURCES): New variable.
9353 (test_mod_CFLAGS): Likewise.
9354 (test_mod_LDFLAGS): Likewise.
9355 (pkgdata_MODULES): Add `test.mod'.
9356 (grub_script.tab.c): New rule.
9357 (grub_script.tab.h): Likewise.
9359 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
9361 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9362 `commands/test.c', `normal/execute.c', `normal/lexer.c',
9363 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9364 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9365 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9366 (test_mod_SOURCES): New variable.
9367 (test_mod_CFLAGS): Likewise.
9368 (pkgdata_MODULES): Add `test.mod'.
9369 (grub_script.tab.c): New rule.
9370 (grub_script.tab.h): Likewise.
9372 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
9374 Add initial scripting support.
9376 * commands/test.c: New file.
9377 * include/grub/script.h: Likewise.
9378 * normal/execute.c: Likewise.
9379 * normal/function.c: Likewise.
9380 * normal/lexer.c: Likewise.
9381 * normal/parser.y: Likewise.
9382 * normal/script.c: Likewise.
9384 * configure.ac: Add `AC_PROG_YACC' test.
9386 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
9387 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
9388 `normal/function.c' and `normal/script.c'.
9389 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9390 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9391 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
9393 (pkgdata_MODULES): Add `test.mod'.
9394 (grub_script.tab.c): New rule.
9395 (grub_script.tab.h): Likewise.
9397 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
9399 * include/grub/normal.h (grub_test_init): New prototype.
9400 (grub_test_fini): Likewise.
9402 * normal/command.c: Include <grub/script.h>.
9403 (grub_command_execute): Rewritten.
9405 * util/grub-emu.c (main): Call `grub_test_init' and
9408 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9410 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9412 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9413 there are no pending characters.
9415 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9417 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9418 `grub_strndup' to drop device arguments. Replace unnecessary
9419 `grub_strndup' with `grub_strdup'.
9421 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9423 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9424 `debug' environment variable has been set.
9426 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
9428 * Makefile.in (install-local): Use $(DATA).
9429 (uninstall): Likewise.
9430 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9431 (sbin_UTILITIES): ... to here.
9432 (sbin_SCRIPTS): New variable.
9433 (grub_install_SOURCES): New variable.
9434 * util/powerpc/ieee1275/grub-install.in: New file.
9435 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9437 (add_segments): Call `grub_util_get_path'.
9439 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9441 From Timothy Baldwin:
9442 * commands/ls.c (grub_ls_list_files): Close FILE with
9444 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9446 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
9448 * include/grub/parser.h: New file.
9450 * kern/parser.c: Likewise.
9452 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9453 (grub_setup_SOURCES): Likewise.
9454 (grub_probefs_SOURCES): Likewise.
9455 (grub_emu_SOURCES): Likewise.
9456 (kernel_img_HEADERS): Add `parser.h'.
9458 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9459 (grub_emu_SOURCES): Add `kern/parser.c'.
9460 (grubof_SOURCES): Likewise.
9462 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9463 (grubof_SOURCES): Add `kern/parser.c'.
9465 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9467 * kern/misc.c (grub_split_cmdline): Removed function.
9469 * kern/rescue.c: Include <grub/parser.h>.
9470 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9471 of `grub_split_cmdline'.
9473 * normal/command.c: Include <grub/parser.h>.
9474 (grub_command_execute): Use `grub_parser_split_cmdline' instead
9475 of `grub_split_cmdline'.
9477 * normal/completion.c: Include <grub/parser.h>.
9478 (cmdline_state): New variable.
9479 (iterate_dir): End the filename with a quote depending on the
9481 (get_state): new function.
9482 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9483 split the arguments and determine the current argument. When the
9484 argument string is not quoted, escape all spaces.
9486 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9488 * normal/sparc64/setjmp.S: New file.
9490 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9492 * include/grub/sparc64/libgcc.h: New file.
9493 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9494 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9495 normal/sparc64/setjmp.c.
9497 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9499 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9500 * kern/sparc64/cache.S: New file.
9501 * kern/sparc64/cache.c: Removed.
9502 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9503 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
9505 (COMMON_LDFLAGS): Add -melf64_sparc.
9506 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9507 (grubof_SOURCES): Use cache.S instead of cache.c.
9508 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
9509 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9510 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9512 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9513 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9514 (linux_mod_CFLAGS): Commented out.
9515 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9516 out because module isn't built.
9517 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9518 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9519 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9520 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9521 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9522 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9523 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9524 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9525 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9526 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9527 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9528 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9529 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9530 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9532 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
9534 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9535 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9536 longer, because HFS should not be used on PC.
9538 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9540 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9541 consistently within the loop.
9543 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
9545 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9546 directory can not be read.
9548 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9550 * configure.ac (AC_INIT): Increase the version number to 1.91.
9552 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9553 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9554 term/i386/pc/serial.c.
9556 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9558 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9559 file size must be permitted.
9561 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9562 between %ah and %al.
9564 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9566 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9568 Call the hook with a NUL-terminated filename.
9569 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9572 * kern/term.c (cursor_state): New variable.
9573 (grub_term_set_current): Reset the cursor state on a new
9575 (grub_setcursor): Rewritten to use CURSOR_STATE.
9576 (grub_getcursor): New function.
9578 * include/grub/term.h (grub_getcursor): New prototype.
9580 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9581 integers on ARM. Reported by Timothy Baldwin
9582 <T.E.Baldwin99@members.leeds.ac.uk>.
9584 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
9586 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9588 (grub_sfs_dir): Likewise.
9590 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
9592 Add support for the SFS filesystem.
9594 * fs/sfs.c: New file.
9596 * DISTLIST: Added `fs/sfs.c'.
9598 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9599 (grub_probefs_SOURCES): Likewise.
9600 (grub_emu_SOURCES): Likewise.
9601 (pkgdata_MODULES): Add `sfs.mod'.
9602 (sfs_mod_SOURCES): New variable.
9603 (sfs_mod_CFLAGS): Likewise.
9604 (sfs_mod_LDFLAGS): Likewise.
9606 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
9607 (pkgdata_MODULES): Add `sfs.mod'.
9608 (sfs_mod_SOURCES): New variable.
9609 (sfs_mod_CFLAGS): Likewise.
9611 * util/grub-emu.c (main): Call `grub_sfs_init' and
9614 * include/grub/fs.h (grub_sfs_init): New prototype.
9615 (grub_sfs_fini): Likewise.
9617 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
9619 Add support for the AFFS filesystem.
9621 * fs/affs.c: New file.
9623 * DISTLIST: Added `fs/affs.c'.
9625 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
9626 (grub_probefs_SOURCES): Likewise.
9627 (grub_emu_SOURCES): Likewise.
9628 (pkgdata_MODULES): Add `affs.mod'.
9629 (affs_mod_SOURCES): New variable.
9630 (affs_mod_CFLAGS): Likewise.
9631 (affs_mod_LDFLAGS): Likewise.
9633 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
9634 (pkgdata_MODULES): Add `affs.mod'.
9635 (affs_mod_SOURCES): New variable.
9636 (affs_mod_CFLAGS): Likewise.
9638 * util/grub-emu.c (main): Call `grub_affs_init' and
9641 * include/grub/fs.h (grub_affs_init): New prototype.
9642 (grub_affs_fini): Likewise.
9644 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9646 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
9648 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9650 * configure.ac: Accept `x86_64' as host_cpu. In that case add
9653 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
9656 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
9657 (COMMON_LDFLAGS): New variable.
9658 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
9659 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
9660 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
9661 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
9662 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
9663 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
9664 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
9665 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
9666 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
9667 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
9668 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9669 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9670 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
9671 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
9672 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
9674 (normal_mod_ASFLAGS): Add `-m32'.
9676 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
9677 (grub_host_size_t, grub_host_ssize_t): New types.
9678 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
9679 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
9680 `GRUB_HOST_SIZEOF_VOID_P'.
9682 * include/grub/kernel.h (struct grub_module_header): Type of
9683 member offset changed to `grub_host_off_t'. Type of member size
9684 changed to `grub_host_size_t'.
9685 (struct grub_module_info): Type of member offset changed to
9686 `grub_host_off_t'. Type of member size changed to
9689 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
9691 Make GRUB's kernel compliant to Multiboot Specification.
9693 * kern/i386/pc/startup.S (multiboot_header): New label.
9694 (multiboot_entry): Likewise.
9695 (multiboot_trampoline): Likewise.
9697 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9700 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
9701 put parentheses after a question mark.
9702 [!GRUB_UTIL] (my_mod): New variable.
9704 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
9706 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
9708 Adds support for the XFS filesystem. Btrees are not supported
9711 * fs/xfs.c: New file.
9713 * DISTLIST: Added `fs/xfs.c'.
9715 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
9716 (grub_probefs_SOURCES): Likewise.
9717 (grub_emu_SOURCES): Likewise.
9718 (pkgdata_MODULES): Add `xfs.mod'.
9719 (xfs_mod_SOURCES): New variable.
9720 (xfs_mod_CFLAGS): Likewise.
9722 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
9723 (pkgdata_MODULES): Add `xfs.mod'.
9724 (xfs_mod_SOURCES): New variable.
9725 (xfs_mod_CFLAGS): Likewise.
9727 * util/grub-emu.c (main): Call `grub_xfs_init' and
9730 * include/grub/fs.h (grub_xfs_init): New prototype.
9731 (grub_xfs_fini): Likewise.
9734 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
9736 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
9737 color modes, allow greater than 16 colors to be configured as
9740 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9742 * normal/completion.c (complete_arguments): Add the qualifier
9745 From Omniflux <omniflux+lists@omniflux.com>:
9746 * include/grub/terminfo.h: New file.
9747 * include/grub/tparm.h: Likewise.
9748 * include/grub/i386/pc/serial.h: Likewise.
9749 * term/terminfo.c: Likewise.
9750 * term/tparm.c: Likewise.
9751 * term/i386/pc/serial.c: Likewise.
9752 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
9754 (terminfo_mod_SOURCES): New variable.
9755 (terminfo_mod_CFLAGS): Likewise.
9756 (serial_mod_SOURCES): Likewise.
9757 (serial_mod_CFLAGS): Likewise.
9759 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
9761 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
9762 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
9763 and kern/powerpc/ieee1275/cmain.c, respectively.
9765 * boot/powerpc/ieee1275/crt0.S: Moved to ...
9766 * kern/powerpc/ieee1275/crt0.S: ... here.
9768 * boot/powerpc/ieee1275/cmain.c: Moved to ...
9769 * kern/powerpc/ieee1275/cmain.c: ... here.
9771 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
9772 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
9773 instead of boot/powerpc/ieee1275/crt0.S and
9774 boot/powerpc/ieee1275/cmain.c, respectively.
9776 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
9777 sectors. It was not used anyway.
9779 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9781 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
9782 `unused parameter' warning.
9784 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9786 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
9788 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
9791 2005-08-28 Marco Gerards <metgerards@student.han.nl>
9793 * include/grub/normal.h (enum grub_completion_type): Added
9794 `GRUB_COMPLETION_TYPE_ARGUMENT'.
9796 * normal/cmdline.c (print_completion): Handle
9797 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
9798 * normal/menu_entry.c (store_completion): Likewise.
9800 * normal/completion.c (complete_arguments): New function.
9801 (grub_normal_do_completion): Call `complete_arguments' when the
9802 current words start with a dash.
9804 2005-08-27 Marco Gerards <metgerards@student.han.nl>
9806 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
9807 `gzio.mod' instead of `io.mod').
9809 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
9811 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
9812 (DISTDIRS): Added io and video.
9813 Rewrite the search routine to make an output consistently.
9815 * DISTLIST: Added conf/sparc64-ieee1275.mk,
9816 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
9817 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
9818 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
9819 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
9820 util/powerpc/ieee1275/misc.c.
9822 * include/grub/gzio.h: New file.
9823 * io/gzio.c: Likewise.
9825 * kern/file.c (grub_file_close): Call grub_device_close only if
9826 FILE->DEVICE is not NULL.
9828 * include/grub/mm.h [!NULL] (NULL): New macro.
9830 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
9832 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
9833 (pkgdata_MODULES): Added gzio.mod.
9834 (gzio_mod_SOURCES): New variable.
9835 (gzio_mod_CFLAGS): Likewise.
9837 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
9838 (pkgdata_MODULES): Added gzio.mod.
9839 (gzio_mod_SOURCES): New variable.
9840 (gzio_mod_CFLAGS): Likewise.
9842 * commands/cat.c: Include grub/gzio.h.
9843 (grub_cmd_cat): Use grub_gzfile_open instead of
9846 * commands/cmp.c: Include grub/gzio.h.
9847 (grub_cmd_cmp): Use grub_gzfile_open instead of
9850 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
9851 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
9853 (grub_rescue_cmd_module): Likewise.
9855 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9857 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
9858 kern/sparc64/ieee1275/init.c because it contains _start.
9859 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
9861 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9863 * configure.ac: Add support for sparc64 host with ieee1275
9865 * configure: Generated from configure.ac.
9866 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
9868 (grub_ofdisk_read): Likewise.
9869 (grub_ofdisk_open): Use %p to print pointer values, and cast the
9870 pointers as (void *) to remove a warning.
9871 (grub_ofdisk_close): Likewise.
9872 (grub_ofdisk_read): Likewise.
9873 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
9874 returns, so make it return void to remove a warning.
9875 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
9876 Corresponding prototype change.
9877 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
9878 values, and cast the pointers as (void *) to remove a warning.
9879 (grub_mm_dump): Likewise.
9880 * conf/sparc64-ieee1275.mk: New file.
9881 * conf/sparc64-ieee1275.rmk: Likewise.
9882 * include/grub/sparc64/setjmp.h: Likewise.
9883 * include/grub/sparc64/types.h: Likewise.
9884 * include/grub/sparc64/ieee1275/console.h: Likewise.
9885 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9886 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9887 * include/grub/sparc64/ieee1275/time.h: Likewise.
9888 * kern/sparc64/cache.c: Likewise.
9889 * kern/sparc64/dl.c: Likewise.
9890 * kern/sparc64/ieee1275/init.c: Likewise.
9891 * kern/sparc64/ieee1275/openfw.c: Likewise.
9893 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
9895 * util/console.c (grub_ncurses_putchar): If C is greater than
9896 0x7f, set C to a question mark.
9897 (grub_ncurses_getcharwidth): New function.
9898 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
9901 * normal/menu.c (print_entry): Made aware of Unicode. First,
9902 convert TITLE to UCS-4, and predict the cursor position by
9905 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
9907 * kern/misc.c (grub_utf16_to_utf8): Likewise.
9909 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9911 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
9912 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9915 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
9916 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9917 grub_strcpy and grub_strlen. Take it into account that a space
9918 character is inserted as a delimiter.
9920 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9922 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
9923 invalid magic in the error.
9925 * commands/search.c: New file.
9927 * util/grub-emu.c (main): Call grub_search_init and
9930 * kern/rescue.c (grub_rescue_print_disks): Removed.
9931 (grub_rescue_print_devices): New function.
9932 (grub_rescue_cmd_ls): Use grub_device_iterate with
9933 grub_rescue_print_devices instead of grub_disk_dev_iterate with
9934 grub_rescue_print_disks.
9936 * kern/partition.c (grub_partition_iterate): Return the result of
9937 PARTMAP->ITERATE instead of GRUB_ERRNO.
9939 * kern/device.c: Include grub/partition.h.
9940 (grub_device_iterate): New function.
9942 * include/grub/partition.h (grub_partition_iterate): Return int
9943 instead of grub_err_t.
9945 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
9947 [GRUB_UTIL] (grub_search_fini): Likewise.
9949 * include/grub/device.h (grub_device_iterate): New prototype.
9951 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9953 (pkgdata_MODULES): Added search.mod.
9954 (search_mod_SOURCES): New variable.
9955 (search_mod_CFLAGS): Likewise.
9957 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
9958 (pkgdata_MODULES): Added search.mod.
9959 (search_mod_SOURCES): New variable.
9960 (search_mod_CFLAGS): Likewise.
9962 * commands/ls.c (grub_ls_list_disks): Renamed to ...
9963 (grub_ls_list_devices): ... this, and use grub_device_iterate.
9964 All callers changed.
9966 * DISTLIST: Added commands/search.c.
9968 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9970 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
9972 (grub_getcharwidth): New function.
9974 * kern/misc.c (grub_utf8_to_ucs4): New function.
9976 * include/grub/term.h (struct grub_term): Added a new member
9978 (grub_getcharwidth): New prototype.
9980 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
9982 * term/i386/pc/console.c (map_char): New function. Segregated from
9983 grub_console_putchar.
9984 (grub_console_putchar): Use map_char.
9985 (grub_console_getcharwidth): New function.
9986 (grub_console_term): Specified grub_console_getcharwidth as
9989 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
9990 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
9992 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
9994 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
9995 on grub_strtoul completely.
9996 (write_char): Declare local variables in the beginning of the
9998 (grub_vesafb_getcharwidth): New function.
9999 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
10002 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
10004 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
10005 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
10006 commands/i386/pc/vbetest.c.
10008 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
10009 call grub_vbe_get_controller_info again, because the returned
10010 information is volatile.
10011 (grub_vbe_set_video_mode): Mostly rewritten.
10012 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
10013 grub_vbe_status_t correctly.
10014 (grub_vbe_get_video_mode_info): Likewise.
10015 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
10016 several if statements.
10018 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
10019 * commands/i386/pc/vbeinfo.c: ... this.
10021 * commands/i386/pc/vbe_test.c: Renamed to ...
10022 * commands/i386/pc/vbetest.c: ... this.
10024 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
10026 (grub_cmd_vbeinfo): ... this. Save video modes before
10027 iterating. Skip a video mode, if it is not available, not enough
10028 information is given or it is monochrome. Show the memory
10029 model. Leave the interpretation of MODEVAR to grub_strtoul
10031 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
10032 (GRUB_MOD_FINI): Likewise.
10034 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
10035 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
10036 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
10037 duplicated grub_env_get. Leave the interpretation of MODEVAR to
10038 grub_strtoul completely.
10039 (real2pm): Removed.
10040 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
10041 (GRUB_MOD_FINI): Likewise.
10043 * normal/misc.c: Include grub/mm.h.
10045 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
10046 vbe_list_modes with vbetest.mod and vbeinfo.mod.
10047 (vbe_list_modes_mod_SOURCES): Removed.
10048 (vbe_list_modes_mod_CFLAGS): Likewise.
10049 (vbe_test_mod_SOURCES): Likewise.
10050 (vbe_test_mod_CFLAGS): Likewise.
10051 (vbeinfo_mod_SOURCES): New variable.
10052 (vbeinfo_mod_CFLAGS): Likewise.
10053 (vbetest_mod_SOURCES): Likewise.
10054 (vbetest_mod_CFLAGS): Likewise.
10056 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
10058 * normal/misc.c: New file.
10060 * DISTLIST: Added normal/misc.c.
10062 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10063 DISK to HOOK. Call HOOK with DISK.
10064 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10065 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10066 * partmap/sun.c (sun_partition_map_iterate): Likewise.
10068 * normal/menu_entry.c (struct screen): Added a new member
10069 "completion_shown".
10070 (completion_buffer): New global variable.
10071 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
10072 (store_completion): New function.
10073 (complete): Likewise.
10074 (clear_completions): Likewise.
10075 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
10076 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
10077 a tab, call complete.
10079 * normal/completion.c (disk_dev): Removed.
10080 (print_simple_completion): Likewise.
10081 (print_partition_completion): Likewise.
10082 (print_func): New global variable.
10083 (add_completion): Do not take the arguments WHAT or PRINT any
10084 longer. Added a new argument TYPE. Instead of printing directly,
10085 call PRINT_FUNC if not NULL.
10086 All callers changed.
10087 (complete_device): Use a local variable DEV instead of
10088 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
10089 (grub_normal_do_completion): Take a new argument HOOK. Do not
10090 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
10091 empty string, return NULL instead.
10092 All callers changed.
10094 * normal/cmdline.c (print_completion): New function.
10096 * kern/partition.c (grub_partition_iterate): Add an argument DISK
10098 All callers changed.
10100 * kern/disk.c (grub_print_partinfo): Removed.
10102 * include/grub/partition.h (struct grub_partition_map): Add a new
10103 argument DISK into HOOK of ITERATE.
10104 (grub_partition_iterate): Add a new argument DISK to HOOK.
10106 * include/grub/normal.h (enum grub_completion_type): New enum.
10107 (grub_completion_type_t): New type.
10108 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10109 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10110 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10111 (GRUB_COMPLETION_TYPE_FILE): Likewise.
10112 (grub_normal_do_completion): Added a new argument HOOK.
10113 (grub_normal_print_device_info): New prototype.
10115 * include/grub/disk.h (grub_print_partinfo): Removed.
10117 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10118 (normal_mod_SOURCES): Likewise.
10119 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10120 (normal_mod_SOURCES): Likewise.
10122 * commands/ls.c (grub_ls_list_disks): Use
10123 grub_normal_print_device_info instead of grub_print_partinfo. Free
10125 (grub_ls_list_files): Use grub_normal_print_device_info instead of
10126 duplicating the code.
10128 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10130 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
10131 follow GCS more precisely.
10132 * commands/i386/pc/vbe_test.c: Likewise.
10133 * include/grub/i386/pc/vbe.h: Likewise.
10134 * term/i386/pc/vesafb.c: Likewise.
10135 * video/i386/pc/vbe.c: Likewise.
10137 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10139 * DISTLIST: Added term/i386/pc/vesafb.c
10140 DISTLIST: Added video/i386/pc/vbe.c
10141 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10142 DISTLIST: Added commands/i386/pc/vbe_test.c.
10143 * commands/i386/pc/vbe_list_modes.c: New file.
10144 * commands/i386/pc/vbe_test.c: Likewise.
10145 * term/i386/pc/vesafb.c: Likewise.
10146 * video/i386/pc/vbe.c: Likewise.
10147 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10148 (grub_vbe_probe) Added prototype.
10149 (grub_vbe_set_video_mode) Likewise.
10150 (grub_vbe_get_video_mode) Likewise.
10151 (grub_vbe_get_video_mode_info) Likewise.
10152 (grub_vbe_set_pixel_rgb) Likewise.
10153 (grub_vbe_set_pixel_index) Likewise.
10154 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10155 (pkgdata_MODULES): Added vesafb.mod.
10156 (pkgdata_MODULES): Added vbe_list_modes.mod.
10157 (pkgdata_MODULES): Added vbe_test.mod.
10158 (vbe_mod_SOURCES): Added.
10159 (vbe_mod_CFLAGS): Likewise.
10160 (vesafb_mod_SOURCES): Likewise.
10161 (vesafb_mod_CFLAGS): Likewise.
10162 (vbe_list_modes_mod_SOURCES): Likewise.
10163 (vbe_list_modes_mod_CFLAGS): Likewise.
10164 (vbe_test_mod_SOURCES): Likewise.
10165 (vbe_test_mod_CFLAGS): Likewise.
10167 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
10169 * normal/command.c (grub_command_execute): If INTERACTIVE is
10170 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10171 CMDLINE. Disable the pager if INTERACTIVE is true.
10172 All callers are changed.
10174 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10175 before reading a config file.
10176 * normal/main.c (read_config_file): Even if a command is not
10177 found, register it if it is within an entry.
10179 * util/grub-emu.c: Include sys/types.h and unistd.h.
10180 (options): Added --hold.
10181 (struct arguments): Added a new member "hold".
10182 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10184 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10185 cleared by a debugger, if it is not zero.
10187 * include/grub/normal.h (grub_command_execute): Add an argument
10190 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
10192 * DISTLIST: Added include/grub/i386/pc/vbe.h.
10194 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
10196 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10197 program with another one, because the old one didn't detect a bug
10198 in gcc-3.4. Always use regparm 2, because the new test is still
10199 not enough for gcc-4.0. Someone must investigate a simple test
10200 case which detects a bug in gcc-4.0.
10202 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
10204 * DISTLIST: Added normal/completion.c.
10206 * normal/completion.c: New file.
10208 * term/i386/pc/console.c (grub_console_getwh): New function.
10209 (grub_console_term): Assign grub_console_getwh to getwh.
10211 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10212 function is defined in normal/completion.c as
10213 grub_normal_do_completion.
10214 (grub_cmdline_get): Use grub_normal_do_completion instead of
10217 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10218 returns non-zero, otherwise return 0.
10219 (grub_partition_iterate): First, probe the partition map. Then,
10220 call ITERATE only for this partition map.
10222 * kern/misc.c (grub_strncmp): Rewritten.
10224 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10225 returns non-zero. Otherwise return 0.
10227 * include/grub/partition.h (grub_partition_map_iterate): Return
10228 int instead of void.
10230 * include/grub/normal.h (grub_normal_do_completion): New prototype.
10232 * include/grub/misc.h (grub_strncmp): Change the type of N to
10235 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10238 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
10239 unsigned explicitly before comparing it with I.
10241 * kern/main.c (grub_env_write_root): Add the attribute unused into
10244 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10245 normal/completion.c.
10246 (normal_mod_SOURCES): Likewise.
10247 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10248 (normal_mod_SOURCES): Likewise.
10250 * normal/command.c (grub_iterate_commands): If ITERATE returns
10251 non-zero, return one immediately.
10253 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
10255 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10256 * kern/i386/pc/startup.S: Updated Global Descriptor table's
10258 (grub_vbe_get_controller_info): New function.
10259 (grub_vbe_get_mode_info): Likewise.
10260 (grub_vbe_set_mode): Likewise.
10261 (grub_vbe_get_mode): Likewise.
10262 (grub_vbe_set_memory_window): Likewise.
10263 (grub_vbe_get_memory_window): Likewise.
10264 (grub_vbe_set_scanline_length): Likewise.
10265 (grub_vbe_get_scanline_length): Likewise.
10266 (grub_vbe_set_display_start): Likewise.
10267 (grub_vbe_get_display_start): Likewise.
10268 (grub_vbe_set_palette_data): Likewise.
10269 * include/grub/i386/pc/vbe.h: New file.
10271 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10273 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10274 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10275 * DISTLIST: Likewise.
10276 * kern/ieee1275/of.c: Moved to ...
10277 * kern/ieee1275/ieee1275.c: ... here.
10279 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10281 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10282 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
10283 Pass 0 as `end' parameter to grub_strtoul().
10285 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10287 * include/grub/powerpc/ieee1275/console.h: Do not include
10288 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
10290 (grub_console_cur_color): Remove i386-specific prototype.
10291 (grub_console_real_putchar): Likewise.
10292 (grub_console_checkkey): Likewise.
10293 (grub_console_getkey): Likewise.
10294 (grub_console_getxy): Likewise.
10295 (grub_console_gotoxy): Likewise.
10296 (grub_console_cls): Likewise.
10297 (grub_console_setcursor): Likewise.
10298 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
10299 Include <grub/machine/console.h>.
10300 * term/ieee1275/ofconsole.c: Likewise.
10302 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
10304 * Makefile.in (LIBLZO): New variable.
10306 * configure.ac: Check for LZO version 2.
10308 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
10309 lzo/lzo1x.h instead of lzo1x.h.
10311 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
10314 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
10315 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
10317 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
10318 copying the data from PARTITION to P.
10320 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10322 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
10323 negative, unload the module.
10325 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
10326 map is "pc_partition_map" but not "pc".
10327 (usage): Fix the description. The options are --boot-image and
10328 --core-image but not --boot-file or --core-file.
10329 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
10330 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
10333 * util/i386/pc/grub-install.in: Do not specify --boot-file or
10334 --core-file. Specify INSTALL_DEVICE as an argument.
10336 * util/console.c: Include config.h.
10337 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
10338 [HAVE_NCURSES_H]: Include ncurses.h.
10339 [HAVE_CURSES_H]: Include curses.h.
10340 [!A_NORMAL] (A_NORMAL): Defined as zero.
10341 [!A_STANDOUT] (A_STANDOUT): Likewise.
10343 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
10345 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
10347 * configure.ac: Check for curses libraries and headers.
10349 * Makefile.in (LIBCURSES): New variable.
10351 * genmk.rb (Script::rule): Set the executable bits.
10353 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
10354 name of the PC partition map is "pc_partition_map" but not "pc".
10356 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10358 * util/i386/pc/grub-install.in (grub_probefs): New variable.
10359 (modules): Likewise.
10360 (usage): Added descriptions for --modules and --grub-probefs.
10361 Handle --modules and --grub-probefs. Save the arguments in MODULES
10362 and GRUB_PROBEFS, respectively.
10363 Auto-detect a filesystem module against GRUBDIR. If the result is
10364 empty and modules are not specified explicitly, abort the
10365 installation. Add the result to MODULES.
10367 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
10368 disk/powerpc/ieee1275/ofdisk.c,
10369 include/grub/powerpc/ieee1275/init.h and
10370 term/powerpc/ieee1275/ofconsole.c.
10371 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
10372 term/ieee1275/ofconsole.c.
10374 * include/grub/powerpc/ieee1275/console.h: Resurrected.
10376 * COPYING: Upgraded to the latest version. Only the address of the
10377 FSF office has changed.
10379 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10381 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10382 kern/ieee1275.c with kern/ieee1275/of.c.
10384 * kern/ieee1275.c: Moved to ...
10385 * kern/ieee1275/of.c: ... here.
10387 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
10389 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
10392 * config.guess: Updated to the latest version from gnulib.
10393 * config.sub: Likewise.
10394 * install.sh: Likewise.
10395 * mkinstalldirs: Likewise.
10397 * include/grub/console.h: Removed. This file is arch-specific. Do
10398 not put this in include/grub.
10400 * include/grub/i386/pc/console.h: Resurrected.
10402 * util/console.c: Include grub/machine/console.h instead of
10404 * util/grub-emu.c: Likewise.
10406 2005-08-04 Marco Gerards <metgerards@student.han.nl>
10408 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10411 From Vincent Pelletier <subdino2004@yahoo.fr>
10412 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10413 Redefined to use grub_getwh.
10414 (grub_term): New member named getwh.
10415 (grub_getwh): New prototype.
10416 * kern/term.c (grub_getwh): New function.
10417 * term/i386/pc/console.c (grub_console_getwh): New function.
10418 (grub_console_term): New member `getwh'.
10419 * term/i386/pc/vga.c (grub_vga_getwh): New function.
10420 (grub_vga_term): New member `getwh'.
10421 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10423 (grub_ofconsole_getw): New function.
10424 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10425 (grub_ofconsole_term): New field named getwh and new initial
10428 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
10430 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10431 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
10432 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10433 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10434 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10435 of <grub/machine/ieee1275.h>.
10436 * commands/ieee1275/reboot.c: Likewise.
10437 * boot/powerpc/ieee1275/ieee1275.c: Move ...
10438 * kern/ieee1275.c: ... to here. All users updated. Change all
10439 parameter structs to use new type `grub_ieee1275_cell_t'.
10440 * term/powerpc/ieee1275/ofconsole.c: Move ...
10441 * term/ieee1275/ofconsole.c: ... to here. All users updated.
10442 * disk/powerpc/ieee1275/ofdisk.c: Move ...
10443 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
10444 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10446 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10447 Remove unused prototypes. All users updated.
10448 * include/grub/powerpc/ieee1275/console.h: Removed.
10449 * include/grub/powerpc/ieee1275/ieee1275.h: Define
10450 `grub_ieee1275_cell_t'.
10451 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10452 Cast comparisons with -1 to the correct type.
10453 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10454 type to match `grub_ieee1275_entry_fn'.
10456 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
10458 * DISTLIST: Added util/i386/pc/grub-probefs.c.
10460 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10461 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10463 (grub_probefs_SOURCES): New variable.
10465 * util/i386/pc/grub-probefs.c: New file.
10467 * util/i386/pc/grub-setup.c (main): Call
10468 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10469 grub_hfs_init and grub_jfs_init to initialize the system. Call
10470 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10471 grub_pc_partition_map_fini to finish the system.
10473 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
10475 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10477 (grub_multiboot_load_elf32): Likewise.
10478 (grub_multiboot_is_elf64): Likewise.
10479 (grub_multiboot_load_elf64): Likewise.
10480 (grub_multiboot_load_elf): Likewise.
10481 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10482 an ELF32 or ELF64 file.
10483 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10485 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10486 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10487 NULL before calling FS->LABEL.
10488 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10489 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10490 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10491 before calling FS->LABEL.
10493 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
10495 * util/i386/pc/grub-install.in (datadir): New variable.
10497 (pkgdatadir): New variable.
10498 (pkglibdir): Removed.
10500 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
10502 * DISTLIST: Added util/i386/pc/grub-install.in.
10504 * util/i386/pc/grub-install.in: New file.
10506 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10507 (grub_install_SOURCES): Likewise.
10509 * genmk.rb: Added support for scripts.
10510 (Script): New class.
10511 (scripts): New variable.
10513 * Makefile.in (install-local): Install sbin_SCRIPTS by
10515 (uninstall): Remove sbin_SCRIPTS.
10517 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10518 device, try to get a GRUB device by
10519 grub_util_biosdisk_get_grub_dev.
10522 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10523 description for --device-map.
10525 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10527 Change the semantics of variable hooks. They now return strings
10528 instead of error values.
10530 * util/i386/pc/grub-setup.c: Include grub/env.h.
10531 (setup): Use grub_device_set_root instead of grub_env_set.
10533 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10534 grub_env_get instead of grub_device_set_root and
10535 grub_device_get_root, respectively.
10537 * kern/main.c (grub_env_write_root): New function.
10538 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10539 grub_env_set instead of grub_device_set_root.
10541 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10543 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10544 rather than calling ENV->WRITE_HOOK afterwards.
10545 (grub_env_get): Return the result of ENV->READ_HOOK rather than
10546 passing a pointer of a pointer.
10547 (grub_register_variable_hook): Change the types of "read_hook" and
10548 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10550 Allocate the default empty string on the heap, because this string
10551 may be freed later.
10553 * kern/device.c: Include grub/env.h.
10554 (grub_device_set_root): Removed.
10555 (grub_device_get_root): Likewise.
10556 (grub_device_open): Use grub_env_get instead of
10557 grub_device_get_root.
10559 * include/grub/env.h (grub_env_read_hook_t): New type.
10560 (grub_env_write_hook_t): Likewise.
10561 (grub_env_var): Change the types of "read_hook" and "write_hook"
10562 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10563 (grub_register_variable_hook): Likewise.
10565 * include/grub/device.h (grub_device_set_root): Removed.
10566 (grub_device_set_root): Likewise.
10568 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10569 make sure that DIRNAME terminates with '/', so that
10570 grub_fat_find_dir will fail if PATH is not a directory.
10572 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10574 Use the qualifier auto for print_files and print_files_long.
10575 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10577 Put a newline only if there is no error.
10578 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10581 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10583 * kern/partition.c (grub_partition_probe): Initialize PART to
10584 NULL. Otherwise, when no partition map is registered, this returns
10587 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
10589 * partmap/apple.c (apple_partition_map_iterate): Check if POS
10590 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10593 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
10595 * commands/ls.c (grub_ls_list_disks): Print the filesystem
10596 information on each device, if it does not have partitions. Print
10597 "Device" instead of "Disk", because this function is not specific
10600 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10601 static to ensure that it is put on the memory rather than a
10604 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10606 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
10607 (grub_cat_init): Likewise.
10608 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
10609 (options): Likewise.
10610 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
10611 (grub_configfile_init): Likewise.
10612 * font/manager.c (GRUB_MOD_INIT): Likewise.
10613 * commands/help.c (GRUB_MOD_INIT): Likewise.
10614 (grub_help_init): Likewise.
10615 * normal/command.c (grub_command_init): Likewise.
10616 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
10617 * disk/loopback.c (grub_loop_init): Likewise.
10618 (GRUB_MOD_INIT): Likewise.
10619 * commands/ls.c (grub_ls_init): Likewise.
10620 (GRUB_MOD_INIT): Likewise.
10621 (options): Likewise.
10622 * commands/boot.c (grub_boot_init): Likewise.
10623 (GRUB_MOD_INIT): Likewise.
10624 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
10625 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
10626 (GRUB_MOD_INIT): Likewise.
10627 * commands/cmp.c (grub_cmp_init): Likewise.
10628 (GRUB_MOD_INIT): Likewise.
10630 * normal/arg.c: Use <> instead of "" to include header files.
10631 (SHORT_ARG_HELP): New macro.
10632 (SHORT_ARG_USAGE): Likewise.
10633 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
10634 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
10636 (find_short): Check if C is 'h' or 'u' explicitly.
10637 (grub_arg_show_help): Use space characters instead of tabs. Treat
10638 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
10639 are shown with --help and --usage only if they are not used for
10640 the command itself.
10641 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
10644 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
10645 const into "longarg". Change the type of "shortarg" to int.
10647 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10649 * boot/i386/pc/boot.S (boot_drive_check): New label.
10651 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
10654 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
10655 which do not pass a boot drive correctly. Copied from GRUB Legacy.
10657 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10659 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
10660 When turning off Gate A20, skip the check and return immediately,
10661 because this is not fatal usually.
10663 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10665 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
10666 be 0x7C00 instead of 0x8000.
10668 * boot/i386/pc/pxeboot.S: Rewritten.
10670 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
10672 (gate_a20_check_state): Read a byte from 0x108000. Invert the
10675 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
10677 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
10678 robustness. This routine now supports a BIOS call and System
10679 Control Port A to modify the gate A20.
10681 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10682 Increased to 0x440.
10684 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
10686 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
10687 device path and resulting ihandle.
10688 (grub_ofdisk_close): dprintf the ihandle being closed.
10689 (grub_ofdisk_read): dprintf function parameters.
10690 * kern/mm.c (grub_mm_init_region): Likewise.
10691 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
10692 (grub_linux_boot): dprintf the Linux entry point, initrd address and
10693 size, and boot arguments.
10694 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
10695 before loading into memory.
10696 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
10697 before loading into memory.
10699 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
10701 * kern/mm.c: Added much documentation.
10702 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
10703 8, set to 5 instead of 8.
10705 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
10707 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
10709 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
10710 (grub_mkdevicemap_SOURCES): New variable.
10712 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
10713 lib/device.c of GRUB Legacy.
10715 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
10717 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
10718 instead of PATH is NULL.
10720 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
10722 * commands/cmp.c (BUFFER_SIZE): New macro.
10723 (grub_cmd_cmp): Close the right file at the right time. Compare
10724 only data just read. Don't report files of different size as
10725 identical. Dynamically allocate buffers. Move variable
10726 declarations at the beginning of function.
10728 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
10730 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
10733 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
10735 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
10736 when backspace is pressed at beginning of line.
10738 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
10740 * DISTLIST: Added genfslist.sh.
10742 * normal/main.c (fs_module_list): New variable.
10743 (autoload_fs_module): New function.
10744 (read_fs_list): Likewise.
10745 (grub_normal_execute): Call read_fs_list.
10747 * kern/fs.c (grub_fs_autoload_hook): New variable.
10748 (grub_fs_probe): Added support for auto-loading.
10750 * include/grub/normal.h (struct grub_fs_module_list): New struct.
10751 (grub_fs_module_list_t): New type.
10753 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
10754 (grub_fs_autoload_hook): New prototype.
10756 * genfslist.sh: New file.
10758 * genmk.rb: Added a rule to generate a filesystem list.
10760 2005-06-30 Marco Gerards <metgerards@student.han.nl>
10762 * configure.ac: Fix the test for cross-compiling.
10764 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
10765 define GRUB_UTIL anymore.
10767 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
10768 so this function works on other systems than just big endian.
10769 (load_modules): Likewise.
10770 (add_segments): Likewise.
10772 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
10774 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
10775 contains `l' modifier, get a long from va_arg().
10777 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
10779 * kern/mm.c (grub_free): If the next free block which is being
10780 merged is the first free block, set the first block to the block
10782 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
10784 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10786 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
10787 `grub_ieee1275_chosen'.
10789 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10791 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
10792 (grub_ieee1275_chosen): New variable.
10793 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
10795 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
10796 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10797 Rename first argument to `phandle' for consistency.
10798 (grub_ieee1275_get_property_length): Likewise.
10799 (grub_ieee1275_next_property): Likewise. Change type of first argument
10800 to grub_ieee1275_phandle_t.
10801 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
10802 Move export next to declaration.
10803 (grub_ieee1275_chosen): New variable.
10804 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
10805 Correct cosmetic typo.
10806 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
10807 `grub_ieee1275_chosen'.
10808 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
10809 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
10810 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
10811 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
10812 `grub_ieee1275_chosen'.
10814 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
10816 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
10818 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
10819 /chosen/bootargs as "variable=value" pairs.
10821 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
10823 * include/grub/misc.h (grub_dprintf): New macro.
10824 (grub_real_dprintf): New prototype.
10825 (grub_strword): Likewise.
10826 (grub_iswordseparator): Likewise.
10827 * kern/misc.c (grub_real_dprintf): New function.
10828 (grub_strword): Likewise.
10829 (grub_iswordseparator): Likewise.
10831 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
10833 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
10834 (roundup): Remove macro.
10835 (grub_ieee1275_flags): Make static.
10836 (grub_ieee1275_realmode): Remove.
10837 (grub_ieee1275_test_flag): New function.
10838 (grub_ieee1275_set_flag): Likewise.
10839 (find_options): Rename to `grub_ieee1275_find_options'; update
10840 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
10841 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
10842 (cmain): New prototype.
10843 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
10844 `grub_ieee1275_flags' directly.
10845 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
10846 machine/biosdisk.h.
10847 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
10848 Don't include grub/machine/init.h.
10849 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
10850 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10852 (grub_ieee1275_realmode): Likewise.
10853 (grub_ieee1275_flag): New enum.
10854 (grub_ieee1275_test_flag): New prototype.
10855 (grub_ieee1275_set_flag): New prototype.
10856 * include/grub/powerpc/ieee1275/init.h: Remove file.
10857 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
10858 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
10859 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
10860 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
10862 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
10863 `grub_ieee1275_test_flag'.
10864 (grub_ieee1275_encode_devname): Likewise.
10866 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
10868 * include/grub/powerpc/ieee1275/ieee1275.h
10869 (grub_ieee1275_encode_devname): New prototype.
10870 (grub_ieee1275_get_filename): Likewise.
10871 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
10873 (grub_set_prefix): Likewise.
10874 (grub_machine_init): Call grub_set_prefix.
10875 * kern/powerpc/ieee1275/openfw.c: Fix typos.
10876 (grub_parse_type): New enum.
10877 (grub_ieee1275_get_devargs): New function.
10878 (grub_ieee1275_get_devname): Likewise.
10879 (grub_ieee1275_parse_args): Likewise.
10880 (grub_ieee1275_get_filename): Likewise.
10881 (grub_ieee1275_encode_devname): Likewise.
10883 2005-03-30 Marco Gerards <metgerards@student.han.nl>
10885 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
10886 `grub_loader_unset'.
10888 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
10890 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
10891 instead of grub_ieee1275_interpret.
10892 (grub_halt_init): New function.
10893 (grub_halt_fini): Likewise.
10894 (GRUB_MOD_INIT): Correct message grammar.
10895 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
10896 instead of grub_ieee1275_interpret.
10897 (grub_reboot_init): New function.
10898 (grub_reboot_fini): Likewise.
10899 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
10900 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
10901 util/i386/pc/misc.c with commands/ieee1275/halt.c,
10902 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
10903 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
10905 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
10907 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
10909 (grub_halt): Likewise.
10910 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
10911 (cmain): Remove __attribute__((unused)).
10912 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
10913 (grub_heap_len): Likewise.
10914 (grub_machine_fini): New function.
10915 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
10916 (grub_halt): Likewise.
10917 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
10919 * util/powerpc/ieee1275/misc.c: New file.
10921 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10923 * DISTLIST: New file.
10924 * gendistlist.sh: Likewise.
10926 * Makefile.in (COMMON_DISTFILES): Removed.
10927 (BOOT_DISTFILES): Likewise.
10928 (CONF_DISTFILES): Likewise.
10929 (DISK_DISTFILES): Likewise.
10930 (FS_DISTFILES): Likewise.
10931 (INCLUDE_DISTFILES): Likewise.
10932 (KERN_DISTFILES): Likewise.
10933 (LOADER_DISTFILES): Likewise.
10934 (TERM_DISTFILES): Likewise.
10935 (UTIL_DISTFILES): Likewise.
10936 (DISTFILES): Likewise.
10937 (uninstall): Uninstall files in $(pkgdata_DATA).
10938 (DISTLIST): New target.
10939 (distdir): Use the contents of the file DISTLIST to get a list of
10942 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10944 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
10945 descriptor. This is ported from GRUB Legacy.
10947 * gencmdlist.sh: Added an extra semicolon to make it work with
10948 old sed versions. Reported by Robert Bihlmeyer
10949 <robbe@orcus.priv.at>.
10951 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
10953 Automatic loading of commands is supported.
10955 * normal/main.c (read_command_list): New function.
10956 (grub_normal_execute): Call read_command_list.
10958 * normal/command.c (grub_register_command): Return zero or CMD.
10959 Allocate CMD->NAME from the heap.
10960 Initialize CMD->MODULE_NAME to zero.
10961 Find the same name as well. If the same command is found and it is
10962 a dummy command, overwrite members. If it is not a dummy command,
10964 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
10965 (grub_command_find): If a dummy command is found, load a module
10966 and retry to find a command only once.
10968 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
10969 make sure that each command is loaded.
10971 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
10973 (struct grub_command): Remove const from the member `name'.
10974 Add a new member `module_name'.
10975 (grub_register_command): Return grub_command_t.
10977 * commands/help.c (grub_cmd_help): Call grub_command_find to make
10978 sure that each command is loaded.
10980 * genmk.rb (PModule::rule): Specify a module name without the
10981 suffix ".mod" to gencmdlist.sh.
10983 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10985 * gencmdlist.sh: New file.
10987 * genmk.rb (PModule::rule): Generate a rule for a command list.
10989 Generate command.lst from $(COMMANDFILES).
10991 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
10992 (DATA): Added $(pkgdata_DATA).
10993 (install-local): Install files in $(pkgdata_DATA).
10995 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10997 * term/i386/pc/vga.c (debug_command): Removed.
10998 (GRUB_MOD_INIT): Do not register the command "debug".
11000 From Hollis Blanchard:
11001 * commands/configfile.c: New file.
11002 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11003 commands/configfile.c.
11004 (pkgdata_MODULES): Added configfile.mod.
11005 (configfile_mod_SOURCES): New variable.
11006 (configfile_mod_CFLAGS): Likewise.
11007 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11008 commands/configfile.c.
11009 (pkgdata_MODULES): Added configfile.mod.
11010 (configfile_mod_SOURCES): New variable.
11011 (configfile_mod_CFLAGS): Likewise.
11012 * util/grub-emu.c (main): Call grub_configfile_init and
11013 grub_configfile_fini.
11014 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
11016 [GRUB_UTIL] (grub_configfile_fini): Likewise.
11018 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11020 * normal/arg.c (grub_arg_show_help): Do not show the bug report
11023 * commands/help.c (grub_cmd_help): Do not print newlines after
11024 the last command in print_command_help.
11026 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
11028 * commands/default.h: New file.
11029 * commands/timeout.h: Likewise.
11030 * normal/context.c: Likewise.
11032 * util/misc.c: Do not include sys/times.h.
11033 Include sys/time.h and grub/machine/time.h.
11034 (grub_get_rtc): Rewritten with gettimeofday.
11036 * util/grub-emu.c (main): Call grub_default_init and
11037 grub_timeout_init before grub_normal_init, and call
11038 grub_timeout_fini and grub_default_fini after grub_main.
11040 * util/console.c (grub_ncurses_checkkey): Return the read
11043 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
11046 * normal/main.c (read_config_file): Push MENU. If this fails,
11047 print an error and wait for a user input.
11048 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
11049 If a menu is empty or an error occurs, pop MENU.
11050 (grub_normal_execute): Pop and free MENU after grub_menu_run
11053 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
11055 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11057 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11059 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11061 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11064 * include/grub/normal.h (struct grub_menu_list): New struct.
11065 (grub_menu_list_t): New type.
11066 (struct grub_context): New struct.
11067 (grub_context_t): New type.
11068 (grub_register_command): Got rid of EXPORT_FUNC.
11069 (grub_unregister_command): Likewise.
11070 (grub_context_get): New prototype.
11071 (grub_context_get_current_menu): Likewise.
11072 (grub_context_push_menu): Likewise.
11073 (grub_context_pop_menu): Likewise.
11074 [GRUB_UTIL] (grub_default_init): Likewise.
11075 [GRUB_UTIL] (grub_default_fini): Likewise.
11076 [GRUB_UTIL] (grub_timeout_init): Likewise.
11077 [GRUB_UTIL] (grub_timeout_fini): Likewise.
11079 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
11080 commands/timeout.c and normal/context.c.
11081 (pkgdata_MODULES): Added default.mod and timeout.mod.
11082 (normal_mod_SOURCES): Added normal/context.c.
11083 (default_mod_SOURCES): New variable.
11084 (default_mod_CFLAGS): Likewise.
11085 (timeout_mod_SOURCES): Likewise.
11086 (timeout_mod_CFLAGS): Likewise.
11087 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
11089 (pkgdata_MODULES): Added default.mod and timeout.mod.
11090 (normal_mod_SOURCES): Added normal/context.c.
11091 (default_mod_SOURCES): New variable.
11092 (default_mod_CFLAGS): Likewise.
11093 (timeout_mod_SOURCES): Likewise.
11094 (timeout_mod_CFLAGS): Likewise.
11096 * Makefile.in (all-local): Added $(MKFILES).
11098 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
11100 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
11101 (grub_emu_SOURCES): Likewise.
11102 (pkgdata_MODULES): Add `sun.mod'.
11103 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11104 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11106 (pkgdata_MODULES): Add `sun.mod'.
11107 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11108 * include/grub/partition.h (grub_sun_partition_map_init): New
11110 (grub_sun_partition_map_fini): Likewise.
11111 * partmap/sun.c: New file.
11112 * util/grub-emu.c (main): Initialize and de-initialize the sun
11113 partitionmap support.
11115 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
11117 This implements an Emacs-like menu entry editor.
11119 * normal/menu_entry.c: New file.
11121 * util/console.c (grub_ncurses_putchar): Translate some Unicode
11122 characters to ASCII.
11123 (saved_char): New variable.
11124 (grub_ncurses_checkkey): Rewritten completely.
11125 (grub_ncurses_getkey): Likewise.
11126 (grub_ncurses_init): Call raw instead of cbreak.
11128 * normal/menu.c (print_entry): Do not put a space.
11129 (init_page): Renamed to ...
11130 (grub_menu_init_page): ... this. All callers changed.
11131 (edit_menu_entry): Removed.
11132 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11134 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11136 * kern/misc.c (grub_vprintf): Call grub_refresh.
11138 * normal/menu.c (DISP_LEFT): Renamed to ...
11139 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11140 * normal/menu.c (DISP_UP): Renamed to ...
11141 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11142 * normal/menu.c (DISP_RIGHT): Renamed to ...
11143 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11144 * normal/menu.c (DISP_DOWN): Renamed to ...
11145 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11146 * normal/menu.c (DISP_HLINE): Renamed to ...
11147 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11148 * normal/menu.c (DISP_VLINE): Renamed to ...
11149 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11150 * normal/menu.c (DISP_UL): Renamed to ...
11151 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11152 * normal/menu.c (DISP_UR): Renamed to ...
11153 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11154 * normal/menu.c (DISP_LL): Renamed to ...
11155 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11156 * normal/menu.c (DISP_LR): Renamed to ...
11157 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11158 * normal/menu.c (TERM_WIDTH): Renamed to ...
11159 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11160 * normal/menu.c (TERM_HEIGHT): Renamed to ...
11161 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11162 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11163 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11164 * normal/menu.c (TERM_MARGIN): Renamed to ...
11165 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11166 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11167 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11168 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11169 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11170 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11171 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11172 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11173 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11174 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11175 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11176 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11177 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11178 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11179 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11180 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11181 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11182 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11183 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11184 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11185 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11186 All callers changed.
11188 * include/grub/normal.h: New prototype.
11190 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11191 normal/menu_entry.c.
11192 (normal_mod_SOURCES): Likewise.
11193 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11194 (normal_mod_SOURCES): Likewise.
11196 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
11198 * include/grub/normal.h (grub_halt_init): New prototype.
11199 (grub_halt_fini): Likewise.
11200 (grub_reboot_init): Likewise.
11201 (grub_reboot_fini): Likewise.
11203 * util/grub-emu.c: Include signal.h.
11204 (main_env): New global variable.
11205 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11207 (grub_machine_fini): New function.
11208 (main): Call grub_halt_init and grub_reboot_init before
11209 grub_main, and grub_reboot_fini and grub_halt_fini after it.
11210 Call setjmp with MAIN_ENV to go back afterwards.
11211 Call grub_machine_fini right before return.
11213 * include/grub/util/misc.h: Include setjmp.h.
11214 (main_env): New prototype.
11216 * include/grub/kernel.h (grub_machine_fini): New prototype.
11217 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11218 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11220 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11221 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11222 * term/i386/pc/console.c (grub_console_fini): Likewise.
11224 * util/i386/pc/misc.c: New file.
11226 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11227 util/i386/pc/misc.c, commands/i386/pc/halt.c and
11228 commands/i386/pc/reboot.c.
11230 2005-02-14 Guillem Jover <guillem@hadrons.org>
11232 * include/grub/dl.h (grub_dl_check_header): New prototype.
11233 (grub_arch_dl_check_header): Change return type to grub_err_t,
11234 remove size parameter and export function. Update all callers.
11235 * kern/dl.c (grub_dl_check_header): New function.
11236 (grub_dl_load_core): Use `grub_dl_check_header' instead of
11237 `grub_arch_dl_check_header'. Check ELF type. Check if sections
11238 are inside the core.
11239 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11240 independent ELF header checks.
11241 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11242 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11243 `grub_dl_check_header' instead of explicit checks. Check for the
11245 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11246 `grub_dl_check_header' instead of explicit checks. Remove arch
11247 specific ELF header checks.
11249 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11252 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
11254 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11255 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11257 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
11259 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
11260 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
11261 (part_map_iterate): Clear `grub_errno' and return 0 if
11262 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
11263 * partmap/amiga.c (amiga_partition_map_iterate): Return
11264 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11265 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11267 2005-02-01 Guillem Jover <guillem@hadrons.org>
11269 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11272 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11274 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11276 (grub_rescue_cmd_linux): New prototype.
11277 (grub_rescue_cmd_initrd): Likewise.
11278 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11280 (grub_linux_release_mem): Release the memory for the initrd.
11281 (grub_load_linux): Renamed from this...
11282 (grub_rescue_cmd_linux): ...To this. Changed all callers.
11283 Changed `entry' not to be static. Loop over memory regions to
11284 find another one when the default fails.
11285 (grub_rescue_cmd_initrd): New function.
11286 (grub_linux_init): Remove function.
11287 (grub_linux_fini): Likewise.
11288 (GRUB_MOD_INIT): Register `initrd'.
11289 (GRUB_MOD_FINI): Unregister `initrd'.
11290 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
11292 (grub_linux_normal_fini): Likewise.
11293 (GRUB_MOD_INIT): Register `initrd'.
11294 (GRUB_MOD_FINI): Unregister `initrd'.
11296 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11298 * commands/help.c: New file.
11299 * normal/arg.c (show_help): Renamed to...
11300 (grub_arg_show_help): ... this.
11301 * commands/i386/pc/halt.c: New file.
11302 * commands/i386/pc/reboot.c: Likewise.
11303 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
11304 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
11305 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
11306 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
11308 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11310 (pkgdata_MODULES): Add `help.mod'.
11311 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
11312 * grub/i386/pc/init.h (grub_reboot): New prototype.
11313 (grub_halt): Likewise.
11314 * include/grub/normal.h (grub_arg_show_help): New prototype.
11315 (grub_help_init): Likewise.
11316 (grub_help_fini): Likewise.
11317 * util/grub-emu.c (main): Initialize and deinitialize the help
11320 * normal/cmdline.c (grub_cmdline_get): Doc fix.
11322 * normal/command.c (grub_command_init): Fixed the description of
11323 the `set' and `unset' commands.
11325 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11327 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
11329 * commands/ieee1275/halt.c: New file.
11330 * commands/ieee1275/reboot.c: Likewise.
11331 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
11332 `__attribute__ ((unused))'. Some GCS related fixed.
11333 (grub_suspend_init) [GRUB_UTIL]: Function removed.
11334 (grub_suspend_fini): Likewise.
11335 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
11337 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
11338 (halt_mod_CFLAGS): New variables.
11339 * include/grub/powerpc/ieee1275/ieee1275.h
11340 (grub_ieee1275_interpret): New prototype.
11342 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
11344 * include/grub/misc.h (memmove): New prototype.
11345 (memcpy): Likewise.
11347 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
11349 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
11350 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
11352 2005-01-22 Marco Gerards <metgerards@student.han.nl>
11354 * kern/misc.c (grub_strndup): Function rewritten.
11356 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
11358 * normal/menu.c (TERM_WIDTH): Macro redefined.
11359 (TERM_TOP_BORDER_Y): Likewise.
11360 (draw_border): Replaced while-loop by a for-loop. Make the number
11361 of lines consistent with the number of lines displayed in
11362 print_entries. Added a margin below the rectangle.
11363 (print_entry): Make the entry fit in the rectangle.
11364 (print_entries): Display the scroll arrows next to the right
11367 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11369 * fs/minix.c (grub_minix_find_file): Reserve more space for
11370 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
11371 `grub_strncpy' to copy `path' into it.
11373 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11375 Add the loopback device, a device via which files can be accessed
11378 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
11379 (pkgdata_MODULES): Add loopback.mod.
11380 (loopback_mod_SOURCES): New variable.
11381 (loopback_mod_CFLAGS): Likewise.
11382 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11384 (pkgdata_MODULES): Add loopback.mod.
11385 (loopback_mod_SOURCES): New variable.
11386 (loopback_mod_CFLAGS): Likewise.
11387 * disk/loopback.c: new file.
11388 * include/grub/normal.h (grub_loop_init): New prototype.
11389 (grub_loop_fini): New prototype.
11390 * util/grub-emu.c (main): Initialize and de-initialize loopback
11392 * include/grub/disk.h (grub_disk_dev_id): Add
11393 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
11395 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
11397 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
11399 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
11400 (suspend_mod_SOURCES): New variable.
11401 (suspend_mod_CFLAGS): Likewise.
11402 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
11404 * commands/ieee1275/suspend.c: New file.
11406 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11408 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
11409 ((unused))' to `__attribute__ ((used))'.
11410 (GRUB_MOD_FINI): Likewise.
11411 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11412 * genmk.rb (PModule): Assign space to common symbols when linking
11415 2005-01-20 Marco Gerards <metgerards@student.han.nl>
11417 * include/grub/mm.h (grub_mm_init_region): Change the type of the
11418 `unsigned' arguments to `grub_size_t'.
11419 (grub_malloc): Likewise.
11420 (grub_realloc): Likewise.
11421 (grub_memalign): Likewise.
11422 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11423 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11424 * util/misc.c (grub_malloc): Likewise.
11425 (grub_realloc): Likewise.
11426 * kern/mm.c (get_header_from_pointer): Change the casts to
11427 `unsigned' into a cast to `grub_size_t'.
11429 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11430 point to `currnode' when `currnode' is changed.
11432 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
11433 Schottelius <nico-linux@schottelius.org>.
11435 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
11437 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11438 (note_path): Remove variable.
11439 (GRUB_IEEE1275_NOTE_NAME): New macro.
11440 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11441 (grub_ieee1275_note_hdr): New structure.
11442 (grub_ieee1275_note_desc): Likewise.
11443 (grub_ieee1275_note): Likewise.
11444 (load_note): Remove `dir' argument. All callers updated. Remove
11445 `note_img' and `path'. Do not load a file from `note_path'.
11446 Initialize a struct grub_ieee1275_note and write that to `out'.
11447 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11449 2005-01-05 Marco Gerards <metgerards@student.han.nl>
11451 * util/misc.c (grub_util_read_image): Revert last change. It
11452 called `grub_util_read_at', which seeks from the beginning of the
11455 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
11457 * TODO: Add note about endianness in grub-mkimage.
11458 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11460 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11461 (grub_mkimage_SOURCES): New target.
11462 * include/grub/kernel.h (grub_start_addr): Remove variable.
11463 (grub_end_addr): Likewise.
11464 (grub_total_module_size): Likewise.
11465 (grub_kernel_image_size): Likewise.
11466 (GRUB_MODULE_MAGIC): New constant.
11467 (grub_module_info): New structure.
11468 (grub_arch_modules_addr): New prototype.
11469 (grub_get_end_addr): Remove prototype.
11470 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11471 * include/grub/powerpc/ieee1275/kernel.h: New file.
11472 * include/grub/util/misc.h (grub_util_get_fp_size): New
11474 (grub_util_read_at): Likewise.
11475 (grub_util_write_image_at): Likewise.
11476 * kern/main.c (grub_get_end_addr): Remove function.
11477 (grub_load_modules): Call grub_arch_modules_addr instead of using
11478 grub_end_addr. Look for a grub_module_info struct in memory. Use
11479 the grub_module_info fields instead of calling grub_get_end_addr
11480 as loop conditions. Move grub_add_unused_region code here.
11481 (grub_add_unused_region): Remove function.
11482 * kern/i386/pc/init.c: Include grub/cache.h.
11483 (grub_machine_init): Remove call to grub_get_end_addr. Remove
11484 one call to add_mem_region.
11485 (grub_arch_modules_addr): New function.
11486 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11487 (grub_total_module_size): Likewise.
11488 Include grub/machine/kernel.h.
11489 (grub_arch_modules_addr): New function.
11490 * util/grub-emu.c (grub_end_addr): Remove variable.
11491 (grub_total_module_size): Likewise.
11492 (grub_arch_modules_addr): New function.
11493 * util/misc.c: Include unistd.h.
11494 (grub_util_get_fp_size): New function.
11495 (grub_util_read_at): Likewise.
11496 (grub_util_write_image_at): Likewise.
11497 (grub_util_read_image): Call grub_util_read_at.
11498 (grub_util_write_image): Call grub_util_write_image_at.
11499 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11500 additional memory in kernel_img for a struct grub_module_info.
11501 Fill in that grub_module_info.
11502 * util/powerpc/ieee1275/grub-mkimage.c: New file.
11504 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11506 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11508 * include/grub/powerpc/ieee1275/ieee1275.h
11509 (grub_ieee1275_milliseconds): New prototype.
11510 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11512 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11513 grub_ieee1275_milliseconds.
11515 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11517 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11519 (find_options): New function.
11520 (cmain): Call find_options.
11521 * include/grub/powerpc/ieee1275/ieee1275.h
11522 (grub_ieee1275_realmode): New extern variable.
11523 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11524 grub_map if grub_ieee1275_realmode is false.
11526 2004-12-29 Marco Gerards <metgerards@student.han.nl>
11528 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11529 lines are inserted and make it work like readline. Reported by
11530 Vincent Pelletier <subdino2004@yahoo.fr>.
11532 2004-12-28 Marco Gerards <metgerards@student.han.nl>
11534 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11536 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11537 `kern/powerpc/cache.S'.
11539 2004-12-27 Marco Gerards <metgerards@student.han.nl>
11541 * genmk.rb: Handle the `Program' class in the main loop. Written
11542 by Johan Rydberg <jrydberg@gnu.org>.
11543 (Program): New class.
11544 (programs): New variable.
11545 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11546 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
11547 instead of "grub/kernel.h". Include <grub/machine/init.h>.
11548 (help_arch): Function removed.
11549 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11550 `powerpc/libgcc.h' and `loader.h'.
11551 (pkgdata_PROGRAMS): New variable.
11552 (sbin_UTILITIES): Variable removed.
11553 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11554 (grubof_SOURCES): Variable re-defined so it only includes the
11555 core functionality.
11556 (grubof_CFLAGS): Remove `-DGRUBOF'.
11557 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11558 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11559 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11560 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11561 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11562 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11563 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11564 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11565 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11566 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11567 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11568 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11569 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11570 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11571 (pc_mod_CFLAGS): New variables.
11572 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11573 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11574 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11575 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11577 * include/grub/i386/pc/init.h (grub_os_area_addr)
11578 (rub_os_area_size): ... to here.
11579 * include/grub/powerpc/ieee1275/ieee1275.h
11580 (grub_ieee1275_entry_fn): Export symbol.
11581 * include/grub/powerpc/ieee1275/init.h: New file.
11582 * include/grub/powerpc/libgcc.h: Likewise.
11583 * include/grub/cache.h: Likewise.
11584 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
11585 <hollis@penguinppc.org>.
11586 * kern/dl.c: Include <grub/cache.h>.
11587 (grub_dl_flush_cache): New function.
11588 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11590 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11591 (grub_console_init): Removed prototypes.
11592 (grub_machine_init): Don't initialize the modules anymore.
11593 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11595 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11596 Macro undef removed.
11597 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11598 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11599 relocation `R_PPC_REL32'. Return an error when the relocation is
11601 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11602 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11603 * util/misc.c (grub_arch_sync_caches): Likewise.
11605 2004-12-19 Marco Gerards <metgerards@student.han.nl>
11607 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
11608 `symlist.c', add `grubof_symlist.c'.
11609 (symlist.c): Variable removed.
11610 (grubof_HEADERS): Variable added.
11611 (grubof_symlist.c): New target.
11612 (kernel_syms.lst): Use `grubof_HEADERS' instead of
11613 `kernel_img_HEADERS'.
11614 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
11615 * kern/powerpc/dl.c: New file.
11616 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
11618 (grub_arch_dl_relocate_symbols): Likewise.
11619 (grub_register_exported_symbols): Likewise.
11621 2004-12-13 Marco Gerards <metgerards@student.han.nl>
11623 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
11624 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
11625 to fail instead. Reported by Vincent Pelletier
11626 <subdino2004@yahoo.fr>.
11628 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
11629 it is not allocated. Reported by Vincent Pelletier
11630 <subdino2004@yahoo.fr>.
11632 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
11633 output so the output looks better.
11635 2004-12-04 Marco Gerards <metgerards@student.han.nl>
11637 Modulize the partition map support and add support for the amiga
11640 * commands/ls.c: Include <grub/partition.h> instead of
11641 <grub/machine/partition.h>.
11642 * kern/disk.c: Likewise.
11643 * kern/rescue.c: Likewise.
11644 * loader/i386/pc/chainloader.c: Likewise.
11645 * normal/cmdline.c: Likewise.
11646 * kern/powerpc/ieee1275/init.c: Likewise.
11647 (grub_machine_init): Call `grub_pc_partition_map_init',
11648 `grub_amiga_partition_map_init' and
11649 `grub_apple_partition_map_init'.
11650 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
11651 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
11652 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
11653 `partition.h' and `pc_partition.h'.
11654 (grub_setup_SOURCES): Remove
11655 `disk/i386/pc/partition.c'. Add `kern/partition.c',
11656 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11657 (grub_emu_SOURCES): Likewise.
11658 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
11659 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
11660 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
11661 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11662 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
11663 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11664 (grubof_SOURCES): Likewise.
11665 * disk/i386/pc/partition.c: File removed.
11666 * disk/powerpc/ieee1275/partition.c: Likewise.
11667 * include/grub/powerpc/ieee1275/partition.h: Likewise.
11668 * include/grub/i386/pc/partition.h: Likewise.
11669 * kern/partition.c: New file.
11670 * partmap/amiga.c: Likewise.
11671 * partmap/apple.c: Likewise.
11672 * partmap/pc.c: Likewise.
11673 * include/grub/partition.h: Likewise..
11674 * include/grub/pc_partition.h: Likewise.
11675 * util/grub-emu.c: Include <grub/partition.h> instead of
11676 <grub/machine/partition.h>.
11677 (main): Call `grub_pc_partition_map_init',
11678 `grub_amiga_partition_map_init' and
11679 `grub_apple_partition_map_init' and deinitialize afterwards.
11680 * util/i386/pc/biosdisk.c: Include `#include
11681 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11682 `<grub/machine/partition.h>'.
11683 * util/i386/pc/grub-setup.c: Likewise.
11684 * util/i386/pc/biosdisk.c: Likewise.
11685 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
11686 partition information in case of a PC partition.
11687 * util/i386/pc/grub-setup.c: Include `#include
11688 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11689 `<grub/machine/partition.h>'.
11690 (setup): Only access the PC specific partition information in case
11693 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
11695 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
11696 (grub_longjmp): Likewise.
11697 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
11699 * normal/powerpc/setjmp.S: New file.
11700 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11701 `normal/powerpc/setjmp.S'.
11702 (grubof_CFLAGS): Add `-DGRUBOF'.
11703 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
11704 [GRUB_UTIL && !GRUBOF].
11706 2004-11-16 Marco Gerards <metgerards@student.han.nl>
11708 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
11709 property named `name'. Correctly handle the error returned by
11710 `grub_ieee1275_finddevice' if a device can not be opened.
11712 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
11714 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
11715 `actual' for negativity.
11716 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11719 2004-11-01 Marco Gerards <metgerards@student.han.nl>
11721 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
11722 (PAGE_OFFSET): New macro.
11723 (CRTC_ADDR_PORT): Likewise.
11724 (CRTC_DATA_PORT): Likewise.
11725 (START_ADDR_HIGH_REGISTER): Likewise.
11726 (START_ADDR_LOW_REGISTER): Likewise.
11727 (GRAPHICS_ADDR_PORT): Likewise.
11728 (GRAPHICS_DATA_PORT): Likewise.
11729 (READ_MAP_REGISTER): Likewise.
11730 (INPUT_STATUS1_REGISTER): Likewise.
11731 (INPUT_STATUS1_VERTR_BIT): Likewise.
11732 (page): New variable.
11733 (wait_vretrace): New function.
11734 (set_read_map): Likewise.
11735 (set_start_address): Likewise.
11736 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
11738 (check_vga_mem): Take the page into account.
11739 (write_char): Likewise.
11740 (write_cursor): Likewise.
11741 (scroll_up): Likewise. Copy the page to the page that is not
11742 shown and switch between both pages.
11743 (grub_vga_putchar): Fix off by one error.
11744 (grub_vga_cls): Wait for the vertical retrace. Take the page into
11747 2004-11-01 Marco Gerards <metgerards@student.han.nl>
11749 Add support for iso9660 (including rockridge).
11751 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11752 (iso9660_mod_SOURCES): New variable.
11753 (iso9660_mod_CFLAGS): Likewise.
11754 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11755 * include/grub/fs.h (grub_iso9660_init): New prototype.
11756 * util/grub-emu.c (main): Call `grub_iso9660_init'.
11757 * fs/iso9660.c: New file.
11759 * include/grub/misc.h (grub_strncat): New prototype.
11760 * kern/misc.c (grub_strncat): New function.
11762 * fs/hfs.c (grub_hfs_mount): Translate the error
11763 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
11764 * fs/jfs.c (grub_jfs_mount): Likewise.
11765 * fs/ufs.c (grub_ufs_mount): Likewise.
11767 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
11769 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
11770 which initialized BAT registers.
11771 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
11772 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11774 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
11775 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11777 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
11778 (grub_mapclaim): Likewise.
11779 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
11780 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
11783 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
11785 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
11786 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
11787 -ffreestanding and -msoft-float.
11789 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
11791 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
11792 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
11793 set in grub_ieee1275_flags.
11795 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
11797 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
11799 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
11800 grub_console_init first.
11801 Change the memory range used for grub_ieee1275_claim and
11802 grub_mm_init_region.
11803 Print an error message if the claim fails.
11804 Include <grub/misc.h>.
11806 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
11808 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
11809 Call grub_children_iterate for device nodes of type `scsi',
11811 (grub_ofdisk_open): Remove manual device alias resolution.
11812 Fix memory leak when device cannot be opened.
11813 * include/grub/powerpc/ieee1275/ieee1275.h
11814 (grub_children_iterate): New prototype.
11815 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
11817 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11818 Return -1 if args.size was -1.
11820 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11822 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
11823 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
11824 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
11825 Open Firmware's memory for it; claim memory from _start to _end.
11826 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
11827 (_end): New extern.
11828 (_start): Zero BSS from __bss_start to _end.
11829 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11831 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
11833 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11835 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
11836 -1 if args.base was -1.
11838 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
11840 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
11841 escape sequence instead of a literal ^L. Also call
11842 grub_ofconsole_gotoxy.
11844 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
11846 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
11847 void * arguments to grub_addr_t. All callers updated. Also make
11848 the `result' argument optional.
11849 (grub_ieee1275_release): change void * arguments to grub_addr_t.
11850 All callers updated.
11852 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
11854 * commands/ls.c (grub_ls_list_files): Use the string following the
11855 initial ')', if present, as the filesystem path.
11856 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
11858 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
11860 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
11862 Make the source code of the menu interface more readable.
11864 * normal/menu.c: Include grub/mm.h.
11865 (TERM_WIDTH): New macro.
11866 (TERM_HEIGHT): Likewise.
11867 (TERM_INFO_HEIGHT): Likewise.
11868 (TERM_MARGIN): Likewise.
11869 (TERM_SCROLL_WIDTH): Likewise.
11870 (TERM_TOP_BORDER_Y): Likewise.
11871 (TERM_LEFT_BORDER_X): Likewise.
11872 (TERM_BORDER_WIDTH): Likewise.
11873 (TERM_MESSAGE_HEIGHT): Likewise.
11874 (TERM_BORDER_HEIGHT): Likewise.
11875 (TERM_NUM_ENTRIES): Likewise.
11876 (TERM_FIRST_ENTRY_Y): Likewise.
11877 (TERM_ENTRY_WIDTH): Likewise.
11878 (TERM_CURSOR_X): Likewise.
11879 (draw_border): Use macros instead of magic numbers.
11880 (print_entry): Likewise.
11881 (print_entries): Likewise.
11882 (run_menu): Likewise. Also, handle the key 'e'.
11883 (run_menu_entry): Ignore empty command lines.
11884 (print_message): Added a new argument EDIT. If EDIT is true,
11885 print a different message.
11886 (init_page): Likewise.
11887 (edit_menu_entry): New function. Not implemented yet.
11889 2004-09-17 Marco Gerards <metgerards@student.han.nl>
11891 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
11892 can be loaded from normal mode.
11894 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
11896 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
11897 (multiboot_mod_CFLAGS): New variables.
11898 * loader/i386/pc/linux_normal.c: New file.
11899 * loader/i386/pc/multiboot_normal.c: Likewise.
11901 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
11902 attribute `unused'.
11904 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
11905 `fdiro' to read the mode information from instead of `diro'.
11907 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
11908 looking up a symlink.
11910 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
11912 * normal/command.c (grub_command_execute): Don't parse the
11913 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
11914 flags of the command.
11916 * normal/menu.c (grub_menu_run): Fix typo.
11918 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
11920 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
11922 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
11923 `y + 1' instead of `y - 1'.
11925 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
11927 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
11929 From Hollis Blanchard <hollis@penguinppc.org>:
11930 * kern/misc.c (memmove): New alias for grub_memmove.
11931 (memcmp): New alias for grub_memcmp.
11932 (memset): New alias for grub_memset.
11933 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11934 Change "int handle" to "grub_ieee1275_phandle_t handle".
11935 * include/grub/powerpc/ieee1275/ieee1275.h
11936 (grub_ieee1275_get_property): Likewise.
11938 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
11940 Added normal mode command `chainloader' as module chain.mod, which
11941 depends on normal.mod and _chain.mod.
11943 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
11944 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
11945 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
11947 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
11948 but arguments parsing moved to ...
11949 (grub_chainloader_cmd): ... here. New function.
11950 * include/grub/i386/pc/chainloader.h: New file.
11951 * loader/i386/pc/chainloader_normal.c: Likewise.
11953 2004-09-11 Marco Gerards <metgerards@student.han.nl>
11955 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
11956 (grub_mkimage_LDFLAGS): Likewise.
11957 (grub_emu_SOURCES): Likewise.
11958 (kernel_img_HEADERS): Added fshelp.h.
11959 * fs/ext2.c: Include <grub/fshelp.h>.
11960 (FILETYPE_REG): New macro.
11961 (FILETYPE_INO_REG): Likewise.
11962 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
11964 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
11966 (grub_fshelp_node): New struct.
11967 (grub_ext2_data): Added member `diropen'. Changed member `inode'
11969 (grub_ext2_get_file_block): Removed function.
11970 (grub_ext2_read_block): New function.
11971 (grub_ext2_read_file): Replaced parameter `data' by `node'.
11972 This function was written.
11973 (grub_ext2_mount): Read the root inode. Create a diropen struct.
11974 (grub_ext2_find_file): Removed function.
11975 (grub_ext2_read_symlink): New function.
11976 (grub_ext2_iterate_dir): Likewise.
11977 (grub_ext2_open): Rewritten.
11978 (grub_ext2_dir): Rewritten.
11979 * include/grub/fshelp.h: New file.
11980 * fs/fshelp.c: Likewise.
11982 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
11984 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
11985 (print_message): Add a missing newline.
11986 (run_menu): Added timeout support.
11987 (run_menu_entry): New local function.
11988 (grub_menu_run): Added support for booting.
11990 * kern/loader.c (grub_loader_is_loaded): New function.
11992 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
11993 (grub_get_rtc): Exported.
11995 * include/grub/i386/pc/time.h: Include grub/symbol.h.
11996 (grub_get_rtc): Exported.
11998 * include/grub/normal.h (struct grub_command_list): Remove
11999 constant from the member `command'.
12001 * include/grub/loader.h (grub_loader_is_loaded): Declared.
12003 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
12005 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
12007 2004-08-28 Marco Gerards <metgerards@student.han.nl>
12009 Add support for the JFS filesystem.
12011 * fs/jfs.c: New file.
12012 * include/grub/fs.h (grub_jfs_init): New prototype.
12013 (grub_jfs_fini): New prototype.
12014 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
12015 (grub_emu_SOURCES): Likewise.
12016 (pkgdata_MODULES): Add jfs.mod.
12017 (jfs_mod_SOURCES): New variable.
12018 (jfs_mod_CFLAGS): Likewise.
12019 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
12020 (grubof_SOURCES): Likewise.
12021 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
12023 * fs/fat.c (grub_fat_find_dir): Convert the filename little
12024 endian to the host endian.
12025 (grub_fat_utf16_to_utf8): Move function from there...
12026 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
12027 the endianness of the source string anymore.
12028 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
12030 2004-08-24 Marco Gerards <metgerards@student.han.nl>
12032 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
12033 (grub_boot_fini) [GRUB_UTIL]: Likewise.
12034 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
12035 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
12037 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
12038 (grub_hfs_iterate_dir): Make the function static. Add prototypes
12039 for `node_found' and `it_dir'.
12040 (grub_hfs_dir): Add prototype for `dir_hook'.
12042 * fs/minix.c (grub_minix_get_file_block): Add prototype for
12043 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
12044 and `indir32' to silence a gcc warning.
12046 * include/grub/fs.h (grub_hfs_init): New prototype.
12047 (grub_hfs_fini): Likewise.
12050 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12052 Each disk device has its own id now. This is useful to make use
12053 of multiple disk devices.
12055 * include/grub/disk.h (grub_disk_dev_id): New enum.
12056 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12057 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12059 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12060 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12062 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12063 GRUB_DISK_DEVICE_OFDISK_ID as an id.
12065 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
12066 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12068 * include/grub/disk.h (struct grub_disk_dev): Added a new member
12069 "id" which is used by the cache manager.
12071 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
12074 2004-08-18 Marco Gerards <metgerards@student.han.nl>
12076 * fs/hfs.c: New file.
12077 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
12078 (grub_emu_SOURCES): Likewise.
12079 (pkgdata_MODULES): Add hfs.mod.
12080 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
12081 (grubof_SOURCES): Likewise.
12082 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
12084 * include/grub/misc.h (grub_strncasecmp): Add prototype.
12085 * kern/misc.c (grub_strncasecmp): Add function.
12087 2004-08-14 Marco Gerards <metgerards@student.han.nl>
12089 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
12092 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
12093 (grub_ext2_dir): In case the directory entry type is unknown, read
12096 2004-08-02 Peter Bruin <pjbruin@dds.nl>
12098 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
12099 grub_load_linux instead of grub_rescue_cmd_linux as second
12100 argument of grub_rescue_register_command.
12102 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12104 2004-07-27 Marco Gerards <metgerards@student.han.nl>
12106 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12108 * commands/boot.c: Remove the check for `GRUB_UTIL'.
12109 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12110 `loader/powerpc/ieee1275/linux.c',
12111 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12112 * include/grub/powerpc/ieee1275/ieee1275.h
12113 (grub_ieee1275_release): New prototype.
12114 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12115 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12116 normal, boot, linux and linux_normal.
12117 * loader/powerpc/ieee1275/linux.c: New file.
12118 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12120 2004-07-12 Marco Gerards <metgerards@student.han.nl>
12122 * normal/arg.c (grub_arg_parse): Correct error handling after
12123 reallocating the argumentlist (check if `argl' is not null instead
12124 of checking if `args' is not null).
12125 * kern/mm.c (grub_realloc): Return the same pointer when using the
12126 same region, instead of returning the header address.
12128 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12130 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12131 one block instead of two when looking for the initial partition.
12132 (grub_partition_probe): Initialize the local variable `p' with 0.
12133 Use base 10 for the grub_strtoul call.
12134 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
12135 need for one local variable.
12136 (grub_strtoul): Don't add the new value to `num', instead of that
12139 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12141 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12142 (pxeboot_img_SOURCES): New variable.
12143 (pxeboot_img_ASFLAGS): Likewise.
12144 (pxeboot_img_LDFLAGS): Likewise.
12145 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
12146 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
12147 <lode_leroy@hotmail.com>.
12149 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12151 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12152 there was no input.
12154 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12156 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
12157 the history buffer logic.
12159 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12161 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12162 (FILETYPE_INO_SYMLINK): New macros.
12163 (grub_ext2_find_file): Check if the node is a directory using the
12164 inode stat information instead of using the filetype in the
12165 dirent. Exclude the first character of an absolute symlink.
12166 (grub_ext2_dir): Mask out the filetype part of the mode member of
12169 2004-05-24 Marco Gerards <metgerards@student.han.nl>
12171 Add support for UFS version 1 and 2. Add support for the minix
12172 filesystem version 1 and 2, both the variants with 14 and 30 long
12175 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12177 (grub_emu_SOURCES): Likewise.
12178 (pkgdata_MODULES): Add ufs.mod and minix.mod.
12179 (ufs_mod_SOURCES): New variable.
12180 (ufs_mod_CFLAGS): Likewise.
12181 (minix_mod_SOURCES): Likewise.
12182 (minix_mod_CFLAGS): Likewise.
12183 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12185 (grubof_SOURCES): Likewise.
12186 * fs/ufs.c: New file.
12187 * fs/minix.c: New file.
12188 * include/grub/fs.h (grub_ufs_init): New prototype.
12189 (grub_ufs_fini): Likewise.
12190 (grub_minix_init): Likewise.
12191 (grub_minix_fini): Likewise.
12192 * util/grub-emu.c (main): Initialize and deinitialize UFS and
12195 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
12197 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12198 commands/ls.c, commands/terminal.c, commands/boot.c,
12199 commands/cmp.c and commands/cat.c.
12200 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12202 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12205 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12207 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12208 and grub_, respectively. Because the conversion is trivial and
12209 mechanical, I omit the details here. Please refer to the CVS
12210 if you need more information.
12212 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12214 * include/pupa: Renamed to ...
12215 * include/grub: ... this.
12216 * util/i386/pc/pupa-mkimage.c: Renamed to ...
12217 * util/i386/pc/grub-mkimage.c: ... this.
12218 * util/i386/pc/pupa-setup.c: Renamed to ...
12219 * util/i386/pc/grub-setup.c: ... this.
12220 * util/pupa-emu.c: Renamed to ...
12221 * util/grub-emu.c: ... this.
12223 2004-03-29 Marco Gerards <metgerards@student.han.nl>
12225 Add support for the newworld apple macintosh (PPC). This has been
12226 tested on the powerbook 2000 only. It only adds support for
12227 generic ieee1275 functions, console and disk support. This should
12228 be easy to port to other architectures with support for Open
12231 * configure.ac: Accept the powerpc as host_cpu. In the case of
12232 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
12233 specific tests are only executed while building for the i386.
12234 Inverse test for crosscompile.
12235 * genmk.rb (Utility): Allow assembler files.
12236 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12237 * conf/powerpc-ieee1275.rmk: New file.
12238 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12239 * disk/powerpc/ieee1275/partition.c: Likewise.
12240 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12241 * include/pupa/powerpc/ieee1275/console.h: Likewise.
12242 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12243 * include/pupa/powerpc/ieee1275/time.h: Likewise.
12244 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12245 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12246 * include/pupa/powerpc/ieee1275/loader.h
12247 * include/pupa/powerpc/setjmp.h: Likewise.
12248 * include/pupa/powerpc/types.h: Likewise.
12249 * kern/powerpc/ieee1275/init.c: Likewise.
12250 * kern/powerpc/ieee1275/openfw.c: Likewise.
12251 * term/powerpc/ieee1275/ofconsole.c: Likewise.
12253 These files were written by Johan Rydberg
12254 (jrydberg@night.trouble.net) and I only modified them slightly.
12256 * boot/powerpc/ieee1275/cmain.c: New file.
12257 * boot/powerpc/ieee1275/crt0.S: Likewise.
12258 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12259 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12261 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
12263 * Makefile.in: Update copyright.
12264 * genmodsrc.sh: Likewise.
12265 * gensymlist.sh: Likewise.
12266 * term/i386/pc/vga.c: Indent correctly.
12268 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12269 bugreporting address.
12270 * util/i386/pc/pupa-setup.c (usage): Likewise,
12271 (main): Call pupa_ext2_init and pupa_ext2_fini.
12273 * fs/fat.c (log2): Renamed to ...
12274 (fat_log2): ... this.
12275 All callers changed.
12276 * kern/misc.c (memcpy): Alias to pupa_memmove.
12277 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12279 * util/console.c (pupa_ncurses_fini): Return 0.
12281 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12282 Move fail label here.
12283 [__GNU__]: Don't warn when using stat.
12284 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
12285 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
12286 long int. Use strtol instead of strtoul.
12288 2004-03-14 Marco Gerards <metgerards@student.han.nl>
12290 * commands/boot.c: New file.
12291 * commands/cat.c: Likewise.
12292 * commands/cmp.c: Likewise.
12293 * commands/ls.c: Likewise.
12294 * commands/terminal.c: Likewise.
12295 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
12296 (pupa_register_command): Changed interface to match the new
12298 (pupa_command_execute): Changed (almost rewritten) so it uses
12299 pupa_split_command. Added support for setting variables using the
12301 (rescue_command): Changed to work with the new argument parser.
12302 (terminal_command): Moved from here to commands/terminal.c.
12303 (set_command): New function.
12304 (unset_command): New function.
12305 (insmod_command): New function.
12306 (rmmod_command): New function.
12307 (lsmod_command): New function.
12308 (pupa_command_init): Don't initialize the command terminal
12309 anymore. Initialize the commands set, unset, insmod, rmmod and
12311 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
12312 (kernel_img_HEADERS): Add arg.h and env.h.
12313 (pupa_mkimage_LDFLAGS): Add kern/env.c.
12314 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
12315 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
12317 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
12319 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
12320 (boot_mod_SOURCES): New variable.
12321 (terminal_mod_SOURCES): Likewise.
12322 (ls_mod_SOURCES): Likewise.
12323 (cmp_mod_SOURCES): Likewise.
12324 (cat_mod_SOURCES): Likewise.
12326 * normal/arg.c: New file.
12327 * kern/env.c: Likewise.
12328 * include/pupa/arg.h: Likewise.
12329 * include/pupa/env.h: Likewise.
12330 * font/manager.c (font_command): Changed to match argument parsing
12332 (PUPA_MOD_INIT): Likewise.
12333 * hello/hello.c (pupa_cmd_hello): Likewise.
12334 (PUPA_MOD_INIT): Likewise.
12335 * include/pupa/disk.h: Include <pupa/device.h>.
12336 (pupa_print_partinfo): New prototype.
12337 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
12338 (pupa_dl_get_prefix): Likewise.
12339 * include/pupa/misc.h: Include <pupa/err.h>.
12340 (pupa_isgraph): New prototype.
12341 (pupa_isdigit): Likewise.
12342 (pupa_split_cmdline): Likewise.
12343 * include/pupa/normal.h: Include <pupa/arg.h>.
12344 (pupa_command): Changed the prototype of the member `func' to
12345 match the argument parsing interface. Added member `options'.
12346 (pupa_register_command): Updated to match function.
12347 (pupa_arg_parse): New prototype.
12348 (pupa_hello_init) [PUPA_UTIL]: New prototype.
12349 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
12350 (pupa_ls_init) [PUPA_UTIL]: Likewise.
12351 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
12352 (pupa_cat_init) [PUPA_UTIL]: Likewise.
12353 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
12354 (pupa_boot_init) [PUPA_UTIL]: Likewise.
12355 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
12356 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
12357 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
12358 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
12359 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
12360 * kern/disk.c: Include <pupa/file.h>.
12361 (pupa_print_partinfo): New function.
12362 * kern/dl.c: Include <pupa/env.h>.
12363 (pupa_dl_dir): Variable removed.
12364 (pupa_dl_load): Use the environment variable `prefix' instead of
12365 the variable pupa_dl_dir.
12366 (pupa_dl_set_prefix): Function removed.
12367 (pupa_dl_get_prefix): Likewise.
12368 * kern/i386/pc/init.c: Include <pupa/env.h>.
12369 (pupa_machine_init): Use the environment variable `prefix' instead of
12370 using pupa_dl_set_prefix to set the prefix.
12371 * kern/main.c: Include <pupa/env.h>.
12372 (pupa_set_root_dev): Use the environment variable `prefix' instead of
12373 using pupa_dl_get_prefix to get the prefix.
12374 * kern/misc.c: Include <pupa/env.h>.
12375 (pupa_isdigit): New function.
12376 (pupa_isgraph): Likewise.
12377 (pupa_ftoa): Likewise.
12378 (pupa_vsprintf): Added support for printing values of the type
12379 `double'. Make it possible to format variable output when using
12380 formatting like `%1.2%f'.
12381 (pupa_split_cmdline): New function.
12382 * kern/rescue.c: Include <pupa/env.h>.
12383 (next_word): Removed function.
12384 (pupa_rescue_cmd_prefix): Likewise.
12385 (pupa_rescue_cmd_set): New function.
12386 (pupa_rescue_cmd_unset): New function.
12387 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
12388 split the command line instead of splitting it here. Added
12389 support for setting variables using the syntax `foo=bar'. Don't
12390 initialize the prefix command anymore. Initialized the set and
12392 * normal/cmdline.c: Include <pupa/env.h>.
12393 (pupa_tab_complete): Added prototypes for print_simple_completion,
12394 print_partition_completion, add_completion, iterate_commands,
12395 iterate_dev, iterate_part and iterate_dir. Moved code to print
12396 partition information from here to kern/disk.c.
12397 (pupa_cmdline_run): Don't check if the function exists anymore.
12398 * normal/main.c: Include <pupa/env.h>.
12399 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
12400 instead of using pupa_dl_get_prefix to get the prefix.
12401 * term/i386/pc/vga.c: Include <pupa/arg.h>.
12402 (check_vga_mem): Cast pointers to `void *' to silence a gcc
12404 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
12405 (pupa_vga_setcolor): Declare unused variables with `__attribute__
12406 ((unused))' to silence a gcc warning.
12407 (pupa_vga_setcolor): Likewise.
12408 (debug_command): Changed to match argument parsing
12410 * util/pupa-emu.c: Include <pupa/env.h>.
12411 (options): Added 0's for unused fields to silence a gcc warning.
12413 (main): Use the environment variable `prefix' instead of using
12414 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
12415 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
12418 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12419 * util/misc.c: Include <malloc.h>.
12420 (pupa_malloc): Rewritten so errors are correctly reported.
12421 (pupa_realloc): Likewise.
12422 (pupa_memalign): Likewise.
12423 (pupa_mm_init_region): Declare unused variables with
12424 `__attribute__ ((unused))' to silence a gcc warning.
12425 * normal/i386/setjmp.S: Remove tab at the end of the file to
12426 silence a gcc warning.
12427 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12428 variables with `__attribute__ ((unused))' to silence a gcc
12430 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12431 local variable i unsigned to silence a gcc warning.
12433 * kern/term.c: Include <pupa/misc.h>.
12434 (pupa_more_lines): New variable.
12435 (pupa_more): Likewise.
12436 (pupa_putcode): When the pager is active pause at the end of every
12438 (pupa_set_more): New function.
12439 * include/pupa/term.h (pupa_set_more): New prototype.
12442 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
12444 Now this project is GRUB 2 rather than PUPA. The location of
12445 the CVS repository was moved to GRUB's.
12447 * configure.ac: Use bug-grub as the reporting address.
12448 Use GRUB instead of PUPA.
12449 Change the version number to 1.90.
12451 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
12453 * genkernsyms.sh: Updated copyright information.
12454 * genmk.rb: Likewise.
12455 * genmodsrc.sh: Likewise.
12456 * gensymlist.sh: Likewise.
12457 * boot/i386/pc/boot.S: Likewise.
12458 * boot/i386/pc/diskboot.S: Likewise.
12459 * disk/i386/pc/biosdisk.c: Likewise.
12460 * disk/i386/pc/partition.c: Likewise.
12461 * font/manager.c: Likewise.
12462 * fs/ext2.c: Likewise.
12463 * fs/fat.c: Likewise.
12464 * include/pupa/boot.h: Likewise.
12465 * include/pupa/device.h: Likewise.
12466 * include/pupa/disk.h: Likewise.
12467 * include/pupa/dl.h: Likewise.
12468 * include/pupa/elf.h: Likewise.
12469 * include/pupa/err.h: Likewise.
12470 * include/pupa/file.h: Likewise.
12471 * include/pupa/font.h: Likewise.
12472 * include/pupa/fs.h: Likewise.
12473 * include/pupa/kernel.h: Likewise.
12474 * include/pupa/loader.h: Likewise.
12475 * include/pupa/misc.h: Likewise.
12476 * include/pupa/mm.h: Likewise.
12477 * include/pupa/net.h: Likewise.
12478 * include/pupa/normal.h: Likewise.
12479 * include/pupa/rescue.h: Likewise.
12480 * include/pupa/setjmp.h: Likewise.
12481 * include/pupa/symbol.h: Likewise.
12482 * include/pupa/term.h: Likewise.
12483 * include/pupa/types.h: Likewise.
12484 * include/pupa/i386/setjmp.h: Likewise.
12485 * include/pupa/i386/types.h: Likewise.
12486 * include/pupa/i386/pc/biosdisk.h: Likewise.
12487 * include/pupa/i386/pc/boot.h: Likewise.
12488 * include/pupa/i386/pc/console.h: Likewise.
12489 * include/pupa/i386/pc/init.h: Likewise.
12490 * include/pupa/i386/pc/kernel.h: Likewise.
12491 * include/pupa/i386/pc/linux.h: Likewise.
12492 * include/pupa/i386/pc/loader.h: Likewise.
12493 * include/pupa/i386/pc/memory.h: Likewise.
12494 * include/pupa/i386/pc/multiboot.h: Likewise.
12495 * include/pupa/i386/pc/partition.h: Likewise.
12496 * include/pupa/i386/pc/time.h: Likewise.
12497 * include/pupa/i386/pc/vga.h: Likewise.
12498 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12499 * include/pupa/util/getroot.h: Likewise.
12500 * include/pupa/util/misc.h: Likewise.
12501 * include/pupa/util/resolve.h: Likewise.
12502 * kern/device.c: Likewise.
12503 * kern/disk.c: Likewise.
12504 * kern/dl.c: Likewise.
12505 * kern/err.c: Likewise.
12506 * kern/file.c: Likewise.
12507 * kern/fs.c: Likewise.
12508 * kern/loader.c: Likewise.
12509 * kern/main.c: Likewise.
12510 * kern/misc.c: Likewise.
12511 * kern/mm.c: Likewise.
12512 * kern/rescue.c: Likewise.
12513 * kern/term.c: Likewise.
12514 * kern/i386/dl.c: Likewise.
12515 * kern/i386/pc/init.c: Likewise.
12516 * kern/i386/pc/lzo1x.S: Likewise.
12517 * kern/i386/pc/startup.S: Likewise.
12518 * loader/i386/pc/chainloader.c: Likewise.
12519 * loader/i386/pc/linux.c: Likewise.
12520 * loader/i386/pc/multiboot.c: Likewise.
12521 * normal/cmdline.c: Likewise.
12522 * normal/command.c: Likewise.
12523 * normal/main.c: Likewise.
12524 * normal/menu.c: Likewise.
12525 * normal/i386/setjmp.S: Likewise.
12526 * term/i386/pc/console.c: Likewise.
12527 * term/i386/pc/vga.c: Likewise.
12528 * util/console.c: Likewise.
12529 * util/genmoddep.c: Likewise.
12530 * util/misc.c: Likewise.
12531 * util/pupa-emu.c: Likewise.
12532 * util/resolve.c: Likewise.
12533 * util/unifont2pff.rb: Likewise.
12534 * util/i386/pc/biosdisk.c: Likewise.
12535 * util/i386/pc/getroot.c: Likewise.
12536 * util/i386/pc/pupa-mkimage.c: Likewise.
12537 * util/i386/pc/pupa-setup.c: Likewise.
12539 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
12541 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12542 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
12543 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
12544 reading and reset it after reading.
12545 (pupa_ext2_close): Return PUPA_ERR_NONE.
12547 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12549 (struct linux_kernel_header): Add kernel_version and
12551 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12552 pupa_file_read succeeds.
12553 (pupa_rescue_cmd_initrd): Implement.
12555 2003-12-03 Marco Gerards <metgerards@student.han.nl>
12557 * fs/ext2.c (pupa_ext2_label): New function.
12558 (pupa_ext2_fs): Added label.
12559 * fs/fat.c (pupa_fat_label): New function.
12560 (pupa_fat_fs): Added label.
12561 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12563 * kern/misc.c (pupa_strndup): New function.
12564 * include/pupa/misc.h (pupa_strndup): New prototype.
12566 * include/pupa/normal.h: Include <pupa/err.h>.
12567 (pupa_set_history): New prototype.
12568 (pupa_iterate_commands): New prototype.
12569 * normal/cmdline.c: Include <pupa/machine/partition.h>,
12570 <pupa/disk.h>, <pupa/file.h>.
12571 (hist_size): New variable.
12572 (hist_lines): Likewise.
12573 (hist_end): Likewise.
12574 (hist_used): Likewise.
12575 (pupa_set_history): New function.
12576 (pupa_history_get): Likewise.
12577 (pupa_history_add): Likewise.
12578 (pupa_history_replace): Likewise.
12579 (pupa_tab_complete): Likewise.
12580 (pupa_cmdline_run): Added tab completion and history buffer. Tab
12581 completion shows partitionnames while completing partitions, this
12582 feature was suggested by Jeff Bailey.
12583 * normal/command.c (pupa_iterate_commands): New function.
12584 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12585 (pupa_normal_init): Initialize history buffer.
12586 (PUPA_MOD_INIT): Likewise.
12587 (pupa_normal_fini): Free the history buffer.
12588 (PUPA_MOD_FINI): Likewise.
12590 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12593 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12594 * configure.ac [i386]: Check for regparam bug.
12595 (NESTED_FUNC_ATTR) [! i386]: Defined.
12597 2003-11-17 Marco Gerards <metgerards@student.han.nl>
12599 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12600 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12601 (pupa_emu_SOURCES): New variable.
12602 (pupa_emu_LDFLAGS): Likewise.
12603 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12604 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12605 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12606 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12607 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
12608 (pupa_jmp_buf): New typedef.
12609 (pupa_setjmp) [PUPA_UTIL]: New macro.
12610 (pupa_longjmp) [PUPA_UTIL]: Likewise.
12611 * include/pupa/term.h (struct pupa_term): New member `refresh'.
12612 (pupa_refresh): New prototype.
12613 * include/pupa/util/getroot.h: New file.
12614 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
12616 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
12617 (pupa_rescue_cmd_cat): Likewise.
12618 (pupa_rescue_cmd_ls): Likewise.
12619 (pupa_rescue_cmd_testload): Likewise.
12620 (pupa_rescue_cmd_lsmod): Likewise.
12621 * normal/cmdline.c (pupa_cmdline_get): Likewise.
12622 * normal/menu.c (run_menu): Likewise.
12623 * kern/term.c (pupa_cls): Likewise.
12624 (pupa_refresh): New function.
12625 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
12626 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12627 * util/console.c: New file.
12629 * util/i386/pc/getroot.c: New file.
12630 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
12631 (pupa_putchar): New function.
12632 (pupa_refresh): Likewise.
12633 (xgetcwd): Function moved to ...
12634 (strip_extra_slashes): Likewise.
12635 (get_prefix): Likewise.
12636 * util/i386/pc/getroot.c: ... here.
12637 (find_root_device): Function moved and renamed to...
12638 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
12639 Changed all callers.
12640 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
12642 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
12643 Changed all callers.
12644 * util/misc.c (pupa_memalign): New function.
12645 (pupa_mm_init_region): Likewise.
12646 (pupa_register_exported_symbols): Likewise.
12647 (pupa_putchar): Function removed.
12648 * util/pupa-emu.c: New file.
12650 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
12652 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
12653 (_multiboot_mod_SOURCES): New variable.
12654 (_multiboot_mod_CFLAGS): Likewise.
12655 * loader/i386/pc/multiboot.c: New file.
12656 * include/pupa/i386/pc/multiboot.h: Likewise.
12657 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
12658 (pupa_multiboot_real_boot): New function.
12659 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
12660 (pupa_multiboot_real_boot): New prototype.
12661 (pupa_rescue_cmd_multiboot): Likewise
12662 (pupa_rescue_cmd_module): Likewise.
12664 * kern/loader.c (pupa_loader_set): Continue when
12665 pupa_loader_unload_func() fails.
12666 (pupa_loader_unset): New function.
12667 * include/pupa/loader.h (pupa_loader_unset): New prototype.
12669 * kern/misc.c (pupa_stpcpy): New function.
12670 * include/pupa/misc.h (pupa_stpcpy): New prototype.
12672 2003-11-12 Marco Gerards <metgerards@student.han.nl>
12674 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
12675 for available extensions.
12677 * include/pupa/i386/pc/time.h: New file.
12678 * kern/disk.c: Include <pupa/machine/time.h>.
12679 (PUPA_CACHE_TIMEOUT): New macro.
12680 (pupa_last_time): New variable.
12681 (pupa_disk_open): Flush the cache when there was a timeout.
12682 (pupa_disk_close): Reset the timer.
12683 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
12685 * util/misc.c: Include <sys/times.h>
12686 (pupa_get_rtc): New function.
12688 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
12690 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
12692 (pupa_ext2_get_file_block): Use blocks member.
12694 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
12695 first block. Return -1 instead of pupa_errno on error.
12697 2003-10-27 Marco Gerards <metgerards@student.han.nl>
12699 * README: In the pupa-mkimage example use _chain instead of chain
12700 and ext2 instead of fat.
12701 * TODO: Replace ext2fs with jfs as an example. Add an item for
12702 adding journal playback for ext2fs.
12703 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
12704 (pkgdata_MODULES): Added ext2.mod.
12705 (ext2_mod_SOURCES): New variable.
12706 (ext2_mod_CFLAGS): Likewise.
12707 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
12708 * include/pupa/misc.h (pupa_strncpy): New prototype.
12709 (pupa_strcat): Likewise.
12710 (pupa_strncmp): Likewise.
12711 * kern/misc.c (pupa_strcat): Enable function.
12712 (pupa_strncpy): New function.
12713 (pupa_strncmp): Likewise.
12714 * fs/ext2.c: New file.
12716 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
12717 when the read failed before retrying.
12718 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
12719 (_FILE_OFFSET_BITS): Likewise.
12720 * configure.ac: Added AC_SYS_LARGEFILE.
12722 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
12724 * genmk.rb (PModule#rule): Make sure to get only symbol names
12725 from the output of nm.
12726 Reported by Robert Millan <zeratul2@wanadoo.es>.
12728 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
12730 I forgot to check in these changes for a long time. This adds
12731 incomplete support for VGA console, and this is still very
12732 buggy. Also, a lot of consideration is required for I18N,
12733 UNICODE, and VGA font issues. Therefore, assume that this is
12734 such that "better than nothing".
12736 * font/manager.c: New file.
12737 * include/pupa/font.h: Likewise.
12738 * include/pupa/i386/pc/vga.h: Likewise.
12739 * term/i386/pc/vga.c: Likewise.
12740 * util/unifont2pff.rb: Likewise.
12742 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
12743 (pkgdata_MODULES): Added vga.mod and font.mod.
12744 (vga_mod_SOURCES): New variables.
12745 (vga_mod_CFLAGS): Likewise.
12746 (font_mod_SOURCES): Likewise.
12747 (font_mod_CFLAGS): Likewise.
12749 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
12751 * include/pupa/term.h: Include pupa/err.h.
12752 (struct pupa_term): Added init and fini.
12753 Changed the argument of putchar to pupa_uint32_t.
12755 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
12756 (pupa_console_real_putchar): New prototype.
12757 (pupa_console_putchar): Removed.
12758 (pupa_console_checkkey): Exported.
12759 (pupa_console_getkey): Likewise.
12761 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
12764 * kern/term.c (pupa_term_set_current): Rewritten.
12765 (pupa_putchar): Likewise.
12766 (pupa_putcode): New function.
12768 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
12769 (pupa_console_real_putchar): ... this.
12770 (pupa_vga_set_mode): New function.
12771 (pupa_vga_get_font): Likewise.
12773 * normal/command.c: Include pupa/term.h.
12774 (terminal_command): New function.
12775 (pupa_command_init): Register the command "terminal".
12777 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
12778 (DISP_UP): Likewise.
12779 (DISP_RIGHT): Likewise.
12780 (DISP_DOWN): Likewise.
12781 (DISP_HLINE): Likewise.
12782 (DISP_VLINE): Likewise.
12783 (DISP_UL): Likewise.
12784 (DISP_UR): Likewise.
12785 (DISP_LL): Likewise.
12786 (DISP_LR): Likewise.
12788 * term/i386/pc/console.c (pupa_console_putchar): New function.
12790 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
12792 * util/resolve.c (pupa_util_resolve_dependencies): BUG
12793 FIX. Reverse the path_list.
12795 * include/pupa/normal.h: Export pupa_register_command and
12796 pupa_unregister_command.
12798 * hello/hello.c (pupa_cmd_hello): New module.
12799 * conf/i386-pc.rmk: Added hello.mod.
12801 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
12803 * kern/i386/pc/lzo1x.S: New file.
12805 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
12806 (compress_kernel): New variable.
12807 (generate_image): Heavily modified to support compressing a
12808 large part of the core image.
12810 * util/misc.c (pupa_util_read_image): Fix a file descriptor
12812 (pupa_util_load_image): New function.
12814 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
12815 (pupa_compressed_size): New variable.
12816 (codestart): Enable Gate A20 here.
12817 Decompress the compressed part of the core image.
12818 Rearrange the code to put functions and variables which are
12819 required for initialization in the non-compressed part.
12822 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
12825 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
12827 * include/pupa/i386/pc/kernel.h
12828 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
12829 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
12830 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12831 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12832 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
12834 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
12836 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
12837 (Utility#rule): Likewise.
12839 * configure.ac: Check if LZO is available.
12841 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
12843 * include/pupa/normal.h: New file.
12844 * include/pupa/setjmp.h: Likewise.
12845 * include/pupa/i386/setjmp.h: Likewise.
12846 * normal/cmdline.c: Likewise.
12847 * normal/command.c: Likewise.
12848 * normal/main.c: Likewise.
12849 * normal/menu.c: Likewise.
12850 * normal/i386/setjmp.S: Likewise.
12852 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
12853 (pupa_rescue_cmd_initrd): Likewise.
12855 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
12858 * kern/i386/pc/startup.S (translation_table): New variable.
12859 (translate_keycode): New function.
12860 (pupa_console_getkey): Call translate_keycode.
12862 * kern/rescue.c (attempt_normal_mode): New function.
12863 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
12864 it failed, print a message.
12866 * kern/mm.c (pupa_real_malloc): Print more information when a
12867 free magic is broken.
12868 (pupa_free): If the first free header is not free actually, set
12871 * kern/main.c (pupa_load_normal_mode): Just load the module
12873 (pupa_main): Don't print the message
12874 "Entering into rescue mode..." here.
12876 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
12878 (pupa_rescue_cmd_initrd): Likewise.
12879 (pupa_rescue_cmd_initrd): Likewise.
12881 * include/pupa/symbol.h (FUNCTION): Specify the type.
12882 (VARIABLE): Likewise.
12884 * include/pupa/err.h (pupa_err_t): Added
12885 PUPA_ERR_UNKNOWN_COMMAND.
12887 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
12888 (pupa_dl_get_prefix): Likewise.
12890 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
12891 Added _chain.mod and _linux.mod instead of chain.mod and
12893 (chain_mod_SOURCES): Renamed to ...
12894 (_chain_mod_SOURCES): ... this.
12895 (chain_mod_CFLAGS): Renamed to ...
12896 (_chain_mod_CFLAGS): ... this.
12897 (linux_mod_SOURCES): Renamed to ...
12898 (_linux_mod_SOURCES): ... this.
12899 (linux_mod_CFLAGS): Renamed to ...
12900 (_linux_mod_CFLAGS): ... this.
12901 (normal_mod_SOURCES): New variable.
12902 (normal_mod_CFLAGS): Likewise.
12903 (normal_mod_ASFLAGS): Likewise.
12905 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
12907 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
12910 * kern/dl.c (pupa_dl_ref): Refer depending modules
12912 (pupa_dl_unref): Unrefer depending modules recursively.
12913 Don't call pupa_dl_unload implicitly, because PUPA can crash if
12914 a module is unloaded before one depending on that module is
12916 (pupa_dl_unload): Unload depending modules explicitly,
12919 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
12921 * include/pupa/i386/pc/linux.h: New file.
12922 * loader/i386/pc/linux.c: Likewise.
12924 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
12926 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
12927 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
12928 of PUPA_CHAINLOADER_BOOT_SECTOR.
12930 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
12931 (pupa_linux_prot_size): New variable.
12932 (pupa_linux_tmp_addr): Likewise.
12933 (pupa_linux_real_addr): Likewise.
12934 (pupa_linux_boot_zimage): New function.
12935 (pupa_linux_boot_bzimage): Likewise.
12937 * kern/i386/pc/init.c (struct mem_region): New structure.
12938 (MAX_REGIONS): New macro.
12939 (mem_regions): New variable.
12940 (num_regions): Likewise.
12941 (pupa_os_area_addr): Likewise.
12942 (pupa_os_area_size): Likewise.
12943 (pupa_lower_mem): Likewise.
12944 (pupa_upper_mem): Likewise.
12945 (add_mem_region): New function.
12946 (compact_mem_regions): Likewise.
12947 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
12948 the size of the conventional memory and that of so-called upper
12949 memory (before the first memory hole).
12950 Instead of adding each found region to free memory, use
12951 add_mem_region and add them after removing overlaps.
12952 Also, add only 1/4 of the upper memory to free memory. The rest
12953 is used for loading OS images. Maybe this is ad hoc, but this
12954 makes it much easier to relocate OS images when booting.
12956 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
12957 (pupa_enter_rescue_mode): Don't register initrd and module.
12959 * kern/mm.c: Include pupa/dl.h.
12961 * kern/main.c: Include pupa/file.h and pupa/device.h.
12963 * kern/loader.c (pupa_loader_load_module_func): Removed.
12964 (pupa_loader_load_module): Likewise.
12966 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
12969 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
12970 (pupa_linux_tmp_addr): Likewise.
12971 (pupa_linux_real_addr): Likewise.
12972 (pupa_linux_boot_zimage): Likewise.
12973 (pupa_linux_boot_bzimage): Likewise.
12975 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
12976 (pupa_upper_mem): Likewise.
12977 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
12978 module is too dangerous.
12980 * include/pupa/loader.h (pupa_os_area_addr): Declared.
12981 (pupa_os_area_size): Likewise.
12982 (pupa_loader_set): Remove the first argument. Loader doesn't
12983 manage modules or initrd any longer.
12984 (pupa_loader_load_module): Removed.
12986 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
12987 (linux_mod_SOURCES): New variable.
12988 (linux_mod_CFLAGS): Likewise.
12990 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
12992 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
12993 the length of a blocklist correctly.
12995 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
12996 Use ioctl only if the OS file is a block device.
12997 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
12998 not very useful for normal files.
13000 * kern/main.c (pupa_set_root_dev): New function.
13001 (pupa_load_normal_mode): Likewise.
13002 (pupa_main): Call those above.
13004 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
13007 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
13009 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
13011 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
13012 (setup): Configure the installed partition information and the
13015 * loader/i386/pc/chainloader.c (my_mod): New variable.
13016 (pupa_chainloader_unload): New function.
13017 (pupa_rescue_cmd_chainloader): Refer itself.
13018 (PUPA_MOD_INIT): Save its own module in MY_MOD.
13020 * kern/i386/pc/startup.S (install_partition): Removed.
13021 (version_string): Likewise.
13022 (config_file): Likewise.
13023 (pupa_install_dos_part): New variable.
13024 (pupa_install_bsd_part): Likewise.
13025 (pupa_prefix): Likewise.
13026 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
13028 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
13030 (make_install_device): New function.
13031 (pupa_machine_init): Set the dl prefix.
13033 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
13034 (buf): Renamed to ...
13035 (linebuf): ... this.
13036 (pupa_rescue_cmd_prefix): New function.
13037 (pupa_rescue_cmd_insmod): Likewise.
13038 (pupa_rescue_cmd_rmmod): Likewise.
13039 (pupa_rescue_cmd_lsmod): Likewise.
13040 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
13043 * kern/mm.c (pupa_memalign): If failed even after invalidating
13044 disk caches, unload unneeded modules and retry.
13046 * kern/misc.c (pupa_memmove): New function.
13047 (pupa_memcpy): Removed.
13048 (pupa_strcpy): New function.
13049 (pupa_itoa): Made static.
13051 * kern/dl.c (pupa_dl_iterate): New function.
13052 (pupa_dl_ref): Likewise.
13053 (pupa_dl_unref): Likewise.
13054 (pupa_dl_unload): Return if succeeded or not.
13055 (pupa_dl_unload_unneeded): New function.
13056 (pupa_dl_unload_all): Likewise.
13057 (pupa_dl_init): Renamed to ...
13058 (pupa_dl_set_prefix): ... this.
13059 (pupa_dl_get_prefix): New function.
13061 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13062 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13063 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13064 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13065 (pupa_install_dos_part): Declared.
13066 (pupa_install_bsd_part): Likewise.
13067 (pupa_prefix): Likewise.
13068 (pupa_boot_drive): Likewise.
13070 * include/pupa/types.h: Fix a typo.
13072 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
13074 (pupa_memmove): Declared.
13075 (pupa_strcpy): Likewise.
13077 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
13078 pupa_mod_init takes one argument, its own module.
13079 (pupa_dl_unload_unneeded): Declared.
13080 (pupa_dl_unload_all): Likewise.
13081 (pupa_dl_ref): Likewise.
13082 (pupa_dl_unref): Likewise.
13083 (pupa_dl_iterate): Likewise.
13084 (pupa_dl_init): Renamed to ...
13085 (pupa_dl_set_prefix): ... this.
13086 (pupa_dl_get_prefix): Declared.
13088 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
13089 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
13091 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
13092 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
13094 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
13095 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
13097 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13099 * util/i386/pc/pupa-setup.c (setup): Define the internal
13100 function find_first_partition_start at the top level, because GCC
13101 3.0.x cannot compile internal functions in deeper scopes
13103 (find_root_device): Use lstat instead of stat.
13104 Don't follow symbolic links.
13105 Fix the path-constructing code.
13107 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13108 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13109 by a BLKGETSIZE ioctl first, because block devices don't fill
13110 the member st_mode of the structure stat on Linux.
13111 [__linux__] (linux_find_partition): Use a temporary buffer
13112 REAL_DEV for the working space. Copy it to DEV before returning.
13113 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13114 buffer cache consistent.
13115 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13116 strncmp. The previous value was merely wrong.
13117 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13119 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13120 FAT size is 12. The previous value was merely wrong.
13122 * kern/main.c (pupa_main): Don't split the starting message from
13125 * kern/term.c (pupa_putchar): Put CR after LF instead of before
13126 LF, because BIOS goes crazy about character attributes in this
13129 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13131 * include/i386/pc/util/biosdisk.h: New file.
13132 * util/i386/pc/biosdisk.c: Likewise.
13133 * util/i386/pc/pupa-setup.c: Likewise.
13135 * Makefile.in (INCLUDE_DISTFILES): Added
13136 include/pupa/i386/pc/util/biosdisk.h.
13137 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13138 directory util/i386/pc.
13139 (install-local): Added a rule for sbin_UTILITIES.
13140 (uninstall): Likewise.
13142 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13144 * util/misc.c (xrealloc): New function.
13145 (pupa_malloc): Likewise.
13146 (pupa_free): Likewise.
13147 (pupa_realloc): Likewise.
13148 (pupa_stop): Likewise.
13149 (pupa_putchar): Likewise.
13151 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13153 * include/pupa/util/misc.h (xrealloc): Declared.
13155 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13157 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13158 (PUPA_BOOT_MACHINE_BPB_END): ... this.
13160 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13161 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13163 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13164 way should be implemented.
13165 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13167 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13168 the size of NAME for safety.
13169 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13172 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13173 (pupa_setup_SOURCES): Likewise.
13175 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13177 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13179 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13180 bunch of pushl's from pusha, because this destroys the return
13183 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13185 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13186 This means that any missing prototypes could be fatal. Also, you
13187 must take care when writing assembly code. See the comments at
13188 the beginning of startup.S, for more details.
13190 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13191 compilation mechanism.
13192 (pupa_chainloader_real_boot): Likewise.
13193 (pupa_biosdisk_rw_int13_extensions): Likewise.
13194 (pupa_biosdisk_rw_standard): Likewise.
13195 (pupa_biosdisk_check_int13_extensions): Likewise.
13196 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13197 (pupa_biosdisk_get_diskinfo_standard): Likewise.
13198 (pupa_get_memsize): Likewise.
13199 (pupa_get_mmap_entry): Likewise.
13200 (pupa_console_putchar): Likewise.
13201 (pupa_console_setcursor): Likewise.
13202 (pupa_getrtsecs): Use pushl instead of push.
13204 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13205 memory instead of the stack for a mmap entry, because some
13206 BIOSes may ignore the maximum size and overflow.
13208 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13210 * genmk.rb (PModule#rule): Compile automatically generated
13211 sources with module-specific CFLAGS as well as other sources.
13213 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13215 * configure.ac: Check ld.
13216 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13217 respectively, before checking endianness and sizes.
13219 * Makefile.in (LD): New variable.
13221 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13223 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13225 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13227 * Changelog: New file.