1 2008-09-25 Robert Millan <rmh@aybabtu.com>
3 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4 `util/i386/get_disk_name.c'.
5 * conf/i386-efi.rmk: Likewise.
6 * conf/x86_64-efi.rmk: Likewise.
7 * conf/i386-coreboot.rmk: Likewise.
8 * conf/i386-ieee1275.rmk: Likewise.
9 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
10 `util/ieee1275/get_disk_name.c'.
11 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
12 * util/ieee1275/get_disk_name.c: Remove file.
13 * util/i386/get_disk_name.c: Remove file.
14 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
15 "hd%d" for device.map entries, rather than using
16 grub_util_get_disk_name().
18 2008-09-24 Carles Pina i Estany <carles@pina.cat>
20 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
22 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
24 2008-09-24 Carles Pina i Estany <carles@pina.cat>
26 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
28 (GRUB_TERM_PPAGE): Changed to 0x4900.
30 2008-09-24 Robert Millan <rmh@aybabtu.com>
32 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
33 macros (they were i386-pc specific).
34 * include/grub/sparc64/ieee1275/console.h: Likewise.
35 * include/grub/efi/console.h: Likewise.
37 2008-09-22 Bean <bean123ch@gmail.com>
39 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
40 resident and in attribute list.
42 * include/grub/ntfs.h (BMP_LEN): Removed.
44 2008-09-22 Bean <bean123ch@gmail.com>
46 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
47 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
49 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
50 error occurs, as grub_disk_open will call grub_disk_close, which will
53 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
55 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
56 (AC_PREREQ): Bumped to 2.59.
57 (AC_TRY_COMPILE): Replace obsolete macro with ...
58 (AC_COMPILE_IFELSE): ... this.
59 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
60 (AC_LINK_IFELSE): ... this.
62 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
64 * autogen.sh: Add a call to `gendistlist.sh'.
66 2008-09-19 Christian Franke <franke@computer.org>
68 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
69 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
70 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
71 Export __enable_execute_stack() to modules.
72 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
75 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
77 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
80 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
82 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
83 #include <grub/util/hostdisk.h>.
85 2008-09-08 Robert Millan <rmh@aybabtu.com>
87 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
88 segments when their filesz is zero (grub_file_read() interprets
89 zero-size as "read until EOF", which results in memory corruption).
90 Use `lowest_segment' rather than 0 for calculating the current
93 2008-09-08 Robert Millan <rmh@aybabtu.com>
95 * util/hostdisk.c (open_device): Replace a grub_util_info() call
96 with grub_dprintf("hostdisk", ...), as it was so verbose that it
97 clobbered useful information.
99 2008-09-08 Robert Millan <rmh@aybabtu.com>
101 * include/grub/util/biosdisk.h: Move to ...
102 * include/grub/util/hostdisk.h: ... here. Update all users.
103 * util/biosdisk.c: Move to ...
104 * util/hostdisk.c: ... here. Update all users.
106 2008-09-07 Robert Millan <rmh@aybabtu.com>
108 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
110 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
111 and length can be stored directly in the `mbi->mmap_addr' and
112 `mbi->mmap_length' struct fields.
114 2008-09-07 Robert Millan <rmh@aybabtu.com>
116 * conf/i386.rmk: New file. Provides declaration for building
118 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
119 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
121 Include `conf/i386.mk'.
122 * conf/i386-efi.rmk: Likewise.
123 * conf/x86_64-efi.rmk: Likewise.
124 * conf/i386-coreboot.rmk: Likewise.
125 * conf/i386-ieee1275.rmk: Likewise.
127 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
129 Based on patch created by Colin D Bennett <colin@gibibit.com>.
130 Adds optimization support for BGR based modes.
132 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
133 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
134 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
135 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
136 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
137 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
138 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
139 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
140 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
141 (grub_video_i386_vbeblit_index_index): Likewise.
142 (grub_video_i386_vbeblit_replace_directN): Added.
143 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
144 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
145 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
146 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
147 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
148 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
149 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
150 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
151 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
152 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
153 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
154 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
155 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
157 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
158 (grub_video_i386_vbefill_R8G8B8): Likewise.
159 (grub_video_i386_vbefill_index): Likewise.
160 (grub_video_i386_vbefill_direct32): Added.
161 (grub_video_i386_vbefill_direct24): Likewise.
162 (grub_video_i386_vbefill_direct16): Likewise.
163 (grub_video_i386_vbefill_direct8): Likewise.
165 * include/grub/video.h (grub_video_blit_format): Removed
166 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
167 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
168 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
169 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
170 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
172 * video/video.c (grub_video_get_blit_format): Updated to use new
173 blit formats. Added handling for 16 bit color modes.
175 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
177 (common_blitter): Updated to use new blitters.
179 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
181 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
182 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
183 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
184 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
185 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
186 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
187 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
188 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
189 (grub_video_i386_vbeblit_index_index): Likewise.
190 (grub_video_i386_vbeblit_replace_directN): Added.
191 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
192 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
193 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
194 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
195 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
196 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
197 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
198 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
199 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
200 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
201 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
202 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
203 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
205 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
206 (grub_video_i386_vbefill_R8G8B8): Likewise.
207 (grub_video_i386_vbefill_index): Likewise.
208 (grub_video_i386_vbefill_direct32): Added.
209 (grub_video_i386_vbefill_direct24): Likewise.
210 (grub_video_i386_vbefill_direct16): Likewise.
211 (grub_video_i386_vbefill_direct8): Likewise.
213 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
216 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
219 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
222 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
225 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
227 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
230 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
232 * fs/iso9660.c (grub_iso9660_date): New structure.
233 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
234 (grub_iso9660_uuid): New function.
236 2008-09-05 Bean <bean123ch@gmail.com>
238 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
240 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
241 insensitive bit for names in Win32 and Win32 & DOS namespace.
243 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
245 * include/grub/types.h (LONG_MAX): Likewise.
247 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
249 * util/getroot.c: Include <config.h>.
250 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
251 add support for /dev/md/N devices and handle LVM double dash escaping.
253 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
255 * config.guess: Update to latest version from config git.
256 * config.sub: Likewise.
258 2008-09-03 Robert Millan <rmh@aybabtu.com>
260 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
261 `disk->total_sectors'.
263 2008-09-01 Colin D Bennett <colin@gibibit.com>
265 * include/grub/normal.h: Fixed incorrect comment for
266 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
268 2008-09-01 Colin D Bennett <colin@gibibit.com>
270 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
273 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
274 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
275 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
276 (GRUB_VBE_MODEATTR_COLOR): Likewise.
277 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
278 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
279 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
280 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
281 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
282 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
283 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
284 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
285 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
286 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
287 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
288 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
289 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
290 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
291 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
293 2008-08-31 Robert Millan <rmh@aybabtu.com>
295 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
297 (grub_multiboot): Fix a few warnings.
299 2008-08-31 Robert Millan <rmh@aybabtu.com>
301 * loader/i386/pc/multiboot.c: Update comment not to say that
302 boot_device support is unimplemented.
304 2008-08-31 Robert Millan <rmh@aybabtu.com>
306 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
307 or memory map support are unimplemented.
309 2008-08-31 Colin D Bennett <colin@gibibit.com>
311 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
313 2008-08-31 Colin D Bennett <colin@gibibit.com>
315 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
316 total video memory in 'vbeinfo' output; show color format details for
319 2008-08-30 Pavel Roskin <proski@gnu.org>
321 * util/genmoddep.c: Remove for real this time.
322 * DISTLIST: Remove util/genmoddep.c.
324 2008-08-30 Robert Millan <rmh@aybabtu.com>
326 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
327 as required by Multiboot spec (it was already 4-byte aligned, but
330 2008-08-29 Pavel Roskin <proski@gnu.org>
332 * kern/powerpc/ieee1275/crt0.S: Rename to ...
333 * kern/powerpc/ieee1275/startup.S: ... this.
334 * conf/powerpc-ieee1275.rmk: Adjust for the above.
335 * DISTLIST: Likewise.
337 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
338 grub/cpu/kernel.h. Add start label for consistency with other
339 platforms. Add grub_prefix immediately after start. Add jump
340 to the code after grub_prefix.
341 * include/grub/powerpc/kernel.h: Provide valid values for
342 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
344 2008-08-29 Bean <bean123ch@gmail.com>
346 * configure.ac: Change host_os to cygwin for mingw.
347 (asprintf): New check for function.
349 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
350 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
352 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
353 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
354 sync, sleep and grub_util_get_disk_size for mingw.
356 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
357 to get size in mingw.
358 (open_device): Use flag O_BINARY if it's defined.
359 (find_root_device): Add dummy code for mingw.
361 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
362 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
363 (get_scsi_disk_name): Return 0 for mingw.
365 * util/hostfs.c: #include <grub/util/misc.h>.
366 (grub_hostfs_open): Use "rb" flag to open file, use
367 grub_util_get_disk_size to get disk size for mingw.
369 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
370 (asprintf): New function if HAVE_ASPRINTF is not set.
371 (sync): New function for mingw.
373 (grub_util_get_disk_size): Likewise.
375 2008-08-28 Pavel Roskin <proski@gnu.org>
377 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
380 2008-08-28 Robert Millan <rmh@aybabtu.com>
382 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
384 2008-08-28 Robert Millan <rmh@aybabtu.com>
386 Change find_grub_drive() syntax so it doesn't prevent it from
387 detecting NULL names as errors.
389 * util/biosdisk.c (find_grub_drive): Move free slot search code
391 (find_free_slot): ... to here.
392 (read_device_map): Use find_free_slot() to search for free slots.
394 2008-08-27 Marco Gerards <marco@gnu.org>
396 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
397 (scsi_mod_SOURCES): New variable.
398 (scsi_mod_CFLAGS): Likewise
399 (scsi_mod_LDFLAGS): Likewise.
401 * disk/scsi.c: New file.
403 * include/grub/scsi.h: Likewise.
405 * include/grub/scsicmd.h: Likewise.
407 * disk/ata.c: Include <grub/scsi.h>.
408 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
410 (grub_ata_iterate): Skip ATAPI devices.
411 (grub_ata_open): Only handle ATAPI devices.
412 (struct grub_atapi_read): Removed.
413 (grub_atapi_readsector): Likewise.
414 (grub_ata_read): No longer handle ATAPI devices.
415 (grub_ata_write): Likewise.
416 (grub_atapi_iterate): New function.
417 (grub_atapi_read): Likewise.
418 (grub_atapi_write): Likewise.
419 (grub_atapi_open): Likewise.
420 (grub_atapi_close): Likewise.
421 (grub_atapi_dev): New variable.
422 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
423 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
425 * include/grub/disk.h (enum grub_disk_dev_id): Add
426 `GRUB_DISK_DEVICE_SCSI_ID'.
428 2008-08-26 Robert Millan <rmh@aybabtu.com>
430 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
431 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
434 2008-08-23 Bean <bean123ch@gmail.com>
436 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
437 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
438 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
439 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
441 (raid5rec_mod_SOURCES): New macro.
442 (raid5rec_mod_CFLAGS): Likewise.
443 (raid5rec_mod_LDFLAGS): Likewise.
444 (raid6rec_mod_SOURCES): Likewise.
445 (raid6rec_mod_CFLAGS): Likewise.
446 (raid6rec_mod_LDFLAGS): Likewise.
447 (mdraid_mod_SOURCES): Likewise.
448 (mdraid_mod_CFLAGS): Likewise.
449 (mdraid_mod_LDFLAGS): Likewise.
450 (dm_nv_mod_SOURCES): Likewise.
451 (dm_nv_mod_CFLAGS): Likewise.
452 (dm_nv_mod_LDFLAGS): Likewise.
454 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
455 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
456 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
458 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
459 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
461 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
463 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
465 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
467 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
469 * disk/raid5_recover.c: New file.
471 * disk/raid6_recover.c: Likewise.
473 * disk/mdraid_linux.c: Likewise.
475 * disk/dmraid_nvidia.c: Likewise.
477 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
480 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
481 calculate the size of raid device.
482 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
483 different layout of raid5.
484 (grub_raid_scan_device): Remove code specific to mdraid.
485 (grub_raid_list): New variable.
486 (free_array): New function.
487 (grub_raid_register): Likewise.
488 (grub_raid_unregister): Likewise.
489 (grub_raid_rescan): Likewise.
490 (GRUB_MOD_INIT): Don't iterate device here.
491 (GRUB_MOD_FINI): Use free_array to release resource.
493 * include/grub/raid.h: Remove macro and structure specific to mdraid.
494 (grub_raid5_recover_func_t): New function variable type.
495 (grub_raid6_recover_func_t): Likewise.
496 (grub_raid5_recover_func): New variable.
497 (grub_raid6_recover_func): Likewise.
498 (grub_raid_register): New function.
499 (grub_raid_unregister): Likewise.
500 (grub_raid_rescan): Likewise.
501 (grub_raid_block_xor): Likewise.
503 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
504 (CMD_CRC): New macro.
506 (read_file): Handle device as well as file.
507 (cmd_crc): New function.
508 (fstest): Handle multiple disks.
509 (options): Remove part, raw and long, add root and diskcount.
510 (usage): Add crc, remove -p, -r, -l, add -r and -c.
511 (main): Find the first non option entry and ignore subsequence options,
512 add handling for the new options, support multiple disks.
514 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
516 2008-08-23 Bean <bean123ch@gmail.com>
518 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
520 * genfslist.sh: Ignore kernel.mod.
522 * genpartmaplist.sh: Likewise.
524 2008-08-23 Robert Millan <rmh@aybabtu.com>
526 * util/getroot.c (find_root_device): Skip anything that starts with
527 a dot, not just directories. This avoids things like /dev/.tmp.md0.
529 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
531 * util/update-grub.in (GRUB_GFXMODE): Export variable.
532 * util/grub.d/00_header.in: Allow the administrator to change default
533 gfxmode via ${GRUB_GFXMODE}.
535 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
537 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
539 2008-08-21 Robert Millan <rmh@aybabtu.com>
541 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
543 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
544 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
546 2008-08-20 Carles Pina i Estany <carles@pina.cat>
548 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
549 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
551 2008-08-19 Robert Millan <rmh@aybabtu.com>
553 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
554 (struct grub_virtual_screen): Remove `cursor_color'.
555 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
557 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
559 2008-08-18 Robert Millan <rmh@aybabtu.com>
561 Unify (identical) linux_normal.c files.
562 * loader/i386/efi/linux_normal.c: Move from here ...
563 * loader/linux_normal.c: ... to here. Update all users.
564 * loader/i386/pc/linux_normal.c: Delete. Update all users.
565 * loader/i386/ieee1275/linux_normal.c: Likewise.
567 2008-08-18 Robert Millan <rmh@aybabtu.com>
569 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
570 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
571 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
572 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
573 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
575 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
576 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
577 (GRUB_LINUX_CL_END_OFFSET): ... to here.
578 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
579 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
580 (GRUB_EFI_CL_END_OFFSET): Rename to ...
581 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
582 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
583 Initialize `params->video_cursor_x' and `params->video_cursor_y'
584 portably using grub_getxy().
585 Replace `-EFI' with `-bzImage' in boot message.
587 2008-08-17 Robert Millan <rmh@aybabtu.com>
589 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
591 2008-08-17 Robert Millan <rmh@aybabtu.com>
593 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
595 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
596 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
597 (grub_machine_mmap_iterate): New function declaration.
598 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
600 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
603 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
604 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
605 Move e820 parsing from here ...
606 * kern/i386/pc/mmap.c: New file.
607 (grub_machine_mmap_iterate): ... to here.
609 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
610 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
611 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
612 (grub_available_iterate): Redeclare to return `void', and redeclare
613 its hook to use grub_uint64_t as addr and size parameters, and rename
615 (grub_machine_mmap_iterate): ... this. Update all users.
617 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
618 to make it more readable. Rename to ...
619 (grub_machine_mmap_iterate): ... this.
621 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
622 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
623 (grub_multiboot): Allocate an extra region after the payload, and fill
624 it with a Multiboot memory map. Adjust a.out loader to calculate size
625 with the extra space.
626 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
627 with the extra space.
629 2008-08-17 Carles Pina i Estany <carles@pina.cat>
631 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
633 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
635 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
636 mdate-sh to the list `find' searches for.
637 * DISTLIST: Regenerated.
639 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
641 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
642 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
643 genmoddep.awk, gensymlist.sh.in.
644 (DISTDIRS): Add bus, docs, hook, lib.
645 * DISTLIST: Regenerated.
646 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
648 2008-08-16 Robert Millan <rmh@aybabtu.com>
650 * disk/raid.c (grub_raid_init): Handle/report errors set by
651 grub_device_iterate().
652 * disk/lvm.c (grub_lvm_init): Likewise.
654 2008-08-15 Bean <bean123ch@gmail.com>
656 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
658 (datetime_mod_SOURCES): New macro.
659 (datetime_mod_CFLAGS): Likewise.
660 (datetime_mod_LDFLAGS): Likewise.
661 (date_mod_SOURCES): Likewise.
662 (date_mod_CFLAGS): Likewise.
663 (date_mod_LDFLAGS): Likewise.
664 (datehook_mod_SOURCES): Likewise.
665 (datehook_mod_CFLAGS): Likewise.
666 (datehook_mod_LDFLAGS): Likewise.
668 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
670 (datetime_mod_SOURCES): New macro.
671 (datetime_mod_CFLAGS): Likewise.
672 (datetime_mod_LDFLAGS): Likewise.
673 (date_mod_SOURCES): Likewise.
674 (date_mod_CFLAGS): Likewise.
675 (date_mod_LDFLAGS): Likewise.
676 (datehook_mod_SOURCES): Likewise.
677 (datehook_mod_CFLAGS): Likewise.
678 (datehook_mod_LDFLAGS): Likewise.
680 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
682 (datetime_mod_SOURCES): New macro.
683 (datetime_mod_CFLAGS): Likewise.
684 (datetime_mod_LDFLAGS): Likewise.
685 (date_mod_SOURCES): Likewise.
686 (date_mod_CFLAGS): Likewise.
687 (date_mod_LDFLAGS): Likewise.
688 (datehook_mod_SOURCES): Likewise.
689 (datehook_mod_CFLAGS): Likewise.
690 (datehook_mod_LDFLAGS): Likewise.
692 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
694 (datetime_mod_SOURCES): New macro.
695 (datetime_mod_CFLAGS): Likewise.
696 (datetime_mod_LDFLAGS): Likewise.
697 (date_mod_SOURCES): Likewise.
698 (date_mod_CFLAGS): Likewise.
699 (date_mod_LDFLAGS): Likewise.
700 (datehook_mod_SOURCES): Likewise.
701 (datehook_mod_CFLAGS): Likewise.
702 (datehook_mod_LDFLAGS): Likewise.
704 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
706 (datetime_mod_SOURCES): New macro.
707 (datetime_mod_CFLAGS): Likewise.
708 (datetime_mod_LDFLAGS): Likewise.
709 (date_mod_SOURCES): Likewise.
710 (date_mod_CFLAGS): Likewise.
711 (date_mod_LDFLAGS): Likewise.
712 (datehook_mod_SOURCES): Likewise.
713 (datehook_mod_CFLAGS): Likewise.
714 (datehook_mod_LDFLAGS): Likewise.
716 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
718 * commands/date.c: New file.
720 * hook/datehook.c: Likewise.
722 * include/grub/lib/datetime.h: Likewise.
724 * include/grub/i386/cmos.h: Likewise.
726 * lib/datetime.c: Likewise.
728 * lib/i386/datetime.c: Likewise.
730 * lib/efi/datetime.c: Likewise.
732 2008-08-14 Robert Millan <rmh@aybabtu.com>
734 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
735 (grub_mkelfimage_SOURCES): New variable.
736 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
738 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
739 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
740 * conf/powerpc-ieee1275.rmk: Likewise.
741 * conf/i386-ieee1275.rmk: Likewise.
743 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
744 * kern/i386/coreboot/init.c: Likewise.
746 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
747 with `<grub/cpu/kernel.h>'.
748 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
750 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
751 * kern/i386/coreboot/startup.S: Likewise.
753 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
754 (GRUB_MOD_GAP): Remove.
755 * include/grub/powerpc/kernel.h: New file.
756 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
757 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
758 * include/grub/i386/kernel.h: New file.
759 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
760 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
761 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
763 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
765 Use --directory when invoking grub_mkimage.
767 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
768 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
769 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
770 and GRUB_KERNEL_CPU_PREFIX.
772 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
774 * include/grub/err.h (grub_err_printf): New function prototype.
775 * util/misc.c (grub_err_printf): New function.
776 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
778 * kern/err.c (grub_print_error): Use grub_err_printf.
780 2008-08-13 Robert Millan <rmh@aybabtu.com>
782 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
784 2008-08-13 Robert Millan <rmh@aybabtu.com>
786 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
789 2008-08-12 Robert Millan <rmh@aybabtu.com>
791 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
792 of the relocation code from here ...
793 (grub_multiboot): ... to here.
794 (forward_relocator, backward_relocator): Move from here ...
795 * kern/i386/loader.S (grub_multiboot_forward_relocator)
796 (grub_multiboot_backward_relocator): ... to here.
797 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
798 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
799 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
800 (grub_multiboot_forward_relocator_end)
801 (grub_multiboot_backward_relocator)
802 (grub_multiboot_backward_relocator_end): New variables.
804 2008-08-12 Bean <bean123ch@gmail.com>
806 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
808 2008-08-11 Robert Millan <rmh@aybabtu.com>
810 * kern/i386/linuxbios/startup.S: Move from here ...
811 * kern/i386/coreboot/startup.S: ... to here.
813 * kern/i386/linuxbios/init.c: Move from here ...
814 * kern/i386/coreboot/init.c: ... to here.
816 * kern/i386/linuxbios/table.c: Move from here ...
817 * kern/i386/coreboot/mmap.c: ... to here.
819 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
821 2008-08-11 Robert Millan <rmh@aybabtu.com>
823 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
824 errors. Leave it to the upper layer to handle them.
826 2008-08-09 Christian Franke <franke@computer.org>
828 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
829 * conf/common.rmk: Install `grub-pe2elf' only if requested.
830 Install `grub.d/10_windows' only on Cygwin.
831 * configure.ac: Add subst of `target_os'.
832 Check `target_os' also before setting TARGET_OBJ2ELF.
833 Add `--enable-grub-pe2elf'.
835 2008-08-08 Robert Millan <rmh@aybabtu.com>
837 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
838 (grub_last_time): Change type to grub_uint64_t.
839 (grub_disk_open): Migrate code from to using grub_get_time_ms().
840 (grub_disk_close): Likewise.
842 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
843 (run_menu): Migrate code from to using grub_get_time_ms().
845 * util/misc.c (grub_get_time_ms): New function.
847 2008-08-08 Marco Gerards <marco@gnu.org>
849 * disk/ata.c (grub_ata_regget): Change return type to
851 (grub_ata_regget2): Likewise.
852 (grub_ata_wait_status): New function.
853 (grub_ata_wait_busy): Removed function, updated all users to use
854 `grub_ata_wait_status'.
855 (grub_ata_wait_drq): Likewise.
856 (grub_ata_cmd): New function.
857 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
859 (grub_ata_pio_write): Add error handling.
860 (grub_atapi_identify): Likewise.
861 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
863 (grub_ata_identify): Use `grub_ata_cmd' and improve error
864 handling. Actually use the detected registers. Reorder the
865 detection logic such that it is easier to read.
866 (grub_ata_pciinit): Do not assign the same ID to each controller.
867 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
869 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
871 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
873 2008-08-08 Marco Gerards <marco@gnu.org>
877 2008-08-07 Bean <bean123ch@gmail.com>
879 * include/grub/x86_64/pci.h: New file.
881 2008-08-07 Christian Franke <franke@computer.org>
883 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
884 (TIMER2_GATE): Likewise.
885 (grub_pit_wait): Add enable/disable of the timer2 gate
886 bit of port 0x61. This fixes a possible infinite loop.
888 2008-08-07 Bean <bean123ch@gmail.com>
890 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
891 kern/i386/tsc.c and kern/i386/pit.c.
893 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
896 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
899 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
901 2008-08-07 Bean <bean123ch@gmail.com>
903 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
905 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
907 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
908 multiple inclusion. Add #include <grub/types.h>.
910 2008-08-06 Christian Franke <franke@computer.org>
912 * conf/common.rmk: Build and install `10_windows'.
913 * util/grub.d/10_windows.in: New script.
915 2008-08-06 Pavel Roskin <proski@gnu.org>
917 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
919 2008-08-06 Robert Millan <rmh@aybabtu.com>
921 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
922 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
924 2008-08-06 Bean <bean123ch@gmail.com>
926 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
927 (grub_pxefs_fs_int): Remove dummy definition.
928 (grub_pxefs_open): Use data->block_size to store the current block
930 (grub_pxefs_read): Use block size stored in data->block_size. As the
931 value of grub_pxe_blksize can be changed after the file is opened.
933 2008-08-06 Bean <bean123ch@gmail.com>
935 * fs/i386/pc/pxe.c (curr_file): new variable.
936 (grub_pxefs_open): Simply the handling of pxe file system. Don't
937 require the dummy internal file system anymore.
938 (grub_pxefs_read): Removed.
939 (grub_pxefs_close): Likewise.
940 (grub_pxefs_fs_int): Likewise.
941 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
942 connection when we switch file.
943 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
945 2008-08-06 Robert Millan <rmh@aybabtu.com>
947 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
949 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
950 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
952 * kern/i386/halt.c: New file.
953 * kern/i386/reboot.c: Likewise.
954 * include/grub/i386/reboot.h: Likewise.
955 * include/grub/i386/halt.h: Likewise.
957 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
958 Include `<grub/cpu/halt.h>'.
959 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
960 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
962 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
963 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
964 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
965 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
966 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
967 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
969 * include/grub/i386/at_keyboard.h: ... to here.
971 2008-08-05 Robert Millan <rmh@aybabtu.com>
973 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
974 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
975 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
976 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
977 `kern/generic/millisleep.c'.
979 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
980 instead of grub_get_rtc().
981 (grub_tsc_init): Initialize `tsc_boot_time'.
983 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
984 (grub_machine_init): Use grub_tsc_init() rather than
985 installing an RTC-based handler via grub_install_get_time_ms().
987 * kern/i386/pit.c: New file.
988 * include/grub/i386/pit.h: Likewise.
990 2008-08-05 Bean <bean123ch@gmail.com>
992 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
994 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
995 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
996 (pxe_mod_SOURCES): New macro.
997 (pxe_mod_CFLAGS): Likewise.
998 (pxe_mod_LDFLAGS): Likewise.
999 (pxecmd_mod_SOURCES): Likewise.
1000 (pxecmd_mod_CFLAGS): Likewise.
1001 (pxecmd_mod_LDFLAGS): Likewise.
1003 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
1004 (grub_pxe_call): Likewise.
1006 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
1008 * commands/i386/pc/pxecmd.c: New file.
1010 * fs/i386/pc/pxe.c: Likewise.
1012 * include/grub/i386/pc/pxe.h: Likewise.
1014 2008-08-05 Bean <bean123ch@gmail.com>
1016 * util/console.c (grub_console_cur_color): New variable.
1017 (grub_console_standard_color): Likewise.
1018 (grub_console_normal_color): Likewise.
1019 (grub_console_highlight_color): Likewise.
1020 (color_map): Likewise.
1021 (use_color): Likewise.
1022 (NUM_COLORS): New macro.
1023 (grub_ncurses_setcolorstate): Handle color properly.
1024 (grub_ncurses_setcolor): Don't change color here, just remember the
1025 settings, color will be set in grub_ncurses_setcolorstate.
1026 (grub_ncurses_getcolor): New function.
1027 (grub_ncurses_init): Initialize color pairs.
1028 (grub_ncurses_term): New member grub_ncurses_getcolor.
1030 2008-08-05 Colin D Bennett <colin@gibibit.com>
1032 High resolution timer support. Implemented for x86 CPUs using TSC.
1033 Extracted generic grub_millisleep() so it's linked in only as needed.
1034 This requires a Pentium compatible CPU; if the RDTSC instruction is
1035 not supported, then it falls back on the generic grub_get_time_ms()
1036 implementation that uses the machine's RTC.
1038 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
1039 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
1040 `kern/generic/millisleep.c'.
1042 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
1043 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
1045 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
1046 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
1048 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1050 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1051 `kern/generic/millisleep.c'.
1053 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1055 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
1057 * kern/generic/rtc_get_time_ms.c: New file.
1059 * kern/generic/millisleep.c: New file.
1061 * kern/misc.c: Don't include
1062 <kern/time.h> anymore.
1063 (grub_millisleep_generic): Removed.
1065 * commands/sleep.c (grub_interruptible_millisleep): Uses
1066 grub_get_time_ms() instead of grub_get_rtc().
1068 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
1070 (grub_cpu_is_cpuid_supported): New inline function.
1071 (grub_cpu_is_tsc_supported): New inline function.
1072 (grub_tsc_init): New function prototype.
1073 (grub_tsc_get_time_ms): New function prototype.
1075 * kern/i386/tsc.c (grub_get_time_ms): New file.
1077 * include/grub/time.h: Include <grub/types.h.
1078 (grub_millisleep_generic): Removed.
1079 (grub_get_time_ms): New prototype.
1080 (grub_install_get_time_ms): New prototype.
1081 (grub_rtc_get_time_ms): New prototype.
1083 * kern/time.c (grub_get_time_ms): New function.
1084 (grub_install_get_time_ms): New function.
1086 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
1087 <grub/time.h> anymore.
1088 (grub_millisleep): Removed.
1089 (grub_machine_init): Call grub_tsc_init.
1091 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
1092 get_time_ms() implementation.
1094 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
1095 (ieee1275_get_time_ms): New function.
1096 (grub_machine_init): Install get_time_ms() implementation.
1098 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
1099 (grub_machine_init): Call grub_tsc_init().
1100 (grub_millisleep): Removed.
1102 * kern/ieee1275/init.c (grub_millisleep): Removed.
1103 (grub_machine_init): Install ieee1275_get_time_ms()
1105 (ieee1275_get_time_ms): New function.
1106 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
1109 2008-08-05 Marco Gerards <marco@gnu.org>
1111 * disk/ata.c: Include <grub/pci.h>.
1112 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
1113 (grub_ata_initialize): Rewritten.
1114 (grub_ata_device_initialize): New function.
1116 2008-08-04 Pavel Roskin <proski@gnu.org>
1118 * kern/main.c: Include grub/mm.h.
1120 2008-08-04 Robert Millan <rmh@aybabtu.com>
1122 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
1123 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
1124 corruption problem).
1126 2008-08-04 Robert Millan <rmh@aybabtu.com>
1128 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
1129 warnings introduced in my last commit.
1131 2008-08-03 Robert Millan <rmh@aybabtu.com>
1133 Make PCI available on all i386 architectures.
1135 * include/grub/i386/pc/pci.h: Move from here ...
1136 * include/grub/i386/pci.h: ... to here.
1138 * include/grub/i386/pc/pci.h: Remove.
1139 * include/grub/i386/efi/pci.h: Remove.
1140 * include/grub/x86_64/efi/pci.h: Remove.
1142 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
1145 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
1146 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
1147 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
1149 * conf/i386-ieee1275.rmk: Likewise.
1151 2008-08-03 Robert Millan <rmh@aybabtu.com>
1153 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
1154 (grub_console_setcursor): Make it possible to set cursor off.
1156 2008-08-03 Robert Millan <rmh@aybabtu.com>
1158 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
1159 of modules instead of assuming which platform provides what.
1160 * util/update-grub.in: Likewise.
1162 2008-08-03 Robert Millan <rmh@aybabtu.com>
1164 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
1165 instead of `grub_install_dos_part' to determine whether a drive needs
1166 to be prepended to prefix (`grub_install_dos_part' is not reliable,
1167 because it can be overridden when loading GRUB via Multiboot).
1169 2008-08-02 Robert Millan <rmh@aybabtu.com>
1171 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
1173 2008-08-02 Robert Millan <rmh@aybabtu.com>
1175 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
1176 of informational grub_dprintf() calls.
1178 2008-08-02 Robert Millan <rmh@aybabtu.com>
1180 * disk/memdisk.c (memdisk_size): Don't initialize.
1181 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
1183 * include/grub/i386/pc/kernel.h
1184 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
1185 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
1186 (grub_memdisk_image_size, grub_arch_memdisk_addr)
1187 (grub_arch_memdisk_size): Remove.
1189 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
1190 field (was only used to transfer a constant). Add `type' field to
1191 support multiple module types.
1192 (grub_module_iterate): New function.
1194 * kern/device.c (grub_device_open): Do not hide error messages
1195 when grub_disk_open() fails. Use grub_print_error() instead.
1197 * kern/i386/pc/init.c (grub_arch_modules_addr)
1198 (grub_arch_memdisk_size): Remove functions.
1199 (grub_arch_modules_addr): Return the module address in high memory
1200 (now that it isn't copied anymore).
1202 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
1203 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
1204 decompression routine (grub_total_module_size already includes that
1205 now). Don't copy modules back to low memory.
1207 * kern/main.c: Include `<grub/mm.h>'.
1208 (grub_load_modules): Split out (and use) ...
1209 (grub_module_iterate): ... this function, which iterates through
1210 module objects and runs a hook.
1211 Comment out grub_mm_init_region() call, as it would cause non-ELF
1212 modules to be overwritten.
1214 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
1215 the memdisk image in its own region, make it part of the module list.
1216 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
1217 (main): Parse --memdisk|-m option, and pass user-provided path as
1218 parameter to generate_image().
1219 (add_segments): Pass `memdisk_path' down to load_modules().
1220 (load_modules): Embed memdisk image in module section when requested.
1221 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
1222 `header.type' instead of `header.offset'.
1224 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
1225 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
1226 (memdisk_mod_LDFLAGS): New variables.
1227 * conf/i386-coreboot.rmk: Likewise.
1228 * conf/i386-ieee1275.rmk: Likewise.
1230 2008-08-02 Robert Millan <rmh@aybabtu.com>
1232 * loader/i386/pc/multiboot.c (playground, forward_relocator)
1233 (backward_relocator): New variables. Used to allocate and relocate
1234 the payload, respectively.
1235 (grub_multiboot_load_elf32): Load into heap instead of requested
1236 address, install the appropriate relocator code in each bound of
1237 the payload, and set the entry point such that
1238 grub_multiboot_real_boot() will jump to one of them.
1240 * kern/i386/loader.S (grub_multiboot_payload_size)
1241 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1242 (grub_multiboot_payload_entry_offset): New variables.
1243 (grub_multiboot_real_boot): Set cpu context to what the relocator
1244 expects, and jump to the relocator instead of the payload.
1246 * include/grub/i386/loader.h (grub_multiboot_payload_size)
1247 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
1248 (grub_multiboot_payload_entry_offset): Export.
1250 2008-08-01 Bean <bean123ch@gmail.com>
1252 * normal/menu_entry.c (editor_getline): Don't return the original
1253 string as result, as it will be released by lexer once it has done
1256 2008-08-01 Robert Millan <rmh@aybabtu.com>
1258 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
1259 within menuentries, not before them.
1260 util/grub.d/10_hurd.in: Likewise.
1262 2008-08-01 Bean <bean123ch@gmail.com>
1264 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
1265 (bufio_mod_SOURCES): New macro.
1266 (bufio_mod_CFLAGS): Likewise.
1267 (bufio_mod_LDFLAGS): Likewise.
1269 * include/grub/bufio.h: New file.
1271 * io/bufio.c: Likewise.
1273 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
1274 (grub_video_reader_png): Use grub_buffile_open to open file.
1276 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
1277 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
1279 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
1280 (grub_video_reader_tga): Use grub_buffile_open to open file.
1282 * font/manager.c: Include <grub/bufio.h>.
1283 (add_font): Use grub_buffile_open to open file.
1285 2008-07-31 Robert Millan <rmh@aybabtu.com>
1287 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
1288 ELF segments, use a macro for arbitrarily accessing any of them instead
1289 of preparing a pointer that allows access to one at a time.
1290 (grub_multiboot_load_elf64): Likewise.
1292 2008-07-31 Bean <bean123ch@gmail.com>
1294 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
1295 GRUB_KERNEL_MACHINE_DATA_END.
1297 2008-07-30 Robert Millan <rmh@aybabtu.com>
1299 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
1300 Increase from 0x50 to 0x60.
1301 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
1302 use UUIDs to identify the root drive for them. If that's not
1304 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
1305 check, for cross-disk installs.
1307 2008-07-30 Robert Millan <rmh@aybabtu.com>
1309 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1310 is non-empty, use it to set the `prefix' environment variable instead
1311 of the usual approach.
1312 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1313 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1314 environment variable instead of dummy make_install_device().
1316 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1317 (start): Insert a data section, with `grub_prefix' variable.
1318 * kern/i386/linuxbios/startup.S: Likewise.
1320 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1321 New variable reference.
1322 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1323 New macro. Defines offset of `grub_prefix' within startup.S (relative
1325 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
1326 section within startup.S (relative to `start').
1327 * include/grub/i386/coreboot/kernel.h: Likewise.
1329 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1330 Overwrite grub_prefix with its contents, at the beginning of the
1332 (main): Understand -p|--prefix.
1334 2008-07-30 Robert Millan <rmh@aybabtu.com>
1336 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1338 2008-07-30 Robert Millan <rmh@aybabtu.com>
1340 * term/i386/pc/vga_text.c (grub_console_cls): Use
1341 grub_console_gotoxy() to go back to beginning of the screen.
1342 Found by Patrick Georgi <patrick.georgi@coresystems.de>
1344 2008-07-29 Christian Franke <franke@computer.org>
1346 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1347 Add conversion of emulated mount points on Cygwin.
1349 2008-07-29 Christian Franke <franke@computer.org>
1351 * util/update-grub.in: Add a check for admin
1353 Remove old `grub.cfg.new' before creation.
1354 Add `-f' to `mv' to handle the different filesystem
1355 semantics of Windows.
1357 2008-07-29 Bean <bean123ch@gmail.com>
1359 * normal/main.c (get_line): Fix buffer overflow bug.
1361 2008-07-28 Robert Millan <rmh@aybabtu.com>
1363 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1364 (struct grub_apple_header): New struct. Describes the layout of
1366 (apple_partition_map_iterate): Check the header magic as well as the
1367 partition magic (which was already being checked).
1369 2008-07-28 Pavel Roskin <proski@gnu.org>
1371 * genmk.rb: Add a warning to the beginning of the output that
1372 it's a generated file and should not be edited.
1374 2008-07-28 Robert Millan <rmh@aybabtu.com>
1376 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1377 with the same number are found, just use issue a warning with
1378 grub_dprintf(), as this error has been reported to be non-fatal.
1380 2008-07-27 Robert Millan <rmh@aybabtu.com>
1382 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1385 2008-07-27 Bean <bean123ch@gmail.com>
1387 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1388 (grub_fat_find_dir): Ignore case when comparing filename.
1390 2008-07-27 Bean <bean123ch@gmail.com>
1392 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1393 smallino, as it's more descriptive, and i8count can be confused with
1394 the other field count.
1395 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1398 2008-07-27 Bean <bean123ch@gmail.com>
1400 * commands/crc.c: New file.
1402 * lib/crc.c: Likewise.
1404 * include/grub/lib/crc.h: Likewise.
1406 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1408 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1409 (hexdump): Move this function to ...
1411 * lib/hexdump.c: ... here.
1413 * include/grub/hexdump.h: Renamed to ...
1415 * include/grub/lib/hexdump.h: ... this.
1417 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1419 * util/grub-editenv.c: Likewise.
1421 * include/envblk.h: Renamed to ...
1423 * include/lib/envblk.h: ... this.
1425 * util/envblk.c: Renamed to ...
1427 * lib/envblk.c: ... this.
1429 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1431 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1432 (pkglib_MODULES): Add crc.mod.
1433 (hexdump_mod_SOURCES): Add lib/hexdump.c.
1434 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1435 (crc_mod_SOURCES): New macro.
1436 (crc_mod_CFLAGS): Likewise.
1437 (crc_mod_LDFLAGS): Likewise.
1439 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1441 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1443 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1445 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1447 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1449 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
1451 * commands/help.c: Include <grub/term.h>.
1452 (TERM_WIDTH): Removed. Updated all users.
1454 2008-07-27 Pavel Roskin <proski@gnu.org>
1456 * util/getroot.c (find_root_device): Rephrase a comment to avoid
1457 spurious warnings about a comment within a comment.
1459 2008-07-25 Robert Millan <rmh@aybabtu.com>
1461 * util/getroot.c (find_root_device): Skip devices that match
1462 /dev/dm-[0-9]. This lets the real device be found for any type of
1463 abstraction (LVM, EVMS, RAID..).
1464 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1465 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
1466 device is found first, find_root_device() will now skip it.
1468 2008-07-24 Pavel Roskin <proski@gnu.org>
1470 * include/grub/types.h: Use __builtin_bswap32() and
1471 __builtin_bswap64() with gcc 4.3 and newer.
1473 2008-07-24 Christian Franke <franke@computer.org>
1475 * util/i386/pc/grub-install.in: If `--debug' is specified,
1476 pass `--verbose' to grub-setup.
1477 Abort script if make_system_path_relative_to_its_root() fails.
1479 2008-07-24 Bean <bean123ch@gmail.com>
1481 * configure.ac: Fixed a bug caused by the previous cygwin patch,
1482 variable `target_platform' should be `platform'.
1484 2008-07-24 Bean <bean123ch@gmail.com>
1486 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1487 (grub_png_init_fixed_block): New function.
1488 (grub_png_decode_image_data): Handle fixed huffman code compression.
1490 2008-07-24 Bean <bean123ch@gmail.com>
1492 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1493 (grub_pe2elf_SOURCES): New macro.
1494 (CLEANFILES): Add grub-pe2elf.
1496 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1497 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1498 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1499 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1500 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1501 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1502 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1503 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
1504 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
1505 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
1506 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
1507 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
1508 (GRUB_PE32_DT_FUNCTION): Likewise.
1509 (GRUB_PE32_REL_I386_DIR32): Likewise.
1510 (GRUB_PE32_REL_I386_REL32): Likewise.
1511 (grub_pe32_symbol): New structure.
1512 (grub_pe32_reloc): Likewise.
1514 * util/grub-pe2elf.c: New file.
1516 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
1517 start symbol in non pc platform.
1519 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
1521 The following patches are from Christian Franke.
1523 * include/grub/dl.h: Remove .previous, gas supports this only
1526 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
1527 Remove .type, gas supports this only for ELF format.
1529 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
1530 nullbytes in symbol table. This fixes an infinite loop if table is
1533 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
1534 TARGET_IMG_LDFLAGS and EXEEXT.
1536 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
1537 TARGET_IMG_LDFLAGS_AC.
1538 (grub_CHECK_STACK_ARG_PROBE): New function.
1540 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
1542 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
1544 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
1545 to set TARGET_IMG_LD* accordingly.
1546 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
1547 Add call to grub_CHECK_STACK_ARG_PROBE.
1548 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
1550 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
1552 * genmk.rb: Add EXEEXT to CLEANFILES.
1554 2008-07-23 Robert Millan <rmh@aybabtu.com>
1556 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
1557 define the codes for arrows and lines used for the menu).
1558 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
1561 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
1562 fonts, because the latter are too slow.
1564 2008-07-21 Bean <bean123ch@gmail.com>
1566 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
1567 a20. Run keyboard test last, as it will cause macbook to halt.
1569 2008-07-18 Pavel Roskin <proski@gnu.org>
1571 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
1572 load foreign architecture modules correctly anyway. Keep
1573 support for loading host architecture modules, whether we
1574 compile them or not.
1576 2008-07-17 Pavel Roskin <proski@gnu.org>
1578 * configure.ac: Use -m32 or -m64 regardless of whether we had to
1579 change target_cpu. The compiler default can mismatch target_cpu
1582 * disk/efi/efidisk.c: Fix format warnings on x86_64.
1583 * kern/efi/efi.c: Likewise.
1585 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
1586 target compiler is functional.
1587 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
1590 * configure.ac: Default to efi platform for x86_64-apple. Allow
1591 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
1592 adjustments from the rest, only do them if target is not
1593 explicitly given. Merge other adjustments with the final sanity
1594 check. Remove an extraneous check for supported CPU. Be
1595 specific which CPU and which platform is not supported.
1597 * configure.ac: Default to pc platform for x86_64.
1599 2008-07-17 Robert Millan <rmh@aybabtu.com>
1601 Partial LinuxBIOS -> Coreboot rename.
1603 * conf/i386-linuxbios.rmk: Renamed to ...
1604 * conf/i386-coreboot.rmk: ... this.
1605 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
1606 * configure.ac: Accept "coreboot" as input platform (but maintain
1607 compatibility with "linuxbios").
1608 * include/grub/i386/linuxbios: Renamed to ...
1609 * include/grub/i386/coreboot: ... this.
1611 2008-07-17 Bean <bean123ch@gmail.com>
1613 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
1614 (appleldr_mod_SOURCE): New variable.
1615 (appleldr_mod_CFLAGS): Likewise.
1616 (appleldr_mod_LDFLAGS): Likewise.
1617 (pci_mod_SOURCES): Likewise.
1618 (pci_mod_CFLAGS): Likewise.
1619 (pci_mod_LDFLAGS): Likewise.
1620 (lspci_mod_SOURCES): Likewise.
1621 (lspci_mod_CFLAGS): Likewise.
1622 (lspci_mod_LDFLAGS): Likewise.
1624 * conf/x86_64-efi.rmk: New file.
1626 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
1628 (grub_efidisk_write): Likewise.
1630 * include/efi/api.h (efi_call_0): New macro.
1631 (efi_call_1): Likewise.
1632 (efi_call_2): Likewise.
1633 (efi_call_3): Likewise.
1634 (efi_call_4): Likewise.
1635 (efi_call_5): Likewise.
1636 (efi_call_6): Likewise.
1638 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
1639 grub_rescue_cmd_chainloader.
1641 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
1642 (grub_pe32_optional_header): Change some fields based on i386 or
1644 (GRUB_PE32_PE32_MAGIC): Likewise.
1646 * include/grub/efi/uga_draw.h: New file.
1648 * include/grub/elf.h (STN_ABS): New constant.
1649 (R_X86_64_NONE): Relocation constant for x86_64.
1650 (R_X86_64_64): Likewise.
1651 (R_X86_64_PC32): Likewise.
1652 (R_X86_64_GOT32): Likewise.
1653 (R_X86_64_PLT32): Likewise.
1654 (R_X86_64_COPY): Likewise.
1655 (R_X86_64_GLOB_DAT): Likewise.
1656 (R_X86_64_JUMP_SLOT): Likewise.
1657 (R_X86_64_RELATIVE): Likewise.
1658 (R_X86_64_GOTPCREL): Likewise.
1659 (R_X86_64_32): Likewise.
1660 (R_X86_64_32S): Likewise.
1661 (R_X86_64_16): Likewise.
1662 (R_X86_64_PC16): Likewise.
1663 (R_X86_64_8): Likewise.
1664 (R_X86_64_PC8): Likewise.
1666 * include/grub/i386/efi/pci.h: New file.
1668 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
1669 Change it value based on platform.
1670 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
1671 (GRUB_E820_RAM): Likewise.
1672 (GRUB_E820_RESERVED): Likewise.
1673 (GRUB_E820_ACPI): Likewise.
1674 (GRUB_E820_NVS): Likewise.
1675 (GRUB_E820_EXEC_CODE): Likewise.
1676 (GRUB_E820_MAX_ENTRY): Likewise.
1677 (grub_e820_mmap): New structure.
1678 (linux_kernel_header): Change the efi field according to different
1679 kernel version, also field from linux_kernel_header.
1681 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
1683 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
1684 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
1685 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
1686 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
1687 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
1688 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
1689 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
1690 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
1691 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
1692 (GRUB_PCI_ADDR_IO_MASK): Likewise.
1694 * include/grub/x86_64/efi/kernel.h: New file.
1696 * include/grub/x86_64/efi/loader.h: Likewise.
1698 * include/grub/x86_64/efi/machine.h: Likewise.
1700 * include/grub/x86_64/efi/pci.h: Likewise.
1702 * include/grub/x86_64/efi/time.h: Likewise.
1704 * include/grub/x86_64/linux.h: Likewise.
1706 * include/grub/x86_64/setjmp.h: Likewise.
1708 * include/grub/x86_64/time.h: Likewise.
1710 * include/grub/x86_64/types.h: Likewise.
1712 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
1713 GRUB_TARGET_SIZEOF_VOID_P.
1715 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
1716 (grub_efi_locate_handle): Likewise.
1717 (grub_efi_open_protocol): Likewise.
1718 (grub_efi_set_text_mode): Likewise.
1719 (grub_efi_stall): Likewise.
1720 (grub_exit): Likewise.
1721 (grub_reboot): Likewise.
1722 (grub_halt): Likewise.
1723 (grub_efi_exit_boot_services): Likewise.
1724 (grub_get_rtc): Likewise.
1726 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
1727 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
1728 (grub_efi_allocate_pages): Wrap efi calls.
1729 (grub_efi_free_pages): Wrap efi calls.
1730 (grub_efi_get_memory_map): Wrap efi calls.
1732 * kern/x86_64/dl.c: New file.
1734 * kern/x86_64/efi/callwrap.S: Likewise.
1736 * kern/x86_64/efi/startup.S: Likewise.
1738 * loader/efi/appleloader.c: Likewise.
1740 * loader/efi/chainloader.c (cmdline): New variable.
1741 (grub_chainloader_unload): Wrap efi calls.
1742 (grub_chainloader_boot): Likewise.
1743 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
1746 * loader/efi/chainloader_normal.c (chainloader_command):
1747 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
1750 * loader/i386/efi/linux.c (allocate_pages): Change allocation
1752 (grub_e820_add_region): New function.
1753 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
1755 (grub_find_video_card): New function.
1756 (grub_linux_setup_video): New function.
1757 (grub_rescue_cmd_linux): Probe for video information.
1759 * normal/x86_64/setjmp.S: New file.
1761 * term/efi/console.c (map_char): New function.
1762 (grub_console_putchar): Map unicode char.
1763 (grub_console_checkkey): Wrap efi calls.
1764 (grub_console_getkey): Likewise.
1765 (grub_console_getwh): Likewise.
1766 (grub_console_gotoxy): Likewise.
1767 (grub_console_cls): Likewise.
1768 (grub_console_setcolorstate): Likewise.
1769 (grub_console_setcursor): Likewise.
1771 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
1773 2008-07-16 Pavel Roskin <proski@gnu.org>
1775 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
1778 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
1779 pointer, not an integer. This fixes a warning and prevents
1780 precision loss on 64-bit systems.
1781 (relocate_addresses): Remove unneeded cast.
1783 2008-07-15 Pavel Roskin <proski@gnu.org>
1785 * kern/i386/ieee1275/init.c: Include grub/cache.h.
1787 * term/ieee1275/ofconsole.c: Disable code unused on i386.
1789 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
1790 Fix comparison between signed and unsigned.
1792 * include/grub/i386/ieee1275/console.h: Declare
1793 grub_console_init() and grub_console_fini().
1795 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
1796 It's empty and unused.
1798 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
1799 beginning to avoid warnings with some compilers.
1801 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
1802 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
1804 2008-07-14 Pavel Roskin <proski@gnu.org>
1806 * kern/env.c (grub_register_variable_hook): Don't copy empty
1807 string, it leaks memory. Pass "" to grub_env_set(), it should
1808 handle constant strings.
1810 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
1811 * commands/cmp.c (grub_cmd_cmp): Likewise.
1812 * kern/dl.c (grub_dl_flush_cache): Likewise.
1813 (grub_dl_load_core): Likewise.
1814 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
1815 (grub_elf64_load_phdrs): Likewise.
1817 2008-07-13 Pavel Roskin <proski@gnu.org>
1819 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
1820 between signed and unsigned.
1821 (LzmaEnc_Finish): Fix warning about an unused parameter.
1823 2008-07-13 Bean <bean123ch@gmail.com>
1825 * Makefile.in (enable_lzo): New rule.
1827 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
1829 * configure.ac (ENABLE_LZO): New option --enable-lzo.
1831 * boot/i386/pc/lnxboot.S: #include <config.h>.
1833 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
1834 its value according to the compression algorithm used, lzo or lzma.
1836 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
1837 compression algorithm according to configure macro.
1839 * kern/i386/pc/startup.S (codestart): Likewise.
1841 * kern/i386/pc/lzma_decode.S: New file.
1843 * include/grub/lib/LzFind.h: Likewise.
1845 * include/grub/lib/LzHash.h: Likewise.
1847 * include/grub/lib/LzmaDec.h: Likewise.
1849 * include/grub/lib/LzmaEnc.h: Likewise.
1851 * include/grub/lib/LzmaTypes.h: Likewise.
1853 * lib/LzFind.c: Likewise.
1855 * lib/LzmaDec.c: Likewise.
1857 * lib/LzmaEnc.c: Likewise.
1859 2008-07-13 Bean <bean123ch@gmail.com>
1861 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
1862 (grub_ext4_extent_header): New structure.
1863 (grub_ext4_extent): Likewise.
1864 (grub_ext4_extent_idx): Likewise.
1865 (grub_ext4_find_leaf): New function.
1866 (grub_ext2_read_block): Handle extents.
1868 2008-07-12 Robert Millan <rmh@aybabtu.com>
1870 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
1872 2008-07-11 Robert Millan <rmh@aybabtu.com>
1874 * util/grub.d/40_custom.in: New file. Example on how to add custom
1875 entries to /etc/grub.d.
1876 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
1877 40_custom (implicitly, by merging all the grub.d rules).
1879 2008-07-11 Pavel Roskin <proski@gnu.org>
1881 * commands/read.c (grub_getline): Fix invalid memory access.
1882 Don't add newline to the variable value.
1884 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
1885 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
1886 (serial_hw_get_port): Check validity of the port number.
1887 (grub_cmd_serial): Check return value of serial_hw_get_port().
1889 2008-07-07 Pavel Roskin <proski@gnu.org>
1891 * boot/i386/pc/diskboot.S (notification_string): Replace
1892 "Loading kernel" with just "loading". This is shorter, less
1893 confusing and saves a few bytes for possible future changes.
1895 2008-07-05 Pavel Roskin <proski@gnu.org>
1897 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
1898 size for ATAPI devices, they are undefined. Output sector
1899 number in decimal form.
1901 * disk/ata.c: Use named constants for status bits.
1903 2008-07-04 Pavel Roskin <proski@gnu.org>
1905 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
1906 grub_addr_t before casting it to the void pointer to fix a
1907 warning. Non-addressable regions are discarded earlier.
1908 (grub_arch_modules_addr): Cast _end to grub_addr_t.
1909 * kern/i386/linuxbios/table.c: Include grub/misc.h.
1910 (check_signature): Don't shadow table_header.
1911 (grub_linuxbios_table_iterate): Cast numeric constants to
1912 grub_linuxbios_table_header_t.
1913 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
1916 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
1919 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
1920 pointer, which can cause warnings. Support 64-bit addresses.
1922 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
1923 of sizeof(long). This fixes PowerPC image generation on x86_64.
1925 2008-07-04 Robert Millan <rmh@aybabtu.com>
1927 This fixes a performance issue when pc & gpt partmap iterators
1928 didn't abort iteration even after our hook found what it was
1929 looking for (often causing expensive probes of non-existent drives).
1931 Some callers relied on previous buggy behaviour, since they would
1932 rise an error when their own hooks caused early abortion of its
1935 * kern/device.c (grub_device_open): Improve error message.
1936 * disk/lvm.c (grub_lvm_open): Likewise.
1937 * disk/raid.c (grub_raid_open): Likewise.
1939 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
1940 when hook requests it, independently of grub_errno.
1941 (pc_partition_map_probe): Do not fail when find_func() caused
1942 early abortion of pc_partition_map_iterate().
1944 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
1945 when hook requests it, independently of grub_errno.
1946 (gpt_partition_map_probe): Do not fail when find_func() caused
1947 early abortion of gpt_partition_map_iterate().
1949 * kern/partition.c (grub_partition_iterate): Abort parent iteration
1950 when hook requests it, independently of grub_errno. Do not fail when
1951 part_map_iterate_hook() caused early abortion of p->iterate().
1953 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
1954 when grub_partition_iterate() returned with non-zero.
1956 2008-07-03 Pavel Roskin <proski@gnu.org>
1958 * disk/ata.c (grub_ata_pio_write): Check status before writing,
1959 like we do in grub_ata_pio_read().
1960 (grub_ata_readwrite): Always write individual sectors. Fix the
1961 sector count for the remainder.
1962 (grub_ata_write): Enable writing to ATA devices. Correctly
1963 report error for ATAPI devices.
1965 2008-07-02 Pavel Roskin <proski@gnu.org>
1967 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
1970 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
1971 for every read sector, we already increment it for the whole
1972 batch. This fixes reading more than 256 sectors at once.
1974 * util/grub-editenv.c (cmd_info): Cast argument to long
1975 explicitly. ptrdiff_t reduces to int on i386.
1977 * util/grub-editenv.c (main): Be specific which parameter is
1980 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
1981 (memdisk): Make memdisk_orig_addr a pointer.
1983 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
1984 for file offsets, use grub_off_t instead. Fix printf format
1987 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
1988 there. Real unexpected warnings should not drown in the noise
1989 about known problems.
1991 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
1992 grub_disk_addr_t for memory addresses.
1994 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
1995 explicitly to fix a warning.
1997 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
1999 * Makefile.in (MODULE_LDFLAGS): New variable.
2000 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
2001 the linker accepts --build-id=none.
2002 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
2004 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
2006 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
2007 those in Linux XFS code. Provide a way to access 64-bit parent
2009 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
2010 the end of struct grub_xfs_dir_header.
2012 2008-07-02 Bean <bean123ch@gmail.com>
2014 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
2015 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2016 and GRUB_IEEE1275_FLAG_NO_ANSI.
2018 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
2019 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
2020 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
2022 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
2023 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
2025 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
2026 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
2028 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
2029 esc sequence on non ANSI terminal.
2030 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
2032 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
2035 2008-07-02 Bean <bean123ch@gmail.com>
2037 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
2038 (grub_editenv_SOURCES): New variable.
2039 (pkglib_MODULES): Add loadenv.mod.
2040 (loadenv_mod_SOURCES): New variable.
2041 (loadenv_mod_CFLAGS): Likewise.
2042 (loadenv_mod_LDFLAGS): Likewise.
2044 * include/grub/envblk.h: New file.
2046 * util/envblk.c: New file.
2048 * util/grub-editenv.c: New file.
2050 * commands/loadenv.c: New file.
2052 2008-07-01 Pavel Roskin <proski@gnu.org>
2054 * include/multiboot2.h (struct multiboot_tag_module): Use char,
2055 not unsigned char. This fixes warnings and is consistent with
2058 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
2060 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
2062 * term/tparm.c (analyze): Always set *popcount.
2064 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
2065 cast to fix a warning.
2067 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
2068 cast to suppress a warning.
2070 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
2071 grub_fshelp_read_file() expects.
2073 * fs/fat.c: Fix UUID calculation on big-endian systems. We
2074 write uuid as a 32-bit value in CPU byte order, so declare and
2077 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
2078 long if the format specifier expects it.
2079 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
2080 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2081 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
2082 long to fix a warning.
2083 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
2084 grub_dprintf() arguments to fix warnings.
2086 2008-06-30 Pavel Roskin <proski@gnu.org>
2088 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
2089 install_bsd_part immediately before core.img is embedded or
2090 modified on disk. This fixes core.img verification if core.img
2093 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
2094 core_path to calculate the blocklist.
2095 Patch from Javier Martín <lordhabbit@gmail.com>
2097 2008-06-29 Robert Millan <rmh@aybabtu.com>
2099 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
2100 block to disk block.
2101 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
2102 Patch from Niels Böhm <bitbucket@arcor.de>
2104 2008-06-29 Robert Millan <rmh@aybabtu.com>
2106 * util/update-grub_lib.in (font_path): Search for fonts in
2107 /boot/grub first, which is more likely to be readable (we aren't
2108 deciding where fonts live, just looking for them).
2110 2008-06-26 Pavel Roskin <proski@gnu.org>
2112 * util/biosdisk.c (read_device_map): Don't leave dead map
2113 entries for devices failing stat() check.
2115 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
2116 core_path_dev for the core.img path on the target device.
2118 2008-06-26 Robert Millan <rmh@aybabtu.com>
2120 * disk/fs_uuid.c: New file.
2121 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
2122 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
2123 (fs_uuid_mod_LDFLAGS): New variables.
2124 * include/grub/disk.h (grub_disk_dev_id): Add
2125 `GRUB_DISK_DEVICE_UUID_ID'.
2126 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
2127 implement iterate().
2129 2008-06-26 Robert Millan <rmh@aybabtu.com>
2131 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
2132 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
2133 Linux image includes no initrd.
2135 2008-06-21 Javier Martín <lordhabbit@gmail.com>
2137 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
2138 call to resolve the core image location that effectively appended the
2141 2008-06-21 Robert Millan <rmh@aybabtu.com>
2143 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
2146 * util/grub.d/10_hurd.in: ... to here ...
2147 * util/grub.d/10_linux.in: ... and here.
2149 2008-06-19 Robert Millan <rmh@aybabtu.com>
2151 * kern/main.c (grub_main): Export `prefix' variable immediately
2152 after it has been set by grub_machine_set_prefix().
2154 2008-06-19 Robert Millan <rmh@aybabtu.com>
2156 * commands/search.c (search_label, search_fs_uuid, search_file): Print
2157 search result when not saving to variable, not the other way around.
2158 When saving to variable, abort iteration as soon as a match is found.
2160 2008-06-19 Robert Millan <rmh@aybabtu.com>
2162 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
2163 check for partition that provides /boot/grub. Its logic is flawed,
2164 as it prevents prepare_grub_to_access_device() from being called
2167 2008-06-19 Robert Millan <rmh@aybabtu.com>
2169 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
2170 "insmod" command directly when abstraction modules are needed,
2171 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
2172 since it had already been processed).
2174 2008-06-19 Pavel Roskin <proski@gnu.org>
2176 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
2177 changed. This is needed in case GRUB_LIBDIR changes.
2178 * conf/i386-ieee1275.rmk: Likewise.
2179 * conf/i386-linuxbios.rmk: Likewise.
2180 * conf/i386-pc.rmk: Likewise.
2181 * conf/powerpc-ieee1275.rmk: Likewise.
2183 2008-06-18 Pavel Roskin <proski@gnu.org>
2185 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
2186 kernel_elf_symlist.c to symlist.c for consistency with other
2187 architectures. Update all users.
2188 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2190 2008-06-18 Robert Millan <rmh@aybabtu.com>
2192 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
2195 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
2196 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
2197 a RAID device, run setup() for all members independently on whether
2198 LVM abstraction is being used.
2199 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
2200 If grub-mkimage has set `*install_dos_part == -2', don't override this
2202 Perform *install_dos_part adjustments independently on whether
2203 we're embedding or not.
2204 Clarify error message when image is too big for embedding.
2205 Remove duplicate *install_dos_part stanza.
2207 2008-06-17 Robert Millan <rmh@aybabtu.com>
2209 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
2210 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
2212 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
2213 values in grub_ofconsole_normal_color and
2214 grub_ofconsole_highlight_color (they're not directly related to
2215 background and foreground).
2216 (grub_ofconsole_setcolorstate): Extract background and foreground
2217 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
2219 2008-06-17 Robert Millan <rmh@aybabtu.com>
2221 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
2222 /boot/grub for the check in last commit, not /boot (they could be
2223 different partitions).
2225 2008-06-16 Robert Millan <rmh@aybabtu.com>
2227 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
2228 asked to setup access for the same partition that provides /boot,
2229 don't bother using UUIDs since our root already has the value we
2232 2008-06-16 Robert Millan <rmh@aybabtu.com>
2234 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
2236 Patch from Sven Mueller <sven@debian.org>.
2238 2008-06-16 Robert Millan <rmh@aybabtu.com>
2240 * util/update-grub.in: Check for $EUID instead of $UID.
2241 Reported by Vincent Zweije.
2243 2008-06-16 Bean <bean123ch@gmail.com>
2245 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
2246 (grub_ext2_read_block): Likewise.
2247 (grub_ext2_read_inode): Likewise.
2248 (grub_ext2_mount): Likewise.
2249 (grub_ext2_close): Likewise.
2250 (grub_ext3_get_journal): Removed.
2252 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
2253 (grub_reiserfs_read_symlink): Likewise.
2254 (grub_reiserfs_mount): Likewise.
2255 (grub_reiserfs_open): Likewise.
2256 (grub_reiserfs_read): Likewise.
2257 (grub_reiserfs_close): Likewise.
2258 (grub_reiserfs_get_journal): Removed.
2260 * fs/fshelp.c (grub_fshelp_read): Removed.
2261 (grub_fshelp_map_block): Likewise.
2263 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
2264 (grub_fshelp_journal): Likewise.
2265 (grub_fshelp_read): Likewise.
2266 (grub_fshelp_map_block): Likewise.
2268 2008-06-16 Pavel Roskin <proski@gnu.org>
2270 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
2271 floating point anymore.
2272 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
2274 2008-06-15 Pavel Roskin <proski@gnu.org>
2276 * commands/ls.c (grub_ls_list_files): Use integer calculations
2277 for human readable format, avoid floating point use.
2278 * kern/misc.c (grub_ftoa): Remove.
2279 (grub_vsprintf): Remove floating point support.
2281 2008-06-15 Robert Millan <rmh@aybabtu.com>
2283 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
2285 Reported by Max Vozeler.
2287 2008-06-15 Robert Millan <rmh@aybabtu.com>
2289 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
2290 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
2292 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
2293 the beginning of the prefix.
2295 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
2296 It is assumed that if we have a memdisk, grub-mkimage has set
2297 grub_prefix to include the "(memdisk)" drive in it.
2299 2008-06-15 Robert Millan <rmh@aybabtu.com>
2301 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
2302 Initialize keyboard controller after registering the terminal, so that
2303 grub_printf() can be called from grub_keyboard_controller_init().
2305 2008-06-15 Robert Millan <rmh@aybabtu.com>
2307 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2308 extent-btree which is written as big endian on disk.
2309 Reported by Alain Greppin <al@chilibi.org>.
2311 2008-06-14 Robert Millan <rmh@aybabtu.com>
2313 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2314 * util/i386/pc/grub-install.in (modules): Likewise.
2316 2008-06-13 Pavel Roskin <proski@gnu.org>
2318 * commands/ls.c (grub_ls_list_files): Fix format warnings.
2320 2008-06-13 Bean <bean123ch@gmail.com>
2322 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2324 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2326 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2327 to indicate sparse block.
2329 2008-06-12 Pavel Roskin <proski@gnu.org>
2331 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2332 number, grub_fshelp_read() does it for us.
2334 * fs/fshelp.c (grub_fshelp_read): New function. Implement
2335 linear disk read with journal translation.
2336 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2337 * include/grub/fshelp.h: Declare grub_fshelp_read().
2339 2008-06-09 Pavel Roskin <proski@gnu.org>
2341 * fs/minix.c (grub_minix_mount): Handle error reading
2344 2008-06-08 Robert Millan <rmh@aybabtu.com>
2346 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2347 don't append the RAID prefix afterwards.
2348 Reported by Clint Adams.
2350 2008-06-08 Robert Millan <rmh@aybabtu.com>
2352 Based on description from Pavel:
2353 * kern/disk.c (grub_disk_check_range): Rename to ...
2354 (grub_disk_adjust_range): ... this. Add a comment explaining the
2355 tasks performed by this function.
2357 2008-06-08 Robert Millan <rmh@aybabtu.com>
2359 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2360 `num_serial' (for consistency with other variables).
2361 (struct grub_ntfs_data): Add `uuid' member.
2362 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2363 (grub_ntfs_uuid): New function.
2364 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2366 2008-06-07 Pavel Roskin <proski@gnu.org>
2368 * util/biosdisk.c (open_device): Revert last change to the
2369 function, it broke installation. The sector needs to be
2370 different dependent on which device is opened.
2372 2008-06-06 Robert Millan <rmh@aybabtu.com>
2374 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2375 rest of GRUB, and breakage doesn't happen if its value were modified.
2377 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2378 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2379 a constant (same value).
2380 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2381 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2383 2008-06-06 Robert Millan <rmh@aybabtu.com>
2385 * util/biosdisk.c (open_device): Do not modify sector offset when
2386 accessing a partition. kern/disk.c already handles this for us.
2388 2008-06-06 Robert Millan <rmh@aybabtu.com>
2390 * util/grub-emu.c (grub_machine_init): Move code in this function from
2392 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2393 segfault in case grub_printf() is called).
2395 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2396 grub_probe. Update all users not to explicitly add it again.
2397 (grub_device): New variable; contains corresponding device for grubdir.
2398 (fs_module, partmap_module, devabstraction_module): Pass
2399 `--device ${grub_device}' to grub_probe to avoid traversing /dev
2402 2008-06-05 Robert Millan <rmh@aybabtu.com>
2404 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2405 is found, print it (same layout as with labels).
2407 2008-06-04 Robert Millan <rmh@aybabtu.com>
2409 * util/biosdisk.c (get_drive): Rename to ...
2410 (find_grub_drive): ... this. Update all users.
2412 (get_os_disk): Rename to ...
2413 (convert_system_partition_to_system_disk): ... this. Update all users.
2415 (find_drive): Rename to ...
2416 (find_system_device): ... this. Update all users.
2418 2008-06-04 Robert Millan <rmh@aybabtu.com>
2420 * util/biosdisk.c (get_os_disk): Handle IDA devices.
2421 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2422 (make_device_map): Likewise.
2424 2008-06-01 Robert Millan <rmh@aybabtu.com>
2426 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2427 before dereferencing it.
2429 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2430 union with fat12/fat16-specific ones. Add some new fields, including
2431 `num_serial' for both versions.
2432 (struct grub_fat_data): Add `uuid' member.
2433 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2434 names. Initialize `data->uuid' using `num_serial'.
2435 (grub_fat_uuid): New function.
2436 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2438 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2439 (grub_reiserfs_uuid): New function.
2440 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2443 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2444 (grub_xfs_uuid): New function.
2445 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2447 2008-06-01 Robert Millan <rmh@aybabtu.com>
2449 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2450 code that is backward compatible with pre-uuid search command.
2452 2008-05-31 Robert Millan <rmh@aybabtu.com>
2454 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2455 floppies after everything else, to ensure floppy drive isn't accessed
2456 unnecessarily (patch from Bean).
2458 2008-05-31 Robert Millan <rmh@aybabtu.com>
2460 * commands/search.c (search_label, search_fs_uuid, search_file): Do
2461 not print device names when we were asked to set a variable.
2463 2008-05-31 Robert Millan <rmh@aybabtu.com>
2465 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2466 using "cursor-on" and "cursor-off" commands (understood at least by
2467 the Open Firmware flavour on OLPC).
2469 2008-05-31 Michael Gorven <michael@gorven.za.net>
2471 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2472 on and off sequences.
2474 2008-05-31 Robert Millan <rmh@aybabtu.com>
2476 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2477 * util/update-grub.in: Likewise.
2479 2008-05-30 Pavel Roskin <proski@gnu.org>
2481 * util/biosdisk.c (linux_find_partition): Simplify logic and
2482 make the code more universal. Keep special processing for
2483 devfs, but use a simple rule for all other devices. If the
2484 device ends with a number, append 'p' and the partition number.
2485 Otherwise, append only the partition number.
2487 2008-05-30 Robert Millan <rmh@aybabtu.com>
2489 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2490 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2491 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2492 the `root' parameter to Linux.
2494 2008-05-30 Robert Millan <rmh@aybabtu.com>
2496 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2497 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2498 --fs_uuid with --fs-uuid.
2499 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2500 all filesystems support them).
2502 2008-05-30 Robert Millan <rmh@aybabtu.com>
2504 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
2505 grub_printf() flags, since we're printing in units of 2 bytes.
2507 2008-05-30 Robert Millan <rmh@aybabtu.com>
2509 * util/grub.d/00_header.in: Remove obsolete comment referencing
2510 convert_system_path_to_grub_path().
2511 * util/update-grub.in: Likewise.
2512 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
2513 (convert_system_path_to_grub_path): Add a warning message explaining
2514 that this function is deprecated. Rely on is_path_readable_by_grub()
2515 for the readability checks.
2516 (font_path): Use is_path_readable_by_grub() for the readability
2517 check rather than convert_system_path_to_grub_path().
2519 2008-05-30 Robert Millan <rmh@aybabtu.com>
2521 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
2522 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
2523 converting it first.
2524 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
2525 grub.cfg for access to font file, and afterwards call it again to set
2528 2008-05-30 Robert Millan <rmh@aybabtu.com>
2530 * commands/search.c (options): Add --fs_uuid option.
2531 (search_fs_uuid): New function.
2532 (grub_cmd_search): Fix --set argument passing.
2533 Use search_fs_uuid() when requested via --fs_uuid.
2534 (grub_search_init): Update help message.
2535 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
2536 and redeclare it as an array of 16-bit words.
2537 (grub_ext2_uuid): New function.
2538 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
2539 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
2540 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
2541 (GRUB_DEVICE_BOOT_UUID): New variables.
2542 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
2543 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
2545 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
2546 just assume `root' variable has the right value.
2547 * util/grub.d/10_linux.in: Likewise.
2548 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
2550 (main): Recognise `-t fs_uuid' argument.
2552 2008-05-30 Robert Millan <rmh@aybabtu.com>
2554 * util/biosdisk.c (map): Redefine structure to hold information
2555 about GRUB drive name.
2556 (get_drive): Reimplement without assuming (and verifying) BIOS-like
2558 (call_hook): Remove.
2559 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
2560 member. Assume drive has partitions.
2561 (grub_util_biosdisk_open): Access device names via `.device' struct
2563 (open_device): Likewise.
2564 (find_drive): Likewise.
2565 (read_device_map): Adjust map[] usage to match the new struct
2566 definition. Don't check for duplicates (still possible, but not cheap
2568 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
2569 (make_device_name): Remove assumption of BIOS-like drive names.
2571 2008-05-30 Pavel Roskin <proski@gnu.org>
2573 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
2574 compiling execute.c doesn't need grub_script.tab.h anymore.
2575 (normal/command.c_DEPENDENCIES): Likewise.
2576 (normal/function.c_DEPENDENCIES): Likewise.
2577 * conf/i386-ieee1275.rmk: Likewise.
2578 * conf/i386-linuxbios.rmk: Likewise.
2579 * conf/i386-pc.rmk: Likewise.
2580 * conf/powerpc-ieee1275.rmk: Likewise.
2581 * conf/sparc64-ieee1275.rmk: Likewise.
2583 2008-05-29 Pavel Roskin <proski@gnu.org>
2585 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
2586 when scanning metadata for volume group name.
2588 * include/grub/script.h: Don't include grub_script.tab.h. It's
2589 a generated file, which may only be included from the files with
2590 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
2591 use union YYSTYPE, as the later allows forward declaration.
2592 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
2594 2008-05-29 Robert Millan <rmh@aybabtu.com>
2596 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
2597 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
2598 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
2599 (grub_console_checkkey): Add grub_dprintf() call to report unknown
2602 2008-05-29 Robert Millan <rmh@aybabtu.com>
2604 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
2605 control key combinations.
2607 2008-05-29 Robert Millan <rmh@aybabtu.com>
2609 * util/powerpc/ieee1275/grub-install.in: Move from here ...
2610 * util/ieee1275/grub-install.in: ... to here.
2611 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
2612 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
2613 (grub_install_SOURCES): Likewise.
2615 2008-05-29 Robert Millan <rmh@aybabtu.com>
2617 * fs/affs.c: Update copyright year.
2618 * fs/ext2.c: Likewise.
2619 * fs/fshelp.c: Likewise.
2620 * fs/hfsplus.c: Likewise.
2621 * fs/ntfs.c: Likewise.
2622 * fs/xfs.c: Likewise.
2623 * include/grub/fshelp.h: Likewise.
2624 * util/grub-mkdevicemap.c: Likewise.
2626 2008-05-28 Robert Millan <rmh@aybabtu.com>
2628 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
2629 might need to be fatfs to support some firmware implementations
2632 2008-05-28 Robert Millan <rmh@aybabtu.com>
2634 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
2636 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2637 (make_device_map): Likewise.
2639 2008-05-20 Bean <bean123ch@gmail.com>
2641 * fs/fshelp.c (grub_fshelp_map_block): New function.
2642 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
2643 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
2645 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
2646 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
2647 (grub_fshelp_journal): New structure.
2648 (grub_fshelp_map_block): New function prototype.
2649 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
2650 (grub_fshelp_map_block): Likewise.
2652 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
2653 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
2654 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
2655 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
2656 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
2657 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
2658 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
2659 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
2660 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
2661 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
2662 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
2663 (grub_ext2_sblock): New members for journal support.
2664 (grub_ext3_journal_header): New structure.
2665 (grub_ext3_journal_revoke_header): Likewise.
2666 (grub_ext3_journal_block_tag): Likewise.
2667 (grub_ext3_journal_sblock): Likewise.
2668 (grub_fshelp_node): New members logfile and journal.
2669 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
2670 grub_fshelp_map_block to get real block number.
2671 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
2673 (grub_ext2_read_inode): Likewise.
2674 (grub_ext3_get_journal): New function.
2675 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
2676 (grub_ext2_close): Release memory used by journal.
2678 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
2679 (REISERFS_MAGIC_DESC_BLOCK): New macro.
2680 (grub_reiserfs_transaction_header): Renamed to
2681 grub_reiserfs_description_block, replace field data with real_blocks.
2682 (grub_reiserfs_commit_block): New structure.
2683 (grub_reiserfs_data): New member journal.
2684 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
2686 (grub_reiserfs_read_symlink): Likewise.
2687 (grub_reiserfs_iterate_dir): Likewise.
2688 (grub_reiserfs_open): Likewise.
2689 (grub_reiserfs_read): Likewise.
2690 (grub_reiserfs_get_journal): New function.
2691 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
2692 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
2693 using grub_reiserfs_get_journal.
2694 (grub_reiserfs_close): Release memory used by journal.
2696 * fs/affs.c (grub_affs_read_block): Change block type to
2697 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
2699 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
2701 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
2703 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
2705 * fs/udf.c (grub_udf_read_block): Change block type to
2706 grub_disk_addr_t. Use type cast to avoid warning.
2708 * fs/xfs.c (grub_xfs_read_block): Likewise.
2710 2008-05-16 Christian Franke <franke@computer.org>
2712 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
2713 to ensure that break with ESC will always work.
2714 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
2715 Remove ESC from keyboard queue.
2717 2008-05-16 Christian Franke <franke@computer.org>
2719 * util/biosdisk.c: [__CYGWIN__] Add includes.
2720 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
2721 (get_os_disk): Move variable declarations to OS specific
2722 parts to avoid warning.
2723 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
2724 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
2725 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
2727 * util/getroot.c: [__CYGWIN__] Add includes.
2728 (strip_extra_slashes): Fix "/" case.
2729 [__CYGWIN__] (get_win32_path): New function.
2730 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
2731 [__CYGWIN__] (find_root_device): Disable.
2732 [__CYGWIN__] (get_bootsec_serial): New function.
2733 [__CYGWIN__] (find_cygwin_root_device): Likewise.
2734 [__linux__] (grub_guess_root_device): Add early returns to simplify
2736 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
2737 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
2738 check for Linux only.
2740 2008-05-15 Bean <bean123ch@gmail.com>
2742 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
2743 keyboard hang problem in apple's intel mac.
2745 2008-05-09 Robert Millan <rmh@aybabtu.com>
2747 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
2749 * util/grub-mkdevicemap.c (get_virtio_disk_name)
2750 (make_device_map): Likewise.
2751 Reported by Aurelien Jarno <aurel32@debian.org>
2753 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
2755 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
2756 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
2757 (make_device_map): Output entries for xvd type disks.
2759 2008-05-07 Robert Millan <rmh@aybabtu.com>
2761 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
2763 * util/grub-mkdevicemap.c (get_cciss_disk_name)
2764 (make_device_map): Likewise.
2765 Reported by Roland Dreier <rdreier@cisco.com>
2767 2008-05-07 Robert Millan <rmh@aybabtu.com>
2769 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
2770 grub_strstr() call. Correct a few mistakes in failure path handling.
2772 2008-05-06 Robert Millan <rmh@aybabtu.com>
2774 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2775 Do not print a trailing slash (therefore, the root directory is an
2777 (convert_system_path_to_grub_path): Do not remove trailing slash
2778 from make_system_path_relative_to_its_root() output.
2780 * util/i386/pc/grub-install.in: Add trailing slash to output from
2781 make_system_path_relative_to_its_root().
2783 2008-05-06 Robert Millan <rmh@aybabtu.com>
2785 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
2786 ensures that output lines aren't intermangled with those sent to
2787 stderr (via grub_util_info()).
2788 * util/grub-probe.c (grub_refresh): Likewise.
2789 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
2791 2008-05-05 Christian Franke <franke@computer.org>
2793 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
2794 Add Cygwin device names.
2795 (get_ide_disk_name) [__CYGWIN__]: Likewise.
2796 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
2797 (check_device): Return error instead of success on empty name.
2798 (make_device_map): Move label inside linux specific code to
2799 prevent compiler warning.
2801 2008-04-30 Robert Millan <rmh@aybabtu.com>
2803 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
2804 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
2806 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
2808 2008-04-29 Robert Millan <rmh@aybabtu.com>
2810 * docs/grub.cfg: New file (example GRUB configuration).
2812 2008-04-26 Robert Millan <rmh@aybabtu.com>
2814 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
2815 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
2816 and `disk/ieee1275/nand.c'.
2818 2008-04-25 Bean <bean123ch@gmail.com>
2820 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
2823 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
2824 change the buffer size to 4096 for cdrom device.
2826 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
2828 (_linux_mod_SOURCES): New variable.
2829 (_linux_mod_CFLAGS): Likewise.
2830 (_linux_mod_LDFLAGS): Likewise.
2831 (linux_mod_SOURCES): Likewise.
2832 (linux_mod_CFLAGS): Likewise.
2833 (linux_mod_LDFLAGS): Likewise.
2834 (nand_mod_SOURCES): Likewise.
2835 (nand_mod_CFLAGS): Likewise.
2836 (nand_mod_LDFLAGS): Likewise.
2838 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
2839 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
2840 type property. (nand device in olpc don't have this property)
2842 * include/grub/disk.h (grub_disk_dev_id): New macro
2843 GRUB_DISK_DEVICE_NAND_ID.
2845 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
2847 (grub_rescue_cmd_initrd): Likewise.
2849 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
2850 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
2851 ofw_cif_handler and ofw_idt, adjust padding number.
2853 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
2854 GRUB_MACHINE_IEEE1275 is defined.
2856 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
2857 Use NESTED_FUNC_ATTR attribute on the hook parameter.
2859 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
2860 on nested function heap_init.
2861 (grub_upper_mem): New variable for i386-ieee1275.
2862 (grub_get_extended_memory): New function for i386-ieee1275.
2863 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
2865 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
2866 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
2869 * loader/i386/ieee1275/linux.c: New file.
2871 * loader/i386/ieee1275/linux_normal.c: New file.
2873 * disk/ieee1275/nand.c: New file.
2875 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
2877 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
2879 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
2881 2008-04-18 Robert Millan <rmh@aybabtu.com>
2883 Restructures early code path on ieee1275 to unify grub_main() as
2884 the first C function that is executed in every platform.
2886 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
2887 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
2889 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
2890 * kern/ieee1275/cmain.c (cmain): Rename to ...
2891 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
2892 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
2895 2008-04-18 Robert Millan <rmh@aybabtu.com>
2897 * util/update-grub.in: Fix syntax error when setting
2898 `GRUB_PRELOAD_MODULES'.
2899 Reported by Stephane Chazelas <stephane@artesyncp.com>
2901 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
2903 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
2904 section into account, newer toolchains generate unique build ids
2905 * configure.ac: remove the test for --build-id=none acceptance,
2906 we want build ids to be preserved
2907 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
2908 far from other sections don't cause the raw binary images grow
2911 2008-04-15 Robert Millan <rmh@aybabtu.com>
2913 * disk/lvm.c: Update copyright year.
2914 * kern/misc.c: Likewise.
2916 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
2918 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
2919 there is no memory left for physical volume name.
2921 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
2923 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
2924 volume name mapping to support bigger than 9 character names properly.
2926 2008-04-13 Robert Millan <rmh@aybabtu.com>
2928 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
2929 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
2931 2008-04-13 Christian Franke <franke@computer.org>
2933 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
2934 to create a floppy emulation boot CD when non emulation mode
2936 Enable Joliet CD filesystem extension.
2938 2008-04-13 Robert Millan <rmh@aybabtu.com>
2940 * kern/misc.c (grub_strncat): Fix off-by-one error.
2941 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
2943 * kern/env.c (grub_env_context_close): Clear current context, not
2945 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
2947 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
2949 2008-04-13 Robert Millan <rmh@aybabtu.com>
2951 Improve robustness when handling LVM.
2953 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
2954 (and leave `*p' unmodified).
2955 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
2957 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
2958 iterating through it.
2959 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
2961 (grub_lvm_scan_device): Check the return value (and fail gracefully
2962 when due) on each grub_lvm_getvalue() or grub_strstr() call.
2963 Don't assume `vg->pvs != NULL' when iterating through it.
2965 2008-04-13 Robert Millan <rmh@aybabtu.com>
2967 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
2968 * genmk.rb (partmap): New variable.
2969 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
2970 (#{partmap}): New target rule.
2971 * genpartmaplist.sh: New file.
2972 * Makefile.in (pkglib_DATA): Add partmap.lst.
2973 (partmap.lst): New target rule.
2974 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
2975 modules (including all partition maps), instead of preloading them.
2977 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
2979 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
2980 `linux-boot-prober' (if installed) to detect other operating
2981 systems which are installed on the computer and add them to
2983 * conf/common.rmk: Build and install 30_os-prober.
2985 2008-04-12 Robert Millan <rmh@aybabtu.com>
2987 * kern/powerpc/ieee1275/init.c: Move from here ...
2988 * kern/ieee1275/init.c: ... to here. Update all users.
2990 * kern/powerpc/ieee1275/cmain.c: Move from here ...
2991 * kern/ieee1275/cmain.c: ... to here. Update all users.
2993 * kern/powerpc/ieee1275/openfw.c: Move from here ...
2994 * kern/ieee1275/openfw.c: ... to here. Update all users.
2996 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
2997 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
2999 2008-04-10 Pavel Roskin <proski@gnu.org>
3001 * configure.ac: Always use "_cv_" in cache variables for
3002 compatibility with Autoconf 2.62.
3004 2008-04-07 Robert Millan <rmh@aybabtu.com>
3006 Revert grub/machine/init.h addition by Pavel (since it breaks on
3007 i386-ieee1275 and others):
3008 * util/i386/pc/misc.c: Remove grub/machine/init.h.
3009 * util/powerpc/ieee1275/misc.c: Likewise.
3011 2008-04-07 Robert Millan <rmh@aybabtu.com>
3013 * util/grub-probe.c (probe): Improve error message.
3015 2008-04-07 Robert Millan <rmh@aybabtu.com>
3017 * util/biosdisk.c (read_device_map): Skip devices that don't exist
3018 (this prevents the presence of a bogus entry from ruining the whole
3021 2008-04-06 Pavel Roskin <proski@gnu.org>
3023 * util/biosdisk.c: Include grub/util/biosdisk.h.
3024 * util/grub-fstest.c (execute_command): Make static.
3025 * util/grub-mkdevicemap.c (check_device): Likewise.
3026 * util/i386/pc/misc.c: Include grub/machine/init.h.
3027 * util/powerpc/ieee1275/misc.c: Likewise.
3028 * util/lvm.c: Include grub/util/lvm.h.
3029 * util/misc.c: Include grub/kernel.h, grub/misc.h and
3031 * util/raid.c: Include grub/util/raid.h.
3032 (grub_util_getdiskname): Make static.
3034 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
3035 grub_hostfs_fini(), as they are called from grub_init_all() and
3036 grub_fini_all() respectively. This fixes an infinite loop in
3037 grub-fstest due to double registration of hostfs.
3038 Reported by Christian Franke <Christian.Franke@t-online.de>
3040 2008-04-05 Pavel Roskin <proski@gnu.org>
3042 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
3043 all 8 functions. Otherwise, probe function 0 only.
3045 2008-04-04 Pavel Roskin <proski@gnu.org>
3047 * commands/lspci.c (grub_lspci_iter): Print the bus number
3050 * commands/lspci.c (grub_pci_classes): Fix typos.
3051 (grub_lspci_iter): Don't print func twice. Print vendor ID
3052 before device ID, as it's normally done.
3054 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
3055 Fix signedness warnings.
3056 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
3058 * util/ieee1275/get_disk_name.c: Include config.h so that
3059 _GNU_SOURCE is defined and getline() is declared. Mark an
3060 unused argument as such. Fix a signedness warning.
3062 2008-04-02 Pavel Roskin <proski@gnu.org>
3064 * genkernsyms.sh.in: Use more robust assignments for CC and
3065 srcdir. Quote srcdir.
3066 * gensymlist.sh.in: Likewise. Assert at the compile time that
3067 the symbol table is not empty.
3069 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
3070 * fs/cpio.c (grub_cpio_read): Likewise.
3072 2008-04-01 Pavel Roskin <proski@gnu.org>
3074 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
3075 * disk/host.c (grub_host_open): Likewise.
3076 * disk/loopback.c (grub_loopback_open): Likewise.
3077 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
3078 disk->id as in disk/host.c, not a multi-character constant.
3080 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
3081 later is obsolete, potentially dangerous and sets a bad example.
3082 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
3083 * util/misc.c (grub_util_get_image_size): Likewise.
3085 * disk/loopback.c (options): Improve help for "--partitions".
3087 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
3088 options to align them with the short options, e.g. "echo -e".
3090 2008-03-31 Bean <bean123ch@gmail.com>
3092 * video/reader/png.c (grub_png_data): New member is_16bit and
3094 (grub_png_decode_image_header): Detect 16 bit png image.
3095 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
3096 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
3097 (grub_video_reader_png): Release memory occupied by image_data.
3099 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
3101 (grub_nfs_mount): Skip the test for sector per cluster.
3103 * include/grub/ntfs.h (MAX_SPC): Removed.
3105 2008-03-31 Bean <bean123ch@gmail.com>
3107 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
3108 (grub_probe_SOURCES): Add fs/afs.c.
3109 (grub_fstest_SOURCES): Likewise.
3110 (afs_mod_SOURCES): New variable.
3111 (afs_mod_CFLAGS): Likewise.
3112 (afs_mod_LDFLAGS): Likewise.
3114 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
3115 (grub_emu_SOURCES): Likewise.
3117 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3119 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3121 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3123 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3125 * fs/afs.c: New file.
3127 2008-03-30 Pavel Roskin <proski@gnu.org>
3129 * disk/host.c: Include grub/misc.h to fix a warning.
3130 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
3131 warnings about implicit declarations.
3133 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
3135 * include/grub/i386/loader.h: Change declaration of
3136 grub_linux_boot() to match what grub_loader_set() expects.
3137 * util/getroot.c (grub_guess_root_device): Return const char* to
3139 * util/grub-probe.c (probe): Fix a warning about uninitialized
3140 abstraction_name variable.
3141 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
3142 second argument as unused to fix a warning.
3144 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
3145 missing grub_error() call.
3147 * util/update-grub_lib.in: Define datarootdir, since Autoconf
3148 2.60 and newer uses it to define datadir.
3150 * commands/sleep.c: Fix warning about implicit declaration.
3151 * disk/memdisk.c: Likewise.
3152 * loader/aout.c: Likewise.
3153 * loader/i386/bsd_normal.c: Likewise.
3154 * util/grub-probe.c: Likewise.
3156 * commands/i386/cpuid.c (has_longmode): Make static.
3157 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
3158 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
3160 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
3161 GDT. This is more robust, as %ds can change.
3162 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
3163 calling real_to_prot().
3164 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
3166 2008-03-28 Pavel Roskin <proski@gnu.org>
3168 * kern/i386/pc/startup.S: Assert that uncompressed functions
3169 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
3170 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
3171 code, as they push parts of the code (error handlers) beyond
3172 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
3173 code as correctness and size.
3175 2008-03-28 Pavel Roskin <proski@gnu.org>
3177 * kern/i386/pc/startup.S
3178 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
3179 data block address to the real mode, keep offset minimal. This
3180 works around a bug in AWARD BIOS on old Athlon systems, which
3181 makes CD detection hang.
3183 2008-03-26 Pavel Roskin <proski@gnu.org>
3185 * normal/color.c (grub_parse_color_name_pair): Make `name' a
3187 * include/grub/normal.h: Add grub_parse_color_name_pair()
3190 2008-03-24 Bean <bean123ch@gmail.com>
3192 * disk/i386/pc/biosdisk.c (cd_start): Removed.
3193 (cd_count): Removed.
3194 (cd_drive): New variable.
3195 (grub_biosdisk_get_drive): Don't check for (cdN) device.
3196 (grub_biosdisk_call_hook): Likewise.
3197 (grub_biosdisk_iterate): Change cdrom detection method.
3198 (grub_biosdisk_open): Replace cd_start with cd_drive.
3199 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
3200 detect cdrom device.
3202 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
3204 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
3205 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
3206 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
3207 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
3208 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
3209 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
3210 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
3211 (grub_biosdisk_cdrp): New structure.
3212 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
3214 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
3216 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
3219 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
3222 2008-03-20 Robert Millan <rmh@aybabtu.com>
3224 Remove 2 TiB limit in ata.mod.
3225 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
3226 (grub_ata_dumpinfo): Print sector count with 0x%llx.
3227 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
3228 grub_uint64_t instead of grub_uint32_t.
3230 2008-03-05 Bean <bean123ch@gmail.com>
3232 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
3233 (grub_multiboot): Set boot device.
3235 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
3237 2008-03-02 Bean <bean123ch@gmail.com>
3239 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
3242 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
3244 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
3247 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
3250 * docs/fdl.texi: New file.
3252 * docs/mdate-sh: New file. Copied from gnulib.
3253 * docs/texinfo.tex: Likewise.
3255 * config.guess: Updated from gnulib.
3256 * install-sh: Likewise.
3258 2008-02-28 Robert Millan <rmh@aybabtu.com>
3260 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
3261 (aout_mod_SOURCES): New variable.
3262 (aout_mod_CFLAGS): Likewise.
3263 (aout_mod_LDFLAGS): Likewise.
3265 * conf/i386-ieee1275.rmk: Likewise.
3267 2008-02-28 Robert Millan <rmh@aybabtu.com>
3269 * util/update-grub.in: Reorganise terminal validity check. Accept
3270 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
3271 Based on suggestion by Franklin PIAT.
3273 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
3275 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
3277 * util/getroot.c (grub_util_check_block_device): New function that
3278 returns the given argument if it is a block device and returns NULL else.
3279 * util/grub-probe.c (argument_is_device): New variable.
3280 (probe): Promote device_name from a variable to an argument. Receive
3281 device_name from grub_util_check_block_device() if path is NULL and from
3282 grub_guess_root_device() else. Do not free() device_name anymore.
3283 (options): Introduce new parameter '-d, --device'.
3284 (main): Add description of the new parameter to the help screen.
3285 Rename path variable to argument. Set argument_is_device if the '-d'
3286 option is given. Pass argument to probe() depending on
3289 2008-02-24 Bean <bean123ch@gmail.com>
3291 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
3292 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
3293 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
3294 (GRUB_ISO9660_VOLDESC_PART): Likewise.
3295 (GRUB_ISO9660_VOLDESC_END): Likewise.
3296 (grub_iso9660_primary_voldesc): New member escape.
3297 (grub_iso9660_data): New member joliet.
3298 (grub_iso9660_convert_string): New function.
3299 (grub_iso9660_mount): Detect joliet extension.
3300 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
3301 (grub_iso9660_iso9660_label): Likewise.
3303 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
3304 (grub_setup_SOURCES): Add fs/udf.c.
3305 (grub_fstest_SOURCES): Likewise.
3306 (udf_mod_SOURCES): New variable.
3307 (udf_mod_CFLAGS): Likewise.
3308 (udf_mod_LDFLAGS): Likewise.
3310 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3311 (grub_emu_SOURCES): Likewise.
3313 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3315 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3317 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3319 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3321 * fs/udf.c: New file.
3323 2008-02-24 Robert Millan <rmh@aybabtu.com>
3325 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3326 (normal/lexer.c_DEPENDENCIES): New variables.
3327 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3328 (normal/lexer.c_DEPENDENCIES): Likewise.
3329 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3330 (normal/lexer.c_DEPENDENCIES): Likewise.
3331 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3332 (normal/lexer.c_DEPENDENCIES): Likewise.
3333 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3334 (normal/lexer.c_DEPENDENCIES): Likewise.
3335 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3336 (normal/lexer.c_DEPENDENCIES): Likewise.
3338 2008-02-23 Robert Millan <rmh@aybabtu.com>
3340 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3341 since they were intended to be in hex. This didn't break previously
3342 because of a bug in gpt_partition_map_iterate() (see below).
3344 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3345 when checking the validity of GPT header.
3346 Remove `partno', since it always provides the same information as `i'.
3348 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
3350 * include/grub/efi/time.h: Fix a wrong comment.
3352 2008-02-19 Pavel Roskin <proski@gnu.org>
3354 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3357 2008-02-19 Bean <bean123ch@gmail.com>
3359 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3360 (aout_mod_SOURCES): New variable.
3361 (aout_mod_CFLAGS): Likewise.
3362 (aout_mod_LDFLAGS): Likewise.
3363 (_bsd_mod_SOURCES): New variable.
3364 (_bsd_mod_CFLAGS): Likewise.
3365 (_bsd_mod_LDFLAGS): Likewise.
3366 (bsd_mod_SOURCES): New variable.
3367 (bsd_mod_CFLAGS): Likewise.
3368 (bsd_mod_LDFLAGS): Likewise.
3370 * include/grub/aout.h: New file.
3372 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3374 * include/grub/i386/bsd.h: New file.
3376 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3379 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3380 function is called, so that it's possible to change it inside the hook.
3381 (grub_elf64_load): Likewise.
3382 (grub_elf_file): Don't close the file if elf header is not found.
3383 (grub_elf_close): Close the file if grub_elf_file fails (The new
3384 grub_elf_file won't close it).
3385 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3386 (grub_elf64_size): Likewise.
3388 * kern/i386/loader.S (grub_unix_real_boot): New function.
3390 * loader/aout.c: New file.
3392 * loader/i386/bsd.c: New file.
3394 * loader/i386/bsd_normal.c: New file.
3396 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3398 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3399 can test other formats.
3401 2008-02-19 Robert Millan <rmh@aybabtu.com>
3403 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3404 (grub_gpt_partition_type_empty): Redefine with macro from
3405 `<grub/gpt_partition.h>'.
3406 (gpt_partition_map_iterate): Adjust partition type comparison.
3408 Export `entry' as partmap-specific `part.data' struct.
3409 (grub_gpt_header, grub_gpt_partentry): Move from here ...
3411 * include/grub/gpt_partition.h (grub_gpt_header)
3412 (grub_gpt_partentry): ... to here (new file).
3414 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3416 (grub_gpt_partition_type_bios_boot): New const variable, defined
3417 with macro from `<grub/gpt_partition.h>'.
3419 (setup): Replace `first_start' with `embed_region', which keeps
3420 track of the embed region (and is partmap-agnostic).
3422 Replace find_first_partition_start() with find_usable_region(),
3423 which finds a usable region for embedding using partmap-specific
3424 knowledge (supports PC/MSDOS and GPT).
3426 Fix all assumptions that the embed region start at sector 1, using
3427 `embed_region.start' from now on. Similarly, use `embed_region.end'
3428 rather than `first_start' to calculate available size.
3430 In grub_util_info() message, replace "into after the MBR" with an
3431 indication of the specific sector our embed region starts at.
3433 2008-02-19 Robert Millan <rmh@aybabtu.com>
3435 * DISTLIST: Replace `commands/ieee1275/halt.c' and
3436 `commands/ieee1275/reboot.c' with `commands/halt.c' and
3437 `commands/reboot.c'.
3438 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3439 (halt_mod_SOURCES): Likewise.
3440 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3441 (halt_mod_SOURCES): Likewise.
3443 2008-02-17 Christian Franke <franke@computer.org>
3445 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3447 2008-02-17 Robert Millan <rmh@aybabtu.com>
3449 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3450 set `first_start' to 0 for non-PC/MSDOS partition maps.
3452 2008-02-16 Robert Millan <rmh@aybabtu.com>
3454 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3455 do not assume partition map is PC/MSDOS before performing checks that
3456 are specific to that layout.
3458 2008-02-13 Robert Millan <rmh@aybabtu.com>
3460 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3461 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3462 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3464 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
3466 * configure.ac: Only a cosmetic change on the handling of
3467 -fno-stack-protector.
3469 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
3471 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3472 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3474 (grub_install_SOURCES): Add halt.mod and reboot.mod.
3475 (halt_mod_SOURCES): New variable.
3476 (halt_mod_CFLAGS): Likewise.
3477 (halt_mod_LDFLAGS): Likewise.
3478 (reboot_mod_SOURCES): Likewise.
3479 (reboot_mod_CFLAGS): Likewise.
3480 (reboot_mod_LDFLAGS): Likewise.
3482 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3483 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3485 (halt_mod_SOURCES): Likewise.
3486 (reboot_mod_SOURCES): Likewise.
3488 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3489 commands/i386/pc/reboot.c by commands/reboot.c.
3490 (reboot_mod_SOURCES): Likewise.
3492 * commands/i386/pc/reboot.c: merge this file ...
3494 * commands/ieee1275/reboot.c: ... and this file ...
3496 * commands/reboot.c: ... to this file.
3497 Add some precompiler directive to include the correct header for
3500 * commands/ieee1275/halt.c: move this file ...
3502 * commands/halt.c: ... to here.
3503 Add some precompiler directive to include the correct header for
3506 * include/grub/efi/efi.h (grub_reboot): New function declaration.
3507 (grub_halt): Likewise.
3509 * kern/efi/efi.c (grub_reboot): New function.
3510 (grub_halt): Likewise.
3512 2008-02-12 Robert Millan <rmh@aybabtu.com>
3514 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
3515 /dev (like it is done for /dev/mapper). This doesn't provide support
3516 for EVMS, but at least it is now easy to identify the problem when it
3519 2008-02-11 Robert Millan <rmh@aybabtu.com>
3521 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
3522 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
3523 comparing it with -1, not 0.
3525 2008-02-10 Robert Millan <rmh@aybabtu.com>
3527 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
3529 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3530 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
3532 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
3533 `disk/lvm.c' to the end of the list.
3534 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3535 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3537 2008-02-10 Robert Millan <rmh@aybabtu.com>
3539 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
3540 grub_print_error() instead. This will let user know why we're entering
3542 Based on suggestions from Sam Morris.
3544 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
3546 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
3547 on remaining N args, instead of "--" arg N times.
3549 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
3551 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
3552 (fill_with_default_glyph): Changed to use unknown_glyph for fill
3553 pattern for unknown glyphs.
3555 2008-02-09 Robert Millan <rmh@aybabtu.com>
3557 * configure.ac: Probe for `help2man'.
3558 * Makefile.in (builddir): New variable.
3559 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
3560 or otherwise add a few flags/options to it.
3561 (install-local): For every executable utility or script that is
3562 installed, invoke $(HELP2MAN) to install a manpage based on --help
3565 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
3566 that it doesn't prevent --help from working in build tree.
3568 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
3569 with `bug-grub@gnu.org'.
3570 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
3571 * util/update-grub.in (usage): New function.
3572 Implement proper argument check, with support for --help and --version
3573 (as well as existing -y).
3575 2008-02-09 Christian Franke <franke@computer.org>
3577 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
3578 avoid overwriting previous output.
3579 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
3581 2008-02-09 Robert Millan <rmh@aybabtu.com>
3583 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
3586 2008-02-09 Robert Millan <rmh@aybabtu.com>
3588 * commands/sleep.c: New file.
3589 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
3590 (sleep_mod_SOURCES): New variable.
3591 (sleep_mod_CFLAGS): Likewise.
3592 (sleep_mod_LDFLAGS): Likewise.
3594 2008-02-09 Robert Millan <rmh@aybabtu.com>
3596 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
3597 situations in which we can deduce the RAID size and the superblock
3600 2008-02-09 Robert Millan <rmh@aybabtu.com>
3602 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
3603 and return a grub_diskmemberlist_t composed of LVM physical volumes.
3604 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
3606 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
3607 and return a grub_diskmemberlist_t composed of physical array members.
3608 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
3610 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
3612 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
3613 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
3614 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
3616 * util/grub-probe.c (probe): Move partmap probing code from here ...
3617 (probe_partmap): ... to here.
3618 (probe): Use probe_partmap() once for the disk we're probing, and
3619 additionally, when such disk contains a memberlist() struct member,
3620 once for each disk that is contained in the structure returned by
3623 2008-02-09 Robert Millan <rmh@aybabtu.com>
3625 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
3626 environment variable to 'all' in order to obtain debug output from
3628 * util/i386/pc/grub-setup.c (main): Likewise.
3630 2008-02-08 Robert Millan <rmh@aybabtu.com>
3632 * disk/raid.c (grub_raid_scan_device): Check for
3633 `array->device[sb.this_disk.number]' rather than for
3634 `array->device[sb.this_disk.number]->name', since the latter is not
3635 guaranteed to be accessible.
3637 2008-02-08 Robert Millan <rmh@aybabtu.com>
3639 * disk/raid.c: Update copyright.
3640 * fs/cpio.c: Likewise.
3641 * include/grub/raid.h: Likewise.
3642 * loader/i386/pc/multiboot.c: Likewise.
3643 * util/hostfs.c: Likewise.
3645 2008-02-08 Robert Millan <rmh@aybabtu.com>
3647 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
3648 to a grub_disk_t array.
3649 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
3651 (grub_raid_scan_device): Replace `device[x].name' accesses with
3652 `device[x]->name'. Simplify initialization of `array->device[x]'.
3654 2008-02-08 Robert Millan <rmh@aybabtu.com>
3656 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
3657 grub_dprintf() calls.
3658 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
3661 2008-02-07 Christian Franke <franke@computer.org>
3663 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
3664 instead of fseek and ftell to support large files.
3665 (grub_hostfs_read): Likewise.
3667 2008-02-07 Robert Millan <rmh@aybabtu.com>
3669 Patch from Jeroen Dekkers.
3670 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
3671 failure, since successfully reading all array members might not be
3674 2008-02-06 Robert Millan <rmh@aybabtu.com>
3676 * util/grub-probe.c (probe): Simplify partmap probing (with the
3677 assumption that the first word up to the underscore equals to
3680 2008-02-06 Christian Franke <franke@computer.org>
3682 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
3683 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
3684 last block of a cpio or tar stream.
3685 Check for "TRAILER!!!" instead of any empty data
3686 block to detect last block of a cpio stream.
3687 (grub_cpio_dir): Fix constness of variable np.
3688 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
3689 cpio or tar trailer is detected. This fixes a crash
3690 on open of a non existing file.
3692 2008-02-05 Bean <bean123ch@gmail.com>
3694 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
3696 (grub_multiboot_load_elf64): Likewise.
3697 (grub_multiboot): Initialize mbi structure.
3699 * util/grub-fstest.c: Don't include unused header file script.h.
3701 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
3703 (grub_fstest_SOURCES): Likewise.
3705 2008-02-05 Robert Millan <rmh@aybabtu.com>
3707 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
3708 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
3709 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
3710 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
3712 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
3713 (translation_table): Replace hardcoded values with macros
3714 provided by `<grub/term.h>'.
3716 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
3717 (keyboard_map): Correct/add a few values, with macros provided
3719 (keyboard_map_shift): Zero values that don't differ from their
3720 `keyboard_map' equivalents.
3721 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
3722 Discard the second scan code that is always sent by Caps lock.
3723 Only use `keyboard_map_shift' when it provides a non-zero value,
3724 otherwise fallback to `keyboard_map'.
3726 2008-02-04 Bean <bean123ch@gmail.com>
3728 * Makefile.in (enable_grub_fstest): New variable.
3730 * conf/common.rmk (grub_fstest_init.lst): New rule.
3731 (grub_fstest_init.h): Likewise.
3732 (grub_fstest_init.c): Likewise.
3733 (util/grub-fstest.c_DEPENDENCIES): New variable.
3734 (grub_fstest_SOURCES): Likewise.
3736 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
3738 * util/grub-fstest.c: New file.
3740 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3742 Make grub-setup handle a separate root device.
3744 * util/i386/pc/grub-setup.c (setup): Always open the root device,
3745 so that the root device can be compared with the destination
3747 When embedding the core image, if the root and destination devices
3748 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
3750 When not embedding, set ROOT_DRIVE to 0xFF.
3752 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3754 Add support for having a grub directory in a different drive. This
3755 is still only the data handling part.
3757 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
3758 (codestart): Save %dh in GRUB_ROOT_DRIVE.
3759 (grub_root_drive): New variable.
3761 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
3762 instead of GRUB_BOOT_DRIVE to construct a device name. Set
3763 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
3766 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
3768 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
3770 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
3772 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
3773 is bogus, because PXE booting does not specify any drive
3776 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
3777 am not sure if this is really correct.
3779 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
3780 is always identical to the boot drive when booting from a CD.
3782 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
3784 (root_drive): New variable.
3785 (real_start): Unconditionally set %dh to ROOT_DRIVE.
3786 (setup_sectors): Push %dx right after popping it, because %dh will
3788 (copy_buffer): Restore %dx.
3790 2008-02-03 Robert Millan <rmh@aybabtu.com>
3792 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
3793 use `cdboot.img' for cdrom images.
3795 2008-02-03 Robert Millan <rmh@aybabtu.com>
3797 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
3798 only setup gfxterm when `font' command has succeeded.
3800 2008-02-03 Robert Millan <rmh@aybabtu.com>
3802 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
3803 (grub_rescue_cmd_multiboot_loader)
3804 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
3806 2008-02-03 Pavel Roskin <proski@gnu.org>
3808 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
3809 %edx and %esi from stack only after grub_gate_a20() is called.
3810 grub_gate_a20() clobbers %edx.
3812 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3814 * configure.ac (AC_INIT): Bumped to 1.96.
3816 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
3817 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
3818 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
3819 video/readers/png.c.
3821 2008-02-03 Bean <bean123ch@gmail.com>
3823 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
3824 (cdboot_img_SOURCES): New variable.
3825 (cdboot_img_ASFLAGS): New variable.
3826 (cdboot_img_LDFLAGS): New variable.
3828 * boot/i386/pc/cdboot.S: New file.
3830 * disk/i386/pc/biosdisk.c (cd_start): New variable.
3831 (cd_count): Likewise.
3832 (grub_biosdisk_get_drive): Add support for cd device.
3833 (grub_biosdisk_call_hook): Likewise.
3834 (grub_biosdisk_iterate): Likewise.
3835 (grub_biosdisk_open): Likewise.
3836 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
3837 (grub_biosdisk_rw): Support reading from cd device.
3838 (GRUB_MOD_INIT): Iterate cd devices.
3840 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
3841 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
3842 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
3844 * kern/i386/pc/init.c (make_install_device): Check for cd device.
3846 2008-02-02 Robert Millan <rmh@aybabtu.com>
3848 * commands/read.c: New file.
3849 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
3850 (read_mod_SOURCES): New variable.
3851 (read_mod_CFLAGS): Likewise.
3852 (read_mod_LDFLAGS): Likewise.
3854 2008-02-02 Robert Millan <rmh@aybabtu.com>
3856 * normal/main.c (grub_normal_execute): Check for `menu->size' when
3857 determining whether menu has to be displayed.
3859 2008-02-02 Marco Gerards <marco@gnu.org>
3861 * bus/pci.c: New file.
3863 * include/grub/pci.h: Likewise.
3865 * include/grub/i386/pc/pci.h: Likewise.
3867 * commands/lspci.c: Likewise.
3869 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
3871 (pci_mod_SOURCES): New variable.
3872 (pci_mod_CFLAGS): Likewise.
3873 (pci_mod_LDFLAGS): Likewise.
3874 (lspci_mod_SOURCES): Likewise.
3875 (lspci_mod_CFLAGS): Likewise.
3876 (lspci_mod_LDFLAGS): Likewise.
3878 2008-02-02 Bean <bean123ch@gmail.com>
3880 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
3881 (grub_ufs_get_file_block): Fix indirect block calculation problem.
3883 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
3884 (grub_xfs_btree_node): New structure.
3885 (grub_xfs_btree_root): New structure.
3886 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
3887 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
3888 (GRUB_XFS_EXTENT_BLOCK): Likewise.
3889 (GRUB_XFS_EXTENT_SIZE): Likewise.
3890 (grub_xfs_read_block): Support btree format type.
3891 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
3892 Use directory block as basic unit.
3894 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
3896 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
3897 __attribute__ ((__regparm__ (1))).
3899 2008-02-01 Robert Millan <rmh@aybabtu.com>
3901 Correct a mistake in previous commit.
3903 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
3905 (normal/command.c_DEPENDENCIES): New variable.
3907 2008-02-01 Robert Millan <rmh@aybabtu.com>
3909 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
3911 (normal/command.c_DEPENDENCIES): New variable.
3912 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
3913 * conf/i386-ieee1275.rmk: Likewise.
3914 * conf/i386-linuxbios.rmk: Likewise.
3915 * conf/i386-pc.rmk: Likewise.
3916 * conf/sparc64-ieee1275.rmk: Likewise.
3917 * conf/powerpc-ieee1275.rmk: Likewise.
3918 (grub_emu_SOURCES): Add `fs/fshelp.c'.
3920 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
3922 2008-02-01 Robert Millan <rmh@aybabtu.com>
3924 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
3925 call at beginning of function.
3927 2008-01-31 Pavel Roskin <proski@gnu.org>
3929 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
3930 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
3931 (grub_mkrescue_SOURCES): Likewise.
3932 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
3934 2008-01-30 Robert Millan <rmh@aybabtu.com>
3936 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
3937 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
3938 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
3939 (grub_probe_SOURCES): ... to here.
3941 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
3942 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
3943 * conf/i386-ieee1275.rmk: Likewise.
3944 * conf/i386-linuxbios.rmk: Likewise.
3945 * conf/powerpc-ieee1275.rmk: Likewise.
3947 2008-01-30 Tristan Gingold <gingold@free.fr>
3949 * kern/rescue.c: Silently accept empty lines.
3951 2008-01-29 Bean <bean123ch@gmail.com>
3953 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
3954 (real_code_2): Code cleanup and change comment style.
3955 (move_memory): Avoid using 32-bit address mode.
3957 2008-01-29 Bean <bean123ch@gmail.com>
3959 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
3960 (png_mod_SOURCES): New variable.
3961 (png_mod_CFLAGS): Likewise.
3962 (png_mod_LDFLAGS): Likewise.
3964 * video/readers/png.c: New file.
3966 2008-01-28 Robert Millan <rmh@aybabtu.com>
3968 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
3969 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
3970 `ifndef GRUB_MOD_GAP' hack.
3971 * util/elf/grub-mkimage.c (add_segments): Likewise.
3973 2008-01-27 Robert Millan <rmh@aybabtu.com>
3975 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
3976 `GRUB_MOD_GAP' for platforms in which it's not defined.
3977 * util/elf/grub-mkimage.c (add_segments): Likewise.
3979 2008-01-27 Robert Millan <rmh@aybabtu.com>
3981 Get grub-emu to build again (including parallel builds).
3983 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
3985 (util/grub-emu.c_DEPENDENCIES): ... this, ...
3986 (normal/execute.c_DEPENDENCIES): ... this, ...
3987 (grub-emu_DEPENDENCIES): ... and this.
3989 * conf/i386-efi.rmk: Likewise.
3990 * conf/i386-linuxbios.rmk: Likewise.
3991 * conf/i386-ieee1275.rmk: Likewise.
3992 * conf/powerpc-ieee1275.rmk: Likewise.
3993 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
3995 2008-01-27 Robert Millan <rmh@aybabtu.com>
3997 * NEWS: Add a few items.
3999 2008-01-27 Robert Millan <rmh@aybabtu.com>
4001 Fix parallel builds with grub-emu. Based on earlier commit for
4002 grub-probe and grub-setup.
4004 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4005 (util/grub-emu.c_DEPENDENCIES): ... this.
4006 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4007 (util/grub-emu.c_DEPENDENCIES): ... this.
4008 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4009 (util/grub-emu.c_DEPENDENCIES): ... this.
4010 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4011 (util/grub-emu.c_DEPENDENCIES): ... this.
4012 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
4013 (util/grub-emu.c_DEPENDENCIES): ... this.
4015 2008-01-27 Pavel Roskin <proski@gnu.org>
4017 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
4018 to create a gap between _end and the modules added to the image
4019 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
4020 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
4021 * util/elf/grub-mkimage.c (add_segments): Likewise.
4023 2008-01-26 Pavel Roskin <proski@gnu.org>
4025 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
4026 just return an error.
4028 2008-01-26 Bean <bean123ch@gmail.com>
4030 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
4031 (grub_reiserfs_get_item): Save offset of the next item.
4032 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
4034 2008-01-25 Robert Millan <rmh@aybabtu.com>
4036 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
4037 make all filesystem sources appear together (possibly fixing omissions
4039 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4040 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4041 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4042 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4044 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
4046 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
4047 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4048 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
4049 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
4051 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
4052 (probe): Add a sanity check to make sure of our ability to read
4053 requested files when probing for filesystem type.
4055 * genmk.rb: Update copyright year (2007).
4057 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
4058 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
4059 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
4060 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
4061 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
4062 : Remove function prototypes.
4064 2008-01-25 Robert Millan <rmh@aybabtu.com>
4066 Revert my previous commits (based on wrong assumption of how grub_errno
4069 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
4070 * kern/file.c (grub_file_open): Likewise.
4072 2008-01-24 Pavel Roskin <proski@gnu.org>
4074 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
4075 that hang if GRUB tries to setup colors.
4076 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
4077 colors for firmwares that don't support it.
4078 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
4079 Recognize Open Hack'Ware, set flags to work around its
4082 2008-01-24 Robert Millan <rmh@aybabtu.com>
4084 * kern/file.c (grub_file_open): Do not account previous failures of
4085 unrelated functions when grub_errno is checked for.
4086 Reported by Oleg Strikov.
4088 2008-01-24 Bean <bean123ch@gmail.com>
4090 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
4091 (grub_ufs_sblock): New member volume name.
4092 (grub_ufs_find_file): Fix string copy bug.
4093 (grub_ufs_label): Implement this function properly.
4095 * fs/hfs.c (grub_hfs_cnid_type): New enum.
4096 (grub_hfs_iterate_records): Use the correct file number for extents
4097 and catalog file. Fix problem in next index calculation.
4098 (grub_hfs_find_node): Replace recursive function call with loop.
4099 (grub_hfs_iterate_dir): Replace recursive function call with loop.
4101 2008-01-23 Robert Millan <rmh@aybabtu.com>
4103 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
4104 `<grub/symbol.h>' and `<grub/multiboot.h>'.
4105 (grub_multiboot2_real_boot): New function prototype.
4107 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
4108 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
4110 * kern/i386/ieee1275/init.c (grub_os_area_addr)
4111 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
4113 2008-01-23 Robert Millan <rmh@aybabtu.com>
4115 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
4116 #ifdef'ed out grub_printf().
4118 2008-01-23 Robert Millan <rmh@aybabtu.com>
4120 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
4121 grub_dprintf calls, since they make "debug=all" mode unusable.
4122 (grub_console_checkkey): Likewise.
4124 2008-01-23 Robert Millan <rmh@aybabtu.com>
4126 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4127 `term/i386/pc/at_keyboard.c'.
4128 (pkglib_MODULES): Add `serial.mod'.
4129 (serial_mod_SOURCES): New variable.
4130 (serial_mod_CFLAGS): Likewise.
4131 (serial_mod_LDFLAGS): Likewise.
4133 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
4134 `<grub/powerpc/ieee1275/console.h>'.
4135 (grub_keyboard_controller_init): New function prototype.
4136 (grub_console_checkkey): Likewise.
4137 (grub_console_getkey): Likewise.
4139 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
4142 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
4143 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
4145 2008-01-23 Robert Millan <rmh@aybabtu.com>
4147 * kern/i386/pc/init.c (make_install_device): When memdisk image is
4148 present, "(memdisk)/boot/grub" becomes the default prefix.
4150 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
4151 a memdisk tarball with all the modules. Add --overlay=DIR option that
4152 allows users to overlay additional files into the image.
4154 2008-01-23 Robert Millan <rmh@aybabtu.com>
4156 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
4157 and `machine/memory.h'.
4158 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
4159 (_multiboot_mod_SOURCES): New variable.
4160 (_multiboot_mod_CFLAGS): Likewise.
4161 (_multiboot_mod_LDFLAGS): Likewise.
4162 (multiboot_mod_SOURCES): Likewise.
4163 (multiboot_mod_CFLAGS): Likewise.
4164 (multiboot_mod_LDFLAGS): Likewise.
4166 * include/grub/i386/ieee1275/loader.h: New file.
4168 * include/grub/i386/ieee1275/machine.h: Likewise.
4170 * include/grub/i386/ieee1275/memory.h: Likewise.
4172 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
4173 variable declaration.
4174 (grub_os_area_size): Likewise.
4176 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
4177 (grub_lower_mem, grub_upper_mem): New variables.
4178 (grub_stop_floppy): New function (just to make
4179 grub_multiboot2_real_boot() happy).
4181 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
4182 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
4183 (grub_stop): New function.
4184 Include `"../realmode.S"' and `"../loader.S"'.
4186 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
4187 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
4189 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
4190 rely on grub_multiboot2_real_boot() for final boot.
4192 2008-01-22 Robert Millan <rmh@aybabtu.com>
4194 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
4195 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
4196 device that doesn't look like an SD card.
4197 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
4198 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
4199 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
4200 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
4203 2008-01-22 Robert Millan <rmh@aybabtu.com>
4205 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
4206 avoid claiming over our own code.
4208 2008-01-22 Bean <bean123ch@gmail.com>
4210 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
4211 (jpeg_mod_SOURCES): New variable.
4212 (jpeg_mod_CFLAGS): Likewise.
4213 (jpeg_mod_LDFLAGS): Likewise.
4215 * video/readers/jpeg.c : New file.
4217 2008-01-22 Bean <bean123ch@gmail.com>
4219 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
4220 there are no more items.
4222 2008-01-21 Robert Millan <rmh@aybabtu.com>
4224 * kern/mm.c (grub_mm_init_region): Improve debug message.
4226 2008-01-21 Robert Millan <rmh@aybabtu.com>
4228 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
4229 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
4231 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
4233 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
4234 Indicates start of upper memory.
4235 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
4236 (generate_image): Abort when image size is big enough to corrupt
4239 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
4240 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
4241 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4242 instead of hardcoding 0xA0000.
4243 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
4244 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
4245 instead of hardcoding 0xA0000.
4247 2008-01-21 Robert Millan <rmh@aybabtu.com>
4249 * disk/memdisk.c (memdisk_size): New variable.
4250 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
4252 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
4253 image to dynamic memory.
4254 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
4255 `memdisk_size'. Free memdisk block.
4257 2008-01-21 Robert Millan <rmh@aybabtu.com>
4259 Fix detection of very small filesystems (like tar).
4261 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
4262 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
4263 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
4264 a problem with this disk).
4266 2008-01-21 Robert Millan <rmh@aybabtu.com>
4268 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
4269 on grub_biosdisk_rw_standard() error.
4271 2008-01-21 Robert Millan <rmh@aybabtu.com>
4273 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
4275 * kern/elf.c: Likewise.
4276 * kern/ieee1275/ieee1275.c: Likewise.
4277 * kern/powerpc/ieee1275/openfw.c: Likewise.
4278 * term/ieee1275/ofconsole.c: Likewise.
4280 2008-01-21 Robert Millan <rmh@aybabtu.com>
4282 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
4284 * include/grub/kernel.h (grub_arch_memdisk_addr)
4285 (grub_arch_memdisk_size): Moved from here ...
4287 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
4288 (grub_arch_memdisk_size): ... to here.
4290 2008-01-21 Robert Millan <rmh@aybabtu.com>
4292 Mostly based on bugfix from Bean.
4294 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
4295 attribute with hook() parameter.
4296 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
4298 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
4299 attribute with hook() parameter.
4300 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
4303 2008-01-21 Robert Millan <rmh@aybabtu.com>
4305 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
4306 (pkglib_MODULES): Add `memdisk.mod'.
4307 (memdisk_mod_SOURCES): New variable.
4308 (memdisk_mod_CFLAGS): Likewise.
4309 (memdisk_mod_LDFLAGS): Likewise.
4311 * disk/memdisk.c: New file.
4313 * include/grub/disk.h (grub_disk_dev_id): Add
4314 `GRUB_DISK_DEVICE_MEMDISK_ID'.
4316 * include/grub/i386/pc/kernel.h
4317 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4318 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4319 (grub_kernel_image_size): New variable declaration.
4320 (grub_total_module_size): Likewise.
4321 (grub_memdisk_image_size): Likewise.
4323 * include/grub/i386/pc/memory.h
4324 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4326 * include/grub/kernel.h: Include `<grub/symbol.h>'.
4327 (grub_arch_memdisk_addr): New variable declaration.
4328 (grub_arch_memdisk_size): Likewise.
4330 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4331 (grub_arch_memdisk_size): Likewise.
4333 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4334 (codestart): Replace hardcoded `0x100000' with
4335 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4337 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4338 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
4339 not NULL, append the contents of the file it refers to, at the end of
4340 the compressed kernel image. Initialize `grub_memdisk_image_size'
4341 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4342 (options): Add "memdisk"|'m' option.
4343 (main): Parse --memdisk|-m option, and pass user-provided path as
4344 parameter to generate_image().
4346 2008-01-20 Robert Millan <rmh@aybabtu.com>
4348 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4349 grub_dprintf() calls from here ...
4350 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4352 2008-01-20 Robert Millan <rmh@aybabtu.com>
4354 Fix detection of "real mode" when /options/real-mode? doesn't exist.
4356 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4358 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4359 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4360 `GRUB_IEEE1275_FLAG_REAL_MODE'.
4361 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4363 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4364 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4366 2008-01-19 Robert Millan <rmh@aybabtu.com>
4368 Get rid of confusing function (superseded by
4369 `grub_ieee1275_get_integer_property')
4370 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4372 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4374 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4375 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4376 in native endianness from grub_ieee1275_get_integer_property().
4378 2008-01-19 Robert Millan <rmh@aybabtu.com>
4380 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4381 command after "shut-down", since implementations differ on which
4382 the command for halt is.
4384 2008-01-19 Robert Millan <rmh@aybabtu.com>
4386 * include/grub/i386/linuxbios/console.h: Add header protection.
4387 (grub_keyboard_controller_init): New function prototype.
4388 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4389 (KEYBOARD_COMMAND_READ): Likewise.
4390 (KEYBOARD_COMMAND_WRITE): Likewise.
4391 (KEYBOARD_SCANCODE_SET1): Likewise.
4392 (grub_keyboard_controller_write): New function.
4393 (grub_keyboard_controller_read): Likewise.
4394 (grub_keyboard_controller_init): Likewise.
4396 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4397 (grub_console_init): On coreboot/LinuxBIOS, call
4398 grub_keyboard_controller_init().
4400 2008-01-19 Robert Millan <rmh@aybabtu.com>
4402 PowerPC changes provided by Pavel Roskin.
4404 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4405 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4406 don't rely on cmain() doing it.
4407 * kern/i386/ieee1275/startup.S (_start): Store %eax in
4408 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4410 2008-01-16 Robert Millan <rmh@aybabtu.com>
4412 * include/grub/i386/linuxbios/memory.h
4413 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4414 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4415 receive `table_header' as argument. Instead, probe for it in the
4416 known memory ranges where it can be present.
4417 (grub_available_iterate): Do not pass a fixed `table_header' address
4418 to grub_linuxbios_table_iterate().
4420 2008-01-15 Robert Millan <rmh@aybabtu.com>
4422 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4423 * conf/i386-ieee1275.rmk: New file.
4424 * include/grub/i386/ieee1275/console.h: Likewise.
4425 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4426 * include/grub/i386/ieee1275/kernel.h: Likewise.
4427 * include/grub/i386/ieee1275/time.h: Likewise.
4428 * kern/i386/ieee1275/init.c: Likewise.
4429 * kern/i386/ieee1275/startup.S: Likewise.
4431 2008-01-15 Robert Millan <rmh@aybabtu.com>
4433 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4434 when pointers are 32-bit (but still do set it to one when they are
4437 2008-01-15 Robert Millan <rmh@aybabtu.com>
4439 * include/grub/ieee1275/ieee1275.h
4440 (grub_ieee1275_get_integer_property): New function prototype.
4442 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4443 (grub_ieee1275_get_integer_property): New function. Wraps around
4444 grub_ieee1275_get_property() to handle endianness.
4446 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4447 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4449 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4450 (grub_map): Likewise.
4451 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4453 2008-01-15 Bean <bean123ch@gmail.com>
4455 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4456 (grub_script_execute_cmdline): Reset grub_errno.
4458 * normal/main.c (read_config_file): Reset grub_errno.
4460 * normal/parse.y (script_init): New.
4461 (script): Move function and menuentry here.
4463 (command): Add delimiter at the end of command.
4464 (commands): Adjust to match the new command.
4465 (commandblock): Remove grub_script_lexer_record_start.
4466 (menuentry): Add grub_script_lexer_record_start, use the new commands.
4467 (if): Use the new commands.
4469 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4471 2008-01-15 Robert Millan <rmh@aybabtu.com>
4473 * normal/menu.c (run_menu): Move timeout message from here ...
4474 (print_timeout): ... to here.
4475 (run_menu): Use print_timeout() once during initial draw to print
4476 the whole message, and again in every clock tick to update only
4477 the number of seconds.
4479 2008-01-15 Robert Millan <rmh@aybabtu.com>
4481 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4482 actual size of `available' from grub_ieee1275_get_property(), and
4483 restrict parsing to that bound.
4485 2008-01-15 Christian Franke <franke@computer.org>
4487 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4488 (argp_program_version): Remove variable.
4489 (argp_program_bug_address): Likewise.
4490 (options): Convert from struct argp_option to struct option.
4491 (struct arguments): Remove.
4492 (parse_opt): Remove.
4493 (usage): New function.
4494 (main): Replace struct args members by simple variables.
4495 Replace argp_parse() by getopt_long().
4496 Add switch to evaluate options.
4497 Add missing "(...)" around root_dev in prefix string.
4499 2008-01-14 Robert Millan <rmh@aybabtu.com>
4501 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4502 for grub_ieee1275_exit(), in order to improve portability.
4504 2008-01-14 Robert Millan <rmh@aybabtu.com>
4506 * util/grub.d/10_linux.in (prefix): Define.
4507 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
4509 2008-01-13 Pavel Roskin <proski@gnu.org>
4511 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
4512 grub_errno if no errors have been detected.
4514 2008-01-12 Robert Millan <rmh@aybabtu.com>
4516 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
4517 (grub_util_get_dev_abstraction): New function prototype.
4519 * util/getroot.c: Include `<grub/util/getroot.h>'
4520 (grub_util_get_grub_dev): Move detection of abstraction type to ...
4521 (grub_util_get_dev_abstraction): ... here (new function).
4523 * util/grub-probe.c: Convert PRINT_* to an enum. Add
4524 `PRINT_ABSTRACTION'.
4525 (probe): Probe for abstraction type when requested.
4526 (main): Understand `--target=abstraction'.
4528 * util/i386/efi/grub-install.in: Add abstraction module to core
4529 image when it is found to be necessary.
4530 * util/i386/pc/grub-install.in: Likewise.
4531 * util/powerpc/ieee1275/grub-install.in: Likewise.
4533 * util/update-grub_lib.in (font_path): Return system path without
4534 converting to GRUB path.
4535 * util/update-grub.in: Convert system path returned by font_path()
4536 to a GRUB path. Use `grub-probe -t abstraction' to determine what
4537 abstraction module is needed for loading fonts (if any). Export
4538 that as `GRUB_PRELOAD_MODULES'.
4539 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
4542 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
4544 Remove some unused code from reiserfs.
4546 * fs/reiserfs.c (struct grub_reiserfs_key)
4547 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
4548 (struct grub_reiserfs_node_body): Removed.
4549 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4551 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4553 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4555 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4557 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4559 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
4561 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4562 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4563 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4565 2008-01-10 Robert Millan <rmh@aybabtu.com>
4567 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
4568 Determines if a file is garbage left by packaging systems, etc.
4569 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
4570 for processing /etc/grub.d scripts.
4571 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
4572 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
4573 as a condition for processing Linux images.
4575 2008-01-10 Pavel Roskin <proski@gnu.org>
4577 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
4578 to compile reiserfs.c on PowerPC.
4580 2008-01-10 Robert Millan <rmh@aybabtu.com>
4582 * kern/device.c (grub_device_iterate): Do not abort device iteration
4583 when one of the devices cannot be opened.
4584 * kern/disk.c (grub_disk_open): Do not account previous failures of
4585 unrelated functions when grub_errno is checked for.
4587 2008-01-08 Robert Millan <rmh@aybabtu.com>
4589 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
4590 `! grub_linux_is_bzimage', change order of address comparison to make
4591 it more intuitive, and improve "too big zImage" error message.
4593 2008-01-08 Robert Millan <rmh@aybabtu.com>
4595 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
4596 `$(update-grub_DATA)'.
4597 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
4600 2008-01-07 Robert Millan <rmh@aybabtu.com>
4602 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
4603 which instruction is modified by grub-setup during installation
4604 (since it wasn't obvious by only looking at this file).
4606 2008-01-07 Robert Millan <rmh@aybabtu.com>
4608 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
4609 listing actual TODO items.
4611 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4613 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
4615 (grub_reiserfs_get_key_offset): Likewise.
4616 (grub_reiserfs_set_key_offset): Likewise.
4617 (grub_reiserfs_set_key_type): Likewise.
4618 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
4620 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
4621 better to remove the bitfield version completely.
4623 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4625 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
4626 allocated from the heap, due to the fshelp implementation.
4627 (grub_reiserfs_dir): Free NODE, due to the same reason.
4629 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4631 Mostly from Vincent Pelletier:
4633 * fs/reiserfs.c: New file.
4635 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
4636 (reiserfs_mod_SOURCES): New variable.
4637 (reiserfs_mod_CFLAGS): Likewise.
4638 (reiserfs_mod_LDFLAGS): Likewise.
4640 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
4641 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
4642 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
4645 2008-01-06 Robert Millan <rmh@aybabtu.com>
4647 * normal/color.c: Remove `<grub/env.h>'.
4649 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
4651 * include/grub/normal.h: Include <grub/env.h>.
4653 2008-01-05 Robert Millan <rmh@aybabtu.com>
4655 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
4656 usage example with `(hd0,1)'.
4657 Reported by Samuel Thibault.
4659 2008-01-05 Robert Millan <rmh@aybabtu.com>
4661 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
4662 (grub_linux_boot_zimage): Rename to ...
4663 (grub_linux_boot): ... this.
4664 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
4665 (grub_linux_boot_zimage): Conditionalize zImage copy.
4667 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
4668 (grub_linux_boot_bzimage): Remove prototype.
4669 (grub_linux_boot_zimage): Rename to ...
4670 (grub_linux_boot): ... this.
4672 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
4673 (grub_linux_boot): Remove function.
4675 2008-01-05 Robert Millan <rmh@aybabtu.com>
4677 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
4678 (grub_env_write_color_highlight): Likewise.
4679 (grub_wait_after_message): Likewise.
4681 * normal/color.c: New file.
4683 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4684 (normal_mod_DEPENDENCIES): Likewise.
4686 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4687 (normal_mod_DEPENDENCIES): Likewise.
4689 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4690 (normal_mod_DEPENDENCIES): Likewise.
4692 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4693 (normal_mod_DEPENDENCIES): Likewise.
4695 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
4696 for waiting after a message is printed.
4697 * normal/main.c (read_config_file): Likewise.
4698 (grub_normal_init): Register grub_env_write_color_normal() and
4699 grub_env_write_color_highlight() hooks. Mark `color_normal' and
4700 `color_highlight' variables as global.
4702 * normal/menu.c (grub_wait_after_message): New function.
4703 (grub_color_menu_normal): New variable. Replaces ...
4704 (GRUB_COLOR_MENU_NORMAL): ... this macro.
4705 (grub_color_menu_highlight): New variable. Replaces ...
4706 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
4707 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
4708 `GRUB_TERM_COLOR_STANDARD'.
4709 (print_message): Use `grub_setcolorstate' to reload colors. Rename
4710 `normal_code' and `highlight_code' to `old_color_normal' and
4711 `old_color_highlight', respectively.
4712 (grub_menu_init_page): Update colors when drawing the menu, based on
4713 `menu_color_normal' and `menu_color_highlight' variables.
4714 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
4715 a message is printed.
4717 2008-01-05 Robert Millan <rmh@aybabtu.com>
4719 * kern/env.c (grub_env_context_open): Propagate hooks for global
4720 variables to new context.
4722 * kern/main.c (grub_set_root_dev): Export `root' variable.
4724 2008-01-05 Robert Millan <rmh@aybabtu.com>
4726 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
4727 discs unconditionally, since udev and others have options to provide
4730 2008-01-05 Robert Millan <rmh@aybabtu.com>
4732 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
4734 2008-01-04 Christian Franke <franke@computer.org>
4736 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
4739 2008-01-03 Pavel Roskin <proski@gnu.org>
4741 * kern/i386/linuxbios/init.c: Put "void" to all function
4742 declarations with no arguments.
4743 * kern/powerpc/ieee1275/init.c: Likewise.
4744 * term/i386/pc/at_keyboard.c: Likewise.
4745 * term/i386/pc/vga_text.c: Likewise.
4746 * util/grub-mkdevicemap.c: Likewise.
4748 2008-01-02 Robert Millan <rmh@aybabtu.com>
4750 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
4751 message when loaded image is out of bounds.
4752 (grub_multiboot_load_elf64): Likewise.
4754 2008-01-02 Pavel Roskin <proski@gnu.org>
4756 * util/grub.d/10_linux.in: Try version without ".old" when
4757 looking for initrd. It's better to use initrd from the newer
4758 kernel of the same version than no initrd at all.
4760 2008-01-01 Robert Millan <rmh@aybabtu.com>
4762 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
4764 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
4766 * include/grub/video.h: Added grub_video_unmap_color and
4767 grub_video_get_active_render_target.
4768 (grub_video_adapter): Added unmap_color and get_active_render_target.
4770 * video/video.c: Added grub_video_unmap_color and
4771 grub_video_get_active_render_target.
4772 (grub_video_get_info): Changed method to accept NULL pointer as an
4773 argument to allow detection of active video adapter.
4775 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
4776 grub_video_vbe_unmap_color_int.
4777 Added grub_video_vbe_unmap_color and
4778 grub_video_vbe_get_active_render_target.
4779 (grub_video_vbe_adapter): Added unmap_color and
4780 get_active_render_target.
4782 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
4783 with grub_video_vbe_unmap_color_int.
4785 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
4786 (DEFAULT_NORMAL_COLOR): Likewise.
4787 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
4788 (DEFAULT_FG_COLOR): Removed.
4789 (DEFAULT_BG_COLOR): Likewise.
4790 (DEFAULT_CURSOR_COLOR): Changed value.
4791 (grub_virtual_screen): Added standard_color_setting,
4792 normal_color_setting, highlight_color_setting and term_color.
4793 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
4794 (bitmap_width): Added.
4795 (bitmap_height): Likewise.
4797 (set_term_color): Likewise.
4798 (grub_virtual_screen_setup): Changed to use new terminal coloring
4800 (grub_gfxterm_init): Added init for bitmap.
4801 (grub_gfxterm_fini): Added destroy for bitmap.
4802 (redraw_screen_rect): Updated to use background bitmap and new
4804 (scroll_up): Added optimization for case when there is no bitmap.
4805 (grub_gfxterm_cls): Fixed to use correct background color.
4806 (grub_virtual_screen_setcolorstate): Changed to use new terminal
4808 (grub_virtual_screen_setcolor): Likewise.
4809 (grub_virtual_screen_getcolor): Added.
4810 (grub_gfxterm_background_image_cmd): Likewise.
4811 (grub_video_term): Added setcolor and getcolor.
4812 (MOD_INIT): Added registration of background_image command.
4813 (MOD_TERM): Added unregistration for background_image command.
4815 2007-12-30 Pavel Roskin <proski@gnu.org>
4817 * loader/multiboot_loader.c: Fix multiboot command
4818 unregistration. Fix all typos in the word "multiboot".
4820 2007-12-29 Pavel Roskin <proski@gnu.org>
4822 * util/grub.d/10_linux.in: Refactor search for initrd. Add
4823 support for initrd names used in Fedora.
4825 2007-12-26 Bean <bean123ch@gmail.com>
4827 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
4828 (cpio_mod_SOURCES): New variable.
4829 (cpio_mod_CFLAGS): Likewise.
4830 (cpio_mod_LDFLAGS): Likewise.
4832 * fs/cpio.c: New file.
4834 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
4836 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4838 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4840 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4842 2007-12-25 Robert Millan <rmh@aybabtu.com>
4844 * include/grub/term.h (struct grub_term): Add `getcolor' function.
4845 (grub_getcolor): New function.
4847 * kern/term.c (grub_getcolor): New function.
4848 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
4849 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
4850 (print_entry): Set normal and highlight colors to
4851 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
4852 respectively, before printing and restore them to old
4854 (grub_menu_init_page): Likewise. Fill an additional colored space
4855 that would otherwise be left blank.
4857 * term/efi/console.c (grub_console_getcolor): New function.
4858 (struct grub_console_term.getcolor): New variable.
4859 * term/i386/pc/console.c (grub_console_getcolor): New function.
4860 (struct grub_console_term.getcolor): New variable.
4861 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
4862 (struct grub_console_term.getcolor): New variable.
4864 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
4865 (struct grub_console_term.setcolor): Remove variable.
4866 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
4867 (struct grub_console_term.setcolor): Remove variable.
4868 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
4869 (struct grub_console_term.setcolor): Remove variable.
4870 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
4871 (struct grub_console_term.setcolor): Remove variable.
4873 2007-12-25 Robert Millan <rmh@aybabtu.com>
4875 * configure.ac: Search for possible unifont.hex locations, and
4876 define UNIFONT_HEX if found.
4878 * Makefile.in (UNIFONT_HEX): Define variable.
4879 (DATA): Rename to ...
4880 (PKGLIB): ... this. Update all users.
4881 (PKGDATA): New variable.
4882 (pkgdata_IMAGES): Rename to ...
4883 (pkglib_IMAGES): ... this. Update all users.
4884 (pkgdata_MODULES): Rename to ...
4885 (pkglib_MODULES): ... this. Update all users.
4886 (pkgdata_PROGRAMS): Rename to ...
4887 (pkglib_PROGRAMS): ... this. Update all users.
4888 (pkgdata_DATA): Rename to ...
4889 (pkglib_DATA): ... this. Update all users.
4890 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
4891 (unicode.pff, ascii.pff): New rules.
4892 (all-local): Add `$(PKGDATA)' dependency.
4893 (install-local): Process `$(PKGDATA)'.
4895 * util/update-grub_lib.in (font_path): Search for *.pff files in
4896 a few more locations, including `${pkgdata}'.
4898 2007-12-23 Robert Millan <rmh@aybabtu.com>
4900 Patch from Bean <bean123ch@gmail.com>:
4901 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
4904 2007-12-21 Bean <bean123ch@gmail.com>
4906 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
4907 (ntfscomp_mod_SOURCES): New variable.
4908 (ntfscomp_mod_CFLAGS): Likewise.
4909 (ntfscomp_mod_LDFLAGS): Likewise.
4911 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
4912 (grub_probe_SOURCES): Likewise.
4913 (grub_emu_SOURCES): Likewise.
4915 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4916 (grub_emu_SOURCES): Likewise.
4918 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4919 (grub_emu_SOURCES): Likewise.
4921 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4922 (grub_emu_SOURCES): Likewise.
4924 * fs/ntfs.c (grub_ntfscomp_func): New variable.
4925 (read_run_list): Renamed to grub_ntfs_read_run_list.
4926 (decomp_nextvcn): Moved to ntfscomp.c.
4927 (decomp_getch): Likewise.
4928 (decomp_get16): Likewise.
4929 (decomp_block): Likewise.
4930 (read_block): Likewise.
4931 (read_data): Partially moved to ntfscomp.c.
4932 (fixup): Change unsigned to grub_uint16_t.
4933 (read_mft): Change unsigned long to grub_uint32_t.
4934 (read_attr): Likewise.
4935 (read_data): Likewise.
4936 (read_run_data): Likewise.
4937 (read_run_list): Likewise.
4938 (read_mft): Likewise.
4940 * fs/ntfscomp.c: New file.
4942 * include/grub/ntfs.h: New file.
4944 2007-12-16 Robert Millan <rmh@aybabtu.com>
4946 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
4947 IDE disk check, since Linux is known to support 20 IDE disks.
4948 Reported by Colin Watson.
4950 2007-12-15 Bean <bean123ch@gmail.com>
4952 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
4953 (lnxboot_img_SOURCES): New variable.
4954 (lnxboot_img_ASFLAGS): Likewise.
4955 (lnxboot_img_LDFLAGS): Likewise.
4957 * boot/i386/pc/lnxboot.S: New file.
4959 2007-11-24 Pavel Roskin <proski@gnu.org>
4961 * configure.ac: Test if '--build-id=none' is supported by the
4962 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
4963 objcopy to generate incorrect binary files (binutils
4964 2.17.50.0.18-1 as shipped by Fedora 8).
4965 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
4966 linking, so that build ID doesn't break the test.
4968 2007-11-24 Pavel Roskin <proski@gnu.org>
4970 * include/grub/i386/time.h: use "void" in the argument list
4972 * include/grub/powerpc/time.h: Likewise.
4973 * include/grub/sparc64/time.h: Likewise.
4975 2007-11-18 Christian Franke <franke@computer.org>
4977 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
4978 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
4979 This fixes the problem that function keys did not work in grub-emu.
4981 2007-11-18 Christian Franke <franke@computer.org>
4983 * disk/host.c (grub_host_open): Remove attribute unused from
4984 name parameter. Add check for "host". This fixes the problem
4985 that grub-emu does not find partitions.
4987 2007-11-18 Christian Franke <franke@computer.org>
4989 * util/hostfs.c (is_dir): New function.
4990 (grub_hostfs_dir): Handle missing dirent.d_type case.
4991 (grub_hostfs_read): Add missing fseek().
4992 (grub_hostfs_label): Clear label pointer. This fixes a crash
4993 of grub-emu on "ls (host)".
4995 2007-11-18 Christian Franke <franke@computer.org>
4997 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
4998 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
4999 to 64 bit boundary by default.
5001 2007-11-18 Bean <bean123ch@gmail.com>
5003 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
5004 (hexdump_mod_SOURCES): New variable.
5005 (hexdump_mod_CFLAGS): Likewise.
5006 (hexdump_mod_LDFLAGS): Likewise.
5008 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5010 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5012 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5014 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
5016 * include/grub/hexdump.h: New file.
5018 * commands/hexdump.c: New file.
5020 2007-11-10 Robert Millan <rmh@aybabtu.com>
5022 * commands/i386/pc/play.c (beep_off): Switch order of arguments
5023 in grub_outb() calls.
5024 (beep_on): Likewise.
5026 2007-11-10 Christian Franke <franke@computer.org>
5028 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
5029 (grub_menu_run): Likewise.
5031 2007-11-10 Robert Millan <rmh@aybabtu.com>
5033 * include/grub/i386/efi/machine.h: New file.
5034 * include/grub/i386/linuxbios/machine.h: Likewise.
5035 * include/grub/i386/pc/machine.h: Likewise.
5036 * include/grub/powerpc/ieee1275/machine.h: Likewise.
5037 * include/grub/sparc64/ieee1275/machine.h: Likewise.
5039 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
5040 (serial_hw_io_addr): New variable.
5041 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
5042 instead of `(unsigned short *) 0x400'.
5044 2007-11-10 Bean <bean123ch@gmail.com>
5046 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
5048 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5050 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
5051 (vga_mod_SOURCES): Added.
5052 (vga_mod_CFLAGS): Likewise.
5053 (vga_mod_LDFLAGS): Likewise.
5055 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
5057 (set_map_mask): Likewise.
5058 (set_read_map): Likewise.
5059 (set_read_address): Likewise.
5060 (vga_font): Removed variable.
5061 (get_vga_glyph): Removed function.
5062 (invalidate_char): Likewise.
5063 (write_char): Changed to use grub_font_get_glyph() for font
5065 (grub_vga_putchar): Likewise.
5066 (grub_vga_getcharwidth): Likewise.
5068 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
5070 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
5072 (pxeboot_img_LDFLAGS): Likewise.
5073 (diskboot_img_LDFLAGS): Likewise.
5074 (kernel_img_LDFLAGS): Likewise.
5076 2007-11-06 Robert Millan <rmh@aybabtu.com>
5078 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
5079 in grub_outb() calls.
5080 (serial_hw_init): Likewise.
5082 2007-11-05 Robert Millan <rmh@aybabtu.com>
5084 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
5085 spaces. Skip non-regular files.
5087 2007-11-05 Robert Millan <rmh@aybabtu.com>
5089 * kern/disk.c (grub_disk_firmware_fini)
5090 (grub_disk_firmware_is_tainted): New variables.
5092 * include/grub/disk.h (grub_disk_firmware_fini)
5093 (grub_disk_firmware_is_tainted): Likewise.
5095 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
5096 (grub_disk_biosdisk_fini): ... to here.
5097 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
5098 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
5099 is set. Register grub_disk_biosdisk_fini() in
5100 `grub_disk_firmware_fini'.
5102 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
5103 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
5104 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
5105 to finish existing firmware disk interface.
5107 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
5108 (ata_mod_SOURCES): New variable.
5109 (ata_mod_CFLAGS): Likewise.
5110 (ata_mod_LDFLAGS): Likewise.
5112 2007-11-05 Robert Millan <rmh@aybabtu.com>
5114 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
5115 (grub_ata_wait): Reimplement using grub_millisleep().
5117 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
5118 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
5120 2007-11-03 Marco Gerards <marco@gnu.org>
5122 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
5123 (CRTC_ADDR_PORT): New macro.
5124 (CRTC_DATA_PORT): Likewise.
5125 (CRTC_CURSOR): Likewise.
5126 (CRTC_CURSOR_ADDR_HIGH): Likewise.
5127 (CRTC_CURSOR_ADDR_LOW): Likewise.
5128 (update_cursor): New function.
5129 (grub_console_real_putchar): Call `update_cursor'.
5130 (grub_console_gotoxy): Likewise.
5131 (grub_console_cls): Set the default color when clearing the
5133 (grub_console_setcursor): Implemented.
5135 2007-11-03 Marco Gerards <marco@gnu.org>
5137 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
5139 (grub_ata_pio_write): Likewise.
5141 (grub_atapi_identify): Wait after issuing an ATA command.
5142 (grub_atapi_packet): Likewise.
5143 (grub_ata_identify): Likewise.
5144 (grub_ata_readwrite): Likewise.
5146 2007-11-03 Marco Gerards <marco@gnu.org>
5148 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
5149 (grub_ata_pio_write): Likewise.
5150 (grub_ata_readwrite): Use `grub_error', instead of
5151 returning `grub_errno'.
5153 2007-11-03 Marco Gerards <marco@gnu.org>
5155 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
5156 grub_ata_pio_write once for every single sector, instead of for
5159 2007-10-31 Robert Millan <rmh@aybabtu.com>
5161 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
5163 * conf/i386-linuxbios.rmk: New file.
5165 * kern/i386/pc/hardware.c: Likewise.
5166 * term/i386/pc/at_keyboard.c: Likewise.
5167 * term/i386/pc/vga_text.c: Likewise.
5169 * include/grub/i386/linuxbios/boot.h: Likewise.
5170 * include/grub/i386/linuxbios/console.h: Likewise.
5171 * include/grub/i386/linuxbios/init.h: Likewise.
5172 * include/grub/i386/linuxbios/kernel.h: Likewise.
5173 * include/grub/i386/linuxbios/loader.h: Likewise.
5174 * include/grub/i386/linuxbios/memory.h: Likewise.
5175 * include/grub/i386/linuxbios/serial.h: Likewise.
5176 * include/grub/i386/linuxbios/time.h: Likewise.
5178 * kern/i386/linuxbios/init.c: Likewise.
5179 * kern/i386/linuxbios/startup.S: Likewise.
5180 * kern/i386/linuxbios/table.c: Likewise.
5182 2007-10-31 Marco Gerards <marco@gnu.org>
5184 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
5185 (ata_mod_SOURCES): New variable.
5186 (ata_mod_CFLAGS): Likewise.
5187 (ata_mod_LDFLAGS): Likewise.
5189 * disk/ata.c: New file.
5191 * include/grub/disk.h (grub_disk_dev_id): Add
5192 `GRUB_DISK_DEV_ATA_ID'.
5194 2007-10-31 Robert Millan <rmh@aybabtu.com>
5196 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
5197 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
5199 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
5200 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
5202 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
5205 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
5207 2007-10-27 Robert Millan <rmh@aybabtu.com>
5209 * include/grub/types.h (ULONG_MAX): Define macro.
5211 2007-10-22 Robert Millan <rmh@aybabtu.com>
5213 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
5215 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
5217 2007-10-22 Robert Millan <rmh@aybabtu.com>
5219 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
5220 (pkgdata_MODULES): Add `biosdisk.mod'.
5221 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
5224 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
5225 (grub_biosdisk_init): Replace with ...
5226 (GRUB_MOD_INIT(biosdisk)): ... this.
5227 (grub_biosdisk_fini): Replace with ...
5228 (GRUB_MOD_FINI(biosdisk)): ... this.
5230 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
5231 (grub_machine_init): Remove call to grub_biosdisk_init().
5232 (grub_machine_fini): Remove call to grub_machine_fini().
5234 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
5236 2007-10-22 Robert Millan <rmh@aybabtu.com>
5238 * include/grub/time.h: New file.
5239 * include/grub/i386/time.h: Likewise.
5240 * include/grub/powerpc/time.h: Likewise.
5241 * include/grub/sparc64/time.h: Likewise.
5243 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
5245 (KERNEL_MACHINE_TIME_HEADER): ... this.
5246 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5248 (KERNEL_MACHINE_TIME_HEADER): ... this.
5249 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
5251 (KERNEL_MACHINE_TIME_HEADER): ... this.
5253 * kern/i386/efi/init.c: Include `<grub/time.h>'.
5254 (grub_millisleep): New function.
5255 * kern/i386/pc/init.c: Include `<grub/time.h>'.
5256 (grub_millisleep): New function.
5257 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
5258 Remove `grub/machine/time.h' include.
5259 (grub_millisleep): New function.
5260 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
5261 Remove `grub/machine/time.h' include.
5262 (grub_millisleep): New function.
5264 * include/grub/misc.h (grub_div_roundup): New function.
5266 * kern/misc.c: Include `<grub/time.h>'.
5267 (grub_millisleep_generic): New function.
5269 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
5271 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
5273 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
5274 `machine/time.h'. Add `time.h'.
5275 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
5277 2007-10-21 Robert Millan <rmh@aybabtu.com>
5279 * include/grub/misc.h (grub_max): New function.
5281 2007-10-21 Robert Millan <rmh@aybabtu.com>
5283 * util/misc.c (grub_util_info): Call fflush() before returning.
5285 2007-10-20 Robert Millan <rmh@aybabtu.com>
5287 * genmk.rb (Image): Copy `extra_flags' from here ...
5288 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
5290 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
5291 to `argc' and `args' arguments.
5293 2007-10-17 Robert Millan <rmh@aybabtu.com>
5295 * kern/i386/loader.S: New file.
5297 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
5298 * kern/i386/loader.S (grub_linux_prot_size)... to here.
5299 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
5300 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
5301 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
5302 * kern/i386/loader.S (grub_linux_real_addr)... to here.
5303 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
5304 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
5305 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
5306 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
5307 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5308 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5309 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5310 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5312 * kern/i386/realmode.S: New file.
5314 * kern/i386/pc/startup.S (protstack): Moved from here ...
5315 * kern/i386/realmode.S (protstack)... to here.
5316 * kern/i386/pc/startup.S (gdt): Moved from here ...
5317 * kern/i386/realmode.S (gdt)... to here.
5318 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5319 * kern/i386/realmode.S (prot_to_real)... to here.
5321 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5322 `kern/i386/realmode.S'.
5324 2007-10-17 Robert Millan <rmh@aybabtu.com>
5326 * include/grub/i386/loader.h: New file.
5328 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5329 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5330 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5331 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5332 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5333 * include/grub/i386/loader.h (grub_linux_prot_size)
5334 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5335 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5336 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5337 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5339 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5341 2007-10-15 Robert Millan <rmh@aybabtu.com>
5343 * normal/misc.c (grub_normal_print_device_info): Do not probe for
5344 filesystem when dev->disk is unset.
5345 Do probe for filesystem even when dev->disk->has_partitions is set.
5346 In case a filesystem is found, always report it.
5347 In case it isn't, if dev->disk->has_partitions is set, report that
5348 a partition table was found instead of reporting that no filesystem
5349 could be identified.
5351 2007-10-12 Robert Millan <rmh@aybabtu.com>
5353 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5354 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5356 * include/grub/types.h (grub_host_to_target16): New macro.
5357 (grub_host_to_target32): Likewise.
5358 (grub_host_to_target64): Likewise.
5359 (grub_target_to_host16): Likewise.
5360 (grub_target_to_host32): Likewise.
5361 (grub_target_to_host64): Likewise.
5363 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5365 (GRUB_MOD_ALIGN): ...this. Update all users.
5367 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5368 grub_host_to_target32.
5369 Replace grub_be_to_cpu32 with grub_target_to_host32.
5370 (load_modules): Likewise.
5371 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5372 Replace grub_be_to_cpu32 with grub_target_to_host32.
5373 Replace grub_cpu_to_be16 with grub_host_to_target16.
5374 Replace grub_cpu_to_be32 grub_host_to_target32.
5376 2007-10-12 Robert Millan <rmh@aybabtu.com>
5378 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5379 * util/elf/grub-mkimage.c: ... here.
5381 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
5382 `util/powerpc/ieee1275/grub-mkimage.c'.
5384 2007-10-07 Robert Millan <rmh@aybabtu.com>
5386 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5387 and make it easier to figure out.
5388 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5389 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5390 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5391 leave us with less than HEAP_MIN_SIZE total heap.
5392 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5394 2007-10-03 Robert Millan <rmh@aybabtu.com>
5396 * include/grub/i386/io.h: New file.
5397 * commands/i386/pc/play.c (inb): Removed.
5399 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5401 * term/i386/pc/serial.c (inb): Removed.
5403 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5405 * term/i386/pc/vga.c (inb): Removed.
5407 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5410 2007-10-02 Robert Millan <rmh@aybabtu.com>
5412 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5413 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5414 Reported by Marcin Kurek.
5416 2007-09-07 Robert Millan <rmh@aybabtu.com>
5418 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5419 SmartFirmware version updates (as released by Sven Luther), and avoid
5420 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5421 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5424 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5427 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5428 when merging two regions.
5430 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5432 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5433 * normal/completion.c (grub_normal_do_completion): Likewise.
5434 Reported by Hitoshi Ozeki.
5436 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5438 Do not use devices at boot in chainloading.
5440 * loader/i386/pc/chainloader.c (boot_drive): New variable.
5441 (boot_part_addr): Likewise.
5442 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5443 with BOOT_DRIVE and BOOT_PART_ADDR.
5444 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5445 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5447 2007-08-29 Robert Millan <rmh@aybabtu.com>
5449 Patch from Simon Peter <dn.tlp@gmx.net>:
5450 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5451 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5452 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
5453 util/i386/pc/grub-setup.c_DEPENDENCIES.
5454 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5455 util/grub-probe.c_DEPENDENCIES.
5456 * conf/powerpc-ieee1275.rmk: Likewise.
5458 2007-08-28 Robert Millan <rmh@aybabtu.com>
5460 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
5461 to tell grub-mkdevicemap how to name devices.
5462 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5465 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5466 util/i386/get_disk_name.c.
5467 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5468 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5469 util/ieee1275/get_disk_name.c.
5471 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5473 * DISTLIST: Add util/i386/get_disk_name.c and
5474 util/ieee1275/get_disk_name.c.
5476 * util/grub-mkdevicemap.c: Replace device naming logic with
5477 grub_util_get_disk_name() calls.
5479 2007-08-20 Robert Millan <rmh@aybabtu.com>
5481 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5482 (so that it works for both plural and singular quantities).
5484 2007-08-05 Robert Millan <rmh@aybabtu.com>
5486 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5487 so that [xz] isn't taken into account when determining order.
5489 2007-08-02 Marco Gerards <marco@gnu.org>
5491 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5492 `include/multiboot2.h', `include/grub/elfload.h',
5493 `include/multiboot.h', `include/grub/multiboot.h',
5494 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5495 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5496 `kern/elf.c', `loader/multiboot_loader.c',
5497 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5498 `loader/i386/pc/multiboot2.c',
5499 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5500 `util/i386/pc/grub-mkrescue.in'. Remove
5501 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5502 `include/grub/i386/pc/util/biosdisk.h' and
5503 `include/grub/powerpc/ieee1275/multiboot.h'.
5505 2007-08-02 Bean <bean123ch@gmail.com>
5507 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
5508 (ntfs_mod_SOURCES): New variable.
5509 (ntfs_mod_CFLAGS): Likewise.
5510 (ntfs_mod_LDFLAGS): Likewise.
5512 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
5513 (grub_probe_SOURCES): Likewise.
5514 (grub_emu_SOURCES): Likewise.
5516 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5517 (grub_emu_SOURCES): Likewise.
5519 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5520 (grub_emu_SOURCES): Likewise.
5522 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
5524 * fs/ntfs.c: New file.
5526 2007-08-02 Bean <bean123ch@gmail.com>
5528 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
5530 * file.h (grub_file): Likewise.
5532 * fshelp.h (grub_fshelp_read_file): Likewise.
5534 * util/i386/pc/grub-setup.c (setup): Likewise.
5535 (save_first_sector): Likewise.
5536 (save_blocklists): Likewise.
5538 * fs/affs.c (grub_affs_read_file): Likewise.
5540 * fs/ext2.c (grub_ext2_read_file): Likewise.
5542 * fs/fat.c (grub_fat_read_data): Likewise.
5544 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
5546 * fs/hfs.c (grub_hfs_read_file): Likewise.
5548 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5550 * fs/jfs.c (grub_jfs_read_file): Likewise.
5552 * fs/minix.c (grub_minix_read_file): Likewise.
5554 * fs/sfs.c (grub_sfs_read_file): Likewise.
5556 * fs/ufs.c (grub_ufs_read_file): Likewise.
5558 * fs/xfs.c (grub_xfs_read_file): Likewise.
5560 * command/blocklist.c (read_blocklist): Likewise.
5561 (print_blocklist): Likewise.
5563 2007-08-02 Marco Gerards <marco@gnu.org>
5565 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
5568 * disk/host.c: New file.
5570 * util/hostfs.c: Likewise.
5572 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
5573 return `GRUB_ERR_BAD_FS'.
5574 * fs/sfs.c (grub_sfs_mount): Likewise.
5575 * fs/xfs.c (grub_xfs_mount): Likewise.
5577 * include/grub/disk.h (enum grub_disk_dev_id): Add
5578 `GRUB_DISK_DEVICE_HOST_ID'.
5580 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
5582 2007-07-24 Jerone Young <jerone@gmail.com>
5584 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
5585 modules for compilation.
5586 * conf/powerpc-ieee1275.rmk: Likewise.
5588 * include/multiboot.h: Move multiboot definitions to one file. Rename
5589 many definitions to not get grub specific.
5590 * include/multiboot2.h: Create header with multiboot 2 definitions.
5591 * include/grub/multiboot.h: Header for grub specific function
5592 prototypes and definitions.
5593 * include/grub/multiboot2.h: Likewise.
5594 * include/grub/multiboot_loader.h: Likewise.
5595 * include/grub/i386/pc/multiboot.h: Removed.
5596 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
5598 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
5599 and 2 to allow for one multiboot and module commands.
5600 * loader/multiboot2.c: Add multiboot2 functionality.
5601 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
5602 and definition names.
5603 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
5605 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
5606 ieee1275 specific multiboot2 code.
5608 * kern/i386/pc/startup.S: Change headers and definition names for
5609 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
5611 2007-07-22 Robert Millan <rmh@aybabtu.com>
5613 * geninitheader.sh: Process file specified in first parameter rather
5614 than hardcoding grub_modules_init.lst.
5615 * geninit.sh: Likewise. Also, construct header name dynamically rather
5616 than hardcoding grub_modules_init.h.
5618 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
5619 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
5620 grub_probe_init.[ch] and grub_setup_init.[ch].
5622 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
5623 grub_modules_init.h with grub_emu_init.h.
5624 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
5625 grub_probe_init.[ch] files.
5626 * conf/i386-efi.rmk: Likewise.
5627 * conf/i386-pc.rmk: Likewise.
5628 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
5629 grub_setup_init.[ch] files.
5631 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
5632 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
5633 to initialize modules rather than a list of hardcoded functions.
5634 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
5635 grub_init_all() to initialize modules rather than a list of hardcoded
5638 2007-07-22 Robert Millan <rmh@aybabtu.com>
5640 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
5641 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
5643 2007-07-22 Robert Millan <rmh@aybabtu.com>
5645 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5646 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
5647 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
5648 flag when running on SmartFirmware.
5649 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
5650 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
5653 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5654 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
5655 rather than decreasing it.
5657 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
5658 there's not enough space to do it, fail in the same way as when it
5659 can't be done because there are no partitions.
5661 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
5662 when nvsetenv failed.
5664 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5666 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
5667 because this rule is automatically generated.
5668 (grub-mkrescue): Removed for the same reason as above.
5670 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5672 Migrate to GNU General Public License Version 3.
5674 * COPYING: Replaced with the plain text version of GPLv3.
5676 * config.guess: Updated from gnulib.
5677 * config.sub: Likewise.
5679 * geninit.sh: Output a GPLv3 copyright notice.
5680 * geninitheader.sh: Likewise.
5681 * genmodsrc.sh: Likewise.
5682 * gensymlist.sh.in: Likewise.
5684 * boot/i386/pc/boot.S: Upgraded to GPLv3.
5685 * boot/i386/pc/diskboot.S: Likewise.
5686 * boot/i386/pc/pxeboot.S: Likewise.
5687 * commands/blocklist.c: Likewise.
5688 * commands/boot.c: Likewise.
5689 * commands/cat.c: Likewise.
5690 * commands/cmp.c: Likewise.
5691 * commands/configfile.c: Likewise.
5692 * commands/echo.c: Likewise.
5693 * commands/help.c: Likewise.
5694 * commands/ls.c: Likewise.
5695 * commands/search.c: Likewise.
5696 * commands/terminal.c: Likewise.
5697 * commands/test.c: Likewise.
5698 * commands/videotest.c: Likewise.
5699 * commands/i386/cpuid.c: Likewise.
5700 * commands/i386/pc/halt.c: Likewise.
5701 * commands/i386/pc/play.c: Likewise.
5702 * commands/i386/pc/reboot.c: Likewise.
5703 * commands/i386/pc/vbeinfo.c: Likewise.
5704 * commands/i386/pc/vbetest.c: Likewise.
5705 * commands/ieee1275/halt.c: Likewise.
5706 * commands/ieee1275/reboot.c: Likewise.
5707 * commands/ieee1275/suspend.c: Likewise.
5708 * disk/loopback.c: Likewise.
5709 * disk/lvm.c: Likewise.
5710 * disk/raid.c: Likewise.
5711 * disk/efi/efidisk.c: Likewise.
5712 * disk/i386/pc/biosdisk.c: Likewise.
5713 * disk/ieee1275/ofdisk.c: Likewise.
5714 * font/manager.c: Likewise.
5715 * fs/affs.c: Likewise.
5716 * fs/ext2.c: Likewise.
5717 * fs/fat.c: Likewise.
5718 * fs/fshelp.c: Likewise.
5719 * fs/hfs.c: Likewise.
5720 * fs/hfsplus.c: Likewise.
5721 * fs/iso9660.c: Likewise.
5722 * fs/jfs.c: Likewise.
5723 * fs/minix.c: Likewise.
5724 * fs/sfs.c: Likewise.
5725 * fs/ufs.c: Likewise.
5726 * fs/xfs.c: Likewise.
5727 * hello/hello.c: Likewise.
5728 * include/grub/acorn_filecore.h: Likewise.
5729 * include/grub/arg.h: Likewise.
5730 * include/grub/bitmap.h: Likewise.
5731 * include/grub/boot.h: Likewise.
5732 * include/grub/cache.h: Likewise.
5733 * include/grub/device.h: Likewise.
5734 * include/grub/disk.h: Likewise.
5735 * include/grub/dl.h: Likewise.
5736 * include/grub/elfload.h: Likewise.
5737 * include/grub/env.h: Likewise.
5738 * include/grub/err.h: Likewise.
5739 * include/grub/file.h: Likewise.
5740 * include/grub/font.h: Likewise.
5741 * include/grub/fs.h: Likewise.
5742 * include/grub/fshelp.h: Likewise.
5743 * include/grub/gzio.h: Likewise.
5744 * include/grub/hfs.h: Likewise.
5745 * include/grub/kernel.h: Likewise.
5746 * include/grub/loader.h: Likewise.
5747 * include/grub/lvm.h: Likewise.
5748 * include/grub/misc.h: Likewise.
5749 * include/grub/mm.h: Likewise.
5750 * include/grub/net.h: Likewise.
5751 * include/grub/normal.h: Likewise.
5752 * include/grub/parser.h: Likewise.
5753 * include/grub/partition.h: Likewise.
5754 * include/grub/pc_partition.h: Likewise.
5755 * include/grub/raid.h: Likewise.
5756 * include/grub/rescue.h: Likewise.
5757 * include/grub/script.h: Likewise.
5758 * include/grub/setjmp.h: Likewise.
5759 * include/grub/symbol.h: Likewise.
5760 * include/grub/term.h: Likewise.
5761 * include/grub/terminfo.h: Likewise.
5762 * include/grub/tparm.h: Likewise.
5763 * include/grub/types.h: Likewise.
5764 * include/grub/video.h: Likewise.
5765 * include/grub/efi/api.h: Likewise.
5766 * include/grub/efi/chainloader.h: Likewise.
5767 * include/grub/efi/console.h: Likewise.
5768 * include/grub/efi/console_control.h: Likewise.
5769 * include/grub/efi/disk.h: Likewise.
5770 * include/grub/efi/efi.h: Likewise.
5771 * include/grub/efi/pe32.h: Likewise.
5772 * include/grub/efi/time.h: Likewise.
5773 * include/grub/i386/linux.h: Likewise.
5774 * include/grub/i386/setjmp.h: Likewise.
5775 * include/grub/i386/types.h: Likewise.
5776 * include/grub/i386/efi/kernel.h: Likewise.
5777 * include/grub/i386/efi/loader.h: Likewise.
5778 * include/grub/i386/efi/time.h: Likewise.
5779 * include/grub/i386/pc/biosdisk.h: Likewise.
5780 * include/grub/i386/pc/boot.h: Likewise.
5781 * include/grub/i386/pc/chainloader.h: Likewise.
5782 * include/grub/i386/pc/console.h: Likewise.
5783 * include/grub/i386/pc/init.h: Likewise.
5784 * include/grub/i386/pc/kernel.h: Likewise.
5785 * include/grub/i386/pc/loader.h: Likewise.
5786 * include/grub/i386/pc/memory.h: Likewise.
5787 * include/grub/i386/pc/multiboot.h: Likewise.
5788 * include/grub/i386/pc/serial.h: Likewise.
5789 * include/grub/i386/pc/time.h: Likewise.
5790 * include/grub/i386/pc/vbe.h: Likewise.
5791 * include/grub/i386/pc/vbeblit.h: Likewise.
5792 * include/grub/i386/pc/vbefill.h: Likewise.
5793 * include/grub/i386/pc/vbeutil.h: Likewise.
5794 * include/grub/i386/pc/vga.h: Likewise.
5795 * include/grub/ieee1275/ieee1275.h: Likewise.
5796 * include/grub/ieee1275/ofdisk.h: Likewise.
5797 * include/grub/powerpc/libgcc.h: Likewise.
5798 * include/grub/powerpc/setjmp.h: Likewise.
5799 * include/grub/powerpc/types.h: Likewise.
5800 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
5801 * include/grub/powerpc/ieee1275/console.h: Likewise.
5802 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
5803 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
5804 * include/grub/powerpc/ieee1275/loader.h: Likewise.
5805 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
5806 * include/grub/powerpc/ieee1275/time.h: Likewise.
5807 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
5808 * include/grub/sparc64/libgcc.h: Likewise.
5809 * include/grub/sparc64/setjmp.h: Likewise.
5810 * include/grub/sparc64/types.h: Likewise.
5811 * include/grub/sparc64/ieee1275/console.h: Likewise.
5812 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
5813 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
5814 * include/grub/sparc64/ieee1275/time.h: Likewise.
5815 * include/grub/util/biosdisk.h: Likewise.
5816 * include/grub/util/getroot.h: Likewise.
5817 * include/grub/util/lvm.h: Likewise.
5818 * include/grub/util/misc.h: Likewise.
5819 * include/grub/util/raid.h: Likewise.
5820 * include/grub/util/resolve.h: Likewise.
5821 * io/gzio.c: Likewise.
5822 * kern/device.c: Likewise.
5823 * kern/disk.c: Likewise.
5824 * kern/dl.c: Likewise.
5825 * kern/elf.c: Likewise.
5826 * kern/env.c: Likewise.
5827 * kern/err.c: Likewise.
5828 * kern/file.c: Likewise.
5829 * kern/fs.c: Likewise.
5830 * kern/loader.c: Likewise.
5831 * kern/main.c: Likewise.
5832 * kern/misc.c: Likewise.
5833 * kern/mm.c: Likewise.
5834 * kern/parser.c: Likewise.
5835 * kern/partition.c: Likewise.
5836 * kern/rescue.c: Likewise.
5837 * kern/term.c: Likewise.
5838 * kern/efi/efi.c: Likewise.
5839 * kern/efi/init.c: Likewise.
5840 * kern/efi/mm.c: Likewise.
5841 * kern/i386/dl.c: Likewise.
5842 * kern/i386/efi/init.c: Likewise.
5843 * kern/i386/efi/startup.S: Likewise.
5844 * kern/i386/pc/init.c: Likewise.
5845 * kern/i386/pc/lzo1x.S: Likewise.
5846 * kern/i386/pc/startup.S: Likewise.
5847 * kern/ieee1275/ieee1275.c: Likewise.
5848 * kern/powerpc/cache.S: Likewise.
5849 * kern/powerpc/dl.c: Likewise.
5850 * kern/powerpc/ieee1275/cmain.c: Likewise.
5851 * kern/powerpc/ieee1275/crt0.S: Likewise.
5852 * kern/powerpc/ieee1275/init.c: Likewise.
5853 * kern/powerpc/ieee1275/openfw.c: Likewise.
5854 * kern/sparc64/cache.S: Likewise.
5855 * kern/sparc64/dl.c: Likewise.
5856 * kern/sparc64/ieee1275/init.c: Likewise.
5857 * kern/sparc64/ieee1275/openfw.c: Likewise.
5858 * loader/efi/chainloader.c: Likewise.
5859 * loader/efi/chainloader_normal.c: Likewise.
5860 * loader/i386/efi/linux.c: Likewise.
5861 * loader/i386/efi/linux_normal.c: Likewise.
5862 * loader/i386/pc/chainloader.c: Likewise.
5863 * loader/i386/pc/chainloader_normal.c: Likewise.
5864 * loader/i386/pc/linux.c: Likewise.
5865 * loader/i386/pc/linux_normal.c: Likewise.
5866 * loader/i386/pc/multiboot.c: Likewise.
5867 * loader/i386/pc/multiboot_normal.c: Likewise.
5868 * loader/powerpc/ieee1275/linux.c: Likewise.
5869 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5870 * normal/arg.c: Likewise.
5871 * normal/cmdline.c: Likewise.
5872 * normal/command.c: Likewise.
5873 * normal/completion.c: Likewise.
5874 * normal/execute.c: Likewise.
5875 * normal/function.c: Likewise.
5876 * normal/lexer.c: Likewise.
5877 * normal/main.c: Likewise.
5878 * normal/menu.c: Likewise.
5879 * normal/menu_entry.c: Likewise.
5880 * normal/misc.c: Likewise.
5881 * normal/parser.y: Likewise.
5882 * normal/script.c: Likewise.
5883 * normal/i386/setjmp.S: Likewise.
5884 * normal/powerpc/setjmp.S: Likewise.
5885 * normal/sparc64/setjmp.S: Likewise.
5886 * partmap/acorn.c: Likewise.
5887 * partmap/amiga.c: Likewise.
5888 * partmap/apple.c: Likewise.
5889 * partmap/gpt.c: Likewise.
5890 * partmap/pc.c: Likewise.
5891 * partmap/sun.c: Likewise.
5892 * term/gfxterm.c: Likewise.
5893 * term/terminfo.c: Likewise.
5894 * term/efi/console.c: Likewise.
5895 * term/i386/pc/console.c: Likewise.
5896 * term/i386/pc/serial.c: Likewise.
5897 * term/i386/pc/vesafb.c: Likewise.
5898 * term/i386/pc/vga.c: Likewise.
5899 * term/ieee1275/ofconsole.c: Likewise.
5900 * util/biosdisk.c: Likewise.
5901 * util/console.c: Likewise.
5902 * util/genmoddep.c: Likewise.
5903 * util/getroot.c: Likewise.
5904 * util/grub-emu.c: Likewise.
5905 * util/grub-mkdevicemap.c: Likewise.
5906 * util/grub-probe.c: Likewise.
5907 * util/lvm.c: Likewise.
5908 * util/misc.c: Likewise.
5909 * util/raid.c: Likewise.
5910 * util/resolve.c: Likewise.
5911 * util/update-grub.in: Likewise.
5912 * util/update-grub_lib.in: Likewise.
5913 * util/grub.d/00_header.in: Likewise.
5914 * util/grub.d/10_hurd.in: Likewise.
5915 * util/grub.d/10_linux.in: Likewise.
5916 * util/i386/efi/grub-install.in: Likewise.
5917 * util/i386/efi/grub-mkimage.c: Likewise.
5918 * util/i386/pc/grub-install.in: Likewise.
5919 * util/i386/pc/grub-mkimage.c: Likewise.
5920 * util/i386/pc/grub-mkrescue.in: Likewise.
5921 * util/i386/pc/grub-setup.c: Likewise.
5922 * util/i386/pc/misc.c: Likewise.
5923 * util/powerpc/ieee1275/grub-install.in: Likewise.
5924 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
5925 * util/powerpc/ieee1275/misc.c: Likewise.
5926 * video/bitmap.c: Likewise.
5927 * video/video.c: Likewise.
5928 * video/i386/pc/vbe.c: Likewise.
5929 * video/i386/pc/vbeblit.c: Likewise.
5930 * video/i386/pc/vbefill.c: Likewise.
5931 * video/i386/pc/vbeutil.c: Likewise.
5932 * video/readers/tga.c: Likewise.
5934 2007-07-02 Robert Millan <rmh@aybabtu.com>
5936 * conf/i386-efi.rmk: Replace obsolete reference to
5937 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
5938 with util/getroot.c.
5939 * conf/powerpc-ieee1275.rmk: Likewise.
5940 * conf/sparc64-ieee1275.rmk: Likewise.
5942 * util/grub-emu.c (main): Fix unchecked pointer handling.
5944 2007-07-02 Robert Millan <rmh@aybabtu.com>
5946 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
5947 invocation to fail, in order to support partition-less media.
5949 * util/i386/pc/grub-install.in: Likewise.
5951 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
5952 which fs or partmap modules are needed (akin to its sister scripts).
5954 Also use grub-probe to get rid of unportable /proc/mounts check.
5956 Print the same informational message that the other scripts do, before
5959 2007-06-23 Robert Millan <rmh@aybabtu.com>
5961 * util/update-grub_lib.in (font_path): New function. Determine whether
5962 a font file can be found and, if so, echo the GRUB path to it.
5964 * util/update-grub.in: Handle multiple terminals depending on user
5965 input, platform availability and font file presence. Propagate
5966 variables of our findings to /etc/grub.d/ children.
5968 * util/grub.d/00_header.in: Handle multiple terminals, based on
5969 environment setup by update-grub.
5971 2007-06-23 Robert Millan <rmh@aybabtu.com>
5973 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
5975 2007-06-21 Robert Millan <rmh@aybabtu.com>
5977 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
5978 indicate end of data section in kernel image.
5979 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
5980 GRUB_KERNEL_MACHINE_DATA_END.
5982 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
5984 * kern/i386/efi/startup.S: Likewise.
5986 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
5987 during image generation. Implement --prefix option to override this
5989 * util/i386/efi/grub-mkimage.c: Likewise.
5991 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
5992 code to make path relative to its root into a separate function.
5994 * util/i386/pc/grub-install.in: Use newly provided
5995 make_system_path_relative_to_its_root() to convert ${grubdir}, then
5996 pass the result to grub-install --prefix.
5998 2007-06-13 Robert Millan <rmh@aybabtu.com>
6000 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
6002 * util/grub-emu.c: Use above definitions from misc.h instead of
6004 * util/grub-mkdevicemap.c: Likewise.
6005 * util/i386/pc/grub-setup.c: Likewise.
6006 * util/grub-probe.c: Likewise.
6007 (probe): Abort with grub_util_error() when either
6008 grub_guess_root_device or grub_util_get_grub_dev fails.
6010 2007-06-12 Robert Millan <rmh@aybabtu.com>
6012 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
6014 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
6016 * util/grub-probe.c (probe): Likewise for "drive_name".
6018 2007-06-11 Robert Millan <rmh@aybabtu.com>
6020 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
6021 not just the cdrom one.
6023 2007-06-11 Robert Millan <rmh@aybabtu.com>
6025 * util/i386/pc/grub-mkrescue.in: Add "set -e".
6026 Add --pkglibdir=DIR option to override pkglibdir.
6027 Mention --image-type=TYPE in help output.
6028 Fix --grub-mkimage (it was a no-op).
6029 Abort gracefully when no parameter is given.
6031 2007-06-11 Robert Millan <rmh@aybabtu.com>
6033 * util/i386/pc/grub-mkrescue.in: New file.
6034 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
6035 * Makefile.in: Handle bin_SCRIPTS.
6037 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
6039 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
6040 list of video modes.
6042 2007-06-06 Robert Millan <rmh@aybabtu.com>
6044 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
6045 file doesn't exist, or if it is in a filesystem grub can't read.
6047 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
6048 not abort if GRUB_DRIVE could not be defined. Rearrange generated
6049 header comment to fit in 80 columns when the variables are resolved.
6051 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
6052 could be identified by update-grub. Remove redundant check for
6053 unifont.pff existence (since convert_system_path_to_grub_path now
6056 2007-06-04 Robert Millan <rmh@aybabtu.com>
6058 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
6060 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
6062 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
6064 2007-06-04 Robert Millan <rmh@aybabtu.com>
6066 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
6068 * include/grub/partition.h: Declare grub_apple_partition_map_init and
6069 grub_apple_partition_map_fini.
6072 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
6073 to access >2 TiB disks).
6075 Print disk->total_sectors with %llu instead of %lu, since this
6076 variable is always 64-bit (prevents wrong disk size from being displayed
6077 on either >2 TiB disk or big-endian CPU).
6079 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
6080 into a generic case that supports all (sane) partition maps.
6082 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
6085 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
6086 and grub_apple_partition_map_fini() after that.
6088 2007-06-01 Robert Millan <rmh@aybabtu.com>
6090 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
6092 * util/grub.d/00_header.in: Only enable gfxterm when
6093 convert_system_path_to_grub_path() succeeds.
6095 2007-05-20 Robert Millan <rmh@aybabtu.com>
6097 * util/update-grub_lib.in: New file.
6098 * DISTLIST: Add update-grub_lib.in.
6099 * conf/common.rmk: Generate update-grub_lib and install it in
6101 * Makefile.in: Add install routine for $(lib_DATA).
6103 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
6104 function provided by update-grub_lib to support arbitrary paths of
6106 * util/update-grub.in: Use convert_system_path_to_grub_path() to
6107 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
6109 2007-05-19 Robert Millan <rmh@aybabtu.com>
6111 * commands/i386/cpuid.c: New module.
6113 * conf/i386-efi.rmk: Enable cpuid.mod.
6114 * conf/i386-pc.rmk: Likewise.
6116 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6118 * kern/disk.c (grub_disk_read): Check return value of
6121 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
6123 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
6125 * disk/raid.c (grub_raid_open): Likewise.
6127 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6129 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
6130 stack instead of on the heap.
6132 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
6133 before doing a read on it.
6135 * configure.ac: Only use -fno-stack-protector for the target
6138 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
6140 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
6141 __attribute_ ((unused)) to mode_type argument.
6143 * util/getroot.c (grub_guess_root_device): Fix #endif.
6145 * kern/misc.c (memcmp): Fix prototype.
6147 * include/grub/partition.h [GRUB_UTIL]
6148 (grub_gpt_partition_map_init): Add prototype.
6149 (grub_gpt_partition_map_fini): Likewise.
6151 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
6154 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
6155 (grub_fat_read_data): Likewise.
6156 (grub_fat_find_dir): Likewise.
6158 * font/manager.c (find_glyph): Make table a const.
6159 (grub_font_get_glyph): Remove bitmap from if statement.
6161 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
6163 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
6164 code, first search for device in /dev/mapper, then in /dev.
6165 (grub_util_get_grub_dev): New function.
6166 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
6168 * util/grub-probe.c (probe): Remove check for RAID, call
6169 grub_util_get_grub_dev() instead of
6170 grub_util_biosdisk_get_grub_dev().
6171 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
6172 grub_util_biosdisk_get_grub_dev().
6173 * util/i386/pc/grub-setup.c (main): Likewise.
6175 2007-05-16 Robert Millan <rmh@aybabtu.com>
6177 * DISTLIST: Update for the latest changes.
6178 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
6179 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
6180 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
6181 grub/util/biosdisk.h.
6182 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
6183 grub/util/biosdisk.h.
6185 2007-05-16 Robert Millan <rmh@aybabtu.com>
6187 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
6189 2007-05-16 Robert Millan <rmh@aybabtu.com>
6191 * util/i386/efi/grub-install.in: New.
6192 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
6193 newly added grub-install.
6194 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
6196 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
6197 grub/util/biosdisk.h.
6198 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
6199 grub/util/biosdisk.h.
6201 2007-05-16 Robert Millan <rmh@aybabtu.com>
6203 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
6204 * include/grub/util/biosdisk.h: ... here.
6205 * util/i386/pc/biosdisk.c: Moved to ...
6206 * util/biosdisk.c: ... here.
6207 * util/i386/pc/getroot.c: Moved to ...
6208 * util/getroot.c: ... here.
6209 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
6210 * util/grub-mkdevicemap.c: ... here.
6211 * util/i386/pc/grub-probe.c: Moved to ...
6212 * util/grub-probe.c: ... here.
6214 2007-05-15 Robert Millan <rmh@aybabtu.com>
6216 * util/update-grub.in: Remove duplicated line in grub.cfg header
6219 2007-05-13 Robert Millan <rmh@aybabtu.com>
6221 * util/update-grub.in: Fix a few assumptions about the devices holding
6222 /, /boot and /boot/grub being the same.
6223 * util/grub.d/00_header.in: Likewise.
6224 * util/grub.d/10_hurd.in: Likewise.
6225 * util/grub.d/10_linux.in: Likewise.
6227 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
6228 patterns. Use that to define the `.old' suffix as older than `'.
6230 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
6232 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
6233 the grub.cfg header message.
6235 2007-05-11 Robert Millan <rmh@aybabtu.com>
6237 * util/update-grub.in: Create device.map if it doesn't already exist,
6238 before attempting to run grub-probe.
6239 Check for grub-probe and grub-mkdevicemap with the same code
6240 grub-install is using.
6243 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
6245 * Makefile.in: Add the datarootdir autoconf variable.
6247 2007-05-09 Robert Millan <rmh@aybabtu.com>
6249 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
6250 fail gracefully if dev->disk->partition == NULL.
6252 2007-05-07 Robert Millan <rmh@aybabtu.com>
6254 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
6255 determine partition map module.
6256 * util/i386/pc/grub-install.in: Use this feature to decide which
6257 partition module to load, instead of hardcoding pc and gpt.
6259 2007-05-07 Robert Millan <rmh@aybabtu.com>
6261 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
6262 source directory differs from build directory.
6264 2007-05-05 Robert Millan <rmh@aybabtu.com>
6266 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
6269 2007-05-05 Robert Millan <rmh@aybabtu.com>
6271 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
6273 2007-05-05 Robert Millan <rmh@aybabtu.com>
6275 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
6276 command-line arguments via ${GRUB_CMDLINE_LINUX}.
6278 2007-05-05 Robert Millan <rmh@aybabtu.com>
6280 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
6281 (grub_probe_SOURCES): Likewise.
6282 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
6283 GPT and initialize dos_part and bsd_part accordingly.
6284 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
6286 (main): Activate gpt module for use during partition identification,
6287 and deactivate it afterwards.
6288 * util/i386/pc/grub-install.in: Add gpt module to core.img.
6289 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
6290 partition identification, and deactivate it afterwards.
6292 2007-05-05 Robert Millan <rmh@aybabtu.com>
6294 * term/i386/pc/console.c (grub_console_fini): Call
6295 grub_term_set_current() before grub_term_unregister().
6297 2007-05-04 Robert Millan <rmh@aybabtu.com>
6299 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
6300 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
6301 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
6302 and update-grub_DATA.
6303 * conf/common.rmk: Build and install update-grub components.
6304 * conf/common.mk: Regenerate.
6305 * util/update-grub.in: New. Core of update-grub.
6306 * util/grub.d/00_header.in: New. Generates grub.cfg header.
6307 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
6308 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
6309 * util/grub.d/README: New. Document grub.d directory layout.
6311 2007-05-01 Robert Millan <rmh@aybabtu.com>
6313 * util/grub-emu.c: Move initialization functions
6314 grub_util_biosdisk_init() and grub_init_all() before
6315 grub_util_biosdisk_get_grub_dev(), which relies on them.
6317 2007-04-19 Robert Millan <rmh@aybabtu.com>
6319 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6322 2007-04-18 Jerone Young <jerone@gmail.com>
6324 * kernel/elf.c: Add missing parenthesis for conditional statement
6327 2007-04-10 Jerone Young <jerone@gmail.com>
6329 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6330 continue on and look for device node with real device name.
6332 2007-04-10 Jerone Young <jerone@gmail.com>
6334 * configure.ac: Add argument for autoconf to use transformation
6336 * Makefile.in: Add autoconf package transformation code.
6337 * util/i386/pc/grub-install.in: Likewise.
6338 * util/powerpc/ieee1275/grub-install.in: Likewise.
6340 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
6342 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6343 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6344 (EXT2_REVISION): Likewise.
6345 (EXT2_INODE_SIZE): Likewise.
6346 (struct grub_ext2_block_group): Added a missing member
6348 (grub_ext2_read_inode): Divide by the inode size in a superblock
6349 instead of 128 to obtain INODES_PER_BLOCK.
6350 Use the macro EXT2_INODE_SIZE instead of directly using
6353 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
6355 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6356 superblock instead of the structure size to compute an
6357 offset. This fixes the problem that GRUB could not read a
6358 filesystem when inode size is different from 128-byte.
6360 2007-03-05 Marco Gerards <marco@gnu.org>
6362 * normal/main.c (read_config_file): When "menu" is not set, create
6365 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6367 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6368 (HEAP_LIMIT): New macro.
6369 (grub_claim_heap): Claim memory up to `heaplimit'.
6371 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6373 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6374 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6376 (grub_arch_modules_addr): Return address after `_end'.
6377 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6378 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6379 (add_segments): Calculate `_end' from phdr size and location.
6380 (ALIGN_UP): Moved to ...
6381 * include/grub/misc.h: here.
6382 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6384 (GRUB_IEEE1275_MODULE_BASE): Removed.
6386 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6388 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6391 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6393 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6395 (grub_elf64_load_hook_t): Likewise.
6396 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6399 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6401 * kern/mm.c: Update copyright.
6402 (grub_mm_debug): Correct syntax error.
6403 (grub_mm_dump_free): New function.
6404 (grub_debug_free): Call `grub_free'.
6405 * include/grub/mm.h: Update copyright.
6406 (grub_mm_dump_free): Add declaration.
6408 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6410 * include/grub/ieee1275/ieee1275.h: Update copyright.
6411 * kern/powerpc/ieee1275/init.c: Likewise.
6412 * kern/powerpc/ieee1275/openfw.c: Likewise.
6414 * loader/powerpc/ieee1275/linux.c: Likewise.
6415 * include/grub/elfload.h: Likewise.
6416 * kern/elf.c: Likewise.
6417 (grub_elf32_load): Pass `base' and `size' parameters. Update all
6419 (grub_elf64_load): Likewise.
6420 (grub_elf32_load_segment): Move to a nested function.
6421 (grub_elf64_load_segment): Likewise.
6423 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6425 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6427 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6428 (grub_heap_len): Likewise.
6429 (HEAP_SIZE): New macro.
6430 (grub_claim_heap): New function.
6431 (grub_machine_init): Don't claim heap directly. Call
6433 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6434 (grub_available_iterate): New function.
6436 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
6438 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6439 * configure.ac: Use it for testing the HOST and TARGET compilers.
6441 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
6443 * Makefile.in (enable_grub_emu): New variable.
6444 * configure.ac (--enable-grub-emu): New option.
6445 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6446 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6447 * conf/i386-pc.rmk: Likewise.
6448 * conf/powerpc-ieee1275.rmk: Likewise.
6449 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6451 2006-12-12 Marco Gerards <marco@gnu.org>
6453 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6455 * kern/env.c (grub_env_unset): Don't free the member `value' when
6456 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6459 * normal/main.c (current_menu): Removed.
6460 (free_menu): Unset the `menu' environment variable.
6461 (grub_normal_menu_addentry): Make use of the environment variable
6462 `menu', instead of using the global `current_menu'. Allocate
6463 memory for the sourcecode of this entry.
6464 (read_config_file): New argument `nested', changed all callers.
6465 Only in the case of a new context, initialize a new menu. Set the
6466 `menu' environment variable.
6467 (grub_normal_execute): Don't set and unset the environment
6468 variable `menu' here anymore. Only free the menu when leaving the
6471 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6474 2006-12-11 Marco Gerards <marco@gnu.org>
6476 * normal/menu_entry.c (run): Fix off by one bug so the last line
6477 is executed. Move the loader check to outside the loop.
6479 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
6481 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6483 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
6485 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6486 the number of sectors. Reported by Andrey Shuvikov
6487 <mr_hyro@yahoo.com>.
6489 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
6491 * kern/disk.c (grub_disk_read): When there is a read error, always
6492 try to read only the necessary data.
6494 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6496 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6498 [GRUB_UTIL] (grub_raid_fini): Likewise.
6499 [GRUB_UTIL] (grub_lvm_init): Likewise.
6500 [GRUB_UTIL] (grub_lvm_fini): Likewise.
6501 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6502 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6503 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
6504 and grub_raid_fini().
6506 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
6508 * include/grub/types.h (__unused): Rename to UNUSED.
6509 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
6510 (grub_elf64_size): Likewise.
6512 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6514 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
6515 grub_error_push and grub_error_pop in the error-handling path.
6516 (grub_elf32_load_segment): Only call grub_file_read with non-zero
6519 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6521 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
6522 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6523 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6524 (kernel_elf_SOURCES): Likewise.
6525 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
6526 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
6527 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6528 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6529 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
6530 (elf_mod_SOURCES): New variable.
6531 (elf_mod_CFLAGS): Likewise.
6532 (elf_mod_LDFLAGS): Likewise.
6533 * include/grub/types.h (__unused): New macro.
6534 * include/grub/elfload.h: New file.
6535 * kern/elf.c: Likewise.
6536 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
6537 (ELF32_LOADMASK): New macro.
6538 (ELF64_LOADMASK): Likewise.
6540 (grub_linux_load32): New function.
6541 (grub_linux_load64): Likewise.
6542 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
6543 Use grub_elf_t instead of grub_file_t.
6545 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
6547 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
6548 `catch_result' to struct set_color_args.
6550 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
6552 * normal/menu.c: Include grub/script.h.
6553 * normal/menu_entry.c: Likewise.
6554 * include/grub/normal.h: Do not include grub/script.h.
6556 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6558 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
6560 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6562 * kern/disk.c (grub_disk_open): Print debug messages when opening a
6564 (grub_disk_close): Print debug messages when closing a disk.
6565 (grub_disk_read): Print debug messages when disk read fails.
6566 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
6568 * kern/partition.c: Include misc.h.
6569 (grub_partition_iterate): Print debug messages when detecting
6572 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6574 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
6576 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
6578 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
6580 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6581 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
6583 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
6585 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
6586 instead of sizeof(lv). Patch by Michael Guntsche.
6588 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
6590 * disk/lvm.c: Rename VGS to VG_LIST.
6591 (grub_lvm_iterate): Change VGS->LV to VG-LV.
6592 (grub_lvm_open): Likewise.
6593 Thanks to Michael Guntsche for finding this bug.
6595 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6597 * configure.ac (AC_INIT): Bumped to 1.95.
6599 2006-10-14 Robert Millan <rmh@aybabtu.com>
6601 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
6602 with "/dev/.static/dev/md".
6604 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
6606 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
6607 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
6608 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
6609 DRIVE_NAME are always freed.
6611 * util/i386/pc/biosdisk.c (make_device_name): Add one into
6612 DOS_PART, as a DOS partition is counted from one instead of zero
6613 now. Reported by Robert Millan.
6615 2006-10-14 Robert Millan <rmh@aybabtu.com>
6617 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
6618 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
6619 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
6620 string returned by grub_guess_root_device.
6621 * util/i386/pc/grub-setup.c: Likewise.
6622 * util/i386/pc/grub-probefs.c: Likewise.
6624 * util/i386/pc/grub-probefs.c: Rename to ...
6625 * util/i386/pc/grub-probe.c: ... this.
6626 * DISTLIST: Remove grub-probefs, add grub-probe.
6627 * conf/i386-efi.rmk: Likewise.
6628 * conf/i386-pc.rmk: Likewise.
6629 * util/i386/pc/grub-install.in: Likewise.
6631 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
6632 choose which information we want to print.
6634 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
6636 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
6637 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
6638 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
6639 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
6640 video/readers/tga.c and video/i386/pc/vbeutil.c.
6642 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
6644 Added support for RAID and LVM.
6646 * disk/lvm.c: New file.
6647 * disk/raid.c: Likewise.
6648 * include/grub/lvm.h: Likewise.
6649 * include/grub/raid.h: Likewise.
6650 * include/grub/util/lvm.h: Likewise.
6651 * include/grub/util/raid.h: Likewise.
6652 * util/lvm.c: Likewise.
6653 * util/raid.c: Likewise.
6655 * include/grub/disk.h (grub_disk_dev_id): Add
6656 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
6657 (grub_disk_get_size): New prototype.
6658 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
6659 returns a partition.
6660 (grub_disk_get_size): New function.
6662 * kern/i386/pc/init.c (make_install_device): Copy the prefix
6663 verbatim if grub_install_dos_part is -2.
6665 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
6668 * util/i386/pc/grub-setup.c (setup): New argument
6669 MUST_EMBED. Force embedding of GRUB when the argument is
6670 true. Close FILE before returning.
6671 (main): Add support for RAID and LVM.
6673 * conf/common.rmk: Add RAID and LVM modules.
6674 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
6676 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
6678 * kern/misc.c (grub_strstr): New function.
6679 * include/grub/misc.h (grub_strstr): New prototype.
6681 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
6683 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
6685 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
6687 * kern/misc.c (grub_strtoull): Guess the base only if not
6690 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6692 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
6695 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6697 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
6699 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
6700 Remove `flags' argument. All callers changed.
6701 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
6702 (IEEE1275_IHANDLE_INVALID): New variable.
6703 (IEEE1275_CELL_INVALID): New variable.
6704 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
6705 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
6706 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
6707 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
6708 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
6709 codes from Open Firmware. All callers updated.
6710 (grub_ieee1275_next_property): Directly return Open Firmware return
6712 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6713 Standardize error checking from `grub_ieee1275_get_property'.
6714 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
6715 `devalias' to `aliases'. Correct comments. Consolidate error paths.
6717 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6719 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
6720 `instance_to_package_args' to `instance_to_path_args'.
6722 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
6723 `grub_ieee1275_chosen'.
6725 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
6726 `grub_ieee1275_interpret'.
6728 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6730 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
6732 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6734 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
6735 (__cmpdi): Likewise.
6737 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
6738 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
6741 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
6743 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
6744 to type `grub_ssize_t'.
6745 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
6747 2006-09-22 Marco Gerards <marco@gnu.org>
6749 * normal/script.c (grub_script_create_cmdmenu): Skip leading
6752 2006-09-22 Marco Gerards <marco@gnu.org>
6754 * commands/echo.c: New file.
6756 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
6758 * conf/common.rmk (echo_mod_SOURCES): New variable.
6759 (echo_mod_CFLAGS): Likewise.
6760 (echo_mod_LDFLAGS): Likewise.
6762 2006-09-22 Marco Gerards <marco@gnu.org>
6764 * normal/main.c (get_line): Malloc memory instead of using
6765 preallocated memory. Removed the arguments `cmdline' and
6766 `max_len'. Updated all callers.
6768 2006-09-22 Marco Gerards <marco@gnu.org>
6770 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
6771 (normal_mod_DEPENDENCIES): Likewise.
6773 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
6774 (normal_mod_DEPENDENCIES): Likewise.
6776 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
6778 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
6780 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
6782 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
6783 (normal_mod_DEPENDENCIES): Likewise.
6784 * conf/i386-pc.mk: Regenerate.
6785 * conf/i386-efi.mk: Likewise
6786 * conf/common.mk: Likewise.
6787 * conf/powerpc-ieee1275.mk: Likewise.
6788 * conf/sparc64-ieee1275.mk: Likewise.
6790 2006-09-22 Robert Millan <rmh@aybabtu.com>
6792 Sync with i386 version.
6793 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
6794 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
6796 2006-09-21 Robert Millan <rmh@aybabtu.com>
6798 Import from GRUB Legacy (lib/device.c):
6799 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
6800 (init_device_map) [__linux__]: Add support for I2O devices.
6802 2006-09-14 Marco Gerards <marco@gnu.org>
6804 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
6807 2006-09-14 Robert Millan <rmh@aybabtu.com>
6809 * util/i386/pc/grub-install.in: Skip menu.lst when removing
6812 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6814 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
6815 before adding it to device.map.
6817 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
6819 * genmk.rb: Let GCC generate dependencies the first time it
6820 compiles a file; using the -MD option.
6821 * conf/common.mk: Regenerate.
6822 * conf/i386-pc.mk: Likewise.
6823 * conf/i386-efi.mk: Likewise.
6824 * conf/powerpc-ieee1275.mk: Likewise.
6825 * conf/sparc64-ieee1275.mk: Likewise.
6827 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
6829 Move the prototypes of grub_setjmp and grub_longjmp to
6830 cpu/setjmp.h, so that each architecture may specify different
6833 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
6834 (grub_longjmp): Likewise.
6835 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
6836 (grub_longjmp): Likewise.
6837 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
6838 (grub_longjmp): Likewise.
6840 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
6841 [!GRUB_UTIL] (grub_longjmp): Removed.
6843 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
6845 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
6846 "color!" method does not return any value.
6848 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6850 * include/grub/bitmap.h: New file.
6852 * include/grub/i386/pc/vbeutil.h: Likewise.
6854 * video/bitmap.c: Likewise.
6856 * video/readers/tga.c: Likewise.
6858 * video/i386/pc/vbeutil.c: Likewise.
6860 * commands/videotest.c: Code cleanup and updated to reflect to new
6863 * term/gfxterm.c: Likewise.
6865 * video/video.c: Likewise.
6867 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
6868 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
6869 (bitmap_mod_SOURCES): New entry.
6870 (bitmap_mod_CFLAGS): Likewise.
6871 (bitmap_mod_LDFLAGS): Likewise.
6872 (tga_mod_SOURCES): Likewise.
6873 (tga_mod_CFLAGS): Likewise.
6874 (tga_mod_LDFLAGS): Likewise.
6876 * include/grub/video.h (grub_video_blit_operators): New enum type.
6877 (grub_video_render_target): Changed as forward declaration and moved
6878 actual definition to be video driver specific.
6879 (grub_video_adapter.blit_bitmap): Added blitting operator.
6880 (grub_video_adapter.blit_render_target): Likewise.
6881 (grub_video_blit_bitmap): Likewise.
6882 (grub_video_blit_render_target): Likewise.
6884 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
6885 driver specific render target definition.
6886 (grub_video_vbe_map_rgba): Added driver internal helper.
6887 (grub_video_vbe_unmap_color): Updated to use
6888 grub_video_i386_vbeblit_info.
6889 (grub_video_vbe_get_video_ptr): Likewise.
6891 * include/grub/i386/pc/vbeblit.h
6892 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
6893 grub_video_i386_vbeblit_info.
6894 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6895 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6896 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6897 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6898 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6899 (grub_video_i386_vbeblit_index_index): Likewise.
6900 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
6901 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6902 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6903 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
6905 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
6908 * video/i386/pc/vbeblit.c: Updated to reflect changes on
6909 include/grub/i386/pc/vbeblit.h.
6911 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
6912 Updated to use grub_video_i386_vbeblit_info.
6913 (grub_video_i386_vbefill_R8G8B8): Likewise.
6914 (grub_video_i386_vbefill_index): Likewise.
6915 (grub_video_i386_vbefill): Added generic filler.
6917 * video/i386/pc/vbefill.c: Updated to reflect changes on
6918 include/grub/i386/pc/vbefill.h.
6920 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
6921 grub_video_i386_vbeblit_info.
6922 (grub_video_vbe_unmap_color): Likewise.
6923 (grub_video_vbe_blit_glyph): Likewise.
6924 (grub_video_vbe_scroll): Likewise.
6925 (grub_video_vbe_draw_pixel): Removed function.
6926 (grub_video_vbe_get_pixel): Likewise.
6927 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
6928 updated code to use it.
6929 (common_blitter): Added common blitter for render target and bitmap.
6930 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
6931 (grub_video_vbe_blit_render_target): Likewise.
6933 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
6935 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
6936 is in text mode if there is no console control protocol instance
6939 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6941 * include/grub/video.h: Code cleanup.
6943 * include/grub/i386/pc/vbe.h: Likewise.
6945 * video/i386/pc/vbe.c: Likewise.
6947 * video/i386/pc/vbeblit.c: Likewise.
6949 * video/i386/pc/vbefill.c: Likewise.
6951 * video/video.c: Likewise. Also added more comments.
6953 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6955 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
6956 (struct grub_biosdisk_dap): Likewise.
6958 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
6959 linkage settings for all functions.
6961 2006-07-12 Marco Gerards <marco@gnu.org>
6963 * configure.ac (--enable-mm-debug): Fix typo.
6965 * genkernsyms.sh.in: Use proper quoting for `CC'.
6967 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
6969 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
6970 (normal_mod_ASFLAGS): Remove "-m32".
6972 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
6974 * util/misc.c: Include config.h.
6975 [!HAVE_MEMALIGN]: Do not include malloc.h.
6976 (grub_memalign): Use posix_memalign, if present. Then, use
6977 memalign, if present. Otherwise, emit an error.
6979 * util/grub-emu.c: Do not include malloc.h.
6981 * include/grub/util/misc.h: Include unistd.h. This is required for
6982 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
6983 D. Eades III <hde@foobar-qux.org>.
6985 * configure.ac (AC_GNU_SOURCE): Added.
6986 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
6989 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
6991 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
6992 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
6994 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
6996 * include/grub/types.h (grub_host_addr_t): Rename to
6998 (grub_host_off_t): Rename to grub_target_off_t.
6999 (grub_host_size_t): Rename to grub_target_size_t.
7000 (grub_host_ssize_t): Rename to grub_target_ssize_t.
7001 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
7003 * include/grub/kernel.h (struct grub_module_header): Change type
7004 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
7005 (grub_module_info): Likewise.
7007 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7009 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
7010 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
7011 Velazquez <jesus.velazquez@gmail.com>.
7013 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
7015 Count partitions from 1 instead of 0 in the string representation
7016 of partitions. Still use 0-based internally.
7018 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
7019 (sun_partition_map_iterate): Use grub_partition_t instead of
7020 struct grub_partition *. Cast DESC->START_CYLINDER to
7021 grub_uint64_t after converting the endian.
7022 (sun_partition_map_probe): Subtract 1 for PARTNUM.
7023 (sun_partition_map_get_name): Add 1 to P->INDEX.
7025 * partmap/pc.c (grub_partition_parse): Subtract 1 for
7027 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
7029 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
7030 zero instead of one.
7031 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
7032 (gpt_partition_map_get_name): Add 1 into P->INDEX.
7034 * partmap/apple.c (apple_partition_map_iterate): Change the type
7036 (apple_partition_map_probe): Subtract 1 for PARTNUM.
7037 (apple_partition_map_get_name): Add 1 into P->INDEX.
7039 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
7041 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
7042 calculate the offset of a partition.
7043 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
7044 (amiga_partition_map_get_name): Add 1 into P->INDEX.
7046 * partmap/acorn.c (acorn_partition_map_find): Change the type of
7047 SECTOR to grub_disk_addr_t.
7048 (acorn_partition_map_iterate): Likewise.
7049 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
7050 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
7052 (acorn_partition_map_get_name): Add 1 into P->INDEX.
7054 * kern/i386/pc/init.c (make_install_device): Add 1 into
7055 GRUB_INSTALL_DOS_PART.
7057 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
7060 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7062 Clean up the code to support 64-bit addressing in disks and
7063 files. This change is not enough for filesystems yet.
7065 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
7066 type of "start" to grub_uint64_t.
7067 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
7068 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
7069 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
7072 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
7073 to grub_disk_addr_t.
7075 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
7078 * partmap/pc.c (pc_partition_map_iterate): Likewise.
7080 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
7083 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
7085 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
7087 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
7089 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
7090 to grub_off_t, to detect an error from grub_file_seek.
7091 (grub_multiboot_load_elf32): Likewise.
7093 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
7094 maximum unsigned long value when an overflow is detected.
7095 (grub_strtoull): New function.
7096 (grub_divmod64): Likewise.
7097 (grub_lltoa): use grub_divmod64.
7099 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
7101 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
7102 the pointer to next character. Use grub_strtoull instead of
7104 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
7105 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
7108 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
7109 return value is signed.
7110 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
7111 test if OFFSET is less than zero, as OFFSET is unsigned now.
7113 * kern/disk.c (struct grub_disk_cache): Change the type of
7114 "sector" to grub_disk_addr_t.
7115 (grub_disk_cache_get_index): Change the type of SECTOR to
7116 grub_disk_addr_t. Calculate the hash with SECTOR casted to
7117 unsigned after shifting.
7118 (grub_disk_cache_invalidate): Change the type of SECTOR to
7120 (grub_disk_cache_unlock): Likewise.
7121 (grub_disk_cache_store): Likewise.
7122 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
7123 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
7124 grub_disk_addr_t and grub_uint64_t, respectively.
7125 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
7126 body, as the value of OFFSET is tweaked by
7127 grub_disk_check_range. Change the types of START_SECTOR, LEN and
7128 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
7130 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
7131 body, as the value of OFFSET is tweaked by
7132 grub_disk_check_range. Change the types of LEN and N to
7135 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
7136 and "saved_offset" to grub_off_t.
7137 (test_header): Cast BUF to char *.
7138 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
7140 (grub_gzio_read): Change the types of OFFSET and SIZE to
7141 grub_off_t and grub_size_t, respectively.
7143 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
7145 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
7146 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
7147 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
7148 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
7149 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
7151 * include/grub/types.h (grub_off_t): Unconditionally set to
7153 (grub_disk_addr_t): Changed to grub_uint64_t.
7155 * include/grub/partition.h (struct grub_partition): Change the
7156 types of "start", "len" and "offset" to grub_disk_addr_t,
7157 grub_uint64_t and grub_disk_addr_t, respectively.
7158 (grub_partition_get_start): Return grub_disk_addr_t.
7159 (grub_partition_get_len): Return grub_uint64_t.
7161 * include/grub/misc.h (grub_strtoull): New prototype.
7162 (grub_divmod64): Likewise.
7164 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
7165 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
7166 grub_off_t, respectively.
7167 All callers and references changed.
7169 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
7170 grub_size_t in "read".
7171 All callers and references changed.
7173 * include/grub/file.h (struct grub_file): Change the types of
7174 "offset" and "size" to grub_off_t and grub_off_t,
7175 respectively. Change the type of SECTOR to grub_disk_addr_t in
7177 (grub_file_read): Change the type of LEN to grub_size_t.
7178 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
7180 (grub_file_size): Return grub_off_t.
7181 (grub_file_tell): Likewise.
7182 All callers and references changed.
7184 * include/grub/disk.h (struct grub_disk_dev): Change the types of
7185 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
7187 (struct grub_disk): Change the type of "total_sectors" to
7188 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
7190 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
7191 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
7192 (grub_disk_write): Likewise.
7193 All callers and references changed.
7195 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
7196 char * for grub_strncmp to silence gcc.
7197 (grub_iso9660_mount): Likewise.
7198 (grub_iso9660_mount): Likewise.
7199 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
7201 (grub_iso9660_iterate_dir): Likewise.
7202 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
7204 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
7205 LEN to grub_disk_addr_t and grub_size_t, respectively.
7207 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7209 * fs/jfs.c (grub_jfs_read_file): Likewise.
7211 * fs/minix.c (grub_jfs_read_file): Likewise.
7213 * fs/sfs.c (grub_jfs_read_file): Likewise.
7215 * fs/ufs.c (grub_jfs_read_file): Likewise.
7217 * fs/xfs.c (grub_jfs_read_file): Likewise.
7219 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
7220 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
7223 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
7224 BLKNR to -1 instead of returning GRUB_ERRNO.
7225 (grub_ext2_read_file): Change the types of SECTOR and
7226 LEN to grub_disk_addr_t and grub_size_t, respectively.
7228 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
7229 LEN to grub_disk_addr_t and grub_size_t, respectively.
7231 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
7234 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
7235 string. Do not cast SECTOR explicitly.
7237 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
7238 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
7239 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
7240 grub_disk_addr_t and grub_size_t, respectively. If the sector is
7241 over 2TB and LBA mode is not supported, raise an error.
7242 (get_safe_sectors): New function.
7243 (grub_biosdisk_read): Use get_safe_sectors.
7244 (grub_biosdisk_write): Likewise.
7246 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
7247 (grub_efidisk_write): Likewise.
7249 * disk/loopback.c (delete_loopback): Cosmetic changes.
7250 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
7252 (grub_loopback_open): Likewise.
7253 (grub_loopback_read): Likewise. Also, change the type of POS to
7254 grub_off_t, and fix the usage of grub_memset.
7256 * commands/i386/pc/play.c: Include grub/machine/time.h.
7258 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
7261 * commands/configfile.c: Include grub/env.h.
7263 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
7264 GRUB_ERRNO directly instead. Change the type of POS to
7265 grub_off_t. Follow the coding standard.
7267 * commands/blocklist.c: Include grub/partition.h.
7268 (grub_cmd_blocklist): Return an error if the underlying device is
7269 not a disk. Take the starting sector of a partition into account,
7270 if a partition is used.
7272 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
7274 (lba_mode): Support 64-bit addresses.
7275 (chs_mode): Likewise.
7276 (copy_buffer): Adapted to the new offsets of a length field and a
7278 (blocklist_default_start): Allocate 64-bit space.
7280 * boot/i386/pc/boot.S (force_lba): Removed.
7281 (boot_drive): Moved to under KERNEL_SECTOR.
7282 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
7284 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
7286 (lba_mode): Refactored to support a 64-bit address. More size
7288 (setup_sectors): Likewise.
7290 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
7292 * DISTLIST: Added include/grub/i386/linux.h. Removed
7293 include/grub/i386/pc/linux.h
7295 * configure.ac (AC_INIT): Bumped to 1.94.
7297 * config.guess: Updated from gnulib.
7298 * config.sub: Likewise.
7299 * install-sh: Likewise.
7300 * mkinstalldirs: Likewise.
7302 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7304 * conf/common.rmk (grub_modules_init.lst): Depended on
7305 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7308 * genmk.rb (PModule::rule): Reverted the previous change.
7310 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7312 * conf/common.rmk (grub_modules_init.lst): Depends on
7313 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7314 that the target does not exist before producing.
7315 (grub_modules_init.h): Remove the target before generating.
7316 (grub_emu_init.c): Likewise.
7318 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7320 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
7322 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7323 for the target-specific tests. Make sure that we also have the
7324 up-to-date target variables for those tests.
7326 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7328 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7329 (PModule::rule): Likewise.
7331 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7333 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7334 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7335 target-specific flags should be prefixed.
7336 (PModule::rule): Likewise.
7338 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
7340 * configure.ac (CMP): Check if cmp is available explicitly.
7342 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
7344 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7345 (target_cpu): New variable.
7346 (pkglibdir): Use target_cpu instead of host_cpu.
7348 * util/i386/pc/grub-install.in (host_cpu): Removed.
7349 (target_cpu): New variable.
7350 (pkglibdir): Use target_cpu instead of host_cpu.
7352 * util/genmoddep.c: Removed.
7354 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7355 instead of GRUB_HOST_SIZEOF_VOID_P.
7356 * kern/dl.c: Likewise.
7358 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7360 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7361 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7362 (GRUB_TARGET_SIZEOF_LONG): ... this.
7363 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7364 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7365 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7367 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7368 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7369 (GRUB_TARGET_SIZEOF_LONG): ... this.
7370 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7371 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7372 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7374 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7375 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7376 (GRUB_TARGET_SIZEOF_LONG): ... this.
7377 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7378 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7380 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7381 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7382 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7383 instead of GRUB_HOST_SIZEOF_LONG.
7384 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7385 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7386 GRUB_CPU_WORDS_BIGENDIAN.
7387 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7388 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7391 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7392 (genmoddep_SOURCES): Likewise.
7393 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7394 (genmoddep_SOURCES): Likewise.
7395 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7396 (genmoddep_SOURCES): Likewise.
7397 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7399 (genmoddep_SOURCES): Likewise.
7401 * genmoddep.awk: New file.
7403 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7404 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7405 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7406 (PModule::rule): Likewise.
7407 (Program::rule): Likewise.
7408 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7409 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7412 * configure.ac: Rewritten intensively to use host and target
7413 instead of build and host, respectively.
7415 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7416 (host_cpu): Removed.
7417 (target_cpu): New variable.
7418 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7419 (BUILD_CC): Removed.
7420 (BUILD_CFLAGS): Likewise.
7421 (BUILD_CPPFLAGS): Likewise.
7422 (TARGET_CC): New variable.
7423 (TARGET_CFLAGS): Likewise.
7424 (TARGET_CPPFLAGS): Likewise.
7425 (TARGET_LDFLAGS): Likewise.
7427 (include): Use target_cpu instead of host_cpu.
7428 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7430 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7432 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
7434 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7435 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
7436 field 'false' to 'exec_on_false'.
7437 (grub_script_create_cmdif): Renamed argument names to reflect above
7440 * normal/execute.c (grub_script_execute_cmdif): Likewise.
7442 * normal/script.c (grub_script_create_cmdif): Likewise.
7444 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
7446 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7448 (grub_hfsplus_btree_recptr): Likewise.
7449 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7450 FILEBLOCK both to pass a block number and store next block
7452 (grub_hfsplus_read_block): Rewritten heavily to support an extent
7453 overflow file correctly. Specify errors appropriately, because
7454 fshelp expects that GRUB_ERRNO is set when fails. Reuse
7455 grub_hfsplus_btree_recptr to get the pointer to a found key.
7456 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7459 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7461 (_linux_mod_SOURCES): New variable.
7462 (_linux_mod_CFLAGS): Likewise.
7463 (_linux_mod_LDFLAGS): Likewise.
7464 (linux_mod_SOURCES): Likewise.
7465 (linux_mod_CFLAGS): Likewise.
7466 (linux_mod_LDFLAGS): Likewise.
7468 * DISTLIST: Added loader/i386/efi/linux.c,
7469 loader/i386/efi/linux_normal.c and
7470 include/grub/i386/efi/loader.h.
7472 * loader/i386/efi/linux.c: New file.
7473 * loader/i386/efi/linux_normal.c: Likewise.
7474 * include/grub/i386/efi/loader.h: Likewise.
7476 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
7478 * commands/blocklist.c: New file.
7480 * DISTLIST: Added commands/blocklist.c.
7482 * term/efi/console.c (grub_console_highlight_color): Use a lighter
7483 color for the background, and a darker color for the foreground.
7484 (grub_console_checkkey): Return READ_KEY.
7485 (grub_console_cls): Set the background to
7486 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7488 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7490 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7491 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7493 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7496 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7497 BG. The spec is wrong again.
7499 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7501 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7503 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7504 commands/blocklist.c.
7505 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7507 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
7508 (blocklist_mod_SOURCES): New variable.
7509 (blocklist_mod_CFLAGS): Likewise.
7510 (blocklist_mod_LDFLAGS): Likewise.
7512 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
7514 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
7516 (lba_mode): Use %eax more intensively to reduce the code size.
7518 2006-05-20 Marco Gerards <marco@gnu.org>
7520 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
7522 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
7524 (script): Accept leading newlines.
7525 (newlines): New rule to describe 0 or more newlines.
7526 (commands): Accept `command' with trailing newline. Fixed the
7527 order in which arguments were passed to `grub_script_add_cmd'.
7528 Accept commands separated by newlines.
7529 (function): Changed to accept newlines.
7530 (menuentry) Rewritten.
7532 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
7533 front of the list, instead of to the end.
7535 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
7537 * util/i386/pc/grub-install.in (bindir): New variable.
7538 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
7539 Shaver <lbgwjl@gmail.com>.
7541 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
7543 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
7544 grub/machine/linux.h
7545 * loader/i386/pc/linux.c: Likewise.
7547 * include/grub/i386/pc/linux.h: Moved to ...
7548 * include/grub/i386/linux.h: ... here.
7550 * include/grub/i386/linux.h (struct linux_kernel_params): New
7553 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
7555 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
7557 (grub_video_vbe_blit_glyph): Likewise.
7558 (grub_video_vbe_blit_bitmap): Likewise.
7559 (grub_video_vbe_blit_render_target): Likewise.
7561 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
7563 * configure.ac (--with-platform): Properly quote the square
7566 2006-05-08 Marco Gerards <marco@gnu.org>
7568 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
7570 (kernel_elf_HEADERS): ...to this. Updated all users.
7571 (grubof_symlist.c): Renamed from this...
7572 (kernel_elf_symlist.c): ...to this. Updated all users.
7573 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7574 (grubof_SOURCES): Renamed from this...
7575 (kernel_elf_SOURCES): ...to this.
7576 (grubof_HEADERS): Renamed from this...
7577 (kernel_elf_HEADERS): ...to this.
7578 (grubof_CFLAGS): Renamed from this...
7579 (kernel_elf_CFLAGS): ...to this.
7580 (grubof_ASFLAGS): Renamed from this...
7581 (kernel_elf_ASFLAGS): ...to this.
7582 (grubof_LDFLAGS): Renamed from this...
7583 (kernel_elf_LDFLAGS): ...to this.
7585 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
7587 (kernel_elf_HEADERS): ...to this. Updated all users.
7588 (grubof_symlist.c): Renamed from this...
7589 (kernel_elf_symlist.c): ...to this. Updated all users.
7590 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7591 (grubof_SOURCES): Renamed from this...
7592 (kernel_elf_SOURCES): ...to this.
7593 (grubof_HEADERS): Renamed from this...
7594 (kernel_elf_HEADERS): ...to this.
7595 (grubof_CFLAGS): Renamed from this...
7596 (kernel_elf_CFLAGS): ...to this.
7597 (grubof_ASFLAGS): Renamed from this...
7598 (kernel_elf_ASFLAGS): ...to this.
7599 (grubof_LDFLAGS): Renamed from this...
7600 (kernel_elf_LDFLAGS): ...to this.
7602 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
7603 `kernel.elf' instead of `grubof'.
7605 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
7607 Add --with-platform to configure. Use pkglibdir instead of
7608 pkgdatadir. This is reported by Roger Leigh.
7610 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
7611 (host_vendor): Likewise.
7612 (host_os): Likewise.
7613 (pkgdatadir): Likewise.
7614 (platform): New variable.
7615 (pkglibdir): Likewise.
7616 Use PKGLIBDIR instead of PKGDATADIR.
7618 * util/i386/pc/grub-install.in (datadir): Removed.
7619 (host_vendor): Likewise.
7620 (host_os): Likewise.
7621 (pkgdatadir): Likewise.
7622 (platform): New variable.
7623 (pkglibdir): Likewise.
7624 Use PKGLIBDIR instead of PKGDATADIR.
7626 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
7627 instead of GRUB_DATADIR.
7629 * util/i386/pc/grub-mkimage.c (usage): Likewise.
7631 * util/i386/efi/grub-mkimage.c (usage): Likewise.
7634 * configure.ac (--with-platform): New option.
7635 Use PLATFORM instead of HOST_VENDOR to specify a platform.
7637 * Makefile.in: Include a makefile based on PLATFORM instead of
7639 (pkgdatadir): Not appended by the machine type.
7640 (pkglibdir): Appended by the machine type.
7641 (host_vendor): Removed.
7642 (platform): New variable.
7643 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
7644 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
7645 (uninstall): Likewise.
7647 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
7649 Use the environment context in the menu. Remove the commands
7650 "default" and "timeout", and use variables instead.
7652 * normal/menu.c: Include grub/env.h.
7653 (print_entry): Cast TITLE to silence gcc.
7654 (get_timeout): New function.
7655 (set_timeout): Likewise.
7656 (get_entry_number): Likewise.
7657 (run_menu): Use a default entry, a fallback entry and a timeout
7658 in the environment variables "default", "fallback" and
7659 "timeout". Also, tweak the default entry if it is not within the
7660 current menu entries.
7661 (grub_menu_run): Use a fallback entry in the environment variable
7664 * normal/main.c (read_config_file): Do not initialize
7665 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
7667 (grub_normal_execute): Use a data slot to store the menu.
7669 * include/grub/normal.h (struct grub_menu): Removed default_entry,
7670 fallback_entry and timeout.
7671 (struct grub_menu_list): Removed.
7672 (grub_menu_list_t): Likewise.
7673 (struct grub_context): Likewise.
7674 (grub_context_t): Likewise.
7675 (grub_context_get): Likewise.
7676 (grub_context_get_current_menu): Likewise.
7677 (grub_context_push_menu): Likewise.
7678 (grub_context_pop_menu): Likewise.
7679 (grub_default_init): Likewise.
7680 (grub_default_fini): Likewise.
7681 (grub_timeout_init): Likewise.
7682 (grub_timeout_fini): Likewise.
7684 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
7686 (normal_mod_SOURCES): Removed normal/context.c.
7688 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
7689 commands/default.c, commands/timeout.c and normal/context.c.
7690 (normal_mod_SOURCES): Removed normal/context.c.
7692 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
7693 commands/timeout.c and normal/context.c.
7694 (normal_mod_SOURCES): Removed normal/context.c.
7696 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
7697 commands/default.c, commands/timeout.c and normal/context.c.
7698 (normal_mod_SOURCES): Removed normal/context.c.
7700 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
7702 (default_mod_SOURCES): Removed.
7703 (default_mod_CFLAGS): Likewise.
7704 (default_mod_LDFLAGS): Likewise.
7705 (timeout_mod_SOURCES): Removed.
7706 (timeout_mod_CFLAGS): Likewise.
7707 (timeout_mod_LDFLAGS): Likewise.
7709 * DISTLIST: Removed commands/default.c, commands/timeout.c and
7712 * commands/default.c: Removed.
7713 * commands/timeout.c: Likewise.
7714 * normal/context.c: Likewise.
7716 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
7718 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
7720 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
7722 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
7723 "next" to "prev" for readability.
7724 (struct grub_env_sorted_var): New struct.
7725 (grub_env_context): Renamed to ...
7726 (initial_context): ... this.
7727 (grub_env_var_context): Renamed to ...
7728 (current_context): ... this.
7729 (grub_env_find): Look only at CURRENT_CONTEXT.
7730 (grub_env_context_open): Rewritten to copy exported variables from
7732 (grub_env_context_close): Rewritten according to the new
7733 scheme. Also, add an assertion to prevent the initial context from
7735 (grub_env_insert): Removed the code for the sorted list.
7736 (grub_env_remove): Likewise.
7737 (grub_env_export): Simply mark the variable with
7738 GRUB_ENV_VAR_GLOBAL.
7739 (grub_env_set): A cosmetic change for naming consistency.
7740 (grub_env_get): Likewise.
7741 (grub_env_unset): Likewise.
7742 (grub_env_iterate): Rewritten to sort variables within this
7744 (grub_register_variable_hook): Fixed for naming consistency. Call
7745 grub_env_find again, only if NAME is not found at the first time.
7746 (mangle_data_slot_name): New function.
7747 (grub_env_set_data_slot): Likewise.
7748 (grub_env_get_data_slot): Likewise.
7749 (grub_env_unset_data_slot): Likewise.
7751 * include/grub/env.h (grub_env_var_type): New enum.
7752 (GRUB_ENV_VAR_LOCAL): New constant.
7753 (GRUB_ENV_VAR_GLOBAL): Likewise.
7754 (GRUB_ENV_VAR_DATA): Likewise.
7755 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
7757 (grub_env_set): Replace VAR with NAME for consistency.
7758 (grub_register_variable_hook): Likewise.
7759 (grub_env_export): Specify the name of the argument.
7760 (grub_env_set_data_slot): New prototype.
7761 (grub_env_get_data_slot): Likewise.
7762 (grub_env_unset_data_slot): Likewise.
7764 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7766 Extend the loader so that GRUB can accept a loader which comes
7767 back to GRUB when a loaded image exits. Also, this change adds
7768 support for a chainloader on EFI.
7770 * term/efi/console.c: Include grub/misc.h.
7771 (grub_console_checkkey): Display a scan code on the top for
7772 debugging. This will be removed once the EFI port gets stable.
7773 Correct the scan code mapping.
7775 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
7776 allocate memory from larger regions, in order to reduce the number
7777 of allocated regions. Otherwise, the MacOSX loader panics.
7778 (filter_memory_map): Avoid less than 1MB for compatibility with
7780 (add_memory_regions): Allocate from the tail of a region, if
7781 possible, to avoid allocating a region near to 1MB, for the MacOSX
7784 * kern/efi/init.c (grub_efi_set_prefix): Specify
7785 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
7787 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
7788 argument IMAGE_HANDLE and specify it to get a loaded image.
7789 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
7790 grub_efi_get_loaded_image.
7791 (grub_efi_get_filename): Divide the length by the size of
7793 (grub_efi_get_device_path): New function.
7794 (grub_efi_print_device_path): Print End Device Path nodes. Divide
7795 the length by the size of grub_efi_char16_t for a file path device
7798 * kern/loader.c (grub_loader_noreturn): New variable.
7799 (grub_loader_set): Accept a new argument NORETURN. Set
7800 GRUB_LOADER_NORETURN to NORETURN.
7801 All callers changed.
7802 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
7805 * include/grub/efi/efi.h (grub_efi_get_device_path): New
7807 (grub_efi_get_loaded_image): Take an argument to specify an image
7810 * include/grub/loader.h (grub_loader_set): Added one more argument
7813 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
7814 instead of grub_efi_open_protocol.
7815 (grub_efidisk_get_device_name): Likewise.
7816 (grub_efidisk_close): Print a newline.
7817 (grub_efidisk_get_device_handle): Fixed to use
7818 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
7819 GRUB_EFI_DEVICE_PATH_TYPE.
7821 * disk/efi/efidisk.c (device_path_guid): Moved to ...
7822 * kern/efi/efi.c (device_path_guid): ... here.
7824 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
7826 (kernel_mod_HEADERS): Added efi/disk.h.
7827 (_chain_mod_SOURCES): New variable.
7828 (_chain_mod_CFLAGS): Likewise.
7829 (_chain_mod_LDFLAGS): Likewise.
7830 (chain_mod_SOURCES): Likewise.
7831 (chain_mod_CFLAGS): Likewise.
7832 (chain_mod_LDFLAGS): Likewise.
7834 * DISTLIST: Added include/grub/efi/chainloader.h,
7835 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
7837 * include/grub/efi/chainloader.h: New file.
7838 * loader/efi/chainloader.c: Likewise.
7839 * loader/efi/chainloader_normal.c: Likewise.
7841 2006-04-30 Marco Gerards <marco@gnu.org>
7843 * commands/configfile.c (grub_cmd_source): New function.
7844 (GRUB_MOD_INIT): Register the commands `source' and `.'.
7845 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
7847 2006-04-30 Marco Gerards <marco@gnu.org>
7849 * normal/execute.c (grub_script_execute_cmd): Change the return
7850 type to `grub_err_t'. Correctly return the error.
7851 (grub_script_execute_cmdline): In case a command line is not a
7852 command or a function, try to interpret it as an assignment.
7854 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7856 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
7857 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
7858 skip a node whose name is obviously invalid as UTF-16,
7859 i.e. contains a NUL character. Stop the iteration when the last
7860 directory entry is found. Instead of using the return value of
7861 grub_hfsplus_btree_iterate_node, store the value in RET and use
7862 it, because the iterator can be stopped by the last directory
7865 2006-04-30 Marco Gerards <marco@gnu.org>
7867 * include/grub/env.h (grub_env_export): New prototype. Reported
7868 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
7870 2006-04-30 Marco Gerards <marco@gnu.org>
7872 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
7873 size of the extents in a catalog file record.
7875 2006-04-29 Marco Gerards <marco@gnu.org>
7877 * commands/configfile.c (grub_cmd_configfile): Execute the
7878 configfile within its own context.
7880 * include/grub/env.h (grub_env_context_open): New prototype.
7881 (grub_env_context_close): Likewise.
7883 * kern/env.c (grub_env): Removed.
7884 (grub_env_sorted): Likewise.
7885 (grub_env_context): New variable.
7886 (grub_env_var_context): Likewise.
7887 (grub_env_find): Search both the active context and the global
7889 (grub_env_context_open): New function.
7890 (grub_env_context_close): Likewise.
7891 (grub_env_insert): Likewise.
7892 (grub_env_remove): Likewise.
7893 (grub_env_export): Likewise.
7894 (grub_env_set): Changed to use helper functions to avoid code
7896 (grub_env_iterate): Rewritten so both the current context and the
7897 global context are being used.
7899 * normal/command.c (export_command): New function.
7900 (grub_command_init): Register the `export' function.
7902 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
7904 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
7905 explicitly to suppress gcc's warnings.
7906 * fs/fat.c (grub_fat_find_dir): Likewise.
7907 (grub_fat_label): Likewise.
7908 * fs/xfs.c (grub_xfs_read_inode): Likewise.
7909 (grub_xfs_mount): Likewise.
7910 (grub_xfs_label): Likewise.
7911 * fs/affs.c (grub_affs_mount): Likewise.
7912 (grub_affs_label): Likewise.
7913 (grub_affs_iterate_dir): Likewise.
7914 * fs/sfs.c (grub_sfs_mount): Likewise.
7915 (grub_sfs_iterate_dir): Likewise.
7916 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
7917 * fs/hfs.c (grub_hfs_mount): Likewise.
7918 (grub_hfs_cmp_catkeys): Likewise.
7919 (grub_hfs_find_dir): Likewise.
7920 (grub_hfs_dir): Likewise.
7921 (grub_hfs_label): Likewise.
7922 * fs/jfs.c (grub_jfs_mount): Likewise.
7923 (grub_jfs_opendir): Likewise.
7924 (grub_jfs_getent): Likewise.
7925 (grub_jfs_lookup_symlink): Likewise.
7926 (grub_jfs_label): Likewise.
7927 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
7928 (grub_hfsplus_iterate_dir): Likewise.
7929 (grub_hfsplus_btree_iterate_node): Made static.
7931 * util/grub-emu.c (prefix): New variable.
7932 (grub_machine_set_prefix): New function.
7933 (main): Do not set the environment variable "prefix" here. Only
7934 set PREFIX, which is used later by grub_machine_set_prefix.
7936 * include/grub/video.h: Do not include grub/symbol.h.
7937 (grub_video_register): Not exported. This symbol is not defined in
7939 (grub_video_unregister): Likewise.
7940 (grub_video_iterate): Likewise.
7941 (grub_video_setup): Likewise.
7942 (grub_video_restore): Likewise.
7943 (grub_video_get_info): Likewise.
7944 (grub_video_get_blit_format): Likewise.
7945 (grub_video_set_palette): Likewise.
7946 (grub_video_get_palette): Likewise.
7947 (grub_video_set_viewport): Likewise.
7948 (grub_video_get_viewport): Likewise.
7949 (grub_video_map_color): Likewise.
7950 (grub_video_map_rgb): Likewise.
7951 (grub_video_map_rgba): Likewise.
7952 (grub_video_fill_rect): Likewise.
7953 (grub_video_blit_glyph): Likewise.
7954 (grub_video_blit_bitmap): Likewise.
7955 (grub_video_blit_render_target): Likewise.
7956 (grub_video_scroll): Likewise.
7957 (grub_video_swap_buffers): Likewise.
7958 (grub_video_create_render_target): Likewise.
7959 (grub_video_delete_render_target): Likewise.
7960 (grub_video_set_active_render_target): Likewise.
7962 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
7964 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
7966 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
7967 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7968 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7969 instead of $(srcdir)/genkernsyms.sh.
7971 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
7972 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7973 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7974 instead of $(srcdir)/genkernsyms.sh.
7976 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
7977 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7978 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7979 instead of $(srcdir)/genkernsyms.sh.
7981 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
7982 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 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
7989 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
7991 (gensymlist.sh): New target.
7992 (genkernsyms.sh): Likewise.
7994 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
7995 genkernsyms.sh.in and gensymlist.sh.in.
7997 * genkernsyms.sh: Removed.
7998 * gensymlist.sh: Likewise.
8000 * genkernsyms.sh.in: New file.
8001 * gensymlist.sh.in: Likewise.
8003 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8005 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
8006 clobber "prefix", since we may have already set it manually.
8008 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
8010 * kern/misc.c (abort): New alias for grub_abort.
8012 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
8014 A new machine-specific function "grub_machine_set_prefix" is
8015 defined. This is called after loading modules, so that a prefix
8016 initialization can use modules. Also, this change adds an
8017 intensive debugging feature for the memory manager via the
8018 configure option "--enable-mm-debug".
8020 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
8023 * kern/sparc64/ieee1275/init.c (abort): Removed.
8024 (grub_stop): Likewise.
8025 (grub_exit): New function.
8026 (grub_set_prefix): Renamed to ...
8027 (grub_machine_set_prefix): ... this.
8028 (grub_machine_init): Do not call grub_set_prefix.
8030 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
8031 (grub_machine_set_prefix): ... this.
8032 (grub_machine_init): Do not call grub_set_prefix.
8034 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
8035 (grub_machine_init): Do not set the prefix here.
8037 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
8039 * kern/efi/init.c: Include grub/mm.h.
8040 (grub_efi_set_prefix): New function.
8042 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
8043 (grub_efi_get_filename): New function.
8044 (grub_print_device_path): Renamed to ...
8045 (grub_efi_print_device_path): ... this.
8047 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
8048 [MM_DEBUG] (grub_realloc): Likewise.
8049 [MM_DEBUG] (grub_free): Likewise.
8050 [MM_DEBUG] (grub_memalign): Likewise.
8051 [MM_DEBUG] (grub_mm_debug): New variable.
8052 [MM_DEBUG] (grub_debug_malloc): New function.
8053 [MM_DEBUG] (grub_debug_free): New function.
8054 [MM_DEBUG] (grub_debug_realloc): New function.
8055 [MM_DEBUG] (grub_debug_memalign): New function.
8057 * kern/misc.c (grub_abort): Print a newline to distinguish
8060 * kern/main.c (grub_main): Call grub_machine_set_prefix and
8061 grub_set_root_dev after loading modules. This is necessary when
8062 setting a prefix depends on modules.
8064 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
8065 (grub_efi_print_device_path): ... this.
8066 (grub_efi_get_filename): New prototype.
8067 (grub_efi_set_prefix): Likewise.
8069 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
8071 (grub_efidisk_get_device_handle): New prototype.
8072 (grub_efidisk_get_device_name): Likewise.
8074 * include/grub/mm.h: Include config.h.
8075 (MM_DEBUG): Removed.
8076 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
8077 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
8078 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
8079 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
8080 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
8081 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
8082 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
8083 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
8084 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
8086 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
8088 * disk/efi/efidisk.c: Include grub/partition.h.
8089 (iterate_child_devices): New function.
8090 (add_device): First, compare only last device path nodes, so that
8091 devices are sorted by the types.
8092 (grub_efidisk_get_device_handle): New function.
8093 (grub_efidisk_get_device_name): Likewise.
8095 * configure.ac (--enable-mm-debug): New option to enable the
8096 memory manager debugging feature. This makes the binary much
8097 bigger, so is disabled by default.
8099 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
8101 Use grub_abort instead of grub_stop, and grub_exit must be
8102 define in each architecture now. Also, this change adds support
8105 * util/i386/pc/grub-probefs.c: Include grub/term.h.
8106 (grub_getkey): New function.
8107 (grub_term_get_current): Likewise.
8109 * util/i386/pc/grub-setup.c: Include grub/term.h.
8110 (grub_getkey): New function.
8111 (grub_term_get_current): Likewise.
8113 * util/misc.c (grub_stop): Renamed to ...
8114 (grub_exit): ... this.
8116 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
8117 (grub_exit): ... this.
8118 (grub_machine_init): Use grub_abort instead of abort.
8119 (grub_stop): Removed.
8121 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
8124 * kern/i386/pc/startup.S (grub_exit): New function.
8125 (cold_reboot): New label.
8127 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
8128 (grub_efi_init): Call grub_efidisk_init.
8129 (grub_efi_fini): Call grub_efidisk_fini.
8131 * kern/efi/efi.c: Include grub/mm.h.
8132 (grub_efi_console_control_guid): Renamed to ...
8133 (console_control_guid): ... this.
8134 (grub_efi_loaded_image_guid): Renamed to ...
8135 (loaded_image_guid): ... this.
8136 (grub_efi_locate_handle): New function.
8137 (grub_efi_open_protocol): Likewise.
8138 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
8139 GRUB_EFI_CONSOLE_CONTROL_GUID.
8140 (grub_efi_exit): Removed.
8141 (grub_stop): Likewise.
8142 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
8143 (grub_exit): New function.
8144 (grub_print_device_path): Likewise.
8146 * kern/rescue.c (grub_rescue_cmd_exit): New function.
8147 (grub_enter_rescue_mode): Register "exit".
8149 * kern/misc.c (grub_real_dprintf): A cosmetic change.
8150 (grub_abort): New function.
8152 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
8154 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
8156 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
8158 * include/grub/efi/efi.h (grub_efi_exit): Removed.
8159 (grub_print_device_path): New prototype.
8160 (grub_efi_locate_handle): Likewise.
8161 (grub_efi_open_protocol): Likewise.
8163 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
8164 * disk/efi/efidisk.c: Likewise.
8166 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
8168 * include/grub/efi/console_control.h
8169 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
8171 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
8172 last 8 bytes as an array.
8173 (GRUB_EFI_DISK_IO_GUID): New macro.
8174 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
8175 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
8176 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
8178 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
8179 (struct grub_efi_device_path): Rename the member "sub_type" to
8181 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
8182 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
8183 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
8184 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
8185 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
8186 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
8187 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
8188 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
8189 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
8190 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
8191 (struct grub_efi_pci_device_path): New structure.
8192 (grub_efi_pci_device_path_t): New type.
8193 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
8194 (struct grub_efi_pccard_device_path): New structure.
8195 (grub_efi_pccard_device_path_t): New type.
8196 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
8197 (struct grub_efi_memory_mapped_device_path): New structure.
8198 (grub_efi_memory_mapped_device_path_t): New type.
8199 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
8200 (struct grub_efi_vendor_device_path): New structure.
8201 (grub_efi_vendor_device_path_t): New type.
8202 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
8203 (struct grub_efi_controller_device_path): New structure.
8204 (grub_efi_controller_device_path_t): New type.
8205 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
8206 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
8207 (struct grub_efi_acpi_device_path): New structure.
8208 (grub_efi_acpi_device_path_t): New type.
8209 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
8210 (struct grub_efi_expanded_acpi_device_path): New structure.
8211 (grub_efi_expanded_acpi_device_path_t): New type.
8212 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
8213 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
8214 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
8215 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
8216 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
8217 (struct grub_efi_atapi_device_path): New structure.
8218 (grub_efi_atapi_device_path_t): New type.
8219 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
8220 (struct grub_efi_fibre_channel_device_path): New structure.
8221 (grub_efi_fibre_channel_device_path_t): New type.
8222 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
8223 (struct grub_efi_1394_device_path): New structure.
8224 (grub_efi_1394_device_path_t): New type.
8225 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
8226 (struct grub_efi_usb_device_path): New structure.
8227 (grub_efi_usb_device_path_t): New type.
8228 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
8229 (struct grub_efi_usb_class_device_path): New structure.
8230 (grub_efi_usb_class_device_path_t): New type.
8231 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
8232 (struct grub_efi_i2o_device_path): New structure.
8233 (grub_efi_i2o_device_path_t): New type.
8234 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
8235 (struct grub_efi_mac_address_device_path): New structure.
8236 (grub_efi_mac_address_device_path_t): New type.
8237 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
8238 (struct grub_efi_ipv4_device_path): New structure.
8239 (grub_efi_ipv4_device_path_t): New type.
8240 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
8241 (struct grub_efi_ipv6_device_path): New structure.
8242 (grub_efi_ipv6_device_path_t): New type.
8243 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
8244 (struct grub_efi_infiniband_device_path): New structure.
8245 (grub_efi_infiniband_device_path_t): New type.
8246 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
8247 (struct grub_efi_uart_device_path): New structure.
8248 (grub_efi_uart_device_path_t): New type.
8249 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
8250 (struct grub_efi_vendor_messaging_device_path): New structure.
8251 (grub_efi_vendor_messaging_device_path_t): New type.
8252 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
8253 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
8254 (struct grub_efi_hard_drive_device_path): New structure.
8255 (grub_efi_hard_drive_device_path_t): New type.
8256 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
8257 (struct grub_efi_cdrom_device_path): New structure.
8258 (grub_efi_cdrom_device_path_t): New type.
8259 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
8260 (struct grub_efi_vendor_media_device_path): New structure.
8261 (grub_efi_vendor_media_device_path_t): New type.
8262 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
8263 (struct grub_efi_file_path_device_path): New structure.
8264 (grub_efi_file_path_device_path_t): New type.
8265 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
8266 (struct grub_efi_protocol_device_path): New structure.
8267 (grub_efi_protocol_device_path_t): New type.
8268 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
8269 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
8270 (struct grub_efi_bios_device_path): New structure.
8271 (grub_efi_bios_device_path_t): New type.
8272 (struct grub_efi_disk_io): New structure.
8273 (grub_efi_disk_io_t): New type.
8274 (struct grub_efi_block_io_media): New structure.
8275 (grub_efi_block_io_media_t): New type.
8276 (struct grub_efi_block_io): New structure.
8277 (grub_efi_block_io_t): New type.
8279 * include/grub/misc.h (grub_stop): Removed.
8280 (grub_exit): New prototype.
8281 (grub_abort): Likewise.
8283 * include/grub/disk.h (enum grub_disk_dev_id): Added
8284 GRUB_DISK_DEVICE_EFIDISK_ID.
8286 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
8288 (kernel_syms.lst): Remove the target if an error occurs.
8290 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
8292 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
8293 as it was simply too buggy.
8295 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
8297 * kern/misc.c (grub_lltoa): New function.
8298 (grub_vsprintf): Added support for the long long suffix,
8301 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
8303 * Makefile.in (LDFLAGS): Add variable.
8304 (LD): Remove variable.
8305 * configure.ac: Add -m32 to LDFLAGS.
8306 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
8307 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8308 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8309 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8310 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8312 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8313 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8314 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8316 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
8318 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8319 length for unknown glyph.
8321 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8323 Add support for pre-loaded modules into the EFI port.
8325 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8326 completely. Accept one more argument DIR. The caller has changed.
8328 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8330 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8331 (grub_efi_loaded_image_guid): New variable.
8332 (grub_efi_get_loaded_image): New function.
8333 (grub_arch_modules_addr): Likewise.
8335 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8338 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8339 (struct grub_efi_loaded_image): New structure.
8340 (grub_efi_loaded_image_t): New type.
8342 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8344 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8345 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8346 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8348 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
8350 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8352 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
8354 * DISTLIST: Added include/grub/efi/console.h,
8355 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8356 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8358 * include/grub/efi/console.h: New file.
8359 * include/grub/efi/time.h: Likewise.
8360 * include/grub/i386/efi/kernel.h: Likewise.
8361 * kern/efi/init.c: Likewise.
8362 * kern/efi/mm.c: Likewise.
8363 * term/efi/console.c: Likewise.
8365 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8366 (grub_stop): Removed.
8367 (grub_get_rtc): Likewise.
8368 (grub_machine_init): Simply call grub_efi_init.
8369 (grub_machine_fini): Call grub_efi_fini.
8371 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8372 (grub_efi_output_string): Removed.
8373 (grub_efi_stall): New function.
8374 (grub_stop): Likewise.
8375 (grub_get_rtc): Likewise.
8377 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8378 (grub_efi_stall): New prototype.
8379 (grub_efi_allocate_pages): Likewise.
8380 (grub_efi_free_pages): Likewise.
8381 (grub_efi_get_memory_map): Likewise.
8382 (grub_efi_mm_init): Likewise.
8383 (grub_efi_mm_fini): Likewise.
8384 (grub_efi_init): Likewise.
8385 (grub_efi_fini): Likewise.
8387 * include/grub/i386/efi/time.h: Do not include
8388 grub/symbol.h. Include grub/efi/time.h.
8389 (GRUB_TICKS_PER_SECOND): Removed.
8390 (grub_get_rtc): Likewise.
8392 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8393 Added padding. The EFI spec is buggy.
8394 (GRUB_EFI_BLACK): New macro.
8395 (GRUB_EFI_BLUE): Likewise.
8396 (GRUB_EFI_GREEN): Likewise.
8397 (GRUB_EFI_CYAN): Likewise.
8398 (GRUB_EFI_RED): Likewise.
8399 (GRUB_EFI_MAGENTA): Likewise.
8400 (GRUB_EFI_BROWN): Likewise.
8401 (GRUB_EFI_LIGHTGRAY): Likewise.
8402 (GRUB_EFI_BRIGHT): Likewise.
8403 (GRUB_EFI_DARKGRAY): Likewise.
8404 (GRUB_EFI_LIGHTBLUE): Likewise.
8405 (GRUB_EFI_LIGHTGREEN): Likewise.
8406 (GRUB_EFI_LIGHTCYAN): Likewise.
8407 (GRUB_EFI_LIGHTRED): Likewise.
8408 (GRUB_EFI_LIGHTMAGENTA): Likewise.
8409 (GRUB_EFI_YELLOW): Likewise.
8410 (GRUB_EFI_WHITE): Likewise.
8411 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8412 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8413 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8414 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8415 (GRUB_EFI_BACKGROUND_RED): Likewise.
8416 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8417 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8418 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8419 (GRUB_EFI_TEXT_ATTR): Likewise.
8421 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8422 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8423 (kernel_mod_HEADERS): Added efi/time.h.
8425 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
8427 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8428 include/grub/efi/api.h, include/grub/efi/console_control.h,
8429 include/grub/efi/efi.h, include/grub/efi/pe32.h,
8430 include/grub/i386/efi/time.h, kern/efi/efi.c,
8431 kern/i386/efi/init.c, kern/i386/efi/startup.S,
8432 and util/i386/efi/grub-mkimage.c.
8434 * Makefile.in (RMKFILES): Added i386-efi.rmk.
8436 * genmk.rb (PModule#rule): Do not export symbols if
8437 #{prefix}_EXPORTS is set to "no".
8439 * conf/i386-efi.mk: New file.
8440 * conf/i386-efi.rmk: Likewise.
8441 * include/grub/efi/api.h: Likewise.
8442 * include/grub/efi/console_control.h: Likewise.
8443 * include/grub/efi/efi.h: Likewise.
8444 * include/grub/efi/pe32.h: Likewise.
8445 * include/grub/i386/efi/time.h: Likewise.
8446 * kern/efi/efi.c: Likewise.
8447 * kern/i386/efi/init.c: Likewise.
8448 * kern/i386/efi/startup.S: Likewise.
8449 * util/i386/efi/grub-mkimage.c: Likewise.
8451 2006-04-17 Marco Gerards <marco@gnu.org>
8453 * include/grub/script.h: Include <grub/parser.h> and
8454 "grub_script.tab.h".
8455 (struct grub_lexer_param): New struct.
8456 (struct grub_parser_param): Likewise.
8457 (grub_script_create_arglist): Pass the state in an argument.
8458 (grub_script_add_arglist): Likewise.
8459 (grub_script_create_cmdline): Likewise.
8460 (grub_script_create_cmdblock): Likewise.
8461 (grub_script_create_cmdif): Likewise.
8462 (grub_script_create_cmdmenu): Likewise.
8463 (grub_script_add_cmd): Likewise.
8464 (grub_script_arg_add): Likewise.
8465 (grub_script_lexer_ref): Likewise.
8466 (grub_script_lexer_deref): Likewise.
8467 (grub_script_lexer_record_start): Likewise.
8468 (grub_script_lexer_record_stop): Likewise.
8469 (grub_script_mem_record): Likewise.
8470 (grub_script_mem_record_stop): Likewise.
8471 (grub_script_malloc): Likewise.
8472 (grub_script_yylex): Likewise.
8473 (grub_script_yyparse): Likewise.
8474 (grub_script_yyerror): Likewise.
8475 (grub_script_yylex): Likewise.
8476 (grub_script_lexer_init): Return the state.
8478 * normal/lexer.c (grub_script_lexer_state): Removed variable.
8479 (grub_script_lexer_done): Likewise.
8480 (grub_script_lexer_getline): Likewise.
8481 (grub_script_lexer_refs): Likewise.
8483 (newscript): Likewise.
8485 (recording): Likewise.
8486 (recordpos): Likewise.
8487 (recordlen): Likewise.
8488 (grub_script_lexer_init): Return the state instead of setting
8490 (grub_script_lexer_ref): Use the newly added argument for state
8492 (grub_script_lexer_deref): Likewise.
8493 (grub_script_lexer_record_start): Likewise.
8494 (grub_script_lexer_record_stop): Likewise.
8495 (recordchar): Likewise.
8496 (nextchar): Likewise.
8497 (grub_script_yylex2): Likewise.
8498 (grub_script_yylex): Likewise.
8499 (grub_script_yyerror): Likewise.
8501 * normal/parser.y (func_mem): Removed variable.
8502 (menu_entry): Likewise.
8504 (%lex-param): New parser option.
8505 (%parse-param): Likewise.
8506 (script): Always return the AST.
8507 (argument): Pass the state around.
8508 (arguments): Likewise.
8509 (grubcmd): Likewise.
8510 (commands): Likewise.
8511 (function): Likewise.
8512 (menuentry): Likewise.
8513 (if_statement): Likewise.
8516 * normal/script.c (grub_script_memused): Removed variable.
8517 (grub_script_parsed): Likewise.
8518 (grub_script_malloc): Added a state argument. Use that instead of
8520 (grub_script_mem_record): Likewise.
8521 (grub_script_mem_record_stop): Likewise.
8522 (grub_script_arg_add): Likewise.
8523 (grub_script_add_arglist): Likewise.
8524 (grub_script_create_cmdline): Likewise.
8525 (grub_script_create_cmdif): Likewise.
8526 (grub_script_create_cmdmenu): Likewise.
8527 (grub_script_add_cmd): Likewise.
8528 (grub_script_parse): Setup the state before calling the parser.
8530 2006-04-16 Marco Gerards <marco@gnu.org>
8532 * normal/command.c (grub_command_init): Remove the title command.
8534 * normal/lexer.c (grub_script_yylex): Renamed from this...
8535 (grub_script_yylex2): ... to this.
8536 (grub_script_yylex): New function. Temporary
8537 introduced to filter some tokens.
8538 (grub_script_yyerror): Print a newline.
8540 * normal/main.c (read_config_file): Output information about the
8541 lines that contain errors. Wait for a key after all lines have
8542 been processed. Don't return an empty menu.
8544 * normal/parser.y (func_mem): Don't initialize.
8545 (menu_entry): Likewise.
8546 (err): New variable.
8547 (script): Don't return anything when an error was encountered.
8548 (ws, returns): Removed rules.
8549 (argument): Disabled concatenated variable support.
8550 (arguments): Remove explicit separators.
8551 (grubcmd): Likewise.
8552 (function): Likewise.
8553 (menuentry): Likewise.
8555 (commands): Likewise. Add error handling.
8557 * normal/script.c (grub_script_create_cmdline): If
8558 `grub_script_parsed' is 0, assume the parser encountered an error.
8560 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
8562 * configure.ac: Add support for EFI. Fix the typo
8563 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
8565 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8567 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
8568 foreign multibyte characters should be shown correctly.
8570 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8572 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
8574 (read_config_file): Made it to close file before returning.
8576 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
8578 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
8579 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
8580 video/i386/pc/vbefill.c.
8582 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
8583 video/i386/pc/vbefill.c.
8585 * include/grub/video.h (grub_video_blit_format): New enum.
8586 (grub_video_mode_info): Added new member blit_format.
8587 (grub_video_get_blit_format): New function prototype.
8589 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
8591 (grub_video_vbe_map_rgb): Likewise.
8592 (grub_video_vbe_unmap_color): Likewise.
8594 * include/grub/i386/pc/vbeblit.h: New file.
8596 * include/grub/i386/pc/vbefill.h: New file.
8598 * video/video.c (grub_video_get_blit_format): New function.
8599 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
8600 (grub_video_vbe_map_rgb): Likewise.
8601 (grub_video_vbe_unmap_color): Likewise.
8603 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
8605 (grub_video_vbe_blit_render_target): Changed to use more optimized
8607 (grub_video_vbe_setup): Added detection for optimized settings.
8608 (grub_video_vbe_create_render_target): Likewise.
8610 * video/i386/pc/vbeblit.c: New file.
8612 * video/i386/pc/vbefill.c: New file.
8614 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
8616 * font/manager.c (grub_font_get_glyph): Removed font fixup from
8619 * util/unifont2pff.rb: ... and moved it to here. Improved argument
8620 parsing to support both hex and dec ranges. If filename was missing
8621 show usage information.
8623 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
8625 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
8626 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
8628 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
8629 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
8630 (video_mod_SOURCES): Added.
8631 (video_mod_CFLAGS): Likewise.
8632 (video_mod_LDFLAGS): Likewise.
8633 (gfxterm_mod_SOURCES): Likewise.
8634 (gfxterm_mod_CFLAGS): Likewise.
8635 (gfxterm_mod_LDFLAGS): Likewise.
8636 (videotest_mod_SOURCES): Likewise.
8637 (videotest_mod_CFLAGS): Likewise.
8638 (videotest_mod_LDFLAGS): Likewise.
8639 (vesafb_mod_SOURCES): Removed.
8640 (vesafb_mod_CFLAGS): Likewise.
8641 (vesafb_mod_LDFLAGS): Likewise.
8642 (vga_mod_SOURCES): Likewise.
8643 (vga_mod_CFLAGS): Likewise.
8644 (vga_mod_LDFLAGS): Likewise.
8646 * commands/videotest.c: New file.
8648 * font/manager.c (fill_with_default_glyph): Modified to use
8650 (grub_font_get_glyph): Likewise.
8651 (fontmanager): Renamed from this...
8652 (font_manager): ... to this.
8654 * include/grub/font.h (grub_font_glyph): Added new structure.
8655 (grub_font_get_glyph): Modified to use grub_font_glyph.
8657 * include/grub/misc.h (grub_abs): Added as inline function.
8659 * include/grub/video.h: New file.
8661 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
8662 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
8663 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
8664 (grub_vbe_get_controller_info): Renamed from this...
8665 (grub_vbe_bios_get_controller_info): ... to this.
8666 (grub_vbe_get_mode_info): Renamed from this...
8667 (grub_vbe_bios_get_mode_info): ... to this.
8668 (grub_vbe_set_mode): Renamed from this...
8669 (grub_vbe_bios_set_mode): ... to this.
8670 (grub_vbe_get_mode): Renamed from this...
8671 (grub_vbe_bios_get_mode): ... to this.
8672 (grub_vbe_set_memory_window): Renamed from this...
8673 (grub_vbe_bios_set_memory_window): ... to this.
8674 (grub_vbe_get_memory_window): Renamed from this...
8675 (grub_vbe_bios_get_memory_window): ... to this.
8676 (grub_vbe_set_scanline_length): Renamed from this...
8677 (grub_vbe_set_scanline_length): ... to this.
8678 (grub_vbe_get_scanline_length): Renamed from this...
8679 (grub_vbe_bios_get_scanline_length): ... to this.
8680 (grub_vbe_set_display_start): Renamed from this...
8681 (grub_vbe_bios_set_display_start): ... to this.
8682 (grub_vbe_get_display_start): Renamed from this...
8683 (grub_vbe_bios_get_display_start): ... to this.
8684 (grub_vbe_set_palette_data): Renamed from this...
8685 (grub_vbe_bios_set_palette_data): ... to this.
8686 (grub_vbe_set_pixel_rgb): Removed.
8687 (grub_vbe_set_pixel_index): Likewise.
8689 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
8691 (grub_vbe_bios_get_controller_info): ... to this.
8692 (grub_vbe_get_mode_info): Renamed from this...
8693 (grub_vbe_bios_get_mode_info): ... to this.
8694 (grub_vbe_set_mode): Renamed from this...
8695 (grub_vbe_bios_set_mode): ... to this.
8696 (grub_vbe_get_mode): Renamed from this...
8697 (grub_vbe_bios_get_mode): ... to this.
8698 (grub_vbe_set_memory_window): Renamed from this...
8699 (grub_vbe_bios_set_memory_window): ... to this.
8700 (grub_vbe_get_memory_window): Renamed from this...
8701 (grub_vbe_bios_get_memory_window): ... to this.
8702 (grub_vbe_set_scanline_length): Renamed from this...
8703 (grub_vbe_set_scanline_length): ... to this.
8704 (grub_vbe_get_scanline_length): Renamed from this...
8705 (grub_vbe_bios_get_scanline_length): ... to this.
8706 (grub_vbe_set_display_start): Renamed from this...
8707 (grub_vbe_bios_set_display_start): ... to this.
8708 (grub_vbe_get_display_start): Renamed from this...
8709 (grub_vbe_bios_get_display_start): ... to this.
8710 (grub_vbe_set_palette_data): Renamed from this...
8711 (grub_vbe_bios_set_palette_data): ... to this.
8712 (grub_vbe_bios_get_controller_info): Fixed problem with registers
8713 getting corrupted after calling it. Added more pushes and pops.
8714 (grub_vbe_bios_set_mode): Likewise.
8715 (grub_vbe_bios_get_mode): Likewise.
8716 (grub_vbe_bios_get_memory_window): Likewise.
8717 (grub_vbe_bios_set_scanline_length): Likewise.
8718 (grub_vbe_bios_get_scanline_length): Likewise.
8719 (grub_vbe_bios_get_display_start): Likewise.
8720 (grub_vbe_bios_set_palette_data): Likewise.
8722 * normal/cmdline.c (cl_set_pos): Refresh the screen.
8723 (cl_insert): Likewise.
8724 (cl_delete): Likewise.
8726 * term/gfxterm.c: New file.
8728 * term/i386/pc/vesafb.c: Removed file.
8730 * video/video.c: New file.
8732 * video/i386/pc/vbe.c (real2pm): Added new function.
8733 (grub_video_vbe_draw_pixel): Likewise.
8734 (grub_video_vbe_get_video_ptr): Likewise.
8735 (grub_video_vbe_get_pixel): Likewise
8736 (grub_video_vbe_init): Likewise.
8737 (grub_video_vbe_fini): Likewise.
8738 (grub_video_vbe_setup): Likewise.
8739 (grub_video_vbe_get_info): Likewise.
8740 (grub_video_vbe_set_palette): Likewise.
8741 (grub_video_vbe_get_palette): Likewise.
8742 (grub_video_vbe_set_viewport): Likewise.
8743 (grub_video_vbe_get_viewport): Likewise.
8744 (grub_video_vbe_map_color): Likewise.
8745 (grub_video_vbe_map_rgb): Likewise.
8746 (grub_video_vbe_map_rgba): Likewise.
8747 (grub_video_vbe_unmap_color): Likewise.
8748 (grub_video_vbe_fill_rect): Likewise.
8749 (grub_video_vbe_blit_glyph): Likewise.
8750 (grub_video_vbe_blit_bitmap): Likewise.
8751 (grub_video_vbe_blit_render_target): Likewise.
8752 (grub_video_vbe_scroll): Likewise.
8753 (grub_video_vbe_swap_buffers): Likewise.
8754 (grub_video_vbe_create_render_target): Likewise.
8755 (grub_video_vbe_delete_render_target): Likewise.
8756 (grub_video_vbe_set_active_render_target): Likewise.
8757 (grub_vbe_set_pixel_rgb): Remove function.
8758 (grub_vbe_set_pixel_index): Likewise.
8759 (index_color_mode): Remove static variable.
8760 (active_mode): Likewise.
8761 (framebuffer): Likewise.
8762 (bytes_per_scan_line): Likewise.
8763 (grub_video_vbe_adapter): Added new static variable.
8764 (framebuffer): Likewise.
8765 (render_target): Likewise.
8766 (initial_mode): Likewise.
8767 (mode_in_use): Likewise.
8768 (mode_list): Likewise.
8770 2006-03-10 Marco Gerards <marco@gnu.org>
8772 * configure.ac (AC_INIT): Bumped to 1.93.
8774 * DISTLIST: Added `include/grub/hfs.h'.
8776 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
8778 * boot/i386/pc/boot.S (general_error): Before looping, try INT
8779 18H, which might help the BIOS falling back to next boot media.
8781 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
8783 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
8784 Poe Chen <poe.poechen@gmail.com>.
8786 2006-01-17 Marco Gerards <marco@gnu.org>
8788 * include/grub/normal.h: Include <grub/script.h>.
8789 (grub_command_list): Removed struct.
8790 (grub_command_list_t): Removed type.
8791 (grub_menu_entry): Remove members `num' and `command_list'. Add
8792 members `commands' and `sourcecode'.
8793 * include/grub/script.h: Add inclusion guards.
8794 (grub_script_cmd_menuentry): New struct.
8795 (grub_script_execute_menuentry): New prototype.
8796 (grub_script_lexer_record_start): Likewise.
8797 (grub_script_lexer_record_stop): Likewise.
8798 * normal/execute.c (grub_script_execute_menuentry): New function.
8799 * normal/lexer.c (record, recording, recordpos, recordlen): New
8801 (grub_script_lexer_record_start): New function.
8802 (grub_script_lexer_record_stop): Likewise.
8803 (recordchar): Likewise.
8804 (nextchar): Likewise.
8805 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
8806 2048 as the buffer size. Add the tokens `menuentry' and `@'.
8807 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
8808 (current_menu): New variable.
8809 (free_menu): Mainly rewritten.
8810 (grub_normal_menu_addentry): New function.
8811 (read_config_file): Rewritten.
8812 * normal/menu.c (run_menu_entry): Mainly rewritten.
8813 * normal/menu_entry.c (make_screen): Rewritten the code to insert
8815 (run): Mainly rewritten.
8816 * normal/parser.y (menu_entry): New variable.
8817 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
8818 (menuentry): New rule.
8819 (command): Add `menuentry'.
8820 (if_statement): Allow additional returns before `fi'.
8821 * normal/script.c (grub_script_create_cmdmenu): New function.
8823 2006-01-03 Marco Gerards <marco@gnu.org>
8825 * INSTALL: GNU Bison is required.
8826 * configure.ac: Rewritten the test to detect Bison.
8827 * Makefile.in (YACC): New variable. Reported by Xun Sun
8828 <xun.sun.cn@gmail.com>.
8830 2006-01-03 Marco Gerards <marco@gnu.org>
8832 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
8833 the HFS+ filesystem to filesystem blocks.
8834 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
8835 GCC warning is silenced.
8837 2006-01-03 Marco Gerards <marco@gnu.org>
8839 * partmap/apple.c (apple_partition_map_iterate): Convert the data
8840 read from disk from big endian to host byte order.
8842 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
8844 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
8846 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
8847 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
8848 embedded HFS+ filesystem.
8849 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
8850 (grub_hfs_sblock): Move from here...
8851 * include/grub/hfs.h: To here... New file.
8852 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
8854 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
8856 (grub_hfsplus_volheader): Change type of member `magic' to
8858 (grub_hfsplus_data): Add new member `embedded_offset'.
8859 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
8861 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
8862 Calculate the offset.
8864 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8866 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
8868 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
8870 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8872 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
8873 ENV->NAME is NULL after allocating ENV->VALUE.
8875 2005-12-25 Marco Gerards <marco@gnu.org>
8877 * kern/env.c (grub_env_set): Rewritten the error handling code.
8879 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8881 * geninit.sh: Made more robust, and more portable.
8883 2005-12-25 Marco Gerards <marco@gnu.org>
8885 Add support for Apple HFS+ filesystems.
8887 * fs/hfsplus.c: New file.
8889 * DISTLIST: Added `fs/hfsplus.c'.
8891 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
8892 (hfsplus_mod_SOURCES): New variable.
8893 (hfsplus_mod_CFLAGS): Likewise.
8894 (hfsplus_mod_LDFLAGS): Likewise.
8895 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
8896 (grub_setup_SOURCES): Likewise.
8897 (grub_mkdevicemap_SOURCES): Likewise.
8898 (grub_emu_SOURCES): Likewise.
8899 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8901 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
8903 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
8905 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8907 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
8908 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
8909 include/grub/parser.h, include/grub/script.h, kern/parser.c,
8910 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
8911 normal/lexer.c, normal/parser.y, normal/script.c, and
8913 Removed kern/sparc64/cache.c.
8915 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
8916 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
8919 * configure.ac (AC_INIT): Bumped to 1.92.
8921 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
8923 * kern/err.c (grub_error_push): Added new function to support error
8925 (grub_error_pop): Likewise.
8926 (grub_error_stack_items): New local variable to support error stacks.
8927 (grub_error_stack_pos): Likewise.
8928 (grub_error_stack_assert): Likewise.
8929 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
8931 (grub_print_error): Added support to print errors from error stack.
8933 * include/grub/err.h (grub_error_push): Added function prototype.
8934 (grub_error_pop): Likewise.
8936 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
8938 * configure.ac: Accept `powerpc64' as host_cpu.
8939 (amd64): Rename to `biarch32'.
8941 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
8942 non-cacheline-aligned addresses.
8944 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
8945 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
8946 if `size' is non-zero.
8948 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
8950 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
8951 and `cd' to make sure the filename is not prefixed with a
8953 (pkgdata_MODULES): Add `gpt.mod'.
8954 (gpt_mod_SOURCES): New variable.
8955 (gpt_mod_CFLAGS): Likewise.
8956 (gpt_mod_LDFLAGS): Likewise.
8958 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
8960 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
8963 * partmap/gpt.c: New file.
8965 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
8966 GPT partition map is detected.
8968 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
8970 * commands/i386/pc/play.c: New file.
8971 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
8972 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
8975 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
8977 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
8978 ((unused))' to silence gcc warning.
8980 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
8982 * configure.ac: Correct `AC_PROG_YACC' test.
8984 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
8986 * util/powerpc/ieee1275/grub-install.in: Run the mount point
8987 check before installing files.
8989 2005-11-22 Mike Small <smallm@panix.com>
8991 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
8992 number regex so multidigit numbers are recognized correctly.
8994 2005-11-22 Mike Small <smallm@panix.com>
8996 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
8997 debugging message before attempting to claim memory.
8998 (grub_rescue_cmd_initrd): Add a claim debugging message and try
8999 multiple addresses in case of failure.
9001 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9003 * term/tparm.c (get_space): Remove empty `if' statement.
9005 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
9007 * kern/parser.c (check_varstate): Rename `state' to 's'.
9009 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9011 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
9012 variable definitions to the beginning of each function. Sort stack
9014 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
9015 `buf' argument to `char *'.
9017 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
9019 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
9020 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9021 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9022 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9023 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9024 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9025 configfile.mod, search.mod, gzio.mod and test.mod.
9026 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9027 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9028 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9029 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9030 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9031 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9032 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9033 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9034 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9035 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9036 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9037 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9038 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9039 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9040 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9041 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9042 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9043 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9044 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9045 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9046 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9047 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9048 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
9050 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
9052 (pkgdata_MODULES): Add test.mod.
9054 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9056 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
9057 appending to variables with "+=".
9058 (PModule): Use full pathname to generate *.lst filenames.
9060 * Makefile.in: Fixed list rules moved from genmk.rb.
9061 (.DELETE_ON_ERROR): New special target.
9062 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
9064 * conf/i386-pc.rmk: Include conf/common.mk.
9065 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
9066 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
9067 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
9068 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
9069 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
9070 configfile.mod, search.mod, gzio.mod and test.mod.
9071 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
9072 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
9073 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
9074 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
9075 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
9076 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
9077 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
9078 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
9079 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
9080 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
9081 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9082 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9083 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
9084 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
9085 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
9086 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
9087 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
9088 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
9089 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
9090 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
9091 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
9092 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
9093 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
9095 * conf/common.rmk: ... to here. New file.
9097 * conf/common.mk: New file.
9099 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
9101 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
9102 (grub_script.tab.c): ... here.
9104 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
9105 (grub_script.tab.c): ... here.
9107 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
9108 (grub_script.tab.c): ... here.
9110 * normal/command.c (grub_command_find): Fixed a memory leak of
9111 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
9113 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9115 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
9116 "@" which marks the start of a comment on ARM.
9117 (VARIABLE): Likewise.
9119 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9121 Add support for Linux/ADFS partition tables.
9123 * partmap/acorn.c: New file.
9125 * include/grub/acorn_filecore.h: Likewise.
9127 * DISTLIST: Added `partmap/acorn.c' and
9128 `include/grub/acorn_filecore.h'.
9130 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9132 (pkgdata_MODULES): Add `acorn.mod'.
9133 (acorn_mod_SOURCES): New variable.
9134 (acorn_mod_CFLAGS): Likewise.
9136 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9138 (pkgdata_MODULES): Add `acorn.mod'.
9139 (acorn_mod_SOURCES): New variable.
9140 (acorn_mod_CFLAGS): Likewise.
9142 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
9143 (pkgdata_MODULES): Add `acorn.mod'.
9144 (acorn_mod_SOURCES): New variable.
9145 (acorn_mod_CFLAGS): Likewise.
9146 (acorn_mod_LDFLAGS): Likewise.
9148 * include/types.h (grub_disk_addr_t): New typedef.
9150 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
9152 * geninit.sh: New file.
9154 * geninitheader.sh: Likewise.
9156 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
9157 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
9158 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
9159 * commands/configfile.c (grub_configfile_init)
9160 (grub_configfile_fini): Likewise.
9161 * commands/default.c (grub_default_init, grub_default_fini):
9163 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
9164 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
9165 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
9166 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
9168 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
9169 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
9171 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
9172 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
9174 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
9176 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
9178 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
9179 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
9180 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
9181 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
9182 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
9183 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
9184 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
9185 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
9186 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
9187 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
9188 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
9189 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
9190 * partmap/amiga.c (grub_amiga_partition_map_init)
9191 (grub_amiga_partition_map_fini): Likewise.
9192 * partmap/apple.c (grub_apple_partition_map_init)
9193 (grub_apple_partition_map_fini): Likewise.
9194 * partmap/pc.c (grub_pc_partition_map_init)
9195 (grub_pc_partition_map_fini): Likewise.
9196 * partmap/sun.c (grub_sun_partition_map_init,
9197 grub_sun_partition_map_fini): Likewise.
9198 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
9201 * util/grub-emu.c: Include <grub_modules_init.h>.
9202 (main): Don't initialize and de-initialize any modules directly,
9203 use `grub_init_all' and `grub_fini_all' instead.
9205 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
9206 `grub_vesafb_mod_init'.
9207 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
9209 * term/i386/pc/vga.c (grub_vga_init): Renamed to
9210 `grub_vga_mod_init'. Updated all users.
9211 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
9213 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
9214 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
9217 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
9218 Generate a function to initialize the module in utilities.
9219 Updated all callers.
9220 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
9221 initialize the module in utilities. Updated all callers.
9223 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9225 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
9226 escape sequence and a literal ^L to clear the screen.
9228 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
9229 when returning from Open Firmware.
9231 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
9233 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
9234 (grub_ofconsole_height): Likewise.
9235 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
9236 manually insert a '\n'.
9237 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
9238 `grub_ofconsole_height'. Return early if these are already set.
9240 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
9242 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
9243 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
9244 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
9245 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
9246 and `normal/script.c'.
9247 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9248 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9249 (test_mod_SOURCES): New variable.
9250 (test_mod_CFLAGS): Likewise.
9251 (test_mod_LDFLAGS): Likewise.
9252 (pkgdata_MODULES): Add `test.mod'.
9253 (grub_script.tab.c): New rule.
9254 (grub_script.tab.h): Likewise.
9256 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
9258 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
9259 `commands/test.c', `normal/execute.c', `normal/lexer.c',
9260 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9261 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9262 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9263 (test_mod_SOURCES): New variable.
9264 (test_mod_CFLAGS): Likewise.
9265 (pkgdata_MODULES): Add `test.mod'.
9266 (grub_script.tab.c): New rule.
9267 (grub_script.tab.h): Likewise.
9269 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
9271 Add initial scripting support.
9273 * commands/test.c: New file.
9274 * include/grub/script.h: Likewise.
9275 * normal/execute.c: Likewise.
9276 * normal/function.c: Likewise.
9277 * normal/lexer.c: Likewise.
9278 * normal/parser.y: Likewise.
9279 * normal/script.c: Likewise.
9281 * configure.ac: Add `AC_PROG_YACC' test.
9283 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
9284 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
9285 `normal/function.c' and `normal/script.c'.
9286 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
9287 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
9288 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
9290 (pkgdata_MODULES): Add `test.mod'.
9291 (grub_script.tab.c): New rule.
9292 (grub_script.tab.h): Likewise.
9294 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
9296 * include/grub/normal.h (grub_test_init): New prototype.
9297 (grub_test_fini): Likewise.
9299 * normal/command.c: Include <grub/script.h>.
9300 (grub_command_execute): Rewritten.
9302 * util/grub-emu.c (main): Call `grub_test_init' and
9305 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9307 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9309 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9310 there are no pending characters.
9312 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9314 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9315 `grub_strndup' to drop device arguments. Replace unnecessary
9316 `grub_strndup' with `grub_strdup'.
9318 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9320 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9321 `debug' environment variable has been set.
9323 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
9325 * Makefile.in (install-local): Use $(DATA).
9326 (uninstall): Likewise.
9327 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9328 (sbin_UTILITIES): ... to here.
9329 (sbin_SCRIPTS): New variable.
9330 (grub_install_SOURCES): New variable.
9331 * util/powerpc/ieee1275/grub-install.in: New file.
9332 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9334 (add_segments): Call `grub_util_get_path'.
9336 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9338 From Timothy Baldwin:
9339 * commands/ls.c (grub_ls_list_files): Close FILE with
9341 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9343 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
9345 * include/grub/parser.h: New file.
9347 * kern/parser.c: Likewise.
9349 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9350 (grub_setup_SOURCES): Likewise.
9351 (grub_probefs_SOURCES): Likewise.
9352 (grub_emu_SOURCES): Likewise.
9353 (kernel_img_HEADERS): Add `parser.h'.
9355 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9356 (grub_emu_SOURCES): Add `kern/parser.c'.
9357 (grubof_SOURCES): Likewise.
9359 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9360 (grubof_SOURCES): Add `kern/parser.c'.
9362 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9364 * kern/misc.c (grub_split_cmdline): Removed function.
9366 * kern/rescue.c: Include <grub/parser.h>.
9367 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9368 of `grub_split_cmdline'.
9370 * normal/command.c: Include <grub/parser.h>.
9371 (grub_command_execute): Use `grub_parser_split_cmdline' instead
9372 of `grub_split_cmdline'.
9374 * normal/completion.c: Include <grub/parser.h>.
9375 (cmdline_state): New variable.
9376 (iterate_dir): End the filename with a quote depending on the
9378 (get_state): new function.
9379 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9380 split the arguments and determine the current argument. When the
9381 argument string is not quoted, escape all spaces.
9383 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9385 * normal/sparc64/setjmp.S: New file.
9387 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9389 * include/grub/sparc64/libgcc.h: New file.
9390 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9391 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9392 normal/sparc64/setjmp.c.
9394 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9396 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9397 * kern/sparc64/cache.S: New file.
9398 * kern/sparc64/cache.c: Removed.
9399 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9400 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
9402 (COMMON_LDFLAGS): Add -melf64_sparc.
9403 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9404 (grubof_SOURCES): Use cache.S instead of cache.c.
9405 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
9406 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9407 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9409 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9410 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9411 (linux_mod_CFLAGS): Commented out.
9412 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9413 out because module isn't built.
9414 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9415 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9416 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9417 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9418 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9419 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9420 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9421 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9422 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9423 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9424 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9425 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9426 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9427 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9429 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
9431 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9432 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9433 longer, because HFS should not be used on PC.
9435 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9437 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9438 consistently within the loop.
9440 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
9442 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9443 directory can not be read.
9445 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9447 * configure.ac (AC_INIT): Increase the version number to 1.91.
9449 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9450 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9451 term/i386/pc/serial.c.
9453 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9455 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9456 file size must be permitted.
9458 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9459 between %ah and %al.
9461 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9463 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9465 Call the hook with a NUL-terminated filename.
9466 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9469 * kern/term.c (cursor_state): New variable.
9470 (grub_term_set_current): Reset the cursor state on a new
9472 (grub_setcursor): Rewritten to use CURSOR_STATE.
9473 (grub_getcursor): New function.
9475 * include/grub/term.h (grub_getcursor): New prototype.
9477 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9478 integers on ARM. Reported by Timothy Baldwin
9479 <T.E.Baldwin99@members.leeds.ac.uk>.
9481 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
9483 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9485 (grub_sfs_dir): Likewise.
9487 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
9489 Add support for the SFS filesystem.
9491 * fs/sfs.c: New file.
9493 * DISTLIST: Added `fs/sfs.c'.
9495 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9496 (grub_probefs_SOURCES): Likewise.
9497 (grub_emu_SOURCES): Likewise.
9498 (pkgdata_MODULES): Add `sfs.mod'.
9499 (sfs_mod_SOURCES): New variable.
9500 (sfs_mod_CFLAGS): Likewise.
9501 (sfs_mod_LDFLAGS): Likewise.
9503 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
9504 (pkgdata_MODULES): Add `sfs.mod'.
9505 (sfs_mod_SOURCES): New variable.
9506 (sfs_mod_CFLAGS): Likewise.
9508 * util/grub-emu.c (main): Call `grub_sfs_init' and
9511 * include/grub/fs.h (grub_sfs_init): New prototype.
9512 (grub_sfs_fini): Likewise.
9514 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
9516 Add support for the AFFS filesystem.
9518 * fs/affs.c: New file.
9520 * DISTLIST: Added `fs/affs.c'.
9522 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
9523 (grub_probefs_SOURCES): Likewise.
9524 (grub_emu_SOURCES): Likewise.
9525 (pkgdata_MODULES): Add `affs.mod'.
9526 (affs_mod_SOURCES): New variable.
9527 (affs_mod_CFLAGS): Likewise.
9528 (affs_mod_LDFLAGS): Likewise.
9530 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
9531 (pkgdata_MODULES): Add `affs.mod'.
9532 (affs_mod_SOURCES): New variable.
9533 (affs_mod_CFLAGS): Likewise.
9535 * util/grub-emu.c (main): Call `grub_affs_init' and
9538 * include/grub/fs.h (grub_affs_init): New prototype.
9539 (grub_affs_fini): Likewise.
9541 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9543 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
9545 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9547 * configure.ac: Accept `x86_64' as host_cpu. In that case add
9550 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
9553 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
9554 (COMMON_LDFLAGS): New variable.
9555 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
9556 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
9557 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
9558 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
9559 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
9560 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
9561 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
9562 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
9563 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
9564 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
9565 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9566 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9567 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
9568 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
9569 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
9571 (normal_mod_ASFLAGS): Add `-m32'.
9573 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
9574 (grub_host_size_t, grub_host_ssize_t): New types.
9575 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
9576 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
9577 `GRUB_HOST_SIZEOF_VOID_P'.
9579 * include/grub/kernel.h (struct grub_module_header): Type of
9580 member offset changed to `grub_host_off_t'. Type of member size
9581 changed to `grub_host_size_t'.
9582 (struct grub_module_info): Type of member offset changed to
9583 `grub_host_off_t'. Type of member size changed to
9586 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
9588 Make GRUB's kernel compliant to Multiboot Specification.
9590 * kern/i386/pc/startup.S (multiboot_header): New label.
9591 (multiboot_entry): Likewise.
9592 (multiboot_trampoline): Likewise.
9594 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9597 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
9598 put parentheses after a question mark.
9599 [!GRUB_UTIL] (my_mod): New variable.
9601 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
9603 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
9605 Adds support for the XFS filesystem. Btrees are not supported
9608 * fs/xfs.c: New file.
9610 * DISTLIST: Added `fs/xfs.c'.
9612 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
9613 (grub_probefs_SOURCES): Likewise.
9614 (grub_emu_SOURCES): Likewise.
9615 (pkgdata_MODULES): Add `xfs.mod'.
9616 (xfs_mod_SOURCES): New variable.
9617 (xfs_mod_CFLAGS): Likewise.
9619 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
9620 (pkgdata_MODULES): Add `xfs.mod'.
9621 (xfs_mod_SOURCES): New variable.
9622 (xfs_mod_CFLAGS): Likewise.
9624 * util/grub-emu.c (main): Call `grub_xfs_init' and
9627 * include/grub/fs.h (grub_xfs_init): New prototype.
9628 (grub_xfs_fini): Likewise.
9631 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
9633 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
9634 color modes, allow greater than 16 colors to be configured as
9637 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9639 * normal/completion.c (complete_arguments): Add the qualifier
9642 From Omniflux <omniflux+lists@omniflux.com>:
9643 * include/grub/terminfo.h: New file.
9644 * include/grub/tparm.h: Likewise.
9645 * include/grub/i386/pc/serial.h: Likewise.
9646 * term/terminfo.c: Likewise.
9647 * term/tparm.c: Likewise.
9648 * term/i386/pc/serial.c: Likewise.
9649 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
9651 (terminfo_mod_SOURCES): New variable.
9652 (terminfo_mod_CFLAGS): Likewise.
9653 (serial_mod_SOURCES): Likewise.
9654 (serial_mod_CFLAGS): Likewise.
9656 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
9658 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
9659 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
9660 and kern/powerpc/ieee1275/cmain.c, respectively.
9662 * boot/powerpc/ieee1275/crt0.S: Moved to ...
9663 * kern/powerpc/ieee1275/crt0.S: ... here.
9665 * boot/powerpc/ieee1275/cmain.c: Moved to ...
9666 * kern/powerpc/ieee1275/cmain.c: ... here.
9668 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
9669 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
9670 instead of boot/powerpc/ieee1275/crt0.S and
9671 boot/powerpc/ieee1275/cmain.c, respectively.
9673 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
9674 sectors. It was not used anyway.
9676 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9678 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
9679 `unused parameter' warning.
9681 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9683 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
9685 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
9688 2005-08-28 Marco Gerards <metgerards@student.han.nl>
9690 * include/grub/normal.h (enum grub_completion_type): Added
9691 `GRUB_COMPLETION_TYPE_ARGUMENT'.
9693 * normal/cmdline.c (print_completion): Handle
9694 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
9695 * normal/menu_entry.c (store_completion): Likewise.
9697 * normal/completion.c (complete_arguments): New function.
9698 (grub_normal_do_completion): Call `complete_arguments' when the
9699 current words start with a dash.
9701 2005-08-27 Marco Gerards <metgerards@student.han.nl>
9703 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
9704 `gzio.mod' instead of `io.mod').
9706 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
9708 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
9709 (DISTDIRS): Added io and video.
9710 Rewrite the search routine to make an output consistently.
9712 * DISTLIST: Added conf/sparc64-ieee1275.mk,
9713 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
9714 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
9715 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
9716 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
9717 util/powerpc/ieee1275/misc.c.
9719 * include/grub/gzio.h: New file.
9720 * io/gzio.c: Likewise.
9722 * kern/file.c (grub_file_close): Call grub_device_close only if
9723 FILE->DEVICE is not NULL.
9725 * include/grub/mm.h [!NULL] (NULL): New macro.
9727 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
9729 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
9730 (pkgdata_MODULES): Added gzio.mod.
9731 (gzio_mod_SOURCES): New variable.
9732 (gzio_mod_CFLAGS): Likewise.
9734 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
9735 (pkgdata_MODULES): Added gzio.mod.
9736 (gzio_mod_SOURCES): New variable.
9737 (gzio_mod_CFLAGS): Likewise.
9739 * commands/cat.c: Include grub/gzio.h.
9740 (grub_cmd_cat): Use grub_gzfile_open instead of
9743 * commands/cmp.c: Include grub/gzio.h.
9744 (grub_cmd_cmp): Use grub_gzfile_open instead of
9747 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
9748 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
9750 (grub_rescue_cmd_module): Likewise.
9752 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9754 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
9755 kern/sparc64/ieee1275/init.c because it contains _start.
9756 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
9758 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9760 * configure.ac: Add support for sparc64 host with ieee1275
9762 * configure: Generated from configure.ac.
9763 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
9765 (grub_ofdisk_read): Likewise.
9766 (grub_ofdisk_open): Use %p to print pointer values, and cast the
9767 pointers as (void *) to remove a warning.
9768 (grub_ofdisk_close): Likewise.
9769 (grub_ofdisk_read): Likewise.
9770 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
9771 returns, so make it return void to remove a warning.
9772 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
9773 Corresponding prototype change.
9774 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
9775 values, and cast the pointers as (void *) to remove a warning.
9776 (grub_mm_dump): Likewise.
9777 * conf/sparc64-ieee1275.mk: New file.
9778 * conf/sparc64-ieee1275.rmk: Likewise.
9779 * include/grub/sparc64/setjmp.h: Likewise.
9780 * include/grub/sparc64/types.h: Likewise.
9781 * include/grub/sparc64/ieee1275/console.h: Likewise.
9782 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9783 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9784 * include/grub/sparc64/ieee1275/time.h: Likewise.
9785 * kern/sparc64/cache.c: Likewise.
9786 * kern/sparc64/dl.c: Likewise.
9787 * kern/sparc64/ieee1275/init.c: Likewise.
9788 * kern/sparc64/ieee1275/openfw.c: Likewise.
9790 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
9792 * util/console.c (grub_ncurses_putchar): If C is greater than
9793 0x7f, set C to a question mark.
9794 (grub_ncurses_getcharwidth): New function.
9795 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
9798 * normal/menu.c (print_entry): Made aware of Unicode. First,
9799 convert TITLE to UCS-4, and predict the cursor position by
9802 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
9804 * kern/misc.c (grub_utf16_to_utf8): Likewise.
9806 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9808 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
9809 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9812 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
9813 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9814 grub_strcpy and grub_strlen. Take it into account that a space
9815 character is inserted as a delimiter.
9817 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9819 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
9820 invalid magic in the error.
9822 * commands/search.c: New file.
9824 * util/grub-emu.c (main): Call grub_search_init and
9827 * kern/rescue.c (grub_rescue_print_disks): Removed.
9828 (grub_rescue_print_devices): New function.
9829 (grub_rescue_cmd_ls): Use grub_device_iterate with
9830 grub_rescue_print_devices instead of grub_disk_dev_iterate with
9831 grub_rescue_print_disks.
9833 * kern/partition.c (grub_partition_iterate): Return the result of
9834 PARTMAP->ITERATE instead of GRUB_ERRNO.
9836 * kern/device.c: Include grub/partition.h.
9837 (grub_device_iterate): New function.
9839 * include/grub/partition.h (grub_partition_iterate): Return int
9840 instead of grub_err_t.
9842 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
9844 [GRUB_UTIL] (grub_search_fini): Likewise.
9846 * include/grub/device.h (grub_device_iterate): New prototype.
9848 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9850 (pkgdata_MODULES): Added search.mod.
9851 (search_mod_SOURCES): New variable.
9852 (search_mod_CFLAGS): Likewise.
9854 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
9855 (pkgdata_MODULES): Added search.mod.
9856 (search_mod_SOURCES): New variable.
9857 (search_mod_CFLAGS): Likewise.
9859 * commands/ls.c (grub_ls_list_disks): Renamed to ...
9860 (grub_ls_list_devices): ... this, and use grub_device_iterate.
9861 All callers changed.
9863 * DISTLIST: Added commands/search.c.
9865 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9867 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
9869 (grub_getcharwidth): New function.
9871 * kern/misc.c (grub_utf8_to_ucs4): New function.
9873 * include/grub/term.h (struct grub_term): Added a new member
9875 (grub_getcharwidth): New prototype.
9877 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
9879 * term/i386/pc/console.c (map_char): New function. Segregated from
9880 grub_console_putchar.
9881 (grub_console_putchar): Use map_char.
9882 (grub_console_getcharwidth): New function.
9883 (grub_console_term): Specified grub_console_getcharwidth as
9886 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
9887 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
9889 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
9891 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
9892 on grub_strtoul completely.
9893 (write_char): Declare local variables in the beginning of the
9895 (grub_vesafb_getcharwidth): New function.
9896 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
9899 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
9901 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
9902 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
9903 commands/i386/pc/vbetest.c.
9905 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
9906 call grub_vbe_get_controller_info again, because the returned
9907 information is volatile.
9908 (grub_vbe_set_video_mode): Mostly rewritten.
9909 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
9910 grub_vbe_status_t correctly.
9911 (grub_vbe_get_video_mode_info): Likewise.
9912 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
9913 several if statements.
9915 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
9916 * commands/i386/pc/vbeinfo.c: ... this.
9918 * commands/i386/pc/vbe_test.c: Renamed to ...
9919 * commands/i386/pc/vbetest.c: ... this.
9921 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
9923 (grub_cmd_vbeinfo): ... this. Save video modes before
9924 iterating. Skip a video mode, if it is not available, not enough
9925 information is given or it is monochrome. Show the memory
9926 model. Leave the interpretation of MODEVAR to grub_strtoul
9928 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
9929 (GRUB_MOD_FINI): Likewise.
9931 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
9932 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
9933 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
9934 duplicated grub_env_get. Leave the interpretation of MODEVAR to
9935 grub_strtoul completely.
9937 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
9938 (GRUB_MOD_FINI): Likewise.
9940 * normal/misc.c: Include grub/mm.h.
9942 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
9943 vbe_list_modes with vbetest.mod and vbeinfo.mod.
9944 (vbe_list_modes_mod_SOURCES): Removed.
9945 (vbe_list_modes_mod_CFLAGS): Likewise.
9946 (vbe_test_mod_SOURCES): Likewise.
9947 (vbe_test_mod_CFLAGS): Likewise.
9948 (vbeinfo_mod_SOURCES): New variable.
9949 (vbeinfo_mod_CFLAGS): Likewise.
9950 (vbetest_mod_SOURCES): Likewise.
9951 (vbetest_mod_CFLAGS): Likewise.
9953 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
9955 * normal/misc.c: New file.
9957 * DISTLIST: Added normal/misc.c.
9959 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
9960 DISK to HOOK. Call HOOK with DISK.
9961 * partmap/apple.c (apple_partition_map_iterate): Likewise.
9962 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9963 * partmap/sun.c (sun_partition_map_iterate): Likewise.
9965 * normal/menu_entry.c (struct screen): Added a new member
9967 (completion_buffer): New global variable.
9968 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
9969 (store_completion): New function.
9970 (complete): Likewise.
9971 (clear_completions): Likewise.
9972 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
9973 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
9974 a tab, call complete.
9976 * normal/completion.c (disk_dev): Removed.
9977 (print_simple_completion): Likewise.
9978 (print_partition_completion): Likewise.
9979 (print_func): New global variable.
9980 (add_completion): Do not take the arguments WHAT or PRINT any
9981 longer. Added a new argument TYPE. Instead of printing directly,
9982 call PRINT_FUNC if not NULL.
9983 All callers changed.
9984 (complete_device): Use a local variable DEV instead of
9985 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
9986 (grub_normal_do_completion): Take a new argument HOOK. Do not
9987 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
9988 empty string, return NULL instead.
9989 All callers changed.
9991 * normal/cmdline.c (print_completion): New function.
9993 * kern/partition.c (grub_partition_iterate): Add an argument DISK
9995 All callers changed.
9997 * kern/disk.c (grub_print_partinfo): Removed.
9999 * include/grub/partition.h (struct grub_partition_map): Add a new
10000 argument DISK into HOOK of ITERATE.
10001 (grub_partition_iterate): Add a new argument DISK to HOOK.
10003 * include/grub/normal.h (enum grub_completion_type): New enum.
10004 (grub_completion_type_t): New type.
10005 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
10006 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
10007 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
10008 (GRUB_COMPLETION_TYPE_FILE): Likewise.
10009 (grub_normal_do_completion): Added a new argument HOOK.
10010 (grub_normal_print_device_info): New prototype.
10012 * include/grub/disk.h (grub_print_partinfo): Removed.
10014 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
10015 (normal_mod_SOURCES): Likewise.
10016 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10017 (normal_mod_SOURCES): Likewise.
10019 * commands/ls.c (grub_ls_list_disks): Use
10020 grub_normal_print_device_info instead of grub_print_partinfo. Free
10022 (grub_ls_list_files): Use grub_normal_print_device_info instead of
10023 duplicating the code.
10025 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10027 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
10028 follow GCS more precisely.
10029 * commands/i386/pc/vbe_test.c: Likewise.
10030 * include/grub/i386/pc/vbe.h: Likewise.
10031 * term/i386/pc/vesafb.c: Likewise.
10032 * video/i386/pc/vbe.c: Likewise.
10034 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
10036 * DISTLIST: Added term/i386/pc/vesafb.c
10037 DISTLIST: Added video/i386/pc/vbe.c
10038 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
10039 DISTLIST: Added commands/i386/pc/vbe_test.c.
10040 * commands/i386/pc/vbe_list_modes.c: New file.
10041 * commands/i386/pc/vbe_test.c: Likewise.
10042 * term/i386/pc/vesafb.c: Likewise.
10043 * video/i386/pc/vbe.c: Likewise.
10044 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
10045 (grub_vbe_probe) Added prototype.
10046 (grub_vbe_set_video_mode) Likewise.
10047 (grub_vbe_get_video_mode) Likewise.
10048 (grub_vbe_get_video_mode_info) Likewise.
10049 (grub_vbe_set_pixel_rgb) Likewise.
10050 (grub_vbe_set_pixel_index) Likewise.
10051 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
10052 (pkgdata_MODULES): Added vesafb.mod.
10053 (pkgdata_MODULES): Added vbe_list_modes.mod.
10054 (pkgdata_MODULES): Added vbe_test.mod.
10055 (vbe_mod_SOURCES): Added.
10056 (vbe_mod_CFLAGS): Likewise.
10057 (vesafb_mod_SOURCES): Likewise.
10058 (vesafb_mod_CFLAGS): Likewise.
10059 (vbe_list_modes_mod_SOURCES): Likewise.
10060 (vbe_list_modes_mod_CFLAGS): Likewise.
10061 (vbe_test_mod_SOURCES): Likewise.
10062 (vbe_test_mod_CFLAGS): Likewise.
10064 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
10066 * normal/command.c (grub_command_execute): If INTERACTIVE is
10067 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
10068 CMDLINE. Disable the pager if INTERACTIVE is true.
10069 All callers are changed.
10071 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
10072 before reading a config file.
10073 * normal/main.c (read_config_file): Even if a command is not
10074 found, register it if it is within an entry.
10076 * util/grub-emu.c: Include sys/types.h and unistd.h.
10077 (options): Added --hold.
10078 (struct arguments): Added a new member "hold".
10079 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
10081 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
10082 cleared by a debugger, if it is not zero.
10084 * include/grub/normal.h (grub_command_execute): Add an argument
10087 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
10089 * DISTLIST: Added include/grub/i386/pc/vbe.h.
10091 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
10093 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
10094 program with another one, because the old one didn't detect a bug
10095 in gcc-3.4. Always use regparm 2, because the new test is still
10096 not enough for gcc-4.0. Someone must investigate a simple test
10097 case which detects a bug in gcc-4.0.
10099 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
10101 * DISTLIST: Added normal/completion.c.
10103 * normal/completion.c: New file.
10105 * term/i386/pc/console.c (grub_console_getwh): New function.
10106 (grub_console_term): Assign grub_console_getwh to getwh.
10108 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
10109 function is defined in normal/completion.c as
10110 grub_normal_do_completion.
10111 (grub_cmdline_get): Use grub_normal_do_completion instead of
10114 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
10115 returns non-zero, otherwise return 0.
10116 (grub_partition_iterate): First, probe the partition map. Then,
10117 call ITERATE only for this partition map.
10119 * kern/misc.c (grub_strncmp): Rewritten.
10121 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
10122 returns non-zero. Otherwise return 0.
10124 * include/grub/partition.h (grub_partition_map_iterate): Return
10125 int instead of void.
10127 * include/grub/normal.h (grub_normal_do_completion): New prototype.
10129 * include/grub/misc.h (grub_strncmp): Change the type of N to
10132 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
10135 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
10136 unsigned explicitly before comparing it with I.
10138 * kern/main.c (grub_env_write_root): Add the attribute unused into
10141 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10142 normal/completion.c.
10143 (normal_mod_SOURCES): Likewise.
10144 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10145 (normal_mod_SOURCES): Likewise.
10147 * normal/command.c (grub_iterate_commands): If ITERATE returns
10148 non-zero, return one immediately.
10150 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
10152 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
10153 * kern/i386/pc/startup.S: Updated Global Descriptor table's
10155 (grub_vbe_get_controller_info): New function.
10156 (grub_vbe_get_mode_info): Likewise.
10157 (grub_vbe_set_mode): Likewise.
10158 (grub_vbe_get_mode): Likewise.
10159 (grub_vbe_set_memory_window): Likewise.
10160 (grub_vbe_get_memory_window): Likewise.
10161 (grub_vbe_set_scanline_length): Likewise.
10162 (grub_vbe_get_scanline_length): Likewise.
10163 (grub_vbe_set_display_start): Likewise.
10164 (grub_vbe_get_display_start): Likewise.
10165 (grub_vbe_set_palette_data): Likewise.
10166 * include/grub/i386/pc/vbe.h: New file.
10168 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10170 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10171 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
10172 * DISTLIST: Likewise.
10173 * kern/ieee1275/of.c: Moved to ...
10174 * kern/ieee1275/ieee1275.c: ... here.
10176 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10178 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
10179 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
10180 Pass 0 as `end' parameter to grub_strtoul().
10182 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
10184 * include/grub/powerpc/ieee1275/console.h: Do not include
10185 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
10187 (grub_console_cur_color): Remove i386-specific prototype.
10188 (grub_console_real_putchar): Likewise.
10189 (grub_console_checkkey): Likewise.
10190 (grub_console_getkey): Likewise.
10191 (grub_console_getxy): Likewise.
10192 (grub_console_gotoxy): Likewise.
10193 (grub_console_cls): Likewise.
10194 (grub_console_setcursor): Likewise.
10195 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
10196 Include <grub/machine/console.h>.
10197 * term/ieee1275/ofconsole.c: Likewise.
10199 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
10201 * Makefile.in (LIBLZO): New variable.
10203 * configure.ac: Check for LZO version 2.
10205 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
10206 lzo/lzo1x.h instead of lzo1x.h.
10208 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
10211 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
10212 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
10214 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
10215 copying the data from PARTITION to P.
10217 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10219 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
10220 negative, unload the module.
10222 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
10223 map is "pc_partition_map" but not "pc".
10224 (usage): Fix the description. The options are --boot-image and
10225 --core-image but not --boot-file or --core-file.
10226 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
10227 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
10230 * util/i386/pc/grub-install.in: Do not specify --boot-file or
10231 --core-file. Specify INSTALL_DEVICE as an argument.
10233 * util/console.c: Include config.h.
10234 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
10235 [HAVE_NCURSES_H]: Include ncurses.h.
10236 [HAVE_CURSES_H]: Include curses.h.
10237 [!A_NORMAL] (A_NORMAL): Defined as zero.
10238 [!A_STANDOUT] (A_STANDOUT): Likewise.
10240 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
10242 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
10244 * configure.ac: Check for curses libraries and headers.
10246 * Makefile.in (LIBCURSES): New variable.
10248 * genmk.rb (Script::rule): Set the executable bits.
10250 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
10251 name of the PC partition map is "pc_partition_map" but not "pc".
10253 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10255 * util/i386/pc/grub-install.in (grub_probefs): New variable.
10256 (modules): Likewise.
10257 (usage): Added descriptions for --modules and --grub-probefs.
10258 Handle --modules and --grub-probefs. Save the arguments in MODULES
10259 and GRUB_PROBEFS, respectively.
10260 Auto-detect a filesystem module against GRUBDIR. If the result is
10261 empty and modules are not specified explicitly, abort the
10262 installation. Add the result to MODULES.
10264 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
10265 disk/powerpc/ieee1275/ofdisk.c,
10266 include/grub/powerpc/ieee1275/init.h and
10267 term/powerpc/ieee1275/ofconsole.c.
10268 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
10269 term/ieee1275/ofconsole.c.
10271 * include/grub/powerpc/ieee1275/console.h: Resurrected.
10273 * COPYING: Upgraded to the latest version. Only the address of the
10274 FSF office has changed.
10276 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
10278 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
10279 kern/ieee1275.c with kern/ieee1275/of.c.
10281 * kern/ieee1275.c: Moved to ...
10282 * kern/ieee1275/of.c: ... here.
10284 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
10286 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
10289 * config.guess: Updated to the latest version from gnulib.
10290 * config.sub: Likewise.
10291 * install.sh: Likewise.
10292 * mkinstalldirs: Likewise.
10294 * include/grub/console.h: Removed. This file is arch-specific. Do
10295 not put this in include/grub.
10297 * include/grub/i386/pc/console.h: Resurrected.
10299 * util/console.c: Include grub/machine/console.h instead of
10301 * util/grub-emu.c: Likewise.
10303 2005-08-04 Marco Gerards <metgerards@student.han.nl>
10305 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10308 From Vincent Pelletier <subdino2004@yahoo.fr>
10309 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10310 Redefined to use grub_getwh.
10311 (grub_term): New member named getwh.
10312 (grub_getwh): New prototype.
10313 * kern/term.c (grub_getwh): New function.
10314 * term/i386/pc/console.c (grub_console_getwh): New function.
10315 (grub_console_term): New member `getwh'.
10316 * term/i386/pc/vga.c (grub_vga_getwh): New function.
10317 (grub_vga_term): New member `getwh'.
10318 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10320 (grub_ofconsole_getw): New function.
10321 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10322 (grub_ofconsole_term): New field named getwh and new initial
10325 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
10327 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10328 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
10329 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10330 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10331 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10332 of <grub/machine/ieee1275.h>.
10333 * commands/ieee1275/reboot.c: Likewise.
10334 * boot/powerpc/ieee1275/ieee1275.c: Move ...
10335 * kern/ieee1275.c: ... to here. All users updated. Change all
10336 parameter structs to use new type `grub_ieee1275_cell_t'.
10337 * term/powerpc/ieee1275/ofconsole.c: Move ...
10338 * term/ieee1275/ofconsole.c: ... to here. All users updated.
10339 * disk/powerpc/ieee1275/ofdisk.c: Move ...
10340 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
10341 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10343 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10344 Remove unused prototypes. All users updated.
10345 * include/grub/powerpc/ieee1275/console.h: Removed.
10346 * include/grub/powerpc/ieee1275/ieee1275.h: Define
10347 `grub_ieee1275_cell_t'.
10348 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10349 Cast comparisons with -1 to the correct type.
10350 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10351 type to match `grub_ieee1275_entry_fn'.
10353 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
10355 * DISTLIST: Added util/i386/pc/grub-probefs.c.
10357 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10358 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10360 (grub_probefs_SOURCES): New variable.
10362 * util/i386/pc/grub-probefs.c: New file.
10364 * util/i386/pc/grub-setup.c (main): Call
10365 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10366 grub_hfs_init and grub_jfs_init to initialize the system. Call
10367 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10368 grub_pc_partition_map_fini to finish the system.
10370 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
10372 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10374 (grub_multiboot_load_elf32): Likewise.
10375 (grub_multiboot_is_elf64): Likewise.
10376 (grub_multiboot_load_elf64): Likewise.
10377 (grub_multiboot_load_elf): Likewise.
10378 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10379 an ELF32 or ELF64 file.
10380 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10382 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10383 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10384 NULL before calling FS->LABEL.
10385 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10386 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10387 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10388 before calling FS->LABEL.
10390 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
10392 * util/i386/pc/grub-install.in (datadir): New variable.
10394 (pkgdatadir): New variable.
10395 (pkglibdir): Removed.
10397 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
10399 * DISTLIST: Added util/i386/pc/grub-install.in.
10401 * util/i386/pc/grub-install.in: New file.
10403 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10404 (grub_install_SOURCES): Likewise.
10406 * genmk.rb: Added support for scripts.
10407 (Script): New class.
10408 (scripts): New variable.
10410 * Makefile.in (install-local): Install sbin_SCRIPTS by
10412 (uninstall): Remove sbin_SCRIPTS.
10414 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10415 device, try to get a GRUB device by
10416 grub_util_biosdisk_get_grub_dev.
10419 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10420 description for --device-map.
10422 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10424 Change the semantics of variable hooks. They now return strings
10425 instead of error values.
10427 * util/i386/pc/grub-setup.c: Include grub/env.h.
10428 (setup): Use grub_device_set_root instead of grub_env_set.
10430 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10431 grub_env_get instead of grub_device_set_root and
10432 grub_device_get_root, respectively.
10434 * kern/main.c (grub_env_write_root): New function.
10435 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10436 grub_env_set instead of grub_device_set_root.
10438 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10440 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10441 rather than calling ENV->WRITE_HOOK afterwards.
10442 (grub_env_get): Return the result of ENV->READ_HOOK rather than
10443 passing a pointer of a pointer.
10444 (grub_register_variable_hook): Change the types of "read_hook" and
10445 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10447 Allocate the default empty string on the heap, because this string
10448 may be freed later.
10450 * kern/device.c: Include grub/env.h.
10451 (grub_device_set_root): Removed.
10452 (grub_device_get_root): Likewise.
10453 (grub_device_open): Use grub_env_get instead of
10454 grub_device_get_root.
10456 * include/grub/env.h (grub_env_read_hook_t): New type.
10457 (grub_env_write_hook_t): Likewise.
10458 (grub_env_var): Change the types of "read_hook" and "write_hook"
10459 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10460 (grub_register_variable_hook): Likewise.
10462 * include/grub/device.h (grub_device_set_root): Removed.
10463 (grub_device_set_root): Likewise.
10465 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10466 make sure that DIRNAME terminates with '/', so that
10467 grub_fat_find_dir will fail if PATH is not a directory.
10469 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10471 Use the qualifier auto for print_files and print_files_long.
10472 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10474 Put a newline only if there is no error.
10475 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10478 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10480 * kern/partition.c (grub_partition_probe): Initialize PART to
10481 NULL. Otherwise, when no partition map is registered, this returns
10484 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
10486 * partmap/apple.c (apple_partition_map_iterate): Check if POS
10487 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10490 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
10492 * commands/ls.c (grub_ls_list_disks): Print the filesystem
10493 information on each device, if it does not have partitions. Print
10494 "Device" instead of "Disk", because this function is not specific
10497 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10498 static to ensure that it is put on the memory rather than a
10501 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10503 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
10504 (grub_cat_init): Likewise.
10505 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
10506 (options): Likewise.
10507 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
10508 (grub_configfile_init): Likewise.
10509 * font/manager.c (GRUB_MOD_INIT): Likewise.
10510 * commands/help.c (GRUB_MOD_INIT): Likewise.
10511 (grub_help_init): Likewise.
10512 * normal/command.c (grub_command_init): Likewise.
10513 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
10514 * disk/loopback.c (grub_loop_init): Likewise.
10515 (GRUB_MOD_INIT): Likewise.
10516 * commands/ls.c (grub_ls_init): Likewise.
10517 (GRUB_MOD_INIT): Likewise.
10518 (options): Likewise.
10519 * commands/boot.c (grub_boot_init): Likewise.
10520 (GRUB_MOD_INIT): Likewise.
10521 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
10522 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
10523 (GRUB_MOD_INIT): Likewise.
10524 * commands/cmp.c (grub_cmp_init): Likewise.
10525 (GRUB_MOD_INIT): Likewise.
10527 * normal/arg.c: Use <> instead of "" to include header files.
10528 (SHORT_ARG_HELP): New macro.
10529 (SHORT_ARG_USAGE): Likewise.
10530 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
10531 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
10533 (find_short): Check if C is 'h' or 'u' explicitly.
10534 (grub_arg_show_help): Use space characters instead of tabs. Treat
10535 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
10536 are shown with --help and --usage only if they are not used for
10537 the command itself.
10538 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
10541 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
10542 const into "longarg". Change the type of "shortarg" to int.
10544 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10546 * boot/i386/pc/boot.S (boot_drive_check): New label.
10548 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
10551 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
10552 which do not pass a boot drive correctly. Copied from GRUB Legacy.
10554 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10556 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
10557 When turning off Gate A20, skip the check and return immediately,
10558 because this is not fatal usually.
10560 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10562 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
10563 be 0x7C00 instead of 0x8000.
10565 * boot/i386/pc/pxeboot.S: Rewritten.
10567 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
10569 (gate_a20_check_state): Read a byte from 0x108000. Invert the
10572 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
10574 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
10575 robustness. This routine now supports a BIOS call and System
10576 Control Port A to modify the gate A20.
10578 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10579 Increased to 0x440.
10581 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
10583 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
10584 device path and resulting ihandle.
10585 (grub_ofdisk_close): dprintf the ihandle being closed.
10586 (grub_ofdisk_read): dprintf function parameters.
10587 * kern/mm.c (grub_mm_init_region): Likewise.
10588 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
10589 (grub_linux_boot): dprintf the Linux entry point, initrd address and
10590 size, and boot arguments.
10591 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
10592 before loading into memory.
10593 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
10594 before loading into memory.
10596 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
10598 * kern/mm.c: Added much documentation.
10599 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
10600 8, set to 5 instead of 8.
10602 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
10604 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
10606 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
10607 (grub_mkdevicemap_SOURCES): New variable.
10609 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
10610 lib/device.c of GRUB Legacy.
10612 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
10614 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
10615 instead of PATH is NULL.
10617 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
10619 * commands/cmp.c (BUFFER_SIZE): New macro.
10620 (grub_cmd_cmp): Close the right file at the right time. Compare
10621 only data just read. Don't report files of different size as
10622 identical. Dynamically allocate buffers. Move variable
10623 declarations at the beginning of function.
10625 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
10627 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
10630 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
10632 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
10633 when backspace is pressed at beginning of line.
10635 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
10637 * DISTLIST: Added genfslist.sh.
10639 * normal/main.c (fs_module_list): New variable.
10640 (autoload_fs_module): New function.
10641 (read_fs_list): Likewise.
10642 (grub_normal_execute): Call read_fs_list.
10644 * kern/fs.c (grub_fs_autoload_hook): New variable.
10645 (grub_fs_probe): Added support for auto-loading.
10647 * include/grub/normal.h (struct grub_fs_module_list): New struct.
10648 (grub_fs_module_list_t): New type.
10650 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
10651 (grub_fs_autoload_hook): New prototype.
10653 * genfslist.sh: New file.
10655 * genmk.rb: Added a rule to generate a filesystem list.
10657 2005-06-30 Marco Gerards <metgerards@student.han.nl>
10659 * configure.ac: Fix the test for cross-compiling.
10661 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
10662 define GRUB_UTIL anymore.
10664 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
10665 so this function works on other systems than just big endian.
10666 (load_modules): Likewise.
10667 (add_segments): Likewise.
10669 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
10671 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
10672 contains `l' modifier, get a long from va_arg().
10674 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
10676 * kern/mm.c (grub_free): If the next free block which is being
10677 merged is the first free block, set the first block to the block
10679 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
10681 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10683 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
10684 `grub_ieee1275_chosen'.
10686 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10688 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
10689 (grub_ieee1275_chosen): New variable.
10690 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
10692 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
10693 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10694 Rename first argument to `phandle' for consistency.
10695 (grub_ieee1275_get_property_length): Likewise.
10696 (grub_ieee1275_next_property): Likewise. Change type of first argument
10697 to grub_ieee1275_phandle_t.
10698 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
10699 Move export next to declaration.
10700 (grub_ieee1275_chosen): New variable.
10701 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
10702 Correct cosmetic typo.
10703 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
10704 `grub_ieee1275_chosen'.
10705 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
10706 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
10707 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
10708 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
10709 `grub_ieee1275_chosen'.
10711 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
10713 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
10715 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
10716 /chosen/bootargs as "variable=value" pairs.
10718 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
10720 * include/grub/misc.h (grub_dprintf): New macro.
10721 (grub_real_dprintf): New prototype.
10722 (grub_strword): Likewise.
10723 (grub_iswordseparator): Likewise.
10724 * kern/misc.c (grub_real_dprintf): New function.
10725 (grub_strword): Likewise.
10726 (grub_iswordseparator): Likewise.
10728 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
10730 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
10731 (roundup): Remove macro.
10732 (grub_ieee1275_flags): Make static.
10733 (grub_ieee1275_realmode): Remove.
10734 (grub_ieee1275_test_flag): New function.
10735 (grub_ieee1275_set_flag): Likewise.
10736 (find_options): Rename to `grub_ieee1275_find_options'; update
10737 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
10738 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
10739 (cmain): New prototype.
10740 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
10741 `grub_ieee1275_flags' directly.
10742 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
10743 machine/biosdisk.h.
10744 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
10745 Don't include grub/machine/init.h.
10746 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
10747 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10749 (grub_ieee1275_realmode): Likewise.
10750 (grub_ieee1275_flag): New enum.
10751 (grub_ieee1275_test_flag): New prototype.
10752 (grub_ieee1275_set_flag): New prototype.
10753 * include/grub/powerpc/ieee1275/init.h: Remove file.
10754 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
10755 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
10756 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
10757 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
10759 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
10760 `grub_ieee1275_test_flag'.
10761 (grub_ieee1275_encode_devname): Likewise.
10763 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
10765 * include/grub/powerpc/ieee1275/ieee1275.h
10766 (grub_ieee1275_encode_devname): New prototype.
10767 (grub_ieee1275_get_filename): Likewise.
10768 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
10770 (grub_set_prefix): Likewise.
10771 (grub_machine_init): Call grub_set_prefix.
10772 * kern/powerpc/ieee1275/openfw.c: Fix typos.
10773 (grub_parse_type): New enum.
10774 (grub_ieee1275_get_devargs): New function.
10775 (grub_ieee1275_get_devname): Likewise.
10776 (grub_ieee1275_parse_args): Likewise.
10777 (grub_ieee1275_get_filename): Likewise.
10778 (grub_ieee1275_encode_devname): Likewise.
10780 2005-03-30 Marco Gerards <metgerards@student.han.nl>
10782 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
10783 `grub_loader_unset'.
10785 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
10787 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
10788 instead of grub_ieee1275_interpret.
10789 (grub_halt_init): New function.
10790 (grub_halt_fini): Likewise.
10791 (GRUB_MOD_INIT): Correct message grammar.
10792 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
10793 instead of grub_ieee1275_interpret.
10794 (grub_reboot_init): New function.
10795 (grub_reboot_fini): Likewise.
10796 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
10797 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
10798 util/i386/pc/misc.c with commands/ieee1275/halt.c,
10799 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
10800 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
10802 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
10804 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
10806 (grub_halt): Likewise.
10807 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
10808 (cmain): Remove __attribute__((unused)).
10809 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
10810 (grub_heap_len): Likewise.
10811 (grub_machine_fini): New function.
10812 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
10813 (grub_halt): Likewise.
10814 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
10816 * util/powerpc/ieee1275/misc.c: New file.
10818 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10820 * DISTLIST: New file.
10821 * gendistlist.sh: Likewise.
10823 * Makefile.in (COMMON_DISTFILES): Removed.
10824 (BOOT_DISTFILES): Likewise.
10825 (CONF_DISTFILES): Likewise.
10826 (DISK_DISTFILES): Likewise.
10827 (FS_DISTFILES): Likewise.
10828 (INCLUDE_DISTFILES): Likewise.
10829 (KERN_DISTFILES): Likewise.
10830 (LOADER_DISTFILES): Likewise.
10831 (TERM_DISTFILES): Likewise.
10832 (UTIL_DISTFILES): Likewise.
10833 (DISTFILES): Likewise.
10834 (uninstall): Uninstall files in $(pkgdata_DATA).
10835 (DISTLIST): New target.
10836 (distdir): Use the contents of the file DISTLIST to get a list of
10839 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10841 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
10842 descriptor. This is ported from GRUB Legacy.
10844 * gencmdlist.sh: Added an extra semicolon to make it work with
10845 old sed versions. Reported by Robert Bihlmeyer
10846 <robbe@orcus.priv.at>.
10848 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
10850 Automatic loading of commands is supported.
10852 * normal/main.c (read_command_list): New function.
10853 (grub_normal_execute): Call read_command_list.
10855 * normal/command.c (grub_register_command): Return zero or CMD.
10856 Allocate CMD->NAME from the heap.
10857 Initialize CMD->MODULE_NAME to zero.
10858 Find the same name as well. If the same command is found and it is
10859 a dummy command, overwrite members. If it is not a dummy command,
10861 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
10862 (grub_command_find): If a dummy command is found, load a module
10863 and retry to find a command only once.
10865 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
10866 make sure that each command is loaded.
10868 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
10870 (struct grub_command): Remove const from the member `name'.
10871 Add a new member `module_name'.
10872 (grub_register_command): Return grub_command_t.
10874 * commands/help.c (grub_cmd_help): Call grub_command_find to make
10875 sure that each command is loaded.
10877 * genmk.rb (PModule::rule): Specify a module name without the
10878 suffix ".mod" to gencmdlist.sh.
10880 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10882 * gencmdlist.sh: New file.
10884 * genmk.rb (PModule::rule): Generate a rule for a command list.
10886 Generate command.lst from $(COMMANDFILES).
10888 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
10889 (DATA): Added $(pkgdata_DATA).
10890 (install-local): Install files in $(pkgdata_DATA).
10892 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10894 * term/i386/pc/vga.c (debug_command): Removed.
10895 (GRUB_MOD_INIT): Do not register the command "debug".
10897 From Hollis Blanchard:
10898 * commands/configfile.c: New file.
10899 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10900 commands/configfile.c.
10901 (pkgdata_MODULES): Added configfile.mod.
10902 (configfile_mod_SOURCES): New variable.
10903 (configfile_mod_CFLAGS): Likewise.
10904 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10905 commands/configfile.c.
10906 (pkgdata_MODULES): Added configfile.mod.
10907 (configfile_mod_SOURCES): New variable.
10908 (configfile_mod_CFLAGS): Likewise.
10909 * util/grub-emu.c (main): Call grub_configfile_init and
10910 grub_configfile_fini.
10911 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
10913 [GRUB_UTIL] (grub_configfile_fini): Likewise.
10915 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
10917 * normal/arg.c (grub_arg_show_help): Do not show the bug report
10920 * commands/help.c (grub_cmd_help): Do not print newlines after
10921 the last command in print_command_help.
10923 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
10925 * commands/default.h: New file.
10926 * commands/timeout.h: Likewise.
10927 * normal/context.c: Likewise.
10929 * util/misc.c: Do not include sys/times.h.
10930 Include sys/time.h and grub/machine/time.h.
10931 (grub_get_rtc): Rewritten with gettimeofday.
10933 * util/grub-emu.c (main): Call grub_default_init and
10934 grub_timeout_init before grub_normal_init, and call
10935 grub_timeout_fini and grub_default_fini after grub_main.
10937 * util/console.c (grub_ncurses_checkkey): Return the read
10940 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
10943 * normal/main.c (read_config_file): Push MENU. If this fails,
10944 print an error and wait for a user input.
10945 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
10946 If a menu is empty or an error occurs, pop MENU.
10947 (grub_normal_execute): Pop and free MENU after grub_menu_run
10950 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
10952 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
10954 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10956 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
10958 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10961 * include/grub/normal.h (struct grub_menu_list): New struct.
10962 (grub_menu_list_t): New type.
10963 (struct grub_context): New struct.
10964 (grub_context_t): New type.
10965 (grub_register_command): Got rid of EXPORT_FUNC.
10966 (grub_unregister_command): Likewise.
10967 (grub_context_get): New prototype.
10968 (grub_context_get_current_menu): Likewise.
10969 (grub_context_push_menu): Likewise.
10970 (grub_context_pop_menu): Likewise.
10971 [GRUB_UTIL] (grub_default_init): Likewise.
10972 [GRUB_UTIL] (grub_default_fini): Likewise.
10973 [GRUB_UTIL] (grub_timeout_init): Likewise.
10974 [GRUB_UTIL] (grub_timeout_fini): Likewise.
10976 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
10977 commands/timeout.c and normal/context.c.
10978 (pkgdata_MODULES): Added default.mod and timeout.mod.
10979 (normal_mod_SOURCES): Added normal/context.c.
10980 (default_mod_SOURCES): New variable.
10981 (default_mod_CFLAGS): Likewise.
10982 (timeout_mod_SOURCES): Likewise.
10983 (timeout_mod_CFLAGS): Likewise.
10984 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
10986 (pkgdata_MODULES): Added default.mod and timeout.mod.
10987 (normal_mod_SOURCES): Added normal/context.c.
10988 (default_mod_SOURCES): New variable.
10989 (default_mod_CFLAGS): Likewise.
10990 (timeout_mod_SOURCES): Likewise.
10991 (timeout_mod_CFLAGS): Likewise.
10993 * Makefile.in (all-local): Added $(MKFILES).
10995 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
10997 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
10998 (grub_emu_SOURCES): Likewise.
10999 (pkgdata_MODULES): Add `sun.mod'.
11000 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11001 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11003 (pkgdata_MODULES): Add `sun.mod'.
11004 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
11005 * include/grub/partition.h (grub_sun_partition_map_init): New
11007 (grub_sun_partition_map_fini): Likewise.
11008 * partmap/sun.c: New file.
11009 * util/grub-emu.c (main): Initialize and de-initialize the sun
11010 partitionmap support.
11012 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
11014 This implements an Emacs-like menu entry editor.
11016 * normal/menu_entry.c: New file.
11018 * util/console.c (grub_ncurses_putchar): Translate some Unicode
11019 characters to ASCII.
11020 (saved_char): New variable.
11021 (grub_ncurses_checkkey): Rewritten completely.
11022 (grub_ncurses_getkey): Likewise.
11023 (grub_ncurses_init): Call raw instead of cbreak.
11025 * normal/menu.c (print_entry): Do not put a space.
11026 (init_page): Renamed to ...
11027 (grub_menu_init_page): ... this. All callers changed.
11028 (edit_menu_entry): Removed.
11029 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
11031 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
11033 * kern/misc.c (grub_vprintf): Call grub_refresh.
11035 * normal/menu.c (DISP_LEFT): Renamed to ...
11036 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
11037 * normal/menu.c (DISP_UP): Renamed to ...
11038 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
11039 * normal/menu.c (DISP_RIGHT): Renamed to ...
11040 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
11041 * normal/menu.c (DISP_DOWN): Renamed to ...
11042 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
11043 * normal/menu.c (DISP_HLINE): Renamed to ...
11044 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
11045 * normal/menu.c (DISP_VLINE): Renamed to ...
11046 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
11047 * normal/menu.c (DISP_UL): Renamed to ...
11048 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
11049 * normal/menu.c (DISP_UR): Renamed to ...
11050 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
11051 * normal/menu.c (DISP_LL): Renamed to ...
11052 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
11053 * normal/menu.c (DISP_LR): Renamed to ...
11054 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
11055 * normal/menu.c (TERM_WIDTH): Renamed to ...
11056 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
11057 * normal/menu.c (TERM_HEIGHT): Renamed to ...
11058 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
11059 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
11060 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
11061 * normal/menu.c (TERM_MARGIN): Renamed to ...
11062 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
11063 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
11064 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
11065 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
11066 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
11067 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
11068 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
11069 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
11070 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
11071 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
11072 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
11073 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
11074 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
11075 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
11076 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
11077 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
11078 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
11079 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
11080 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
11081 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
11082 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
11083 All callers changed.
11085 * include/grub/normal.h: New prototype.
11087 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11088 normal/menu_entry.c.
11089 (normal_mod_SOURCES): Likewise.
11090 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11091 (normal_mod_SOURCES): Likewise.
11093 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
11095 * include/grub/normal.h (grub_halt_init): New prototype.
11096 (grub_halt_fini): Likewise.
11097 (grub_reboot_init): Likewise.
11098 (grub_reboot_fini): Likewise.
11100 * util/grub-emu.c: Include signal.h.
11101 (main_env): New global variable.
11102 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
11104 (grub_machine_fini): New function.
11105 (main): Call grub_halt_init and grub_reboot_init before
11106 grub_main, and grub_reboot_fini and grub_halt_fini after it.
11107 Call setjmp with MAIN_ENV to go back afterwards.
11108 Call grub_machine_fini right before return.
11110 * include/grub/util/misc.h: Include setjmp.h.
11111 (main_env): New prototype.
11113 * include/grub/kernel.h (grub_machine_fini): New prototype.
11114 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
11115 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
11117 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
11118 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
11119 * term/i386/pc/console.c (grub_console_fini): Likewise.
11121 * util/i386/pc/misc.c: New file.
11123 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11124 util/i386/pc/misc.c, commands/i386/pc/halt.c and
11125 commands/i386/pc/reboot.c.
11127 2005-02-14 Guillem Jover <guillem@hadrons.org>
11129 * include/grub/dl.h (grub_dl_check_header): New prototype.
11130 (grub_arch_dl_check_header): Change return type to grub_err_t,
11131 remove size parameter and export function. Update all callers.
11132 * kern/dl.c (grub_dl_check_header): New function.
11133 (grub_dl_load_core): Use `grub_dl_check_header' instead of
11134 `grub_arch_dl_check_header'. Check ELF type. Check if sections
11135 are inside the core.
11136 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
11137 independent ELF header checks.
11138 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11139 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
11140 `grub_dl_check_header' instead of explicit checks. Check for the
11142 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
11143 `grub_dl_check_header' instead of explicit checks. Remove arch
11144 specific ELF header checks.
11146 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
11149 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
11151 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
11152 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
11154 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
11156 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
11157 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
11158 (part_map_iterate): Clear `grub_errno' and return 0 if
11159 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
11160 * partmap/amiga.c (amiga_partition_map_iterate): Return
11161 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
11162 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11164 2005-02-01 Guillem Jover <guillem@hadrons.org>
11166 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
11169 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11171 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
11173 (grub_rescue_cmd_linux): New prototype.
11174 (grub_rescue_cmd_initrd): Likewise.
11175 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
11177 (grub_linux_release_mem): Release the memory for the initrd.
11178 (grub_load_linux): Renamed from this...
11179 (grub_rescue_cmd_linux): ...To this. Changed all callers.
11180 Changed `entry' not to be static. Loop over memory regions to
11181 find another one when the default fails.
11182 (grub_rescue_cmd_initrd): New function.
11183 (grub_linux_init): Remove function.
11184 (grub_linux_fini): Likewise.
11185 (GRUB_MOD_INIT): Register `initrd'.
11186 (GRUB_MOD_FINI): Unregister `initrd'.
11187 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
11189 (grub_linux_normal_fini): Likewise.
11190 (GRUB_MOD_INIT): Register `initrd'.
11191 (GRUB_MOD_FINI): Unregister `initrd'.
11193 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11195 * commands/help.c: New file.
11196 * normal/arg.c (show_help): Renamed to...
11197 (grub_arg_show_help): ... this.
11198 * commands/i386/pc/halt.c: New file.
11199 * commands/i386/pc/reboot.c: Likewise.
11200 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
11201 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
11202 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
11203 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
11205 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11207 (pkgdata_MODULES): Add `help.mod'.
11208 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
11209 * grub/i386/pc/init.h (grub_reboot): New prototype.
11210 (grub_halt): Likewise.
11211 * include/grub/normal.h (grub_arg_show_help): New prototype.
11212 (grub_help_init): Likewise.
11213 (grub_help_fini): Likewise.
11214 * util/grub-emu.c (main): Initialize and deinitialize the help
11217 * normal/cmdline.c (grub_cmdline_get): Doc fix.
11219 * normal/command.c (grub_command_init): Fixed the description of
11220 the `set' and `unset' commands.
11222 2005-01-31 Marco Gerards <metgerards@student.han.nl>
11224 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
11226 * commands/ieee1275/halt.c: New file.
11227 * commands/ieee1275/reboot.c: Likewise.
11228 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
11229 `__attribute__ ((unused))'. Some GCS related fixed.
11230 (grub_suspend_init) [GRUB_UTIL]: Function removed.
11231 (grub_suspend_fini): Likewise.
11232 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
11234 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
11235 (halt_mod_CFLAGS): New variables.
11236 * include/grub/powerpc/ieee1275/ieee1275.h
11237 (grub_ieee1275_interpret): New prototype.
11239 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
11241 * include/grub/misc.h (memmove): New prototype.
11242 (memcpy): Likewise.
11244 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
11246 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
11247 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
11249 2005-01-22 Marco Gerards <metgerards@student.han.nl>
11251 * kern/misc.c (grub_strndup): Function rewritten.
11253 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
11255 * normal/menu.c (TERM_WIDTH): Macro redefined.
11256 (TERM_TOP_BORDER_Y): Likewise.
11257 (draw_border): Replaced while-loop by a for-loop. Make the number
11258 of lines consistent with the number of lines displayed in
11259 print_entries. Added a margin below the rectangle.
11260 (print_entry): Make the entry fit in the rectangle.
11261 (print_entries): Display the scroll arrows next to the right
11264 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11266 * fs/minix.c (grub_minix_find_file): Reserve more space for
11267 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
11268 `grub_strncpy' to copy `path' into it.
11270 2005-01-21 Marco Gerards <metgerards@student.han.nl>
11272 Add the loopback device, a device via which files can be accessed
11275 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
11276 (pkgdata_MODULES): Add loopback.mod.
11277 (loopback_mod_SOURCES): New variable.
11278 (loopback_mod_CFLAGS): Likewise.
11279 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
11281 (pkgdata_MODULES): Add loopback.mod.
11282 (loopback_mod_SOURCES): New variable.
11283 (loopback_mod_CFLAGS): Likewise.
11284 * disk/loopback.c: new file.
11285 * include/grub/normal.h (grub_loop_init): New prototype.
11286 (grub_loop_fini): New prototype.
11287 * util/grub-emu.c (main): Initialize and de-initialize loopback
11289 * include/grub/disk.h (grub_disk_dev_id): Add
11290 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
11292 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
11294 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
11296 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
11297 (suspend_mod_SOURCES): New variable.
11298 (suspend_mod_CFLAGS): Likewise.
11299 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
11301 * commands/ieee1275/suspend.c: New file.
11303 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11305 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
11306 ((unused))' to `__attribute__ ((used))'.
11307 (GRUB_MOD_FINI): Likewise.
11308 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11309 * genmk.rb (PModule): Assign space to common symbols when linking
11312 2005-01-20 Marco Gerards <metgerards@student.han.nl>
11314 * include/grub/mm.h (grub_mm_init_region): Change the type of the
11315 `unsigned' arguments to `grub_size_t'.
11316 (grub_malloc): Likewise.
11317 (grub_realloc): Likewise.
11318 (grub_memalign): Likewise.
11319 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11320 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11321 * util/misc.c (grub_malloc): Likewise.
11322 (grub_realloc): Likewise.
11323 * kern/mm.c (get_header_from_pointer): Change the casts to
11324 `unsigned' into a cast to `grub_size_t'.
11326 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11327 point to `currnode' when `currnode' is changed.
11329 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
11330 Schottelius <nico-linux@schottelius.org>.
11332 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
11334 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11335 (note_path): Remove variable.
11336 (GRUB_IEEE1275_NOTE_NAME): New macro.
11337 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11338 (grub_ieee1275_note_hdr): New structure.
11339 (grub_ieee1275_note_desc): Likewise.
11340 (grub_ieee1275_note): Likewise.
11341 (load_note): Remove `dir' argument. All callers updated. Remove
11342 `note_img' and `path'. Do not load a file from `note_path'.
11343 Initialize a struct grub_ieee1275_note and write that to `out'.
11344 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11346 2005-01-05 Marco Gerards <metgerards@student.han.nl>
11348 * util/misc.c (grub_util_read_image): Revert last change. It
11349 called `grub_util_read_at', which seeks from the beginning of the
11352 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
11354 * TODO: Add note about endianness in grub-mkimage.
11355 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11357 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11358 (grub_mkimage_SOURCES): New target.
11359 * include/grub/kernel.h (grub_start_addr): Remove variable.
11360 (grub_end_addr): Likewise.
11361 (grub_total_module_size): Likewise.
11362 (grub_kernel_image_size): Likewise.
11363 (GRUB_MODULE_MAGIC): New constant.
11364 (grub_module_info): New structure.
11365 (grub_arch_modules_addr): New prototype.
11366 (grub_get_end_addr): Remove prototype.
11367 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11368 * include/grub/powerpc/ieee1275/kernel.h: New file.
11369 * include/grub/util/misc.h (grub_util_get_fp_size): New
11371 (grub_util_read_at): Likewise.
11372 (grub_util_write_image_at): Likewise.
11373 * kern/main.c (grub_get_end_addr): Remove function.
11374 (grub_load_modules): Call grub_arch_modules_addr instead of using
11375 grub_end_addr. Look for a grub_module_info struct in memory. Use
11376 the grub_module_info fields instead of calling grub_get_end_addr
11377 as loop conditions. Move grub_add_unused_region code here.
11378 (grub_add_unused_region): Remove function.
11379 * kern/i386/pc/init.c: Include grub/cache.h.
11380 (grub_machine_init): Remove call to grub_get_end_addr. Remove
11381 one call to add_mem_region.
11382 (grub_arch_modules_addr): New function.
11383 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11384 (grub_total_module_size): Likewise.
11385 Include grub/machine/kernel.h.
11386 (grub_arch_modules_addr): New function.
11387 * util/grub-emu.c (grub_end_addr): Remove variable.
11388 (grub_total_module_size): Likewise.
11389 (grub_arch_modules_addr): New function.
11390 * util/misc.c: Include unistd.h.
11391 (grub_util_get_fp_size): New function.
11392 (grub_util_read_at): Likewise.
11393 (grub_util_write_image_at): Likewise.
11394 (grub_util_read_image): Call grub_util_read_at.
11395 (grub_util_write_image): Call grub_util_write_image_at.
11396 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11397 additional memory in kernel_img for a struct grub_module_info.
11398 Fill in that grub_module_info.
11399 * util/powerpc/ieee1275/grub-mkimage.c: New file.
11401 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11403 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11405 * include/grub/powerpc/ieee1275/ieee1275.h
11406 (grub_ieee1275_milliseconds): New prototype.
11407 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11409 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11410 grub_ieee1275_milliseconds.
11412 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11414 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11416 (find_options): New function.
11417 (cmain): Call find_options.
11418 * include/grub/powerpc/ieee1275/ieee1275.h
11419 (grub_ieee1275_realmode): New extern variable.
11420 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11421 grub_map if grub_ieee1275_realmode is false.
11423 2004-12-29 Marco Gerards <metgerards@student.han.nl>
11425 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11426 lines are inserted and make it work like readline. Reported by
11427 Vincent Pelletier <subdino2004@yahoo.fr>.
11429 2004-12-28 Marco Gerards <metgerards@student.han.nl>
11431 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11433 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11434 `kern/powerpc/cache.S'.
11436 2004-12-27 Marco Gerards <metgerards@student.han.nl>
11438 * genmk.rb: Handle the `Program' class in the main loop. Written
11439 by Johan Rydberg <jrydberg@gnu.org>.
11440 (Program): New class.
11441 (programs): New variable.
11442 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11443 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
11444 instead of "grub/kernel.h". Include <grub/machine/init.h>.
11445 (help_arch): Function removed.
11446 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11447 `powerpc/libgcc.h' and `loader.h'.
11448 (pkgdata_PROGRAMS): New variable.
11449 (sbin_UTILITIES): Variable removed.
11450 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11451 (grubof_SOURCES): Variable re-defined so it only includes the
11452 core functionality.
11453 (grubof_CFLAGS): Remove `-DGRUBOF'.
11454 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11455 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11456 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11457 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11458 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11459 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11460 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11461 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11462 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11463 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11464 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11465 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11466 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11467 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11468 (pc_mod_CFLAGS): New variables.
11469 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11470 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11471 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11472 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11474 * include/grub/i386/pc/init.h (grub_os_area_addr)
11475 (rub_os_area_size): ... to here.
11476 * include/grub/powerpc/ieee1275/ieee1275.h
11477 (grub_ieee1275_entry_fn): Export symbol.
11478 * include/grub/powerpc/ieee1275/init.h: New file.
11479 * include/grub/powerpc/libgcc.h: Likewise.
11480 * include/grub/cache.h: Likewise.
11481 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
11482 <hollis@penguinppc.org>.
11483 * kern/dl.c: Include <grub/cache.h>.
11484 (grub_dl_flush_cache): New function.
11485 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11487 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11488 (grub_console_init): Removed prototypes.
11489 (grub_machine_init): Don't initialize the modules anymore.
11490 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11492 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11493 Macro undef removed.
11494 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11495 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11496 relocation `R_PPC_REL32'. Return an error when the relocation is
11498 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11499 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11500 * util/misc.c (grub_arch_sync_caches): Likewise.
11502 2004-12-19 Marco Gerards <metgerards@student.han.nl>
11504 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
11505 `symlist.c', add `grubof_symlist.c'.
11506 (symlist.c): Variable removed.
11507 (grubof_HEADERS): Variable added.
11508 (grubof_symlist.c): New target.
11509 (kernel_syms.lst): Use `grubof_HEADERS' instead of
11510 `kernel_img_HEADERS'.
11511 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
11512 * kern/powerpc/dl.c: New file.
11513 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
11515 (grub_arch_dl_relocate_symbols): Likewise.
11516 (grub_register_exported_symbols): Likewise.
11518 2004-12-13 Marco Gerards <metgerards@student.han.nl>
11520 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
11521 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
11522 to fail instead. Reported by Vincent Pelletier
11523 <subdino2004@yahoo.fr>.
11525 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
11526 it is not allocated. Reported by Vincent Pelletier
11527 <subdino2004@yahoo.fr>.
11529 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
11530 output so the output looks better.
11532 2004-12-04 Marco Gerards <metgerards@student.han.nl>
11534 Modulize the partition map support and add support for the amiga
11537 * commands/ls.c: Include <grub/partition.h> instead of
11538 <grub/machine/partition.h>.
11539 * kern/disk.c: Likewise.
11540 * kern/rescue.c: Likewise.
11541 * loader/i386/pc/chainloader.c: Likewise.
11542 * normal/cmdline.c: Likewise.
11543 * kern/powerpc/ieee1275/init.c: Likewise.
11544 (grub_machine_init): Call `grub_pc_partition_map_init',
11545 `grub_amiga_partition_map_init' and
11546 `grub_apple_partition_map_init'.
11547 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
11548 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
11549 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
11550 `partition.h' and `pc_partition.h'.
11551 (grub_setup_SOURCES): Remove
11552 `disk/i386/pc/partition.c'. Add `kern/partition.c',
11553 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11554 (grub_emu_SOURCES): Likewise.
11555 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
11556 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
11557 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
11558 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11559 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
11560 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11561 (grubof_SOURCES): Likewise.
11562 * disk/i386/pc/partition.c: File removed.
11563 * disk/powerpc/ieee1275/partition.c: Likewise.
11564 * include/grub/powerpc/ieee1275/partition.h: Likewise.
11565 * include/grub/i386/pc/partition.h: Likewise.
11566 * kern/partition.c: New file.
11567 * partmap/amiga.c: Likewise.
11568 * partmap/apple.c: Likewise.
11569 * partmap/pc.c: Likewise.
11570 * include/grub/partition.h: Likewise..
11571 * include/grub/pc_partition.h: Likewise.
11572 * util/grub-emu.c: Include <grub/partition.h> instead of
11573 <grub/machine/partition.h>.
11574 (main): Call `grub_pc_partition_map_init',
11575 `grub_amiga_partition_map_init' and
11576 `grub_apple_partition_map_init' and deinitialize afterwards.
11577 * util/i386/pc/biosdisk.c: Include `#include
11578 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11579 `<grub/machine/partition.h>'.
11580 * util/i386/pc/grub-setup.c: Likewise.
11581 * util/i386/pc/biosdisk.c: Likewise.
11582 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
11583 partition information in case of a PC partition.
11584 * util/i386/pc/grub-setup.c: Include `#include
11585 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11586 `<grub/machine/partition.h>'.
11587 (setup): Only access the PC specific partition information in case
11590 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
11592 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
11593 (grub_longjmp): Likewise.
11594 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
11596 * normal/powerpc/setjmp.S: New file.
11597 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11598 `normal/powerpc/setjmp.S'.
11599 (grubof_CFLAGS): Add `-DGRUBOF'.
11600 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
11601 [GRUB_UTIL && !GRUBOF].
11603 2004-11-16 Marco Gerards <metgerards@student.han.nl>
11605 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
11606 property named `name'. Correctly handle the error returned by
11607 `grub_ieee1275_finddevice' if a device can not be opened.
11609 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
11611 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
11612 `actual' for negativity.
11613 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11616 2004-11-01 Marco Gerards <metgerards@student.han.nl>
11618 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
11619 (PAGE_OFFSET): New macro.
11620 (CRTC_ADDR_PORT): Likewise.
11621 (CRTC_DATA_PORT): Likewise.
11622 (START_ADDR_HIGH_REGISTER): Likewise.
11623 (START_ADDR_LOW_REGISTER): Likewise.
11624 (GRAPHICS_ADDR_PORT): Likewise.
11625 (GRAPHICS_DATA_PORT): Likewise.
11626 (READ_MAP_REGISTER): Likewise.
11627 (INPUT_STATUS1_REGISTER): Likewise.
11628 (INPUT_STATUS1_VERTR_BIT): Likewise.
11629 (page): New variable.
11630 (wait_vretrace): New function.
11631 (set_read_map): Likewise.
11632 (set_start_address): Likewise.
11633 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
11635 (check_vga_mem): Take the page into account.
11636 (write_char): Likewise.
11637 (write_cursor): Likewise.
11638 (scroll_up): Likewise. Copy the page to the page that is not
11639 shown and switch between both pages.
11640 (grub_vga_putchar): Fix off by one error.
11641 (grub_vga_cls): Wait for the vertical retrace. Take the page into
11644 2004-11-01 Marco Gerards <metgerards@student.han.nl>
11646 Add support for iso9660 (including rockridge).
11648 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11649 (iso9660_mod_SOURCES): New variable.
11650 (iso9660_mod_CFLAGS): Likewise.
11651 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11652 * include/grub/fs.h (grub_iso9660_init): New prototype.
11653 * util/grub-emu.c (main): Call `grub_iso9660_init'.
11654 * fs/iso9660.c: New file.
11656 * include/grub/misc.h (grub_strncat): New prototype.
11657 * kern/misc.c (grub_strncat): New function.
11659 * fs/hfs.c (grub_hfs_mount): Translate the error
11660 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
11661 * fs/jfs.c (grub_jfs_mount): Likewise.
11662 * fs/ufs.c (grub_ufs_mount): Likewise.
11664 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
11666 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
11667 which initialized BAT registers.
11668 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
11669 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11671 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
11672 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11674 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
11675 (grub_mapclaim): Likewise.
11676 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
11677 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
11680 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
11682 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
11683 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
11684 -ffreestanding and -msoft-float.
11686 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
11688 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
11689 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
11690 set in grub_ieee1275_flags.
11692 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
11694 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
11696 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
11697 grub_console_init first.
11698 Change the memory range used for grub_ieee1275_claim and
11699 grub_mm_init_region.
11700 Print an error message if the claim fails.
11701 Include <grub/misc.h>.
11703 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
11705 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
11706 Call grub_children_iterate for device nodes of type `scsi',
11708 (grub_ofdisk_open): Remove manual device alias resolution.
11709 Fix memory leak when device cannot be opened.
11710 * include/grub/powerpc/ieee1275/ieee1275.h
11711 (grub_children_iterate): New prototype.
11712 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
11714 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11715 Return -1 if args.size was -1.
11717 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11719 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
11720 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
11721 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
11722 Open Firmware's memory for it; claim memory from _start to _end.
11723 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
11724 (_end): New extern.
11725 (_start): Zero BSS from __bss_start to _end.
11726 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11728 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
11730 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11732 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
11733 -1 if args.base was -1.
11735 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
11737 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
11738 escape sequence instead of a literal ^L. Also call
11739 grub_ofconsole_gotoxy.
11741 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
11743 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
11744 void * arguments to grub_addr_t. All callers updated. Also make
11745 the `result' argument optional.
11746 (grub_ieee1275_release): change void * arguments to grub_addr_t.
11747 All callers updated.
11749 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
11751 * commands/ls.c (grub_ls_list_files): Use the string following the
11752 initial ')', if present, as the filesystem path.
11753 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
11755 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
11757 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
11759 Make the source code of the menu interface more readable.
11761 * normal/menu.c: Include grub/mm.h.
11762 (TERM_WIDTH): New macro.
11763 (TERM_HEIGHT): Likewise.
11764 (TERM_INFO_HEIGHT): Likewise.
11765 (TERM_MARGIN): Likewise.
11766 (TERM_SCROLL_WIDTH): Likewise.
11767 (TERM_TOP_BORDER_Y): Likewise.
11768 (TERM_LEFT_BORDER_X): Likewise.
11769 (TERM_BORDER_WIDTH): Likewise.
11770 (TERM_MESSAGE_HEIGHT): Likewise.
11771 (TERM_BORDER_HEIGHT): Likewise.
11772 (TERM_NUM_ENTRIES): Likewise.
11773 (TERM_FIRST_ENTRY_Y): Likewise.
11774 (TERM_ENTRY_WIDTH): Likewise.
11775 (TERM_CURSOR_X): Likewise.
11776 (draw_border): Use macros instead of magic numbers.
11777 (print_entry): Likewise.
11778 (print_entries): Likewise.
11779 (run_menu): Likewise. Also, handle the key 'e'.
11780 (run_menu_entry): Ignore empty command lines.
11781 (print_message): Added a new argument EDIT. If EDIT is true,
11782 print a different message.
11783 (init_page): Likewise.
11784 (edit_menu_entry): New function. Not implemented yet.
11786 2004-09-17 Marco Gerards <metgerards@student.han.nl>
11788 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
11789 can be loaded from normal mode.
11791 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
11793 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
11794 (multiboot_mod_CFLAGS): New variables.
11795 * loader/i386/pc/linux_normal.c: New file.
11796 * loader/i386/pc/multiboot_normal.c: Likewise.
11798 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
11799 attribute `unused'.
11801 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
11802 `fdiro' to read the mode information from instead of `diro'.
11804 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
11805 looking up a symlink.
11807 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
11809 * normal/command.c (grub_command_execute): Don't parse the
11810 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
11811 flags of the command.
11813 * normal/menu.c (grub_menu_run): Fix typo.
11815 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
11817 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
11819 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
11820 `y + 1' instead of `y - 1'.
11822 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
11824 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
11826 From Hollis Blanchard <hollis@penguinppc.org>:
11827 * kern/misc.c (memmove): New alias for grub_memmove.
11828 (memcmp): New alias for grub_memcmp.
11829 (memset): New alias for grub_memset.
11830 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11831 Change "int handle" to "grub_ieee1275_phandle_t handle".
11832 * include/grub/powerpc/ieee1275/ieee1275.h
11833 (grub_ieee1275_get_property): Likewise.
11835 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
11837 Added normal mode command `chainloader' as module chain.mod, which
11838 depends on normal.mod and _chain.mod.
11840 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
11841 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
11842 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
11844 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
11845 but arguments parsing moved to ...
11846 (grub_chainloader_cmd): ... here. New function.
11847 * include/grub/i386/pc/chainloader.h: New file.
11848 * loader/i386/pc/chainloader_normal.c: Likewise.
11850 2004-09-11 Marco Gerards <metgerards@student.han.nl>
11852 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
11853 (grub_mkimage_LDFLAGS): Likewise.
11854 (grub_emu_SOURCES): Likewise.
11855 (kernel_img_HEADERS): Added fshelp.h.
11856 * fs/ext2.c: Include <grub/fshelp.h>.
11857 (FILETYPE_REG): New macro.
11858 (FILETYPE_INO_REG): Likewise.
11859 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
11861 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
11863 (grub_fshelp_node): New struct.
11864 (grub_ext2_data): Added member `diropen'. Changed member `inode'
11866 (grub_ext2_get_file_block): Removed function.
11867 (grub_ext2_read_block): New function.
11868 (grub_ext2_read_file): Replaced parameter `data' by `node'.
11869 This function was written.
11870 (grub_ext2_mount): Read the root inode. Create a diropen struct.
11871 (grub_ext2_find_file): Removed function.
11872 (grub_ext2_read_symlink): New function.
11873 (grub_ext2_iterate_dir): Likewise.
11874 (grub_ext2_open): Rewritten.
11875 (grub_ext2_dir): Rewritten.
11876 * include/grub/fshelp.h: New file.
11877 * fs/fshelp.c: Likewise.
11879 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
11881 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
11882 (print_message): Add a missing newline.
11883 (run_menu): Added timeout support.
11884 (run_menu_entry): New local function.
11885 (grub_menu_run): Added support for booting.
11887 * kern/loader.c (grub_loader_is_loaded): New function.
11889 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
11890 (grub_get_rtc): Exported.
11892 * include/grub/i386/pc/time.h: Include grub/symbol.h.
11893 (grub_get_rtc): Exported.
11895 * include/grub/normal.h (struct grub_command_list): Remove
11896 constant from the member `command'.
11898 * include/grub/loader.h (grub_loader_is_loaded): Declared.
11900 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
11902 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
11904 2004-08-28 Marco Gerards <metgerards@student.han.nl>
11906 Add support for the JFS filesystem.
11908 * fs/jfs.c: New file.
11909 * include/grub/fs.h (grub_jfs_init): New prototype.
11910 (grub_jfs_fini): New prototype.
11911 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
11912 (grub_emu_SOURCES): Likewise.
11913 (pkgdata_MODULES): Add jfs.mod.
11914 (jfs_mod_SOURCES): New variable.
11915 (jfs_mod_CFLAGS): Likewise.
11916 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
11917 (grubof_SOURCES): Likewise.
11918 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
11920 * fs/fat.c (grub_fat_find_dir): Convert the filename little
11921 endian to the host endian.
11922 (grub_fat_utf16_to_utf8): Move function from there...
11923 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
11924 the endianness of the source string anymore.
11925 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
11927 2004-08-24 Marco Gerards <metgerards@student.han.nl>
11929 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
11930 (grub_boot_fini) [GRUB_UTIL]: Likewise.
11931 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
11932 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
11934 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
11935 (grub_hfs_iterate_dir): Make the function static. Add prototypes
11936 for `node_found' and `it_dir'.
11937 (grub_hfs_dir): Add prototype for `dir_hook'.
11939 * fs/minix.c (grub_minix_get_file_block): Add prototype for
11940 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
11941 and `indir32' to silence a gcc warning.
11943 * include/grub/fs.h (grub_hfs_init): New prototype.
11944 (grub_hfs_fini): Likewise.
11947 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
11949 Each disk device has its own id now. This is useful to make use
11950 of multiple disk devices.
11952 * include/grub/disk.h (grub_disk_dev_id): New enum.
11953 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
11954 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
11956 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
11957 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11959 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
11960 GRUB_DISK_DEVICE_OFDISK_ID as an id.
11962 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
11963 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11965 * include/grub/disk.h (struct grub_disk_dev): Added a new member
11966 "id" which is used by the cache manager.
11968 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
11971 2004-08-18 Marco Gerards <metgerards@student.han.nl>
11973 * fs/hfs.c: New file.
11974 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
11975 (grub_emu_SOURCES): Likewise.
11976 (pkgdata_MODULES): Add hfs.mod.
11977 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
11978 (grubof_SOURCES): Likewise.
11979 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
11981 * include/grub/misc.h (grub_strncasecmp): Add prototype.
11982 * kern/misc.c (grub_strncasecmp): Add function.
11984 2004-08-14 Marco Gerards <metgerards@student.han.nl>
11986 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
11989 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
11990 (grub_ext2_dir): In case the directory entry type is unknown, read
11993 2004-08-02 Peter Bruin <pjbruin@dds.nl>
11995 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
11996 grub_load_linux instead of grub_rescue_cmd_linux as second
11997 argument of grub_rescue_register_command.
11999 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
12001 2004-07-27 Marco Gerards <metgerards@student.han.nl>
12003 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
12005 * commands/boot.c: Remove the check for `GRUB_UTIL'.
12006 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
12007 `loader/powerpc/ieee1275/linux.c',
12008 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
12009 * include/grub/powerpc/ieee1275/ieee1275.h
12010 (grub_ieee1275_release): New prototype.
12011 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
12012 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
12013 normal, boot, linux and linux_normal.
12014 * loader/powerpc/ieee1275/linux.c: New file.
12015 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
12017 2004-07-12 Marco Gerards <metgerards@student.han.nl>
12019 * normal/arg.c (grub_arg_parse): Correct error handling after
12020 reallocating the argumentlist (check if `argl' is not null instead
12021 of checking if `args' is not null).
12022 * kern/mm.c (grub_realloc): Return the same pointer when using the
12023 same region, instead of returning the header address.
12025 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12027 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
12028 one block instead of two when looking for the initial partition.
12029 (grub_partition_probe): Initialize the local variable `p' with 0.
12030 Use base 10 for the grub_strtoul call.
12031 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
12032 need for one local variable.
12033 (grub_strtoul): Don't add the new value to `num', instead of that
12036 2004-07-11 Marco Gerards <metgerards@student.han.nl>
12038 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
12039 (pxeboot_img_SOURCES): New variable.
12040 (pxeboot_img_ASFLAGS): Likewise.
12041 (pxeboot_img_LDFLAGS): Likewise.
12042 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
12043 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
12044 <lode_leroy@hotmail.com>.
12046 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12048 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
12049 there was no input.
12051 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12053 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
12054 the history buffer logic.
12056 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
12058 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
12059 (FILETYPE_INO_SYMLINK): New macros.
12060 (grub_ext2_find_file): Check if the node is a directory using the
12061 inode stat information instead of using the filetype in the
12062 dirent. Exclude the first character of an absolute symlink.
12063 (grub_ext2_dir): Mask out the filetype part of the mode member of
12066 2004-05-24 Marco Gerards <metgerards@student.han.nl>
12068 Add support for UFS version 1 and 2. Add support for the minix
12069 filesystem version 1 and 2, both the variants with 14 and 30 long
12072 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
12074 (grub_emu_SOURCES): Likewise.
12075 (pkgdata_MODULES): Add ufs.mod and minix.mod.
12076 (ufs_mod_SOURCES): New variable.
12077 (ufs_mod_CFLAGS): Likewise.
12078 (minix_mod_SOURCES): Likewise.
12079 (minix_mod_CFLAGS): Likewise.
12080 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
12082 (grubof_SOURCES): Likewise.
12083 * fs/ufs.c: New file.
12084 * fs/minix.c: New file.
12085 * include/grub/fs.h (grub_ufs_init): New prototype.
12086 (grub_ufs_fini): Likewise.
12087 (grub_minix_init): Likewise.
12088 (grub_minix_fini): Likewise.
12089 * util/grub-emu.c (main): Initialize and deinitialize UFS and
12092 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
12094 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
12095 commands/ls.c, commands/terminal.c, commands/boot.c,
12096 commands/cmp.c and commands/cat.c.
12097 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
12099 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
12102 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12104 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
12105 and grub_, respectively. Because the conversion is trivial and
12106 mechanical, I omit the details here. Please refer to the CVS
12107 if you need more information.
12109 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
12111 * include/pupa: Renamed to ...
12112 * include/grub: ... this.
12113 * util/i386/pc/pupa-mkimage.c: Renamed to ...
12114 * util/i386/pc/grub-mkimage.c: ... this.
12115 * util/i386/pc/pupa-setup.c: Renamed to ...
12116 * util/i386/pc/grub-setup.c: ... this.
12117 * util/pupa-emu.c: Renamed to ...
12118 * util/grub-emu.c: ... this.
12120 2004-03-29 Marco Gerards <metgerards@student.han.nl>
12122 Add support for the newworld apple macintosh (PPC). This has been
12123 tested on the powerbook 2000 only. It only adds support for
12124 generic ieee1275 functions, console and disk support. This should
12125 be easy to port to other architectures with support for Open
12128 * configure.ac: Accept the powerpc as host_cpu. In the case of
12129 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
12130 specific tests are only executed while building for the i386.
12131 Inverse test for crosscompile.
12132 * genmk.rb (Utility): Allow assembler files.
12133 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
12134 * conf/powerpc-ieee1275.rmk: New file.
12135 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
12136 * disk/powerpc/ieee1275/partition.c: Likewise.
12137 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
12138 * include/pupa/powerpc/ieee1275/console.h: Likewise.
12139 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
12140 * include/pupa/powerpc/ieee1275/time.h: Likewise.
12141 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
12142 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
12143 * include/pupa/powerpc/ieee1275/loader.h
12144 * include/pupa/powerpc/setjmp.h: Likewise.
12145 * include/pupa/powerpc/types.h: Likewise.
12146 * kern/powerpc/ieee1275/init.c: Likewise.
12147 * kern/powerpc/ieee1275/openfw.c: Likewise.
12148 * term/powerpc/ieee1275/ofconsole.c: Likewise.
12150 These files were written by Johan Rydberg
12151 (jrydberg@night.trouble.net) and I only modified them slightly.
12153 * boot/powerpc/ieee1275/cmain.c: New file.
12154 * boot/powerpc/ieee1275/crt0.S: Likewise.
12155 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
12156 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
12158 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
12160 * Makefile.in: Update copyright.
12161 * genmodsrc.sh: Likewise.
12162 * gensymlist.sh: Likewise.
12163 * term/i386/pc/vga.c: Indent correctly.
12165 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
12166 bugreporting address.
12167 * util/i386/pc/pupa-setup.c (usage): Likewise,
12168 (main): Call pupa_ext2_init and pupa_ext2_fini.
12170 * fs/fat.c (log2): Renamed to ...
12171 (fat_log2): ... this.
12172 All callers changed.
12173 * kern/misc.c (memcpy): Alias to pupa_memmove.
12174 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
12176 * util/console.c (pupa_ncurses_fini): Return 0.
12178 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
12179 Move fail label here.
12180 [__GNU__]: Don't warn when using stat.
12181 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
12182 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
12183 long int. Use strtol instead of strtoul.
12185 2004-03-14 Marco Gerards <metgerards@student.han.nl>
12187 * commands/boot.c: New file.
12188 * commands/cat.c: Likewise.
12189 * commands/cmp.c: Likewise.
12190 * commands/ls.c: Likewise.
12191 * commands/terminal.c: Likewise.
12192 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
12193 (pupa_register_command): Changed interface to match the new
12195 (pupa_command_execute): Changed (almost rewritten) so it uses
12196 pupa_split_command. Added support for setting variables using the
12198 (rescue_command): Changed to work with the new argument parser.
12199 (terminal_command): Moved from here to commands/terminal.c.
12200 (set_command): New function.
12201 (unset_command): New function.
12202 (insmod_command): New function.
12203 (rmmod_command): New function.
12204 (lsmod_command): New function.
12205 (pupa_command_init): Don't initialize the command terminal
12206 anymore. Initialize the commands set, unset, insmod, rmmod and
12208 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
12209 (kernel_img_HEADERS): Add arg.h and env.h.
12210 (pupa_mkimage_LDFLAGS): Add kern/env.c.
12211 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
12212 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
12214 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
12216 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
12217 (boot_mod_SOURCES): New variable.
12218 (terminal_mod_SOURCES): Likewise.
12219 (ls_mod_SOURCES): Likewise.
12220 (cmp_mod_SOURCES): Likewise.
12221 (cat_mod_SOURCES): Likewise.
12223 * normal/arg.c: New file.
12224 * kern/env.c: Likewise.
12225 * include/pupa/arg.h: Likewise.
12226 * include/pupa/env.h: Likewise.
12227 * font/manager.c (font_command): Changed to match argument parsing
12229 (PUPA_MOD_INIT): Likewise.
12230 * hello/hello.c (pupa_cmd_hello): Likewise.
12231 (PUPA_MOD_INIT): Likewise.
12232 * include/pupa/disk.h: Include <pupa/device.h>.
12233 (pupa_print_partinfo): New prototype.
12234 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
12235 (pupa_dl_get_prefix): Likewise.
12236 * include/pupa/misc.h: Include <pupa/err.h>.
12237 (pupa_isgraph): New prototype.
12238 (pupa_isdigit): Likewise.
12239 (pupa_split_cmdline): Likewise.
12240 * include/pupa/normal.h: Include <pupa/arg.h>.
12241 (pupa_command): Changed the prototype of the member `func' to
12242 match the argument parsing interface. Added member `options'.
12243 (pupa_register_command): Updated to match function.
12244 (pupa_arg_parse): New prototype.
12245 (pupa_hello_init) [PUPA_UTIL]: New prototype.
12246 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
12247 (pupa_ls_init) [PUPA_UTIL]: Likewise.
12248 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
12249 (pupa_cat_init) [PUPA_UTIL]: Likewise.
12250 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
12251 (pupa_boot_init) [PUPA_UTIL]: Likewise.
12252 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
12253 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
12254 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
12255 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
12256 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
12257 * kern/disk.c: Include <pupa/file.h>.
12258 (pupa_print_partinfo): New function.
12259 * kern/dl.c: Include <pupa/env.h>.
12260 (pupa_dl_dir): Variable removed.
12261 (pupa_dl_load): Use the environment variable `prefix' instead of
12262 the variable pupa_dl_dir.
12263 (pupa_dl_set_prefix): Function removed.
12264 (pupa_dl_get_prefix): Likewise.
12265 * kern/i386/pc/init.c: Include <pupa/env.h>.
12266 (pupa_machine_init): Use the environment variable `prefix' instead of
12267 using pupa_dl_set_prefix to set the prefix.
12268 * kern/main.c: Include <pupa/env.h>.
12269 (pupa_set_root_dev): Use the environment variable `prefix' instead of
12270 using pupa_dl_get_prefix to get the prefix.
12271 * kern/misc.c: Include <pupa/env.h>.
12272 (pupa_isdigit): New function.
12273 (pupa_isgraph): Likewise.
12274 (pupa_ftoa): Likewise.
12275 (pupa_vsprintf): Added support for printing values of the type
12276 `double'. Make it possible to format variable output when using
12277 formatting like `%1.2%f'.
12278 (pupa_split_cmdline): New function.
12279 * kern/rescue.c: Include <pupa/env.h>.
12280 (next_word): Removed function.
12281 (pupa_rescue_cmd_prefix): Likewise.
12282 (pupa_rescue_cmd_set): New function.
12283 (pupa_rescue_cmd_unset): New function.
12284 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
12285 split the command line instead of splitting it here. Added
12286 support for setting variables using the syntax `foo=bar'. Don't
12287 initialize the prefix command anymore. Initialized the set and
12289 * normal/cmdline.c: Include <pupa/env.h>.
12290 (pupa_tab_complete): Added prototypes for print_simple_completion,
12291 print_partition_completion, add_completion, iterate_commands,
12292 iterate_dev, iterate_part and iterate_dir. Moved code to print
12293 partition information from here to kern/disk.c.
12294 (pupa_cmdline_run): Don't check if the function exists anymore.
12295 * normal/main.c: Include <pupa/env.h>.
12296 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
12297 instead of using pupa_dl_get_prefix to get the prefix.
12298 * term/i386/pc/vga.c: Include <pupa/arg.h>.
12299 (check_vga_mem): Cast pointers to `void *' to silence a gcc
12301 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
12302 (pupa_vga_setcolor): Declare unused variables with `__attribute__
12303 ((unused))' to silence a gcc warning.
12304 (pupa_vga_setcolor): Likewise.
12305 (debug_command): Changed to match argument parsing
12307 * util/pupa-emu.c: Include <pupa/env.h>.
12308 (options): Added 0's for unused fields to silence a gcc warning.
12310 (main): Use the environment variable `prefix' instead of using
12311 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
12312 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
12315 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12316 * util/misc.c: Include <malloc.h>.
12317 (pupa_malloc): Rewritten so errors are correctly reported.
12318 (pupa_realloc): Likewise.
12319 (pupa_memalign): Likewise.
12320 (pupa_mm_init_region): Declare unused variables with
12321 `__attribute__ ((unused))' to silence a gcc warning.
12322 * normal/i386/setjmp.S: Remove tab at the end of the file to
12323 silence a gcc warning.
12324 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12325 variables with `__attribute__ ((unused))' to silence a gcc
12327 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12328 local variable i unsigned to silence a gcc warning.
12330 * kern/term.c: Include <pupa/misc.h>.
12331 (pupa_more_lines): New variable.
12332 (pupa_more): Likewise.
12333 (pupa_putcode): When the pager is active pause at the end of every
12335 (pupa_set_more): New function.
12336 * include/pupa/term.h (pupa_set_more): New prototype.
12339 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
12341 Now this project is GRUB 2 rather than PUPA. The location of
12342 the CVS repository was moved to GRUB's.
12344 * configure.ac: Use bug-grub as the reporting address.
12345 Use GRUB instead of PUPA.
12346 Change the version number to 1.90.
12348 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
12350 * genkernsyms.sh: Updated copyright information.
12351 * genmk.rb: Likewise.
12352 * genmodsrc.sh: Likewise.
12353 * gensymlist.sh: Likewise.
12354 * boot/i386/pc/boot.S: Likewise.
12355 * boot/i386/pc/diskboot.S: Likewise.
12356 * disk/i386/pc/biosdisk.c: Likewise.
12357 * disk/i386/pc/partition.c: Likewise.
12358 * font/manager.c: Likewise.
12359 * fs/ext2.c: Likewise.
12360 * fs/fat.c: Likewise.
12361 * include/pupa/boot.h: Likewise.
12362 * include/pupa/device.h: Likewise.
12363 * include/pupa/disk.h: Likewise.
12364 * include/pupa/dl.h: Likewise.
12365 * include/pupa/elf.h: Likewise.
12366 * include/pupa/err.h: Likewise.
12367 * include/pupa/file.h: Likewise.
12368 * include/pupa/font.h: Likewise.
12369 * include/pupa/fs.h: Likewise.
12370 * include/pupa/kernel.h: Likewise.
12371 * include/pupa/loader.h: Likewise.
12372 * include/pupa/misc.h: Likewise.
12373 * include/pupa/mm.h: Likewise.
12374 * include/pupa/net.h: Likewise.
12375 * include/pupa/normal.h: Likewise.
12376 * include/pupa/rescue.h: Likewise.
12377 * include/pupa/setjmp.h: Likewise.
12378 * include/pupa/symbol.h: Likewise.
12379 * include/pupa/term.h: Likewise.
12380 * include/pupa/types.h: Likewise.
12381 * include/pupa/i386/setjmp.h: Likewise.
12382 * include/pupa/i386/types.h: Likewise.
12383 * include/pupa/i386/pc/biosdisk.h: Likewise.
12384 * include/pupa/i386/pc/boot.h: Likewise.
12385 * include/pupa/i386/pc/console.h: Likewise.
12386 * include/pupa/i386/pc/init.h: Likewise.
12387 * include/pupa/i386/pc/kernel.h: Likewise.
12388 * include/pupa/i386/pc/linux.h: Likewise.
12389 * include/pupa/i386/pc/loader.h: Likewise.
12390 * include/pupa/i386/pc/memory.h: Likewise.
12391 * include/pupa/i386/pc/multiboot.h: Likewise.
12392 * include/pupa/i386/pc/partition.h: Likewise.
12393 * include/pupa/i386/pc/time.h: Likewise.
12394 * include/pupa/i386/pc/vga.h: Likewise.
12395 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12396 * include/pupa/util/getroot.h: Likewise.
12397 * include/pupa/util/misc.h: Likewise.
12398 * include/pupa/util/resolve.h: Likewise.
12399 * kern/device.c: Likewise.
12400 * kern/disk.c: Likewise.
12401 * kern/dl.c: Likewise.
12402 * kern/err.c: Likewise.
12403 * kern/file.c: Likewise.
12404 * kern/fs.c: Likewise.
12405 * kern/loader.c: Likewise.
12406 * kern/main.c: Likewise.
12407 * kern/misc.c: Likewise.
12408 * kern/mm.c: Likewise.
12409 * kern/rescue.c: Likewise.
12410 * kern/term.c: Likewise.
12411 * kern/i386/dl.c: Likewise.
12412 * kern/i386/pc/init.c: Likewise.
12413 * kern/i386/pc/lzo1x.S: Likewise.
12414 * kern/i386/pc/startup.S: Likewise.
12415 * loader/i386/pc/chainloader.c: Likewise.
12416 * loader/i386/pc/linux.c: Likewise.
12417 * loader/i386/pc/multiboot.c: Likewise.
12418 * normal/cmdline.c: Likewise.
12419 * normal/command.c: Likewise.
12420 * normal/main.c: Likewise.
12421 * normal/menu.c: Likewise.
12422 * normal/i386/setjmp.S: Likewise.
12423 * term/i386/pc/console.c: Likewise.
12424 * term/i386/pc/vga.c: Likewise.
12425 * util/console.c: Likewise.
12426 * util/genmoddep.c: Likewise.
12427 * util/misc.c: Likewise.
12428 * util/pupa-emu.c: Likewise.
12429 * util/resolve.c: Likewise.
12430 * util/unifont2pff.rb: Likewise.
12431 * util/i386/pc/biosdisk.c: Likewise.
12432 * util/i386/pc/getroot.c: Likewise.
12433 * util/i386/pc/pupa-mkimage.c: Likewise.
12434 * util/i386/pc/pupa-setup.c: Likewise.
12436 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
12438 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12439 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
12440 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
12441 reading and reset it after reading.
12442 (pupa_ext2_close): Return PUPA_ERR_NONE.
12444 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12446 (struct linux_kernel_header): Add kernel_version and
12448 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12449 pupa_file_read succeeds.
12450 (pupa_rescue_cmd_initrd): Implement.
12452 2003-12-03 Marco Gerards <metgerards@student.han.nl>
12454 * fs/ext2.c (pupa_ext2_label): New function.
12455 (pupa_ext2_fs): Added label.
12456 * fs/fat.c (pupa_fat_label): New function.
12457 (pupa_fat_fs): Added label.
12458 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12460 * kern/misc.c (pupa_strndup): New function.
12461 * include/pupa/misc.h (pupa_strndup): New prototype.
12463 * include/pupa/normal.h: Include <pupa/err.h>.
12464 (pupa_set_history): New prototype.
12465 (pupa_iterate_commands): New prototype.
12466 * normal/cmdline.c: Include <pupa/machine/partition.h>,
12467 <pupa/disk.h>, <pupa/file.h>.
12468 (hist_size): New variable.
12469 (hist_lines): Likewise.
12470 (hist_end): Likewise.
12471 (hist_used): Likewise.
12472 (pupa_set_history): New function.
12473 (pupa_history_get): Likewise.
12474 (pupa_history_add): Likewise.
12475 (pupa_history_replace): Likewise.
12476 (pupa_tab_complete): Likewise.
12477 (pupa_cmdline_run): Added tab completion and history buffer. Tab
12478 completion shows partitionnames while completing partitions, this
12479 feature was suggested by Jeff Bailey.
12480 * normal/command.c (pupa_iterate_commands): New function.
12481 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12482 (pupa_normal_init): Initialize history buffer.
12483 (PUPA_MOD_INIT): Likewise.
12484 (pupa_normal_fini): Free the history buffer.
12485 (PUPA_MOD_FINI): Likewise.
12487 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12490 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12491 * configure.ac [i386]: Check for regparam bug.
12492 (NESTED_FUNC_ATTR) [! i386]: Defined.
12494 2003-11-17 Marco Gerards <metgerards@student.han.nl>
12496 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12497 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12498 (pupa_emu_SOURCES): New variable.
12499 (pupa_emu_LDFLAGS): Likewise.
12500 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12501 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12502 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12503 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12504 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
12505 (pupa_jmp_buf): New typedef.
12506 (pupa_setjmp) [PUPA_UTIL]: New macro.
12507 (pupa_longjmp) [PUPA_UTIL]: Likewise.
12508 * include/pupa/term.h (struct pupa_term): New member `refresh'.
12509 (pupa_refresh): New prototype.
12510 * include/pupa/util/getroot.h: New file.
12511 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
12513 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
12514 (pupa_rescue_cmd_cat): Likewise.
12515 (pupa_rescue_cmd_ls): Likewise.
12516 (pupa_rescue_cmd_testload): Likewise.
12517 (pupa_rescue_cmd_lsmod): Likewise.
12518 * normal/cmdline.c (pupa_cmdline_get): Likewise.
12519 * normal/menu.c (run_menu): Likewise.
12520 * kern/term.c (pupa_cls): Likewise.
12521 (pupa_refresh): New function.
12522 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
12523 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12524 * util/console.c: New file.
12526 * util/i386/pc/getroot.c: New file.
12527 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
12528 (pupa_putchar): New function.
12529 (pupa_refresh): Likewise.
12530 (xgetcwd): Function moved to ...
12531 (strip_extra_slashes): Likewise.
12532 (get_prefix): Likewise.
12533 * util/i386/pc/getroot.c: ... here.
12534 (find_root_device): Function moved and renamed to...
12535 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
12536 Changed all callers.
12537 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
12539 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
12540 Changed all callers.
12541 * util/misc.c (pupa_memalign): New function.
12542 (pupa_mm_init_region): Likewise.
12543 (pupa_register_exported_symbols): Likewise.
12544 (pupa_putchar): Function removed.
12545 * util/pupa-emu.c: New file.
12547 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
12549 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
12550 (_multiboot_mod_SOURCES): New variable.
12551 (_multiboot_mod_CFLAGS): Likewise.
12552 * loader/i386/pc/multiboot.c: New file.
12553 * include/pupa/i386/pc/multiboot.h: Likewise.
12554 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
12555 (pupa_multiboot_real_boot): New function.
12556 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
12557 (pupa_multiboot_real_boot): New prototype.
12558 (pupa_rescue_cmd_multiboot): Likewise
12559 (pupa_rescue_cmd_module): Likewise.
12561 * kern/loader.c (pupa_loader_set): Continue when
12562 pupa_loader_unload_func() fails.
12563 (pupa_loader_unset): New function.
12564 * include/pupa/loader.h (pupa_loader_unset): New prototype.
12566 * kern/misc.c (pupa_stpcpy): New function.
12567 * include/pupa/misc.h (pupa_stpcpy): New prototype.
12569 2003-11-12 Marco Gerards <metgerards@student.han.nl>
12571 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
12572 for available extensions.
12574 * include/pupa/i386/pc/time.h: New file.
12575 * kern/disk.c: Include <pupa/machine/time.h>.
12576 (PUPA_CACHE_TIMEOUT): New macro.
12577 (pupa_last_time): New variable.
12578 (pupa_disk_open): Flush the cache when there was a timeout.
12579 (pupa_disk_close): Reset the timer.
12580 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
12582 * util/misc.c: Include <sys/times.h>
12583 (pupa_get_rtc): New function.
12585 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
12587 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
12589 (pupa_ext2_get_file_block): Use blocks member.
12591 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
12592 first block. Return -1 instead of pupa_errno on error.
12594 2003-10-27 Marco Gerards <metgerards@student.han.nl>
12596 * README: In the pupa-mkimage example use _chain instead of chain
12597 and ext2 instead of fat.
12598 * TODO: Replace ext2fs with jfs as an example. Add an item for
12599 adding journal playback for ext2fs.
12600 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
12601 (pkgdata_MODULES): Added ext2.mod.
12602 (ext2_mod_SOURCES): New variable.
12603 (ext2_mod_CFLAGS): Likewise.
12604 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
12605 * include/pupa/misc.h (pupa_strncpy): New prototype.
12606 (pupa_strcat): Likewise.
12607 (pupa_strncmp): Likewise.
12608 * kern/misc.c (pupa_strcat): Enable function.
12609 (pupa_strncpy): New function.
12610 (pupa_strncmp): Likewise.
12611 * fs/ext2.c: New file.
12613 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
12614 when the read failed before retrying.
12615 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
12616 (_FILE_OFFSET_BITS): Likewise.
12617 * configure.ac: Added AC_SYS_LARGEFILE.
12619 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
12621 * genmk.rb (PModule#rule): Make sure to get only symbol names
12622 from the output of nm.
12623 Reported by Robert Millan <zeratul2@wanadoo.es>.
12625 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
12627 I forgot to check in these changes for a long time. This adds
12628 incomplete support for VGA console, and this is still very
12629 buggy. Also, a lot of consideration is required for I18N,
12630 UNICODE, and VGA font issues. Therefore, assume that this is
12631 such that "better than nothing".
12633 * font/manager.c: New file.
12634 * include/pupa/font.h: Likewise.
12635 * include/pupa/i386/pc/vga.h: Likewise.
12636 * term/i386/pc/vga.c: Likewise.
12637 * util/unifont2pff.rb: Likewise.
12639 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
12640 (pkgdata_MODULES): Added vga.mod and font.mod.
12641 (vga_mod_SOURCES): New variables.
12642 (vga_mod_CFLAGS): Likewise.
12643 (font_mod_SOURCES): Likewise.
12644 (font_mod_CFLAGS): Likewise.
12646 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
12648 * include/pupa/term.h: Include pupa/err.h.
12649 (struct pupa_term): Added init and fini.
12650 Changed the argument of putchar to pupa_uint32_t.
12652 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
12653 (pupa_console_real_putchar): New prototype.
12654 (pupa_console_putchar): Removed.
12655 (pupa_console_checkkey): Exported.
12656 (pupa_console_getkey): Likewise.
12658 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
12661 * kern/term.c (pupa_term_set_current): Rewritten.
12662 (pupa_putchar): Likewise.
12663 (pupa_putcode): New function.
12665 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
12666 (pupa_console_real_putchar): ... this.
12667 (pupa_vga_set_mode): New function.
12668 (pupa_vga_get_font): Likewise.
12670 * normal/command.c: Include pupa/term.h.
12671 (terminal_command): New function.
12672 (pupa_command_init): Register the command "terminal".
12674 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
12675 (DISP_UP): Likewise.
12676 (DISP_RIGHT): Likewise.
12677 (DISP_DOWN): Likewise.
12678 (DISP_HLINE): Likewise.
12679 (DISP_VLINE): Likewise.
12680 (DISP_UL): Likewise.
12681 (DISP_UR): Likewise.
12682 (DISP_LL): Likewise.
12683 (DISP_LR): Likewise.
12685 * term/i386/pc/console.c (pupa_console_putchar): New function.
12687 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
12689 * util/resolve.c (pupa_util_resolve_dependencies): BUG
12690 FIX. Reverse the path_list.
12692 * include/pupa/normal.h: Export pupa_register_command and
12693 pupa_unregister_command.
12695 * hello/hello.c (pupa_cmd_hello): New module.
12696 * conf/i386-pc.rmk: Added hello.mod.
12698 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
12700 * kern/i386/pc/lzo1x.S: New file.
12702 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
12703 (compress_kernel): New variable.
12704 (generate_image): Heavily modified to support compressing a
12705 large part of the core image.
12707 * util/misc.c (pupa_util_read_image): Fix a file descriptor
12709 (pupa_util_load_image): New function.
12711 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
12712 (pupa_compressed_size): New variable.
12713 (codestart): Enable Gate A20 here.
12714 Decompress the compressed part of the core image.
12715 Rearrange the code to put functions and variables which are
12716 required for initialization in the non-compressed part.
12719 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
12722 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
12724 * include/pupa/i386/pc/kernel.h
12725 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
12726 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
12727 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12728 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12729 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
12731 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
12733 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
12734 (Utility#rule): Likewise.
12736 * configure.ac: Check if LZO is available.
12738 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
12740 * include/pupa/normal.h: New file.
12741 * include/pupa/setjmp.h: Likewise.
12742 * include/pupa/i386/setjmp.h: Likewise.
12743 * normal/cmdline.c: Likewise.
12744 * normal/command.c: Likewise.
12745 * normal/main.c: Likewise.
12746 * normal/menu.c: Likewise.
12747 * normal/i386/setjmp.S: Likewise.
12749 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
12750 (pupa_rescue_cmd_initrd): Likewise.
12752 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
12755 * kern/i386/pc/startup.S (translation_table): New variable.
12756 (translate_keycode): New function.
12757 (pupa_console_getkey): Call translate_keycode.
12759 * kern/rescue.c (attempt_normal_mode): New function.
12760 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
12761 it failed, print a message.
12763 * kern/mm.c (pupa_real_malloc): Print more information when a
12764 free magic is broken.
12765 (pupa_free): If the first free header is not free actually, set
12768 * kern/main.c (pupa_load_normal_mode): Just load the module
12770 (pupa_main): Don't print the message
12771 "Entering into rescue mode..." here.
12773 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
12775 (pupa_rescue_cmd_initrd): Likewise.
12776 (pupa_rescue_cmd_initrd): Likewise.
12778 * include/pupa/symbol.h (FUNCTION): Specify the type.
12779 (VARIABLE): Likewise.
12781 * include/pupa/err.h (pupa_err_t): Added
12782 PUPA_ERR_UNKNOWN_COMMAND.
12784 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
12785 (pupa_dl_get_prefix): Likewise.
12787 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
12788 Added _chain.mod and _linux.mod instead of chain.mod and
12790 (chain_mod_SOURCES): Renamed to ...
12791 (_chain_mod_SOURCES): ... this.
12792 (chain_mod_CFLAGS): Renamed to ...
12793 (_chain_mod_CFLAGS): ... this.
12794 (linux_mod_SOURCES): Renamed to ...
12795 (_linux_mod_SOURCES): ... this.
12796 (linux_mod_CFLAGS): Renamed to ...
12797 (_linux_mod_CFLAGS): ... this.
12798 (normal_mod_SOURCES): New variable.
12799 (normal_mod_CFLAGS): Likewise.
12800 (normal_mod_ASFLAGS): Likewise.
12802 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
12804 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
12807 * kern/dl.c (pupa_dl_ref): Refer depending modules
12809 (pupa_dl_unref): Unrefer depending modules recursively.
12810 Don't call pupa_dl_unload implicitly, because PUPA can crash if
12811 a module is unloaded before one depending on that module is
12813 (pupa_dl_unload): Unload depending modules explicitly,
12816 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
12818 * include/pupa/i386/pc/linux.h: New file.
12819 * loader/i386/pc/linux.c: Likewise.
12821 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
12823 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
12824 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
12825 of PUPA_CHAINLOADER_BOOT_SECTOR.
12827 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
12828 (pupa_linux_prot_size): New variable.
12829 (pupa_linux_tmp_addr): Likewise.
12830 (pupa_linux_real_addr): Likewise.
12831 (pupa_linux_boot_zimage): New function.
12832 (pupa_linux_boot_bzimage): Likewise.
12834 * kern/i386/pc/init.c (struct mem_region): New structure.
12835 (MAX_REGIONS): New macro.
12836 (mem_regions): New variable.
12837 (num_regions): Likewise.
12838 (pupa_os_area_addr): Likewise.
12839 (pupa_os_area_size): Likewise.
12840 (pupa_lower_mem): Likewise.
12841 (pupa_upper_mem): Likewise.
12842 (add_mem_region): New function.
12843 (compact_mem_regions): Likewise.
12844 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
12845 the size of the conventional memory and that of so-called upper
12846 memory (before the first memory hole).
12847 Instead of adding each found region to free memory, use
12848 add_mem_region and add them after removing overlaps.
12849 Also, add only 1/4 of the upper memory to free memory. The rest
12850 is used for loading OS images. Maybe this is ad hoc, but this
12851 makes it much easier to relocate OS images when booting.
12853 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
12854 (pupa_enter_rescue_mode): Don't register initrd and module.
12856 * kern/mm.c: Include pupa/dl.h.
12858 * kern/main.c: Include pupa/file.h and pupa/device.h.
12860 * kern/loader.c (pupa_loader_load_module_func): Removed.
12861 (pupa_loader_load_module): Likewise.
12863 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
12866 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
12867 (pupa_linux_tmp_addr): Likewise.
12868 (pupa_linux_real_addr): Likewise.
12869 (pupa_linux_boot_zimage): Likewise.
12870 (pupa_linux_boot_bzimage): Likewise.
12872 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
12873 (pupa_upper_mem): Likewise.
12874 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
12875 module is too dangerous.
12877 * include/pupa/loader.h (pupa_os_area_addr): Declared.
12878 (pupa_os_area_size): Likewise.
12879 (pupa_loader_set): Remove the first argument. Loader doesn't
12880 manage modules or initrd any longer.
12881 (pupa_loader_load_module): Removed.
12883 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
12884 (linux_mod_SOURCES): New variable.
12885 (linux_mod_CFLAGS): Likewise.
12887 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
12889 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
12890 the length of a blocklist correctly.
12892 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
12893 Use ioctl only if the OS file is a block device.
12894 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
12895 not very useful for normal files.
12897 * kern/main.c (pupa_set_root_dev): New function.
12898 (pupa_load_normal_mode): Likewise.
12899 (pupa_main): Call those above.
12901 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
12904 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
12906 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12908 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
12909 (setup): Configure the installed partition information and the
12912 * loader/i386/pc/chainloader.c (my_mod): New variable.
12913 (pupa_chainloader_unload): New function.
12914 (pupa_rescue_cmd_chainloader): Refer itself.
12915 (PUPA_MOD_INIT): Save its own module in MY_MOD.
12917 * kern/i386/pc/startup.S (install_partition): Removed.
12918 (version_string): Likewise.
12919 (config_file): Likewise.
12920 (pupa_install_dos_part): New variable.
12921 (pupa_install_bsd_part): Likewise.
12922 (pupa_prefix): Likewise.
12923 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
12925 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
12927 (make_install_device): New function.
12928 (pupa_machine_init): Set the dl prefix.
12930 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
12931 (buf): Renamed to ...
12932 (linebuf): ... this.
12933 (pupa_rescue_cmd_prefix): New function.
12934 (pupa_rescue_cmd_insmod): Likewise.
12935 (pupa_rescue_cmd_rmmod): Likewise.
12936 (pupa_rescue_cmd_lsmod): Likewise.
12937 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
12940 * kern/mm.c (pupa_memalign): If failed even after invalidating
12941 disk caches, unload unneeded modules and retry.
12943 * kern/misc.c (pupa_memmove): New function.
12944 (pupa_memcpy): Removed.
12945 (pupa_strcpy): New function.
12946 (pupa_itoa): Made static.
12948 * kern/dl.c (pupa_dl_iterate): New function.
12949 (pupa_dl_ref): Likewise.
12950 (pupa_dl_unref): Likewise.
12951 (pupa_dl_unload): Return if succeeded or not.
12952 (pupa_dl_unload_unneeded): New function.
12953 (pupa_dl_unload_all): Likewise.
12954 (pupa_dl_init): Renamed to ...
12955 (pupa_dl_set_prefix): ... this.
12956 (pupa_dl_get_prefix): New function.
12958 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
12959 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
12960 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12961 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12962 (pupa_install_dos_part): Declared.
12963 (pupa_install_bsd_part): Likewise.
12964 (pupa_prefix): Likewise.
12965 (pupa_boot_drive): Likewise.
12967 * include/pupa/types.h: Fix a typo.
12969 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
12971 (pupa_memmove): Declared.
12972 (pupa_strcpy): Likewise.
12974 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
12975 pupa_mod_init takes one argument, its own module.
12976 (pupa_dl_unload_unneeded): Declared.
12977 (pupa_dl_unload_all): Likewise.
12978 (pupa_dl_ref): Likewise.
12979 (pupa_dl_unref): Likewise.
12980 (pupa_dl_iterate): Likewise.
12981 (pupa_dl_init): Renamed to ...
12982 (pupa_dl_set_prefix): ... this.
12983 (pupa_dl_get_prefix): Declared.
12985 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
12986 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
12988 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
12989 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
12991 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
12992 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
12994 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
12996 * util/i386/pc/pupa-setup.c (setup): Define the internal
12997 function find_first_partition_start at the top level, because GCC
12998 3.0.x cannot compile internal functions in deeper scopes
13000 (find_root_device): Use lstat instead of stat.
13001 Don't follow symbolic links.
13002 Fix the path-constructing code.
13004 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
13005 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
13006 by a BLKGETSIZE ioctl first, because block devices don't fill
13007 the member st_mode of the structure stat on Linux.
13008 [__linux__] (linux_find_partition): Use a temporary buffer
13009 REAL_DEV for the working space. Copy it to DEV before returning.
13010 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
13011 buffer cache consistent.
13012 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
13013 strncmp. The previous value was merely wrong.
13014 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
13016 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
13017 FAT size is 12. The previous value was merely wrong.
13019 * kern/main.c (pupa_main): Don't split the starting message from
13022 * kern/term.c (pupa_putchar): Put CR after LF instead of before
13023 LF, because BIOS goes crazy about character attributes in this
13026 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
13028 * include/i386/pc/util/biosdisk.h: New file.
13029 * util/i386/pc/biosdisk.c: Likewise.
13030 * util/i386/pc/pupa-setup.c: Likewise.
13032 * Makefile.in (INCLUDE_DISTFILES): Added
13033 include/pupa/i386/pc/util/biosdisk.h.
13034 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
13035 directory util/i386/pc.
13036 (install-local): Added a rule for sbin_UTILITIES.
13037 (uninstall): Likewise.
13039 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
13041 * util/misc.c (xrealloc): New function.
13042 (pupa_malloc): Likewise.
13043 (pupa_free): Likewise.
13044 (pupa_realloc): Likewise.
13045 (pupa_stop): Likewise.
13046 (pupa_putchar): Likewise.
13048 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
13050 * include/pupa/util/misc.h (xrealloc): Declared.
13052 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
13054 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
13055 (PUPA_BOOT_MACHINE_BPB_END): ... this.
13057 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
13058 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13060 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
13061 way should be implemented.
13062 [PUPA_UTIL] (pupa_fat_fini): Likewise.
13064 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
13065 the size of NAME for safety.
13066 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
13069 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
13070 (pupa_setup_SOURCES): Likewise.
13072 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
13074 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13076 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
13077 bunch of pushl's from pusha, because this destroys the return
13080 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
13082 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
13083 This means that any missing prototypes could be fatal. Also, you
13084 must take care when writing assembly code. See the comments at
13085 the beginning of startup.S, for more details.
13087 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
13088 compilation mechanism.
13089 (pupa_chainloader_real_boot): Likewise.
13090 (pupa_biosdisk_rw_int13_extensions): Likewise.
13091 (pupa_biosdisk_rw_standard): Likewise.
13092 (pupa_biosdisk_check_int13_extensions): Likewise.
13093 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
13094 (pupa_biosdisk_get_diskinfo_standard): Likewise.
13095 (pupa_get_memsize): Likewise.
13096 (pupa_get_mmap_entry): Likewise.
13097 (pupa_console_putchar): Likewise.
13098 (pupa_console_setcursor): Likewise.
13099 (pupa_getrtsecs): Use pushl instead of push.
13101 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
13102 memory instead of the stack for a mmap entry, because some
13103 BIOSes may ignore the maximum size and overflow.
13105 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
13107 * genmk.rb (PModule#rule): Compile automatically generated
13108 sources with module-specific CFLAGS as well as other sources.
13110 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13112 * configure.ac: Check ld.
13113 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
13114 respectively, before checking endianness and sizes.
13116 * Makefile.in (LD): New variable.
13118 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13120 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
13122 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
13124 * Changelog: New file.