1 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
3 * NEWS: Update for rename of update-grub to grub-mkconfig.
5 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
7 * util/update-grub_lib.in: Copy to ...
8 * util/grub-mkconfig_lib.in: ... this. Update all users.
9 * util/update-grub_lib.in: Make it a stub to `grub-mkconfigig_lib.in'.
10 * util/update-grub.in: Rename to ...
11 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
12 option. Add `--output' option to allow users to specify the generated
13 configuration file. Default to stdout.
14 (update_grub_dir): Rename to ...
15 (grub_mkconfig_dir): ... this.
16 (grub_cfg): Default to an empty string.
17 * conf/common.rmk (update-grub): Rename to ...
18 (grub-mkconfig): ... this.
19 (update-grub_lib): Copy to ...
20 (grub-mkconfig_lib): ... this.
21 (update-grub_SCRIPTS): Copy to ...
22 (grub-mkconfig_SCRIPTS): ... this. Update all users.
23 (update-grub_DATA): Rename to ...
24 (grub-mkconfig_DATA): ... this.
26 2008-09-28 Robert Millan <rmh@aybabtu.com>
28 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
29 to `modified'. Add the real `created' field.
30 (grub_iso9660_uuid): Use `modified' rather than `created' for
31 constructing the UUID.
33 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
35 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
36 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
38 2008-09-28 Bean <bean123ch@gmail.com>
40 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
41 Thanks to Christian Franke for finding this bug.
43 2008-09-25 Robert Millan <rmh@aybabtu.com>
45 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
46 instances of grub_util_get_disk_name() (see previous commit).
48 2008-09-25 Robert Millan <rmh@aybabtu.com>
50 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
51 `util/i386/get_disk_name.c'.
52 * conf/i386-efi.rmk: Likewise.
53 * conf/x86_64-efi.rmk: Likewise.
54 * conf/i386-coreboot.rmk: Likewise.
55 * conf/i386-ieee1275.rmk: Likewise.
56 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
57 `util/ieee1275/get_disk_name.c'.
58 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
59 * util/ieee1275/get_disk_name.c: Remove file.
60 * util/i386/get_disk_name.c: Remove file.
61 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
62 "hd%d" for device.map entries, rather than using
63 grub_util_get_disk_name().
65 2008-09-24 Carles Pina i Estany <carles@pina.cat>
67 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
69 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
71 2008-09-24 Carles Pina i Estany <carles@pina.cat>
73 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
75 (GRUB_TERM_PPAGE): Changed to 0x4900.
77 2008-09-24 Robert Millan <rmh@aybabtu.com>
79 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
80 macros (they were i386-pc specific).
81 * include/grub/sparc64/ieee1275/console.h: Likewise.
82 * include/grub/efi/console.h: Likewise.
84 2008-09-22 Bean <bean123ch@gmail.com>
86 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
87 resident and in attribute list.
89 * include/grub/ntfs.h (BMP_LEN): Removed.
91 2008-09-22 Bean <bean123ch@gmail.com>
93 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
94 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
96 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
97 error occurs, as grub_disk_open will call grub_disk_close, which will
100 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
102 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
103 (AC_PREREQ): Bumped to 2.59.
104 (AC_TRY_COMPILE): Replace obsolete macro with ...
105 (AC_COMPILE_IFELSE): ... this.
106 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
107 (AC_LINK_IFELSE): ... this.
109 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
111 * autogen.sh: Add a call to `gendistlist.sh'.
113 2008-09-19 Christian Franke <franke@computer.org>
115 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
116 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
117 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
118 Export __enable_execute_stack() to modules.
119 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
122 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
124 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
127 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
129 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
130 #include <grub/util/hostdisk.h>.
132 2008-09-08 Robert Millan <rmh@aybabtu.com>
134 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
135 segments when their filesz is zero (grub_file_read() interprets
136 zero-size as "read until EOF", which results in memory corruption).
137 Use `lowest_segment' rather than 0 for calculating the current
138 segment load address.
140 2008-09-08 Robert Millan <rmh@aybabtu.com>
142 * util/hostdisk.c (open_device): Replace a grub_util_info() call
143 with grub_dprintf("hostdisk", ...), as it was so verbose that it
144 clobbered useful information.
146 2008-09-08 Robert Millan <rmh@aybabtu.com>
148 * include/grub/util/biosdisk.h: Move to ...
149 * include/grub/util/hostdisk.h: ... here. Update all users.
150 * util/biosdisk.c: Move to ...
151 * util/hostdisk.c: ... here. Update all users.
153 2008-09-07 Robert Millan <rmh@aybabtu.com>
155 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
157 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
158 and length can be stored directly in the `mbi->mmap_addr' and
159 `mbi->mmap_length' struct fields.
161 2008-09-07 Robert Millan <rmh@aybabtu.com>
163 * conf/i386.rmk: New file. Provides declaration for building
165 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
166 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
168 Include `conf/i386.mk'.
169 * conf/i386-efi.rmk: Likewise.
170 * conf/x86_64-efi.rmk: Likewise.
171 * conf/i386-coreboot.rmk: Likewise.
172 * conf/i386-ieee1275.rmk: Likewise.
174 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
176 Based on patch created by Colin D Bennett <colin@gibibit.com>.
177 Adds optimization support for BGR based modes.
179 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
180 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
181 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
182 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
183 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
184 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
185 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
186 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
187 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
188 (grub_video_i386_vbeblit_index_index): Likewise.
189 (grub_video_i386_vbeblit_replace_directN): Added.
190 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
191 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
192 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
193 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
194 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
195 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
196 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
197 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
198 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
199 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
200 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
201 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
202 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
204 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
205 (grub_video_i386_vbefill_R8G8B8): Likewise.
206 (grub_video_i386_vbefill_index): Likewise.
207 (grub_video_i386_vbefill_direct32): Added.
208 (grub_video_i386_vbefill_direct24): Likewise.
209 (grub_video_i386_vbefill_direct16): Likewise.
210 (grub_video_i386_vbefill_direct8): Likewise.
212 * include/grub/video.h (grub_video_blit_format): Removed
213 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
214 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
215 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
216 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
217 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
219 * video/video.c (grub_video_get_blit_format): Updated to use new
220 blit formats. Added handling for 16 bit color modes.
222 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
224 (common_blitter): Updated to use new blitters.
226 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
228 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
229 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
230 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
231 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
232 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
233 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
234 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
235 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
236 (grub_video_i386_vbeblit_index_index): Likewise.
237 (grub_video_i386_vbeblit_replace_directN): Added.
238 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
239 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
240 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
241 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
242 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
243 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
244 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
245 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
246 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
247 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
248 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
249 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
250 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
252 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
253 (grub_video_i386_vbefill_R8G8B8): Likewise.
254 (grub_video_i386_vbefill_index): Likewise.
255 (grub_video_i386_vbefill_direct32): Added.
256 (grub_video_i386_vbefill_direct24): Likewise.
257 (grub_video_i386_vbefill_direct16): Likewise.
258 (grub_video_i386_vbefill_direct8): Likewise.
260 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
263 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
266 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
269 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
272 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
274 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
277 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
279 * fs/iso9660.c (grub_iso9660_date): New structure.
280 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
281 (grub_iso9660_uuid): New function.
283 2008-09-05 Bean <bean123ch@gmail.com>
285 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
287 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
288 insensitive bit for names in Win32 and Win32 & DOS namespace.
290 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
292 * include/grub/types.h (LONG_MAX): Likewise.
294 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
296 * util/getroot.c: Include <config.h>.
297 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
298 add support for /dev/md/N devices and handle LVM double dash escaping.
300 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
302 * config.guess: Update to latest version from config git.
303 * config.sub: Likewise.
305 2008-09-03 Robert Millan <rmh@aybabtu.com>
307 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
308 `disk->total_sectors'.
310 2008-09-01 Colin D Bennett <colin@gibibit.com>
312 * include/grub/normal.h: Fixed incorrect comment for
313 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
315 2008-09-01 Colin D Bennett <colin@gibibit.com>
317 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
320 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
321 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
322 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
323 (GRUB_VBE_MODEATTR_COLOR): Likewise.
324 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
325 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
326 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
327 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
328 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
329 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
330 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
331 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
332 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
333 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
334 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
335 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
336 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
337 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
338 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
340 2008-08-31 Robert Millan <rmh@aybabtu.com>
342 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
344 (grub_multiboot): Fix a few warnings.
346 2008-08-31 Robert Millan <rmh@aybabtu.com>
348 * loader/i386/pc/multiboot.c: Update comment not to say that
349 boot_device support is unimplemented.
351 2008-08-31 Robert Millan <rmh@aybabtu.com>
353 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
354 or memory map support are unimplemented.
356 2008-08-31 Colin D Bennett <colin@gibibit.com>
358 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
360 2008-08-31 Colin D Bennett <colin@gibibit.com>
362 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
363 total video memory in 'vbeinfo' output; show color format details for
366 2008-08-30 Pavel Roskin <proski@gnu.org>
368 * util/genmoddep.c: Remove for real this time.
369 * DISTLIST: Remove util/genmoddep.c.
371 2008-08-30 Robert Millan <rmh@aybabtu.com>
373 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
374 as required by Multiboot spec (it was already 4-byte aligned, but
377 2008-08-29 Pavel Roskin <proski@gnu.org>
379 * kern/powerpc/ieee1275/crt0.S: Rename to ...
380 * kern/powerpc/ieee1275/startup.S: ... this.
381 * conf/powerpc-ieee1275.rmk: Adjust for the above.
382 * DISTLIST: Likewise.
384 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
385 grub/cpu/kernel.h. Add start label for consistency with other
386 platforms. Add grub_prefix immediately after start. Add jump
387 to the code after grub_prefix.
388 * include/grub/powerpc/kernel.h: Provide valid values for
389 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
391 2008-08-29 Bean <bean123ch@gmail.com>
393 * configure.ac: Change host_os to cygwin for mingw.
394 (asprintf): New check for function.
396 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
397 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
399 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
400 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
401 sync, sleep and grub_util_get_disk_size for mingw.
403 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
404 to get size in mingw.
405 (open_device): Use flag O_BINARY if it's defined.
406 (find_root_device): Add dummy code for mingw.
408 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
409 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
410 (get_scsi_disk_name): Return 0 for mingw.
412 * util/hostfs.c: #include <grub/util/misc.h>.
413 (grub_hostfs_open): Use "rb" flag to open file, use
414 grub_util_get_disk_size to get disk size for mingw.
416 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
417 (asprintf): New function if HAVE_ASPRINTF is not set.
418 (sync): New function for mingw.
420 (grub_util_get_disk_size): Likewise.
422 2008-08-28 Pavel Roskin <proski@gnu.org>
424 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
427 2008-08-28 Robert Millan <rmh@aybabtu.com>
429 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
431 2008-08-28 Robert Millan <rmh@aybabtu.com>
433 Change find_grub_drive() syntax so it doesn't prevent it from
434 detecting NULL names as errors.
436 * util/biosdisk.c (find_grub_drive): Move free slot search code
438 (find_free_slot): ... to here.
439 (read_device_map): Use find_free_slot() to search for free slots.
441 2008-08-27 Marco Gerards <marco@gnu.org>
443 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
444 (scsi_mod_SOURCES): New variable.
445 (scsi_mod_CFLAGS): Likewise
446 (scsi_mod_LDFLAGS): Likewise.
448 * disk/scsi.c: New file.
450 * include/grub/scsi.h: Likewise.
452 * include/grub/scsicmd.h: Likewise.
454 * disk/ata.c: Include <grub/scsi.h>.
455 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
457 (grub_ata_iterate): Skip ATAPI devices.
458 (grub_ata_open): Only handle ATAPI devices.
459 (struct grub_atapi_read): Removed.
460 (grub_atapi_readsector): Likewise.
461 (grub_ata_read): No longer handle ATAPI devices.
462 (grub_ata_write): Likewise.
463 (grub_atapi_iterate): New function.
464 (grub_atapi_read): Likewise.
465 (grub_atapi_write): Likewise.
466 (grub_atapi_open): Likewise.
467 (grub_atapi_close): Likewise.
468 (grub_atapi_dev): New variable.
469 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
470 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
472 * include/grub/disk.h (enum grub_disk_dev_id): Add
473 `GRUB_DISK_DEVICE_SCSI_ID'.
475 2008-08-26 Robert Millan <rmh@aybabtu.com>
477 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
478 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
481 2008-08-23 Bean <bean123ch@gmail.com>
483 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
484 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
485 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
486 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
488 (raid5rec_mod_SOURCES): New macro.
489 (raid5rec_mod_CFLAGS): Likewise.
490 (raid5rec_mod_LDFLAGS): Likewise.
491 (raid6rec_mod_SOURCES): Likewise.
492 (raid6rec_mod_CFLAGS): Likewise.
493 (raid6rec_mod_LDFLAGS): Likewise.
494 (mdraid_mod_SOURCES): Likewise.
495 (mdraid_mod_CFLAGS): Likewise.
496 (mdraid_mod_LDFLAGS): Likewise.
497 (dm_nv_mod_SOURCES): Likewise.
498 (dm_nv_mod_CFLAGS): Likewise.
499 (dm_nv_mod_LDFLAGS): Likewise.
501 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
502 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
503 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
505 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
506 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
508 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
510 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
512 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
514 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
516 * disk/raid5_recover.c: New file.
518 * disk/raid6_recover.c: Likewise.
520 * disk/mdraid_linux.c: Likewise.
522 * disk/dmraid_nvidia.c: Likewise.
524 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
527 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
528 calculate the size of raid device.
529 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
530 different layout of raid5.
531 (grub_raid_scan_device): Remove code specific to mdraid.
532 (grub_raid_list): New variable.
533 (free_array): New function.
534 (grub_raid_register): Likewise.
535 (grub_raid_unregister): Likewise.
536 (grub_raid_rescan): Likewise.
537 (GRUB_MOD_INIT): Don't iterate device here.
538 (GRUB_MOD_FINI): Use free_array to release resource.
540 * include/grub/raid.h: Remove macro and structure specific to mdraid.
541 (grub_raid5_recover_func_t): New function variable type.
542 (grub_raid6_recover_func_t): Likewise.
543 (grub_raid5_recover_func): New variable.
544 (grub_raid6_recover_func): Likewise.
545 (grub_raid_register): New function.
546 (grub_raid_unregister): Likewise.
547 (grub_raid_rescan): Likewise.
548 (grub_raid_block_xor): Likewise.
550 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
551 (CMD_CRC): New macro.
553 (read_file): Handle device as well as file.
554 (cmd_crc): New function.
555 (fstest): Handle multiple disks.
556 (options): Remove part, raw and long, add root and diskcount.
557 (usage): Add crc, remove -p, -r, -l, add -r and -c.
558 (main): Find the first non option entry and ignore subsequence options,
559 add handling for the new options, support multiple disks.
561 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
563 2008-08-23 Bean <bean123ch@gmail.com>
565 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
567 * genfslist.sh: Ignore kernel.mod.
569 * genpartmaplist.sh: Likewise.
571 2008-08-23 Robert Millan <rmh@aybabtu.com>
573 * util/getroot.c (find_root_device): Skip anything that starts with
574 a dot, not just directories. This avoids things like /dev/.tmp.md0.
576 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
578 * util/update-grub.in (GRUB_GFXMODE): Export variable.
579 * util/grub.d/00_header.in: Allow the administrator to change default
580 gfxmode via ${GRUB_GFXMODE}.
582 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
584 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
586 2008-08-21 Robert Millan <rmh@aybabtu.com>
588 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
590 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
591 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
593 2008-08-20 Carles Pina i Estany <carles@pina.cat>
595 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
596 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
598 2008-08-19 Robert Millan <rmh@aybabtu.com>
600 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
601 (struct grub_virtual_screen): Remove `cursor_color'.
602 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
604 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
606 2008-08-18 Robert Millan <rmh@aybabtu.com>
608 Unify (identical) linux_normal.c files.
609 * loader/i386/efi/linux_normal.c: Move from here ...
610 * loader/linux_normal.c: ... to here. Update all users.
611 * loader/i386/pc/linux_normal.c: Delete. Update all users.
612 * loader/i386/ieee1275/linux_normal.c: Likewise.
614 2008-08-18 Robert Millan <rmh@aybabtu.com>
616 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
617 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
618 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
619 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
620 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
622 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
623 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
624 (GRUB_LINUX_CL_END_OFFSET): ... to here.
625 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
626 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
627 (GRUB_EFI_CL_END_OFFSET): Rename to ...
628 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
629 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
630 Initialize `params->video_cursor_x' and `params->video_cursor_y'
631 portably using grub_getxy().
632 Replace `-EFI' with `-bzImage' in boot message.
634 2008-08-17 Robert Millan <rmh@aybabtu.com>
636 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
638 2008-08-17 Robert Millan <rmh@aybabtu.com>
640 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
642 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
643 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
644 (grub_machine_mmap_iterate): New function declaration.
645 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
647 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
650 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
651 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
652 Move e820 parsing from here ...
653 * kern/i386/pc/mmap.c: New file.
654 (grub_machine_mmap_iterate): ... to here.
656 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
657 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
658 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
659 (grub_available_iterate): Redeclare to return `void', and redeclare
660 its hook to use grub_uint64_t as addr and size parameters, and rename
662 (grub_machine_mmap_iterate): ... this. Update all users.
664 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
665 to make it more readable. Rename to ...
666 (grub_machine_mmap_iterate): ... this.
668 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
669 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
670 (grub_multiboot): Allocate an extra region after the payload, and fill
671 it with a Multiboot memory map. Adjust a.out loader to calculate size
672 with the extra space.
673 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
674 with the extra space.
676 2008-08-17 Carles Pina i Estany <carles@pina.cat>
678 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
680 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
682 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
683 mdate-sh to the list `find' searches for.
684 * DISTLIST: Regenerated.
686 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
688 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
689 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
690 genmoddep.awk, gensymlist.sh.in.
691 (DISTDIRS): Add bus, docs, hook, lib.
692 * DISTLIST: Regenerated.
693 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
695 2008-08-16 Robert Millan <rmh@aybabtu.com>
697 * disk/raid.c (grub_raid_init): Handle/report errors set by
698 grub_device_iterate().
699 * disk/lvm.c (grub_lvm_init): Likewise.
701 2008-08-15 Bean <bean123ch@gmail.com>
703 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
705 (datetime_mod_SOURCES): New macro.
706 (datetime_mod_CFLAGS): Likewise.
707 (datetime_mod_LDFLAGS): Likewise.
708 (date_mod_SOURCES): Likewise.
709 (date_mod_CFLAGS): Likewise.
710 (date_mod_LDFLAGS): Likewise.
711 (datehook_mod_SOURCES): Likewise.
712 (datehook_mod_CFLAGS): Likewise.
713 (datehook_mod_LDFLAGS): Likewise.
715 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
717 (datetime_mod_SOURCES): New macro.
718 (datetime_mod_CFLAGS): Likewise.
719 (datetime_mod_LDFLAGS): Likewise.
720 (date_mod_SOURCES): Likewise.
721 (date_mod_CFLAGS): Likewise.
722 (date_mod_LDFLAGS): Likewise.
723 (datehook_mod_SOURCES): Likewise.
724 (datehook_mod_CFLAGS): Likewise.
725 (datehook_mod_LDFLAGS): Likewise.
727 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
729 (datetime_mod_SOURCES): New macro.
730 (datetime_mod_CFLAGS): Likewise.
731 (datetime_mod_LDFLAGS): Likewise.
732 (date_mod_SOURCES): Likewise.
733 (date_mod_CFLAGS): Likewise.
734 (date_mod_LDFLAGS): Likewise.
735 (datehook_mod_SOURCES): Likewise.
736 (datehook_mod_CFLAGS): Likewise.
737 (datehook_mod_LDFLAGS): Likewise.
739 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
741 (datetime_mod_SOURCES): New macro.
742 (datetime_mod_CFLAGS): Likewise.
743 (datetime_mod_LDFLAGS): Likewise.
744 (date_mod_SOURCES): Likewise.
745 (date_mod_CFLAGS): Likewise.
746 (date_mod_LDFLAGS): Likewise.
747 (datehook_mod_SOURCES): Likewise.
748 (datehook_mod_CFLAGS): Likewise.
749 (datehook_mod_LDFLAGS): Likewise.
751 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
753 (datetime_mod_SOURCES): New macro.
754 (datetime_mod_CFLAGS): Likewise.
755 (datetime_mod_LDFLAGS): Likewise.
756 (date_mod_SOURCES): Likewise.
757 (date_mod_CFLAGS): Likewise.
758 (date_mod_LDFLAGS): Likewise.
759 (datehook_mod_SOURCES): Likewise.
760 (datehook_mod_CFLAGS): Likewise.
761 (datehook_mod_LDFLAGS): Likewise.
763 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
765 * commands/date.c: New file.
767 * hook/datehook.c: Likewise.
769 * include/grub/lib/datetime.h: Likewise.
771 * include/grub/i386/cmos.h: Likewise.
773 * lib/datetime.c: Likewise.
775 * lib/i386/datetime.c: Likewise.
777 * lib/efi/datetime.c: Likewise.
779 2008-08-14 Robert Millan <rmh@aybabtu.com>
781 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
782 (grub_mkelfimage_SOURCES): New variable.
783 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
785 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
786 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
787 * conf/powerpc-ieee1275.rmk: Likewise.
788 * conf/i386-ieee1275.rmk: Likewise.
790 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
791 * kern/i386/coreboot/init.c: Likewise.
793 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
794 with `<grub/cpu/kernel.h>'.
795 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
797 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
798 * kern/i386/coreboot/startup.S: Likewise.
800 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
801 (GRUB_MOD_GAP): Remove.
802 * include/grub/powerpc/kernel.h: New file.
803 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
804 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
805 * include/grub/i386/kernel.h: New file.
806 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
807 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
808 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
810 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
812 Use --directory when invoking grub_mkimage.
814 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
815 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
816 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
817 and GRUB_KERNEL_CPU_PREFIX.
819 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
821 * include/grub/err.h (grub_err_printf): New function prototype.
822 * util/misc.c (grub_err_printf): New function.
823 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
825 * kern/err.c (grub_print_error): Use grub_err_printf.
827 2008-08-13 Robert Millan <rmh@aybabtu.com>
829 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
831 2008-08-13 Robert Millan <rmh@aybabtu.com>
833 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
836 2008-08-12 Robert Millan <rmh@aybabtu.com>
838 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
839 of the relocation code from here ...
840 (grub_multiboot): ... to here.
841 (forward_relocator, backward_relocator): Move from here ...
842 * kern/i386/loader.S (grub_multiboot_forward_relocator)
843 (grub_multiboot_backward_relocator): ... to here.
844 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
845 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
846 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
847 (grub_multiboot_forward_relocator_end)
848 (grub_multiboot_backward_relocator)
849 (grub_multiboot_backward_relocator_end): New variables.
851 2008-08-12 Bean <bean123ch@gmail.com>
853 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
855 2008-08-11 Robert Millan <rmh@aybabtu.com>
857 * kern/i386/linuxbios/startup.S: Move from here ...
858 * kern/i386/coreboot/startup.S: ... to here.
860 * kern/i386/linuxbios/init.c: Move from here ...
861 * kern/i386/coreboot/init.c: ... to here.
863 * kern/i386/linuxbios/table.c: Move from here ...
864 * kern/i386/coreboot/mmap.c: ... to here.
866 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
868 2008-08-11 Robert Millan <rmh@aybabtu.com>
870 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
871 errors. Leave it to the upper layer to handle them.
873 2008-08-09 Christian Franke <franke@computer.org>
875 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
876 * conf/common.rmk: Install `grub-pe2elf' only if requested.
877 Install `grub.d/10_windows' only on Cygwin.
878 * configure.ac: Add subst of `target_os'.
879 Check `target_os' also before setting TARGET_OBJ2ELF.
880 Add `--enable-grub-pe2elf'.
882 2008-08-08 Robert Millan <rmh@aybabtu.com>
884 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
885 (grub_last_time): Change type to grub_uint64_t.
886 (grub_disk_open): Migrate code from to using grub_get_time_ms().
887 (grub_disk_close): Likewise.
889 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
890 (run_menu): Migrate code from to using grub_get_time_ms().
892 * util/misc.c (grub_get_time_ms): New function.
894 2008-08-08 Marco Gerards <marco@gnu.org>
896 * disk/ata.c (grub_ata_regget): Change return type to
898 (grub_ata_regget2): Likewise.
899 (grub_ata_wait_status): New function.
900 (grub_ata_wait_busy): Removed function, updated all users to use
901 `grub_ata_wait_status'.
902 (grub_ata_wait_drq): Likewise.
903 (grub_ata_cmd): New function.
904 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
906 (grub_ata_pio_write): Add error handling.
907 (grub_atapi_identify): Likewise.
908 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
910 (grub_ata_identify): Use `grub_ata_cmd' and improve error
911 handling. Actually use the detected registers. Reorder the
912 detection logic such that it is easier to read.
913 (grub_ata_pciinit): Do not assign the same ID to each controller.
914 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
916 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
918 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
920 2008-08-08 Marco Gerards <marco@gnu.org>
924 2008-08-07 Bean <bean123ch@gmail.com>
926 * include/grub/x86_64/pci.h: New file.
928 2008-08-07 Christian Franke <franke@computer.org>
930 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
931 (TIMER2_GATE): Likewise.
932 (grub_pit_wait): Add enable/disable of the timer2 gate
933 bit of port 0x61. This fixes a possible infinite loop.
935 2008-08-07 Bean <bean123ch@gmail.com>
937 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
938 kern/i386/tsc.c and kern/i386/pit.c.
940 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
943 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
946 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
948 2008-08-07 Bean <bean123ch@gmail.com>
950 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
952 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
954 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
955 multiple inclusion. Add #include <grub/types.h>.
957 2008-08-06 Christian Franke <franke@computer.org>
959 * conf/common.rmk: Build and install `10_windows'.
960 * util/grub.d/10_windows.in: New script.
962 2008-08-06 Pavel Roskin <proski@gnu.org>
964 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
966 2008-08-06 Robert Millan <rmh@aybabtu.com>
968 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
969 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
971 2008-08-06 Bean <bean123ch@gmail.com>
973 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
974 (grub_pxefs_fs_int): Remove dummy definition.
975 (grub_pxefs_open): Use data->block_size to store the current block
977 (grub_pxefs_read): Use block size stored in data->block_size. As the
978 value of grub_pxe_blksize can be changed after the file is opened.
980 2008-08-06 Bean <bean123ch@gmail.com>
982 * fs/i386/pc/pxe.c (curr_file): new variable.
983 (grub_pxefs_open): Simply the handling of pxe file system. Don't
984 require the dummy internal file system anymore.
985 (grub_pxefs_read): Removed.
986 (grub_pxefs_close): Likewise.
987 (grub_pxefs_fs_int): Likewise.
988 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
989 connection when we switch file.
990 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
992 2008-08-06 Robert Millan <rmh@aybabtu.com>
994 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
996 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
997 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
999 * kern/i386/halt.c: New file.
1000 * kern/i386/reboot.c: Likewise.
1001 * include/grub/i386/reboot.h: Likewise.
1002 * include/grub/i386/halt.h: Likewise.
1004 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
1005 Include `<grub/cpu/halt.h>'.
1006 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
1007 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
1009 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
1010 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
1011 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
1012 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
1013 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
1014 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
1016 * include/grub/i386/at_keyboard.h: ... to here.
1018 2008-08-05 Robert Millan <rmh@aybabtu.com>
1020 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
1021 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
1022 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
1023 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1024 `kern/generic/millisleep.c'.
1026 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
1027 instead of grub_get_rtc().
1028 (grub_tsc_init): Initialize `tsc_boot_time'.
1030 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
1031 (grub_machine_init): Use grub_tsc_init() rather than
1032 installing an RTC-based handler via grub_install_get_time_ms().
1034 * kern/i386/pit.c: New file.
1035 * include/grub/i386/pit.h: Likewise.
1037 2008-08-05 Bean <bean123ch@gmail.com>
1039 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
1041 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
1042 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
1043 (pxe_mod_SOURCES): New macro.
1044 (pxe_mod_CFLAGS): Likewise.
1045 (pxe_mod_LDFLAGS): Likewise.
1046 (pxecmd_mod_SOURCES): Likewise.
1047 (pxecmd_mod_CFLAGS): Likewise.
1048 (pxecmd_mod_LDFLAGS): Likewise.
1050 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1051 (grub_pxe_call): Likewise.
1053 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1055 * commands/i386/pc/pxecmd.c: New file.
1057 * fs/i386/pc/pxe.c: Likewise.
1059 * include/grub/i386/pc/pxe.h: Likewise.
1061 2008-08-05 Bean <bean123ch@gmail.com>
1063 * util/console.c (grub_console_cur_color): New variable.
1064 (grub_console_standard_color): Likewise.
1065 (grub_console_normal_color): Likewise.
1066 (grub_console_highlight_color): Likewise.
1067 (color_map): Likewise.
1068 (use_color): Likewise.
1069 (NUM_COLORS): New macro.
1070 (grub_ncurses_setcolorstate): Handle color properly.
1071 (grub_ncurses_setcolor): Don't change color here, just remember the
1072 settings, color will be set in grub_ncurses_setcolorstate.
1073 (grub_ncurses_getcolor): New function.
1074 (grub_ncurses_init): Initialize color pairs.
1075 (grub_ncurses_term): New member grub_ncurses_getcolor.
1077 2008-08-05 Colin D Bennett <colin@gibibit.com>
1079 High resolution timer support. Implemented for x86 CPUs using TSC.
1080 Extracted generic grub_millisleep() so it's linked in only as needed.
1081 This requires a Pentium compatible CPU; if the RDTSC instruction is
1082 not supported, then it falls back on the generic grub_get_time_ms()
1083 implementation that uses the machine's RTC.
1085 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1086 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1087 `kern/generic/millisleep.c'.
1089 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1090 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1092 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1093 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1095 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1097 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1098 `kern/generic/millisleep.c'.
1100 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1102 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1104 * kern/generic/rtc_get_time_ms.c: New file.
1106 * kern/generic/millisleep.c: New file.
1108 * kern/misc.c: Don't include
1109 <kern/time.h> anymore.
1110 (grub_millisleep_generic): Removed.
1112 * commands/sleep.c (grub_interruptible_millisleep): Uses
1113 grub_get_time_ms() instead of grub_get_rtc().
1115 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
1117 (grub_cpu_is_cpuid_supported): New inline function.
1118 (grub_cpu_is_tsc_supported): New inline function.
1119 (grub_tsc_init): New function prototype.
1120 (grub_tsc_get_time_ms): New function prototype.
1122 * kern/i386/tsc.c (grub_get_time_ms): New file.
1124 * include/grub/time.h: Include <grub/types.h.
1125 (grub_millisleep_generic): Removed.
1126 (grub_get_time_ms): New prototype.
1127 (grub_install_get_time_ms): New prototype.
1128 (grub_rtc_get_time_ms): New prototype.
1130 * kern/time.c (grub_get_time_ms): New function.
1131 (grub_install_get_time_ms): New function.
1133 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
1134 <grub/time.h> anymore.
1135 (grub_millisleep): Removed.
1136 (grub_machine_init): Call grub_tsc_init.
1138 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1139 get_time_ms() implementation.
1141 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1142 (ieee1275_get_time_ms): New function.
1143 (grub_machine_init): Install get_time_ms() implementation.
1145 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1146 (grub_machine_init): Call grub_tsc_init().
1147 (grub_millisleep): Removed.
1149 * kern/ieee1275/init.c (grub_millisleep): Removed.
1150 (grub_machine_init): Install ieee1275_get_time_ms()
1152 (ieee1275_get_time_ms): New function.
1153 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1156 2008-08-05 Marco Gerards <marco@gnu.org>
1158 * disk/ata.c: Include <grub/pci.h>.
1159 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1160 (grub_ata_initialize): Rewritten.
1161 (grub_ata_device_initialize): New function.
1163 2008-08-04 Pavel Roskin <proski@gnu.org>
1165 * kern/main.c: Include grub/mm.h.
1167 2008-08-04 Robert Millan <rmh@aybabtu.com>
1169 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1170 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1171 corruption problem).
1173 2008-08-04 Robert Millan <rmh@aybabtu.com>
1175 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1176 warnings introduced in my last commit.
1178 2008-08-03 Robert Millan <rmh@aybabtu.com>
1180 Make PCI available on all i386 architectures.
1182 * include/grub/i386/pc/pci.h: Move from here ...
1183 * include/grub/i386/pci.h: ... to here.
1185 * include/grub/i386/pc/pci.h: Remove.
1186 * include/grub/i386/efi/pci.h: Remove.
1187 * include/grub/x86_64/efi/pci.h: Remove.
1189 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1192 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1193 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1194 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1196 * conf/i386-ieee1275.rmk: Likewise.
1198 2008-08-03 Robert Millan <rmh@aybabtu.com>
1200 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1201 (grub_console_setcursor): Make it possible to set cursor off.
1203 2008-08-03 Robert Millan <rmh@aybabtu.com>
1205 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
1206 of modules instead of assuming which platform provides what.
1207 * util/update-grub.in: Likewise.
1209 2008-08-03 Robert Millan <rmh@aybabtu.com>
1211 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1212 instead of `grub_install_dos_part' to determine whether a drive needs
1213 to be prepended to prefix (`grub_install_dos_part' is not reliable,
1214 because it can be overridden when loading GRUB via Multiboot).
1216 2008-08-02 Robert Millan <rmh@aybabtu.com>
1218 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1220 2008-08-02 Robert Millan <rmh@aybabtu.com>
1222 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1223 of informational grub_dprintf() calls.
1225 2008-08-02 Robert Millan <rmh@aybabtu.com>
1227 * disk/memdisk.c (memdisk_size): Don't initialize.
1228 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
1230 * include/grub/i386/pc/kernel.h
1231 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
1232 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
1233 (grub_memdisk_image_size, grub_arch_memdisk_addr)
1234 (grub_arch_memdisk_size): Remove.
1236 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
1237 field (was only used to transfer a constant). Add `type' field to
1238 support multiple module types.
1239 (grub_module_iterate): New function.
1241 * kern/device.c (grub_device_open): Do not hide error messages
1242 when grub_disk_open() fails. Use grub_print_error() instead.
1244 * kern/i386/pc/init.c (grub_arch_modules_addr)
1245 (grub_arch_memdisk_size): Remove functions.
1246 (grub_arch_modules_addr): Return the module address in high memory
1247 (now that it isn't copied anymore).
1249 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
1250 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
1251 decompression routine (grub_total_module_size already includes that
1252 now). Don't copy modules back to low memory.
1254 * kern/main.c: Include `<grub/mm.h>'.
1255 (grub_load_modules): Split out (and use) ...
1256 (grub_module_iterate): ... this function, which iterates through
1257 module objects and runs a hook.
1258 Comment out grub_mm_init_region() call, as it would cause non-ELF
1259 modules to be overwritten.
1261 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
1262 the memdisk image in its own region, make it part of the module list.
1263 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
1264 (main): Parse --memdisk|-m option, and pass user-provided path as
1265 parameter to generate_image().
1266 (add_segments): Pass `memdisk_path' down to load_modules().
1267 (load_modules): Embed memdisk image in module section when requested.
1268 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
1269 `header.type' instead of `header.offset'.
1271 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
1272 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
1273 (memdisk_mod_LDFLAGS): New variables.
1274 * conf/i386-coreboot.rmk: Likewise.
1275 * conf/i386-ieee1275.rmk: Likewise.
1277 2008-08-02 Robert Millan <rmh@aybabtu.com>
1279 * loader/i386/pc/multiboot.c (playground, forward_relocator)
1280 (backward_relocator): New variables. Used to allocate and relocate
1281 the payload, respectively.
1282 (grub_multiboot_load_elf32): Load into heap instead of requested
1283 address, install the appropriate relocator code in each bound of
1284 the payload, and set the entry point such that
1285 grub_multiboot_real_boot() will jump to one of them.
1287 * kern/i386/loader.S (grub_multiboot_payload_size)
1288 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1289 (grub_multiboot_payload_entry_offset): New variables.
1290 (grub_multiboot_real_boot): Set cpu context to what the relocator
1291 expects, and jump to the relocator instead of the payload.
1293 * include/grub/i386/loader.h (grub_multiboot_payload_size)
1294 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1295 (grub_multiboot_payload_entry_offset): Export.
1297 2008-08-01 Bean <bean123ch@gmail.com>
1299 * normal/menu_entry.c (editor_getline): Don't return the original
1300 string as result, as it will be released by lexer once it has done
1303 2008-08-01 Robert Millan <rmh@aybabtu.com>
1305 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
1306 within menuentries, not before them.
1307 util/grub.d/10_hurd.in: Likewise.
1309 2008-08-01 Bean <bean123ch@gmail.com>
1311 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
1312 (bufio_mod_SOURCES): New macro.
1313 (bufio_mod_CFLAGS): Likewise.
1314 (bufio_mod_LDFLAGS): Likewise.
1316 * include/grub/bufio.h: New file.
1318 * io/bufio.c: Likewise.
1320 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
1321 (grub_video_reader_png): Use grub_buffile_open to open file.
1323 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
1324 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
1326 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
1327 (grub_video_reader_tga): Use grub_buffile_open to open file.
1329 * font/manager.c: Include <grub/bufio.h>.
1330 (add_font): Use grub_buffile_open to open file.
1332 2008-07-31 Robert Millan <rmh@aybabtu.com>
1334 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
1335 ELF segments, use a macro for arbitrarily accessing any of them instead
1336 of preparing a pointer that allows access to one at a time.
1337 (grub_multiboot_load_elf64): Likewise.
1339 2008-07-31 Bean <bean123ch@gmail.com>
1341 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
1342 GRUB_KERNEL_MACHINE_DATA_END.
1344 2008-07-30 Robert Millan <rmh@aybabtu.com>
1346 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
1347 Increase from 0x50 to 0x60.
1348 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
1349 use UUIDs to identify the root drive for them. If that's not
1351 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
1352 check, for cross-disk installs.
1354 2008-07-30 Robert Millan <rmh@aybabtu.com>
1356 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1357 is non-empty, use it to set the `prefix' environment variable instead
1358 of the usual approach.
1359 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1360 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1361 environment variable instead of dummy make_install_device().
1363 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1364 (start): Insert a data section, with `grub_prefix' variable.
1365 * kern/i386/linuxbios/startup.S: Likewise.
1367 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1368 New variable reference.
1369 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1370 New macro. Defines offset of `grub_prefix' within startup.S (relative
1372 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
1373 section within startup.S (relative to `start').
1374 * include/grub/i386/coreboot/kernel.h: Likewise.
1376 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1377 Overwrite grub_prefix with its contents, at the beginning of the
1379 (main): Understand -p|--prefix.
1381 2008-07-30 Robert Millan <rmh@aybabtu.com>
1383 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1385 2008-07-30 Robert Millan <rmh@aybabtu.com>
1387 * term/i386/pc/vga_text.c (grub_console_cls): Use
1388 grub_console_gotoxy() to go back to beginning of the screen.
1389 Found by Patrick Georgi <patrick.georgi@coresystems.de>
1391 2008-07-29 Christian Franke <franke@computer.org>
1393 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1394 Add conversion of emulated mount points on Cygwin.
1396 2008-07-29 Christian Franke <franke@computer.org>
1398 * util/update-grub.in: Add a check for admin
1400 Remove old `grub.cfg.new' before creation.
1401 Add `-f' to `mv' to handle the different filesystem
1402 semantics of Windows.
1404 2008-07-29 Bean <bean123ch@gmail.com>
1406 * normal/main.c (get_line): Fix buffer overflow bug.
1408 2008-07-28 Robert Millan <rmh@aybabtu.com>
1410 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1411 (struct grub_apple_header): New struct. Describes the layout of
1413 (apple_partition_map_iterate): Check the header magic as well as the
1414 partition magic (which was already being checked).
1416 2008-07-28 Pavel Roskin <proski@gnu.org>
1418 * genmk.rb: Add a warning to the beginning of the output that
1419 it's a generated file and should not be edited.
1421 2008-07-28 Robert Millan <rmh@aybabtu.com>
1423 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1424 with the same number are found, just use issue a warning with
1425 grub_dprintf(), as this error has been reported to be non-fatal.
1427 2008-07-27 Robert Millan <rmh@aybabtu.com>
1429 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1432 2008-07-27 Bean <bean123ch@gmail.com>
1434 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1435 (grub_fat_find_dir): Ignore case when comparing filename.
1437 2008-07-27 Bean <bean123ch@gmail.com>
1439 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1440 smallino, as it's more descriptive, and i8count can be confused with
1441 the other field count.
1442 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1445 2008-07-27 Bean <bean123ch@gmail.com>
1447 * commands/crc.c: New file.
1449 * lib/crc.c: Likewise.
1451 * include/grub/lib/crc.h: Likewise.
1453 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1455 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1456 (hexdump): Move this function to ...
1458 * lib/hexdump.c: ... here.
1460 * include/grub/hexdump.h: Renamed to ...
1462 * include/grub/lib/hexdump.h: ... this.
1464 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1466 * util/grub-editenv.c: Likewise.
1468 * include/envblk.h: Renamed to ...
1470 * include/lib/envblk.h: ... this.
1472 * util/envblk.c: Renamed to ...
1474 * lib/envblk.c: ... this.
1476 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1478 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1479 (pkglib_MODULES): Add crc.mod.
1480 (hexdump_mod_SOURCES): Add lib/hexdump.c.
1481 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1482 (crc_mod_SOURCES): New macro.
1483 (crc_mod_CFLAGS): Likewise.
1484 (crc_mod_LDFLAGS): Likewise.
1486 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1488 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1490 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1492 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1494 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1496 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
1498 * commands/help.c: Include <grub/term.h>.
1499 (TERM_WIDTH): Removed. Updated all users.
1501 2008-07-27 Pavel Roskin <proski@gnu.org>
1503 * util/getroot.c (find_root_device): Rephrase a comment to avoid
1504 spurious warnings about a comment within a comment.
1506 2008-07-25 Robert Millan <rmh@aybabtu.com>
1508 * util/getroot.c (find_root_device): Skip devices that match
1509 /dev/dm-[0-9]. This lets the real device be found for any type of
1510 abstraction (LVM, EVMS, RAID..).
1511 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1512 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
1513 device is found first, find_root_device() will now skip it.
1515 2008-07-24 Pavel Roskin <proski@gnu.org>
1517 * include/grub/types.h: Use __builtin_bswap32() and
1518 __builtin_bswap64() with gcc 4.3 and newer.
1520 2008-07-24 Christian Franke <franke@computer.org>
1522 * util/i386/pc/grub-install.in: If `--debug' is specified,
1523 pass `--verbose' to grub-setup.
1524 Abort script if make_system_path_relative_to_its_root() fails.
1526 2008-07-24 Bean <bean123ch@gmail.com>
1528 * configure.ac: Fixed a bug caused by the previous cygwin patch,
1529 variable `target_platform' should be `platform'.
1531 2008-07-24 Bean <bean123ch@gmail.com>
1533 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1534 (grub_png_init_fixed_block): New function.
1535 (grub_png_decode_image_data): Handle fixed huffman code compression.
1537 2008-07-24 Bean <bean123ch@gmail.com>
1539 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1540 (grub_pe2elf_SOURCES): New macro.
1541 (CLEANFILES): Add grub-pe2elf.
1543 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1544 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1545 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1546 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1547 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1548 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1549 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1550 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
1551 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
1552 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
1553 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
1554 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
1555 (GRUB_PE32_DT_FUNCTION): Likewise.
1556 (GRUB_PE32_REL_I386_DIR32): Likewise.
1557 (GRUB_PE32_REL_I386_REL32): Likewise.
1558 (grub_pe32_symbol): New structure.
1559 (grub_pe32_reloc): Likewise.
1561 * util/grub-pe2elf.c: New file.
1563 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
1564 start symbol in non pc platform.
1566 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
1568 The following patches are from Christian Franke.
1570 * include/grub/dl.h: Remove .previous, gas supports this only
1573 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
1574 Remove .type, gas supports this only for ELF format.
1576 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
1577 nullbytes in symbol table. This fixes an infinite loop if table is
1580 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
1581 TARGET_IMG_LDFLAGS and EXEEXT.
1583 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
1584 TARGET_IMG_LDFLAGS_AC.
1585 (grub_CHECK_STACK_ARG_PROBE): New function.
1587 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
1589 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
1591 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
1592 to set TARGET_IMG_LD* accordingly.
1593 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
1594 Add call to grub_CHECK_STACK_ARG_PROBE.
1595 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
1597 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
1599 * genmk.rb: Add EXEEXT to CLEANFILES.
1601 2008-07-23 Robert Millan <rmh@aybabtu.com>
1603 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
1604 define the codes for arrows and lines used for the menu).
1605 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
1608 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
1609 fonts, because the latter are too slow.
1611 2008-07-21 Bean <bean123ch@gmail.com>
1613 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
1614 a20. Run keyboard test last, as it will cause macbook to halt.
1616 2008-07-18 Pavel Roskin <proski@gnu.org>
1618 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
1619 load foreign architecture modules correctly anyway. Keep
1620 support for loading host architecture modules, whether we
1621 compile them or not.
1623 2008-07-17 Pavel Roskin <proski@gnu.org>
1625 * configure.ac: Use -m32 or -m64 regardless of whether we had to
1626 change target_cpu. The compiler default can mismatch target_cpu
1629 * disk/efi/efidisk.c: Fix format warnings on x86_64.
1630 * kern/efi/efi.c: Likewise.
1632 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
1633 target compiler is functional.
1634 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
1637 * configure.ac: Default to efi platform for x86_64-apple. Allow
1638 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
1639 adjustments from the rest, only do them if target is not
1640 explicitly given. Merge other adjustments with the final sanity
1641 check. Remove an extraneous check for supported CPU. Be
1642 specific which CPU and which platform is not supported.
1644 * configure.ac: Default to pc platform for x86_64.
1646 2008-07-17 Robert Millan <rmh@aybabtu.com>
1648 Partial LinuxBIOS -> Coreboot rename.
1650 * conf/i386-linuxbios.rmk: Renamed to ...
1651 * conf/i386-coreboot.rmk: ... this.
1652 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
1653 * configure.ac: Accept "coreboot" as input platform (but maintain
1654 compatibility with "linuxbios").
1655 * include/grub/i386/linuxbios: Renamed to ...
1656 * include/grub/i386/coreboot: ... this.
1658 2008-07-17 Bean <bean123ch@gmail.com>
1660 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
1661 (appleldr_mod_SOURCE): New variable.
1662 (appleldr_mod_CFLAGS): Likewise.
1663 (appleldr_mod_LDFLAGS): Likewise.
1664 (pci_mod_SOURCES): Likewise.
1665 (pci_mod_CFLAGS): Likewise.
1666 (pci_mod_LDFLAGS): Likewise.
1667 (lspci_mod_SOURCES): Likewise.
1668 (lspci_mod_CFLAGS): Likewise.
1669 (lspci_mod_LDFLAGS): Likewise.
1671 * conf/x86_64-efi.rmk: New file.
1673 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
1675 (grub_efidisk_write): Likewise.
1677 * include/efi/api.h (efi_call_0): New macro.
1678 (efi_call_1): Likewise.
1679 (efi_call_2): Likewise.
1680 (efi_call_3): Likewise.
1681 (efi_call_4): Likewise.
1682 (efi_call_5): Likewise.
1683 (efi_call_6): Likewise.
1685 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
1686 grub_rescue_cmd_chainloader.
1688 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
1689 (grub_pe32_optional_header): Change some fields based on i386 or
1691 (GRUB_PE32_PE32_MAGIC): Likewise.
1693 * include/grub/efi/uga_draw.h: New file.
1695 * include/grub/elf.h (STN_ABS): New constant.
1696 (R_X86_64_NONE): Relocation constant for x86_64.
1697 (R_X86_64_64): Likewise.
1698 (R_X86_64_PC32): Likewise.
1699 (R_X86_64_GOT32): Likewise.
1700 (R_X86_64_PLT32): Likewise.
1701 (R_X86_64_COPY): Likewise.
1702 (R_X86_64_GLOB_DAT): Likewise.
1703 (R_X86_64_JUMP_SLOT): Likewise.
1704 (R_X86_64_RELATIVE): Likewise.
1705 (R_X86_64_GOTPCREL): Likewise.
1706 (R_X86_64_32): Likewise.
1707 (R_X86_64_32S): Likewise.
1708 (R_X86_64_16): Likewise.
1709 (R_X86_64_PC16): Likewise.
1710 (R_X86_64_8): Likewise.
1711 (R_X86_64_PC8): Likewise.
1713 * include/grub/i386/efi/pci.h: New file.
1715 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
1716 Change it value based on platform.
1717 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
1718 (GRUB_E820_RAM): Likewise.
1719 (GRUB_E820_RESERVED): Likewise.
1720 (GRUB_E820_ACPI): Likewise.
1721 (GRUB_E820_NVS): Likewise.
1722 (GRUB_E820_EXEC_CODE): Likewise.
1723 (GRUB_E820_MAX_ENTRY): Likewise.
1724 (grub_e820_mmap): New structure.
1725 (linux_kernel_header): Change the efi field according to different
1726 kernel version, also field from linux_kernel_header.
1728 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
1730 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
1731 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
1732 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
1733 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
1734 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
1735 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
1736 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
1737 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
1738 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
1739 (GRUB_PCI_ADDR_IO_MASK): Likewise.
1741 * include/grub/x86_64/efi/kernel.h: New file.
1743 * include/grub/x86_64/efi/loader.h: Likewise.
1745 * include/grub/x86_64/efi/machine.h: Likewise.
1747 * include/grub/x86_64/efi/pci.h: Likewise.
1749 * include/grub/x86_64/efi/time.h: Likewise.
1751 * include/grub/x86_64/linux.h: Likewise.
1753 * include/grub/x86_64/setjmp.h: Likewise.
1755 * include/grub/x86_64/time.h: Likewise.
1757 * include/grub/x86_64/types.h: Likewise.
1759 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
1760 GRUB_TARGET_SIZEOF_VOID_P.
1762 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
1763 (grub_efi_locate_handle): Likewise.
1764 (grub_efi_open_protocol): Likewise.
1765 (grub_efi_set_text_mode): Likewise.
1766 (grub_efi_stall): Likewise.
1767 (grub_exit): Likewise.
1768 (grub_reboot): Likewise.
1769 (grub_halt): Likewise.
1770 (grub_efi_exit_boot_services): Likewise.
1771 (grub_get_rtc): Likewise.
1773 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
1774 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
1775 (grub_efi_allocate_pages): Wrap efi calls.
1776 (grub_efi_free_pages): Wrap efi calls.
1777 (grub_efi_get_memory_map): Wrap efi calls.
1779 * kern/x86_64/dl.c: New file.
1781 * kern/x86_64/efi/callwrap.S: Likewise.
1783 * kern/x86_64/efi/startup.S: Likewise.
1785 * loader/efi/appleloader.c: Likewise.
1787 * loader/efi/chainloader.c (cmdline): New variable.
1788 (grub_chainloader_unload): Wrap efi calls.
1789 (grub_chainloader_boot): Likewise.
1790 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
1793 * loader/efi/chainloader_normal.c (chainloader_command):
1794 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
1797 * loader/i386/efi/linux.c (allocate_pages): Change allocation
1799 (grub_e820_add_region): New function.
1800 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
1802 (grub_find_video_card): New function.
1803 (grub_linux_setup_video): New function.
1804 (grub_rescue_cmd_linux): Probe for video information.
1806 * normal/x86_64/setjmp.S: New file.
1808 * term/efi/console.c (map_char): New function.
1809 (grub_console_putchar): Map unicode char.
1810 (grub_console_checkkey): Wrap efi calls.
1811 (grub_console_getkey): Likewise.
1812 (grub_console_getwh): Likewise.
1813 (grub_console_gotoxy): Likewise.
1814 (grub_console_cls): Likewise.
1815 (grub_console_setcolorstate): Likewise.
1816 (grub_console_setcursor): Likewise.
1818 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
1820 2008-07-16 Pavel Roskin <proski@gnu.org>
1822 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
1825 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
1826 pointer, not an integer. This fixes a warning and prevents
1827 precision loss on 64-bit systems.
1828 (relocate_addresses): Remove unneeded cast.
1830 2008-07-15 Pavel Roskin <proski@gnu.org>
1832 * kern/i386/ieee1275/init.c: Include grub/cache.h.
1834 * term/ieee1275/ofconsole.c: Disable code unused on i386.
1836 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
1837 Fix comparison between signed and unsigned.
1839 * include/grub/i386/ieee1275/console.h: Declare
1840 grub_console_init() and grub_console_fini().
1842 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
1843 It's empty and unused.
1845 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
1846 beginning to avoid warnings with some compilers.
1848 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
1849 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
1851 2008-07-14 Pavel Roskin <proski@gnu.org>
1853 * kern/env.c (grub_register_variable_hook): Don't copy empty
1854 string, it leaks memory. Pass "" to grub_env_set(), it should
1855 handle constant strings.
1857 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
1858 * commands/cmp.c (grub_cmd_cmp): Likewise.
1859 * kern/dl.c (grub_dl_flush_cache): Likewise.
1860 (grub_dl_load_core): Likewise.
1861 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
1862 (grub_elf64_load_phdrs): Likewise.
1864 2008-07-13 Pavel Roskin <proski@gnu.org>
1866 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
1867 between signed and unsigned.
1868 (LzmaEnc_Finish): Fix warning about an unused parameter.
1870 2008-07-13 Bean <bean123ch@gmail.com>
1872 * Makefile.in (enable_lzo): New rule.
1874 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
1876 * configure.ac (ENABLE_LZO): New option --enable-lzo.
1878 * boot/i386/pc/lnxboot.S: #include <config.h>.
1880 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
1881 its value according to the compression algorithm used, lzo or lzma.
1883 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
1884 compression algorithm according to configure macro.
1886 * kern/i386/pc/startup.S (codestart): Likewise.
1888 * kern/i386/pc/lzma_decode.S: New file.
1890 * include/grub/lib/LzFind.h: Likewise.
1892 * include/grub/lib/LzHash.h: Likewise.
1894 * include/grub/lib/LzmaDec.h: Likewise.
1896 * include/grub/lib/LzmaEnc.h: Likewise.
1898 * include/grub/lib/LzmaTypes.h: Likewise.
1900 * lib/LzFind.c: Likewise.
1902 * lib/LzmaDec.c: Likewise.
1904 * lib/LzmaEnc.c: Likewise.
1906 2008-07-13 Bean <bean123ch@gmail.com>
1908 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
1909 (grub_ext4_extent_header): New structure.
1910 (grub_ext4_extent): Likewise.
1911 (grub_ext4_extent_idx): Likewise.
1912 (grub_ext4_find_leaf): New function.
1913 (grub_ext2_read_block): Handle extents.
1915 2008-07-12 Robert Millan <rmh@aybabtu.com>
1917 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
1919 2008-07-11 Robert Millan <rmh@aybabtu.com>
1921 * util/grub.d/40_custom.in: New file. Example on how to add custom
1922 entries to /etc/grub.d.
1923 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
1924 40_custom (implicitly, by merging all the grub.d rules).
1926 2008-07-11 Pavel Roskin <proski@gnu.org>
1928 * commands/read.c (grub_getline): Fix invalid memory access.
1929 Don't add newline to the variable value.
1931 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
1932 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
1933 (serial_hw_get_port): Check validity of the port number.
1934 (grub_cmd_serial): Check return value of serial_hw_get_port().
1936 2008-07-07 Pavel Roskin <proski@gnu.org>
1938 * boot/i386/pc/diskboot.S (notification_string): Replace
1939 "Loading kernel" with just "loading". This is shorter, less
1940 confusing and saves a few bytes for possible future changes.
1942 2008-07-05 Pavel Roskin <proski@gnu.org>
1944 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
1945 size for ATAPI devices, they are undefined. Output sector
1946 number in decimal form.
1948 * disk/ata.c: Use named constants for status bits.
1950 2008-07-04 Pavel Roskin <proski@gnu.org>
1952 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
1953 grub_addr_t before casting it to the void pointer to fix a
1954 warning. Non-addressable regions are discarded earlier.
1955 (grub_arch_modules_addr): Cast _end to grub_addr_t.
1956 * kern/i386/linuxbios/table.c: Include grub/misc.h.
1957 (check_signature): Don't shadow table_header.
1958 (grub_linuxbios_table_iterate): Cast numeric constants to
1959 grub_linuxbios_table_header_t.
1960 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
1963 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
1966 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
1967 pointer, which can cause warnings. Support 64-bit addresses.
1969 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
1970 of sizeof(long). This fixes PowerPC image generation on x86_64.
1972 2008-07-04 Robert Millan <rmh@aybabtu.com>
1974 This fixes a performance issue when pc & gpt partmap iterators
1975 didn't abort iteration even after our hook found what it was
1976 looking for (often causing expensive probes of non-existent drives).
1978 Some callers relied on previous buggy behaviour, since they would
1979 rise an error when their own hooks caused early abortion of its
1982 * kern/device.c (grub_device_open): Improve error message.
1983 * disk/lvm.c (grub_lvm_open): Likewise.
1984 * disk/raid.c (grub_raid_open): Likewise.
1986 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
1987 when hook requests it, independently of grub_errno.
1988 (pc_partition_map_probe): Do not fail when find_func() caused
1989 early abortion of pc_partition_map_iterate().
1991 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
1992 when hook requests it, independently of grub_errno.
1993 (gpt_partition_map_probe): Do not fail when find_func() caused
1994 early abortion of gpt_partition_map_iterate().
1996 * kern/partition.c (grub_partition_iterate): Abort parent iteration
1997 when hook requests it, independently of grub_errno. Do not fail when
1998 part_map_iterate_hook() caused early abortion of p->iterate().
2000 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
2001 when grub_partition_iterate() returned with non-zero.
2003 2008-07-03 Pavel Roskin <proski@gnu.org>
2005 * disk/ata.c (grub_ata_pio_write): Check status before writing,
2006 like we do in grub_ata_pio_read().
2007 (grub_ata_readwrite): Always write individual sectors. Fix the
2008 sector count for the remainder.
2009 (grub_ata_write): Enable writing to ATA devices. Correctly
2010 report error for ATAPI devices.
2012 2008-07-02 Pavel Roskin <proski@gnu.org>
2014 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
2017 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
2018 for every read sector, we already increment it for the whole
2019 batch. This fixes reading more than 256 sectors at once.
2021 * util/grub-editenv.c (cmd_info): Cast argument to long
2022 explicitly. ptrdiff_t reduces to int on i386.
2024 * util/grub-editenv.c (main): Be specific which parameter is
2027 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
2028 (memdisk): Make memdisk_orig_addr a pointer.
2030 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
2031 for file offsets, use grub_off_t instead. Fix printf format
2034 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
2035 there. Real unexpected warnings should not drown in the noise
2036 about known problems.
2038 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
2039 grub_disk_addr_t for memory addresses.
2041 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
2042 explicitly to fix a warning.
2044 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
2046 * Makefile.in (MODULE_LDFLAGS): New variable.
2047 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
2048 the linker accepts --build-id=none.
2049 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
2051 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2053 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2054 those in Linux XFS code. Provide a way to access 64-bit parent
2056 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
2057 the end of struct grub_xfs_dir_header.
2059 2008-07-02 Bean <bean123ch@gmail.com>
2061 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2062 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2063 and GRUB_IEEE1275_FLAG_NO_ANSI.
2065 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2066 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2067 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2069 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2070 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2072 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2073 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2075 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2076 esc sequence on non ANSI terminal.
2077 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2079 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2082 2008-07-02 Bean <bean123ch@gmail.com>
2084 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2085 (grub_editenv_SOURCES): New variable.
2086 (pkglib_MODULES): Add loadenv.mod.
2087 (loadenv_mod_SOURCES): New variable.
2088 (loadenv_mod_CFLAGS): Likewise.
2089 (loadenv_mod_LDFLAGS): Likewise.
2091 * include/grub/envblk.h: New file.
2093 * util/envblk.c: New file.
2095 * util/grub-editenv.c: New file.
2097 * commands/loadenv.c: New file.
2099 2008-07-01 Pavel Roskin <proski@gnu.org>
2101 * include/multiboot2.h (struct multiboot_tag_module): Use char,
2102 not unsigned char. This fixes warnings and is consistent with
2105 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2107 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2109 * term/tparm.c (analyze): Always set *popcount.
2111 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2112 cast to fix a warning.
2114 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2115 cast to suppress a warning.
2117 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2118 grub_fshelp_read_file() expects.
2120 * fs/fat.c: Fix UUID calculation on big-endian systems. We
2121 write uuid as a 32-bit value in CPU byte order, so declare and
2124 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2125 long if the format specifier expects it.
2126 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2127 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2128 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2129 long to fix a warning.
2130 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2131 grub_dprintf() arguments to fix warnings.
2133 2008-06-30 Pavel Roskin <proski@gnu.org>
2135 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2136 install_bsd_part immediately before core.img is embedded or
2137 modified on disk. This fixes core.img verification if core.img
2140 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2141 core_path to calculate the blocklist.
2142 Patch from Javier Martín <lordhabbit@gmail.com>
2144 2008-06-29 Robert Millan <rmh@aybabtu.com>
2146 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
2147 block to disk block.
2148 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2149 Patch from Niels Böhm <bitbucket@arcor.de>
2151 2008-06-29 Robert Millan <rmh@aybabtu.com>
2153 * util/update-grub_lib.in (font_path): Search for fonts in
2154 /boot/grub first, which is more likely to be readable (we aren't
2155 deciding where fonts live, just looking for them).
2157 2008-06-26 Pavel Roskin <proski@gnu.org>
2159 * util/biosdisk.c (read_device_map): Don't leave dead map
2160 entries for devices failing stat() check.
2162 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2163 core_path_dev for the core.img path on the target device.
2165 2008-06-26 Robert Millan <rmh@aybabtu.com>
2167 * disk/fs_uuid.c: New file.
2168 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2169 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2170 (fs_uuid_mod_LDFLAGS): New variables.
2171 * include/grub/disk.h (grub_disk_dev_id): Add
2172 `GRUB_DISK_DEVICE_UUID_ID'.
2173 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2174 implement iterate().
2176 2008-06-26 Robert Millan <rmh@aybabtu.com>
2178 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2179 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2180 Linux image includes no initrd.
2182 2008-06-21 Javier Martín <lordhabbit@gmail.com>
2184 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2185 call to resolve the core image location that effectively appended the
2188 2008-06-21 Robert Millan <rmh@aybabtu.com>
2190 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2193 * util/grub.d/10_hurd.in: ... to here ...
2194 * util/grub.d/10_linux.in: ... and here.
2196 2008-06-19 Robert Millan <rmh@aybabtu.com>
2198 * kern/main.c (grub_main): Export `prefix' variable immediately
2199 after it has been set by grub_machine_set_prefix().
2201 2008-06-19 Robert Millan <rmh@aybabtu.com>
2203 * commands/search.c (search_label, search_fs_uuid, search_file): Print
2204 search result when not saving to variable, not the other way around.
2205 When saving to variable, abort iteration as soon as a match is found.
2207 2008-06-19 Robert Millan <rmh@aybabtu.com>
2209 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2210 check for partition that provides /boot/grub. Its logic is flawed,
2211 as it prevents prepare_grub_to_access_device() from being called
2214 2008-06-19 Robert Millan <rmh@aybabtu.com>
2216 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2217 "insmod" command directly when abstraction modules are needed,
2218 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
2219 since it had already been processed).
2221 2008-06-19 Pavel Roskin <proski@gnu.org>
2223 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2224 changed. This is needed in case GRUB_LIBDIR changes.
2225 * conf/i386-ieee1275.rmk: Likewise.
2226 * conf/i386-linuxbios.rmk: Likewise.
2227 * conf/i386-pc.rmk: Likewise.
2228 * conf/powerpc-ieee1275.rmk: Likewise.
2230 2008-06-18 Pavel Roskin <proski@gnu.org>
2232 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
2233 kernel_elf_symlist.c to symlist.c for consistency with other
2234 architectures. Update all users.
2235 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2237 2008-06-18 Robert Millan <rmh@aybabtu.com>
2239 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
2242 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
2243 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
2244 a RAID device, run setup() for all members independently on whether
2245 LVM abstraction is being used.
2246 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
2247 If grub-mkimage has set `*install_dos_part == -2', don't override this
2249 Perform *install_dos_part adjustments independently on whether
2250 we're embedding or not.
2251 Clarify error message when image is too big for embedding.
2252 Remove duplicate *install_dos_part stanza.
2254 2008-06-17 Robert Millan <rmh@aybabtu.com>
2256 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
2257 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
2259 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
2260 values in grub_ofconsole_normal_color and
2261 grub_ofconsole_highlight_color (they're not directly related to
2262 background and foreground).
2263 (grub_ofconsole_setcolorstate): Extract background and foreground
2264 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
2266 2008-06-17 Robert Millan <rmh@aybabtu.com>
2268 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
2269 /boot/grub for the check in last commit, not /boot (they could be
2270 different partitions).
2272 2008-06-16 Robert Millan <rmh@aybabtu.com>
2274 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
2275 asked to setup access for the same partition that provides /boot,
2276 don't bother using UUIDs since our root already has the value we
2279 2008-06-16 Robert Millan <rmh@aybabtu.com>
2281 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
2283 Patch from Sven Mueller <sven@debian.org>.
2285 2008-06-16 Robert Millan <rmh@aybabtu.com>
2287 * util/update-grub.in: Check for $EUID instead of $UID.
2288 Reported by Vincent Zweije.
2290 2008-06-16 Bean <bean123ch@gmail.com>
2292 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
2293 (grub_ext2_read_block): Likewise.
2294 (grub_ext2_read_inode): Likewise.
2295 (grub_ext2_mount): Likewise.
2296 (grub_ext2_close): Likewise.
2297 (grub_ext3_get_journal): Removed.
2299 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
2300 (grub_reiserfs_read_symlink): Likewise.
2301 (grub_reiserfs_mount): Likewise.
2302 (grub_reiserfs_open): Likewise.
2303 (grub_reiserfs_read): Likewise.
2304 (grub_reiserfs_close): Likewise.
2305 (grub_reiserfs_get_journal): Removed.
2307 * fs/fshelp.c (grub_fshelp_read): Removed.
2308 (grub_fshelp_map_block): Likewise.
2310 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
2311 (grub_fshelp_journal): Likewise.
2312 (grub_fshelp_read): Likewise.
2313 (grub_fshelp_map_block): Likewise.
2315 2008-06-16 Pavel Roskin <proski@gnu.org>
2317 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
2318 floating point anymore.
2319 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
2321 2008-06-15 Pavel Roskin <proski@gnu.org>
2323 * commands/ls.c (grub_ls_list_files): Use integer calculations
2324 for human readable format, avoid floating point use.
2325 * kern/misc.c (grub_ftoa): Remove.
2326 (grub_vsprintf): Remove floating point support.
2328 2008-06-15 Robert Millan <rmh@aybabtu.com>
2330 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
2332 Reported by Max Vozeler.
2334 2008-06-15 Robert Millan <rmh@aybabtu.com>
2336 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
2337 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
2339 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
2340 the beginning of the prefix.
2342 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
2343 It is assumed that if we have a memdisk, grub-mkimage has set
2344 grub_prefix to include the "(memdisk)" drive in it.
2346 2008-06-15 Robert Millan <rmh@aybabtu.com>
2348 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
2349 Initialize keyboard controller after registering the terminal, so that
2350 grub_printf() can be called from grub_keyboard_controller_init().
2352 2008-06-15 Robert Millan <rmh@aybabtu.com>
2354 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2355 extent-btree which is written as big endian on disk.
2356 Reported by Alain Greppin <al@chilibi.org>.
2358 2008-06-14 Robert Millan <rmh@aybabtu.com>
2360 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2361 * util/i386/pc/grub-install.in (modules): Likewise.
2363 2008-06-13 Pavel Roskin <proski@gnu.org>
2365 * commands/ls.c (grub_ls_list_files): Fix format warnings.
2367 2008-06-13 Bean <bean123ch@gmail.com>
2369 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2371 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2373 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2374 to indicate sparse block.
2376 2008-06-12 Pavel Roskin <proski@gnu.org>
2378 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2379 number, grub_fshelp_read() does it for us.
2381 * fs/fshelp.c (grub_fshelp_read): New function. Implement
2382 linear disk read with journal translation.
2383 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2384 * include/grub/fshelp.h: Declare grub_fshelp_read().
2386 2008-06-09 Pavel Roskin <proski@gnu.org>
2388 * fs/minix.c (grub_minix_mount): Handle error reading
2391 2008-06-08 Robert Millan <rmh@aybabtu.com>
2393 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2394 don't append the RAID prefix afterwards.
2395 Reported by Clint Adams.
2397 2008-06-08 Robert Millan <rmh@aybabtu.com>
2399 Based on description from Pavel:
2400 * kern/disk.c (grub_disk_check_range): Rename to ...
2401 (grub_disk_adjust_range): ... this. Add a comment explaining the
2402 tasks performed by this function.
2404 2008-06-08 Robert Millan <rmh@aybabtu.com>
2406 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2407 `num_serial' (for consistency with other variables).
2408 (struct grub_ntfs_data): Add `uuid' member.
2409 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2410 (grub_ntfs_uuid): New function.
2411 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2413 2008-06-07 Pavel Roskin <proski@gnu.org>
2415 * util/biosdisk.c (open_device): Revert last change to the
2416 function, it broke installation. The sector needs to be
2417 different dependent on which device is opened.
2419 2008-06-06 Robert Millan <rmh@aybabtu.com>
2421 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2422 rest of GRUB, and breakage doesn't happen if its value were modified.
2424 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2425 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2426 a constant (same value).
2427 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2428 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2430 2008-06-06 Robert Millan <rmh@aybabtu.com>
2432 * util/biosdisk.c (open_device): Do not modify sector offset when
2433 accessing a partition. kern/disk.c already handles this for us.
2435 2008-06-06 Robert Millan <rmh@aybabtu.com>
2437 * util/grub-emu.c (grub_machine_init): Move code in this function from
2439 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2440 segfault in case grub_printf() is called).
2442 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2443 grub_probe. Update all users not to explicitly add it again.
2444 (grub_device): New variable; contains corresponding device for grubdir.
2445 (fs_module, partmap_module, devabstraction_module): Pass
2446 `--device ${grub_device}' to grub_probe to avoid traversing /dev
2449 2008-06-05 Robert Millan <rmh@aybabtu.com>
2451 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2452 is found, print it (same layout as with labels).
2454 2008-06-04 Robert Millan <rmh@aybabtu.com>
2456 * util/biosdisk.c (get_drive): Rename to ...
2457 (find_grub_drive): ... this. Update all users.
2459 (get_os_disk): Rename to ...
2460 (convert_system_partition_to_system_disk): ... this. Update all users.
2462 (find_drive): Rename to ...
2463 (find_system_device): ... this. Update all users.
2465 2008-06-04 Robert Millan <rmh@aybabtu.com>
2467 * util/biosdisk.c (get_os_disk): Handle IDA devices.
2468 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2469 (make_device_map): Likewise.
2471 2008-06-01 Robert Millan <rmh@aybabtu.com>
2473 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2474 before dereferencing it.
2476 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2477 union with fat12/fat16-specific ones. Add some new fields, including
2478 `num_serial' for both versions.
2479 (struct grub_fat_data): Add `uuid' member.
2480 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2481 names. Initialize `data->uuid' using `num_serial'.
2482 (grub_fat_uuid): New function.
2483 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2485 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2486 (grub_reiserfs_uuid): New function.
2487 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2490 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2491 (grub_xfs_uuid): New function.
2492 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2494 2008-06-01 Robert Millan <rmh@aybabtu.com>
2496 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2497 code that is backward compatible with pre-uuid search command.
2499 2008-05-31 Robert Millan <rmh@aybabtu.com>
2501 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2502 floppies after everything else, to ensure floppy drive isn't accessed
2503 unnecessarily (patch from Bean).
2505 2008-05-31 Robert Millan <rmh@aybabtu.com>
2507 * commands/search.c (search_label, search_fs_uuid, search_file): Do
2508 not print device names when we were asked to set a variable.
2510 2008-05-31 Robert Millan <rmh@aybabtu.com>
2512 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2513 using "cursor-on" and "cursor-off" commands (understood at least by
2514 the Open Firmware flavour on OLPC).
2516 2008-05-31 Michael Gorven <michael@gorven.za.net>
2518 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2519 on and off sequences.
2521 2008-05-31 Robert Millan <rmh@aybabtu.com>
2523 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2524 * util/update-grub.in: Likewise.
2526 2008-05-30 Pavel Roskin <proski@gnu.org>
2528 * util/biosdisk.c (linux_find_partition): Simplify logic and
2529 make the code more universal. Keep special processing for
2530 devfs, but use a simple rule for all other devices. If the
2531 device ends with a number, append 'p' and the partition number.
2532 Otherwise, append only the partition number.
2534 2008-05-30 Robert Millan <rmh@aybabtu.com>
2536 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2537 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2538 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2539 the `root' parameter to Linux.
2541 2008-05-30 Robert Millan <rmh@aybabtu.com>
2543 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2544 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2545 --fs_uuid with --fs-uuid.
2546 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2547 all filesystems support them).
2549 2008-05-30 Robert Millan <rmh@aybabtu.com>
2551 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
2552 grub_printf() flags, since we're printing in units of 2 bytes.
2554 2008-05-30 Robert Millan <rmh@aybabtu.com>
2556 * util/grub.d/00_header.in: Remove obsolete comment referencing
2557 convert_system_path_to_grub_path().
2558 * util/update-grub.in: Likewise.
2559 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
2560 (convert_system_path_to_grub_path): Add a warning message explaining
2561 that this function is deprecated. Rely on is_path_readable_by_grub()
2562 for the readability checks.
2563 (font_path): Use is_path_readable_by_grub() for the readability
2564 check rather than convert_system_path_to_grub_path().
2566 2008-05-30 Robert Millan <rmh@aybabtu.com>
2568 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
2569 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
2570 converting it first.
2571 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
2572 grub.cfg for access to font file, and afterwards call it again to set
2575 2008-05-30 Robert Millan <rmh@aybabtu.com>
2577 * commands/search.c (options): Add --fs_uuid option.
2578 (search_fs_uuid): New function.
2579 (grub_cmd_search): Fix --set argument passing.
2580 Use search_fs_uuid() when requested via --fs_uuid.
2581 (grub_search_init): Update help message.
2582 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
2583 and redeclare it as an array of 16-bit words.
2584 (grub_ext2_uuid): New function.
2585 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
2586 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
2587 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
2588 (GRUB_DEVICE_BOOT_UUID): New variables.
2589 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
2590 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
2592 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
2593 just assume `root' variable has the right value.
2594 * util/grub.d/10_linux.in: Likewise.
2595 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
2597 (main): Recognise `-t fs_uuid' argument.
2599 2008-05-30 Robert Millan <rmh@aybabtu.com>
2601 * util/biosdisk.c (map): Redefine structure to hold information
2602 about GRUB drive name.
2603 (get_drive): Reimplement without assuming (and verifying) BIOS-like
2605 (call_hook): Remove.
2606 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
2607 member. Assume drive has partitions.
2608 (grub_util_biosdisk_open): Access device names via `.device' struct
2610 (open_device): Likewise.
2611 (find_drive): Likewise.
2612 (read_device_map): Adjust map[] usage to match the new struct
2613 definition. Don't check for duplicates (still possible, but not cheap
2615 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
2616 (make_device_name): Remove assumption of BIOS-like drive names.
2618 2008-05-30 Pavel Roskin <proski@gnu.org>
2620 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
2621 compiling execute.c doesn't need grub_script.tab.h anymore.
2622 (normal/command.c_DEPENDENCIES): Likewise.
2623 (normal/function.c_DEPENDENCIES): Likewise.
2624 * conf/i386-ieee1275.rmk: Likewise.
2625 * conf/i386-linuxbios.rmk: Likewise.
2626 * conf/i386-pc.rmk: Likewise.
2627 * conf/powerpc-ieee1275.rmk: Likewise.
2628 * conf/sparc64-ieee1275.rmk: Likewise.
2630 2008-05-29 Pavel Roskin <proski@gnu.org>
2632 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
2633 when scanning metadata for volume group name.
2635 * include/grub/script.h: Don't include grub_script.tab.h. It's
2636 a generated file, which may only be included from the files with
2637 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
2638 use union YYSTYPE, as the later allows forward declaration.
2639 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
2641 2008-05-29 Robert Millan <rmh@aybabtu.com>
2643 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
2644 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
2645 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
2646 (grub_console_checkkey): Add grub_dprintf() call to report unknown
2649 2008-05-29 Robert Millan <rmh@aybabtu.com>
2651 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
2652 control key combinations.
2654 2008-05-29 Robert Millan <rmh@aybabtu.com>
2656 * util/powerpc/ieee1275/grub-install.in: Move from here ...
2657 * util/ieee1275/grub-install.in: ... to here.
2658 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
2659 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
2660 (grub_install_SOURCES): Likewise.
2662 2008-05-29 Robert Millan <rmh@aybabtu.com>
2664 * fs/affs.c: Update copyright year.
2665 * fs/ext2.c: Likewise.
2666 * fs/fshelp.c: Likewise.
2667 * fs/hfsplus.c: Likewise.
2668 * fs/ntfs.c: Likewise.
2669 * fs/xfs.c: Likewise.
2670 * include/grub/fshelp.h: Likewise.
2671 * util/grub-mkdevicemap.c: Likewise.
2673 2008-05-28 Robert Millan <rmh@aybabtu.com>
2675 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
2676 might need to be fatfs to support some firmware implementations
2679 2008-05-28 Robert Millan <rmh@aybabtu.com>
2681 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
2683 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2684 (make_device_map): Likewise.
2686 2008-05-20 Bean <bean123ch@gmail.com>
2688 * fs/fshelp.c (grub_fshelp_map_block): New function.
2689 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
2690 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
2692 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
2693 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
2694 (grub_fshelp_journal): New structure.
2695 (grub_fshelp_map_block): New function prototype.
2696 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
2697 (grub_fshelp_map_block): Likewise.
2699 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
2700 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
2701 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
2702 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
2703 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
2704 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
2705 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
2706 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
2707 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
2708 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
2709 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
2710 (grub_ext2_sblock): New members for journal support.
2711 (grub_ext3_journal_header): New structure.
2712 (grub_ext3_journal_revoke_header): Likewise.
2713 (grub_ext3_journal_block_tag): Likewise.
2714 (grub_ext3_journal_sblock): Likewise.
2715 (grub_fshelp_node): New members logfile and journal.
2716 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
2717 grub_fshelp_map_block to get real block number.
2718 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
2720 (grub_ext2_read_inode): Likewise.
2721 (grub_ext3_get_journal): New function.
2722 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
2723 (grub_ext2_close): Release memory used by journal.
2725 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
2726 (REISERFS_MAGIC_DESC_BLOCK): New macro.
2727 (grub_reiserfs_transaction_header): Renamed to
2728 grub_reiserfs_description_block, replace field data with real_blocks.
2729 (grub_reiserfs_commit_block): New structure.
2730 (grub_reiserfs_data): New member journal.
2731 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
2733 (grub_reiserfs_read_symlink): Likewise.
2734 (grub_reiserfs_iterate_dir): Likewise.
2735 (grub_reiserfs_open): Likewise.
2736 (grub_reiserfs_read): Likewise.
2737 (grub_reiserfs_get_journal): New function.
2738 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
2739 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
2740 using grub_reiserfs_get_journal.
2741 (grub_reiserfs_close): Release memory used by journal.
2743 * fs/affs.c (grub_affs_read_block): Change block type to
2744 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
2746 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
2748 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
2750 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
2752 * fs/udf.c (grub_udf_read_block): Change block type to
2753 grub_disk_addr_t. Use type cast to avoid warning.
2755 * fs/xfs.c (grub_xfs_read_block): Likewise.
2757 2008-05-16 Christian Franke <franke@computer.org>
2759 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
2760 to ensure that break with ESC will always work.
2761 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
2762 Remove ESC from keyboard queue.
2764 2008-05-16 Christian Franke <franke@computer.org>
2766 * util/biosdisk.c: [__CYGWIN__] Add includes.
2767 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
2768 (get_os_disk): Move variable declarations to OS specific
2769 parts to avoid warning.
2770 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
2771 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
2772 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
2774 * util/getroot.c: [__CYGWIN__] Add includes.
2775 (strip_extra_slashes): Fix "/" case.
2776 [__CYGWIN__] (get_win32_path): New function.
2777 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
2778 [__CYGWIN__] (find_root_device): Disable.
2779 [__CYGWIN__] (get_bootsec_serial): New function.
2780 [__CYGWIN__] (find_cygwin_root_device): Likewise.
2781 [__linux__] (grub_guess_root_device): Add early returns to simplify
2783 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
2784 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
2785 check for Linux only.
2787 2008-05-15 Bean <bean123ch@gmail.com>
2789 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
2790 keyboard hang problem in apple's intel mac.
2792 2008-05-09 Robert Millan <rmh@aybabtu.com>
2794 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
2796 * util/grub-mkdevicemap.c (get_virtio_disk_name)
2797 (make_device_map): Likewise.
2798 Reported by Aurelien Jarno <aurel32@debian.org>
2800 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
2802 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
2803 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
2804 (make_device_map): Output entries for xvd type disks.
2806 2008-05-07 Robert Millan <rmh@aybabtu.com>
2808 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
2810 * util/grub-mkdevicemap.c (get_cciss_disk_name)
2811 (make_device_map): Likewise.
2812 Reported by Roland Dreier <rdreier@cisco.com>
2814 2008-05-07 Robert Millan <rmh@aybabtu.com>
2816 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
2817 grub_strstr() call. Correct a few mistakes in failure path handling.
2819 2008-05-06 Robert Millan <rmh@aybabtu.com>
2821 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2822 Do not print a trailing slash (therefore, the root directory is an
2824 (convert_system_path_to_grub_path): Do not remove trailing slash
2825 from make_system_path_relative_to_its_root() output.
2827 * util/i386/pc/grub-install.in: Add trailing slash to output from
2828 make_system_path_relative_to_its_root().
2830 2008-05-06 Robert Millan <rmh@aybabtu.com>
2832 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
2833 ensures that output lines aren't intermangled with those sent to
2834 stderr (via grub_util_info()).
2835 * util/grub-probe.c (grub_refresh): Likewise.
2836 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
2838 2008-05-05 Christian Franke <franke@computer.org>
2840 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
2841 Add Cygwin device names.
2842 (get_ide_disk_name) [__CYGWIN__]: Likewise.
2843 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
2844 (check_device): Return error instead of success on empty name.
2845 (make_device_map): Move label inside linux specific code to
2846 prevent compiler warning.
2848 2008-04-30 Robert Millan <rmh@aybabtu.com>
2850 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
2851 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
2853 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
2855 2008-04-29 Robert Millan <rmh@aybabtu.com>
2857 * docs/grub.cfg: New file (example GRUB configuration).
2859 2008-04-26 Robert Millan <rmh@aybabtu.com>
2861 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
2862 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
2863 and `disk/ieee1275/nand.c'.
2865 2008-04-25 Bean <bean123ch@gmail.com>
2867 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
2870 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
2871 change the buffer size to 4096 for cdrom device.
2873 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
2875 (_linux_mod_SOURCES): New variable.
2876 (_linux_mod_CFLAGS): Likewise.
2877 (_linux_mod_LDFLAGS): Likewise.
2878 (linux_mod_SOURCES): Likewise.
2879 (linux_mod_CFLAGS): Likewise.
2880 (linux_mod_LDFLAGS): Likewise.
2881 (nand_mod_SOURCES): Likewise.
2882 (nand_mod_CFLAGS): Likewise.
2883 (nand_mod_LDFLAGS): Likewise.
2885 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
2886 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
2887 type property. (nand device in olpc don't have this property)
2889 * include/grub/disk.h (grub_disk_dev_id): New macro
2890 GRUB_DISK_DEVICE_NAND_ID.
2892 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
2894 (grub_rescue_cmd_initrd): Likewise.
2896 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
2897 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
2898 ofw_cif_handler and ofw_idt, adjust padding number.
2900 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
2901 GRUB_MACHINE_IEEE1275 is defined.
2903 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
2904 Use NESTED_FUNC_ATTR attribute on the hook parameter.
2906 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
2907 on nested function heap_init.
2908 (grub_upper_mem): New variable for i386-ieee1275.
2909 (grub_get_extended_memory): New function for i386-ieee1275.
2910 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
2912 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
2913 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
2916 * loader/i386/ieee1275/linux.c: New file.
2918 * loader/i386/ieee1275/linux_normal.c: New file.
2920 * disk/ieee1275/nand.c: New file.
2922 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
2924 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
2926 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
2928 2008-04-18 Robert Millan <rmh@aybabtu.com>
2930 Restructures early code path on ieee1275 to unify grub_main() as
2931 the first C function that is executed in every platform.
2933 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
2934 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
2936 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
2937 * kern/ieee1275/cmain.c (cmain): Rename to ...
2938 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
2939 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
2942 2008-04-18 Robert Millan <rmh@aybabtu.com>
2944 * util/update-grub.in: Fix syntax error when setting
2945 `GRUB_PRELOAD_MODULES'.
2946 Reported by Stephane Chazelas <stephane@artesyncp.com>
2948 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
2950 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
2951 section into account, newer toolchains generate unique build ids
2952 * configure.ac: remove the test for --build-id=none acceptance,
2953 we want build ids to be preserved
2954 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
2955 far from other sections don't cause the raw binary images grow
2958 2008-04-15 Robert Millan <rmh@aybabtu.com>
2960 * disk/lvm.c: Update copyright year.
2961 * kern/misc.c: Likewise.
2963 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
2965 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
2966 there is no memory left for physical volume name.
2968 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
2970 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
2971 volume name mapping to support bigger than 9 character names properly.
2973 2008-04-13 Robert Millan <rmh@aybabtu.com>
2975 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
2976 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
2978 2008-04-13 Christian Franke <franke@computer.org>
2980 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
2981 to create a floppy emulation boot CD when non emulation mode
2983 Enable Joliet CD filesystem extension.
2985 2008-04-13 Robert Millan <rmh@aybabtu.com>
2987 * kern/misc.c (grub_strncat): Fix off-by-one error.
2988 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
2990 * kern/env.c (grub_env_context_close): Clear current context, not
2992 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
2994 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
2996 2008-04-13 Robert Millan <rmh@aybabtu.com>
2998 Improve robustness when handling LVM.
3000 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
3001 (and leave `*p' unmodified).
3002 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
3004 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
3005 iterating through it.
3006 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
3008 (grub_lvm_scan_device): Check the return value (and fail gracefully
3009 when due) on each grub_lvm_getvalue() or grub_strstr() call.
3010 Don't assume `vg->pvs != NULL' when iterating through it.
3012 2008-04-13 Robert Millan <rmh@aybabtu.com>
3014 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
3015 * genmk.rb (partmap): New variable.
3016 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
3017 (#{partmap}): New target rule.
3018 * genpartmaplist.sh: New file.
3019 * Makefile.in (pkglib_DATA): Add partmap.lst.
3020 (partmap.lst): New target rule.
3021 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
3022 modules (including all partition maps), instead of preloading them.
3024 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
3026 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
3027 `linux-boot-prober' (if installed) to detect other operating
3028 systems which are installed on the computer and add them to
3030 * conf/common.rmk: Build and install 30_os-prober.
3032 2008-04-12 Robert Millan <rmh@aybabtu.com>
3034 * kern/powerpc/ieee1275/init.c: Move from here ...
3035 * kern/ieee1275/init.c: ... to here. Update all users.
3037 * kern/powerpc/ieee1275/cmain.c: Move from here ...
3038 * kern/ieee1275/cmain.c: ... to here. Update all users.
3040 * kern/powerpc/ieee1275/openfw.c: Move from here ...
3041 * kern/ieee1275/openfw.c: ... to here. Update all users.
3043 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
3044 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
3046 2008-04-10 Pavel Roskin <proski@gnu.org>
3048 * configure.ac: Always use "_cv_" in cache variables for
3049 compatibility with Autoconf 2.62.
3051 2008-04-07 Robert Millan <rmh@aybabtu.com>
3053 Revert grub/machine/init.h addition by Pavel (since it breaks on
3054 i386-ieee1275 and others):
3055 * util/i386/pc/misc.c: Remove grub/machine/init.h.
3056 * util/powerpc/ieee1275/misc.c: Likewise.
3058 2008-04-07 Robert Millan <rmh@aybabtu.com>
3060 * util/grub-probe.c (probe): Improve error message.
3062 2008-04-07 Robert Millan <rmh@aybabtu.com>
3064 * util/biosdisk.c (read_device_map): Skip devices that don't exist
3065 (this prevents the presence of a bogus entry from ruining the whole
3068 2008-04-06 Pavel Roskin <proski@gnu.org>
3070 * util/biosdisk.c: Include grub/util/biosdisk.h.
3071 * util/grub-fstest.c (execute_command): Make static.
3072 * util/grub-mkdevicemap.c (check_device): Likewise.
3073 * util/i386/pc/misc.c: Include grub/machine/init.h.
3074 * util/powerpc/ieee1275/misc.c: Likewise.
3075 * util/lvm.c: Include grub/util/lvm.h.
3076 * util/misc.c: Include grub/kernel.h, grub/misc.h and
3078 * util/raid.c: Include grub/util/raid.h.
3079 (grub_util_getdiskname): Make static.
3081 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3082 grub_hostfs_fini(), as they are called from grub_init_all() and
3083 grub_fini_all() respectively. This fixes an infinite loop in
3084 grub-fstest due to double registration of hostfs.
3085 Reported by Christian Franke <Christian.Franke@t-online.de>
3087 2008-04-05 Pavel Roskin <proski@gnu.org>
3089 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3090 all 8 functions. Otherwise, probe function 0 only.
3092 2008-04-04 Pavel Roskin <proski@gnu.org>
3094 * commands/lspci.c (grub_lspci_iter): Print the bus number
3097 * commands/lspci.c (grub_pci_classes): Fix typos.
3098 (grub_lspci_iter): Don't print func twice. Print vendor ID
3099 before device ID, as it's normally done.
3101 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3102 Fix signedness warnings.
3103 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3105 * util/ieee1275/get_disk_name.c: Include config.h so that
3106 _GNU_SOURCE is defined and getline() is declared. Mark an
3107 unused argument as such. Fix a signedness warning.
3109 2008-04-02 Pavel Roskin <proski@gnu.org>
3111 * genkernsyms.sh.in: Use more robust assignments for CC and
3112 srcdir. Quote srcdir.
3113 * gensymlist.sh.in: Likewise. Assert at the compile time that
3114 the symbol table is not empty.
3116 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3117 * fs/cpio.c (grub_cpio_read): Likewise.
3119 2008-04-01 Pavel Roskin <proski@gnu.org>
3121 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3122 * disk/host.c (grub_host_open): Likewise.
3123 * disk/loopback.c (grub_loopback_open): Likewise.
3124 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3125 disk->id as in disk/host.c, not a multi-character constant.
3127 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
3128 later is obsolete, potentially dangerous and sets a bad example.
3129 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3130 * util/misc.c (grub_util_get_image_size): Likewise.
3132 * disk/loopback.c (options): Improve help for "--partitions".
3134 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3135 options to align them with the short options, e.g. "echo -e".
3137 2008-03-31 Bean <bean123ch@gmail.com>
3139 * video/reader/png.c (grub_png_data): New member is_16bit and
3141 (grub_png_decode_image_header): Detect 16 bit png image.
3142 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3143 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3144 (grub_video_reader_png): Release memory occupied by image_data.
3146 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3148 (grub_nfs_mount): Skip the test for sector per cluster.
3150 * include/grub/ntfs.h (MAX_SPC): Removed.
3152 2008-03-31 Bean <bean123ch@gmail.com>
3154 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3155 (grub_probe_SOURCES): Add fs/afs.c.
3156 (grub_fstest_SOURCES): Likewise.
3157 (afs_mod_SOURCES): New variable.
3158 (afs_mod_CFLAGS): Likewise.
3159 (afs_mod_LDFLAGS): Likewise.
3161 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3162 (grub_emu_SOURCES): Likewise.
3164 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3166 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3168 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3170 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3172 * fs/afs.c: New file.
3174 2008-03-30 Pavel Roskin <proski@gnu.org>
3176 * disk/host.c: Include grub/misc.h to fix a warning.
3177 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3178 warnings about implicit declarations.
3180 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3182 * include/grub/i386/loader.h: Change declaration of
3183 grub_linux_boot() to match what grub_loader_set() expects.
3184 * util/getroot.c (grub_guess_root_device): Return const char* to
3186 * util/grub-probe.c (probe): Fix a warning about uninitialized
3187 abstraction_name variable.
3188 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3189 second argument as unused to fix a warning.
3191 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3192 missing grub_error() call.
3194 * util/update-grub_lib.in: Define datarootdir, since Autoconf
3195 2.60 and newer uses it to define datadir.
3197 * commands/sleep.c: Fix warning about implicit declaration.
3198 * disk/memdisk.c: Likewise.
3199 * loader/aout.c: Likewise.
3200 * loader/i386/bsd_normal.c: Likewise.
3201 * util/grub-probe.c: Likewise.
3203 * commands/i386/cpuid.c (has_longmode): Make static.
3204 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3205 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3207 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3208 GDT. This is more robust, as %ds can change.
3209 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3210 calling real_to_prot().
3211 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3213 2008-03-28 Pavel Roskin <proski@gnu.org>
3215 * kern/i386/pc/startup.S: Assert that uncompressed functions
3216 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3217 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3218 code, as they push parts of the code (error handlers) beyond
3219 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
3220 code as correctness and size.
3222 2008-03-28 Pavel Roskin <proski@gnu.org>
3224 * kern/i386/pc/startup.S
3225 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3226 data block address to the real mode, keep offset minimal. This
3227 works around a bug in AWARD BIOS on old Athlon systems, which
3228 makes CD detection hang.
3230 2008-03-26 Pavel Roskin <proski@gnu.org>
3232 * normal/color.c (grub_parse_color_name_pair): Make `name' a
3234 * include/grub/normal.h: Add grub_parse_color_name_pair()
3237 2008-03-24 Bean <bean123ch@gmail.com>
3239 * disk/i386/pc/biosdisk.c (cd_start): Removed.
3240 (cd_count): Removed.
3241 (cd_drive): New variable.
3242 (grub_biosdisk_get_drive): Don't check for (cdN) device.
3243 (grub_biosdisk_call_hook): Likewise.
3244 (grub_biosdisk_iterate): Change cdrom detection method.
3245 (grub_biosdisk_open): Replace cd_start with cd_drive.
3246 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
3247 detect cdrom device.
3249 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
3251 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
3252 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
3253 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
3254 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
3255 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
3256 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
3257 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
3258 (grub_biosdisk_cdrp): New structure.
3259 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
3261 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
3263 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
3266 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
3269 2008-03-20 Robert Millan <rmh@aybabtu.com>
3271 Remove 2 TiB limit in ata.mod.
3272 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
3273 (grub_ata_dumpinfo): Print sector count with 0x%llx.
3274 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
3275 grub_uint64_t instead of grub_uint32_t.
3277 2008-03-05 Bean <bean123ch@gmail.com>
3279 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
3280 (grub_multiboot): Set boot device.
3282 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
3284 2008-03-02 Bean <bean123ch@gmail.com>
3286 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
3289 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
3291 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
3294 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
3297 * docs/fdl.texi: New file.
3299 * docs/mdate-sh: New file. Copied from gnulib.
3300 * docs/texinfo.tex: Likewise.
3302 * config.guess: Updated from gnulib.
3303 * install-sh: Likewise.
3305 2008-02-28 Robert Millan <rmh@aybabtu.com>
3307 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
3308 (aout_mod_SOURCES): New variable.
3309 (aout_mod_CFLAGS): Likewise.
3310 (aout_mod_LDFLAGS): Likewise.
3312 * conf/i386-ieee1275.rmk: Likewise.
3314 2008-02-28 Robert Millan <rmh@aybabtu.com>
3316 * util/update-grub.in: Reorganise terminal validity check. Accept
3317 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
3318 Based on suggestion by Franklin PIAT.
3320 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
3322 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
3324 * util/getroot.c (grub_util_check_block_device): New function that
3325 returns the given argument if it is a block device and returns NULL else.
3326 * util/grub-probe.c (argument_is_device): New variable.
3327 (probe): Promote device_name from a variable to an argument. Receive
3328 device_name from grub_util_check_block_device() if path is NULL and from
3329 grub_guess_root_device() else. Do not free() device_name anymore.
3330 (options): Introduce new parameter '-d, --device'.
3331 (main): Add description of the new parameter to the help screen.
3332 Rename path variable to argument. Set argument_is_device if the '-d'
3333 option is given. Pass argument to probe() depending on
3336 2008-02-24 Bean <bean123ch@gmail.com>
3338 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
3339 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
3340 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
3341 (GRUB_ISO9660_VOLDESC_PART): Likewise.
3342 (GRUB_ISO9660_VOLDESC_END): Likewise.
3343 (grub_iso9660_primary_voldesc): New member escape.
3344 (grub_iso9660_data): New member joliet.
3345 (grub_iso9660_convert_string): New function.
3346 (grub_iso9660_mount): Detect joliet extension.
3347 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
3348 (grub_iso9660_iso9660_label): Likewise.
3350 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
3351 (grub_setup_SOURCES): Add fs/udf.c.
3352 (grub_fstest_SOURCES): Likewise.
3353 (udf_mod_SOURCES): New variable.
3354 (udf_mod_CFLAGS): Likewise.
3355 (udf_mod_LDFLAGS): Likewise.
3357 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3358 (grub_emu_SOURCES): Likewise.
3360 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3362 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3364 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3366 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3368 * fs/udf.c: New file.
3370 2008-02-24 Robert Millan <rmh@aybabtu.com>
3372 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3373 (normal/lexer.c_DEPENDENCIES): New variables.
3374 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3375 (normal/lexer.c_DEPENDENCIES): Likewise.
3376 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3377 (normal/lexer.c_DEPENDENCIES): Likewise.
3378 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3379 (normal/lexer.c_DEPENDENCIES): Likewise.
3380 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3381 (normal/lexer.c_DEPENDENCIES): Likewise.
3382 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3383 (normal/lexer.c_DEPENDENCIES): Likewise.
3385 2008-02-23 Robert Millan <rmh@aybabtu.com>
3387 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3388 since they were intended to be in hex. This didn't break previously
3389 because of a bug in gpt_partition_map_iterate() (see below).
3391 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3392 when checking the validity of GPT header.
3393 Remove `partno', since it always provides the same information as `i'.
3395 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
3397 * include/grub/efi/time.h: Fix a wrong comment.
3399 2008-02-19 Pavel Roskin <proski@gnu.org>
3401 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3404 2008-02-19 Bean <bean123ch@gmail.com>
3406 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3407 (aout_mod_SOURCES): New variable.
3408 (aout_mod_CFLAGS): Likewise.
3409 (aout_mod_LDFLAGS): Likewise.
3410 (_bsd_mod_SOURCES): New variable.
3411 (_bsd_mod_CFLAGS): Likewise.
3412 (_bsd_mod_LDFLAGS): Likewise.
3413 (bsd_mod_SOURCES): New variable.
3414 (bsd_mod_CFLAGS): Likewise.
3415 (bsd_mod_LDFLAGS): Likewise.
3417 * include/grub/aout.h: New file.
3419 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3421 * include/grub/i386/bsd.h: New file.
3423 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3426 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3427 function is called, so that it's possible to change it inside the hook.
3428 (grub_elf64_load): Likewise.
3429 (grub_elf_file): Don't close the file if elf header is not found.
3430 (grub_elf_close): Close the file if grub_elf_file fails (The new
3431 grub_elf_file won't close it).
3432 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3433 (grub_elf64_size): Likewise.
3435 * kern/i386/loader.S (grub_unix_real_boot): New function.
3437 * loader/aout.c: New file.
3439 * loader/i386/bsd.c: New file.
3441 * loader/i386/bsd_normal.c: New file.
3443 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3445 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3446 can test other formats.
3448 2008-02-19 Robert Millan <rmh@aybabtu.com>
3450 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3451 (grub_gpt_partition_type_empty): Redefine with macro from
3452 `<grub/gpt_partition.h>'.
3453 (gpt_partition_map_iterate): Adjust partition type comparison.
3455 Export `entry' as partmap-specific `part.data' struct.
3456 (grub_gpt_header, grub_gpt_partentry): Move from here ...
3458 * include/grub/gpt_partition.h (grub_gpt_header)
3459 (grub_gpt_partentry): ... to here (new file).
3461 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3463 (grub_gpt_partition_type_bios_boot): New const variable, defined
3464 with macro from `<grub/gpt_partition.h>'.
3466 (setup): Replace `first_start' with `embed_region', which keeps
3467 track of the embed region (and is partmap-agnostic).
3469 Replace find_first_partition_start() with find_usable_region(),
3470 which finds a usable region for embedding using partmap-specific
3471 knowledge (supports PC/MSDOS and GPT).
3473 Fix all assumptions that the embed region start at sector 1, using
3474 `embed_region.start' from now on. Similarly, use `embed_region.end'
3475 rather than `first_start' to calculate available size.
3477 In grub_util_info() message, replace "into after the MBR" with an
3478 indication of the specific sector our embed region starts at.
3480 2008-02-19 Robert Millan <rmh@aybabtu.com>
3482 * DISTLIST: Replace `commands/ieee1275/halt.c' and
3483 `commands/ieee1275/reboot.c' with `commands/halt.c' and
3484 `commands/reboot.c'.
3485 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3486 (halt_mod_SOURCES): Likewise.
3487 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3488 (halt_mod_SOURCES): Likewise.
3490 2008-02-17 Christian Franke <franke@computer.org>
3492 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3494 2008-02-17 Robert Millan <rmh@aybabtu.com>
3496 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3497 set `first_start' to 0 for non-PC/MSDOS partition maps.
3499 2008-02-16 Robert Millan <rmh@aybabtu.com>
3501 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3502 do not assume partition map is PC/MSDOS before performing checks that
3503 are specific to that layout.
3505 2008-02-13 Robert Millan <rmh@aybabtu.com>
3507 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3508 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3509 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3511 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
3513 * configure.ac: Only a cosmetic change on the handling of
3514 -fno-stack-protector.
3516 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
3518 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3519 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3521 (grub_install_SOURCES): Add halt.mod and reboot.mod.
3522 (halt_mod_SOURCES): New variable.
3523 (halt_mod_CFLAGS): Likewise.
3524 (halt_mod_LDFLAGS): Likewise.
3525 (reboot_mod_SOURCES): Likewise.
3526 (reboot_mod_CFLAGS): Likewise.
3527 (reboot_mod_LDFLAGS): Likewise.
3529 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3530 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3532 (halt_mod_SOURCES): Likewise.
3533 (reboot_mod_SOURCES): Likewise.
3535 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3536 commands/i386/pc/reboot.c by commands/reboot.c.
3537 (reboot_mod_SOURCES): Likewise.
3539 * commands/i386/pc/reboot.c: merge this file ...
3541 * commands/ieee1275/reboot.c: ... and this file ...
3543 * commands/reboot.c: ... to this file.
3544 Add some precompiler directive to include the correct header for
3547 * commands/ieee1275/halt.c: move this file ...
3549 * commands/halt.c: ... to here.
3550 Add some precompiler directive to include the correct header for
3553 * include/grub/efi/efi.h (grub_reboot): New function declaration.
3554 (grub_halt): Likewise.
3556 * kern/efi/efi.c (grub_reboot): New function.
3557 (grub_halt): Likewise.
3559 2008-02-12 Robert Millan <rmh@aybabtu.com>
3561 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
3562 /dev (like it is done for /dev/mapper). This doesn't provide support
3563 for EVMS, but at least it is now easy to identify the problem when it
3566 2008-02-11 Robert Millan <rmh@aybabtu.com>
3568 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
3569 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
3570 comparing it with -1, not 0.
3572 2008-02-10 Robert Millan <rmh@aybabtu.com>
3574 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
3576 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3577 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
3579 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
3580 `disk/lvm.c' to the end of the list.
3581 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3582 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3584 2008-02-10 Robert Millan <rmh@aybabtu.com>
3586 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
3587 grub_print_error() instead. This will let user know why we're entering
3589 Based on suggestions from Sam Morris.
3591 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
3593 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
3594 on remaining N args, instead of "--" arg N times.
3596 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
3598 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
3599 (fill_with_default_glyph): Changed to use unknown_glyph for fill
3600 pattern for unknown glyphs.
3602 2008-02-09 Robert Millan <rmh@aybabtu.com>
3604 * configure.ac: Probe for `help2man'.
3605 * Makefile.in (builddir): New variable.
3606 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
3607 or otherwise add a few flags/options to it.
3608 (install-local): For every executable utility or script that is
3609 installed, invoke $(HELP2MAN) to install a manpage based on --help
3612 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
3613 that it doesn't prevent --help from working in build tree.
3615 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
3616 with `bug-grub@gnu.org'.
3617 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
3618 * util/update-grub.in (usage): New function.
3619 Implement proper argument check, with support for --help and --version
3620 (as well as existing -y).
3622 2008-02-09 Christian Franke <franke@computer.org>
3624 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
3625 avoid overwriting previous output.
3626 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
3628 2008-02-09 Robert Millan <rmh@aybabtu.com>
3630 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
3633 2008-02-09 Robert Millan <rmh@aybabtu.com>
3635 * commands/sleep.c: New file.
3636 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
3637 (sleep_mod_SOURCES): New variable.
3638 (sleep_mod_CFLAGS): Likewise.
3639 (sleep_mod_LDFLAGS): Likewise.
3641 2008-02-09 Robert Millan <rmh@aybabtu.com>
3643 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
3644 situations in which we can deduce the RAID size and the superblock
3647 2008-02-09 Robert Millan <rmh@aybabtu.com>
3649 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
3650 and return a grub_diskmemberlist_t composed of LVM physical volumes.
3651 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
3653 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
3654 and return a grub_diskmemberlist_t composed of physical array members.
3655 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
3657 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
3659 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
3660 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
3661 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
3663 * util/grub-probe.c (probe): Move partmap probing code from here ...
3664 (probe_partmap): ... to here.
3665 (probe): Use probe_partmap() once for the disk we're probing, and
3666 additionally, when such disk contains a memberlist() struct member,
3667 once for each disk that is contained in the structure returned by
3670 2008-02-09 Robert Millan <rmh@aybabtu.com>
3672 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
3673 environment variable to 'all' in order to obtain debug output from
3675 * util/i386/pc/grub-setup.c (main): Likewise.
3677 2008-02-08 Robert Millan <rmh@aybabtu.com>
3679 * disk/raid.c (grub_raid_scan_device): Check for
3680 `array->device[sb.this_disk.number]' rather than for
3681 `array->device[sb.this_disk.number]->name', since the latter is not
3682 guaranteed to be accessible.
3684 2008-02-08 Robert Millan <rmh@aybabtu.com>
3686 * disk/raid.c: Update copyright.
3687 * fs/cpio.c: Likewise.
3688 * include/grub/raid.h: Likewise.
3689 * loader/i386/pc/multiboot.c: Likewise.
3690 * util/hostfs.c: Likewise.
3692 2008-02-08 Robert Millan <rmh@aybabtu.com>
3694 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
3695 to a grub_disk_t array.
3696 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
3698 (grub_raid_scan_device): Replace `device[x].name' accesses with
3699 `device[x]->name'. Simplify initialization of `array->device[x]'.
3701 2008-02-08 Robert Millan <rmh@aybabtu.com>
3703 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
3704 grub_dprintf() calls.
3705 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
3708 2008-02-07 Christian Franke <franke@computer.org>
3710 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
3711 instead of fseek and ftell to support large files.
3712 (grub_hostfs_read): Likewise.
3714 2008-02-07 Robert Millan <rmh@aybabtu.com>
3716 Patch from Jeroen Dekkers.
3717 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
3718 failure, since successfully reading all array members might not be
3721 2008-02-06 Robert Millan <rmh@aybabtu.com>
3723 * util/grub-probe.c (probe): Simplify partmap probing (with the
3724 assumption that the first word up to the underscore equals to
3727 2008-02-06 Christian Franke <franke@computer.org>
3729 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
3730 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
3731 last block of a cpio or tar stream.
3732 Check for "TRAILER!!!" instead of any empty data
3733 block to detect last block of a cpio stream.
3734 (grub_cpio_dir): Fix constness of variable np.
3735 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
3736 cpio or tar trailer is detected. This fixes a crash
3737 on open of a non existing file.
3739 2008-02-05 Bean <bean123ch@gmail.com>
3741 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
3743 (grub_multiboot_load_elf64): Likewise.
3744 (grub_multiboot): Initialize mbi structure.
3746 * util/grub-fstest.c: Don't include unused header file script.h.
3748 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
3750 (grub_fstest_SOURCES): Likewise.
3752 2008-02-05 Robert Millan <rmh@aybabtu.com>
3754 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
3755 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
3756 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
3757 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
3759 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
3760 (translation_table): Replace hardcoded values with macros
3761 provided by `<grub/term.h>'.
3763 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
3764 (keyboard_map): Correct/add a few values, with macros provided
3766 (keyboard_map_shift): Zero values that don't differ from their
3767 `keyboard_map' equivalents.
3768 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
3769 Discard the second scan code that is always sent by Caps lock.
3770 Only use `keyboard_map_shift' when it provides a non-zero value,
3771 otherwise fallback to `keyboard_map'.
3773 2008-02-04 Bean <bean123ch@gmail.com>
3775 * Makefile.in (enable_grub_fstest): New variable.
3777 * conf/common.rmk (grub_fstest_init.lst): New rule.
3778 (grub_fstest_init.h): Likewise.
3779 (grub_fstest_init.c): Likewise.
3780 (util/grub-fstest.c_DEPENDENCIES): New variable.
3781 (grub_fstest_SOURCES): Likewise.
3783 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
3785 * util/grub-fstest.c: New file.
3787 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3789 Make grub-setup handle a separate root device.
3791 * util/i386/pc/grub-setup.c (setup): Always open the root device,
3792 so that the root device can be compared with the destination
3794 When embedding the core image, if the root and destination devices
3795 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
3797 When not embedding, set ROOT_DRIVE to 0xFF.
3799 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3801 Add support for having a grub directory in a different drive. This
3802 is still only the data handling part.
3804 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
3805 (codestart): Save %dh in GRUB_ROOT_DRIVE.
3806 (grub_root_drive): New variable.
3808 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
3809 instead of GRUB_BOOT_DRIVE to construct a device name. Set
3810 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
3813 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
3815 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
3817 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
3819 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
3820 is bogus, because PXE booting does not specify any drive
3823 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
3824 am not sure if this is really correct.
3826 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
3827 is always identical to the boot drive when booting from a CD.
3829 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
3831 (root_drive): New variable.
3832 (real_start): Unconditionally set %dh to ROOT_DRIVE.
3833 (setup_sectors): Push %dx right after popping it, because %dh will
3835 (copy_buffer): Restore %dx.
3837 2008-02-03 Robert Millan <rmh@aybabtu.com>
3839 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
3840 use `cdboot.img' for cdrom images.
3842 2008-02-03 Robert Millan <rmh@aybabtu.com>
3844 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
3845 only setup gfxterm when `font' command has succeeded.
3847 2008-02-03 Robert Millan <rmh@aybabtu.com>
3849 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
3850 (grub_rescue_cmd_multiboot_loader)
3851 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
3853 2008-02-03 Pavel Roskin <proski@gnu.org>
3855 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
3856 %edx and %esi from stack only after grub_gate_a20() is called.
3857 grub_gate_a20() clobbers %edx.
3859 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3861 * configure.ac (AC_INIT): Bumped to 1.96.
3863 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
3864 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
3865 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
3866 video/readers/png.c.
3868 2008-02-03 Bean <bean123ch@gmail.com>
3870 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
3871 (cdboot_img_SOURCES): New variable.
3872 (cdboot_img_ASFLAGS): New variable.
3873 (cdboot_img_LDFLAGS): New variable.
3875 * boot/i386/pc/cdboot.S: New file.
3877 * disk/i386/pc/biosdisk.c (cd_start): New variable.
3878 (cd_count): Likewise.
3879 (grub_biosdisk_get_drive): Add support for cd device.
3880 (grub_biosdisk_call_hook): Likewise.
3881 (grub_biosdisk_iterate): Likewise.
3882 (grub_biosdisk_open): Likewise.
3883 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
3884 (grub_biosdisk_rw): Support reading from cd device.
3885 (GRUB_MOD_INIT): Iterate cd devices.
3887 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
3888 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
3889 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
3891 * kern/i386/pc/init.c (make_install_device): Check for cd device.
3893 2008-02-02 Robert Millan <rmh@aybabtu.com>
3895 * commands/read.c: New file.
3896 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
3897 (read_mod_SOURCES): New variable.
3898 (read_mod_CFLAGS): Likewise.
3899 (read_mod_LDFLAGS): Likewise.
3901 2008-02-02 Robert Millan <rmh@aybabtu.com>
3903 * normal/main.c (grub_normal_execute): Check for `menu->size' when
3904 determining whether menu has to be displayed.
3906 2008-02-02 Marco Gerards <marco@gnu.org>
3908 * bus/pci.c: New file.
3910 * include/grub/pci.h: Likewise.
3912 * include/grub/i386/pc/pci.h: Likewise.
3914 * commands/lspci.c: Likewise.
3916 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
3918 (pci_mod_SOURCES): New variable.
3919 (pci_mod_CFLAGS): Likewise.
3920 (pci_mod_LDFLAGS): Likewise.
3921 (lspci_mod_SOURCES): Likewise.
3922 (lspci_mod_CFLAGS): Likewise.
3923 (lspci_mod_LDFLAGS): Likewise.
3925 2008-02-02 Bean <bean123ch@gmail.com>
3927 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
3928 (grub_ufs_get_file_block): Fix indirect block calculation problem.
3930 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
3931 (grub_xfs_btree_node): New structure.
3932 (grub_xfs_btree_root): New structure.
3933 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
3934 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
3935 (GRUB_XFS_EXTENT_BLOCK): Likewise.
3936 (GRUB_XFS_EXTENT_SIZE): Likewise.
3937 (grub_xfs_read_block): Support btree format type.
3938 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
3939 Use directory block as basic unit.
3941 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
3943 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
3944 __attribute__ ((__regparm__ (1))).
3946 2008-02-01 Robert Millan <rmh@aybabtu.com>
3948 Correct a mistake in previous commit.
3950 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
3952 (normal/command.c_DEPENDENCIES): New variable.
3954 2008-02-01 Robert Millan <rmh@aybabtu.com>
3956 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
3958 (normal/command.c_DEPENDENCIES): New variable.
3959 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
3960 * conf/i386-ieee1275.rmk: Likewise.
3961 * conf/i386-linuxbios.rmk: Likewise.
3962 * conf/i386-pc.rmk: Likewise.
3963 * conf/sparc64-ieee1275.rmk: Likewise.
3964 * conf/powerpc-ieee1275.rmk: Likewise.
3965 (grub_emu_SOURCES): Add `fs/fshelp.c'.
3967 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
3969 2008-02-01 Robert Millan <rmh@aybabtu.com>
3971 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
3972 call at beginning of function.
3974 2008-01-31 Pavel Roskin <proski@gnu.org>
3976 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
3977 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
3978 (grub_mkrescue_SOURCES): Likewise.
3979 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
3981 2008-01-30 Robert Millan <rmh@aybabtu.com>
3983 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
3984 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
3985 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
3986 (grub_probe_SOURCES): ... to here.
3988 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
3989 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
3990 * conf/i386-ieee1275.rmk: Likewise.
3991 * conf/i386-linuxbios.rmk: Likewise.
3992 * conf/powerpc-ieee1275.rmk: Likewise.
3994 2008-01-30 Tristan Gingold <gingold@free.fr>
3996 * kern/rescue.c: Silently accept empty lines.
3998 2008-01-29 Bean <bean123ch@gmail.com>
4000 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
4001 (real_code_2): Code cleanup and change comment style.
4002 (move_memory): Avoid using 32-bit address mode.
4004 2008-01-29 Bean <bean123ch@gmail.com>
4006 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
4007 (png_mod_SOURCES): New variable.
4008 (png_mod_CFLAGS): Likewise.
4009 (png_mod_LDFLAGS): Likewise.
4011 * video/readers/png.c: New file.
4013 2008-01-28 Robert Millan <rmh@aybabtu.com>
4015 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
4016 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
4017 `ifndef GRUB_MOD_GAP' hack.
4018 * util/elf/grub-mkimage.c (add_segments): Likewise.
4020 2008-01-27 Robert Millan <rmh@aybabtu.com>
4022 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
4023 `GRUB_MOD_GAP' for platforms in which it's not defined.
4024 * util/elf/grub-mkimage.c (add_segments): Likewise.
4026 2008-01-27 Robert Millan <rmh@aybabtu.com>
4028 Get grub-emu to build again (including parallel builds).
4030 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
4032 (util/grub-emu.c_DEPENDENCIES): ... this, ...
4033 (normal/execute.c_DEPENDENCIES): ... this, ...
4034 (grub-emu_DEPENDENCIES): ... and this.
4036 * conf/i386-efi.rmk: Likewise.
4037 * conf/i386-linuxbios.rmk: Likewise.
4038 * conf/i386-ieee1275.rmk: Likewise.
4039 * conf/powerpc-ieee1275.rmk: Likewise.
4040 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
4042 2008-01-27 Robert Millan <rmh@aybabtu.com>
4044 * NEWS: Add a few items.
4046 2008-01-27 Robert Millan <rmh@aybabtu.com>
4048 Fix parallel builds with grub-emu. Based on earlier commit for
4049 grub-probe and grub-setup.
4051 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4052 (util/grub-emu.c_DEPENDENCIES): ... this.
4053 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4054 (util/grub-emu.c_DEPENDENCIES): ... this.
4055 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4056 (util/grub-emu.c_DEPENDENCIES): ... this.
4057 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4058 (util/grub-emu.c_DEPENDENCIES): ... this.
4059 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4060 (util/grub-emu.c_DEPENDENCIES): ... this.
4062 2008-01-27 Pavel Roskin <proski@gnu.org>
4064 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4065 to create a gap between _end and the modules added to the image
4066 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
4067 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4068 * util/elf/grub-mkimage.c (add_segments): Likewise.
4070 2008-01-26 Pavel Roskin <proski@gnu.org>
4072 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4073 just return an error.
4075 2008-01-26 Bean <bean123ch@gmail.com>
4077 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4078 (grub_reiserfs_get_item): Save offset of the next item.
4079 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4081 2008-01-25 Robert Millan <rmh@aybabtu.com>
4083 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4084 make all filesystem sources appear together (possibly fixing omissions
4086 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4087 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4088 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4089 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4091 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
4093 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4094 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4095 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4096 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4098 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4099 (probe): Add a sanity check to make sure of our ability to read
4100 requested files when probing for filesystem type.
4102 * genmk.rb: Update copyright year (2007).
4104 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4105 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4106 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4107 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4108 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4109 : Remove function prototypes.
4111 2008-01-25 Robert Millan <rmh@aybabtu.com>
4113 Revert my previous commits (based on wrong assumption of how grub_errno
4116 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
4117 * kern/file.c (grub_file_open): Likewise.
4119 2008-01-24 Pavel Roskin <proski@gnu.org>
4121 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4122 that hang if GRUB tries to setup colors.
4123 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4124 colors for firmwares that don't support it.
4125 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4126 Recognize Open Hack'Ware, set flags to work around its
4129 2008-01-24 Robert Millan <rmh@aybabtu.com>
4131 * kern/file.c (grub_file_open): Do not account previous failures of
4132 unrelated functions when grub_errno is checked for.
4133 Reported by Oleg Strikov.
4135 2008-01-24 Bean <bean123ch@gmail.com>
4137 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4138 (grub_ufs_sblock): New member volume name.
4139 (grub_ufs_find_file): Fix string copy bug.
4140 (grub_ufs_label): Implement this function properly.
4142 * fs/hfs.c (grub_hfs_cnid_type): New enum.
4143 (grub_hfs_iterate_records): Use the correct file number for extents
4144 and catalog file. Fix problem in next index calculation.
4145 (grub_hfs_find_node): Replace recursive function call with loop.
4146 (grub_hfs_iterate_dir): Replace recursive function call with loop.
4148 2008-01-23 Robert Millan <rmh@aybabtu.com>
4150 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4151 `<grub/symbol.h>' and `<grub/multiboot.h>'.
4152 (grub_multiboot2_real_boot): New function prototype.
4154 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4155 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4157 * kern/i386/ieee1275/init.c (grub_os_area_addr)
4158 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4160 2008-01-23 Robert Millan <rmh@aybabtu.com>
4162 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4163 #ifdef'ed out grub_printf().
4165 2008-01-23 Robert Millan <rmh@aybabtu.com>
4167 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4168 grub_dprintf calls, since they make "debug=all" mode unusable.
4169 (grub_console_checkkey): Likewise.
4171 2008-01-23 Robert Millan <rmh@aybabtu.com>
4173 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4174 `term/i386/pc/at_keyboard.c'.
4175 (pkglib_MODULES): Add `serial.mod'.
4176 (serial_mod_SOURCES): New variable.
4177 (serial_mod_CFLAGS): Likewise.
4178 (serial_mod_LDFLAGS): Likewise.
4180 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
4181 `<grub/powerpc/ieee1275/console.h>'.
4182 (grub_keyboard_controller_init): New function prototype.
4183 (grub_console_checkkey): Likewise.
4184 (grub_console_getkey): Likewise.
4186 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4189 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4190 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4192 2008-01-23 Robert Millan <rmh@aybabtu.com>
4194 * kern/i386/pc/init.c (make_install_device): When memdisk image is
4195 present, "(memdisk)/boot/grub" becomes the default prefix.
4197 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4198 a memdisk tarball with all the modules. Add --overlay=DIR option that
4199 allows users to overlay additional files into the image.
4201 2008-01-23 Robert Millan <rmh@aybabtu.com>
4203 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4204 and `machine/memory.h'.
4205 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4206 (_multiboot_mod_SOURCES): New variable.
4207 (_multiboot_mod_CFLAGS): Likewise.
4208 (_multiboot_mod_LDFLAGS): Likewise.
4209 (multiboot_mod_SOURCES): Likewise.
4210 (multiboot_mod_CFLAGS): Likewise.
4211 (multiboot_mod_LDFLAGS): Likewise.
4213 * include/grub/i386/ieee1275/loader.h: New file.
4215 * include/grub/i386/ieee1275/machine.h: Likewise.
4217 * include/grub/i386/ieee1275/memory.h: Likewise.
4219 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4220 variable declaration.
4221 (grub_os_area_size): Likewise.
4223 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4224 (grub_lower_mem, grub_upper_mem): New variables.
4225 (grub_stop_floppy): New function (just to make
4226 grub_multiboot2_real_boot() happy).
4228 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
4229 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
4230 (grub_stop): New function.
4231 Include `"../realmode.S"' and `"../loader.S"'.
4233 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
4234 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
4236 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
4237 rely on grub_multiboot2_real_boot() for final boot.
4239 2008-01-22 Robert Millan <rmh@aybabtu.com>
4241 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
4242 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
4243 device that doesn't look like an SD card.
4244 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4245 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
4246 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
4247 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
4250 2008-01-22 Robert Millan <rmh@aybabtu.com>
4252 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
4253 avoid claiming over our own code.
4255 2008-01-22 Bean <bean123ch@gmail.com>
4257 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
4258 (jpeg_mod_SOURCES): New variable.
4259 (jpeg_mod_CFLAGS): Likewise.
4260 (jpeg_mod_LDFLAGS): Likewise.
4262 * video/readers/jpeg.c : New file.
4264 2008-01-22 Bean <bean123ch@gmail.com>
4266 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
4267 there are no more items.
4269 2008-01-21 Robert Millan <rmh@aybabtu.com>
4271 * kern/mm.c (grub_mm_init_region): Improve debug message.
4273 2008-01-21 Robert Millan <rmh@aybabtu.com>
4275 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
4276 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
4278 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
4280 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
4281 Indicates start of upper memory.
4282 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
4283 (generate_image): Abort when image size is big enough to corrupt
4286 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
4287 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
4288 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4289 instead of hardcoding 0xA0000.
4290 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
4291 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4292 instead of hardcoding 0xA0000.
4294 2008-01-21 Robert Millan <rmh@aybabtu.com>
4296 * disk/memdisk.c (memdisk_size): New variable.
4297 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
4299 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
4300 image to dynamic memory.
4301 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
4302 `memdisk_size'. Free memdisk block.
4304 2008-01-21 Robert Millan <rmh@aybabtu.com>
4306 Fix detection of very small filesystems (like tar).
4308 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
4309 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
4310 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
4311 a problem with this disk).
4313 2008-01-21 Robert Millan <rmh@aybabtu.com>
4315 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
4316 on grub_biosdisk_rw_standard() error.
4318 2008-01-21 Robert Millan <rmh@aybabtu.com>
4320 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
4322 * kern/elf.c: Likewise.
4323 * kern/ieee1275/ieee1275.c: Likewise.
4324 * kern/powerpc/ieee1275/openfw.c: Likewise.
4325 * term/ieee1275/ofconsole.c: Likewise.
4327 2008-01-21 Robert Millan <rmh@aybabtu.com>
4329 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
4331 * include/grub/kernel.h (grub_arch_memdisk_addr)
4332 (grub_arch_memdisk_size): Moved from here ...
4334 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
4335 (grub_arch_memdisk_size): ... to here.
4337 2008-01-21 Robert Millan <rmh@aybabtu.com>
4339 Mostly based on bugfix from Bean.
4341 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
4342 attribute with hook() parameter.
4343 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
4345 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
4346 attribute with hook() parameter.
4347 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
4350 2008-01-21 Robert Millan <rmh@aybabtu.com>
4352 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
4353 (pkglib_MODULES): Add `memdisk.mod'.
4354 (memdisk_mod_SOURCES): New variable.
4355 (memdisk_mod_CFLAGS): Likewise.
4356 (memdisk_mod_LDFLAGS): Likewise.
4358 * disk/memdisk.c: New file.
4360 * include/grub/disk.h (grub_disk_dev_id): Add
4361 `GRUB_DISK_DEVICE_MEMDISK_ID'.
4363 * include/grub/i386/pc/kernel.h
4364 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4365 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4366 (grub_kernel_image_size): New variable declaration.
4367 (grub_total_module_size): Likewise.
4368 (grub_memdisk_image_size): Likewise.
4370 * include/grub/i386/pc/memory.h
4371 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4373 * include/grub/kernel.h: Include `<grub/symbol.h>'.
4374 (grub_arch_memdisk_addr): New variable declaration.
4375 (grub_arch_memdisk_size): Likewise.
4377 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4378 (grub_arch_memdisk_size): Likewise.
4380 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4381 (codestart): Replace hardcoded `0x100000' with
4382 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4384 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4385 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
4386 not NULL, append the contents of the file it refers to, at the end of
4387 the compressed kernel image. Initialize `grub_memdisk_image_size'
4388 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4389 (options): Add "memdisk"|'m' option.
4390 (main): Parse --memdisk|-m option, and pass user-provided path as
4391 parameter to generate_image().
4393 2008-01-20 Robert Millan <rmh@aybabtu.com>
4395 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4396 grub_dprintf() calls from here ...
4397 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4399 2008-01-20 Robert Millan <rmh@aybabtu.com>
4401 Fix detection of "real mode" when /options/real-mode? doesn't exist.
4403 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4405 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4406 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4407 `GRUB_IEEE1275_FLAG_REAL_MODE'.
4408 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4410 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4411 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4413 2008-01-19 Robert Millan <rmh@aybabtu.com>
4415 Get rid of confusing function (superseded by
4416 `grub_ieee1275_get_integer_property')
4417 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4419 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4421 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4422 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4423 in native endianness from grub_ieee1275_get_integer_property().
4425 2008-01-19 Robert Millan <rmh@aybabtu.com>
4427 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4428 command after "shut-down", since implementations differ on which
4429 the command for halt is.
4431 2008-01-19 Robert Millan <rmh@aybabtu.com>
4433 * include/grub/i386/linuxbios/console.h: Add header protection.
4434 (grub_keyboard_controller_init): New function prototype.
4435 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4436 (KEYBOARD_COMMAND_READ): Likewise.
4437 (KEYBOARD_COMMAND_WRITE): Likewise.
4438 (KEYBOARD_SCANCODE_SET1): Likewise.
4439 (grub_keyboard_controller_write): New function.
4440 (grub_keyboard_controller_read): Likewise.
4441 (grub_keyboard_controller_init): Likewise.
4443 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4444 (grub_console_init): On coreboot/LinuxBIOS, call
4445 grub_keyboard_controller_init().
4447 2008-01-19 Robert Millan <rmh@aybabtu.com>
4449 PowerPC changes provided by Pavel Roskin.
4451 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4452 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4453 don't rely on cmain() doing it.
4454 * kern/i386/ieee1275/startup.S (_start): Store %eax in
4455 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4457 2008-01-16 Robert Millan <rmh@aybabtu.com>
4459 * include/grub/i386/linuxbios/memory.h
4460 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4461 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4462 receive `table_header' as argument. Instead, probe for it in the
4463 known memory ranges where it can be present.
4464 (grub_available_iterate): Do not pass a fixed `table_header' address
4465 to grub_linuxbios_table_iterate().
4467 2008-01-15 Robert Millan <rmh@aybabtu.com>
4469 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4470 * conf/i386-ieee1275.rmk: New file.
4471 * include/grub/i386/ieee1275/console.h: Likewise.
4472 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4473 * include/grub/i386/ieee1275/kernel.h: Likewise.
4474 * include/grub/i386/ieee1275/time.h: Likewise.
4475 * kern/i386/ieee1275/init.c: Likewise.
4476 * kern/i386/ieee1275/startup.S: Likewise.
4478 2008-01-15 Robert Millan <rmh@aybabtu.com>
4480 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4481 when pointers are 32-bit (but still do set it to one when they are
4484 2008-01-15 Robert Millan <rmh@aybabtu.com>
4486 * include/grub/ieee1275/ieee1275.h
4487 (grub_ieee1275_get_integer_property): New function prototype.
4489 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4490 (grub_ieee1275_get_integer_property): New function. Wraps around
4491 grub_ieee1275_get_property() to handle endianness.
4493 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4494 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4496 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4497 (grub_map): Likewise.
4498 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4500 2008-01-15 Bean <bean123ch@gmail.com>
4502 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4503 (grub_script_execute_cmdline): Reset grub_errno.
4505 * normal/main.c (read_config_file): Reset grub_errno.
4507 * normal/parse.y (script_init): New.
4508 (script): Move function and menuentry here.
4510 (command): Add delimiter at the end of command.
4511 (commands): Adjust to match the new command.
4512 (commandblock): Remove grub_script_lexer_record_start.
4513 (menuentry): Add grub_script_lexer_record_start, use the new commands.
4514 (if): Use the new commands.
4516 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4518 2008-01-15 Robert Millan <rmh@aybabtu.com>
4520 * normal/menu.c (run_menu): Move timeout message from here ...
4521 (print_timeout): ... to here.
4522 (run_menu): Use print_timeout() once during initial draw to print
4523 the whole message, and again in every clock tick to update only
4524 the number of seconds.
4526 2008-01-15 Robert Millan <rmh@aybabtu.com>
4528 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4529 actual size of `available' from grub_ieee1275_get_property(), and
4530 restrict parsing to that bound.
4532 2008-01-15 Christian Franke <franke@computer.org>
4534 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4535 (argp_program_version): Remove variable.
4536 (argp_program_bug_address): Likewise.
4537 (options): Convert from struct argp_option to struct option.
4538 (struct arguments): Remove.
4539 (parse_opt): Remove.
4540 (usage): New function.
4541 (main): Replace struct args members by simple variables.
4542 Replace argp_parse() by getopt_long().
4543 Add switch to evaluate options.
4544 Add missing "(...)" around root_dev in prefix string.
4546 2008-01-14 Robert Millan <rmh@aybabtu.com>
4548 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4549 for grub_ieee1275_exit(), in order to improve portability.
4551 2008-01-14 Robert Millan <rmh@aybabtu.com>
4553 * util/grub.d/10_linux.in (prefix): Define.
4554 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
4556 2008-01-13 Pavel Roskin <proski@gnu.org>
4558 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
4559 grub_errno if no errors have been detected.
4561 2008-01-12 Robert Millan <rmh@aybabtu.com>
4563 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
4564 (grub_util_get_dev_abstraction): New function prototype.
4566 * util/getroot.c: Include `<grub/util/getroot.h>'
4567 (grub_util_get_grub_dev): Move detection of abstraction type to ...
4568 (grub_util_get_dev_abstraction): ... here (new function).
4570 * util/grub-probe.c: Convert PRINT_* to an enum. Add
4571 `PRINT_ABSTRACTION'.
4572 (probe): Probe for abstraction type when requested.
4573 (main): Understand `--target=abstraction'.
4575 * util/i386/efi/grub-install.in: Add abstraction module to core
4576 image when it is found to be necessary.
4577 * util/i386/pc/grub-install.in: Likewise.
4578 * util/powerpc/ieee1275/grub-install.in: Likewise.
4580 * util/update-grub_lib.in (font_path): Return system path without
4581 converting to GRUB path.
4582 * util/update-grub.in: Convert system path returned by font_path()
4583 to a GRUB path. Use `grub-probe -t abstraction' to determine what
4584 abstraction module is needed for loading fonts (if any). Export
4585 that as `GRUB_PRELOAD_MODULES'.
4586 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
4589 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
4591 Remove some unused code from reiserfs.
4593 * fs/reiserfs.c (struct grub_reiserfs_key)
4594 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
4595 (struct grub_reiserfs_node_body): Removed.
4596 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4598 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4600 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4602 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4604 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4606 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
4608 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4609 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4610 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4612 2008-01-10 Robert Millan <rmh@aybabtu.com>
4614 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
4615 Determines if a file is garbage left by packaging systems, etc.
4616 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
4617 for processing /etc/grub.d scripts.
4618 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
4619 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
4620 as a condition for processing Linux images.
4622 2008-01-10 Pavel Roskin <proski@gnu.org>
4624 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
4625 to compile reiserfs.c on PowerPC.
4627 2008-01-10 Robert Millan <rmh@aybabtu.com>
4629 * kern/device.c (grub_device_iterate): Do not abort device iteration
4630 when one of the devices cannot be opened.
4631 * kern/disk.c (grub_disk_open): Do not account previous failures of
4632 unrelated functions when grub_errno is checked for.
4634 2008-01-08 Robert Millan <rmh@aybabtu.com>
4636 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
4637 `! grub_linux_is_bzimage', change order of address comparison to make
4638 it more intuitive, and improve "too big zImage" error message.
4640 2008-01-08 Robert Millan <rmh@aybabtu.com>
4642 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
4643 `$(update-grub_DATA)'.
4644 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
4647 2008-01-07 Robert Millan <rmh@aybabtu.com>
4649 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
4650 which instruction is modified by grub-setup during installation
4651 (since it wasn't obvious by only looking at this file).
4653 2008-01-07 Robert Millan <rmh@aybabtu.com>
4655 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
4656 listing actual TODO items.
4658 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4660 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
4662 (grub_reiserfs_get_key_offset): Likewise.
4663 (grub_reiserfs_set_key_offset): Likewise.
4664 (grub_reiserfs_set_key_type): Likewise.
4665 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
4667 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
4668 better to remove the bitfield version completely.
4670 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4672 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
4673 allocated from the heap, due to the fshelp implementation.
4674 (grub_reiserfs_dir): Free NODE, due to the same reason.
4676 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4678 Mostly from Vincent Pelletier:
4680 * fs/reiserfs.c: New file.
4682 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
4683 (reiserfs_mod_SOURCES): New variable.
4684 (reiserfs_mod_CFLAGS): Likewise.
4685 (reiserfs_mod_LDFLAGS): Likewise.
4687 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
4688 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
4689 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
4692 2008-01-06 Robert Millan <rmh@aybabtu.com>
4694 * normal/color.c: Remove `<grub/env.h>'.
4696 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
4698 * include/grub/normal.h: Include <grub/env.h>.
4700 2008-01-05 Robert Millan <rmh@aybabtu.com>
4702 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
4703 usage example with `(hd0,1)'.
4704 Reported by Samuel Thibault.
4706 2008-01-05 Robert Millan <rmh@aybabtu.com>
4708 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
4709 (grub_linux_boot_zimage): Rename to ...
4710 (grub_linux_boot): ... this.
4711 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
4712 (grub_linux_boot_zimage): Conditionalize zImage copy.
4714 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
4715 (grub_linux_boot_bzimage): Remove prototype.
4716 (grub_linux_boot_zimage): Rename to ...
4717 (grub_linux_boot): ... this.
4719 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
4720 (grub_linux_boot): Remove function.
4722 2008-01-05 Robert Millan <rmh@aybabtu.com>
4724 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
4725 (grub_env_write_color_highlight): Likewise.
4726 (grub_wait_after_message): Likewise.
4728 * normal/color.c: New file.
4730 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4731 (normal_mod_DEPENDENCIES): Likewise.
4733 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4734 (normal_mod_DEPENDENCIES): Likewise.
4736 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4737 (normal_mod_DEPENDENCIES): Likewise.
4739 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4740 (normal_mod_DEPENDENCIES): Likewise.
4742 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
4743 for waiting after a message is printed.
4744 * normal/main.c (read_config_file): Likewise.
4745 (grub_normal_init): Register grub_env_write_color_normal() and
4746 grub_env_write_color_highlight() hooks. Mark `color_normal' and
4747 `color_highlight' variables as global.
4749 * normal/menu.c (grub_wait_after_message): New function.
4750 (grub_color_menu_normal): New variable. Replaces ...
4751 (GRUB_COLOR_MENU_NORMAL): ... this macro.
4752 (grub_color_menu_highlight): New variable. Replaces ...
4753 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
4754 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
4755 `GRUB_TERM_COLOR_STANDARD'.
4756 (print_message): Use `grub_setcolorstate' to reload colors. Rename
4757 `normal_code' and `highlight_code' to `old_color_normal' and
4758 `old_color_highlight', respectively.
4759 (grub_menu_init_page): Update colors when drawing the menu, based on
4760 `menu_color_normal' and `menu_color_highlight' variables.
4761 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
4762 a message is printed.
4764 2008-01-05 Robert Millan <rmh@aybabtu.com>
4766 * kern/env.c (grub_env_context_open): Propagate hooks for global
4767 variables to new context.
4769 * kern/main.c (grub_set_root_dev): Export `root' variable.
4771 2008-01-05 Robert Millan <rmh@aybabtu.com>
4773 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
4774 discs unconditionally, since udev and others have options to provide
4777 2008-01-05 Robert Millan <rmh@aybabtu.com>
4779 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
4781 2008-01-04 Christian Franke <franke@computer.org>
4783 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
4786 2008-01-03 Pavel Roskin <proski@gnu.org>
4788 * kern/i386/linuxbios/init.c: Put "void" to all function
4789 declarations with no arguments.
4790 * kern/powerpc/ieee1275/init.c: Likewise.
4791 * term/i386/pc/at_keyboard.c: Likewise.
4792 * term/i386/pc/vga_text.c: Likewise.
4793 * util/grub-mkdevicemap.c: Likewise.
4795 2008-01-02 Robert Millan <rmh@aybabtu.com>
4797 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
4798 message when loaded image is out of bounds.
4799 (grub_multiboot_load_elf64): Likewise.
4801 2008-01-02 Pavel Roskin <proski@gnu.org>
4803 * util/grub.d/10_linux.in: Try version without ".old" when
4804 looking for initrd. It's better to use initrd from the newer
4805 kernel of the same version than no initrd at all.
4807 2008-01-01 Robert Millan <rmh@aybabtu.com>
4809 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
4811 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
4813 * include/grub/video.h: Added grub_video_unmap_color and
4814 grub_video_get_active_render_target.
4815 (grub_video_adapter): Added unmap_color and get_active_render_target.
4817 * video/video.c: Added grub_video_unmap_color and
4818 grub_video_get_active_render_target.
4819 (grub_video_get_info): Changed method to accept NULL pointer as an
4820 argument to allow detection of active video adapter.
4822 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
4823 grub_video_vbe_unmap_color_int.
4824 Added grub_video_vbe_unmap_color and
4825 grub_video_vbe_get_active_render_target.
4826 (grub_video_vbe_adapter): Added unmap_color and
4827 get_active_render_target.
4829 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
4830 with grub_video_vbe_unmap_color_int.
4832 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
4833 (DEFAULT_NORMAL_COLOR): Likewise.
4834 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
4835 (DEFAULT_FG_COLOR): Removed.
4836 (DEFAULT_BG_COLOR): Likewise.
4837 (DEFAULT_CURSOR_COLOR): Changed value.
4838 (grub_virtual_screen): Added standard_color_setting,
4839 normal_color_setting, highlight_color_setting and term_color.
4840 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
4841 (bitmap_width): Added.
4842 (bitmap_height): Likewise.
4844 (set_term_color): Likewise.
4845 (grub_virtual_screen_setup): Changed to use new terminal coloring
4847 (grub_gfxterm_init): Added init for bitmap.
4848 (grub_gfxterm_fini): Added destroy for bitmap.
4849 (redraw_screen_rect): Updated to use background bitmap and new
4851 (scroll_up): Added optimization for case when there is no bitmap.
4852 (grub_gfxterm_cls): Fixed to use correct background color.
4853 (grub_virtual_screen_setcolorstate): Changed to use new terminal
4855 (grub_virtual_screen_setcolor): Likewise.
4856 (grub_virtual_screen_getcolor): Added.
4857 (grub_gfxterm_background_image_cmd): Likewise.
4858 (grub_video_term): Added setcolor and getcolor.
4859 (MOD_INIT): Added registration of background_image command.
4860 (MOD_TERM): Added unregistration for background_image command.
4862 2007-12-30 Pavel Roskin <proski@gnu.org>
4864 * loader/multiboot_loader.c: Fix multiboot command
4865 unregistration. Fix all typos in the word "multiboot".
4867 2007-12-29 Pavel Roskin <proski@gnu.org>
4869 * util/grub.d/10_linux.in: Refactor search for initrd. Add
4870 support for initrd names used in Fedora.
4872 2007-12-26 Bean <bean123ch@gmail.com>
4874 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
4875 (cpio_mod_SOURCES): New variable.
4876 (cpio_mod_CFLAGS): Likewise.
4877 (cpio_mod_LDFLAGS): Likewise.
4879 * fs/cpio.c: New file.
4881 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
4883 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4885 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4887 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4889 2007-12-25 Robert Millan <rmh@aybabtu.com>
4891 * include/grub/term.h (struct grub_term): Add `getcolor' function.
4892 (grub_getcolor): New function.
4894 * kern/term.c (grub_getcolor): New function.
4895 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
4896 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
4897 (print_entry): Set normal and highlight colors to
4898 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
4899 respectively, before printing and restore them to old
4901 (grub_menu_init_page): Likewise. Fill an additional colored space
4902 that would otherwise be left blank.
4904 * term/efi/console.c (grub_console_getcolor): New function.
4905 (struct grub_console_term.getcolor): New variable.
4906 * term/i386/pc/console.c (grub_console_getcolor): New function.
4907 (struct grub_console_term.getcolor): New variable.
4908 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
4909 (struct grub_console_term.getcolor): New variable.
4911 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
4912 (struct grub_console_term.setcolor): Remove variable.
4913 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
4914 (struct grub_console_term.setcolor): Remove variable.
4915 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
4916 (struct grub_console_term.setcolor): Remove variable.
4917 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
4918 (struct grub_console_term.setcolor): Remove variable.
4920 2007-12-25 Robert Millan <rmh@aybabtu.com>
4922 * configure.ac: Search for possible unifont.hex locations, and
4923 define UNIFONT_HEX if found.
4925 * Makefile.in (UNIFONT_HEX): Define variable.
4926 (DATA): Rename to ...
4927 (PKGLIB): ... this. Update all users.
4928 (PKGDATA): New variable.
4929 (pkgdata_IMAGES): Rename to ...
4930 (pkglib_IMAGES): ... this. Update all users.
4931 (pkgdata_MODULES): Rename to ...
4932 (pkglib_MODULES): ... this. Update all users.
4933 (pkgdata_PROGRAMS): Rename to ...
4934 (pkglib_PROGRAMS): ... this. Update all users.
4935 (pkgdata_DATA): Rename to ...
4936 (pkglib_DATA): ... this. Update all users.
4937 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
4938 (unicode.pff, ascii.pff): New rules.
4939 (all-local): Add `$(PKGDATA)' dependency.
4940 (install-local): Process `$(PKGDATA)'.
4942 * util/update-grub_lib.in (font_path): Search for *.pff files in
4943 a few more locations, including `${pkgdata}'.
4945 2007-12-23 Robert Millan <rmh@aybabtu.com>
4947 Patch from Bean <bean123ch@gmail.com>:
4948 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
4951 2007-12-21 Bean <bean123ch@gmail.com>
4953 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
4954 (ntfscomp_mod_SOURCES): New variable.
4955 (ntfscomp_mod_CFLAGS): Likewise.
4956 (ntfscomp_mod_LDFLAGS): Likewise.
4958 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
4959 (grub_probe_SOURCES): Likewise.
4960 (grub_emu_SOURCES): Likewise.
4962 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4963 (grub_emu_SOURCES): Likewise.
4965 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4966 (grub_emu_SOURCES): Likewise.
4968 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4969 (grub_emu_SOURCES): Likewise.
4971 * fs/ntfs.c (grub_ntfscomp_func): New variable.
4972 (read_run_list): Renamed to grub_ntfs_read_run_list.
4973 (decomp_nextvcn): Moved to ntfscomp.c.
4974 (decomp_getch): Likewise.
4975 (decomp_get16): Likewise.
4976 (decomp_block): Likewise.
4977 (read_block): Likewise.
4978 (read_data): Partially moved to ntfscomp.c.
4979 (fixup): Change unsigned to grub_uint16_t.
4980 (read_mft): Change unsigned long to grub_uint32_t.
4981 (read_attr): Likewise.
4982 (read_data): Likewise.
4983 (read_run_data): Likewise.
4984 (read_run_list): Likewise.
4985 (read_mft): Likewise.
4987 * fs/ntfscomp.c: New file.
4989 * include/grub/ntfs.h: New file.
4991 2007-12-16 Robert Millan <rmh@aybabtu.com>
4993 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
4994 IDE disk check, since Linux is known to support 20 IDE disks.
4995 Reported by Colin Watson.
4997 2007-12-15 Bean <bean123ch@gmail.com>
4999 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
5000 (lnxboot_img_SOURCES): New variable.
5001 (lnxboot_img_ASFLAGS): Likewise.
5002 (lnxboot_img_LDFLAGS): Likewise.
5004 * boot/i386/pc/lnxboot.S: New file.
5006 2007-11-24 Pavel Roskin <proski@gnu.org>
5008 * configure.ac: Test if '--build-id=none' is supported by the
5009 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
5010 objcopy to generate incorrect binary files (binutils
5011 2.17.50.0.18-1 as shipped by Fedora 8).
5012 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
5013 linking, so that build ID doesn't break the test.
5015 2007-11-24 Pavel Roskin <proski@gnu.org>
5017 * include/grub/i386/time.h: use "void" in the argument list
5019 * include/grub/powerpc/time.h: Likewise.
5020 * include/grub/sparc64/time.h: Likewise.
5022 2007-11-18 Christian Franke <franke@computer.org>
5024 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
5025 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
5026 This fixes the problem that function keys did not work in grub-emu.
5028 2007-11-18 Christian Franke <franke@computer.org>
5030 * disk/host.c (grub_host_open): Remove attribute unused from
5031 name parameter. Add check for "host". This fixes the problem
5032 that grub-emu does not find partitions.
5034 2007-11-18 Christian Franke <franke@computer.org>
5036 * util/hostfs.c (is_dir): New function.
5037 (grub_hostfs_dir): Handle missing dirent.d_type case.
5038 (grub_hostfs_read): Add missing fseek().
5039 (grub_hostfs_label): Clear label pointer. This fixes a crash
5040 of grub-emu on "ls (host)".
5042 2007-11-18 Christian Franke <franke@computer.org>
5044 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
5045 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
5046 to 64 bit boundary by default.
5048 2007-11-18 Bean <bean123ch@gmail.com>
5050 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5051 (hexdump_mod_SOURCES): New variable.
5052 (hexdump_mod_CFLAGS): Likewise.
5053 (hexdump_mod_LDFLAGS): Likewise.
5055 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5057 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5059 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5061 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5063 * include/grub/hexdump.h: New file.
5065 * commands/hexdump.c: New file.
5067 2007-11-10 Robert Millan <rmh@aybabtu.com>
5069 * commands/i386/pc/play.c (beep_off): Switch order of arguments
5070 in grub_outb() calls.
5071 (beep_on): Likewise.
5073 2007-11-10 Christian Franke <franke@computer.org>
5075 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5076 (grub_menu_run): Likewise.
5078 2007-11-10 Robert Millan <rmh@aybabtu.com>
5080 * include/grub/i386/efi/machine.h: New file.
5081 * include/grub/i386/linuxbios/machine.h: Likewise.
5082 * include/grub/i386/pc/machine.h: Likewise.
5083 * include/grub/powerpc/ieee1275/machine.h: Likewise.
5084 * include/grub/sparc64/ieee1275/machine.h: Likewise.
5086 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5087 (serial_hw_io_addr): New variable.
5088 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5089 instead of `(unsigned short *) 0x400'.
5091 2007-11-10 Bean <bean123ch@gmail.com>
5093 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5095 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5097 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5098 (vga_mod_SOURCES): Added.
5099 (vga_mod_CFLAGS): Likewise.
5100 (vga_mod_LDFLAGS): Likewise.
5102 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5104 (set_map_mask): Likewise.
5105 (set_read_map): Likewise.
5106 (set_read_address): Likewise.
5107 (vga_font): Removed variable.
5108 (get_vga_glyph): Removed function.
5109 (invalidate_char): Likewise.
5110 (write_char): Changed to use grub_font_get_glyph() for font
5112 (grub_vga_putchar): Likewise.
5113 (grub_vga_getcharwidth): Likewise.
5115 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5117 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5119 (pxeboot_img_LDFLAGS): Likewise.
5120 (diskboot_img_LDFLAGS): Likewise.
5121 (kernel_img_LDFLAGS): Likewise.
5123 2007-11-06 Robert Millan <rmh@aybabtu.com>
5125 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5126 in grub_outb() calls.
5127 (serial_hw_init): Likewise.
5129 2007-11-05 Robert Millan <rmh@aybabtu.com>
5131 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5132 spaces. Skip non-regular files.
5134 2007-11-05 Robert Millan <rmh@aybabtu.com>
5136 * kern/disk.c (grub_disk_firmware_fini)
5137 (grub_disk_firmware_is_tainted): New variables.
5139 * include/grub/disk.h (grub_disk_firmware_fini)
5140 (grub_disk_firmware_is_tainted): Likewise.
5142 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5143 (grub_disk_biosdisk_fini): ... to here.
5144 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5145 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5146 is set. Register grub_disk_biosdisk_fini() in
5147 `grub_disk_firmware_fini'.
5149 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5150 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5151 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5152 to finish existing firmware disk interface.
5154 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5155 (ata_mod_SOURCES): New variable.
5156 (ata_mod_CFLAGS): Likewise.
5157 (ata_mod_LDFLAGS): Likewise.
5159 2007-11-05 Robert Millan <rmh@aybabtu.com>
5161 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
5162 (grub_ata_wait): Reimplement using grub_millisleep().
5164 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5165 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5167 2007-11-03 Marco Gerards <marco@gnu.org>
5169 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5170 (CRTC_ADDR_PORT): New macro.
5171 (CRTC_DATA_PORT): Likewise.
5172 (CRTC_CURSOR): Likewise.
5173 (CRTC_CURSOR_ADDR_HIGH): Likewise.
5174 (CRTC_CURSOR_ADDR_LOW): Likewise.
5175 (update_cursor): New function.
5176 (grub_console_real_putchar): Call `update_cursor'.
5177 (grub_console_gotoxy): Likewise.
5178 (grub_console_cls): Set the default color when clearing the
5180 (grub_console_setcursor): Implemented.
5182 2007-11-03 Marco Gerards <marco@gnu.org>
5184 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5186 (grub_ata_pio_write): Likewise.
5188 (grub_atapi_identify): Wait after issuing an ATA command.
5189 (grub_atapi_packet): Likewise.
5190 (grub_ata_identify): Likewise.
5191 (grub_ata_readwrite): Likewise.
5193 2007-11-03 Marco Gerards <marco@gnu.org>
5195 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5196 (grub_ata_pio_write): Likewise.
5197 (grub_ata_readwrite): Use `grub_error', instead of
5198 returning `grub_errno'.
5200 2007-11-03 Marco Gerards <marco@gnu.org>
5202 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5203 grub_ata_pio_write once for every single sector, instead of for
5206 2007-10-31 Robert Millan <rmh@aybabtu.com>
5208 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5210 * conf/i386-linuxbios.rmk: New file.
5212 * kern/i386/pc/hardware.c: Likewise.
5213 * term/i386/pc/at_keyboard.c: Likewise.
5214 * term/i386/pc/vga_text.c: Likewise.
5216 * include/grub/i386/linuxbios/boot.h: Likewise.
5217 * include/grub/i386/linuxbios/console.h: Likewise.
5218 * include/grub/i386/linuxbios/init.h: Likewise.
5219 * include/grub/i386/linuxbios/kernel.h: Likewise.
5220 * include/grub/i386/linuxbios/loader.h: Likewise.
5221 * include/grub/i386/linuxbios/memory.h: Likewise.
5222 * include/grub/i386/linuxbios/serial.h: Likewise.
5223 * include/grub/i386/linuxbios/time.h: Likewise.
5225 * kern/i386/linuxbios/init.c: Likewise.
5226 * kern/i386/linuxbios/startup.S: Likewise.
5227 * kern/i386/linuxbios/table.c: Likewise.
5229 2007-10-31 Marco Gerards <marco@gnu.org>
5231 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
5232 (ata_mod_SOURCES): New variable.
5233 (ata_mod_CFLAGS): Likewise.
5234 (ata_mod_LDFLAGS): Likewise.
5236 * disk/ata.c: New file.
5238 * include/grub/disk.h (grub_disk_dev_id): Add
5239 `GRUB_DISK_DEV_ATA_ID'.
5241 2007-10-31 Robert Millan <rmh@aybabtu.com>
5243 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
5244 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
5246 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
5247 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
5249 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
5252 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
5254 2007-10-27 Robert Millan <rmh@aybabtu.com>
5256 * include/grub/types.h (ULONG_MAX): Define macro.
5258 2007-10-22 Robert Millan <rmh@aybabtu.com>
5260 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
5262 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
5264 2007-10-22 Robert Millan <rmh@aybabtu.com>
5266 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
5267 (pkgdata_MODULES): Add `biosdisk.mod'.
5268 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
5271 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
5272 (grub_biosdisk_init): Replace with ...
5273 (GRUB_MOD_INIT(biosdisk)): ... this.
5274 (grub_biosdisk_fini): Replace with ...
5275 (GRUB_MOD_FINI(biosdisk)): ... this.
5277 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
5278 (grub_machine_init): Remove call to grub_biosdisk_init().
5279 (grub_machine_fini): Remove call to grub_machine_fini().
5281 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
5283 2007-10-22 Robert Millan <rmh@aybabtu.com>
5285 * include/grub/time.h: New file.
5286 * include/grub/i386/time.h: Likewise.
5287 * include/grub/powerpc/time.h: Likewise.
5288 * include/grub/sparc64/time.h: Likewise.
5290 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
5292 (KERNEL_MACHINE_TIME_HEADER): ... this.
5293 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5295 (KERNEL_MACHINE_TIME_HEADER): ... this.
5296 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5298 (KERNEL_MACHINE_TIME_HEADER): ... this.
5300 * kern/i386/efi/init.c: Include `<grub/time.h>'.
5301 (grub_millisleep): New function.
5302 * kern/i386/pc/init.c: Include `<grub/time.h>'.
5303 (grub_millisleep): New function.
5304 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
5305 Remove `grub/machine/time.h' include.
5306 (grub_millisleep): New function.
5307 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
5308 Remove `grub/machine/time.h' include.
5309 (grub_millisleep): New function.
5311 * include/grub/misc.h (grub_div_roundup): New function.
5313 * kern/misc.c: Include `<grub/time.h>'.
5314 (grub_millisleep_generic): New function.
5316 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
5318 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
5320 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
5321 `machine/time.h'. Add `time.h'.
5322 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5324 2007-10-21 Robert Millan <rmh@aybabtu.com>
5326 * include/grub/misc.h (grub_max): New function.
5328 2007-10-21 Robert Millan <rmh@aybabtu.com>
5330 * util/misc.c (grub_util_info): Call fflush() before returning.
5332 2007-10-20 Robert Millan <rmh@aybabtu.com>
5334 * genmk.rb (Image): Copy `extra_flags' from here ...
5335 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
5337 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
5338 to `argc' and `args' arguments.
5340 2007-10-17 Robert Millan <rmh@aybabtu.com>
5342 * kern/i386/loader.S: New file.
5344 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
5345 * kern/i386/loader.S (grub_linux_prot_size)... to here.
5346 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
5347 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
5348 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
5349 * kern/i386/loader.S (grub_linux_real_addr)... to here.
5350 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
5351 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
5352 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
5353 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
5354 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5355 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5356 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5357 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5359 * kern/i386/realmode.S: New file.
5361 * kern/i386/pc/startup.S (protstack): Moved from here ...
5362 * kern/i386/realmode.S (protstack)... to here.
5363 * kern/i386/pc/startup.S (gdt): Moved from here ...
5364 * kern/i386/realmode.S (gdt)... to here.
5365 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5366 * kern/i386/realmode.S (prot_to_real)... to here.
5368 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5369 `kern/i386/realmode.S'.
5371 2007-10-17 Robert Millan <rmh@aybabtu.com>
5373 * include/grub/i386/loader.h: New file.
5375 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5376 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5377 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5378 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5379 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5380 * include/grub/i386/loader.h (grub_linux_prot_size)
5381 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5382 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5383 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5384 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5386 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5388 2007-10-15 Robert Millan <rmh@aybabtu.com>
5390 * normal/misc.c (grub_normal_print_device_info): Do not probe for
5391 filesystem when dev->disk is unset.
5392 Do probe for filesystem even when dev->disk->has_partitions is set.
5393 In case a filesystem is found, always report it.
5394 In case it isn't, if dev->disk->has_partitions is set, report that
5395 a partition table was found instead of reporting that no filesystem
5396 could be identified.
5398 2007-10-12 Robert Millan <rmh@aybabtu.com>
5400 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5401 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5403 * include/grub/types.h (grub_host_to_target16): New macro.
5404 (grub_host_to_target32): Likewise.
5405 (grub_host_to_target64): Likewise.
5406 (grub_target_to_host16): Likewise.
5407 (grub_target_to_host32): Likewise.
5408 (grub_target_to_host64): Likewise.
5410 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5412 (GRUB_MOD_ALIGN): ...this. Update all users.
5414 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5415 grub_host_to_target32.
5416 Replace grub_be_to_cpu32 with grub_target_to_host32.
5417 (load_modules): Likewise.
5418 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5419 Replace grub_be_to_cpu32 with grub_target_to_host32.
5420 Replace grub_cpu_to_be16 with grub_host_to_target16.
5421 Replace grub_cpu_to_be32 grub_host_to_target32.
5423 2007-10-12 Robert Millan <rmh@aybabtu.com>
5425 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5426 * util/elf/grub-mkimage.c: ... here.
5428 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
5429 `util/powerpc/ieee1275/grub-mkimage.c'.
5431 2007-10-07 Robert Millan <rmh@aybabtu.com>
5433 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5434 and make it easier to figure out.
5435 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5436 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5437 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5438 leave us with less than HEAP_MIN_SIZE total heap.
5439 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5441 2007-10-03 Robert Millan <rmh@aybabtu.com>
5443 * include/grub/i386/io.h: New file.
5444 * commands/i386/pc/play.c (inb): Removed.
5446 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5448 * term/i386/pc/serial.c (inb): Removed.
5450 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5452 * term/i386/pc/vga.c (inb): Removed.
5454 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5457 2007-10-02 Robert Millan <rmh@aybabtu.com>
5459 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5460 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5461 Reported by Marcin Kurek.
5463 2007-09-07 Robert Millan <rmh@aybabtu.com>
5465 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5466 SmartFirmware version updates (as released by Sven Luther), and avoid
5467 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5468 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5471 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5474 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5475 when merging two regions.
5477 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5479 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5480 * normal/completion.c (grub_normal_do_completion): Likewise.
5481 Reported by Hitoshi Ozeki.
5483 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5485 Do not use devices at boot in chainloading.
5487 * loader/i386/pc/chainloader.c (boot_drive): New variable.
5488 (boot_part_addr): Likewise.
5489 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5490 with BOOT_DRIVE and BOOT_PART_ADDR.
5491 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5492 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5494 2007-08-29 Robert Millan <rmh@aybabtu.com>
5496 Patch from Simon Peter <dn.tlp@gmx.net>:
5497 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5498 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5499 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
5500 util/i386/pc/grub-setup.c_DEPENDENCIES.
5501 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5502 util/grub-probe.c_DEPENDENCIES.
5503 * conf/powerpc-ieee1275.rmk: Likewise.
5505 2007-08-28 Robert Millan <rmh@aybabtu.com>
5507 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
5508 to tell grub-mkdevicemap how to name devices.
5509 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5512 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5513 util/i386/get_disk_name.c.
5514 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5515 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5516 util/ieee1275/get_disk_name.c.
5518 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5520 * DISTLIST: Add util/i386/get_disk_name.c and
5521 util/ieee1275/get_disk_name.c.
5523 * util/grub-mkdevicemap.c: Replace device naming logic with
5524 grub_util_get_disk_name() calls.
5526 2007-08-20 Robert Millan <rmh@aybabtu.com>
5528 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5529 (so that it works for both plural and singular quantities).
5531 2007-08-05 Robert Millan <rmh@aybabtu.com>
5533 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5534 so that [xz] isn't taken into account when determining order.
5536 2007-08-02 Marco Gerards <marco@gnu.org>
5538 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5539 `include/multiboot2.h', `include/grub/elfload.h',
5540 `include/multiboot.h', `include/grub/multiboot.h',
5541 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5542 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5543 `kern/elf.c', `loader/multiboot_loader.c',
5544 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5545 `loader/i386/pc/multiboot2.c',
5546 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5547 `util/i386/pc/grub-mkrescue.in'. Remove
5548 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5549 `include/grub/i386/pc/util/biosdisk.h' and
5550 `include/grub/powerpc/ieee1275/multiboot.h'.
5552 2007-08-02 Bean <bean123ch@gmail.com>
5554 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
5555 (ntfs_mod_SOURCES): New variable.
5556 (ntfs_mod_CFLAGS): Likewise.
5557 (ntfs_mod_LDFLAGS): Likewise.
5559 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
5560 (grub_probe_SOURCES): Likewise.
5561 (grub_emu_SOURCES): Likewise.
5563 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5564 (grub_emu_SOURCES): Likewise.
5566 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5567 (grub_emu_SOURCES): Likewise.
5569 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
5571 * fs/ntfs.c: New file.
5573 2007-08-02 Bean <bean123ch@gmail.com>
5575 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
5577 * file.h (grub_file): Likewise.
5579 * fshelp.h (grub_fshelp_read_file): Likewise.
5581 * util/i386/pc/grub-setup.c (setup): Likewise.
5582 (save_first_sector): Likewise.
5583 (save_blocklists): Likewise.
5585 * fs/affs.c (grub_affs_read_file): Likewise.
5587 * fs/ext2.c (grub_ext2_read_file): Likewise.
5589 * fs/fat.c (grub_fat_read_data): Likewise.
5591 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
5593 * fs/hfs.c (grub_hfs_read_file): Likewise.
5595 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5597 * fs/jfs.c (grub_jfs_read_file): Likewise.
5599 * fs/minix.c (grub_minix_read_file): Likewise.
5601 * fs/sfs.c (grub_sfs_read_file): Likewise.
5603 * fs/ufs.c (grub_ufs_read_file): Likewise.
5605 * fs/xfs.c (grub_xfs_read_file): Likewise.
5607 * command/blocklist.c (read_blocklist): Likewise.
5608 (print_blocklist): Likewise.
5610 2007-08-02 Marco Gerards <marco@gnu.org>
5612 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
5615 * disk/host.c: New file.
5617 * util/hostfs.c: Likewise.
5619 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
5620 return `GRUB_ERR_BAD_FS'.
5621 * fs/sfs.c (grub_sfs_mount): Likewise.
5622 * fs/xfs.c (grub_xfs_mount): Likewise.
5624 * include/grub/disk.h (enum grub_disk_dev_id): Add
5625 `GRUB_DISK_DEVICE_HOST_ID'.
5627 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
5629 2007-07-24 Jerone Young <jerone@gmail.com>
5631 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
5632 modules for compilation.
5633 * conf/powerpc-ieee1275.rmk: Likewise.
5635 * include/multiboot.h: Move multiboot definitions to one file. Rename
5636 many definitions to not get grub specific.
5637 * include/multiboot2.h: Create header with multiboot 2 definitions.
5638 * include/grub/multiboot.h: Header for grub specific function
5639 prototypes and definitions.
5640 * include/grub/multiboot2.h: Likewise.
5641 * include/grub/multiboot_loader.h: Likewise.
5642 * include/grub/i386/pc/multiboot.h: Removed.
5643 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
5645 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
5646 and 2 to allow for one multiboot and module commands.
5647 * loader/multiboot2.c: Add multiboot2 functionality.
5648 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
5649 and definition names.
5650 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
5652 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
5653 ieee1275 specific multiboot2 code.
5655 * kern/i386/pc/startup.S: Change headers and definition names for
5656 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
5658 2007-07-22 Robert Millan <rmh@aybabtu.com>
5660 * geninitheader.sh: Process file specified in first parameter rather
5661 than hardcoding grub_modules_init.lst.
5662 * geninit.sh: Likewise. Also, construct header name dynamically rather
5663 than hardcoding grub_modules_init.h.
5665 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
5666 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
5667 grub_probe_init.[ch] and grub_setup_init.[ch].
5669 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
5670 grub_modules_init.h with grub_emu_init.h.
5671 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
5672 grub_probe_init.[ch] files.
5673 * conf/i386-efi.rmk: Likewise.
5674 * conf/i386-pc.rmk: Likewise.
5675 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
5676 grub_setup_init.[ch] files.
5678 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
5679 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
5680 to initialize modules rather than a list of hardcoded functions.
5681 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
5682 grub_init_all() to initialize modules rather than a list of hardcoded
5685 2007-07-22 Robert Millan <rmh@aybabtu.com>
5687 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
5688 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
5690 2007-07-22 Robert Millan <rmh@aybabtu.com>
5692 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5693 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
5694 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
5695 flag when running on SmartFirmware.
5696 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
5697 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
5700 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5701 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
5702 rather than decreasing it.
5704 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
5705 there's not enough space to do it, fail in the same way as when it
5706 can't be done because there are no partitions.
5708 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
5709 when nvsetenv failed.
5711 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5713 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
5714 because this rule is automatically generated.
5715 (grub-mkrescue): Removed for the same reason as above.
5717 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5719 Migrate to GNU General Public License Version 3.
5721 * COPYING: Replaced with the plain text version of GPLv3.
5723 * config.guess: Updated from gnulib.
5724 * config.sub: Likewise.
5726 * geninit.sh: Output a GPLv3 copyright notice.
5727 * geninitheader.sh: Likewise.
5728 * genmodsrc.sh: Likewise.
5729 * gensymlist.sh.in: Likewise.
5731 * boot/i386/pc/boot.S: Upgraded to GPLv3.
5732 * boot/i386/pc/diskboot.S: Likewise.
5733 * boot/i386/pc/pxeboot.S: Likewise.
5734 * commands/blocklist.c: Likewise.
5735 * commands/boot.c: Likewise.
5736 * commands/cat.c: Likewise.
5737 * commands/cmp.c: Likewise.
5738 * commands/configfile.c: Likewise.
5739 * commands/echo.c: Likewise.
5740 * commands/help.c: Likewise.
5741 * commands/ls.c: Likewise.
5742 * commands/search.c: Likewise.
5743 * commands/terminal.c: Likewise.
5744 * commands/test.c: Likewise.
5745 * commands/videotest.c: Likewise.
5746 * commands/i386/cpuid.c: Likewise.
5747 * commands/i386/pc/halt.c: Likewise.
5748 * commands/i386/pc/play.c: Likewise.
5749 * commands/i386/pc/reboot.c: Likewise.
5750 * commands/i386/pc/vbeinfo.c: Likewise.
5751 * commands/i386/pc/vbetest.c: Likewise.
5752 * commands/ieee1275/halt.c: Likewise.
5753 * commands/ieee1275/reboot.c: Likewise.
5754 * commands/ieee1275/suspend.c: Likewise.
5755 * disk/loopback.c: Likewise.
5756 * disk/lvm.c: Likewise.
5757 * disk/raid.c: Likewise.
5758 * disk/efi/efidisk.c: Likewise.
5759 * disk/i386/pc/biosdisk.c: Likewise.
5760 * disk/ieee1275/ofdisk.c: Likewise.
5761 * font/manager.c: Likewise.
5762 * fs/affs.c: Likewise.
5763 * fs/ext2.c: Likewise.
5764 * fs/fat.c: Likewise.
5765 * fs/fshelp.c: Likewise.
5766 * fs/hfs.c: Likewise.
5767 * fs/hfsplus.c: Likewise.
5768 * fs/iso9660.c: Likewise.
5769 * fs/jfs.c: Likewise.
5770 * fs/minix.c: Likewise.
5771 * fs/sfs.c: Likewise.
5772 * fs/ufs.c: Likewise.
5773 * fs/xfs.c: Likewise.
5774 * hello/hello.c: Likewise.
5775 * include/grub/acorn_filecore.h: Likewise.
5776 * include/grub/arg.h: Likewise.
5777 * include/grub/bitmap.h: Likewise.
5778 * include/grub/boot.h: Likewise.
5779 * include/grub/cache.h: Likewise.
5780 * include/grub/device.h: Likewise.
5781 * include/grub/disk.h: Likewise.
5782 * include/grub/dl.h: Likewise.
5783 * include/grub/elfload.h: Likewise.
5784 * include/grub/env.h: Likewise.
5785 * include/grub/err.h: Likewise.
5786 * include/grub/file.h: Likewise.
5787 * include/grub/font.h: Likewise.
5788 * include/grub/fs.h: Likewise.
5789 * include/grub/fshelp.h: Likewise.
5790 * include/grub/gzio.h: Likewise.
5791 * include/grub/hfs.h: Likewise.
5792 * include/grub/kernel.h: Likewise.
5793 * include/grub/loader.h: Likewise.
5794 * include/grub/lvm.h: Likewise.
5795 * include/grub/misc.h: Likewise.
5796 * include/grub/mm.h: Likewise.
5797 * include/grub/net.h: Likewise.
5798 * include/grub/normal.h: Likewise.
5799 * include/grub/parser.h: Likewise.
5800 * include/grub/partition.h: Likewise.
5801 * include/grub/pc_partition.h: Likewise.
5802 * include/grub/raid.h: Likewise.
5803 * include/grub/rescue.h: Likewise.
5804 * include/grub/script.h: Likewise.
5805 * include/grub/setjmp.h: Likewise.
5806 * include/grub/symbol.h: Likewise.
5807 * include/grub/term.h: Likewise.
5808 * include/grub/terminfo.h: Likewise.
5809 * include/grub/tparm.h: Likewise.
5810 * include/grub/types.h: Likewise.
5811 * include/grub/video.h: Likewise.
5812 * include/grub/efi/api.h: Likewise.
5813 * include/grub/efi/chainloader.h: Likewise.
5814 * include/grub/efi/console.h: Likewise.
5815 * include/grub/efi/console_control.h: Likewise.
5816 * include/grub/efi/disk.h: Likewise.
5817 * include/grub/efi/efi.h: Likewise.
5818 * include/grub/efi/pe32.h: Likewise.
5819 * include/grub/efi/time.h: Likewise.
5820 * include/grub/i386/linux.h: Likewise.
5821 * include/grub/i386/setjmp.h: Likewise.
5822 * include/grub/i386/types.h: Likewise.
5823 * include/grub/i386/efi/kernel.h: Likewise.
5824 * include/grub/i386/efi/loader.h: Likewise.
5825 * include/grub/i386/efi/time.h: Likewise.
5826 * include/grub/i386/pc/biosdisk.h: Likewise.
5827 * include/grub/i386/pc/boot.h: Likewise.
5828 * include/grub/i386/pc/chainloader.h: Likewise.
5829 * include/grub/i386/pc/console.h: Likewise.
5830 * include/grub/i386/pc/init.h: Likewise.
5831 * include/grub/i386/pc/kernel.h: Likewise.
5832 * include/grub/i386/pc/loader.h: Likewise.
5833 * include/grub/i386/pc/memory.h: Likewise.
5834 * include/grub/i386/pc/multiboot.h: Likewise.
5835 * include/grub/i386/pc/serial.h: Likewise.
5836 * include/grub/i386/pc/time.h: Likewise.
5837 * include/grub/i386/pc/vbe.h: Likewise.
5838 * include/grub/i386/pc/vbeblit.h: Likewise.
5839 * include/grub/i386/pc/vbefill.h: Likewise.
5840 * include/grub/i386/pc/vbeutil.h: Likewise.
5841 * include/grub/i386/pc/vga.h: Likewise.
5842 * include/grub/ieee1275/ieee1275.h: Likewise.
5843 * include/grub/ieee1275/ofdisk.h: Likewise.
5844 * include/grub/powerpc/libgcc.h: Likewise.
5845 * include/grub/powerpc/setjmp.h: Likewise.
5846 * include/grub/powerpc/types.h: Likewise.
5847 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
5848 * include/grub/powerpc/ieee1275/console.h: Likewise.
5849 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
5850 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
5851 * include/grub/powerpc/ieee1275/loader.h: Likewise.
5852 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
5853 * include/grub/powerpc/ieee1275/time.h: Likewise.
5854 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
5855 * include/grub/sparc64/libgcc.h: Likewise.
5856 * include/grub/sparc64/setjmp.h: Likewise.
5857 * include/grub/sparc64/types.h: Likewise.
5858 * include/grub/sparc64/ieee1275/console.h: Likewise.
5859 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
5860 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
5861 * include/grub/sparc64/ieee1275/time.h: Likewise.
5862 * include/grub/util/biosdisk.h: Likewise.
5863 * include/grub/util/getroot.h: Likewise.
5864 * include/grub/util/lvm.h: Likewise.
5865 * include/grub/util/misc.h: Likewise.
5866 * include/grub/util/raid.h: Likewise.
5867 * include/grub/util/resolve.h: Likewise.
5868 * io/gzio.c: Likewise.
5869 * kern/device.c: Likewise.
5870 * kern/disk.c: Likewise.
5871 * kern/dl.c: Likewise.
5872 * kern/elf.c: Likewise.
5873 * kern/env.c: Likewise.
5874 * kern/err.c: Likewise.
5875 * kern/file.c: Likewise.
5876 * kern/fs.c: Likewise.
5877 * kern/loader.c: Likewise.
5878 * kern/main.c: Likewise.
5879 * kern/misc.c: Likewise.
5880 * kern/mm.c: Likewise.
5881 * kern/parser.c: Likewise.
5882 * kern/partition.c: Likewise.
5883 * kern/rescue.c: Likewise.
5884 * kern/term.c: Likewise.
5885 * kern/efi/efi.c: Likewise.
5886 * kern/efi/init.c: Likewise.
5887 * kern/efi/mm.c: Likewise.
5888 * kern/i386/dl.c: Likewise.
5889 * kern/i386/efi/init.c: Likewise.
5890 * kern/i386/efi/startup.S: Likewise.
5891 * kern/i386/pc/init.c: Likewise.
5892 * kern/i386/pc/lzo1x.S: Likewise.
5893 * kern/i386/pc/startup.S: Likewise.
5894 * kern/ieee1275/ieee1275.c: Likewise.
5895 * kern/powerpc/cache.S: Likewise.
5896 * kern/powerpc/dl.c: Likewise.
5897 * kern/powerpc/ieee1275/cmain.c: Likewise.
5898 * kern/powerpc/ieee1275/crt0.S: Likewise.
5899 * kern/powerpc/ieee1275/init.c: Likewise.
5900 * kern/powerpc/ieee1275/openfw.c: Likewise.
5901 * kern/sparc64/cache.S: Likewise.
5902 * kern/sparc64/dl.c: Likewise.
5903 * kern/sparc64/ieee1275/init.c: Likewise.
5904 * kern/sparc64/ieee1275/openfw.c: Likewise.
5905 * loader/efi/chainloader.c: Likewise.
5906 * loader/efi/chainloader_normal.c: Likewise.
5907 * loader/i386/efi/linux.c: Likewise.
5908 * loader/i386/efi/linux_normal.c: Likewise.
5909 * loader/i386/pc/chainloader.c: Likewise.
5910 * loader/i386/pc/chainloader_normal.c: Likewise.
5911 * loader/i386/pc/linux.c: Likewise.
5912 * loader/i386/pc/linux_normal.c: Likewise.
5913 * loader/i386/pc/multiboot.c: Likewise.
5914 * loader/i386/pc/multiboot_normal.c: Likewise.
5915 * loader/powerpc/ieee1275/linux.c: Likewise.
5916 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5917 * normal/arg.c: Likewise.
5918 * normal/cmdline.c: Likewise.
5919 * normal/command.c: Likewise.
5920 * normal/completion.c: Likewise.
5921 * normal/execute.c: Likewise.
5922 * normal/function.c: Likewise.
5923 * normal/lexer.c: Likewise.
5924 * normal/main.c: Likewise.
5925 * normal/menu.c: Likewise.
5926 * normal/menu_entry.c: Likewise.
5927 * normal/misc.c: Likewise.
5928 * normal/parser.y: Likewise.
5929 * normal/script.c: Likewise.
5930 * normal/i386/setjmp.S: Likewise.
5931 * normal/powerpc/setjmp.S: Likewise.
5932 * normal/sparc64/setjmp.S: Likewise.
5933 * partmap/acorn.c: Likewise.
5934 * partmap/amiga.c: Likewise.
5935 * partmap/apple.c: Likewise.
5936 * partmap/gpt.c: Likewise.
5937 * partmap/pc.c: Likewise.
5938 * partmap/sun.c: Likewise.
5939 * term/gfxterm.c: Likewise.
5940 * term/terminfo.c: Likewise.
5941 * term/efi/console.c: Likewise.
5942 * term/i386/pc/console.c: Likewise.
5943 * term/i386/pc/serial.c: Likewise.
5944 * term/i386/pc/vesafb.c: Likewise.
5945 * term/i386/pc/vga.c: Likewise.
5946 * term/ieee1275/ofconsole.c: Likewise.
5947 * util/biosdisk.c: Likewise.
5948 * util/console.c: Likewise.
5949 * util/genmoddep.c: Likewise.
5950 * util/getroot.c: Likewise.
5951 * util/grub-emu.c: Likewise.
5952 * util/grub-mkdevicemap.c: Likewise.
5953 * util/grub-probe.c: Likewise.
5954 * util/lvm.c: Likewise.
5955 * util/misc.c: Likewise.
5956 * util/raid.c: Likewise.
5957 * util/resolve.c: Likewise.
5958 * util/update-grub.in: Likewise.
5959 * util/update-grub_lib.in: Likewise.
5960 * util/grub.d/00_header.in: Likewise.
5961 * util/grub.d/10_hurd.in: Likewise.
5962 * util/grub.d/10_linux.in: Likewise.
5963 * util/i386/efi/grub-install.in: Likewise.
5964 * util/i386/efi/grub-mkimage.c: Likewise.
5965 * util/i386/pc/grub-install.in: Likewise.
5966 * util/i386/pc/grub-mkimage.c: Likewise.
5967 * util/i386/pc/grub-mkrescue.in: Likewise.
5968 * util/i386/pc/grub-setup.c: Likewise.
5969 * util/i386/pc/misc.c: Likewise.
5970 * util/powerpc/ieee1275/grub-install.in: Likewise.
5971 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
5972 * util/powerpc/ieee1275/misc.c: Likewise.
5973 * video/bitmap.c: Likewise.
5974 * video/video.c: Likewise.
5975 * video/i386/pc/vbe.c: Likewise.
5976 * video/i386/pc/vbeblit.c: Likewise.
5977 * video/i386/pc/vbefill.c: Likewise.
5978 * video/i386/pc/vbeutil.c: Likewise.
5979 * video/readers/tga.c: Likewise.
5981 2007-07-02 Robert Millan <rmh@aybabtu.com>
5983 * conf/i386-efi.rmk: Replace obsolete reference to
5984 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
5985 with util/getroot.c.
5986 * conf/powerpc-ieee1275.rmk: Likewise.
5987 * conf/sparc64-ieee1275.rmk: Likewise.
5989 * util/grub-emu.c (main): Fix unchecked pointer handling.
5991 2007-07-02 Robert Millan <rmh@aybabtu.com>
5993 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
5994 invocation to fail, in order to support partition-less media.
5996 * util/i386/pc/grub-install.in: Likewise.
5998 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
5999 which fs or partmap modules are needed (akin to its sister scripts).
6001 Also use grub-probe to get rid of unportable /proc/mounts check.
6003 Print the same informational message that the other scripts do, before
6006 2007-06-23 Robert Millan <rmh@aybabtu.com>
6008 * util/update-grub_lib.in (font_path): New function. Determine whether
6009 a font file can be found and, if so, echo the GRUB path to it.
6011 * util/update-grub.in: Handle multiple terminals depending on user
6012 input, platform availability and font file presence. Propagate
6013 variables of our findings to /etc/grub.d/ children.
6015 * util/grub.d/00_header.in: Handle multiple terminals, based on
6016 environment setup by update-grub.
6018 2007-06-23 Robert Millan <rmh@aybabtu.com>
6020 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
6022 2007-06-21 Robert Millan <rmh@aybabtu.com>
6024 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
6025 indicate end of data section in kernel image.
6026 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
6027 GRUB_KERNEL_MACHINE_DATA_END.
6029 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
6031 * kern/i386/efi/startup.S: Likewise.
6033 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
6034 during image generation. Implement --prefix option to override this
6036 * util/i386/efi/grub-mkimage.c: Likewise.
6038 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
6039 code to make path relative to its root into a separate function.
6041 * util/i386/pc/grub-install.in: Use newly provided
6042 make_system_path_relative_to_its_root() to convert ${grubdir}, then
6043 pass the result to grub-install --prefix.
6045 2007-06-13 Robert Millan <rmh@aybabtu.com>
6047 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6049 * util/grub-emu.c: Use above definitions from misc.h instead of
6051 * util/grub-mkdevicemap.c: Likewise.
6052 * util/i386/pc/grub-setup.c: Likewise.
6053 * util/grub-probe.c: Likewise.
6054 (probe): Abort with grub_util_error() when either
6055 grub_guess_root_device or grub_util_get_grub_dev fails.
6057 2007-06-12 Robert Millan <rmh@aybabtu.com>
6059 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6061 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6063 * util/grub-probe.c (probe): Likewise for "drive_name".
6065 2007-06-11 Robert Millan <rmh@aybabtu.com>
6067 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6068 not just the cdrom one.
6070 2007-06-11 Robert Millan <rmh@aybabtu.com>
6072 * util/i386/pc/grub-mkrescue.in: Add "set -e".
6073 Add --pkglibdir=DIR option to override pkglibdir.
6074 Mention --image-type=TYPE in help output.
6075 Fix --grub-mkimage (it was a no-op).
6076 Abort gracefully when no parameter is given.
6078 2007-06-11 Robert Millan <rmh@aybabtu.com>
6080 * util/i386/pc/grub-mkrescue.in: New file.
6081 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
6082 * Makefile.in: Handle bin_SCRIPTS.
6084 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
6086 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6087 list of video modes.
6089 2007-06-06 Robert Millan <rmh@aybabtu.com>
6091 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6092 file doesn't exist, or if it is in a filesystem grub can't read.
6094 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
6095 not abort if GRUB_DRIVE could not be defined. Rearrange generated
6096 header comment to fit in 80 columns when the variables are resolved.
6098 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6099 could be identified by update-grub. Remove redundant check for
6100 unifont.pff existence (since convert_system_path_to_grub_path now
6103 2007-06-04 Robert Millan <rmh@aybabtu.com>
6105 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6107 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6109 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6111 2007-06-04 Robert Millan <rmh@aybabtu.com>
6113 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6115 * include/grub/partition.h: Declare grub_apple_partition_map_init and
6116 grub_apple_partition_map_fini.
6119 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6120 to access >2 TiB disks).
6122 Print disk->total_sectors with %llu instead of %lu, since this
6123 variable is always 64-bit (prevents wrong disk size from being displayed
6124 on either >2 TiB disk or big-endian CPU).
6126 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6127 into a generic case that supports all (sane) partition maps.
6129 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6132 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6133 and grub_apple_partition_map_fini() after that.
6135 2007-06-01 Robert Millan <rmh@aybabtu.com>
6137 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6139 * util/grub.d/00_header.in: Only enable gfxterm when
6140 convert_system_path_to_grub_path() succeeds.
6142 2007-05-20 Robert Millan <rmh@aybabtu.com>
6144 * util/update-grub_lib.in: New file.
6145 * DISTLIST: Add update-grub_lib.in.
6146 * conf/common.rmk: Generate update-grub_lib and install it in
6148 * Makefile.in: Add install routine for $(lib_DATA).
6150 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6151 function provided by update-grub_lib to support arbitrary paths of
6153 * util/update-grub.in: Use convert_system_path_to_grub_path() to
6154 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6156 2007-05-19 Robert Millan <rmh@aybabtu.com>
6158 * commands/i386/cpuid.c: New module.
6160 * conf/i386-efi.rmk: Enable cpuid.mod.
6161 * conf/i386-pc.rmk: Likewise.
6163 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6165 * kern/disk.c (grub_disk_read): Check return value of
6168 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6170 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6172 * disk/raid.c (grub_raid_open): Likewise.
6174 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6176 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6177 stack instead of on the heap.
6179 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6180 before doing a read on it.
6182 * configure.ac: Only use -fno-stack-protector for the target
6185 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6187 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6188 __attribute_ ((unused)) to mode_type argument.
6190 * util/getroot.c (grub_guess_root_device): Fix #endif.
6192 * kern/misc.c (memcmp): Fix prototype.
6194 * include/grub/partition.h [GRUB_UTIL]
6195 (grub_gpt_partition_map_init): Add prototype.
6196 (grub_gpt_partition_map_fini): Likewise.
6198 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6201 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6202 (grub_fat_read_data): Likewise.
6203 (grub_fat_find_dir): Likewise.
6205 * font/manager.c (find_glyph): Make table a const.
6206 (grub_font_get_glyph): Remove bitmap from if statement.
6208 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
6210 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6211 code, first search for device in /dev/mapper, then in /dev.
6212 (grub_util_get_grub_dev): New function.
6213 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6215 * util/grub-probe.c (probe): Remove check for RAID, call
6216 grub_util_get_grub_dev() instead of
6217 grub_util_biosdisk_get_grub_dev().
6218 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6219 grub_util_biosdisk_get_grub_dev().
6220 * util/i386/pc/grub-setup.c (main): Likewise.
6222 2007-05-16 Robert Millan <rmh@aybabtu.com>
6224 * DISTLIST: Update for the latest changes.
6225 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6226 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
6227 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
6228 grub/util/biosdisk.h.
6229 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
6230 grub/util/biosdisk.h.
6232 2007-05-16 Robert Millan <rmh@aybabtu.com>
6234 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
6236 2007-05-16 Robert Millan <rmh@aybabtu.com>
6238 * util/i386/efi/grub-install.in: New.
6239 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
6240 newly added grub-install.
6241 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
6243 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
6244 grub/util/biosdisk.h.
6245 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
6246 grub/util/biosdisk.h.
6248 2007-05-16 Robert Millan <rmh@aybabtu.com>
6250 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
6251 * include/grub/util/biosdisk.h: ... here.
6252 * util/i386/pc/biosdisk.c: Moved to ...
6253 * util/biosdisk.c: ... here.
6254 * util/i386/pc/getroot.c: Moved to ...
6255 * util/getroot.c: ... here.
6256 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
6257 * util/grub-mkdevicemap.c: ... here.
6258 * util/i386/pc/grub-probe.c: Moved to ...
6259 * util/grub-probe.c: ... here.
6261 2007-05-15 Robert Millan <rmh@aybabtu.com>
6263 * util/update-grub.in: Remove duplicated line in grub.cfg header
6266 2007-05-13 Robert Millan <rmh@aybabtu.com>
6268 * util/update-grub.in: Fix a few assumptions about the devices holding
6269 /, /boot and /boot/grub being the same.
6270 * util/grub.d/00_header.in: Likewise.
6271 * util/grub.d/10_hurd.in: Likewise.
6272 * util/grub.d/10_linux.in: Likewise.
6274 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
6275 patterns. Use that to define the `.old' suffix as older than `'.
6277 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
6279 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
6280 the grub.cfg header message.
6282 2007-05-11 Robert Millan <rmh@aybabtu.com>
6284 * util/update-grub.in: Create device.map if it doesn't already exist,
6285 before attempting to run grub-probe.
6286 Check for grub-probe and grub-mkdevicemap with the same code
6287 grub-install is using.
6290 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
6292 * Makefile.in: Add the datarootdir autoconf variable.
6294 2007-05-09 Robert Millan <rmh@aybabtu.com>
6296 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
6297 fail gracefully if dev->disk->partition == NULL.
6299 2007-05-07 Robert Millan <rmh@aybabtu.com>
6301 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
6302 determine partition map module.
6303 * util/i386/pc/grub-install.in: Use this feature to decide which
6304 partition module to load, instead of hardcoding pc and gpt.
6306 2007-05-07 Robert Millan <rmh@aybabtu.com>
6308 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
6309 source directory differs from build directory.
6311 2007-05-05 Robert Millan <rmh@aybabtu.com>
6313 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
6316 2007-05-05 Robert Millan <rmh@aybabtu.com>
6318 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
6320 2007-05-05 Robert Millan <rmh@aybabtu.com>
6322 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
6323 command-line arguments via ${GRUB_CMDLINE_LINUX}.
6325 2007-05-05 Robert Millan <rmh@aybabtu.com>
6327 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
6328 (grub_probe_SOURCES): Likewise.
6329 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
6330 GPT and initialize dos_part and bsd_part accordingly.
6331 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
6333 (main): Activate gpt module for use during partition identification,
6334 and deactivate it afterwards.
6335 * util/i386/pc/grub-install.in: Add gpt module to core.img.
6336 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
6337 partition identification, and deactivate it afterwards.
6339 2007-05-05 Robert Millan <rmh@aybabtu.com>
6341 * term/i386/pc/console.c (grub_console_fini): Call
6342 grub_term_set_current() before grub_term_unregister().
6344 2007-05-04 Robert Millan <rmh@aybabtu.com>
6346 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
6347 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
6348 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
6349 and update-grub_DATA.
6350 * conf/common.rmk: Build and install update-grub components.
6351 * conf/common.mk: Regenerate.
6352 * util/update-grub.in: New. Core of update-grub.
6353 * util/grub.d/00_header.in: New. Generates grub.cfg header.
6354 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
6355 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
6356 * util/grub.d/README: New. Document grub.d directory layout.
6358 2007-05-01 Robert Millan <rmh@aybabtu.com>
6360 * util/grub-emu.c: Move initialization functions
6361 grub_util_biosdisk_init() and grub_init_all() before
6362 grub_util_biosdisk_get_grub_dev(), which relies on them.
6364 2007-04-19 Robert Millan <rmh@aybabtu.com>
6366 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6369 2007-04-18 Jerone Young <jerone@gmail.com>
6371 * kernel/elf.c: Add missing parenthesis for conditional statement
6374 2007-04-10 Jerone Young <jerone@gmail.com>
6376 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6377 continue on and look for device node with real device name.
6379 2007-04-10 Jerone Young <jerone@gmail.com>
6381 * configure.ac: Add argument for autoconf to use transformation
6383 * Makefile.in: Add autoconf package transformation code.
6384 * util/i386/pc/grub-install.in: Likewise.
6385 * util/powerpc/ieee1275/grub-install.in: Likewise.
6387 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
6389 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6390 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6391 (EXT2_REVISION): Likewise.
6392 (EXT2_INODE_SIZE): Likewise.
6393 (struct grub_ext2_block_group): Added a missing member
6395 (grub_ext2_read_inode): Divide by the inode size in a superblock
6396 instead of 128 to obtain INODES_PER_BLOCK.
6397 Use the macro EXT2_INODE_SIZE instead of directly using
6400 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
6402 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6403 superblock instead of the structure size to compute an
6404 offset. This fixes the problem that GRUB could not read a
6405 filesystem when inode size is different from 128-byte.
6407 2007-03-05 Marco Gerards <marco@gnu.org>
6409 * normal/main.c (read_config_file): When "menu" is not set, create
6412 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6414 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6415 (HEAP_LIMIT): New macro.
6416 (grub_claim_heap): Claim memory up to `heaplimit'.
6418 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6420 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6421 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6423 (grub_arch_modules_addr): Return address after `_end'.
6424 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6425 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6426 (add_segments): Calculate `_end' from phdr size and location.
6427 (ALIGN_UP): Moved to ...
6428 * include/grub/misc.h: here.
6429 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6431 (GRUB_IEEE1275_MODULE_BASE): Removed.
6433 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6435 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6438 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6440 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6442 (grub_elf64_load_hook_t): Likewise.
6443 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6446 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6448 * kern/mm.c: Update copyright.
6449 (grub_mm_debug): Correct syntax error.
6450 (grub_mm_dump_free): New function.
6451 (grub_debug_free): Call `grub_free'.
6452 * include/grub/mm.h: Update copyright.
6453 (grub_mm_dump_free): Add declaration.
6455 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6457 * include/grub/ieee1275/ieee1275.h: Update copyright.
6458 * kern/powerpc/ieee1275/init.c: Likewise.
6459 * kern/powerpc/ieee1275/openfw.c: Likewise.
6461 * loader/powerpc/ieee1275/linux.c: Likewise.
6462 * include/grub/elfload.h: Likewise.
6463 * kern/elf.c: Likewise.
6464 (grub_elf32_load): Pass `base' and `size' parameters. Update all
6466 (grub_elf64_load): Likewise.
6467 (grub_elf32_load_segment): Move to a nested function.
6468 (grub_elf64_load_segment): Likewise.
6470 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6472 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6474 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6475 (grub_heap_len): Likewise.
6476 (HEAP_SIZE): New macro.
6477 (grub_claim_heap): New function.
6478 (grub_machine_init): Don't claim heap directly. Call
6480 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6481 (grub_available_iterate): New function.
6483 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
6485 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6486 * configure.ac: Use it for testing the HOST and TARGET compilers.
6488 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
6490 * Makefile.in (enable_grub_emu): New variable.
6491 * configure.ac (--enable-grub-emu): New option.
6492 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6493 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6494 * conf/i386-pc.rmk: Likewise.
6495 * conf/powerpc-ieee1275.rmk: Likewise.
6496 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6498 2006-12-12 Marco Gerards <marco@gnu.org>
6500 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6502 * kern/env.c (grub_env_unset): Don't free the member `value' when
6503 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6506 * normal/main.c (current_menu): Removed.
6507 (free_menu): Unset the `menu' environment variable.
6508 (grub_normal_menu_addentry): Make use of the environment variable
6509 `menu', instead of using the global `current_menu'. Allocate
6510 memory for the sourcecode of this entry.
6511 (read_config_file): New argument `nested', changed all callers.
6512 Only in the case of a new context, initialize a new menu. Set the
6513 `menu' environment variable.
6514 (grub_normal_execute): Don't set and unset the environment
6515 variable `menu' here anymore. Only free the menu when leaving the
6518 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6521 2006-12-11 Marco Gerards <marco@gnu.org>
6523 * normal/menu_entry.c (run): Fix off by one bug so the last line
6524 is executed. Move the loader check to outside the loop.
6526 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
6528 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6530 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
6532 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6533 the number of sectors. Reported by Andrey Shuvikov
6534 <mr_hyro@yahoo.com>.
6536 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
6538 * kern/disk.c (grub_disk_read): When there is a read error, always
6539 try to read only the necessary data.
6541 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6543 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6545 [GRUB_UTIL] (grub_raid_fini): Likewise.
6546 [GRUB_UTIL] (grub_lvm_init): Likewise.
6547 [GRUB_UTIL] (grub_lvm_fini): Likewise.
6548 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6549 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6550 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
6551 and grub_raid_fini().
6553 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
6555 * include/grub/types.h (__unused): Rename to UNUSED.
6556 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
6557 (grub_elf64_size): Likewise.
6559 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6561 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
6562 grub_error_push and grub_error_pop in the error-handling path.
6563 (grub_elf32_load_segment): Only call grub_file_read with non-zero
6566 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6568 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
6569 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6570 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6571 (kernel_elf_SOURCES): Likewise.
6572 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
6573 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
6574 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6575 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6576 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
6577 (elf_mod_SOURCES): New variable.
6578 (elf_mod_CFLAGS): Likewise.
6579 (elf_mod_LDFLAGS): Likewise.
6580 * include/grub/types.h (__unused): New macro.
6581 * include/grub/elfload.h: New file.
6582 * kern/elf.c: Likewise.
6583 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
6584 (ELF32_LOADMASK): New macro.
6585 (ELF64_LOADMASK): Likewise.
6587 (grub_linux_load32): New function.
6588 (grub_linux_load64): Likewise.
6589 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
6590 Use grub_elf_t instead of grub_file_t.
6592 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
6594 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
6595 `catch_result' to struct set_color_args.
6597 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
6599 * normal/menu.c: Include grub/script.h.
6600 * normal/menu_entry.c: Likewise.
6601 * include/grub/normal.h: Do not include grub/script.h.
6603 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6605 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
6607 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6609 * kern/disk.c (grub_disk_open): Print debug messages when opening a
6611 (grub_disk_close): Print debug messages when closing a disk.
6612 (grub_disk_read): Print debug messages when disk read fails.
6613 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
6615 * kern/partition.c: Include misc.h.
6616 (grub_partition_iterate): Print debug messages when detecting
6619 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6621 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
6623 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
6625 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
6627 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6628 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
6630 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
6632 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
6633 instead of sizeof(lv). Patch by Michael Guntsche.
6635 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
6637 * disk/lvm.c: Rename VGS to VG_LIST.
6638 (grub_lvm_iterate): Change VGS->LV to VG-LV.
6639 (grub_lvm_open): Likewise.
6640 Thanks to Michael Guntsche for finding this bug.
6642 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6644 * configure.ac (AC_INIT): Bumped to 1.95.
6646 2006-10-14 Robert Millan <rmh@aybabtu.com>
6648 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
6649 with "/dev/.static/dev/md".
6651 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
6653 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
6654 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
6655 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
6656 DRIVE_NAME are always freed.
6658 * util/i386/pc/biosdisk.c (make_device_name): Add one into
6659 DOS_PART, as a DOS partition is counted from one instead of zero
6660 now. Reported by Robert Millan.
6662 2006-10-14 Robert Millan <rmh@aybabtu.com>
6664 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
6665 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
6666 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
6667 string returned by grub_guess_root_device.
6668 * util/i386/pc/grub-setup.c: Likewise.
6669 * util/i386/pc/grub-probefs.c: Likewise.
6671 * util/i386/pc/grub-probefs.c: Rename to ...
6672 * util/i386/pc/grub-probe.c: ... this.
6673 * DISTLIST: Remove grub-probefs, add grub-probe.
6674 * conf/i386-efi.rmk: Likewise.
6675 * conf/i386-pc.rmk: Likewise.
6676 * util/i386/pc/grub-install.in: Likewise.
6678 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
6679 choose which information we want to print.
6681 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
6683 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
6684 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
6685 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
6686 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
6687 video/readers/tga.c and video/i386/pc/vbeutil.c.
6689 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
6691 Added support for RAID and LVM.
6693 * disk/lvm.c: New file.
6694 * disk/raid.c: Likewise.
6695 * include/grub/lvm.h: Likewise.
6696 * include/grub/raid.h: Likewise.
6697 * include/grub/util/lvm.h: Likewise.
6698 * include/grub/util/raid.h: Likewise.
6699 * util/lvm.c: Likewise.
6700 * util/raid.c: Likewise.
6702 * include/grub/disk.h (grub_disk_dev_id): Add
6703 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
6704 (grub_disk_get_size): New prototype.
6705 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
6706 returns a partition.
6707 (grub_disk_get_size): New function.
6709 * kern/i386/pc/init.c (make_install_device): Copy the prefix
6710 verbatim if grub_install_dos_part is -2.
6712 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
6715 * util/i386/pc/grub-setup.c (setup): New argument
6716 MUST_EMBED. Force embedding of GRUB when the argument is
6717 true. Close FILE before returning.
6718 (main): Add support for RAID and LVM.
6720 * conf/common.rmk: Add RAID and LVM modules.
6721 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
6723 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
6725 * kern/misc.c (grub_strstr): New function.
6726 * include/grub/misc.h (grub_strstr): New prototype.
6728 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
6730 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
6732 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
6734 * kern/misc.c (grub_strtoull): Guess the base only if not
6737 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6739 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
6742 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6744 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
6746 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
6747 Remove `flags' argument. All callers changed.
6748 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
6749 (IEEE1275_IHANDLE_INVALID): New variable.
6750 (IEEE1275_CELL_INVALID): New variable.
6751 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
6752 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
6753 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
6754 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
6755 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
6756 codes from Open Firmware. All callers updated.
6757 (grub_ieee1275_next_property): Directly return Open Firmware return
6759 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6760 Standardize error checking from `grub_ieee1275_get_property'.
6761 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
6762 `devalias' to `aliases'. Correct comments. Consolidate error paths.
6764 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6766 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
6767 `instance_to_package_args' to `instance_to_path_args'.
6769 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
6770 `grub_ieee1275_chosen'.
6772 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
6773 `grub_ieee1275_interpret'.
6775 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6777 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
6779 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6781 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
6782 (__cmpdi): Likewise.
6784 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
6785 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
6788 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
6790 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
6791 to type `grub_ssize_t'.
6792 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
6794 2006-09-22 Marco Gerards <marco@gnu.org>
6796 * normal/script.c (grub_script_create_cmdmenu): Skip leading
6799 2006-09-22 Marco Gerards <marco@gnu.org>
6801 * commands/echo.c: New file.
6803 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
6805 * conf/common.rmk (echo_mod_SOURCES): New variable.
6806 (echo_mod_CFLAGS): Likewise.
6807 (echo_mod_LDFLAGS): Likewise.
6809 2006-09-22 Marco Gerards <marco@gnu.org>
6811 * normal/main.c (get_line): Malloc memory instead of using
6812 preallocated memory. Removed the arguments `cmdline' and
6813 `max_len'. Updated all callers.
6815 2006-09-22 Marco Gerards <marco@gnu.org>
6817 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
6818 (normal_mod_DEPENDENCIES): Likewise.
6820 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
6821 (normal_mod_DEPENDENCIES): Likewise.
6823 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
6825 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
6827 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
6829 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
6830 (normal_mod_DEPENDENCIES): Likewise.
6831 * conf/i386-pc.mk: Regenerate.
6832 * conf/i386-efi.mk: Likewise
6833 * conf/common.mk: Likewise.
6834 * conf/powerpc-ieee1275.mk: Likewise.
6835 * conf/sparc64-ieee1275.mk: Likewise.
6837 2006-09-22 Robert Millan <rmh@aybabtu.com>
6839 Sync with i386 version.
6840 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
6841 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
6843 2006-09-21 Robert Millan <rmh@aybabtu.com>
6845 Import from GRUB Legacy (lib/device.c):
6846 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
6847 (init_device_map) [__linux__]: Add support for I2O devices.
6849 2006-09-14 Marco Gerards <marco@gnu.org>
6851 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
6854 2006-09-14 Robert Millan <rmh@aybabtu.com>
6856 * util/i386/pc/grub-install.in: Skip menu.lst when removing
6859 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6861 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
6862 before adding it to device.map.
6864 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
6866 * genmk.rb: Let GCC generate dependencies the first time it
6867 compiles a file; using the -MD option.
6868 * conf/common.mk: Regenerate.
6869 * conf/i386-pc.mk: Likewise.
6870 * conf/i386-efi.mk: Likewise.
6871 * conf/powerpc-ieee1275.mk: Likewise.
6872 * conf/sparc64-ieee1275.mk: Likewise.
6874 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
6876 Move the prototypes of grub_setjmp and grub_longjmp to
6877 cpu/setjmp.h, so that each architecture may specify different
6880 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
6881 (grub_longjmp): Likewise.
6882 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
6883 (grub_longjmp): Likewise.
6884 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
6885 (grub_longjmp): Likewise.
6887 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
6888 [!GRUB_UTIL] (grub_longjmp): Removed.
6890 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
6892 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
6893 "color!" method does not return any value.
6895 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6897 * include/grub/bitmap.h: New file.
6899 * include/grub/i386/pc/vbeutil.h: Likewise.
6901 * video/bitmap.c: Likewise.
6903 * video/readers/tga.c: Likewise.
6905 * video/i386/pc/vbeutil.c: Likewise.
6907 * commands/videotest.c: Code cleanup and updated to reflect to new
6910 * term/gfxterm.c: Likewise.
6912 * video/video.c: Likewise.
6914 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
6915 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
6916 (bitmap_mod_SOURCES): New entry.
6917 (bitmap_mod_CFLAGS): Likewise.
6918 (bitmap_mod_LDFLAGS): Likewise.
6919 (tga_mod_SOURCES): Likewise.
6920 (tga_mod_CFLAGS): Likewise.
6921 (tga_mod_LDFLAGS): Likewise.
6923 * include/grub/video.h (grub_video_blit_operators): New enum type.
6924 (grub_video_render_target): Changed as forward declaration and moved
6925 actual definition to be video driver specific.
6926 (grub_video_adapter.blit_bitmap): Added blitting operator.
6927 (grub_video_adapter.blit_render_target): Likewise.
6928 (grub_video_blit_bitmap): Likewise.
6929 (grub_video_blit_render_target): Likewise.
6931 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
6932 driver specific render target definition.
6933 (grub_video_vbe_map_rgba): Added driver internal helper.
6934 (grub_video_vbe_unmap_color): Updated to use
6935 grub_video_i386_vbeblit_info.
6936 (grub_video_vbe_get_video_ptr): Likewise.
6938 * include/grub/i386/pc/vbeblit.h
6939 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
6940 grub_video_i386_vbeblit_info.
6941 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6942 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6943 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6944 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6945 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6946 (grub_video_i386_vbeblit_index_index): Likewise.
6947 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
6948 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6949 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6950 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
6952 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
6955 * video/i386/pc/vbeblit.c: Updated to reflect changes on
6956 include/grub/i386/pc/vbeblit.h.
6958 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
6959 Updated to use grub_video_i386_vbeblit_info.
6960 (grub_video_i386_vbefill_R8G8B8): Likewise.
6961 (grub_video_i386_vbefill_index): Likewise.
6962 (grub_video_i386_vbefill): Added generic filler.
6964 * video/i386/pc/vbefill.c: Updated to reflect changes on
6965 include/grub/i386/pc/vbefill.h.
6967 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
6968 grub_video_i386_vbeblit_info.
6969 (grub_video_vbe_unmap_color): Likewise.
6970 (grub_video_vbe_blit_glyph): Likewise.
6971 (grub_video_vbe_scroll): Likewise.
6972 (grub_video_vbe_draw_pixel): Removed function.
6973 (grub_video_vbe_get_pixel): Likewise.
6974 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
6975 updated code to use it.
6976 (common_blitter): Added common blitter for render target and bitmap.
6977 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
6978 (grub_video_vbe_blit_render_target): Likewise.
6980 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
6982 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
6983 is in text mode if there is no console control protocol instance
6986 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6988 * include/grub/video.h: Code cleanup.
6990 * include/grub/i386/pc/vbe.h: Likewise.
6992 * video/i386/pc/vbe.c: Likewise.
6994 * video/i386/pc/vbeblit.c: Likewise.
6996 * video/i386/pc/vbefill.c: Likewise.
6998 * video/video.c: Likewise. Also added more comments.
7000 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
7002 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
7003 (struct grub_biosdisk_dap): Likewise.
7005 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
7006 linkage settings for all functions.
7008 2006-07-12 Marco Gerards <marco@gnu.org>
7010 * configure.ac (--enable-mm-debug): Fix typo.
7012 * genkernsyms.sh.in: Use proper quoting for `CC'.
7014 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
7016 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
7017 (normal_mod_ASFLAGS): Remove "-m32".
7019 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
7021 * util/misc.c: Include config.h.
7022 [!HAVE_MEMALIGN]: Do not include malloc.h.
7023 (grub_memalign): Use posix_memalign, if present. Then, use
7024 memalign, if present. Otherwise, emit an error.
7026 * util/grub-emu.c: Do not include malloc.h.
7028 * include/grub/util/misc.h: Include unistd.h. This is required for
7029 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
7030 D. Eades III <hde@foobar-qux.org>.
7032 * configure.ac (AC_GNU_SOURCE): Added.
7033 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
7036 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
7038 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
7039 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
7041 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
7043 * include/grub/types.h (grub_host_addr_t): Rename to
7045 (grub_host_off_t): Rename to grub_target_off_t.
7046 (grub_host_size_t): Rename to grub_target_size_t.
7047 (grub_host_ssize_t): Rename to grub_target_ssize_t.
7048 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7050 * include/grub/kernel.h (struct grub_module_header): Change type
7051 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7052 (grub_module_info): Likewise.
7054 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7056 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7057 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7058 Velazquez <jesus.velazquez@gmail.com>.
7060 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7062 Count partitions from 1 instead of 0 in the string representation
7063 of partitions. Still use 0-based internally.
7065 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7066 (sun_partition_map_iterate): Use grub_partition_t instead of
7067 struct grub_partition *. Cast DESC->START_CYLINDER to
7068 grub_uint64_t after converting the endian.
7069 (sun_partition_map_probe): Subtract 1 for PARTNUM.
7070 (sun_partition_map_get_name): Add 1 to P->INDEX.
7072 * partmap/pc.c (grub_partition_parse): Subtract 1 for
7074 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7076 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7077 zero instead of one.
7078 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7079 (gpt_partition_map_get_name): Add 1 into P->INDEX.
7081 * partmap/apple.c (apple_partition_map_iterate): Change the type
7083 (apple_partition_map_probe): Subtract 1 for PARTNUM.
7084 (apple_partition_map_get_name): Add 1 into P->INDEX.
7086 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7088 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7089 calculate the offset of a partition.
7090 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7091 (amiga_partition_map_get_name): Add 1 into P->INDEX.
7093 * partmap/acorn.c (acorn_partition_map_find): Change the type of
7094 SECTOR to grub_disk_addr_t.
7095 (acorn_partition_map_iterate): Likewise.
7096 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7097 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7099 (acorn_partition_map_get_name): Add 1 into P->INDEX.
7101 * kern/i386/pc/init.c (make_install_device): Add 1 into
7102 GRUB_INSTALL_DOS_PART.
7104 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7107 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7109 Clean up the code to support 64-bit addressing in disks and
7110 files. This change is not enough for filesystems yet.
7112 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7113 type of "start" to grub_uint64_t.
7114 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7115 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7116 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7119 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7120 to grub_disk_addr_t.
7122 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7125 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7127 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7130 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7132 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7134 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7136 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7137 to grub_off_t, to detect an error from grub_file_seek.
7138 (grub_multiboot_load_elf32): Likewise.
7140 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7141 maximum unsigned long value when an overflow is detected.
7142 (grub_strtoull): New function.
7143 (grub_divmod64): Likewise.
7144 (grub_lltoa): use grub_divmod64.
7146 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7148 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7149 the pointer to next character. Use grub_strtoull instead of
7151 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7152 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7155 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
7156 return value is signed.
7157 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7158 test if OFFSET is less than zero, as OFFSET is unsigned now.
7160 * kern/disk.c (struct grub_disk_cache): Change the type of
7161 "sector" to grub_disk_addr_t.
7162 (grub_disk_cache_get_index): Change the type of SECTOR to
7163 grub_disk_addr_t. Calculate the hash with SECTOR casted to
7164 unsigned after shifting.
7165 (grub_disk_cache_invalidate): Change the type of SECTOR to
7167 (grub_disk_cache_unlock): Likewise.
7168 (grub_disk_cache_store): Likewise.
7169 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7170 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7171 grub_disk_addr_t and grub_uint64_t, respectively.
7172 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
7173 body, as the value of OFFSET is tweaked by
7174 grub_disk_check_range. Change the types of START_SECTOR, LEN and
7175 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7177 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7178 body, as the value of OFFSET is tweaked by
7179 grub_disk_check_range. Change the types of LEN and N to
7182 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7183 and "saved_offset" to grub_off_t.
7184 (test_header): Cast BUF to char *.
7185 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7187 (grub_gzio_read): Change the types of OFFSET and SIZE to
7188 grub_off_t and grub_size_t, respectively.
7190 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7192 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7193 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7194 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7195 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7196 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7198 * include/grub/types.h (grub_off_t): Unconditionally set to
7200 (grub_disk_addr_t): Changed to grub_uint64_t.
7202 * include/grub/partition.h (struct grub_partition): Change the
7203 types of "start", "len" and "offset" to grub_disk_addr_t,
7204 grub_uint64_t and grub_disk_addr_t, respectively.
7205 (grub_partition_get_start): Return grub_disk_addr_t.
7206 (grub_partition_get_len): Return grub_uint64_t.
7208 * include/grub/misc.h (grub_strtoull): New prototype.
7209 (grub_divmod64): Likewise.
7211 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7212 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7213 grub_off_t, respectively.
7214 All callers and references changed.
7216 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7217 grub_size_t in "read".
7218 All callers and references changed.
7220 * include/grub/file.h (struct grub_file): Change the types of
7221 "offset" and "size" to grub_off_t and grub_off_t,
7222 respectively. Change the type of SECTOR to grub_disk_addr_t in
7224 (grub_file_read): Change the type of LEN to grub_size_t.
7225 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7227 (grub_file_size): Return grub_off_t.
7228 (grub_file_tell): Likewise.
7229 All callers and references changed.
7231 * include/grub/disk.h (struct grub_disk_dev): Change the types of
7232 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
7234 (struct grub_disk): Change the type of "total_sectors" to
7235 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
7237 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
7238 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
7239 (grub_disk_write): Likewise.
7240 All callers and references changed.
7242 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
7243 char * for grub_strncmp to silence gcc.
7244 (grub_iso9660_mount): Likewise.
7245 (grub_iso9660_mount): Likewise.
7246 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
7248 (grub_iso9660_iterate_dir): Likewise.
7249 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
7251 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
7252 LEN to grub_disk_addr_t and grub_size_t, respectively.
7254 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7256 * fs/jfs.c (grub_jfs_read_file): Likewise.
7258 * fs/minix.c (grub_jfs_read_file): Likewise.
7260 * fs/sfs.c (grub_jfs_read_file): Likewise.
7262 * fs/ufs.c (grub_jfs_read_file): Likewise.
7264 * fs/xfs.c (grub_jfs_read_file): Likewise.
7266 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
7267 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
7270 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
7271 BLKNR to -1 instead of returning GRUB_ERRNO.
7272 (grub_ext2_read_file): Change the types of SECTOR and
7273 LEN to grub_disk_addr_t and grub_size_t, respectively.
7275 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
7276 LEN to grub_disk_addr_t and grub_size_t, respectively.
7278 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
7281 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
7282 string. Do not cast SECTOR explicitly.
7284 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
7285 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
7286 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
7287 grub_disk_addr_t and grub_size_t, respectively. If the sector is
7288 over 2TB and LBA mode is not supported, raise an error.
7289 (get_safe_sectors): New function.
7290 (grub_biosdisk_read): Use get_safe_sectors.
7291 (grub_biosdisk_write): Likewise.
7293 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
7294 (grub_efidisk_write): Likewise.
7296 * disk/loopback.c (delete_loopback): Cosmetic changes.
7297 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
7299 (grub_loopback_open): Likewise.
7300 (grub_loopback_read): Likewise. Also, change the type of POS to
7301 grub_off_t, and fix the usage of grub_memset.
7303 * commands/i386/pc/play.c: Include grub/machine/time.h.
7305 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
7308 * commands/configfile.c: Include grub/env.h.
7310 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
7311 GRUB_ERRNO directly instead. Change the type of POS to
7312 grub_off_t. Follow the coding standard.
7314 * commands/blocklist.c: Include grub/partition.h.
7315 (grub_cmd_blocklist): Return an error if the underlying device is
7316 not a disk. Take the starting sector of a partition into account,
7317 if a partition is used.
7319 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
7321 (lba_mode): Support 64-bit addresses.
7322 (chs_mode): Likewise.
7323 (copy_buffer): Adapted to the new offsets of a length field and a
7325 (blocklist_default_start): Allocate 64-bit space.
7327 * boot/i386/pc/boot.S (force_lba): Removed.
7328 (boot_drive): Moved to under KERNEL_SECTOR.
7329 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
7331 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
7333 (lba_mode): Refactored to support a 64-bit address. More size
7335 (setup_sectors): Likewise.
7337 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7339 * DISTLIST: Added include/grub/i386/linux.h. Removed
7340 include/grub/i386/pc/linux.h
7342 * configure.ac (AC_INIT): Bumped to 1.94.
7344 * config.guess: Updated from gnulib.
7345 * config.sub: Likewise.
7346 * install-sh: Likewise.
7347 * mkinstalldirs: Likewise.
7349 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7351 * conf/common.rmk (grub_modules_init.lst): Depended on
7352 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7355 * genmk.rb (PModule::rule): Reverted the previous change.
7357 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7359 * conf/common.rmk (grub_modules_init.lst): Depends on
7360 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7361 that the target does not exist before producing.
7362 (grub_modules_init.h): Remove the target before generating.
7363 (grub_emu_init.c): Likewise.
7365 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7367 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
7369 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7370 for the target-specific tests. Make sure that we also have the
7371 up-to-date target variables for those tests.
7373 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7375 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7376 (PModule::rule): Likewise.
7378 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7380 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7381 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7382 target-specific flags should be prefixed.
7383 (PModule::rule): Likewise.
7385 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
7387 * configure.ac (CMP): Check if cmp is available explicitly.
7389 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
7391 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7392 (target_cpu): New variable.
7393 (pkglibdir): Use target_cpu instead of host_cpu.
7395 * util/i386/pc/grub-install.in (host_cpu): Removed.
7396 (target_cpu): New variable.
7397 (pkglibdir): Use target_cpu instead of host_cpu.
7399 * util/genmoddep.c: Removed.
7401 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7402 instead of GRUB_HOST_SIZEOF_VOID_P.
7403 * kern/dl.c: Likewise.
7405 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7407 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7408 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7409 (GRUB_TARGET_SIZEOF_LONG): ... this.
7410 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7411 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7412 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7414 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7415 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7416 (GRUB_TARGET_SIZEOF_LONG): ... this.
7417 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7418 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7419 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7421 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7422 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7423 (GRUB_TARGET_SIZEOF_LONG): ... this.
7424 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7425 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7427 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7428 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7429 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7430 instead of GRUB_HOST_SIZEOF_LONG.
7431 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7432 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7433 GRUB_CPU_WORDS_BIGENDIAN.
7434 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7435 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7438 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7439 (genmoddep_SOURCES): Likewise.
7440 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7441 (genmoddep_SOURCES): Likewise.
7442 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7443 (genmoddep_SOURCES): Likewise.
7444 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7446 (genmoddep_SOURCES): Likewise.
7448 * genmoddep.awk: New file.
7450 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7451 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7452 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7453 (PModule::rule): Likewise.
7454 (Program::rule): Likewise.
7455 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7456 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7459 * configure.ac: Rewritten intensively to use host and target
7460 instead of build and host, respectively.
7462 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7463 (host_cpu): Removed.
7464 (target_cpu): New variable.
7465 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7466 (BUILD_CC): Removed.
7467 (BUILD_CFLAGS): Likewise.
7468 (BUILD_CPPFLAGS): Likewise.
7469 (TARGET_CC): New variable.
7470 (TARGET_CFLAGS): Likewise.
7471 (TARGET_CPPFLAGS): Likewise.
7472 (TARGET_LDFLAGS): Likewise.
7474 (include): Use target_cpu instead of host_cpu.
7475 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7477 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7479 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
7481 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7482 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
7483 field 'false' to 'exec_on_false'.
7484 (grub_script_create_cmdif): Renamed argument names to reflect above
7487 * normal/execute.c (grub_script_execute_cmdif): Likewise.
7489 * normal/script.c (grub_script_create_cmdif): Likewise.
7491 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
7493 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7495 (grub_hfsplus_btree_recptr): Likewise.
7496 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7497 FILEBLOCK both to pass a block number and store next block
7499 (grub_hfsplus_read_block): Rewritten heavily to support an extent
7500 overflow file correctly. Specify errors appropriately, because
7501 fshelp expects that GRUB_ERRNO is set when fails. Reuse
7502 grub_hfsplus_btree_recptr to get the pointer to a found key.
7503 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7506 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7508 (_linux_mod_SOURCES): New variable.
7509 (_linux_mod_CFLAGS): Likewise.
7510 (_linux_mod_LDFLAGS): Likewise.
7511 (linux_mod_SOURCES): Likewise.
7512 (linux_mod_CFLAGS): Likewise.
7513 (linux_mod_LDFLAGS): Likewise.
7515 * DISTLIST: Added loader/i386/efi/linux.c,
7516 loader/i386/efi/linux_normal.c and
7517 include/grub/i386/efi/loader.h.
7519 * loader/i386/efi/linux.c: New file.
7520 * loader/i386/efi/linux_normal.c: Likewise.
7521 * include/grub/i386/efi/loader.h: Likewise.
7523 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
7525 * commands/blocklist.c: New file.
7527 * DISTLIST: Added commands/blocklist.c.
7529 * term/efi/console.c (grub_console_highlight_color): Use a lighter
7530 color for the background, and a darker color for the foreground.
7531 (grub_console_checkkey): Return READ_KEY.
7532 (grub_console_cls): Set the background to
7533 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7535 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7537 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7538 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7540 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7543 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7544 BG. The spec is wrong again.
7546 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7548 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7550 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7551 commands/blocklist.c.
7552 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7554 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
7555 (blocklist_mod_SOURCES): New variable.
7556 (blocklist_mod_CFLAGS): Likewise.
7557 (blocklist_mod_LDFLAGS): Likewise.
7559 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
7561 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
7563 (lba_mode): Use %eax more intensively to reduce the code size.
7565 2006-05-20 Marco Gerards <marco@gnu.org>
7567 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
7569 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
7571 (script): Accept leading newlines.
7572 (newlines): New rule to describe 0 or more newlines.
7573 (commands): Accept `command' with trailing newline. Fixed the
7574 order in which arguments were passed to `grub_script_add_cmd'.
7575 Accept commands separated by newlines.
7576 (function): Changed to accept newlines.
7577 (menuentry) Rewritten.
7579 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
7580 front of the list, instead of to the end.
7582 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
7584 * util/i386/pc/grub-install.in (bindir): New variable.
7585 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
7586 Shaver <lbgwjl@gmail.com>.
7588 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
7590 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
7591 grub/machine/linux.h
7592 * loader/i386/pc/linux.c: Likewise.
7594 * include/grub/i386/pc/linux.h: Moved to ...
7595 * include/grub/i386/linux.h: ... here.
7597 * include/grub/i386/linux.h (struct linux_kernel_params): New
7600 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
7602 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
7604 (grub_video_vbe_blit_glyph): Likewise.
7605 (grub_video_vbe_blit_bitmap): Likewise.
7606 (grub_video_vbe_blit_render_target): Likewise.
7608 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
7610 * configure.ac (--with-platform): Properly quote the square
7613 2006-05-08 Marco Gerards <marco@gnu.org>
7615 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
7617 (kernel_elf_HEADERS): ...to this. Updated all users.
7618 (grubof_symlist.c): Renamed from this...
7619 (kernel_elf_symlist.c): ...to this. Updated all users.
7620 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7621 (grubof_SOURCES): Renamed from this...
7622 (kernel_elf_SOURCES): ...to this.
7623 (grubof_HEADERS): Renamed from this...
7624 (kernel_elf_HEADERS): ...to this.
7625 (grubof_CFLAGS): Renamed from this...
7626 (kernel_elf_CFLAGS): ...to this.
7627 (grubof_ASFLAGS): Renamed from this...
7628 (kernel_elf_ASFLAGS): ...to this.
7629 (grubof_LDFLAGS): Renamed from this...
7630 (kernel_elf_LDFLAGS): ...to this.
7632 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
7634 (kernel_elf_HEADERS): ...to this. Updated all users.
7635 (grubof_symlist.c): Renamed from this...
7636 (kernel_elf_symlist.c): ...to this. Updated all users.
7637 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7638 (grubof_SOURCES): Renamed from this...
7639 (kernel_elf_SOURCES): ...to this.
7640 (grubof_HEADERS): Renamed from this...
7641 (kernel_elf_HEADERS): ...to this.
7642 (grubof_CFLAGS): Renamed from this...
7643 (kernel_elf_CFLAGS): ...to this.
7644 (grubof_ASFLAGS): Renamed from this...
7645 (kernel_elf_ASFLAGS): ...to this.
7646 (grubof_LDFLAGS): Renamed from this...
7647 (kernel_elf_LDFLAGS): ...to this.
7649 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
7650 `kernel.elf' instead of `grubof'.
7652 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
7654 Add --with-platform to configure. Use pkglibdir instead of
7655 pkgdatadir. This is reported by Roger Leigh.
7657 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
7658 (host_vendor): Likewise.
7659 (host_os): Likewise.
7660 (pkgdatadir): Likewise.
7661 (platform): New variable.
7662 (pkglibdir): Likewise.
7663 Use PKGLIBDIR instead of PKGDATADIR.
7665 * util/i386/pc/grub-install.in (datadir): Removed.
7666 (host_vendor): Likewise.
7667 (host_os): Likewise.
7668 (pkgdatadir): Likewise.
7669 (platform): New variable.
7670 (pkglibdir): Likewise.
7671 Use PKGLIBDIR instead of PKGDATADIR.
7673 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
7674 instead of GRUB_DATADIR.
7676 * util/i386/pc/grub-mkimage.c (usage): Likewise.
7678 * util/i386/efi/grub-mkimage.c (usage): Likewise.
7681 * configure.ac (--with-platform): New option.
7682 Use PLATFORM instead of HOST_VENDOR to specify a platform.
7684 * Makefile.in: Include a makefile based on PLATFORM instead of
7686 (pkgdatadir): Not appended by the machine type.
7687 (pkglibdir): Appended by the machine type.
7688 (host_vendor): Removed.
7689 (platform): New variable.
7690 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
7691 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
7692 (uninstall): Likewise.
7694 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
7696 Use the environment context in the menu. Remove the commands
7697 "default" and "timeout", and use variables instead.
7699 * normal/menu.c: Include grub/env.h.
7700 (print_entry): Cast TITLE to silence gcc.
7701 (get_timeout): New function.
7702 (set_timeout): Likewise.
7703 (get_entry_number): Likewise.
7704 (run_menu): Use a default entry, a fallback entry and a timeout
7705 in the environment variables "default", "fallback" and
7706 "timeout". Also, tweak the default entry if it is not within the
7707 current menu entries.
7708 (grub_menu_run): Use a fallback entry in the environment variable
7711 * normal/main.c (read_config_file): Do not initialize
7712 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
7714 (grub_normal_execute): Use a data slot to store the menu.
7716 * include/grub/normal.h (struct grub_menu): Removed default_entry,
7717 fallback_entry and timeout.
7718 (struct grub_menu_list): Removed.
7719 (grub_menu_list_t): Likewise.
7720 (struct grub_context): Likewise.
7721 (grub_context_t): Likewise.
7722 (grub_context_get): Likewise.
7723 (grub_context_get_current_menu): Likewise.
7724 (grub_context_push_menu): Likewise.
7725 (grub_context_pop_menu): Likewise.
7726 (grub_default_init): Likewise.
7727 (grub_default_fini): Likewise.
7728 (grub_timeout_init): Likewise.
7729 (grub_timeout_fini): Likewise.
7731 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
7733 (normal_mod_SOURCES): Removed normal/context.c.
7735 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
7736 commands/default.c, commands/timeout.c and normal/context.c.
7737 (normal_mod_SOURCES): Removed normal/context.c.
7739 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
7740 commands/timeout.c and normal/context.c.
7741 (normal_mod_SOURCES): Removed normal/context.c.
7743 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
7744 commands/default.c, commands/timeout.c and normal/context.c.
7745 (normal_mod_SOURCES): Removed normal/context.c.
7747 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
7749 (default_mod_SOURCES): Removed.
7750 (default_mod_CFLAGS): Likewise.
7751 (default_mod_LDFLAGS): Likewise.
7752 (timeout_mod_SOURCES): Removed.
7753 (timeout_mod_CFLAGS): Likewise.
7754 (timeout_mod_LDFLAGS): Likewise.
7756 * DISTLIST: Removed commands/default.c, commands/timeout.c and
7759 * commands/default.c: Removed.
7760 * commands/timeout.c: Likewise.
7761 * normal/context.c: Likewise.
7763 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
7765 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
7767 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
7769 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
7770 "next" to "prev" for readability.
7771 (struct grub_env_sorted_var): New struct.
7772 (grub_env_context): Renamed to ...
7773 (initial_context): ... this.
7774 (grub_env_var_context): Renamed to ...
7775 (current_context): ... this.
7776 (grub_env_find): Look only at CURRENT_CONTEXT.
7777 (grub_env_context_open): Rewritten to copy exported variables from
7779 (grub_env_context_close): Rewritten according to the new
7780 scheme. Also, add an assertion to prevent the initial context from
7782 (grub_env_insert): Removed the code for the sorted list.
7783 (grub_env_remove): Likewise.
7784 (grub_env_export): Simply mark the variable with
7785 GRUB_ENV_VAR_GLOBAL.
7786 (grub_env_set): A cosmetic change for naming consistency.
7787 (grub_env_get): Likewise.
7788 (grub_env_unset): Likewise.
7789 (grub_env_iterate): Rewritten to sort variables within this
7791 (grub_register_variable_hook): Fixed for naming consistency. Call
7792 grub_env_find again, only if NAME is not found at the first time.
7793 (mangle_data_slot_name): New function.
7794 (grub_env_set_data_slot): Likewise.
7795 (grub_env_get_data_slot): Likewise.
7796 (grub_env_unset_data_slot): Likewise.
7798 * include/grub/env.h (grub_env_var_type): New enum.
7799 (GRUB_ENV_VAR_LOCAL): New constant.
7800 (GRUB_ENV_VAR_GLOBAL): Likewise.
7801 (GRUB_ENV_VAR_DATA): Likewise.
7802 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
7804 (grub_env_set): Replace VAR with NAME for consistency.
7805 (grub_register_variable_hook): Likewise.
7806 (grub_env_export): Specify the name of the argument.
7807 (grub_env_set_data_slot): New prototype.
7808 (grub_env_get_data_slot): Likewise.
7809 (grub_env_unset_data_slot): Likewise.
7811 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7813 Extend the loader so that GRUB can accept a loader which comes
7814 back to GRUB when a loaded image exits. Also, this change adds
7815 support for a chainloader on EFI.
7817 * term/efi/console.c: Include grub/misc.h.
7818 (grub_console_checkkey): Display a scan code on the top for
7819 debugging. This will be removed once the EFI port gets stable.
7820 Correct the scan code mapping.
7822 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
7823 allocate memory from larger regions, in order to reduce the number
7824 of allocated regions. Otherwise, the MacOSX loader panics.
7825 (filter_memory_map): Avoid less than 1MB for compatibility with
7827 (add_memory_regions): Allocate from the tail of a region, if
7828 possible, to avoid allocating a region near to 1MB, for the MacOSX
7831 * kern/efi/init.c (grub_efi_set_prefix): Specify
7832 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
7834 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
7835 argument IMAGE_HANDLE and specify it to get a loaded image.
7836 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
7837 grub_efi_get_loaded_image.
7838 (grub_efi_get_filename): Divide the length by the size of
7840 (grub_efi_get_device_path): New function.
7841 (grub_efi_print_device_path): Print End Device Path nodes. Divide
7842 the length by the size of grub_efi_char16_t for a file path device
7845 * kern/loader.c (grub_loader_noreturn): New variable.
7846 (grub_loader_set): Accept a new argument NORETURN. Set
7847 GRUB_LOADER_NORETURN to NORETURN.
7848 All callers changed.
7849 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
7852 * include/grub/efi/efi.h (grub_efi_get_device_path): New
7854 (grub_efi_get_loaded_image): Take an argument to specify an image
7857 * include/grub/loader.h (grub_loader_set): Added one more argument
7860 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
7861 instead of grub_efi_open_protocol.
7862 (grub_efidisk_get_device_name): Likewise.
7863 (grub_efidisk_close): Print a newline.
7864 (grub_efidisk_get_device_handle): Fixed to use
7865 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
7866 GRUB_EFI_DEVICE_PATH_TYPE.
7868 * disk/efi/efidisk.c (device_path_guid): Moved to ...
7869 * kern/efi/efi.c (device_path_guid): ... here.
7871 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
7873 (kernel_mod_HEADERS): Added efi/disk.h.
7874 (_chain_mod_SOURCES): New variable.
7875 (_chain_mod_CFLAGS): Likewise.
7876 (_chain_mod_LDFLAGS): Likewise.
7877 (chain_mod_SOURCES): Likewise.
7878 (chain_mod_CFLAGS): Likewise.
7879 (chain_mod_LDFLAGS): Likewise.
7881 * DISTLIST: Added include/grub/efi/chainloader.h,
7882 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
7884 * include/grub/efi/chainloader.h: New file.
7885 * loader/efi/chainloader.c: Likewise.
7886 * loader/efi/chainloader_normal.c: Likewise.
7888 2006-04-30 Marco Gerards <marco@gnu.org>
7890 * commands/configfile.c (grub_cmd_source): New function.
7891 (GRUB_MOD_INIT): Register the commands `source' and `.'.
7892 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
7894 2006-04-30 Marco Gerards <marco@gnu.org>
7896 * normal/execute.c (grub_script_execute_cmd): Change the return
7897 type to `grub_err_t'. Correctly return the error.
7898 (grub_script_execute_cmdline): In case a command line is not a
7899 command or a function, try to interpret it as an assignment.
7901 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7903 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
7904 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
7905 skip a node whose name is obviously invalid as UTF-16,
7906 i.e. contains a NUL character. Stop the iteration when the last
7907 directory entry is found. Instead of using the return value of
7908 grub_hfsplus_btree_iterate_node, store the value in RET and use
7909 it, because the iterator can be stopped by the last directory
7912 2006-04-30 Marco Gerards <marco@gnu.org>
7914 * include/grub/env.h (grub_env_export): New prototype. Reported
7915 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
7917 2006-04-30 Marco Gerards <marco@gnu.org>
7919 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
7920 size of the extents in a catalog file record.
7922 2006-04-29 Marco Gerards <marco@gnu.org>
7924 * commands/configfile.c (grub_cmd_configfile): Execute the
7925 configfile within its own context.
7927 * include/grub/env.h (grub_env_context_open): New prototype.
7928 (grub_env_context_close): Likewise.
7930 * kern/env.c (grub_env): Removed.
7931 (grub_env_sorted): Likewise.
7932 (grub_env_context): New variable.
7933 (grub_env_var_context): Likewise.
7934 (grub_env_find): Search both the active context and the global
7936 (grub_env_context_open): New function.
7937 (grub_env_context_close): Likewise.
7938 (grub_env_insert): Likewise.
7939 (grub_env_remove): Likewise.
7940 (grub_env_export): Likewise.
7941 (grub_env_set): Changed to use helper functions to avoid code
7943 (grub_env_iterate): Rewritten so both the current context and the
7944 global context are being used.
7946 * normal/command.c (export_command): New function.
7947 (grub_command_init): Register the `export' function.
7949 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
7951 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
7952 explicitly to suppress gcc's warnings.
7953 * fs/fat.c (grub_fat_find_dir): Likewise.
7954 (grub_fat_label): Likewise.
7955 * fs/xfs.c (grub_xfs_read_inode): Likewise.
7956 (grub_xfs_mount): Likewise.
7957 (grub_xfs_label): Likewise.
7958 * fs/affs.c (grub_affs_mount): Likewise.
7959 (grub_affs_label): Likewise.
7960 (grub_affs_iterate_dir): Likewise.
7961 * fs/sfs.c (grub_sfs_mount): Likewise.
7962 (grub_sfs_iterate_dir): Likewise.
7963 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
7964 * fs/hfs.c (grub_hfs_mount): Likewise.
7965 (grub_hfs_cmp_catkeys): Likewise.
7966 (grub_hfs_find_dir): Likewise.
7967 (grub_hfs_dir): Likewise.
7968 (grub_hfs_label): Likewise.
7969 * fs/jfs.c (grub_jfs_mount): Likewise.
7970 (grub_jfs_opendir): Likewise.
7971 (grub_jfs_getent): Likewise.
7972 (grub_jfs_lookup_symlink): Likewise.
7973 (grub_jfs_label): Likewise.
7974 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
7975 (grub_hfsplus_iterate_dir): Likewise.
7976 (grub_hfsplus_btree_iterate_node): Made static.
7978 * util/grub-emu.c (prefix): New variable.
7979 (grub_machine_set_prefix): New function.
7980 (main): Do not set the environment variable "prefix" here. Only
7981 set PREFIX, which is used later by grub_machine_set_prefix.
7983 * include/grub/video.h: Do not include grub/symbol.h.
7984 (grub_video_register): Not exported. This symbol is not defined in
7986 (grub_video_unregister): Likewise.
7987 (grub_video_iterate): Likewise.
7988 (grub_video_setup): Likewise.
7989 (grub_video_restore): Likewise.
7990 (grub_video_get_info): Likewise.
7991 (grub_video_get_blit_format): Likewise.
7992 (grub_video_set_palette): Likewise.
7993 (grub_video_get_palette): Likewise.
7994 (grub_video_set_viewport): Likewise.
7995 (grub_video_get_viewport): Likewise.
7996 (grub_video_map_color): Likewise.
7997 (grub_video_map_rgb): Likewise.
7998 (grub_video_map_rgba): Likewise.
7999 (grub_video_fill_rect): Likewise.
8000 (grub_video_blit_glyph): Likewise.
8001 (grub_video_blit_bitmap): Likewise.
8002 (grub_video_blit_render_target): Likewise.
8003 (grub_video_scroll): Likewise.
8004 (grub_video_swap_buffers): Likewise.
8005 (grub_video_create_render_target): Likewise.
8006 (grub_video_delete_render_target): Likewise.
8007 (grub_video_set_active_render_target): Likewise.
8009 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
8011 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
8013 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
8014 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8015 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8016 instead of $(srcdir)/genkernsyms.sh.
8018 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
8019 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8020 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8021 instead of $(srcdir)/genkernsyms.sh.
8023 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
8024 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8025 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8026 instead of $(srcdir)/genkernsyms.sh.
8028 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
8029 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
8030 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
8031 instead of $(srcdir)/genkernsyms.sh.
8033 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
8036 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
8038 (gensymlist.sh): New target.
8039 (genkernsyms.sh): Likewise.
8041 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
8042 genkernsyms.sh.in and gensymlist.sh.in.
8044 * genkernsyms.sh: Removed.
8045 * gensymlist.sh: Likewise.
8047 * genkernsyms.sh.in: New file.
8048 * gensymlist.sh.in: Likewise.
8050 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8052 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8053 clobber "prefix", since we may have already set it manually.
8055 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8057 * kern/misc.c (abort): New alias for grub_abort.
8059 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
8061 A new machine-specific function "grub_machine_set_prefix" is
8062 defined. This is called after loading modules, so that a prefix
8063 initialization can use modules. Also, this change adds an
8064 intensive debugging feature for the memory manager via the
8065 configure option "--enable-mm-debug".
8067 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8070 * kern/sparc64/ieee1275/init.c (abort): Removed.
8071 (grub_stop): Likewise.
8072 (grub_exit): New function.
8073 (grub_set_prefix): Renamed to ...
8074 (grub_machine_set_prefix): ... this.
8075 (grub_machine_init): Do not call grub_set_prefix.
8077 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8078 (grub_machine_set_prefix): ... this.
8079 (grub_machine_init): Do not call grub_set_prefix.
8081 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8082 (grub_machine_init): Do not set the prefix here.
8084 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8086 * kern/efi/init.c: Include grub/mm.h.
8087 (grub_efi_set_prefix): New function.
8089 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8090 (grub_efi_get_filename): New function.
8091 (grub_print_device_path): Renamed to ...
8092 (grub_efi_print_device_path): ... this.
8094 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8095 [MM_DEBUG] (grub_realloc): Likewise.
8096 [MM_DEBUG] (grub_free): Likewise.
8097 [MM_DEBUG] (grub_memalign): Likewise.
8098 [MM_DEBUG] (grub_mm_debug): New variable.
8099 [MM_DEBUG] (grub_debug_malloc): New function.
8100 [MM_DEBUG] (grub_debug_free): New function.
8101 [MM_DEBUG] (grub_debug_realloc): New function.
8102 [MM_DEBUG] (grub_debug_memalign): New function.
8104 * kern/misc.c (grub_abort): Print a newline to distinguish
8107 * kern/main.c (grub_main): Call grub_machine_set_prefix and
8108 grub_set_root_dev after loading modules. This is necessary when
8109 setting a prefix depends on modules.
8111 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8112 (grub_efi_print_device_path): ... this.
8113 (grub_efi_get_filename): New prototype.
8114 (grub_efi_set_prefix): Likewise.
8116 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8118 (grub_efidisk_get_device_handle): New prototype.
8119 (grub_efidisk_get_device_name): Likewise.
8121 * include/grub/mm.h: Include config.h.
8122 (MM_DEBUG): Removed.
8123 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8124 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8125 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8126 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8127 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8128 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8129 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8130 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8131 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8133 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8135 * disk/efi/efidisk.c: Include grub/partition.h.
8136 (iterate_child_devices): New function.
8137 (add_device): First, compare only last device path nodes, so that
8138 devices are sorted by the types.
8139 (grub_efidisk_get_device_handle): New function.
8140 (grub_efidisk_get_device_name): Likewise.
8142 * configure.ac (--enable-mm-debug): New option to enable the
8143 memory manager debugging feature. This makes the binary much
8144 bigger, so is disabled by default.
8146 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
8148 Use grub_abort instead of grub_stop, and grub_exit must be
8149 define in each architecture now. Also, this change adds support
8152 * util/i386/pc/grub-probefs.c: Include grub/term.h.
8153 (grub_getkey): New function.
8154 (grub_term_get_current): Likewise.
8156 * util/i386/pc/grub-setup.c: Include grub/term.h.
8157 (grub_getkey): New function.
8158 (grub_term_get_current): Likewise.
8160 * util/misc.c (grub_stop): Renamed to ...
8161 (grub_exit): ... this.
8163 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8164 (grub_exit): ... this.
8165 (grub_machine_init): Use grub_abort instead of abort.
8166 (grub_stop): Removed.
8168 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8171 * kern/i386/pc/startup.S (grub_exit): New function.
8172 (cold_reboot): New label.
8174 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8175 (grub_efi_init): Call grub_efidisk_init.
8176 (grub_efi_fini): Call grub_efidisk_fini.
8178 * kern/efi/efi.c: Include grub/mm.h.
8179 (grub_efi_console_control_guid): Renamed to ...
8180 (console_control_guid): ... this.
8181 (grub_efi_loaded_image_guid): Renamed to ...
8182 (loaded_image_guid): ... this.
8183 (grub_efi_locate_handle): New function.
8184 (grub_efi_open_protocol): Likewise.
8185 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8186 GRUB_EFI_CONSOLE_CONTROL_GUID.
8187 (grub_efi_exit): Removed.
8188 (grub_stop): Likewise.
8189 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8190 (grub_exit): New function.
8191 (grub_print_device_path): Likewise.
8193 * kern/rescue.c (grub_rescue_cmd_exit): New function.
8194 (grub_enter_rescue_mode): Register "exit".
8196 * kern/misc.c (grub_real_dprintf): A cosmetic change.
8197 (grub_abort): New function.
8199 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8201 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8203 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8205 * include/grub/efi/efi.h (grub_efi_exit): Removed.
8206 (grub_print_device_path): New prototype.
8207 (grub_efi_locate_handle): Likewise.
8208 (grub_efi_open_protocol): Likewise.
8210 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8211 * disk/efi/efidisk.c: Likewise.
8213 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8215 * include/grub/efi/console_control.h
8216 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8218 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8219 last 8 bytes as an array.
8220 (GRUB_EFI_DISK_IO_GUID): New macro.
8221 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8222 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8223 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8225 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8226 (struct grub_efi_device_path): Rename the member "sub_type" to
8228 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
8229 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
8230 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
8231 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
8232 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
8233 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
8234 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
8235 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
8236 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
8237 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
8238 (struct grub_efi_pci_device_path): New structure.
8239 (grub_efi_pci_device_path_t): New type.
8240 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
8241 (struct grub_efi_pccard_device_path): New structure.
8242 (grub_efi_pccard_device_path_t): New type.
8243 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
8244 (struct grub_efi_memory_mapped_device_path): New structure.
8245 (grub_efi_memory_mapped_device_path_t): New type.
8246 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
8247 (struct grub_efi_vendor_device_path): New structure.
8248 (grub_efi_vendor_device_path_t): New type.
8249 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
8250 (struct grub_efi_controller_device_path): New structure.
8251 (grub_efi_controller_device_path_t): New type.
8252 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
8253 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
8254 (struct grub_efi_acpi_device_path): New structure.
8255 (grub_efi_acpi_device_path_t): New type.
8256 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
8257 (struct grub_efi_expanded_acpi_device_path): New structure.
8258 (grub_efi_expanded_acpi_device_path_t): New type.
8259 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
8260 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
8261 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
8262 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
8263 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
8264 (struct grub_efi_atapi_device_path): New structure.
8265 (grub_efi_atapi_device_path_t): New type.
8266 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
8267 (struct grub_efi_fibre_channel_device_path): New structure.
8268 (grub_efi_fibre_channel_device_path_t): New type.
8269 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
8270 (struct grub_efi_1394_device_path): New structure.
8271 (grub_efi_1394_device_path_t): New type.
8272 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
8273 (struct grub_efi_usb_device_path): New structure.
8274 (grub_efi_usb_device_path_t): New type.
8275 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
8276 (struct grub_efi_usb_class_device_path): New structure.
8277 (grub_efi_usb_class_device_path_t): New type.
8278 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
8279 (struct grub_efi_i2o_device_path): New structure.
8280 (grub_efi_i2o_device_path_t): New type.
8281 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
8282 (struct grub_efi_mac_address_device_path): New structure.
8283 (grub_efi_mac_address_device_path_t): New type.
8284 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
8285 (struct grub_efi_ipv4_device_path): New structure.
8286 (grub_efi_ipv4_device_path_t): New type.
8287 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
8288 (struct grub_efi_ipv6_device_path): New structure.
8289 (grub_efi_ipv6_device_path_t): New type.
8290 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
8291 (struct grub_efi_infiniband_device_path): New structure.
8292 (grub_efi_infiniband_device_path_t): New type.
8293 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
8294 (struct grub_efi_uart_device_path): New structure.
8295 (grub_efi_uart_device_path_t): New type.
8296 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
8297 (struct grub_efi_vendor_messaging_device_path): New structure.
8298 (grub_efi_vendor_messaging_device_path_t): New type.
8299 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
8300 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
8301 (struct grub_efi_hard_drive_device_path): New structure.
8302 (grub_efi_hard_drive_device_path_t): New type.
8303 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
8304 (struct grub_efi_cdrom_device_path): New structure.
8305 (grub_efi_cdrom_device_path_t): New type.
8306 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
8307 (struct grub_efi_vendor_media_device_path): New structure.
8308 (grub_efi_vendor_media_device_path_t): New type.
8309 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
8310 (struct grub_efi_file_path_device_path): New structure.
8311 (grub_efi_file_path_device_path_t): New type.
8312 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
8313 (struct grub_efi_protocol_device_path): New structure.
8314 (grub_efi_protocol_device_path_t): New type.
8315 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
8316 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
8317 (struct grub_efi_bios_device_path): New structure.
8318 (grub_efi_bios_device_path_t): New type.
8319 (struct grub_efi_disk_io): New structure.
8320 (grub_efi_disk_io_t): New type.
8321 (struct grub_efi_block_io_media): New structure.
8322 (grub_efi_block_io_media_t): New type.
8323 (struct grub_efi_block_io): New structure.
8324 (grub_efi_block_io_t): New type.
8326 * include/grub/misc.h (grub_stop): Removed.
8327 (grub_exit): New prototype.
8328 (grub_abort): Likewise.
8330 * include/grub/disk.h (enum grub_disk_dev_id): Added
8331 GRUB_DISK_DEVICE_EFIDISK_ID.
8333 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
8335 (kernel_syms.lst): Remove the target if an error occurs.
8337 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
8339 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
8340 as it was simply too buggy.
8342 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
8344 * kern/misc.c (grub_lltoa): New function.
8345 (grub_vsprintf): Added support for the long long suffix,
8348 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
8350 * Makefile.in (LDFLAGS): Add variable.
8351 (LD): Remove variable.
8352 * configure.ac: Add -m32 to LDFLAGS.
8353 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
8354 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8355 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8356 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8357 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8359 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8360 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8361 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8363 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
8365 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8366 length for unknown glyph.
8368 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8370 Add support for pre-loaded modules into the EFI port.
8372 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8373 completely. Accept one more argument DIR. The caller has changed.
8375 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8377 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8378 (grub_efi_loaded_image_guid): New variable.
8379 (grub_efi_get_loaded_image): New function.
8380 (grub_arch_modules_addr): Likewise.
8382 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8385 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8386 (struct grub_efi_loaded_image): New structure.
8387 (grub_efi_loaded_image_t): New type.
8389 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8391 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8392 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8393 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8395 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
8397 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8399 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
8401 * DISTLIST: Added include/grub/efi/console.h,
8402 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8403 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8405 * include/grub/efi/console.h: New file.
8406 * include/grub/efi/time.h: Likewise.
8407 * include/grub/i386/efi/kernel.h: Likewise.
8408 * kern/efi/init.c: Likewise.
8409 * kern/efi/mm.c: Likewise.
8410 * term/efi/console.c: Likewise.
8412 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8413 (grub_stop): Removed.
8414 (grub_get_rtc): Likewise.
8415 (grub_machine_init): Simply call grub_efi_init.
8416 (grub_machine_fini): Call grub_efi_fini.
8418 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8419 (grub_efi_output_string): Removed.
8420 (grub_efi_stall): New function.
8421 (grub_stop): Likewise.
8422 (grub_get_rtc): Likewise.
8424 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8425 (grub_efi_stall): New prototype.
8426 (grub_efi_allocate_pages): Likewise.
8427 (grub_efi_free_pages): Likewise.
8428 (grub_efi_get_memory_map): Likewise.
8429 (grub_efi_mm_init): Likewise.
8430 (grub_efi_mm_fini): Likewise.
8431 (grub_efi_init): Likewise.
8432 (grub_efi_fini): Likewise.
8434 * include/grub/i386/efi/time.h: Do not include
8435 grub/symbol.h. Include grub/efi/time.h.
8436 (GRUB_TICKS_PER_SECOND): Removed.
8437 (grub_get_rtc): Likewise.
8439 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8440 Added padding. The EFI spec is buggy.
8441 (GRUB_EFI_BLACK): New macro.
8442 (GRUB_EFI_BLUE): Likewise.
8443 (GRUB_EFI_GREEN): Likewise.
8444 (GRUB_EFI_CYAN): Likewise.
8445 (GRUB_EFI_RED): Likewise.
8446 (GRUB_EFI_MAGENTA): Likewise.
8447 (GRUB_EFI_BROWN): Likewise.
8448 (GRUB_EFI_LIGHTGRAY): Likewise.
8449 (GRUB_EFI_BRIGHT): Likewise.
8450 (GRUB_EFI_DARKGRAY): Likewise.
8451 (GRUB_EFI_LIGHTBLUE): Likewise.
8452 (GRUB_EFI_LIGHTGREEN): Likewise.
8453 (GRUB_EFI_LIGHTCYAN): Likewise.
8454 (GRUB_EFI_LIGHTRED): Likewise.
8455 (GRUB_EFI_LIGHTMAGENTA): Likewise.
8456 (GRUB_EFI_YELLOW): Likewise.
8457 (GRUB_EFI_WHITE): Likewise.
8458 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8459 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8460 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8461 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8462 (GRUB_EFI_BACKGROUND_RED): Likewise.
8463 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8464 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8465 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8466 (GRUB_EFI_TEXT_ATTR): Likewise.
8468 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8469 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8470 (kernel_mod_HEADERS): Added efi/time.h.
8472 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
8474 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8475 include/grub/efi/api.h, include/grub/efi/console_control.h,
8476 include/grub/efi/efi.h, include/grub/efi/pe32.h,
8477 include/grub/i386/efi/time.h, kern/efi/efi.c,
8478 kern/i386/efi/init.c, kern/i386/efi/startup.S,
8479 and util/i386/efi/grub-mkimage.c.
8481 * Makefile.in (RMKFILES): Added i386-efi.rmk.
8483 * genmk.rb (PModule#rule): Do not export symbols if
8484 #{prefix}_EXPORTS is set to "no".
8486 * conf/i386-efi.mk: New file.
8487 * conf/i386-efi.rmk: Likewise.
8488 * include/grub/efi/api.h: Likewise.
8489 * include/grub/efi/console_control.h: Likewise.
8490 * include/grub/efi/efi.h: Likewise.
8491 * include/grub/efi/pe32.h: Likewise.
8492 * include/grub/i386/efi/time.h: Likewise.
8493 * kern/efi/efi.c: Likewise.
8494 * kern/i386/efi/init.c: Likewise.
8495 * kern/i386/efi/startup.S: Likewise.
8496 * util/i386/efi/grub-mkimage.c: Likewise.
8498 2006-04-17 Marco Gerards <marco@gnu.org>
8500 * include/grub/script.h: Include <grub/parser.h> and
8501 "grub_script.tab.h".
8502 (struct grub_lexer_param): New struct.
8503 (struct grub_parser_param): Likewise.
8504 (grub_script_create_arglist): Pass the state in an argument.
8505 (grub_script_add_arglist): Likewise.
8506 (grub_script_create_cmdline): Likewise.
8507 (grub_script_create_cmdblock): Likewise.
8508 (grub_script_create_cmdif): Likewise.
8509 (grub_script_create_cmdmenu): Likewise.
8510 (grub_script_add_cmd): Likewise.
8511 (grub_script_arg_add): Likewise.
8512 (grub_script_lexer_ref): Likewise.
8513 (grub_script_lexer_deref): Likewise.
8514 (grub_script_lexer_record_start): Likewise.
8515 (grub_script_lexer_record_stop): Likewise.
8516 (grub_script_mem_record): Likewise.
8517 (grub_script_mem_record_stop): Likewise.
8518 (grub_script_malloc): Likewise.
8519 (grub_script_yylex): Likewise.
8520 (grub_script_yyparse): Likewise.
8521 (grub_script_yyerror): Likewise.
8522 (grub_script_yylex): Likewise.
8523 (grub_script_lexer_init): Return the state.
8525 * normal/lexer.c (grub_script_lexer_state): Removed variable.
8526 (grub_script_lexer_done): Likewise.
8527 (grub_script_lexer_getline): Likewise.
8528 (grub_script_lexer_refs): Likewise.
8530 (newscript): Likewise.
8532 (recording): Likewise.
8533 (recordpos): Likewise.
8534 (recordlen): Likewise.
8535 (grub_script_lexer_init): Return the state instead of setting
8537 (grub_script_lexer_ref): Use the newly added argument for state
8539 (grub_script_lexer_deref): Likewise.
8540 (grub_script_lexer_record_start): Likewise.
8541 (grub_script_lexer_record_stop): Likewise.
8542 (recordchar): Likewise.
8543 (nextchar): Likewise.
8544 (grub_script_yylex2): Likewise.
8545 (grub_script_yylex): Likewise.
8546 (grub_script_yyerror): Likewise.
8548 * normal/parser.y (func_mem): Removed variable.
8549 (menu_entry): Likewise.
8551 (%lex-param): New parser option.
8552 (%parse-param): Likewise.
8553 (script): Always return the AST.
8554 (argument): Pass the state around.
8555 (arguments): Likewise.
8556 (grubcmd): Likewise.
8557 (commands): Likewise.
8558 (function): Likewise.
8559 (menuentry): Likewise.
8560 (if_statement): Likewise.
8563 * normal/script.c (grub_script_memused): Removed variable.
8564 (grub_script_parsed): Likewise.
8565 (grub_script_malloc): Added a state argument. Use that instead of
8567 (grub_script_mem_record): Likewise.
8568 (grub_script_mem_record_stop): Likewise.
8569 (grub_script_arg_add): Likewise.
8570 (grub_script_add_arglist): Likewise.
8571 (grub_script_create_cmdline): Likewise.
8572 (grub_script_create_cmdif): Likewise.
8573 (grub_script_create_cmdmenu): Likewise.
8574 (grub_script_add_cmd): Likewise.
8575 (grub_script_parse): Setup the state before calling the parser.
8577 2006-04-16 Marco Gerards <marco@gnu.org>
8579 * normal/command.c (grub_command_init): Remove the title command.
8581 * normal/lexer.c (grub_script_yylex): Renamed from this...
8582 (grub_script_yylex2): ... to this.
8583 (grub_script_yylex): New function. Temporary
8584 introduced to filter some tokens.
8585 (grub_script_yyerror): Print a newline.
8587 * normal/main.c (read_config_file): Output information about the
8588 lines that contain errors. Wait for a key after all lines have
8589 been processed. Don't return an empty menu.
8591 * normal/parser.y (func_mem): Don't initialize.
8592 (menu_entry): Likewise.
8593 (err): New variable.
8594 (script): Don't return anything when an error was encountered.
8595 (ws, returns): Removed rules.
8596 (argument): Disabled concatenated variable support.
8597 (arguments): Remove explicit separators.
8598 (grubcmd): Likewise.
8599 (function): Likewise.
8600 (menuentry): Likewise.
8602 (commands): Likewise. Add error handling.
8604 * normal/script.c (grub_script_create_cmdline): If
8605 `grub_script_parsed' is 0, assume the parser encountered an error.
8607 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
8609 * configure.ac: Add support for EFI. Fix the typo
8610 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
8612 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8614 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
8615 foreign multibyte characters should be shown correctly.
8617 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8619 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
8621 (read_config_file): Made it to close file before returning.
8623 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
8625 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
8626 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
8627 video/i386/pc/vbefill.c.
8629 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
8630 video/i386/pc/vbefill.c.
8632 * include/grub/video.h (grub_video_blit_format): New enum.
8633 (grub_video_mode_info): Added new member blit_format.
8634 (grub_video_get_blit_format): New function prototype.
8636 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
8638 (grub_video_vbe_map_rgb): Likewise.
8639 (grub_video_vbe_unmap_color): Likewise.
8641 * include/grub/i386/pc/vbeblit.h: New file.
8643 * include/grub/i386/pc/vbefill.h: New file.
8645 * video/video.c (grub_video_get_blit_format): New function.
8646 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
8647 (grub_video_vbe_map_rgb): Likewise.
8648 (grub_video_vbe_unmap_color): Likewise.
8650 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
8652 (grub_video_vbe_blit_render_target): Changed to use more optimized
8654 (grub_video_vbe_setup): Added detection for optimized settings.
8655 (grub_video_vbe_create_render_target): Likewise.
8657 * video/i386/pc/vbeblit.c: New file.
8659 * video/i386/pc/vbefill.c: New file.
8661 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
8663 * font/manager.c (grub_font_get_glyph): Removed font fixup from
8666 * util/unifont2pff.rb: ... and moved it to here. Improved argument
8667 parsing to support both hex and dec ranges. If filename was missing
8668 show usage information.
8670 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
8672 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
8673 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
8675 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
8676 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
8677 (video_mod_SOURCES): Added.
8678 (video_mod_CFLAGS): Likewise.
8679 (video_mod_LDFLAGS): Likewise.
8680 (gfxterm_mod_SOURCES): Likewise.
8681 (gfxterm_mod_CFLAGS): Likewise.
8682 (gfxterm_mod_LDFLAGS): Likewise.
8683 (videotest_mod_SOURCES): Likewise.
8684 (videotest_mod_CFLAGS): Likewise.
8685 (videotest_mod_LDFLAGS): Likewise.
8686 (vesafb_mod_SOURCES): Removed.
8687 (vesafb_mod_CFLAGS): Likewise.
8688 (vesafb_mod_LDFLAGS): Likewise.
8689 (vga_mod_SOURCES): Likewise.
8690 (vga_mod_CFLAGS): Likewise.
8691 (vga_mod_LDFLAGS): Likewise.
8693 * commands/videotest.c: New file.
8695 * font/manager.c (fill_with_default_glyph): Modified to use
8697 (grub_font_get_glyph): Likewise.
8698 (fontmanager): Renamed from this...
8699 (font_manager): ... to this.
8701 * include/grub/font.h (grub_font_glyph): Added new structure.
8702 (grub_font_get_glyph): Modified to use grub_font_glyph.
8704 * include/grub/misc.h (grub_abs): Added as inline function.
8706 * include/grub/video.h: New file.
8708 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
8709 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
8710 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
8711 (grub_vbe_get_controller_info): Renamed from this...
8712 (grub_vbe_bios_get_controller_info): ... to this.
8713 (grub_vbe_get_mode_info): Renamed from this...
8714 (grub_vbe_bios_get_mode_info): ... to this.
8715 (grub_vbe_set_mode): Renamed from this...
8716 (grub_vbe_bios_set_mode): ... to this.
8717 (grub_vbe_get_mode): Renamed from this...
8718 (grub_vbe_bios_get_mode): ... to this.
8719 (grub_vbe_set_memory_window): Renamed from this...
8720 (grub_vbe_bios_set_memory_window): ... to this.
8721 (grub_vbe_get_memory_window): Renamed from this...
8722 (grub_vbe_bios_get_memory_window): ... to this.
8723 (grub_vbe_set_scanline_length): Renamed from this...
8724 (grub_vbe_set_scanline_length): ... to this.
8725 (grub_vbe_get_scanline_length): Renamed from this...
8726 (grub_vbe_bios_get_scanline_length): ... to this.
8727 (grub_vbe_set_display_start): Renamed from this...
8728 (grub_vbe_bios_set_display_start): ... to this.
8729 (grub_vbe_get_display_start): Renamed from this...
8730 (grub_vbe_bios_get_display_start): ... to this.
8731 (grub_vbe_set_palette_data): Renamed from this...
8732 (grub_vbe_bios_set_palette_data): ... to this.
8733 (grub_vbe_set_pixel_rgb): Removed.
8734 (grub_vbe_set_pixel_index): Likewise.
8736 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
8738 (grub_vbe_bios_get_controller_info): ... to this.
8739 (grub_vbe_get_mode_info): Renamed from this...
8740 (grub_vbe_bios_get_mode_info): ... to this.
8741 (grub_vbe_set_mode): Renamed from this...
8742 (grub_vbe_bios_set_mode): ... to this.
8743 (grub_vbe_get_mode): Renamed from this...
8744 (grub_vbe_bios_get_mode): ... to this.
8745 (grub_vbe_set_memory_window): Renamed from this...
8746 (grub_vbe_bios_set_memory_window): ... to this.
8747 (grub_vbe_get_memory_window): Renamed from this...
8748 (grub_vbe_bios_get_memory_window): ... to this.
8749 (grub_vbe_set_scanline_length): Renamed from this...
8750 (grub_vbe_set_scanline_length): ... to this.
8751 (grub_vbe_get_scanline_length): Renamed from this...
8752 (grub_vbe_bios_get_scanline_length): ... to this.
8753 (grub_vbe_set_display_start): Renamed from this...
8754 (grub_vbe_bios_set_display_start): ... to this.
8755 (grub_vbe_get_display_start): Renamed from this...
8756 (grub_vbe_bios_get_display_start): ... to this.
8757 (grub_vbe_set_palette_data): Renamed from this...
8758 (grub_vbe_bios_set_palette_data): ... to this.
8759 (grub_vbe_bios_get_controller_info): Fixed problem with registers
8760 getting corrupted after calling it. Added more pushes and pops.
8761 (grub_vbe_bios_set_mode): Likewise.
8762 (grub_vbe_bios_get_mode): Likewise.
8763 (grub_vbe_bios_get_memory_window): Likewise.
8764 (grub_vbe_bios_set_scanline_length): Likewise.
8765 (grub_vbe_bios_get_scanline_length): Likewise.
8766 (grub_vbe_bios_get_display_start): Likewise.
8767 (grub_vbe_bios_set_palette_data): Likewise.
8769 * normal/cmdline.c (cl_set_pos): Refresh the screen.
8770 (cl_insert): Likewise.
8771 (cl_delete): Likewise.
8773 * term/gfxterm.c: New file.
8775 * term/i386/pc/vesafb.c: Removed file.
8777 * video/video.c: New file.
8779 * video/i386/pc/vbe.c (real2pm): Added new function.
8780 (grub_video_vbe_draw_pixel): Likewise.
8781 (grub_video_vbe_get_video_ptr): Likewise.
8782 (grub_video_vbe_get_pixel): Likewise
8783 (grub_video_vbe_init): Likewise.
8784 (grub_video_vbe_fini): Likewise.
8785 (grub_video_vbe_setup): Likewise.
8786 (grub_video_vbe_get_info): Likewise.
8787 (grub_video_vbe_set_palette): Likewise.
8788 (grub_video_vbe_get_palette): Likewise.
8789 (grub_video_vbe_set_viewport): Likewise.
8790 (grub_video_vbe_get_viewport): Likewise.
8791 (grub_video_vbe_map_color): Likewise.
8792 (grub_video_vbe_map_rgb): Likewise.
8793 (grub_video_vbe_map_rgba): Likewise.
8794 (grub_video_vbe_unmap_color): Likewise.
8795 (grub_video_vbe_fill_rect): Likewise.
8796 (grub_video_vbe_blit_glyph): Likewise.
8797 (grub_video_vbe_blit_bitmap): Likewise.
8798 (grub_video_vbe_blit_render_target): Likewise.
8799 (grub_video_vbe_scroll): Likewise.
8800 (grub_video_vbe_swap_buffers): Likewise.
8801 (grub_video_vbe_create_render_target): Likewise.
8802 (grub_video_vbe_delete_render_target): Likewise.
8803 (grub_video_vbe_set_active_render_target): Likewise.
8804 (grub_vbe_set_pixel_rgb): Remove function.
8805 (grub_vbe_set_pixel_index): Likewise.
8806 (index_color_mode): Remove static variable.
8807 (active_mode): Likewise.
8808 (framebuffer): Likewise.
8809 (bytes_per_scan_line): Likewise.
8810 (grub_video_vbe_adapter): Added new static variable.
8811 (framebuffer): Likewise.
8812 (render_target): Likewise.
8813 (initial_mode): Likewise.
8814 (mode_in_use): Likewise.
8815 (mode_list): Likewise.
8817 2006-03-10 Marco Gerards <marco@gnu.org>
8819 * configure.ac (AC_INIT): Bumped to 1.93.
8821 * DISTLIST: Added `include/grub/hfs.h'.
8823 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
8825 * boot/i386/pc/boot.S (general_error): Before looping, try INT
8826 18H, which might help the BIOS falling back to next boot media.
8828 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
8830 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
8831 Poe Chen <poe.poechen@gmail.com>.
8833 2006-01-17 Marco Gerards <marco@gnu.org>
8835 * include/grub/normal.h: Include <grub/script.h>.
8836 (grub_command_list): Removed struct.
8837 (grub_command_list_t): Removed type.
8838 (grub_menu_entry): Remove members `num' and `command_list'. Add
8839 members `commands' and `sourcecode'.
8840 * include/grub/script.h: Add inclusion guards.
8841 (grub_script_cmd_menuentry): New struct.
8842 (grub_script_execute_menuentry): New prototype.
8843 (grub_script_lexer_record_start): Likewise.
8844 (grub_script_lexer_record_stop): Likewise.
8845 * normal/execute.c (grub_script_execute_menuentry): New function.
8846 * normal/lexer.c (record, recording, recordpos, recordlen): New
8848 (grub_script_lexer_record_start): New function.
8849 (grub_script_lexer_record_stop): Likewise.
8850 (recordchar): Likewise.
8851 (nextchar): Likewise.
8852 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
8853 2048 as the buffer size. Add the tokens `menuentry' and `@'.
8854 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
8855 (current_menu): New variable.
8856 (free_menu): Mainly rewritten.
8857 (grub_normal_menu_addentry): New function.
8858 (read_config_file): Rewritten.
8859 * normal/menu.c (run_menu_entry): Mainly rewritten.
8860 * normal/menu_entry.c (make_screen): Rewritten the code to insert
8862 (run): Mainly rewritten.
8863 * normal/parser.y (menu_entry): New variable.
8864 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
8865 (menuentry): New rule.
8866 (command): Add `menuentry'.
8867 (if_statement): Allow additional returns before `fi'.
8868 * normal/script.c (grub_script_create_cmdmenu): New function.
8870 2006-01-03 Marco Gerards <marco@gnu.org>
8872 * INSTALL: GNU Bison is required.
8873 * configure.ac: Rewritten the test to detect Bison.
8874 * Makefile.in (YACC): New variable. Reported by Xun Sun
8875 <xun.sun.cn@gmail.com>.
8877 2006-01-03 Marco Gerards <marco@gnu.org>
8879 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
8880 the HFS+ filesystem to filesystem blocks.
8881 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
8882 GCC warning is silenced.
8884 2006-01-03 Marco Gerards <marco@gnu.org>
8886 * partmap/apple.c (apple_partition_map_iterate): Convert the data
8887 read from disk from big endian to host byte order.
8889 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
8891 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
8893 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
8894 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
8895 embedded HFS+ filesystem.
8896 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
8897 (grub_hfs_sblock): Move from here...
8898 * include/grub/hfs.h: To here... New file.
8899 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
8901 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
8903 (grub_hfsplus_volheader): Change type of member `magic' to
8905 (grub_hfsplus_data): Add new member `embedded_offset'.
8906 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
8908 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
8909 Calculate the offset.
8911 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8913 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
8915 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
8917 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8919 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
8920 ENV->NAME is NULL after allocating ENV->VALUE.
8922 2005-12-25 Marco Gerards <marco@gnu.org>
8924 * kern/env.c (grub_env_set): Rewritten the error handling code.
8926 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8928 * geninit.sh: Made more robust, and more portable.
8930 2005-12-25 Marco Gerards <marco@gnu.org>
8932 Add support for Apple HFS+ filesystems.
8934 * fs/hfsplus.c: New file.
8936 * DISTLIST: Added `fs/hfsplus.c'.
8938 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
8939 (hfsplus_mod_SOURCES): New variable.
8940 (hfsplus_mod_CFLAGS): Likewise.
8941 (hfsplus_mod_LDFLAGS): Likewise.
8942 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
8943 (grub_setup_SOURCES): Likewise.
8944 (grub_mkdevicemap_SOURCES): Likewise.
8945 (grub_emu_SOURCES): Likewise.
8946 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8948 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
8950 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
8952 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8954 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
8955 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
8956 include/grub/parser.h, include/grub/script.h, kern/parser.c,
8957 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
8958 normal/lexer.c, normal/parser.y, normal/script.c, and
8960 Removed kern/sparc64/cache.c.
8962 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
8963 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
8966 * configure.ac (AC_INIT): Bumped to 1.92.
8968 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
8970 * kern/err.c (grub_error_push): Added new function to support error
8972 (grub_error_pop): Likewise.
8973 (grub_error_stack_items): New local variable to support error stacks.
8974 (grub_error_stack_pos): Likewise.
8975 (grub_error_stack_assert): Likewise.
8976 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
8978 (grub_print_error): Added support to print errors from error stack.
8980 * include/grub/err.h (grub_error_push): Added function prototype.
8981 (grub_error_pop): Likewise.
8983 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
8985 * configure.ac: Accept `powerpc64' as host_cpu.
8986 (amd64): Rename to `biarch32'.
8988 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
8989 non-cacheline-aligned addresses.
8991 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
8992 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
8993 if `size' is non-zero.
8995 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
8997 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
8998 and `cd' to make sure the filename is not prefixed with a
9000 (pkgdata_MODULES): Add `gpt.mod'.
9001 (gpt_mod_SOURCES): New variable.
9002 (gpt_mod_CFLAGS): Likewise.
9003 (gpt_mod_LDFLAGS): Likewise.
9005 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
9007 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
9010 * partmap/gpt.c: New file.
9012 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
9013 GPT partition map is detected.
9015 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
9017 * commands/i386/pc/play.c: New file.
9018 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
9019 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
9022 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
9024 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
9025 ((unused))' to silence gcc warning.
9027 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
9029 * configure.ac: Correct `AC_PROG_YACC' test.
9031 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9033 * util/powerpc/ieee1275/grub-install.in: Run the mount point
9034 check before installing files.
9036 2005-11-22 Mike Small <smallm@panix.com>
9038 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
9039 number regex so multidigit numbers are recognized correctly.
9041 2005-11-22 Mike Small <smallm@panix.com>
9043 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
9044 debugging message before attempting to claim memory.
9045 (grub_rescue_cmd_initrd): Add a claim debugging message and try
9046 multiple addresses in case of failure.
9048 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9050 * term/tparm.c (get_space): Remove empty `if' statement.
9052 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9054 * kern/parser.c (check_varstate): Rename `state' to 's'.
9056 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9058 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
9059 variable definitions to the beginning of each function. Sort stack
9061 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
9062 `buf' argument to `char *'.
9064 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9066 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9067 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9068 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9069 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9070 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9071 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9072 configfile.mod, search.mod, gzio.mod and test.mod.
9073 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9074 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9075 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9076 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9077 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9078 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9079 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9080 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9081 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9082 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9083 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9084 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9085 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9086 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9087 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9088 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9089 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9090 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9091 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9092 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9093 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9094 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9095 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9097 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9099 (pkgdata_MODULES): Add test.mod.
9101 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9103 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
9104 appending to variables with "+=".
9105 (PModule): Use full pathname to generate *.lst filenames.
9107 * Makefile.in: Fixed list rules moved from genmk.rb.
9108 (.DELETE_ON_ERROR): New special target.
9109 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9111 * conf/i386-pc.rmk: Include conf/common.mk.
9112 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9113 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9114 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9115 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9116 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9117 configfile.mod, search.mod, gzio.mod and test.mod.
9118 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9119 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9120 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9121 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9122 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9123 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9124 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9125 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9126 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9127 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9128 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9129 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9130 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9131 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9132 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9133 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9134 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9135 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9136 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9137 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9138 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9139 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9140 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9142 * conf/common.rmk: ... to here. New file.
9144 * conf/common.mk: New file.
9146 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
9148 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9149 (grub_script.tab.c): ... here.
9151 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9152 (grub_script.tab.c): ... here.
9154 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9155 (grub_script.tab.c): ... here.
9157 * normal/command.c (grub_command_find): Fixed a memory leak of
9158 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9160 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9162 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9163 "@" which marks the start of a comment on ARM.
9164 (VARIABLE): Likewise.
9166 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9168 Add support for Linux/ADFS partition tables.
9170 * partmap/acorn.c: New file.
9172 * include/grub/acorn_filecore.h: Likewise.
9174 * DISTLIST: Added `partmap/acorn.c' and
9175 `include/grub/acorn_filecore.h'.
9177 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9179 (pkgdata_MODULES): Add `acorn.mod'.
9180 (acorn_mod_SOURCES): New variable.
9181 (acorn_mod_CFLAGS): Likewise.
9183 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9185 (pkgdata_MODULES): Add `acorn.mod'.
9186 (acorn_mod_SOURCES): New variable.
9187 (acorn_mod_CFLAGS): Likewise.
9189 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9190 (pkgdata_MODULES): Add `acorn.mod'.
9191 (acorn_mod_SOURCES): New variable.
9192 (acorn_mod_CFLAGS): Likewise.
9193 (acorn_mod_LDFLAGS): Likewise.
9195 * include/types.h (grub_disk_addr_t): New typedef.
9197 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
9199 * geninit.sh: New file.
9201 * geninitheader.sh: Likewise.
9203 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9204 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9205 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9206 * commands/configfile.c (grub_configfile_init)
9207 (grub_configfile_fini): Likewise.
9208 * commands/default.c (grub_default_init, grub_default_fini):
9210 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9211 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9212 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9213 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9215 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9216 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9218 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
9219 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
9221 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9223 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
9225 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9226 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
9227 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
9228 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
9229 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
9230 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
9231 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
9232 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
9233 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
9234 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
9235 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
9236 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
9237 * partmap/amiga.c (grub_amiga_partition_map_init)
9238 (grub_amiga_partition_map_fini): Likewise.
9239 * partmap/apple.c (grub_apple_partition_map_init)
9240 (grub_apple_partition_map_fini): Likewise.
9241 * partmap/pc.c (grub_pc_partition_map_init)
9242 (grub_pc_partition_map_fini): Likewise.
9243 * partmap/sun.c (grub_sun_partition_map_init,
9244 grub_sun_partition_map_fini): Likewise.
9245 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
9248 * util/grub-emu.c: Include <grub_modules_init.h>.
9249 (main): Don't initialize and de-initialize any modules directly,
9250 use `grub_init_all' and `grub_fini_all' instead.
9252 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
9253 `grub_vesafb_mod_init'.
9254 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
9256 * term/i386/pc/vga.c (grub_vga_init): Renamed to
9257 `grub_vga_mod_init'. Updated all users.
9258 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
9260 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
9261 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
9264 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
9265 Generate a function to initialize the module in utilities.
9266 Updated all callers.
9267 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
9268 initialize the module in utilities. Updated all callers.
9270 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9272 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
9273 escape sequence and a literal ^L to clear the screen.
9275 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
9276 when returning from Open Firmware.
9278 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9280 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
9281 (grub_ofconsole_height): Likewise.
9282 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
9283 manually insert a '\n'.
9284 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
9285 `grub_ofconsole_height'. Return early if these are already set.
9287 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
9289 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9290 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
9291 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
9292 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
9293 and `normal/script.c'.
9294 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9295 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9296 (test_mod_SOURCES): New variable.
9297 (test_mod_CFLAGS): Likewise.
9298 (test_mod_LDFLAGS): Likewise.
9299 (pkgdata_MODULES): Add `test.mod'.
9300 (grub_script.tab.c): New rule.
9301 (grub_script.tab.h): Likewise.
9303 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
9305 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9306 `commands/test.c', `normal/execute.c', `normal/lexer.c',
9307 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9308 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9309 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9310 (test_mod_SOURCES): New variable.
9311 (test_mod_CFLAGS): Likewise.
9312 (pkgdata_MODULES): Add `test.mod'.
9313 (grub_script.tab.c): New rule.
9314 (grub_script.tab.h): Likewise.
9316 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
9318 Add initial scripting support.
9320 * commands/test.c: New file.
9321 * include/grub/script.h: Likewise.
9322 * normal/execute.c: Likewise.
9323 * normal/function.c: Likewise.
9324 * normal/lexer.c: Likewise.
9325 * normal/parser.y: Likewise.
9326 * normal/script.c: Likewise.
9328 * configure.ac: Add `AC_PROG_YACC' test.
9330 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
9331 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
9332 `normal/function.c' and `normal/script.c'.
9333 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9334 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9335 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
9337 (pkgdata_MODULES): Add `test.mod'.
9338 (grub_script.tab.c): New rule.
9339 (grub_script.tab.h): Likewise.
9341 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
9343 * include/grub/normal.h (grub_test_init): New prototype.
9344 (grub_test_fini): Likewise.
9346 * normal/command.c: Include <grub/script.h>.
9347 (grub_command_execute): Rewritten.
9349 * util/grub-emu.c (main): Call `grub_test_init' and
9352 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9354 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9356 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9357 there are no pending characters.
9359 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9361 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9362 `grub_strndup' to drop device arguments. Replace unnecessary
9363 `grub_strndup' with `grub_strdup'.
9365 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9367 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9368 `debug' environment variable has been set.
9370 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
9372 * Makefile.in (install-local): Use $(DATA).
9373 (uninstall): Likewise.
9374 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9375 (sbin_UTILITIES): ... to here.
9376 (sbin_SCRIPTS): New variable.
9377 (grub_install_SOURCES): New variable.
9378 * util/powerpc/ieee1275/grub-install.in: New file.
9379 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9381 (add_segments): Call `grub_util_get_path'.
9383 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9385 From Timothy Baldwin:
9386 * commands/ls.c (grub_ls_list_files): Close FILE with
9388 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9390 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
9392 * include/grub/parser.h: New file.
9394 * kern/parser.c: Likewise.
9396 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9397 (grub_setup_SOURCES): Likewise.
9398 (grub_probefs_SOURCES): Likewise.
9399 (grub_emu_SOURCES): Likewise.
9400 (kernel_img_HEADERS): Add `parser.h'.
9402 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9403 (grub_emu_SOURCES): Add `kern/parser.c'.
9404 (grubof_SOURCES): Likewise.
9406 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9407 (grubof_SOURCES): Add `kern/parser.c'.
9409 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9411 * kern/misc.c (grub_split_cmdline): Removed function.
9413 * kern/rescue.c: Include <grub/parser.h>.
9414 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9415 of `grub_split_cmdline'.
9417 * normal/command.c: Include <grub/parser.h>.
9418 (grub_command_execute): Use `grub_parser_split_cmdline' instead
9419 of `grub_split_cmdline'.
9421 * normal/completion.c: Include <grub/parser.h>.
9422 (cmdline_state): New variable.
9423 (iterate_dir): End the filename with a quote depending on the
9425 (get_state): new function.
9426 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9427 split the arguments and determine the current argument. When the
9428 argument string is not quoted, escape all spaces.
9430 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9432 * normal/sparc64/setjmp.S: New file.
9434 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9436 * include/grub/sparc64/libgcc.h: New file.
9437 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9438 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9439 normal/sparc64/setjmp.c.
9441 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9443 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9444 * kern/sparc64/cache.S: New file.
9445 * kern/sparc64/cache.c: Removed.
9446 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9447 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
9449 (COMMON_LDFLAGS): Add -melf64_sparc.
9450 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9451 (grubof_SOURCES): Use cache.S instead of cache.c.
9452 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
9453 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9454 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9456 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9457 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9458 (linux_mod_CFLAGS): Commented out.
9459 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9460 out because module isn't built.
9461 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9462 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9463 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9464 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9465 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9466 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9467 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9468 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9469 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9470 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9471 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9472 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9473 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9474 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9476 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
9478 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9479 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9480 longer, because HFS should not be used on PC.
9482 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9484 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9485 consistently within the loop.
9487 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
9489 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9490 directory can not be read.
9492 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9494 * configure.ac (AC_INIT): Increase the version number to 1.91.
9496 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9497 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9498 term/i386/pc/serial.c.
9500 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9502 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9503 file size must be permitted.
9505 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9506 between %ah and %al.
9508 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9510 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9512 Call the hook with a NUL-terminated filename.
9513 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9516 * kern/term.c (cursor_state): New variable.
9517 (grub_term_set_current): Reset the cursor state on a new
9519 (grub_setcursor): Rewritten to use CURSOR_STATE.
9520 (grub_getcursor): New function.
9522 * include/grub/term.h (grub_getcursor): New prototype.
9524 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9525 integers on ARM. Reported by Timothy Baldwin
9526 <T.E.Baldwin99@members.leeds.ac.uk>.
9528 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
9530 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9532 (grub_sfs_dir): Likewise.
9534 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
9536 Add support for the SFS filesystem.
9538 * fs/sfs.c: New file.
9540 * DISTLIST: Added `fs/sfs.c'.
9542 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9543 (grub_probefs_SOURCES): Likewise.
9544 (grub_emu_SOURCES): Likewise.
9545 (pkgdata_MODULES): Add `sfs.mod'.
9546 (sfs_mod_SOURCES): New variable.
9547 (sfs_mod_CFLAGS): Likewise.
9548 (sfs_mod_LDFLAGS): Likewise.
9550 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
9551 (pkgdata_MODULES): Add `sfs.mod'.
9552 (sfs_mod_SOURCES): New variable.
9553 (sfs_mod_CFLAGS): Likewise.
9555 * util/grub-emu.c (main): Call `grub_sfs_init' and
9558 * include/grub/fs.h (grub_sfs_init): New prototype.
9559 (grub_sfs_fini): Likewise.
9561 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
9563 Add support for the AFFS filesystem.
9565 * fs/affs.c: New file.
9567 * DISTLIST: Added `fs/affs.c'.
9569 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
9570 (grub_probefs_SOURCES): Likewise.
9571 (grub_emu_SOURCES): Likewise.
9572 (pkgdata_MODULES): Add `affs.mod'.
9573 (affs_mod_SOURCES): New variable.
9574 (affs_mod_CFLAGS): Likewise.
9575 (affs_mod_LDFLAGS): Likewise.
9577 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
9578 (pkgdata_MODULES): Add `affs.mod'.
9579 (affs_mod_SOURCES): New variable.
9580 (affs_mod_CFLAGS): Likewise.
9582 * util/grub-emu.c (main): Call `grub_affs_init' and
9585 * include/grub/fs.h (grub_affs_init): New prototype.
9586 (grub_affs_fini): Likewise.
9588 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9590 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
9592 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9594 * configure.ac: Accept `x86_64' as host_cpu. In that case add
9597 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
9600 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
9601 (COMMON_LDFLAGS): New variable.
9602 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
9603 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
9604 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
9605 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
9606 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
9607 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
9608 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
9609 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
9610 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
9611 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
9612 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9613 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9614 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
9615 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
9616 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
9618 (normal_mod_ASFLAGS): Add `-m32'.
9620 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
9621 (grub_host_size_t, grub_host_ssize_t): New types.
9622 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
9623 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
9624 `GRUB_HOST_SIZEOF_VOID_P'.
9626 * include/grub/kernel.h (struct grub_module_header): Type of
9627 member offset changed to `grub_host_off_t'. Type of member size
9628 changed to `grub_host_size_t'.
9629 (struct grub_module_info): Type of member offset changed to
9630 `grub_host_off_t'. Type of member size changed to
9633 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
9635 Make GRUB's kernel compliant to Multiboot Specification.
9637 * kern/i386/pc/startup.S (multiboot_header): New label.
9638 (multiboot_entry): Likewise.
9639 (multiboot_trampoline): Likewise.
9641 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9644 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
9645 put parentheses after a question mark.
9646 [!GRUB_UTIL] (my_mod): New variable.
9648 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
9650 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
9652 Adds support for the XFS filesystem. Btrees are not supported
9655 * fs/xfs.c: New file.
9657 * DISTLIST: Added `fs/xfs.c'.
9659 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
9660 (grub_probefs_SOURCES): Likewise.
9661 (grub_emu_SOURCES): Likewise.
9662 (pkgdata_MODULES): Add `xfs.mod'.
9663 (xfs_mod_SOURCES): New variable.
9664 (xfs_mod_CFLAGS): Likewise.
9666 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
9667 (pkgdata_MODULES): Add `xfs.mod'.
9668 (xfs_mod_SOURCES): New variable.
9669 (xfs_mod_CFLAGS): Likewise.
9671 * util/grub-emu.c (main): Call `grub_xfs_init' and
9674 * include/grub/fs.h (grub_xfs_init): New prototype.
9675 (grub_xfs_fini): Likewise.
9678 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
9680 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
9681 color modes, allow greater than 16 colors to be configured as
9684 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9686 * normal/completion.c (complete_arguments): Add the qualifier
9689 From Omniflux <omniflux+lists@omniflux.com>:
9690 * include/grub/terminfo.h: New file.
9691 * include/grub/tparm.h: Likewise.
9692 * include/grub/i386/pc/serial.h: Likewise.
9693 * term/terminfo.c: Likewise.
9694 * term/tparm.c: Likewise.
9695 * term/i386/pc/serial.c: Likewise.
9696 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
9698 (terminfo_mod_SOURCES): New variable.
9699 (terminfo_mod_CFLAGS): Likewise.
9700 (serial_mod_SOURCES): Likewise.
9701 (serial_mod_CFLAGS): Likewise.
9703 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
9705 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
9706 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
9707 and kern/powerpc/ieee1275/cmain.c, respectively.
9709 * boot/powerpc/ieee1275/crt0.S: Moved to ...
9710 * kern/powerpc/ieee1275/crt0.S: ... here.
9712 * boot/powerpc/ieee1275/cmain.c: Moved to ...
9713 * kern/powerpc/ieee1275/cmain.c: ... here.
9715 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
9716 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
9717 instead of boot/powerpc/ieee1275/crt0.S and
9718 boot/powerpc/ieee1275/cmain.c, respectively.
9720 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
9721 sectors. It was not used anyway.
9723 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9725 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
9726 `unused parameter' warning.
9728 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9730 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
9732 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
9735 2005-08-28 Marco Gerards <metgerards@student.han.nl>
9737 * include/grub/normal.h (enum grub_completion_type): Added
9738 `GRUB_COMPLETION_TYPE_ARGUMENT'.
9740 * normal/cmdline.c (print_completion): Handle
9741 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
9742 * normal/menu_entry.c (store_completion): Likewise.
9744 * normal/completion.c (complete_arguments): New function.
9745 (grub_normal_do_completion): Call `complete_arguments' when the
9746 current words start with a dash.
9748 2005-08-27 Marco Gerards <metgerards@student.han.nl>
9750 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
9751 `gzio.mod' instead of `io.mod').
9753 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
9755 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
9756 (DISTDIRS): Added io and video.
9757 Rewrite the search routine to make an output consistently.
9759 * DISTLIST: Added conf/sparc64-ieee1275.mk,
9760 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
9761 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
9762 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
9763 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
9764 util/powerpc/ieee1275/misc.c.
9766 * include/grub/gzio.h: New file.
9767 * io/gzio.c: Likewise.
9769 * kern/file.c (grub_file_close): Call grub_device_close only if
9770 FILE->DEVICE is not NULL.
9772 * include/grub/mm.h [!NULL] (NULL): New macro.
9774 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
9776 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
9777 (pkgdata_MODULES): Added gzio.mod.
9778 (gzio_mod_SOURCES): New variable.
9779 (gzio_mod_CFLAGS): Likewise.
9781 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
9782 (pkgdata_MODULES): Added gzio.mod.
9783 (gzio_mod_SOURCES): New variable.
9784 (gzio_mod_CFLAGS): Likewise.
9786 * commands/cat.c: Include grub/gzio.h.
9787 (grub_cmd_cat): Use grub_gzfile_open instead of
9790 * commands/cmp.c: Include grub/gzio.h.
9791 (grub_cmd_cmp): Use grub_gzfile_open instead of
9794 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
9795 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
9797 (grub_rescue_cmd_module): Likewise.
9799 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9801 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
9802 kern/sparc64/ieee1275/init.c because it contains _start.
9803 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
9805 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9807 * configure.ac: Add support for sparc64 host with ieee1275
9809 * configure: Generated from configure.ac.
9810 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
9812 (grub_ofdisk_read): Likewise.
9813 (grub_ofdisk_open): Use %p to print pointer values, and cast the
9814 pointers as (void *) to remove a warning.
9815 (grub_ofdisk_close): Likewise.
9816 (grub_ofdisk_read): Likewise.
9817 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
9818 returns, so make it return void to remove a warning.
9819 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
9820 Corresponding prototype change.
9821 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
9822 values, and cast the pointers as (void *) to remove a warning.
9823 (grub_mm_dump): Likewise.
9824 * conf/sparc64-ieee1275.mk: New file.
9825 * conf/sparc64-ieee1275.rmk: Likewise.
9826 * include/grub/sparc64/setjmp.h: Likewise.
9827 * include/grub/sparc64/types.h: Likewise.
9828 * include/grub/sparc64/ieee1275/console.h: Likewise.
9829 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9830 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9831 * include/grub/sparc64/ieee1275/time.h: Likewise.
9832 * kern/sparc64/cache.c: Likewise.
9833 * kern/sparc64/dl.c: Likewise.
9834 * kern/sparc64/ieee1275/init.c: Likewise.
9835 * kern/sparc64/ieee1275/openfw.c: Likewise.
9837 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
9839 * util/console.c (grub_ncurses_putchar): If C is greater than
9840 0x7f, set C to a question mark.
9841 (grub_ncurses_getcharwidth): New function.
9842 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
9845 * normal/menu.c (print_entry): Made aware of Unicode. First,
9846 convert TITLE to UCS-4, and predict the cursor position by
9849 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
9851 * kern/misc.c (grub_utf16_to_utf8): Likewise.
9853 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9855 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
9856 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9859 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
9860 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9861 grub_strcpy and grub_strlen. Take it into account that a space
9862 character is inserted as a delimiter.
9864 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9866 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
9867 invalid magic in the error.
9869 * commands/search.c: New file.
9871 * util/grub-emu.c (main): Call grub_search_init and
9874 * kern/rescue.c (grub_rescue_print_disks): Removed.
9875 (grub_rescue_print_devices): New function.
9876 (grub_rescue_cmd_ls): Use grub_device_iterate with
9877 grub_rescue_print_devices instead of grub_disk_dev_iterate with
9878 grub_rescue_print_disks.
9880 * kern/partition.c (grub_partition_iterate): Return the result of
9881 PARTMAP->ITERATE instead of GRUB_ERRNO.
9883 * kern/device.c: Include grub/partition.h.
9884 (grub_device_iterate): New function.
9886 * include/grub/partition.h (grub_partition_iterate): Return int
9887 instead of grub_err_t.
9889 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
9891 [GRUB_UTIL] (grub_search_fini): Likewise.
9893 * include/grub/device.h (grub_device_iterate): New prototype.
9895 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9897 (pkgdata_MODULES): Added search.mod.
9898 (search_mod_SOURCES): New variable.
9899 (search_mod_CFLAGS): Likewise.
9901 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
9902 (pkgdata_MODULES): Added search.mod.
9903 (search_mod_SOURCES): New variable.
9904 (search_mod_CFLAGS): Likewise.
9906 * commands/ls.c (grub_ls_list_disks): Renamed to ...
9907 (grub_ls_list_devices): ... this, and use grub_device_iterate.
9908 All callers changed.
9910 * DISTLIST: Added commands/search.c.
9912 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9914 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
9916 (grub_getcharwidth): New function.
9918 * kern/misc.c (grub_utf8_to_ucs4): New function.
9920 * include/grub/term.h (struct grub_term): Added a new member
9922 (grub_getcharwidth): New prototype.
9924 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
9926 * term/i386/pc/console.c (map_char): New function. Segregated from
9927 grub_console_putchar.
9928 (grub_console_putchar): Use map_char.
9929 (grub_console_getcharwidth): New function.
9930 (grub_console_term): Specified grub_console_getcharwidth as
9933 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
9934 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
9936 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
9938 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
9939 on grub_strtoul completely.
9940 (write_char): Declare local variables in the beginning of the
9942 (grub_vesafb_getcharwidth): New function.
9943 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
9946 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
9948 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
9949 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
9950 commands/i386/pc/vbetest.c.
9952 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
9953 call grub_vbe_get_controller_info again, because the returned
9954 information is volatile.
9955 (grub_vbe_set_video_mode): Mostly rewritten.
9956 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
9957 grub_vbe_status_t correctly.
9958 (grub_vbe_get_video_mode_info): Likewise.
9959 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
9960 several if statements.
9962 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
9963 * commands/i386/pc/vbeinfo.c: ... this.
9965 * commands/i386/pc/vbe_test.c: Renamed to ...
9966 * commands/i386/pc/vbetest.c: ... this.
9968 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
9970 (grub_cmd_vbeinfo): ... this. Save video modes before
9971 iterating. Skip a video mode, if it is not available, not enough
9972 information is given or it is monochrome. Show the memory
9973 model. Leave the interpretation of MODEVAR to grub_strtoul
9975 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
9976 (GRUB_MOD_FINI): Likewise.
9978 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
9979 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
9980 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
9981 duplicated grub_env_get. Leave the interpretation of MODEVAR to
9982 grub_strtoul completely.
9984 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
9985 (GRUB_MOD_FINI): Likewise.
9987 * normal/misc.c: Include grub/mm.h.
9989 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
9990 vbe_list_modes with vbetest.mod and vbeinfo.mod.
9991 (vbe_list_modes_mod_SOURCES): Removed.
9992 (vbe_list_modes_mod_CFLAGS): Likewise.
9993 (vbe_test_mod_SOURCES): Likewise.
9994 (vbe_test_mod_CFLAGS): Likewise.
9995 (vbeinfo_mod_SOURCES): New variable.
9996 (vbeinfo_mod_CFLAGS): Likewise.
9997 (vbetest_mod_SOURCES): Likewise.
9998 (vbetest_mod_CFLAGS): Likewise.
10000 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
10002 * normal/misc.c: New file.
10004 * DISTLIST: Added normal/misc.c.
10006 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
10007 DISK to HOOK. Call HOOK with DISK.
10008 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10009 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10010 * partmap/sun.c (sun_partition_map_iterate): Likewise.
10012 * normal/menu_entry.c (struct screen): Added a new member
10013 "completion_shown".
10014 (completion_buffer): New global variable.
10015 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
10016 (store_completion): New function.
10017 (complete): Likewise.
10018 (clear_completions): Likewise.
10019 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
10020 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
10021 a tab, call complete.
10023 * normal/completion.c (disk_dev): Removed.
10024 (print_simple_completion): Likewise.
10025 (print_partition_completion): Likewise.
10026 (print_func): New global variable.
10027 (add_completion): Do not take the arguments WHAT or PRINT any
10028 longer. Added a new argument TYPE. Instead of printing directly,
10029 call PRINT_FUNC if not NULL.
10030 All callers changed.
10031 (complete_device): Use a local variable DEV instead of
10032 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
10033 (grub_normal_do_completion): Take a new argument HOOK. Do not
10034 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
10035 empty string, return NULL instead.
10036 All callers changed.
10038 * normal/cmdline.c (print_completion): New function.
10040 * kern/partition.c (grub_partition_iterate): Add an argument DISK
10042 All callers changed.
10044 * kern/disk.c (grub_print_partinfo): Removed.
10046 * include/grub/partition.h (struct grub_partition_map): Add a new
10047 argument DISK into HOOK of ITERATE.
10048 (grub_partition_iterate): Add a new argument DISK to HOOK.
10050 * include/grub/normal.h (enum grub_completion_type): New enum.
10051 (grub_completion_type_t): New type.
10052 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10053 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10054 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10055 (GRUB_COMPLETION_TYPE_FILE): Likewise.
10056 (grub_normal_do_completion): Added a new argument HOOK.
10057 (grub_normal_print_device_info): New prototype.
10059 * include/grub/disk.h (grub_print_partinfo): Removed.
10061 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10062 (normal_mod_SOURCES): Likewise.
10063 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10064 (normal_mod_SOURCES): Likewise.
10066 * commands/ls.c (grub_ls_list_disks): Use
10067 grub_normal_print_device_info instead of grub_print_partinfo. Free
10069 (grub_ls_list_files): Use grub_normal_print_device_info instead of
10070 duplicating the code.
10072 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10074 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
10075 follow GCS more precisely.
10076 * commands/i386/pc/vbe_test.c: Likewise.
10077 * include/grub/i386/pc/vbe.h: Likewise.
10078 * term/i386/pc/vesafb.c: Likewise.
10079 * video/i386/pc/vbe.c: Likewise.
10081 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10083 * DISTLIST: Added term/i386/pc/vesafb.c
10084 DISTLIST: Added video/i386/pc/vbe.c
10085 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10086 DISTLIST: Added commands/i386/pc/vbe_test.c.
10087 * commands/i386/pc/vbe_list_modes.c: New file.
10088 * commands/i386/pc/vbe_test.c: Likewise.
10089 * term/i386/pc/vesafb.c: Likewise.
10090 * video/i386/pc/vbe.c: Likewise.
10091 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10092 (grub_vbe_probe) Added prototype.
10093 (grub_vbe_set_video_mode) Likewise.
10094 (grub_vbe_get_video_mode) Likewise.
10095 (grub_vbe_get_video_mode_info) Likewise.
10096 (grub_vbe_set_pixel_rgb) Likewise.
10097 (grub_vbe_set_pixel_index) Likewise.
10098 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10099 (pkgdata_MODULES): Added vesafb.mod.
10100 (pkgdata_MODULES): Added vbe_list_modes.mod.
10101 (pkgdata_MODULES): Added vbe_test.mod.
10102 (vbe_mod_SOURCES): Added.
10103 (vbe_mod_CFLAGS): Likewise.
10104 (vesafb_mod_SOURCES): Likewise.
10105 (vesafb_mod_CFLAGS): Likewise.
10106 (vbe_list_modes_mod_SOURCES): Likewise.
10107 (vbe_list_modes_mod_CFLAGS): Likewise.
10108 (vbe_test_mod_SOURCES): Likewise.
10109 (vbe_test_mod_CFLAGS): Likewise.
10111 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
10113 * normal/command.c (grub_command_execute): If INTERACTIVE is
10114 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10115 CMDLINE. Disable the pager if INTERACTIVE is true.
10116 All callers are changed.
10118 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10119 before reading a config file.
10120 * normal/main.c (read_config_file): Even if a command is not
10121 found, register it if it is within an entry.
10123 * util/grub-emu.c: Include sys/types.h and unistd.h.
10124 (options): Added --hold.
10125 (struct arguments): Added a new member "hold".
10126 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10128 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10129 cleared by a debugger, if it is not zero.
10131 * include/grub/normal.h (grub_command_execute): Add an argument
10134 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
10136 * DISTLIST: Added include/grub/i386/pc/vbe.h.
10138 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
10140 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10141 program with another one, because the old one didn't detect a bug
10142 in gcc-3.4. Always use regparm 2, because the new test is still
10143 not enough for gcc-4.0. Someone must investigate a simple test
10144 case which detects a bug in gcc-4.0.
10146 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
10148 * DISTLIST: Added normal/completion.c.
10150 * normal/completion.c: New file.
10152 * term/i386/pc/console.c (grub_console_getwh): New function.
10153 (grub_console_term): Assign grub_console_getwh to getwh.
10155 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10156 function is defined in normal/completion.c as
10157 grub_normal_do_completion.
10158 (grub_cmdline_get): Use grub_normal_do_completion instead of
10161 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10162 returns non-zero, otherwise return 0.
10163 (grub_partition_iterate): First, probe the partition map. Then,
10164 call ITERATE only for this partition map.
10166 * kern/misc.c (grub_strncmp): Rewritten.
10168 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10169 returns non-zero. Otherwise return 0.
10171 * include/grub/partition.h (grub_partition_map_iterate): Return
10172 int instead of void.
10174 * include/grub/normal.h (grub_normal_do_completion): New prototype.
10176 * include/grub/misc.h (grub_strncmp): Change the type of N to
10179 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10182 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
10183 unsigned explicitly before comparing it with I.
10185 * kern/main.c (grub_env_write_root): Add the attribute unused into
10188 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10189 normal/completion.c.
10190 (normal_mod_SOURCES): Likewise.
10191 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10192 (normal_mod_SOURCES): Likewise.
10194 * normal/command.c (grub_iterate_commands): If ITERATE returns
10195 non-zero, return one immediately.
10197 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
10199 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10200 * kern/i386/pc/startup.S: Updated Global Descriptor table's
10202 (grub_vbe_get_controller_info): New function.
10203 (grub_vbe_get_mode_info): Likewise.
10204 (grub_vbe_set_mode): Likewise.
10205 (grub_vbe_get_mode): Likewise.
10206 (grub_vbe_set_memory_window): Likewise.
10207 (grub_vbe_get_memory_window): Likewise.
10208 (grub_vbe_set_scanline_length): Likewise.
10209 (grub_vbe_get_scanline_length): Likewise.
10210 (grub_vbe_set_display_start): Likewise.
10211 (grub_vbe_get_display_start): Likewise.
10212 (grub_vbe_set_palette_data): Likewise.
10213 * include/grub/i386/pc/vbe.h: New file.
10215 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10217 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10218 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10219 * DISTLIST: Likewise.
10220 * kern/ieee1275/of.c: Moved to ...
10221 * kern/ieee1275/ieee1275.c: ... here.
10223 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10225 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10226 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
10227 Pass 0 as `end' parameter to grub_strtoul().
10229 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10231 * include/grub/powerpc/ieee1275/console.h: Do not include
10232 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
10234 (grub_console_cur_color): Remove i386-specific prototype.
10235 (grub_console_real_putchar): Likewise.
10236 (grub_console_checkkey): Likewise.
10237 (grub_console_getkey): Likewise.
10238 (grub_console_getxy): Likewise.
10239 (grub_console_gotoxy): Likewise.
10240 (grub_console_cls): Likewise.
10241 (grub_console_setcursor): Likewise.
10242 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
10243 Include <grub/machine/console.h>.
10244 * term/ieee1275/ofconsole.c: Likewise.
10246 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
10248 * Makefile.in (LIBLZO): New variable.
10250 * configure.ac: Check for LZO version 2.
10252 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
10253 lzo/lzo1x.h instead of lzo1x.h.
10255 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
10258 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
10259 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
10261 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
10262 copying the data from PARTITION to P.
10264 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10266 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
10267 negative, unload the module.
10269 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
10270 map is "pc_partition_map" but not "pc".
10271 (usage): Fix the description. The options are --boot-image and
10272 --core-image but not --boot-file or --core-file.
10273 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
10274 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
10277 * util/i386/pc/grub-install.in: Do not specify --boot-file or
10278 --core-file. Specify INSTALL_DEVICE as an argument.
10280 * util/console.c: Include config.h.
10281 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
10282 [HAVE_NCURSES_H]: Include ncurses.h.
10283 [HAVE_CURSES_H]: Include curses.h.
10284 [!A_NORMAL] (A_NORMAL): Defined as zero.
10285 [!A_STANDOUT] (A_STANDOUT): Likewise.
10287 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
10289 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
10291 * configure.ac: Check for curses libraries and headers.
10293 * Makefile.in (LIBCURSES): New variable.
10295 * genmk.rb (Script::rule): Set the executable bits.
10297 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
10298 name of the PC partition map is "pc_partition_map" but not "pc".
10300 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10302 * util/i386/pc/grub-install.in (grub_probefs): New variable.
10303 (modules): Likewise.
10304 (usage): Added descriptions for --modules and --grub-probefs.
10305 Handle --modules and --grub-probefs. Save the arguments in MODULES
10306 and GRUB_PROBEFS, respectively.
10307 Auto-detect a filesystem module against GRUBDIR. If the result is
10308 empty and modules are not specified explicitly, abort the
10309 installation. Add the result to MODULES.
10311 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
10312 disk/powerpc/ieee1275/ofdisk.c,
10313 include/grub/powerpc/ieee1275/init.h and
10314 term/powerpc/ieee1275/ofconsole.c.
10315 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
10316 term/ieee1275/ofconsole.c.
10318 * include/grub/powerpc/ieee1275/console.h: Resurrected.
10320 * COPYING: Upgraded to the latest version. Only the address of the
10321 FSF office has changed.
10323 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10325 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10326 kern/ieee1275.c with kern/ieee1275/of.c.
10328 * kern/ieee1275.c: Moved to ...
10329 * kern/ieee1275/of.c: ... here.
10331 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
10333 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
10336 * config.guess: Updated to the latest version from gnulib.
10337 * config.sub: Likewise.
10338 * install.sh: Likewise.
10339 * mkinstalldirs: Likewise.
10341 * include/grub/console.h: Removed. This file is arch-specific. Do
10342 not put this in include/grub.
10344 * include/grub/i386/pc/console.h: Resurrected.
10346 * util/console.c: Include grub/machine/console.h instead of
10348 * util/grub-emu.c: Likewise.
10350 2005-08-04 Marco Gerards <metgerards@student.han.nl>
10352 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10355 From Vincent Pelletier <subdino2004@yahoo.fr>
10356 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10357 Redefined to use grub_getwh.
10358 (grub_term): New member named getwh.
10359 (grub_getwh): New prototype.
10360 * kern/term.c (grub_getwh): New function.
10361 * term/i386/pc/console.c (grub_console_getwh): New function.
10362 (grub_console_term): New member `getwh'.
10363 * term/i386/pc/vga.c (grub_vga_getwh): New function.
10364 (grub_vga_term): New member `getwh'.
10365 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10367 (grub_ofconsole_getw): New function.
10368 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10369 (grub_ofconsole_term): New field named getwh and new initial
10372 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
10374 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10375 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
10376 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10377 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10378 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10379 of <grub/machine/ieee1275.h>.
10380 * commands/ieee1275/reboot.c: Likewise.
10381 * boot/powerpc/ieee1275/ieee1275.c: Move ...
10382 * kern/ieee1275.c: ... to here. All users updated. Change all
10383 parameter structs to use new type `grub_ieee1275_cell_t'.
10384 * term/powerpc/ieee1275/ofconsole.c: Move ...
10385 * term/ieee1275/ofconsole.c: ... to here. All users updated.
10386 * disk/powerpc/ieee1275/ofdisk.c: Move ...
10387 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
10388 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10390 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10391 Remove unused prototypes. All users updated.
10392 * include/grub/powerpc/ieee1275/console.h: Removed.
10393 * include/grub/powerpc/ieee1275/ieee1275.h: Define
10394 `grub_ieee1275_cell_t'.
10395 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10396 Cast comparisons with -1 to the correct type.
10397 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10398 type to match `grub_ieee1275_entry_fn'.
10400 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
10402 * DISTLIST: Added util/i386/pc/grub-probefs.c.
10404 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10405 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10407 (grub_probefs_SOURCES): New variable.
10409 * util/i386/pc/grub-probefs.c: New file.
10411 * util/i386/pc/grub-setup.c (main): Call
10412 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10413 grub_hfs_init and grub_jfs_init to initialize the system. Call
10414 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10415 grub_pc_partition_map_fini to finish the system.
10417 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
10419 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10421 (grub_multiboot_load_elf32): Likewise.
10422 (grub_multiboot_is_elf64): Likewise.
10423 (grub_multiboot_load_elf64): Likewise.
10424 (grub_multiboot_load_elf): Likewise.
10425 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10426 an ELF32 or ELF64 file.
10427 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10429 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10430 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10431 NULL before calling FS->LABEL.
10432 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10433 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10434 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10435 before calling FS->LABEL.
10437 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
10439 * util/i386/pc/grub-install.in (datadir): New variable.
10441 (pkgdatadir): New variable.
10442 (pkglibdir): Removed.
10444 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
10446 * DISTLIST: Added util/i386/pc/grub-install.in.
10448 * util/i386/pc/grub-install.in: New file.
10450 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10451 (grub_install_SOURCES): Likewise.
10453 * genmk.rb: Added support for scripts.
10454 (Script): New class.
10455 (scripts): New variable.
10457 * Makefile.in (install-local): Install sbin_SCRIPTS by
10459 (uninstall): Remove sbin_SCRIPTS.
10461 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10462 device, try to get a GRUB device by
10463 grub_util_biosdisk_get_grub_dev.
10466 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10467 description for --device-map.
10469 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10471 Change the semantics of variable hooks. They now return strings
10472 instead of error values.
10474 * util/i386/pc/grub-setup.c: Include grub/env.h.
10475 (setup): Use grub_device_set_root instead of grub_env_set.
10477 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10478 grub_env_get instead of grub_device_set_root and
10479 grub_device_get_root, respectively.
10481 * kern/main.c (grub_env_write_root): New function.
10482 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10483 grub_env_set instead of grub_device_set_root.
10485 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10487 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10488 rather than calling ENV->WRITE_HOOK afterwards.
10489 (grub_env_get): Return the result of ENV->READ_HOOK rather than
10490 passing a pointer of a pointer.
10491 (grub_register_variable_hook): Change the types of "read_hook" and
10492 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10494 Allocate the default empty string on the heap, because this string
10495 may be freed later.
10497 * kern/device.c: Include grub/env.h.
10498 (grub_device_set_root): Removed.
10499 (grub_device_get_root): Likewise.
10500 (grub_device_open): Use grub_env_get instead of
10501 grub_device_get_root.
10503 * include/grub/env.h (grub_env_read_hook_t): New type.
10504 (grub_env_write_hook_t): Likewise.
10505 (grub_env_var): Change the types of "read_hook" and "write_hook"
10506 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10507 (grub_register_variable_hook): Likewise.
10509 * include/grub/device.h (grub_device_set_root): Removed.
10510 (grub_device_set_root): Likewise.
10512 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10513 make sure that DIRNAME terminates with '/', so that
10514 grub_fat_find_dir will fail if PATH is not a directory.
10516 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10518 Use the qualifier auto for print_files and print_files_long.
10519 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10521 Put a newline only if there is no error.
10522 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10525 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10527 * kern/partition.c (grub_partition_probe): Initialize PART to
10528 NULL. Otherwise, when no partition map is registered, this returns
10531 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
10533 * partmap/apple.c (apple_partition_map_iterate): Check if POS
10534 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10537 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
10539 * commands/ls.c (grub_ls_list_disks): Print the filesystem
10540 information on each device, if it does not have partitions. Print
10541 "Device" instead of "Disk", because this function is not specific
10544 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10545 static to ensure that it is put on the memory rather than a
10548 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10550 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
10551 (grub_cat_init): Likewise.
10552 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
10553 (options): Likewise.
10554 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
10555 (grub_configfile_init): Likewise.
10556 * font/manager.c (GRUB_MOD_INIT): Likewise.
10557 * commands/help.c (GRUB_MOD_INIT): Likewise.
10558 (grub_help_init): Likewise.
10559 * normal/command.c (grub_command_init): Likewise.
10560 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
10561 * disk/loopback.c (grub_loop_init): Likewise.
10562 (GRUB_MOD_INIT): Likewise.
10563 * commands/ls.c (grub_ls_init): Likewise.
10564 (GRUB_MOD_INIT): Likewise.
10565 (options): Likewise.
10566 * commands/boot.c (grub_boot_init): Likewise.
10567 (GRUB_MOD_INIT): Likewise.
10568 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
10569 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
10570 (GRUB_MOD_INIT): Likewise.
10571 * commands/cmp.c (grub_cmp_init): Likewise.
10572 (GRUB_MOD_INIT): Likewise.
10574 * normal/arg.c: Use <> instead of "" to include header files.
10575 (SHORT_ARG_HELP): New macro.
10576 (SHORT_ARG_USAGE): Likewise.
10577 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
10578 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
10580 (find_short): Check if C is 'h' or 'u' explicitly.
10581 (grub_arg_show_help): Use space characters instead of tabs. Treat
10582 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
10583 are shown with --help and --usage only if they are not used for
10584 the command itself.
10585 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
10588 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
10589 const into "longarg". Change the type of "shortarg" to int.
10591 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10593 * boot/i386/pc/boot.S (boot_drive_check): New label.
10595 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
10598 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
10599 which do not pass a boot drive correctly. Copied from GRUB Legacy.
10601 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10603 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
10604 When turning off Gate A20, skip the check and return immediately,
10605 because this is not fatal usually.
10607 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10609 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
10610 be 0x7C00 instead of 0x8000.
10612 * boot/i386/pc/pxeboot.S: Rewritten.
10614 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
10616 (gate_a20_check_state): Read a byte from 0x108000. Invert the
10619 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
10621 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
10622 robustness. This routine now supports a BIOS call and System
10623 Control Port A to modify the gate A20.
10625 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10626 Increased to 0x440.
10628 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
10630 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
10631 device path and resulting ihandle.
10632 (grub_ofdisk_close): dprintf the ihandle being closed.
10633 (grub_ofdisk_read): dprintf function parameters.
10634 * kern/mm.c (grub_mm_init_region): Likewise.
10635 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
10636 (grub_linux_boot): dprintf the Linux entry point, initrd address and
10637 size, and boot arguments.
10638 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
10639 before loading into memory.
10640 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
10641 before loading into memory.
10643 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
10645 * kern/mm.c: Added much documentation.
10646 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
10647 8, set to 5 instead of 8.
10649 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
10651 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
10653 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
10654 (grub_mkdevicemap_SOURCES): New variable.
10656 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
10657 lib/device.c of GRUB Legacy.
10659 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
10661 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
10662 instead of PATH is NULL.
10664 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
10666 * commands/cmp.c (BUFFER_SIZE): New macro.
10667 (grub_cmd_cmp): Close the right file at the right time. Compare
10668 only data just read. Don't report files of different size as
10669 identical. Dynamically allocate buffers. Move variable
10670 declarations at the beginning of function.
10672 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
10674 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
10677 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
10679 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
10680 when backspace is pressed at beginning of line.
10682 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
10684 * DISTLIST: Added genfslist.sh.
10686 * normal/main.c (fs_module_list): New variable.
10687 (autoload_fs_module): New function.
10688 (read_fs_list): Likewise.
10689 (grub_normal_execute): Call read_fs_list.
10691 * kern/fs.c (grub_fs_autoload_hook): New variable.
10692 (grub_fs_probe): Added support for auto-loading.
10694 * include/grub/normal.h (struct grub_fs_module_list): New struct.
10695 (grub_fs_module_list_t): New type.
10697 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
10698 (grub_fs_autoload_hook): New prototype.
10700 * genfslist.sh: New file.
10702 * genmk.rb: Added a rule to generate a filesystem list.
10704 2005-06-30 Marco Gerards <metgerards@student.han.nl>
10706 * configure.ac: Fix the test for cross-compiling.
10708 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
10709 define GRUB_UTIL anymore.
10711 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
10712 so this function works on other systems than just big endian.
10713 (load_modules): Likewise.
10714 (add_segments): Likewise.
10716 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
10718 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
10719 contains `l' modifier, get a long from va_arg().
10721 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
10723 * kern/mm.c (grub_free): If the next free block which is being
10724 merged is the first free block, set the first block to the block
10726 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
10728 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10730 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
10731 `grub_ieee1275_chosen'.
10733 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10735 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
10736 (grub_ieee1275_chosen): New variable.
10737 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
10739 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
10740 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10741 Rename first argument to `phandle' for consistency.
10742 (grub_ieee1275_get_property_length): Likewise.
10743 (grub_ieee1275_next_property): Likewise. Change type of first argument
10744 to grub_ieee1275_phandle_t.
10745 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
10746 Move export next to declaration.
10747 (grub_ieee1275_chosen): New variable.
10748 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
10749 Correct cosmetic typo.
10750 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
10751 `grub_ieee1275_chosen'.
10752 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
10753 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
10754 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
10755 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
10756 `grub_ieee1275_chosen'.
10758 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
10760 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
10762 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
10763 /chosen/bootargs as "variable=value" pairs.
10765 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
10767 * include/grub/misc.h (grub_dprintf): New macro.
10768 (grub_real_dprintf): New prototype.
10769 (grub_strword): Likewise.
10770 (grub_iswordseparator): Likewise.
10771 * kern/misc.c (grub_real_dprintf): New function.
10772 (grub_strword): Likewise.
10773 (grub_iswordseparator): Likewise.
10775 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
10777 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
10778 (roundup): Remove macro.
10779 (grub_ieee1275_flags): Make static.
10780 (grub_ieee1275_realmode): Remove.
10781 (grub_ieee1275_test_flag): New function.
10782 (grub_ieee1275_set_flag): Likewise.
10783 (find_options): Rename to `grub_ieee1275_find_options'; update
10784 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
10785 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
10786 (cmain): New prototype.
10787 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
10788 `grub_ieee1275_flags' directly.
10789 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
10790 machine/biosdisk.h.
10791 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
10792 Don't include grub/machine/init.h.
10793 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
10794 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10796 (grub_ieee1275_realmode): Likewise.
10797 (grub_ieee1275_flag): New enum.
10798 (grub_ieee1275_test_flag): New prototype.
10799 (grub_ieee1275_set_flag): New prototype.
10800 * include/grub/powerpc/ieee1275/init.h: Remove file.
10801 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
10802 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
10803 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
10804 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
10806 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
10807 `grub_ieee1275_test_flag'.
10808 (grub_ieee1275_encode_devname): Likewise.
10810 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
10812 * include/grub/powerpc/ieee1275/ieee1275.h
10813 (grub_ieee1275_encode_devname): New prototype.
10814 (grub_ieee1275_get_filename): Likewise.
10815 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
10817 (grub_set_prefix): Likewise.
10818 (grub_machine_init): Call grub_set_prefix.
10819 * kern/powerpc/ieee1275/openfw.c: Fix typos.
10820 (grub_parse_type): New enum.
10821 (grub_ieee1275_get_devargs): New function.
10822 (grub_ieee1275_get_devname): Likewise.
10823 (grub_ieee1275_parse_args): Likewise.
10824 (grub_ieee1275_get_filename): Likewise.
10825 (grub_ieee1275_encode_devname): Likewise.
10827 2005-03-30 Marco Gerards <metgerards@student.han.nl>
10829 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
10830 `grub_loader_unset'.
10832 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
10834 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
10835 instead of grub_ieee1275_interpret.
10836 (grub_halt_init): New function.
10837 (grub_halt_fini): Likewise.
10838 (GRUB_MOD_INIT): Correct message grammar.
10839 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
10840 instead of grub_ieee1275_interpret.
10841 (grub_reboot_init): New function.
10842 (grub_reboot_fini): Likewise.
10843 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
10844 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
10845 util/i386/pc/misc.c with commands/ieee1275/halt.c,
10846 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
10847 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
10849 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
10851 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
10853 (grub_halt): Likewise.
10854 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
10855 (cmain): Remove __attribute__((unused)).
10856 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
10857 (grub_heap_len): Likewise.
10858 (grub_machine_fini): New function.
10859 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
10860 (grub_halt): Likewise.
10861 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
10863 * util/powerpc/ieee1275/misc.c: New file.
10865 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10867 * DISTLIST: New file.
10868 * gendistlist.sh: Likewise.
10870 * Makefile.in (COMMON_DISTFILES): Removed.
10871 (BOOT_DISTFILES): Likewise.
10872 (CONF_DISTFILES): Likewise.
10873 (DISK_DISTFILES): Likewise.
10874 (FS_DISTFILES): Likewise.
10875 (INCLUDE_DISTFILES): Likewise.
10876 (KERN_DISTFILES): Likewise.
10877 (LOADER_DISTFILES): Likewise.
10878 (TERM_DISTFILES): Likewise.
10879 (UTIL_DISTFILES): Likewise.
10880 (DISTFILES): Likewise.
10881 (uninstall): Uninstall files in $(pkgdata_DATA).
10882 (DISTLIST): New target.
10883 (distdir): Use the contents of the file DISTLIST to get a list of
10886 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10888 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
10889 descriptor. This is ported from GRUB Legacy.
10891 * gencmdlist.sh: Added an extra semicolon to make it work with
10892 old sed versions. Reported by Robert Bihlmeyer
10893 <robbe@orcus.priv.at>.
10895 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
10897 Automatic loading of commands is supported.
10899 * normal/main.c (read_command_list): New function.
10900 (grub_normal_execute): Call read_command_list.
10902 * normal/command.c (grub_register_command): Return zero or CMD.
10903 Allocate CMD->NAME from the heap.
10904 Initialize CMD->MODULE_NAME to zero.
10905 Find the same name as well. If the same command is found and it is
10906 a dummy command, overwrite members. If it is not a dummy command,
10908 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
10909 (grub_command_find): If a dummy command is found, load a module
10910 and retry to find a command only once.
10912 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
10913 make sure that each command is loaded.
10915 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
10917 (struct grub_command): Remove const from the member `name'.
10918 Add a new member `module_name'.
10919 (grub_register_command): Return grub_command_t.
10921 * commands/help.c (grub_cmd_help): Call grub_command_find to make
10922 sure that each command is loaded.
10924 * genmk.rb (PModule::rule): Specify a module name without the
10925 suffix ".mod" to gencmdlist.sh.
10927 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10929 * gencmdlist.sh: New file.
10931 * genmk.rb (PModule::rule): Generate a rule for a command list.
10933 Generate command.lst from $(COMMANDFILES).
10935 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
10936 (DATA): Added $(pkgdata_DATA).
10937 (install-local): Install files in $(pkgdata_DATA).
10939 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10941 * term/i386/pc/vga.c (debug_command): Removed.
10942 (GRUB_MOD_INIT): Do not register the command "debug".
10944 From Hollis Blanchard:
10945 * commands/configfile.c: New file.
10946 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10947 commands/configfile.c.
10948 (pkgdata_MODULES): Added configfile.mod.
10949 (configfile_mod_SOURCES): New variable.
10950 (configfile_mod_CFLAGS): Likewise.
10951 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10952 commands/configfile.c.
10953 (pkgdata_MODULES): Added configfile.mod.
10954 (configfile_mod_SOURCES): New variable.
10955 (configfile_mod_CFLAGS): Likewise.
10956 * util/grub-emu.c (main): Call grub_configfile_init and
10957 grub_configfile_fini.
10958 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
10960 [GRUB_UTIL] (grub_configfile_fini): Likewise.
10962 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
10964 * normal/arg.c (grub_arg_show_help): Do not show the bug report
10967 * commands/help.c (grub_cmd_help): Do not print newlines after
10968 the last command in print_command_help.
10970 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
10972 * commands/default.h: New file.
10973 * commands/timeout.h: Likewise.
10974 * normal/context.c: Likewise.
10976 * util/misc.c: Do not include sys/times.h.
10977 Include sys/time.h and grub/machine/time.h.
10978 (grub_get_rtc): Rewritten with gettimeofday.
10980 * util/grub-emu.c (main): Call grub_default_init and
10981 grub_timeout_init before grub_normal_init, and call
10982 grub_timeout_fini and grub_default_fini after grub_main.
10984 * util/console.c (grub_ncurses_checkkey): Return the read
10987 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
10990 * normal/main.c (read_config_file): Push MENU. If this fails,
10991 print an error and wait for a user input.
10992 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
10993 If a menu is empty or an error occurs, pop MENU.
10994 (grub_normal_execute): Pop and free MENU after grub_menu_run
10997 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
10999 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
11001 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11003 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
11005 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
11008 * include/grub/normal.h (struct grub_menu_list): New struct.
11009 (grub_menu_list_t): New type.
11010 (struct grub_context): New struct.
11011 (grub_context_t): New type.
11012 (grub_register_command): Got rid of EXPORT_FUNC.
11013 (grub_unregister_command): Likewise.
11014 (grub_context_get): New prototype.
11015 (grub_context_get_current_menu): Likewise.
11016 (grub_context_push_menu): Likewise.
11017 (grub_context_pop_menu): Likewise.
11018 [GRUB_UTIL] (grub_default_init): Likewise.
11019 [GRUB_UTIL] (grub_default_fini): Likewise.
11020 [GRUB_UTIL] (grub_timeout_init): Likewise.
11021 [GRUB_UTIL] (grub_timeout_fini): Likewise.
11023 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
11024 commands/timeout.c and normal/context.c.
11025 (pkgdata_MODULES): Added default.mod and timeout.mod.
11026 (normal_mod_SOURCES): Added normal/context.c.
11027 (default_mod_SOURCES): New variable.
11028 (default_mod_CFLAGS): Likewise.
11029 (timeout_mod_SOURCES): Likewise.
11030 (timeout_mod_CFLAGS): Likewise.
11031 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
11033 (pkgdata_MODULES): Added default.mod and timeout.mod.
11034 (normal_mod_SOURCES): Added normal/context.c.
11035 (default_mod_SOURCES): New variable.
11036 (default_mod_CFLAGS): Likewise.
11037 (timeout_mod_SOURCES): Likewise.
11038 (timeout_mod_CFLAGS): Likewise.
11040 * Makefile.in (all-local): Added $(MKFILES).
11042 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
11044 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
11045 (grub_emu_SOURCES): Likewise.
11046 (pkgdata_MODULES): Add `sun.mod'.
11047 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11048 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11050 (pkgdata_MODULES): Add `sun.mod'.
11051 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11052 * include/grub/partition.h (grub_sun_partition_map_init): New
11054 (grub_sun_partition_map_fini): Likewise.
11055 * partmap/sun.c: New file.
11056 * util/grub-emu.c (main): Initialize and de-initialize the sun
11057 partitionmap support.
11059 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
11061 This implements an Emacs-like menu entry editor.
11063 * normal/menu_entry.c: New file.
11065 * util/console.c (grub_ncurses_putchar): Translate some Unicode
11066 characters to ASCII.
11067 (saved_char): New variable.
11068 (grub_ncurses_checkkey): Rewritten completely.
11069 (grub_ncurses_getkey): Likewise.
11070 (grub_ncurses_init): Call raw instead of cbreak.
11072 * normal/menu.c (print_entry): Do not put a space.
11073 (init_page): Renamed to ...
11074 (grub_menu_init_page): ... this. All callers changed.
11075 (edit_menu_entry): Removed.
11076 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11078 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11080 * kern/misc.c (grub_vprintf): Call grub_refresh.
11082 * normal/menu.c (DISP_LEFT): Renamed to ...
11083 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11084 * normal/menu.c (DISP_UP): Renamed to ...
11085 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11086 * normal/menu.c (DISP_RIGHT): Renamed to ...
11087 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11088 * normal/menu.c (DISP_DOWN): Renamed to ...
11089 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11090 * normal/menu.c (DISP_HLINE): Renamed to ...
11091 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11092 * normal/menu.c (DISP_VLINE): Renamed to ...
11093 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11094 * normal/menu.c (DISP_UL): Renamed to ...
11095 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11096 * normal/menu.c (DISP_UR): Renamed to ...
11097 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11098 * normal/menu.c (DISP_LL): Renamed to ...
11099 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11100 * normal/menu.c (DISP_LR): Renamed to ...
11101 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11102 * normal/menu.c (TERM_WIDTH): Renamed to ...
11103 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11104 * normal/menu.c (TERM_HEIGHT): Renamed to ...
11105 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11106 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11107 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11108 * normal/menu.c (TERM_MARGIN): Renamed to ...
11109 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11110 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11111 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11112 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11113 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11114 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11115 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11116 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11117 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11118 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11119 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11120 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11121 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11122 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11123 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11124 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11125 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11126 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11127 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11128 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11129 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11130 All callers changed.
11132 * include/grub/normal.h: New prototype.
11134 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11135 normal/menu_entry.c.
11136 (normal_mod_SOURCES): Likewise.
11137 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11138 (normal_mod_SOURCES): Likewise.
11140 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
11142 * include/grub/normal.h (grub_halt_init): New prototype.
11143 (grub_halt_fini): Likewise.
11144 (grub_reboot_init): Likewise.
11145 (grub_reboot_fini): Likewise.
11147 * util/grub-emu.c: Include signal.h.
11148 (main_env): New global variable.
11149 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11151 (grub_machine_fini): New function.
11152 (main): Call grub_halt_init and grub_reboot_init before
11153 grub_main, and grub_reboot_fini and grub_halt_fini after it.
11154 Call setjmp with MAIN_ENV to go back afterwards.
11155 Call grub_machine_fini right before return.
11157 * include/grub/util/misc.h: Include setjmp.h.
11158 (main_env): New prototype.
11160 * include/grub/kernel.h (grub_machine_fini): New prototype.
11161 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11162 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11164 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11165 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11166 * term/i386/pc/console.c (grub_console_fini): Likewise.
11168 * util/i386/pc/misc.c: New file.
11170 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11171 util/i386/pc/misc.c, commands/i386/pc/halt.c and
11172 commands/i386/pc/reboot.c.
11174 2005-02-14 Guillem Jover <guillem@hadrons.org>
11176 * include/grub/dl.h (grub_dl_check_header): New prototype.
11177 (grub_arch_dl_check_header): Change return type to grub_err_t,
11178 remove size parameter and export function. Update all callers.
11179 * kern/dl.c (grub_dl_check_header): New function.
11180 (grub_dl_load_core): Use `grub_dl_check_header' instead of
11181 `grub_arch_dl_check_header'. Check ELF type. Check if sections
11182 are inside the core.
11183 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11184 independent ELF header checks.
11185 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11186 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11187 `grub_dl_check_header' instead of explicit checks. Check for the
11189 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11190 `grub_dl_check_header' instead of explicit checks. Remove arch
11191 specific ELF header checks.
11193 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11196 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
11198 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11199 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11201 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
11203 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
11204 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
11205 (part_map_iterate): Clear `grub_errno' and return 0 if
11206 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
11207 * partmap/amiga.c (amiga_partition_map_iterate): Return
11208 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11209 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11211 2005-02-01 Guillem Jover <guillem@hadrons.org>
11213 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11216 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11218 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11220 (grub_rescue_cmd_linux): New prototype.
11221 (grub_rescue_cmd_initrd): Likewise.
11222 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11224 (grub_linux_release_mem): Release the memory for the initrd.
11225 (grub_load_linux): Renamed from this...
11226 (grub_rescue_cmd_linux): ...To this. Changed all callers.
11227 Changed `entry' not to be static. Loop over memory regions to
11228 find another one when the default fails.
11229 (grub_rescue_cmd_initrd): New function.
11230 (grub_linux_init): Remove function.
11231 (grub_linux_fini): Likewise.
11232 (GRUB_MOD_INIT): Register `initrd'.
11233 (GRUB_MOD_FINI): Unregister `initrd'.
11234 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
11236 (grub_linux_normal_fini): Likewise.
11237 (GRUB_MOD_INIT): Register `initrd'.
11238 (GRUB_MOD_FINI): Unregister `initrd'.
11240 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11242 * commands/help.c: New file.
11243 * normal/arg.c (show_help): Renamed to...
11244 (grub_arg_show_help): ... this.
11245 * commands/i386/pc/halt.c: New file.
11246 * commands/i386/pc/reboot.c: Likewise.
11247 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
11248 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
11249 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
11250 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
11252 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11254 (pkgdata_MODULES): Add `help.mod'.
11255 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
11256 * grub/i386/pc/init.h (grub_reboot): New prototype.
11257 (grub_halt): Likewise.
11258 * include/grub/normal.h (grub_arg_show_help): New prototype.
11259 (grub_help_init): Likewise.
11260 (grub_help_fini): Likewise.
11261 * util/grub-emu.c (main): Initialize and deinitialize the help
11264 * normal/cmdline.c (grub_cmdline_get): Doc fix.
11266 * normal/command.c (grub_command_init): Fixed the description of
11267 the `set' and `unset' commands.
11269 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11271 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
11273 * commands/ieee1275/halt.c: New file.
11274 * commands/ieee1275/reboot.c: Likewise.
11275 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
11276 `__attribute__ ((unused))'. Some GCS related fixed.
11277 (grub_suspend_init) [GRUB_UTIL]: Function removed.
11278 (grub_suspend_fini): Likewise.
11279 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
11281 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
11282 (halt_mod_CFLAGS): New variables.
11283 * include/grub/powerpc/ieee1275/ieee1275.h
11284 (grub_ieee1275_interpret): New prototype.
11286 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
11288 * include/grub/misc.h (memmove): New prototype.
11289 (memcpy): Likewise.
11291 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
11293 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
11294 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
11296 2005-01-22 Marco Gerards <metgerards@student.han.nl>
11298 * kern/misc.c (grub_strndup): Function rewritten.
11300 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
11302 * normal/menu.c (TERM_WIDTH): Macro redefined.
11303 (TERM_TOP_BORDER_Y): Likewise.
11304 (draw_border): Replaced while-loop by a for-loop. Make the number
11305 of lines consistent with the number of lines displayed in
11306 print_entries. Added a margin below the rectangle.
11307 (print_entry): Make the entry fit in the rectangle.
11308 (print_entries): Display the scroll arrows next to the right
11311 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11313 * fs/minix.c (grub_minix_find_file): Reserve more space for
11314 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
11315 `grub_strncpy' to copy `path' into it.
11317 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11319 Add the loopback device, a device via which files can be accessed
11322 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
11323 (pkgdata_MODULES): Add loopback.mod.
11324 (loopback_mod_SOURCES): New variable.
11325 (loopback_mod_CFLAGS): Likewise.
11326 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11328 (pkgdata_MODULES): Add loopback.mod.
11329 (loopback_mod_SOURCES): New variable.
11330 (loopback_mod_CFLAGS): Likewise.
11331 * disk/loopback.c: new file.
11332 * include/grub/normal.h (grub_loop_init): New prototype.
11333 (grub_loop_fini): New prototype.
11334 * util/grub-emu.c (main): Initialize and de-initialize loopback
11336 * include/grub/disk.h (grub_disk_dev_id): Add
11337 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
11339 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
11341 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
11343 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
11344 (suspend_mod_SOURCES): New variable.
11345 (suspend_mod_CFLAGS): Likewise.
11346 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
11348 * commands/ieee1275/suspend.c: New file.
11350 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11352 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
11353 ((unused))' to `__attribute__ ((used))'.
11354 (GRUB_MOD_FINI): Likewise.
11355 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11356 * genmk.rb (PModule): Assign space to common symbols when linking
11359 2005-01-20 Marco Gerards <metgerards@student.han.nl>
11361 * include/grub/mm.h (grub_mm_init_region): Change the type of the
11362 `unsigned' arguments to `grub_size_t'.
11363 (grub_malloc): Likewise.
11364 (grub_realloc): Likewise.
11365 (grub_memalign): Likewise.
11366 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11367 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11368 * util/misc.c (grub_malloc): Likewise.
11369 (grub_realloc): Likewise.
11370 * kern/mm.c (get_header_from_pointer): Change the casts to
11371 `unsigned' into a cast to `grub_size_t'.
11373 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11374 point to `currnode' when `currnode' is changed.
11376 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
11377 Schottelius <nico-linux@schottelius.org>.
11379 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
11381 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11382 (note_path): Remove variable.
11383 (GRUB_IEEE1275_NOTE_NAME): New macro.
11384 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11385 (grub_ieee1275_note_hdr): New structure.
11386 (grub_ieee1275_note_desc): Likewise.
11387 (grub_ieee1275_note): Likewise.
11388 (load_note): Remove `dir' argument. All callers updated. Remove
11389 `note_img' and `path'. Do not load a file from `note_path'.
11390 Initialize a struct grub_ieee1275_note and write that to `out'.
11391 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11393 2005-01-05 Marco Gerards <metgerards@student.han.nl>
11395 * util/misc.c (grub_util_read_image): Revert last change. It
11396 called `grub_util_read_at', which seeks from the beginning of the
11399 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
11401 * TODO: Add note about endianness in grub-mkimage.
11402 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11404 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11405 (grub_mkimage_SOURCES): New target.
11406 * include/grub/kernel.h (grub_start_addr): Remove variable.
11407 (grub_end_addr): Likewise.
11408 (grub_total_module_size): Likewise.
11409 (grub_kernel_image_size): Likewise.
11410 (GRUB_MODULE_MAGIC): New constant.
11411 (grub_module_info): New structure.
11412 (grub_arch_modules_addr): New prototype.
11413 (grub_get_end_addr): Remove prototype.
11414 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11415 * include/grub/powerpc/ieee1275/kernel.h: New file.
11416 * include/grub/util/misc.h (grub_util_get_fp_size): New
11418 (grub_util_read_at): Likewise.
11419 (grub_util_write_image_at): Likewise.
11420 * kern/main.c (grub_get_end_addr): Remove function.
11421 (grub_load_modules): Call grub_arch_modules_addr instead of using
11422 grub_end_addr. Look for a grub_module_info struct in memory. Use
11423 the grub_module_info fields instead of calling grub_get_end_addr
11424 as loop conditions. Move grub_add_unused_region code here.
11425 (grub_add_unused_region): Remove function.
11426 * kern/i386/pc/init.c: Include grub/cache.h.
11427 (grub_machine_init): Remove call to grub_get_end_addr. Remove
11428 one call to add_mem_region.
11429 (grub_arch_modules_addr): New function.
11430 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11431 (grub_total_module_size): Likewise.
11432 Include grub/machine/kernel.h.
11433 (grub_arch_modules_addr): New function.
11434 * util/grub-emu.c (grub_end_addr): Remove variable.
11435 (grub_total_module_size): Likewise.
11436 (grub_arch_modules_addr): New function.
11437 * util/misc.c: Include unistd.h.
11438 (grub_util_get_fp_size): New function.
11439 (grub_util_read_at): Likewise.
11440 (grub_util_write_image_at): Likewise.
11441 (grub_util_read_image): Call grub_util_read_at.
11442 (grub_util_write_image): Call grub_util_write_image_at.
11443 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11444 additional memory in kernel_img for a struct grub_module_info.
11445 Fill in that grub_module_info.
11446 * util/powerpc/ieee1275/grub-mkimage.c: New file.
11448 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11450 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11452 * include/grub/powerpc/ieee1275/ieee1275.h
11453 (grub_ieee1275_milliseconds): New prototype.
11454 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11456 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11457 grub_ieee1275_milliseconds.
11459 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11461 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11463 (find_options): New function.
11464 (cmain): Call find_options.
11465 * include/grub/powerpc/ieee1275/ieee1275.h
11466 (grub_ieee1275_realmode): New extern variable.
11467 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11468 grub_map if grub_ieee1275_realmode is false.
11470 2004-12-29 Marco Gerards <metgerards@student.han.nl>
11472 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11473 lines are inserted and make it work like readline. Reported by
11474 Vincent Pelletier <subdino2004@yahoo.fr>.
11476 2004-12-28 Marco Gerards <metgerards@student.han.nl>
11478 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11480 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11481 `kern/powerpc/cache.S'.
11483 2004-12-27 Marco Gerards <metgerards@student.han.nl>
11485 * genmk.rb: Handle the `Program' class in the main loop. Written
11486 by Johan Rydberg <jrydberg@gnu.org>.
11487 (Program): New class.
11488 (programs): New variable.
11489 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11490 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
11491 instead of "grub/kernel.h". Include <grub/machine/init.h>.
11492 (help_arch): Function removed.
11493 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11494 `powerpc/libgcc.h' and `loader.h'.
11495 (pkgdata_PROGRAMS): New variable.
11496 (sbin_UTILITIES): Variable removed.
11497 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11498 (grubof_SOURCES): Variable re-defined so it only includes the
11499 core functionality.
11500 (grubof_CFLAGS): Remove `-DGRUBOF'.
11501 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11502 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11503 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11504 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11505 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11506 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11507 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11508 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11509 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11510 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11511 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11512 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11513 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11514 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11515 (pc_mod_CFLAGS): New variables.
11516 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11517 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11518 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11519 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11521 * include/grub/i386/pc/init.h (grub_os_area_addr)
11522 (rub_os_area_size): ... to here.
11523 * include/grub/powerpc/ieee1275/ieee1275.h
11524 (grub_ieee1275_entry_fn): Export symbol.
11525 * include/grub/powerpc/ieee1275/init.h: New file.
11526 * include/grub/powerpc/libgcc.h: Likewise.
11527 * include/grub/cache.h: Likewise.
11528 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
11529 <hollis@penguinppc.org>.
11530 * kern/dl.c: Include <grub/cache.h>.
11531 (grub_dl_flush_cache): New function.
11532 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11534 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11535 (grub_console_init): Removed prototypes.
11536 (grub_machine_init): Don't initialize the modules anymore.
11537 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11539 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11540 Macro undef removed.
11541 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11542 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11543 relocation `R_PPC_REL32'. Return an error when the relocation is
11545 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11546 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11547 * util/misc.c (grub_arch_sync_caches): Likewise.
11549 2004-12-19 Marco Gerards <metgerards@student.han.nl>
11551 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
11552 `symlist.c', add `grubof_symlist.c'.
11553 (symlist.c): Variable removed.
11554 (grubof_HEADERS): Variable added.
11555 (grubof_symlist.c): New target.
11556 (kernel_syms.lst): Use `grubof_HEADERS' instead of
11557 `kernel_img_HEADERS'.
11558 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
11559 * kern/powerpc/dl.c: New file.
11560 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
11562 (grub_arch_dl_relocate_symbols): Likewise.
11563 (grub_register_exported_symbols): Likewise.
11565 2004-12-13 Marco Gerards <metgerards@student.han.nl>
11567 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
11568 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
11569 to fail instead. Reported by Vincent Pelletier
11570 <subdino2004@yahoo.fr>.
11572 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
11573 it is not allocated. Reported by Vincent Pelletier
11574 <subdino2004@yahoo.fr>.
11576 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
11577 output so the output looks better.
11579 2004-12-04 Marco Gerards <metgerards@student.han.nl>
11581 Modulize the partition map support and add support for the amiga
11584 * commands/ls.c: Include <grub/partition.h> instead of
11585 <grub/machine/partition.h>.
11586 * kern/disk.c: Likewise.
11587 * kern/rescue.c: Likewise.
11588 * loader/i386/pc/chainloader.c: Likewise.
11589 * normal/cmdline.c: Likewise.
11590 * kern/powerpc/ieee1275/init.c: Likewise.
11591 (grub_machine_init): Call `grub_pc_partition_map_init',
11592 `grub_amiga_partition_map_init' and
11593 `grub_apple_partition_map_init'.
11594 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
11595 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
11596 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
11597 `partition.h' and `pc_partition.h'.
11598 (grub_setup_SOURCES): Remove
11599 `disk/i386/pc/partition.c'. Add `kern/partition.c',
11600 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11601 (grub_emu_SOURCES): Likewise.
11602 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
11603 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
11604 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
11605 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11606 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
11607 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11608 (grubof_SOURCES): Likewise.
11609 * disk/i386/pc/partition.c: File removed.
11610 * disk/powerpc/ieee1275/partition.c: Likewise.
11611 * include/grub/powerpc/ieee1275/partition.h: Likewise.
11612 * include/grub/i386/pc/partition.h: Likewise.
11613 * kern/partition.c: New file.
11614 * partmap/amiga.c: Likewise.
11615 * partmap/apple.c: Likewise.
11616 * partmap/pc.c: Likewise.
11617 * include/grub/partition.h: Likewise..
11618 * include/grub/pc_partition.h: Likewise.
11619 * util/grub-emu.c: Include <grub/partition.h> instead of
11620 <grub/machine/partition.h>.
11621 (main): Call `grub_pc_partition_map_init',
11622 `grub_amiga_partition_map_init' and
11623 `grub_apple_partition_map_init' and deinitialize afterwards.
11624 * util/i386/pc/biosdisk.c: Include `#include
11625 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11626 `<grub/machine/partition.h>'.
11627 * util/i386/pc/grub-setup.c: Likewise.
11628 * util/i386/pc/biosdisk.c: Likewise.
11629 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
11630 partition information in case of a PC partition.
11631 * util/i386/pc/grub-setup.c: Include `#include
11632 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11633 `<grub/machine/partition.h>'.
11634 (setup): Only access the PC specific partition information in case
11637 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
11639 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
11640 (grub_longjmp): Likewise.
11641 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
11643 * normal/powerpc/setjmp.S: New file.
11644 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11645 `normal/powerpc/setjmp.S'.
11646 (grubof_CFLAGS): Add `-DGRUBOF'.
11647 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
11648 [GRUB_UTIL && !GRUBOF].
11650 2004-11-16 Marco Gerards <metgerards@student.han.nl>
11652 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
11653 property named `name'. Correctly handle the error returned by
11654 `grub_ieee1275_finddevice' if a device can not be opened.
11656 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
11658 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
11659 `actual' for negativity.
11660 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11663 2004-11-01 Marco Gerards <metgerards@student.han.nl>
11665 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
11666 (PAGE_OFFSET): New macro.
11667 (CRTC_ADDR_PORT): Likewise.
11668 (CRTC_DATA_PORT): Likewise.
11669 (START_ADDR_HIGH_REGISTER): Likewise.
11670 (START_ADDR_LOW_REGISTER): Likewise.
11671 (GRAPHICS_ADDR_PORT): Likewise.
11672 (GRAPHICS_DATA_PORT): Likewise.
11673 (READ_MAP_REGISTER): Likewise.
11674 (INPUT_STATUS1_REGISTER): Likewise.
11675 (INPUT_STATUS1_VERTR_BIT): Likewise.
11676 (page): New variable.
11677 (wait_vretrace): New function.
11678 (set_read_map): Likewise.
11679 (set_start_address): Likewise.
11680 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
11682 (check_vga_mem): Take the page into account.
11683 (write_char): Likewise.
11684 (write_cursor): Likewise.
11685 (scroll_up): Likewise. Copy the page to the page that is not
11686 shown and switch between both pages.
11687 (grub_vga_putchar): Fix off by one error.
11688 (grub_vga_cls): Wait for the vertical retrace. Take the page into
11691 2004-11-01 Marco Gerards <metgerards@student.han.nl>
11693 Add support for iso9660 (including rockridge).
11695 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11696 (iso9660_mod_SOURCES): New variable.
11697 (iso9660_mod_CFLAGS): Likewise.
11698 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11699 * include/grub/fs.h (grub_iso9660_init): New prototype.
11700 * util/grub-emu.c (main): Call `grub_iso9660_init'.
11701 * fs/iso9660.c: New file.
11703 * include/grub/misc.h (grub_strncat): New prototype.
11704 * kern/misc.c (grub_strncat): New function.
11706 * fs/hfs.c (grub_hfs_mount): Translate the error
11707 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
11708 * fs/jfs.c (grub_jfs_mount): Likewise.
11709 * fs/ufs.c (grub_ufs_mount): Likewise.
11711 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
11713 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
11714 which initialized BAT registers.
11715 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
11716 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11718 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
11719 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11721 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
11722 (grub_mapclaim): Likewise.
11723 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
11724 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
11727 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
11729 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
11730 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
11731 -ffreestanding and -msoft-float.
11733 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
11735 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
11736 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
11737 set in grub_ieee1275_flags.
11739 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
11741 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
11743 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
11744 grub_console_init first.
11745 Change the memory range used for grub_ieee1275_claim and
11746 grub_mm_init_region.
11747 Print an error message if the claim fails.
11748 Include <grub/misc.h>.
11750 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
11752 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
11753 Call grub_children_iterate for device nodes of type `scsi',
11755 (grub_ofdisk_open): Remove manual device alias resolution.
11756 Fix memory leak when device cannot be opened.
11757 * include/grub/powerpc/ieee1275/ieee1275.h
11758 (grub_children_iterate): New prototype.
11759 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
11761 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11762 Return -1 if args.size was -1.
11764 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11766 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
11767 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
11768 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
11769 Open Firmware's memory for it; claim memory from _start to _end.
11770 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
11771 (_end): New extern.
11772 (_start): Zero BSS from __bss_start to _end.
11773 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11775 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
11777 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11779 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
11780 -1 if args.base was -1.
11782 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
11784 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
11785 escape sequence instead of a literal ^L. Also call
11786 grub_ofconsole_gotoxy.
11788 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
11790 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
11791 void * arguments to grub_addr_t. All callers updated. Also make
11792 the `result' argument optional.
11793 (grub_ieee1275_release): change void * arguments to grub_addr_t.
11794 All callers updated.
11796 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
11798 * commands/ls.c (grub_ls_list_files): Use the string following the
11799 initial ')', if present, as the filesystem path.
11800 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
11802 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
11804 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
11806 Make the source code of the menu interface more readable.
11808 * normal/menu.c: Include grub/mm.h.
11809 (TERM_WIDTH): New macro.
11810 (TERM_HEIGHT): Likewise.
11811 (TERM_INFO_HEIGHT): Likewise.
11812 (TERM_MARGIN): Likewise.
11813 (TERM_SCROLL_WIDTH): Likewise.
11814 (TERM_TOP_BORDER_Y): Likewise.
11815 (TERM_LEFT_BORDER_X): Likewise.
11816 (TERM_BORDER_WIDTH): Likewise.
11817 (TERM_MESSAGE_HEIGHT): Likewise.
11818 (TERM_BORDER_HEIGHT): Likewise.
11819 (TERM_NUM_ENTRIES): Likewise.
11820 (TERM_FIRST_ENTRY_Y): Likewise.
11821 (TERM_ENTRY_WIDTH): Likewise.
11822 (TERM_CURSOR_X): Likewise.
11823 (draw_border): Use macros instead of magic numbers.
11824 (print_entry): Likewise.
11825 (print_entries): Likewise.
11826 (run_menu): Likewise. Also, handle the key 'e'.
11827 (run_menu_entry): Ignore empty command lines.
11828 (print_message): Added a new argument EDIT. If EDIT is true,
11829 print a different message.
11830 (init_page): Likewise.
11831 (edit_menu_entry): New function. Not implemented yet.
11833 2004-09-17 Marco Gerards <metgerards@student.han.nl>
11835 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
11836 can be loaded from normal mode.
11838 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
11840 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
11841 (multiboot_mod_CFLAGS): New variables.
11842 * loader/i386/pc/linux_normal.c: New file.
11843 * loader/i386/pc/multiboot_normal.c: Likewise.
11845 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
11846 attribute `unused'.
11848 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
11849 `fdiro' to read the mode information from instead of `diro'.
11851 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
11852 looking up a symlink.
11854 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
11856 * normal/command.c (grub_command_execute): Don't parse the
11857 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
11858 flags of the command.
11860 * normal/menu.c (grub_menu_run): Fix typo.
11862 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
11864 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
11866 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
11867 `y + 1' instead of `y - 1'.
11869 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
11871 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
11873 From Hollis Blanchard <hollis@penguinppc.org>:
11874 * kern/misc.c (memmove): New alias for grub_memmove.
11875 (memcmp): New alias for grub_memcmp.
11876 (memset): New alias for grub_memset.
11877 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11878 Change "int handle" to "grub_ieee1275_phandle_t handle".
11879 * include/grub/powerpc/ieee1275/ieee1275.h
11880 (grub_ieee1275_get_property): Likewise.
11882 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
11884 Added normal mode command `chainloader' as module chain.mod, which
11885 depends on normal.mod and _chain.mod.
11887 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
11888 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
11889 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
11891 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
11892 but arguments parsing moved to ...
11893 (grub_chainloader_cmd): ... here. New function.
11894 * include/grub/i386/pc/chainloader.h: New file.
11895 * loader/i386/pc/chainloader_normal.c: Likewise.
11897 2004-09-11 Marco Gerards <metgerards@student.han.nl>
11899 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
11900 (grub_mkimage_LDFLAGS): Likewise.
11901 (grub_emu_SOURCES): Likewise.
11902 (kernel_img_HEADERS): Added fshelp.h.
11903 * fs/ext2.c: Include <grub/fshelp.h>.
11904 (FILETYPE_REG): New macro.
11905 (FILETYPE_INO_REG): Likewise.
11906 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
11908 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
11910 (grub_fshelp_node): New struct.
11911 (grub_ext2_data): Added member `diropen'. Changed member `inode'
11913 (grub_ext2_get_file_block): Removed function.
11914 (grub_ext2_read_block): New function.
11915 (grub_ext2_read_file): Replaced parameter `data' by `node'.
11916 This function was written.
11917 (grub_ext2_mount): Read the root inode. Create a diropen struct.
11918 (grub_ext2_find_file): Removed function.
11919 (grub_ext2_read_symlink): New function.
11920 (grub_ext2_iterate_dir): Likewise.
11921 (grub_ext2_open): Rewritten.
11922 (grub_ext2_dir): Rewritten.
11923 * include/grub/fshelp.h: New file.
11924 * fs/fshelp.c: Likewise.
11926 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
11928 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
11929 (print_message): Add a missing newline.
11930 (run_menu): Added timeout support.
11931 (run_menu_entry): New local function.
11932 (grub_menu_run): Added support for booting.
11934 * kern/loader.c (grub_loader_is_loaded): New function.
11936 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
11937 (grub_get_rtc): Exported.
11939 * include/grub/i386/pc/time.h: Include grub/symbol.h.
11940 (grub_get_rtc): Exported.
11942 * include/grub/normal.h (struct grub_command_list): Remove
11943 constant from the member `command'.
11945 * include/grub/loader.h (grub_loader_is_loaded): Declared.
11947 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
11949 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
11951 2004-08-28 Marco Gerards <metgerards@student.han.nl>
11953 Add support for the JFS filesystem.
11955 * fs/jfs.c: New file.
11956 * include/grub/fs.h (grub_jfs_init): New prototype.
11957 (grub_jfs_fini): New prototype.
11958 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
11959 (grub_emu_SOURCES): Likewise.
11960 (pkgdata_MODULES): Add jfs.mod.
11961 (jfs_mod_SOURCES): New variable.
11962 (jfs_mod_CFLAGS): Likewise.
11963 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
11964 (grubof_SOURCES): Likewise.
11965 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
11967 * fs/fat.c (grub_fat_find_dir): Convert the filename little
11968 endian to the host endian.
11969 (grub_fat_utf16_to_utf8): Move function from there...
11970 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
11971 the endianness of the source string anymore.
11972 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
11974 2004-08-24 Marco Gerards <metgerards@student.han.nl>
11976 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
11977 (grub_boot_fini) [GRUB_UTIL]: Likewise.
11978 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
11979 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
11981 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
11982 (grub_hfs_iterate_dir): Make the function static. Add prototypes
11983 for `node_found' and `it_dir'.
11984 (grub_hfs_dir): Add prototype for `dir_hook'.
11986 * fs/minix.c (grub_minix_get_file_block): Add prototype for
11987 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
11988 and `indir32' to silence a gcc warning.
11990 * include/grub/fs.h (grub_hfs_init): New prototype.
11991 (grub_hfs_fini): Likewise.
11994 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
11996 Each disk device has its own id now. This is useful to make use
11997 of multiple disk devices.
11999 * include/grub/disk.h (grub_disk_dev_id): New enum.
12000 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
12001 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
12003 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
12004 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12006 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
12007 GRUB_DISK_DEVICE_OFDISK_ID as an id.
12009 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
12010 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
12012 * include/grub/disk.h (struct grub_disk_dev): Added a new member
12013 "id" which is used by the cache manager.
12015 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
12018 2004-08-18 Marco Gerards <metgerards@student.han.nl>
12020 * fs/hfs.c: New file.
12021 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
12022 (grub_emu_SOURCES): Likewise.
12023 (pkgdata_MODULES): Add hfs.mod.
12024 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
12025 (grubof_SOURCES): Likewise.
12026 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
12028 * include/grub/misc.h (grub_strncasecmp): Add prototype.
12029 * kern/misc.c (grub_strncasecmp): Add function.
12031 2004-08-14 Marco Gerards <metgerards@student.han.nl>
12033 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
12036 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
12037 (grub_ext2_dir): In case the directory entry type is unknown, read
12040 2004-08-02 Peter Bruin <pjbruin@dds.nl>
12042 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
12043 grub_load_linux instead of grub_rescue_cmd_linux as second
12044 argument of grub_rescue_register_command.
12046 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12048 2004-07-27 Marco Gerards <metgerards@student.han.nl>
12050 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12052 * commands/boot.c: Remove the check for `GRUB_UTIL'.
12053 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12054 `loader/powerpc/ieee1275/linux.c',
12055 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12056 * include/grub/powerpc/ieee1275/ieee1275.h
12057 (grub_ieee1275_release): New prototype.
12058 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12059 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12060 normal, boot, linux and linux_normal.
12061 * loader/powerpc/ieee1275/linux.c: New file.
12062 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12064 2004-07-12 Marco Gerards <metgerards@student.han.nl>
12066 * normal/arg.c (grub_arg_parse): Correct error handling after
12067 reallocating the argumentlist (check if `argl' is not null instead
12068 of checking if `args' is not null).
12069 * kern/mm.c (grub_realloc): Return the same pointer when using the
12070 same region, instead of returning the header address.
12072 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12074 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12075 one block instead of two when looking for the initial partition.
12076 (grub_partition_probe): Initialize the local variable `p' with 0.
12077 Use base 10 for the grub_strtoul call.
12078 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
12079 need for one local variable.
12080 (grub_strtoul): Don't add the new value to `num', instead of that
12083 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12085 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12086 (pxeboot_img_SOURCES): New variable.
12087 (pxeboot_img_ASFLAGS): Likewise.
12088 (pxeboot_img_LDFLAGS): Likewise.
12089 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
12090 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
12091 <lode_leroy@hotmail.com>.
12093 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12095 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12096 there was no input.
12098 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12100 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
12101 the history buffer logic.
12103 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12105 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12106 (FILETYPE_INO_SYMLINK): New macros.
12107 (grub_ext2_find_file): Check if the node is a directory using the
12108 inode stat information instead of using the filetype in the
12109 dirent. Exclude the first character of an absolute symlink.
12110 (grub_ext2_dir): Mask out the filetype part of the mode member of
12113 2004-05-24 Marco Gerards <metgerards@student.han.nl>
12115 Add support for UFS version 1 and 2. Add support for the minix
12116 filesystem version 1 and 2, both the variants with 14 and 30 long
12119 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12121 (grub_emu_SOURCES): Likewise.
12122 (pkgdata_MODULES): Add ufs.mod and minix.mod.
12123 (ufs_mod_SOURCES): New variable.
12124 (ufs_mod_CFLAGS): Likewise.
12125 (minix_mod_SOURCES): Likewise.
12126 (minix_mod_CFLAGS): Likewise.
12127 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12129 (grubof_SOURCES): Likewise.
12130 * fs/ufs.c: New file.
12131 * fs/minix.c: New file.
12132 * include/grub/fs.h (grub_ufs_init): New prototype.
12133 (grub_ufs_fini): Likewise.
12134 (grub_minix_init): Likewise.
12135 (grub_minix_fini): Likewise.
12136 * util/grub-emu.c (main): Initialize and deinitialize UFS and
12139 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
12141 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12142 commands/ls.c, commands/terminal.c, commands/boot.c,
12143 commands/cmp.c and commands/cat.c.
12144 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12146 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12149 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12151 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12152 and grub_, respectively. Because the conversion is trivial and
12153 mechanical, I omit the details here. Please refer to the CVS
12154 if you need more information.
12156 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12158 * include/pupa: Renamed to ...
12159 * include/grub: ... this.
12160 * util/i386/pc/pupa-mkimage.c: Renamed to ...
12161 * util/i386/pc/grub-mkimage.c: ... this.
12162 * util/i386/pc/pupa-setup.c: Renamed to ...
12163 * util/i386/pc/grub-setup.c: ... this.
12164 * util/pupa-emu.c: Renamed to ...
12165 * util/grub-emu.c: ... this.
12167 2004-03-29 Marco Gerards <metgerards@student.han.nl>
12169 Add support for the newworld apple macintosh (PPC). This has been
12170 tested on the powerbook 2000 only. It only adds support for
12171 generic ieee1275 functions, console and disk support. This should
12172 be easy to port to other architectures with support for Open
12175 * configure.ac: Accept the powerpc as host_cpu. In the case of
12176 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
12177 specific tests are only executed while building for the i386.
12178 Inverse test for crosscompile.
12179 * genmk.rb (Utility): Allow assembler files.
12180 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12181 * conf/powerpc-ieee1275.rmk: New file.
12182 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12183 * disk/powerpc/ieee1275/partition.c: Likewise.
12184 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12185 * include/pupa/powerpc/ieee1275/console.h: Likewise.
12186 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12187 * include/pupa/powerpc/ieee1275/time.h: Likewise.
12188 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12189 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12190 * include/pupa/powerpc/ieee1275/loader.h
12191 * include/pupa/powerpc/setjmp.h: Likewise.
12192 * include/pupa/powerpc/types.h: Likewise.
12193 * kern/powerpc/ieee1275/init.c: Likewise.
12194 * kern/powerpc/ieee1275/openfw.c: Likewise.
12195 * term/powerpc/ieee1275/ofconsole.c: Likewise.
12197 These files were written by Johan Rydberg
12198 (jrydberg@night.trouble.net) and I only modified them slightly.
12200 * boot/powerpc/ieee1275/cmain.c: New file.
12201 * boot/powerpc/ieee1275/crt0.S: Likewise.
12202 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12203 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12205 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
12207 * Makefile.in: Update copyright.
12208 * genmodsrc.sh: Likewise.
12209 * gensymlist.sh: Likewise.
12210 * term/i386/pc/vga.c: Indent correctly.
12212 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12213 bugreporting address.
12214 * util/i386/pc/pupa-setup.c (usage): Likewise,
12215 (main): Call pupa_ext2_init and pupa_ext2_fini.
12217 * fs/fat.c (log2): Renamed to ...
12218 (fat_log2): ... this.
12219 All callers changed.
12220 * kern/misc.c (memcpy): Alias to pupa_memmove.
12221 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12223 * util/console.c (pupa_ncurses_fini): Return 0.
12225 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12226 Move fail label here.
12227 [__GNU__]: Don't warn when using stat.
12228 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
12229 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
12230 long int. Use strtol instead of strtoul.
12232 2004-03-14 Marco Gerards <metgerards@student.han.nl>
12234 * commands/boot.c: New file.
12235 * commands/cat.c: Likewise.
12236 * commands/cmp.c: Likewise.
12237 * commands/ls.c: Likewise.
12238 * commands/terminal.c: Likewise.
12239 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
12240 (pupa_register_command): Changed interface to match the new
12242 (pupa_command_execute): Changed (almost rewritten) so it uses
12243 pupa_split_command. Added support for setting variables using the
12245 (rescue_command): Changed to work with the new argument parser.
12246 (terminal_command): Moved from here to commands/terminal.c.
12247 (set_command): New function.
12248 (unset_command): New function.
12249 (insmod_command): New function.
12250 (rmmod_command): New function.
12251 (lsmod_command): New function.
12252 (pupa_command_init): Don't initialize the command terminal
12253 anymore. Initialize the commands set, unset, insmod, rmmod and
12255 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
12256 (kernel_img_HEADERS): Add arg.h and env.h.
12257 (pupa_mkimage_LDFLAGS): Add kern/env.c.
12258 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
12259 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
12261 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
12263 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
12264 (boot_mod_SOURCES): New variable.
12265 (terminal_mod_SOURCES): Likewise.
12266 (ls_mod_SOURCES): Likewise.
12267 (cmp_mod_SOURCES): Likewise.
12268 (cat_mod_SOURCES): Likewise.
12270 * normal/arg.c: New file.
12271 * kern/env.c: Likewise.
12272 * include/pupa/arg.h: Likewise.
12273 * include/pupa/env.h: Likewise.
12274 * font/manager.c (font_command): Changed to match argument parsing
12276 (PUPA_MOD_INIT): Likewise.
12277 * hello/hello.c (pupa_cmd_hello): Likewise.
12278 (PUPA_MOD_INIT): Likewise.
12279 * include/pupa/disk.h: Include <pupa/device.h>.
12280 (pupa_print_partinfo): New prototype.
12281 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
12282 (pupa_dl_get_prefix): Likewise.
12283 * include/pupa/misc.h: Include <pupa/err.h>.
12284 (pupa_isgraph): New prototype.
12285 (pupa_isdigit): Likewise.
12286 (pupa_split_cmdline): Likewise.
12287 * include/pupa/normal.h: Include <pupa/arg.h>.
12288 (pupa_command): Changed the prototype of the member `func' to
12289 match the argument parsing interface. Added member `options'.
12290 (pupa_register_command): Updated to match function.
12291 (pupa_arg_parse): New prototype.
12292 (pupa_hello_init) [PUPA_UTIL]: New prototype.
12293 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
12294 (pupa_ls_init) [PUPA_UTIL]: Likewise.
12295 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
12296 (pupa_cat_init) [PUPA_UTIL]: Likewise.
12297 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
12298 (pupa_boot_init) [PUPA_UTIL]: Likewise.
12299 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
12300 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
12301 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
12302 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
12303 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
12304 * kern/disk.c: Include <pupa/file.h>.
12305 (pupa_print_partinfo): New function.
12306 * kern/dl.c: Include <pupa/env.h>.
12307 (pupa_dl_dir): Variable removed.
12308 (pupa_dl_load): Use the environment variable `prefix' instead of
12309 the variable pupa_dl_dir.
12310 (pupa_dl_set_prefix): Function removed.
12311 (pupa_dl_get_prefix): Likewise.
12312 * kern/i386/pc/init.c: Include <pupa/env.h>.
12313 (pupa_machine_init): Use the environment variable `prefix' instead of
12314 using pupa_dl_set_prefix to set the prefix.
12315 * kern/main.c: Include <pupa/env.h>.
12316 (pupa_set_root_dev): Use the environment variable `prefix' instead of
12317 using pupa_dl_get_prefix to get the prefix.
12318 * kern/misc.c: Include <pupa/env.h>.
12319 (pupa_isdigit): New function.
12320 (pupa_isgraph): Likewise.
12321 (pupa_ftoa): Likewise.
12322 (pupa_vsprintf): Added support for printing values of the type
12323 `double'. Make it possible to format variable output when using
12324 formatting like `%1.2%f'.
12325 (pupa_split_cmdline): New function.
12326 * kern/rescue.c: Include <pupa/env.h>.
12327 (next_word): Removed function.
12328 (pupa_rescue_cmd_prefix): Likewise.
12329 (pupa_rescue_cmd_set): New function.
12330 (pupa_rescue_cmd_unset): New function.
12331 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
12332 split the command line instead of splitting it here. Added
12333 support for setting variables using the syntax `foo=bar'. Don't
12334 initialize the prefix command anymore. Initialized the set and
12336 * normal/cmdline.c: Include <pupa/env.h>.
12337 (pupa_tab_complete): Added prototypes for print_simple_completion,
12338 print_partition_completion, add_completion, iterate_commands,
12339 iterate_dev, iterate_part and iterate_dir. Moved code to print
12340 partition information from here to kern/disk.c.
12341 (pupa_cmdline_run): Don't check if the function exists anymore.
12342 * normal/main.c: Include <pupa/env.h>.
12343 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
12344 instead of using pupa_dl_get_prefix to get the prefix.
12345 * term/i386/pc/vga.c: Include <pupa/arg.h>.
12346 (check_vga_mem): Cast pointers to `void *' to silence a gcc
12348 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
12349 (pupa_vga_setcolor): Declare unused variables with `__attribute__
12350 ((unused))' to silence a gcc warning.
12351 (pupa_vga_setcolor): Likewise.
12352 (debug_command): Changed to match argument parsing
12354 * util/pupa-emu.c: Include <pupa/env.h>.
12355 (options): Added 0's for unused fields to silence a gcc warning.
12357 (main): Use the environment variable `prefix' instead of using
12358 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
12359 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
12362 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12363 * util/misc.c: Include <malloc.h>.
12364 (pupa_malloc): Rewritten so errors are correctly reported.
12365 (pupa_realloc): Likewise.
12366 (pupa_memalign): Likewise.
12367 (pupa_mm_init_region): Declare unused variables with
12368 `__attribute__ ((unused))' to silence a gcc warning.
12369 * normal/i386/setjmp.S: Remove tab at the end of the file to
12370 silence a gcc warning.
12371 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12372 variables with `__attribute__ ((unused))' to silence a gcc
12374 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12375 local variable i unsigned to silence a gcc warning.
12377 * kern/term.c: Include <pupa/misc.h>.
12378 (pupa_more_lines): New variable.
12379 (pupa_more): Likewise.
12380 (pupa_putcode): When the pager is active pause at the end of every
12382 (pupa_set_more): New function.
12383 * include/pupa/term.h (pupa_set_more): New prototype.
12386 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
12388 Now this project is GRUB 2 rather than PUPA. The location of
12389 the CVS repository was moved to GRUB's.
12391 * configure.ac: Use bug-grub as the reporting address.
12392 Use GRUB instead of PUPA.
12393 Change the version number to 1.90.
12395 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
12397 * genkernsyms.sh: Updated copyright information.
12398 * genmk.rb: Likewise.
12399 * genmodsrc.sh: Likewise.
12400 * gensymlist.sh: Likewise.
12401 * boot/i386/pc/boot.S: Likewise.
12402 * boot/i386/pc/diskboot.S: Likewise.
12403 * disk/i386/pc/biosdisk.c: Likewise.
12404 * disk/i386/pc/partition.c: Likewise.
12405 * font/manager.c: Likewise.
12406 * fs/ext2.c: Likewise.
12407 * fs/fat.c: Likewise.
12408 * include/pupa/boot.h: Likewise.
12409 * include/pupa/device.h: Likewise.
12410 * include/pupa/disk.h: Likewise.
12411 * include/pupa/dl.h: Likewise.
12412 * include/pupa/elf.h: Likewise.
12413 * include/pupa/err.h: Likewise.
12414 * include/pupa/file.h: Likewise.
12415 * include/pupa/font.h: Likewise.
12416 * include/pupa/fs.h: Likewise.
12417 * include/pupa/kernel.h: Likewise.
12418 * include/pupa/loader.h: Likewise.
12419 * include/pupa/misc.h: Likewise.
12420 * include/pupa/mm.h: Likewise.
12421 * include/pupa/net.h: Likewise.
12422 * include/pupa/normal.h: Likewise.
12423 * include/pupa/rescue.h: Likewise.
12424 * include/pupa/setjmp.h: Likewise.
12425 * include/pupa/symbol.h: Likewise.
12426 * include/pupa/term.h: Likewise.
12427 * include/pupa/types.h: Likewise.
12428 * include/pupa/i386/setjmp.h: Likewise.
12429 * include/pupa/i386/types.h: Likewise.
12430 * include/pupa/i386/pc/biosdisk.h: Likewise.
12431 * include/pupa/i386/pc/boot.h: Likewise.
12432 * include/pupa/i386/pc/console.h: Likewise.
12433 * include/pupa/i386/pc/init.h: Likewise.
12434 * include/pupa/i386/pc/kernel.h: Likewise.
12435 * include/pupa/i386/pc/linux.h: Likewise.
12436 * include/pupa/i386/pc/loader.h: Likewise.
12437 * include/pupa/i386/pc/memory.h: Likewise.
12438 * include/pupa/i386/pc/multiboot.h: Likewise.
12439 * include/pupa/i386/pc/partition.h: Likewise.
12440 * include/pupa/i386/pc/time.h: Likewise.
12441 * include/pupa/i386/pc/vga.h: Likewise.
12442 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12443 * include/pupa/util/getroot.h: Likewise.
12444 * include/pupa/util/misc.h: Likewise.
12445 * include/pupa/util/resolve.h: Likewise.
12446 * kern/device.c: Likewise.
12447 * kern/disk.c: Likewise.
12448 * kern/dl.c: Likewise.
12449 * kern/err.c: Likewise.
12450 * kern/file.c: Likewise.
12451 * kern/fs.c: Likewise.
12452 * kern/loader.c: Likewise.
12453 * kern/main.c: Likewise.
12454 * kern/misc.c: Likewise.
12455 * kern/mm.c: Likewise.
12456 * kern/rescue.c: Likewise.
12457 * kern/term.c: Likewise.
12458 * kern/i386/dl.c: Likewise.
12459 * kern/i386/pc/init.c: Likewise.
12460 * kern/i386/pc/lzo1x.S: Likewise.
12461 * kern/i386/pc/startup.S: Likewise.
12462 * loader/i386/pc/chainloader.c: Likewise.
12463 * loader/i386/pc/linux.c: Likewise.
12464 * loader/i386/pc/multiboot.c: Likewise.
12465 * normal/cmdline.c: Likewise.
12466 * normal/command.c: Likewise.
12467 * normal/main.c: Likewise.
12468 * normal/menu.c: Likewise.
12469 * normal/i386/setjmp.S: Likewise.
12470 * term/i386/pc/console.c: Likewise.
12471 * term/i386/pc/vga.c: Likewise.
12472 * util/console.c: Likewise.
12473 * util/genmoddep.c: Likewise.
12474 * util/misc.c: Likewise.
12475 * util/pupa-emu.c: Likewise.
12476 * util/resolve.c: Likewise.
12477 * util/unifont2pff.rb: Likewise.
12478 * util/i386/pc/biosdisk.c: Likewise.
12479 * util/i386/pc/getroot.c: Likewise.
12480 * util/i386/pc/pupa-mkimage.c: Likewise.
12481 * util/i386/pc/pupa-setup.c: Likewise.
12483 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
12485 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12486 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
12487 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
12488 reading and reset it after reading.
12489 (pupa_ext2_close): Return PUPA_ERR_NONE.
12491 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12493 (struct linux_kernel_header): Add kernel_version and
12495 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12496 pupa_file_read succeeds.
12497 (pupa_rescue_cmd_initrd): Implement.
12499 2003-12-03 Marco Gerards <metgerards@student.han.nl>
12501 * fs/ext2.c (pupa_ext2_label): New function.
12502 (pupa_ext2_fs): Added label.
12503 * fs/fat.c (pupa_fat_label): New function.
12504 (pupa_fat_fs): Added label.
12505 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12507 * kern/misc.c (pupa_strndup): New function.
12508 * include/pupa/misc.h (pupa_strndup): New prototype.
12510 * include/pupa/normal.h: Include <pupa/err.h>.
12511 (pupa_set_history): New prototype.
12512 (pupa_iterate_commands): New prototype.
12513 * normal/cmdline.c: Include <pupa/machine/partition.h>,
12514 <pupa/disk.h>, <pupa/file.h>.
12515 (hist_size): New variable.
12516 (hist_lines): Likewise.
12517 (hist_end): Likewise.
12518 (hist_used): Likewise.
12519 (pupa_set_history): New function.
12520 (pupa_history_get): Likewise.
12521 (pupa_history_add): Likewise.
12522 (pupa_history_replace): Likewise.
12523 (pupa_tab_complete): Likewise.
12524 (pupa_cmdline_run): Added tab completion and history buffer. Tab
12525 completion shows partitionnames while completing partitions, this
12526 feature was suggested by Jeff Bailey.
12527 * normal/command.c (pupa_iterate_commands): New function.
12528 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12529 (pupa_normal_init): Initialize history buffer.
12530 (PUPA_MOD_INIT): Likewise.
12531 (pupa_normal_fini): Free the history buffer.
12532 (PUPA_MOD_FINI): Likewise.
12534 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12537 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12538 * configure.ac [i386]: Check for regparam bug.
12539 (NESTED_FUNC_ATTR) [! i386]: Defined.
12541 2003-11-17 Marco Gerards <metgerards@student.han.nl>
12543 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12544 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12545 (pupa_emu_SOURCES): New variable.
12546 (pupa_emu_LDFLAGS): Likewise.
12547 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12548 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12549 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12550 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12551 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
12552 (pupa_jmp_buf): New typedef.
12553 (pupa_setjmp) [PUPA_UTIL]: New macro.
12554 (pupa_longjmp) [PUPA_UTIL]: Likewise.
12555 * include/pupa/term.h (struct pupa_term): New member `refresh'.
12556 (pupa_refresh): New prototype.
12557 * include/pupa/util/getroot.h: New file.
12558 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
12560 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
12561 (pupa_rescue_cmd_cat): Likewise.
12562 (pupa_rescue_cmd_ls): Likewise.
12563 (pupa_rescue_cmd_testload): Likewise.
12564 (pupa_rescue_cmd_lsmod): Likewise.
12565 * normal/cmdline.c (pupa_cmdline_get): Likewise.
12566 * normal/menu.c (run_menu): Likewise.
12567 * kern/term.c (pupa_cls): Likewise.
12568 (pupa_refresh): New function.
12569 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
12570 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12571 * util/console.c: New file.
12573 * util/i386/pc/getroot.c: New file.
12574 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
12575 (pupa_putchar): New function.
12576 (pupa_refresh): Likewise.
12577 (xgetcwd): Function moved to ...
12578 (strip_extra_slashes): Likewise.
12579 (get_prefix): Likewise.
12580 * util/i386/pc/getroot.c: ... here.
12581 (find_root_device): Function moved and renamed to...
12582 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
12583 Changed all callers.
12584 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
12586 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
12587 Changed all callers.
12588 * util/misc.c (pupa_memalign): New function.
12589 (pupa_mm_init_region): Likewise.
12590 (pupa_register_exported_symbols): Likewise.
12591 (pupa_putchar): Function removed.
12592 * util/pupa-emu.c: New file.
12594 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
12596 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
12597 (_multiboot_mod_SOURCES): New variable.
12598 (_multiboot_mod_CFLAGS): Likewise.
12599 * loader/i386/pc/multiboot.c: New file.
12600 * include/pupa/i386/pc/multiboot.h: Likewise.
12601 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
12602 (pupa_multiboot_real_boot): New function.
12603 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
12604 (pupa_multiboot_real_boot): New prototype.
12605 (pupa_rescue_cmd_multiboot): Likewise
12606 (pupa_rescue_cmd_module): Likewise.
12608 * kern/loader.c (pupa_loader_set): Continue when
12609 pupa_loader_unload_func() fails.
12610 (pupa_loader_unset): New function.
12611 * include/pupa/loader.h (pupa_loader_unset): New prototype.
12613 * kern/misc.c (pupa_stpcpy): New function.
12614 * include/pupa/misc.h (pupa_stpcpy): New prototype.
12616 2003-11-12 Marco Gerards <metgerards@student.han.nl>
12618 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
12619 for available extensions.
12621 * include/pupa/i386/pc/time.h: New file.
12622 * kern/disk.c: Include <pupa/machine/time.h>.
12623 (PUPA_CACHE_TIMEOUT): New macro.
12624 (pupa_last_time): New variable.
12625 (pupa_disk_open): Flush the cache when there was a timeout.
12626 (pupa_disk_close): Reset the timer.
12627 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
12629 * util/misc.c: Include <sys/times.h>
12630 (pupa_get_rtc): New function.
12632 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
12634 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
12636 (pupa_ext2_get_file_block): Use blocks member.
12638 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
12639 first block. Return -1 instead of pupa_errno on error.
12641 2003-10-27 Marco Gerards <metgerards@student.han.nl>
12643 * README: In the pupa-mkimage example use _chain instead of chain
12644 and ext2 instead of fat.
12645 * TODO: Replace ext2fs with jfs as an example. Add an item for
12646 adding journal playback for ext2fs.
12647 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
12648 (pkgdata_MODULES): Added ext2.mod.
12649 (ext2_mod_SOURCES): New variable.
12650 (ext2_mod_CFLAGS): Likewise.
12651 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
12652 * include/pupa/misc.h (pupa_strncpy): New prototype.
12653 (pupa_strcat): Likewise.
12654 (pupa_strncmp): Likewise.
12655 * kern/misc.c (pupa_strcat): Enable function.
12656 (pupa_strncpy): New function.
12657 (pupa_strncmp): Likewise.
12658 * fs/ext2.c: New file.
12660 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
12661 when the read failed before retrying.
12662 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
12663 (_FILE_OFFSET_BITS): Likewise.
12664 * configure.ac: Added AC_SYS_LARGEFILE.
12666 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
12668 * genmk.rb (PModule#rule): Make sure to get only symbol names
12669 from the output of nm.
12670 Reported by Robert Millan <zeratul2@wanadoo.es>.
12672 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
12674 I forgot to check in these changes for a long time. This adds
12675 incomplete support for VGA console, and this is still very
12676 buggy. Also, a lot of consideration is required for I18N,
12677 UNICODE, and VGA font issues. Therefore, assume that this is
12678 such that "better than nothing".
12680 * font/manager.c: New file.
12681 * include/pupa/font.h: Likewise.
12682 * include/pupa/i386/pc/vga.h: Likewise.
12683 * term/i386/pc/vga.c: Likewise.
12684 * util/unifont2pff.rb: Likewise.
12686 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
12687 (pkgdata_MODULES): Added vga.mod and font.mod.
12688 (vga_mod_SOURCES): New variables.
12689 (vga_mod_CFLAGS): Likewise.
12690 (font_mod_SOURCES): Likewise.
12691 (font_mod_CFLAGS): Likewise.
12693 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
12695 * include/pupa/term.h: Include pupa/err.h.
12696 (struct pupa_term): Added init and fini.
12697 Changed the argument of putchar to pupa_uint32_t.
12699 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
12700 (pupa_console_real_putchar): New prototype.
12701 (pupa_console_putchar): Removed.
12702 (pupa_console_checkkey): Exported.
12703 (pupa_console_getkey): Likewise.
12705 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
12708 * kern/term.c (pupa_term_set_current): Rewritten.
12709 (pupa_putchar): Likewise.
12710 (pupa_putcode): New function.
12712 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
12713 (pupa_console_real_putchar): ... this.
12714 (pupa_vga_set_mode): New function.
12715 (pupa_vga_get_font): Likewise.
12717 * normal/command.c: Include pupa/term.h.
12718 (terminal_command): New function.
12719 (pupa_command_init): Register the command "terminal".
12721 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
12722 (DISP_UP): Likewise.
12723 (DISP_RIGHT): Likewise.
12724 (DISP_DOWN): Likewise.
12725 (DISP_HLINE): Likewise.
12726 (DISP_VLINE): Likewise.
12727 (DISP_UL): Likewise.
12728 (DISP_UR): Likewise.
12729 (DISP_LL): Likewise.
12730 (DISP_LR): Likewise.
12732 * term/i386/pc/console.c (pupa_console_putchar): New function.
12734 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
12736 * util/resolve.c (pupa_util_resolve_dependencies): BUG
12737 FIX. Reverse the path_list.
12739 * include/pupa/normal.h: Export pupa_register_command and
12740 pupa_unregister_command.
12742 * hello/hello.c (pupa_cmd_hello): New module.
12743 * conf/i386-pc.rmk: Added hello.mod.
12745 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
12747 * kern/i386/pc/lzo1x.S: New file.
12749 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
12750 (compress_kernel): New variable.
12751 (generate_image): Heavily modified to support compressing a
12752 large part of the core image.
12754 * util/misc.c (pupa_util_read_image): Fix a file descriptor
12756 (pupa_util_load_image): New function.
12758 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
12759 (pupa_compressed_size): New variable.
12760 (codestart): Enable Gate A20 here.
12761 Decompress the compressed part of the core image.
12762 Rearrange the code to put functions and variables which are
12763 required for initialization in the non-compressed part.
12766 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
12769 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
12771 * include/pupa/i386/pc/kernel.h
12772 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
12773 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
12774 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12775 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12776 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
12778 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
12780 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
12781 (Utility#rule): Likewise.
12783 * configure.ac: Check if LZO is available.
12785 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
12787 * include/pupa/normal.h: New file.
12788 * include/pupa/setjmp.h: Likewise.
12789 * include/pupa/i386/setjmp.h: Likewise.
12790 * normal/cmdline.c: Likewise.
12791 * normal/command.c: Likewise.
12792 * normal/main.c: Likewise.
12793 * normal/menu.c: Likewise.
12794 * normal/i386/setjmp.S: Likewise.
12796 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
12797 (pupa_rescue_cmd_initrd): Likewise.
12799 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
12802 * kern/i386/pc/startup.S (translation_table): New variable.
12803 (translate_keycode): New function.
12804 (pupa_console_getkey): Call translate_keycode.
12806 * kern/rescue.c (attempt_normal_mode): New function.
12807 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
12808 it failed, print a message.
12810 * kern/mm.c (pupa_real_malloc): Print more information when a
12811 free magic is broken.
12812 (pupa_free): If the first free header is not free actually, set
12815 * kern/main.c (pupa_load_normal_mode): Just load the module
12817 (pupa_main): Don't print the message
12818 "Entering into rescue mode..." here.
12820 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
12822 (pupa_rescue_cmd_initrd): Likewise.
12823 (pupa_rescue_cmd_initrd): Likewise.
12825 * include/pupa/symbol.h (FUNCTION): Specify the type.
12826 (VARIABLE): Likewise.
12828 * include/pupa/err.h (pupa_err_t): Added
12829 PUPA_ERR_UNKNOWN_COMMAND.
12831 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
12832 (pupa_dl_get_prefix): Likewise.
12834 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
12835 Added _chain.mod and _linux.mod instead of chain.mod and
12837 (chain_mod_SOURCES): Renamed to ...
12838 (_chain_mod_SOURCES): ... this.
12839 (chain_mod_CFLAGS): Renamed to ...
12840 (_chain_mod_CFLAGS): ... this.
12841 (linux_mod_SOURCES): Renamed to ...
12842 (_linux_mod_SOURCES): ... this.
12843 (linux_mod_CFLAGS): Renamed to ...
12844 (_linux_mod_CFLAGS): ... this.
12845 (normal_mod_SOURCES): New variable.
12846 (normal_mod_CFLAGS): Likewise.
12847 (normal_mod_ASFLAGS): Likewise.
12849 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
12851 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
12854 * kern/dl.c (pupa_dl_ref): Refer depending modules
12856 (pupa_dl_unref): Unrefer depending modules recursively.
12857 Don't call pupa_dl_unload implicitly, because PUPA can crash if
12858 a module is unloaded before one depending on that module is
12860 (pupa_dl_unload): Unload depending modules explicitly,
12863 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
12865 * include/pupa/i386/pc/linux.h: New file.
12866 * loader/i386/pc/linux.c: Likewise.
12868 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
12870 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
12871 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
12872 of PUPA_CHAINLOADER_BOOT_SECTOR.
12874 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
12875 (pupa_linux_prot_size): New variable.
12876 (pupa_linux_tmp_addr): Likewise.
12877 (pupa_linux_real_addr): Likewise.
12878 (pupa_linux_boot_zimage): New function.
12879 (pupa_linux_boot_bzimage): Likewise.
12881 * kern/i386/pc/init.c (struct mem_region): New structure.
12882 (MAX_REGIONS): New macro.
12883 (mem_regions): New variable.
12884 (num_regions): Likewise.
12885 (pupa_os_area_addr): Likewise.
12886 (pupa_os_area_size): Likewise.
12887 (pupa_lower_mem): Likewise.
12888 (pupa_upper_mem): Likewise.
12889 (add_mem_region): New function.
12890 (compact_mem_regions): Likewise.
12891 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
12892 the size of the conventional memory and that of so-called upper
12893 memory (before the first memory hole).
12894 Instead of adding each found region to free memory, use
12895 add_mem_region and add them after removing overlaps.
12896 Also, add only 1/4 of the upper memory to free memory. The rest
12897 is used for loading OS images. Maybe this is ad hoc, but this
12898 makes it much easier to relocate OS images when booting.
12900 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
12901 (pupa_enter_rescue_mode): Don't register initrd and module.
12903 * kern/mm.c: Include pupa/dl.h.
12905 * kern/main.c: Include pupa/file.h and pupa/device.h.
12907 * kern/loader.c (pupa_loader_load_module_func): Removed.
12908 (pupa_loader_load_module): Likewise.
12910 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
12913 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
12914 (pupa_linux_tmp_addr): Likewise.
12915 (pupa_linux_real_addr): Likewise.
12916 (pupa_linux_boot_zimage): Likewise.
12917 (pupa_linux_boot_bzimage): Likewise.
12919 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
12920 (pupa_upper_mem): Likewise.
12921 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
12922 module is too dangerous.
12924 * include/pupa/loader.h (pupa_os_area_addr): Declared.
12925 (pupa_os_area_size): Likewise.
12926 (pupa_loader_set): Remove the first argument. Loader doesn't
12927 manage modules or initrd any longer.
12928 (pupa_loader_load_module): Removed.
12930 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
12931 (linux_mod_SOURCES): New variable.
12932 (linux_mod_CFLAGS): Likewise.
12934 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
12936 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
12937 the length of a blocklist correctly.
12939 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
12940 Use ioctl only if the OS file is a block device.
12941 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
12942 not very useful for normal files.
12944 * kern/main.c (pupa_set_root_dev): New function.
12945 (pupa_load_normal_mode): Likewise.
12946 (pupa_main): Call those above.
12948 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
12951 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
12953 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12955 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
12956 (setup): Configure the installed partition information and the
12959 * loader/i386/pc/chainloader.c (my_mod): New variable.
12960 (pupa_chainloader_unload): New function.
12961 (pupa_rescue_cmd_chainloader): Refer itself.
12962 (PUPA_MOD_INIT): Save its own module in MY_MOD.
12964 * kern/i386/pc/startup.S (install_partition): Removed.
12965 (version_string): Likewise.
12966 (config_file): Likewise.
12967 (pupa_install_dos_part): New variable.
12968 (pupa_install_bsd_part): Likewise.
12969 (pupa_prefix): Likewise.
12970 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
12972 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
12974 (make_install_device): New function.
12975 (pupa_machine_init): Set the dl prefix.
12977 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
12978 (buf): Renamed to ...
12979 (linebuf): ... this.
12980 (pupa_rescue_cmd_prefix): New function.
12981 (pupa_rescue_cmd_insmod): Likewise.
12982 (pupa_rescue_cmd_rmmod): Likewise.
12983 (pupa_rescue_cmd_lsmod): Likewise.
12984 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
12987 * kern/mm.c (pupa_memalign): If failed even after invalidating
12988 disk caches, unload unneeded modules and retry.
12990 * kern/misc.c (pupa_memmove): New function.
12991 (pupa_memcpy): Removed.
12992 (pupa_strcpy): New function.
12993 (pupa_itoa): Made static.
12995 * kern/dl.c (pupa_dl_iterate): New function.
12996 (pupa_dl_ref): Likewise.
12997 (pupa_dl_unref): Likewise.
12998 (pupa_dl_unload): Return if succeeded or not.
12999 (pupa_dl_unload_unneeded): New function.
13000 (pupa_dl_unload_all): Likewise.
13001 (pupa_dl_init): Renamed to ...
13002 (pupa_dl_set_prefix): ... this.
13003 (pupa_dl_get_prefix): New function.
13005 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
13006 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
13007 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
13008 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
13009 (pupa_install_dos_part): Declared.
13010 (pupa_install_bsd_part): Likewise.
13011 (pupa_prefix): Likewise.
13012 (pupa_boot_drive): Likewise.
13014 * include/pupa/types.h: Fix a typo.
13016 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
13018 (pupa_memmove): Declared.
13019 (pupa_strcpy): Likewise.
13021 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
13022 pupa_mod_init takes one argument, its own module.
13023 (pupa_dl_unload_unneeded): Declared.
13024 (pupa_dl_unload_all): Likewise.
13025 (pupa_dl_ref): Likewise.
13026 (pupa_dl_unref): Likewise.
13027 (pupa_dl_iterate): Likewise.
13028 (pupa_dl_init): Renamed to ...
13029 (pupa_dl_set_prefix): ... this.
13030 (pupa_dl_get_prefix): Declared.
13032 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
13033 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
13035 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
13036 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
13038 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
13039 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
13041 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13043 * util/i386/pc/pupa-setup.c (setup): Define the internal
13044 function find_first_partition_start at the top level, because GCC
13045 3.0.x cannot compile internal functions in deeper scopes
13047 (find_root_device): Use lstat instead of stat.
13048 Don't follow symbolic links.
13049 Fix the path-constructing code.
13051 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13052 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13053 by a BLKGETSIZE ioctl first, because block devices don't fill
13054 the member st_mode of the structure stat on Linux.
13055 [__linux__] (linux_find_partition): Use a temporary buffer
13056 REAL_DEV for the working space. Copy it to DEV before returning.
13057 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13058 buffer cache consistent.
13059 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13060 strncmp. The previous value was merely wrong.
13061 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13063 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13064 FAT size is 12. The previous value was merely wrong.
13066 * kern/main.c (pupa_main): Don't split the starting message from
13069 * kern/term.c (pupa_putchar): Put CR after LF instead of before
13070 LF, because BIOS goes crazy about character attributes in this
13073 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13075 * include/i386/pc/util/biosdisk.h: New file.
13076 * util/i386/pc/biosdisk.c: Likewise.
13077 * util/i386/pc/pupa-setup.c: Likewise.
13079 * Makefile.in (INCLUDE_DISTFILES): Added
13080 include/pupa/i386/pc/util/biosdisk.h.
13081 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13082 directory util/i386/pc.
13083 (install-local): Added a rule for sbin_UTILITIES.
13084 (uninstall): Likewise.
13086 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13088 * util/misc.c (xrealloc): New function.
13089 (pupa_malloc): Likewise.
13090 (pupa_free): Likewise.
13091 (pupa_realloc): Likewise.
13092 (pupa_stop): Likewise.
13093 (pupa_putchar): Likewise.
13095 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13097 * include/pupa/util/misc.h (xrealloc): Declared.
13099 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13101 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13102 (PUPA_BOOT_MACHINE_BPB_END): ... this.
13104 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13105 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13107 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13108 way should be implemented.
13109 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13111 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13112 the size of NAME for safety.
13113 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13116 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13117 (pupa_setup_SOURCES): Likewise.
13119 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13121 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13123 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13124 bunch of pushl's from pusha, because this destroys the return
13127 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13129 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13130 This means that any missing prototypes could be fatal. Also, you
13131 must take care when writing assembly code. See the comments at
13132 the beginning of startup.S, for more details.
13134 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13135 compilation mechanism.
13136 (pupa_chainloader_real_boot): Likewise.
13137 (pupa_biosdisk_rw_int13_extensions): Likewise.
13138 (pupa_biosdisk_rw_standard): Likewise.
13139 (pupa_biosdisk_check_int13_extensions): Likewise.
13140 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13141 (pupa_biosdisk_get_diskinfo_standard): Likewise.
13142 (pupa_get_memsize): Likewise.
13143 (pupa_get_mmap_entry): Likewise.
13144 (pupa_console_putchar): Likewise.
13145 (pupa_console_setcursor): Likewise.
13146 (pupa_getrtsecs): Use pushl instead of push.
13148 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13149 memory instead of the stack for a mmap entry, because some
13150 BIOSes may ignore the maximum size and overflow.
13152 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13154 * genmk.rb (PModule#rule): Compile automatically generated
13155 sources with module-specific CFLAGS as well as other sources.
13157 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13159 * configure.ac: Check ld.
13160 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13161 respectively, before checking endianness and sizes.
13163 * Makefile.in (LD): New variable.
13165 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13167 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13169 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13171 * Changelog: New file.