1 008-09-28 Felix Zielcke <fzielcke@z-51.de>
3 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
6 2008-09-28 Bean <bean123ch@gmail.com>
8 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
9 Thanks to Christian Franke for finding this bug.
11 2008-09-25 Robert Millan <rmh@aybabtu.com>
13 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
14 instances of grub_util_get_disk_name() (see previous commit).
16 2008-09-25 Robert Millan <rmh@aybabtu.com>
18 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
19 `util/i386/get_disk_name.c'.
20 * conf/i386-efi.rmk: Likewise.
21 * conf/x86_64-efi.rmk: Likewise.
22 * conf/i386-coreboot.rmk: Likewise.
23 * conf/i386-ieee1275.rmk: Likewise.
24 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
25 `util/ieee1275/get_disk_name.c'.
26 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
27 * util/ieee1275/get_disk_name.c: Remove file.
28 * util/i386/get_disk_name.c: Remove file.
29 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
30 "hd%d" for device.map entries, rather than using
31 grub_util_get_disk_name().
33 2008-09-24 Carles Pina i Estany <carles@pina.cat>
35 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
37 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
39 2008-09-24 Carles Pina i Estany <carles@pina.cat>
41 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
43 (GRUB_TERM_PPAGE): Changed to 0x4900.
45 2008-09-24 Robert Millan <rmh@aybabtu.com>
47 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
48 macros (they were i386-pc specific).
49 * include/grub/sparc64/ieee1275/console.h: Likewise.
50 * include/grub/efi/console.h: Likewise.
52 2008-09-22 Bean <bean123ch@gmail.com>
54 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
55 resident and in attribute list.
57 * include/grub/ntfs.h (BMP_LEN): Removed.
59 2008-09-22 Bean <bean123ch@gmail.com>
61 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
62 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
64 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
65 error occurs, as grub_disk_open will call grub_disk_close, which will
68 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
70 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
71 (AC_PREREQ): Bumped to 2.59.
72 (AC_TRY_COMPILE): Replace obsolete macro with ...
73 (AC_COMPILE_IFELSE): ... this.
74 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
75 (AC_LINK_IFELSE): ... this.
77 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
79 * autogen.sh: Add a call to `gendistlist.sh'.
81 2008-09-19 Christian Franke <franke@computer.org>
83 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
84 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
85 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
86 Export __enable_execute_stack() to modules.
87 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
90 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
92 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
95 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
97 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
98 #include <grub/util/hostdisk.h>.
100 2008-09-08 Robert Millan <rmh@aybabtu.com>
102 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
103 segments when their filesz is zero (grub_file_read() interprets
104 zero-size as "read until EOF", which results in memory corruption).
105 Use `lowest_segment' rather than 0 for calculating the current
106 segment load address.
108 2008-09-08 Robert Millan <rmh@aybabtu.com>
110 * util/hostdisk.c (open_device): Replace a grub_util_info() call
111 with grub_dprintf("hostdisk", ...), as it was so verbose that it
112 clobbered useful information.
114 2008-09-08 Robert Millan <rmh@aybabtu.com>
116 * include/grub/util/biosdisk.h: Move to ...
117 * include/grub/util/hostdisk.h: ... here. Update all users.
118 * util/biosdisk.c: Move to ...
119 * util/hostdisk.c: ... here. Update all users.
121 2008-09-07 Robert Millan <rmh@aybabtu.com>
123 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
125 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
126 and length can be stored directly in the `mbi->mmap_addr' and
127 `mbi->mmap_length' struct fields.
129 2008-09-07 Robert Millan <rmh@aybabtu.com>
131 * conf/i386.rmk: New file. Provides declaration for building
133 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
134 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
136 Include `conf/i386.mk'.
137 * conf/i386-efi.rmk: Likewise.
138 * conf/x86_64-efi.rmk: Likewise.
139 * conf/i386-coreboot.rmk: Likewise.
140 * conf/i386-ieee1275.rmk: Likewise.
142 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
144 Based on patch created by Colin D Bennett <colin@gibibit.com>.
145 Adds optimization support for BGR based modes.
147 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
148 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
149 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
150 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
151 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
152 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
153 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
154 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
155 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
156 (grub_video_i386_vbeblit_index_index): Likewise.
157 (grub_video_i386_vbeblit_replace_directN): Added.
158 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
159 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
160 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
161 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
162 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
163 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
164 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
165 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
166 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
167 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
168 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
169 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
170 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
172 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
173 (grub_video_i386_vbefill_R8G8B8): Likewise.
174 (grub_video_i386_vbefill_index): Likewise.
175 (grub_video_i386_vbefill_direct32): Added.
176 (grub_video_i386_vbefill_direct24): Likewise.
177 (grub_video_i386_vbefill_direct16): Likewise.
178 (grub_video_i386_vbefill_direct8): Likewise.
180 * include/grub/video.h (grub_video_blit_format): Removed
181 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
182 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
183 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
184 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
185 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
187 * video/video.c (grub_video_get_blit_format): Updated to use new
188 blit formats. Added handling for 16 bit color modes.
190 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
192 (common_blitter): Updated to use new blitters.
194 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
196 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
197 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
198 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
199 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
200 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
201 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
202 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
203 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
204 (grub_video_i386_vbeblit_index_index): Likewise.
205 (grub_video_i386_vbeblit_replace_directN): Added.
206 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
207 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
208 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
209 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
210 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
211 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
212 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
213 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
214 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
215 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
216 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
217 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
218 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
220 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
221 (grub_video_i386_vbefill_R8G8B8): Likewise.
222 (grub_video_i386_vbefill_index): Likewise.
223 (grub_video_i386_vbefill_direct32): Added.
224 (grub_video_i386_vbefill_direct24): Likewise.
225 (grub_video_i386_vbefill_direct16): Likewise.
226 (grub_video_i386_vbefill_direct8): Likewise.
228 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
231 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
234 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
237 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
240 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
242 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
245 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
247 * fs/iso9660.c (grub_iso9660_date): New structure.
248 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
249 (grub_iso9660_uuid): New function.
251 2008-09-05 Bean <bean123ch@gmail.com>
253 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
255 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
256 insensitive bit for names in Win32 and Win32 & DOS namespace.
258 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
260 * include/grub/types.h (LONG_MAX): Likewise.
262 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
264 * util/getroot.c: Include <config.h>.
265 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
266 add support for /dev/md/N devices and handle LVM double dash escaping.
268 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
270 * config.guess: Update to latest version from config git.
271 * config.sub: Likewise.
273 2008-09-03 Robert Millan <rmh@aybabtu.com>
275 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
276 `disk->total_sectors'.
278 2008-09-01 Colin D Bennett <colin@gibibit.com>
280 * include/grub/normal.h: Fixed incorrect comment for
281 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
283 2008-09-01 Colin D Bennett <colin@gibibit.com>
285 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
288 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
289 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
290 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
291 (GRUB_VBE_MODEATTR_COLOR): Likewise.
292 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
293 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
294 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
295 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
296 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
297 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
298 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
299 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
300 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
301 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
302 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
303 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
304 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
305 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
306 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
308 2008-08-31 Robert Millan <rmh@aybabtu.com>
310 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
312 (grub_multiboot): Fix a few warnings.
314 2008-08-31 Robert Millan <rmh@aybabtu.com>
316 * loader/i386/pc/multiboot.c: Update comment not to say that
317 boot_device support is unimplemented.
319 2008-08-31 Robert Millan <rmh@aybabtu.com>
321 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
322 or memory map support are unimplemented.
324 2008-08-31 Colin D Bennett <colin@gibibit.com>
326 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
328 2008-08-31 Colin D Bennett <colin@gibibit.com>
330 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
331 total video memory in 'vbeinfo' output; show color format details for
334 2008-08-30 Pavel Roskin <proski@gnu.org>
336 * util/genmoddep.c: Remove for real this time.
337 * DISTLIST: Remove util/genmoddep.c.
339 2008-08-30 Robert Millan <rmh@aybabtu.com>
341 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
342 as required by Multiboot spec (it was already 4-byte aligned, but
345 2008-08-29 Pavel Roskin <proski@gnu.org>
347 * kern/powerpc/ieee1275/crt0.S: Rename to ...
348 * kern/powerpc/ieee1275/startup.S: ... this.
349 * conf/powerpc-ieee1275.rmk: Adjust for the above.
350 * DISTLIST: Likewise.
352 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
353 grub/cpu/kernel.h. Add start label for consistency with other
354 platforms. Add grub_prefix immediately after start. Add jump
355 to the code after grub_prefix.
356 * include/grub/powerpc/kernel.h: Provide valid values for
357 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
359 2008-08-29 Bean <bean123ch@gmail.com>
361 * configure.ac: Change host_os to cygwin for mingw.
362 (asprintf): New check for function.
364 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
365 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
367 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
368 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
369 sync, sleep and grub_util_get_disk_size for mingw.
371 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
372 to get size in mingw.
373 (open_device): Use flag O_BINARY if it's defined.
374 (find_root_device): Add dummy code for mingw.
376 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
377 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
378 (get_scsi_disk_name): Return 0 for mingw.
380 * util/hostfs.c: #include <grub/util/misc.h>.
381 (grub_hostfs_open): Use "rb" flag to open file, use
382 grub_util_get_disk_size to get disk size for mingw.
384 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
385 (asprintf): New function if HAVE_ASPRINTF is not set.
386 (sync): New function for mingw.
388 (grub_util_get_disk_size): Likewise.
390 2008-08-28 Pavel Roskin <proski@gnu.org>
392 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
395 2008-08-28 Robert Millan <rmh@aybabtu.com>
397 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
399 2008-08-28 Robert Millan <rmh@aybabtu.com>
401 Change find_grub_drive() syntax so it doesn't prevent it from
402 detecting NULL names as errors.
404 * util/biosdisk.c (find_grub_drive): Move free slot search code
406 (find_free_slot): ... to here.
407 (read_device_map): Use find_free_slot() to search for free slots.
409 2008-08-27 Marco Gerards <marco@gnu.org>
411 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
412 (scsi_mod_SOURCES): New variable.
413 (scsi_mod_CFLAGS): Likewise
414 (scsi_mod_LDFLAGS): Likewise.
416 * disk/scsi.c: New file.
418 * include/grub/scsi.h: Likewise.
420 * include/grub/scsicmd.h: Likewise.
422 * disk/ata.c: Include <grub/scsi.h>.
423 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
425 (grub_ata_iterate): Skip ATAPI devices.
426 (grub_ata_open): Only handle ATAPI devices.
427 (struct grub_atapi_read): Removed.
428 (grub_atapi_readsector): Likewise.
429 (grub_ata_read): No longer handle ATAPI devices.
430 (grub_ata_write): Likewise.
431 (grub_atapi_iterate): New function.
432 (grub_atapi_read): Likewise.
433 (grub_atapi_write): Likewise.
434 (grub_atapi_open): Likewise.
435 (grub_atapi_close): Likewise.
436 (grub_atapi_dev): New variable.
437 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
438 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
440 * include/grub/disk.h (enum grub_disk_dev_id): Add
441 `GRUB_DISK_DEVICE_SCSI_ID'.
443 2008-08-26 Robert Millan <rmh@aybabtu.com>
445 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
446 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
449 2008-08-23 Bean <bean123ch@gmail.com>
451 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
452 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
453 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
454 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
456 (raid5rec_mod_SOURCES): New macro.
457 (raid5rec_mod_CFLAGS): Likewise.
458 (raid5rec_mod_LDFLAGS): Likewise.
459 (raid6rec_mod_SOURCES): Likewise.
460 (raid6rec_mod_CFLAGS): Likewise.
461 (raid6rec_mod_LDFLAGS): Likewise.
462 (mdraid_mod_SOURCES): Likewise.
463 (mdraid_mod_CFLAGS): Likewise.
464 (mdraid_mod_LDFLAGS): Likewise.
465 (dm_nv_mod_SOURCES): Likewise.
466 (dm_nv_mod_CFLAGS): Likewise.
467 (dm_nv_mod_LDFLAGS): Likewise.
469 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
470 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
471 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
473 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
474 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
476 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
478 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
480 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
482 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
484 * disk/raid5_recover.c: New file.
486 * disk/raid6_recover.c: Likewise.
488 * disk/mdraid_linux.c: Likewise.
490 * disk/dmraid_nvidia.c: Likewise.
492 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
495 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
496 calculate the size of raid device.
497 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
498 different layout of raid5.
499 (grub_raid_scan_device): Remove code specific to mdraid.
500 (grub_raid_list): New variable.
501 (free_array): New function.
502 (grub_raid_register): Likewise.
503 (grub_raid_unregister): Likewise.
504 (grub_raid_rescan): Likewise.
505 (GRUB_MOD_INIT): Don't iterate device here.
506 (GRUB_MOD_FINI): Use free_array to release resource.
508 * include/grub/raid.h: Remove macro and structure specific to mdraid.
509 (grub_raid5_recover_func_t): New function variable type.
510 (grub_raid6_recover_func_t): Likewise.
511 (grub_raid5_recover_func): New variable.
512 (grub_raid6_recover_func): Likewise.
513 (grub_raid_register): New function.
514 (grub_raid_unregister): Likewise.
515 (grub_raid_rescan): Likewise.
516 (grub_raid_block_xor): Likewise.
518 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
519 (CMD_CRC): New macro.
521 (read_file): Handle device as well as file.
522 (cmd_crc): New function.
523 (fstest): Handle multiple disks.
524 (options): Remove part, raw and long, add root and diskcount.
525 (usage): Add crc, remove -p, -r, -l, add -r and -c.
526 (main): Find the first non option entry and ignore subsequence options,
527 add handling for the new options, support multiple disks.
529 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
531 2008-08-23 Bean <bean123ch@gmail.com>
533 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
535 * genfslist.sh: Ignore kernel.mod.
537 * genpartmaplist.sh: Likewise.
539 2008-08-23 Robert Millan <rmh@aybabtu.com>
541 * util/getroot.c (find_root_device): Skip anything that starts with
542 a dot, not just directories. This avoids things like /dev/.tmp.md0.
544 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
546 * util/update-grub.in (GRUB_GFXMODE): Export variable.
547 * util/grub.d/00_header.in: Allow the administrator to change default
548 gfxmode via ${GRUB_GFXMODE}.
550 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
552 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
554 2008-08-21 Robert Millan <rmh@aybabtu.com>
556 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
558 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
559 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
561 2008-08-20 Carles Pina i Estany <carles@pina.cat>
563 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
564 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
566 2008-08-19 Robert Millan <rmh@aybabtu.com>
568 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
569 (struct grub_virtual_screen): Remove `cursor_color'.
570 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
572 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
574 2008-08-18 Robert Millan <rmh@aybabtu.com>
576 Unify (identical) linux_normal.c files.
577 * loader/i386/efi/linux_normal.c: Move from here ...
578 * loader/linux_normal.c: ... to here. Update all users.
579 * loader/i386/pc/linux_normal.c: Delete. Update all users.
580 * loader/i386/ieee1275/linux_normal.c: Likewise.
582 2008-08-18 Robert Millan <rmh@aybabtu.com>
584 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
585 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
586 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
587 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
588 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
590 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
591 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
592 (GRUB_LINUX_CL_END_OFFSET): ... to here.
593 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
594 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
595 (GRUB_EFI_CL_END_OFFSET): Rename to ...
596 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
597 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
598 Initialize `params->video_cursor_x' and `params->video_cursor_y'
599 portably using grub_getxy().
600 Replace `-EFI' with `-bzImage' in boot message.
602 2008-08-17 Robert Millan <rmh@aybabtu.com>
604 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
606 2008-08-17 Robert Millan <rmh@aybabtu.com>
608 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
610 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
611 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
612 (grub_machine_mmap_iterate): New function declaration.
613 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
615 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
618 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
619 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
620 Move e820 parsing from here ...
621 * kern/i386/pc/mmap.c: New file.
622 (grub_machine_mmap_iterate): ... to here.
624 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
625 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
626 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
627 (grub_available_iterate): Redeclare to return `void', and redeclare
628 its hook to use grub_uint64_t as addr and size parameters, and rename
630 (grub_machine_mmap_iterate): ... this. Update all users.
632 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
633 to make it more readable. Rename to ...
634 (grub_machine_mmap_iterate): ... this.
636 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
637 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
638 (grub_multiboot): Allocate an extra region after the payload, and fill
639 it with a Multiboot memory map. Adjust a.out loader to calculate size
640 with the extra space.
641 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
642 with the extra space.
644 2008-08-17 Carles Pina i Estany <carles@pina.cat>
646 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
648 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
650 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
651 mdate-sh to the list `find' searches for.
652 * DISTLIST: Regenerated.
654 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
656 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
657 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
658 genmoddep.awk, gensymlist.sh.in.
659 (DISTDIRS): Add bus, docs, hook, lib.
660 * DISTLIST: Regenerated.
661 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
663 2008-08-16 Robert Millan <rmh@aybabtu.com>
665 * disk/raid.c (grub_raid_init): Handle/report errors set by
666 grub_device_iterate().
667 * disk/lvm.c (grub_lvm_init): Likewise.
669 2008-08-15 Bean <bean123ch@gmail.com>
671 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
673 (datetime_mod_SOURCES): New macro.
674 (datetime_mod_CFLAGS): Likewise.
675 (datetime_mod_LDFLAGS): Likewise.
676 (date_mod_SOURCES): Likewise.
677 (date_mod_CFLAGS): Likewise.
678 (date_mod_LDFLAGS): Likewise.
679 (datehook_mod_SOURCES): Likewise.
680 (datehook_mod_CFLAGS): Likewise.
681 (datehook_mod_LDFLAGS): Likewise.
683 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
685 (datetime_mod_SOURCES): New macro.
686 (datetime_mod_CFLAGS): Likewise.
687 (datetime_mod_LDFLAGS): Likewise.
688 (date_mod_SOURCES): Likewise.
689 (date_mod_CFLAGS): Likewise.
690 (date_mod_LDFLAGS): Likewise.
691 (datehook_mod_SOURCES): Likewise.
692 (datehook_mod_CFLAGS): Likewise.
693 (datehook_mod_LDFLAGS): Likewise.
695 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
697 (datetime_mod_SOURCES): New macro.
698 (datetime_mod_CFLAGS): Likewise.
699 (datetime_mod_LDFLAGS): Likewise.
700 (date_mod_SOURCES): Likewise.
701 (date_mod_CFLAGS): Likewise.
702 (date_mod_LDFLAGS): Likewise.
703 (datehook_mod_SOURCES): Likewise.
704 (datehook_mod_CFLAGS): Likewise.
705 (datehook_mod_LDFLAGS): Likewise.
707 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
709 (datetime_mod_SOURCES): New macro.
710 (datetime_mod_CFLAGS): Likewise.
711 (datetime_mod_LDFLAGS): Likewise.
712 (date_mod_SOURCES): Likewise.
713 (date_mod_CFLAGS): Likewise.
714 (date_mod_LDFLAGS): Likewise.
715 (datehook_mod_SOURCES): Likewise.
716 (datehook_mod_CFLAGS): Likewise.
717 (datehook_mod_LDFLAGS): Likewise.
719 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
721 (datetime_mod_SOURCES): New macro.
722 (datetime_mod_CFLAGS): Likewise.
723 (datetime_mod_LDFLAGS): Likewise.
724 (date_mod_SOURCES): Likewise.
725 (date_mod_CFLAGS): Likewise.
726 (date_mod_LDFLAGS): Likewise.
727 (datehook_mod_SOURCES): Likewise.
728 (datehook_mod_CFLAGS): Likewise.
729 (datehook_mod_LDFLAGS): Likewise.
731 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
733 * commands/date.c: New file.
735 * hook/datehook.c: Likewise.
737 * include/grub/lib/datetime.h: Likewise.
739 * include/grub/i386/cmos.h: Likewise.
741 * lib/datetime.c: Likewise.
743 * lib/i386/datetime.c: Likewise.
745 * lib/efi/datetime.c: Likewise.
747 2008-08-14 Robert Millan <rmh@aybabtu.com>
749 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
750 (grub_mkelfimage_SOURCES): New variable.
751 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
753 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
754 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
755 * conf/powerpc-ieee1275.rmk: Likewise.
756 * conf/i386-ieee1275.rmk: Likewise.
758 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
759 * kern/i386/coreboot/init.c: Likewise.
761 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
762 with `<grub/cpu/kernel.h>'.
763 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
765 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
766 * kern/i386/coreboot/startup.S: Likewise.
768 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
769 (GRUB_MOD_GAP): Remove.
770 * include/grub/powerpc/kernel.h: New file.
771 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
772 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
773 * include/grub/i386/kernel.h: New file.
774 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
775 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
776 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
778 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
780 Use --directory when invoking grub_mkimage.
782 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
783 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
784 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
785 and GRUB_KERNEL_CPU_PREFIX.
787 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
789 * include/grub/err.h (grub_err_printf): New function prototype.
790 * util/misc.c (grub_err_printf): New function.
791 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
793 * kern/err.c (grub_print_error): Use grub_err_printf.
795 2008-08-13 Robert Millan <rmh@aybabtu.com>
797 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
799 2008-08-13 Robert Millan <rmh@aybabtu.com>
801 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
804 2008-08-12 Robert Millan <rmh@aybabtu.com>
806 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
807 of the relocation code from here ...
808 (grub_multiboot): ... to here.
809 (forward_relocator, backward_relocator): Move from here ...
810 * kern/i386/loader.S (grub_multiboot_forward_relocator)
811 (grub_multiboot_backward_relocator): ... to here.
812 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
813 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
814 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
815 (grub_multiboot_forward_relocator_end)
816 (grub_multiboot_backward_relocator)
817 (grub_multiboot_backward_relocator_end): New variables.
819 2008-08-12 Bean <bean123ch@gmail.com>
821 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
823 2008-08-11 Robert Millan <rmh@aybabtu.com>
825 * kern/i386/linuxbios/startup.S: Move from here ...
826 * kern/i386/coreboot/startup.S: ... to here.
828 * kern/i386/linuxbios/init.c: Move from here ...
829 * kern/i386/coreboot/init.c: ... to here.
831 * kern/i386/linuxbios/table.c: Move from here ...
832 * kern/i386/coreboot/mmap.c: ... to here.
834 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
836 2008-08-11 Robert Millan <rmh@aybabtu.com>
838 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
839 errors. Leave it to the upper layer to handle them.
841 2008-08-09 Christian Franke <franke@computer.org>
843 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
844 * conf/common.rmk: Install `grub-pe2elf' only if requested.
845 Install `grub.d/10_windows' only on Cygwin.
846 * configure.ac: Add subst of `target_os'.
847 Check `target_os' also before setting TARGET_OBJ2ELF.
848 Add `--enable-grub-pe2elf'.
850 2008-08-08 Robert Millan <rmh@aybabtu.com>
852 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
853 (grub_last_time): Change type to grub_uint64_t.
854 (grub_disk_open): Migrate code from to using grub_get_time_ms().
855 (grub_disk_close): Likewise.
857 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
858 (run_menu): Migrate code from to using grub_get_time_ms().
860 * util/misc.c (grub_get_time_ms): New function.
862 2008-08-08 Marco Gerards <marco@gnu.org>
864 * disk/ata.c (grub_ata_regget): Change return type to
866 (grub_ata_regget2): Likewise.
867 (grub_ata_wait_status): New function.
868 (grub_ata_wait_busy): Removed function, updated all users to use
869 `grub_ata_wait_status'.
870 (grub_ata_wait_drq): Likewise.
871 (grub_ata_cmd): New function.
872 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
874 (grub_ata_pio_write): Add error handling.
875 (grub_atapi_identify): Likewise.
876 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
878 (grub_ata_identify): Use `grub_ata_cmd' and improve error
879 handling. Actually use the detected registers. Reorder the
880 detection logic such that it is easier to read.
881 (grub_ata_pciinit): Do not assign the same ID to each controller.
882 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
884 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
886 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
888 2008-08-08 Marco Gerards <marco@gnu.org>
892 2008-08-07 Bean <bean123ch@gmail.com>
894 * include/grub/x86_64/pci.h: New file.
896 2008-08-07 Christian Franke <franke@computer.org>
898 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
899 (TIMER2_GATE): Likewise.
900 (grub_pit_wait): Add enable/disable of the timer2 gate
901 bit of port 0x61. This fixes a possible infinite loop.
903 2008-08-07 Bean <bean123ch@gmail.com>
905 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
906 kern/i386/tsc.c and kern/i386/pit.c.
908 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
911 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
914 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
916 2008-08-07 Bean <bean123ch@gmail.com>
918 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
920 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
922 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
923 multiple inclusion. Add #include <grub/types.h>.
925 2008-08-06 Christian Franke <franke@computer.org>
927 * conf/common.rmk: Build and install `10_windows'.
928 * util/grub.d/10_windows.in: New script.
930 2008-08-06 Pavel Roskin <proski@gnu.org>
932 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
934 2008-08-06 Robert Millan <rmh@aybabtu.com>
936 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
937 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
939 2008-08-06 Bean <bean123ch@gmail.com>
941 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
942 (grub_pxefs_fs_int): Remove dummy definition.
943 (grub_pxefs_open): Use data->block_size to store the current block
945 (grub_pxefs_read): Use block size stored in data->block_size. As the
946 value of grub_pxe_blksize can be changed after the file is opened.
948 2008-08-06 Bean <bean123ch@gmail.com>
950 * fs/i386/pc/pxe.c (curr_file): new variable.
951 (grub_pxefs_open): Simply the handling of pxe file system. Don't
952 require the dummy internal file system anymore.
953 (grub_pxefs_read): Removed.
954 (grub_pxefs_close): Likewise.
955 (grub_pxefs_fs_int): Likewise.
956 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
957 connection when we switch file.
958 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
960 2008-08-06 Robert Millan <rmh@aybabtu.com>
962 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
964 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
965 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
967 * kern/i386/halt.c: New file.
968 * kern/i386/reboot.c: Likewise.
969 * include/grub/i386/reboot.h: Likewise.
970 * include/grub/i386/halt.h: Likewise.
972 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
973 Include `<grub/cpu/halt.h>'.
974 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
975 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
977 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
978 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
979 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
980 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
981 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
982 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
984 * include/grub/i386/at_keyboard.h: ... to here.
986 2008-08-05 Robert Millan <rmh@aybabtu.com>
988 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
989 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
990 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
991 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
992 `kern/generic/millisleep.c'.
994 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
995 instead of grub_get_rtc().
996 (grub_tsc_init): Initialize `tsc_boot_time'.
998 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
999 (grub_machine_init): Use grub_tsc_init() rather than
1000 installing an RTC-based handler via grub_install_get_time_ms().
1002 * kern/i386/pit.c: New file.
1003 * include/grub/i386/pit.h: Likewise.
1005 2008-08-05 Bean <bean123ch@gmail.com>
1007 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
1009 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
1010 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
1011 (pxe_mod_SOURCES): New macro.
1012 (pxe_mod_CFLAGS): Likewise.
1013 (pxe_mod_LDFLAGS): Likewise.
1014 (pxecmd_mod_SOURCES): Likewise.
1015 (pxecmd_mod_CFLAGS): Likewise.
1016 (pxecmd_mod_LDFLAGS): Likewise.
1018 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1019 (grub_pxe_call): Likewise.
1021 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1023 * commands/i386/pc/pxecmd.c: New file.
1025 * fs/i386/pc/pxe.c: Likewise.
1027 * include/grub/i386/pc/pxe.h: Likewise.
1029 2008-08-05 Bean <bean123ch@gmail.com>
1031 * util/console.c (grub_console_cur_color): New variable.
1032 (grub_console_standard_color): Likewise.
1033 (grub_console_normal_color): Likewise.
1034 (grub_console_highlight_color): Likewise.
1035 (color_map): Likewise.
1036 (use_color): Likewise.
1037 (NUM_COLORS): New macro.
1038 (grub_ncurses_setcolorstate): Handle color properly.
1039 (grub_ncurses_setcolor): Don't change color here, just remember the
1040 settings, color will be set in grub_ncurses_setcolorstate.
1041 (grub_ncurses_getcolor): New function.
1042 (grub_ncurses_init): Initialize color pairs.
1043 (grub_ncurses_term): New member grub_ncurses_getcolor.
1045 2008-08-05 Colin D Bennett <colin@gibibit.com>
1047 High resolution timer support. Implemented for x86 CPUs using TSC.
1048 Extracted generic grub_millisleep() so it's linked in only as needed.
1049 This requires a Pentium compatible CPU; if the RDTSC instruction is
1050 not supported, then it falls back on the generic grub_get_time_ms()
1051 implementation that uses the machine's RTC.
1053 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1054 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1055 `kern/generic/millisleep.c'.
1057 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1058 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1060 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1061 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1063 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1065 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1066 `kern/generic/millisleep.c'.
1068 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1070 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1072 * kern/generic/rtc_get_time_ms.c: New file.
1074 * kern/generic/millisleep.c: New file.
1076 * kern/misc.c: Don't include
1077 <kern/time.h> anymore.
1078 (grub_millisleep_generic): Removed.
1080 * commands/sleep.c (grub_interruptible_millisleep): Uses
1081 grub_get_time_ms() instead of grub_get_rtc().
1083 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
1085 (grub_cpu_is_cpuid_supported): New inline function.
1086 (grub_cpu_is_tsc_supported): New inline function.
1087 (grub_tsc_init): New function prototype.
1088 (grub_tsc_get_time_ms): New function prototype.
1090 * kern/i386/tsc.c (grub_get_time_ms): New file.
1092 * include/grub/time.h: Include <grub/types.h.
1093 (grub_millisleep_generic): Removed.
1094 (grub_get_time_ms): New prototype.
1095 (grub_install_get_time_ms): New prototype.
1096 (grub_rtc_get_time_ms): New prototype.
1098 * kern/time.c (grub_get_time_ms): New function.
1099 (grub_install_get_time_ms): New function.
1101 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
1102 <grub/time.h> anymore.
1103 (grub_millisleep): Removed.
1104 (grub_machine_init): Call grub_tsc_init.
1106 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1107 get_time_ms() implementation.
1109 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1110 (ieee1275_get_time_ms): New function.
1111 (grub_machine_init): Install get_time_ms() implementation.
1113 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1114 (grub_machine_init): Call grub_tsc_init().
1115 (grub_millisleep): Removed.
1117 * kern/ieee1275/init.c (grub_millisleep): Removed.
1118 (grub_machine_init): Install ieee1275_get_time_ms()
1120 (ieee1275_get_time_ms): New function.
1121 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1124 2008-08-05 Marco Gerards <marco@gnu.org>
1126 * disk/ata.c: Include <grub/pci.h>.
1127 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1128 (grub_ata_initialize): Rewritten.
1129 (grub_ata_device_initialize): New function.
1131 2008-08-04 Pavel Roskin <proski@gnu.org>
1133 * kern/main.c: Include grub/mm.h.
1135 2008-08-04 Robert Millan <rmh@aybabtu.com>
1137 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1138 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1139 corruption problem).
1141 2008-08-04 Robert Millan <rmh@aybabtu.com>
1143 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1144 warnings introduced in my last commit.
1146 2008-08-03 Robert Millan <rmh@aybabtu.com>
1148 Make PCI available on all i386 architectures.
1150 * include/grub/i386/pc/pci.h: Move from here ...
1151 * include/grub/i386/pci.h: ... to here.
1153 * include/grub/i386/pc/pci.h: Remove.
1154 * include/grub/i386/efi/pci.h: Remove.
1155 * include/grub/x86_64/efi/pci.h: Remove.
1157 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1160 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1161 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1162 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1164 * conf/i386-ieee1275.rmk: Likewise.
1166 2008-08-03 Robert Millan <rmh@aybabtu.com>
1168 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1169 (grub_console_setcursor): Make it possible to set cursor off.
1171 2008-08-03 Robert Millan <rmh@aybabtu.com>
1173 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
1174 of modules instead of assuming which platform provides what.
1175 * util/update-grub.in: Likewise.
1177 2008-08-03 Robert Millan <rmh@aybabtu.com>
1179 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1180 instead of `grub_install_dos_part' to determine whether a drive needs
1181 to be prepended to prefix (`grub_install_dos_part' is not reliable,
1182 because it can be overridden when loading GRUB via Multiboot).
1184 2008-08-02 Robert Millan <rmh@aybabtu.com>
1186 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1188 2008-08-02 Robert Millan <rmh@aybabtu.com>
1190 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1191 of informational grub_dprintf() calls.
1193 2008-08-02 Robert Millan <rmh@aybabtu.com>
1195 * disk/memdisk.c (memdisk_size): Don't initialize.
1196 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
1198 * include/grub/i386/pc/kernel.h
1199 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
1200 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
1201 (grub_memdisk_image_size, grub_arch_memdisk_addr)
1202 (grub_arch_memdisk_size): Remove.
1204 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
1205 field (was only used to transfer a constant). Add `type' field to
1206 support multiple module types.
1207 (grub_module_iterate): New function.
1209 * kern/device.c (grub_device_open): Do not hide error messages
1210 when grub_disk_open() fails. Use grub_print_error() instead.
1212 * kern/i386/pc/init.c (grub_arch_modules_addr)
1213 (grub_arch_memdisk_size): Remove functions.
1214 (grub_arch_modules_addr): Return the module address in high memory
1215 (now that it isn't copied anymore).
1217 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
1218 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
1219 decompression routine (grub_total_module_size already includes that
1220 now). Don't copy modules back to low memory.
1222 * kern/main.c: Include `<grub/mm.h>'.
1223 (grub_load_modules): Split out (and use) ...
1224 (grub_module_iterate): ... this function, which iterates through
1225 module objects and runs a hook.
1226 Comment out grub_mm_init_region() call, as it would cause non-ELF
1227 modules to be overwritten.
1229 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
1230 the memdisk image in its own region, make it part of the module list.
1231 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
1232 (main): Parse --memdisk|-m option, and pass user-provided path as
1233 parameter to generate_image().
1234 (add_segments): Pass `memdisk_path' down to load_modules().
1235 (load_modules): Embed memdisk image in module section when requested.
1236 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
1237 `header.type' instead of `header.offset'.
1239 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
1240 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
1241 (memdisk_mod_LDFLAGS): New variables.
1242 * conf/i386-coreboot.rmk: Likewise.
1243 * conf/i386-ieee1275.rmk: Likewise.
1245 2008-08-02 Robert Millan <rmh@aybabtu.com>
1247 * loader/i386/pc/multiboot.c (playground, forward_relocator)
1248 (backward_relocator): New variables. Used to allocate and relocate
1249 the payload, respectively.
1250 (grub_multiboot_load_elf32): Load into heap instead of requested
1251 address, install the appropriate relocator code in each bound of
1252 the payload, and set the entry point such that
1253 grub_multiboot_real_boot() will jump to one of them.
1255 * kern/i386/loader.S (grub_multiboot_payload_size)
1256 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1257 (grub_multiboot_payload_entry_offset): New variables.
1258 (grub_multiboot_real_boot): Set cpu context to what the relocator
1259 expects, and jump to the relocator instead of the payload.
1261 * include/grub/i386/loader.h (grub_multiboot_payload_size)
1262 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1263 (grub_multiboot_payload_entry_offset): Export.
1265 2008-08-01 Bean <bean123ch@gmail.com>
1267 * normal/menu_entry.c (editor_getline): Don't return the original
1268 string as result, as it will be released by lexer once it has done
1271 2008-08-01 Robert Millan <rmh@aybabtu.com>
1273 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
1274 within menuentries, not before them.
1275 util/grub.d/10_hurd.in: Likewise.
1277 2008-08-01 Bean <bean123ch@gmail.com>
1279 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
1280 (bufio_mod_SOURCES): New macro.
1281 (bufio_mod_CFLAGS): Likewise.
1282 (bufio_mod_LDFLAGS): Likewise.
1284 * include/grub/bufio.h: New file.
1286 * io/bufio.c: Likewise.
1288 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
1289 (grub_video_reader_png): Use grub_buffile_open to open file.
1291 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
1292 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
1294 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
1295 (grub_video_reader_tga): Use grub_buffile_open to open file.
1297 * font/manager.c: Include <grub/bufio.h>.
1298 (add_font): Use grub_buffile_open to open file.
1300 2008-07-31 Robert Millan <rmh@aybabtu.com>
1302 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
1303 ELF segments, use a macro for arbitrarily accessing any of them instead
1304 of preparing a pointer that allows access to one at a time.
1305 (grub_multiboot_load_elf64): Likewise.
1307 2008-07-31 Bean <bean123ch@gmail.com>
1309 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
1310 GRUB_KERNEL_MACHINE_DATA_END.
1312 2008-07-30 Robert Millan <rmh@aybabtu.com>
1314 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
1315 Increase from 0x50 to 0x60.
1316 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
1317 use UUIDs to identify the root drive for them. If that's not
1319 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
1320 check, for cross-disk installs.
1322 2008-07-30 Robert Millan <rmh@aybabtu.com>
1324 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1325 is non-empty, use it to set the `prefix' environment variable instead
1326 of the usual approach.
1327 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1328 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1329 environment variable instead of dummy make_install_device().
1331 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1332 (start): Insert a data section, with `grub_prefix' variable.
1333 * kern/i386/linuxbios/startup.S: Likewise.
1335 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1336 New variable reference.
1337 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1338 New macro. Defines offset of `grub_prefix' within startup.S (relative
1340 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
1341 section within startup.S (relative to `start').
1342 * include/grub/i386/coreboot/kernel.h: Likewise.
1344 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1345 Overwrite grub_prefix with its contents, at the beginning of the
1347 (main): Understand -p|--prefix.
1349 2008-07-30 Robert Millan <rmh@aybabtu.com>
1351 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1353 2008-07-30 Robert Millan <rmh@aybabtu.com>
1355 * term/i386/pc/vga_text.c (grub_console_cls): Use
1356 grub_console_gotoxy() to go back to beginning of the screen.
1357 Found by Patrick Georgi <patrick.georgi@coresystems.de>
1359 2008-07-29 Christian Franke <franke@computer.org>
1361 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1362 Add conversion of emulated mount points on Cygwin.
1364 2008-07-29 Christian Franke <franke@computer.org>
1366 * util/update-grub.in: Add a check for admin
1368 Remove old `grub.cfg.new' before creation.
1369 Add `-f' to `mv' to handle the different filesystem
1370 semantics of Windows.
1372 2008-07-29 Bean <bean123ch@gmail.com>
1374 * normal/main.c (get_line): Fix buffer overflow bug.
1376 2008-07-28 Robert Millan <rmh@aybabtu.com>
1378 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1379 (struct grub_apple_header): New struct. Describes the layout of
1381 (apple_partition_map_iterate): Check the header magic as well as the
1382 partition magic (which was already being checked).
1384 2008-07-28 Pavel Roskin <proski@gnu.org>
1386 * genmk.rb: Add a warning to the beginning of the output that
1387 it's a generated file and should not be edited.
1389 2008-07-28 Robert Millan <rmh@aybabtu.com>
1391 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1392 with the same number are found, just use issue a warning with
1393 grub_dprintf(), as this error has been reported to be non-fatal.
1395 2008-07-27 Robert Millan <rmh@aybabtu.com>
1397 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1400 2008-07-27 Bean <bean123ch@gmail.com>
1402 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1403 (grub_fat_find_dir): Ignore case when comparing filename.
1405 2008-07-27 Bean <bean123ch@gmail.com>
1407 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1408 smallino, as it's more descriptive, and i8count can be confused with
1409 the other field count.
1410 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1413 2008-07-27 Bean <bean123ch@gmail.com>
1415 * commands/crc.c: New file.
1417 * lib/crc.c: Likewise.
1419 * include/grub/lib/crc.h: Likewise.
1421 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1423 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1424 (hexdump): Move this function to ...
1426 * lib/hexdump.c: ... here.
1428 * include/grub/hexdump.h: Renamed to ...
1430 * include/grub/lib/hexdump.h: ... this.
1432 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1434 * util/grub-editenv.c: Likewise.
1436 * include/envblk.h: Renamed to ...
1438 * include/lib/envblk.h: ... this.
1440 * util/envblk.c: Renamed to ...
1442 * lib/envblk.c: ... this.
1444 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1446 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1447 (pkglib_MODULES): Add crc.mod.
1448 (hexdump_mod_SOURCES): Add lib/hexdump.c.
1449 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1450 (crc_mod_SOURCES): New macro.
1451 (crc_mod_CFLAGS): Likewise.
1452 (crc_mod_LDFLAGS): Likewise.
1454 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1456 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1458 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1460 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1462 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1464 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
1466 * commands/help.c: Include <grub/term.h>.
1467 (TERM_WIDTH): Removed. Updated all users.
1469 2008-07-27 Pavel Roskin <proski@gnu.org>
1471 * util/getroot.c (find_root_device): Rephrase a comment to avoid
1472 spurious warnings about a comment within a comment.
1474 2008-07-25 Robert Millan <rmh@aybabtu.com>
1476 * util/getroot.c (find_root_device): Skip devices that match
1477 /dev/dm-[0-9]. This lets the real device be found for any type of
1478 abstraction (LVM, EVMS, RAID..).
1479 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1480 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
1481 device is found first, find_root_device() will now skip it.
1483 2008-07-24 Pavel Roskin <proski@gnu.org>
1485 * include/grub/types.h: Use __builtin_bswap32() and
1486 __builtin_bswap64() with gcc 4.3 and newer.
1488 2008-07-24 Christian Franke <franke@computer.org>
1490 * util/i386/pc/grub-install.in: If `--debug' is specified,
1491 pass `--verbose' to grub-setup.
1492 Abort script if make_system_path_relative_to_its_root() fails.
1494 2008-07-24 Bean <bean123ch@gmail.com>
1496 * configure.ac: Fixed a bug caused by the previous cygwin patch,
1497 variable `target_platform' should be `platform'.
1499 2008-07-24 Bean <bean123ch@gmail.com>
1501 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1502 (grub_png_init_fixed_block): New function.
1503 (grub_png_decode_image_data): Handle fixed huffman code compression.
1505 2008-07-24 Bean <bean123ch@gmail.com>
1507 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1508 (grub_pe2elf_SOURCES): New macro.
1509 (CLEANFILES): Add grub-pe2elf.
1511 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1512 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1513 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1514 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1515 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1516 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1517 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1518 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
1519 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
1520 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
1521 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
1522 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
1523 (GRUB_PE32_DT_FUNCTION): Likewise.
1524 (GRUB_PE32_REL_I386_DIR32): Likewise.
1525 (GRUB_PE32_REL_I386_REL32): Likewise.
1526 (grub_pe32_symbol): New structure.
1527 (grub_pe32_reloc): Likewise.
1529 * util/grub-pe2elf.c: New file.
1531 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
1532 start symbol in non pc platform.
1534 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
1536 The following patches are from Christian Franke.
1538 * include/grub/dl.h: Remove .previous, gas supports this only
1541 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
1542 Remove .type, gas supports this only for ELF format.
1544 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
1545 nullbytes in symbol table. This fixes an infinite loop if table is
1548 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
1549 TARGET_IMG_LDFLAGS and EXEEXT.
1551 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
1552 TARGET_IMG_LDFLAGS_AC.
1553 (grub_CHECK_STACK_ARG_PROBE): New function.
1555 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
1557 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
1559 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
1560 to set TARGET_IMG_LD* accordingly.
1561 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
1562 Add call to grub_CHECK_STACK_ARG_PROBE.
1563 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
1565 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
1567 * genmk.rb: Add EXEEXT to CLEANFILES.
1569 2008-07-23 Robert Millan <rmh@aybabtu.com>
1571 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
1572 define the codes for arrows and lines used for the menu).
1573 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
1576 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
1577 fonts, because the latter are too slow.
1579 2008-07-21 Bean <bean123ch@gmail.com>
1581 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
1582 a20. Run keyboard test last, as it will cause macbook to halt.
1584 2008-07-18 Pavel Roskin <proski@gnu.org>
1586 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
1587 load foreign architecture modules correctly anyway. Keep
1588 support for loading host architecture modules, whether we
1589 compile them or not.
1591 2008-07-17 Pavel Roskin <proski@gnu.org>
1593 * configure.ac: Use -m32 or -m64 regardless of whether we had to
1594 change target_cpu. The compiler default can mismatch target_cpu
1597 * disk/efi/efidisk.c: Fix format warnings on x86_64.
1598 * kern/efi/efi.c: Likewise.
1600 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
1601 target compiler is functional.
1602 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
1605 * configure.ac: Default to efi platform for x86_64-apple. Allow
1606 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
1607 adjustments from the rest, only do them if target is not
1608 explicitly given. Merge other adjustments with the final sanity
1609 check. Remove an extraneous check for supported CPU. Be
1610 specific which CPU and which platform is not supported.
1612 * configure.ac: Default to pc platform for x86_64.
1614 2008-07-17 Robert Millan <rmh@aybabtu.com>
1616 Partial LinuxBIOS -> Coreboot rename.
1618 * conf/i386-linuxbios.rmk: Renamed to ...
1619 * conf/i386-coreboot.rmk: ... this.
1620 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
1621 * configure.ac: Accept "coreboot" as input platform (but maintain
1622 compatibility with "linuxbios").
1623 * include/grub/i386/linuxbios: Renamed to ...
1624 * include/grub/i386/coreboot: ... this.
1626 2008-07-17 Bean <bean123ch@gmail.com>
1628 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
1629 (appleldr_mod_SOURCE): New variable.
1630 (appleldr_mod_CFLAGS): Likewise.
1631 (appleldr_mod_LDFLAGS): Likewise.
1632 (pci_mod_SOURCES): Likewise.
1633 (pci_mod_CFLAGS): Likewise.
1634 (pci_mod_LDFLAGS): Likewise.
1635 (lspci_mod_SOURCES): Likewise.
1636 (lspci_mod_CFLAGS): Likewise.
1637 (lspci_mod_LDFLAGS): Likewise.
1639 * conf/x86_64-efi.rmk: New file.
1641 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
1643 (grub_efidisk_write): Likewise.
1645 * include/efi/api.h (efi_call_0): New macro.
1646 (efi_call_1): Likewise.
1647 (efi_call_2): Likewise.
1648 (efi_call_3): Likewise.
1649 (efi_call_4): Likewise.
1650 (efi_call_5): Likewise.
1651 (efi_call_6): Likewise.
1653 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
1654 grub_rescue_cmd_chainloader.
1656 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
1657 (grub_pe32_optional_header): Change some fields based on i386 or
1659 (GRUB_PE32_PE32_MAGIC): Likewise.
1661 * include/grub/efi/uga_draw.h: New file.
1663 * include/grub/elf.h (STN_ABS): New constant.
1664 (R_X86_64_NONE): Relocation constant for x86_64.
1665 (R_X86_64_64): Likewise.
1666 (R_X86_64_PC32): Likewise.
1667 (R_X86_64_GOT32): Likewise.
1668 (R_X86_64_PLT32): Likewise.
1669 (R_X86_64_COPY): Likewise.
1670 (R_X86_64_GLOB_DAT): Likewise.
1671 (R_X86_64_JUMP_SLOT): Likewise.
1672 (R_X86_64_RELATIVE): Likewise.
1673 (R_X86_64_GOTPCREL): Likewise.
1674 (R_X86_64_32): Likewise.
1675 (R_X86_64_32S): Likewise.
1676 (R_X86_64_16): Likewise.
1677 (R_X86_64_PC16): Likewise.
1678 (R_X86_64_8): Likewise.
1679 (R_X86_64_PC8): Likewise.
1681 * include/grub/i386/efi/pci.h: New file.
1683 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
1684 Change it value based on platform.
1685 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
1686 (GRUB_E820_RAM): Likewise.
1687 (GRUB_E820_RESERVED): Likewise.
1688 (GRUB_E820_ACPI): Likewise.
1689 (GRUB_E820_NVS): Likewise.
1690 (GRUB_E820_EXEC_CODE): Likewise.
1691 (GRUB_E820_MAX_ENTRY): Likewise.
1692 (grub_e820_mmap): New structure.
1693 (linux_kernel_header): Change the efi field according to different
1694 kernel version, also field from linux_kernel_header.
1696 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
1698 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
1699 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
1700 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
1701 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
1702 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
1703 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
1704 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
1705 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
1706 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
1707 (GRUB_PCI_ADDR_IO_MASK): Likewise.
1709 * include/grub/x86_64/efi/kernel.h: New file.
1711 * include/grub/x86_64/efi/loader.h: Likewise.
1713 * include/grub/x86_64/efi/machine.h: Likewise.
1715 * include/grub/x86_64/efi/pci.h: Likewise.
1717 * include/grub/x86_64/efi/time.h: Likewise.
1719 * include/grub/x86_64/linux.h: Likewise.
1721 * include/grub/x86_64/setjmp.h: Likewise.
1723 * include/grub/x86_64/time.h: Likewise.
1725 * include/grub/x86_64/types.h: Likewise.
1727 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
1728 GRUB_TARGET_SIZEOF_VOID_P.
1730 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
1731 (grub_efi_locate_handle): Likewise.
1732 (grub_efi_open_protocol): Likewise.
1733 (grub_efi_set_text_mode): Likewise.
1734 (grub_efi_stall): Likewise.
1735 (grub_exit): Likewise.
1736 (grub_reboot): Likewise.
1737 (grub_halt): Likewise.
1738 (grub_efi_exit_boot_services): Likewise.
1739 (grub_get_rtc): Likewise.
1741 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
1742 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
1743 (grub_efi_allocate_pages): Wrap efi calls.
1744 (grub_efi_free_pages): Wrap efi calls.
1745 (grub_efi_get_memory_map): Wrap efi calls.
1747 * kern/x86_64/dl.c: New file.
1749 * kern/x86_64/efi/callwrap.S: Likewise.
1751 * kern/x86_64/efi/startup.S: Likewise.
1753 * loader/efi/appleloader.c: Likewise.
1755 * loader/efi/chainloader.c (cmdline): New variable.
1756 (grub_chainloader_unload): Wrap efi calls.
1757 (grub_chainloader_boot): Likewise.
1758 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
1761 * loader/efi/chainloader_normal.c (chainloader_command):
1762 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
1765 * loader/i386/efi/linux.c (allocate_pages): Change allocation
1767 (grub_e820_add_region): New function.
1768 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
1770 (grub_find_video_card): New function.
1771 (grub_linux_setup_video): New function.
1772 (grub_rescue_cmd_linux): Probe for video information.
1774 * normal/x86_64/setjmp.S: New file.
1776 * term/efi/console.c (map_char): New function.
1777 (grub_console_putchar): Map unicode char.
1778 (grub_console_checkkey): Wrap efi calls.
1779 (grub_console_getkey): Likewise.
1780 (grub_console_getwh): Likewise.
1781 (grub_console_gotoxy): Likewise.
1782 (grub_console_cls): Likewise.
1783 (grub_console_setcolorstate): Likewise.
1784 (grub_console_setcursor): Likewise.
1786 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
1788 2008-07-16 Pavel Roskin <proski@gnu.org>
1790 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
1793 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
1794 pointer, not an integer. This fixes a warning and prevents
1795 precision loss on 64-bit systems.
1796 (relocate_addresses): Remove unneeded cast.
1798 2008-07-15 Pavel Roskin <proski@gnu.org>
1800 * kern/i386/ieee1275/init.c: Include grub/cache.h.
1802 * term/ieee1275/ofconsole.c: Disable code unused on i386.
1804 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
1805 Fix comparison between signed and unsigned.
1807 * include/grub/i386/ieee1275/console.h: Declare
1808 grub_console_init() and grub_console_fini().
1810 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
1811 It's empty and unused.
1813 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
1814 beginning to avoid warnings with some compilers.
1816 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
1817 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
1819 2008-07-14 Pavel Roskin <proski@gnu.org>
1821 * kern/env.c (grub_register_variable_hook): Don't copy empty
1822 string, it leaks memory. Pass "" to grub_env_set(), it should
1823 handle constant strings.
1825 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
1826 * commands/cmp.c (grub_cmd_cmp): Likewise.
1827 * kern/dl.c (grub_dl_flush_cache): Likewise.
1828 (grub_dl_load_core): Likewise.
1829 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
1830 (grub_elf64_load_phdrs): Likewise.
1832 2008-07-13 Pavel Roskin <proski@gnu.org>
1834 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
1835 between signed and unsigned.
1836 (LzmaEnc_Finish): Fix warning about an unused parameter.
1838 2008-07-13 Bean <bean123ch@gmail.com>
1840 * Makefile.in (enable_lzo): New rule.
1842 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
1844 * configure.ac (ENABLE_LZO): New option --enable-lzo.
1846 * boot/i386/pc/lnxboot.S: #include <config.h>.
1848 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
1849 its value according to the compression algorithm used, lzo or lzma.
1851 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
1852 compression algorithm according to configure macro.
1854 * kern/i386/pc/startup.S (codestart): Likewise.
1856 * kern/i386/pc/lzma_decode.S: New file.
1858 * include/grub/lib/LzFind.h: Likewise.
1860 * include/grub/lib/LzHash.h: Likewise.
1862 * include/grub/lib/LzmaDec.h: Likewise.
1864 * include/grub/lib/LzmaEnc.h: Likewise.
1866 * include/grub/lib/LzmaTypes.h: Likewise.
1868 * lib/LzFind.c: Likewise.
1870 * lib/LzmaDec.c: Likewise.
1872 * lib/LzmaEnc.c: Likewise.
1874 2008-07-13 Bean <bean123ch@gmail.com>
1876 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
1877 (grub_ext4_extent_header): New structure.
1878 (grub_ext4_extent): Likewise.
1879 (grub_ext4_extent_idx): Likewise.
1880 (grub_ext4_find_leaf): New function.
1881 (grub_ext2_read_block): Handle extents.
1883 2008-07-12 Robert Millan <rmh@aybabtu.com>
1885 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
1887 2008-07-11 Robert Millan <rmh@aybabtu.com>
1889 * util/grub.d/40_custom.in: New file. Example on how to add custom
1890 entries to /etc/grub.d.
1891 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
1892 40_custom (implicitly, by merging all the grub.d rules).
1894 2008-07-11 Pavel Roskin <proski@gnu.org>
1896 * commands/read.c (grub_getline): Fix invalid memory access.
1897 Don't add newline to the variable value.
1899 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
1900 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
1901 (serial_hw_get_port): Check validity of the port number.
1902 (grub_cmd_serial): Check return value of serial_hw_get_port().
1904 2008-07-07 Pavel Roskin <proski@gnu.org>
1906 * boot/i386/pc/diskboot.S (notification_string): Replace
1907 "Loading kernel" with just "loading". This is shorter, less
1908 confusing and saves a few bytes for possible future changes.
1910 2008-07-05 Pavel Roskin <proski@gnu.org>
1912 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
1913 size for ATAPI devices, they are undefined. Output sector
1914 number in decimal form.
1916 * disk/ata.c: Use named constants for status bits.
1918 2008-07-04 Pavel Roskin <proski@gnu.org>
1920 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
1921 grub_addr_t before casting it to the void pointer to fix a
1922 warning. Non-addressable regions are discarded earlier.
1923 (grub_arch_modules_addr): Cast _end to grub_addr_t.
1924 * kern/i386/linuxbios/table.c: Include grub/misc.h.
1925 (check_signature): Don't shadow table_header.
1926 (grub_linuxbios_table_iterate): Cast numeric constants to
1927 grub_linuxbios_table_header_t.
1928 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
1931 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
1934 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
1935 pointer, which can cause warnings. Support 64-bit addresses.
1937 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
1938 of sizeof(long). This fixes PowerPC image generation on x86_64.
1940 2008-07-04 Robert Millan <rmh@aybabtu.com>
1942 This fixes a performance issue when pc & gpt partmap iterators
1943 didn't abort iteration even after our hook found what it was
1944 looking for (often causing expensive probes of non-existent drives).
1946 Some callers relied on previous buggy behaviour, since they would
1947 rise an error when their own hooks caused early abortion of its
1950 * kern/device.c (grub_device_open): Improve error message.
1951 * disk/lvm.c (grub_lvm_open): Likewise.
1952 * disk/raid.c (grub_raid_open): Likewise.
1954 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
1955 when hook requests it, independently of grub_errno.
1956 (pc_partition_map_probe): Do not fail when find_func() caused
1957 early abortion of pc_partition_map_iterate().
1959 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
1960 when hook requests it, independently of grub_errno.
1961 (gpt_partition_map_probe): Do not fail when find_func() caused
1962 early abortion of gpt_partition_map_iterate().
1964 * kern/partition.c (grub_partition_iterate): Abort parent iteration
1965 when hook requests it, independently of grub_errno. Do not fail when
1966 part_map_iterate_hook() caused early abortion of p->iterate().
1968 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
1969 when grub_partition_iterate() returned with non-zero.
1971 2008-07-03 Pavel Roskin <proski@gnu.org>
1973 * disk/ata.c (grub_ata_pio_write): Check status before writing,
1974 like we do in grub_ata_pio_read().
1975 (grub_ata_readwrite): Always write individual sectors. Fix the
1976 sector count for the remainder.
1977 (grub_ata_write): Enable writing to ATA devices. Correctly
1978 report error for ATAPI devices.
1980 2008-07-02 Pavel Roskin <proski@gnu.org>
1982 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
1985 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
1986 for every read sector, we already increment it for the whole
1987 batch. This fixes reading more than 256 sectors at once.
1989 * util/grub-editenv.c (cmd_info): Cast argument to long
1990 explicitly. ptrdiff_t reduces to int on i386.
1992 * util/grub-editenv.c (main): Be specific which parameter is
1995 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
1996 (memdisk): Make memdisk_orig_addr a pointer.
1998 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
1999 for file offsets, use grub_off_t instead. Fix printf format
2002 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
2003 there. Real unexpected warnings should not drown in the noise
2004 about known problems.
2006 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
2007 grub_disk_addr_t for memory addresses.
2009 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
2010 explicitly to fix a warning.
2012 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
2014 * Makefile.in (MODULE_LDFLAGS): New variable.
2015 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
2016 the linker accepts --build-id=none.
2017 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
2019 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2021 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2022 those in Linux XFS code. Provide a way to access 64-bit parent
2024 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
2025 the end of struct grub_xfs_dir_header.
2027 2008-07-02 Bean <bean123ch@gmail.com>
2029 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2030 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2031 and GRUB_IEEE1275_FLAG_NO_ANSI.
2033 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2034 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2035 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2037 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2038 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2040 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2041 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2043 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2044 esc sequence on non ANSI terminal.
2045 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2047 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2050 2008-07-02 Bean <bean123ch@gmail.com>
2052 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2053 (grub_editenv_SOURCES): New variable.
2054 (pkglib_MODULES): Add loadenv.mod.
2055 (loadenv_mod_SOURCES): New variable.
2056 (loadenv_mod_CFLAGS): Likewise.
2057 (loadenv_mod_LDFLAGS): Likewise.
2059 * include/grub/envblk.h: New file.
2061 * util/envblk.c: New file.
2063 * util/grub-editenv.c: New file.
2065 * commands/loadenv.c: New file.
2067 2008-07-01 Pavel Roskin <proski@gnu.org>
2069 * include/multiboot2.h (struct multiboot_tag_module): Use char,
2070 not unsigned char. This fixes warnings and is consistent with
2073 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2075 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2077 * term/tparm.c (analyze): Always set *popcount.
2079 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2080 cast to fix a warning.
2082 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2083 cast to suppress a warning.
2085 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2086 grub_fshelp_read_file() expects.
2088 * fs/fat.c: Fix UUID calculation on big-endian systems. We
2089 write uuid as a 32-bit value in CPU byte order, so declare and
2092 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2093 long if the format specifier expects it.
2094 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2095 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2096 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2097 long to fix a warning.
2098 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2099 grub_dprintf() arguments to fix warnings.
2101 2008-06-30 Pavel Roskin <proski@gnu.org>
2103 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2104 install_bsd_part immediately before core.img is embedded or
2105 modified on disk. This fixes core.img verification if core.img
2108 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2109 core_path to calculate the blocklist.
2110 Patch from Javier Martín <lordhabbit@gmail.com>
2112 2008-06-29 Robert Millan <rmh@aybabtu.com>
2114 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
2115 block to disk block.
2116 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2117 Patch from Niels Böhm <bitbucket@arcor.de>
2119 2008-06-29 Robert Millan <rmh@aybabtu.com>
2121 * util/update-grub_lib.in (font_path): Search for fonts in
2122 /boot/grub first, which is more likely to be readable (we aren't
2123 deciding where fonts live, just looking for them).
2125 2008-06-26 Pavel Roskin <proski@gnu.org>
2127 * util/biosdisk.c (read_device_map): Don't leave dead map
2128 entries for devices failing stat() check.
2130 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2131 core_path_dev for the core.img path on the target device.
2133 2008-06-26 Robert Millan <rmh@aybabtu.com>
2135 * disk/fs_uuid.c: New file.
2136 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2137 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2138 (fs_uuid_mod_LDFLAGS): New variables.
2139 * include/grub/disk.h (grub_disk_dev_id): Add
2140 `GRUB_DISK_DEVICE_UUID_ID'.
2141 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2142 implement iterate().
2144 2008-06-26 Robert Millan <rmh@aybabtu.com>
2146 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2147 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2148 Linux image includes no initrd.
2150 2008-06-21 Javier Martín <lordhabbit@gmail.com>
2152 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2153 call to resolve the core image location that effectively appended the
2156 2008-06-21 Robert Millan <rmh@aybabtu.com>
2158 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2161 * util/grub.d/10_hurd.in: ... to here ...
2162 * util/grub.d/10_linux.in: ... and here.
2164 2008-06-19 Robert Millan <rmh@aybabtu.com>
2166 * kern/main.c (grub_main): Export `prefix' variable immediately
2167 after it has been set by grub_machine_set_prefix().
2169 2008-06-19 Robert Millan <rmh@aybabtu.com>
2171 * commands/search.c (search_label, search_fs_uuid, search_file): Print
2172 search result when not saving to variable, not the other way around.
2173 When saving to variable, abort iteration as soon as a match is found.
2175 2008-06-19 Robert Millan <rmh@aybabtu.com>
2177 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2178 check for partition that provides /boot/grub. Its logic is flawed,
2179 as it prevents prepare_grub_to_access_device() from being called
2182 2008-06-19 Robert Millan <rmh@aybabtu.com>
2184 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2185 "insmod" command directly when abstraction modules are needed,
2186 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
2187 since it had already been processed).
2189 2008-06-19 Pavel Roskin <proski@gnu.org>
2191 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2192 changed. This is needed in case GRUB_LIBDIR changes.
2193 * conf/i386-ieee1275.rmk: Likewise.
2194 * conf/i386-linuxbios.rmk: Likewise.
2195 * conf/i386-pc.rmk: Likewise.
2196 * conf/powerpc-ieee1275.rmk: Likewise.
2198 2008-06-18 Pavel Roskin <proski@gnu.org>
2200 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
2201 kernel_elf_symlist.c to symlist.c for consistency with other
2202 architectures. Update all users.
2203 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2205 2008-06-18 Robert Millan <rmh@aybabtu.com>
2207 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
2210 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
2211 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
2212 a RAID device, run setup() for all members independently on whether
2213 LVM abstraction is being used.
2214 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
2215 If grub-mkimage has set `*install_dos_part == -2', don't override this
2217 Perform *install_dos_part adjustments independently on whether
2218 we're embedding or not.
2219 Clarify error message when image is too big for embedding.
2220 Remove duplicate *install_dos_part stanza.
2222 2008-06-17 Robert Millan <rmh@aybabtu.com>
2224 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
2225 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
2227 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
2228 values in grub_ofconsole_normal_color and
2229 grub_ofconsole_highlight_color (they're not directly related to
2230 background and foreground).
2231 (grub_ofconsole_setcolorstate): Extract background and foreground
2232 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
2234 2008-06-17 Robert Millan <rmh@aybabtu.com>
2236 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
2237 /boot/grub for the check in last commit, not /boot (they could be
2238 different partitions).
2240 2008-06-16 Robert Millan <rmh@aybabtu.com>
2242 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
2243 asked to setup access for the same partition that provides /boot,
2244 don't bother using UUIDs since our root already has the value we
2247 2008-06-16 Robert Millan <rmh@aybabtu.com>
2249 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
2251 Patch from Sven Mueller <sven@debian.org>.
2253 2008-06-16 Robert Millan <rmh@aybabtu.com>
2255 * util/update-grub.in: Check for $EUID instead of $UID.
2256 Reported by Vincent Zweije.
2258 2008-06-16 Bean <bean123ch@gmail.com>
2260 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
2261 (grub_ext2_read_block): Likewise.
2262 (grub_ext2_read_inode): Likewise.
2263 (grub_ext2_mount): Likewise.
2264 (grub_ext2_close): Likewise.
2265 (grub_ext3_get_journal): Removed.
2267 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
2268 (grub_reiserfs_read_symlink): Likewise.
2269 (grub_reiserfs_mount): Likewise.
2270 (grub_reiserfs_open): Likewise.
2271 (grub_reiserfs_read): Likewise.
2272 (grub_reiserfs_close): Likewise.
2273 (grub_reiserfs_get_journal): Removed.
2275 * fs/fshelp.c (grub_fshelp_read): Removed.
2276 (grub_fshelp_map_block): Likewise.
2278 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
2279 (grub_fshelp_journal): Likewise.
2280 (grub_fshelp_read): Likewise.
2281 (grub_fshelp_map_block): Likewise.
2283 2008-06-16 Pavel Roskin <proski@gnu.org>
2285 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
2286 floating point anymore.
2287 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
2289 2008-06-15 Pavel Roskin <proski@gnu.org>
2291 * commands/ls.c (grub_ls_list_files): Use integer calculations
2292 for human readable format, avoid floating point use.
2293 * kern/misc.c (grub_ftoa): Remove.
2294 (grub_vsprintf): Remove floating point support.
2296 2008-06-15 Robert Millan <rmh@aybabtu.com>
2298 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
2300 Reported by Max Vozeler.
2302 2008-06-15 Robert Millan <rmh@aybabtu.com>
2304 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
2305 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
2307 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
2308 the beginning of the prefix.
2310 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
2311 It is assumed that if we have a memdisk, grub-mkimage has set
2312 grub_prefix to include the "(memdisk)" drive in it.
2314 2008-06-15 Robert Millan <rmh@aybabtu.com>
2316 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
2317 Initialize keyboard controller after registering the terminal, so that
2318 grub_printf() can be called from grub_keyboard_controller_init().
2320 2008-06-15 Robert Millan <rmh@aybabtu.com>
2322 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2323 extent-btree which is written as big endian on disk.
2324 Reported by Alain Greppin <al@chilibi.org>.
2326 2008-06-14 Robert Millan <rmh@aybabtu.com>
2328 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2329 * util/i386/pc/grub-install.in (modules): Likewise.
2331 2008-06-13 Pavel Roskin <proski@gnu.org>
2333 * commands/ls.c (grub_ls_list_files): Fix format warnings.
2335 2008-06-13 Bean <bean123ch@gmail.com>
2337 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2339 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2341 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2342 to indicate sparse block.
2344 2008-06-12 Pavel Roskin <proski@gnu.org>
2346 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2347 number, grub_fshelp_read() does it for us.
2349 * fs/fshelp.c (grub_fshelp_read): New function. Implement
2350 linear disk read with journal translation.
2351 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2352 * include/grub/fshelp.h: Declare grub_fshelp_read().
2354 2008-06-09 Pavel Roskin <proski@gnu.org>
2356 * fs/minix.c (grub_minix_mount): Handle error reading
2359 2008-06-08 Robert Millan <rmh@aybabtu.com>
2361 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2362 don't append the RAID prefix afterwards.
2363 Reported by Clint Adams.
2365 2008-06-08 Robert Millan <rmh@aybabtu.com>
2367 Based on description from Pavel:
2368 * kern/disk.c (grub_disk_check_range): Rename to ...
2369 (grub_disk_adjust_range): ... this. Add a comment explaining the
2370 tasks performed by this function.
2372 2008-06-08 Robert Millan <rmh@aybabtu.com>
2374 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2375 `num_serial' (for consistency with other variables).
2376 (struct grub_ntfs_data): Add `uuid' member.
2377 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2378 (grub_ntfs_uuid): New function.
2379 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2381 2008-06-07 Pavel Roskin <proski@gnu.org>
2383 * util/biosdisk.c (open_device): Revert last change to the
2384 function, it broke installation. The sector needs to be
2385 different dependent on which device is opened.
2387 2008-06-06 Robert Millan <rmh@aybabtu.com>
2389 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2390 rest of GRUB, and breakage doesn't happen if its value were modified.
2392 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2393 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2394 a constant (same value).
2395 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2396 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2398 2008-06-06 Robert Millan <rmh@aybabtu.com>
2400 * util/biosdisk.c (open_device): Do not modify sector offset when
2401 accessing a partition. kern/disk.c already handles this for us.
2403 2008-06-06 Robert Millan <rmh@aybabtu.com>
2405 * util/grub-emu.c (grub_machine_init): Move code in this function from
2407 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2408 segfault in case grub_printf() is called).
2410 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2411 grub_probe. Update all users not to explicitly add it again.
2412 (grub_device): New variable; contains corresponding device for grubdir.
2413 (fs_module, partmap_module, devabstraction_module): Pass
2414 `--device ${grub_device}' to grub_probe to avoid traversing /dev
2417 2008-06-05 Robert Millan <rmh@aybabtu.com>
2419 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2420 is found, print it (same layout as with labels).
2422 2008-06-04 Robert Millan <rmh@aybabtu.com>
2424 * util/biosdisk.c (get_drive): Rename to ...
2425 (find_grub_drive): ... this. Update all users.
2427 (get_os_disk): Rename to ...
2428 (convert_system_partition_to_system_disk): ... this. Update all users.
2430 (find_drive): Rename to ...
2431 (find_system_device): ... this. Update all users.
2433 2008-06-04 Robert Millan <rmh@aybabtu.com>
2435 * util/biosdisk.c (get_os_disk): Handle IDA devices.
2436 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2437 (make_device_map): Likewise.
2439 2008-06-01 Robert Millan <rmh@aybabtu.com>
2441 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2442 before dereferencing it.
2444 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2445 union with fat12/fat16-specific ones. Add some new fields, including
2446 `num_serial' for both versions.
2447 (struct grub_fat_data): Add `uuid' member.
2448 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2449 names. Initialize `data->uuid' using `num_serial'.
2450 (grub_fat_uuid): New function.
2451 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2453 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2454 (grub_reiserfs_uuid): New function.
2455 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2458 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2459 (grub_xfs_uuid): New function.
2460 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2462 2008-06-01 Robert Millan <rmh@aybabtu.com>
2464 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2465 code that is backward compatible with pre-uuid search command.
2467 2008-05-31 Robert Millan <rmh@aybabtu.com>
2469 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2470 floppies after everything else, to ensure floppy drive isn't accessed
2471 unnecessarily (patch from Bean).
2473 2008-05-31 Robert Millan <rmh@aybabtu.com>
2475 * commands/search.c (search_label, search_fs_uuid, search_file): Do
2476 not print device names when we were asked to set a variable.
2478 2008-05-31 Robert Millan <rmh@aybabtu.com>
2480 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2481 using "cursor-on" and "cursor-off" commands (understood at least by
2482 the Open Firmware flavour on OLPC).
2484 2008-05-31 Michael Gorven <michael@gorven.za.net>
2486 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2487 on and off sequences.
2489 2008-05-31 Robert Millan <rmh@aybabtu.com>
2491 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2492 * util/update-grub.in: Likewise.
2494 2008-05-30 Pavel Roskin <proski@gnu.org>
2496 * util/biosdisk.c (linux_find_partition): Simplify logic and
2497 make the code more universal. Keep special processing for
2498 devfs, but use a simple rule for all other devices. If the
2499 device ends with a number, append 'p' and the partition number.
2500 Otherwise, append only the partition number.
2502 2008-05-30 Robert Millan <rmh@aybabtu.com>
2504 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2505 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2506 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2507 the `root' parameter to Linux.
2509 2008-05-30 Robert Millan <rmh@aybabtu.com>
2511 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2512 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2513 --fs_uuid with --fs-uuid.
2514 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2515 all filesystems support them).
2517 2008-05-30 Robert Millan <rmh@aybabtu.com>
2519 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
2520 grub_printf() flags, since we're printing in units of 2 bytes.
2522 2008-05-30 Robert Millan <rmh@aybabtu.com>
2524 * util/grub.d/00_header.in: Remove obsolete comment referencing
2525 convert_system_path_to_grub_path().
2526 * util/update-grub.in: Likewise.
2527 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
2528 (convert_system_path_to_grub_path): Add a warning message explaining
2529 that this function is deprecated. Rely on is_path_readable_by_grub()
2530 for the readability checks.
2531 (font_path): Use is_path_readable_by_grub() for the readability
2532 check rather than convert_system_path_to_grub_path().
2534 2008-05-30 Robert Millan <rmh@aybabtu.com>
2536 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
2537 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
2538 converting it first.
2539 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
2540 grub.cfg for access to font file, and afterwards call it again to set
2543 2008-05-30 Robert Millan <rmh@aybabtu.com>
2545 * commands/search.c (options): Add --fs_uuid option.
2546 (search_fs_uuid): New function.
2547 (grub_cmd_search): Fix --set argument passing.
2548 Use search_fs_uuid() when requested via --fs_uuid.
2549 (grub_search_init): Update help message.
2550 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
2551 and redeclare it as an array of 16-bit words.
2552 (grub_ext2_uuid): New function.
2553 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
2554 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
2555 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
2556 (GRUB_DEVICE_BOOT_UUID): New variables.
2557 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
2558 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
2560 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
2561 just assume `root' variable has the right value.
2562 * util/grub.d/10_linux.in: Likewise.
2563 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
2565 (main): Recognise `-t fs_uuid' argument.
2567 2008-05-30 Robert Millan <rmh@aybabtu.com>
2569 * util/biosdisk.c (map): Redefine structure to hold information
2570 about GRUB drive name.
2571 (get_drive): Reimplement without assuming (and verifying) BIOS-like
2573 (call_hook): Remove.
2574 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
2575 member. Assume drive has partitions.
2576 (grub_util_biosdisk_open): Access device names via `.device' struct
2578 (open_device): Likewise.
2579 (find_drive): Likewise.
2580 (read_device_map): Adjust map[] usage to match the new struct
2581 definition. Don't check for duplicates (still possible, but not cheap
2583 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
2584 (make_device_name): Remove assumption of BIOS-like drive names.
2586 2008-05-30 Pavel Roskin <proski@gnu.org>
2588 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
2589 compiling execute.c doesn't need grub_script.tab.h anymore.
2590 (normal/command.c_DEPENDENCIES): Likewise.
2591 (normal/function.c_DEPENDENCIES): Likewise.
2592 * conf/i386-ieee1275.rmk: Likewise.
2593 * conf/i386-linuxbios.rmk: Likewise.
2594 * conf/i386-pc.rmk: Likewise.
2595 * conf/powerpc-ieee1275.rmk: Likewise.
2596 * conf/sparc64-ieee1275.rmk: Likewise.
2598 2008-05-29 Pavel Roskin <proski@gnu.org>
2600 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
2601 when scanning metadata for volume group name.
2603 * include/grub/script.h: Don't include grub_script.tab.h. It's
2604 a generated file, which may only be included from the files with
2605 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
2606 use union YYSTYPE, as the later allows forward declaration.
2607 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
2609 2008-05-29 Robert Millan <rmh@aybabtu.com>
2611 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
2612 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
2613 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
2614 (grub_console_checkkey): Add grub_dprintf() call to report unknown
2617 2008-05-29 Robert Millan <rmh@aybabtu.com>
2619 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
2620 control key combinations.
2622 2008-05-29 Robert Millan <rmh@aybabtu.com>
2624 * util/powerpc/ieee1275/grub-install.in: Move from here ...
2625 * util/ieee1275/grub-install.in: ... to here.
2626 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
2627 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
2628 (grub_install_SOURCES): Likewise.
2630 2008-05-29 Robert Millan <rmh@aybabtu.com>
2632 * fs/affs.c: Update copyright year.
2633 * fs/ext2.c: Likewise.
2634 * fs/fshelp.c: Likewise.
2635 * fs/hfsplus.c: Likewise.
2636 * fs/ntfs.c: Likewise.
2637 * fs/xfs.c: Likewise.
2638 * include/grub/fshelp.h: Likewise.
2639 * util/grub-mkdevicemap.c: Likewise.
2641 2008-05-28 Robert Millan <rmh@aybabtu.com>
2643 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
2644 might need to be fatfs to support some firmware implementations
2647 2008-05-28 Robert Millan <rmh@aybabtu.com>
2649 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
2651 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2652 (make_device_map): Likewise.
2654 2008-05-20 Bean <bean123ch@gmail.com>
2656 * fs/fshelp.c (grub_fshelp_map_block): New function.
2657 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
2658 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
2660 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
2661 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
2662 (grub_fshelp_journal): New structure.
2663 (grub_fshelp_map_block): New function prototype.
2664 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
2665 (grub_fshelp_map_block): Likewise.
2667 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
2668 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
2669 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
2670 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
2671 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
2672 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
2673 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
2674 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
2675 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
2676 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
2677 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
2678 (grub_ext2_sblock): New members for journal support.
2679 (grub_ext3_journal_header): New structure.
2680 (grub_ext3_journal_revoke_header): Likewise.
2681 (grub_ext3_journal_block_tag): Likewise.
2682 (grub_ext3_journal_sblock): Likewise.
2683 (grub_fshelp_node): New members logfile and journal.
2684 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
2685 grub_fshelp_map_block to get real block number.
2686 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
2688 (grub_ext2_read_inode): Likewise.
2689 (grub_ext3_get_journal): New function.
2690 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
2691 (grub_ext2_close): Release memory used by journal.
2693 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
2694 (REISERFS_MAGIC_DESC_BLOCK): New macro.
2695 (grub_reiserfs_transaction_header): Renamed to
2696 grub_reiserfs_description_block, replace field data with real_blocks.
2697 (grub_reiserfs_commit_block): New structure.
2698 (grub_reiserfs_data): New member journal.
2699 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
2701 (grub_reiserfs_read_symlink): Likewise.
2702 (grub_reiserfs_iterate_dir): Likewise.
2703 (grub_reiserfs_open): Likewise.
2704 (grub_reiserfs_read): Likewise.
2705 (grub_reiserfs_get_journal): New function.
2706 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
2707 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
2708 using grub_reiserfs_get_journal.
2709 (grub_reiserfs_close): Release memory used by journal.
2711 * fs/affs.c (grub_affs_read_block): Change block type to
2712 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
2714 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
2716 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
2718 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
2720 * fs/udf.c (grub_udf_read_block): Change block type to
2721 grub_disk_addr_t. Use type cast to avoid warning.
2723 * fs/xfs.c (grub_xfs_read_block): Likewise.
2725 2008-05-16 Christian Franke <franke@computer.org>
2727 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
2728 to ensure that break with ESC will always work.
2729 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
2730 Remove ESC from keyboard queue.
2732 2008-05-16 Christian Franke <franke@computer.org>
2734 * util/biosdisk.c: [__CYGWIN__] Add includes.
2735 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
2736 (get_os_disk): Move variable declarations to OS specific
2737 parts to avoid warning.
2738 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
2739 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
2740 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
2742 * util/getroot.c: [__CYGWIN__] Add includes.
2743 (strip_extra_slashes): Fix "/" case.
2744 [__CYGWIN__] (get_win32_path): New function.
2745 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
2746 [__CYGWIN__] (find_root_device): Disable.
2747 [__CYGWIN__] (get_bootsec_serial): New function.
2748 [__CYGWIN__] (find_cygwin_root_device): Likewise.
2749 [__linux__] (grub_guess_root_device): Add early returns to simplify
2751 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
2752 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
2753 check for Linux only.
2755 2008-05-15 Bean <bean123ch@gmail.com>
2757 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
2758 keyboard hang problem in apple's intel mac.
2760 2008-05-09 Robert Millan <rmh@aybabtu.com>
2762 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
2764 * util/grub-mkdevicemap.c (get_virtio_disk_name)
2765 (make_device_map): Likewise.
2766 Reported by Aurelien Jarno <aurel32@debian.org>
2768 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
2770 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
2771 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
2772 (make_device_map): Output entries for xvd type disks.
2774 2008-05-07 Robert Millan <rmh@aybabtu.com>
2776 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
2778 * util/grub-mkdevicemap.c (get_cciss_disk_name)
2779 (make_device_map): Likewise.
2780 Reported by Roland Dreier <rdreier@cisco.com>
2782 2008-05-07 Robert Millan <rmh@aybabtu.com>
2784 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
2785 grub_strstr() call. Correct a few mistakes in failure path handling.
2787 2008-05-06 Robert Millan <rmh@aybabtu.com>
2789 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2790 Do not print a trailing slash (therefore, the root directory is an
2792 (convert_system_path_to_grub_path): Do not remove trailing slash
2793 from make_system_path_relative_to_its_root() output.
2795 * util/i386/pc/grub-install.in: Add trailing slash to output from
2796 make_system_path_relative_to_its_root().
2798 2008-05-06 Robert Millan <rmh@aybabtu.com>
2800 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
2801 ensures that output lines aren't intermangled with those sent to
2802 stderr (via grub_util_info()).
2803 * util/grub-probe.c (grub_refresh): Likewise.
2804 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
2806 2008-05-05 Christian Franke <franke@computer.org>
2808 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
2809 Add Cygwin device names.
2810 (get_ide_disk_name) [__CYGWIN__]: Likewise.
2811 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
2812 (check_device): Return error instead of success on empty name.
2813 (make_device_map): Move label inside linux specific code to
2814 prevent compiler warning.
2816 2008-04-30 Robert Millan <rmh@aybabtu.com>
2818 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
2819 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
2821 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
2823 2008-04-29 Robert Millan <rmh@aybabtu.com>
2825 * docs/grub.cfg: New file (example GRUB configuration).
2827 2008-04-26 Robert Millan <rmh@aybabtu.com>
2829 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
2830 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
2831 and `disk/ieee1275/nand.c'.
2833 2008-04-25 Bean <bean123ch@gmail.com>
2835 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
2838 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
2839 change the buffer size to 4096 for cdrom device.
2841 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
2843 (_linux_mod_SOURCES): New variable.
2844 (_linux_mod_CFLAGS): Likewise.
2845 (_linux_mod_LDFLAGS): Likewise.
2846 (linux_mod_SOURCES): Likewise.
2847 (linux_mod_CFLAGS): Likewise.
2848 (linux_mod_LDFLAGS): Likewise.
2849 (nand_mod_SOURCES): Likewise.
2850 (nand_mod_CFLAGS): Likewise.
2851 (nand_mod_LDFLAGS): Likewise.
2853 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
2854 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
2855 type property. (nand device in olpc don't have this property)
2857 * include/grub/disk.h (grub_disk_dev_id): New macro
2858 GRUB_DISK_DEVICE_NAND_ID.
2860 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
2862 (grub_rescue_cmd_initrd): Likewise.
2864 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
2865 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
2866 ofw_cif_handler and ofw_idt, adjust padding number.
2868 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
2869 GRUB_MACHINE_IEEE1275 is defined.
2871 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
2872 Use NESTED_FUNC_ATTR attribute on the hook parameter.
2874 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
2875 on nested function heap_init.
2876 (grub_upper_mem): New variable for i386-ieee1275.
2877 (grub_get_extended_memory): New function for i386-ieee1275.
2878 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
2880 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
2881 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
2884 * loader/i386/ieee1275/linux.c: New file.
2886 * loader/i386/ieee1275/linux_normal.c: New file.
2888 * disk/ieee1275/nand.c: New file.
2890 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
2892 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
2894 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
2896 2008-04-18 Robert Millan <rmh@aybabtu.com>
2898 Restructures early code path on ieee1275 to unify grub_main() as
2899 the first C function that is executed in every platform.
2901 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
2902 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
2904 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
2905 * kern/ieee1275/cmain.c (cmain): Rename to ...
2906 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
2907 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
2910 2008-04-18 Robert Millan <rmh@aybabtu.com>
2912 * util/update-grub.in: Fix syntax error when setting
2913 `GRUB_PRELOAD_MODULES'.
2914 Reported by Stephane Chazelas <stephane@artesyncp.com>
2916 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
2918 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
2919 section into account, newer toolchains generate unique build ids
2920 * configure.ac: remove the test for --build-id=none acceptance,
2921 we want build ids to be preserved
2922 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
2923 far from other sections don't cause the raw binary images grow
2926 2008-04-15 Robert Millan <rmh@aybabtu.com>
2928 * disk/lvm.c: Update copyright year.
2929 * kern/misc.c: Likewise.
2931 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
2933 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
2934 there is no memory left for physical volume name.
2936 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
2938 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
2939 volume name mapping to support bigger than 9 character names properly.
2941 2008-04-13 Robert Millan <rmh@aybabtu.com>
2943 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
2944 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
2946 2008-04-13 Christian Franke <franke@computer.org>
2948 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
2949 to create a floppy emulation boot CD when non emulation mode
2951 Enable Joliet CD filesystem extension.
2953 2008-04-13 Robert Millan <rmh@aybabtu.com>
2955 * kern/misc.c (grub_strncat): Fix off-by-one error.
2956 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
2958 * kern/env.c (grub_env_context_close): Clear current context, not
2960 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
2962 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
2964 2008-04-13 Robert Millan <rmh@aybabtu.com>
2966 Improve robustness when handling LVM.
2968 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
2969 (and leave `*p' unmodified).
2970 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
2972 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
2973 iterating through it.
2974 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
2976 (grub_lvm_scan_device): Check the return value (and fail gracefully
2977 when due) on each grub_lvm_getvalue() or grub_strstr() call.
2978 Don't assume `vg->pvs != NULL' when iterating through it.
2980 2008-04-13 Robert Millan <rmh@aybabtu.com>
2982 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
2983 * genmk.rb (partmap): New variable.
2984 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
2985 (#{partmap}): New target rule.
2986 * genpartmaplist.sh: New file.
2987 * Makefile.in (pkglib_DATA): Add partmap.lst.
2988 (partmap.lst): New target rule.
2989 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
2990 modules (including all partition maps), instead of preloading them.
2992 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
2994 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
2995 `linux-boot-prober' (if installed) to detect other operating
2996 systems which are installed on the computer and add them to
2998 * conf/common.rmk: Build and install 30_os-prober.
3000 2008-04-12 Robert Millan <rmh@aybabtu.com>
3002 * kern/powerpc/ieee1275/init.c: Move from here ...
3003 * kern/ieee1275/init.c: ... to here. Update all users.
3005 * kern/powerpc/ieee1275/cmain.c: Move from here ...
3006 * kern/ieee1275/cmain.c: ... to here. Update all users.
3008 * kern/powerpc/ieee1275/openfw.c: Move from here ...
3009 * kern/ieee1275/openfw.c: ... to here. Update all users.
3011 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
3012 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
3014 2008-04-10 Pavel Roskin <proski@gnu.org>
3016 * configure.ac: Always use "_cv_" in cache variables for
3017 compatibility with Autoconf 2.62.
3019 2008-04-07 Robert Millan <rmh@aybabtu.com>
3021 Revert grub/machine/init.h addition by Pavel (since it breaks on
3022 i386-ieee1275 and others):
3023 * util/i386/pc/misc.c: Remove grub/machine/init.h.
3024 * util/powerpc/ieee1275/misc.c: Likewise.
3026 2008-04-07 Robert Millan <rmh@aybabtu.com>
3028 * util/grub-probe.c (probe): Improve error message.
3030 2008-04-07 Robert Millan <rmh@aybabtu.com>
3032 * util/biosdisk.c (read_device_map): Skip devices that don't exist
3033 (this prevents the presence of a bogus entry from ruining the whole
3036 2008-04-06 Pavel Roskin <proski@gnu.org>
3038 * util/biosdisk.c: Include grub/util/biosdisk.h.
3039 * util/grub-fstest.c (execute_command): Make static.
3040 * util/grub-mkdevicemap.c (check_device): Likewise.
3041 * util/i386/pc/misc.c: Include grub/machine/init.h.
3042 * util/powerpc/ieee1275/misc.c: Likewise.
3043 * util/lvm.c: Include grub/util/lvm.h.
3044 * util/misc.c: Include grub/kernel.h, grub/misc.h and
3046 * util/raid.c: Include grub/util/raid.h.
3047 (grub_util_getdiskname): Make static.
3049 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3050 grub_hostfs_fini(), as they are called from grub_init_all() and
3051 grub_fini_all() respectively. This fixes an infinite loop in
3052 grub-fstest due to double registration of hostfs.
3053 Reported by Christian Franke <Christian.Franke@t-online.de>
3055 2008-04-05 Pavel Roskin <proski@gnu.org>
3057 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3058 all 8 functions. Otherwise, probe function 0 only.
3060 2008-04-04 Pavel Roskin <proski@gnu.org>
3062 * commands/lspci.c (grub_lspci_iter): Print the bus number
3065 * commands/lspci.c (grub_pci_classes): Fix typos.
3066 (grub_lspci_iter): Don't print func twice. Print vendor ID
3067 before device ID, as it's normally done.
3069 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3070 Fix signedness warnings.
3071 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3073 * util/ieee1275/get_disk_name.c: Include config.h so that
3074 _GNU_SOURCE is defined and getline() is declared. Mark an
3075 unused argument as such. Fix a signedness warning.
3077 2008-04-02 Pavel Roskin <proski@gnu.org>
3079 * genkernsyms.sh.in: Use more robust assignments for CC and
3080 srcdir. Quote srcdir.
3081 * gensymlist.sh.in: Likewise. Assert at the compile time that
3082 the symbol table is not empty.
3084 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3085 * fs/cpio.c (grub_cpio_read): Likewise.
3087 2008-04-01 Pavel Roskin <proski@gnu.org>
3089 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3090 * disk/host.c (grub_host_open): Likewise.
3091 * disk/loopback.c (grub_loopback_open): Likewise.
3092 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3093 disk->id as in disk/host.c, not a multi-character constant.
3095 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
3096 later is obsolete, potentially dangerous and sets a bad example.
3097 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3098 * util/misc.c (grub_util_get_image_size): Likewise.
3100 * disk/loopback.c (options): Improve help for "--partitions".
3102 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3103 options to align them with the short options, e.g. "echo -e".
3105 2008-03-31 Bean <bean123ch@gmail.com>
3107 * video/reader/png.c (grub_png_data): New member is_16bit and
3109 (grub_png_decode_image_header): Detect 16 bit png image.
3110 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3111 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3112 (grub_video_reader_png): Release memory occupied by image_data.
3114 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3116 (grub_nfs_mount): Skip the test for sector per cluster.
3118 * include/grub/ntfs.h (MAX_SPC): Removed.
3120 2008-03-31 Bean <bean123ch@gmail.com>
3122 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3123 (grub_probe_SOURCES): Add fs/afs.c.
3124 (grub_fstest_SOURCES): Likewise.
3125 (afs_mod_SOURCES): New variable.
3126 (afs_mod_CFLAGS): Likewise.
3127 (afs_mod_LDFLAGS): Likewise.
3129 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3130 (grub_emu_SOURCES): Likewise.
3132 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3134 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3136 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3138 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3140 * fs/afs.c: New file.
3142 2008-03-30 Pavel Roskin <proski@gnu.org>
3144 * disk/host.c: Include grub/misc.h to fix a warning.
3145 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3146 warnings about implicit declarations.
3148 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3150 * include/grub/i386/loader.h: Change declaration of
3151 grub_linux_boot() to match what grub_loader_set() expects.
3152 * util/getroot.c (grub_guess_root_device): Return const char* to
3154 * util/grub-probe.c (probe): Fix a warning about uninitialized
3155 abstraction_name variable.
3156 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3157 second argument as unused to fix a warning.
3159 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3160 missing grub_error() call.
3162 * util/update-grub_lib.in: Define datarootdir, since Autoconf
3163 2.60 and newer uses it to define datadir.
3165 * commands/sleep.c: Fix warning about implicit declaration.
3166 * disk/memdisk.c: Likewise.
3167 * loader/aout.c: Likewise.
3168 * loader/i386/bsd_normal.c: Likewise.
3169 * util/grub-probe.c: Likewise.
3171 * commands/i386/cpuid.c (has_longmode): Make static.
3172 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3173 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3175 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3176 GDT. This is more robust, as %ds can change.
3177 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3178 calling real_to_prot().
3179 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3181 2008-03-28 Pavel Roskin <proski@gnu.org>
3183 * kern/i386/pc/startup.S: Assert that uncompressed functions
3184 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3185 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3186 code, as they push parts of the code (error handlers) beyond
3187 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
3188 code as correctness and size.
3190 2008-03-28 Pavel Roskin <proski@gnu.org>
3192 * kern/i386/pc/startup.S
3193 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3194 data block address to the real mode, keep offset minimal. This
3195 works around a bug in AWARD BIOS on old Athlon systems, which
3196 makes CD detection hang.
3198 2008-03-26 Pavel Roskin <proski@gnu.org>
3200 * normal/color.c (grub_parse_color_name_pair): Make `name' a
3202 * include/grub/normal.h: Add grub_parse_color_name_pair()
3205 2008-03-24 Bean <bean123ch@gmail.com>
3207 * disk/i386/pc/biosdisk.c (cd_start): Removed.
3208 (cd_count): Removed.
3209 (cd_drive): New variable.
3210 (grub_biosdisk_get_drive): Don't check for (cdN) device.
3211 (grub_biosdisk_call_hook): Likewise.
3212 (grub_biosdisk_iterate): Change cdrom detection method.
3213 (grub_biosdisk_open): Replace cd_start with cd_drive.
3214 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
3215 detect cdrom device.
3217 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
3219 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
3220 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
3221 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
3222 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
3223 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
3224 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
3225 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
3226 (grub_biosdisk_cdrp): New structure.
3227 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
3229 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
3231 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
3234 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
3237 2008-03-20 Robert Millan <rmh@aybabtu.com>
3239 Remove 2 TiB limit in ata.mod.
3240 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
3241 (grub_ata_dumpinfo): Print sector count with 0x%llx.
3242 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
3243 grub_uint64_t instead of grub_uint32_t.
3245 2008-03-05 Bean <bean123ch@gmail.com>
3247 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
3248 (grub_multiboot): Set boot device.
3250 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
3252 2008-03-02 Bean <bean123ch@gmail.com>
3254 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
3257 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
3259 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
3262 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
3265 * docs/fdl.texi: New file.
3267 * docs/mdate-sh: New file. Copied from gnulib.
3268 * docs/texinfo.tex: Likewise.
3270 * config.guess: Updated from gnulib.
3271 * install-sh: Likewise.
3273 2008-02-28 Robert Millan <rmh@aybabtu.com>
3275 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
3276 (aout_mod_SOURCES): New variable.
3277 (aout_mod_CFLAGS): Likewise.
3278 (aout_mod_LDFLAGS): Likewise.
3280 * conf/i386-ieee1275.rmk: Likewise.
3282 2008-02-28 Robert Millan <rmh@aybabtu.com>
3284 * util/update-grub.in: Reorganise terminal validity check. Accept
3285 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
3286 Based on suggestion by Franklin PIAT.
3288 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
3290 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
3292 * util/getroot.c (grub_util_check_block_device): New function that
3293 returns the given argument if it is a block device and returns NULL else.
3294 * util/grub-probe.c (argument_is_device): New variable.
3295 (probe): Promote device_name from a variable to an argument. Receive
3296 device_name from grub_util_check_block_device() if path is NULL and from
3297 grub_guess_root_device() else. Do not free() device_name anymore.
3298 (options): Introduce new parameter '-d, --device'.
3299 (main): Add description of the new parameter to the help screen.
3300 Rename path variable to argument. Set argument_is_device if the '-d'
3301 option is given. Pass argument to probe() depending on
3304 2008-02-24 Bean <bean123ch@gmail.com>
3306 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
3307 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
3308 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
3309 (GRUB_ISO9660_VOLDESC_PART): Likewise.
3310 (GRUB_ISO9660_VOLDESC_END): Likewise.
3311 (grub_iso9660_primary_voldesc): New member escape.
3312 (grub_iso9660_data): New member joliet.
3313 (grub_iso9660_convert_string): New function.
3314 (grub_iso9660_mount): Detect joliet extension.
3315 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
3316 (grub_iso9660_iso9660_label): Likewise.
3318 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
3319 (grub_setup_SOURCES): Add fs/udf.c.
3320 (grub_fstest_SOURCES): Likewise.
3321 (udf_mod_SOURCES): New variable.
3322 (udf_mod_CFLAGS): Likewise.
3323 (udf_mod_LDFLAGS): Likewise.
3325 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3326 (grub_emu_SOURCES): Likewise.
3328 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3330 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3332 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3334 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3336 * fs/udf.c: New file.
3338 2008-02-24 Robert Millan <rmh@aybabtu.com>
3340 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3341 (normal/lexer.c_DEPENDENCIES): New variables.
3342 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3343 (normal/lexer.c_DEPENDENCIES): Likewise.
3344 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3345 (normal/lexer.c_DEPENDENCIES): Likewise.
3346 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3347 (normal/lexer.c_DEPENDENCIES): Likewise.
3348 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3349 (normal/lexer.c_DEPENDENCIES): Likewise.
3350 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3351 (normal/lexer.c_DEPENDENCIES): Likewise.
3353 2008-02-23 Robert Millan <rmh@aybabtu.com>
3355 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3356 since they were intended to be in hex. This didn't break previously
3357 because of a bug in gpt_partition_map_iterate() (see below).
3359 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3360 when checking the validity of GPT header.
3361 Remove `partno', since it always provides the same information as `i'.
3363 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
3365 * include/grub/efi/time.h: Fix a wrong comment.
3367 2008-02-19 Pavel Roskin <proski@gnu.org>
3369 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3372 2008-02-19 Bean <bean123ch@gmail.com>
3374 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3375 (aout_mod_SOURCES): New variable.
3376 (aout_mod_CFLAGS): Likewise.
3377 (aout_mod_LDFLAGS): Likewise.
3378 (_bsd_mod_SOURCES): New variable.
3379 (_bsd_mod_CFLAGS): Likewise.
3380 (_bsd_mod_LDFLAGS): Likewise.
3381 (bsd_mod_SOURCES): New variable.
3382 (bsd_mod_CFLAGS): Likewise.
3383 (bsd_mod_LDFLAGS): Likewise.
3385 * include/grub/aout.h: New file.
3387 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3389 * include/grub/i386/bsd.h: New file.
3391 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3394 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3395 function is called, so that it's possible to change it inside the hook.
3396 (grub_elf64_load): Likewise.
3397 (grub_elf_file): Don't close the file if elf header is not found.
3398 (grub_elf_close): Close the file if grub_elf_file fails (The new
3399 grub_elf_file won't close it).
3400 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3401 (grub_elf64_size): Likewise.
3403 * kern/i386/loader.S (grub_unix_real_boot): New function.
3405 * loader/aout.c: New file.
3407 * loader/i386/bsd.c: New file.
3409 * loader/i386/bsd_normal.c: New file.
3411 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3413 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3414 can test other formats.
3416 2008-02-19 Robert Millan <rmh@aybabtu.com>
3418 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3419 (grub_gpt_partition_type_empty): Redefine with macro from
3420 `<grub/gpt_partition.h>'.
3421 (gpt_partition_map_iterate): Adjust partition type comparison.
3423 Export `entry' as partmap-specific `part.data' struct.
3424 (grub_gpt_header, grub_gpt_partentry): Move from here ...
3426 * include/grub/gpt_partition.h (grub_gpt_header)
3427 (grub_gpt_partentry): ... to here (new file).
3429 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3431 (grub_gpt_partition_type_bios_boot): New const variable, defined
3432 with macro from `<grub/gpt_partition.h>'.
3434 (setup): Replace `first_start' with `embed_region', which keeps
3435 track of the embed region (and is partmap-agnostic).
3437 Replace find_first_partition_start() with find_usable_region(),
3438 which finds a usable region for embedding using partmap-specific
3439 knowledge (supports PC/MSDOS and GPT).
3441 Fix all assumptions that the embed region start at sector 1, using
3442 `embed_region.start' from now on. Similarly, use `embed_region.end'
3443 rather than `first_start' to calculate available size.
3445 In grub_util_info() message, replace "into after the MBR" with an
3446 indication of the specific sector our embed region starts at.
3448 2008-02-19 Robert Millan <rmh@aybabtu.com>
3450 * DISTLIST: Replace `commands/ieee1275/halt.c' and
3451 `commands/ieee1275/reboot.c' with `commands/halt.c' and
3452 `commands/reboot.c'.
3453 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3454 (halt_mod_SOURCES): Likewise.
3455 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3456 (halt_mod_SOURCES): Likewise.
3458 2008-02-17 Christian Franke <franke@computer.org>
3460 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3462 2008-02-17 Robert Millan <rmh@aybabtu.com>
3464 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3465 set `first_start' to 0 for non-PC/MSDOS partition maps.
3467 2008-02-16 Robert Millan <rmh@aybabtu.com>
3469 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3470 do not assume partition map is PC/MSDOS before performing checks that
3471 are specific to that layout.
3473 2008-02-13 Robert Millan <rmh@aybabtu.com>
3475 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3476 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3477 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3479 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
3481 * configure.ac: Only a cosmetic change on the handling of
3482 -fno-stack-protector.
3484 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
3486 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3487 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3489 (grub_install_SOURCES): Add halt.mod and reboot.mod.
3490 (halt_mod_SOURCES): New variable.
3491 (halt_mod_CFLAGS): Likewise.
3492 (halt_mod_LDFLAGS): Likewise.
3493 (reboot_mod_SOURCES): Likewise.
3494 (reboot_mod_CFLAGS): Likewise.
3495 (reboot_mod_LDFLAGS): Likewise.
3497 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3498 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3500 (halt_mod_SOURCES): Likewise.
3501 (reboot_mod_SOURCES): Likewise.
3503 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3504 commands/i386/pc/reboot.c by commands/reboot.c.
3505 (reboot_mod_SOURCES): Likewise.
3507 * commands/i386/pc/reboot.c: merge this file ...
3509 * commands/ieee1275/reboot.c: ... and this file ...
3511 * commands/reboot.c: ... to this file.
3512 Add some precompiler directive to include the correct header for
3515 * commands/ieee1275/halt.c: move this file ...
3517 * commands/halt.c: ... to here.
3518 Add some precompiler directive to include the correct header for
3521 * include/grub/efi/efi.h (grub_reboot): New function declaration.
3522 (grub_halt): Likewise.
3524 * kern/efi/efi.c (grub_reboot): New function.
3525 (grub_halt): Likewise.
3527 2008-02-12 Robert Millan <rmh@aybabtu.com>
3529 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
3530 /dev (like it is done for /dev/mapper). This doesn't provide support
3531 for EVMS, but at least it is now easy to identify the problem when it
3534 2008-02-11 Robert Millan <rmh@aybabtu.com>
3536 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
3537 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
3538 comparing it with -1, not 0.
3540 2008-02-10 Robert Millan <rmh@aybabtu.com>
3542 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
3544 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3545 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
3547 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
3548 `disk/lvm.c' to the end of the list.
3549 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3550 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3552 2008-02-10 Robert Millan <rmh@aybabtu.com>
3554 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
3555 grub_print_error() instead. This will let user know why we're entering
3557 Based on suggestions from Sam Morris.
3559 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
3561 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
3562 on remaining N args, instead of "--" arg N times.
3564 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
3566 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
3567 (fill_with_default_glyph): Changed to use unknown_glyph for fill
3568 pattern for unknown glyphs.
3570 2008-02-09 Robert Millan <rmh@aybabtu.com>
3572 * configure.ac: Probe for `help2man'.
3573 * Makefile.in (builddir): New variable.
3574 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
3575 or otherwise add a few flags/options to it.
3576 (install-local): For every executable utility or script that is
3577 installed, invoke $(HELP2MAN) to install a manpage based on --help
3580 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
3581 that it doesn't prevent --help from working in build tree.
3583 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
3584 with `bug-grub@gnu.org'.
3585 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
3586 * util/update-grub.in (usage): New function.
3587 Implement proper argument check, with support for --help and --version
3588 (as well as existing -y).
3590 2008-02-09 Christian Franke <franke@computer.org>
3592 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
3593 avoid overwriting previous output.
3594 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
3596 2008-02-09 Robert Millan <rmh@aybabtu.com>
3598 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
3601 2008-02-09 Robert Millan <rmh@aybabtu.com>
3603 * commands/sleep.c: New file.
3604 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
3605 (sleep_mod_SOURCES): New variable.
3606 (sleep_mod_CFLAGS): Likewise.
3607 (sleep_mod_LDFLAGS): Likewise.
3609 2008-02-09 Robert Millan <rmh@aybabtu.com>
3611 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
3612 situations in which we can deduce the RAID size and the superblock
3615 2008-02-09 Robert Millan <rmh@aybabtu.com>
3617 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
3618 and return a grub_diskmemberlist_t composed of LVM physical volumes.
3619 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
3621 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
3622 and return a grub_diskmemberlist_t composed of physical array members.
3623 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
3625 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
3627 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
3628 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
3629 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
3631 * util/grub-probe.c (probe): Move partmap probing code from here ...
3632 (probe_partmap): ... to here.
3633 (probe): Use probe_partmap() once for the disk we're probing, and
3634 additionally, when such disk contains a memberlist() struct member,
3635 once for each disk that is contained in the structure returned by
3638 2008-02-09 Robert Millan <rmh@aybabtu.com>
3640 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
3641 environment variable to 'all' in order to obtain debug output from
3643 * util/i386/pc/grub-setup.c (main): Likewise.
3645 2008-02-08 Robert Millan <rmh@aybabtu.com>
3647 * disk/raid.c (grub_raid_scan_device): Check for
3648 `array->device[sb.this_disk.number]' rather than for
3649 `array->device[sb.this_disk.number]->name', since the latter is not
3650 guaranteed to be accessible.
3652 2008-02-08 Robert Millan <rmh@aybabtu.com>
3654 * disk/raid.c: Update copyright.
3655 * fs/cpio.c: Likewise.
3656 * include/grub/raid.h: Likewise.
3657 * loader/i386/pc/multiboot.c: Likewise.
3658 * util/hostfs.c: Likewise.
3660 2008-02-08 Robert Millan <rmh@aybabtu.com>
3662 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
3663 to a grub_disk_t array.
3664 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
3666 (grub_raid_scan_device): Replace `device[x].name' accesses with
3667 `device[x]->name'. Simplify initialization of `array->device[x]'.
3669 2008-02-08 Robert Millan <rmh@aybabtu.com>
3671 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
3672 grub_dprintf() calls.
3673 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
3676 2008-02-07 Christian Franke <franke@computer.org>
3678 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
3679 instead of fseek and ftell to support large files.
3680 (grub_hostfs_read): Likewise.
3682 2008-02-07 Robert Millan <rmh@aybabtu.com>
3684 Patch from Jeroen Dekkers.
3685 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
3686 failure, since successfully reading all array members might not be
3689 2008-02-06 Robert Millan <rmh@aybabtu.com>
3691 * util/grub-probe.c (probe): Simplify partmap probing (with the
3692 assumption that the first word up to the underscore equals to
3695 2008-02-06 Christian Franke <franke@computer.org>
3697 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
3698 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
3699 last block of a cpio or tar stream.
3700 Check for "TRAILER!!!" instead of any empty data
3701 block to detect last block of a cpio stream.
3702 (grub_cpio_dir): Fix constness of variable np.
3703 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
3704 cpio or tar trailer is detected. This fixes a crash
3705 on open of a non existing file.
3707 2008-02-05 Bean <bean123ch@gmail.com>
3709 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
3711 (grub_multiboot_load_elf64): Likewise.
3712 (grub_multiboot): Initialize mbi structure.
3714 * util/grub-fstest.c: Don't include unused header file script.h.
3716 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
3718 (grub_fstest_SOURCES): Likewise.
3720 2008-02-05 Robert Millan <rmh@aybabtu.com>
3722 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
3723 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
3724 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
3725 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
3727 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
3728 (translation_table): Replace hardcoded values with macros
3729 provided by `<grub/term.h>'.
3731 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
3732 (keyboard_map): Correct/add a few values, with macros provided
3734 (keyboard_map_shift): Zero values that don't differ from their
3735 `keyboard_map' equivalents.
3736 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
3737 Discard the second scan code that is always sent by Caps lock.
3738 Only use `keyboard_map_shift' when it provides a non-zero value,
3739 otherwise fallback to `keyboard_map'.
3741 2008-02-04 Bean <bean123ch@gmail.com>
3743 * Makefile.in (enable_grub_fstest): New variable.
3745 * conf/common.rmk (grub_fstest_init.lst): New rule.
3746 (grub_fstest_init.h): Likewise.
3747 (grub_fstest_init.c): Likewise.
3748 (util/grub-fstest.c_DEPENDENCIES): New variable.
3749 (grub_fstest_SOURCES): Likewise.
3751 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
3753 * util/grub-fstest.c: New file.
3755 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3757 Make grub-setup handle a separate root device.
3759 * util/i386/pc/grub-setup.c (setup): Always open the root device,
3760 so that the root device can be compared with the destination
3762 When embedding the core image, if the root and destination devices
3763 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
3765 When not embedding, set ROOT_DRIVE to 0xFF.
3767 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3769 Add support for having a grub directory in a different drive. This
3770 is still only the data handling part.
3772 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
3773 (codestart): Save %dh in GRUB_ROOT_DRIVE.
3774 (grub_root_drive): New variable.
3776 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
3777 instead of GRUB_BOOT_DRIVE to construct a device name. Set
3778 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
3781 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
3783 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
3785 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
3787 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
3788 is bogus, because PXE booting does not specify any drive
3791 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
3792 am not sure if this is really correct.
3794 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
3795 is always identical to the boot drive when booting from a CD.
3797 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
3799 (root_drive): New variable.
3800 (real_start): Unconditionally set %dh to ROOT_DRIVE.
3801 (setup_sectors): Push %dx right after popping it, because %dh will
3803 (copy_buffer): Restore %dx.
3805 2008-02-03 Robert Millan <rmh@aybabtu.com>
3807 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
3808 use `cdboot.img' for cdrom images.
3810 2008-02-03 Robert Millan <rmh@aybabtu.com>
3812 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
3813 only setup gfxterm when `font' command has succeeded.
3815 2008-02-03 Robert Millan <rmh@aybabtu.com>
3817 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
3818 (grub_rescue_cmd_multiboot_loader)
3819 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
3821 2008-02-03 Pavel Roskin <proski@gnu.org>
3823 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
3824 %edx and %esi from stack only after grub_gate_a20() is called.
3825 grub_gate_a20() clobbers %edx.
3827 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3829 * configure.ac (AC_INIT): Bumped to 1.96.
3831 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
3832 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
3833 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
3834 video/readers/png.c.
3836 2008-02-03 Bean <bean123ch@gmail.com>
3838 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
3839 (cdboot_img_SOURCES): New variable.
3840 (cdboot_img_ASFLAGS): New variable.
3841 (cdboot_img_LDFLAGS): New variable.
3843 * boot/i386/pc/cdboot.S: New file.
3845 * disk/i386/pc/biosdisk.c (cd_start): New variable.
3846 (cd_count): Likewise.
3847 (grub_biosdisk_get_drive): Add support for cd device.
3848 (grub_biosdisk_call_hook): Likewise.
3849 (grub_biosdisk_iterate): Likewise.
3850 (grub_biosdisk_open): Likewise.
3851 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
3852 (grub_biosdisk_rw): Support reading from cd device.
3853 (GRUB_MOD_INIT): Iterate cd devices.
3855 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
3856 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
3857 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
3859 * kern/i386/pc/init.c (make_install_device): Check for cd device.
3861 2008-02-02 Robert Millan <rmh@aybabtu.com>
3863 * commands/read.c: New file.
3864 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
3865 (read_mod_SOURCES): New variable.
3866 (read_mod_CFLAGS): Likewise.
3867 (read_mod_LDFLAGS): Likewise.
3869 2008-02-02 Robert Millan <rmh@aybabtu.com>
3871 * normal/main.c (grub_normal_execute): Check for `menu->size' when
3872 determining whether menu has to be displayed.
3874 2008-02-02 Marco Gerards <marco@gnu.org>
3876 * bus/pci.c: New file.
3878 * include/grub/pci.h: Likewise.
3880 * include/grub/i386/pc/pci.h: Likewise.
3882 * commands/lspci.c: Likewise.
3884 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
3886 (pci_mod_SOURCES): New variable.
3887 (pci_mod_CFLAGS): Likewise.
3888 (pci_mod_LDFLAGS): Likewise.
3889 (lspci_mod_SOURCES): Likewise.
3890 (lspci_mod_CFLAGS): Likewise.
3891 (lspci_mod_LDFLAGS): Likewise.
3893 2008-02-02 Bean <bean123ch@gmail.com>
3895 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
3896 (grub_ufs_get_file_block): Fix indirect block calculation problem.
3898 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
3899 (grub_xfs_btree_node): New structure.
3900 (grub_xfs_btree_root): New structure.
3901 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
3902 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
3903 (GRUB_XFS_EXTENT_BLOCK): Likewise.
3904 (GRUB_XFS_EXTENT_SIZE): Likewise.
3905 (grub_xfs_read_block): Support btree format type.
3906 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
3907 Use directory block as basic unit.
3909 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
3911 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
3912 __attribute__ ((__regparm__ (1))).
3914 2008-02-01 Robert Millan <rmh@aybabtu.com>
3916 Correct a mistake in previous commit.
3918 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
3920 (normal/command.c_DEPENDENCIES): New variable.
3922 2008-02-01 Robert Millan <rmh@aybabtu.com>
3924 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
3926 (normal/command.c_DEPENDENCIES): New variable.
3927 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
3928 * conf/i386-ieee1275.rmk: Likewise.
3929 * conf/i386-linuxbios.rmk: Likewise.
3930 * conf/i386-pc.rmk: Likewise.
3931 * conf/sparc64-ieee1275.rmk: Likewise.
3932 * conf/powerpc-ieee1275.rmk: Likewise.
3933 (grub_emu_SOURCES): Add `fs/fshelp.c'.
3935 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
3937 2008-02-01 Robert Millan <rmh@aybabtu.com>
3939 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
3940 call at beginning of function.
3942 2008-01-31 Pavel Roskin <proski@gnu.org>
3944 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
3945 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
3946 (grub_mkrescue_SOURCES): Likewise.
3947 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
3949 2008-01-30 Robert Millan <rmh@aybabtu.com>
3951 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
3952 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
3953 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
3954 (grub_probe_SOURCES): ... to here.
3956 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
3957 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
3958 * conf/i386-ieee1275.rmk: Likewise.
3959 * conf/i386-linuxbios.rmk: Likewise.
3960 * conf/powerpc-ieee1275.rmk: Likewise.
3962 2008-01-30 Tristan Gingold <gingold@free.fr>
3964 * kern/rescue.c: Silently accept empty lines.
3966 2008-01-29 Bean <bean123ch@gmail.com>
3968 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
3969 (real_code_2): Code cleanup and change comment style.
3970 (move_memory): Avoid using 32-bit address mode.
3972 2008-01-29 Bean <bean123ch@gmail.com>
3974 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
3975 (png_mod_SOURCES): New variable.
3976 (png_mod_CFLAGS): Likewise.
3977 (png_mod_LDFLAGS): Likewise.
3979 * video/readers/png.c: New file.
3981 2008-01-28 Robert Millan <rmh@aybabtu.com>
3983 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
3984 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
3985 `ifndef GRUB_MOD_GAP' hack.
3986 * util/elf/grub-mkimage.c (add_segments): Likewise.
3988 2008-01-27 Robert Millan <rmh@aybabtu.com>
3990 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
3991 `GRUB_MOD_GAP' for platforms in which it's not defined.
3992 * util/elf/grub-mkimage.c (add_segments): Likewise.
3994 2008-01-27 Robert Millan <rmh@aybabtu.com>
3996 Get grub-emu to build again (including parallel builds).
3998 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
4000 (util/grub-emu.c_DEPENDENCIES): ... this, ...
4001 (normal/execute.c_DEPENDENCIES): ... this, ...
4002 (grub-emu_DEPENDENCIES): ... and this.
4004 * conf/i386-efi.rmk: Likewise.
4005 * conf/i386-linuxbios.rmk: Likewise.
4006 * conf/i386-ieee1275.rmk: Likewise.
4007 * conf/powerpc-ieee1275.rmk: Likewise.
4008 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
4010 2008-01-27 Robert Millan <rmh@aybabtu.com>
4012 * NEWS: Add a few items.
4014 2008-01-27 Robert Millan <rmh@aybabtu.com>
4016 Fix parallel builds with grub-emu. Based on earlier commit for
4017 grub-probe and grub-setup.
4019 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4020 (util/grub-emu.c_DEPENDENCIES): ... this.
4021 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4022 (util/grub-emu.c_DEPENDENCIES): ... this.
4023 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4024 (util/grub-emu.c_DEPENDENCIES): ... this.
4025 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4026 (util/grub-emu.c_DEPENDENCIES): ... this.
4027 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4028 (util/grub-emu.c_DEPENDENCIES): ... this.
4030 2008-01-27 Pavel Roskin <proski@gnu.org>
4032 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4033 to create a gap between _end and the modules added to the image
4034 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
4035 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4036 * util/elf/grub-mkimage.c (add_segments): Likewise.
4038 2008-01-26 Pavel Roskin <proski@gnu.org>
4040 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4041 just return an error.
4043 2008-01-26 Bean <bean123ch@gmail.com>
4045 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4046 (grub_reiserfs_get_item): Save offset of the next item.
4047 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4049 2008-01-25 Robert Millan <rmh@aybabtu.com>
4051 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4052 make all filesystem sources appear together (possibly fixing omissions
4054 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4055 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4056 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4057 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4059 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
4061 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4062 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4063 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4064 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4066 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4067 (probe): Add a sanity check to make sure of our ability to read
4068 requested files when probing for filesystem type.
4070 * genmk.rb: Update copyright year (2007).
4072 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4073 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4074 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4075 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4076 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4077 : Remove function prototypes.
4079 2008-01-25 Robert Millan <rmh@aybabtu.com>
4081 Revert my previous commits (based on wrong assumption of how grub_errno
4084 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
4085 * kern/file.c (grub_file_open): Likewise.
4087 2008-01-24 Pavel Roskin <proski@gnu.org>
4089 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4090 that hang if GRUB tries to setup colors.
4091 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4092 colors for firmwares that don't support it.
4093 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4094 Recognize Open Hack'Ware, set flags to work around its
4097 2008-01-24 Robert Millan <rmh@aybabtu.com>
4099 * kern/file.c (grub_file_open): Do not account previous failures of
4100 unrelated functions when grub_errno is checked for.
4101 Reported by Oleg Strikov.
4103 2008-01-24 Bean <bean123ch@gmail.com>
4105 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4106 (grub_ufs_sblock): New member volume name.
4107 (grub_ufs_find_file): Fix string copy bug.
4108 (grub_ufs_label): Implement this function properly.
4110 * fs/hfs.c (grub_hfs_cnid_type): New enum.
4111 (grub_hfs_iterate_records): Use the correct file number for extents
4112 and catalog file. Fix problem in next index calculation.
4113 (grub_hfs_find_node): Replace recursive function call with loop.
4114 (grub_hfs_iterate_dir): Replace recursive function call with loop.
4116 2008-01-23 Robert Millan <rmh@aybabtu.com>
4118 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4119 `<grub/symbol.h>' and `<grub/multiboot.h>'.
4120 (grub_multiboot2_real_boot): New function prototype.
4122 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4123 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4125 * kern/i386/ieee1275/init.c (grub_os_area_addr)
4126 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4128 2008-01-23 Robert Millan <rmh@aybabtu.com>
4130 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4131 #ifdef'ed out grub_printf().
4133 2008-01-23 Robert Millan <rmh@aybabtu.com>
4135 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4136 grub_dprintf calls, since they make "debug=all" mode unusable.
4137 (grub_console_checkkey): Likewise.
4139 2008-01-23 Robert Millan <rmh@aybabtu.com>
4141 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4142 `term/i386/pc/at_keyboard.c'.
4143 (pkglib_MODULES): Add `serial.mod'.
4144 (serial_mod_SOURCES): New variable.
4145 (serial_mod_CFLAGS): Likewise.
4146 (serial_mod_LDFLAGS): Likewise.
4148 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
4149 `<grub/powerpc/ieee1275/console.h>'.
4150 (grub_keyboard_controller_init): New function prototype.
4151 (grub_console_checkkey): Likewise.
4152 (grub_console_getkey): Likewise.
4154 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4157 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4158 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4160 2008-01-23 Robert Millan <rmh@aybabtu.com>
4162 * kern/i386/pc/init.c (make_install_device): When memdisk image is
4163 present, "(memdisk)/boot/grub" becomes the default prefix.
4165 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4166 a memdisk tarball with all the modules. Add --overlay=DIR option that
4167 allows users to overlay additional files into the image.
4169 2008-01-23 Robert Millan <rmh@aybabtu.com>
4171 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4172 and `machine/memory.h'.
4173 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4174 (_multiboot_mod_SOURCES): New variable.
4175 (_multiboot_mod_CFLAGS): Likewise.
4176 (_multiboot_mod_LDFLAGS): Likewise.
4177 (multiboot_mod_SOURCES): Likewise.
4178 (multiboot_mod_CFLAGS): Likewise.
4179 (multiboot_mod_LDFLAGS): Likewise.
4181 * include/grub/i386/ieee1275/loader.h: New file.
4183 * include/grub/i386/ieee1275/machine.h: Likewise.
4185 * include/grub/i386/ieee1275/memory.h: Likewise.
4187 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4188 variable declaration.
4189 (grub_os_area_size): Likewise.
4191 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4192 (grub_lower_mem, grub_upper_mem): New variables.
4193 (grub_stop_floppy): New function (just to make
4194 grub_multiboot2_real_boot() happy).
4196 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
4197 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
4198 (grub_stop): New function.
4199 Include `"../realmode.S"' and `"../loader.S"'.
4201 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
4202 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
4204 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
4205 rely on grub_multiboot2_real_boot() for final boot.
4207 2008-01-22 Robert Millan <rmh@aybabtu.com>
4209 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
4210 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
4211 device that doesn't look like an SD card.
4212 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4213 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
4214 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
4215 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
4218 2008-01-22 Robert Millan <rmh@aybabtu.com>
4220 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
4221 avoid claiming over our own code.
4223 2008-01-22 Bean <bean123ch@gmail.com>
4225 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
4226 (jpeg_mod_SOURCES): New variable.
4227 (jpeg_mod_CFLAGS): Likewise.
4228 (jpeg_mod_LDFLAGS): Likewise.
4230 * video/readers/jpeg.c : New file.
4232 2008-01-22 Bean <bean123ch@gmail.com>
4234 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
4235 there are no more items.
4237 2008-01-21 Robert Millan <rmh@aybabtu.com>
4239 * kern/mm.c (grub_mm_init_region): Improve debug message.
4241 2008-01-21 Robert Millan <rmh@aybabtu.com>
4243 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
4244 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
4246 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
4248 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
4249 Indicates start of upper memory.
4250 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
4251 (generate_image): Abort when image size is big enough to corrupt
4254 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
4255 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
4256 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4257 instead of hardcoding 0xA0000.
4258 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
4259 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4260 instead of hardcoding 0xA0000.
4262 2008-01-21 Robert Millan <rmh@aybabtu.com>
4264 * disk/memdisk.c (memdisk_size): New variable.
4265 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
4267 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
4268 image to dynamic memory.
4269 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
4270 `memdisk_size'. Free memdisk block.
4272 2008-01-21 Robert Millan <rmh@aybabtu.com>
4274 Fix detection of very small filesystems (like tar).
4276 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
4277 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
4278 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
4279 a problem with this disk).
4281 2008-01-21 Robert Millan <rmh@aybabtu.com>
4283 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
4284 on grub_biosdisk_rw_standard() error.
4286 2008-01-21 Robert Millan <rmh@aybabtu.com>
4288 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
4290 * kern/elf.c: Likewise.
4291 * kern/ieee1275/ieee1275.c: Likewise.
4292 * kern/powerpc/ieee1275/openfw.c: Likewise.
4293 * term/ieee1275/ofconsole.c: Likewise.
4295 2008-01-21 Robert Millan <rmh@aybabtu.com>
4297 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
4299 * include/grub/kernel.h (grub_arch_memdisk_addr)
4300 (grub_arch_memdisk_size): Moved from here ...
4302 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
4303 (grub_arch_memdisk_size): ... to here.
4305 2008-01-21 Robert Millan <rmh@aybabtu.com>
4307 Mostly based on bugfix from Bean.
4309 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
4310 attribute with hook() parameter.
4311 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
4313 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
4314 attribute with hook() parameter.
4315 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
4318 2008-01-21 Robert Millan <rmh@aybabtu.com>
4320 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
4321 (pkglib_MODULES): Add `memdisk.mod'.
4322 (memdisk_mod_SOURCES): New variable.
4323 (memdisk_mod_CFLAGS): Likewise.
4324 (memdisk_mod_LDFLAGS): Likewise.
4326 * disk/memdisk.c: New file.
4328 * include/grub/disk.h (grub_disk_dev_id): Add
4329 `GRUB_DISK_DEVICE_MEMDISK_ID'.
4331 * include/grub/i386/pc/kernel.h
4332 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4333 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4334 (grub_kernel_image_size): New variable declaration.
4335 (grub_total_module_size): Likewise.
4336 (grub_memdisk_image_size): Likewise.
4338 * include/grub/i386/pc/memory.h
4339 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4341 * include/grub/kernel.h: Include `<grub/symbol.h>'.
4342 (grub_arch_memdisk_addr): New variable declaration.
4343 (grub_arch_memdisk_size): Likewise.
4345 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4346 (grub_arch_memdisk_size): Likewise.
4348 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4349 (codestart): Replace hardcoded `0x100000' with
4350 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4352 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4353 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
4354 not NULL, append the contents of the file it refers to, at the end of
4355 the compressed kernel image. Initialize `grub_memdisk_image_size'
4356 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4357 (options): Add "memdisk"|'m' option.
4358 (main): Parse --memdisk|-m option, and pass user-provided path as
4359 parameter to generate_image().
4361 2008-01-20 Robert Millan <rmh@aybabtu.com>
4363 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4364 grub_dprintf() calls from here ...
4365 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4367 2008-01-20 Robert Millan <rmh@aybabtu.com>
4369 Fix detection of "real mode" when /options/real-mode? doesn't exist.
4371 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4373 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4374 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4375 `GRUB_IEEE1275_FLAG_REAL_MODE'.
4376 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4378 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4379 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4381 2008-01-19 Robert Millan <rmh@aybabtu.com>
4383 Get rid of confusing function (superseded by
4384 `grub_ieee1275_get_integer_property')
4385 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4387 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4389 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4390 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4391 in native endianness from grub_ieee1275_get_integer_property().
4393 2008-01-19 Robert Millan <rmh@aybabtu.com>
4395 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4396 command after "shut-down", since implementations differ on which
4397 the command for halt is.
4399 2008-01-19 Robert Millan <rmh@aybabtu.com>
4401 * include/grub/i386/linuxbios/console.h: Add header protection.
4402 (grub_keyboard_controller_init): New function prototype.
4403 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4404 (KEYBOARD_COMMAND_READ): Likewise.
4405 (KEYBOARD_COMMAND_WRITE): Likewise.
4406 (KEYBOARD_SCANCODE_SET1): Likewise.
4407 (grub_keyboard_controller_write): New function.
4408 (grub_keyboard_controller_read): Likewise.
4409 (grub_keyboard_controller_init): Likewise.
4411 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4412 (grub_console_init): On coreboot/LinuxBIOS, call
4413 grub_keyboard_controller_init().
4415 2008-01-19 Robert Millan <rmh@aybabtu.com>
4417 PowerPC changes provided by Pavel Roskin.
4419 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4420 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4421 don't rely on cmain() doing it.
4422 * kern/i386/ieee1275/startup.S (_start): Store %eax in
4423 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4425 2008-01-16 Robert Millan <rmh@aybabtu.com>
4427 * include/grub/i386/linuxbios/memory.h
4428 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4429 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4430 receive `table_header' as argument. Instead, probe for it in the
4431 known memory ranges where it can be present.
4432 (grub_available_iterate): Do not pass a fixed `table_header' address
4433 to grub_linuxbios_table_iterate().
4435 2008-01-15 Robert Millan <rmh@aybabtu.com>
4437 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4438 * conf/i386-ieee1275.rmk: New file.
4439 * include/grub/i386/ieee1275/console.h: Likewise.
4440 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4441 * include/grub/i386/ieee1275/kernel.h: Likewise.
4442 * include/grub/i386/ieee1275/time.h: Likewise.
4443 * kern/i386/ieee1275/init.c: Likewise.
4444 * kern/i386/ieee1275/startup.S: Likewise.
4446 2008-01-15 Robert Millan <rmh@aybabtu.com>
4448 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4449 when pointers are 32-bit (but still do set it to one when they are
4452 2008-01-15 Robert Millan <rmh@aybabtu.com>
4454 * include/grub/ieee1275/ieee1275.h
4455 (grub_ieee1275_get_integer_property): New function prototype.
4457 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4458 (grub_ieee1275_get_integer_property): New function. Wraps around
4459 grub_ieee1275_get_property() to handle endianness.
4461 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4462 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4464 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4465 (grub_map): Likewise.
4466 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4468 2008-01-15 Bean <bean123ch@gmail.com>
4470 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4471 (grub_script_execute_cmdline): Reset grub_errno.
4473 * normal/main.c (read_config_file): Reset grub_errno.
4475 * normal/parse.y (script_init): New.
4476 (script): Move function and menuentry here.
4478 (command): Add delimiter at the end of command.
4479 (commands): Adjust to match the new command.
4480 (commandblock): Remove grub_script_lexer_record_start.
4481 (menuentry): Add grub_script_lexer_record_start, use the new commands.
4482 (if): Use the new commands.
4484 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4486 2008-01-15 Robert Millan <rmh@aybabtu.com>
4488 * normal/menu.c (run_menu): Move timeout message from here ...
4489 (print_timeout): ... to here.
4490 (run_menu): Use print_timeout() once during initial draw to print
4491 the whole message, and again in every clock tick to update only
4492 the number of seconds.
4494 2008-01-15 Robert Millan <rmh@aybabtu.com>
4496 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4497 actual size of `available' from grub_ieee1275_get_property(), and
4498 restrict parsing to that bound.
4500 2008-01-15 Christian Franke <franke@computer.org>
4502 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4503 (argp_program_version): Remove variable.
4504 (argp_program_bug_address): Likewise.
4505 (options): Convert from struct argp_option to struct option.
4506 (struct arguments): Remove.
4507 (parse_opt): Remove.
4508 (usage): New function.
4509 (main): Replace struct args members by simple variables.
4510 Replace argp_parse() by getopt_long().
4511 Add switch to evaluate options.
4512 Add missing "(...)" around root_dev in prefix string.
4514 2008-01-14 Robert Millan <rmh@aybabtu.com>
4516 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4517 for grub_ieee1275_exit(), in order to improve portability.
4519 2008-01-14 Robert Millan <rmh@aybabtu.com>
4521 * util/grub.d/10_linux.in (prefix): Define.
4522 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
4524 2008-01-13 Pavel Roskin <proski@gnu.org>
4526 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
4527 grub_errno if no errors have been detected.
4529 2008-01-12 Robert Millan <rmh@aybabtu.com>
4531 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
4532 (grub_util_get_dev_abstraction): New function prototype.
4534 * util/getroot.c: Include `<grub/util/getroot.h>'
4535 (grub_util_get_grub_dev): Move detection of abstraction type to ...
4536 (grub_util_get_dev_abstraction): ... here (new function).
4538 * util/grub-probe.c: Convert PRINT_* to an enum. Add
4539 `PRINT_ABSTRACTION'.
4540 (probe): Probe for abstraction type when requested.
4541 (main): Understand `--target=abstraction'.
4543 * util/i386/efi/grub-install.in: Add abstraction module to core
4544 image when it is found to be necessary.
4545 * util/i386/pc/grub-install.in: Likewise.
4546 * util/powerpc/ieee1275/grub-install.in: Likewise.
4548 * util/update-grub_lib.in (font_path): Return system path without
4549 converting to GRUB path.
4550 * util/update-grub.in: Convert system path returned by font_path()
4551 to a GRUB path. Use `grub-probe -t abstraction' to determine what
4552 abstraction module is needed for loading fonts (if any). Export
4553 that as `GRUB_PRELOAD_MODULES'.
4554 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
4557 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
4559 Remove some unused code from reiserfs.
4561 * fs/reiserfs.c (struct grub_reiserfs_key)
4562 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
4563 (struct grub_reiserfs_node_body): Removed.
4564 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4566 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4568 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4570 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4572 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4574 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
4576 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4577 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4578 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4580 2008-01-10 Robert Millan <rmh@aybabtu.com>
4582 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
4583 Determines if a file is garbage left by packaging systems, etc.
4584 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
4585 for processing /etc/grub.d scripts.
4586 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
4587 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
4588 as a condition for processing Linux images.
4590 2008-01-10 Pavel Roskin <proski@gnu.org>
4592 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
4593 to compile reiserfs.c on PowerPC.
4595 2008-01-10 Robert Millan <rmh@aybabtu.com>
4597 * kern/device.c (grub_device_iterate): Do not abort device iteration
4598 when one of the devices cannot be opened.
4599 * kern/disk.c (grub_disk_open): Do not account previous failures of
4600 unrelated functions when grub_errno is checked for.
4602 2008-01-08 Robert Millan <rmh@aybabtu.com>
4604 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
4605 `! grub_linux_is_bzimage', change order of address comparison to make
4606 it more intuitive, and improve "too big zImage" error message.
4608 2008-01-08 Robert Millan <rmh@aybabtu.com>
4610 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
4611 `$(update-grub_DATA)'.
4612 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
4615 2008-01-07 Robert Millan <rmh@aybabtu.com>
4617 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
4618 which instruction is modified by grub-setup during installation
4619 (since it wasn't obvious by only looking at this file).
4621 2008-01-07 Robert Millan <rmh@aybabtu.com>
4623 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
4624 listing actual TODO items.
4626 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4628 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
4630 (grub_reiserfs_get_key_offset): Likewise.
4631 (grub_reiserfs_set_key_offset): Likewise.
4632 (grub_reiserfs_set_key_type): Likewise.
4633 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
4635 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
4636 better to remove the bitfield version completely.
4638 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4640 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
4641 allocated from the heap, due to the fshelp implementation.
4642 (grub_reiserfs_dir): Free NODE, due to the same reason.
4644 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4646 Mostly from Vincent Pelletier:
4648 * fs/reiserfs.c: New file.
4650 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
4651 (reiserfs_mod_SOURCES): New variable.
4652 (reiserfs_mod_CFLAGS): Likewise.
4653 (reiserfs_mod_LDFLAGS): Likewise.
4655 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
4656 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
4657 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
4660 2008-01-06 Robert Millan <rmh@aybabtu.com>
4662 * normal/color.c: Remove `<grub/env.h>'.
4664 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
4666 * include/grub/normal.h: Include <grub/env.h>.
4668 2008-01-05 Robert Millan <rmh@aybabtu.com>
4670 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
4671 usage example with `(hd0,1)'.
4672 Reported by Samuel Thibault.
4674 2008-01-05 Robert Millan <rmh@aybabtu.com>
4676 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
4677 (grub_linux_boot_zimage): Rename to ...
4678 (grub_linux_boot): ... this.
4679 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
4680 (grub_linux_boot_zimage): Conditionalize zImage copy.
4682 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
4683 (grub_linux_boot_bzimage): Remove prototype.
4684 (grub_linux_boot_zimage): Rename to ...
4685 (grub_linux_boot): ... this.
4687 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
4688 (grub_linux_boot): Remove function.
4690 2008-01-05 Robert Millan <rmh@aybabtu.com>
4692 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
4693 (grub_env_write_color_highlight): Likewise.
4694 (grub_wait_after_message): Likewise.
4696 * normal/color.c: New file.
4698 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4699 (normal_mod_DEPENDENCIES): Likewise.
4701 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4702 (normal_mod_DEPENDENCIES): Likewise.
4704 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4705 (normal_mod_DEPENDENCIES): Likewise.
4707 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4708 (normal_mod_DEPENDENCIES): Likewise.
4710 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
4711 for waiting after a message is printed.
4712 * normal/main.c (read_config_file): Likewise.
4713 (grub_normal_init): Register grub_env_write_color_normal() and
4714 grub_env_write_color_highlight() hooks. Mark `color_normal' and
4715 `color_highlight' variables as global.
4717 * normal/menu.c (grub_wait_after_message): New function.
4718 (grub_color_menu_normal): New variable. Replaces ...
4719 (GRUB_COLOR_MENU_NORMAL): ... this macro.
4720 (grub_color_menu_highlight): New variable. Replaces ...
4721 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
4722 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
4723 `GRUB_TERM_COLOR_STANDARD'.
4724 (print_message): Use `grub_setcolorstate' to reload colors. Rename
4725 `normal_code' and `highlight_code' to `old_color_normal' and
4726 `old_color_highlight', respectively.
4727 (grub_menu_init_page): Update colors when drawing the menu, based on
4728 `menu_color_normal' and `menu_color_highlight' variables.
4729 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
4730 a message is printed.
4732 2008-01-05 Robert Millan <rmh@aybabtu.com>
4734 * kern/env.c (grub_env_context_open): Propagate hooks for global
4735 variables to new context.
4737 * kern/main.c (grub_set_root_dev): Export `root' variable.
4739 2008-01-05 Robert Millan <rmh@aybabtu.com>
4741 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
4742 discs unconditionally, since udev and others have options to provide
4745 2008-01-05 Robert Millan <rmh@aybabtu.com>
4747 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
4749 2008-01-04 Christian Franke <franke@computer.org>
4751 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
4754 2008-01-03 Pavel Roskin <proski@gnu.org>
4756 * kern/i386/linuxbios/init.c: Put "void" to all function
4757 declarations with no arguments.
4758 * kern/powerpc/ieee1275/init.c: Likewise.
4759 * term/i386/pc/at_keyboard.c: Likewise.
4760 * term/i386/pc/vga_text.c: Likewise.
4761 * util/grub-mkdevicemap.c: Likewise.
4763 2008-01-02 Robert Millan <rmh@aybabtu.com>
4765 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
4766 message when loaded image is out of bounds.
4767 (grub_multiboot_load_elf64): Likewise.
4769 2008-01-02 Pavel Roskin <proski@gnu.org>
4771 * util/grub.d/10_linux.in: Try version without ".old" when
4772 looking for initrd. It's better to use initrd from the newer
4773 kernel of the same version than no initrd at all.
4775 2008-01-01 Robert Millan <rmh@aybabtu.com>
4777 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
4779 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
4781 * include/grub/video.h: Added grub_video_unmap_color and
4782 grub_video_get_active_render_target.
4783 (grub_video_adapter): Added unmap_color and get_active_render_target.
4785 * video/video.c: Added grub_video_unmap_color and
4786 grub_video_get_active_render_target.
4787 (grub_video_get_info): Changed method to accept NULL pointer as an
4788 argument to allow detection of active video adapter.
4790 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
4791 grub_video_vbe_unmap_color_int.
4792 Added grub_video_vbe_unmap_color and
4793 grub_video_vbe_get_active_render_target.
4794 (grub_video_vbe_adapter): Added unmap_color and
4795 get_active_render_target.
4797 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
4798 with grub_video_vbe_unmap_color_int.
4800 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
4801 (DEFAULT_NORMAL_COLOR): Likewise.
4802 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
4803 (DEFAULT_FG_COLOR): Removed.
4804 (DEFAULT_BG_COLOR): Likewise.
4805 (DEFAULT_CURSOR_COLOR): Changed value.
4806 (grub_virtual_screen): Added standard_color_setting,
4807 normal_color_setting, highlight_color_setting and term_color.
4808 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
4809 (bitmap_width): Added.
4810 (bitmap_height): Likewise.
4812 (set_term_color): Likewise.
4813 (grub_virtual_screen_setup): Changed to use new terminal coloring
4815 (grub_gfxterm_init): Added init for bitmap.
4816 (grub_gfxterm_fini): Added destroy for bitmap.
4817 (redraw_screen_rect): Updated to use background bitmap and new
4819 (scroll_up): Added optimization for case when there is no bitmap.
4820 (grub_gfxterm_cls): Fixed to use correct background color.
4821 (grub_virtual_screen_setcolorstate): Changed to use new terminal
4823 (grub_virtual_screen_setcolor): Likewise.
4824 (grub_virtual_screen_getcolor): Added.
4825 (grub_gfxterm_background_image_cmd): Likewise.
4826 (grub_video_term): Added setcolor and getcolor.
4827 (MOD_INIT): Added registration of background_image command.
4828 (MOD_TERM): Added unregistration for background_image command.
4830 2007-12-30 Pavel Roskin <proski@gnu.org>
4832 * loader/multiboot_loader.c: Fix multiboot command
4833 unregistration. Fix all typos in the word "multiboot".
4835 2007-12-29 Pavel Roskin <proski@gnu.org>
4837 * util/grub.d/10_linux.in: Refactor search for initrd. Add
4838 support for initrd names used in Fedora.
4840 2007-12-26 Bean <bean123ch@gmail.com>
4842 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
4843 (cpio_mod_SOURCES): New variable.
4844 (cpio_mod_CFLAGS): Likewise.
4845 (cpio_mod_LDFLAGS): Likewise.
4847 * fs/cpio.c: New file.
4849 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
4851 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4853 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4855 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4857 2007-12-25 Robert Millan <rmh@aybabtu.com>
4859 * include/grub/term.h (struct grub_term): Add `getcolor' function.
4860 (grub_getcolor): New function.
4862 * kern/term.c (grub_getcolor): New function.
4863 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
4864 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
4865 (print_entry): Set normal and highlight colors to
4866 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
4867 respectively, before printing and restore them to old
4869 (grub_menu_init_page): Likewise. Fill an additional colored space
4870 that would otherwise be left blank.
4872 * term/efi/console.c (grub_console_getcolor): New function.
4873 (struct grub_console_term.getcolor): New variable.
4874 * term/i386/pc/console.c (grub_console_getcolor): New function.
4875 (struct grub_console_term.getcolor): New variable.
4876 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
4877 (struct grub_console_term.getcolor): New variable.
4879 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
4880 (struct grub_console_term.setcolor): Remove variable.
4881 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
4882 (struct grub_console_term.setcolor): Remove variable.
4883 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
4884 (struct grub_console_term.setcolor): Remove variable.
4885 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
4886 (struct grub_console_term.setcolor): Remove variable.
4888 2007-12-25 Robert Millan <rmh@aybabtu.com>
4890 * configure.ac: Search for possible unifont.hex locations, and
4891 define UNIFONT_HEX if found.
4893 * Makefile.in (UNIFONT_HEX): Define variable.
4894 (DATA): Rename to ...
4895 (PKGLIB): ... this. Update all users.
4896 (PKGDATA): New variable.
4897 (pkgdata_IMAGES): Rename to ...
4898 (pkglib_IMAGES): ... this. Update all users.
4899 (pkgdata_MODULES): Rename to ...
4900 (pkglib_MODULES): ... this. Update all users.
4901 (pkgdata_PROGRAMS): Rename to ...
4902 (pkglib_PROGRAMS): ... this. Update all users.
4903 (pkgdata_DATA): Rename to ...
4904 (pkglib_DATA): ... this. Update all users.
4905 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
4906 (unicode.pff, ascii.pff): New rules.
4907 (all-local): Add `$(PKGDATA)' dependency.
4908 (install-local): Process `$(PKGDATA)'.
4910 * util/update-grub_lib.in (font_path): Search for *.pff files in
4911 a few more locations, including `${pkgdata}'.
4913 2007-12-23 Robert Millan <rmh@aybabtu.com>
4915 Patch from Bean <bean123ch@gmail.com>:
4916 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
4919 2007-12-21 Bean <bean123ch@gmail.com>
4921 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
4922 (ntfscomp_mod_SOURCES): New variable.
4923 (ntfscomp_mod_CFLAGS): Likewise.
4924 (ntfscomp_mod_LDFLAGS): Likewise.
4926 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
4927 (grub_probe_SOURCES): Likewise.
4928 (grub_emu_SOURCES): Likewise.
4930 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4931 (grub_emu_SOURCES): Likewise.
4933 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4934 (grub_emu_SOURCES): Likewise.
4936 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4937 (grub_emu_SOURCES): Likewise.
4939 * fs/ntfs.c (grub_ntfscomp_func): New variable.
4940 (read_run_list): Renamed to grub_ntfs_read_run_list.
4941 (decomp_nextvcn): Moved to ntfscomp.c.
4942 (decomp_getch): Likewise.
4943 (decomp_get16): Likewise.
4944 (decomp_block): Likewise.
4945 (read_block): Likewise.
4946 (read_data): Partially moved to ntfscomp.c.
4947 (fixup): Change unsigned to grub_uint16_t.
4948 (read_mft): Change unsigned long to grub_uint32_t.
4949 (read_attr): Likewise.
4950 (read_data): Likewise.
4951 (read_run_data): Likewise.
4952 (read_run_list): Likewise.
4953 (read_mft): Likewise.
4955 * fs/ntfscomp.c: New file.
4957 * include/grub/ntfs.h: New file.
4959 2007-12-16 Robert Millan <rmh@aybabtu.com>
4961 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
4962 IDE disk check, since Linux is known to support 20 IDE disks.
4963 Reported by Colin Watson.
4965 2007-12-15 Bean <bean123ch@gmail.com>
4967 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
4968 (lnxboot_img_SOURCES): New variable.
4969 (lnxboot_img_ASFLAGS): Likewise.
4970 (lnxboot_img_LDFLAGS): Likewise.
4972 * boot/i386/pc/lnxboot.S: New file.
4974 2007-11-24 Pavel Roskin <proski@gnu.org>
4976 * configure.ac: Test if '--build-id=none' is supported by the
4977 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
4978 objcopy to generate incorrect binary files (binutils
4979 2.17.50.0.18-1 as shipped by Fedora 8).
4980 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
4981 linking, so that build ID doesn't break the test.
4983 2007-11-24 Pavel Roskin <proski@gnu.org>
4985 * include/grub/i386/time.h: use "void" in the argument list
4987 * include/grub/powerpc/time.h: Likewise.
4988 * include/grub/sparc64/time.h: Likewise.
4990 2007-11-18 Christian Franke <franke@computer.org>
4992 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
4993 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
4994 This fixes the problem that function keys did not work in grub-emu.
4996 2007-11-18 Christian Franke <franke@computer.org>
4998 * disk/host.c (grub_host_open): Remove attribute unused from
4999 name parameter. Add check for "host". This fixes the problem
5000 that grub-emu does not find partitions.
5002 2007-11-18 Christian Franke <franke@computer.org>
5004 * util/hostfs.c (is_dir): New function.
5005 (grub_hostfs_dir): Handle missing dirent.d_type case.
5006 (grub_hostfs_read): Add missing fseek().
5007 (grub_hostfs_label): Clear label pointer. This fixes a crash
5008 of grub-emu on "ls (host)".
5010 2007-11-18 Christian Franke <franke@computer.org>
5012 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
5013 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
5014 to 64 bit boundary by default.
5016 2007-11-18 Bean <bean123ch@gmail.com>
5018 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5019 (hexdump_mod_SOURCES): New variable.
5020 (hexdump_mod_CFLAGS): Likewise.
5021 (hexdump_mod_LDFLAGS): Likewise.
5023 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5025 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5027 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5029 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5031 * include/grub/hexdump.h: New file.
5033 * commands/hexdump.c: New file.
5035 2007-11-10 Robert Millan <rmh@aybabtu.com>
5037 * commands/i386/pc/play.c (beep_off): Switch order of arguments
5038 in grub_outb() calls.
5039 (beep_on): Likewise.
5041 2007-11-10 Christian Franke <franke@computer.org>
5043 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5044 (grub_menu_run): Likewise.
5046 2007-11-10 Robert Millan <rmh@aybabtu.com>
5048 * include/grub/i386/efi/machine.h: New file.
5049 * include/grub/i386/linuxbios/machine.h: Likewise.
5050 * include/grub/i386/pc/machine.h: Likewise.
5051 * include/grub/powerpc/ieee1275/machine.h: Likewise.
5052 * include/grub/sparc64/ieee1275/machine.h: Likewise.
5054 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5055 (serial_hw_io_addr): New variable.
5056 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5057 instead of `(unsigned short *) 0x400'.
5059 2007-11-10 Bean <bean123ch@gmail.com>
5061 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5063 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5065 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5066 (vga_mod_SOURCES): Added.
5067 (vga_mod_CFLAGS): Likewise.
5068 (vga_mod_LDFLAGS): Likewise.
5070 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5072 (set_map_mask): Likewise.
5073 (set_read_map): Likewise.
5074 (set_read_address): Likewise.
5075 (vga_font): Removed variable.
5076 (get_vga_glyph): Removed function.
5077 (invalidate_char): Likewise.
5078 (write_char): Changed to use grub_font_get_glyph() for font
5080 (grub_vga_putchar): Likewise.
5081 (grub_vga_getcharwidth): Likewise.
5083 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5085 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5087 (pxeboot_img_LDFLAGS): Likewise.
5088 (diskboot_img_LDFLAGS): Likewise.
5089 (kernel_img_LDFLAGS): Likewise.
5091 2007-11-06 Robert Millan <rmh@aybabtu.com>
5093 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5094 in grub_outb() calls.
5095 (serial_hw_init): Likewise.
5097 2007-11-05 Robert Millan <rmh@aybabtu.com>
5099 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5100 spaces. Skip non-regular files.
5102 2007-11-05 Robert Millan <rmh@aybabtu.com>
5104 * kern/disk.c (grub_disk_firmware_fini)
5105 (grub_disk_firmware_is_tainted): New variables.
5107 * include/grub/disk.h (grub_disk_firmware_fini)
5108 (grub_disk_firmware_is_tainted): Likewise.
5110 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5111 (grub_disk_biosdisk_fini): ... to here.
5112 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5113 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5114 is set. Register grub_disk_biosdisk_fini() in
5115 `grub_disk_firmware_fini'.
5117 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5118 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5119 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5120 to finish existing firmware disk interface.
5122 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5123 (ata_mod_SOURCES): New variable.
5124 (ata_mod_CFLAGS): Likewise.
5125 (ata_mod_LDFLAGS): Likewise.
5127 2007-11-05 Robert Millan <rmh@aybabtu.com>
5129 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
5130 (grub_ata_wait): Reimplement using grub_millisleep().
5132 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5133 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5135 2007-11-03 Marco Gerards <marco@gnu.org>
5137 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5138 (CRTC_ADDR_PORT): New macro.
5139 (CRTC_DATA_PORT): Likewise.
5140 (CRTC_CURSOR): Likewise.
5141 (CRTC_CURSOR_ADDR_HIGH): Likewise.
5142 (CRTC_CURSOR_ADDR_LOW): Likewise.
5143 (update_cursor): New function.
5144 (grub_console_real_putchar): Call `update_cursor'.
5145 (grub_console_gotoxy): Likewise.
5146 (grub_console_cls): Set the default color when clearing the
5148 (grub_console_setcursor): Implemented.
5150 2007-11-03 Marco Gerards <marco@gnu.org>
5152 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5154 (grub_ata_pio_write): Likewise.
5156 (grub_atapi_identify): Wait after issuing an ATA command.
5157 (grub_atapi_packet): Likewise.
5158 (grub_ata_identify): Likewise.
5159 (grub_ata_readwrite): Likewise.
5161 2007-11-03 Marco Gerards <marco@gnu.org>
5163 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5164 (grub_ata_pio_write): Likewise.
5165 (grub_ata_readwrite): Use `grub_error', instead of
5166 returning `grub_errno'.
5168 2007-11-03 Marco Gerards <marco@gnu.org>
5170 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5171 grub_ata_pio_write once for every single sector, instead of for
5174 2007-10-31 Robert Millan <rmh@aybabtu.com>
5176 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5178 * conf/i386-linuxbios.rmk: New file.
5180 * kern/i386/pc/hardware.c: Likewise.
5181 * term/i386/pc/at_keyboard.c: Likewise.
5182 * term/i386/pc/vga_text.c: Likewise.
5184 * include/grub/i386/linuxbios/boot.h: Likewise.
5185 * include/grub/i386/linuxbios/console.h: Likewise.
5186 * include/grub/i386/linuxbios/init.h: Likewise.
5187 * include/grub/i386/linuxbios/kernel.h: Likewise.
5188 * include/grub/i386/linuxbios/loader.h: Likewise.
5189 * include/grub/i386/linuxbios/memory.h: Likewise.
5190 * include/grub/i386/linuxbios/serial.h: Likewise.
5191 * include/grub/i386/linuxbios/time.h: Likewise.
5193 * kern/i386/linuxbios/init.c: Likewise.
5194 * kern/i386/linuxbios/startup.S: Likewise.
5195 * kern/i386/linuxbios/table.c: Likewise.
5197 2007-10-31 Marco Gerards <marco@gnu.org>
5199 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
5200 (ata_mod_SOURCES): New variable.
5201 (ata_mod_CFLAGS): Likewise.
5202 (ata_mod_LDFLAGS): Likewise.
5204 * disk/ata.c: New file.
5206 * include/grub/disk.h (grub_disk_dev_id): Add
5207 `GRUB_DISK_DEV_ATA_ID'.
5209 2007-10-31 Robert Millan <rmh@aybabtu.com>
5211 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
5212 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
5214 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
5215 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
5217 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
5220 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
5222 2007-10-27 Robert Millan <rmh@aybabtu.com>
5224 * include/grub/types.h (ULONG_MAX): Define macro.
5226 2007-10-22 Robert Millan <rmh@aybabtu.com>
5228 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
5230 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
5232 2007-10-22 Robert Millan <rmh@aybabtu.com>
5234 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
5235 (pkgdata_MODULES): Add `biosdisk.mod'.
5236 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
5239 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
5240 (grub_biosdisk_init): Replace with ...
5241 (GRUB_MOD_INIT(biosdisk)): ... this.
5242 (grub_biosdisk_fini): Replace with ...
5243 (GRUB_MOD_FINI(biosdisk)): ... this.
5245 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
5246 (grub_machine_init): Remove call to grub_biosdisk_init().
5247 (grub_machine_fini): Remove call to grub_machine_fini().
5249 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
5251 2007-10-22 Robert Millan <rmh@aybabtu.com>
5253 * include/grub/time.h: New file.
5254 * include/grub/i386/time.h: Likewise.
5255 * include/grub/powerpc/time.h: Likewise.
5256 * include/grub/sparc64/time.h: Likewise.
5258 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
5260 (KERNEL_MACHINE_TIME_HEADER): ... this.
5261 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5263 (KERNEL_MACHINE_TIME_HEADER): ... this.
5264 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5266 (KERNEL_MACHINE_TIME_HEADER): ... this.
5268 * kern/i386/efi/init.c: Include `<grub/time.h>'.
5269 (grub_millisleep): New function.
5270 * kern/i386/pc/init.c: Include `<grub/time.h>'.
5271 (grub_millisleep): New function.
5272 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
5273 Remove `grub/machine/time.h' include.
5274 (grub_millisleep): New function.
5275 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
5276 Remove `grub/machine/time.h' include.
5277 (grub_millisleep): New function.
5279 * include/grub/misc.h (grub_div_roundup): New function.
5281 * kern/misc.c: Include `<grub/time.h>'.
5282 (grub_millisleep_generic): New function.
5284 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
5286 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
5288 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
5289 `machine/time.h'. Add `time.h'.
5290 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5292 2007-10-21 Robert Millan <rmh@aybabtu.com>
5294 * include/grub/misc.h (grub_max): New function.
5296 2007-10-21 Robert Millan <rmh@aybabtu.com>
5298 * util/misc.c (grub_util_info): Call fflush() before returning.
5300 2007-10-20 Robert Millan <rmh@aybabtu.com>
5302 * genmk.rb (Image): Copy `extra_flags' from here ...
5303 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
5305 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
5306 to `argc' and `args' arguments.
5308 2007-10-17 Robert Millan <rmh@aybabtu.com>
5310 * kern/i386/loader.S: New file.
5312 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
5313 * kern/i386/loader.S (grub_linux_prot_size)... to here.
5314 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
5315 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
5316 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
5317 * kern/i386/loader.S (grub_linux_real_addr)... to here.
5318 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
5319 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
5320 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
5321 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
5322 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5323 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5324 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5325 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5327 * kern/i386/realmode.S: New file.
5329 * kern/i386/pc/startup.S (protstack): Moved from here ...
5330 * kern/i386/realmode.S (protstack)... to here.
5331 * kern/i386/pc/startup.S (gdt): Moved from here ...
5332 * kern/i386/realmode.S (gdt)... to here.
5333 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5334 * kern/i386/realmode.S (prot_to_real)... to here.
5336 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5337 `kern/i386/realmode.S'.
5339 2007-10-17 Robert Millan <rmh@aybabtu.com>
5341 * include/grub/i386/loader.h: New file.
5343 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5344 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5345 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5346 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5347 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5348 * include/grub/i386/loader.h (grub_linux_prot_size)
5349 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5350 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5351 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5352 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5354 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5356 2007-10-15 Robert Millan <rmh@aybabtu.com>
5358 * normal/misc.c (grub_normal_print_device_info): Do not probe for
5359 filesystem when dev->disk is unset.
5360 Do probe for filesystem even when dev->disk->has_partitions is set.
5361 In case a filesystem is found, always report it.
5362 In case it isn't, if dev->disk->has_partitions is set, report that
5363 a partition table was found instead of reporting that no filesystem
5364 could be identified.
5366 2007-10-12 Robert Millan <rmh@aybabtu.com>
5368 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5369 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5371 * include/grub/types.h (grub_host_to_target16): New macro.
5372 (grub_host_to_target32): Likewise.
5373 (grub_host_to_target64): Likewise.
5374 (grub_target_to_host16): Likewise.
5375 (grub_target_to_host32): Likewise.
5376 (grub_target_to_host64): Likewise.
5378 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5380 (GRUB_MOD_ALIGN): ...this. Update all users.
5382 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5383 grub_host_to_target32.
5384 Replace grub_be_to_cpu32 with grub_target_to_host32.
5385 (load_modules): Likewise.
5386 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5387 Replace grub_be_to_cpu32 with grub_target_to_host32.
5388 Replace grub_cpu_to_be16 with grub_host_to_target16.
5389 Replace grub_cpu_to_be32 grub_host_to_target32.
5391 2007-10-12 Robert Millan <rmh@aybabtu.com>
5393 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5394 * util/elf/grub-mkimage.c: ... here.
5396 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
5397 `util/powerpc/ieee1275/grub-mkimage.c'.
5399 2007-10-07 Robert Millan <rmh@aybabtu.com>
5401 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5402 and make it easier to figure out.
5403 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5404 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5405 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5406 leave us with less than HEAP_MIN_SIZE total heap.
5407 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5409 2007-10-03 Robert Millan <rmh@aybabtu.com>
5411 * include/grub/i386/io.h: New file.
5412 * commands/i386/pc/play.c (inb): Removed.
5414 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5416 * term/i386/pc/serial.c (inb): Removed.
5418 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5420 * term/i386/pc/vga.c (inb): Removed.
5422 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5425 2007-10-02 Robert Millan <rmh@aybabtu.com>
5427 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5428 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5429 Reported by Marcin Kurek.
5431 2007-09-07 Robert Millan <rmh@aybabtu.com>
5433 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5434 SmartFirmware version updates (as released by Sven Luther), and avoid
5435 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5436 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5439 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5442 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5443 when merging two regions.
5445 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5447 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5448 * normal/completion.c (grub_normal_do_completion): Likewise.
5449 Reported by Hitoshi Ozeki.
5451 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5453 Do not use devices at boot in chainloading.
5455 * loader/i386/pc/chainloader.c (boot_drive): New variable.
5456 (boot_part_addr): Likewise.
5457 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5458 with BOOT_DRIVE and BOOT_PART_ADDR.
5459 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5460 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5462 2007-08-29 Robert Millan <rmh@aybabtu.com>
5464 Patch from Simon Peter <dn.tlp@gmx.net>:
5465 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5466 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5467 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
5468 util/i386/pc/grub-setup.c_DEPENDENCIES.
5469 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5470 util/grub-probe.c_DEPENDENCIES.
5471 * conf/powerpc-ieee1275.rmk: Likewise.
5473 2007-08-28 Robert Millan <rmh@aybabtu.com>
5475 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
5476 to tell grub-mkdevicemap how to name devices.
5477 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5480 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5481 util/i386/get_disk_name.c.
5482 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5483 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5484 util/ieee1275/get_disk_name.c.
5486 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5488 * DISTLIST: Add util/i386/get_disk_name.c and
5489 util/ieee1275/get_disk_name.c.
5491 * util/grub-mkdevicemap.c: Replace device naming logic with
5492 grub_util_get_disk_name() calls.
5494 2007-08-20 Robert Millan <rmh@aybabtu.com>
5496 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5497 (so that it works for both plural and singular quantities).
5499 2007-08-05 Robert Millan <rmh@aybabtu.com>
5501 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5502 so that [xz] isn't taken into account when determining order.
5504 2007-08-02 Marco Gerards <marco@gnu.org>
5506 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5507 `include/multiboot2.h', `include/grub/elfload.h',
5508 `include/multiboot.h', `include/grub/multiboot.h',
5509 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5510 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5511 `kern/elf.c', `loader/multiboot_loader.c',
5512 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5513 `loader/i386/pc/multiboot2.c',
5514 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5515 `util/i386/pc/grub-mkrescue.in'. Remove
5516 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5517 `include/grub/i386/pc/util/biosdisk.h' and
5518 `include/grub/powerpc/ieee1275/multiboot.h'.
5520 2007-08-02 Bean <bean123ch@gmail.com>
5522 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
5523 (ntfs_mod_SOURCES): New variable.
5524 (ntfs_mod_CFLAGS): Likewise.
5525 (ntfs_mod_LDFLAGS): Likewise.
5527 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
5528 (grub_probe_SOURCES): Likewise.
5529 (grub_emu_SOURCES): Likewise.
5531 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5532 (grub_emu_SOURCES): Likewise.
5534 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5535 (grub_emu_SOURCES): Likewise.
5537 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
5539 * fs/ntfs.c: New file.
5541 2007-08-02 Bean <bean123ch@gmail.com>
5543 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
5545 * file.h (grub_file): Likewise.
5547 * fshelp.h (grub_fshelp_read_file): Likewise.
5549 * util/i386/pc/grub-setup.c (setup): Likewise.
5550 (save_first_sector): Likewise.
5551 (save_blocklists): Likewise.
5553 * fs/affs.c (grub_affs_read_file): Likewise.
5555 * fs/ext2.c (grub_ext2_read_file): Likewise.
5557 * fs/fat.c (grub_fat_read_data): Likewise.
5559 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
5561 * fs/hfs.c (grub_hfs_read_file): Likewise.
5563 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5565 * fs/jfs.c (grub_jfs_read_file): Likewise.
5567 * fs/minix.c (grub_minix_read_file): Likewise.
5569 * fs/sfs.c (grub_sfs_read_file): Likewise.
5571 * fs/ufs.c (grub_ufs_read_file): Likewise.
5573 * fs/xfs.c (grub_xfs_read_file): Likewise.
5575 * command/blocklist.c (read_blocklist): Likewise.
5576 (print_blocklist): Likewise.
5578 2007-08-02 Marco Gerards <marco@gnu.org>
5580 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
5583 * disk/host.c: New file.
5585 * util/hostfs.c: Likewise.
5587 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
5588 return `GRUB_ERR_BAD_FS'.
5589 * fs/sfs.c (grub_sfs_mount): Likewise.
5590 * fs/xfs.c (grub_xfs_mount): Likewise.
5592 * include/grub/disk.h (enum grub_disk_dev_id): Add
5593 `GRUB_DISK_DEVICE_HOST_ID'.
5595 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
5597 2007-07-24 Jerone Young <jerone@gmail.com>
5599 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
5600 modules for compilation.
5601 * conf/powerpc-ieee1275.rmk: Likewise.
5603 * include/multiboot.h: Move multiboot definitions to one file. Rename
5604 many definitions to not get grub specific.
5605 * include/multiboot2.h: Create header with multiboot 2 definitions.
5606 * include/grub/multiboot.h: Header for grub specific function
5607 prototypes and definitions.
5608 * include/grub/multiboot2.h: Likewise.
5609 * include/grub/multiboot_loader.h: Likewise.
5610 * include/grub/i386/pc/multiboot.h: Removed.
5611 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
5613 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
5614 and 2 to allow for one multiboot and module commands.
5615 * loader/multiboot2.c: Add multiboot2 functionality.
5616 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
5617 and definition names.
5618 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
5620 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
5621 ieee1275 specific multiboot2 code.
5623 * kern/i386/pc/startup.S: Change headers and definition names for
5624 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
5626 2007-07-22 Robert Millan <rmh@aybabtu.com>
5628 * geninitheader.sh: Process file specified in first parameter rather
5629 than hardcoding grub_modules_init.lst.
5630 * geninit.sh: Likewise. Also, construct header name dynamically rather
5631 than hardcoding grub_modules_init.h.
5633 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
5634 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
5635 grub_probe_init.[ch] and grub_setup_init.[ch].
5637 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
5638 grub_modules_init.h with grub_emu_init.h.
5639 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
5640 grub_probe_init.[ch] files.
5641 * conf/i386-efi.rmk: Likewise.
5642 * conf/i386-pc.rmk: Likewise.
5643 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
5644 grub_setup_init.[ch] files.
5646 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
5647 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
5648 to initialize modules rather than a list of hardcoded functions.
5649 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
5650 grub_init_all() to initialize modules rather than a list of hardcoded
5653 2007-07-22 Robert Millan <rmh@aybabtu.com>
5655 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
5656 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
5658 2007-07-22 Robert Millan <rmh@aybabtu.com>
5660 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5661 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
5662 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
5663 flag when running on SmartFirmware.
5664 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
5665 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
5668 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5669 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
5670 rather than decreasing it.
5672 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
5673 there's not enough space to do it, fail in the same way as when it
5674 can't be done because there are no partitions.
5676 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
5677 when nvsetenv failed.
5679 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5681 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
5682 because this rule is automatically generated.
5683 (grub-mkrescue): Removed for the same reason as above.
5685 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5687 Migrate to GNU General Public License Version 3.
5689 * COPYING: Replaced with the plain text version of GPLv3.
5691 * config.guess: Updated from gnulib.
5692 * config.sub: Likewise.
5694 * geninit.sh: Output a GPLv3 copyright notice.
5695 * geninitheader.sh: Likewise.
5696 * genmodsrc.sh: Likewise.
5697 * gensymlist.sh.in: Likewise.
5699 * boot/i386/pc/boot.S: Upgraded to GPLv3.
5700 * boot/i386/pc/diskboot.S: Likewise.
5701 * boot/i386/pc/pxeboot.S: Likewise.
5702 * commands/blocklist.c: Likewise.
5703 * commands/boot.c: Likewise.
5704 * commands/cat.c: Likewise.
5705 * commands/cmp.c: Likewise.
5706 * commands/configfile.c: Likewise.
5707 * commands/echo.c: Likewise.
5708 * commands/help.c: Likewise.
5709 * commands/ls.c: Likewise.
5710 * commands/search.c: Likewise.
5711 * commands/terminal.c: Likewise.
5712 * commands/test.c: Likewise.
5713 * commands/videotest.c: Likewise.
5714 * commands/i386/cpuid.c: Likewise.
5715 * commands/i386/pc/halt.c: Likewise.
5716 * commands/i386/pc/play.c: Likewise.
5717 * commands/i386/pc/reboot.c: Likewise.
5718 * commands/i386/pc/vbeinfo.c: Likewise.
5719 * commands/i386/pc/vbetest.c: Likewise.
5720 * commands/ieee1275/halt.c: Likewise.
5721 * commands/ieee1275/reboot.c: Likewise.
5722 * commands/ieee1275/suspend.c: Likewise.
5723 * disk/loopback.c: Likewise.
5724 * disk/lvm.c: Likewise.
5725 * disk/raid.c: Likewise.
5726 * disk/efi/efidisk.c: Likewise.
5727 * disk/i386/pc/biosdisk.c: Likewise.
5728 * disk/ieee1275/ofdisk.c: Likewise.
5729 * font/manager.c: Likewise.
5730 * fs/affs.c: Likewise.
5731 * fs/ext2.c: Likewise.
5732 * fs/fat.c: Likewise.
5733 * fs/fshelp.c: Likewise.
5734 * fs/hfs.c: Likewise.
5735 * fs/hfsplus.c: Likewise.
5736 * fs/iso9660.c: Likewise.
5737 * fs/jfs.c: Likewise.
5738 * fs/minix.c: Likewise.
5739 * fs/sfs.c: Likewise.
5740 * fs/ufs.c: Likewise.
5741 * fs/xfs.c: Likewise.
5742 * hello/hello.c: Likewise.
5743 * include/grub/acorn_filecore.h: Likewise.
5744 * include/grub/arg.h: Likewise.
5745 * include/grub/bitmap.h: Likewise.
5746 * include/grub/boot.h: Likewise.
5747 * include/grub/cache.h: Likewise.
5748 * include/grub/device.h: Likewise.
5749 * include/grub/disk.h: Likewise.
5750 * include/grub/dl.h: Likewise.
5751 * include/grub/elfload.h: Likewise.
5752 * include/grub/env.h: Likewise.
5753 * include/grub/err.h: Likewise.
5754 * include/grub/file.h: Likewise.
5755 * include/grub/font.h: Likewise.
5756 * include/grub/fs.h: Likewise.
5757 * include/grub/fshelp.h: Likewise.
5758 * include/grub/gzio.h: Likewise.
5759 * include/grub/hfs.h: Likewise.
5760 * include/grub/kernel.h: Likewise.
5761 * include/grub/loader.h: Likewise.
5762 * include/grub/lvm.h: Likewise.
5763 * include/grub/misc.h: Likewise.
5764 * include/grub/mm.h: Likewise.
5765 * include/grub/net.h: Likewise.
5766 * include/grub/normal.h: Likewise.
5767 * include/grub/parser.h: Likewise.
5768 * include/grub/partition.h: Likewise.
5769 * include/grub/pc_partition.h: Likewise.
5770 * include/grub/raid.h: Likewise.
5771 * include/grub/rescue.h: Likewise.
5772 * include/grub/script.h: Likewise.
5773 * include/grub/setjmp.h: Likewise.
5774 * include/grub/symbol.h: Likewise.
5775 * include/grub/term.h: Likewise.
5776 * include/grub/terminfo.h: Likewise.
5777 * include/grub/tparm.h: Likewise.
5778 * include/grub/types.h: Likewise.
5779 * include/grub/video.h: Likewise.
5780 * include/grub/efi/api.h: Likewise.
5781 * include/grub/efi/chainloader.h: Likewise.
5782 * include/grub/efi/console.h: Likewise.
5783 * include/grub/efi/console_control.h: Likewise.
5784 * include/grub/efi/disk.h: Likewise.
5785 * include/grub/efi/efi.h: Likewise.
5786 * include/grub/efi/pe32.h: Likewise.
5787 * include/grub/efi/time.h: Likewise.
5788 * include/grub/i386/linux.h: Likewise.
5789 * include/grub/i386/setjmp.h: Likewise.
5790 * include/grub/i386/types.h: Likewise.
5791 * include/grub/i386/efi/kernel.h: Likewise.
5792 * include/grub/i386/efi/loader.h: Likewise.
5793 * include/grub/i386/efi/time.h: Likewise.
5794 * include/grub/i386/pc/biosdisk.h: Likewise.
5795 * include/grub/i386/pc/boot.h: Likewise.
5796 * include/grub/i386/pc/chainloader.h: Likewise.
5797 * include/grub/i386/pc/console.h: Likewise.
5798 * include/grub/i386/pc/init.h: Likewise.
5799 * include/grub/i386/pc/kernel.h: Likewise.
5800 * include/grub/i386/pc/loader.h: Likewise.
5801 * include/grub/i386/pc/memory.h: Likewise.
5802 * include/grub/i386/pc/multiboot.h: Likewise.
5803 * include/grub/i386/pc/serial.h: Likewise.
5804 * include/grub/i386/pc/time.h: Likewise.
5805 * include/grub/i386/pc/vbe.h: Likewise.
5806 * include/grub/i386/pc/vbeblit.h: Likewise.
5807 * include/grub/i386/pc/vbefill.h: Likewise.
5808 * include/grub/i386/pc/vbeutil.h: Likewise.
5809 * include/grub/i386/pc/vga.h: Likewise.
5810 * include/grub/ieee1275/ieee1275.h: Likewise.
5811 * include/grub/ieee1275/ofdisk.h: Likewise.
5812 * include/grub/powerpc/libgcc.h: Likewise.
5813 * include/grub/powerpc/setjmp.h: Likewise.
5814 * include/grub/powerpc/types.h: Likewise.
5815 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
5816 * include/grub/powerpc/ieee1275/console.h: Likewise.
5817 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
5818 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
5819 * include/grub/powerpc/ieee1275/loader.h: Likewise.
5820 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
5821 * include/grub/powerpc/ieee1275/time.h: Likewise.
5822 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
5823 * include/grub/sparc64/libgcc.h: Likewise.
5824 * include/grub/sparc64/setjmp.h: Likewise.
5825 * include/grub/sparc64/types.h: Likewise.
5826 * include/grub/sparc64/ieee1275/console.h: Likewise.
5827 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
5828 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
5829 * include/grub/sparc64/ieee1275/time.h: Likewise.
5830 * include/grub/util/biosdisk.h: Likewise.
5831 * include/grub/util/getroot.h: Likewise.
5832 * include/grub/util/lvm.h: Likewise.
5833 * include/grub/util/misc.h: Likewise.
5834 * include/grub/util/raid.h: Likewise.
5835 * include/grub/util/resolve.h: Likewise.
5836 * io/gzio.c: Likewise.
5837 * kern/device.c: Likewise.
5838 * kern/disk.c: Likewise.
5839 * kern/dl.c: Likewise.
5840 * kern/elf.c: Likewise.
5841 * kern/env.c: Likewise.
5842 * kern/err.c: Likewise.
5843 * kern/file.c: Likewise.
5844 * kern/fs.c: Likewise.
5845 * kern/loader.c: Likewise.
5846 * kern/main.c: Likewise.
5847 * kern/misc.c: Likewise.
5848 * kern/mm.c: Likewise.
5849 * kern/parser.c: Likewise.
5850 * kern/partition.c: Likewise.
5851 * kern/rescue.c: Likewise.
5852 * kern/term.c: Likewise.
5853 * kern/efi/efi.c: Likewise.
5854 * kern/efi/init.c: Likewise.
5855 * kern/efi/mm.c: Likewise.
5856 * kern/i386/dl.c: Likewise.
5857 * kern/i386/efi/init.c: Likewise.
5858 * kern/i386/efi/startup.S: Likewise.
5859 * kern/i386/pc/init.c: Likewise.
5860 * kern/i386/pc/lzo1x.S: Likewise.
5861 * kern/i386/pc/startup.S: Likewise.
5862 * kern/ieee1275/ieee1275.c: Likewise.
5863 * kern/powerpc/cache.S: Likewise.
5864 * kern/powerpc/dl.c: Likewise.
5865 * kern/powerpc/ieee1275/cmain.c: Likewise.
5866 * kern/powerpc/ieee1275/crt0.S: Likewise.
5867 * kern/powerpc/ieee1275/init.c: Likewise.
5868 * kern/powerpc/ieee1275/openfw.c: Likewise.
5869 * kern/sparc64/cache.S: Likewise.
5870 * kern/sparc64/dl.c: Likewise.
5871 * kern/sparc64/ieee1275/init.c: Likewise.
5872 * kern/sparc64/ieee1275/openfw.c: Likewise.
5873 * loader/efi/chainloader.c: Likewise.
5874 * loader/efi/chainloader_normal.c: Likewise.
5875 * loader/i386/efi/linux.c: Likewise.
5876 * loader/i386/efi/linux_normal.c: Likewise.
5877 * loader/i386/pc/chainloader.c: Likewise.
5878 * loader/i386/pc/chainloader_normal.c: Likewise.
5879 * loader/i386/pc/linux.c: Likewise.
5880 * loader/i386/pc/linux_normal.c: Likewise.
5881 * loader/i386/pc/multiboot.c: Likewise.
5882 * loader/i386/pc/multiboot_normal.c: Likewise.
5883 * loader/powerpc/ieee1275/linux.c: Likewise.
5884 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5885 * normal/arg.c: Likewise.
5886 * normal/cmdline.c: Likewise.
5887 * normal/command.c: Likewise.
5888 * normal/completion.c: Likewise.
5889 * normal/execute.c: Likewise.
5890 * normal/function.c: Likewise.
5891 * normal/lexer.c: Likewise.
5892 * normal/main.c: Likewise.
5893 * normal/menu.c: Likewise.
5894 * normal/menu_entry.c: Likewise.
5895 * normal/misc.c: Likewise.
5896 * normal/parser.y: Likewise.
5897 * normal/script.c: Likewise.
5898 * normal/i386/setjmp.S: Likewise.
5899 * normal/powerpc/setjmp.S: Likewise.
5900 * normal/sparc64/setjmp.S: Likewise.
5901 * partmap/acorn.c: Likewise.
5902 * partmap/amiga.c: Likewise.
5903 * partmap/apple.c: Likewise.
5904 * partmap/gpt.c: Likewise.
5905 * partmap/pc.c: Likewise.
5906 * partmap/sun.c: Likewise.
5907 * term/gfxterm.c: Likewise.
5908 * term/terminfo.c: Likewise.
5909 * term/efi/console.c: Likewise.
5910 * term/i386/pc/console.c: Likewise.
5911 * term/i386/pc/serial.c: Likewise.
5912 * term/i386/pc/vesafb.c: Likewise.
5913 * term/i386/pc/vga.c: Likewise.
5914 * term/ieee1275/ofconsole.c: Likewise.
5915 * util/biosdisk.c: Likewise.
5916 * util/console.c: Likewise.
5917 * util/genmoddep.c: Likewise.
5918 * util/getroot.c: Likewise.
5919 * util/grub-emu.c: Likewise.
5920 * util/grub-mkdevicemap.c: Likewise.
5921 * util/grub-probe.c: Likewise.
5922 * util/lvm.c: Likewise.
5923 * util/misc.c: Likewise.
5924 * util/raid.c: Likewise.
5925 * util/resolve.c: Likewise.
5926 * util/update-grub.in: Likewise.
5927 * util/update-grub_lib.in: Likewise.
5928 * util/grub.d/00_header.in: Likewise.
5929 * util/grub.d/10_hurd.in: Likewise.
5930 * util/grub.d/10_linux.in: Likewise.
5931 * util/i386/efi/grub-install.in: Likewise.
5932 * util/i386/efi/grub-mkimage.c: Likewise.
5933 * util/i386/pc/grub-install.in: Likewise.
5934 * util/i386/pc/grub-mkimage.c: Likewise.
5935 * util/i386/pc/grub-mkrescue.in: Likewise.
5936 * util/i386/pc/grub-setup.c: Likewise.
5937 * util/i386/pc/misc.c: Likewise.
5938 * util/powerpc/ieee1275/grub-install.in: Likewise.
5939 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
5940 * util/powerpc/ieee1275/misc.c: Likewise.
5941 * video/bitmap.c: Likewise.
5942 * video/video.c: Likewise.
5943 * video/i386/pc/vbe.c: Likewise.
5944 * video/i386/pc/vbeblit.c: Likewise.
5945 * video/i386/pc/vbefill.c: Likewise.
5946 * video/i386/pc/vbeutil.c: Likewise.
5947 * video/readers/tga.c: Likewise.
5949 2007-07-02 Robert Millan <rmh@aybabtu.com>
5951 * conf/i386-efi.rmk: Replace obsolete reference to
5952 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
5953 with util/getroot.c.
5954 * conf/powerpc-ieee1275.rmk: Likewise.
5955 * conf/sparc64-ieee1275.rmk: Likewise.
5957 * util/grub-emu.c (main): Fix unchecked pointer handling.
5959 2007-07-02 Robert Millan <rmh@aybabtu.com>
5961 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
5962 invocation to fail, in order to support partition-less media.
5964 * util/i386/pc/grub-install.in: Likewise.
5966 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
5967 which fs or partmap modules are needed (akin to its sister scripts).
5969 Also use grub-probe to get rid of unportable /proc/mounts check.
5971 Print the same informational message that the other scripts do, before
5974 2007-06-23 Robert Millan <rmh@aybabtu.com>
5976 * util/update-grub_lib.in (font_path): New function. Determine whether
5977 a font file can be found and, if so, echo the GRUB path to it.
5979 * util/update-grub.in: Handle multiple terminals depending on user
5980 input, platform availability and font file presence. Propagate
5981 variables of our findings to /etc/grub.d/ children.
5983 * util/grub.d/00_header.in: Handle multiple terminals, based on
5984 environment setup by update-grub.
5986 2007-06-23 Robert Millan <rmh@aybabtu.com>
5988 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
5990 2007-06-21 Robert Millan <rmh@aybabtu.com>
5992 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
5993 indicate end of data section in kernel image.
5994 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
5995 GRUB_KERNEL_MACHINE_DATA_END.
5997 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
5999 * kern/i386/efi/startup.S: Likewise.
6001 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
6002 during image generation. Implement --prefix option to override this
6004 * util/i386/efi/grub-mkimage.c: Likewise.
6006 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
6007 code to make path relative to its root into a separate function.
6009 * util/i386/pc/grub-install.in: Use newly provided
6010 make_system_path_relative_to_its_root() to convert ${grubdir}, then
6011 pass the result to grub-install --prefix.
6013 2007-06-13 Robert Millan <rmh@aybabtu.com>
6015 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6017 * util/grub-emu.c: Use above definitions from misc.h instead of
6019 * util/grub-mkdevicemap.c: Likewise.
6020 * util/i386/pc/grub-setup.c: Likewise.
6021 * util/grub-probe.c: Likewise.
6022 (probe): Abort with grub_util_error() when either
6023 grub_guess_root_device or grub_util_get_grub_dev fails.
6025 2007-06-12 Robert Millan <rmh@aybabtu.com>
6027 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6029 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6031 * util/grub-probe.c (probe): Likewise for "drive_name".
6033 2007-06-11 Robert Millan <rmh@aybabtu.com>
6035 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6036 not just the cdrom one.
6038 2007-06-11 Robert Millan <rmh@aybabtu.com>
6040 * util/i386/pc/grub-mkrescue.in: Add "set -e".
6041 Add --pkglibdir=DIR option to override pkglibdir.
6042 Mention --image-type=TYPE in help output.
6043 Fix --grub-mkimage (it was a no-op).
6044 Abort gracefully when no parameter is given.
6046 2007-06-11 Robert Millan <rmh@aybabtu.com>
6048 * util/i386/pc/grub-mkrescue.in: New file.
6049 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
6050 * Makefile.in: Handle bin_SCRIPTS.
6052 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
6054 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6055 list of video modes.
6057 2007-06-06 Robert Millan <rmh@aybabtu.com>
6059 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6060 file doesn't exist, or if it is in a filesystem grub can't read.
6062 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
6063 not abort if GRUB_DRIVE could not be defined. Rearrange generated
6064 header comment to fit in 80 columns when the variables are resolved.
6066 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6067 could be identified by update-grub. Remove redundant check for
6068 unifont.pff existence (since convert_system_path_to_grub_path now
6071 2007-06-04 Robert Millan <rmh@aybabtu.com>
6073 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6075 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6077 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6079 2007-06-04 Robert Millan <rmh@aybabtu.com>
6081 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6083 * include/grub/partition.h: Declare grub_apple_partition_map_init and
6084 grub_apple_partition_map_fini.
6087 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6088 to access >2 TiB disks).
6090 Print disk->total_sectors with %llu instead of %lu, since this
6091 variable is always 64-bit (prevents wrong disk size from being displayed
6092 on either >2 TiB disk or big-endian CPU).
6094 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6095 into a generic case that supports all (sane) partition maps.
6097 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6100 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6101 and grub_apple_partition_map_fini() after that.
6103 2007-06-01 Robert Millan <rmh@aybabtu.com>
6105 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6107 * util/grub.d/00_header.in: Only enable gfxterm when
6108 convert_system_path_to_grub_path() succeeds.
6110 2007-05-20 Robert Millan <rmh@aybabtu.com>
6112 * util/update-grub_lib.in: New file.
6113 * DISTLIST: Add update-grub_lib.in.
6114 * conf/common.rmk: Generate update-grub_lib and install it in
6116 * Makefile.in: Add install routine for $(lib_DATA).
6118 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6119 function provided by update-grub_lib to support arbitrary paths of
6121 * util/update-grub.in: Use convert_system_path_to_grub_path() to
6122 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6124 2007-05-19 Robert Millan <rmh@aybabtu.com>
6126 * commands/i386/cpuid.c: New module.
6128 * conf/i386-efi.rmk: Enable cpuid.mod.
6129 * conf/i386-pc.rmk: Likewise.
6131 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6133 * kern/disk.c (grub_disk_read): Check return value of
6136 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6138 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6140 * disk/raid.c (grub_raid_open): Likewise.
6142 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6144 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6145 stack instead of on the heap.
6147 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6148 before doing a read on it.
6150 * configure.ac: Only use -fno-stack-protector for the target
6153 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6155 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6156 __attribute_ ((unused)) to mode_type argument.
6158 * util/getroot.c (grub_guess_root_device): Fix #endif.
6160 * kern/misc.c (memcmp): Fix prototype.
6162 * include/grub/partition.h [GRUB_UTIL]
6163 (grub_gpt_partition_map_init): Add prototype.
6164 (grub_gpt_partition_map_fini): Likewise.
6166 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6169 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6170 (grub_fat_read_data): Likewise.
6171 (grub_fat_find_dir): Likewise.
6173 * font/manager.c (find_glyph): Make table a const.
6174 (grub_font_get_glyph): Remove bitmap from if statement.
6176 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
6178 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6179 code, first search for device in /dev/mapper, then in /dev.
6180 (grub_util_get_grub_dev): New function.
6181 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6183 * util/grub-probe.c (probe): Remove check for RAID, call
6184 grub_util_get_grub_dev() instead of
6185 grub_util_biosdisk_get_grub_dev().
6186 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6187 grub_util_biosdisk_get_grub_dev().
6188 * util/i386/pc/grub-setup.c (main): Likewise.
6190 2007-05-16 Robert Millan <rmh@aybabtu.com>
6192 * DISTLIST: Update for the latest changes.
6193 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6194 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
6195 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
6196 grub/util/biosdisk.h.
6197 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
6198 grub/util/biosdisk.h.
6200 2007-05-16 Robert Millan <rmh@aybabtu.com>
6202 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
6204 2007-05-16 Robert Millan <rmh@aybabtu.com>
6206 * util/i386/efi/grub-install.in: New.
6207 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
6208 newly added grub-install.
6209 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
6211 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
6212 grub/util/biosdisk.h.
6213 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
6214 grub/util/biosdisk.h.
6216 2007-05-16 Robert Millan <rmh@aybabtu.com>
6218 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
6219 * include/grub/util/biosdisk.h: ... here.
6220 * util/i386/pc/biosdisk.c: Moved to ...
6221 * util/biosdisk.c: ... here.
6222 * util/i386/pc/getroot.c: Moved to ...
6223 * util/getroot.c: ... here.
6224 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
6225 * util/grub-mkdevicemap.c: ... here.
6226 * util/i386/pc/grub-probe.c: Moved to ...
6227 * util/grub-probe.c: ... here.
6229 2007-05-15 Robert Millan <rmh@aybabtu.com>
6231 * util/update-grub.in: Remove duplicated line in grub.cfg header
6234 2007-05-13 Robert Millan <rmh@aybabtu.com>
6236 * util/update-grub.in: Fix a few assumptions about the devices holding
6237 /, /boot and /boot/grub being the same.
6238 * util/grub.d/00_header.in: Likewise.
6239 * util/grub.d/10_hurd.in: Likewise.
6240 * util/grub.d/10_linux.in: Likewise.
6242 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
6243 patterns. Use that to define the `.old' suffix as older than `'.
6245 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
6247 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
6248 the grub.cfg header message.
6250 2007-05-11 Robert Millan <rmh@aybabtu.com>
6252 * util/update-grub.in: Create device.map if it doesn't already exist,
6253 before attempting to run grub-probe.
6254 Check for grub-probe and grub-mkdevicemap with the same code
6255 grub-install is using.
6258 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
6260 * Makefile.in: Add the datarootdir autoconf variable.
6262 2007-05-09 Robert Millan <rmh@aybabtu.com>
6264 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
6265 fail gracefully if dev->disk->partition == NULL.
6267 2007-05-07 Robert Millan <rmh@aybabtu.com>
6269 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
6270 determine partition map module.
6271 * util/i386/pc/grub-install.in: Use this feature to decide which
6272 partition module to load, instead of hardcoding pc and gpt.
6274 2007-05-07 Robert Millan <rmh@aybabtu.com>
6276 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
6277 source directory differs from build directory.
6279 2007-05-05 Robert Millan <rmh@aybabtu.com>
6281 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
6284 2007-05-05 Robert Millan <rmh@aybabtu.com>
6286 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
6288 2007-05-05 Robert Millan <rmh@aybabtu.com>
6290 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
6291 command-line arguments via ${GRUB_CMDLINE_LINUX}.
6293 2007-05-05 Robert Millan <rmh@aybabtu.com>
6295 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
6296 (grub_probe_SOURCES): Likewise.
6297 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
6298 GPT and initialize dos_part and bsd_part accordingly.
6299 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
6301 (main): Activate gpt module for use during partition identification,
6302 and deactivate it afterwards.
6303 * util/i386/pc/grub-install.in: Add gpt module to core.img.
6304 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
6305 partition identification, and deactivate it afterwards.
6307 2007-05-05 Robert Millan <rmh@aybabtu.com>
6309 * term/i386/pc/console.c (grub_console_fini): Call
6310 grub_term_set_current() before grub_term_unregister().
6312 2007-05-04 Robert Millan <rmh@aybabtu.com>
6314 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
6315 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
6316 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
6317 and update-grub_DATA.
6318 * conf/common.rmk: Build and install update-grub components.
6319 * conf/common.mk: Regenerate.
6320 * util/update-grub.in: New. Core of update-grub.
6321 * util/grub.d/00_header.in: New. Generates grub.cfg header.
6322 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
6323 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
6324 * util/grub.d/README: New. Document grub.d directory layout.
6326 2007-05-01 Robert Millan <rmh@aybabtu.com>
6328 * util/grub-emu.c: Move initialization functions
6329 grub_util_biosdisk_init() and grub_init_all() before
6330 grub_util_biosdisk_get_grub_dev(), which relies on them.
6332 2007-04-19 Robert Millan <rmh@aybabtu.com>
6334 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6337 2007-04-18 Jerone Young <jerone@gmail.com>
6339 * kernel/elf.c: Add missing parenthesis for conditional statement
6342 2007-04-10 Jerone Young <jerone@gmail.com>
6344 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6345 continue on and look for device node with real device name.
6347 2007-04-10 Jerone Young <jerone@gmail.com>
6349 * configure.ac: Add argument for autoconf to use transformation
6351 * Makefile.in: Add autoconf package transformation code.
6352 * util/i386/pc/grub-install.in: Likewise.
6353 * util/powerpc/ieee1275/grub-install.in: Likewise.
6355 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
6357 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6358 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6359 (EXT2_REVISION): Likewise.
6360 (EXT2_INODE_SIZE): Likewise.
6361 (struct grub_ext2_block_group): Added a missing member
6363 (grub_ext2_read_inode): Divide by the inode size in a superblock
6364 instead of 128 to obtain INODES_PER_BLOCK.
6365 Use the macro EXT2_INODE_SIZE instead of directly using
6368 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
6370 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6371 superblock instead of the structure size to compute an
6372 offset. This fixes the problem that GRUB could not read a
6373 filesystem when inode size is different from 128-byte.
6375 2007-03-05 Marco Gerards <marco@gnu.org>
6377 * normal/main.c (read_config_file): When "menu" is not set, create
6380 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6382 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6383 (HEAP_LIMIT): New macro.
6384 (grub_claim_heap): Claim memory up to `heaplimit'.
6386 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6388 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6389 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6391 (grub_arch_modules_addr): Return address after `_end'.
6392 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6393 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6394 (add_segments): Calculate `_end' from phdr size and location.
6395 (ALIGN_UP): Moved to ...
6396 * include/grub/misc.h: here.
6397 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6399 (GRUB_IEEE1275_MODULE_BASE): Removed.
6401 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6403 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6406 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6408 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6410 (grub_elf64_load_hook_t): Likewise.
6411 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6414 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6416 * kern/mm.c: Update copyright.
6417 (grub_mm_debug): Correct syntax error.
6418 (grub_mm_dump_free): New function.
6419 (grub_debug_free): Call `grub_free'.
6420 * include/grub/mm.h: Update copyright.
6421 (grub_mm_dump_free): Add declaration.
6423 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6425 * include/grub/ieee1275/ieee1275.h: Update copyright.
6426 * kern/powerpc/ieee1275/init.c: Likewise.
6427 * kern/powerpc/ieee1275/openfw.c: Likewise.
6429 * loader/powerpc/ieee1275/linux.c: Likewise.
6430 * include/grub/elfload.h: Likewise.
6431 * kern/elf.c: Likewise.
6432 (grub_elf32_load): Pass `base' and `size' parameters. Update all
6434 (grub_elf64_load): Likewise.
6435 (grub_elf32_load_segment): Move to a nested function.
6436 (grub_elf64_load_segment): Likewise.
6438 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6440 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6442 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6443 (grub_heap_len): Likewise.
6444 (HEAP_SIZE): New macro.
6445 (grub_claim_heap): New function.
6446 (grub_machine_init): Don't claim heap directly. Call
6448 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6449 (grub_available_iterate): New function.
6451 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
6453 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6454 * configure.ac: Use it for testing the HOST and TARGET compilers.
6456 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
6458 * Makefile.in (enable_grub_emu): New variable.
6459 * configure.ac (--enable-grub-emu): New option.
6460 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6461 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6462 * conf/i386-pc.rmk: Likewise.
6463 * conf/powerpc-ieee1275.rmk: Likewise.
6464 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6466 2006-12-12 Marco Gerards <marco@gnu.org>
6468 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6470 * kern/env.c (grub_env_unset): Don't free the member `value' when
6471 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6474 * normal/main.c (current_menu): Removed.
6475 (free_menu): Unset the `menu' environment variable.
6476 (grub_normal_menu_addentry): Make use of the environment variable
6477 `menu', instead of using the global `current_menu'. Allocate
6478 memory for the sourcecode of this entry.
6479 (read_config_file): New argument `nested', changed all callers.
6480 Only in the case of a new context, initialize a new menu. Set the
6481 `menu' environment variable.
6482 (grub_normal_execute): Don't set and unset the environment
6483 variable `menu' here anymore. Only free the menu when leaving the
6486 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6489 2006-12-11 Marco Gerards <marco@gnu.org>
6491 * normal/menu_entry.c (run): Fix off by one bug so the last line
6492 is executed. Move the loader check to outside the loop.
6494 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
6496 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6498 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
6500 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6501 the number of sectors. Reported by Andrey Shuvikov
6502 <mr_hyro@yahoo.com>.
6504 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
6506 * kern/disk.c (grub_disk_read): When there is a read error, always
6507 try to read only the necessary data.
6509 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6511 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6513 [GRUB_UTIL] (grub_raid_fini): Likewise.
6514 [GRUB_UTIL] (grub_lvm_init): Likewise.
6515 [GRUB_UTIL] (grub_lvm_fini): Likewise.
6516 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6517 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6518 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
6519 and grub_raid_fini().
6521 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
6523 * include/grub/types.h (__unused): Rename to UNUSED.
6524 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
6525 (grub_elf64_size): Likewise.
6527 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6529 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
6530 grub_error_push and grub_error_pop in the error-handling path.
6531 (grub_elf32_load_segment): Only call grub_file_read with non-zero
6534 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6536 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
6537 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6538 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6539 (kernel_elf_SOURCES): Likewise.
6540 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
6541 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
6542 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6543 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6544 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
6545 (elf_mod_SOURCES): New variable.
6546 (elf_mod_CFLAGS): Likewise.
6547 (elf_mod_LDFLAGS): Likewise.
6548 * include/grub/types.h (__unused): New macro.
6549 * include/grub/elfload.h: New file.
6550 * kern/elf.c: Likewise.
6551 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
6552 (ELF32_LOADMASK): New macro.
6553 (ELF64_LOADMASK): Likewise.
6555 (grub_linux_load32): New function.
6556 (grub_linux_load64): Likewise.
6557 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
6558 Use grub_elf_t instead of grub_file_t.
6560 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
6562 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
6563 `catch_result' to struct set_color_args.
6565 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
6567 * normal/menu.c: Include grub/script.h.
6568 * normal/menu_entry.c: Likewise.
6569 * include/grub/normal.h: Do not include grub/script.h.
6571 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6573 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
6575 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6577 * kern/disk.c (grub_disk_open): Print debug messages when opening a
6579 (grub_disk_close): Print debug messages when closing a disk.
6580 (grub_disk_read): Print debug messages when disk read fails.
6581 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
6583 * kern/partition.c: Include misc.h.
6584 (grub_partition_iterate): Print debug messages when detecting
6587 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6589 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
6591 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
6593 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
6595 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6596 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
6598 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
6600 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
6601 instead of sizeof(lv). Patch by Michael Guntsche.
6603 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
6605 * disk/lvm.c: Rename VGS to VG_LIST.
6606 (grub_lvm_iterate): Change VGS->LV to VG-LV.
6607 (grub_lvm_open): Likewise.
6608 Thanks to Michael Guntsche for finding this bug.
6610 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6612 * configure.ac (AC_INIT): Bumped to 1.95.
6614 2006-10-14 Robert Millan <rmh@aybabtu.com>
6616 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
6617 with "/dev/.static/dev/md".
6619 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
6621 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
6622 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
6623 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
6624 DRIVE_NAME are always freed.
6626 * util/i386/pc/biosdisk.c (make_device_name): Add one into
6627 DOS_PART, as a DOS partition is counted from one instead of zero
6628 now. Reported by Robert Millan.
6630 2006-10-14 Robert Millan <rmh@aybabtu.com>
6632 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
6633 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
6634 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
6635 string returned by grub_guess_root_device.
6636 * util/i386/pc/grub-setup.c: Likewise.
6637 * util/i386/pc/grub-probefs.c: Likewise.
6639 * util/i386/pc/grub-probefs.c: Rename to ...
6640 * util/i386/pc/grub-probe.c: ... this.
6641 * DISTLIST: Remove grub-probefs, add grub-probe.
6642 * conf/i386-efi.rmk: Likewise.
6643 * conf/i386-pc.rmk: Likewise.
6644 * util/i386/pc/grub-install.in: Likewise.
6646 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
6647 choose which information we want to print.
6649 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
6651 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
6652 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
6653 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
6654 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
6655 video/readers/tga.c and video/i386/pc/vbeutil.c.
6657 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
6659 Added support for RAID and LVM.
6661 * disk/lvm.c: New file.
6662 * disk/raid.c: Likewise.
6663 * include/grub/lvm.h: Likewise.
6664 * include/grub/raid.h: Likewise.
6665 * include/grub/util/lvm.h: Likewise.
6666 * include/grub/util/raid.h: Likewise.
6667 * util/lvm.c: Likewise.
6668 * util/raid.c: Likewise.
6670 * include/grub/disk.h (grub_disk_dev_id): Add
6671 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
6672 (grub_disk_get_size): New prototype.
6673 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
6674 returns a partition.
6675 (grub_disk_get_size): New function.
6677 * kern/i386/pc/init.c (make_install_device): Copy the prefix
6678 verbatim if grub_install_dos_part is -2.
6680 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
6683 * util/i386/pc/grub-setup.c (setup): New argument
6684 MUST_EMBED. Force embedding of GRUB when the argument is
6685 true. Close FILE before returning.
6686 (main): Add support for RAID and LVM.
6688 * conf/common.rmk: Add RAID and LVM modules.
6689 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
6691 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
6693 * kern/misc.c (grub_strstr): New function.
6694 * include/grub/misc.h (grub_strstr): New prototype.
6696 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
6698 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
6700 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
6702 * kern/misc.c (grub_strtoull): Guess the base only if not
6705 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6707 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
6710 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6712 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
6714 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
6715 Remove `flags' argument. All callers changed.
6716 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
6717 (IEEE1275_IHANDLE_INVALID): New variable.
6718 (IEEE1275_CELL_INVALID): New variable.
6719 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
6720 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
6721 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
6722 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
6723 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
6724 codes from Open Firmware. All callers updated.
6725 (grub_ieee1275_next_property): Directly return Open Firmware return
6727 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6728 Standardize error checking from `grub_ieee1275_get_property'.
6729 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
6730 `devalias' to `aliases'. Correct comments. Consolidate error paths.
6732 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6734 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
6735 `instance_to_package_args' to `instance_to_path_args'.
6737 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
6738 `grub_ieee1275_chosen'.
6740 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
6741 `grub_ieee1275_interpret'.
6743 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6745 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
6747 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6749 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
6750 (__cmpdi): Likewise.
6752 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
6753 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
6756 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
6758 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
6759 to type `grub_ssize_t'.
6760 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
6762 2006-09-22 Marco Gerards <marco@gnu.org>
6764 * normal/script.c (grub_script_create_cmdmenu): Skip leading
6767 2006-09-22 Marco Gerards <marco@gnu.org>
6769 * commands/echo.c: New file.
6771 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
6773 * conf/common.rmk (echo_mod_SOURCES): New variable.
6774 (echo_mod_CFLAGS): Likewise.
6775 (echo_mod_LDFLAGS): Likewise.
6777 2006-09-22 Marco Gerards <marco@gnu.org>
6779 * normal/main.c (get_line): Malloc memory instead of using
6780 preallocated memory. Removed the arguments `cmdline' and
6781 `max_len'. Updated all callers.
6783 2006-09-22 Marco Gerards <marco@gnu.org>
6785 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
6786 (normal_mod_DEPENDENCIES): Likewise.
6788 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
6789 (normal_mod_DEPENDENCIES): Likewise.
6791 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
6793 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
6795 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
6797 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
6798 (normal_mod_DEPENDENCIES): Likewise.
6799 * conf/i386-pc.mk: Regenerate.
6800 * conf/i386-efi.mk: Likewise
6801 * conf/common.mk: Likewise.
6802 * conf/powerpc-ieee1275.mk: Likewise.
6803 * conf/sparc64-ieee1275.mk: Likewise.
6805 2006-09-22 Robert Millan <rmh@aybabtu.com>
6807 Sync with i386 version.
6808 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
6809 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
6811 2006-09-21 Robert Millan <rmh@aybabtu.com>
6813 Import from GRUB Legacy (lib/device.c):
6814 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
6815 (init_device_map) [__linux__]: Add support for I2O devices.
6817 2006-09-14 Marco Gerards <marco@gnu.org>
6819 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
6822 2006-09-14 Robert Millan <rmh@aybabtu.com>
6824 * util/i386/pc/grub-install.in: Skip menu.lst when removing
6827 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6829 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
6830 before adding it to device.map.
6832 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
6834 * genmk.rb: Let GCC generate dependencies the first time it
6835 compiles a file; using the -MD option.
6836 * conf/common.mk: Regenerate.
6837 * conf/i386-pc.mk: Likewise.
6838 * conf/i386-efi.mk: Likewise.
6839 * conf/powerpc-ieee1275.mk: Likewise.
6840 * conf/sparc64-ieee1275.mk: Likewise.
6842 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
6844 Move the prototypes of grub_setjmp and grub_longjmp to
6845 cpu/setjmp.h, so that each architecture may specify different
6848 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
6849 (grub_longjmp): Likewise.
6850 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
6851 (grub_longjmp): Likewise.
6852 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
6853 (grub_longjmp): Likewise.
6855 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
6856 [!GRUB_UTIL] (grub_longjmp): Removed.
6858 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
6860 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
6861 "color!" method does not return any value.
6863 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6865 * include/grub/bitmap.h: New file.
6867 * include/grub/i386/pc/vbeutil.h: Likewise.
6869 * video/bitmap.c: Likewise.
6871 * video/readers/tga.c: Likewise.
6873 * video/i386/pc/vbeutil.c: Likewise.
6875 * commands/videotest.c: Code cleanup and updated to reflect to new
6878 * term/gfxterm.c: Likewise.
6880 * video/video.c: Likewise.
6882 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
6883 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
6884 (bitmap_mod_SOURCES): New entry.
6885 (bitmap_mod_CFLAGS): Likewise.
6886 (bitmap_mod_LDFLAGS): Likewise.
6887 (tga_mod_SOURCES): Likewise.
6888 (tga_mod_CFLAGS): Likewise.
6889 (tga_mod_LDFLAGS): Likewise.
6891 * include/grub/video.h (grub_video_blit_operators): New enum type.
6892 (grub_video_render_target): Changed as forward declaration and moved
6893 actual definition to be video driver specific.
6894 (grub_video_adapter.blit_bitmap): Added blitting operator.
6895 (grub_video_adapter.blit_render_target): Likewise.
6896 (grub_video_blit_bitmap): Likewise.
6897 (grub_video_blit_render_target): Likewise.
6899 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
6900 driver specific render target definition.
6901 (grub_video_vbe_map_rgba): Added driver internal helper.
6902 (grub_video_vbe_unmap_color): Updated to use
6903 grub_video_i386_vbeblit_info.
6904 (grub_video_vbe_get_video_ptr): Likewise.
6906 * include/grub/i386/pc/vbeblit.h
6907 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
6908 grub_video_i386_vbeblit_info.
6909 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6910 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6911 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6912 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6913 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6914 (grub_video_i386_vbeblit_index_index): Likewise.
6915 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
6916 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6917 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6918 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
6920 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
6923 * video/i386/pc/vbeblit.c: Updated to reflect changes on
6924 include/grub/i386/pc/vbeblit.h.
6926 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
6927 Updated to use grub_video_i386_vbeblit_info.
6928 (grub_video_i386_vbefill_R8G8B8): Likewise.
6929 (grub_video_i386_vbefill_index): Likewise.
6930 (grub_video_i386_vbefill): Added generic filler.
6932 * video/i386/pc/vbefill.c: Updated to reflect changes on
6933 include/grub/i386/pc/vbefill.h.
6935 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
6936 grub_video_i386_vbeblit_info.
6937 (grub_video_vbe_unmap_color): Likewise.
6938 (grub_video_vbe_blit_glyph): Likewise.
6939 (grub_video_vbe_scroll): Likewise.
6940 (grub_video_vbe_draw_pixel): Removed function.
6941 (grub_video_vbe_get_pixel): Likewise.
6942 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
6943 updated code to use it.
6944 (common_blitter): Added common blitter for render target and bitmap.
6945 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
6946 (grub_video_vbe_blit_render_target): Likewise.
6948 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
6950 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
6951 is in text mode if there is no console control protocol instance
6954 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6956 * include/grub/video.h: Code cleanup.
6958 * include/grub/i386/pc/vbe.h: Likewise.
6960 * video/i386/pc/vbe.c: Likewise.
6962 * video/i386/pc/vbeblit.c: Likewise.
6964 * video/i386/pc/vbefill.c: Likewise.
6966 * video/video.c: Likewise. Also added more comments.
6968 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6970 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
6971 (struct grub_biosdisk_dap): Likewise.
6973 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
6974 linkage settings for all functions.
6976 2006-07-12 Marco Gerards <marco@gnu.org>
6978 * configure.ac (--enable-mm-debug): Fix typo.
6980 * genkernsyms.sh.in: Use proper quoting for `CC'.
6982 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
6984 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
6985 (normal_mod_ASFLAGS): Remove "-m32".
6987 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
6989 * util/misc.c: Include config.h.
6990 [!HAVE_MEMALIGN]: Do not include malloc.h.
6991 (grub_memalign): Use posix_memalign, if present. Then, use
6992 memalign, if present. Otherwise, emit an error.
6994 * util/grub-emu.c: Do not include malloc.h.
6996 * include/grub/util/misc.h: Include unistd.h. This is required for
6997 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
6998 D. Eades III <hde@foobar-qux.org>.
7000 * configure.ac (AC_GNU_SOURCE): Added.
7001 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
7004 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
7006 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
7007 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
7009 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
7011 * include/grub/types.h (grub_host_addr_t): Rename to
7013 (grub_host_off_t): Rename to grub_target_off_t.
7014 (grub_host_size_t): Rename to grub_target_size_t.
7015 (grub_host_ssize_t): Rename to grub_target_ssize_t.
7016 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7018 * include/grub/kernel.h (struct grub_module_header): Change type
7019 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7020 (grub_module_info): Likewise.
7022 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7024 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7025 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7026 Velazquez <jesus.velazquez@gmail.com>.
7028 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7030 Count partitions from 1 instead of 0 in the string representation
7031 of partitions. Still use 0-based internally.
7033 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7034 (sun_partition_map_iterate): Use grub_partition_t instead of
7035 struct grub_partition *. Cast DESC->START_CYLINDER to
7036 grub_uint64_t after converting the endian.
7037 (sun_partition_map_probe): Subtract 1 for PARTNUM.
7038 (sun_partition_map_get_name): Add 1 to P->INDEX.
7040 * partmap/pc.c (grub_partition_parse): Subtract 1 for
7042 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7044 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7045 zero instead of one.
7046 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7047 (gpt_partition_map_get_name): Add 1 into P->INDEX.
7049 * partmap/apple.c (apple_partition_map_iterate): Change the type
7051 (apple_partition_map_probe): Subtract 1 for PARTNUM.
7052 (apple_partition_map_get_name): Add 1 into P->INDEX.
7054 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7056 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7057 calculate the offset of a partition.
7058 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7059 (amiga_partition_map_get_name): Add 1 into P->INDEX.
7061 * partmap/acorn.c (acorn_partition_map_find): Change the type of
7062 SECTOR to grub_disk_addr_t.
7063 (acorn_partition_map_iterate): Likewise.
7064 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7065 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7067 (acorn_partition_map_get_name): Add 1 into P->INDEX.
7069 * kern/i386/pc/init.c (make_install_device): Add 1 into
7070 GRUB_INSTALL_DOS_PART.
7072 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7075 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7077 Clean up the code to support 64-bit addressing in disks and
7078 files. This change is not enough for filesystems yet.
7080 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7081 type of "start" to grub_uint64_t.
7082 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7083 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7084 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7087 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7088 to grub_disk_addr_t.
7090 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7093 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7095 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7098 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7100 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7102 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7104 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7105 to grub_off_t, to detect an error from grub_file_seek.
7106 (grub_multiboot_load_elf32): Likewise.
7108 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7109 maximum unsigned long value when an overflow is detected.
7110 (grub_strtoull): New function.
7111 (grub_divmod64): Likewise.
7112 (grub_lltoa): use grub_divmod64.
7114 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7116 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7117 the pointer to next character. Use grub_strtoull instead of
7119 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7120 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7123 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
7124 return value is signed.
7125 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7126 test if OFFSET is less than zero, as OFFSET is unsigned now.
7128 * kern/disk.c (struct grub_disk_cache): Change the type of
7129 "sector" to grub_disk_addr_t.
7130 (grub_disk_cache_get_index): Change the type of SECTOR to
7131 grub_disk_addr_t. Calculate the hash with SECTOR casted to
7132 unsigned after shifting.
7133 (grub_disk_cache_invalidate): Change the type of SECTOR to
7135 (grub_disk_cache_unlock): Likewise.
7136 (grub_disk_cache_store): Likewise.
7137 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7138 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7139 grub_disk_addr_t and grub_uint64_t, respectively.
7140 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
7141 body, as the value of OFFSET is tweaked by
7142 grub_disk_check_range. Change the types of START_SECTOR, LEN and
7143 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7145 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7146 body, as the value of OFFSET is tweaked by
7147 grub_disk_check_range. Change the types of LEN and N to
7150 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7151 and "saved_offset" to grub_off_t.
7152 (test_header): Cast BUF to char *.
7153 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7155 (grub_gzio_read): Change the types of OFFSET and SIZE to
7156 grub_off_t and grub_size_t, respectively.
7158 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7160 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7161 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7162 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7163 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7164 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7166 * include/grub/types.h (grub_off_t): Unconditionally set to
7168 (grub_disk_addr_t): Changed to grub_uint64_t.
7170 * include/grub/partition.h (struct grub_partition): Change the
7171 types of "start", "len" and "offset" to grub_disk_addr_t,
7172 grub_uint64_t and grub_disk_addr_t, respectively.
7173 (grub_partition_get_start): Return grub_disk_addr_t.
7174 (grub_partition_get_len): Return grub_uint64_t.
7176 * include/grub/misc.h (grub_strtoull): New prototype.
7177 (grub_divmod64): Likewise.
7179 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7180 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7181 grub_off_t, respectively.
7182 All callers and references changed.
7184 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7185 grub_size_t in "read".
7186 All callers and references changed.
7188 * include/grub/file.h (struct grub_file): Change the types of
7189 "offset" and "size" to grub_off_t and grub_off_t,
7190 respectively. Change the type of SECTOR to grub_disk_addr_t in
7192 (grub_file_read): Change the type of LEN to grub_size_t.
7193 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7195 (grub_file_size): Return grub_off_t.
7196 (grub_file_tell): Likewise.
7197 All callers and references changed.
7199 * include/grub/disk.h (struct grub_disk_dev): Change the types of
7200 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
7202 (struct grub_disk): Change the type of "total_sectors" to
7203 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
7205 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
7206 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
7207 (grub_disk_write): Likewise.
7208 All callers and references changed.
7210 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
7211 char * for grub_strncmp to silence gcc.
7212 (grub_iso9660_mount): Likewise.
7213 (grub_iso9660_mount): Likewise.
7214 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
7216 (grub_iso9660_iterate_dir): Likewise.
7217 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
7219 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
7220 LEN to grub_disk_addr_t and grub_size_t, respectively.
7222 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7224 * fs/jfs.c (grub_jfs_read_file): Likewise.
7226 * fs/minix.c (grub_jfs_read_file): Likewise.
7228 * fs/sfs.c (grub_jfs_read_file): Likewise.
7230 * fs/ufs.c (grub_jfs_read_file): Likewise.
7232 * fs/xfs.c (grub_jfs_read_file): Likewise.
7234 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
7235 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
7238 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
7239 BLKNR to -1 instead of returning GRUB_ERRNO.
7240 (grub_ext2_read_file): Change the types of SECTOR and
7241 LEN to grub_disk_addr_t and grub_size_t, respectively.
7243 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
7244 LEN to grub_disk_addr_t and grub_size_t, respectively.
7246 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
7249 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
7250 string. Do not cast SECTOR explicitly.
7252 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
7253 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
7254 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
7255 grub_disk_addr_t and grub_size_t, respectively. If the sector is
7256 over 2TB and LBA mode is not supported, raise an error.
7257 (get_safe_sectors): New function.
7258 (grub_biosdisk_read): Use get_safe_sectors.
7259 (grub_biosdisk_write): Likewise.
7261 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
7262 (grub_efidisk_write): Likewise.
7264 * disk/loopback.c (delete_loopback): Cosmetic changes.
7265 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
7267 (grub_loopback_open): Likewise.
7268 (grub_loopback_read): Likewise. Also, change the type of POS to
7269 grub_off_t, and fix the usage of grub_memset.
7271 * commands/i386/pc/play.c: Include grub/machine/time.h.
7273 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
7276 * commands/configfile.c: Include grub/env.h.
7278 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
7279 GRUB_ERRNO directly instead. Change the type of POS to
7280 grub_off_t. Follow the coding standard.
7282 * commands/blocklist.c: Include grub/partition.h.
7283 (grub_cmd_blocklist): Return an error if the underlying device is
7284 not a disk. Take the starting sector of a partition into account,
7285 if a partition is used.
7287 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
7289 (lba_mode): Support 64-bit addresses.
7290 (chs_mode): Likewise.
7291 (copy_buffer): Adapted to the new offsets of a length field and a
7293 (blocklist_default_start): Allocate 64-bit space.
7295 * boot/i386/pc/boot.S (force_lba): Removed.
7296 (boot_drive): Moved to under KERNEL_SECTOR.
7297 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
7299 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
7301 (lba_mode): Refactored to support a 64-bit address. More size
7303 (setup_sectors): Likewise.
7305 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7307 * DISTLIST: Added include/grub/i386/linux.h. Removed
7308 include/grub/i386/pc/linux.h
7310 * configure.ac (AC_INIT): Bumped to 1.94.
7312 * config.guess: Updated from gnulib.
7313 * config.sub: Likewise.
7314 * install-sh: Likewise.
7315 * mkinstalldirs: Likewise.
7317 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7319 * conf/common.rmk (grub_modules_init.lst): Depended on
7320 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7323 * genmk.rb (PModule::rule): Reverted the previous change.
7325 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7327 * conf/common.rmk (grub_modules_init.lst): Depends on
7328 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7329 that the target does not exist before producing.
7330 (grub_modules_init.h): Remove the target before generating.
7331 (grub_emu_init.c): Likewise.
7333 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7335 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
7337 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7338 for the target-specific tests. Make sure that we also have the
7339 up-to-date target variables for those tests.
7341 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7343 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7344 (PModule::rule): Likewise.
7346 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7348 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7349 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7350 target-specific flags should be prefixed.
7351 (PModule::rule): Likewise.
7353 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
7355 * configure.ac (CMP): Check if cmp is available explicitly.
7357 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
7359 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7360 (target_cpu): New variable.
7361 (pkglibdir): Use target_cpu instead of host_cpu.
7363 * util/i386/pc/grub-install.in (host_cpu): Removed.
7364 (target_cpu): New variable.
7365 (pkglibdir): Use target_cpu instead of host_cpu.
7367 * util/genmoddep.c: Removed.
7369 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7370 instead of GRUB_HOST_SIZEOF_VOID_P.
7371 * kern/dl.c: Likewise.
7373 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7375 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7376 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7377 (GRUB_TARGET_SIZEOF_LONG): ... this.
7378 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7379 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7380 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7382 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7383 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7384 (GRUB_TARGET_SIZEOF_LONG): ... this.
7385 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7386 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7387 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7389 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7390 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7391 (GRUB_TARGET_SIZEOF_LONG): ... this.
7392 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7393 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7395 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7396 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7397 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7398 instead of GRUB_HOST_SIZEOF_LONG.
7399 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7400 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7401 GRUB_CPU_WORDS_BIGENDIAN.
7402 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7403 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7406 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7407 (genmoddep_SOURCES): Likewise.
7408 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7409 (genmoddep_SOURCES): Likewise.
7410 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7411 (genmoddep_SOURCES): Likewise.
7412 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7414 (genmoddep_SOURCES): Likewise.
7416 * genmoddep.awk: New file.
7418 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7419 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7420 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7421 (PModule::rule): Likewise.
7422 (Program::rule): Likewise.
7423 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7424 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7427 * configure.ac: Rewritten intensively to use host and target
7428 instead of build and host, respectively.
7430 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7431 (host_cpu): Removed.
7432 (target_cpu): New variable.
7433 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7434 (BUILD_CC): Removed.
7435 (BUILD_CFLAGS): Likewise.
7436 (BUILD_CPPFLAGS): Likewise.
7437 (TARGET_CC): New variable.
7438 (TARGET_CFLAGS): Likewise.
7439 (TARGET_CPPFLAGS): Likewise.
7440 (TARGET_LDFLAGS): Likewise.
7442 (include): Use target_cpu instead of host_cpu.
7443 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7445 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7447 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
7449 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7450 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
7451 field 'false' to 'exec_on_false'.
7452 (grub_script_create_cmdif): Renamed argument names to reflect above
7455 * normal/execute.c (grub_script_execute_cmdif): Likewise.
7457 * normal/script.c (grub_script_create_cmdif): Likewise.
7459 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
7461 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7463 (grub_hfsplus_btree_recptr): Likewise.
7464 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7465 FILEBLOCK both to pass a block number and store next block
7467 (grub_hfsplus_read_block): Rewritten heavily to support an extent
7468 overflow file correctly. Specify errors appropriately, because
7469 fshelp expects that GRUB_ERRNO is set when fails. Reuse
7470 grub_hfsplus_btree_recptr to get the pointer to a found key.
7471 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7474 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7476 (_linux_mod_SOURCES): New variable.
7477 (_linux_mod_CFLAGS): Likewise.
7478 (_linux_mod_LDFLAGS): Likewise.
7479 (linux_mod_SOURCES): Likewise.
7480 (linux_mod_CFLAGS): Likewise.
7481 (linux_mod_LDFLAGS): Likewise.
7483 * DISTLIST: Added loader/i386/efi/linux.c,
7484 loader/i386/efi/linux_normal.c and
7485 include/grub/i386/efi/loader.h.
7487 * loader/i386/efi/linux.c: New file.
7488 * loader/i386/efi/linux_normal.c: Likewise.
7489 * include/grub/i386/efi/loader.h: Likewise.
7491 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
7493 * commands/blocklist.c: New file.
7495 * DISTLIST: Added commands/blocklist.c.
7497 * term/efi/console.c (grub_console_highlight_color): Use a lighter
7498 color for the background, and a darker color for the foreground.
7499 (grub_console_checkkey): Return READ_KEY.
7500 (grub_console_cls): Set the background to
7501 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7503 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7505 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7506 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7508 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7511 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7512 BG. The spec is wrong again.
7514 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7516 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7518 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7519 commands/blocklist.c.
7520 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7522 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
7523 (blocklist_mod_SOURCES): New variable.
7524 (blocklist_mod_CFLAGS): Likewise.
7525 (blocklist_mod_LDFLAGS): Likewise.
7527 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
7529 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
7531 (lba_mode): Use %eax more intensively to reduce the code size.
7533 2006-05-20 Marco Gerards <marco@gnu.org>
7535 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
7537 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
7539 (script): Accept leading newlines.
7540 (newlines): New rule to describe 0 or more newlines.
7541 (commands): Accept `command' with trailing newline. Fixed the
7542 order in which arguments were passed to `grub_script_add_cmd'.
7543 Accept commands separated by newlines.
7544 (function): Changed to accept newlines.
7545 (menuentry) Rewritten.
7547 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
7548 front of the list, instead of to the end.
7550 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
7552 * util/i386/pc/grub-install.in (bindir): New variable.
7553 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
7554 Shaver <lbgwjl@gmail.com>.
7556 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
7558 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
7559 grub/machine/linux.h
7560 * loader/i386/pc/linux.c: Likewise.
7562 * include/grub/i386/pc/linux.h: Moved to ...
7563 * include/grub/i386/linux.h: ... here.
7565 * include/grub/i386/linux.h (struct linux_kernel_params): New
7568 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
7570 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
7572 (grub_video_vbe_blit_glyph): Likewise.
7573 (grub_video_vbe_blit_bitmap): Likewise.
7574 (grub_video_vbe_blit_render_target): Likewise.
7576 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
7578 * configure.ac (--with-platform): Properly quote the square
7581 2006-05-08 Marco Gerards <marco@gnu.org>
7583 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
7585 (kernel_elf_HEADERS): ...to this. Updated all users.
7586 (grubof_symlist.c): Renamed from this...
7587 (kernel_elf_symlist.c): ...to this. Updated all users.
7588 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7589 (grubof_SOURCES): Renamed from this...
7590 (kernel_elf_SOURCES): ...to this.
7591 (grubof_HEADERS): Renamed from this...
7592 (kernel_elf_HEADERS): ...to this.
7593 (grubof_CFLAGS): Renamed from this...
7594 (kernel_elf_CFLAGS): ...to this.
7595 (grubof_ASFLAGS): Renamed from this...
7596 (kernel_elf_ASFLAGS): ...to this.
7597 (grubof_LDFLAGS): Renamed from this...
7598 (kernel_elf_LDFLAGS): ...to this.
7600 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
7602 (kernel_elf_HEADERS): ...to this. Updated all users.
7603 (grubof_symlist.c): Renamed from this...
7604 (kernel_elf_symlist.c): ...to this. Updated all users.
7605 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7606 (grubof_SOURCES): Renamed from this...
7607 (kernel_elf_SOURCES): ...to this.
7608 (grubof_HEADERS): Renamed from this...
7609 (kernel_elf_HEADERS): ...to this.
7610 (grubof_CFLAGS): Renamed from this...
7611 (kernel_elf_CFLAGS): ...to this.
7612 (grubof_ASFLAGS): Renamed from this...
7613 (kernel_elf_ASFLAGS): ...to this.
7614 (grubof_LDFLAGS): Renamed from this...
7615 (kernel_elf_LDFLAGS): ...to this.
7617 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
7618 `kernel.elf' instead of `grubof'.
7620 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
7622 Add --with-platform to configure. Use pkglibdir instead of
7623 pkgdatadir. This is reported by Roger Leigh.
7625 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
7626 (host_vendor): Likewise.
7627 (host_os): Likewise.
7628 (pkgdatadir): Likewise.
7629 (platform): New variable.
7630 (pkglibdir): Likewise.
7631 Use PKGLIBDIR instead of PKGDATADIR.
7633 * util/i386/pc/grub-install.in (datadir): Removed.
7634 (host_vendor): Likewise.
7635 (host_os): Likewise.
7636 (pkgdatadir): Likewise.
7637 (platform): New variable.
7638 (pkglibdir): Likewise.
7639 Use PKGLIBDIR instead of PKGDATADIR.
7641 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
7642 instead of GRUB_DATADIR.
7644 * util/i386/pc/grub-mkimage.c (usage): Likewise.
7646 * util/i386/efi/grub-mkimage.c (usage): Likewise.
7649 * configure.ac (--with-platform): New option.
7650 Use PLATFORM instead of HOST_VENDOR to specify a platform.
7652 * Makefile.in: Include a makefile based on PLATFORM instead of
7654 (pkgdatadir): Not appended by the machine type.
7655 (pkglibdir): Appended by the machine type.
7656 (host_vendor): Removed.
7657 (platform): New variable.
7658 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
7659 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
7660 (uninstall): Likewise.
7662 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
7664 Use the environment context in the menu. Remove the commands
7665 "default" and "timeout", and use variables instead.
7667 * normal/menu.c: Include grub/env.h.
7668 (print_entry): Cast TITLE to silence gcc.
7669 (get_timeout): New function.
7670 (set_timeout): Likewise.
7671 (get_entry_number): Likewise.
7672 (run_menu): Use a default entry, a fallback entry and a timeout
7673 in the environment variables "default", "fallback" and
7674 "timeout". Also, tweak the default entry if it is not within the
7675 current menu entries.
7676 (grub_menu_run): Use a fallback entry in the environment variable
7679 * normal/main.c (read_config_file): Do not initialize
7680 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
7682 (grub_normal_execute): Use a data slot to store the menu.
7684 * include/grub/normal.h (struct grub_menu): Removed default_entry,
7685 fallback_entry and timeout.
7686 (struct grub_menu_list): Removed.
7687 (grub_menu_list_t): Likewise.
7688 (struct grub_context): Likewise.
7689 (grub_context_t): Likewise.
7690 (grub_context_get): Likewise.
7691 (grub_context_get_current_menu): Likewise.
7692 (grub_context_push_menu): Likewise.
7693 (grub_context_pop_menu): Likewise.
7694 (grub_default_init): Likewise.
7695 (grub_default_fini): Likewise.
7696 (grub_timeout_init): Likewise.
7697 (grub_timeout_fini): Likewise.
7699 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
7701 (normal_mod_SOURCES): Removed normal/context.c.
7703 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
7704 commands/default.c, commands/timeout.c and normal/context.c.
7705 (normal_mod_SOURCES): Removed normal/context.c.
7707 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
7708 commands/timeout.c and normal/context.c.
7709 (normal_mod_SOURCES): Removed normal/context.c.
7711 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
7712 commands/default.c, commands/timeout.c and normal/context.c.
7713 (normal_mod_SOURCES): Removed normal/context.c.
7715 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
7717 (default_mod_SOURCES): Removed.
7718 (default_mod_CFLAGS): Likewise.
7719 (default_mod_LDFLAGS): Likewise.
7720 (timeout_mod_SOURCES): Removed.
7721 (timeout_mod_CFLAGS): Likewise.
7722 (timeout_mod_LDFLAGS): Likewise.
7724 * DISTLIST: Removed commands/default.c, commands/timeout.c and
7727 * commands/default.c: Removed.
7728 * commands/timeout.c: Likewise.
7729 * normal/context.c: Likewise.
7731 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
7733 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
7735 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
7737 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
7738 "next" to "prev" for readability.
7739 (struct grub_env_sorted_var): New struct.
7740 (grub_env_context): Renamed to ...
7741 (initial_context): ... this.
7742 (grub_env_var_context): Renamed to ...
7743 (current_context): ... this.
7744 (grub_env_find): Look only at CURRENT_CONTEXT.
7745 (grub_env_context_open): Rewritten to copy exported variables from
7747 (grub_env_context_close): Rewritten according to the new
7748 scheme. Also, add an assertion to prevent the initial context from
7750 (grub_env_insert): Removed the code for the sorted list.
7751 (grub_env_remove): Likewise.
7752 (grub_env_export): Simply mark the variable with
7753 GRUB_ENV_VAR_GLOBAL.
7754 (grub_env_set): A cosmetic change for naming consistency.
7755 (grub_env_get): Likewise.
7756 (grub_env_unset): Likewise.
7757 (grub_env_iterate): Rewritten to sort variables within this
7759 (grub_register_variable_hook): Fixed for naming consistency. Call
7760 grub_env_find again, only if NAME is not found at the first time.
7761 (mangle_data_slot_name): New function.
7762 (grub_env_set_data_slot): Likewise.
7763 (grub_env_get_data_slot): Likewise.
7764 (grub_env_unset_data_slot): Likewise.
7766 * include/grub/env.h (grub_env_var_type): New enum.
7767 (GRUB_ENV_VAR_LOCAL): New constant.
7768 (GRUB_ENV_VAR_GLOBAL): Likewise.
7769 (GRUB_ENV_VAR_DATA): Likewise.
7770 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
7772 (grub_env_set): Replace VAR with NAME for consistency.
7773 (grub_register_variable_hook): Likewise.
7774 (grub_env_export): Specify the name of the argument.
7775 (grub_env_set_data_slot): New prototype.
7776 (grub_env_get_data_slot): Likewise.
7777 (grub_env_unset_data_slot): Likewise.
7779 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7781 Extend the loader so that GRUB can accept a loader which comes
7782 back to GRUB when a loaded image exits. Also, this change adds
7783 support for a chainloader on EFI.
7785 * term/efi/console.c: Include grub/misc.h.
7786 (grub_console_checkkey): Display a scan code on the top for
7787 debugging. This will be removed once the EFI port gets stable.
7788 Correct the scan code mapping.
7790 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
7791 allocate memory from larger regions, in order to reduce the number
7792 of allocated regions. Otherwise, the MacOSX loader panics.
7793 (filter_memory_map): Avoid less than 1MB for compatibility with
7795 (add_memory_regions): Allocate from the tail of a region, if
7796 possible, to avoid allocating a region near to 1MB, for the MacOSX
7799 * kern/efi/init.c (grub_efi_set_prefix): Specify
7800 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
7802 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
7803 argument IMAGE_HANDLE and specify it to get a loaded image.
7804 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
7805 grub_efi_get_loaded_image.
7806 (grub_efi_get_filename): Divide the length by the size of
7808 (grub_efi_get_device_path): New function.
7809 (grub_efi_print_device_path): Print End Device Path nodes. Divide
7810 the length by the size of grub_efi_char16_t for a file path device
7813 * kern/loader.c (grub_loader_noreturn): New variable.
7814 (grub_loader_set): Accept a new argument NORETURN. Set
7815 GRUB_LOADER_NORETURN to NORETURN.
7816 All callers changed.
7817 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
7820 * include/grub/efi/efi.h (grub_efi_get_device_path): New
7822 (grub_efi_get_loaded_image): Take an argument to specify an image
7825 * include/grub/loader.h (grub_loader_set): Added one more argument
7828 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
7829 instead of grub_efi_open_protocol.
7830 (grub_efidisk_get_device_name): Likewise.
7831 (grub_efidisk_close): Print a newline.
7832 (grub_efidisk_get_device_handle): Fixed to use
7833 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
7834 GRUB_EFI_DEVICE_PATH_TYPE.
7836 * disk/efi/efidisk.c (device_path_guid): Moved to ...
7837 * kern/efi/efi.c (device_path_guid): ... here.
7839 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
7841 (kernel_mod_HEADERS): Added efi/disk.h.
7842 (_chain_mod_SOURCES): New variable.
7843 (_chain_mod_CFLAGS): Likewise.
7844 (_chain_mod_LDFLAGS): Likewise.
7845 (chain_mod_SOURCES): Likewise.
7846 (chain_mod_CFLAGS): Likewise.
7847 (chain_mod_LDFLAGS): Likewise.
7849 * DISTLIST: Added include/grub/efi/chainloader.h,
7850 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
7852 * include/grub/efi/chainloader.h: New file.
7853 * loader/efi/chainloader.c: Likewise.
7854 * loader/efi/chainloader_normal.c: Likewise.
7856 2006-04-30 Marco Gerards <marco@gnu.org>
7858 * commands/configfile.c (grub_cmd_source): New function.
7859 (GRUB_MOD_INIT): Register the commands `source' and `.'.
7860 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
7862 2006-04-30 Marco Gerards <marco@gnu.org>
7864 * normal/execute.c (grub_script_execute_cmd): Change the return
7865 type to `grub_err_t'. Correctly return the error.
7866 (grub_script_execute_cmdline): In case a command line is not a
7867 command or a function, try to interpret it as an assignment.
7869 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7871 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
7872 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
7873 skip a node whose name is obviously invalid as UTF-16,
7874 i.e. contains a NUL character. Stop the iteration when the last
7875 directory entry is found. Instead of using the return value of
7876 grub_hfsplus_btree_iterate_node, store the value in RET and use
7877 it, because the iterator can be stopped by the last directory
7880 2006-04-30 Marco Gerards <marco@gnu.org>
7882 * include/grub/env.h (grub_env_export): New prototype. Reported
7883 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
7885 2006-04-30 Marco Gerards <marco@gnu.org>
7887 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
7888 size of the extents in a catalog file record.
7890 2006-04-29 Marco Gerards <marco@gnu.org>
7892 * commands/configfile.c (grub_cmd_configfile): Execute the
7893 configfile within its own context.
7895 * include/grub/env.h (grub_env_context_open): New prototype.
7896 (grub_env_context_close): Likewise.
7898 * kern/env.c (grub_env): Removed.
7899 (grub_env_sorted): Likewise.
7900 (grub_env_context): New variable.
7901 (grub_env_var_context): Likewise.
7902 (grub_env_find): Search both the active context and the global
7904 (grub_env_context_open): New function.
7905 (grub_env_context_close): Likewise.
7906 (grub_env_insert): Likewise.
7907 (grub_env_remove): Likewise.
7908 (grub_env_export): Likewise.
7909 (grub_env_set): Changed to use helper functions to avoid code
7911 (grub_env_iterate): Rewritten so both the current context and the
7912 global context are being used.
7914 * normal/command.c (export_command): New function.
7915 (grub_command_init): Register the `export' function.
7917 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
7919 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
7920 explicitly to suppress gcc's warnings.
7921 * fs/fat.c (grub_fat_find_dir): Likewise.
7922 (grub_fat_label): Likewise.
7923 * fs/xfs.c (grub_xfs_read_inode): Likewise.
7924 (grub_xfs_mount): Likewise.
7925 (grub_xfs_label): Likewise.
7926 * fs/affs.c (grub_affs_mount): Likewise.
7927 (grub_affs_label): Likewise.
7928 (grub_affs_iterate_dir): Likewise.
7929 * fs/sfs.c (grub_sfs_mount): Likewise.
7930 (grub_sfs_iterate_dir): Likewise.
7931 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
7932 * fs/hfs.c (grub_hfs_mount): Likewise.
7933 (grub_hfs_cmp_catkeys): Likewise.
7934 (grub_hfs_find_dir): Likewise.
7935 (grub_hfs_dir): Likewise.
7936 (grub_hfs_label): Likewise.
7937 * fs/jfs.c (grub_jfs_mount): Likewise.
7938 (grub_jfs_opendir): Likewise.
7939 (grub_jfs_getent): Likewise.
7940 (grub_jfs_lookup_symlink): Likewise.
7941 (grub_jfs_label): Likewise.
7942 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
7943 (grub_hfsplus_iterate_dir): Likewise.
7944 (grub_hfsplus_btree_iterate_node): Made static.
7946 * util/grub-emu.c (prefix): New variable.
7947 (grub_machine_set_prefix): New function.
7948 (main): Do not set the environment variable "prefix" here. Only
7949 set PREFIX, which is used later by grub_machine_set_prefix.
7951 * include/grub/video.h: Do not include grub/symbol.h.
7952 (grub_video_register): Not exported. This symbol is not defined in
7954 (grub_video_unregister): Likewise.
7955 (grub_video_iterate): Likewise.
7956 (grub_video_setup): Likewise.
7957 (grub_video_restore): Likewise.
7958 (grub_video_get_info): Likewise.
7959 (grub_video_get_blit_format): Likewise.
7960 (grub_video_set_palette): Likewise.
7961 (grub_video_get_palette): Likewise.
7962 (grub_video_set_viewport): Likewise.
7963 (grub_video_get_viewport): Likewise.
7964 (grub_video_map_color): Likewise.
7965 (grub_video_map_rgb): Likewise.
7966 (grub_video_map_rgba): Likewise.
7967 (grub_video_fill_rect): Likewise.
7968 (grub_video_blit_glyph): Likewise.
7969 (grub_video_blit_bitmap): Likewise.
7970 (grub_video_blit_render_target): Likewise.
7971 (grub_video_scroll): Likewise.
7972 (grub_video_swap_buffers): Likewise.
7973 (grub_video_create_render_target): Likewise.
7974 (grub_video_delete_render_target): Likewise.
7975 (grub_video_set_active_render_target): Likewise.
7977 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
7979 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
7981 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
7982 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7983 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7984 instead of $(srcdir)/genkernsyms.sh.
7986 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
7987 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7988 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7989 instead of $(srcdir)/genkernsyms.sh.
7991 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
7992 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7993 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7994 instead of $(srcdir)/genkernsyms.sh.
7996 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
7997 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7998 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7999 instead of $(srcdir)/genkernsyms.sh.
8001 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
8004 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
8006 (gensymlist.sh): New target.
8007 (genkernsyms.sh): Likewise.
8009 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
8010 genkernsyms.sh.in and gensymlist.sh.in.
8012 * genkernsyms.sh: Removed.
8013 * gensymlist.sh: Likewise.
8015 * genkernsyms.sh.in: New file.
8016 * gensymlist.sh.in: Likewise.
8018 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8020 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8021 clobber "prefix", since we may have already set it manually.
8023 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8025 * kern/misc.c (abort): New alias for grub_abort.
8027 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
8029 A new machine-specific function "grub_machine_set_prefix" is
8030 defined. This is called after loading modules, so that a prefix
8031 initialization can use modules. Also, this change adds an
8032 intensive debugging feature for the memory manager via the
8033 configure option "--enable-mm-debug".
8035 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8038 * kern/sparc64/ieee1275/init.c (abort): Removed.
8039 (grub_stop): Likewise.
8040 (grub_exit): New function.
8041 (grub_set_prefix): Renamed to ...
8042 (grub_machine_set_prefix): ... this.
8043 (grub_machine_init): Do not call grub_set_prefix.
8045 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8046 (grub_machine_set_prefix): ... this.
8047 (grub_machine_init): Do not call grub_set_prefix.
8049 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8050 (grub_machine_init): Do not set the prefix here.
8052 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8054 * kern/efi/init.c: Include grub/mm.h.
8055 (grub_efi_set_prefix): New function.
8057 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8058 (grub_efi_get_filename): New function.
8059 (grub_print_device_path): Renamed to ...
8060 (grub_efi_print_device_path): ... this.
8062 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8063 [MM_DEBUG] (grub_realloc): Likewise.
8064 [MM_DEBUG] (grub_free): Likewise.
8065 [MM_DEBUG] (grub_memalign): Likewise.
8066 [MM_DEBUG] (grub_mm_debug): New variable.
8067 [MM_DEBUG] (grub_debug_malloc): New function.
8068 [MM_DEBUG] (grub_debug_free): New function.
8069 [MM_DEBUG] (grub_debug_realloc): New function.
8070 [MM_DEBUG] (grub_debug_memalign): New function.
8072 * kern/misc.c (grub_abort): Print a newline to distinguish
8075 * kern/main.c (grub_main): Call grub_machine_set_prefix and
8076 grub_set_root_dev after loading modules. This is necessary when
8077 setting a prefix depends on modules.
8079 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8080 (grub_efi_print_device_path): ... this.
8081 (grub_efi_get_filename): New prototype.
8082 (grub_efi_set_prefix): Likewise.
8084 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8086 (grub_efidisk_get_device_handle): New prototype.
8087 (grub_efidisk_get_device_name): Likewise.
8089 * include/grub/mm.h: Include config.h.
8090 (MM_DEBUG): Removed.
8091 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8092 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8093 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8094 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8095 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8096 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8097 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8098 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8099 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8101 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8103 * disk/efi/efidisk.c: Include grub/partition.h.
8104 (iterate_child_devices): New function.
8105 (add_device): First, compare only last device path nodes, so that
8106 devices are sorted by the types.
8107 (grub_efidisk_get_device_handle): New function.
8108 (grub_efidisk_get_device_name): Likewise.
8110 * configure.ac (--enable-mm-debug): New option to enable the
8111 memory manager debugging feature. This makes the binary much
8112 bigger, so is disabled by default.
8114 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
8116 Use grub_abort instead of grub_stop, and grub_exit must be
8117 define in each architecture now. Also, this change adds support
8120 * util/i386/pc/grub-probefs.c: Include grub/term.h.
8121 (grub_getkey): New function.
8122 (grub_term_get_current): Likewise.
8124 * util/i386/pc/grub-setup.c: Include grub/term.h.
8125 (grub_getkey): New function.
8126 (grub_term_get_current): Likewise.
8128 * util/misc.c (grub_stop): Renamed to ...
8129 (grub_exit): ... this.
8131 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8132 (grub_exit): ... this.
8133 (grub_machine_init): Use grub_abort instead of abort.
8134 (grub_stop): Removed.
8136 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8139 * kern/i386/pc/startup.S (grub_exit): New function.
8140 (cold_reboot): New label.
8142 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8143 (grub_efi_init): Call grub_efidisk_init.
8144 (grub_efi_fini): Call grub_efidisk_fini.
8146 * kern/efi/efi.c: Include grub/mm.h.
8147 (grub_efi_console_control_guid): Renamed to ...
8148 (console_control_guid): ... this.
8149 (grub_efi_loaded_image_guid): Renamed to ...
8150 (loaded_image_guid): ... this.
8151 (grub_efi_locate_handle): New function.
8152 (grub_efi_open_protocol): Likewise.
8153 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8154 GRUB_EFI_CONSOLE_CONTROL_GUID.
8155 (grub_efi_exit): Removed.
8156 (grub_stop): Likewise.
8157 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8158 (grub_exit): New function.
8159 (grub_print_device_path): Likewise.
8161 * kern/rescue.c (grub_rescue_cmd_exit): New function.
8162 (grub_enter_rescue_mode): Register "exit".
8164 * kern/misc.c (grub_real_dprintf): A cosmetic change.
8165 (grub_abort): New function.
8167 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8169 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8171 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8173 * include/grub/efi/efi.h (grub_efi_exit): Removed.
8174 (grub_print_device_path): New prototype.
8175 (grub_efi_locate_handle): Likewise.
8176 (grub_efi_open_protocol): Likewise.
8178 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8179 * disk/efi/efidisk.c: Likewise.
8181 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8183 * include/grub/efi/console_control.h
8184 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8186 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8187 last 8 bytes as an array.
8188 (GRUB_EFI_DISK_IO_GUID): New macro.
8189 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8190 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8191 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8193 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8194 (struct grub_efi_device_path): Rename the member "sub_type" to
8196 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
8197 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
8198 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
8199 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
8200 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
8201 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
8202 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
8203 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
8204 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
8205 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
8206 (struct grub_efi_pci_device_path): New structure.
8207 (grub_efi_pci_device_path_t): New type.
8208 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
8209 (struct grub_efi_pccard_device_path): New structure.
8210 (grub_efi_pccard_device_path_t): New type.
8211 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
8212 (struct grub_efi_memory_mapped_device_path): New structure.
8213 (grub_efi_memory_mapped_device_path_t): New type.
8214 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
8215 (struct grub_efi_vendor_device_path): New structure.
8216 (grub_efi_vendor_device_path_t): New type.
8217 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
8218 (struct grub_efi_controller_device_path): New structure.
8219 (grub_efi_controller_device_path_t): New type.
8220 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
8221 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
8222 (struct grub_efi_acpi_device_path): New structure.
8223 (grub_efi_acpi_device_path_t): New type.
8224 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
8225 (struct grub_efi_expanded_acpi_device_path): New structure.
8226 (grub_efi_expanded_acpi_device_path_t): New type.
8227 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
8228 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
8229 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
8230 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
8231 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
8232 (struct grub_efi_atapi_device_path): New structure.
8233 (grub_efi_atapi_device_path_t): New type.
8234 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
8235 (struct grub_efi_fibre_channel_device_path): New structure.
8236 (grub_efi_fibre_channel_device_path_t): New type.
8237 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
8238 (struct grub_efi_1394_device_path): New structure.
8239 (grub_efi_1394_device_path_t): New type.
8240 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
8241 (struct grub_efi_usb_device_path): New structure.
8242 (grub_efi_usb_device_path_t): New type.
8243 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
8244 (struct grub_efi_usb_class_device_path): New structure.
8245 (grub_efi_usb_class_device_path_t): New type.
8246 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
8247 (struct grub_efi_i2o_device_path): New structure.
8248 (grub_efi_i2o_device_path_t): New type.
8249 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
8250 (struct grub_efi_mac_address_device_path): New structure.
8251 (grub_efi_mac_address_device_path_t): New type.
8252 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
8253 (struct grub_efi_ipv4_device_path): New structure.
8254 (grub_efi_ipv4_device_path_t): New type.
8255 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
8256 (struct grub_efi_ipv6_device_path): New structure.
8257 (grub_efi_ipv6_device_path_t): New type.
8258 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
8259 (struct grub_efi_infiniband_device_path): New structure.
8260 (grub_efi_infiniband_device_path_t): New type.
8261 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
8262 (struct grub_efi_uart_device_path): New structure.
8263 (grub_efi_uart_device_path_t): New type.
8264 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
8265 (struct grub_efi_vendor_messaging_device_path): New structure.
8266 (grub_efi_vendor_messaging_device_path_t): New type.
8267 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
8268 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
8269 (struct grub_efi_hard_drive_device_path): New structure.
8270 (grub_efi_hard_drive_device_path_t): New type.
8271 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
8272 (struct grub_efi_cdrom_device_path): New structure.
8273 (grub_efi_cdrom_device_path_t): New type.
8274 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
8275 (struct grub_efi_vendor_media_device_path): New structure.
8276 (grub_efi_vendor_media_device_path_t): New type.
8277 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
8278 (struct grub_efi_file_path_device_path): New structure.
8279 (grub_efi_file_path_device_path_t): New type.
8280 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
8281 (struct grub_efi_protocol_device_path): New structure.
8282 (grub_efi_protocol_device_path_t): New type.
8283 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
8284 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
8285 (struct grub_efi_bios_device_path): New structure.
8286 (grub_efi_bios_device_path_t): New type.
8287 (struct grub_efi_disk_io): New structure.
8288 (grub_efi_disk_io_t): New type.
8289 (struct grub_efi_block_io_media): New structure.
8290 (grub_efi_block_io_media_t): New type.
8291 (struct grub_efi_block_io): New structure.
8292 (grub_efi_block_io_t): New type.
8294 * include/grub/misc.h (grub_stop): Removed.
8295 (grub_exit): New prototype.
8296 (grub_abort): Likewise.
8298 * include/grub/disk.h (enum grub_disk_dev_id): Added
8299 GRUB_DISK_DEVICE_EFIDISK_ID.
8301 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
8303 (kernel_syms.lst): Remove the target if an error occurs.
8305 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
8307 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
8308 as it was simply too buggy.
8310 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
8312 * kern/misc.c (grub_lltoa): New function.
8313 (grub_vsprintf): Added support for the long long suffix,
8316 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
8318 * Makefile.in (LDFLAGS): Add variable.
8319 (LD): Remove variable.
8320 * configure.ac: Add -m32 to LDFLAGS.
8321 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
8322 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8323 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8324 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8325 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8327 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8328 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8329 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8331 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
8333 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8334 length for unknown glyph.
8336 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8338 Add support for pre-loaded modules into the EFI port.
8340 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8341 completely. Accept one more argument DIR. The caller has changed.
8343 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8345 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8346 (grub_efi_loaded_image_guid): New variable.
8347 (grub_efi_get_loaded_image): New function.
8348 (grub_arch_modules_addr): Likewise.
8350 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8353 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8354 (struct grub_efi_loaded_image): New structure.
8355 (grub_efi_loaded_image_t): New type.
8357 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8359 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8360 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8361 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8363 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
8365 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8367 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
8369 * DISTLIST: Added include/grub/efi/console.h,
8370 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8371 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8373 * include/grub/efi/console.h: New file.
8374 * include/grub/efi/time.h: Likewise.
8375 * include/grub/i386/efi/kernel.h: Likewise.
8376 * kern/efi/init.c: Likewise.
8377 * kern/efi/mm.c: Likewise.
8378 * term/efi/console.c: Likewise.
8380 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8381 (grub_stop): Removed.
8382 (grub_get_rtc): Likewise.
8383 (grub_machine_init): Simply call grub_efi_init.
8384 (grub_machine_fini): Call grub_efi_fini.
8386 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8387 (grub_efi_output_string): Removed.
8388 (grub_efi_stall): New function.
8389 (grub_stop): Likewise.
8390 (grub_get_rtc): Likewise.
8392 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8393 (grub_efi_stall): New prototype.
8394 (grub_efi_allocate_pages): Likewise.
8395 (grub_efi_free_pages): Likewise.
8396 (grub_efi_get_memory_map): Likewise.
8397 (grub_efi_mm_init): Likewise.
8398 (grub_efi_mm_fini): Likewise.
8399 (grub_efi_init): Likewise.
8400 (grub_efi_fini): Likewise.
8402 * include/grub/i386/efi/time.h: Do not include
8403 grub/symbol.h. Include grub/efi/time.h.
8404 (GRUB_TICKS_PER_SECOND): Removed.
8405 (grub_get_rtc): Likewise.
8407 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8408 Added padding. The EFI spec is buggy.
8409 (GRUB_EFI_BLACK): New macro.
8410 (GRUB_EFI_BLUE): Likewise.
8411 (GRUB_EFI_GREEN): Likewise.
8412 (GRUB_EFI_CYAN): Likewise.
8413 (GRUB_EFI_RED): Likewise.
8414 (GRUB_EFI_MAGENTA): Likewise.
8415 (GRUB_EFI_BROWN): Likewise.
8416 (GRUB_EFI_LIGHTGRAY): Likewise.
8417 (GRUB_EFI_BRIGHT): Likewise.
8418 (GRUB_EFI_DARKGRAY): Likewise.
8419 (GRUB_EFI_LIGHTBLUE): Likewise.
8420 (GRUB_EFI_LIGHTGREEN): Likewise.
8421 (GRUB_EFI_LIGHTCYAN): Likewise.
8422 (GRUB_EFI_LIGHTRED): Likewise.
8423 (GRUB_EFI_LIGHTMAGENTA): Likewise.
8424 (GRUB_EFI_YELLOW): Likewise.
8425 (GRUB_EFI_WHITE): Likewise.
8426 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8427 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8428 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8429 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8430 (GRUB_EFI_BACKGROUND_RED): Likewise.
8431 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8432 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8433 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8434 (GRUB_EFI_TEXT_ATTR): Likewise.
8436 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8437 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8438 (kernel_mod_HEADERS): Added efi/time.h.
8440 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
8442 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8443 include/grub/efi/api.h, include/grub/efi/console_control.h,
8444 include/grub/efi/efi.h, include/grub/efi/pe32.h,
8445 include/grub/i386/efi/time.h, kern/efi/efi.c,
8446 kern/i386/efi/init.c, kern/i386/efi/startup.S,
8447 and util/i386/efi/grub-mkimage.c.
8449 * Makefile.in (RMKFILES): Added i386-efi.rmk.
8451 * genmk.rb (PModule#rule): Do not export symbols if
8452 #{prefix}_EXPORTS is set to "no".
8454 * conf/i386-efi.mk: New file.
8455 * conf/i386-efi.rmk: Likewise.
8456 * include/grub/efi/api.h: Likewise.
8457 * include/grub/efi/console_control.h: Likewise.
8458 * include/grub/efi/efi.h: Likewise.
8459 * include/grub/efi/pe32.h: Likewise.
8460 * include/grub/i386/efi/time.h: Likewise.
8461 * kern/efi/efi.c: Likewise.
8462 * kern/i386/efi/init.c: Likewise.
8463 * kern/i386/efi/startup.S: Likewise.
8464 * util/i386/efi/grub-mkimage.c: Likewise.
8466 2006-04-17 Marco Gerards <marco@gnu.org>
8468 * include/grub/script.h: Include <grub/parser.h> and
8469 "grub_script.tab.h".
8470 (struct grub_lexer_param): New struct.
8471 (struct grub_parser_param): Likewise.
8472 (grub_script_create_arglist): Pass the state in an argument.
8473 (grub_script_add_arglist): Likewise.
8474 (grub_script_create_cmdline): Likewise.
8475 (grub_script_create_cmdblock): Likewise.
8476 (grub_script_create_cmdif): Likewise.
8477 (grub_script_create_cmdmenu): Likewise.
8478 (grub_script_add_cmd): Likewise.
8479 (grub_script_arg_add): Likewise.
8480 (grub_script_lexer_ref): Likewise.
8481 (grub_script_lexer_deref): Likewise.
8482 (grub_script_lexer_record_start): Likewise.
8483 (grub_script_lexer_record_stop): Likewise.
8484 (grub_script_mem_record): Likewise.
8485 (grub_script_mem_record_stop): Likewise.
8486 (grub_script_malloc): Likewise.
8487 (grub_script_yylex): Likewise.
8488 (grub_script_yyparse): Likewise.
8489 (grub_script_yyerror): Likewise.
8490 (grub_script_yylex): Likewise.
8491 (grub_script_lexer_init): Return the state.
8493 * normal/lexer.c (grub_script_lexer_state): Removed variable.
8494 (grub_script_lexer_done): Likewise.
8495 (grub_script_lexer_getline): Likewise.
8496 (grub_script_lexer_refs): Likewise.
8498 (newscript): Likewise.
8500 (recording): Likewise.
8501 (recordpos): Likewise.
8502 (recordlen): Likewise.
8503 (grub_script_lexer_init): Return the state instead of setting
8505 (grub_script_lexer_ref): Use the newly added argument for state
8507 (grub_script_lexer_deref): Likewise.
8508 (grub_script_lexer_record_start): Likewise.
8509 (grub_script_lexer_record_stop): Likewise.
8510 (recordchar): Likewise.
8511 (nextchar): Likewise.
8512 (grub_script_yylex2): Likewise.
8513 (grub_script_yylex): Likewise.
8514 (grub_script_yyerror): Likewise.
8516 * normal/parser.y (func_mem): Removed variable.
8517 (menu_entry): Likewise.
8519 (%lex-param): New parser option.
8520 (%parse-param): Likewise.
8521 (script): Always return the AST.
8522 (argument): Pass the state around.
8523 (arguments): Likewise.
8524 (grubcmd): Likewise.
8525 (commands): Likewise.
8526 (function): Likewise.
8527 (menuentry): Likewise.
8528 (if_statement): Likewise.
8531 * normal/script.c (grub_script_memused): Removed variable.
8532 (grub_script_parsed): Likewise.
8533 (grub_script_malloc): Added a state argument. Use that instead of
8535 (grub_script_mem_record): Likewise.
8536 (grub_script_mem_record_stop): Likewise.
8537 (grub_script_arg_add): Likewise.
8538 (grub_script_add_arglist): Likewise.
8539 (grub_script_create_cmdline): Likewise.
8540 (grub_script_create_cmdif): Likewise.
8541 (grub_script_create_cmdmenu): Likewise.
8542 (grub_script_add_cmd): Likewise.
8543 (grub_script_parse): Setup the state before calling the parser.
8545 2006-04-16 Marco Gerards <marco@gnu.org>
8547 * normal/command.c (grub_command_init): Remove the title command.
8549 * normal/lexer.c (grub_script_yylex): Renamed from this...
8550 (grub_script_yylex2): ... to this.
8551 (grub_script_yylex): New function. Temporary
8552 introduced to filter some tokens.
8553 (grub_script_yyerror): Print a newline.
8555 * normal/main.c (read_config_file): Output information about the
8556 lines that contain errors. Wait for a key after all lines have
8557 been processed. Don't return an empty menu.
8559 * normal/parser.y (func_mem): Don't initialize.
8560 (menu_entry): Likewise.
8561 (err): New variable.
8562 (script): Don't return anything when an error was encountered.
8563 (ws, returns): Removed rules.
8564 (argument): Disabled concatenated variable support.
8565 (arguments): Remove explicit separators.
8566 (grubcmd): Likewise.
8567 (function): Likewise.
8568 (menuentry): Likewise.
8570 (commands): Likewise. Add error handling.
8572 * normal/script.c (grub_script_create_cmdline): If
8573 `grub_script_parsed' is 0, assume the parser encountered an error.
8575 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
8577 * configure.ac: Add support for EFI. Fix the typo
8578 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
8580 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8582 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
8583 foreign multibyte characters should be shown correctly.
8585 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8587 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
8589 (read_config_file): Made it to close file before returning.
8591 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
8593 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
8594 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
8595 video/i386/pc/vbefill.c.
8597 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
8598 video/i386/pc/vbefill.c.
8600 * include/grub/video.h (grub_video_blit_format): New enum.
8601 (grub_video_mode_info): Added new member blit_format.
8602 (grub_video_get_blit_format): New function prototype.
8604 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
8606 (grub_video_vbe_map_rgb): Likewise.
8607 (grub_video_vbe_unmap_color): Likewise.
8609 * include/grub/i386/pc/vbeblit.h: New file.
8611 * include/grub/i386/pc/vbefill.h: New file.
8613 * video/video.c (grub_video_get_blit_format): New function.
8614 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
8615 (grub_video_vbe_map_rgb): Likewise.
8616 (grub_video_vbe_unmap_color): Likewise.
8618 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
8620 (grub_video_vbe_blit_render_target): Changed to use more optimized
8622 (grub_video_vbe_setup): Added detection for optimized settings.
8623 (grub_video_vbe_create_render_target): Likewise.
8625 * video/i386/pc/vbeblit.c: New file.
8627 * video/i386/pc/vbefill.c: New file.
8629 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
8631 * font/manager.c (grub_font_get_glyph): Removed font fixup from
8634 * util/unifont2pff.rb: ... and moved it to here. Improved argument
8635 parsing to support both hex and dec ranges. If filename was missing
8636 show usage information.
8638 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
8640 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
8641 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
8643 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
8644 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
8645 (video_mod_SOURCES): Added.
8646 (video_mod_CFLAGS): Likewise.
8647 (video_mod_LDFLAGS): Likewise.
8648 (gfxterm_mod_SOURCES): Likewise.
8649 (gfxterm_mod_CFLAGS): Likewise.
8650 (gfxterm_mod_LDFLAGS): Likewise.
8651 (videotest_mod_SOURCES): Likewise.
8652 (videotest_mod_CFLAGS): Likewise.
8653 (videotest_mod_LDFLAGS): Likewise.
8654 (vesafb_mod_SOURCES): Removed.
8655 (vesafb_mod_CFLAGS): Likewise.
8656 (vesafb_mod_LDFLAGS): Likewise.
8657 (vga_mod_SOURCES): Likewise.
8658 (vga_mod_CFLAGS): Likewise.
8659 (vga_mod_LDFLAGS): Likewise.
8661 * commands/videotest.c: New file.
8663 * font/manager.c (fill_with_default_glyph): Modified to use
8665 (grub_font_get_glyph): Likewise.
8666 (fontmanager): Renamed from this...
8667 (font_manager): ... to this.
8669 * include/grub/font.h (grub_font_glyph): Added new structure.
8670 (grub_font_get_glyph): Modified to use grub_font_glyph.
8672 * include/grub/misc.h (grub_abs): Added as inline function.
8674 * include/grub/video.h: New file.
8676 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
8677 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
8678 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
8679 (grub_vbe_get_controller_info): Renamed from this...
8680 (grub_vbe_bios_get_controller_info): ... to this.
8681 (grub_vbe_get_mode_info): Renamed from this...
8682 (grub_vbe_bios_get_mode_info): ... to this.
8683 (grub_vbe_set_mode): Renamed from this...
8684 (grub_vbe_bios_set_mode): ... to this.
8685 (grub_vbe_get_mode): Renamed from this...
8686 (grub_vbe_bios_get_mode): ... to this.
8687 (grub_vbe_set_memory_window): Renamed from this...
8688 (grub_vbe_bios_set_memory_window): ... to this.
8689 (grub_vbe_get_memory_window): Renamed from this...
8690 (grub_vbe_bios_get_memory_window): ... to this.
8691 (grub_vbe_set_scanline_length): Renamed from this...
8692 (grub_vbe_set_scanline_length): ... to this.
8693 (grub_vbe_get_scanline_length): Renamed from this...
8694 (grub_vbe_bios_get_scanline_length): ... to this.
8695 (grub_vbe_set_display_start): Renamed from this...
8696 (grub_vbe_bios_set_display_start): ... to this.
8697 (grub_vbe_get_display_start): Renamed from this...
8698 (grub_vbe_bios_get_display_start): ... to this.
8699 (grub_vbe_set_palette_data): Renamed from this...
8700 (grub_vbe_bios_set_palette_data): ... to this.
8701 (grub_vbe_set_pixel_rgb): Removed.
8702 (grub_vbe_set_pixel_index): Likewise.
8704 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
8706 (grub_vbe_bios_get_controller_info): ... to this.
8707 (grub_vbe_get_mode_info): Renamed from this...
8708 (grub_vbe_bios_get_mode_info): ... to this.
8709 (grub_vbe_set_mode): Renamed from this...
8710 (grub_vbe_bios_set_mode): ... to this.
8711 (grub_vbe_get_mode): Renamed from this...
8712 (grub_vbe_bios_get_mode): ... to this.
8713 (grub_vbe_set_memory_window): Renamed from this...
8714 (grub_vbe_bios_set_memory_window): ... to this.
8715 (grub_vbe_get_memory_window): Renamed from this...
8716 (grub_vbe_bios_get_memory_window): ... to this.
8717 (grub_vbe_set_scanline_length): Renamed from this...
8718 (grub_vbe_set_scanline_length): ... to this.
8719 (grub_vbe_get_scanline_length): Renamed from this...
8720 (grub_vbe_bios_get_scanline_length): ... to this.
8721 (grub_vbe_set_display_start): Renamed from this...
8722 (grub_vbe_bios_set_display_start): ... to this.
8723 (grub_vbe_get_display_start): Renamed from this...
8724 (grub_vbe_bios_get_display_start): ... to this.
8725 (grub_vbe_set_palette_data): Renamed from this...
8726 (grub_vbe_bios_set_palette_data): ... to this.
8727 (grub_vbe_bios_get_controller_info): Fixed problem with registers
8728 getting corrupted after calling it. Added more pushes and pops.
8729 (grub_vbe_bios_set_mode): Likewise.
8730 (grub_vbe_bios_get_mode): Likewise.
8731 (grub_vbe_bios_get_memory_window): Likewise.
8732 (grub_vbe_bios_set_scanline_length): Likewise.
8733 (grub_vbe_bios_get_scanline_length): Likewise.
8734 (grub_vbe_bios_get_display_start): Likewise.
8735 (grub_vbe_bios_set_palette_data): Likewise.
8737 * normal/cmdline.c (cl_set_pos): Refresh the screen.
8738 (cl_insert): Likewise.
8739 (cl_delete): Likewise.
8741 * term/gfxterm.c: New file.
8743 * term/i386/pc/vesafb.c: Removed file.
8745 * video/video.c: New file.
8747 * video/i386/pc/vbe.c (real2pm): Added new function.
8748 (grub_video_vbe_draw_pixel): Likewise.
8749 (grub_video_vbe_get_video_ptr): Likewise.
8750 (grub_video_vbe_get_pixel): Likewise
8751 (grub_video_vbe_init): Likewise.
8752 (grub_video_vbe_fini): Likewise.
8753 (grub_video_vbe_setup): Likewise.
8754 (grub_video_vbe_get_info): Likewise.
8755 (grub_video_vbe_set_palette): Likewise.
8756 (grub_video_vbe_get_palette): Likewise.
8757 (grub_video_vbe_set_viewport): Likewise.
8758 (grub_video_vbe_get_viewport): Likewise.
8759 (grub_video_vbe_map_color): Likewise.
8760 (grub_video_vbe_map_rgb): Likewise.
8761 (grub_video_vbe_map_rgba): Likewise.
8762 (grub_video_vbe_unmap_color): Likewise.
8763 (grub_video_vbe_fill_rect): Likewise.
8764 (grub_video_vbe_blit_glyph): Likewise.
8765 (grub_video_vbe_blit_bitmap): Likewise.
8766 (grub_video_vbe_blit_render_target): Likewise.
8767 (grub_video_vbe_scroll): Likewise.
8768 (grub_video_vbe_swap_buffers): Likewise.
8769 (grub_video_vbe_create_render_target): Likewise.
8770 (grub_video_vbe_delete_render_target): Likewise.
8771 (grub_video_vbe_set_active_render_target): Likewise.
8772 (grub_vbe_set_pixel_rgb): Remove function.
8773 (grub_vbe_set_pixel_index): Likewise.
8774 (index_color_mode): Remove static variable.
8775 (active_mode): Likewise.
8776 (framebuffer): Likewise.
8777 (bytes_per_scan_line): Likewise.
8778 (grub_video_vbe_adapter): Added new static variable.
8779 (framebuffer): Likewise.
8780 (render_target): Likewise.
8781 (initial_mode): Likewise.
8782 (mode_in_use): Likewise.
8783 (mode_list): Likewise.
8785 2006-03-10 Marco Gerards <marco@gnu.org>
8787 * configure.ac (AC_INIT): Bumped to 1.93.
8789 * DISTLIST: Added `include/grub/hfs.h'.
8791 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
8793 * boot/i386/pc/boot.S (general_error): Before looping, try INT
8794 18H, which might help the BIOS falling back to next boot media.
8796 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
8798 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
8799 Poe Chen <poe.poechen@gmail.com>.
8801 2006-01-17 Marco Gerards <marco@gnu.org>
8803 * include/grub/normal.h: Include <grub/script.h>.
8804 (grub_command_list): Removed struct.
8805 (grub_command_list_t): Removed type.
8806 (grub_menu_entry): Remove members `num' and `command_list'. Add
8807 members `commands' and `sourcecode'.
8808 * include/grub/script.h: Add inclusion guards.
8809 (grub_script_cmd_menuentry): New struct.
8810 (grub_script_execute_menuentry): New prototype.
8811 (grub_script_lexer_record_start): Likewise.
8812 (grub_script_lexer_record_stop): Likewise.
8813 * normal/execute.c (grub_script_execute_menuentry): New function.
8814 * normal/lexer.c (record, recording, recordpos, recordlen): New
8816 (grub_script_lexer_record_start): New function.
8817 (grub_script_lexer_record_stop): Likewise.
8818 (recordchar): Likewise.
8819 (nextchar): Likewise.
8820 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
8821 2048 as the buffer size. Add the tokens `menuentry' and `@'.
8822 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
8823 (current_menu): New variable.
8824 (free_menu): Mainly rewritten.
8825 (grub_normal_menu_addentry): New function.
8826 (read_config_file): Rewritten.
8827 * normal/menu.c (run_menu_entry): Mainly rewritten.
8828 * normal/menu_entry.c (make_screen): Rewritten the code to insert
8830 (run): Mainly rewritten.
8831 * normal/parser.y (menu_entry): New variable.
8832 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
8833 (menuentry): New rule.
8834 (command): Add `menuentry'.
8835 (if_statement): Allow additional returns before `fi'.
8836 * normal/script.c (grub_script_create_cmdmenu): New function.
8838 2006-01-03 Marco Gerards <marco@gnu.org>
8840 * INSTALL: GNU Bison is required.
8841 * configure.ac: Rewritten the test to detect Bison.
8842 * Makefile.in (YACC): New variable. Reported by Xun Sun
8843 <xun.sun.cn@gmail.com>.
8845 2006-01-03 Marco Gerards <marco@gnu.org>
8847 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
8848 the HFS+ filesystem to filesystem blocks.
8849 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
8850 GCC warning is silenced.
8852 2006-01-03 Marco Gerards <marco@gnu.org>
8854 * partmap/apple.c (apple_partition_map_iterate): Convert the data
8855 read from disk from big endian to host byte order.
8857 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
8859 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
8861 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
8862 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
8863 embedded HFS+ filesystem.
8864 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
8865 (grub_hfs_sblock): Move from here...
8866 * include/grub/hfs.h: To here... New file.
8867 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
8869 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
8871 (grub_hfsplus_volheader): Change type of member `magic' to
8873 (grub_hfsplus_data): Add new member `embedded_offset'.
8874 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
8876 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
8877 Calculate the offset.
8879 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8881 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
8883 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
8885 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8887 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
8888 ENV->NAME is NULL after allocating ENV->VALUE.
8890 2005-12-25 Marco Gerards <marco@gnu.org>
8892 * kern/env.c (grub_env_set): Rewritten the error handling code.
8894 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8896 * geninit.sh: Made more robust, and more portable.
8898 2005-12-25 Marco Gerards <marco@gnu.org>
8900 Add support for Apple HFS+ filesystems.
8902 * fs/hfsplus.c: New file.
8904 * DISTLIST: Added `fs/hfsplus.c'.
8906 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
8907 (hfsplus_mod_SOURCES): New variable.
8908 (hfsplus_mod_CFLAGS): Likewise.
8909 (hfsplus_mod_LDFLAGS): Likewise.
8910 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
8911 (grub_setup_SOURCES): Likewise.
8912 (grub_mkdevicemap_SOURCES): Likewise.
8913 (grub_emu_SOURCES): Likewise.
8914 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8916 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
8918 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
8920 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8922 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
8923 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
8924 include/grub/parser.h, include/grub/script.h, kern/parser.c,
8925 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
8926 normal/lexer.c, normal/parser.y, normal/script.c, and
8928 Removed kern/sparc64/cache.c.
8930 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
8931 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
8934 * configure.ac (AC_INIT): Bumped to 1.92.
8936 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
8938 * kern/err.c (grub_error_push): Added new function to support error
8940 (grub_error_pop): Likewise.
8941 (grub_error_stack_items): New local variable to support error stacks.
8942 (grub_error_stack_pos): Likewise.
8943 (grub_error_stack_assert): Likewise.
8944 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
8946 (grub_print_error): Added support to print errors from error stack.
8948 * include/grub/err.h (grub_error_push): Added function prototype.
8949 (grub_error_pop): Likewise.
8951 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
8953 * configure.ac: Accept `powerpc64' as host_cpu.
8954 (amd64): Rename to `biarch32'.
8956 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
8957 non-cacheline-aligned addresses.
8959 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
8960 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
8961 if `size' is non-zero.
8963 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
8965 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
8966 and `cd' to make sure the filename is not prefixed with a
8968 (pkgdata_MODULES): Add `gpt.mod'.
8969 (gpt_mod_SOURCES): New variable.
8970 (gpt_mod_CFLAGS): Likewise.
8971 (gpt_mod_LDFLAGS): Likewise.
8973 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
8975 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
8978 * partmap/gpt.c: New file.
8980 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
8981 GPT partition map is detected.
8983 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
8985 * commands/i386/pc/play.c: New file.
8986 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
8987 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
8990 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
8992 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
8993 ((unused))' to silence gcc warning.
8995 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
8997 * configure.ac: Correct `AC_PROG_YACC' test.
8999 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9001 * util/powerpc/ieee1275/grub-install.in: Run the mount point
9002 check before installing files.
9004 2005-11-22 Mike Small <smallm@panix.com>
9006 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
9007 number regex so multidigit numbers are recognized correctly.
9009 2005-11-22 Mike Small <smallm@panix.com>
9011 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
9012 debugging message before attempting to claim memory.
9013 (grub_rescue_cmd_initrd): Add a claim debugging message and try
9014 multiple addresses in case of failure.
9016 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9018 * term/tparm.c (get_space): Remove empty `if' statement.
9020 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9022 * kern/parser.c (check_varstate): Rename `state' to 's'.
9024 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9026 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
9027 variable definitions to the beginning of each function. Sort stack
9029 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
9030 `buf' argument to `char *'.
9032 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9034 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9035 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9036 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9037 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9038 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9039 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9040 configfile.mod, search.mod, gzio.mod and test.mod.
9041 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9042 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9043 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9044 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9045 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9046 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9047 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9048 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9049 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9050 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9051 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9052 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9053 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9054 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9055 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9056 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9057 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9058 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9059 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9060 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9061 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9062 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9063 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9065 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9067 (pkgdata_MODULES): Add test.mod.
9069 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9071 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
9072 appending to variables with "+=".
9073 (PModule): Use full pathname to generate *.lst filenames.
9075 * Makefile.in: Fixed list rules moved from genmk.rb.
9076 (.DELETE_ON_ERROR): New special target.
9077 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9079 * conf/i386-pc.rmk: Include conf/common.mk.
9080 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9081 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9082 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9083 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9084 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9085 configfile.mod, search.mod, gzio.mod and test.mod.
9086 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9087 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9088 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9089 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9090 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9091 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9092 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9093 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9094 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9095 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9096 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9097 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9098 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9099 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9100 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9101 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9102 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9103 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9104 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9105 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9106 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9107 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9108 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9110 * conf/common.rmk: ... to here. New file.
9112 * conf/common.mk: New file.
9114 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
9116 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9117 (grub_script.tab.c): ... here.
9119 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9120 (grub_script.tab.c): ... here.
9122 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9123 (grub_script.tab.c): ... here.
9125 * normal/command.c (grub_command_find): Fixed a memory leak of
9126 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9128 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9130 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9131 "@" which marks the start of a comment on ARM.
9132 (VARIABLE): Likewise.
9134 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9136 Add support for Linux/ADFS partition tables.
9138 * partmap/acorn.c: New file.
9140 * include/grub/acorn_filecore.h: Likewise.
9142 * DISTLIST: Added `partmap/acorn.c' and
9143 `include/grub/acorn_filecore.h'.
9145 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9147 (pkgdata_MODULES): Add `acorn.mod'.
9148 (acorn_mod_SOURCES): New variable.
9149 (acorn_mod_CFLAGS): Likewise.
9151 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9153 (pkgdata_MODULES): Add `acorn.mod'.
9154 (acorn_mod_SOURCES): New variable.
9155 (acorn_mod_CFLAGS): Likewise.
9157 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9158 (pkgdata_MODULES): Add `acorn.mod'.
9159 (acorn_mod_SOURCES): New variable.
9160 (acorn_mod_CFLAGS): Likewise.
9161 (acorn_mod_LDFLAGS): Likewise.
9163 * include/types.h (grub_disk_addr_t): New typedef.
9165 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
9167 * geninit.sh: New file.
9169 * geninitheader.sh: Likewise.
9171 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9172 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9173 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9174 * commands/configfile.c (grub_configfile_init)
9175 (grub_configfile_fini): Likewise.
9176 * commands/default.c (grub_default_init, grub_default_fini):
9178 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9179 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9180 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9181 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9183 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9184 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9186 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
9187 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
9189 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9191 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
9193 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9194 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
9195 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
9196 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
9197 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
9198 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
9199 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
9200 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
9201 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
9202 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
9203 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
9204 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
9205 * partmap/amiga.c (grub_amiga_partition_map_init)
9206 (grub_amiga_partition_map_fini): Likewise.
9207 * partmap/apple.c (grub_apple_partition_map_init)
9208 (grub_apple_partition_map_fini): Likewise.
9209 * partmap/pc.c (grub_pc_partition_map_init)
9210 (grub_pc_partition_map_fini): Likewise.
9211 * partmap/sun.c (grub_sun_partition_map_init,
9212 grub_sun_partition_map_fini): Likewise.
9213 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
9216 * util/grub-emu.c: Include <grub_modules_init.h>.
9217 (main): Don't initialize and de-initialize any modules directly,
9218 use `grub_init_all' and `grub_fini_all' instead.
9220 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
9221 `grub_vesafb_mod_init'.
9222 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
9224 * term/i386/pc/vga.c (grub_vga_init): Renamed to
9225 `grub_vga_mod_init'. Updated all users.
9226 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
9228 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
9229 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
9232 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
9233 Generate a function to initialize the module in utilities.
9234 Updated all callers.
9235 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
9236 initialize the module in utilities. Updated all callers.
9238 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9240 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
9241 escape sequence and a literal ^L to clear the screen.
9243 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
9244 when returning from Open Firmware.
9246 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9248 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
9249 (grub_ofconsole_height): Likewise.
9250 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
9251 manually insert a '\n'.
9252 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
9253 `grub_ofconsole_height'. Return early if these are already set.
9255 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
9257 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9258 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
9259 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
9260 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
9261 and `normal/script.c'.
9262 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9263 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9264 (test_mod_SOURCES): New variable.
9265 (test_mod_CFLAGS): Likewise.
9266 (test_mod_LDFLAGS): Likewise.
9267 (pkgdata_MODULES): Add `test.mod'.
9268 (grub_script.tab.c): New rule.
9269 (grub_script.tab.h): Likewise.
9271 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
9273 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9274 `commands/test.c', `normal/execute.c', `normal/lexer.c',
9275 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9276 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9277 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9278 (test_mod_SOURCES): New variable.
9279 (test_mod_CFLAGS): Likewise.
9280 (pkgdata_MODULES): Add `test.mod'.
9281 (grub_script.tab.c): New rule.
9282 (grub_script.tab.h): Likewise.
9284 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
9286 Add initial scripting support.
9288 * commands/test.c: New file.
9289 * include/grub/script.h: Likewise.
9290 * normal/execute.c: Likewise.
9291 * normal/function.c: Likewise.
9292 * normal/lexer.c: Likewise.
9293 * normal/parser.y: Likewise.
9294 * normal/script.c: Likewise.
9296 * configure.ac: Add `AC_PROG_YACC' test.
9298 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
9299 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
9300 `normal/function.c' and `normal/script.c'.
9301 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9302 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9303 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
9305 (pkgdata_MODULES): Add `test.mod'.
9306 (grub_script.tab.c): New rule.
9307 (grub_script.tab.h): Likewise.
9309 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
9311 * include/grub/normal.h (grub_test_init): New prototype.
9312 (grub_test_fini): Likewise.
9314 * normal/command.c: Include <grub/script.h>.
9315 (grub_command_execute): Rewritten.
9317 * util/grub-emu.c (main): Call `grub_test_init' and
9320 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9322 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9324 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9325 there are no pending characters.
9327 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9329 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9330 `grub_strndup' to drop device arguments. Replace unnecessary
9331 `grub_strndup' with `grub_strdup'.
9333 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9335 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9336 `debug' environment variable has been set.
9338 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
9340 * Makefile.in (install-local): Use $(DATA).
9341 (uninstall): Likewise.
9342 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9343 (sbin_UTILITIES): ... to here.
9344 (sbin_SCRIPTS): New variable.
9345 (grub_install_SOURCES): New variable.
9346 * util/powerpc/ieee1275/grub-install.in: New file.
9347 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9349 (add_segments): Call `grub_util_get_path'.
9351 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9353 From Timothy Baldwin:
9354 * commands/ls.c (grub_ls_list_files): Close FILE with
9356 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9358 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
9360 * include/grub/parser.h: New file.
9362 * kern/parser.c: Likewise.
9364 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9365 (grub_setup_SOURCES): Likewise.
9366 (grub_probefs_SOURCES): Likewise.
9367 (grub_emu_SOURCES): Likewise.
9368 (kernel_img_HEADERS): Add `parser.h'.
9370 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9371 (grub_emu_SOURCES): Add `kern/parser.c'.
9372 (grubof_SOURCES): Likewise.
9374 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9375 (grubof_SOURCES): Add `kern/parser.c'.
9377 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9379 * kern/misc.c (grub_split_cmdline): Removed function.
9381 * kern/rescue.c: Include <grub/parser.h>.
9382 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9383 of `grub_split_cmdline'.
9385 * normal/command.c: Include <grub/parser.h>.
9386 (grub_command_execute): Use `grub_parser_split_cmdline' instead
9387 of `grub_split_cmdline'.
9389 * normal/completion.c: Include <grub/parser.h>.
9390 (cmdline_state): New variable.
9391 (iterate_dir): End the filename with a quote depending on the
9393 (get_state): new function.
9394 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9395 split the arguments and determine the current argument. When the
9396 argument string is not quoted, escape all spaces.
9398 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9400 * normal/sparc64/setjmp.S: New file.
9402 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9404 * include/grub/sparc64/libgcc.h: New file.
9405 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9406 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9407 normal/sparc64/setjmp.c.
9409 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9411 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9412 * kern/sparc64/cache.S: New file.
9413 * kern/sparc64/cache.c: Removed.
9414 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9415 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
9417 (COMMON_LDFLAGS): Add -melf64_sparc.
9418 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9419 (grubof_SOURCES): Use cache.S instead of cache.c.
9420 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
9421 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9422 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9424 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9425 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9426 (linux_mod_CFLAGS): Commented out.
9427 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9428 out because module isn't built.
9429 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9430 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9431 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9432 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9433 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9434 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9435 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9436 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9437 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9438 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9439 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9440 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9441 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9442 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9444 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
9446 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9447 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9448 longer, because HFS should not be used on PC.
9450 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9452 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9453 consistently within the loop.
9455 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
9457 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9458 directory can not be read.
9460 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9462 * configure.ac (AC_INIT): Increase the version number to 1.91.
9464 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9465 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9466 term/i386/pc/serial.c.
9468 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9470 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9471 file size must be permitted.
9473 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9474 between %ah and %al.
9476 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9478 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9480 Call the hook with a NUL-terminated filename.
9481 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9484 * kern/term.c (cursor_state): New variable.
9485 (grub_term_set_current): Reset the cursor state on a new
9487 (grub_setcursor): Rewritten to use CURSOR_STATE.
9488 (grub_getcursor): New function.
9490 * include/grub/term.h (grub_getcursor): New prototype.
9492 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9493 integers on ARM. Reported by Timothy Baldwin
9494 <T.E.Baldwin99@members.leeds.ac.uk>.
9496 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
9498 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9500 (grub_sfs_dir): Likewise.
9502 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
9504 Add support for the SFS filesystem.
9506 * fs/sfs.c: New file.
9508 * DISTLIST: Added `fs/sfs.c'.
9510 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9511 (grub_probefs_SOURCES): Likewise.
9512 (grub_emu_SOURCES): Likewise.
9513 (pkgdata_MODULES): Add `sfs.mod'.
9514 (sfs_mod_SOURCES): New variable.
9515 (sfs_mod_CFLAGS): Likewise.
9516 (sfs_mod_LDFLAGS): Likewise.
9518 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
9519 (pkgdata_MODULES): Add `sfs.mod'.
9520 (sfs_mod_SOURCES): New variable.
9521 (sfs_mod_CFLAGS): Likewise.
9523 * util/grub-emu.c (main): Call `grub_sfs_init' and
9526 * include/grub/fs.h (grub_sfs_init): New prototype.
9527 (grub_sfs_fini): Likewise.
9529 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
9531 Add support for the AFFS filesystem.
9533 * fs/affs.c: New file.
9535 * DISTLIST: Added `fs/affs.c'.
9537 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
9538 (grub_probefs_SOURCES): Likewise.
9539 (grub_emu_SOURCES): Likewise.
9540 (pkgdata_MODULES): Add `affs.mod'.
9541 (affs_mod_SOURCES): New variable.
9542 (affs_mod_CFLAGS): Likewise.
9543 (affs_mod_LDFLAGS): Likewise.
9545 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
9546 (pkgdata_MODULES): Add `affs.mod'.
9547 (affs_mod_SOURCES): New variable.
9548 (affs_mod_CFLAGS): Likewise.
9550 * util/grub-emu.c (main): Call `grub_affs_init' and
9553 * include/grub/fs.h (grub_affs_init): New prototype.
9554 (grub_affs_fini): Likewise.
9556 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9558 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
9560 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9562 * configure.ac: Accept `x86_64' as host_cpu. In that case add
9565 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
9568 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
9569 (COMMON_LDFLAGS): New variable.
9570 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
9571 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
9572 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
9573 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
9574 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
9575 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
9576 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
9577 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
9578 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
9579 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
9580 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9581 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9582 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
9583 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
9584 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
9586 (normal_mod_ASFLAGS): Add `-m32'.
9588 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
9589 (grub_host_size_t, grub_host_ssize_t): New types.
9590 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
9591 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
9592 `GRUB_HOST_SIZEOF_VOID_P'.
9594 * include/grub/kernel.h (struct grub_module_header): Type of
9595 member offset changed to `grub_host_off_t'. Type of member size
9596 changed to `grub_host_size_t'.
9597 (struct grub_module_info): Type of member offset changed to
9598 `grub_host_off_t'. Type of member size changed to
9601 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
9603 Make GRUB's kernel compliant to Multiboot Specification.
9605 * kern/i386/pc/startup.S (multiboot_header): New label.
9606 (multiboot_entry): Likewise.
9607 (multiboot_trampoline): Likewise.
9609 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9612 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
9613 put parentheses after a question mark.
9614 [!GRUB_UTIL] (my_mod): New variable.
9616 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
9618 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
9620 Adds support for the XFS filesystem. Btrees are not supported
9623 * fs/xfs.c: New file.
9625 * DISTLIST: Added `fs/xfs.c'.
9627 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
9628 (grub_probefs_SOURCES): Likewise.
9629 (grub_emu_SOURCES): Likewise.
9630 (pkgdata_MODULES): Add `xfs.mod'.
9631 (xfs_mod_SOURCES): New variable.
9632 (xfs_mod_CFLAGS): Likewise.
9634 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
9635 (pkgdata_MODULES): Add `xfs.mod'.
9636 (xfs_mod_SOURCES): New variable.
9637 (xfs_mod_CFLAGS): Likewise.
9639 * util/grub-emu.c (main): Call `grub_xfs_init' and
9642 * include/grub/fs.h (grub_xfs_init): New prototype.
9643 (grub_xfs_fini): Likewise.
9646 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
9648 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
9649 color modes, allow greater than 16 colors to be configured as
9652 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9654 * normal/completion.c (complete_arguments): Add the qualifier
9657 From Omniflux <omniflux+lists@omniflux.com>:
9658 * include/grub/terminfo.h: New file.
9659 * include/grub/tparm.h: Likewise.
9660 * include/grub/i386/pc/serial.h: Likewise.
9661 * term/terminfo.c: Likewise.
9662 * term/tparm.c: Likewise.
9663 * term/i386/pc/serial.c: Likewise.
9664 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
9666 (terminfo_mod_SOURCES): New variable.
9667 (terminfo_mod_CFLAGS): Likewise.
9668 (serial_mod_SOURCES): Likewise.
9669 (serial_mod_CFLAGS): Likewise.
9671 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
9673 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
9674 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
9675 and kern/powerpc/ieee1275/cmain.c, respectively.
9677 * boot/powerpc/ieee1275/crt0.S: Moved to ...
9678 * kern/powerpc/ieee1275/crt0.S: ... here.
9680 * boot/powerpc/ieee1275/cmain.c: Moved to ...
9681 * kern/powerpc/ieee1275/cmain.c: ... here.
9683 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
9684 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
9685 instead of boot/powerpc/ieee1275/crt0.S and
9686 boot/powerpc/ieee1275/cmain.c, respectively.
9688 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
9689 sectors. It was not used anyway.
9691 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9693 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
9694 `unused parameter' warning.
9696 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9698 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
9700 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
9703 2005-08-28 Marco Gerards <metgerards@student.han.nl>
9705 * include/grub/normal.h (enum grub_completion_type): Added
9706 `GRUB_COMPLETION_TYPE_ARGUMENT'.
9708 * normal/cmdline.c (print_completion): Handle
9709 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
9710 * normal/menu_entry.c (store_completion): Likewise.
9712 * normal/completion.c (complete_arguments): New function.
9713 (grub_normal_do_completion): Call `complete_arguments' when the
9714 current words start with a dash.
9716 2005-08-27 Marco Gerards <metgerards@student.han.nl>
9718 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
9719 `gzio.mod' instead of `io.mod').
9721 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
9723 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
9724 (DISTDIRS): Added io and video.
9725 Rewrite the search routine to make an output consistently.
9727 * DISTLIST: Added conf/sparc64-ieee1275.mk,
9728 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
9729 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
9730 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
9731 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
9732 util/powerpc/ieee1275/misc.c.
9734 * include/grub/gzio.h: New file.
9735 * io/gzio.c: Likewise.
9737 * kern/file.c (grub_file_close): Call grub_device_close only if
9738 FILE->DEVICE is not NULL.
9740 * include/grub/mm.h [!NULL] (NULL): New macro.
9742 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
9744 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
9745 (pkgdata_MODULES): Added gzio.mod.
9746 (gzio_mod_SOURCES): New variable.
9747 (gzio_mod_CFLAGS): Likewise.
9749 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
9750 (pkgdata_MODULES): Added gzio.mod.
9751 (gzio_mod_SOURCES): New variable.
9752 (gzio_mod_CFLAGS): Likewise.
9754 * commands/cat.c: Include grub/gzio.h.
9755 (grub_cmd_cat): Use grub_gzfile_open instead of
9758 * commands/cmp.c: Include grub/gzio.h.
9759 (grub_cmd_cmp): Use grub_gzfile_open instead of
9762 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
9763 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
9765 (grub_rescue_cmd_module): Likewise.
9767 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9769 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
9770 kern/sparc64/ieee1275/init.c because it contains _start.
9771 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
9773 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9775 * configure.ac: Add support for sparc64 host with ieee1275
9777 * configure: Generated from configure.ac.
9778 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
9780 (grub_ofdisk_read): Likewise.
9781 (grub_ofdisk_open): Use %p to print pointer values, and cast the
9782 pointers as (void *) to remove a warning.
9783 (grub_ofdisk_close): Likewise.
9784 (grub_ofdisk_read): Likewise.
9785 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
9786 returns, so make it return void to remove a warning.
9787 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
9788 Corresponding prototype change.
9789 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
9790 values, and cast the pointers as (void *) to remove a warning.
9791 (grub_mm_dump): Likewise.
9792 * conf/sparc64-ieee1275.mk: New file.
9793 * conf/sparc64-ieee1275.rmk: Likewise.
9794 * include/grub/sparc64/setjmp.h: Likewise.
9795 * include/grub/sparc64/types.h: Likewise.
9796 * include/grub/sparc64/ieee1275/console.h: Likewise.
9797 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9798 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9799 * include/grub/sparc64/ieee1275/time.h: Likewise.
9800 * kern/sparc64/cache.c: Likewise.
9801 * kern/sparc64/dl.c: Likewise.
9802 * kern/sparc64/ieee1275/init.c: Likewise.
9803 * kern/sparc64/ieee1275/openfw.c: Likewise.
9805 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
9807 * util/console.c (grub_ncurses_putchar): If C is greater than
9808 0x7f, set C to a question mark.
9809 (grub_ncurses_getcharwidth): New function.
9810 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
9813 * normal/menu.c (print_entry): Made aware of Unicode. First,
9814 convert TITLE to UCS-4, and predict the cursor position by
9817 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
9819 * kern/misc.c (grub_utf16_to_utf8): Likewise.
9821 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9823 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
9824 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9827 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
9828 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9829 grub_strcpy and grub_strlen. Take it into account that a space
9830 character is inserted as a delimiter.
9832 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9834 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
9835 invalid magic in the error.
9837 * commands/search.c: New file.
9839 * util/grub-emu.c (main): Call grub_search_init and
9842 * kern/rescue.c (grub_rescue_print_disks): Removed.
9843 (grub_rescue_print_devices): New function.
9844 (grub_rescue_cmd_ls): Use grub_device_iterate with
9845 grub_rescue_print_devices instead of grub_disk_dev_iterate with
9846 grub_rescue_print_disks.
9848 * kern/partition.c (grub_partition_iterate): Return the result of
9849 PARTMAP->ITERATE instead of GRUB_ERRNO.
9851 * kern/device.c: Include grub/partition.h.
9852 (grub_device_iterate): New function.
9854 * include/grub/partition.h (grub_partition_iterate): Return int
9855 instead of grub_err_t.
9857 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
9859 [GRUB_UTIL] (grub_search_fini): Likewise.
9861 * include/grub/device.h (grub_device_iterate): New prototype.
9863 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9865 (pkgdata_MODULES): Added search.mod.
9866 (search_mod_SOURCES): New variable.
9867 (search_mod_CFLAGS): Likewise.
9869 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
9870 (pkgdata_MODULES): Added search.mod.
9871 (search_mod_SOURCES): New variable.
9872 (search_mod_CFLAGS): Likewise.
9874 * commands/ls.c (grub_ls_list_disks): Renamed to ...
9875 (grub_ls_list_devices): ... this, and use grub_device_iterate.
9876 All callers changed.
9878 * DISTLIST: Added commands/search.c.
9880 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9882 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
9884 (grub_getcharwidth): New function.
9886 * kern/misc.c (grub_utf8_to_ucs4): New function.
9888 * include/grub/term.h (struct grub_term): Added a new member
9890 (grub_getcharwidth): New prototype.
9892 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
9894 * term/i386/pc/console.c (map_char): New function. Segregated from
9895 grub_console_putchar.
9896 (grub_console_putchar): Use map_char.
9897 (grub_console_getcharwidth): New function.
9898 (grub_console_term): Specified grub_console_getcharwidth as
9901 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
9902 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
9904 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
9906 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
9907 on grub_strtoul completely.
9908 (write_char): Declare local variables in the beginning of the
9910 (grub_vesafb_getcharwidth): New function.
9911 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
9914 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
9916 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
9917 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
9918 commands/i386/pc/vbetest.c.
9920 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
9921 call grub_vbe_get_controller_info again, because the returned
9922 information is volatile.
9923 (grub_vbe_set_video_mode): Mostly rewritten.
9924 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
9925 grub_vbe_status_t correctly.
9926 (grub_vbe_get_video_mode_info): Likewise.
9927 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
9928 several if statements.
9930 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
9931 * commands/i386/pc/vbeinfo.c: ... this.
9933 * commands/i386/pc/vbe_test.c: Renamed to ...
9934 * commands/i386/pc/vbetest.c: ... this.
9936 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
9938 (grub_cmd_vbeinfo): ... this. Save video modes before
9939 iterating. Skip a video mode, if it is not available, not enough
9940 information is given or it is monochrome. Show the memory
9941 model. Leave the interpretation of MODEVAR to grub_strtoul
9943 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
9944 (GRUB_MOD_FINI): Likewise.
9946 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
9947 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
9948 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
9949 duplicated grub_env_get. Leave the interpretation of MODEVAR to
9950 grub_strtoul completely.
9952 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
9953 (GRUB_MOD_FINI): Likewise.
9955 * normal/misc.c: Include grub/mm.h.
9957 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
9958 vbe_list_modes with vbetest.mod and vbeinfo.mod.
9959 (vbe_list_modes_mod_SOURCES): Removed.
9960 (vbe_list_modes_mod_CFLAGS): Likewise.
9961 (vbe_test_mod_SOURCES): Likewise.
9962 (vbe_test_mod_CFLAGS): Likewise.
9963 (vbeinfo_mod_SOURCES): New variable.
9964 (vbeinfo_mod_CFLAGS): Likewise.
9965 (vbetest_mod_SOURCES): Likewise.
9966 (vbetest_mod_CFLAGS): Likewise.
9968 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
9970 * normal/misc.c: New file.
9972 * DISTLIST: Added normal/misc.c.
9974 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
9975 DISK to HOOK. Call HOOK with DISK.
9976 * partmap/apple.c (apple_partition_map_iterate): Likewise.
9977 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9978 * partmap/sun.c (sun_partition_map_iterate): Likewise.
9980 * normal/menu_entry.c (struct screen): Added a new member
9982 (completion_buffer): New global variable.
9983 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
9984 (store_completion): New function.
9985 (complete): Likewise.
9986 (clear_completions): Likewise.
9987 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
9988 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
9989 a tab, call complete.
9991 * normal/completion.c (disk_dev): Removed.
9992 (print_simple_completion): Likewise.
9993 (print_partition_completion): Likewise.
9994 (print_func): New global variable.
9995 (add_completion): Do not take the arguments WHAT or PRINT any
9996 longer. Added a new argument TYPE. Instead of printing directly,
9997 call PRINT_FUNC if not NULL.
9998 All callers changed.
9999 (complete_device): Use a local variable DEV instead of
10000 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
10001 (grub_normal_do_completion): Take a new argument HOOK. Do not
10002 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
10003 empty string, return NULL instead.
10004 All callers changed.
10006 * normal/cmdline.c (print_completion): New function.
10008 * kern/partition.c (grub_partition_iterate): Add an argument DISK
10010 All callers changed.
10012 * kern/disk.c (grub_print_partinfo): Removed.
10014 * include/grub/partition.h (struct grub_partition_map): Add a new
10015 argument DISK into HOOK of ITERATE.
10016 (grub_partition_iterate): Add a new argument DISK to HOOK.
10018 * include/grub/normal.h (enum grub_completion_type): New enum.
10019 (grub_completion_type_t): New type.
10020 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10021 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10022 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10023 (GRUB_COMPLETION_TYPE_FILE): Likewise.
10024 (grub_normal_do_completion): Added a new argument HOOK.
10025 (grub_normal_print_device_info): New prototype.
10027 * include/grub/disk.h (grub_print_partinfo): Removed.
10029 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10030 (normal_mod_SOURCES): Likewise.
10031 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10032 (normal_mod_SOURCES): Likewise.
10034 * commands/ls.c (grub_ls_list_disks): Use
10035 grub_normal_print_device_info instead of grub_print_partinfo. Free
10037 (grub_ls_list_files): Use grub_normal_print_device_info instead of
10038 duplicating the code.
10040 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10042 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
10043 follow GCS more precisely.
10044 * commands/i386/pc/vbe_test.c: Likewise.
10045 * include/grub/i386/pc/vbe.h: Likewise.
10046 * term/i386/pc/vesafb.c: Likewise.
10047 * video/i386/pc/vbe.c: Likewise.
10049 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10051 * DISTLIST: Added term/i386/pc/vesafb.c
10052 DISTLIST: Added video/i386/pc/vbe.c
10053 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10054 DISTLIST: Added commands/i386/pc/vbe_test.c.
10055 * commands/i386/pc/vbe_list_modes.c: New file.
10056 * commands/i386/pc/vbe_test.c: Likewise.
10057 * term/i386/pc/vesafb.c: Likewise.
10058 * video/i386/pc/vbe.c: Likewise.
10059 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10060 (grub_vbe_probe) Added prototype.
10061 (grub_vbe_set_video_mode) Likewise.
10062 (grub_vbe_get_video_mode) Likewise.
10063 (grub_vbe_get_video_mode_info) Likewise.
10064 (grub_vbe_set_pixel_rgb) Likewise.
10065 (grub_vbe_set_pixel_index) Likewise.
10066 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10067 (pkgdata_MODULES): Added vesafb.mod.
10068 (pkgdata_MODULES): Added vbe_list_modes.mod.
10069 (pkgdata_MODULES): Added vbe_test.mod.
10070 (vbe_mod_SOURCES): Added.
10071 (vbe_mod_CFLAGS): Likewise.
10072 (vesafb_mod_SOURCES): Likewise.
10073 (vesafb_mod_CFLAGS): Likewise.
10074 (vbe_list_modes_mod_SOURCES): Likewise.
10075 (vbe_list_modes_mod_CFLAGS): Likewise.
10076 (vbe_test_mod_SOURCES): Likewise.
10077 (vbe_test_mod_CFLAGS): Likewise.
10079 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
10081 * normal/command.c (grub_command_execute): If INTERACTIVE is
10082 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10083 CMDLINE. Disable the pager if INTERACTIVE is true.
10084 All callers are changed.
10086 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10087 before reading a config file.
10088 * normal/main.c (read_config_file): Even if a command is not
10089 found, register it if it is within an entry.
10091 * util/grub-emu.c: Include sys/types.h and unistd.h.
10092 (options): Added --hold.
10093 (struct arguments): Added a new member "hold".
10094 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10096 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10097 cleared by a debugger, if it is not zero.
10099 * include/grub/normal.h (grub_command_execute): Add an argument
10102 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
10104 * DISTLIST: Added include/grub/i386/pc/vbe.h.
10106 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
10108 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10109 program with another one, because the old one didn't detect a bug
10110 in gcc-3.4. Always use regparm 2, because the new test is still
10111 not enough for gcc-4.0. Someone must investigate a simple test
10112 case which detects a bug in gcc-4.0.
10114 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
10116 * DISTLIST: Added normal/completion.c.
10118 * normal/completion.c: New file.
10120 * term/i386/pc/console.c (grub_console_getwh): New function.
10121 (grub_console_term): Assign grub_console_getwh to getwh.
10123 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10124 function is defined in normal/completion.c as
10125 grub_normal_do_completion.
10126 (grub_cmdline_get): Use grub_normal_do_completion instead of
10129 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10130 returns non-zero, otherwise return 0.
10131 (grub_partition_iterate): First, probe the partition map. Then,
10132 call ITERATE only for this partition map.
10134 * kern/misc.c (grub_strncmp): Rewritten.
10136 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10137 returns non-zero. Otherwise return 0.
10139 * include/grub/partition.h (grub_partition_map_iterate): Return
10140 int instead of void.
10142 * include/grub/normal.h (grub_normal_do_completion): New prototype.
10144 * include/grub/misc.h (grub_strncmp): Change the type of N to
10147 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10150 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
10151 unsigned explicitly before comparing it with I.
10153 * kern/main.c (grub_env_write_root): Add the attribute unused into
10156 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10157 normal/completion.c.
10158 (normal_mod_SOURCES): Likewise.
10159 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10160 (normal_mod_SOURCES): Likewise.
10162 * normal/command.c (grub_iterate_commands): If ITERATE returns
10163 non-zero, return one immediately.
10165 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
10167 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10168 * kern/i386/pc/startup.S: Updated Global Descriptor table's
10170 (grub_vbe_get_controller_info): New function.
10171 (grub_vbe_get_mode_info): Likewise.
10172 (grub_vbe_set_mode): Likewise.
10173 (grub_vbe_get_mode): Likewise.
10174 (grub_vbe_set_memory_window): Likewise.
10175 (grub_vbe_get_memory_window): Likewise.
10176 (grub_vbe_set_scanline_length): Likewise.
10177 (grub_vbe_get_scanline_length): Likewise.
10178 (grub_vbe_set_display_start): Likewise.
10179 (grub_vbe_get_display_start): Likewise.
10180 (grub_vbe_set_palette_data): Likewise.
10181 * include/grub/i386/pc/vbe.h: New file.
10183 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10185 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10186 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10187 * DISTLIST: Likewise.
10188 * kern/ieee1275/of.c: Moved to ...
10189 * kern/ieee1275/ieee1275.c: ... here.
10191 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10193 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10194 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
10195 Pass 0 as `end' parameter to grub_strtoul().
10197 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10199 * include/grub/powerpc/ieee1275/console.h: Do not include
10200 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
10202 (grub_console_cur_color): Remove i386-specific prototype.
10203 (grub_console_real_putchar): Likewise.
10204 (grub_console_checkkey): Likewise.
10205 (grub_console_getkey): Likewise.
10206 (grub_console_getxy): Likewise.
10207 (grub_console_gotoxy): Likewise.
10208 (grub_console_cls): Likewise.
10209 (grub_console_setcursor): Likewise.
10210 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
10211 Include <grub/machine/console.h>.
10212 * term/ieee1275/ofconsole.c: Likewise.
10214 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
10216 * Makefile.in (LIBLZO): New variable.
10218 * configure.ac: Check for LZO version 2.
10220 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
10221 lzo/lzo1x.h instead of lzo1x.h.
10223 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
10226 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
10227 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
10229 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
10230 copying the data from PARTITION to P.
10232 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10234 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
10235 negative, unload the module.
10237 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
10238 map is "pc_partition_map" but not "pc".
10239 (usage): Fix the description. The options are --boot-image and
10240 --core-image but not --boot-file or --core-file.
10241 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
10242 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
10245 * util/i386/pc/grub-install.in: Do not specify --boot-file or
10246 --core-file. Specify INSTALL_DEVICE as an argument.
10248 * util/console.c: Include config.h.
10249 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
10250 [HAVE_NCURSES_H]: Include ncurses.h.
10251 [HAVE_CURSES_H]: Include curses.h.
10252 [!A_NORMAL] (A_NORMAL): Defined as zero.
10253 [!A_STANDOUT] (A_STANDOUT): Likewise.
10255 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
10257 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
10259 * configure.ac: Check for curses libraries and headers.
10261 * Makefile.in (LIBCURSES): New variable.
10263 * genmk.rb (Script::rule): Set the executable bits.
10265 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
10266 name of the PC partition map is "pc_partition_map" but not "pc".
10268 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10270 * util/i386/pc/grub-install.in (grub_probefs): New variable.
10271 (modules): Likewise.
10272 (usage): Added descriptions for --modules and --grub-probefs.
10273 Handle --modules and --grub-probefs. Save the arguments in MODULES
10274 and GRUB_PROBEFS, respectively.
10275 Auto-detect a filesystem module against GRUBDIR. If the result is
10276 empty and modules are not specified explicitly, abort the
10277 installation. Add the result to MODULES.
10279 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
10280 disk/powerpc/ieee1275/ofdisk.c,
10281 include/grub/powerpc/ieee1275/init.h and
10282 term/powerpc/ieee1275/ofconsole.c.
10283 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
10284 term/ieee1275/ofconsole.c.
10286 * include/grub/powerpc/ieee1275/console.h: Resurrected.
10288 * COPYING: Upgraded to the latest version. Only the address of the
10289 FSF office has changed.
10291 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10293 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10294 kern/ieee1275.c with kern/ieee1275/of.c.
10296 * kern/ieee1275.c: Moved to ...
10297 * kern/ieee1275/of.c: ... here.
10299 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
10301 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
10304 * config.guess: Updated to the latest version from gnulib.
10305 * config.sub: Likewise.
10306 * install.sh: Likewise.
10307 * mkinstalldirs: Likewise.
10309 * include/grub/console.h: Removed. This file is arch-specific. Do
10310 not put this in include/grub.
10312 * include/grub/i386/pc/console.h: Resurrected.
10314 * util/console.c: Include grub/machine/console.h instead of
10316 * util/grub-emu.c: Likewise.
10318 2005-08-04 Marco Gerards <metgerards@student.han.nl>
10320 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10323 From Vincent Pelletier <subdino2004@yahoo.fr>
10324 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10325 Redefined to use grub_getwh.
10326 (grub_term): New member named getwh.
10327 (grub_getwh): New prototype.
10328 * kern/term.c (grub_getwh): New function.
10329 * term/i386/pc/console.c (grub_console_getwh): New function.
10330 (grub_console_term): New member `getwh'.
10331 * term/i386/pc/vga.c (grub_vga_getwh): New function.
10332 (grub_vga_term): New member `getwh'.
10333 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10335 (grub_ofconsole_getw): New function.
10336 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10337 (grub_ofconsole_term): New field named getwh and new initial
10340 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
10342 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10343 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
10344 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10345 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10346 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10347 of <grub/machine/ieee1275.h>.
10348 * commands/ieee1275/reboot.c: Likewise.
10349 * boot/powerpc/ieee1275/ieee1275.c: Move ...
10350 * kern/ieee1275.c: ... to here. All users updated. Change all
10351 parameter structs to use new type `grub_ieee1275_cell_t'.
10352 * term/powerpc/ieee1275/ofconsole.c: Move ...
10353 * term/ieee1275/ofconsole.c: ... to here. All users updated.
10354 * disk/powerpc/ieee1275/ofdisk.c: Move ...
10355 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
10356 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10358 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10359 Remove unused prototypes. All users updated.
10360 * include/grub/powerpc/ieee1275/console.h: Removed.
10361 * include/grub/powerpc/ieee1275/ieee1275.h: Define
10362 `grub_ieee1275_cell_t'.
10363 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10364 Cast comparisons with -1 to the correct type.
10365 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10366 type to match `grub_ieee1275_entry_fn'.
10368 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
10370 * DISTLIST: Added util/i386/pc/grub-probefs.c.
10372 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10373 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10375 (grub_probefs_SOURCES): New variable.
10377 * util/i386/pc/grub-probefs.c: New file.
10379 * util/i386/pc/grub-setup.c (main): Call
10380 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10381 grub_hfs_init and grub_jfs_init to initialize the system. Call
10382 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10383 grub_pc_partition_map_fini to finish the system.
10385 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
10387 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10389 (grub_multiboot_load_elf32): Likewise.
10390 (grub_multiboot_is_elf64): Likewise.
10391 (grub_multiboot_load_elf64): Likewise.
10392 (grub_multiboot_load_elf): Likewise.
10393 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10394 an ELF32 or ELF64 file.
10395 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10397 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10398 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10399 NULL before calling FS->LABEL.
10400 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10401 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10402 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10403 before calling FS->LABEL.
10405 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
10407 * util/i386/pc/grub-install.in (datadir): New variable.
10409 (pkgdatadir): New variable.
10410 (pkglibdir): Removed.
10412 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
10414 * DISTLIST: Added util/i386/pc/grub-install.in.
10416 * util/i386/pc/grub-install.in: New file.
10418 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10419 (grub_install_SOURCES): Likewise.
10421 * genmk.rb: Added support for scripts.
10422 (Script): New class.
10423 (scripts): New variable.
10425 * Makefile.in (install-local): Install sbin_SCRIPTS by
10427 (uninstall): Remove sbin_SCRIPTS.
10429 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10430 device, try to get a GRUB device by
10431 grub_util_biosdisk_get_grub_dev.
10434 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10435 description for --device-map.
10437 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10439 Change the semantics of variable hooks. They now return strings
10440 instead of error values.
10442 * util/i386/pc/grub-setup.c: Include grub/env.h.
10443 (setup): Use grub_device_set_root instead of grub_env_set.
10445 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10446 grub_env_get instead of grub_device_set_root and
10447 grub_device_get_root, respectively.
10449 * kern/main.c (grub_env_write_root): New function.
10450 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10451 grub_env_set instead of grub_device_set_root.
10453 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10455 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10456 rather than calling ENV->WRITE_HOOK afterwards.
10457 (grub_env_get): Return the result of ENV->READ_HOOK rather than
10458 passing a pointer of a pointer.
10459 (grub_register_variable_hook): Change the types of "read_hook" and
10460 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10462 Allocate the default empty string on the heap, because this string
10463 may be freed later.
10465 * kern/device.c: Include grub/env.h.
10466 (grub_device_set_root): Removed.
10467 (grub_device_get_root): Likewise.
10468 (grub_device_open): Use grub_env_get instead of
10469 grub_device_get_root.
10471 * include/grub/env.h (grub_env_read_hook_t): New type.
10472 (grub_env_write_hook_t): Likewise.
10473 (grub_env_var): Change the types of "read_hook" and "write_hook"
10474 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10475 (grub_register_variable_hook): Likewise.
10477 * include/grub/device.h (grub_device_set_root): Removed.
10478 (grub_device_set_root): Likewise.
10480 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10481 make sure that DIRNAME terminates with '/', so that
10482 grub_fat_find_dir will fail if PATH is not a directory.
10484 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10486 Use the qualifier auto for print_files and print_files_long.
10487 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10489 Put a newline only if there is no error.
10490 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10493 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10495 * kern/partition.c (grub_partition_probe): Initialize PART to
10496 NULL. Otherwise, when no partition map is registered, this returns
10499 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
10501 * partmap/apple.c (apple_partition_map_iterate): Check if POS
10502 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10505 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
10507 * commands/ls.c (grub_ls_list_disks): Print the filesystem
10508 information on each device, if it does not have partitions. Print
10509 "Device" instead of "Disk", because this function is not specific
10512 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10513 static to ensure that it is put on the memory rather than a
10516 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10518 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
10519 (grub_cat_init): Likewise.
10520 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
10521 (options): Likewise.
10522 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
10523 (grub_configfile_init): Likewise.
10524 * font/manager.c (GRUB_MOD_INIT): Likewise.
10525 * commands/help.c (GRUB_MOD_INIT): Likewise.
10526 (grub_help_init): Likewise.
10527 * normal/command.c (grub_command_init): Likewise.
10528 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
10529 * disk/loopback.c (grub_loop_init): Likewise.
10530 (GRUB_MOD_INIT): Likewise.
10531 * commands/ls.c (grub_ls_init): Likewise.
10532 (GRUB_MOD_INIT): Likewise.
10533 (options): Likewise.
10534 * commands/boot.c (grub_boot_init): Likewise.
10535 (GRUB_MOD_INIT): Likewise.
10536 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
10537 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
10538 (GRUB_MOD_INIT): Likewise.
10539 * commands/cmp.c (grub_cmp_init): Likewise.
10540 (GRUB_MOD_INIT): Likewise.
10542 * normal/arg.c: Use <> instead of "" to include header files.
10543 (SHORT_ARG_HELP): New macro.
10544 (SHORT_ARG_USAGE): Likewise.
10545 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
10546 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
10548 (find_short): Check if C is 'h' or 'u' explicitly.
10549 (grub_arg_show_help): Use space characters instead of tabs. Treat
10550 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
10551 are shown with --help and --usage only if they are not used for
10552 the command itself.
10553 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
10556 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
10557 const into "longarg". Change the type of "shortarg" to int.
10559 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10561 * boot/i386/pc/boot.S (boot_drive_check): New label.
10563 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
10566 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
10567 which do not pass a boot drive correctly. Copied from GRUB Legacy.
10569 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10571 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
10572 When turning off Gate A20, skip the check and return immediately,
10573 because this is not fatal usually.
10575 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10577 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
10578 be 0x7C00 instead of 0x8000.
10580 * boot/i386/pc/pxeboot.S: Rewritten.
10582 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
10584 (gate_a20_check_state): Read a byte from 0x108000. Invert the
10587 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
10589 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
10590 robustness. This routine now supports a BIOS call and System
10591 Control Port A to modify the gate A20.
10593 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10594 Increased to 0x440.
10596 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
10598 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
10599 device path and resulting ihandle.
10600 (grub_ofdisk_close): dprintf the ihandle being closed.
10601 (grub_ofdisk_read): dprintf function parameters.
10602 * kern/mm.c (grub_mm_init_region): Likewise.
10603 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
10604 (grub_linux_boot): dprintf the Linux entry point, initrd address and
10605 size, and boot arguments.
10606 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
10607 before loading into memory.
10608 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
10609 before loading into memory.
10611 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
10613 * kern/mm.c: Added much documentation.
10614 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
10615 8, set to 5 instead of 8.
10617 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
10619 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
10621 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
10622 (grub_mkdevicemap_SOURCES): New variable.
10624 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
10625 lib/device.c of GRUB Legacy.
10627 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
10629 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
10630 instead of PATH is NULL.
10632 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
10634 * commands/cmp.c (BUFFER_SIZE): New macro.
10635 (grub_cmd_cmp): Close the right file at the right time. Compare
10636 only data just read. Don't report files of different size as
10637 identical. Dynamically allocate buffers. Move variable
10638 declarations at the beginning of function.
10640 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
10642 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
10645 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
10647 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
10648 when backspace is pressed at beginning of line.
10650 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
10652 * DISTLIST: Added genfslist.sh.
10654 * normal/main.c (fs_module_list): New variable.
10655 (autoload_fs_module): New function.
10656 (read_fs_list): Likewise.
10657 (grub_normal_execute): Call read_fs_list.
10659 * kern/fs.c (grub_fs_autoload_hook): New variable.
10660 (grub_fs_probe): Added support for auto-loading.
10662 * include/grub/normal.h (struct grub_fs_module_list): New struct.
10663 (grub_fs_module_list_t): New type.
10665 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
10666 (grub_fs_autoload_hook): New prototype.
10668 * genfslist.sh: New file.
10670 * genmk.rb: Added a rule to generate a filesystem list.
10672 2005-06-30 Marco Gerards <metgerards@student.han.nl>
10674 * configure.ac: Fix the test for cross-compiling.
10676 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
10677 define GRUB_UTIL anymore.
10679 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
10680 so this function works on other systems than just big endian.
10681 (load_modules): Likewise.
10682 (add_segments): Likewise.
10684 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
10686 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
10687 contains `l' modifier, get a long from va_arg().
10689 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
10691 * kern/mm.c (grub_free): If the next free block which is being
10692 merged is the first free block, set the first block to the block
10694 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
10696 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10698 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
10699 `grub_ieee1275_chosen'.
10701 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10703 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
10704 (grub_ieee1275_chosen): New variable.
10705 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
10707 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
10708 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10709 Rename first argument to `phandle' for consistency.
10710 (grub_ieee1275_get_property_length): Likewise.
10711 (grub_ieee1275_next_property): Likewise. Change type of first argument
10712 to grub_ieee1275_phandle_t.
10713 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
10714 Move export next to declaration.
10715 (grub_ieee1275_chosen): New variable.
10716 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
10717 Correct cosmetic typo.
10718 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
10719 `grub_ieee1275_chosen'.
10720 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
10721 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
10722 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
10723 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
10724 `grub_ieee1275_chosen'.
10726 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
10728 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
10730 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
10731 /chosen/bootargs as "variable=value" pairs.
10733 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
10735 * include/grub/misc.h (grub_dprintf): New macro.
10736 (grub_real_dprintf): New prototype.
10737 (grub_strword): Likewise.
10738 (grub_iswordseparator): Likewise.
10739 * kern/misc.c (grub_real_dprintf): New function.
10740 (grub_strword): Likewise.
10741 (grub_iswordseparator): Likewise.
10743 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
10745 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
10746 (roundup): Remove macro.
10747 (grub_ieee1275_flags): Make static.
10748 (grub_ieee1275_realmode): Remove.
10749 (grub_ieee1275_test_flag): New function.
10750 (grub_ieee1275_set_flag): Likewise.
10751 (find_options): Rename to `grub_ieee1275_find_options'; update
10752 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
10753 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
10754 (cmain): New prototype.
10755 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
10756 `grub_ieee1275_flags' directly.
10757 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
10758 machine/biosdisk.h.
10759 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
10760 Don't include grub/machine/init.h.
10761 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
10762 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10764 (grub_ieee1275_realmode): Likewise.
10765 (grub_ieee1275_flag): New enum.
10766 (grub_ieee1275_test_flag): New prototype.
10767 (grub_ieee1275_set_flag): New prototype.
10768 * include/grub/powerpc/ieee1275/init.h: Remove file.
10769 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
10770 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
10771 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
10772 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
10774 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
10775 `grub_ieee1275_test_flag'.
10776 (grub_ieee1275_encode_devname): Likewise.
10778 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
10780 * include/grub/powerpc/ieee1275/ieee1275.h
10781 (grub_ieee1275_encode_devname): New prototype.
10782 (grub_ieee1275_get_filename): Likewise.
10783 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
10785 (grub_set_prefix): Likewise.
10786 (grub_machine_init): Call grub_set_prefix.
10787 * kern/powerpc/ieee1275/openfw.c: Fix typos.
10788 (grub_parse_type): New enum.
10789 (grub_ieee1275_get_devargs): New function.
10790 (grub_ieee1275_get_devname): Likewise.
10791 (grub_ieee1275_parse_args): Likewise.
10792 (grub_ieee1275_get_filename): Likewise.
10793 (grub_ieee1275_encode_devname): Likewise.
10795 2005-03-30 Marco Gerards <metgerards@student.han.nl>
10797 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
10798 `grub_loader_unset'.
10800 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
10802 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
10803 instead of grub_ieee1275_interpret.
10804 (grub_halt_init): New function.
10805 (grub_halt_fini): Likewise.
10806 (GRUB_MOD_INIT): Correct message grammar.
10807 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
10808 instead of grub_ieee1275_interpret.
10809 (grub_reboot_init): New function.
10810 (grub_reboot_fini): Likewise.
10811 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
10812 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
10813 util/i386/pc/misc.c with commands/ieee1275/halt.c,
10814 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
10815 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
10817 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
10819 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
10821 (grub_halt): Likewise.
10822 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
10823 (cmain): Remove __attribute__((unused)).
10824 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
10825 (grub_heap_len): Likewise.
10826 (grub_machine_fini): New function.
10827 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
10828 (grub_halt): Likewise.
10829 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
10831 * util/powerpc/ieee1275/misc.c: New file.
10833 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10835 * DISTLIST: New file.
10836 * gendistlist.sh: Likewise.
10838 * Makefile.in (COMMON_DISTFILES): Removed.
10839 (BOOT_DISTFILES): Likewise.
10840 (CONF_DISTFILES): Likewise.
10841 (DISK_DISTFILES): Likewise.
10842 (FS_DISTFILES): Likewise.
10843 (INCLUDE_DISTFILES): Likewise.
10844 (KERN_DISTFILES): Likewise.
10845 (LOADER_DISTFILES): Likewise.
10846 (TERM_DISTFILES): Likewise.
10847 (UTIL_DISTFILES): Likewise.
10848 (DISTFILES): Likewise.
10849 (uninstall): Uninstall files in $(pkgdata_DATA).
10850 (DISTLIST): New target.
10851 (distdir): Use the contents of the file DISTLIST to get a list of
10854 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10856 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
10857 descriptor. This is ported from GRUB Legacy.
10859 * gencmdlist.sh: Added an extra semicolon to make it work with
10860 old sed versions. Reported by Robert Bihlmeyer
10861 <robbe@orcus.priv.at>.
10863 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
10865 Automatic loading of commands is supported.
10867 * normal/main.c (read_command_list): New function.
10868 (grub_normal_execute): Call read_command_list.
10870 * normal/command.c (grub_register_command): Return zero or CMD.
10871 Allocate CMD->NAME from the heap.
10872 Initialize CMD->MODULE_NAME to zero.
10873 Find the same name as well. If the same command is found and it is
10874 a dummy command, overwrite members. If it is not a dummy command,
10876 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
10877 (grub_command_find): If a dummy command is found, load a module
10878 and retry to find a command only once.
10880 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
10881 make sure that each command is loaded.
10883 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
10885 (struct grub_command): Remove const from the member `name'.
10886 Add a new member `module_name'.
10887 (grub_register_command): Return grub_command_t.
10889 * commands/help.c (grub_cmd_help): Call grub_command_find to make
10890 sure that each command is loaded.
10892 * genmk.rb (PModule::rule): Specify a module name without the
10893 suffix ".mod" to gencmdlist.sh.
10895 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10897 * gencmdlist.sh: New file.
10899 * genmk.rb (PModule::rule): Generate a rule for a command list.
10901 Generate command.lst from $(COMMANDFILES).
10903 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
10904 (DATA): Added $(pkgdata_DATA).
10905 (install-local): Install files in $(pkgdata_DATA).
10907 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10909 * term/i386/pc/vga.c (debug_command): Removed.
10910 (GRUB_MOD_INIT): Do not register the command "debug".
10912 From Hollis Blanchard:
10913 * commands/configfile.c: New file.
10914 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10915 commands/configfile.c.
10916 (pkgdata_MODULES): Added configfile.mod.
10917 (configfile_mod_SOURCES): New variable.
10918 (configfile_mod_CFLAGS): Likewise.
10919 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10920 commands/configfile.c.
10921 (pkgdata_MODULES): Added configfile.mod.
10922 (configfile_mod_SOURCES): New variable.
10923 (configfile_mod_CFLAGS): Likewise.
10924 * util/grub-emu.c (main): Call grub_configfile_init and
10925 grub_configfile_fini.
10926 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
10928 [GRUB_UTIL] (grub_configfile_fini): Likewise.
10930 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
10932 * normal/arg.c (grub_arg_show_help): Do not show the bug report
10935 * commands/help.c (grub_cmd_help): Do not print newlines after
10936 the last command in print_command_help.
10938 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
10940 * commands/default.h: New file.
10941 * commands/timeout.h: Likewise.
10942 * normal/context.c: Likewise.
10944 * util/misc.c: Do not include sys/times.h.
10945 Include sys/time.h and grub/machine/time.h.
10946 (grub_get_rtc): Rewritten with gettimeofday.
10948 * util/grub-emu.c (main): Call grub_default_init and
10949 grub_timeout_init before grub_normal_init, and call
10950 grub_timeout_fini and grub_default_fini after grub_main.
10952 * util/console.c (grub_ncurses_checkkey): Return the read
10955 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
10958 * normal/main.c (read_config_file): Push MENU. If this fails,
10959 print an error and wait for a user input.
10960 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
10961 If a menu is empty or an error occurs, pop MENU.
10962 (grub_normal_execute): Pop and free MENU after grub_menu_run
10965 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
10967 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
10969 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10971 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
10973 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10976 * include/grub/normal.h (struct grub_menu_list): New struct.
10977 (grub_menu_list_t): New type.
10978 (struct grub_context): New struct.
10979 (grub_context_t): New type.
10980 (grub_register_command): Got rid of EXPORT_FUNC.
10981 (grub_unregister_command): Likewise.
10982 (grub_context_get): New prototype.
10983 (grub_context_get_current_menu): Likewise.
10984 (grub_context_push_menu): Likewise.
10985 (grub_context_pop_menu): Likewise.
10986 [GRUB_UTIL] (grub_default_init): Likewise.
10987 [GRUB_UTIL] (grub_default_fini): Likewise.
10988 [GRUB_UTIL] (grub_timeout_init): Likewise.
10989 [GRUB_UTIL] (grub_timeout_fini): Likewise.
10991 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
10992 commands/timeout.c and normal/context.c.
10993 (pkgdata_MODULES): Added default.mod and timeout.mod.
10994 (normal_mod_SOURCES): Added normal/context.c.
10995 (default_mod_SOURCES): New variable.
10996 (default_mod_CFLAGS): Likewise.
10997 (timeout_mod_SOURCES): Likewise.
10998 (timeout_mod_CFLAGS): Likewise.
10999 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
11001 (pkgdata_MODULES): Added default.mod and timeout.mod.
11002 (normal_mod_SOURCES): Added normal/context.c.
11003 (default_mod_SOURCES): New variable.
11004 (default_mod_CFLAGS): Likewise.
11005 (timeout_mod_SOURCES): Likewise.
11006 (timeout_mod_CFLAGS): Likewise.
11008 * Makefile.in (all-local): Added $(MKFILES).
11010 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
11012 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
11013 (grub_emu_SOURCES): Likewise.
11014 (pkgdata_MODULES): Add `sun.mod'.
11015 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11016 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11018 (pkgdata_MODULES): Add `sun.mod'.
11019 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11020 * include/grub/partition.h (grub_sun_partition_map_init): New
11022 (grub_sun_partition_map_fini): Likewise.
11023 * partmap/sun.c: New file.
11024 * util/grub-emu.c (main): Initialize and de-initialize the sun
11025 partitionmap support.
11027 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
11029 This implements an Emacs-like menu entry editor.
11031 * normal/menu_entry.c: New file.
11033 * util/console.c (grub_ncurses_putchar): Translate some Unicode
11034 characters to ASCII.
11035 (saved_char): New variable.
11036 (grub_ncurses_checkkey): Rewritten completely.
11037 (grub_ncurses_getkey): Likewise.
11038 (grub_ncurses_init): Call raw instead of cbreak.
11040 * normal/menu.c (print_entry): Do not put a space.
11041 (init_page): Renamed to ...
11042 (grub_menu_init_page): ... this. All callers changed.
11043 (edit_menu_entry): Removed.
11044 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11046 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11048 * kern/misc.c (grub_vprintf): Call grub_refresh.
11050 * normal/menu.c (DISP_LEFT): Renamed to ...
11051 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11052 * normal/menu.c (DISP_UP): Renamed to ...
11053 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11054 * normal/menu.c (DISP_RIGHT): Renamed to ...
11055 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11056 * normal/menu.c (DISP_DOWN): Renamed to ...
11057 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11058 * normal/menu.c (DISP_HLINE): Renamed to ...
11059 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11060 * normal/menu.c (DISP_VLINE): Renamed to ...
11061 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11062 * normal/menu.c (DISP_UL): Renamed to ...
11063 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11064 * normal/menu.c (DISP_UR): Renamed to ...
11065 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11066 * normal/menu.c (DISP_LL): Renamed to ...
11067 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11068 * normal/menu.c (DISP_LR): Renamed to ...
11069 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11070 * normal/menu.c (TERM_WIDTH): Renamed to ...
11071 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11072 * normal/menu.c (TERM_HEIGHT): Renamed to ...
11073 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11074 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11075 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11076 * normal/menu.c (TERM_MARGIN): Renamed to ...
11077 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11078 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11079 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11080 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11081 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11082 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11083 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11084 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11085 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11086 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11087 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11088 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11089 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11090 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11091 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11092 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11093 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11094 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11095 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11096 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11097 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11098 All callers changed.
11100 * include/grub/normal.h: New prototype.
11102 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11103 normal/menu_entry.c.
11104 (normal_mod_SOURCES): Likewise.
11105 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11106 (normal_mod_SOURCES): Likewise.
11108 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
11110 * include/grub/normal.h (grub_halt_init): New prototype.
11111 (grub_halt_fini): Likewise.
11112 (grub_reboot_init): Likewise.
11113 (grub_reboot_fini): Likewise.
11115 * util/grub-emu.c: Include signal.h.
11116 (main_env): New global variable.
11117 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11119 (grub_machine_fini): New function.
11120 (main): Call grub_halt_init and grub_reboot_init before
11121 grub_main, and grub_reboot_fini and grub_halt_fini after it.
11122 Call setjmp with MAIN_ENV to go back afterwards.
11123 Call grub_machine_fini right before return.
11125 * include/grub/util/misc.h: Include setjmp.h.
11126 (main_env): New prototype.
11128 * include/grub/kernel.h (grub_machine_fini): New prototype.
11129 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11130 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11132 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11133 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11134 * term/i386/pc/console.c (grub_console_fini): Likewise.
11136 * util/i386/pc/misc.c: New file.
11138 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11139 util/i386/pc/misc.c, commands/i386/pc/halt.c and
11140 commands/i386/pc/reboot.c.
11142 2005-02-14 Guillem Jover <guillem@hadrons.org>
11144 * include/grub/dl.h (grub_dl_check_header): New prototype.
11145 (grub_arch_dl_check_header): Change return type to grub_err_t,
11146 remove size parameter and export function. Update all callers.
11147 * kern/dl.c (grub_dl_check_header): New function.
11148 (grub_dl_load_core): Use `grub_dl_check_header' instead of
11149 `grub_arch_dl_check_header'. Check ELF type. Check if sections
11150 are inside the core.
11151 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11152 independent ELF header checks.
11153 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11154 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11155 `grub_dl_check_header' instead of explicit checks. Check for the
11157 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11158 `grub_dl_check_header' instead of explicit checks. Remove arch
11159 specific ELF header checks.
11161 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11164 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
11166 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11167 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11169 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
11171 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
11172 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
11173 (part_map_iterate): Clear `grub_errno' and return 0 if
11174 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
11175 * partmap/amiga.c (amiga_partition_map_iterate): Return
11176 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11177 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11179 2005-02-01 Guillem Jover <guillem@hadrons.org>
11181 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11184 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11186 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11188 (grub_rescue_cmd_linux): New prototype.
11189 (grub_rescue_cmd_initrd): Likewise.
11190 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11192 (grub_linux_release_mem): Release the memory for the initrd.
11193 (grub_load_linux): Renamed from this...
11194 (grub_rescue_cmd_linux): ...To this. Changed all callers.
11195 Changed `entry' not to be static. Loop over memory regions to
11196 find another one when the default fails.
11197 (grub_rescue_cmd_initrd): New function.
11198 (grub_linux_init): Remove function.
11199 (grub_linux_fini): Likewise.
11200 (GRUB_MOD_INIT): Register `initrd'.
11201 (GRUB_MOD_FINI): Unregister `initrd'.
11202 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
11204 (grub_linux_normal_fini): Likewise.
11205 (GRUB_MOD_INIT): Register `initrd'.
11206 (GRUB_MOD_FINI): Unregister `initrd'.
11208 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11210 * commands/help.c: New file.
11211 * normal/arg.c (show_help): Renamed to...
11212 (grub_arg_show_help): ... this.
11213 * commands/i386/pc/halt.c: New file.
11214 * commands/i386/pc/reboot.c: Likewise.
11215 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
11216 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
11217 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
11218 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
11220 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11222 (pkgdata_MODULES): Add `help.mod'.
11223 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
11224 * grub/i386/pc/init.h (grub_reboot): New prototype.
11225 (grub_halt): Likewise.
11226 * include/grub/normal.h (grub_arg_show_help): New prototype.
11227 (grub_help_init): Likewise.
11228 (grub_help_fini): Likewise.
11229 * util/grub-emu.c (main): Initialize and deinitialize the help
11232 * normal/cmdline.c (grub_cmdline_get): Doc fix.
11234 * normal/command.c (grub_command_init): Fixed the description of
11235 the `set' and `unset' commands.
11237 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11239 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
11241 * commands/ieee1275/halt.c: New file.
11242 * commands/ieee1275/reboot.c: Likewise.
11243 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
11244 `__attribute__ ((unused))'. Some GCS related fixed.
11245 (grub_suspend_init) [GRUB_UTIL]: Function removed.
11246 (grub_suspend_fini): Likewise.
11247 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
11249 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
11250 (halt_mod_CFLAGS): New variables.
11251 * include/grub/powerpc/ieee1275/ieee1275.h
11252 (grub_ieee1275_interpret): New prototype.
11254 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
11256 * include/grub/misc.h (memmove): New prototype.
11257 (memcpy): Likewise.
11259 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
11261 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
11262 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
11264 2005-01-22 Marco Gerards <metgerards@student.han.nl>
11266 * kern/misc.c (grub_strndup): Function rewritten.
11268 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
11270 * normal/menu.c (TERM_WIDTH): Macro redefined.
11271 (TERM_TOP_BORDER_Y): Likewise.
11272 (draw_border): Replaced while-loop by a for-loop. Make the number
11273 of lines consistent with the number of lines displayed in
11274 print_entries. Added a margin below the rectangle.
11275 (print_entry): Make the entry fit in the rectangle.
11276 (print_entries): Display the scroll arrows next to the right
11279 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11281 * fs/minix.c (grub_minix_find_file): Reserve more space for
11282 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
11283 `grub_strncpy' to copy `path' into it.
11285 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11287 Add the loopback device, a device via which files can be accessed
11290 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
11291 (pkgdata_MODULES): Add loopback.mod.
11292 (loopback_mod_SOURCES): New variable.
11293 (loopback_mod_CFLAGS): Likewise.
11294 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11296 (pkgdata_MODULES): Add loopback.mod.
11297 (loopback_mod_SOURCES): New variable.
11298 (loopback_mod_CFLAGS): Likewise.
11299 * disk/loopback.c: new file.
11300 * include/grub/normal.h (grub_loop_init): New prototype.
11301 (grub_loop_fini): New prototype.
11302 * util/grub-emu.c (main): Initialize and de-initialize loopback
11304 * include/grub/disk.h (grub_disk_dev_id): Add
11305 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
11307 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
11309 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
11311 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
11312 (suspend_mod_SOURCES): New variable.
11313 (suspend_mod_CFLAGS): Likewise.
11314 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
11316 * commands/ieee1275/suspend.c: New file.
11318 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11320 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
11321 ((unused))' to `__attribute__ ((used))'.
11322 (GRUB_MOD_FINI): Likewise.
11323 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11324 * genmk.rb (PModule): Assign space to common symbols when linking
11327 2005-01-20 Marco Gerards <metgerards@student.han.nl>
11329 * include/grub/mm.h (grub_mm_init_region): Change the type of the
11330 `unsigned' arguments to `grub_size_t'.
11331 (grub_malloc): Likewise.
11332 (grub_realloc): Likewise.
11333 (grub_memalign): Likewise.
11334 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11335 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11336 * util/misc.c (grub_malloc): Likewise.
11337 (grub_realloc): Likewise.
11338 * kern/mm.c (get_header_from_pointer): Change the casts to
11339 `unsigned' into a cast to `grub_size_t'.
11341 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11342 point to `currnode' when `currnode' is changed.
11344 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
11345 Schottelius <nico-linux@schottelius.org>.
11347 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
11349 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11350 (note_path): Remove variable.
11351 (GRUB_IEEE1275_NOTE_NAME): New macro.
11352 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11353 (grub_ieee1275_note_hdr): New structure.
11354 (grub_ieee1275_note_desc): Likewise.
11355 (grub_ieee1275_note): Likewise.
11356 (load_note): Remove `dir' argument. All callers updated. Remove
11357 `note_img' and `path'. Do not load a file from `note_path'.
11358 Initialize a struct grub_ieee1275_note and write that to `out'.
11359 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11361 2005-01-05 Marco Gerards <metgerards@student.han.nl>
11363 * util/misc.c (grub_util_read_image): Revert last change. It
11364 called `grub_util_read_at', which seeks from the beginning of the
11367 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
11369 * TODO: Add note about endianness in grub-mkimage.
11370 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11372 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11373 (grub_mkimage_SOURCES): New target.
11374 * include/grub/kernel.h (grub_start_addr): Remove variable.
11375 (grub_end_addr): Likewise.
11376 (grub_total_module_size): Likewise.
11377 (grub_kernel_image_size): Likewise.
11378 (GRUB_MODULE_MAGIC): New constant.
11379 (grub_module_info): New structure.
11380 (grub_arch_modules_addr): New prototype.
11381 (grub_get_end_addr): Remove prototype.
11382 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11383 * include/grub/powerpc/ieee1275/kernel.h: New file.
11384 * include/grub/util/misc.h (grub_util_get_fp_size): New
11386 (grub_util_read_at): Likewise.
11387 (grub_util_write_image_at): Likewise.
11388 * kern/main.c (grub_get_end_addr): Remove function.
11389 (grub_load_modules): Call grub_arch_modules_addr instead of using
11390 grub_end_addr. Look for a grub_module_info struct in memory. Use
11391 the grub_module_info fields instead of calling grub_get_end_addr
11392 as loop conditions. Move grub_add_unused_region code here.
11393 (grub_add_unused_region): Remove function.
11394 * kern/i386/pc/init.c: Include grub/cache.h.
11395 (grub_machine_init): Remove call to grub_get_end_addr. Remove
11396 one call to add_mem_region.
11397 (grub_arch_modules_addr): New function.
11398 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11399 (grub_total_module_size): Likewise.
11400 Include grub/machine/kernel.h.
11401 (grub_arch_modules_addr): New function.
11402 * util/grub-emu.c (grub_end_addr): Remove variable.
11403 (grub_total_module_size): Likewise.
11404 (grub_arch_modules_addr): New function.
11405 * util/misc.c: Include unistd.h.
11406 (grub_util_get_fp_size): New function.
11407 (grub_util_read_at): Likewise.
11408 (grub_util_write_image_at): Likewise.
11409 (grub_util_read_image): Call grub_util_read_at.
11410 (grub_util_write_image): Call grub_util_write_image_at.
11411 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11412 additional memory in kernel_img for a struct grub_module_info.
11413 Fill in that grub_module_info.
11414 * util/powerpc/ieee1275/grub-mkimage.c: New file.
11416 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11418 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11420 * include/grub/powerpc/ieee1275/ieee1275.h
11421 (grub_ieee1275_milliseconds): New prototype.
11422 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11424 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11425 grub_ieee1275_milliseconds.
11427 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11429 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11431 (find_options): New function.
11432 (cmain): Call find_options.
11433 * include/grub/powerpc/ieee1275/ieee1275.h
11434 (grub_ieee1275_realmode): New extern variable.
11435 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11436 grub_map if grub_ieee1275_realmode is false.
11438 2004-12-29 Marco Gerards <metgerards@student.han.nl>
11440 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11441 lines are inserted and make it work like readline. Reported by
11442 Vincent Pelletier <subdino2004@yahoo.fr>.
11444 2004-12-28 Marco Gerards <metgerards@student.han.nl>
11446 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11448 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11449 `kern/powerpc/cache.S'.
11451 2004-12-27 Marco Gerards <metgerards@student.han.nl>
11453 * genmk.rb: Handle the `Program' class in the main loop. Written
11454 by Johan Rydberg <jrydberg@gnu.org>.
11455 (Program): New class.
11456 (programs): New variable.
11457 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11458 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
11459 instead of "grub/kernel.h". Include <grub/machine/init.h>.
11460 (help_arch): Function removed.
11461 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11462 `powerpc/libgcc.h' and `loader.h'.
11463 (pkgdata_PROGRAMS): New variable.
11464 (sbin_UTILITIES): Variable removed.
11465 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11466 (grubof_SOURCES): Variable re-defined so it only includes the
11467 core functionality.
11468 (grubof_CFLAGS): Remove `-DGRUBOF'.
11469 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11470 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11471 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11472 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11473 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11474 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11475 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11476 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11477 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11478 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11479 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11480 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11481 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11482 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11483 (pc_mod_CFLAGS): New variables.
11484 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11485 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11486 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11487 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11489 * include/grub/i386/pc/init.h (grub_os_area_addr)
11490 (rub_os_area_size): ... to here.
11491 * include/grub/powerpc/ieee1275/ieee1275.h
11492 (grub_ieee1275_entry_fn): Export symbol.
11493 * include/grub/powerpc/ieee1275/init.h: New file.
11494 * include/grub/powerpc/libgcc.h: Likewise.
11495 * include/grub/cache.h: Likewise.
11496 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
11497 <hollis@penguinppc.org>.
11498 * kern/dl.c: Include <grub/cache.h>.
11499 (grub_dl_flush_cache): New function.
11500 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11502 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11503 (grub_console_init): Removed prototypes.
11504 (grub_machine_init): Don't initialize the modules anymore.
11505 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11507 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11508 Macro undef removed.
11509 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11510 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11511 relocation `R_PPC_REL32'. Return an error when the relocation is
11513 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11514 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11515 * util/misc.c (grub_arch_sync_caches): Likewise.
11517 2004-12-19 Marco Gerards <metgerards@student.han.nl>
11519 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
11520 `symlist.c', add `grubof_symlist.c'.
11521 (symlist.c): Variable removed.
11522 (grubof_HEADERS): Variable added.
11523 (grubof_symlist.c): New target.
11524 (kernel_syms.lst): Use `grubof_HEADERS' instead of
11525 `kernel_img_HEADERS'.
11526 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
11527 * kern/powerpc/dl.c: New file.
11528 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
11530 (grub_arch_dl_relocate_symbols): Likewise.
11531 (grub_register_exported_symbols): Likewise.
11533 2004-12-13 Marco Gerards <metgerards@student.han.nl>
11535 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
11536 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
11537 to fail instead. Reported by Vincent Pelletier
11538 <subdino2004@yahoo.fr>.
11540 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
11541 it is not allocated. Reported by Vincent Pelletier
11542 <subdino2004@yahoo.fr>.
11544 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
11545 output so the output looks better.
11547 2004-12-04 Marco Gerards <metgerards@student.han.nl>
11549 Modulize the partition map support and add support for the amiga
11552 * commands/ls.c: Include <grub/partition.h> instead of
11553 <grub/machine/partition.h>.
11554 * kern/disk.c: Likewise.
11555 * kern/rescue.c: Likewise.
11556 * loader/i386/pc/chainloader.c: Likewise.
11557 * normal/cmdline.c: Likewise.
11558 * kern/powerpc/ieee1275/init.c: Likewise.
11559 (grub_machine_init): Call `grub_pc_partition_map_init',
11560 `grub_amiga_partition_map_init' and
11561 `grub_apple_partition_map_init'.
11562 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
11563 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
11564 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
11565 `partition.h' and `pc_partition.h'.
11566 (grub_setup_SOURCES): Remove
11567 `disk/i386/pc/partition.c'. Add `kern/partition.c',
11568 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11569 (grub_emu_SOURCES): Likewise.
11570 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
11571 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
11572 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
11573 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11574 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
11575 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11576 (grubof_SOURCES): Likewise.
11577 * disk/i386/pc/partition.c: File removed.
11578 * disk/powerpc/ieee1275/partition.c: Likewise.
11579 * include/grub/powerpc/ieee1275/partition.h: Likewise.
11580 * include/grub/i386/pc/partition.h: Likewise.
11581 * kern/partition.c: New file.
11582 * partmap/amiga.c: Likewise.
11583 * partmap/apple.c: Likewise.
11584 * partmap/pc.c: Likewise.
11585 * include/grub/partition.h: Likewise..
11586 * include/grub/pc_partition.h: Likewise.
11587 * util/grub-emu.c: Include <grub/partition.h> instead of
11588 <grub/machine/partition.h>.
11589 (main): Call `grub_pc_partition_map_init',
11590 `grub_amiga_partition_map_init' and
11591 `grub_apple_partition_map_init' and deinitialize afterwards.
11592 * util/i386/pc/biosdisk.c: Include `#include
11593 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11594 `<grub/machine/partition.h>'.
11595 * util/i386/pc/grub-setup.c: Likewise.
11596 * util/i386/pc/biosdisk.c: Likewise.
11597 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
11598 partition information in case of a PC partition.
11599 * util/i386/pc/grub-setup.c: Include `#include
11600 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11601 `<grub/machine/partition.h>'.
11602 (setup): Only access the PC specific partition information in case
11605 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
11607 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
11608 (grub_longjmp): Likewise.
11609 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
11611 * normal/powerpc/setjmp.S: New file.
11612 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11613 `normal/powerpc/setjmp.S'.
11614 (grubof_CFLAGS): Add `-DGRUBOF'.
11615 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
11616 [GRUB_UTIL && !GRUBOF].
11618 2004-11-16 Marco Gerards <metgerards@student.han.nl>
11620 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
11621 property named `name'. Correctly handle the error returned by
11622 `grub_ieee1275_finddevice' if a device can not be opened.
11624 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
11626 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
11627 `actual' for negativity.
11628 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11631 2004-11-01 Marco Gerards <metgerards@student.han.nl>
11633 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
11634 (PAGE_OFFSET): New macro.
11635 (CRTC_ADDR_PORT): Likewise.
11636 (CRTC_DATA_PORT): Likewise.
11637 (START_ADDR_HIGH_REGISTER): Likewise.
11638 (START_ADDR_LOW_REGISTER): Likewise.
11639 (GRAPHICS_ADDR_PORT): Likewise.
11640 (GRAPHICS_DATA_PORT): Likewise.
11641 (READ_MAP_REGISTER): Likewise.
11642 (INPUT_STATUS1_REGISTER): Likewise.
11643 (INPUT_STATUS1_VERTR_BIT): Likewise.
11644 (page): New variable.
11645 (wait_vretrace): New function.
11646 (set_read_map): Likewise.
11647 (set_start_address): Likewise.
11648 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
11650 (check_vga_mem): Take the page into account.
11651 (write_char): Likewise.
11652 (write_cursor): Likewise.
11653 (scroll_up): Likewise. Copy the page to the page that is not
11654 shown and switch between both pages.
11655 (grub_vga_putchar): Fix off by one error.
11656 (grub_vga_cls): Wait for the vertical retrace. Take the page into
11659 2004-11-01 Marco Gerards <metgerards@student.han.nl>
11661 Add support for iso9660 (including rockridge).
11663 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11664 (iso9660_mod_SOURCES): New variable.
11665 (iso9660_mod_CFLAGS): Likewise.
11666 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11667 * include/grub/fs.h (grub_iso9660_init): New prototype.
11668 * util/grub-emu.c (main): Call `grub_iso9660_init'.
11669 * fs/iso9660.c: New file.
11671 * include/grub/misc.h (grub_strncat): New prototype.
11672 * kern/misc.c (grub_strncat): New function.
11674 * fs/hfs.c (grub_hfs_mount): Translate the error
11675 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
11676 * fs/jfs.c (grub_jfs_mount): Likewise.
11677 * fs/ufs.c (grub_ufs_mount): Likewise.
11679 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
11681 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
11682 which initialized BAT registers.
11683 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
11684 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11686 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
11687 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11689 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
11690 (grub_mapclaim): Likewise.
11691 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
11692 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
11695 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
11697 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
11698 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
11699 -ffreestanding and -msoft-float.
11701 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
11703 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
11704 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
11705 set in grub_ieee1275_flags.
11707 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
11709 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
11711 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
11712 grub_console_init first.
11713 Change the memory range used for grub_ieee1275_claim and
11714 grub_mm_init_region.
11715 Print an error message if the claim fails.
11716 Include <grub/misc.h>.
11718 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
11720 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
11721 Call grub_children_iterate for device nodes of type `scsi',
11723 (grub_ofdisk_open): Remove manual device alias resolution.
11724 Fix memory leak when device cannot be opened.
11725 * include/grub/powerpc/ieee1275/ieee1275.h
11726 (grub_children_iterate): New prototype.
11727 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
11729 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11730 Return -1 if args.size was -1.
11732 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11734 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
11735 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
11736 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
11737 Open Firmware's memory for it; claim memory from _start to _end.
11738 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
11739 (_end): New extern.
11740 (_start): Zero BSS from __bss_start to _end.
11741 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11743 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
11745 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11747 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
11748 -1 if args.base was -1.
11750 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
11752 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
11753 escape sequence instead of a literal ^L. Also call
11754 grub_ofconsole_gotoxy.
11756 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
11758 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
11759 void * arguments to grub_addr_t. All callers updated. Also make
11760 the `result' argument optional.
11761 (grub_ieee1275_release): change void * arguments to grub_addr_t.
11762 All callers updated.
11764 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
11766 * commands/ls.c (grub_ls_list_files): Use the string following the
11767 initial ')', if present, as the filesystem path.
11768 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
11770 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
11772 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
11774 Make the source code of the menu interface more readable.
11776 * normal/menu.c: Include grub/mm.h.
11777 (TERM_WIDTH): New macro.
11778 (TERM_HEIGHT): Likewise.
11779 (TERM_INFO_HEIGHT): Likewise.
11780 (TERM_MARGIN): Likewise.
11781 (TERM_SCROLL_WIDTH): Likewise.
11782 (TERM_TOP_BORDER_Y): Likewise.
11783 (TERM_LEFT_BORDER_X): Likewise.
11784 (TERM_BORDER_WIDTH): Likewise.
11785 (TERM_MESSAGE_HEIGHT): Likewise.
11786 (TERM_BORDER_HEIGHT): Likewise.
11787 (TERM_NUM_ENTRIES): Likewise.
11788 (TERM_FIRST_ENTRY_Y): Likewise.
11789 (TERM_ENTRY_WIDTH): Likewise.
11790 (TERM_CURSOR_X): Likewise.
11791 (draw_border): Use macros instead of magic numbers.
11792 (print_entry): Likewise.
11793 (print_entries): Likewise.
11794 (run_menu): Likewise. Also, handle the key 'e'.
11795 (run_menu_entry): Ignore empty command lines.
11796 (print_message): Added a new argument EDIT. If EDIT is true,
11797 print a different message.
11798 (init_page): Likewise.
11799 (edit_menu_entry): New function. Not implemented yet.
11801 2004-09-17 Marco Gerards <metgerards@student.han.nl>
11803 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
11804 can be loaded from normal mode.
11806 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
11808 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
11809 (multiboot_mod_CFLAGS): New variables.
11810 * loader/i386/pc/linux_normal.c: New file.
11811 * loader/i386/pc/multiboot_normal.c: Likewise.
11813 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
11814 attribute `unused'.
11816 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
11817 `fdiro' to read the mode information from instead of `diro'.
11819 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
11820 looking up a symlink.
11822 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
11824 * normal/command.c (grub_command_execute): Don't parse the
11825 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
11826 flags of the command.
11828 * normal/menu.c (grub_menu_run): Fix typo.
11830 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
11832 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
11834 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
11835 `y + 1' instead of `y - 1'.
11837 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
11839 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
11841 From Hollis Blanchard <hollis@penguinppc.org>:
11842 * kern/misc.c (memmove): New alias for grub_memmove.
11843 (memcmp): New alias for grub_memcmp.
11844 (memset): New alias for grub_memset.
11845 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11846 Change "int handle" to "grub_ieee1275_phandle_t handle".
11847 * include/grub/powerpc/ieee1275/ieee1275.h
11848 (grub_ieee1275_get_property): Likewise.
11850 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
11852 Added normal mode command `chainloader' as module chain.mod, which
11853 depends on normal.mod and _chain.mod.
11855 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
11856 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
11857 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
11859 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
11860 but arguments parsing moved to ...
11861 (grub_chainloader_cmd): ... here. New function.
11862 * include/grub/i386/pc/chainloader.h: New file.
11863 * loader/i386/pc/chainloader_normal.c: Likewise.
11865 2004-09-11 Marco Gerards <metgerards@student.han.nl>
11867 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
11868 (grub_mkimage_LDFLAGS): Likewise.
11869 (grub_emu_SOURCES): Likewise.
11870 (kernel_img_HEADERS): Added fshelp.h.
11871 * fs/ext2.c: Include <grub/fshelp.h>.
11872 (FILETYPE_REG): New macro.
11873 (FILETYPE_INO_REG): Likewise.
11874 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
11876 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
11878 (grub_fshelp_node): New struct.
11879 (grub_ext2_data): Added member `diropen'. Changed member `inode'
11881 (grub_ext2_get_file_block): Removed function.
11882 (grub_ext2_read_block): New function.
11883 (grub_ext2_read_file): Replaced parameter `data' by `node'.
11884 This function was written.
11885 (grub_ext2_mount): Read the root inode. Create a diropen struct.
11886 (grub_ext2_find_file): Removed function.
11887 (grub_ext2_read_symlink): New function.
11888 (grub_ext2_iterate_dir): Likewise.
11889 (grub_ext2_open): Rewritten.
11890 (grub_ext2_dir): Rewritten.
11891 * include/grub/fshelp.h: New file.
11892 * fs/fshelp.c: Likewise.
11894 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
11896 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
11897 (print_message): Add a missing newline.
11898 (run_menu): Added timeout support.
11899 (run_menu_entry): New local function.
11900 (grub_menu_run): Added support for booting.
11902 * kern/loader.c (grub_loader_is_loaded): New function.
11904 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
11905 (grub_get_rtc): Exported.
11907 * include/grub/i386/pc/time.h: Include grub/symbol.h.
11908 (grub_get_rtc): Exported.
11910 * include/grub/normal.h (struct grub_command_list): Remove
11911 constant from the member `command'.
11913 * include/grub/loader.h (grub_loader_is_loaded): Declared.
11915 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
11917 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
11919 2004-08-28 Marco Gerards <metgerards@student.han.nl>
11921 Add support for the JFS filesystem.
11923 * fs/jfs.c: New file.
11924 * include/grub/fs.h (grub_jfs_init): New prototype.
11925 (grub_jfs_fini): New prototype.
11926 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
11927 (grub_emu_SOURCES): Likewise.
11928 (pkgdata_MODULES): Add jfs.mod.
11929 (jfs_mod_SOURCES): New variable.
11930 (jfs_mod_CFLAGS): Likewise.
11931 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
11932 (grubof_SOURCES): Likewise.
11933 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
11935 * fs/fat.c (grub_fat_find_dir): Convert the filename little
11936 endian to the host endian.
11937 (grub_fat_utf16_to_utf8): Move function from there...
11938 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
11939 the endianness of the source string anymore.
11940 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
11942 2004-08-24 Marco Gerards <metgerards@student.han.nl>
11944 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
11945 (grub_boot_fini) [GRUB_UTIL]: Likewise.
11946 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
11947 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
11949 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
11950 (grub_hfs_iterate_dir): Make the function static. Add prototypes
11951 for `node_found' and `it_dir'.
11952 (grub_hfs_dir): Add prototype for `dir_hook'.
11954 * fs/minix.c (grub_minix_get_file_block): Add prototype for
11955 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
11956 and `indir32' to silence a gcc warning.
11958 * include/grub/fs.h (grub_hfs_init): New prototype.
11959 (grub_hfs_fini): Likewise.
11962 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
11964 Each disk device has its own id now. This is useful to make use
11965 of multiple disk devices.
11967 * include/grub/disk.h (grub_disk_dev_id): New enum.
11968 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
11969 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
11971 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
11972 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11974 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
11975 GRUB_DISK_DEVICE_OFDISK_ID as an id.
11977 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
11978 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11980 * include/grub/disk.h (struct grub_disk_dev): Added a new member
11981 "id" which is used by the cache manager.
11983 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
11986 2004-08-18 Marco Gerards <metgerards@student.han.nl>
11988 * fs/hfs.c: New file.
11989 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
11990 (grub_emu_SOURCES): Likewise.
11991 (pkgdata_MODULES): Add hfs.mod.
11992 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
11993 (grubof_SOURCES): Likewise.
11994 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
11996 * include/grub/misc.h (grub_strncasecmp): Add prototype.
11997 * kern/misc.c (grub_strncasecmp): Add function.
11999 2004-08-14 Marco Gerards <metgerards@student.han.nl>
12001 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
12004 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
12005 (grub_ext2_dir): In case the directory entry type is unknown, read
12008 2004-08-02 Peter Bruin <pjbruin@dds.nl>
12010 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
12011 grub_load_linux instead of grub_rescue_cmd_linux as second
12012 argument of grub_rescue_register_command.
12014 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12016 2004-07-27 Marco Gerards <metgerards@student.han.nl>
12018 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12020 * commands/boot.c: Remove the check for `GRUB_UTIL'.
12021 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12022 `loader/powerpc/ieee1275/linux.c',
12023 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12024 * include/grub/powerpc/ieee1275/ieee1275.h
12025 (grub_ieee1275_release): New prototype.
12026 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12027 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12028 normal, boot, linux and linux_normal.
12029 * loader/powerpc/ieee1275/linux.c: New file.
12030 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12032 2004-07-12 Marco Gerards <metgerards@student.han.nl>
12034 * normal/arg.c (grub_arg_parse): Correct error handling after
12035 reallocating the argumentlist (check if `argl' is not null instead
12036 of checking if `args' is not null).
12037 * kern/mm.c (grub_realloc): Return the same pointer when using the
12038 same region, instead of returning the header address.
12040 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12042 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12043 one block instead of two when looking for the initial partition.
12044 (grub_partition_probe): Initialize the local variable `p' with 0.
12045 Use base 10 for the grub_strtoul call.
12046 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
12047 need for one local variable.
12048 (grub_strtoul): Don't add the new value to `num', instead of that
12051 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12053 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12054 (pxeboot_img_SOURCES): New variable.
12055 (pxeboot_img_ASFLAGS): Likewise.
12056 (pxeboot_img_LDFLAGS): Likewise.
12057 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
12058 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
12059 <lode_leroy@hotmail.com>.
12061 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12063 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12064 there was no input.
12066 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12068 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
12069 the history buffer logic.
12071 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12073 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12074 (FILETYPE_INO_SYMLINK): New macros.
12075 (grub_ext2_find_file): Check if the node is a directory using the
12076 inode stat information instead of using the filetype in the
12077 dirent. Exclude the first character of an absolute symlink.
12078 (grub_ext2_dir): Mask out the filetype part of the mode member of
12081 2004-05-24 Marco Gerards <metgerards@student.han.nl>
12083 Add support for UFS version 1 and 2. Add support for the minix
12084 filesystem version 1 and 2, both the variants with 14 and 30 long
12087 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12089 (grub_emu_SOURCES): Likewise.
12090 (pkgdata_MODULES): Add ufs.mod and minix.mod.
12091 (ufs_mod_SOURCES): New variable.
12092 (ufs_mod_CFLAGS): Likewise.
12093 (minix_mod_SOURCES): Likewise.
12094 (minix_mod_CFLAGS): Likewise.
12095 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12097 (grubof_SOURCES): Likewise.
12098 * fs/ufs.c: New file.
12099 * fs/minix.c: New file.
12100 * include/grub/fs.h (grub_ufs_init): New prototype.
12101 (grub_ufs_fini): Likewise.
12102 (grub_minix_init): Likewise.
12103 (grub_minix_fini): Likewise.
12104 * util/grub-emu.c (main): Initialize and deinitialize UFS and
12107 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
12109 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12110 commands/ls.c, commands/terminal.c, commands/boot.c,
12111 commands/cmp.c and commands/cat.c.
12112 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12114 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12117 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12119 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12120 and grub_, respectively. Because the conversion is trivial and
12121 mechanical, I omit the details here. Please refer to the CVS
12122 if you need more information.
12124 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12126 * include/pupa: Renamed to ...
12127 * include/grub: ... this.
12128 * util/i386/pc/pupa-mkimage.c: Renamed to ...
12129 * util/i386/pc/grub-mkimage.c: ... this.
12130 * util/i386/pc/pupa-setup.c: Renamed to ...
12131 * util/i386/pc/grub-setup.c: ... this.
12132 * util/pupa-emu.c: Renamed to ...
12133 * util/grub-emu.c: ... this.
12135 2004-03-29 Marco Gerards <metgerards@student.han.nl>
12137 Add support for the newworld apple macintosh (PPC). This has been
12138 tested on the powerbook 2000 only. It only adds support for
12139 generic ieee1275 functions, console and disk support. This should
12140 be easy to port to other architectures with support for Open
12143 * configure.ac: Accept the powerpc as host_cpu. In the case of
12144 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
12145 specific tests are only executed while building for the i386.
12146 Inverse test for crosscompile.
12147 * genmk.rb (Utility): Allow assembler files.
12148 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12149 * conf/powerpc-ieee1275.rmk: New file.
12150 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12151 * disk/powerpc/ieee1275/partition.c: Likewise.
12152 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12153 * include/pupa/powerpc/ieee1275/console.h: Likewise.
12154 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12155 * include/pupa/powerpc/ieee1275/time.h: Likewise.
12156 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12157 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12158 * include/pupa/powerpc/ieee1275/loader.h
12159 * include/pupa/powerpc/setjmp.h: Likewise.
12160 * include/pupa/powerpc/types.h: Likewise.
12161 * kern/powerpc/ieee1275/init.c: Likewise.
12162 * kern/powerpc/ieee1275/openfw.c: Likewise.
12163 * term/powerpc/ieee1275/ofconsole.c: Likewise.
12165 These files were written by Johan Rydberg
12166 (jrydberg@night.trouble.net) and I only modified them slightly.
12168 * boot/powerpc/ieee1275/cmain.c: New file.
12169 * boot/powerpc/ieee1275/crt0.S: Likewise.
12170 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12171 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12173 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
12175 * Makefile.in: Update copyright.
12176 * genmodsrc.sh: Likewise.
12177 * gensymlist.sh: Likewise.
12178 * term/i386/pc/vga.c: Indent correctly.
12180 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12181 bugreporting address.
12182 * util/i386/pc/pupa-setup.c (usage): Likewise,
12183 (main): Call pupa_ext2_init and pupa_ext2_fini.
12185 * fs/fat.c (log2): Renamed to ...
12186 (fat_log2): ... this.
12187 All callers changed.
12188 * kern/misc.c (memcpy): Alias to pupa_memmove.
12189 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12191 * util/console.c (pupa_ncurses_fini): Return 0.
12193 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12194 Move fail label here.
12195 [__GNU__]: Don't warn when using stat.
12196 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
12197 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
12198 long int. Use strtol instead of strtoul.
12200 2004-03-14 Marco Gerards <metgerards@student.han.nl>
12202 * commands/boot.c: New file.
12203 * commands/cat.c: Likewise.
12204 * commands/cmp.c: Likewise.
12205 * commands/ls.c: Likewise.
12206 * commands/terminal.c: Likewise.
12207 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
12208 (pupa_register_command): Changed interface to match the new
12210 (pupa_command_execute): Changed (almost rewritten) so it uses
12211 pupa_split_command. Added support for setting variables using the
12213 (rescue_command): Changed to work with the new argument parser.
12214 (terminal_command): Moved from here to commands/terminal.c.
12215 (set_command): New function.
12216 (unset_command): New function.
12217 (insmod_command): New function.
12218 (rmmod_command): New function.
12219 (lsmod_command): New function.
12220 (pupa_command_init): Don't initialize the command terminal
12221 anymore. Initialize the commands set, unset, insmod, rmmod and
12223 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
12224 (kernel_img_HEADERS): Add arg.h and env.h.
12225 (pupa_mkimage_LDFLAGS): Add kern/env.c.
12226 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
12227 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
12229 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
12231 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
12232 (boot_mod_SOURCES): New variable.
12233 (terminal_mod_SOURCES): Likewise.
12234 (ls_mod_SOURCES): Likewise.
12235 (cmp_mod_SOURCES): Likewise.
12236 (cat_mod_SOURCES): Likewise.
12238 * normal/arg.c: New file.
12239 * kern/env.c: Likewise.
12240 * include/pupa/arg.h: Likewise.
12241 * include/pupa/env.h: Likewise.
12242 * font/manager.c (font_command): Changed to match argument parsing
12244 (PUPA_MOD_INIT): Likewise.
12245 * hello/hello.c (pupa_cmd_hello): Likewise.
12246 (PUPA_MOD_INIT): Likewise.
12247 * include/pupa/disk.h: Include <pupa/device.h>.
12248 (pupa_print_partinfo): New prototype.
12249 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
12250 (pupa_dl_get_prefix): Likewise.
12251 * include/pupa/misc.h: Include <pupa/err.h>.
12252 (pupa_isgraph): New prototype.
12253 (pupa_isdigit): Likewise.
12254 (pupa_split_cmdline): Likewise.
12255 * include/pupa/normal.h: Include <pupa/arg.h>.
12256 (pupa_command): Changed the prototype of the member `func' to
12257 match the argument parsing interface. Added member `options'.
12258 (pupa_register_command): Updated to match function.
12259 (pupa_arg_parse): New prototype.
12260 (pupa_hello_init) [PUPA_UTIL]: New prototype.
12261 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
12262 (pupa_ls_init) [PUPA_UTIL]: Likewise.
12263 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
12264 (pupa_cat_init) [PUPA_UTIL]: Likewise.
12265 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
12266 (pupa_boot_init) [PUPA_UTIL]: Likewise.
12267 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
12268 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
12269 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
12270 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
12271 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
12272 * kern/disk.c: Include <pupa/file.h>.
12273 (pupa_print_partinfo): New function.
12274 * kern/dl.c: Include <pupa/env.h>.
12275 (pupa_dl_dir): Variable removed.
12276 (pupa_dl_load): Use the environment variable `prefix' instead of
12277 the variable pupa_dl_dir.
12278 (pupa_dl_set_prefix): Function removed.
12279 (pupa_dl_get_prefix): Likewise.
12280 * kern/i386/pc/init.c: Include <pupa/env.h>.
12281 (pupa_machine_init): Use the environment variable `prefix' instead of
12282 using pupa_dl_set_prefix to set the prefix.
12283 * kern/main.c: Include <pupa/env.h>.
12284 (pupa_set_root_dev): Use the environment variable `prefix' instead of
12285 using pupa_dl_get_prefix to get the prefix.
12286 * kern/misc.c: Include <pupa/env.h>.
12287 (pupa_isdigit): New function.
12288 (pupa_isgraph): Likewise.
12289 (pupa_ftoa): Likewise.
12290 (pupa_vsprintf): Added support for printing values of the type
12291 `double'. Make it possible to format variable output when using
12292 formatting like `%1.2%f'.
12293 (pupa_split_cmdline): New function.
12294 * kern/rescue.c: Include <pupa/env.h>.
12295 (next_word): Removed function.
12296 (pupa_rescue_cmd_prefix): Likewise.
12297 (pupa_rescue_cmd_set): New function.
12298 (pupa_rescue_cmd_unset): New function.
12299 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
12300 split the command line instead of splitting it here. Added
12301 support for setting variables using the syntax `foo=bar'. Don't
12302 initialize the prefix command anymore. Initialized the set and
12304 * normal/cmdline.c: Include <pupa/env.h>.
12305 (pupa_tab_complete): Added prototypes for print_simple_completion,
12306 print_partition_completion, add_completion, iterate_commands,
12307 iterate_dev, iterate_part and iterate_dir. Moved code to print
12308 partition information from here to kern/disk.c.
12309 (pupa_cmdline_run): Don't check if the function exists anymore.
12310 * normal/main.c: Include <pupa/env.h>.
12311 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
12312 instead of using pupa_dl_get_prefix to get the prefix.
12313 * term/i386/pc/vga.c: Include <pupa/arg.h>.
12314 (check_vga_mem): Cast pointers to `void *' to silence a gcc
12316 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
12317 (pupa_vga_setcolor): Declare unused variables with `__attribute__
12318 ((unused))' to silence a gcc warning.
12319 (pupa_vga_setcolor): Likewise.
12320 (debug_command): Changed to match argument parsing
12322 * util/pupa-emu.c: Include <pupa/env.h>.
12323 (options): Added 0's for unused fields to silence a gcc warning.
12325 (main): Use the environment variable `prefix' instead of using
12326 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
12327 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
12330 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12331 * util/misc.c: Include <malloc.h>.
12332 (pupa_malloc): Rewritten so errors are correctly reported.
12333 (pupa_realloc): Likewise.
12334 (pupa_memalign): Likewise.
12335 (pupa_mm_init_region): Declare unused variables with
12336 `__attribute__ ((unused))' to silence a gcc warning.
12337 * normal/i386/setjmp.S: Remove tab at the end of the file to
12338 silence a gcc warning.
12339 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12340 variables with `__attribute__ ((unused))' to silence a gcc
12342 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12343 local variable i unsigned to silence a gcc warning.
12345 * kern/term.c: Include <pupa/misc.h>.
12346 (pupa_more_lines): New variable.
12347 (pupa_more): Likewise.
12348 (pupa_putcode): When the pager is active pause at the end of every
12350 (pupa_set_more): New function.
12351 * include/pupa/term.h (pupa_set_more): New prototype.
12354 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
12356 Now this project is GRUB 2 rather than PUPA. The location of
12357 the CVS repository was moved to GRUB's.
12359 * configure.ac: Use bug-grub as the reporting address.
12360 Use GRUB instead of PUPA.
12361 Change the version number to 1.90.
12363 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
12365 * genkernsyms.sh: Updated copyright information.
12366 * genmk.rb: Likewise.
12367 * genmodsrc.sh: Likewise.
12368 * gensymlist.sh: Likewise.
12369 * boot/i386/pc/boot.S: Likewise.
12370 * boot/i386/pc/diskboot.S: Likewise.
12371 * disk/i386/pc/biosdisk.c: Likewise.
12372 * disk/i386/pc/partition.c: Likewise.
12373 * font/manager.c: Likewise.
12374 * fs/ext2.c: Likewise.
12375 * fs/fat.c: Likewise.
12376 * include/pupa/boot.h: Likewise.
12377 * include/pupa/device.h: Likewise.
12378 * include/pupa/disk.h: Likewise.
12379 * include/pupa/dl.h: Likewise.
12380 * include/pupa/elf.h: Likewise.
12381 * include/pupa/err.h: Likewise.
12382 * include/pupa/file.h: Likewise.
12383 * include/pupa/font.h: Likewise.
12384 * include/pupa/fs.h: Likewise.
12385 * include/pupa/kernel.h: Likewise.
12386 * include/pupa/loader.h: Likewise.
12387 * include/pupa/misc.h: Likewise.
12388 * include/pupa/mm.h: Likewise.
12389 * include/pupa/net.h: Likewise.
12390 * include/pupa/normal.h: Likewise.
12391 * include/pupa/rescue.h: Likewise.
12392 * include/pupa/setjmp.h: Likewise.
12393 * include/pupa/symbol.h: Likewise.
12394 * include/pupa/term.h: Likewise.
12395 * include/pupa/types.h: Likewise.
12396 * include/pupa/i386/setjmp.h: Likewise.
12397 * include/pupa/i386/types.h: Likewise.
12398 * include/pupa/i386/pc/biosdisk.h: Likewise.
12399 * include/pupa/i386/pc/boot.h: Likewise.
12400 * include/pupa/i386/pc/console.h: Likewise.
12401 * include/pupa/i386/pc/init.h: Likewise.
12402 * include/pupa/i386/pc/kernel.h: Likewise.
12403 * include/pupa/i386/pc/linux.h: Likewise.
12404 * include/pupa/i386/pc/loader.h: Likewise.
12405 * include/pupa/i386/pc/memory.h: Likewise.
12406 * include/pupa/i386/pc/multiboot.h: Likewise.
12407 * include/pupa/i386/pc/partition.h: Likewise.
12408 * include/pupa/i386/pc/time.h: Likewise.
12409 * include/pupa/i386/pc/vga.h: Likewise.
12410 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12411 * include/pupa/util/getroot.h: Likewise.
12412 * include/pupa/util/misc.h: Likewise.
12413 * include/pupa/util/resolve.h: Likewise.
12414 * kern/device.c: Likewise.
12415 * kern/disk.c: Likewise.
12416 * kern/dl.c: Likewise.
12417 * kern/err.c: Likewise.
12418 * kern/file.c: Likewise.
12419 * kern/fs.c: Likewise.
12420 * kern/loader.c: Likewise.
12421 * kern/main.c: Likewise.
12422 * kern/misc.c: Likewise.
12423 * kern/mm.c: Likewise.
12424 * kern/rescue.c: Likewise.
12425 * kern/term.c: Likewise.
12426 * kern/i386/dl.c: Likewise.
12427 * kern/i386/pc/init.c: Likewise.
12428 * kern/i386/pc/lzo1x.S: Likewise.
12429 * kern/i386/pc/startup.S: Likewise.
12430 * loader/i386/pc/chainloader.c: Likewise.
12431 * loader/i386/pc/linux.c: Likewise.
12432 * loader/i386/pc/multiboot.c: Likewise.
12433 * normal/cmdline.c: Likewise.
12434 * normal/command.c: Likewise.
12435 * normal/main.c: Likewise.
12436 * normal/menu.c: Likewise.
12437 * normal/i386/setjmp.S: Likewise.
12438 * term/i386/pc/console.c: Likewise.
12439 * term/i386/pc/vga.c: Likewise.
12440 * util/console.c: Likewise.
12441 * util/genmoddep.c: Likewise.
12442 * util/misc.c: Likewise.
12443 * util/pupa-emu.c: Likewise.
12444 * util/resolve.c: Likewise.
12445 * util/unifont2pff.rb: Likewise.
12446 * util/i386/pc/biosdisk.c: Likewise.
12447 * util/i386/pc/getroot.c: Likewise.
12448 * util/i386/pc/pupa-mkimage.c: Likewise.
12449 * util/i386/pc/pupa-setup.c: Likewise.
12451 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
12453 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12454 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
12455 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
12456 reading and reset it after reading.
12457 (pupa_ext2_close): Return PUPA_ERR_NONE.
12459 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12461 (struct linux_kernel_header): Add kernel_version and
12463 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12464 pupa_file_read succeeds.
12465 (pupa_rescue_cmd_initrd): Implement.
12467 2003-12-03 Marco Gerards <metgerards@student.han.nl>
12469 * fs/ext2.c (pupa_ext2_label): New function.
12470 (pupa_ext2_fs): Added label.
12471 * fs/fat.c (pupa_fat_label): New function.
12472 (pupa_fat_fs): Added label.
12473 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12475 * kern/misc.c (pupa_strndup): New function.
12476 * include/pupa/misc.h (pupa_strndup): New prototype.
12478 * include/pupa/normal.h: Include <pupa/err.h>.
12479 (pupa_set_history): New prototype.
12480 (pupa_iterate_commands): New prototype.
12481 * normal/cmdline.c: Include <pupa/machine/partition.h>,
12482 <pupa/disk.h>, <pupa/file.h>.
12483 (hist_size): New variable.
12484 (hist_lines): Likewise.
12485 (hist_end): Likewise.
12486 (hist_used): Likewise.
12487 (pupa_set_history): New function.
12488 (pupa_history_get): Likewise.
12489 (pupa_history_add): Likewise.
12490 (pupa_history_replace): Likewise.
12491 (pupa_tab_complete): Likewise.
12492 (pupa_cmdline_run): Added tab completion and history buffer. Tab
12493 completion shows partitionnames while completing partitions, this
12494 feature was suggested by Jeff Bailey.
12495 * normal/command.c (pupa_iterate_commands): New function.
12496 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12497 (pupa_normal_init): Initialize history buffer.
12498 (PUPA_MOD_INIT): Likewise.
12499 (pupa_normal_fini): Free the history buffer.
12500 (PUPA_MOD_FINI): Likewise.
12502 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12505 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12506 * configure.ac [i386]: Check for regparam bug.
12507 (NESTED_FUNC_ATTR) [! i386]: Defined.
12509 2003-11-17 Marco Gerards <metgerards@student.han.nl>
12511 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12512 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12513 (pupa_emu_SOURCES): New variable.
12514 (pupa_emu_LDFLAGS): Likewise.
12515 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12516 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12517 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12518 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12519 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
12520 (pupa_jmp_buf): New typedef.
12521 (pupa_setjmp) [PUPA_UTIL]: New macro.
12522 (pupa_longjmp) [PUPA_UTIL]: Likewise.
12523 * include/pupa/term.h (struct pupa_term): New member `refresh'.
12524 (pupa_refresh): New prototype.
12525 * include/pupa/util/getroot.h: New file.
12526 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
12528 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
12529 (pupa_rescue_cmd_cat): Likewise.
12530 (pupa_rescue_cmd_ls): Likewise.
12531 (pupa_rescue_cmd_testload): Likewise.
12532 (pupa_rescue_cmd_lsmod): Likewise.
12533 * normal/cmdline.c (pupa_cmdline_get): Likewise.
12534 * normal/menu.c (run_menu): Likewise.
12535 * kern/term.c (pupa_cls): Likewise.
12536 (pupa_refresh): New function.
12537 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
12538 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12539 * util/console.c: New file.
12541 * util/i386/pc/getroot.c: New file.
12542 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
12543 (pupa_putchar): New function.
12544 (pupa_refresh): Likewise.
12545 (xgetcwd): Function moved to ...
12546 (strip_extra_slashes): Likewise.
12547 (get_prefix): Likewise.
12548 * util/i386/pc/getroot.c: ... here.
12549 (find_root_device): Function moved and renamed to...
12550 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
12551 Changed all callers.
12552 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
12554 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
12555 Changed all callers.
12556 * util/misc.c (pupa_memalign): New function.
12557 (pupa_mm_init_region): Likewise.
12558 (pupa_register_exported_symbols): Likewise.
12559 (pupa_putchar): Function removed.
12560 * util/pupa-emu.c: New file.
12562 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
12564 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
12565 (_multiboot_mod_SOURCES): New variable.
12566 (_multiboot_mod_CFLAGS): Likewise.
12567 * loader/i386/pc/multiboot.c: New file.
12568 * include/pupa/i386/pc/multiboot.h: Likewise.
12569 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
12570 (pupa_multiboot_real_boot): New function.
12571 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
12572 (pupa_multiboot_real_boot): New prototype.
12573 (pupa_rescue_cmd_multiboot): Likewise
12574 (pupa_rescue_cmd_module): Likewise.
12576 * kern/loader.c (pupa_loader_set): Continue when
12577 pupa_loader_unload_func() fails.
12578 (pupa_loader_unset): New function.
12579 * include/pupa/loader.h (pupa_loader_unset): New prototype.
12581 * kern/misc.c (pupa_stpcpy): New function.
12582 * include/pupa/misc.h (pupa_stpcpy): New prototype.
12584 2003-11-12 Marco Gerards <metgerards@student.han.nl>
12586 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
12587 for available extensions.
12589 * include/pupa/i386/pc/time.h: New file.
12590 * kern/disk.c: Include <pupa/machine/time.h>.
12591 (PUPA_CACHE_TIMEOUT): New macro.
12592 (pupa_last_time): New variable.
12593 (pupa_disk_open): Flush the cache when there was a timeout.
12594 (pupa_disk_close): Reset the timer.
12595 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
12597 * util/misc.c: Include <sys/times.h>
12598 (pupa_get_rtc): New function.
12600 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
12602 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
12604 (pupa_ext2_get_file_block): Use blocks member.
12606 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
12607 first block. Return -1 instead of pupa_errno on error.
12609 2003-10-27 Marco Gerards <metgerards@student.han.nl>
12611 * README: In the pupa-mkimage example use _chain instead of chain
12612 and ext2 instead of fat.
12613 * TODO: Replace ext2fs with jfs as an example. Add an item for
12614 adding journal playback for ext2fs.
12615 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
12616 (pkgdata_MODULES): Added ext2.mod.
12617 (ext2_mod_SOURCES): New variable.
12618 (ext2_mod_CFLAGS): Likewise.
12619 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
12620 * include/pupa/misc.h (pupa_strncpy): New prototype.
12621 (pupa_strcat): Likewise.
12622 (pupa_strncmp): Likewise.
12623 * kern/misc.c (pupa_strcat): Enable function.
12624 (pupa_strncpy): New function.
12625 (pupa_strncmp): Likewise.
12626 * fs/ext2.c: New file.
12628 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
12629 when the read failed before retrying.
12630 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
12631 (_FILE_OFFSET_BITS): Likewise.
12632 * configure.ac: Added AC_SYS_LARGEFILE.
12634 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
12636 * genmk.rb (PModule#rule): Make sure to get only symbol names
12637 from the output of nm.
12638 Reported by Robert Millan <zeratul2@wanadoo.es>.
12640 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
12642 I forgot to check in these changes for a long time. This adds
12643 incomplete support for VGA console, and this is still very
12644 buggy. Also, a lot of consideration is required for I18N,
12645 UNICODE, and VGA font issues. Therefore, assume that this is
12646 such that "better than nothing".
12648 * font/manager.c: New file.
12649 * include/pupa/font.h: Likewise.
12650 * include/pupa/i386/pc/vga.h: Likewise.
12651 * term/i386/pc/vga.c: Likewise.
12652 * util/unifont2pff.rb: Likewise.
12654 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
12655 (pkgdata_MODULES): Added vga.mod and font.mod.
12656 (vga_mod_SOURCES): New variables.
12657 (vga_mod_CFLAGS): Likewise.
12658 (font_mod_SOURCES): Likewise.
12659 (font_mod_CFLAGS): Likewise.
12661 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
12663 * include/pupa/term.h: Include pupa/err.h.
12664 (struct pupa_term): Added init and fini.
12665 Changed the argument of putchar to pupa_uint32_t.
12667 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
12668 (pupa_console_real_putchar): New prototype.
12669 (pupa_console_putchar): Removed.
12670 (pupa_console_checkkey): Exported.
12671 (pupa_console_getkey): Likewise.
12673 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
12676 * kern/term.c (pupa_term_set_current): Rewritten.
12677 (pupa_putchar): Likewise.
12678 (pupa_putcode): New function.
12680 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
12681 (pupa_console_real_putchar): ... this.
12682 (pupa_vga_set_mode): New function.
12683 (pupa_vga_get_font): Likewise.
12685 * normal/command.c: Include pupa/term.h.
12686 (terminal_command): New function.
12687 (pupa_command_init): Register the command "terminal".
12689 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
12690 (DISP_UP): Likewise.
12691 (DISP_RIGHT): Likewise.
12692 (DISP_DOWN): Likewise.
12693 (DISP_HLINE): Likewise.
12694 (DISP_VLINE): Likewise.
12695 (DISP_UL): Likewise.
12696 (DISP_UR): Likewise.
12697 (DISP_LL): Likewise.
12698 (DISP_LR): Likewise.
12700 * term/i386/pc/console.c (pupa_console_putchar): New function.
12702 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
12704 * util/resolve.c (pupa_util_resolve_dependencies): BUG
12705 FIX. Reverse the path_list.
12707 * include/pupa/normal.h: Export pupa_register_command and
12708 pupa_unregister_command.
12710 * hello/hello.c (pupa_cmd_hello): New module.
12711 * conf/i386-pc.rmk: Added hello.mod.
12713 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
12715 * kern/i386/pc/lzo1x.S: New file.
12717 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
12718 (compress_kernel): New variable.
12719 (generate_image): Heavily modified to support compressing a
12720 large part of the core image.
12722 * util/misc.c (pupa_util_read_image): Fix a file descriptor
12724 (pupa_util_load_image): New function.
12726 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
12727 (pupa_compressed_size): New variable.
12728 (codestart): Enable Gate A20 here.
12729 Decompress the compressed part of the core image.
12730 Rearrange the code to put functions and variables which are
12731 required for initialization in the non-compressed part.
12734 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
12737 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
12739 * include/pupa/i386/pc/kernel.h
12740 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
12741 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
12742 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12743 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12744 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
12746 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
12748 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
12749 (Utility#rule): Likewise.
12751 * configure.ac: Check if LZO is available.
12753 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
12755 * include/pupa/normal.h: New file.
12756 * include/pupa/setjmp.h: Likewise.
12757 * include/pupa/i386/setjmp.h: Likewise.
12758 * normal/cmdline.c: Likewise.
12759 * normal/command.c: Likewise.
12760 * normal/main.c: Likewise.
12761 * normal/menu.c: Likewise.
12762 * normal/i386/setjmp.S: Likewise.
12764 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
12765 (pupa_rescue_cmd_initrd): Likewise.
12767 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
12770 * kern/i386/pc/startup.S (translation_table): New variable.
12771 (translate_keycode): New function.
12772 (pupa_console_getkey): Call translate_keycode.
12774 * kern/rescue.c (attempt_normal_mode): New function.
12775 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
12776 it failed, print a message.
12778 * kern/mm.c (pupa_real_malloc): Print more information when a
12779 free magic is broken.
12780 (pupa_free): If the first free header is not free actually, set
12783 * kern/main.c (pupa_load_normal_mode): Just load the module
12785 (pupa_main): Don't print the message
12786 "Entering into rescue mode..." here.
12788 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
12790 (pupa_rescue_cmd_initrd): Likewise.
12791 (pupa_rescue_cmd_initrd): Likewise.
12793 * include/pupa/symbol.h (FUNCTION): Specify the type.
12794 (VARIABLE): Likewise.
12796 * include/pupa/err.h (pupa_err_t): Added
12797 PUPA_ERR_UNKNOWN_COMMAND.
12799 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
12800 (pupa_dl_get_prefix): Likewise.
12802 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
12803 Added _chain.mod and _linux.mod instead of chain.mod and
12805 (chain_mod_SOURCES): Renamed to ...
12806 (_chain_mod_SOURCES): ... this.
12807 (chain_mod_CFLAGS): Renamed to ...
12808 (_chain_mod_CFLAGS): ... this.
12809 (linux_mod_SOURCES): Renamed to ...
12810 (_linux_mod_SOURCES): ... this.
12811 (linux_mod_CFLAGS): Renamed to ...
12812 (_linux_mod_CFLAGS): ... this.
12813 (normal_mod_SOURCES): New variable.
12814 (normal_mod_CFLAGS): Likewise.
12815 (normal_mod_ASFLAGS): Likewise.
12817 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
12819 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
12822 * kern/dl.c (pupa_dl_ref): Refer depending modules
12824 (pupa_dl_unref): Unrefer depending modules recursively.
12825 Don't call pupa_dl_unload implicitly, because PUPA can crash if
12826 a module is unloaded before one depending on that module is
12828 (pupa_dl_unload): Unload depending modules explicitly,
12831 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
12833 * include/pupa/i386/pc/linux.h: New file.
12834 * loader/i386/pc/linux.c: Likewise.
12836 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
12838 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
12839 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
12840 of PUPA_CHAINLOADER_BOOT_SECTOR.
12842 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
12843 (pupa_linux_prot_size): New variable.
12844 (pupa_linux_tmp_addr): Likewise.
12845 (pupa_linux_real_addr): Likewise.
12846 (pupa_linux_boot_zimage): New function.
12847 (pupa_linux_boot_bzimage): Likewise.
12849 * kern/i386/pc/init.c (struct mem_region): New structure.
12850 (MAX_REGIONS): New macro.
12851 (mem_regions): New variable.
12852 (num_regions): Likewise.
12853 (pupa_os_area_addr): Likewise.
12854 (pupa_os_area_size): Likewise.
12855 (pupa_lower_mem): Likewise.
12856 (pupa_upper_mem): Likewise.
12857 (add_mem_region): New function.
12858 (compact_mem_regions): Likewise.
12859 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
12860 the size of the conventional memory and that of so-called upper
12861 memory (before the first memory hole).
12862 Instead of adding each found region to free memory, use
12863 add_mem_region and add them after removing overlaps.
12864 Also, add only 1/4 of the upper memory to free memory. The rest
12865 is used for loading OS images. Maybe this is ad hoc, but this
12866 makes it much easier to relocate OS images when booting.
12868 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
12869 (pupa_enter_rescue_mode): Don't register initrd and module.
12871 * kern/mm.c: Include pupa/dl.h.
12873 * kern/main.c: Include pupa/file.h and pupa/device.h.
12875 * kern/loader.c (pupa_loader_load_module_func): Removed.
12876 (pupa_loader_load_module): Likewise.
12878 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
12881 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
12882 (pupa_linux_tmp_addr): Likewise.
12883 (pupa_linux_real_addr): Likewise.
12884 (pupa_linux_boot_zimage): Likewise.
12885 (pupa_linux_boot_bzimage): Likewise.
12887 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
12888 (pupa_upper_mem): Likewise.
12889 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
12890 module is too dangerous.
12892 * include/pupa/loader.h (pupa_os_area_addr): Declared.
12893 (pupa_os_area_size): Likewise.
12894 (pupa_loader_set): Remove the first argument. Loader doesn't
12895 manage modules or initrd any longer.
12896 (pupa_loader_load_module): Removed.
12898 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
12899 (linux_mod_SOURCES): New variable.
12900 (linux_mod_CFLAGS): Likewise.
12902 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
12904 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
12905 the length of a blocklist correctly.
12907 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
12908 Use ioctl only if the OS file is a block device.
12909 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
12910 not very useful for normal files.
12912 * kern/main.c (pupa_set_root_dev): New function.
12913 (pupa_load_normal_mode): Likewise.
12914 (pupa_main): Call those above.
12916 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
12919 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
12921 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12923 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
12924 (setup): Configure the installed partition information and the
12927 * loader/i386/pc/chainloader.c (my_mod): New variable.
12928 (pupa_chainloader_unload): New function.
12929 (pupa_rescue_cmd_chainloader): Refer itself.
12930 (PUPA_MOD_INIT): Save its own module in MY_MOD.
12932 * kern/i386/pc/startup.S (install_partition): Removed.
12933 (version_string): Likewise.
12934 (config_file): Likewise.
12935 (pupa_install_dos_part): New variable.
12936 (pupa_install_bsd_part): Likewise.
12937 (pupa_prefix): Likewise.
12938 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
12940 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
12942 (make_install_device): New function.
12943 (pupa_machine_init): Set the dl prefix.
12945 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
12946 (buf): Renamed to ...
12947 (linebuf): ... this.
12948 (pupa_rescue_cmd_prefix): New function.
12949 (pupa_rescue_cmd_insmod): Likewise.
12950 (pupa_rescue_cmd_rmmod): Likewise.
12951 (pupa_rescue_cmd_lsmod): Likewise.
12952 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
12955 * kern/mm.c (pupa_memalign): If failed even after invalidating
12956 disk caches, unload unneeded modules and retry.
12958 * kern/misc.c (pupa_memmove): New function.
12959 (pupa_memcpy): Removed.
12960 (pupa_strcpy): New function.
12961 (pupa_itoa): Made static.
12963 * kern/dl.c (pupa_dl_iterate): New function.
12964 (pupa_dl_ref): Likewise.
12965 (pupa_dl_unref): Likewise.
12966 (pupa_dl_unload): Return if succeeded or not.
12967 (pupa_dl_unload_unneeded): New function.
12968 (pupa_dl_unload_all): Likewise.
12969 (pupa_dl_init): Renamed to ...
12970 (pupa_dl_set_prefix): ... this.
12971 (pupa_dl_get_prefix): New function.
12973 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
12974 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
12975 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12976 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12977 (pupa_install_dos_part): Declared.
12978 (pupa_install_bsd_part): Likewise.
12979 (pupa_prefix): Likewise.
12980 (pupa_boot_drive): Likewise.
12982 * include/pupa/types.h: Fix a typo.
12984 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
12986 (pupa_memmove): Declared.
12987 (pupa_strcpy): Likewise.
12989 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
12990 pupa_mod_init takes one argument, its own module.
12991 (pupa_dl_unload_unneeded): Declared.
12992 (pupa_dl_unload_all): Likewise.
12993 (pupa_dl_ref): Likewise.
12994 (pupa_dl_unref): Likewise.
12995 (pupa_dl_iterate): Likewise.
12996 (pupa_dl_init): Renamed to ...
12997 (pupa_dl_set_prefix): ... this.
12998 (pupa_dl_get_prefix): Declared.
13000 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
13001 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
13003 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
13004 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
13006 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
13007 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
13009 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13011 * util/i386/pc/pupa-setup.c (setup): Define the internal
13012 function find_first_partition_start at the top level, because GCC
13013 3.0.x cannot compile internal functions in deeper scopes
13015 (find_root_device): Use lstat instead of stat.
13016 Don't follow symbolic links.
13017 Fix the path-constructing code.
13019 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13020 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13021 by a BLKGETSIZE ioctl first, because block devices don't fill
13022 the member st_mode of the structure stat on Linux.
13023 [__linux__] (linux_find_partition): Use a temporary buffer
13024 REAL_DEV for the working space. Copy it to DEV before returning.
13025 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13026 buffer cache consistent.
13027 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13028 strncmp. The previous value was merely wrong.
13029 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13031 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13032 FAT size is 12. The previous value was merely wrong.
13034 * kern/main.c (pupa_main): Don't split the starting message from
13037 * kern/term.c (pupa_putchar): Put CR after LF instead of before
13038 LF, because BIOS goes crazy about character attributes in this
13041 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13043 * include/i386/pc/util/biosdisk.h: New file.
13044 * util/i386/pc/biosdisk.c: Likewise.
13045 * util/i386/pc/pupa-setup.c: Likewise.
13047 * Makefile.in (INCLUDE_DISTFILES): Added
13048 include/pupa/i386/pc/util/biosdisk.h.
13049 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13050 directory util/i386/pc.
13051 (install-local): Added a rule for sbin_UTILITIES.
13052 (uninstall): Likewise.
13054 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13056 * util/misc.c (xrealloc): New function.
13057 (pupa_malloc): Likewise.
13058 (pupa_free): Likewise.
13059 (pupa_realloc): Likewise.
13060 (pupa_stop): Likewise.
13061 (pupa_putchar): Likewise.
13063 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13065 * include/pupa/util/misc.h (xrealloc): Declared.
13067 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13069 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13070 (PUPA_BOOT_MACHINE_BPB_END): ... this.
13072 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13073 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13075 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13076 way should be implemented.
13077 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13079 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13080 the size of NAME for safety.
13081 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13084 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13085 (pupa_setup_SOURCES): Likewise.
13087 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13089 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13091 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13092 bunch of pushl's from pusha, because this destroys the return
13095 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13097 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13098 This means that any missing prototypes could be fatal. Also, you
13099 must take care when writing assembly code. See the comments at
13100 the beginning of startup.S, for more details.
13102 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13103 compilation mechanism.
13104 (pupa_chainloader_real_boot): Likewise.
13105 (pupa_biosdisk_rw_int13_extensions): Likewise.
13106 (pupa_biosdisk_rw_standard): Likewise.
13107 (pupa_biosdisk_check_int13_extensions): Likewise.
13108 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13109 (pupa_biosdisk_get_diskinfo_standard): Likewise.
13110 (pupa_get_memsize): Likewise.
13111 (pupa_get_mmap_entry): Likewise.
13112 (pupa_console_putchar): Likewise.
13113 (pupa_console_setcursor): Likewise.
13114 (pupa_getrtsecs): Use pushl instead of push.
13116 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13117 memory instead of the stack for a mmap entry, because some
13118 BIOSes may ignore the maximum size and overflow.
13120 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13122 * genmk.rb (PModule#rule): Compile automatically generated
13123 sources with module-specific CFLAGS as well as other sources.
13125 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13127 * configure.ac: Check ld.
13128 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13129 respectively, before checking endianness and sizes.
13131 * Makefile.in (LD): New variable.
13133 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13135 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13137 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13139 * Changelog: New file.