1 2008-08-31 Colin D Bennett <colin@gibibit.com>
3 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5 2008-08-31 Colin D Bennett <colin@gibibit.com>
7 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
8 total video memory in 'vbeinfo' output; show color format details for
11 2008-08-30 Pavel Roskin <proski@gnu.org>
13 * util/genmoddep.c: Remove for real this time.
14 * DISTLIST: Remove util/genmoddep.c.
16 2008-08-30 Robert Millan <rmh@aybabtu.com>
18 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
19 as required by Multiboot spec (it was already 4-byte aligned, but
22 2008-08-29 Pavel Roskin <proski@gnu.org>
24 * kern/powerpc/ieee1275/crt0.S: Rename to ...
25 * kern/powerpc/ieee1275/startup.S: ... this.
26 * conf/powerpc-ieee1275.rmk: Adjust for the above.
29 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
30 grub/cpu/kernel.h. Add start label for consistency with other
31 platforms. Add grub_prefix immediately after start. Add jump
32 to the code after grub_prefix.
33 * include/grub/powerpc/kernel.h: Provide valid values for
34 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
36 2008-08-29 Bean <bean123ch@gmail.com>
38 * configure.ac: Change host_os to cygwin for mingw.
39 (asprintf): New check for function.
41 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
42 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
44 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
45 declear asprintf if HAVE_ASPRINTF is not set, declear fseeko, ftello,
46 sync, sleep and grub_util_get_disk_size for mingw.
48 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
50 (open_device): Use flag O_BINARY if it's defined.
51 (find_root_device): Add dummy code for mingw.
53 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
54 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
55 (get_scsi_disk_name): Return 0 for mingw.
57 * util/hostfs.c: #include <grub/util/misc.h>.
58 (grub_hostfs_open): Use "rb" flag to open file, use
59 grub_util_get_disk_size to get disk size for mingw.
61 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
62 (asprintf): New function if HAVE_ASPRINTF is not set.
63 (sync): New function for mingw.
65 (grub_util_get_disk_size): Likewise.
67 2008-08-28 Pavel Roskin <proski@gnu.org>
69 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
72 2008-08-28 Robert Millan <rmh@aybabtu.com>
74 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
76 2008-08-28 Robert Millan <rmh@aybabtu.com>
78 Change find_grub_drive() syntax so it doesn't prevent it from
79 detecting NULL names as errors.
81 * util/biosdisk.c (find_grub_drive): Move free slot search code
83 (find_free_slot): ... to here.
84 (read_device_map): Use find_free_slot() to search for free slots.
86 2008-08-27 Marco Gerards <marco@gnu.org>
88 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
89 (scsi_mod_SOURCES): New variable.
90 (scsi_mod_CFLAGS): Likewise
91 (scsi_mod_LDFLAGS): Likewise.
93 * disk/scsi.c: New file.
95 * include/grub/scsi.h: Likewise.
97 * include/grub/scsicmd.h: Likewise.
99 * disk/ata.c: Include <grub/scsi.h>.
100 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
102 (grub_ata_iterate): Skip ATAPI devices.
103 (grub_ata_open): Only handle ATAPI devices.
104 (struct grub_atapi_read): Removed.
105 (grub_atapi_readsector): Likewise.
106 (grub_ata_read): No longer handle ATAPI devices.
107 (grub_ata_write): Likewise.
108 (grub_atapi_iterate): New function.
109 (grub_atapi_read): Likewise.
110 (grub_atapi_write): Likewise.
111 (grub_atapi_open): Likewise.
112 (grub_atapi_close): Likewise.
113 (grub_atapi_dev): New variable.
114 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
115 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
117 * include/grub/disk.h (enum grub_disk_dev_id): Add
118 `GRUB_DISK_DEVICE_SCSI_ID'.
120 2008-08-26 Robert Millan <rmh@aybabtu.com>
122 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
123 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
126 2008-08-23 Bean <bean123ch@gmail.com>
128 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
129 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
130 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
131 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
133 (raid5rec_mod_SOURCES): New macro.
134 (raid5rec_mod_CFLAGS): Likewise.
135 (raid5rec_mod_LDFLAGS): Likewise.
136 (raid6rec_mod_SOURCES): Likewise.
137 (raid6rec_mod_CFLAGS): Likewise.
138 (raid6rec_mod_LDFLAGS): Likewise.
139 (mdraid_mod_SOURCES): Likewise.
140 (mdraid_mod_CFLAGS): Likewise.
141 (mdraid_mod_LDFLAGS): Likewise.
142 (dm_nv_mod_SOURCES): Likewise.
143 (dm_nv_mod_CFLAGS): Likewise.
144 (dm_nv_mod_LDFLAGS): Likewise.
146 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
147 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
148 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
150 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
151 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
153 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
155 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
157 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
159 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
161 * disk/raid5_recover.c: New file.
163 * disk/raid6_recover.c: Likewise.
165 * disk/mdraid_linux.c: Likewise.
167 * disk/dmraid_nvidia.c: Likewise.
169 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
172 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
173 calculate the size of raid device.
174 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
175 different layout of raid5.
176 (grub_raid_scan_device): Remove code specific to mdraid.
177 (grub_raid_list): New variable.
178 (free_array): New function.
179 (grub_raid_register): Likewise.
180 (grub_raid_unregister): Likewise.
181 (grub_raid_rescan): Likewise.
182 (GRUB_MOD_INIT): Don't iterate device here.
183 (GRUB_MOD_FINI): Use free_array to release resource.
185 * include/grub/raid.h: Remove macro and structure specific to mdraid.
186 (grub_raid5_recover_func_t): New function variable type.
187 (grub_raid6_recover_func_t): Likewise.
188 (grub_raid5_recover_func): New variable.
189 (grub_raid6_recover_func): Likewise.
190 (grub_raid_register): New function.
191 (grub_raid_unregister): Likewise.
192 (grub_raid_rescan): Likewise.
193 (grub_raid_block_xor): Likewise.
195 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
196 (CMD_CRC): New macro.
198 (read_file): Handle device as well as file.
199 (cmd_crc): New function.
200 (fstest): Handle multiple disks.
201 (options): Remove part, raw and long, add root and diskcount.
202 (usage): Add crc, remove -p, -r, -l, add -r and -c.
203 (main): Find the first non option entry and ignore subsequence options,
204 add handling for the new options, support multiple disks.
206 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
208 2008-08-23 Bean <bean123ch@gmail.com>
210 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
212 * genfslist.sh: Ignore kernel.mod.
214 * genpartmaplist.sh: Likewise.
216 2008-08-23 Robert Millan <rmh@aybabtu.com>
218 * util/getroot.c (find_root_device): Skip anything that starts with
219 a dot, not just directories. This avoids things like /dev/.tmp.md0.
221 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
223 * util/update-grub.in (GRUB_GFXMODE): Export variable.
224 * util/grub.d/00_header.in: Allow the administrator to change default
225 gfxmode via ${GRUB_GFXMODE}.
227 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
229 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
231 2008-08-21 Robert Millan <rmh@aybabtu.com>
233 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
235 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
236 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
238 2008-08-20 Carles Pina i Estany <carles@pina.cat>
240 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
241 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
243 2008-08-19 Robert Millan <rmh@aybabtu.com>
245 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
246 (struct grub_virtual_screen): Remove `cursor_color'.
247 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
249 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
251 2008-08-18 Robert Millan <rmh@aybabtu.com>
253 Unify (identical) linux_normal.c files.
254 * loader/i386/efi/linux_normal.c: Move from here ...
255 * loader/linux_normal.c: ... to here. Update all users.
256 * loader/i386/pc/linux_normal.c: Delete. Update all users.
257 * loader/i386/ieee1275/linux_normal.c: Likewise.
259 2008-08-18 Robert Millan <rmh@aybabtu.com>
261 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
262 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
263 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
264 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
265 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
267 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
268 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
269 (GRUB_LINUX_CL_END_OFFSET): ... to here.
270 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
271 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
272 (GRUB_EFI_CL_END_OFFSET): Rename to ...
273 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
274 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
275 Initialize `params->video_cursor_x' and `params->video_cursor_y'
276 portably using grub_getxy().
277 Replace `-EFI' with `-bzImage' in boot message.
279 2008-08-17 Robert Millan <rmh@aybabtu.com>
281 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
283 2008-08-17 Robert Millan <rmh@aybabtu.com>
285 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
287 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
288 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
289 (grub_machine_mmap_iterate): New function declaration.
290 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
292 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
295 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
296 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
297 Move e820 parsing from here ...
298 * kern/i386/pc/mmap.c: New file.
299 (grub_machine_mmap_iterate): ... to here.
301 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
302 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
303 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
304 (grub_available_iterate): Redeclare to return `void', and redeclare
305 its hook to use grub_uint64_t as addr and size parameters, and rename
307 (grub_machine_mmap_iterate): ... this. Update all users.
309 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
310 to make it more readable. Rename to ...
311 (grub_machine_mmap_iterate): ... this.
313 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
314 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
315 (grub_multiboot): Allocate an extra region after the payload, and fill
316 it with a Multiboot memory map. Adjust a.out loader to calculate size
317 with the extra space.
318 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
319 with the extra space.
321 2008-08-17 Carles Pina i Estany <carles@pina.cat>
323 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
325 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
327 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
328 mdate-sh to the list `find' searches for.
329 * DISTLIST: Regenerated.
331 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
333 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
334 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
335 genmoddep.awk, gensymlist.sh.in.
336 (DISTDIRS): Add bus, docs, hook, lib.
337 * DISTLIST: Regenerated.
338 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
340 2008-08-16 Robert Millan <rmh@aybabtu.com>
342 * disk/raid.c (grub_raid_init): Handle/report errors set by
343 grub_device_iterate().
344 * disk/lvm.c (grub_lvm_init): Likewise.
346 2008-08-15 Bean <bean123ch@gmail.com>
348 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
350 (datetime_mod_SOURCES): New macro.
351 (datetime_mod_CFLAGS): Likewise.
352 (datetime_mod_LDFLAGS): Likewise.
353 (date_mod_SOURCES): Likewise.
354 (date_mod_CFLAGS): Likewise.
355 (date_mod_LDFLAGS): Likewise.
356 (datehook_mod_SOURCES): Likewise.
357 (datehook_mod_CFLAGS): Likewise.
358 (datehook_mod_LDFLAGS): Likewise.
360 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
362 (datetime_mod_SOURCES): New macro.
363 (datetime_mod_CFLAGS): Likewise.
364 (datetime_mod_LDFLAGS): Likewise.
365 (date_mod_SOURCES): Likewise.
366 (date_mod_CFLAGS): Likewise.
367 (date_mod_LDFLAGS): Likewise.
368 (datehook_mod_SOURCES): Likewise.
369 (datehook_mod_CFLAGS): Likewise.
370 (datehook_mod_LDFLAGS): Likewise.
372 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
374 (datetime_mod_SOURCES): New macro.
375 (datetime_mod_CFLAGS): Likewise.
376 (datetime_mod_LDFLAGS): Likewise.
377 (date_mod_SOURCES): Likewise.
378 (date_mod_CFLAGS): Likewise.
379 (date_mod_LDFLAGS): Likewise.
380 (datehook_mod_SOURCES): Likewise.
381 (datehook_mod_CFLAGS): Likewise.
382 (datehook_mod_LDFLAGS): Likewise.
384 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
386 (datetime_mod_SOURCES): New macro.
387 (datetime_mod_CFLAGS): Likewise.
388 (datetime_mod_LDFLAGS): Likewise.
389 (date_mod_SOURCES): Likewise.
390 (date_mod_CFLAGS): Likewise.
391 (date_mod_LDFLAGS): Likewise.
392 (datehook_mod_SOURCES): Likewise.
393 (datehook_mod_CFLAGS): Likewise.
394 (datehook_mod_LDFLAGS): Likewise.
396 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
398 (datetime_mod_SOURCES): New macro.
399 (datetime_mod_CFLAGS): Likewise.
400 (datetime_mod_LDFLAGS): Likewise.
401 (date_mod_SOURCES): Likewise.
402 (date_mod_CFLAGS): Likewise.
403 (date_mod_LDFLAGS): Likewise.
404 (datehook_mod_SOURCES): Likewise.
405 (datehook_mod_CFLAGS): Likewise.
406 (datehook_mod_LDFLAGS): Likewise.
408 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
410 * commands/date.c: New file.
412 * hook/datehook.c: Likewise.
414 * include/grub/lib/datetime.h: Likewise.
416 * include/grub/i386/cmos.h: Likewise.
418 * lib/datetime.c: Likewise.
420 * lib/i386/datetime.c: Likewise.
422 * lib/efi/datetime.c: Likewise.
424 2008-08-14 Robert Millan <rmh@aybabtu.com>
426 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
427 (grub_mkelfimage_SOURCES): New variable.
428 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
430 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
431 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
432 * conf/powerpc-ieee1275.rmk: Likewise.
433 * conf/i386-ieee1275.rmk: Likewise.
435 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
436 * kern/i386/coreboot/init.c: Likewise.
438 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
439 with `<grub/cpu/kernel.h>'.
440 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
442 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
443 * kern/i386/coreboot/startup.S: Likewise.
445 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
446 (GRUB_MOD_GAP): Remove.
447 * include/grub/powerpc/kernel.h: New file.
448 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
449 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
450 * include/grub/i386/kernel.h: New file.
451 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
452 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
453 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
455 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
457 Use --directory when invoking grub_mkimage.
459 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
460 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
461 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
462 and GRUB_KERNEL_CPU_PREFIX.
464 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
466 * include/grub/err.h (grub_err_printf): New function prototype.
467 * util/misc.c (grub_err_printf): New function.
468 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
470 * kern/err.c (grub_print_error): Use grub_err_printf.
472 2008-08-13 Robert Millan <rmh@aybabtu.com>
474 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
476 2008-08-13 Robert Millan <rmh@aybabtu.com>
478 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
481 2008-08-12 Robert Millan <rmh@aybabtu.com>
483 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
484 of the relocation code from here ...
485 (grub_multiboot): ... to here.
486 (forward_relocator, backward_relocator): Move from here ...
487 * kern/i386/loader.S (grub_multiboot_forward_relocator)
488 (grub_multiboot_backward_relocator): ... to here.
489 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
490 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
491 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
492 (grub_multiboot_forward_relocator_end)
493 (grub_multiboot_backward_relocator)
494 (grub_multiboot_backward_relocator_end): New variables.
496 2008-08-12 Bean <bean123ch@gmail.com>
498 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
500 2008-08-11 Robert Millan <rmh@aybabtu.com>
502 * kern/i386/linuxbios/startup.S: Move from here ...
503 * kern/i386/coreboot/startup.S: ... to here.
505 * kern/i386/linuxbios/init.c: Move from here ...
506 * kern/i386/coreboot/init.c: ... to here.
508 * kern/i386/linuxbios/table.c: Move from here ...
509 * kern/i386/coreboot/mmap.c: ... to here.
511 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
513 2008-08-11 Robert Millan <rmh@aybabtu.com>
515 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
516 errors. Leave it to the upper layer to handle them.
518 2008-08-09 Christian Franke <franke@computer.org>
520 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
521 * conf/common.rmk: Install `grub-pe2elf' only if requested.
522 Install `grub.d/10_windows' only on Cygwin.
523 * configure.ac: Add subst of `target_os'.
524 Check `target_os' also before setting TARGET_OBJ2ELF.
525 Add `--enable-grub-pe2elf'.
527 2008-08-08 Robert Millan <rmh@aybabtu.com>
529 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
530 (grub_last_time): Change type to grub_uint64_t.
531 (grub_disk_open): Migrate code from to using grub_get_time_ms().
532 (grub_disk_close): Likewise.
534 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
535 (run_menu): Migrate code from to using grub_get_time_ms().
537 * util/misc.c (grub_get_time_ms): New function.
539 2008-08-08 Marco Gerards <marco@gnu.org>
541 * disk/ata.c (grub_ata_regget): Change return type to
543 (grub_ata_regget2): Likewise.
544 (grub_ata_wait_status): New function.
545 (grub_ata_wait_busy): Removed function, updated all users to use
546 `grub_ata_wait_status'.
547 (grub_ata_wait_drq): Likewise.
548 (grub_ata_cmd): New function.
549 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
551 (grub_ata_pio_write): Add error handling.
552 (grub_atapi_identify): Likewise.
553 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
555 (grub_ata_identify): Use `grub_ata_cmd' and improve error
556 handling. Actually use the detected registers. Reorder the
557 detection logic such that it is easier to read.
558 (grub_ata_pciinit): Do not assign the same ID to each controller.
559 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
561 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
563 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
565 2008-08-08 Marco Gerards <marco@gnu.org>
569 2008-08-07 Bean <bean123ch@gmail.com>
571 * include/grub/x86_64/pci.h: New file.
573 2008-08-07 Christian Franke <franke@computer.org>
575 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
576 (TIMER2_GATE): Likewise.
577 (grub_pit_wait): Add enable/disable of the timer2 gate
578 bit of port 0x61. This fixes a possible infinite loop.
580 2008-08-07 Bean <bean123ch@gmail.com>
582 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
583 kern/i386/tsc.c and kern/i386/pit.c.
585 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
588 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
591 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
593 2008-08-07 Bean <bean123ch@gmail.com>
595 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
597 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
599 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
600 multiple inclusion. Add #include <grub/types.h>.
602 2008-08-06 Christian Franke <franke@computer.org>
604 * conf/common.rmk: Build and install `10_windows'.
605 * util/grub.d/10_windows.in: New script.
607 2008-08-06 Pavel Roskin <proski@gnu.org>
609 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
611 2008-08-06 Robert Millan <rmh@aybabtu.com>
613 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
614 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
616 2008-08-06 Bean <bean123ch@gmail.com>
618 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
619 (grub_pxefs_fs_int): Remove dummy definition.
620 (grub_pxefs_open): Use data->block_size to store the current block
622 (grub_pxefs_read): Use block size stored in data->block_size. As the
623 value of grub_pxe_blksize can be changed after the file is opened.
625 2008-08-06 Bean <bean123ch@gmail.com>
627 * fs/i386/pc/pxe.c (curr_file): new variable.
628 (grub_pxefs_open): Simply the handling of pxe file system. Don't
629 require the dummy internal file system anymore.
630 (grub_pxefs_read): Removed.
631 (grub_pxefs_close): Likewise.
632 (grub_pxefs_fs_int): Likewise.
633 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
634 connection when we switch file.
635 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
637 2008-08-06 Robert Millan <rmh@aybabtu.com>
639 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
641 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
642 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
644 * kern/i386/halt.c: New file.
645 * kern/i386/reboot.c: Likewise.
646 * include/grub/i386/reboot.h: Likewise.
647 * include/grub/i386/halt.h: Likewise.
649 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
650 Include `<grub/cpu/halt.h>'.
651 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
652 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
654 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
655 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
656 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
657 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
658 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
659 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
661 * include/grub/i386/at_keyboard.h: ... to here.
663 2008-08-05 Robert Millan <rmh@aybabtu.com>
665 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
666 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
667 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
668 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
669 `kern/generic/millisleep.c'.
671 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
672 instead of grub_get_rtc().
673 (grub_tsc_init): Initialize `tsc_boot_time'.
675 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
676 (grub_machine_init): Use grub_tsc_init() rather than
677 installing an RTC-based handler via grub_install_get_time_ms().
679 * kern/i386/pit.c: New file.
680 * include/grub/i386/pit.h: Likewise.
682 2008-08-05 Bean <bean123ch@gmail.com>
684 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
686 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
687 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
688 (pxe_mod_SOURCES): New macro.
689 (pxe_mod_CFLAGS): Likewise.
690 (pxe_mod_LDFLAGS): Likewise.
691 (pxecmd_mod_SOURCES): Likewise.
692 (pxecmd_mod_CFLAGS): Likewise.
693 (pxecmd_mod_LDFLAGS): Likewise.
695 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
696 (grub_pxe_call): Likewise.
698 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
700 * commands/i386/pc/pxecmd.c: New file.
702 * fs/i386/pc/pxe.c: Likewise.
704 * include/grub/i386/pc/pxe.h: Likewise.
706 2008-08-05 Bean <bean123ch@gmail.com>
708 * util/console.c (grub_console_cur_color): New variable.
709 (grub_console_standard_color): Likewise.
710 (grub_console_normal_color): Likewise.
711 (grub_console_highlight_color): Likewise.
712 (color_map): Likewise.
713 (use_color): Likewise.
714 (NUM_COLORS): New macro.
715 (grub_ncurses_setcolorstate): Handle color properly.
716 (grub_ncurses_setcolor): Don't change color here, just remember the
717 settings, color will be set in grub_ncurses_setcolorstate.
718 (grub_ncurses_getcolor): New function.
719 (grub_ncurses_init): Initialize color pairs.
720 (grub_ncurses_term): New member grub_ncurses_getcolor.
722 2008-08-05 Colin D Bennett <colin@gibibit.com>
724 High resolution timer support. Implemented for x86 CPUs using TSC.
725 Extracted generic grub_millisleep() so it's linked in only as needed.
726 This requires a Pentium compatible CPU; if the RDTSC instruction is
727 not supported, then it falls back on the generic grub_get_time_ms()
728 implementation that uses the machine's RTC.
730 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
731 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
732 `kern/generic/millisleep.c'.
734 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
735 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
737 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
738 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
740 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
742 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
743 `kern/generic/millisleep.c'.
745 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
747 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
749 * kern/generic/rtc_get_time_ms.c: New file.
751 * kern/generic/millisleep.c: New file.
753 * kern/misc.c: Don't include
754 <kern/time.h> anymore.
755 (grub_millisleep_generic): Removed.
757 * commands/sleep.c (grub_interruptible_millisleep): Uses
758 grub_get_time_ms() instead of grub_get_rtc().
760 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
762 (grub_cpu_is_cpuid_supported): New inline function.
763 (grub_cpu_is_tsc_supported): New inline function.
764 (grub_tsc_init): New function prototype.
765 (grub_tsc_get_time_ms): New function prototype.
767 * kern/i386/tsc.c (grub_get_time_ms): New file.
769 * include/grub/time.h: Include <grub/types.h.
770 (grub_millisleep_generic): Removed.
771 (grub_get_time_ms): New prototype.
772 (grub_install_get_time_ms): New prototype.
773 (grub_rtc_get_time_ms): New prototype.
775 * kern/time.c (grub_get_time_ms): New function.
776 (grub_install_get_time_ms): New function.
778 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
779 <grub/time.h> anymore.
780 (grub_millisleep): Removed.
781 (grub_machine_init): Call grub_tsc_init.
783 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
784 get_time_ms() implementation.
786 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
787 (ieee1275_get_time_ms): New function.
788 (grub_machine_init): Install get_time_ms() implementation.
790 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
791 (grub_machine_init): Call grub_tsc_init().
792 (grub_millisleep): Removed.
794 * kern/ieee1275/init.c (grub_millisleep): Removed.
795 (grub_machine_init): Install ieee1275_get_time_ms()
797 (ieee1275_get_time_ms): New function.
798 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
801 2008-08-05 Marco Gerards <marco@gnu.org>
803 * disk/ata.c: Include <grub/pci.h>.
804 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
805 (grub_ata_initialize): Rewritten.
806 (grub_ata_device_initialize): New function.
808 2008-08-04 Pavel Roskin <proski@gnu.org>
810 * kern/main.c: Include grub/mm.h.
812 2008-08-04 Robert Millan <rmh@aybabtu.com>
814 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
815 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
818 2008-08-04 Robert Millan <rmh@aybabtu.com>
820 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
821 warnings introduced in my last commit.
823 2008-08-03 Robert Millan <rmh@aybabtu.com>
825 Make PCI available on all i386 architectures.
827 * include/grub/i386/pc/pci.h: Move from here ...
828 * include/grub/i386/pci.h: ... to here.
830 * include/grub/i386/pc/pci.h: Remove.
831 * include/grub/i386/efi/pci.h: Remove.
832 * include/grub/x86_64/efi/pci.h: Remove.
834 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
837 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
838 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
839 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
841 * conf/i386-ieee1275.rmk: Likewise.
843 2008-08-03 Robert Millan <rmh@aybabtu.com>
845 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
846 (grub_console_setcursor): Make it possible to set cursor off.
848 2008-08-03 Robert Millan <rmh@aybabtu.com>
850 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
851 of modules instead of assuming which platform provides what.
852 * util/update-grub.in: Likewise.
854 2008-08-03 Robert Millan <rmh@aybabtu.com>
856 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
857 instead of `grub_install_dos_part' to determine whether a drive needs
858 to be prepended to prefix (`grub_install_dos_part' is not reliable,
859 because it can be overridden when loading GRUB via Multiboot).
861 2008-08-02 Robert Millan <rmh@aybabtu.com>
863 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
865 2008-08-02 Robert Millan <rmh@aybabtu.com>
867 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
868 of informational grub_dprintf() calls.
870 2008-08-02 Robert Millan <rmh@aybabtu.com>
872 * disk/memdisk.c (memdisk_size): Don't initialize.
873 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
875 * include/grub/i386/pc/kernel.h
876 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
877 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
878 (grub_memdisk_image_size, grub_arch_memdisk_addr)
879 (grub_arch_memdisk_size): Remove.
881 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
882 field (was only used to transfer a constant). Add `type' field to
883 support multiple module types.
884 (grub_module_iterate): New function.
886 * kern/device.c (grub_device_open): Do not hide error messages
887 when grub_disk_open() fails. Use grub_print_error() instead.
889 * kern/i386/pc/init.c (grub_arch_modules_addr)
890 (grub_arch_memdisk_size): Remove functions.
891 (grub_arch_modules_addr): Return the module address in high memory
892 (now that it isn't copied anymore).
894 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
895 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
896 decompression routine (grub_total_module_size already includes that
897 now). Don't copy modules back to low memory.
899 * kern/main.c: Include `<grub/mm.h>'.
900 (grub_load_modules): Split out (and use) ...
901 (grub_module_iterate): ... this function, which iterates through
902 module objects and runs a hook.
903 Comment out grub_mm_init_region() call, as it would cause non-ELF
904 modules to be overwritten.
906 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
907 the memdisk image in its own region, make it part of the module list.
908 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
909 (main): Parse --memdisk|-m option, and pass user-provided path as
910 parameter to generate_image().
911 (add_segments): Pass `memdisk_path' down to load_modules().
912 (load_modules): Embed memdisk image in module section when requested.
913 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
914 `header.type' instead of `header.offset'.
916 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
917 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
918 (memdisk_mod_LDFLAGS): New variables.
919 * conf/i386-coreboot.rmk: Likewise.
920 * conf/i386-ieee1275.rmk: Likewise.
922 2008-08-02 Robert Millan <rmh@aybabtu.com>
924 * loader/i386/pc/multiboot.c (playground, forward_relocator)
925 (backward_relocator): New variables. Used to allocate and relocate
926 the payload, respectively.
927 (grub_multiboot_load_elf32): Load into heap instead of requested
928 address, install the appropriate relocator code in each bound of
929 the payload, and set the entry point such that
930 grub_multiboot_real_boot() will jump to one of them.
932 * kern/i386/loader.S (grub_multiboot_payload_size)
933 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
934 (grub_multiboot_payload_entry_offset): New variables.
935 (grub_multiboot_real_boot): Set cpu context to what the relocator
936 expects, and jump to the relocator instead of the payload.
938 * include/grub/i386/loader.h (grub_multiboot_payload_size)
939 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
940 (grub_multiboot_payload_entry_offset): Export.
942 2008-08-01 Bean <bean123ch@gmail.com>
944 * normal/menu_entry.c (editor_getline): Don't return the original
945 string as result, as it will be released by lexer once it has done
948 2008-08-01 Robert Millan <rmh@aybabtu.com>
950 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
951 within menuentries, not before them.
952 util/grub.d/10_hurd.in: Likewise.
954 2008-08-01 Bean <bean123ch@gmail.com>
956 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
957 (bufio_mod_SOURCES): New macro.
958 (bufio_mod_CFLAGS): Likewise.
959 (bufio_mod_LDFLAGS): Likewise.
961 * include/grub/bufio.h: New file.
963 * io/bufio.c: Likewise.
965 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
966 (grub_video_reader_png): Use grub_buffile_open to open file.
968 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
969 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
971 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
972 (grub_video_reader_tga): Use grub_buffile_open to open file.
974 * font/manager.c: Include <grub/bufio.h>.
975 (add_font): Use grub_buffile_open to open file.
977 2008-07-31 Robert Millan <rmh@aybabtu.com>
979 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
980 ELF segments, use a macro for arbitrarily accessing any of them instead
981 of preparing a pointer that allows access to one at a time.
982 (grub_multiboot_load_elf64): Likewise.
984 2008-07-31 Bean <bean123ch@gmail.com>
986 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
987 GRUB_KERNEL_MACHINE_DATA_END.
989 2008-07-30 Robert Millan <rmh@aybabtu.com>
991 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
992 Increase from 0x50 to 0x60.
993 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
994 use UUIDs to identify the root drive for them. If that's not
996 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
997 check, for cross-disk installs.
999 2008-07-30 Robert Millan <rmh@aybabtu.com>
1001 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
1002 is non-empty, use it to set the `prefix' environment variable instead
1003 of the usual approach.
1004 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
1005 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
1006 environment variable instead of dummy make_install_device().
1008 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
1009 (start): Insert a data section, with `grub_prefix' variable.
1010 * kern/i386/linuxbios/startup.S: Likewise.
1012 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
1013 New variable reference.
1014 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
1015 New macro. Defines offset of `grub_prefix' within startup.S (relative
1017 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
1018 section within startup.S (relative to `start').
1019 * include/grub/i386/coreboot/kernel.h: Likewise.
1021 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
1022 Overwrite grub_prefix with its contents, at the beginning of the
1024 (main): Understand -p|--prefix.
1026 2008-07-30 Robert Millan <rmh@aybabtu.com>
1028 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
1030 2008-07-30 Robert Millan <rmh@aybabtu.com>
1032 * term/i386/pc/vga_text.c (grub_console_cls): Use
1033 grub_console_gotoxy() to go back to beginning of the screen.
1034 Found by Patrick Georgi <patrick.georgi@coresystems.de>
1036 2008-07-29 Christian Franke <franke@computer.org>
1038 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
1039 Add conversion of emulated mount points on Cygwin.
1041 2008-07-29 Christian Franke <franke@computer.org>
1043 * util/update-grub.in: Add a check for admin
1045 Remove old `grub.cfg.new' before creation.
1046 Add `-f' to `mv' to handle the different filesystem
1047 semantics of Windows.
1049 2008-07-29 Bean <bean123ch@gmail.com>
1051 * normal/main.c (get_line): Fix buffer overflow bug.
1053 2008-07-28 Robert Millan <rmh@aybabtu.com>
1055 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
1056 (struct grub_apple_header): New struct. Describes the layout of
1058 (apple_partition_map_iterate): Check the header magic as well as the
1059 partition magic (which was already being checked).
1061 2008-07-28 Pavel Roskin <proski@gnu.org>
1063 * genmk.rb: Add a warning to the beginning of the output that
1064 it's a generated file and should not be edited.
1066 2008-07-28 Robert Millan <rmh@aybabtu.com>
1068 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1069 with the same number are found, just use issue a warning with
1070 grub_dprintf(), as this error has been reported to be non-fatal.
1072 2008-07-27 Robert Millan <rmh@aybabtu.com>
1074 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
1077 2008-07-27 Bean <bean123ch@gmail.com>
1079 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
1080 (grub_fat_find_dir): Ignore case when comparing filename.
1082 2008-07-27 Bean <bean123ch@gmail.com>
1084 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
1085 smallino, as it's more descriptive, and i8count can be confused with
1086 the other field count.
1087 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
1090 2008-07-27 Bean <bean123ch@gmail.com>
1092 * commands/crc.c: New file.
1094 * lib/crc.c: Likewise.
1096 * include/grub/lib/crc.h: Likewise.
1098 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
1100 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
1101 (hexdump): Move this function to ...
1103 * lib/hexdump.c: ... here.
1105 * include/grub/hexdump.h: Renamed to ...
1107 * include/grub/lib/hexdump.h: ... this.
1109 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
1111 * util/grub-editenv.c: Likewise.
1113 * include/envblk.h: Renamed to ...
1115 * include/lib/envblk.h: ... this.
1117 * util/envblk.c: Renamed to ...
1119 * lib/envblk.c: ... this.
1121 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
1123 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
1124 (pkglib_MODULES): Add crc.mod.
1125 (hexdump_mod_SOURCES): Add lib/hexdump.c.
1126 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
1127 (crc_mod_SOURCES): New macro.
1128 (crc_mod_CFLAGS): Likewise.
1129 (crc_mod_LDFLAGS): Likewise.
1131 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
1133 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1135 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1137 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1139 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1141 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
1143 * commands/help.c: Include <grub/term.h>.
1144 (TERM_WIDTH): Removed. Updated all users.
1146 2008-07-27 Pavel Roskin <proski@gnu.org>
1148 * util/getroot.c (find_root_device): Rephrase a comment to avoid
1149 spurious warnings about a comment within a comment.
1151 2008-07-25 Robert Millan <rmh@aybabtu.com>
1153 * util/getroot.c (find_root_device): Skip devices that match
1154 /dev/dm-[0-9]. This lets the real device be found for any type of
1155 abstraction (LVM, EVMS, RAID..).
1156 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
1157 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
1158 device is found first, find_root_device() will now skip it.
1160 2008-07-24 Pavel Roskin <proski@gnu.org>
1162 * include/grub/types.h: Use __builtin_bswap32() and
1163 __builtin_bswap64() with gcc 4.3 and newer.
1165 2008-07-24 Christian Franke <franke@computer.org>
1167 * util/i386/pc/grub-install.in: If `--debug' is specified,
1168 pass `--verbose' to grub-setup.
1169 Abort script if make_system_path_relative_to_its_root() fails.
1171 2008-07-24 Bean <bean123ch@gmail.com>
1173 * configure.ac: Fixed a bug caused by the previous cygwin patch,
1174 variable `target_platform' should be `platform'.
1176 2008-07-24 Bean <bean123ch@gmail.com>
1178 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
1179 (grub_png_init_fixed_block): New function.
1180 (grub_png_decode_image_data): Handle fixed huffman code compression.
1182 2008-07-24 Bean <bean123ch@gmail.com>
1184 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
1185 (grub_pe2elf_SOURCES): New macro.
1186 (CLEANFILES): Add grub-pe2elf.
1188 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
1189 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
1190 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
1191 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
1192 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
1193 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
1194 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
1195 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
1196 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
1197 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
1198 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
1199 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
1200 (GRUB_PE32_DT_FUNCTION): Likewise.
1201 (GRUB_PE32_REL_I386_DIR32): Likewise.
1202 (GRUB_PE32_REL_I386_REL32): Likewise.
1203 (grub_pe32_symbol): New structure.
1204 (grub_pe32_reloc): Likewise.
1206 * util/grub-pe2elf.c: New file.
1208 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
1209 start symbol in non pc platform.
1211 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
1213 The following patches are from Christian Franke.
1215 * include/grub/dl.h: Remove .previous, gas supports this only
1218 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
1219 Remove .type, gas supports this only for ELF format.
1221 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
1222 nullbytes in symbol table. This fixes an infinite loop if table is
1225 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
1226 TARGET_IMG_LDFLAGS and EXEEXT.
1228 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
1229 TARGET_IMG_LDFLAGS_AC.
1230 (grub_CHECK_STACK_ARG_PROBE): New function.
1232 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
1234 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
1236 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
1237 to set TARGET_IMG_LD* accordingly.
1238 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
1239 Add call to grub_CHECK_STACK_ARG_PROBE.
1240 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
1242 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
1244 * genmk.rb: Add EXEEXT to CLEANFILES.
1246 2008-07-23 Robert Millan <rmh@aybabtu.com>
1248 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
1249 define the codes for arrows and lines used for the menu).
1250 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
1253 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
1254 fonts, because the latter are too slow.
1256 2008-07-21 Bean <bean123ch@gmail.com>
1258 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
1259 a20. Run keyboard test last, as it will cause macbook to halt.
1261 2008-07-18 Pavel Roskin <proski@gnu.org>
1263 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
1264 load foreign architecture modules correctly anyway. Keep
1265 support for loading host architecture modules, whether we
1266 compile them or not.
1268 2008-07-17 Pavel Roskin <proski@gnu.org>
1270 * configure.ac: Use -m32 or -m64 regardless of whether we had to
1271 change target_cpu. The compiler default can mismatch target_cpu
1274 * disk/efi/efidisk.c: Fix format warnings on x86_64.
1275 * kern/efi/efi.c: Likewise.
1277 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
1278 target compiler is functional.
1279 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
1282 * configure.ac: Default to efi platform for x86_64-apple. Allow
1283 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
1284 adjustments from the rest, only do them if target is not
1285 explicitly given. Merge other adjustments with the final sanity
1286 check. Remove an extraneous check for supported CPU. Be
1287 specific which CPU and which platform is not supported.
1289 * configure.ac: Default to pc platform for x86_64.
1291 2008-07-17 Robert Millan <rmh@aybabtu.com>
1293 Partial LinuxBIOS -> Coreboot rename.
1295 * conf/i386-linuxbios.rmk: Renamed to ...
1296 * conf/i386-coreboot.rmk: ... this.
1297 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
1298 * configure.ac: Accept "coreboot" as input platform (but maintain
1299 compatibility with "linuxbios").
1300 * include/grub/i386/linuxbios: Renamed to ...
1301 * include/grub/i386/coreboot: ... this.
1303 2008-07-17 Bean <bean123ch@gmail.com>
1305 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
1306 (appleldr_mod_SOURCE): New variable.
1307 (appleldr_mod_CFLAGS): Likewise.
1308 (appleldr_mod_LDFLAGS): Likewise.
1309 (pci_mod_SOURCES): Likewise.
1310 (pci_mod_CFLAGS): Likewise.
1311 (pci_mod_LDFLAGS): Likewise.
1312 (lspci_mod_SOURCES): Likewise.
1313 (lspci_mod_CFLAGS): Likewise.
1314 (lspci_mod_LDFLAGS): Likewise.
1316 * conf/x86_64-efi.rmk: New file.
1318 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
1320 (grub_efidisk_write): Likewise.
1322 * include/efi/api.h (efi_call_0): New macro.
1323 (efi_call_1): Likewise.
1324 (efi_call_2): Likewise.
1325 (efi_call_3): Likewise.
1326 (efi_call_4): Likewise.
1327 (efi_call_5): Likewise.
1328 (efi_call_6): Likewise.
1330 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
1331 grub_rescue_cmd_chainloader.
1333 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
1334 (grub_pe32_optional_header): Change some fields based on i386 or
1336 (GRUB_PE32_PE32_MAGIC): Likewise.
1338 * include/grub/efi/uga_draw.h: New file.
1340 * include/grub/elf.h (STN_ABS): New constant.
1341 (R_X86_64_NONE): Relocation constant for x86_64.
1342 (R_X86_64_64): Likewise.
1343 (R_X86_64_PC32): Likewise.
1344 (R_X86_64_GOT32): Likewise.
1345 (R_X86_64_PLT32): Likewise.
1346 (R_X86_64_COPY): Likewise.
1347 (R_X86_64_GLOB_DAT): Likewise.
1348 (R_X86_64_JUMP_SLOT): Likewise.
1349 (R_X86_64_RELATIVE): Likewise.
1350 (R_X86_64_GOTPCREL): Likewise.
1351 (R_X86_64_32): Likewise.
1352 (R_X86_64_32S): Likewise.
1353 (R_X86_64_16): Likewise.
1354 (R_X86_64_PC16): Likewise.
1355 (R_X86_64_8): Likewise.
1356 (R_X86_64_PC8): Likewise.
1358 * include/grub/i386/efi/pci.h: New file.
1360 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
1361 Change it value based on platform.
1362 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
1363 (GRUB_E820_RAM): Likewise.
1364 (GRUB_E820_RESERVED): Likewise.
1365 (GRUB_E820_ACPI): Likewise.
1366 (GRUB_E820_NVS): Likewise.
1367 (GRUB_E820_EXEC_CODE): Likewise.
1368 (GRUB_E820_MAX_ENTRY): Likewise.
1369 (grub_e820_mmap): New structure.
1370 (linux_kernel_header): Change the efi field according to different
1371 kernel version, also field from linux_kernel_header.
1373 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
1375 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
1376 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
1377 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
1378 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
1379 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
1380 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
1381 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
1382 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
1383 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
1384 (GRUB_PCI_ADDR_IO_MASK): Likewise.
1386 * include/grub/x86_64/efi/kernel.h: New file.
1388 * include/grub/x86_64/efi/loader.h: Likewise.
1390 * include/grub/x86_64/efi/machine.h: Likewise.
1392 * include/grub/x86_64/efi/pci.h: Likewise.
1394 * include/grub/x86_64/efi/time.h: Likewise.
1396 * include/grub/x86_64/linux.h: Likewise.
1398 * include/grub/x86_64/setjmp.h: Likewise.
1400 * include/grub/x86_64/time.h: Likewise.
1402 * include/grub/x86_64/types.h: Likewise.
1404 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
1405 GRUB_TARGET_SIZEOF_VOID_P.
1407 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
1408 (grub_efi_locate_handle): Likewise.
1409 (grub_efi_open_protocol): Likewise.
1410 (grub_efi_set_text_mode): Likewise.
1411 (grub_efi_stall): Likewise.
1412 (grub_exit): Likewise.
1413 (grub_reboot): Likewise.
1414 (grub_halt): Likewise.
1415 (grub_efi_exit_boot_services): Likewise.
1416 (grub_get_rtc): Likewise.
1418 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
1419 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
1420 (grub_efi_allocate_pages): Wrap efi calls.
1421 (grub_efi_free_pages): Wrap efi calls.
1422 (grub_efi_get_memory_map): Wrap efi calls.
1424 * kern/x86_64/dl.c: New file.
1426 * kern/x86_64/efi/callwrap.S: Likewise.
1428 * kern/x86_64/efi/startup.S: Likewise.
1430 * loader/efi/appleloader.c: Likewise.
1432 * loader/efi/chainloader.c (cmdline): New variable.
1433 (grub_chainloader_unload): Wrap efi calls.
1434 (grub_chainloader_boot): Likewise.
1435 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
1438 * loader/efi/chainloader_normal.c (chainloader_command):
1439 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
1442 * loader/i386/efi/linux.c (allocate_pages): Change allocation
1444 (grub_e820_add_region): New function.
1445 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
1447 (grub_find_video_card): New function.
1448 (grub_linux_setup_video): New function.
1449 (grub_rescue_cmd_linux): Probe for video information.
1451 * normal/x86_64/setjmp.S: New file.
1453 * term/efi/console.c (map_char): New function.
1454 (grub_console_putchar): Map unicode char.
1455 (grub_console_checkkey): Wrap efi calls.
1456 (grub_console_getkey): Likewise.
1457 (grub_console_getwh): Likewise.
1458 (grub_console_gotoxy): Likewise.
1459 (grub_console_cls): Likewise.
1460 (grub_console_setcolorstate): Likewise.
1461 (grub_console_setcursor): Likewise.
1463 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
1465 2008-07-16 Pavel Roskin <proski@gnu.org>
1467 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
1470 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
1471 pointer, not an integer. This fixes a warning and prevents
1472 precision loss on 64-bit systems.
1473 (relocate_addresses): Remove unneeded cast.
1475 2008-07-15 Pavel Roskin <proski@gnu.org>
1477 * kern/i386/ieee1275/init.c: Include grub/cache.h.
1479 * term/ieee1275/ofconsole.c: Disable code unused on i386.
1481 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
1482 Fix comparison between signed and unsigned.
1484 * include/grub/i386/ieee1275/console.h: Declare
1485 grub_console_init() and grub_console_fini().
1487 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
1488 It's empty and unused.
1490 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
1491 beginning to avoid warnings with some compilers.
1493 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
1494 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
1496 2008-07-14 Pavel Roskin <proski@gnu.org>
1498 * kern/env.c (grub_register_variable_hook): Don't copy empty
1499 string, it leaks memory. Pass "" to grub_env_set(), it should
1500 handle constant strings.
1502 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
1503 * commands/cmp.c (grub_cmd_cmp): Likewise.
1504 * kern/dl.c (grub_dl_flush_cache): Likewise.
1505 (grub_dl_load_core): Likewise.
1506 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
1507 (grub_elf64_load_phdrs): Likewise.
1509 2008-07-13 Pavel Roskin <proski@gnu.org>
1511 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
1512 between signed and unsigned.
1513 (LzmaEnc_Finish): Fix warning about an unused parameter.
1515 2008-07-13 Bean <bean123ch@gmail.com>
1517 * Makefile.in (enable_lzo): New rule.
1519 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
1521 * configure.ac (ENABLE_LZO): New option --enable-lzo.
1523 * boot/i386/pc/lnxboot.S: #include <config.h>.
1525 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
1526 its value according to the compression algorithm used, lzo or lzma.
1528 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
1529 compression algorithm according to configure macro.
1531 * kern/i386/pc/startup.S (codestart): Likewise.
1533 * kern/i386/pc/lzma_decode.S: New file.
1535 * include/grub/lib/LzFind.h: Likewise.
1537 * include/grub/lib/LzHash.h: Likewise.
1539 * include/grub/lib/LzmaDec.h: Likewise.
1541 * include/grub/lib/LzmaEnc.h: Likewise.
1543 * include/grub/lib/LzmaTypes.h: Likewise.
1545 * lib/LzFind.c: Likewise.
1547 * lib/LzmaDec.c: Likewise.
1549 * lib/LzmaEnc.c: Likewise.
1551 2008-07-13 Bean <bean123ch@gmail.com>
1553 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
1554 (grub_ext4_extent_header): New structure.
1555 (grub_ext4_extent): Likewise.
1556 (grub_ext4_extent_idx): Likewise.
1557 (grub_ext4_find_leaf): New function.
1558 (grub_ext2_read_block): Handle extents.
1560 2008-07-12 Robert Millan <rmh@aybabtu.com>
1562 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
1564 2008-07-11 Robert Millan <rmh@aybabtu.com>
1566 * util/grub.d/40_custom.in: New file. Example on how to add custom
1567 entries to /etc/grub.d.
1568 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
1569 40_custom (implicitly, by merging all the grub.d rules).
1571 2008-07-11 Pavel Roskin <proski@gnu.org>
1573 * commands/read.c (grub_getline): Fix invalid memory access.
1574 Don't add newline to the variable value.
1576 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
1577 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
1578 (serial_hw_get_port): Check validity of the port number.
1579 (grub_cmd_serial): Check return value of serial_hw_get_port().
1581 2008-07-07 Pavel Roskin <proski@gnu.org>
1583 * boot/i386/pc/diskboot.S (notification_string): Replace
1584 "Loading kernel" with just "loading". This is shorter, less
1585 confusing and saves a few bytes for possible future changes.
1587 2008-07-05 Pavel Roskin <proski@gnu.org>
1589 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
1590 size for ATAPI devices, they are undefined. Output sector
1591 number in decimal form.
1593 * disk/ata.c: Use named constants for status bits.
1595 2008-07-04 Pavel Roskin <proski@gnu.org>
1597 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
1598 grub_addr_t before casting it to the void pointer to fix a
1599 warning. Non-addressable regions are discarded earlier.
1600 (grub_arch_modules_addr): Cast _end to grub_addr_t.
1601 * kern/i386/linuxbios/table.c: Include grub/misc.h.
1602 (check_signature): Don't shadow table_header.
1603 (grub_linuxbios_table_iterate): Cast numeric constants to
1604 grub_linuxbios_table_header_t.
1605 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
1608 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
1611 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
1612 pointer, which can cause warnings. Support 64-bit addresses.
1614 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
1615 of sizeof(long). This fixes PowerPC image generation on x86_64.
1617 2008-07-04 Robert Millan <rmh@aybabtu.com>
1619 This fixes a performance issue when pc & gpt partmap iterators
1620 didn't abort iteration even after our hook found what it was
1621 looking for (often causing expensive probes of non-existent drives).
1623 Some callers relied on previous buggy behaviour, since they would
1624 rise an error when their own hooks caused early abortion of its
1627 * kern/device.c (grub_device_open): Improve error message.
1628 * disk/lvm.c (grub_lvm_open): Likewise.
1629 * disk/raid.c (grub_raid_open): Likewise.
1631 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
1632 when hook requests it, independently of grub_errno.
1633 (pc_partition_map_probe): Do not fail when find_func() caused
1634 early abortion of pc_partition_map_iterate().
1636 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
1637 when hook requests it, independently of grub_errno.
1638 (gpt_partition_map_probe): Do not fail when find_func() caused
1639 early abortion of gpt_partition_map_iterate().
1641 * kern/partition.c (grub_partition_iterate): Abort parent iteration
1642 when hook requests it, independently of grub_errno. Do not fail when
1643 part_map_iterate_hook() caused early abortion of p->iterate().
1645 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
1646 when grub_partition_iterate() returned with non-zero.
1648 2008-07-03 Pavel Roskin <proski@gnu.org>
1650 * disk/ata.c (grub_ata_pio_write): Check status before writing,
1651 like we do in grub_ata_pio_read().
1652 (grub_ata_readwrite): Always write individual sectors. Fix the
1653 sector count for the remainder.
1654 (grub_ata_write): Enable writing to ATA devices. Correctly
1655 report error for ATAPI devices.
1657 2008-07-02 Pavel Roskin <proski@gnu.org>
1659 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
1662 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
1663 for every read sector, we already increment it for the whole
1664 batch. This fixes reading more than 256 sectors at once.
1666 * util/grub-editenv.c (cmd_info): Cast argument to long
1667 explicitly. ptrdiff_t reduces to int on i386.
1669 * util/grub-editenv.c (main): Be specific which parameter is
1672 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
1673 (memdisk): Make memdisk_orig_addr a pointer.
1675 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
1676 for file offsets, use grub_off_t instead. Fix printf format
1679 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
1680 there. Real unexpected warnings should not drown in the noise
1681 about known problems.
1683 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
1684 grub_disk_addr_t for memory addresses.
1686 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
1687 explicitly to fix a warning.
1689 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
1691 * Makefile.in (MODULE_LDFLAGS): New variable.
1692 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
1693 the linker accepts --build-id=none.
1694 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
1696 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
1698 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
1699 those in Linux XFS code. Provide a way to access 64-bit parent
1701 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
1702 the end of struct grub_xfs_dir_header.
1704 2008-07-02 Bean <bean123ch@gmail.com>
1706 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
1707 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
1708 and GRUB_IEEE1275_FLAG_NO_ANSI.
1710 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
1711 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
1712 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
1714 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
1715 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
1717 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
1718 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
1720 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
1721 esc sequence on non ANSI terminal.
1722 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
1724 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
1727 2008-07-02 Bean <bean123ch@gmail.com>
1729 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
1730 (grub_editenv_SOURCES): New variable.
1731 (pkglib_MODULES): Add loadenv.mod.
1732 (loadenv_mod_SOURCES): New variable.
1733 (loadenv_mod_CFLAGS): Likewise.
1734 (loadenv_mod_LDFLAGS): Likewise.
1736 * include/grub/envblk.h: New file.
1738 * util/envblk.c: New file.
1740 * util/grub-editenv.c: New file.
1742 * commands/loadenv.c: New file.
1744 2008-07-01 Pavel Roskin <proski@gnu.org>
1746 * include/multiboot2.h (struct multiboot_tag_module): Use char,
1747 not unsigned char. This fixes warnings and is consistent with
1750 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
1752 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
1754 * term/tparm.c (analyze): Always set *popcount.
1756 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
1757 cast to fix a warning.
1759 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
1760 cast to suppress a warning.
1762 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
1763 grub_fshelp_read_file() expects.
1765 * fs/fat.c: Fix UUID calculation on big-endian systems. We
1766 write uuid as a 32-bit value in CPU byte order, so declare and
1769 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
1770 long if the format specifier expects it.
1771 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
1772 * partmap/pc.c (pc_partition_map_iterate): Likewise.
1773 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
1774 long to fix a warning.
1775 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
1776 grub_dprintf() arguments to fix warnings.
1778 2008-06-30 Pavel Roskin <proski@gnu.org>
1780 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
1781 install_bsd_part immediately before core.img is embedded or
1782 modified on disk. This fixes core.img verification if core.img
1785 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
1786 core_path to calculate the blocklist.
1787 Patch from Javier MartÃn <lordhabbit@gmail.com>
1789 2008-06-29 Robert Millan <rmh@aybabtu.com>
1791 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
1792 block to disk block.
1793 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
1794 Patch from Niels Böhm <bitbucket@arcor.de>
1796 2008-06-29 Robert Millan <rmh@aybabtu.com>
1798 * util/update-grub_lib.in (font_path): Search for fonts in
1799 /boot/grub first, which is more likely to be readable (we aren't
1800 deciding where fonts live, just looking for them).
1802 2008-06-26 Pavel Roskin <proski@gnu.org>
1804 * util/biosdisk.c (read_device_map): Don't leave dead map
1805 entries for devices failing stat() check.
1807 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
1808 core_path_dev for the core.img path on the target device.
1810 2008-06-26 Robert Millan <rmh@aybabtu.com>
1812 * disk/fs_uuid.c: New file.
1813 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
1814 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
1815 (fs_uuid_mod_LDFLAGS): New variables.
1816 * include/grub/disk.h (grub_disk_dev_id): Add
1817 `GRUB_DISK_DEVICE_UUID_ID'.
1818 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
1819 implement iterate().
1821 2008-06-26 Robert Millan <rmh@aybabtu.com>
1823 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
1824 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
1825 Linux image includes no initrd.
1827 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
1829 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
1830 call to resolve the core image location that effectively appended the
1833 2008-06-21 Robert Millan <rmh@aybabtu.com>
1835 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
1838 * util/grub.d/10_hurd.in: ... to here ...
1839 * util/grub.d/10_linux.in: ... and here.
1841 2008-06-19 Robert Millan <rmh@aybabtu.com>
1843 * kern/main.c (grub_main): Export `prefix' variable immediately
1844 after it has been set by grub_machine_set_prefix().
1846 2008-06-19 Robert Millan <rmh@aybabtu.com>
1848 * commands/search.c (search_label, search_fs_uuid, search_file): Print
1849 search result when not saving to variable, not the other way around.
1850 When saving to variable, abort iteration as soon as a match is found.
1852 2008-06-19 Robert Millan <rmh@aybabtu.com>
1854 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
1855 check for partition that provides /boot/grub. Its logic is flawed,
1856 as it prevents prepare_grub_to_access_device() from being called
1859 2008-06-19 Robert Millan <rmh@aybabtu.com>
1861 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
1862 "insmod" command directly when abstraction modules are needed,
1863 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
1864 since it had already been processed).
1866 2008-06-19 Pavel Roskin <proski@gnu.org>
1868 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
1869 changed. This is needed in case GRUB_LIBDIR changes.
1870 * conf/i386-ieee1275.rmk: Likewise.
1871 * conf/i386-linuxbios.rmk: Likewise.
1872 * conf/i386-pc.rmk: Likewise.
1873 * conf/powerpc-ieee1275.rmk: Likewise.
1875 2008-06-18 Pavel Roskin <proski@gnu.org>
1877 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
1878 kernel_elf_symlist.c to symlist.c for consistency with other
1879 architectures. Update all users.
1880 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
1882 2008-06-18 Robert Millan <rmh@aybabtu.com>
1884 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
1887 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
1888 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
1889 a RAID device, run setup() for all members independently on whether
1890 LVM abstraction is being used.
1891 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
1892 If grub-mkimage has set `*install_dos_part == -2', don't override this
1894 Perform *install_dos_part adjustments independently on whether
1895 we're embedding or not.
1896 Clarify error message when image is too big for embedding.
1897 Remove duplicate *install_dos_part stanza.
1899 2008-06-17 Robert Millan <rmh@aybabtu.com>
1901 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
1902 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
1904 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
1905 values in grub_ofconsole_normal_color and
1906 grub_ofconsole_highlight_color (they're not directly related to
1907 background and foreground).
1908 (grub_ofconsole_setcolorstate): Extract background and foreground
1909 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
1911 2008-06-17 Robert Millan <rmh@aybabtu.com>
1913 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
1914 /boot/grub for the check in last commit, not /boot (they could be
1915 different partitions).
1917 2008-06-16 Robert Millan <rmh@aybabtu.com>
1919 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
1920 asked to setup access for the same partition that provides /boot,
1921 don't bother using UUIDs since our root already has the value we
1924 2008-06-16 Robert Millan <rmh@aybabtu.com>
1926 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
1928 Patch from Sven Mueller <sven@debian.org>.
1930 2008-06-16 Robert Millan <rmh@aybabtu.com>
1932 * util/update-grub.in: Check for $EUID instead of $UID.
1933 Reported by Vincent Zweije.
1935 2008-06-16 Bean <bean123ch@gmail.com>
1937 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
1938 (grub_ext2_read_block): Likewise.
1939 (grub_ext2_read_inode): Likewise.
1940 (grub_ext2_mount): Likewise.
1941 (grub_ext2_close): Likewise.
1942 (grub_ext3_get_journal): Removed.
1944 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
1945 (grub_reiserfs_read_symlink): Likewise.
1946 (grub_reiserfs_mount): Likewise.
1947 (grub_reiserfs_open): Likewise.
1948 (grub_reiserfs_read): Likewise.
1949 (grub_reiserfs_close): Likewise.
1950 (grub_reiserfs_get_journal): Removed.
1952 * fs/fshelp.c (grub_fshelp_read): Removed.
1953 (grub_fshelp_map_block): Likewise.
1955 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
1956 (grub_fshelp_journal): Likewise.
1957 (grub_fshelp_read): Likewise.
1958 (grub_fshelp_map_block): Likewise.
1960 2008-06-16 Pavel Roskin <proski@gnu.org>
1962 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
1963 floating point anymore.
1964 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
1966 2008-06-15 Pavel Roskin <proski@gnu.org>
1968 * commands/ls.c (grub_ls_list_files): Use integer calculations
1969 for human readable format, avoid floating point use.
1970 * kern/misc.c (grub_ftoa): Remove.
1971 (grub_vsprintf): Remove floating point support.
1973 2008-06-15 Robert Millan <rmh@aybabtu.com>
1975 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
1977 Reported by Max Vozeler.
1979 2008-06-15 Robert Millan <rmh@aybabtu.com>
1981 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
1982 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
1984 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
1985 the beginning of the prefix.
1987 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
1988 It is assumed that if we have a memdisk, grub-mkimage has set
1989 grub_prefix to include the "(memdisk)" drive in it.
1991 2008-06-15 Robert Millan <rmh@aybabtu.com>
1993 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
1994 Initialize keyboard controller after registering the terminal, so that
1995 grub_printf() can be called from grub_keyboard_controller_init().
1997 2008-06-15 Robert Millan <rmh@aybabtu.com>
1999 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
2000 extent-btree which is written as big endian on disk.
2001 Reported by Alain Greppin <al@chilibi.org>.
2003 2008-06-14 Robert Millan <rmh@aybabtu.com>
2005 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
2006 * util/i386/pc/grub-install.in (modules): Likewise.
2008 2008-06-13 Pavel Roskin <proski@gnu.org>
2010 * commands/ls.c (grub_ls_list_files): Fix format warnings.
2012 2008-06-13 Bean <bean123ch@gmail.com>
2014 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
2016 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
2018 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
2019 to indicate sparse block.
2021 2008-06-12 Pavel Roskin <proski@gnu.org>
2023 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
2024 number, grub_fshelp_read() does it for us.
2026 * fs/fshelp.c (grub_fshelp_read): New function. Implement
2027 linear disk read with journal translation.
2028 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
2029 * include/grub/fshelp.h: Declare grub_fshelp_read().
2031 2008-06-09 Pavel Roskin <proski@gnu.org>
2033 * fs/minix.c (grub_minix_mount): Handle error reading
2036 2008-06-08 Robert Millan <rmh@aybabtu.com>
2038 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
2039 don't append the RAID prefix afterwards.
2040 Reported by Clint Adams.
2042 2008-06-08 Robert Millan <rmh@aybabtu.com>
2044 Based on description from Pavel:
2045 * kern/disk.c (grub_disk_check_range): Rename to ...
2046 (grub_disk_adjust_range): ... this. Add a comment explaining the
2047 tasks performed by this function.
2049 2008-06-08 Robert Millan <rmh@aybabtu.com>
2051 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
2052 `num_serial' (for consistency with other variables).
2053 (struct grub_ntfs_data): Add `uuid' member.
2054 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
2055 (grub_ntfs_uuid): New function.
2056 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2058 2008-06-07 Pavel Roskin <proski@gnu.org>
2060 * util/biosdisk.c (open_device): Revert last change to the
2061 function, it broke installation. The sector needs to be
2062 different dependent on which device is opened.
2064 2008-06-06 Robert Millan <rmh@aybabtu.com>
2066 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
2067 rest of GRUB, and breakage doesn't happen if its value were modified.
2069 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2070 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
2071 a constant (same value).
2072 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
2073 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2075 2008-06-06 Robert Millan <rmh@aybabtu.com>
2077 * util/biosdisk.c (open_device): Do not modify sector offset when
2078 accessing a partition. kern/disk.c already handles this for us.
2080 2008-06-06 Robert Millan <rmh@aybabtu.com>
2082 * util/grub-emu.c (grub_machine_init): Move code in this function from
2084 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
2085 segfault in case grub_printf() is called).
2087 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
2088 grub_probe. Update all users not to explicitly add it again.
2089 (grub_device): New variable; contains corresponding device for grubdir.
2090 (fs_module, partmap_module, devabstraction_module): Pass
2091 `--device ${grub_device}' to grub_probe to avoid traversing /dev
2094 2008-06-05 Robert Millan <rmh@aybabtu.com>
2096 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
2097 is found, print it (same layout as with labels).
2099 2008-06-04 Robert Millan <rmh@aybabtu.com>
2101 * util/biosdisk.c (get_drive): Rename to ...
2102 (find_grub_drive): ... this. Update all users.
2104 (get_os_disk): Rename to ...
2105 (convert_system_partition_to_system_disk): ... this. Update all users.
2107 (find_drive): Rename to ...
2108 (find_system_device): ... this. Update all users.
2110 2008-06-04 Robert Millan <rmh@aybabtu.com>
2112 * util/biosdisk.c (get_os_disk): Handle IDA devices.
2113 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2114 (make_device_map): Likewise.
2116 2008-06-01 Robert Millan <rmh@aybabtu.com>
2118 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
2119 before dereferencing it.
2121 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
2122 union with fat12/fat16-specific ones. Add some new fields, including
2123 `num_serial' for both versions.
2124 (struct grub_fat_data): Add `uuid' member.
2125 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
2126 names. Initialize `data->uuid' using `num_serial'.
2127 (grub_fat_uuid): New function.
2128 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
2130 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
2131 (grub_reiserfs_uuid): New function.
2132 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
2135 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
2136 (grub_xfs_uuid): New function.
2137 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2139 2008-06-01 Robert Millan <rmh@aybabtu.com>
2141 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
2142 code that is backward compatible with pre-uuid search command.
2144 2008-05-31 Robert Millan <rmh@aybabtu.com>
2146 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
2147 floppies after everything else, to ensure floppy drive isn't accessed
2148 unnecessarily (patch from Bean).
2150 2008-05-31 Robert Millan <rmh@aybabtu.com>
2152 * commands/search.c (search_label, search_fs_uuid, search_file): Do
2153 not print device names when we were asked to set a variable.
2155 2008-05-31 Robert Millan <rmh@aybabtu.com>
2157 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
2158 using "cursor-on" and "cursor-off" commands (understood at least by
2159 the Open Firmware flavour on OLPC).
2161 2008-05-31 Michael Gorven <michael@gorven.za.net>
2163 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
2164 on and off sequences.
2166 2008-05-31 Robert Millan <rmh@aybabtu.com>
2168 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
2169 * util/update-grub.in: Likewise.
2171 2008-05-30 Pavel Roskin <proski@gnu.org>
2173 * util/biosdisk.c (linux_find_partition): Simplify logic and
2174 make the code more universal. Keep special processing for
2175 devfs, but use a simple rule for all other devices. If the
2176 device ends with a number, append 'p' and the partition number.
2177 Otherwise, append only the partition number.
2179 2008-05-30 Robert Millan <rmh@aybabtu.com>
2181 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
2182 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
2183 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
2184 the `root' parameter to Linux.
2186 2008-05-30 Robert Millan <rmh@aybabtu.com>
2188 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
2189 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
2190 --fs_uuid with --fs-uuid.
2191 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
2192 all filesystems support them).
2194 2008-05-30 Robert Millan <rmh@aybabtu.com>
2196 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
2197 grub_printf() flags, since we're printing in units of 2 bytes.
2199 2008-05-30 Robert Millan <rmh@aybabtu.com>
2201 * util/grub.d/00_header.in: Remove obsolete comment referencing
2202 convert_system_path_to_grub_path().
2203 * util/update-grub.in: Likewise.
2204 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
2205 (convert_system_path_to_grub_path): Add a warning message explaining
2206 that this function is deprecated. Rely on is_path_readable_by_grub()
2207 for the readability checks.
2208 (font_path): Use is_path_readable_by_grub() for the readability
2209 check rather than convert_system_path_to_grub_path().
2211 2008-05-30 Robert Millan <rmh@aybabtu.com>
2213 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
2214 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
2215 converting it first.
2216 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
2217 grub.cfg for access to font file, and afterwards call it again to set
2220 2008-05-30 Robert Millan <rmh@aybabtu.com>
2222 * commands/search.c (options): Add --fs_uuid option.
2223 (search_fs_uuid): New function.
2224 (grub_cmd_search): Fix --set argument passing.
2225 Use search_fs_uuid() when requested via --fs_uuid.
2226 (grub_search_init): Update help message.
2227 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
2228 and redeclare it as an array of 16-bit words.
2229 (grub_ext2_uuid): New function.
2230 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
2231 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
2232 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
2233 (GRUB_DEVICE_BOOT_UUID): New variables.
2234 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
2235 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
2237 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
2238 just assume `root' variable has the right value.
2239 * util/grub.d/10_linux.in: Likewise.
2240 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
2242 (main): Recognise `-t fs_uuid' argument.
2244 2008-05-30 Robert Millan <rmh@aybabtu.com>
2246 * util/biosdisk.c (map): Redefine structure to hold information
2247 about GRUB drive name.
2248 (get_drive): Reimplement without assuming (and verifying) BIOS-like
2250 (call_hook): Remove.
2251 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
2252 member. Assume drive has partitions.
2253 (grub_util_biosdisk_open): Access device names via `.device' struct
2255 (open_device): Likewise.
2256 (find_drive): Likewise.
2257 (read_device_map): Adjust map[] usage to match the new struct
2258 definition. Don't check for duplicates (still possible, but not cheap
2260 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
2261 (make_device_name): Remove assumption of BIOS-like drive names.
2263 2008-05-30 Pavel Roskin <proski@gnu.org>
2265 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
2266 compiling execute.c doesn't need grub_script.tab.h anymore.
2267 (normal/command.c_DEPENDENCIES): Likewise.
2268 (normal/function.c_DEPENDENCIES): Likewise.
2269 * conf/i386-ieee1275.rmk: Likewise.
2270 * conf/i386-linuxbios.rmk: Likewise.
2271 * conf/i386-pc.rmk: Likewise.
2272 * conf/powerpc-ieee1275.rmk: Likewise.
2273 * conf/sparc64-ieee1275.rmk: Likewise.
2275 2008-05-29 Pavel Roskin <proski@gnu.org>
2277 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
2278 when scanning metadata for volume group name.
2280 * include/grub/script.h: Don't include grub_script.tab.h. It's
2281 a generated file, which may only be included from the files with
2282 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
2283 use union YYSTYPE, as the later allows forward declaration.
2284 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
2286 2008-05-29 Robert Millan <rmh@aybabtu.com>
2288 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
2289 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
2290 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
2291 (grub_console_checkkey): Add grub_dprintf() call to report unknown
2294 2008-05-29 Robert Millan <rmh@aybabtu.com>
2296 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
2297 control key combinations.
2299 2008-05-29 Robert Millan <rmh@aybabtu.com>
2301 * util/powerpc/ieee1275/grub-install.in: Move from here ...
2302 * util/ieee1275/grub-install.in: ... to here.
2303 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
2304 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
2305 (grub_install_SOURCES): Likewise.
2307 2008-05-29 Robert Millan <rmh@aybabtu.com>
2309 * fs/affs.c: Update copyright year.
2310 * fs/ext2.c: Likewise.
2311 * fs/fshelp.c: Likewise.
2312 * fs/hfsplus.c: Likewise.
2313 * fs/ntfs.c: Likewise.
2314 * fs/xfs.c: Likewise.
2315 * include/grub/fshelp.h: Likewise.
2316 * util/grub-mkdevicemap.c: Likewise.
2318 2008-05-28 Robert Millan <rmh@aybabtu.com>
2320 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
2321 might need to be fatfs to support some firmware implementations
2324 2008-05-28 Robert Millan <rmh@aybabtu.com>
2326 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
2328 * util/grub-mkdevicemap.c (get_mmc_disk_name)
2329 (make_device_map): Likewise.
2331 2008-05-20 Bean <bean123ch@gmail.com>
2333 * fs/fshelp.c (grub_fshelp_map_block): New function.
2334 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
2335 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
2337 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
2338 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
2339 (grub_fshelp_journal): New structure.
2340 (grub_fshelp_map_block): New function prototype.
2341 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
2342 (grub_fshelp_map_block): Likewise.
2344 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
2345 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
2346 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
2347 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
2348 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
2349 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
2350 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
2351 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
2352 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
2353 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
2354 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
2355 (grub_ext2_sblock): New members for journal support.
2356 (grub_ext3_journal_header): New structure.
2357 (grub_ext3_journal_revoke_header): Likewise.
2358 (grub_ext3_journal_block_tag): Likewise.
2359 (grub_ext3_journal_sblock): Likewise.
2360 (grub_fshelp_node): New members logfile and journal.
2361 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
2362 grub_fshelp_map_block to get real block number.
2363 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
2365 (grub_ext2_read_inode): Likewise.
2366 (grub_ext3_get_journal): New function.
2367 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
2368 (grub_ext2_close): Release memory used by journal.
2370 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
2371 (REISERFS_MAGIC_DESC_BLOCK): New macro.
2372 (grub_reiserfs_transaction_header): Renamed to
2373 grub_reiserfs_description_block, replace field data with real_blocks.
2374 (grub_reiserfs_commit_block): New structure.
2375 (grub_reiserfs_data): New member journal.
2376 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
2378 (grub_reiserfs_read_symlink): Likewise.
2379 (grub_reiserfs_iterate_dir): Likewise.
2380 (grub_reiserfs_open): Likewise.
2381 (grub_reiserfs_read): Likewise.
2382 (grub_reiserfs_get_journal): New function.
2383 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
2384 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
2385 using grub_reiserfs_get_journal.
2386 (grub_reiserfs_close): Release memory used by journal.
2388 * fs/affs.c (grub_affs_read_block): Change block type to
2389 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
2391 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
2393 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
2395 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
2397 * fs/udf.c (grub_udf_read_block): Change block type to
2398 grub_disk_addr_t. Use type cast to avoid warning.
2400 * fs/xfs.c (grub_xfs_read_block): Likewise.
2402 2008-05-16 Christian Franke <franke@computer.org>
2404 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
2405 to ensure that break with ESC will always work.
2406 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
2407 Remove ESC from keyboard queue.
2409 2008-05-16 Christian Franke <franke@computer.org>
2411 * util/biosdisk.c: [__CYGWIN__] Add includes.
2412 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
2413 (get_os_disk): Move variable declarations to OS specific
2414 parts to avoid warning.
2415 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
2416 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
2417 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
2419 * util/getroot.c: [__CYGWIN__] Add includes.
2420 (strip_extra_slashes): Fix "/" case.
2421 [__CYGWIN__] (get_win32_path): New function.
2422 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
2423 [__CYGWIN__] (find_root_device): Disable.
2424 [__CYGWIN__] (get_bootsec_serial): New function.
2425 [__CYGWIN__] (find_cygwin_root_device): Likewise.
2426 [__linux__] (grub_guess_root_device): Add early returns to simplify
2428 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
2429 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
2430 check for Linux only.
2432 2008-05-15 Bean <bean123ch@gmail.com>
2434 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
2435 keyboard hang problem in apple's intel mac.
2437 2008-05-09 Robert Millan <rmh@aybabtu.com>
2439 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
2441 * util/grub-mkdevicemap.c (get_virtio_disk_name)
2442 (make_device_map): Likewise.
2443 Reported by Aurelien Jarno <aurel32@debian.org>
2445 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
2447 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
2448 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
2449 (make_device_map): Output entries for xvd type disks.
2451 2008-05-07 Robert Millan <rmh@aybabtu.com>
2453 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
2455 * util/grub-mkdevicemap.c (get_cciss_disk_name)
2456 (make_device_map): Likewise.
2457 Reported by Roland Dreier <rdreier@cisco.com>
2459 2008-05-07 Robert Millan <rmh@aybabtu.com>
2461 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
2462 grub_strstr() call. Correct a few mistakes in failure path handling.
2464 2008-05-06 Robert Millan <rmh@aybabtu.com>
2466 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2467 Do not print a trailing slash (therefore, the root directory is an
2469 (convert_system_path_to_grub_path): Do not remove trailing slash
2470 from make_system_path_relative_to_its_root() output.
2472 * util/i386/pc/grub-install.in: Add trailing slash to output from
2473 make_system_path_relative_to_its_root().
2475 2008-05-06 Robert Millan <rmh@aybabtu.com>
2477 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
2478 ensures that output lines aren't intermangled with those sent to
2479 stderr (via grub_util_info()).
2480 * util/grub-probe.c (grub_refresh): Likewise.
2481 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
2483 2008-05-05 Christian Franke <franke@computer.org>
2485 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
2486 Add Cygwin device names.
2487 (get_ide_disk_name) [__CYGWIN__]: Likewise.
2488 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
2489 (check_device): Return error instead of success on empty name.
2490 (make_device_map): Move label inside linux specific code to
2491 prevent compiler warning.
2493 2008-04-30 Robert Millan <rmh@aybabtu.com>
2495 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
2496 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
2498 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
2500 2008-04-29 Robert Millan <rmh@aybabtu.com>
2502 * docs/grub.cfg: New file (example GRUB configuration).
2504 2008-04-26 Robert Millan <rmh@aybabtu.com>
2506 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
2507 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
2508 and `disk/ieee1275/nand.c'.
2510 2008-04-25 Bean <bean123ch@gmail.com>
2512 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
2515 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
2516 change the buffer size to 4096 for cdrom device.
2518 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
2520 (_linux_mod_SOURCES): New variable.
2521 (_linux_mod_CFLAGS): Likewise.
2522 (_linux_mod_LDFLAGS): Likewise.
2523 (linux_mod_SOURCES): Likewise.
2524 (linux_mod_CFLAGS): Likewise.
2525 (linux_mod_LDFLAGS): Likewise.
2526 (nand_mod_SOURCES): Likewise.
2527 (nand_mod_CFLAGS): Likewise.
2528 (nand_mod_LDFLAGS): Likewise.
2530 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
2531 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
2532 type property. (nand device in olpc don't have this property)
2534 * include/grub/disk.h (grub_disk_dev_id): New macro
2535 GRUB_DISK_DEVICE_NAND_ID.
2537 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
2539 (grub_rescue_cmd_initrd): Likewise.
2541 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
2542 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
2543 ofw_cif_handler and ofw_idt, adjust padding number.
2545 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
2546 GRUB_MACHINE_IEEE1275 is defined.
2548 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
2549 Use NESTED_FUNC_ATTR attribute on the hook parameter.
2551 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
2552 on nested function heap_init.
2553 (grub_upper_mem): New variable for i386-ieee1275.
2554 (grub_get_extended_memory): New function for i386-ieee1275.
2555 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
2557 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
2558 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
2561 * loader/i386/ieee1275/linux.c: New file.
2563 * loader/i386/ieee1275/linux_normal.c: New file.
2565 * disk/ieee1275/nand.c: New file.
2567 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
2569 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
2571 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
2573 2008-04-18 Robert Millan <rmh@aybabtu.com>
2575 Restructures early code path on ieee1275 to unify grub_main() as
2576 the first C function that is executed in every platform.
2578 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
2579 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
2581 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
2582 * kern/ieee1275/cmain.c (cmain): Rename to ...
2583 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
2584 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
2587 2008-04-18 Robert Millan <rmh@aybabtu.com>
2589 * util/update-grub.in: Fix syntax error when setting
2590 `GRUB_PRELOAD_MODULES'.
2591 Reported by Stephane Chazelas <stephane@artesyncp.com>
2593 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
2595 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
2596 section into account, newer toolchains generate unique build ids
2597 * configure.ac: remove the test for --build-id=none acceptance,
2598 we want build ids to be preserved
2599 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
2600 far from other sections don't cause the raw binary images grow
2603 2008-04-15 Robert Millan <rmh@aybabtu.com>
2605 * disk/lvm.c: Update copyright year.
2606 * kern/misc.c: Likewise.
2608 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
2610 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
2611 there is no memory left for physical volume name.
2613 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
2615 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
2616 volume name mapping to support bigger than 9 character names properly.
2618 2008-04-13 Robert Millan <rmh@aybabtu.com>
2620 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
2621 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
2623 2008-04-13 Christian Franke <franke@computer.org>
2625 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
2626 to create a floppy emulation boot CD when non emulation mode
2628 Enable Joliet CD filesystem extension.
2630 2008-04-13 Robert Millan <rmh@aybabtu.com>
2632 * kern/misc.c (grub_strncat): Fix off-by-one error.
2633 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
2635 * kern/env.c (grub_env_context_close): Clear current context, not
2637 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
2639 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
2641 2008-04-13 Robert Millan <rmh@aybabtu.com>
2643 Improve robustness when handling LVM.
2645 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
2646 (and leave `*p' unmodified).
2647 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
2649 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
2650 iterating through it.
2651 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
2653 (grub_lvm_scan_device): Check the return value (and fail gracefully
2654 when due) on each grub_lvm_getvalue() or grub_strstr() call.
2655 Don't assume `vg->pvs != NULL' when iterating through it.
2657 2008-04-13 Robert Millan <rmh@aybabtu.com>
2659 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
2660 * genmk.rb (partmap): New variable.
2661 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
2662 (#{partmap}): New target rule.
2663 * genpartmaplist.sh: New file.
2664 * Makefile.in (pkglib_DATA): Add partmap.lst.
2665 (partmap.lst): New target rule.
2666 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
2667 modules (including all partition maps), instead of preloading them.
2669 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
2671 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
2672 `linux-boot-prober' (if installed) to detect other operating
2673 systems which are installed on the computer and add them to
2675 * conf/common.rmk: Build and install 30_os-prober.
2677 2008-04-12 Robert Millan <rmh@aybabtu.com>
2679 * kern/powerpc/ieee1275/init.c: Move from here ...
2680 * kern/ieee1275/init.c: ... to here. Update all users.
2682 * kern/powerpc/ieee1275/cmain.c: Move from here ...
2683 * kern/ieee1275/cmain.c: ... to here. Update all users.
2685 * kern/powerpc/ieee1275/openfw.c: Move from here ...
2686 * kern/ieee1275/openfw.c: ... to here. Update all users.
2688 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
2689 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
2691 2008-04-10 Pavel Roskin <proski@gnu.org>
2693 * configure.ac: Always use "_cv_" in cache variables for
2694 compatibility with Autoconf 2.62.
2696 2008-04-07 Robert Millan <rmh@aybabtu.com>
2698 Revert grub/machine/init.h addition by Pavel (since it breaks on
2699 i386-ieee1275 and others):
2700 * util/i386/pc/misc.c: Remove grub/machine/init.h.
2701 * util/powerpc/ieee1275/misc.c: Likewise.
2703 2008-04-07 Robert Millan <rmh@aybabtu.com>
2705 * util/grub-probe.c (probe): Improve error message.
2707 2008-04-07 Robert Millan <rmh@aybabtu.com>
2709 * util/biosdisk.c (read_device_map): Skip devices that don't exist
2710 (this prevents the presence of a bogus entry from ruining the whole
2713 2008-04-06 Pavel Roskin <proski@gnu.org>
2715 * util/biosdisk.c: Include grub/util/biosdisk.h.
2716 * util/grub-fstest.c (execute_command): Make static.
2717 * util/grub-mkdevicemap.c (check_device): Likewise.
2718 * util/i386/pc/misc.c: Include grub/machine/init.h.
2719 * util/powerpc/ieee1275/misc.c: Likewise.
2720 * util/lvm.c: Include grub/util/lvm.h.
2721 * util/misc.c: Include grub/kernel.h, grub/misc.h and
2723 * util/raid.c: Include grub/util/raid.h.
2724 (grub_util_getdiskname): Make static.
2726 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
2727 grub_hostfs_fini(), as they are called from grub_init_all() and
2728 grub_fini_all() respectively. This fixes an infinite loop in
2729 grub-fstest due to double registration of hostfs.
2730 Reported by Christian Franke <Christian.Franke@t-online.de>
2732 2008-04-05 Pavel Roskin <proski@gnu.org>
2734 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
2735 all 8 functions. Otherwise, probe function 0 only.
2737 2008-04-04 Pavel Roskin <proski@gnu.org>
2739 * commands/lspci.c (grub_lspci_iter): Print the bus number
2742 * commands/lspci.c (grub_pci_classes): Fix typos.
2743 (grub_lspci_iter): Don't print func twice. Print vendor ID
2744 before device ID, as it's normally done.
2746 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
2747 Fix signedness warnings.
2748 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
2750 * util/ieee1275/get_disk_name.c: Include config.h so that
2751 _GNU_SOURCE is defined and getline() is declared. Mark an
2752 unused argument as such. Fix a signedness warning.
2754 2008-04-02 Pavel Roskin <proski@gnu.org>
2756 * genkernsyms.sh.in: Use more robust assignments for CC and
2757 srcdir. Quote srcdir.
2758 * gensymlist.sh.in: Likewise. Assert at the compile time that
2759 the symbol table is not empty.
2761 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
2762 * fs/cpio.c (grub_cpio_read): Likewise.
2764 2008-04-01 Pavel Roskin <proski@gnu.org>
2766 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
2767 * disk/host.c (grub_host_open): Likewise.
2768 * disk/loopback.c (grub_loopback_open): Likewise.
2769 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
2770 disk->id as in disk/host.c, not a multi-character constant.
2772 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
2773 later is obsolete, potentially dangerous and sets a bad example.
2774 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
2775 * util/misc.c (grub_util_get_image_size): Likewise.
2777 * disk/loopback.c (options): Improve help for "--partitions".
2779 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
2780 options to align them with the short options, e.g. "echo -e".
2782 2008-03-31 Bean <bean123ch@gmail.com>
2784 * video/reader/png.c (grub_png_data): New member is_16bit and
2786 (grub_png_decode_image_header): Detect 16 bit png image.
2787 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
2788 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
2789 (grub_video_reader_png): Release memory occupied by image_data.
2791 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
2793 (grub_nfs_mount): Skip the test for sector per cluster.
2795 * include/grub/ntfs.h (MAX_SPC): Removed.
2797 2008-03-31 Bean <bean123ch@gmail.com>
2799 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
2800 (grub_probe_SOURCES): Add fs/afs.c.
2801 (grub_fstest_SOURCES): Likewise.
2802 (afs_mod_SOURCES): New variable.
2803 (afs_mod_CFLAGS): Likewise.
2804 (afs_mod_LDFLAGS): Likewise.
2806 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
2807 (grub_emu_SOURCES): Likewise.
2809 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2811 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2813 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
2815 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2817 * fs/afs.c: New file.
2819 2008-03-30 Pavel Roskin <proski@gnu.org>
2821 * disk/host.c: Include grub/misc.h to fix a warning.
2822 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
2823 warnings about implicit declarations.
2825 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
2827 * include/grub/i386/loader.h: Change declaration of
2828 grub_linux_boot() to match what grub_loader_set() expects.
2829 * util/getroot.c (grub_guess_root_device): Return const char* to
2831 * util/grub-probe.c (probe): Fix a warning about uninitialized
2832 abstraction_name variable.
2833 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
2834 second argument as unused to fix a warning.
2836 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
2837 missing grub_error() call.
2839 * util/update-grub_lib.in: Define datarootdir, since Autoconf
2840 2.60 and newer uses it to define datadir.
2842 * commands/sleep.c: Fix warning about implicit declaration.
2843 * disk/memdisk.c: Likewise.
2844 * loader/aout.c: Likewise.
2845 * loader/i386/bsd_normal.c: Likewise.
2846 * util/grub-probe.c: Likewise.
2848 * commands/i386/cpuid.c (has_longmode): Make static.
2849 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
2850 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
2852 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
2853 GDT. This is more robust, as %ds can change.
2854 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
2855 calling real_to_prot().
2856 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
2858 2008-03-28 Pavel Roskin <proski@gnu.org>
2860 * kern/i386/pc/startup.S: Assert that uncompressed functions
2861 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
2862 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
2863 code, as they push parts of the code (error handlers) beyond
2864 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
2865 code as correctness and size.
2867 2008-03-28 Pavel Roskin <proski@gnu.org>
2869 * kern/i386/pc/startup.S
2870 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
2871 data block address to the real mode, keep offset minimal. This
2872 works around a bug in AWARD BIOS on old Athlon systems, which
2873 makes CD detection hang.
2875 2008-03-26 Pavel Roskin <proski@gnu.org>
2877 * normal/color.c (grub_parse_color_name_pair): Make `name' a
2879 * include/grub/normal.h: Add grub_parse_color_name_pair()
2882 2008-03-24 Bean <bean123ch@gmail.com>
2884 * disk/i386/pc/biosdisk.c (cd_start): Removed.
2885 (cd_count): Removed.
2886 (cd_drive): New variable.
2887 (grub_biosdisk_get_drive): Don't check for (cdN) device.
2888 (grub_biosdisk_call_hook): Likewise.
2889 (grub_biosdisk_iterate): Change cdrom detection method.
2890 (grub_biosdisk_open): Replace cd_start with cd_drive.
2891 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
2892 detect cdrom device.
2894 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
2896 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
2897 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
2898 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
2899 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
2900 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
2901 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
2902 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
2903 (grub_biosdisk_cdrp): New structure.
2904 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
2906 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
2908 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
2911 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
2914 2008-03-20 Robert Millan <rmh@aybabtu.com>
2916 Remove 2 TiB limit in ata.mod.
2917 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
2918 (grub_ata_dumpinfo): Print sector count with 0x%llx.
2919 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
2920 grub_uint64_t instead of grub_uint32_t.
2922 2008-03-05 Bean <bean123ch@gmail.com>
2924 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
2925 (grub_multiboot): Set boot device.
2927 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
2929 2008-03-02 Bean <bean123ch@gmail.com>
2931 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
2934 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
2936 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
2939 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
2942 * docs/fdl.texi: New file.
2944 * docs/mdate-sh: New file. Copied from gnulib.
2945 * docs/texinfo.tex: Likewise.
2947 * config.guess: Updated from gnulib.
2948 * install-sh: Likewise.
2950 2008-02-28 Robert Millan <rmh@aybabtu.com>
2952 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
2953 (aout_mod_SOURCES): New variable.
2954 (aout_mod_CFLAGS): Likewise.
2955 (aout_mod_LDFLAGS): Likewise.
2957 * conf/i386-ieee1275.rmk: Likewise.
2959 2008-02-28 Robert Millan <rmh@aybabtu.com>
2961 * util/update-grub.in: Reorganise terminal validity check. Accept
2962 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
2963 Based on suggestion by Franklin PIAT.
2965 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
2967 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
2969 * util/getroot.c (grub_util_check_block_device): New function that
2970 returns the given argument if it is a block device and returns NULL else.
2971 * util/grub-probe.c (argument_is_device): New variable.
2972 (probe): Promote device_name from a variable to an argument. Receive
2973 device_name from grub_util_check_block_device() if path is NULL and from
2974 grub_guess_root_device() else. Do not free() device_name anymore.
2975 (options): Introduce new parameter '-d, --device'.
2976 (main): Add description of the new parameter to the help screen.
2977 Rename path variable to argument. Set argument_is_device if the '-d'
2978 option is given. Pass argument to probe() depending on
2981 2008-02-24 Bean <bean123ch@gmail.com>
2983 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
2984 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
2985 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
2986 (GRUB_ISO9660_VOLDESC_PART): Likewise.
2987 (GRUB_ISO9660_VOLDESC_END): Likewise.
2988 (grub_iso9660_primary_voldesc): New member escape.
2989 (grub_iso9660_data): New member joliet.
2990 (grub_iso9660_convert_string): New function.
2991 (grub_iso9660_mount): Detect joliet extension.
2992 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
2993 (grub_iso9660_iso9660_label): Likewise.
2995 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
2996 (grub_setup_SOURCES): Add fs/udf.c.
2997 (grub_fstest_SOURCES): Likewise.
2998 (udf_mod_SOURCES): New variable.
2999 (udf_mod_CFLAGS): Likewise.
3000 (udf_mod_LDFLAGS): Likewise.
3002 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
3003 (grub_emu_SOURCES): Likewise.
3005 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3007 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3009 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3011 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3013 * fs/udf.c: New file.
3015 2008-02-24 Robert Millan <rmh@aybabtu.com>
3017 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
3018 (normal/lexer.c_DEPENDENCIES): New variables.
3019 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3020 (normal/lexer.c_DEPENDENCIES): Likewise.
3021 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
3022 (normal/lexer.c_DEPENDENCIES): Likewise.
3023 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
3024 (normal/lexer.c_DEPENDENCIES): Likewise.
3025 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3026 (normal/lexer.c_DEPENDENCIES): Likewise.
3027 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
3028 (normal/lexer.c_DEPENDENCIES): Likewise.
3030 2008-02-23 Robert Millan <rmh@aybabtu.com>
3032 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
3033 since they were intended to be in hex. This didn't break previously
3034 because of a bug in gpt_partition_map_iterate() (see below).
3036 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
3037 when checking the validity of GPT header.
3038 Remove `partno', since it always provides the same information as `i'.
3040 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
3042 * include/grub/efi/time.h: Fix a wrong comment.
3044 2008-02-19 Pavel Roskin <proski@gnu.org>
3046 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
3049 2008-02-19 Bean <bean123ch@gmail.com>
3051 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
3052 (aout_mod_SOURCES): New variable.
3053 (aout_mod_CFLAGS): Likewise.
3054 (aout_mod_LDFLAGS): Likewise.
3055 (_bsd_mod_SOURCES): New variable.
3056 (_bsd_mod_CFLAGS): Likewise.
3057 (_bsd_mod_LDFLAGS): Likewise.
3058 (bsd_mod_SOURCES): New variable.
3059 (bsd_mod_CFLAGS): Likewise.
3060 (bsd_mod_LDFLAGS): Likewise.
3062 * include/grub/aout.h: New file.
3064 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
3066 * include/grub/i386/bsd.h: New file.
3068 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
3071 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
3072 function is called, so that it's possible to change it inside the hook.
3073 (grub_elf64_load): Likewise.
3074 (grub_elf_file): Don't close the file if elf header is not found.
3075 (grub_elf_close): Close the file if grub_elf_file fails (The new
3076 grub_elf_file won't close it).
3077 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
3078 (grub_elf64_size): Likewise.
3080 * kern/i386/loader.S (grub_unix_real_boot): New function.
3082 * loader/aout.c: New file.
3084 * loader/i386/bsd.c: New file.
3086 * loader/i386/bsd_normal.c: New file.
3088 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
3090 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
3091 can test other formats.
3093 2008-02-19 Robert Millan <rmh@aybabtu.com>
3095 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
3096 (grub_gpt_partition_type_empty): Redefine with macro from
3097 `<grub/gpt_partition.h>'.
3098 (gpt_partition_map_iterate): Adjust partition type comparison.
3100 Export `entry' as partmap-specific `part.data' struct.
3101 (grub_gpt_header, grub_gpt_partentry): Move from here ...
3103 * include/grub/gpt_partition.h (grub_gpt_header)
3104 (grub_gpt_partentry): ... to here (new file).
3106 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
3108 (grub_gpt_partition_type_bios_boot): New const variable, defined
3109 with macro from `<grub/gpt_partition.h>'.
3111 (setup): Replace `first_start' with `embed_region', which keeps
3112 track of the embed region (and is partmap-agnostic).
3114 Replace find_first_partition_start() with find_usable_region(),
3115 which finds a usable region for embedding using partmap-specific
3116 knowledge (supports PC/MSDOS and GPT).
3118 Fix all assumptions that the embed region start at sector 1, using
3119 `embed_region.start' from now on. Similarly, use `embed_region.end'
3120 rather than `first_start' to calculate available size.
3122 In grub_util_info() message, replace "into after the MBR" with an
3123 indication of the specific sector our embed region starts at.
3125 2008-02-19 Robert Millan <rmh@aybabtu.com>
3127 * DISTLIST: Replace `commands/ieee1275/halt.c' and
3128 `commands/ieee1275/reboot.c' with `commands/halt.c' and
3129 `commands/reboot.c'.
3130 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3131 (halt_mod_SOURCES): Likewise.
3132 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
3133 (halt_mod_SOURCES): Likewise.
3135 2008-02-17 Christian Franke <franke@computer.org>
3137 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
3139 2008-02-17 Robert Millan <rmh@aybabtu.com>
3141 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3142 set `first_start' to 0 for non-PC/MSDOS partition maps.
3144 2008-02-16 Robert Millan <rmh@aybabtu.com>
3146 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
3147 do not assume partition map is PC/MSDOS before performing checks that
3148 are specific to that layout.
3150 2008-02-13 Robert Millan <rmh@aybabtu.com>
3152 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
3153 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
3154 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
3156 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
3158 * configure.ac: Only a cosmetic change on the handling of
3159 -fno-stack-protector.
3161 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
3163 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
3164 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
3166 (grub_install_SOURCES): Add halt.mod and reboot.mod.
3167 (halt_mod_SOURCES): New variable.
3168 (halt_mod_CFLAGS): Likewise.
3169 (halt_mod_LDFLAGS): Likewise.
3170 (reboot_mod_SOURCES): Likewise.
3171 (reboot_mod_CFLAGS): Likewise.
3172 (reboot_mod_LDFLAGS): Likewise.
3174 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
3175 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
3177 (halt_mod_SOURCES): Likewise.
3178 (reboot_mod_SOURCES): Likewise.
3180 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
3181 commands/i386/pc/reboot.c by commands/reboot.c.
3182 (reboot_mod_SOURCES): Likewise.
3184 * commands/i386/pc/reboot.c: merge this file ...
3186 * commands/ieee1275/reboot.c: ... and this file ...
3188 * commands/reboot.c: ... to this file.
3189 Add some precompiler directive to include the correct header for
3192 * commands/ieee1275/halt.c: move this file ...
3194 * commands/halt.c: ... to here.
3195 Add some precompiler directive to include the correct header for
3198 * include/grub/efi/efi.h (grub_reboot): New function declaration.
3199 (grub_halt): Likewise.
3201 * kern/efi/efi.c (grub_reboot): New function.
3202 (grub_halt): Likewise.
3204 2008-02-12 Robert Millan <rmh@aybabtu.com>
3206 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
3207 /dev (like it is done for /dev/mapper). This doesn't provide support
3208 for EVMS, but at least it is now easy to identify the problem when it
3211 2008-02-11 Robert Millan <rmh@aybabtu.com>
3213 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
3214 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
3215 comparing it with -1, not 0.
3217 2008-02-10 Robert Millan <rmh@aybabtu.com>
3219 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
3221 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3222 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
3224 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
3225 `disk/lvm.c' to the end of the list.
3226 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3227 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3229 2008-02-10 Robert Millan <rmh@aybabtu.com>
3231 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
3232 grub_print_error() instead. This will let user know why we're entering
3234 Based on suggestions from Sam Morris.
3236 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
3238 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
3239 on remaining N args, instead of "--" arg N times.
3241 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
3243 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
3244 (fill_with_default_glyph): Changed to use unknown_glyph for fill
3245 pattern for unknown glyphs.
3247 2008-02-09 Robert Millan <rmh@aybabtu.com>
3249 * configure.ac: Probe for `help2man'.
3250 * Makefile.in (builddir): New variable.
3251 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
3252 or otherwise add a few flags/options to it.
3253 (install-local): For every executable utility or script that is
3254 installed, invoke $(HELP2MAN) to install a manpage based on --help
3257 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
3258 that it doesn't prevent --help from working in build tree.
3260 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
3261 with `bug-grub@gnu.org'.
3262 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
3263 * util/update-grub.in (usage): New function.
3264 Implement proper argument check, with support for --help and --version
3265 (as well as existing -y).
3267 2008-02-09 Christian Franke <franke@computer.org>
3269 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
3270 avoid overwriting previous output.
3271 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
3273 2008-02-09 Robert Millan <rmh@aybabtu.com>
3275 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
3278 2008-02-09 Robert Millan <rmh@aybabtu.com>
3280 * commands/sleep.c: New file.
3281 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
3282 (sleep_mod_SOURCES): New variable.
3283 (sleep_mod_CFLAGS): Likewise.
3284 (sleep_mod_LDFLAGS): Likewise.
3286 2008-02-09 Robert Millan <rmh@aybabtu.com>
3288 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
3289 situations in which we can deduce the RAID size and the superblock
3292 2008-02-09 Robert Millan <rmh@aybabtu.com>
3294 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
3295 and return a grub_diskmemberlist_t composed of LVM physical volumes.
3296 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
3298 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
3299 and return a grub_diskmemberlist_t composed of physical array members.
3300 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
3302 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
3304 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
3305 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
3306 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
3308 * util/grub-probe.c (probe): Move partmap probing code from here ...
3309 (probe_partmap): ... to here.
3310 (probe): Use probe_partmap() once for the disk we're probing, and
3311 additionally, when such disk contains a memberlist() struct member,
3312 once for each disk that is contained in the structure returned by
3315 2008-02-09 Robert Millan <rmh@aybabtu.com>
3317 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
3318 environment variable to 'all' in order to obtain debug output from
3320 * util/i386/pc/grub-setup.c (main): Likewise.
3322 2008-02-08 Robert Millan <rmh@aybabtu.com>
3324 * disk/raid.c (grub_raid_scan_device): Check for
3325 `array->device[sb.this_disk.number]' rather than for
3326 `array->device[sb.this_disk.number]->name', since the latter is not
3327 guaranteed to be accessible.
3329 2008-02-08 Robert Millan <rmh@aybabtu.com>
3331 * disk/raid.c: Update copyright.
3332 * fs/cpio.c: Likewise.
3333 * include/grub/raid.h: Likewise.
3334 * loader/i386/pc/multiboot.c: Likewise.
3335 * util/hostfs.c: Likewise.
3337 2008-02-08 Robert Millan <rmh@aybabtu.com>
3339 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
3340 to a grub_disk_t array.
3341 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
3343 (grub_raid_scan_device): Replace `device[x].name' accesses with
3344 `device[x]->name'. Simplify initialization of `array->device[x]'.
3346 2008-02-08 Robert Millan <rmh@aybabtu.com>
3348 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
3349 grub_dprintf() calls.
3350 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
3353 2008-02-07 Christian Franke <franke@computer.org>
3355 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
3356 instead of fseek and ftell to support large files.
3357 (grub_hostfs_read): Likewise.
3359 2008-02-07 Robert Millan <rmh@aybabtu.com>
3361 Patch from Jeroen Dekkers.
3362 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
3363 failure, since successfully reading all array members might not be
3366 2008-02-06 Robert Millan <rmh@aybabtu.com>
3368 * util/grub-probe.c (probe): Simplify partmap probing (with the
3369 assumption that the first word up to the underscore equals to
3372 2008-02-06 Christian Franke <franke@computer.org>
3374 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
3375 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
3376 last block of a cpio or tar stream.
3377 Check for "TRAILER!!!" instead of any empty data
3378 block to detect last block of a cpio stream.
3379 (grub_cpio_dir): Fix constness of variable np.
3380 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
3381 cpio or tar trailer is detected. This fixes a crash
3382 on open of a non existing file.
3384 2008-02-05 Bean <bean123ch@gmail.com>
3386 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
3388 (grub_multiboot_load_elf64): Likewise.
3389 (grub_multiboot): Initialize mbi structure.
3391 * util/grub-fstest.c: Don't include unused header file script.h.
3393 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
3395 (grub_fstest_SOURCES): Likewise.
3397 2008-02-05 Robert Millan <rmh@aybabtu.com>
3399 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
3400 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
3401 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
3402 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
3404 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
3405 (translation_table): Replace hardcoded values with macros
3406 provided by `<grub/term.h>'.
3408 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
3409 (keyboard_map): Correct/add a few values, with macros provided
3411 (keyboard_map_shift): Zero values that don't differ from their
3412 `keyboard_map' equivalents.
3413 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
3414 Discard the second scan code that is always sent by Caps lock.
3415 Only use `keyboard_map_shift' when it provides a non-zero value,
3416 otherwise fallback to `keyboard_map'.
3418 2008-02-04 Bean <bean123ch@gmail.com>
3420 * Makefile.in (enable_grub_fstest): New variable.
3422 * conf/common.rmk (grub_fstest_init.lst): New rule.
3423 (grub_fstest_init.h): Likewise.
3424 (grub_fstest_init.c): Likewise.
3425 (util/grub-fstest.c_DEPENDENCIES): New variable.
3426 (grub_fstest_SOURCES): Likewise.
3428 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
3430 * util/grub-fstest.c: New file.
3432 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3434 Make grub-setup handle a separate root device.
3436 * util/i386/pc/grub-setup.c (setup): Always open the root device,
3437 so that the root device can be compared with the destination
3439 When embedding the core image, if the root and destination devices
3440 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
3442 When not embedding, set ROOT_DRIVE to 0xFF.
3444 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3446 Add support for having a grub directory in a different drive. This
3447 is still only the data handling part.
3449 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
3450 (codestart): Save %dh in GRUB_ROOT_DRIVE.
3451 (grub_root_drive): New variable.
3453 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
3454 instead of GRUB_BOOT_DRIVE to construct a device name. Set
3455 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
3458 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
3460 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
3462 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
3464 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
3465 is bogus, because PXE booting does not specify any drive
3468 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
3469 am not sure if this is really correct.
3471 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
3472 is always identical to the boot drive when booting from a CD.
3474 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
3476 (root_drive): New variable.
3477 (real_start): Unconditionally set %dh to ROOT_DRIVE.
3478 (setup_sectors): Push %dx right after popping it, because %dh will
3480 (copy_buffer): Restore %dx.
3482 2008-02-03 Robert Millan <rmh@aybabtu.com>
3484 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
3485 use `cdboot.img' for cdrom images.
3487 2008-02-03 Robert Millan <rmh@aybabtu.com>
3489 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
3490 only setup gfxterm when `font' command has succeeded.
3492 2008-02-03 Robert Millan <rmh@aybabtu.com>
3494 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
3495 (grub_rescue_cmd_multiboot_loader)
3496 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
3498 2008-02-03 Pavel Roskin <proski@gnu.org>
3500 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
3501 %edx and %esi from stack only after grub_gate_a20() is called.
3502 grub_gate_a20() clobbers %edx.
3504 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
3506 * configure.ac (AC_INIT): Bumped to 1.96.
3508 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
3509 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
3510 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
3511 video/readers/png.c.
3513 2008-02-03 Bean <bean123ch@gmail.com>
3515 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
3516 (cdboot_img_SOURCES): New variable.
3517 (cdboot_img_ASFLAGS): New variable.
3518 (cdboot_img_LDFLAGS): New variable.
3520 * boot/i386/pc/cdboot.S: New file.
3522 * disk/i386/pc/biosdisk.c (cd_start): New variable.
3523 (cd_count): Likewise.
3524 (grub_biosdisk_get_drive): Add support for cd device.
3525 (grub_biosdisk_call_hook): Likewise.
3526 (grub_biosdisk_iterate): Likewise.
3527 (grub_biosdisk_open): Likewise.
3528 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
3529 (grub_biosdisk_rw): Support reading from cd device.
3530 (GRUB_MOD_INIT): Iterate cd devices.
3532 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
3533 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
3534 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
3536 * kern/i386/pc/init.c (make_install_device): Check for cd device.
3538 2008-02-02 Robert Millan <rmh@aybabtu.com>
3540 * commands/read.c: New file.
3541 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
3542 (read_mod_SOURCES): New variable.
3543 (read_mod_CFLAGS): Likewise.
3544 (read_mod_LDFLAGS): Likewise.
3546 2008-02-02 Robert Millan <rmh@aybabtu.com>
3548 * normal/main.c (grub_normal_execute): Check for `menu->size' when
3549 determining whether menu has to be displayed.
3551 2008-02-02 Marco Gerards <marco@gnu.org>
3553 * bus/pci.c: New file.
3555 * include/grub/pci.h: Likewise.
3557 * include/grub/i386/pc/pci.h: Likewise.
3559 * commands/lspci.c: Likewise.
3561 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
3563 (pci_mod_SOURCES): New variable.
3564 (pci_mod_CFLAGS): Likewise.
3565 (pci_mod_LDFLAGS): Likewise.
3566 (lspci_mod_SOURCES): Likewise.
3567 (lspci_mod_CFLAGS): Likewise.
3568 (lspci_mod_LDFLAGS): Likewise.
3570 2008-02-02 Bean <bean123ch@gmail.com>
3572 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
3573 (grub_ufs_get_file_block): Fix indirect block calculation problem.
3575 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
3576 (grub_xfs_btree_node): New structure.
3577 (grub_xfs_btree_root): New structure.
3578 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
3579 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
3580 (GRUB_XFS_EXTENT_BLOCK): Likewise.
3581 (GRUB_XFS_EXTENT_SIZE): Likewise.
3582 (grub_xfs_read_block): Support btree format type.
3583 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
3584 Use directory block as basic unit.
3586 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
3588 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
3589 __attribute__ ((__regparm__ (1))).
3591 2008-02-01 Robert Millan <rmh@aybabtu.com>
3593 Correct a mistake in previous commit.
3595 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
3597 (normal/command.c_DEPENDENCIES): New variable.
3599 2008-02-01 Robert Millan <rmh@aybabtu.com>
3601 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
3603 (normal/command.c_DEPENDENCIES): New variable.
3604 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
3605 * conf/i386-ieee1275.rmk: Likewise.
3606 * conf/i386-linuxbios.rmk: Likewise.
3607 * conf/i386-pc.rmk: Likewise.
3608 * conf/sparc64-ieee1275.rmk: Likewise.
3609 * conf/powerpc-ieee1275.rmk: Likewise.
3610 (grub_emu_SOURCES): Add `fs/fshelp.c'.
3612 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
3614 2008-02-01 Robert Millan <rmh@aybabtu.com>
3616 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
3617 call at beginning of function.
3619 2008-01-31 Pavel Roskin <proski@gnu.org>
3621 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
3622 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
3623 (grub_mkrescue_SOURCES): Likewise.
3624 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
3626 2008-01-30 Robert Millan <rmh@aybabtu.com>
3628 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
3629 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
3630 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
3631 (grub_probe_SOURCES): ... to here.
3633 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
3634 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
3635 * conf/i386-ieee1275.rmk: Likewise.
3636 * conf/i386-linuxbios.rmk: Likewise.
3637 * conf/powerpc-ieee1275.rmk: Likewise.
3639 2008-01-30 Tristan Gingold <gingold@free.fr>
3641 * kern/rescue.c: Silently accept empty lines.
3643 2008-01-29 Bean <bean123ch@gmail.com>
3645 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
3646 (real_code_2): Code cleanup and change comment style.
3647 (move_memory): Avoid using 32-bit address mode.
3649 2008-01-29 Bean <bean123ch@gmail.com>
3651 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
3652 (png_mod_SOURCES): New variable.
3653 (png_mod_CFLAGS): Likewise.
3654 (png_mod_LDFLAGS): Likewise.
3656 * video/readers/png.c: New file.
3658 2008-01-28 Robert Millan <rmh@aybabtu.com>
3660 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
3661 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
3662 `ifndef GRUB_MOD_GAP' hack.
3663 * util/elf/grub-mkimage.c (add_segments): Likewise.
3665 2008-01-27 Robert Millan <rmh@aybabtu.com>
3667 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
3668 `GRUB_MOD_GAP' for platforms in which it's not defined.
3669 * util/elf/grub-mkimage.c (add_segments): Likewise.
3671 2008-01-27 Robert Millan <rmh@aybabtu.com>
3673 Get grub-emu to build again (including parallel builds).
3675 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
3677 (util/grub-emu.c_DEPENDENCIES): ... this, ...
3678 (normal/execute.c_DEPENDENCIES): ... this, ...
3679 (grub-emu_DEPENDENCIES): ... and this.
3681 * conf/i386-efi.rmk: Likewise.
3682 * conf/i386-linuxbios.rmk: Likewise.
3683 * conf/i386-ieee1275.rmk: Likewise.
3684 * conf/powerpc-ieee1275.rmk: Likewise.
3685 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
3687 2008-01-27 Robert Millan <rmh@aybabtu.com>
3689 * NEWS: Add a few items.
3691 2008-01-27 Robert Millan <rmh@aybabtu.com>
3693 Fix parallel builds with grub-emu. Based on earlier commit for
3694 grub-probe and grub-setup.
3696 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3697 (util/grub-emu.c_DEPENDENCIES): ... this.
3698 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3699 (util/grub-emu.c_DEPENDENCIES): ... this.
3700 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3701 (util/grub-emu.c_DEPENDENCIES): ... this.
3702 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3703 (util/grub-emu.c_DEPENDENCIES): ... this.
3704 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
3705 (util/grub-emu.c_DEPENDENCIES): ... this.
3707 2008-01-27 Pavel Roskin <proski@gnu.org>
3709 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
3710 to create a gap between _end and the modules added to the image
3711 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
3712 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
3713 * util/elf/grub-mkimage.c (add_segments): Likewise.
3715 2008-01-26 Pavel Roskin <proski@gnu.org>
3717 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
3718 just return an error.
3720 2008-01-26 Bean <bean123ch@gmail.com>
3722 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
3723 (grub_reiserfs_get_item): Save offset of the next item.
3724 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
3726 2008-01-25 Robert Millan <rmh@aybabtu.com>
3728 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
3729 make all filesystem sources appear together (possibly fixing omissions
3731 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3732 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3733 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
3734 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3736 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
3738 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
3739 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
3740 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
3741 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
3743 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
3744 (probe): Add a sanity check to make sure of our ability to read
3745 requested files when probing for filesystem type.
3747 * genmk.rb: Update copyright year (2007).
3749 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
3750 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
3751 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
3752 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
3753 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
3754 : Remove function prototypes.
3756 2008-01-25 Robert Millan <rmh@aybabtu.com>
3758 Revert my previous commits (based on wrong assumption of how grub_errno
3761 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
3762 * kern/file.c (grub_file_open): Likewise.
3764 2008-01-24 Pavel Roskin <proski@gnu.org>
3766 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
3767 that hang if GRUB tries to setup colors.
3768 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
3769 colors for firmwares that don't support it.
3770 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
3771 Recognize Open Hack'Ware, set flags to work around its
3774 2008-01-24 Robert Millan <rmh@aybabtu.com>
3776 * kern/file.c (grub_file_open): Do not account previous failures of
3777 unrelated functions when grub_errno is checked for.
3778 Reported by Oleg Strikov.
3780 2008-01-24 Bean <bean123ch@gmail.com>
3782 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
3783 (grub_ufs_sblock): New member volume name.
3784 (grub_ufs_find_file): Fix string copy bug.
3785 (grub_ufs_label): Implement this function properly.
3787 * fs/hfs.c (grub_hfs_cnid_type): New enum.
3788 (grub_hfs_iterate_records): Use the correct file number for extents
3789 and catalog file. Fix problem in next index calculation.
3790 (grub_hfs_find_node): Replace recursive function call with loop.
3791 (grub_hfs_iterate_dir): Replace recursive function call with loop.
3793 2008-01-23 Robert Millan <rmh@aybabtu.com>
3795 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
3796 `<grub/symbol.h>' and `<grub/multiboot.h>'.
3797 (grub_multiboot2_real_boot): New function prototype.
3799 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
3800 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
3802 * kern/i386/ieee1275/init.c (grub_os_area_addr)
3803 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
3805 2008-01-23 Robert Millan <rmh@aybabtu.com>
3807 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
3808 #ifdef'ed out grub_printf().
3810 2008-01-23 Robert Millan <rmh@aybabtu.com>
3812 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
3813 grub_dprintf calls, since they make "debug=all" mode unusable.
3814 (grub_console_checkkey): Likewise.
3816 2008-01-23 Robert Millan <rmh@aybabtu.com>
3818 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3819 `term/i386/pc/at_keyboard.c'.
3820 (pkglib_MODULES): Add `serial.mod'.
3821 (serial_mod_SOURCES): New variable.
3822 (serial_mod_CFLAGS): Likewise.
3823 (serial_mod_LDFLAGS): Likewise.
3825 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
3826 `<grub/powerpc/ieee1275/console.h>'.
3827 (grub_keyboard_controller_init): New function prototype.
3828 (grub_console_checkkey): Likewise.
3829 (grub_console_getkey): Likewise.
3831 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
3834 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
3835 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
3837 2008-01-23 Robert Millan <rmh@aybabtu.com>
3839 * kern/i386/pc/init.c (make_install_device): When memdisk image is
3840 present, "(memdisk)/boot/grub" becomes the default prefix.
3842 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
3843 a memdisk tarball with all the modules. Add --overlay=DIR option that
3844 allows users to overlay additional files into the image.
3846 2008-01-23 Robert Millan <rmh@aybabtu.com>
3848 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
3849 and `machine/memory.h'.
3850 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
3851 (_multiboot_mod_SOURCES): New variable.
3852 (_multiboot_mod_CFLAGS): Likewise.
3853 (_multiboot_mod_LDFLAGS): Likewise.
3854 (multiboot_mod_SOURCES): Likewise.
3855 (multiboot_mod_CFLAGS): Likewise.
3856 (multiboot_mod_LDFLAGS): Likewise.
3858 * include/grub/i386/ieee1275/loader.h: New file.
3860 * include/grub/i386/ieee1275/machine.h: Likewise.
3862 * include/grub/i386/ieee1275/memory.h: Likewise.
3864 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
3865 variable declaration.
3866 (grub_os_area_size): Likewise.
3868 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
3869 (grub_lower_mem, grub_upper_mem): New variables.
3870 (grub_stop_floppy): New function (just to make
3871 grub_multiboot2_real_boot() happy).
3873 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
3874 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
3875 (grub_stop): New function.
3876 Include `"../realmode.S"' and `"../loader.S"'.
3878 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
3879 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
3881 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
3882 rely on grub_multiboot2_real_boot() for final boot.
3884 2008-01-22 Robert Millan <rmh@aybabtu.com>
3886 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
3887 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
3888 device that doesn't look like an SD card.
3889 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
3890 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
3891 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
3892 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
3895 2008-01-22 Robert Millan <rmh@aybabtu.com>
3897 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
3898 avoid claiming over our own code.
3900 2008-01-22 Bean <bean123ch@gmail.com>
3902 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
3903 (jpeg_mod_SOURCES): New variable.
3904 (jpeg_mod_CFLAGS): Likewise.
3905 (jpeg_mod_LDFLAGS): Likewise.
3907 * video/readers/jpeg.c : New file.
3909 2008-01-22 Bean <bean123ch@gmail.com>
3911 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
3912 there are no more items.
3914 2008-01-21 Robert Millan <rmh@aybabtu.com>
3916 * kern/mm.c (grub_mm_init_region): Improve debug message.
3918 2008-01-21 Robert Millan <rmh@aybabtu.com>
3920 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
3921 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
3923 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
3925 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
3926 Indicates start of upper memory.
3927 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
3928 (generate_image): Abort when image size is big enough to corrupt
3931 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
3932 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
3933 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
3934 instead of hardcoding 0xA0000.
3935 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
3936 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
3937 instead of hardcoding 0xA0000.
3939 2008-01-21 Robert Millan <rmh@aybabtu.com>
3941 * disk/memdisk.c (memdisk_size): New variable.
3942 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
3944 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
3945 image to dynamic memory.
3946 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
3947 `memdisk_size'. Free memdisk block.
3949 2008-01-21 Robert Millan <rmh@aybabtu.com>
3951 Fix detection of very small filesystems (like tar).
3953 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
3954 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
3955 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
3956 a problem with this disk).
3958 2008-01-21 Robert Millan <rmh@aybabtu.com>
3960 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
3961 on grub_biosdisk_rw_standard() error.
3963 2008-01-21 Robert Millan <rmh@aybabtu.com>
3965 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
3967 * kern/elf.c: Likewise.
3968 * kern/ieee1275/ieee1275.c: Likewise.
3969 * kern/powerpc/ieee1275/openfw.c: Likewise.
3970 * term/ieee1275/ofconsole.c: Likewise.
3972 2008-01-21 Robert Millan <rmh@aybabtu.com>
3974 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
3976 * include/grub/kernel.h (grub_arch_memdisk_addr)
3977 (grub_arch_memdisk_size): Moved from here ...
3979 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
3980 (grub_arch_memdisk_size): ... to here.
3982 2008-01-21 Robert Millan <rmh@aybabtu.com>
3984 Mostly based on bugfix from Bean.
3986 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
3987 attribute with hook() parameter.
3988 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
3990 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
3991 attribute with hook() parameter.
3992 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
3995 2008-01-21 Robert Millan <rmh@aybabtu.com>
3997 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
3998 (pkglib_MODULES): Add `memdisk.mod'.
3999 (memdisk_mod_SOURCES): New variable.
4000 (memdisk_mod_CFLAGS): Likewise.
4001 (memdisk_mod_LDFLAGS): Likewise.
4003 * disk/memdisk.c: New file.
4005 * include/grub/disk.h (grub_disk_dev_id): Add
4006 `GRUB_DISK_DEVICE_MEMDISK_ID'.
4008 * include/grub/i386/pc/kernel.h
4009 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
4010 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
4011 (grub_kernel_image_size): New variable declaration.
4012 (grub_total_module_size): Likewise.
4013 (grub_memdisk_image_size): Likewise.
4015 * include/grub/i386/pc/memory.h
4016 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
4018 * include/grub/kernel.h: Include `<grub/symbol.h>'.
4019 (grub_arch_memdisk_addr): New variable declaration.
4020 (grub_arch_memdisk_size): Likewise.
4022 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
4023 (grub_arch_memdisk_size): Likewise.
4025 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
4026 (codestart): Replace hardcoded `0x100000' with
4027 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
4029 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
4030 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
4031 not NULL, append the contents of the file it refers to, at the end of
4032 the compressed kernel image. Initialize `grub_memdisk_image_size'
4033 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
4034 (options): Add "memdisk"|'m' option.
4035 (main): Parse --memdisk|-m option, and pass user-provided path as
4036 parameter to generate_image().
4038 2008-01-20 Robert Millan <rmh@aybabtu.com>
4040 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
4041 grub_dprintf() calls from here ...
4042 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
4044 2008-01-20 Robert Millan <rmh@aybabtu.com>
4046 Fix detection of "real mode" when /options/real-mode? doesn't exist.
4048 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
4050 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
4051 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
4052 `GRUB_IEEE1275_FLAG_REAL_MODE'.
4053 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
4055 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
4056 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
4058 2008-01-19 Robert Millan <rmh@aybabtu.com>
4060 Get rid of confusing function (superseded by
4061 `grub_ieee1275_get_integer_property')
4062 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
4064 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
4066 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
4067 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
4068 in native endianness from grub_ieee1275_get_integer_property().
4070 2008-01-19 Robert Millan <rmh@aybabtu.com>
4072 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
4073 command after "shut-down", since implementations differ on which
4074 the command for halt is.
4076 2008-01-19 Robert Millan <rmh@aybabtu.com>
4078 * include/grub/i386/linuxbios/console.h: Add header protection.
4079 (grub_keyboard_controller_init): New function prototype.
4080 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
4081 (KEYBOARD_COMMAND_READ): Likewise.
4082 (KEYBOARD_COMMAND_WRITE): Likewise.
4083 (KEYBOARD_SCANCODE_SET1): Likewise.
4084 (grub_keyboard_controller_write): New function.
4085 (grub_keyboard_controller_read): Likewise.
4086 (grub_keyboard_controller_init): Likewise.
4088 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
4089 (grub_console_init): On coreboot/LinuxBIOS, call
4090 grub_keyboard_controller_init().
4092 2008-01-19 Robert Millan <rmh@aybabtu.com>
4094 PowerPC changes provided by Pavel Roskin.
4096 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
4097 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
4098 don't rely on cmain() doing it.
4099 * kern/i386/ieee1275/startup.S (_start): Store %eax in
4100 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
4102 2008-01-16 Robert Millan <rmh@aybabtu.com>
4104 * include/grub/i386/linuxbios/memory.h
4105 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
4106 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
4107 receive `table_header' as argument. Instead, probe for it in the
4108 known memory ranges where it can be present.
4109 (grub_available_iterate): Do not pass a fixed `table_header' address
4110 to grub_linuxbios_table_iterate().
4112 2008-01-15 Robert Millan <rmh@aybabtu.com>
4114 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
4115 * conf/i386-ieee1275.rmk: New file.
4116 * include/grub/i386/ieee1275/console.h: Likewise.
4117 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
4118 * include/grub/i386/ieee1275/kernel.h: Likewise.
4119 * include/grub/i386/ieee1275/time.h: Likewise.
4120 * kern/i386/ieee1275/init.c: Likewise.
4121 * kern/i386/ieee1275/startup.S: Likewise.
4123 2008-01-15 Robert Millan <rmh@aybabtu.com>
4125 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
4126 when pointers are 32-bit (but still do set it to one when they are
4129 2008-01-15 Robert Millan <rmh@aybabtu.com>
4131 * include/grub/ieee1275/ieee1275.h
4132 (grub_ieee1275_get_integer_property): New function prototype.
4134 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
4135 (grub_ieee1275_get_integer_property): New function. Wraps around
4136 grub_ieee1275_get_property() to handle endianness.
4138 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
4139 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
4141 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
4142 (grub_map): Likewise.
4143 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
4145 2008-01-15 Bean <bean123ch@gmail.com>
4147 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
4148 (grub_script_execute_cmdline): Reset grub_errno.
4150 * normal/main.c (read_config_file): Reset grub_errno.
4152 * normal/parse.y (script_init): New.
4153 (script): Move function and menuentry here.
4155 (command): Add delimiter at the end of command.
4156 (commands): Adjust to match the new command.
4157 (commandblock): Remove grub_script_lexer_record_start.
4158 (menuentry): Add grub_script_lexer_record_start, use the new commands.
4159 (if): Use the new commands.
4161 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
4163 2008-01-15 Robert Millan <rmh@aybabtu.com>
4165 * normal/menu.c (run_menu): Move timeout message from here ...
4166 (print_timeout): ... to here.
4167 (run_menu): Use print_timeout() once during initial draw to print
4168 the whole message, and again in every clock tick to update only
4169 the number of seconds.
4171 2008-01-15 Robert Millan <rmh@aybabtu.com>
4173 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
4174 actual size of `available' from grub_ieee1275_get_property(), and
4175 restrict parsing to that bound.
4177 2008-01-15 Christian Franke <franke@computer.org>
4179 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
4180 (argp_program_version): Remove variable.
4181 (argp_program_bug_address): Likewise.
4182 (options): Convert from struct argp_option to struct option.
4183 (struct arguments): Remove.
4184 (parse_opt): Remove.
4185 (usage): New function.
4186 (main): Replace struct args members by simple variables.
4187 Replace argp_parse() by getopt_long().
4188 Add switch to evaluate options.
4189 Add missing "(...)" around root_dev in prefix string.
4191 2008-01-14 Robert Millan <rmh@aybabtu.com>
4193 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4194 for grub_ieee1275_exit(), in order to improve portability.
4196 2008-01-14 Robert Millan <rmh@aybabtu.com>
4198 * util/grub.d/10_linux.in (prefix): Define.
4199 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
4201 2008-01-13 Pavel Roskin <proski@gnu.org>
4203 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
4204 grub_errno if no errors have been detected.
4206 2008-01-12 Robert Millan <rmh@aybabtu.com>
4208 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
4209 (grub_util_get_dev_abstraction): New function prototype.
4211 * util/getroot.c: Include `<grub/util/getroot.h>'
4212 (grub_util_get_grub_dev): Move detection of abstraction type to ...
4213 (grub_util_get_dev_abstraction): ... here (new function).
4215 * util/grub-probe.c: Convert PRINT_* to an enum. Add
4216 `PRINT_ABSTRACTION'.
4217 (probe): Probe for abstraction type when requested.
4218 (main): Understand `--target=abstraction'.
4220 * util/i386/efi/grub-install.in: Add abstraction module to core
4221 image when it is found to be necessary.
4222 * util/i386/pc/grub-install.in: Likewise.
4223 * util/powerpc/ieee1275/grub-install.in: Likewise.
4225 * util/update-grub_lib.in (font_path): Return system path without
4226 converting to GRUB path.
4227 * util/update-grub.in: Convert system path returned by font_path()
4228 to a GRUB path. Use `grub-probe -t abstraction' to determine what
4229 abstraction module is needed for loading fonts (if any). Export
4230 that as `GRUB_PRELOAD_MODULES'.
4231 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
4234 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
4236 Remove some unused code from reiserfs.
4238 * fs/reiserfs.c (struct grub_reiserfs_key)
4239 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
4240 (struct grub_reiserfs_node_body): Removed.
4241 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4243 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4245 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4247 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
4249 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
4251 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
4253 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4254 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4255 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
4257 2008-01-10 Robert Millan <rmh@aybabtu.com>
4259 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
4260 Determines if a file is garbage left by packaging systems, etc.
4261 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
4262 for processing /etc/grub.d scripts.
4263 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
4264 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
4265 as a condition for processing Linux images.
4267 2008-01-10 Pavel Roskin <proski@gnu.org>
4269 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
4270 to compile reiserfs.c on PowerPC.
4272 2008-01-10 Robert Millan <rmh@aybabtu.com>
4274 * kern/device.c (grub_device_iterate): Do not abort device iteration
4275 when one of the devices cannot be opened.
4276 * kern/disk.c (grub_disk_open): Do not account previous failures of
4277 unrelated functions when grub_errno is checked for.
4279 2008-01-08 Robert Millan <rmh@aybabtu.com>
4281 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
4282 `! grub_linux_is_bzimage', change order of address comparison to make
4283 it more intuitive, and improve "too big zImage" error message.
4285 2008-01-08 Robert Millan <rmh@aybabtu.com>
4287 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
4288 `$(update-grub_DATA)'.
4289 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
4292 2008-01-07 Robert Millan <rmh@aybabtu.com>
4294 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
4295 which instruction is modified by grub-setup during installation
4296 (since it wasn't obvious by only looking at this file).
4298 2008-01-07 Robert Millan <rmh@aybabtu.com>
4300 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
4301 listing actual TODO items.
4303 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4305 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
4307 (grub_reiserfs_get_key_offset): Likewise.
4308 (grub_reiserfs_set_key_offset): Likewise.
4309 (grub_reiserfs_set_key_type): Likewise.
4310 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
4312 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
4313 better to remove the bitfield version completely.
4315 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4317 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
4318 allocated from the heap, due to the fshelp implementation.
4319 (grub_reiserfs_dir): Free NODE, due to the same reason.
4321 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4323 Mostly from Vincent Pelletier:
4325 * fs/reiserfs.c: New file.
4327 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
4328 (reiserfs_mod_SOURCES): New variable.
4329 (reiserfs_mod_CFLAGS): Likewise.
4330 (reiserfs_mod_LDFLAGS): Likewise.
4332 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
4333 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
4334 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
4337 2008-01-06 Robert Millan <rmh@aybabtu.com>
4339 * normal/color.c: Remove `<grub/env.h>'.
4341 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
4343 * include/grub/normal.h: Include <grub/env.h>.
4345 2008-01-05 Robert Millan <rmh@aybabtu.com>
4347 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
4348 usage example with `(hd0,1)'.
4349 Reported by Samuel Thibault.
4351 2008-01-05 Robert Millan <rmh@aybabtu.com>
4353 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
4354 (grub_linux_boot_zimage): Rename to ...
4355 (grub_linux_boot): ... this.
4356 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
4357 (grub_linux_boot_zimage): Conditionalize zImage copy.
4359 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
4360 (grub_linux_boot_bzimage): Remove prototype.
4361 (grub_linux_boot_zimage): Rename to ...
4362 (grub_linux_boot): ... this.
4364 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
4365 (grub_linux_boot): Remove function.
4367 2008-01-05 Robert Millan <rmh@aybabtu.com>
4369 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
4370 (grub_env_write_color_highlight): Likewise.
4371 (grub_wait_after_message): Likewise.
4373 * normal/color.c: New file.
4375 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4376 (normal_mod_DEPENDENCIES): Likewise.
4378 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4379 (normal_mod_DEPENDENCIES): Likewise.
4381 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4382 (normal_mod_DEPENDENCIES): Likewise.
4384 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
4385 (normal_mod_DEPENDENCIES): Likewise.
4387 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
4388 for waiting after a message is printed.
4389 * normal/main.c (read_config_file): Likewise.
4390 (grub_normal_init): Register grub_env_write_color_normal() and
4391 grub_env_write_color_highlight() hooks. Mark `color_normal' and
4392 `color_highlight' variables as global.
4394 * normal/menu.c (grub_wait_after_message): New function.
4395 (grub_color_menu_normal): New variable. Replaces ...
4396 (GRUB_COLOR_MENU_NORMAL): ... this macro.
4397 (grub_color_menu_highlight): New variable. Replaces ...
4398 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
4399 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
4400 `GRUB_TERM_COLOR_STANDARD'.
4401 (print_message): Use `grub_setcolorstate' to reload colors. Rename
4402 `normal_code' and `highlight_code' to `old_color_normal' and
4403 `old_color_highlight', respectively.
4404 (grub_menu_init_page): Update colors when drawing the menu, based on
4405 `menu_color_normal' and `menu_color_highlight' variables.
4406 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
4407 a message is printed.
4409 2008-01-05 Robert Millan <rmh@aybabtu.com>
4411 * kern/env.c (grub_env_context_open): Propagate hooks for global
4412 variables to new context.
4414 * kern/main.c (grub_set_root_dev): Export `root' variable.
4416 2008-01-05 Robert Millan <rmh@aybabtu.com>
4418 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
4419 discs unconditionally, since udev and others have options to provide
4422 2008-01-05 Robert Millan <rmh@aybabtu.com>
4424 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
4426 2008-01-04 Christian Franke <franke@computer.org>
4428 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
4431 2008-01-03 Pavel Roskin <proski@gnu.org>
4433 * kern/i386/linuxbios/init.c: Put "void" to all function
4434 declarations with no arguments.
4435 * kern/powerpc/ieee1275/init.c: Likewise.
4436 * term/i386/pc/at_keyboard.c: Likewise.
4437 * term/i386/pc/vga_text.c: Likewise.
4438 * util/grub-mkdevicemap.c: Likewise.
4440 2008-01-02 Robert Millan <rmh@aybabtu.com>
4442 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
4443 message when loaded image is out of bounds.
4444 (grub_multiboot_load_elf64): Likewise.
4446 2008-01-02 Pavel Roskin <proski@gnu.org>
4448 * util/grub.d/10_linux.in: Try version without ".old" when
4449 looking for initrd. It's better to use initrd from the newer
4450 kernel of the same version than no initrd at all.
4452 2008-01-01 Robert Millan <rmh@aybabtu.com>
4454 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
4456 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
4458 * include/grub/video.h: Added grub_video_unmap_color and
4459 grub_video_get_active_render_target.
4460 (grub_video_adapter): Added unmap_color and get_active_render_target.
4462 * video/video.c: Added grub_video_unmap_color and
4463 grub_video_get_active_render_target.
4464 (grub_video_get_info): Changed method to accept NULL pointer as an
4465 argument to allow detection of active video adapter.
4467 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
4468 grub_video_vbe_unmap_color_int.
4469 Added grub_video_vbe_unmap_color and
4470 grub_video_vbe_get_active_render_target.
4471 (grub_video_vbe_adapter): Added unmap_color and
4472 get_active_render_target.
4474 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
4475 with grub_video_vbe_unmap_color_int.
4477 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
4478 (DEFAULT_NORMAL_COLOR): Likewise.
4479 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
4480 (DEFAULT_FG_COLOR): Removed.
4481 (DEFAULT_BG_COLOR): Likewise.
4482 (DEFAULT_CURSOR_COLOR): Changed value.
4483 (grub_virtual_screen): Added standard_color_setting,
4484 normal_color_setting, highlight_color_setting and term_color.
4485 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
4486 (bitmap_width): Added.
4487 (bitmap_height): Likewise.
4489 (set_term_color): Likewise.
4490 (grub_virtual_screen_setup): Changed to use new terminal coloring
4492 (grub_gfxterm_init): Added init for bitmap.
4493 (grub_gfxterm_fini): Added destroy for bitmap.
4494 (redraw_screen_rect): Updated to use background bitmap and new
4496 (scroll_up): Added optimization for case when there is no bitmap.
4497 (grub_gfxterm_cls): Fixed to use correct background color.
4498 (grub_virtual_screen_setcolorstate): Changed to use new terminal
4500 (grub_virtual_screen_setcolor): Likewise.
4501 (grub_virtual_screen_getcolor): Added.
4502 (grub_gfxterm_background_image_cmd): Likewise.
4503 (grub_video_term): Added setcolor and getcolor.
4504 (MOD_INIT): Added registration of background_image command.
4505 (MOD_TERM): Added unregistration for background_image command.
4507 2007-12-30 Pavel Roskin <proski@gnu.org>
4509 * loader/multiboot_loader.c: Fix multiboot command
4510 unregistration. Fix all typos in the word "multiboot".
4512 2007-12-29 Pavel Roskin <proski@gnu.org>
4514 * util/grub.d/10_linux.in: Refactor search for initrd. Add
4515 support for initrd names used in Fedora.
4517 2007-12-26 Bean <bean123ch@gmail.com>
4519 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
4520 (cpio_mod_SOURCES): New variable.
4521 (cpio_mod_CFLAGS): Likewise.
4522 (cpio_mod_LDFLAGS): Likewise.
4524 * fs/cpio.c: New file.
4526 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
4528 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4530 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4532 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4534 2007-12-25 Robert Millan <rmh@aybabtu.com>
4536 * include/grub/term.h (struct grub_term): Add `getcolor' function.
4537 (grub_getcolor): New function.
4539 * kern/term.c (grub_getcolor): New function.
4540 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
4541 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
4542 (print_entry): Set normal and highlight colors to
4543 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
4544 respectively, before printing and restore them to old
4546 (grub_menu_init_page): Likewise. Fill an additional colored space
4547 that would otherwise be left blank.
4549 * term/efi/console.c (grub_console_getcolor): New function.
4550 (struct grub_console_term.getcolor): New variable.
4551 * term/i386/pc/console.c (grub_console_getcolor): New function.
4552 (struct grub_console_term.getcolor): New variable.
4553 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
4554 (struct grub_console_term.getcolor): New variable.
4556 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
4557 (struct grub_console_term.setcolor): Remove variable.
4558 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
4559 (struct grub_console_term.setcolor): Remove variable.
4560 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
4561 (struct grub_console_term.setcolor): Remove variable.
4562 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
4563 (struct grub_console_term.setcolor): Remove variable.
4565 2007-12-25 Robert Millan <rmh@aybabtu.com>
4567 * configure.ac: Search for possible unifont.hex locations, and
4568 define UNIFONT_HEX if found.
4570 * Makefile.in (UNIFONT_HEX): Define variable.
4571 (DATA): Rename to ...
4572 (PKGLIB): ... this. Update all users.
4573 (PKGDATA): New variable.
4574 (pkgdata_IMAGES): Rename to ...
4575 (pkglib_IMAGES): ... this. Update all users.
4576 (pkgdata_MODULES): Rename to ...
4577 (pkglib_MODULES): ... this. Update all users.
4578 (pkgdata_PROGRAMS): Rename to ...
4579 (pkglib_PROGRAMS): ... this. Update all users.
4580 (pkgdata_DATA): Rename to ...
4581 (pkglib_DATA): ... this. Update all users.
4582 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
4583 (unicode.pff, ascii.pff): New rules.
4584 (all-local): Add `$(PKGDATA)' dependency.
4585 (install-local): Process `$(PKGDATA)'.
4587 * util/update-grub_lib.in (font_path): Search for *.pff files in
4588 a few more locations, including `${pkgdata}'.
4590 2007-12-23 Robert Millan <rmh@aybabtu.com>
4592 Patch from Bean <bean123ch@gmail.com>:
4593 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
4596 2007-12-21 Bean <bean123ch@gmail.com>
4598 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
4599 (ntfscomp_mod_SOURCES): New variable.
4600 (ntfscomp_mod_CFLAGS): Likewise.
4601 (ntfscomp_mod_LDFLAGS): Likewise.
4603 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
4604 (grub_probe_SOURCES): Likewise.
4605 (grub_emu_SOURCES): Likewise.
4607 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4608 (grub_emu_SOURCES): Likewise.
4610 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4611 (grub_emu_SOURCES): Likewise.
4613 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
4614 (grub_emu_SOURCES): Likewise.
4616 * fs/ntfs.c (grub_ntfscomp_func): New variable.
4617 (read_run_list): Renamed to grub_ntfs_read_run_list.
4618 (decomp_nextvcn): Moved to ntfscomp.c.
4619 (decomp_getch): Likewise.
4620 (decomp_get16): Likewise.
4621 (decomp_block): Likewise.
4622 (read_block): Likewise.
4623 (read_data): Partially moved to ntfscomp.c.
4624 (fixup): Change unsigned to grub_uint16_t.
4625 (read_mft): Change unsigned long to grub_uint32_t.
4626 (read_attr): Likewise.
4627 (read_data): Likewise.
4628 (read_run_data): Likewise.
4629 (read_run_list): Likewise.
4630 (read_mft): Likewise.
4632 * fs/ntfscomp.c: New file.
4634 * include/grub/ntfs.h: New file.
4636 2007-12-16 Robert Millan <rmh@aybabtu.com>
4638 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
4639 IDE disk check, since Linux is known to support 20 IDE disks.
4640 Reported by Colin Watson.
4642 2007-12-15 Bean <bean123ch@gmail.com>
4644 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
4645 (lnxboot_img_SOURCES): New variable.
4646 (lnxboot_img_ASFLAGS): Likewise.
4647 (lnxboot_img_LDFLAGS): Likewise.
4649 * boot/i386/pc/lnxboot.S: New file.
4651 2007-11-24 Pavel Roskin <proski@gnu.org>
4653 * configure.ac: Test if '--build-id=none' is supported by the
4654 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
4655 objcopy to generate incorrect binary files (binutils
4656 2.17.50.0.18-1 as shipped by Fedora 8).
4657 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
4658 linking, so that build ID doesn't break the test.
4660 2007-11-24 Pavel Roskin <proski@gnu.org>
4662 * include/grub/i386/time.h: use "void" in the argument list
4664 * include/grub/powerpc/time.h: Likewise.
4665 * include/grub/sparc64/time.h: Likewise.
4667 2007-11-18 Christian Franke <franke@computer.org>
4669 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
4670 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
4671 This fixes the problem that function keys did not work in grub-emu.
4673 2007-11-18 Christian Franke <franke@computer.org>
4675 * disk/host.c (grub_host_open): Remove attribute unused from
4676 name parameter. Add check for "host". This fixes the problem
4677 that grub-emu does not find partitions.
4679 2007-11-18 Christian Franke <franke@computer.org>
4681 * util/hostfs.c (is_dir): New function.
4682 (grub_hostfs_dir): Handle missing dirent.d_type case.
4683 (grub_hostfs_read): Add missing fseek().
4684 (grub_hostfs_label): Clear label pointer. This fixes a crash
4685 of grub-emu on "ls (host)".
4687 2007-11-18 Christian Franke <franke@computer.org>
4689 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
4690 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
4691 to 64 bit boundary by default.
4693 2007-11-18 Bean <bean123ch@gmail.com>
4695 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
4696 (hexdump_mod_SOURCES): New variable.
4697 (hexdump_mod_CFLAGS): Likewise.
4698 (hexdump_mod_LDFLAGS): Likewise.
4700 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4702 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4704 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4706 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
4708 * include/grub/hexdump.h: New file.
4710 * commands/hexdump.c: New file.
4712 2007-11-10 Robert Millan <rmh@aybabtu.com>
4714 * commands/i386/pc/play.c (beep_off): Switch order of arguments
4715 in grub_outb() calls.
4716 (beep_on): Likewise.
4718 2007-11-10 Christian Franke <franke@computer.org>
4720 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
4721 (grub_menu_run): Likewise.
4723 2007-11-10 Robert Millan <rmh@aybabtu.com>
4725 * include/grub/i386/efi/machine.h: New file.
4726 * include/grub/i386/linuxbios/machine.h: Likewise.
4727 * include/grub/i386/pc/machine.h: Likewise.
4728 * include/grub/powerpc/ieee1275/machine.h: Likewise.
4729 * include/grub/sparc64/ieee1275/machine.h: Likewise.
4731 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
4732 (serial_hw_io_addr): New variable.
4733 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
4734 instead of `(unsigned short *) 0x400'.
4736 2007-11-10 Bean <bean123ch@gmail.com>
4738 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
4740 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
4742 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
4743 (vga_mod_SOURCES): Added.
4744 (vga_mod_CFLAGS): Likewise.
4745 (vga_mod_LDFLAGS): Likewise.
4747 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
4749 (set_map_mask): Likewise.
4750 (set_read_map): Likewise.
4751 (set_read_address): Likewise.
4752 (vga_font): Removed variable.
4753 (get_vga_glyph): Removed function.
4754 (invalidate_char): Likewise.
4755 (write_char): Changed to use grub_font_get_glyph() for font
4757 (grub_vga_putchar): Likewise.
4758 (grub_vga_getcharwidth): Likewise.
4760 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
4762 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
4764 (pxeboot_img_LDFLAGS): Likewise.
4765 (diskboot_img_LDFLAGS): Likewise.
4766 (kernel_img_LDFLAGS): Likewise.
4768 2007-11-06 Robert Millan <rmh@aybabtu.com>
4770 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
4771 in grub_outb() calls.
4772 (serial_hw_init): Likewise.
4774 2007-11-05 Robert Millan <rmh@aybabtu.com>
4776 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
4777 spaces. Skip non-regular files.
4779 2007-11-05 Robert Millan <rmh@aybabtu.com>
4781 * kern/disk.c (grub_disk_firmware_fini)
4782 (grub_disk_firmware_is_tainted): New variables.
4784 * include/grub/disk.h (grub_disk_firmware_fini)
4785 (grub_disk_firmware_is_tainted): Likewise.
4787 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
4788 (grub_disk_biosdisk_fini): ... to here.
4789 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
4790 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
4791 is set. Register grub_disk_biosdisk_fini() in
4792 `grub_disk_firmware_fini'.
4794 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
4795 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
4796 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
4797 to finish existing firmware disk interface.
4799 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
4800 (ata_mod_SOURCES): New variable.
4801 (ata_mod_CFLAGS): Likewise.
4802 (ata_mod_LDFLAGS): Likewise.
4804 2007-11-05 Robert Millan <rmh@aybabtu.com>
4806 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
4807 (grub_ata_wait): Reimplement using grub_millisleep().
4809 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
4810 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
4812 2007-11-03 Marco Gerards <marco@gnu.org>
4814 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
4815 (CRTC_ADDR_PORT): New macro.
4816 (CRTC_DATA_PORT): Likewise.
4817 (CRTC_CURSOR): Likewise.
4818 (CRTC_CURSOR_ADDR_HIGH): Likewise.
4819 (CRTC_CURSOR_ADDR_LOW): Likewise.
4820 (update_cursor): New function.
4821 (grub_console_real_putchar): Call `update_cursor'.
4822 (grub_console_gotoxy): Likewise.
4823 (grub_console_cls): Set the default color when clearing the
4825 (grub_console_setcursor): Implemented.
4827 2007-11-03 Marco Gerards <marco@gnu.org>
4829 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
4831 (grub_ata_pio_write): Likewise.
4833 (grub_atapi_identify): Wait after issuing an ATA command.
4834 (grub_atapi_packet): Likewise.
4835 (grub_ata_identify): Likewise.
4836 (grub_ata_readwrite): Likewise.
4838 2007-11-03 Marco Gerards <marco@gnu.org>
4840 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
4841 (grub_ata_pio_write): Likewise.
4842 (grub_ata_readwrite): Use `grub_error', instead of
4843 returning `grub_errno'.
4845 2007-11-03 Marco Gerards <marco@gnu.org>
4847 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
4848 grub_ata_pio_write once for every single sector, instead of for
4851 2007-10-31 Robert Millan <rmh@aybabtu.com>
4853 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
4855 * conf/i386-linuxbios.rmk: New file.
4857 * kern/i386/pc/hardware.c: Likewise.
4858 * term/i386/pc/at_keyboard.c: Likewise.
4859 * term/i386/pc/vga_text.c: Likewise.
4861 * include/grub/i386/linuxbios/boot.h: Likewise.
4862 * include/grub/i386/linuxbios/console.h: Likewise.
4863 * include/grub/i386/linuxbios/init.h: Likewise.
4864 * include/grub/i386/linuxbios/kernel.h: Likewise.
4865 * include/grub/i386/linuxbios/loader.h: Likewise.
4866 * include/grub/i386/linuxbios/memory.h: Likewise.
4867 * include/grub/i386/linuxbios/serial.h: Likewise.
4868 * include/grub/i386/linuxbios/time.h: Likewise.
4870 * kern/i386/linuxbios/init.c: Likewise.
4871 * kern/i386/linuxbios/startup.S: Likewise.
4872 * kern/i386/linuxbios/table.c: Likewise.
4874 2007-10-31 Marco Gerards <marco@gnu.org>
4876 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
4877 (ata_mod_SOURCES): New variable.
4878 (ata_mod_CFLAGS): Likewise.
4879 (ata_mod_LDFLAGS): Likewise.
4881 * disk/ata.c: New file.
4883 * include/grub/disk.h (grub_disk_dev_id): Add
4884 `GRUB_DISK_DEV_ATA_ID'.
4886 2007-10-31 Robert Millan <rmh@aybabtu.com>
4888 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
4889 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
4891 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
4892 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
4894 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
4897 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
4899 2007-10-27 Robert Millan <rmh@aybabtu.com>
4901 * include/grub/types.h (ULONG_MAX): Define macro.
4903 2007-10-22 Robert Millan <rmh@aybabtu.com>
4905 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
4907 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
4909 2007-10-22 Robert Millan <rmh@aybabtu.com>
4911 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
4912 (pkgdata_MODULES): Add `biosdisk.mod'.
4913 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
4916 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
4917 (grub_biosdisk_init): Replace with ...
4918 (GRUB_MOD_INIT(biosdisk)): ... this.
4919 (grub_biosdisk_fini): Replace with ...
4920 (GRUB_MOD_FINI(biosdisk)): ... this.
4922 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
4923 (grub_machine_init): Remove call to grub_biosdisk_init().
4924 (grub_machine_fini): Remove call to grub_machine_fini().
4926 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
4928 2007-10-22 Robert Millan <rmh@aybabtu.com>
4930 * include/grub/time.h: New file.
4931 * include/grub/i386/time.h: Likewise.
4932 * include/grub/powerpc/time.h: Likewise.
4933 * include/grub/sparc64/time.h: Likewise.
4935 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
4937 (KERNEL_MACHINE_TIME_HEADER): ... this.
4938 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
4940 (KERNEL_MACHINE_TIME_HEADER): ... this.
4941 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
4943 (KERNEL_MACHINE_TIME_HEADER): ... this.
4945 * kern/i386/efi/init.c: Include `<grub/time.h>'.
4946 (grub_millisleep): New function.
4947 * kern/i386/pc/init.c: Include `<grub/time.h>'.
4948 (grub_millisleep): New function.
4949 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
4950 Remove `grub/machine/time.h' include.
4951 (grub_millisleep): New function.
4952 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
4953 Remove `grub/machine/time.h' include.
4954 (grub_millisleep): New function.
4956 * include/grub/misc.h (grub_div_roundup): New function.
4958 * kern/misc.c: Include `<grub/time.h>'.
4959 (grub_millisleep_generic): New function.
4961 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
4963 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
4965 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
4966 `machine/time.h'. Add `time.h'.
4967 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
4969 2007-10-21 Robert Millan <rmh@aybabtu.com>
4971 * include/grub/misc.h (grub_max): New function.
4973 2007-10-21 Robert Millan <rmh@aybabtu.com>
4975 * util/misc.c (grub_util_info): Call fflush() before returning.
4977 2007-10-20 Robert Millan <rmh@aybabtu.com>
4979 * genmk.rb (Image): Copy `extra_flags' from here ...
4980 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
4982 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
4983 to `argc' and `args' arguments.
4985 2007-10-17 Robert Millan <rmh@aybabtu.com>
4987 * kern/i386/loader.S: New file.
4989 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
4990 * kern/i386/loader.S (grub_linux_prot_size)... to here.
4991 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
4992 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
4993 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
4994 * kern/i386/loader.S (grub_linux_real_addr)... to here.
4995 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
4996 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
4997 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
4998 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
4999 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
5000 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
5001 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
5002 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
5004 * kern/i386/realmode.S: New file.
5006 * kern/i386/pc/startup.S (protstack): Moved from here ...
5007 * kern/i386/realmode.S (protstack)... to here.
5008 * kern/i386/pc/startup.S (gdt): Moved from here ...
5009 * kern/i386/realmode.S (gdt)... to here.
5010 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
5011 * kern/i386/realmode.S (prot_to_real)... to here.
5013 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
5014 `kern/i386/realmode.S'.
5016 2007-10-17 Robert Millan <rmh@aybabtu.com>
5018 * include/grub/i386/loader.h: New file.
5020 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
5021 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5022 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5023 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5024 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
5025 * include/grub/i386/loader.h (grub_linux_prot_size)
5026 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
5027 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
5028 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
5029 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
5031 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
5033 2007-10-15 Robert Millan <rmh@aybabtu.com>
5035 * normal/misc.c (grub_normal_print_device_info): Do not probe for
5036 filesystem when dev->disk is unset.
5037 Do probe for filesystem even when dev->disk->has_partitions is set.
5038 In case a filesystem is found, always report it.
5039 In case it isn't, if dev->disk->has_partitions is set, report that
5040 a partition table was found instead of reporting that no filesystem
5041 could be identified.
5043 2007-10-12 Robert Millan <rmh@aybabtu.com>
5045 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
5046 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
5048 * include/grub/types.h (grub_host_to_target16): New macro.
5049 (grub_host_to_target32): Likewise.
5050 (grub_host_to_target64): Likewise.
5051 (grub_target_to_host16): Likewise.
5052 (grub_target_to_host32): Likewise.
5053 (grub_target_to_host64): Likewise.
5055 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
5057 (GRUB_MOD_ALIGN): ...this. Update all users.
5059 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
5060 grub_host_to_target32.
5061 Replace grub_be_to_cpu32 with grub_target_to_host32.
5062 (load_modules): Likewise.
5063 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
5064 Replace grub_be_to_cpu32 with grub_target_to_host32.
5065 Replace grub_cpu_to_be16 with grub_host_to_target16.
5066 Replace grub_cpu_to_be32 grub_host_to_target32.
5068 2007-10-12 Robert Millan <rmh@aybabtu.com>
5070 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
5071 * util/elf/grub-mkimage.c: ... here.
5073 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
5074 `util/powerpc/ieee1275/grub-mkimage.c'.
5076 2007-10-07 Robert Millan <rmh@aybabtu.com>
5078 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
5079 and make it easier to figure out.
5080 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
5081 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
5082 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
5083 leave us with less than HEAP_MIN_SIZE total heap.
5084 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
5086 2007-10-03 Robert Millan <rmh@aybabtu.com>
5088 * include/grub/i386/io.h: New file.
5089 * commands/i386/pc/play.c (inb): Removed.
5091 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5093 * term/i386/pc/serial.c (inb): Removed.
5095 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5097 * term/i386/pc/vga.c (inb): Removed.
5099 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
5102 2007-10-02 Robert Millan <rmh@aybabtu.com>
5104 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
5105 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5106 Reported by Marcin Kurek.
5108 2007-09-07 Robert Millan <rmh@aybabtu.com>
5110 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
5111 SmartFirmware version updates (as released by Sven Luther), and avoid
5112 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
5113 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
5116 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5119 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
5120 when merging two regions.
5122 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5124 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
5125 * normal/completion.c (grub_normal_do_completion): Likewise.
5126 Reported by Hitoshi Ozeki.
5128 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5130 Do not use devices at boot in chainloading.
5132 * loader/i386/pc/chainloader.c (boot_drive): New variable.
5133 (boot_part_addr): Likewise.
5134 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
5135 with BOOT_DRIVE and BOOT_PART_ADDR.
5136 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
5137 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
5139 2007-08-29 Robert Millan <rmh@aybabtu.com>
5141 Patch from Simon Peter <dn.tlp@gmx.net>:
5142 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
5143 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
5144 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
5145 util/i386/pc/grub-setup.c_DEPENDENCIES.
5146 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
5147 util/grub-probe.c_DEPENDENCIES.
5148 * conf/powerpc-ieee1275.rmk: Likewise.
5150 2007-08-28 Robert Millan <rmh@aybabtu.com>
5152 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
5153 to tell grub-mkdevicemap how to name devices.
5154 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
5157 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
5158 util/i386/get_disk_name.c.
5159 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
5160 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
5161 util/ieee1275/get_disk_name.c.
5163 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
5165 * DISTLIST: Add util/i386/get_disk_name.c and
5166 util/ieee1275/get_disk_name.c.
5168 * util/grub-mkdevicemap.c: Replace device naming logic with
5169 grub_util_get_disk_name() calls.
5171 2007-08-20 Robert Millan <rmh@aybabtu.com>
5173 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
5174 (so that it works for both plural and singular quantities).
5176 2007-08-05 Robert Millan <rmh@aybabtu.com>
5178 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
5179 so that [xz] isn't taken into account when determining order.
5181 2007-08-02 Marco Gerards <marco@gnu.org>
5183 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
5184 `include/multiboot2.h', `include/grub/elfload.h',
5185 `include/multiboot.h', `include/grub/multiboot.h',
5186 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
5187 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
5188 `kern/elf.c', `loader/multiboot_loader.c',
5189 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
5190 `loader/i386/pc/multiboot2.c',
5191 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
5192 `util/i386/pc/grub-mkrescue.in'. Remove
5193 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
5194 `include/grub/i386/pc/util/biosdisk.h' and
5195 `include/grub/powerpc/ieee1275/multiboot.h'.
5197 2007-08-02 Bean <bean123ch@gmail.com>
5199 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
5200 (ntfs_mod_SOURCES): New variable.
5201 (ntfs_mod_CFLAGS): Likewise.
5202 (ntfs_mod_LDFLAGS): Likewise.
5204 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
5205 (grub_probe_SOURCES): Likewise.
5206 (grub_emu_SOURCES): Likewise.
5208 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5209 (grub_emu_SOURCES): Likewise.
5211 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
5212 (grub_emu_SOURCES): Likewise.
5214 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
5216 * fs/ntfs.c: New file.
5218 2007-08-02 Bean <bean123ch@gmail.com>
5220 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
5222 * file.h (grub_file): Likewise.
5224 * fshelp.h (grub_fshelp_read_file): Likewise.
5226 * util/i386/pc/grub-setup.c (setup): Likewise.
5227 (save_first_sector): Likewise.
5228 (save_blocklists): Likewise.
5230 * fs/affs.c (grub_affs_read_file): Likewise.
5232 * fs/ext2.c (grub_ext2_read_file): Likewise.
5234 * fs/fat.c (grub_fat_read_data): Likewise.
5236 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
5238 * fs/hfs.c (grub_hfs_read_file): Likewise.
5240 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
5242 * fs/jfs.c (grub_jfs_read_file): Likewise.
5244 * fs/minix.c (grub_minix_read_file): Likewise.
5246 * fs/sfs.c (grub_sfs_read_file): Likewise.
5248 * fs/ufs.c (grub_ufs_read_file): Likewise.
5250 * fs/xfs.c (grub_xfs_read_file): Likewise.
5252 * command/blocklist.c (read_blocklist): Likewise.
5253 (print_blocklist): Likewise.
5255 2007-08-02 Marco Gerards <marco@gnu.org>
5257 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
5260 * disk/host.c: New file.
5262 * util/hostfs.c: Likewise.
5264 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
5265 return `GRUB_ERR_BAD_FS'.
5266 * fs/sfs.c (grub_sfs_mount): Likewise.
5267 * fs/xfs.c (grub_xfs_mount): Likewise.
5269 * include/grub/disk.h (enum grub_disk_dev_id): Add
5270 `GRUB_DISK_DEVICE_HOST_ID'.
5272 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
5274 2007-07-24 Jerone Young <jerone@gmail.com>
5276 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
5277 modules for compilation.
5278 * conf/powerpc-ieee1275.rmk: Likewise.
5280 * include/multiboot.h: Move multiboot definitions to one file. Rename
5281 many definitions to not get grub specific.
5282 * include/multiboot2.h: Create header with multiboot 2 definitions.
5283 * include/grub/multiboot.h: Header for grub specific function
5284 prototypes and definitions.
5285 * include/grub/multiboot2.h: Likewise.
5286 * include/grub/multiboot_loader.h: Likewise.
5287 * include/grub/i386/pc/multiboot.h: Removed.
5288 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
5290 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
5291 and 2 to allow for one multiboot and module commands.
5292 * loader/multiboot2.c: Add multiboot2 functionality.
5293 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
5294 and definition names.
5295 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
5297 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
5298 ieee1275 specific multiboot2 code.
5300 * kern/i386/pc/startup.S: Change headers and definition names for
5301 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
5303 2007-07-22 Robert Millan <rmh@aybabtu.com>
5305 * geninitheader.sh: Process file specified in first parameter rather
5306 than hardcoding grub_modules_init.lst.
5307 * geninit.sh: Likewise. Also, construct header name dynamically rather
5308 than hardcoding grub_modules_init.h.
5310 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
5311 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
5312 grub_probe_init.[ch] and grub_setup_init.[ch].
5314 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
5315 grub_modules_init.h with grub_emu_init.h.
5316 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
5317 grub_probe_init.[ch] files.
5318 * conf/i386-efi.rmk: Likewise.
5319 * conf/i386-pc.rmk: Likewise.
5320 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
5321 grub_setup_init.[ch] files.
5323 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
5324 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
5325 to initialize modules rather than a list of hardcoded functions.
5326 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
5327 grub_init_all() to initialize modules rather than a list of hardcoded
5330 2007-07-22 Robert Millan <rmh@aybabtu.com>
5332 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
5333 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
5335 2007-07-22 Robert Millan <rmh@aybabtu.com>
5337 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5338 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
5339 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
5340 flag when running on SmartFirmware.
5341 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
5342 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
5345 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
5346 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
5347 rather than decreasing it.
5349 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
5350 there's not enough space to do it, fail in the same way as when it
5351 can't be done because there are no partitions.
5353 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
5354 when nvsetenv failed.
5356 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5358 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
5359 because this rule is automatically generated.
5360 (grub-mkrescue): Removed for the same reason as above.
5362 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
5364 Migrate to GNU General Public License Version 3.
5366 * COPYING: Replaced with the plain text version of GPLv3.
5368 * config.guess: Updated from gnulib.
5369 * config.sub: Likewise.
5371 * geninit.sh: Output a GPLv3 copyright notice.
5372 * geninitheader.sh: Likewise.
5373 * genmodsrc.sh: Likewise.
5374 * gensymlist.sh.in: Likewise.
5376 * boot/i386/pc/boot.S: Upgraded to GPLv3.
5377 * boot/i386/pc/diskboot.S: Likewise.
5378 * boot/i386/pc/pxeboot.S: Likewise.
5379 * commands/blocklist.c: Likewise.
5380 * commands/boot.c: Likewise.
5381 * commands/cat.c: Likewise.
5382 * commands/cmp.c: Likewise.
5383 * commands/configfile.c: Likewise.
5384 * commands/echo.c: Likewise.
5385 * commands/help.c: Likewise.
5386 * commands/ls.c: Likewise.
5387 * commands/search.c: Likewise.
5388 * commands/terminal.c: Likewise.
5389 * commands/test.c: Likewise.
5390 * commands/videotest.c: Likewise.
5391 * commands/i386/cpuid.c: Likewise.
5392 * commands/i386/pc/halt.c: Likewise.
5393 * commands/i386/pc/play.c: Likewise.
5394 * commands/i386/pc/reboot.c: Likewise.
5395 * commands/i386/pc/vbeinfo.c: Likewise.
5396 * commands/i386/pc/vbetest.c: Likewise.
5397 * commands/ieee1275/halt.c: Likewise.
5398 * commands/ieee1275/reboot.c: Likewise.
5399 * commands/ieee1275/suspend.c: Likewise.
5400 * disk/loopback.c: Likewise.
5401 * disk/lvm.c: Likewise.
5402 * disk/raid.c: Likewise.
5403 * disk/efi/efidisk.c: Likewise.
5404 * disk/i386/pc/biosdisk.c: Likewise.
5405 * disk/ieee1275/ofdisk.c: Likewise.
5406 * font/manager.c: Likewise.
5407 * fs/affs.c: Likewise.
5408 * fs/ext2.c: Likewise.
5409 * fs/fat.c: Likewise.
5410 * fs/fshelp.c: Likewise.
5411 * fs/hfs.c: Likewise.
5412 * fs/hfsplus.c: Likewise.
5413 * fs/iso9660.c: Likewise.
5414 * fs/jfs.c: Likewise.
5415 * fs/minix.c: Likewise.
5416 * fs/sfs.c: Likewise.
5417 * fs/ufs.c: Likewise.
5418 * fs/xfs.c: Likewise.
5419 * hello/hello.c: Likewise.
5420 * include/grub/acorn_filecore.h: Likewise.
5421 * include/grub/arg.h: Likewise.
5422 * include/grub/bitmap.h: Likewise.
5423 * include/grub/boot.h: Likewise.
5424 * include/grub/cache.h: Likewise.
5425 * include/grub/device.h: Likewise.
5426 * include/grub/disk.h: Likewise.
5427 * include/grub/dl.h: Likewise.
5428 * include/grub/elfload.h: Likewise.
5429 * include/grub/env.h: Likewise.
5430 * include/grub/err.h: Likewise.
5431 * include/grub/file.h: Likewise.
5432 * include/grub/font.h: Likewise.
5433 * include/grub/fs.h: Likewise.
5434 * include/grub/fshelp.h: Likewise.
5435 * include/grub/gzio.h: Likewise.
5436 * include/grub/hfs.h: Likewise.
5437 * include/grub/kernel.h: Likewise.
5438 * include/grub/loader.h: Likewise.
5439 * include/grub/lvm.h: Likewise.
5440 * include/grub/misc.h: Likewise.
5441 * include/grub/mm.h: Likewise.
5442 * include/grub/net.h: Likewise.
5443 * include/grub/normal.h: Likewise.
5444 * include/grub/parser.h: Likewise.
5445 * include/grub/partition.h: Likewise.
5446 * include/grub/pc_partition.h: Likewise.
5447 * include/grub/raid.h: Likewise.
5448 * include/grub/rescue.h: Likewise.
5449 * include/grub/script.h: Likewise.
5450 * include/grub/setjmp.h: Likewise.
5451 * include/grub/symbol.h: Likewise.
5452 * include/grub/term.h: Likewise.
5453 * include/grub/terminfo.h: Likewise.
5454 * include/grub/tparm.h: Likewise.
5455 * include/grub/types.h: Likewise.
5456 * include/grub/video.h: Likewise.
5457 * include/grub/efi/api.h: Likewise.
5458 * include/grub/efi/chainloader.h: Likewise.
5459 * include/grub/efi/console.h: Likewise.
5460 * include/grub/efi/console_control.h: Likewise.
5461 * include/grub/efi/disk.h: Likewise.
5462 * include/grub/efi/efi.h: Likewise.
5463 * include/grub/efi/pe32.h: Likewise.
5464 * include/grub/efi/time.h: Likewise.
5465 * include/grub/i386/linux.h: Likewise.
5466 * include/grub/i386/setjmp.h: Likewise.
5467 * include/grub/i386/types.h: Likewise.
5468 * include/grub/i386/efi/kernel.h: Likewise.
5469 * include/grub/i386/efi/loader.h: Likewise.
5470 * include/grub/i386/efi/time.h: Likewise.
5471 * include/grub/i386/pc/biosdisk.h: Likewise.
5472 * include/grub/i386/pc/boot.h: Likewise.
5473 * include/grub/i386/pc/chainloader.h: Likewise.
5474 * include/grub/i386/pc/console.h: Likewise.
5475 * include/grub/i386/pc/init.h: Likewise.
5476 * include/grub/i386/pc/kernel.h: Likewise.
5477 * include/grub/i386/pc/loader.h: Likewise.
5478 * include/grub/i386/pc/memory.h: Likewise.
5479 * include/grub/i386/pc/multiboot.h: Likewise.
5480 * include/grub/i386/pc/serial.h: Likewise.
5481 * include/grub/i386/pc/time.h: Likewise.
5482 * include/grub/i386/pc/vbe.h: Likewise.
5483 * include/grub/i386/pc/vbeblit.h: Likewise.
5484 * include/grub/i386/pc/vbefill.h: Likewise.
5485 * include/grub/i386/pc/vbeutil.h: Likewise.
5486 * include/grub/i386/pc/vga.h: Likewise.
5487 * include/grub/ieee1275/ieee1275.h: Likewise.
5488 * include/grub/ieee1275/ofdisk.h: Likewise.
5489 * include/grub/powerpc/libgcc.h: Likewise.
5490 * include/grub/powerpc/setjmp.h: Likewise.
5491 * include/grub/powerpc/types.h: Likewise.
5492 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
5493 * include/grub/powerpc/ieee1275/console.h: Likewise.
5494 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
5495 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
5496 * include/grub/powerpc/ieee1275/loader.h: Likewise.
5497 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
5498 * include/grub/powerpc/ieee1275/time.h: Likewise.
5499 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
5500 * include/grub/sparc64/libgcc.h: Likewise.
5501 * include/grub/sparc64/setjmp.h: Likewise.
5502 * include/grub/sparc64/types.h: Likewise.
5503 * include/grub/sparc64/ieee1275/console.h: Likewise.
5504 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
5505 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
5506 * include/grub/sparc64/ieee1275/time.h: Likewise.
5507 * include/grub/util/biosdisk.h: Likewise.
5508 * include/grub/util/getroot.h: Likewise.
5509 * include/grub/util/lvm.h: Likewise.
5510 * include/grub/util/misc.h: Likewise.
5511 * include/grub/util/raid.h: Likewise.
5512 * include/grub/util/resolve.h: Likewise.
5513 * io/gzio.c: Likewise.
5514 * kern/device.c: Likewise.
5515 * kern/disk.c: Likewise.
5516 * kern/dl.c: Likewise.
5517 * kern/elf.c: Likewise.
5518 * kern/env.c: Likewise.
5519 * kern/err.c: Likewise.
5520 * kern/file.c: Likewise.
5521 * kern/fs.c: Likewise.
5522 * kern/loader.c: Likewise.
5523 * kern/main.c: Likewise.
5524 * kern/misc.c: Likewise.
5525 * kern/mm.c: Likewise.
5526 * kern/parser.c: Likewise.
5527 * kern/partition.c: Likewise.
5528 * kern/rescue.c: Likewise.
5529 * kern/term.c: Likewise.
5530 * kern/efi/efi.c: Likewise.
5531 * kern/efi/init.c: Likewise.
5532 * kern/efi/mm.c: Likewise.
5533 * kern/i386/dl.c: Likewise.
5534 * kern/i386/efi/init.c: Likewise.
5535 * kern/i386/efi/startup.S: Likewise.
5536 * kern/i386/pc/init.c: Likewise.
5537 * kern/i386/pc/lzo1x.S: Likewise.
5538 * kern/i386/pc/startup.S: Likewise.
5539 * kern/ieee1275/ieee1275.c: Likewise.
5540 * kern/powerpc/cache.S: Likewise.
5541 * kern/powerpc/dl.c: Likewise.
5542 * kern/powerpc/ieee1275/cmain.c: Likewise.
5543 * kern/powerpc/ieee1275/crt0.S: Likewise.
5544 * kern/powerpc/ieee1275/init.c: Likewise.
5545 * kern/powerpc/ieee1275/openfw.c: Likewise.
5546 * kern/sparc64/cache.S: Likewise.
5547 * kern/sparc64/dl.c: Likewise.
5548 * kern/sparc64/ieee1275/init.c: Likewise.
5549 * kern/sparc64/ieee1275/openfw.c: Likewise.
5550 * loader/efi/chainloader.c: Likewise.
5551 * loader/efi/chainloader_normal.c: Likewise.
5552 * loader/i386/efi/linux.c: Likewise.
5553 * loader/i386/efi/linux_normal.c: Likewise.
5554 * loader/i386/pc/chainloader.c: Likewise.
5555 * loader/i386/pc/chainloader_normal.c: Likewise.
5556 * loader/i386/pc/linux.c: Likewise.
5557 * loader/i386/pc/linux_normal.c: Likewise.
5558 * loader/i386/pc/multiboot.c: Likewise.
5559 * loader/i386/pc/multiboot_normal.c: Likewise.
5560 * loader/powerpc/ieee1275/linux.c: Likewise.
5561 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
5562 * normal/arg.c: Likewise.
5563 * normal/cmdline.c: Likewise.
5564 * normal/command.c: Likewise.
5565 * normal/completion.c: Likewise.
5566 * normal/execute.c: Likewise.
5567 * normal/function.c: Likewise.
5568 * normal/lexer.c: Likewise.
5569 * normal/main.c: Likewise.
5570 * normal/menu.c: Likewise.
5571 * normal/menu_entry.c: Likewise.
5572 * normal/misc.c: Likewise.
5573 * normal/parser.y: Likewise.
5574 * normal/script.c: Likewise.
5575 * normal/i386/setjmp.S: Likewise.
5576 * normal/powerpc/setjmp.S: Likewise.
5577 * normal/sparc64/setjmp.S: Likewise.
5578 * partmap/acorn.c: Likewise.
5579 * partmap/amiga.c: Likewise.
5580 * partmap/apple.c: Likewise.
5581 * partmap/gpt.c: Likewise.
5582 * partmap/pc.c: Likewise.
5583 * partmap/sun.c: Likewise.
5584 * term/gfxterm.c: Likewise.
5585 * term/terminfo.c: Likewise.
5586 * term/efi/console.c: Likewise.
5587 * term/i386/pc/console.c: Likewise.
5588 * term/i386/pc/serial.c: Likewise.
5589 * term/i386/pc/vesafb.c: Likewise.
5590 * term/i386/pc/vga.c: Likewise.
5591 * term/ieee1275/ofconsole.c: Likewise.
5592 * util/biosdisk.c: Likewise.
5593 * util/console.c: Likewise.
5594 * util/genmoddep.c: Likewise.
5595 * util/getroot.c: Likewise.
5596 * util/grub-emu.c: Likewise.
5597 * util/grub-mkdevicemap.c: Likewise.
5598 * util/grub-probe.c: Likewise.
5599 * util/lvm.c: Likewise.
5600 * util/misc.c: Likewise.
5601 * util/raid.c: Likewise.
5602 * util/resolve.c: Likewise.
5603 * util/update-grub.in: Likewise.
5604 * util/update-grub_lib.in: Likewise.
5605 * util/grub.d/00_header.in: Likewise.
5606 * util/grub.d/10_hurd.in: Likewise.
5607 * util/grub.d/10_linux.in: Likewise.
5608 * util/i386/efi/grub-install.in: Likewise.
5609 * util/i386/efi/grub-mkimage.c: Likewise.
5610 * util/i386/pc/grub-install.in: Likewise.
5611 * util/i386/pc/grub-mkimage.c: Likewise.
5612 * util/i386/pc/grub-mkrescue.in: Likewise.
5613 * util/i386/pc/grub-setup.c: Likewise.
5614 * util/i386/pc/misc.c: Likewise.
5615 * util/powerpc/ieee1275/grub-install.in: Likewise.
5616 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
5617 * util/powerpc/ieee1275/misc.c: Likewise.
5618 * video/bitmap.c: Likewise.
5619 * video/video.c: Likewise.
5620 * video/i386/pc/vbe.c: Likewise.
5621 * video/i386/pc/vbeblit.c: Likewise.
5622 * video/i386/pc/vbefill.c: Likewise.
5623 * video/i386/pc/vbeutil.c: Likewise.
5624 * video/readers/tga.c: Likewise.
5626 2007-07-02 Robert Millan <rmh@aybabtu.com>
5628 * conf/i386-efi.rmk: Replace obsolete reference to
5629 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
5630 with util/getroot.c.
5631 * conf/powerpc-ieee1275.rmk: Likewise.
5632 * conf/sparc64-ieee1275.rmk: Likewise.
5634 * util/grub-emu.c (main): Fix unchecked pointer handling.
5636 2007-07-02 Robert Millan <rmh@aybabtu.com>
5638 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
5639 invocation to fail, in order to support partition-less media.
5641 * util/i386/pc/grub-install.in: Likewise.
5643 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
5644 which fs or partmap modules are needed (akin to its sister scripts).
5646 Also use grub-probe to get rid of unportable /proc/mounts check.
5648 Print the same informational message that the other scripts do, before
5651 2007-06-23 Robert Millan <rmh@aybabtu.com>
5653 * util/update-grub_lib.in (font_path): New function. Determine whether
5654 a font file can be found and, if so, echo the GRUB path to it.
5656 * util/update-grub.in: Handle multiple terminals depending on user
5657 input, platform availability and font file presence. Propagate
5658 variables of our findings to /etc/grub.d/ children.
5660 * util/grub.d/00_header.in: Handle multiple terminals, based on
5661 environment setup by update-grub.
5663 2007-06-23 Robert Millan <rmh@aybabtu.com>
5665 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
5667 2007-06-21 Robert Millan <rmh@aybabtu.com>
5669 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
5670 indicate end of data section in kernel image.
5671 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
5672 GRUB_KERNEL_MACHINE_DATA_END.
5674 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
5676 * kern/i386/efi/startup.S: Likewise.
5678 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
5679 during image generation. Implement --prefix option to override this
5681 * util/i386/efi/grub-mkimage.c: Likewise.
5683 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
5684 code to make path relative to its root into a separate function.
5686 * util/i386/pc/grub-install.in: Use newly provided
5687 make_system_path_relative_to_its_root() to convert ${grubdir}, then
5688 pass the result to grub-install --prefix.
5690 2007-06-13 Robert Millan <rmh@aybabtu.com>
5692 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
5694 * util/grub-emu.c: Use above definitions from misc.h instead of
5696 * util/grub-mkdevicemap.c: Likewise.
5697 * util/i386/pc/grub-setup.c: Likewise.
5698 * util/grub-probe.c: Likewise.
5699 (probe): Abort with grub_util_error() when either
5700 grub_guess_root_device or grub_util_get_grub_dev fails.
5702 2007-06-12 Robert Millan <rmh@aybabtu.com>
5704 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
5706 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
5708 * util/grub-probe.c (probe): Likewise for "drive_name".
5710 2007-06-11 Robert Millan <rmh@aybabtu.com>
5712 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
5713 not just the cdrom one.
5715 2007-06-11 Robert Millan <rmh@aybabtu.com>
5717 * util/i386/pc/grub-mkrescue.in: Add "set -e".
5718 Add --pkglibdir=DIR option to override pkglibdir.
5719 Mention --image-type=TYPE in help output.
5720 Fix --grub-mkimage (it was a no-op).
5721 Abort gracefully when no parameter is given.
5723 2007-06-11 Robert Millan <rmh@aybabtu.com>
5725 * util/i386/pc/grub-mkrescue.in: New file.
5726 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
5727 * Makefile.in: Handle bin_SCRIPTS.
5729 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
5731 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
5732 list of video modes.
5734 2007-06-06 Robert Millan <rmh@aybabtu.com>
5736 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
5737 file doesn't exist, or if it is in a filesystem grub can't read.
5739 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
5740 not abort if GRUB_DRIVE could not be defined. Rearrange generated
5741 header comment to fit in 80 columns when the variables are resolved.
5743 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
5744 could be identified by update-grub. Remove redundant check for
5745 unifont.pff existence (since convert_system_path_to_grub_path now
5748 2007-06-04 Robert Millan <rmh@aybabtu.com>
5750 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
5752 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
5754 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
5756 2007-06-04 Robert Millan <rmh@aybabtu.com>
5758 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
5760 * include/grub/partition.h: Declare grub_apple_partition_map_init and
5761 grub_apple_partition_map_fini.
5764 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
5765 to access >2 TiB disks).
5767 Print disk->total_sectors with %llu instead of %lu, since this
5768 variable is always 64-bit (prevents wrong disk size from being displayed
5769 on either >2 TiB disk or big-endian CPU).
5771 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
5772 into a generic case that supports all (sane) partition maps.
5774 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
5777 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
5778 and grub_apple_partition_map_fini() after that.
5780 2007-06-01 Robert Millan <rmh@aybabtu.com>
5782 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
5784 * util/grub.d/00_header.in: Only enable gfxterm when
5785 convert_system_path_to_grub_path() succeeds.
5787 2007-05-20 Robert Millan <rmh@aybabtu.com>
5789 * util/update-grub_lib.in: New file.
5790 * DISTLIST: Add update-grub_lib.in.
5791 * conf/common.rmk: Generate update-grub_lib and install it in
5793 * Makefile.in: Add install routine for $(lib_DATA).
5795 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
5796 function provided by update-grub_lib to support arbitrary paths of
5798 * util/update-grub.in: Use convert_system_path_to_grub_path() to
5799 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
5801 2007-05-19 Robert Millan <rmh@aybabtu.com>
5803 * commands/i386/cpuid.c: New module.
5805 * conf/i386-efi.rmk: Enable cpuid.mod.
5806 * conf/i386-pc.rmk: Likewise.
5808 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
5810 * kern/disk.c (grub_disk_read): Check return value of
5813 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
5815 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
5817 * disk/raid.c (grub_raid_open): Likewise.
5819 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
5821 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
5822 stack instead of on the heap.
5824 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
5825 before doing a read on it.
5827 * configure.ac: Only use -fno-stack-protector for the target
5830 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
5832 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
5833 __attribute_ ((unused)) to mode_type argument.
5835 * util/getroot.c (grub_guess_root_device): Fix #endif.
5837 * kern/misc.c (memcmp): Fix prototype.
5839 * include/grub/partition.h [GRUB_UTIL]
5840 (grub_gpt_partition_map_init): Add prototype.
5841 (grub_gpt_partition_map_fini): Likewise.
5843 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
5846 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
5847 (grub_fat_read_data): Likewise.
5848 (grub_fat_find_dir): Likewise.
5850 * font/manager.c (find_glyph): Make table a const.
5851 (grub_font_get_glyph): Remove bitmap from if statement.
5853 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
5855 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
5856 code, first search for device in /dev/mapper, then in /dev.
5857 (grub_util_get_grub_dev): New function.
5858 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
5860 * util/grub-probe.c (probe): Remove check for RAID, call
5861 grub_util_get_grub_dev() instead of
5862 grub_util_biosdisk_get_grub_dev().
5863 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
5864 grub_util_biosdisk_get_grub_dev().
5865 * util/i386/pc/grub-setup.c (main): Likewise.
5867 2007-05-16 Robert Millan <rmh@aybabtu.com>
5869 * DISTLIST: Update for the latest changes.
5870 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
5871 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
5872 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
5873 grub/util/biosdisk.h.
5874 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
5875 grub/util/biosdisk.h.
5877 2007-05-16 Robert Millan <rmh@aybabtu.com>
5879 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
5881 2007-05-16 Robert Millan <rmh@aybabtu.com>
5883 * util/i386/efi/grub-install.in: New.
5884 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
5885 newly added grub-install.
5886 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
5888 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
5889 grub/util/biosdisk.h.
5890 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
5891 grub/util/biosdisk.h.
5893 2007-05-16 Robert Millan <rmh@aybabtu.com>
5895 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
5896 * include/grub/util/biosdisk.h: ... here.
5897 * util/i386/pc/biosdisk.c: Moved to ...
5898 * util/biosdisk.c: ... here.
5899 * util/i386/pc/getroot.c: Moved to ...
5900 * util/getroot.c: ... here.
5901 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
5902 * util/grub-mkdevicemap.c: ... here.
5903 * util/i386/pc/grub-probe.c: Moved to ...
5904 * util/grub-probe.c: ... here.
5906 2007-05-15 Robert Millan <rmh@aybabtu.com>
5908 * util/update-grub.in: Remove duplicated line in grub.cfg header
5911 2007-05-13 Robert Millan <rmh@aybabtu.com>
5913 * util/update-grub.in: Fix a few assumptions about the devices holding
5914 /, /boot and /boot/grub being the same.
5915 * util/grub.d/00_header.in: Likewise.
5916 * util/grub.d/10_hurd.in: Likewise.
5917 * util/grub.d/10_linux.in: Likewise.
5919 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
5920 patterns. Use that to define the `.old' suffix as older than `'.
5922 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
5924 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
5925 the grub.cfg header message.
5927 2007-05-11 Robert Millan <rmh@aybabtu.com>
5929 * util/update-grub.in: Create device.map if it doesn't already exist,
5930 before attempting to run grub-probe.
5931 Check for grub-probe and grub-mkdevicemap with the same code
5932 grub-install is using.
5935 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
5937 * Makefile.in: Add the datarootdir autoconf variable.
5939 2007-05-09 Robert Millan <rmh@aybabtu.com>
5941 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
5942 fail gracefully if dev->disk->partition == NULL.
5944 2007-05-07 Robert Millan <rmh@aybabtu.com>
5946 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
5947 determine partition map module.
5948 * util/i386/pc/grub-install.in: Use this feature to decide which
5949 partition module to load, instead of hardcoding pc and gpt.
5951 2007-05-07 Robert Millan <rmh@aybabtu.com>
5953 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
5954 source directory differs from build directory.
5956 2007-05-05 Robert Millan <rmh@aybabtu.com>
5958 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
5961 2007-05-05 Robert Millan <rmh@aybabtu.com>
5963 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
5965 2007-05-05 Robert Millan <rmh@aybabtu.com>
5967 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
5968 command-line arguments via ${GRUB_CMDLINE_LINUX}.
5970 2007-05-05 Robert Millan <rmh@aybabtu.com>
5972 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
5973 (grub_probe_SOURCES): Likewise.
5974 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
5975 GPT and initialize dos_part and bsd_part accordingly.
5976 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
5978 (main): Activate gpt module for use during partition identification,
5979 and deactivate it afterwards.
5980 * util/i386/pc/grub-install.in: Add gpt module to core.img.
5981 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
5982 partition identification, and deactivate it afterwards.
5984 2007-05-05 Robert Millan <rmh@aybabtu.com>
5986 * term/i386/pc/console.c (grub_console_fini): Call
5987 grub_term_set_current() before grub_term_unregister().
5989 2007-05-04 Robert Millan <rmh@aybabtu.com>
5991 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
5992 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
5993 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
5994 and update-grub_DATA.
5995 * conf/common.rmk: Build and install update-grub components.
5996 * conf/common.mk: Regenerate.
5997 * util/update-grub.in: New. Core of update-grub.
5998 * util/grub.d/00_header.in: New. Generates grub.cfg header.
5999 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
6000 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
6001 * util/grub.d/README: New. Document grub.d directory layout.
6003 2007-05-01 Robert Millan <rmh@aybabtu.com>
6005 * util/grub-emu.c: Move initialization functions
6006 grub_util_biosdisk_init() and grub_init_all() before
6007 grub_util_biosdisk_get_grub_dev(), which relies on them.
6009 2007-04-19 Robert Millan <rmh@aybabtu.com>
6011 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
6014 2007-04-18 Jerone Young <jerone@gmail.com>
6016 * kernel/elf.c: Add missing parenthesis for conditional statement
6019 2007-04-10 Jerone Young <jerone@gmail.com>
6021 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
6022 continue on and look for device node with real device name.
6024 2007-04-10 Jerone Young <jerone@gmail.com>
6026 * configure.ac: Add argument for autoconf to use transformation
6028 * Makefile.in: Add autoconf package transformation code.
6029 * util/i386/pc/grub-install.in: Likewise.
6030 * util/powerpc/ieee1275/grub-install.in: Likewise.
6032 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
6034 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
6035 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
6036 (EXT2_REVISION): Likewise.
6037 (EXT2_INODE_SIZE): Likewise.
6038 (struct grub_ext2_block_group): Added a missing member
6040 (grub_ext2_read_inode): Divide by the inode size in a superblock
6041 instead of 128 to obtain INODES_PER_BLOCK.
6042 Use the macro EXT2_INODE_SIZE instead of directly using
6045 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
6047 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
6048 superblock instead of the structure size to compute an
6049 offset. This fixes the problem that GRUB could not read a
6050 filesystem when inode size is different from 128-byte.
6052 2007-03-05 Marco Gerards <marco@gnu.org>
6054 * normal/main.c (read_config_file): When "menu" is not set, create
6057 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6059 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
6060 (HEAP_LIMIT): New macro.
6061 (grub_claim_heap): Claim memory up to `heaplimit'.
6063 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
6065 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
6066 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
6068 (grub_arch_modules_addr): Return address after `_end'.
6069 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
6070 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
6071 (add_segments): Calculate `_end' from phdr size and location.
6072 (ALIGN_UP): Moved to ...
6073 * include/grub/misc.h: here.
6074 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6076 (GRUB_IEEE1275_MODULE_BASE): Removed.
6078 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6080 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
6083 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6085 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
6087 (grub_elf64_load_hook_t): Likewise.
6088 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
6091 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
6093 * kern/mm.c: Update copyright.
6094 (grub_mm_debug): Correct syntax error.
6095 (grub_mm_dump_free): New function.
6096 (grub_debug_free): Call `grub_free'.
6097 * include/grub/mm.h: Update copyright.
6098 (grub_mm_dump_free): Add declaration.
6100 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6102 * include/grub/ieee1275/ieee1275.h: Update copyright.
6103 * kern/powerpc/ieee1275/init.c: Likewise.
6104 * kern/powerpc/ieee1275/openfw.c: Likewise.
6106 * loader/powerpc/ieee1275/linux.c: Likewise.
6107 * include/grub/elfload.h: Likewise.
6108 * kern/elf.c: Likewise.
6109 (grub_elf32_load): Pass `base' and `size' parameters. Update all
6111 (grub_elf64_load): Likewise.
6112 (grub_elf32_load_segment): Move to a nested function.
6113 (grub_elf64_load_segment): Likewise.
6115 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
6117 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
6119 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
6120 (grub_heap_len): Likewise.
6121 (HEAP_SIZE): New macro.
6122 (grub_claim_heap): New function.
6123 (grub_machine_init): Don't claim heap directly. Call
6125 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
6126 (grub_available_iterate): New function.
6128 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
6130 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
6131 * configure.ac: Use it for testing the HOST and TARGET compilers.
6133 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
6135 * Makefile.in (enable_grub_emu): New variable.
6136 * configure.ac (--enable-grub-emu): New option.
6137 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
6138 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
6139 * conf/i386-pc.rmk: Likewise.
6140 * conf/powerpc-ieee1275.rmk: Likewise.
6141 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
6143 2006-12-12 Marco Gerards <marco@gnu.org>
6145 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
6147 * kern/env.c (grub_env_unset): Don't free the member `value' when
6148 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
6151 * normal/main.c (current_menu): Removed.
6152 (free_menu): Unset the `menu' environment variable.
6153 (grub_normal_menu_addentry): Make use of the environment variable
6154 `menu', instead of using the global `current_menu'. Allocate
6155 memory for the sourcecode of this entry.
6156 (read_config_file): New argument `nested', changed all callers.
6157 Only in the case of a new context, initialize a new menu. Set the
6158 `menu' environment variable.
6159 (grub_normal_execute): Don't set and unset the environment
6160 variable `menu' here anymore. Only free the menu when leaving the
6163 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
6166 2006-12-11 Marco Gerards <marco@gnu.org>
6168 * normal/menu_entry.c (run): Fix off by one bug so the last line
6169 is executed. Move the loader check to outside the loop.
6171 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
6173 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
6175 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
6177 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
6178 the number of sectors. Reported by Andrey Shuvikov
6179 <mr_hyro@yahoo.com>.
6181 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
6183 * kern/disk.c (grub_disk_read): When there is a read error, always
6184 try to read only the necessary data.
6186 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
6188 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
6190 [GRUB_UTIL] (grub_raid_fini): Likewise.
6191 [GRUB_UTIL] (grub_lvm_init): Likewise.
6192 [GRUB_UTIL] (grub_lvm_fini): Likewise.
6193 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
6194 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
6195 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
6196 and grub_raid_fini().
6198 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
6200 * include/grub/types.h (__unused): Rename to UNUSED.
6201 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
6202 (grub_elf64_size): Likewise.
6204 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6206 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
6207 grub_error_push and grub_error_pop in the error-handling path.
6208 (grub_elf32_load_segment): Only call grub_file_read with non-zero
6211 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
6213 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
6214 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6215 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6216 (kernel_elf_SOURCES): Likewise.
6217 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
6218 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
6219 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6220 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6221 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
6222 (elf_mod_SOURCES): New variable.
6223 (elf_mod_CFLAGS): Likewise.
6224 (elf_mod_LDFLAGS): Likewise.
6225 * include/grub/types.h (__unused): New macro.
6226 * include/grub/elfload.h: New file.
6227 * kern/elf.c: Likewise.
6228 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
6229 (ELF32_LOADMASK): New macro.
6230 (ELF64_LOADMASK): Likewise.
6232 (grub_linux_load32): New function.
6233 (grub_linux_load64): Likewise.
6234 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
6235 Use grub_elf_t instead of grub_file_t.
6237 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
6239 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
6240 `catch_result' to struct set_color_args.
6242 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
6244 * normal/menu.c: Include grub/script.h.
6245 * normal/menu_entry.c: Likewise.
6246 * include/grub/normal.h: Do not include grub/script.h.
6248 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6250 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
6252 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6254 * kern/disk.c (grub_disk_open): Print debug messages when opening a
6256 (grub_disk_close): Print debug messages when closing a disk.
6257 (grub_disk_read): Print debug messages when disk read fails.
6258 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
6260 * kern/partition.c: Include misc.h.
6261 (grub_partition_iterate): Print debug messages when detecting
6264 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
6266 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
6268 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
6270 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
6272 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
6273 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
6275 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
6277 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
6278 instead of sizeof(lv). Patch by Michael Guntsche.
6280 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
6282 * disk/lvm.c: Rename VGS to VG_LIST.
6283 (grub_lvm_iterate): Change VGS->LV to VG-LV.
6284 (grub_lvm_open): Likewise.
6285 Thanks to Michael Guntsche for finding this bug.
6287 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
6289 * configure.ac (AC_INIT): Bumped to 1.95.
6291 2006-10-14 Robert Millan <rmh@aybabtu.com>
6293 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
6294 with "/dev/.static/dev/md".
6296 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
6298 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
6299 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
6300 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
6301 DRIVE_NAME are always freed.
6303 * util/i386/pc/biosdisk.c (make_device_name): Add one into
6304 DOS_PART, as a DOS partition is counted from one instead of zero
6305 now. Reported by Robert Millan.
6307 2006-10-14 Robert Millan <rmh@aybabtu.com>
6309 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
6310 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
6311 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
6312 string returned by grub_guess_root_device.
6313 * util/i386/pc/grub-setup.c: Likewise.
6314 * util/i386/pc/grub-probefs.c: Likewise.
6316 * util/i386/pc/grub-probefs.c: Rename to ...
6317 * util/i386/pc/grub-probe.c: ... this.
6318 * DISTLIST: Remove grub-probefs, add grub-probe.
6319 * conf/i386-efi.rmk: Likewise.
6320 * conf/i386-pc.rmk: Likewise.
6321 * util/i386/pc/grub-install.in: Likewise.
6323 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
6324 choose which information we want to print.
6326 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
6328 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
6329 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
6330 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
6331 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
6332 video/readers/tga.c and video/i386/pc/vbeutil.c.
6334 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
6336 Added support for RAID and LVM.
6338 * disk/lvm.c: New file.
6339 * disk/raid.c: Likewise.
6340 * include/grub/lvm.h: Likewise.
6341 * include/grub/raid.h: Likewise.
6342 * include/grub/util/lvm.h: Likewise.
6343 * include/grub/util/raid.h: Likewise.
6344 * util/lvm.c: Likewise.
6345 * util/raid.c: Likewise.
6347 * include/grub/disk.h (grub_disk_dev_id): Add
6348 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
6349 (grub_disk_get_size): New prototype.
6350 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
6351 returns a partition.
6352 (grub_disk_get_size): New function.
6354 * kern/i386/pc/init.c (make_install_device): Copy the prefix
6355 verbatim if grub_install_dos_part is -2.
6357 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
6360 * util/i386/pc/grub-setup.c (setup): New argument
6361 MUST_EMBED. Force embedding of GRUB when the argument is
6362 true. Close FILE before returning.
6363 (main): Add support for RAID and LVM.
6365 * conf/common.rmk: Add RAID and LVM modules.
6366 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
6368 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
6370 * kern/misc.c (grub_strstr): New function.
6371 * include/grub/misc.h (grub_strstr): New prototype.
6373 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
6375 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
6377 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
6379 * kern/misc.c (grub_strtoull): Guess the base only if not
6382 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6384 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
6387 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6389 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
6391 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
6392 Remove `flags' argument. All callers changed.
6393 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
6394 (IEEE1275_IHANDLE_INVALID): New variable.
6395 (IEEE1275_CELL_INVALID): New variable.
6396 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
6397 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
6398 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
6399 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
6400 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
6401 codes from Open Firmware. All callers updated.
6402 (grub_ieee1275_next_property): Directly return Open Firmware return
6404 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6405 Standardize error checking from `grub_ieee1275_get_property'.
6406 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
6407 `devalias' to `aliases'. Correct comments. Consolidate error paths.
6409 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
6411 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
6412 `instance_to_package_args' to `instance_to_path_args'.
6414 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
6415 `grub_ieee1275_chosen'.
6417 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
6418 `grub_ieee1275_interpret'.
6420 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6422 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
6424 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
6426 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
6427 (__cmpdi): Likewise.
6429 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
6430 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
6433 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
6435 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
6436 to type `grub_ssize_t'.
6437 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
6439 2006-09-22 Marco Gerards <marco@gnu.org>
6441 * normal/script.c (grub_script_create_cmdmenu): Skip leading
6444 2006-09-22 Marco Gerards <marco@gnu.org>
6446 * commands/echo.c: New file.
6448 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
6450 * conf/common.rmk (echo_mod_SOURCES): New variable.
6451 (echo_mod_CFLAGS): Likewise.
6452 (echo_mod_LDFLAGS): Likewise.
6454 2006-09-22 Marco Gerards <marco@gnu.org>
6456 * normal/main.c (get_line): Malloc memory instead of using
6457 preallocated memory. Removed the arguments `cmdline' and
6458 `max_len'. Updated all callers.
6460 2006-09-22 Marco Gerards <marco@gnu.org>
6462 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
6463 (normal_mod_DEPENDENCIES): Likewise.
6465 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
6466 (normal_mod_DEPENDENCIES): Likewise.
6468 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
6470 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
6472 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
6474 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
6475 (normal_mod_DEPENDENCIES): Likewise.
6476 * conf/i386-pc.mk: Regenerate.
6477 * conf/i386-efi.mk: Likewise
6478 * conf/common.mk: Likewise.
6479 * conf/powerpc-ieee1275.mk: Likewise.
6480 * conf/sparc64-ieee1275.mk: Likewise.
6482 2006-09-22 Robert Millan <rmh@aybabtu.com>
6484 Sync with i386 version.
6485 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
6486 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
6488 2006-09-21 Robert Millan <rmh@aybabtu.com>
6490 Import from GRUB Legacy (lib/device.c):
6491 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
6492 (init_device_map) [__linux__]: Add support for I2O devices.
6494 2006-09-14 Marco Gerards <marco@gnu.org>
6496 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
6499 2006-09-14 Robert Millan <rmh@aybabtu.com>
6501 * util/i386/pc/grub-install.in: Skip menu.lst when removing
6504 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6506 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
6507 before adding it to device.map.
6509 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
6511 * genmk.rb: Let GCC generate dependencies the first time it
6512 compiles a file; using the -MD option.
6513 * conf/common.mk: Regenerate.
6514 * conf/i386-pc.mk: Likewise.
6515 * conf/i386-efi.mk: Likewise.
6516 * conf/powerpc-ieee1275.mk: Likewise.
6517 * conf/sparc64-ieee1275.mk: Likewise.
6519 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
6521 Move the prototypes of grub_setjmp and grub_longjmp to
6522 cpu/setjmp.h, so that each architecture may specify different
6525 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
6526 (grub_longjmp): Likewise.
6527 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
6528 (grub_longjmp): Likewise.
6529 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
6530 (grub_longjmp): Likewise.
6532 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
6533 [!GRUB_UTIL] (grub_longjmp): Removed.
6535 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
6537 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
6538 "color!" method does not return any value.
6540 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6542 * include/grub/bitmap.h: New file.
6544 * include/grub/i386/pc/vbeutil.h: Likewise.
6546 * video/bitmap.c: Likewise.
6548 * video/readers/tga.c: Likewise.
6550 * video/i386/pc/vbeutil.c: Likewise.
6552 * commands/videotest.c: Code cleanup and updated to reflect to new
6555 * term/gfxterm.c: Likewise.
6557 * video/video.c: Likewise.
6559 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
6560 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
6561 (bitmap_mod_SOURCES): New entry.
6562 (bitmap_mod_CFLAGS): Likewise.
6563 (bitmap_mod_LDFLAGS): Likewise.
6564 (tga_mod_SOURCES): Likewise.
6565 (tga_mod_CFLAGS): Likewise.
6566 (tga_mod_LDFLAGS): Likewise.
6568 * include/grub/video.h (grub_video_blit_operators): New enum type.
6569 (grub_video_render_target): Changed as forward declaration and moved
6570 actual definition to be video driver specific.
6571 (grub_video_adapter.blit_bitmap): Added blitting operator.
6572 (grub_video_adapter.blit_render_target): Likewise.
6573 (grub_video_blit_bitmap): Likewise.
6574 (grub_video_blit_render_target): Likewise.
6576 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
6577 driver specific render target definition.
6578 (grub_video_vbe_map_rgba): Added driver internal helper.
6579 (grub_video_vbe_unmap_color): Updated to use
6580 grub_video_i386_vbeblit_info.
6581 (grub_video_vbe_get_video_ptr): Likewise.
6583 * include/grub/i386/pc/vbeblit.h
6584 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
6585 grub_video_i386_vbeblit_info.
6586 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
6587 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
6588 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
6589 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
6590 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
6591 (grub_video_i386_vbeblit_index_index): Likewise.
6592 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
6593 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
6594 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
6595 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
6597 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
6600 * video/i386/pc/vbeblit.c: Updated to reflect changes on
6601 include/grub/i386/pc/vbeblit.h.
6603 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
6604 Updated to use grub_video_i386_vbeblit_info.
6605 (grub_video_i386_vbefill_R8G8B8): Likewise.
6606 (grub_video_i386_vbefill_index): Likewise.
6607 (grub_video_i386_vbefill): Added generic filler.
6609 * video/i386/pc/vbefill.c: Updated to reflect changes on
6610 include/grub/i386/pc/vbefill.h.
6612 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
6613 grub_video_i386_vbeblit_info.
6614 (grub_video_vbe_unmap_color): Likewise.
6615 (grub_video_vbe_blit_glyph): Likewise.
6616 (grub_video_vbe_scroll): Likewise.
6617 (grub_video_vbe_draw_pixel): Removed function.
6618 (grub_video_vbe_get_pixel): Likewise.
6619 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
6620 updated code to use it.
6621 (common_blitter): Added common blitter for render target and bitmap.
6622 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
6623 (grub_video_vbe_blit_render_target): Likewise.
6625 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
6627 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
6628 is in text mode if there is no console control protocol instance
6631 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6633 * include/grub/video.h: Code cleanup.
6635 * include/grub/i386/pc/vbe.h: Likewise.
6637 * video/i386/pc/vbe.c: Likewise.
6639 * video/i386/pc/vbeblit.c: Likewise.
6641 * video/i386/pc/vbefill.c: Likewise.
6643 * video/video.c: Likewise. Also added more comments.
6645 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
6647 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
6648 (struct grub_biosdisk_dap): Likewise.
6650 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
6651 linkage settings for all functions.
6653 2006-07-12 Marco Gerards <marco@gnu.org>
6655 * configure.ac (--enable-mm-debug): Fix typo.
6657 * genkernsyms.sh.in: Use proper quoting for `CC'.
6659 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
6661 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
6662 (normal_mod_ASFLAGS): Remove "-m32".
6664 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
6666 * util/misc.c: Include config.h.
6667 [!HAVE_MEMALIGN]: Do not include malloc.h.
6668 (grub_memalign): Use posix_memalign, if present. Then, use
6669 memalign, if present. Otherwise, emit an error.
6671 * util/grub-emu.c: Do not include malloc.h.
6673 * include/grub/util/misc.h: Include unistd.h. This is required for
6674 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
6675 D. Eades III <hde@foobar-qux.org>.
6677 * configure.ac (AC_GNU_SOURCE): Added.
6678 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
6681 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
6683 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
6684 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
6686 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
6688 * include/grub/types.h (grub_host_addr_t): Rename to
6690 (grub_host_off_t): Rename to grub_target_off_t.
6691 (grub_host_size_t): Rename to grub_target_size_t.
6692 (grub_host_ssize_t): Rename to grub_target_ssize_t.
6693 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
6695 * include/grub/kernel.h (struct grub_module_header): Change type
6696 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
6697 (grub_module_info): Likewise.
6699 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
6701 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
6702 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
6703 Velazquez <jesus.velazquez@gmail.com>.
6705 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
6707 Count partitions from 1 instead of 0 in the string representation
6708 of partitions. Still use 0-based internally.
6710 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
6711 (sun_partition_map_iterate): Use grub_partition_t instead of
6712 struct grub_partition *. Cast DESC->START_CYLINDER to
6713 grub_uint64_t after converting the endian.
6714 (sun_partition_map_probe): Subtract 1 for PARTNUM.
6715 (sun_partition_map_get_name): Add 1 to P->INDEX.
6717 * partmap/pc.c (grub_partition_parse): Subtract 1 for
6719 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
6721 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
6722 zero instead of one.
6723 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
6724 (gpt_partition_map_get_name): Add 1 into P->INDEX.
6726 * partmap/apple.c (apple_partition_map_iterate): Change the type
6728 (apple_partition_map_probe): Subtract 1 for PARTNUM.
6729 (apple_partition_map_get_name): Add 1 into P->INDEX.
6731 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
6733 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
6734 calculate the offset of a partition.
6735 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
6736 (amiga_partition_map_get_name): Add 1 into P->INDEX.
6738 * partmap/acorn.c (acorn_partition_map_find): Change the type of
6739 SECTOR to grub_disk_addr_t.
6740 (acorn_partition_map_iterate): Likewise.
6741 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
6742 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
6744 (acorn_partition_map_get_name): Add 1 into P->INDEX.
6746 * kern/i386/pc/init.c (make_install_device): Add 1 into
6747 GRUB_INSTALL_DOS_PART.
6749 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
6752 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
6754 Clean up the code to support 64-bit addressing in disks and
6755 files. This change is not enough for filesystems yet.
6757 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
6758 type of "start" to grub_uint64_t.
6759 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
6760 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
6761 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
6764 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
6765 to grub_disk_addr_t.
6767 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
6770 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6772 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
6775 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
6777 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
6779 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
6781 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
6782 to grub_off_t, to detect an error from grub_file_seek.
6783 (grub_multiboot_load_elf32): Likewise.
6785 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
6786 maximum unsigned long value when an overflow is detected.
6787 (grub_strtoull): New function.
6788 (grub_divmod64): Likewise.
6789 (grub_lltoa): use grub_divmod64.
6791 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
6793 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
6794 the pointer to next character. Use grub_strtoull instead of
6796 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
6797 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
6800 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
6801 return value is signed.
6802 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
6803 test if OFFSET is less than zero, as OFFSET is unsigned now.
6805 * kern/disk.c (struct grub_disk_cache): Change the type of
6806 "sector" to grub_disk_addr_t.
6807 (grub_disk_cache_get_index): Change the type of SECTOR to
6808 grub_disk_addr_t. Calculate the hash with SECTOR casted to
6809 unsigned after shifting.
6810 (grub_disk_cache_invalidate): Change the type of SECTOR to
6812 (grub_disk_cache_unlock): Likewise.
6813 (grub_disk_cache_store): Likewise.
6814 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
6815 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
6816 grub_disk_addr_t and grub_uint64_t, respectively.
6817 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
6818 body, as the value of OFFSET is tweaked by
6819 grub_disk_check_range. Change the types of START_SECTOR, LEN and
6820 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
6822 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
6823 body, as the value of OFFSET is tweaked by
6824 grub_disk_check_range. Change the types of LEN and N to
6827 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
6828 and "saved_offset" to grub_off_t.
6829 (test_header): Cast BUF to char *.
6830 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
6832 (grub_gzio_read): Change the types of OFFSET and SIZE to
6833 grub_off_t and grub_size_t, respectively.
6835 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
6837 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
6838 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
6839 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
6840 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
6841 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
6843 * include/grub/types.h (grub_off_t): Unconditionally set to
6845 (grub_disk_addr_t): Changed to grub_uint64_t.
6847 * include/grub/partition.h (struct grub_partition): Change the
6848 types of "start", "len" and "offset" to grub_disk_addr_t,
6849 grub_uint64_t and grub_disk_addr_t, respectively.
6850 (grub_partition_get_start): Return grub_disk_addr_t.
6851 (grub_partition_get_len): Return grub_uint64_t.
6853 * include/grub/misc.h (grub_strtoull): New prototype.
6854 (grub_divmod64): Likewise.
6856 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
6857 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
6858 grub_off_t, respectively.
6859 All callers and references changed.
6861 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
6862 grub_size_t in "read".
6863 All callers and references changed.
6865 * include/grub/file.h (struct grub_file): Change the types of
6866 "offset" and "size" to grub_off_t and grub_off_t,
6867 respectively. Change the type of SECTOR to grub_disk_addr_t in
6869 (grub_file_read): Change the type of LEN to grub_size_t.
6870 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
6872 (grub_file_size): Return grub_off_t.
6873 (grub_file_tell): Likewise.
6874 All callers and references changed.
6876 * include/grub/disk.h (struct grub_disk_dev): Change the types of
6877 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
6879 (struct grub_disk): Change the type of "total_sectors" to
6880 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
6882 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
6883 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
6884 (grub_disk_write): Likewise.
6885 All callers and references changed.
6887 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
6888 char * for grub_strncmp to silence gcc.
6889 (grub_iso9660_mount): Likewise.
6890 (grub_iso9660_mount): Likewise.
6891 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
6893 (grub_iso9660_iterate_dir): Likewise.
6894 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
6896 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
6897 LEN to grub_disk_addr_t and grub_size_t, respectively.
6899 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
6901 * fs/jfs.c (grub_jfs_read_file): Likewise.
6903 * fs/minix.c (grub_jfs_read_file): Likewise.
6905 * fs/sfs.c (grub_jfs_read_file): Likewise.
6907 * fs/ufs.c (grub_jfs_read_file): Likewise.
6909 * fs/xfs.c (grub_jfs_read_file): Likewise.
6911 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
6912 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
6915 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
6916 BLKNR to -1 instead of returning GRUB_ERRNO.
6917 (grub_ext2_read_file): Change the types of SECTOR and
6918 LEN to grub_disk_addr_t and grub_size_t, respectively.
6920 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
6921 LEN to grub_disk_addr_t and grub_size_t, respectively.
6923 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
6926 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
6927 string. Do not cast SECTOR explicitly.
6929 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
6930 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
6931 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
6932 grub_disk_addr_t and grub_size_t, respectively. If the sector is
6933 over 2TB and LBA mode is not supported, raise an error.
6934 (get_safe_sectors): New function.
6935 (grub_biosdisk_read): Use get_safe_sectors.
6936 (grub_biosdisk_write): Likewise.
6938 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
6939 (grub_efidisk_write): Likewise.
6941 * disk/loopback.c (delete_loopback): Cosmetic changes.
6942 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
6944 (grub_loopback_open): Likewise.
6945 (grub_loopback_read): Likewise. Also, change the type of POS to
6946 grub_off_t, and fix the usage of grub_memset.
6948 * commands/i386/pc/play.c: Include grub/machine/time.h.
6950 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
6953 * commands/configfile.c: Include grub/env.h.
6955 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
6956 GRUB_ERRNO directly instead. Change the type of POS to
6957 grub_off_t. Follow the coding standard.
6959 * commands/blocklist.c: Include grub/partition.h.
6960 (grub_cmd_blocklist): Return an error if the underlying device is
6961 not a disk. Take the starting sector of a partition into account,
6962 if a partition is used.
6964 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
6966 (lba_mode): Support 64-bit addresses.
6967 (chs_mode): Likewise.
6968 (copy_buffer): Adapted to the new offsets of a length field and a
6970 (blocklist_default_start): Allocate 64-bit space.
6972 * boot/i386/pc/boot.S (force_lba): Removed.
6973 (boot_drive): Moved to under KERNEL_SECTOR.
6974 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
6976 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
6978 (lba_mode): Refactored to support a 64-bit address. More size
6980 (setup_sectors): Likewise.
6982 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
6984 * DISTLIST: Added include/grub/i386/linux.h. Removed
6985 include/grub/i386/pc/linux.h
6987 * configure.ac (AC_INIT): Bumped to 1.94.
6989 * config.guess: Updated from gnulib.
6990 * config.sub: Likewise.
6991 * install-sh: Likewise.
6992 * mkinstalldirs: Likewise.
6994 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
6996 * conf/common.rmk (grub_modules_init.lst): Depended on
6997 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
7000 * genmk.rb (PModule::rule): Reverted the previous change.
7002 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
7004 * conf/common.rmk (grub_modules_init.lst): Depends on
7005 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
7006 that the target does not exist before producing.
7007 (grub_modules_init.h): Remove the target before generating.
7008 (grub_emu_init.c): Likewise.
7010 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
7012 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
7014 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
7015 for the target-specific tests. Make sure that we also have the
7016 up-to-date target variables for those tests.
7018 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7020 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
7021 (PModule::rule): Likewise.
7023 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
7025 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
7026 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
7027 target-specific flags should be prefixed.
7028 (PModule::rule): Likewise.
7030 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
7032 * configure.ac (CMP): Check if cmp is available explicitly.
7034 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
7036 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
7037 (target_cpu): New variable.
7038 (pkglibdir): Use target_cpu instead of host_cpu.
7040 * util/i386/pc/grub-install.in (host_cpu): Removed.
7041 (target_cpu): New variable.
7042 (pkglibdir): Use target_cpu instead of host_cpu.
7044 * util/genmoddep.c: Removed.
7046 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
7047 instead of GRUB_HOST_SIZEOF_VOID_P.
7048 * kern/dl.c: Likewise.
7050 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
7052 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7053 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7054 (GRUB_TARGET_SIZEOF_LONG): ... this.
7055 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7056 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7057 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7059 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7060 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7061 (GRUB_TARGET_SIZEOF_LONG): ... this.
7062 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7063 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7064 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
7066 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
7067 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
7068 (GRUB_TARGET_SIZEOF_LONG): ... this.
7069 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
7070 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
7072 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
7073 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
7074 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
7075 instead of GRUB_HOST_SIZEOF_LONG.
7076 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
7077 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
7078 GRUB_CPU_WORDS_BIGENDIAN.
7079 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
7080 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
7083 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
7084 (genmoddep_SOURCES): Likewise.
7085 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
7086 (genmoddep_SOURCES): Likewise.
7087 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
7088 (genmoddep_SOURCES): Likewise.
7089 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
7091 (genmoddep_SOURCES): Likewise.
7093 * genmoddep.awk: New file.
7095 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
7096 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
7097 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
7098 (PModule::rule): Likewise.
7099 (Program::rule): Likewise.
7100 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
7101 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
7104 * configure.ac: Rewritten intensively to use host and target
7105 instead of build and host, respectively.
7107 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
7108 (host_cpu): Removed.
7109 (target_cpu): New variable.
7110 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
7111 (BUILD_CC): Removed.
7112 (BUILD_CFLAGS): Likewise.
7113 (BUILD_CPPFLAGS): Likewise.
7114 (TARGET_CC): New variable.
7115 (TARGET_CFLAGS): Likewise.
7116 (TARGET_CPPFLAGS): Likewise.
7117 (TARGET_LDFLAGS): Likewise.
7119 (include): Use target_cpu instead of host_cpu.
7120 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
7122 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
7124 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
7126 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
7127 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
7128 field 'false' to 'exec_on_false'.
7129 (grub_script_create_cmdif): Renamed argument names to reflect above
7132 * normal/execute.c (grub_script_execute_cmdif): Likewise.
7134 * normal/script.c (grub_script_create_cmdif): Likewise.
7136 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
7138 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
7140 (grub_hfsplus_btree_recptr): Likewise.
7141 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
7142 FILEBLOCK both to pass a block number and store next block
7144 (grub_hfsplus_read_block): Rewritten heavily to support an extent
7145 overflow file correctly. Specify errors appropriately, because
7146 fshelp expects that GRUB_ERRNO is set when fails. Reuse
7147 grub_hfsplus_btree_recptr to get the pointer to a found key.
7148 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
7151 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
7153 (_linux_mod_SOURCES): New variable.
7154 (_linux_mod_CFLAGS): Likewise.
7155 (_linux_mod_LDFLAGS): Likewise.
7156 (linux_mod_SOURCES): Likewise.
7157 (linux_mod_CFLAGS): Likewise.
7158 (linux_mod_LDFLAGS): Likewise.
7160 * DISTLIST: Added loader/i386/efi/linux.c,
7161 loader/i386/efi/linux_normal.c and
7162 include/grub/i386/efi/loader.h.
7164 * loader/i386/efi/linux.c: New file.
7165 * loader/i386/efi/linux_normal.c: Likewise.
7166 * include/grub/i386/efi/loader.h: Likewise.
7168 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
7170 * commands/blocklist.c: New file.
7172 * DISTLIST: Added commands/blocklist.c.
7174 * term/efi/console.c (grub_console_highlight_color): Use a lighter
7175 color for the background, and a darker color for the foreground.
7176 (grub_console_checkkey): Return READ_KEY.
7177 (grub_console_cls): Set the background to
7178 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
7180 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
7182 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
7183 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
7185 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
7188 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
7189 BG. The spec is wrong again.
7191 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
7193 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
7195 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7196 commands/blocklist.c.
7197 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7199 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
7200 (blocklist_mod_SOURCES): New variable.
7201 (blocklist_mod_CFLAGS): Likewise.
7202 (blocklist_mod_LDFLAGS): Likewise.
7204 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
7206 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
7208 (lba_mode): Use %eax more intensively to reduce the code size.
7210 2006-05-20 Marco Gerards <marco@gnu.org>
7212 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
7214 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
7216 (script): Accept leading newlines.
7217 (newlines): New rule to describe 0 or more newlines.
7218 (commands): Accept `command' with trailing newline. Fixed the
7219 order in which arguments were passed to `grub_script_add_cmd'.
7220 Accept commands separated by newlines.
7221 (function): Changed to accept newlines.
7222 (menuentry) Rewritten.
7224 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
7225 front of the list, instead of to the end.
7227 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
7229 * util/i386/pc/grub-install.in (bindir): New variable.
7230 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
7231 Shaver <lbgwjl@gmail.com>.
7233 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
7235 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
7236 grub/machine/linux.h
7237 * loader/i386/pc/linux.c: Likewise.
7239 * include/grub/i386/pc/linux.h: Moved to ...
7240 * include/grub/i386/linux.h: ... here.
7242 * include/grub/i386/linux.h (struct linux_kernel_params): New
7245 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
7247 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
7249 (grub_video_vbe_blit_glyph): Likewise.
7250 (grub_video_vbe_blit_bitmap): Likewise.
7251 (grub_video_vbe_blit_render_target): Likewise.
7253 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
7255 * configure.ac (--with-platform): Properly quote the square
7258 2006-05-08 Marco Gerards <marco@gnu.org>
7260 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
7262 (kernel_elf_HEADERS): ...to this. Updated all users.
7263 (grubof_symlist.c): Renamed from this...
7264 (kernel_elf_symlist.c): ...to this. Updated all users.
7265 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7266 (grubof_SOURCES): Renamed from this...
7267 (kernel_elf_SOURCES): ...to this.
7268 (grubof_HEADERS): Renamed from this...
7269 (kernel_elf_HEADERS): ...to this.
7270 (grubof_CFLAGS): Renamed from this...
7271 (kernel_elf_CFLAGS): ...to this.
7272 (grubof_ASFLAGS): Renamed from this...
7273 (kernel_elf_ASFLAGS): ...to this.
7274 (grubof_LDFLAGS): Renamed from this...
7275 (kernel_elf_LDFLAGS): ...to this.
7277 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
7279 (kernel_elf_HEADERS): ...to this. Updated all users.
7280 (grubof_symlist.c): Renamed from this...
7281 (kernel_elf_symlist.c): ...to this. Updated all users.
7282 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
7283 (grubof_SOURCES): Renamed from this...
7284 (kernel_elf_SOURCES): ...to this.
7285 (grubof_HEADERS): Renamed from this...
7286 (kernel_elf_HEADERS): ...to this.
7287 (grubof_CFLAGS): Renamed from this...
7288 (kernel_elf_CFLAGS): ...to this.
7289 (grubof_ASFLAGS): Renamed from this...
7290 (kernel_elf_ASFLAGS): ...to this.
7291 (grubof_LDFLAGS): Renamed from this...
7292 (kernel_elf_LDFLAGS): ...to this.
7294 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
7295 `kernel.elf' instead of `grubof'.
7297 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
7299 Add --with-platform to configure. Use pkglibdir instead of
7300 pkgdatadir. This is reported by Roger Leigh.
7302 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
7303 (host_vendor): Likewise.
7304 (host_os): Likewise.
7305 (pkgdatadir): Likewise.
7306 (platform): New variable.
7307 (pkglibdir): Likewise.
7308 Use PKGLIBDIR instead of PKGDATADIR.
7310 * util/i386/pc/grub-install.in (datadir): Removed.
7311 (host_vendor): Likewise.
7312 (host_os): Likewise.
7313 (pkgdatadir): Likewise.
7314 (platform): New variable.
7315 (pkglibdir): Likewise.
7316 Use PKGLIBDIR instead of PKGDATADIR.
7318 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
7319 instead of GRUB_DATADIR.
7321 * util/i386/pc/grub-mkimage.c (usage): Likewise.
7323 * util/i386/efi/grub-mkimage.c (usage): Likewise.
7326 * configure.ac (--with-platform): New option.
7327 Use PLATFORM instead of HOST_VENDOR to specify a platform.
7329 * Makefile.in: Include a makefile based on PLATFORM instead of
7331 (pkgdatadir): Not appended by the machine type.
7332 (pkglibdir): Appended by the machine type.
7333 (host_vendor): Removed.
7334 (platform): New variable.
7335 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
7336 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
7337 (uninstall): Likewise.
7339 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
7341 Use the environment context in the menu. Remove the commands
7342 "default" and "timeout", and use variables instead.
7344 * normal/menu.c: Include grub/env.h.
7345 (print_entry): Cast TITLE to silence gcc.
7346 (get_timeout): New function.
7347 (set_timeout): Likewise.
7348 (get_entry_number): Likewise.
7349 (run_menu): Use a default entry, a fallback entry and a timeout
7350 in the environment variables "default", "fallback" and
7351 "timeout". Also, tweak the default entry if it is not within the
7352 current menu entries.
7353 (grub_menu_run): Use a fallback entry in the environment variable
7356 * normal/main.c (read_config_file): Do not initialize
7357 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
7359 (grub_normal_execute): Use a data slot to store the menu.
7361 * include/grub/normal.h (struct grub_menu): Removed default_entry,
7362 fallback_entry and timeout.
7363 (struct grub_menu_list): Removed.
7364 (grub_menu_list_t): Likewise.
7365 (struct grub_context): Likewise.
7366 (grub_context_t): Likewise.
7367 (grub_context_get): Likewise.
7368 (grub_context_get_current_menu): Likewise.
7369 (grub_context_push_menu): Likewise.
7370 (grub_context_pop_menu): Likewise.
7371 (grub_default_init): Likewise.
7372 (grub_default_fini): Likewise.
7373 (grub_timeout_init): Likewise.
7374 (grub_timeout_fini): Likewise.
7376 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
7378 (normal_mod_SOURCES): Removed normal/context.c.
7380 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
7381 commands/default.c, commands/timeout.c and normal/context.c.
7382 (normal_mod_SOURCES): Removed normal/context.c.
7384 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
7385 commands/timeout.c and normal/context.c.
7386 (normal_mod_SOURCES): Removed normal/context.c.
7388 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
7389 commands/default.c, commands/timeout.c and normal/context.c.
7390 (normal_mod_SOURCES): Removed normal/context.c.
7392 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
7394 (default_mod_SOURCES): Removed.
7395 (default_mod_CFLAGS): Likewise.
7396 (default_mod_LDFLAGS): Likewise.
7397 (timeout_mod_SOURCES): Removed.
7398 (timeout_mod_CFLAGS): Likewise.
7399 (timeout_mod_LDFLAGS): Likewise.
7401 * DISTLIST: Removed commands/default.c, commands/timeout.c and
7404 * commands/default.c: Removed.
7405 * commands/timeout.c: Likewise.
7406 * normal/context.c: Likewise.
7408 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
7410 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
7412 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
7414 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
7415 "next" to "prev" for readability.
7416 (struct grub_env_sorted_var): New struct.
7417 (grub_env_context): Renamed to ...
7418 (initial_context): ... this.
7419 (grub_env_var_context): Renamed to ...
7420 (current_context): ... this.
7421 (grub_env_find): Look only at CURRENT_CONTEXT.
7422 (grub_env_context_open): Rewritten to copy exported variables from
7424 (grub_env_context_close): Rewritten according to the new
7425 scheme. Also, add an assertion to prevent the initial context from
7427 (grub_env_insert): Removed the code for the sorted list.
7428 (grub_env_remove): Likewise.
7429 (grub_env_export): Simply mark the variable with
7430 GRUB_ENV_VAR_GLOBAL.
7431 (grub_env_set): A cosmetic change for naming consistency.
7432 (grub_env_get): Likewise.
7433 (grub_env_unset): Likewise.
7434 (grub_env_iterate): Rewritten to sort variables within this
7436 (grub_register_variable_hook): Fixed for naming consistency. Call
7437 grub_env_find again, only if NAME is not found at the first time.
7438 (mangle_data_slot_name): New function.
7439 (grub_env_set_data_slot): Likewise.
7440 (grub_env_get_data_slot): Likewise.
7441 (grub_env_unset_data_slot): Likewise.
7443 * include/grub/env.h (grub_env_var_type): New enum.
7444 (GRUB_ENV_VAR_LOCAL): New constant.
7445 (GRUB_ENV_VAR_GLOBAL): Likewise.
7446 (GRUB_ENV_VAR_DATA): Likewise.
7447 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
7449 (grub_env_set): Replace VAR with NAME for consistency.
7450 (grub_register_variable_hook): Likewise.
7451 (grub_env_export): Specify the name of the argument.
7452 (grub_env_set_data_slot): New prototype.
7453 (grub_env_get_data_slot): Likewise.
7454 (grub_env_unset_data_slot): Likewise.
7456 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7458 Extend the loader so that GRUB can accept a loader which comes
7459 back to GRUB when a loaded image exits. Also, this change adds
7460 support for a chainloader on EFI.
7462 * term/efi/console.c: Include grub/misc.h.
7463 (grub_console_checkkey): Display a scan code on the top for
7464 debugging. This will be removed once the EFI port gets stable.
7465 Correct the scan code mapping.
7467 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
7468 allocate memory from larger regions, in order to reduce the number
7469 of allocated regions. Otherwise, the MacOSX loader panics.
7470 (filter_memory_map): Avoid less than 1MB for compatibility with
7472 (add_memory_regions): Allocate from the tail of a region, if
7473 possible, to avoid allocating a region near to 1MB, for the MacOSX
7476 * kern/efi/init.c (grub_efi_set_prefix): Specify
7477 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
7479 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
7480 argument IMAGE_HANDLE and specify it to get a loaded image.
7481 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
7482 grub_efi_get_loaded_image.
7483 (grub_efi_get_filename): Divide the length by the size of
7485 (grub_efi_get_device_path): New function.
7486 (grub_efi_print_device_path): Print End Device Path nodes. Divide
7487 the length by the size of grub_efi_char16_t for a file path device
7490 * kern/loader.c (grub_loader_noreturn): New variable.
7491 (grub_loader_set): Accept a new argument NORETURN. Set
7492 GRUB_LOADER_NORETURN to NORETURN.
7493 All callers changed.
7494 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
7497 * include/grub/efi/efi.h (grub_efi_get_device_path): New
7499 (grub_efi_get_loaded_image): Take an argument to specify an image
7502 * include/grub/loader.h (grub_loader_set): Added one more argument
7505 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
7506 instead of grub_efi_open_protocol.
7507 (grub_efidisk_get_device_name): Likewise.
7508 (grub_efidisk_close): Print a newline.
7509 (grub_efidisk_get_device_handle): Fixed to use
7510 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
7511 GRUB_EFI_DEVICE_PATH_TYPE.
7513 * disk/efi/efidisk.c (device_path_guid): Moved to ...
7514 * kern/efi/efi.c (device_path_guid): ... here.
7516 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
7518 (kernel_mod_HEADERS): Added efi/disk.h.
7519 (_chain_mod_SOURCES): New variable.
7520 (_chain_mod_CFLAGS): Likewise.
7521 (_chain_mod_LDFLAGS): Likewise.
7522 (chain_mod_SOURCES): Likewise.
7523 (chain_mod_CFLAGS): Likewise.
7524 (chain_mod_LDFLAGS): Likewise.
7526 * DISTLIST: Added include/grub/efi/chainloader.h,
7527 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
7529 * include/grub/efi/chainloader.h: New file.
7530 * loader/efi/chainloader.c: Likewise.
7531 * loader/efi/chainloader_normal.c: Likewise.
7533 2006-04-30 Marco Gerards <marco@gnu.org>
7535 * commands/configfile.c (grub_cmd_source): New function.
7536 (GRUB_MOD_INIT): Register the commands `source' and `.'.
7537 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
7539 2006-04-30 Marco Gerards <marco@gnu.org>
7541 * normal/execute.c (grub_script_execute_cmd): Change the return
7542 type to `grub_err_t'. Correctly return the error.
7543 (grub_script_execute_cmdline): In case a command line is not a
7544 command or a function, try to interpret it as an assignment.
7546 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
7548 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
7549 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
7550 skip a node whose name is obviously invalid as UTF-16,
7551 i.e. contains a NUL character. Stop the iteration when the last
7552 directory entry is found. Instead of using the return value of
7553 grub_hfsplus_btree_iterate_node, store the value in RET and use
7554 it, because the iterator can be stopped by the last directory
7557 2006-04-30 Marco Gerards <marco@gnu.org>
7559 * include/grub/env.h (grub_env_export): New prototype. Reported
7560 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
7562 2006-04-30 Marco Gerards <marco@gnu.org>
7564 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
7565 size of the extents in a catalog file record.
7567 2006-04-29 Marco Gerards <marco@gnu.org>
7569 * commands/configfile.c (grub_cmd_configfile): Execute the
7570 configfile within its own context.
7572 * include/grub/env.h (grub_env_context_open): New prototype.
7573 (grub_env_context_close): Likewise.
7575 * kern/env.c (grub_env): Removed.
7576 (grub_env_sorted): Likewise.
7577 (grub_env_context): New variable.
7578 (grub_env_var_context): Likewise.
7579 (grub_env_find): Search both the active context and the global
7581 (grub_env_context_open): New function.
7582 (grub_env_context_close): Likewise.
7583 (grub_env_insert): Likewise.
7584 (grub_env_remove): Likewise.
7585 (grub_env_export): Likewise.
7586 (grub_env_set): Changed to use helper functions to avoid code
7588 (grub_env_iterate): Rewritten so both the current context and the
7589 global context are being used.
7591 * normal/command.c (export_command): New function.
7592 (grub_command_init): Register the `export' function.
7594 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
7596 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
7597 explicitly to suppress gcc's warnings.
7598 * fs/fat.c (grub_fat_find_dir): Likewise.
7599 (grub_fat_label): Likewise.
7600 * fs/xfs.c (grub_xfs_read_inode): Likewise.
7601 (grub_xfs_mount): Likewise.
7602 (grub_xfs_label): Likewise.
7603 * fs/affs.c (grub_affs_mount): Likewise.
7604 (grub_affs_label): Likewise.
7605 (grub_affs_iterate_dir): Likewise.
7606 * fs/sfs.c (grub_sfs_mount): Likewise.
7607 (grub_sfs_iterate_dir): Likewise.
7608 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
7609 * fs/hfs.c (grub_hfs_mount): Likewise.
7610 (grub_hfs_cmp_catkeys): Likewise.
7611 (grub_hfs_find_dir): Likewise.
7612 (grub_hfs_dir): Likewise.
7613 (grub_hfs_label): Likewise.
7614 * fs/jfs.c (grub_jfs_mount): Likewise.
7615 (grub_jfs_opendir): Likewise.
7616 (grub_jfs_getent): Likewise.
7617 (grub_jfs_lookup_symlink): Likewise.
7618 (grub_jfs_label): Likewise.
7619 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
7620 (grub_hfsplus_iterate_dir): Likewise.
7621 (grub_hfsplus_btree_iterate_node): Made static.
7623 * util/grub-emu.c (prefix): New variable.
7624 (grub_machine_set_prefix): New function.
7625 (main): Do not set the environment variable "prefix" here. Only
7626 set PREFIX, which is used later by grub_machine_set_prefix.
7628 * include/grub/video.h: Do not include grub/symbol.h.
7629 (grub_video_register): Not exported. This symbol is not defined in
7631 (grub_video_unregister): Likewise.
7632 (grub_video_iterate): Likewise.
7633 (grub_video_setup): Likewise.
7634 (grub_video_restore): Likewise.
7635 (grub_video_get_info): Likewise.
7636 (grub_video_get_blit_format): Likewise.
7637 (grub_video_set_palette): Likewise.
7638 (grub_video_get_palette): Likewise.
7639 (grub_video_set_viewport): Likewise.
7640 (grub_video_get_viewport): Likewise.
7641 (grub_video_map_color): Likewise.
7642 (grub_video_map_rgb): Likewise.
7643 (grub_video_map_rgba): Likewise.
7644 (grub_video_fill_rect): Likewise.
7645 (grub_video_blit_glyph): Likewise.
7646 (grub_video_blit_bitmap): Likewise.
7647 (grub_video_blit_render_target): Likewise.
7648 (grub_video_scroll): Likewise.
7649 (grub_video_swap_buffers): Likewise.
7650 (grub_video_create_render_target): Likewise.
7651 (grub_video_delete_render_target): Likewise.
7652 (grub_video_set_active_render_target): Likewise.
7654 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
7656 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
7658 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
7659 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7660 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7661 instead of $(srcdir)/genkernsyms.sh.
7663 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
7664 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7665 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7666 instead of $(srcdir)/genkernsyms.sh.
7668 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
7669 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7670 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7671 instead of $(srcdir)/genkernsyms.sh.
7673 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
7674 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
7675 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
7676 instead of $(srcdir)/genkernsyms.sh.
7678 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
7681 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
7683 (gensymlist.sh): New target.
7684 (genkernsyms.sh): Likewise.
7686 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
7687 genkernsyms.sh.in and gensymlist.sh.in.
7689 * genkernsyms.sh: Removed.
7690 * gensymlist.sh: Likewise.
7692 * genkernsyms.sh.in: New file.
7693 * gensymlist.sh.in: Likewise.
7695 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
7697 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
7698 clobber "prefix", since we may have already set it manually.
7700 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
7702 * kern/misc.c (abort): New alias for grub_abort.
7704 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
7706 A new machine-specific function "grub_machine_set_prefix" is
7707 defined. This is called after loading modules, so that a prefix
7708 initialization can use modules. Also, this change adds an
7709 intensive debugging feature for the memory manager via the
7710 configure option "--enable-mm-debug".
7712 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
7715 * kern/sparc64/ieee1275/init.c (abort): Removed.
7716 (grub_stop): Likewise.
7717 (grub_exit): New function.
7718 (grub_set_prefix): Renamed to ...
7719 (grub_machine_set_prefix): ... this.
7720 (grub_machine_init): Do not call grub_set_prefix.
7722 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
7723 (grub_machine_set_prefix): ... this.
7724 (grub_machine_init): Do not call grub_set_prefix.
7726 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
7727 (grub_machine_init): Do not set the prefix here.
7729 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
7731 * kern/efi/init.c: Include grub/mm.h.
7732 (grub_efi_set_prefix): New function.
7734 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
7735 (grub_efi_get_filename): New function.
7736 (grub_print_device_path): Renamed to ...
7737 (grub_efi_print_device_path): ... this.
7739 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
7740 [MM_DEBUG] (grub_realloc): Likewise.
7741 [MM_DEBUG] (grub_free): Likewise.
7742 [MM_DEBUG] (grub_memalign): Likewise.
7743 [MM_DEBUG] (grub_mm_debug): New variable.
7744 [MM_DEBUG] (grub_debug_malloc): New function.
7745 [MM_DEBUG] (grub_debug_free): New function.
7746 [MM_DEBUG] (grub_debug_realloc): New function.
7747 [MM_DEBUG] (grub_debug_memalign): New function.
7749 * kern/misc.c (grub_abort): Print a newline to distinguish
7752 * kern/main.c (grub_main): Call grub_machine_set_prefix and
7753 grub_set_root_dev after loading modules. This is necessary when
7754 setting a prefix depends on modules.
7756 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
7757 (grub_efi_print_device_path): ... this.
7758 (grub_efi_get_filename): New prototype.
7759 (grub_efi_set_prefix): Likewise.
7761 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
7763 (grub_efidisk_get_device_handle): New prototype.
7764 (grub_efidisk_get_device_name): Likewise.
7766 * include/grub/mm.h: Include config.h.
7767 (MM_DEBUG): Removed.
7768 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
7769 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
7770 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
7771 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
7772 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
7773 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
7774 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
7775 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
7776 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
7778 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
7780 * disk/efi/efidisk.c: Include grub/partition.h.
7781 (iterate_child_devices): New function.
7782 (add_device): First, compare only last device path nodes, so that
7783 devices are sorted by the types.
7784 (grub_efidisk_get_device_handle): New function.
7785 (grub_efidisk_get_device_name): Likewise.
7787 * configure.ac (--enable-mm-debug): New option to enable the
7788 memory manager debugging feature. This makes the binary much
7789 bigger, so is disabled by default.
7791 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
7793 Use grub_abort instead of grub_stop, and grub_exit must be
7794 define in each architecture now. Also, this change adds support
7797 * util/i386/pc/grub-probefs.c: Include grub/term.h.
7798 (grub_getkey): New function.
7799 (grub_term_get_current): Likewise.
7801 * util/i386/pc/grub-setup.c: Include grub/term.h.
7802 (grub_getkey): New function.
7803 (grub_term_get_current): Likewise.
7805 * util/misc.c (grub_stop): Renamed to ...
7806 (grub_exit): ... this.
7808 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
7809 (grub_exit): ... this.
7810 (grub_machine_init): Use grub_abort instead of abort.
7811 (grub_stop): Removed.
7813 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
7816 * kern/i386/pc/startup.S (grub_exit): New function.
7817 (cold_reboot): New label.
7819 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
7820 (grub_efi_init): Call grub_efidisk_init.
7821 (grub_efi_fini): Call grub_efidisk_fini.
7823 * kern/efi/efi.c: Include grub/mm.h.
7824 (grub_efi_console_control_guid): Renamed to ...
7825 (console_control_guid): ... this.
7826 (grub_efi_loaded_image_guid): Renamed to ...
7827 (loaded_image_guid): ... this.
7828 (grub_efi_locate_handle): New function.
7829 (grub_efi_open_protocol): Likewise.
7830 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
7831 GRUB_EFI_CONSOLE_CONTROL_GUID.
7832 (grub_efi_exit): Removed.
7833 (grub_stop): Likewise.
7834 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
7835 (grub_exit): New function.
7836 (grub_print_device_path): Likewise.
7838 * kern/rescue.c (grub_rescue_cmd_exit): New function.
7839 (grub_enter_rescue_mode): Register "exit".
7841 * kern/misc.c (grub_real_dprintf): A cosmetic change.
7842 (grub_abort): New function.
7844 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
7846 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
7848 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
7850 * include/grub/efi/efi.h (grub_efi_exit): Removed.
7851 (grub_print_device_path): New prototype.
7852 (grub_efi_locate_handle): Likewise.
7853 (grub_efi_open_protocol): Likewise.
7855 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
7856 * disk/efi/efidisk.c: Likewise.
7858 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
7860 * include/grub/efi/console_control.h
7861 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
7863 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
7864 last 8 bytes as an array.
7865 (GRUB_EFI_DISK_IO_GUID): New macro.
7866 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
7867 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
7868 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
7870 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
7871 (struct grub_efi_device_path): Rename the member "sub_type" to
7873 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
7874 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
7875 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
7876 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
7877 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
7878 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
7879 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
7880 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
7881 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
7882 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
7883 (struct grub_efi_pci_device_path): New structure.
7884 (grub_efi_pci_device_path_t): New type.
7885 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
7886 (struct grub_efi_pccard_device_path): New structure.
7887 (grub_efi_pccard_device_path_t): New type.
7888 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
7889 (struct grub_efi_memory_mapped_device_path): New structure.
7890 (grub_efi_memory_mapped_device_path_t): New type.
7891 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
7892 (struct grub_efi_vendor_device_path): New structure.
7893 (grub_efi_vendor_device_path_t): New type.
7894 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
7895 (struct grub_efi_controller_device_path): New structure.
7896 (grub_efi_controller_device_path_t): New type.
7897 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
7898 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
7899 (struct grub_efi_acpi_device_path): New structure.
7900 (grub_efi_acpi_device_path_t): New type.
7901 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
7902 (struct grub_efi_expanded_acpi_device_path): New structure.
7903 (grub_efi_expanded_acpi_device_path_t): New type.
7904 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
7905 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
7906 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
7907 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
7908 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
7909 (struct grub_efi_atapi_device_path): New structure.
7910 (grub_efi_atapi_device_path_t): New type.
7911 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
7912 (struct grub_efi_fibre_channel_device_path): New structure.
7913 (grub_efi_fibre_channel_device_path_t): New type.
7914 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
7915 (struct grub_efi_1394_device_path): New structure.
7916 (grub_efi_1394_device_path_t): New type.
7917 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
7918 (struct grub_efi_usb_device_path): New structure.
7919 (grub_efi_usb_device_path_t): New type.
7920 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
7921 (struct grub_efi_usb_class_device_path): New structure.
7922 (grub_efi_usb_class_device_path_t): New type.
7923 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
7924 (struct grub_efi_i2o_device_path): New structure.
7925 (grub_efi_i2o_device_path_t): New type.
7926 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
7927 (struct grub_efi_mac_address_device_path): New structure.
7928 (grub_efi_mac_address_device_path_t): New type.
7929 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
7930 (struct grub_efi_ipv4_device_path): New structure.
7931 (grub_efi_ipv4_device_path_t): New type.
7932 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
7933 (struct grub_efi_ipv6_device_path): New structure.
7934 (grub_efi_ipv6_device_path_t): New type.
7935 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
7936 (struct grub_efi_infiniband_device_path): New structure.
7937 (grub_efi_infiniband_device_path_t): New type.
7938 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
7939 (struct grub_efi_uart_device_path): New structure.
7940 (grub_efi_uart_device_path_t): New type.
7941 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
7942 (struct grub_efi_vendor_messaging_device_path): New structure.
7943 (grub_efi_vendor_messaging_device_path_t): New type.
7944 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
7945 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
7946 (struct grub_efi_hard_drive_device_path): New structure.
7947 (grub_efi_hard_drive_device_path_t): New type.
7948 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
7949 (struct grub_efi_cdrom_device_path): New structure.
7950 (grub_efi_cdrom_device_path_t): New type.
7951 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
7952 (struct grub_efi_vendor_media_device_path): New structure.
7953 (grub_efi_vendor_media_device_path_t): New type.
7954 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
7955 (struct grub_efi_file_path_device_path): New structure.
7956 (grub_efi_file_path_device_path_t): New type.
7957 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
7958 (struct grub_efi_protocol_device_path): New structure.
7959 (grub_efi_protocol_device_path_t): New type.
7960 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
7961 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
7962 (struct grub_efi_bios_device_path): New structure.
7963 (grub_efi_bios_device_path_t): New type.
7964 (struct grub_efi_disk_io): New structure.
7965 (grub_efi_disk_io_t): New type.
7966 (struct grub_efi_block_io_media): New structure.
7967 (grub_efi_block_io_media_t): New type.
7968 (struct grub_efi_block_io): New structure.
7969 (grub_efi_block_io_t): New type.
7971 * include/grub/misc.h (grub_stop): Removed.
7972 (grub_exit): New prototype.
7973 (grub_abort): Likewise.
7975 * include/grub/disk.h (enum grub_disk_dev_id): Added
7976 GRUB_DISK_DEVICE_EFIDISK_ID.
7978 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
7980 (kernel_syms.lst): Remove the target if an error occurs.
7982 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
7984 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
7985 as it was simply too buggy.
7987 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
7989 * kern/misc.c (grub_lltoa): New function.
7990 (grub_vsprintf): Added support for the long long suffix,
7993 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
7995 * Makefile.in (LDFLAGS): Add variable.
7996 (LD): Remove variable.
7997 * configure.ac: Add -m32 to LDFLAGS.
7998 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
7999 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
8000 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
8001 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
8002 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
8004 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
8005 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
8006 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
8008 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
8010 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
8011 length for unknown glyph.
8013 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8015 Add support for pre-loaded modules into the EFI port.
8017 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
8018 completely. Accept one more argument DIR. The caller has changed.
8020 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
8022 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
8023 (grub_efi_loaded_image_guid): New variable.
8024 (grub_efi_get_loaded_image): New function.
8025 (grub_arch_modules_addr): Likewise.
8027 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
8030 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
8031 (struct grub_efi_loaded_image): New structure.
8032 (grub_efi_loaded_image_t): New type.
8034 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
8036 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
8037 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
8038 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
8040 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
8042 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
8044 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
8046 * DISTLIST: Added include/grub/efi/console.h,
8047 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
8048 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8050 * include/grub/efi/console.h: New file.
8051 * include/grub/efi/time.h: Likewise.
8052 * include/grub/i386/efi/kernel.h: Likewise.
8053 * kern/efi/init.c: Likewise.
8054 * kern/efi/mm.c: Likewise.
8055 * term/efi/console.c: Likewise.
8057 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
8058 (grub_stop): Removed.
8059 (grub_get_rtc): Likewise.
8060 (grub_machine_init): Simply call grub_efi_init.
8061 (grub_machine_fini): Call grub_efi_fini.
8063 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
8064 (grub_efi_output_string): Removed.
8065 (grub_efi_stall): New function.
8066 (grub_stop): Likewise.
8067 (grub_get_rtc): Likewise.
8069 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
8070 (grub_efi_stall): New prototype.
8071 (grub_efi_allocate_pages): Likewise.
8072 (grub_efi_free_pages): Likewise.
8073 (grub_efi_get_memory_map): Likewise.
8074 (grub_efi_mm_init): Likewise.
8075 (grub_efi_mm_fini): Likewise.
8076 (grub_efi_init): Likewise.
8077 (grub_efi_fini): Likewise.
8079 * include/grub/i386/efi/time.h: Do not include
8080 grub/symbol.h. Include grub/efi/time.h.
8081 (GRUB_TICKS_PER_SECOND): Removed.
8082 (grub_get_rtc): Likewise.
8084 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
8085 Added padding. The EFI spec is buggy.
8086 (GRUB_EFI_BLACK): New macro.
8087 (GRUB_EFI_BLUE): Likewise.
8088 (GRUB_EFI_GREEN): Likewise.
8089 (GRUB_EFI_CYAN): Likewise.
8090 (GRUB_EFI_RED): Likewise.
8091 (GRUB_EFI_MAGENTA): Likewise.
8092 (GRUB_EFI_BROWN): Likewise.
8093 (GRUB_EFI_LIGHTGRAY): Likewise.
8094 (GRUB_EFI_BRIGHT): Likewise.
8095 (GRUB_EFI_DARKGRAY): Likewise.
8096 (GRUB_EFI_LIGHTBLUE): Likewise.
8097 (GRUB_EFI_LIGHTGREEN): Likewise.
8098 (GRUB_EFI_LIGHTCYAN): Likewise.
8099 (GRUB_EFI_LIGHTRED): Likewise.
8100 (GRUB_EFI_LIGHTMAGENTA): Likewise.
8101 (GRUB_EFI_YELLOW): Likewise.
8102 (GRUB_EFI_WHITE): Likewise.
8103 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
8104 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
8105 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
8106 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
8107 (GRUB_EFI_BACKGROUND_RED): Likewise.
8108 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
8109 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
8110 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
8111 (GRUB_EFI_TEXT_ATTR): Likewise.
8113 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
8114 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
8115 (kernel_mod_HEADERS): Added efi/time.h.
8117 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
8119 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
8120 include/grub/efi/api.h, include/grub/efi/console_control.h,
8121 include/grub/efi/efi.h, include/grub/efi/pe32.h,
8122 include/grub/i386/efi/time.h, kern/efi/efi.c,
8123 kern/i386/efi/init.c, kern/i386/efi/startup.S,
8124 and util/i386/efi/grub-mkimage.c.
8126 * Makefile.in (RMKFILES): Added i386-efi.rmk.
8128 * genmk.rb (PModule#rule): Do not export symbols if
8129 #{prefix}_EXPORTS is set to "no".
8131 * conf/i386-efi.mk: New file.
8132 * conf/i386-efi.rmk: Likewise.
8133 * include/grub/efi/api.h: Likewise.
8134 * include/grub/efi/console_control.h: Likewise.
8135 * include/grub/efi/efi.h: Likewise.
8136 * include/grub/efi/pe32.h: Likewise.
8137 * include/grub/i386/efi/time.h: Likewise.
8138 * kern/efi/efi.c: Likewise.
8139 * kern/i386/efi/init.c: Likewise.
8140 * kern/i386/efi/startup.S: Likewise.
8141 * util/i386/efi/grub-mkimage.c: Likewise.
8143 2006-04-17 Marco Gerards <marco@gnu.org>
8145 * include/grub/script.h: Include <grub/parser.h> and
8146 "grub_script.tab.h".
8147 (struct grub_lexer_param): New struct.
8148 (struct grub_parser_param): Likewise.
8149 (grub_script_create_arglist): Pass the state in an argument.
8150 (grub_script_add_arglist): Likewise.
8151 (grub_script_create_cmdline): Likewise.
8152 (grub_script_create_cmdblock): Likewise.
8153 (grub_script_create_cmdif): Likewise.
8154 (grub_script_create_cmdmenu): Likewise.
8155 (grub_script_add_cmd): Likewise.
8156 (grub_script_arg_add): Likewise.
8157 (grub_script_lexer_ref): Likewise.
8158 (grub_script_lexer_deref): Likewise.
8159 (grub_script_lexer_record_start): Likewise.
8160 (grub_script_lexer_record_stop): Likewise.
8161 (grub_script_mem_record): Likewise.
8162 (grub_script_mem_record_stop): Likewise.
8163 (grub_script_malloc): Likewise.
8164 (grub_script_yylex): Likewise.
8165 (grub_script_yyparse): Likewise.
8166 (grub_script_yyerror): Likewise.
8167 (grub_script_yylex): Likewise.
8168 (grub_script_lexer_init): Return the state.
8170 * normal/lexer.c (grub_script_lexer_state): Removed variable.
8171 (grub_script_lexer_done): Likewise.
8172 (grub_script_lexer_getline): Likewise.
8173 (grub_script_lexer_refs): Likewise.
8175 (newscript): Likewise.
8177 (recording): Likewise.
8178 (recordpos): Likewise.
8179 (recordlen): Likewise.
8180 (grub_script_lexer_init): Return the state instead of setting
8182 (grub_script_lexer_ref): Use the newly added argument for state
8184 (grub_script_lexer_deref): Likewise.
8185 (grub_script_lexer_record_start): Likewise.
8186 (grub_script_lexer_record_stop): Likewise.
8187 (recordchar): Likewise.
8188 (nextchar): Likewise.
8189 (grub_script_yylex2): Likewise.
8190 (grub_script_yylex): Likewise.
8191 (grub_script_yyerror): Likewise.
8193 * normal/parser.y (func_mem): Removed variable.
8194 (menu_entry): Likewise.
8196 (%lex-param): New parser option.
8197 (%parse-param): Likewise.
8198 (script): Always return the AST.
8199 (argument): Pass the state around.
8200 (arguments): Likewise.
8201 (grubcmd): Likewise.
8202 (commands): Likewise.
8203 (function): Likewise.
8204 (menuentry): Likewise.
8205 (if_statement): Likewise.
8208 * normal/script.c (grub_script_memused): Removed variable.
8209 (grub_script_parsed): Likewise.
8210 (grub_script_malloc): Added a state argument. Use that instead of
8212 (grub_script_mem_record): Likewise.
8213 (grub_script_mem_record_stop): Likewise.
8214 (grub_script_arg_add): Likewise.
8215 (grub_script_add_arglist): Likewise.
8216 (grub_script_create_cmdline): Likewise.
8217 (grub_script_create_cmdif): Likewise.
8218 (grub_script_create_cmdmenu): Likewise.
8219 (grub_script_add_cmd): Likewise.
8220 (grub_script_parse): Setup the state before calling the parser.
8222 2006-04-16 Marco Gerards <marco@gnu.org>
8224 * normal/command.c (grub_command_init): Remove the title command.
8226 * normal/lexer.c (grub_script_yylex): Renamed from this...
8227 (grub_script_yylex2): ... to this.
8228 (grub_script_yylex): New function. Temporary
8229 introduced to filter some tokens.
8230 (grub_script_yyerror): Print a newline.
8232 * normal/main.c (read_config_file): Output information about the
8233 lines that contain errors. Wait for a key after all lines have
8234 been processed. Don't return an empty menu.
8236 * normal/parser.y (func_mem): Don't initialize.
8237 (menu_entry): Likewise.
8238 (err): New variable.
8239 (script): Don't return anything when an error was encountered.
8240 (ws, returns): Removed rules.
8241 (argument): Disabled concatenated variable support.
8242 (arguments): Remove explicit separators.
8243 (grubcmd): Likewise.
8244 (function): Likewise.
8245 (menuentry): Likewise.
8247 (commands): Likewise. Add error handling.
8249 * normal/script.c (grub_script_create_cmdline): If
8250 `grub_script_parsed' is 0, assume the parser encountered an error.
8252 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
8254 * configure.ac: Add support for EFI. Fix the typo
8255 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
8257 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8259 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
8260 foreign multibyte characters should be shown correctly.
8262 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8264 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
8266 (read_config_file): Made it to close file before returning.
8268 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
8270 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
8271 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
8272 video/i386/pc/vbefill.c.
8274 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
8275 video/i386/pc/vbefill.c.
8277 * include/grub/video.h (grub_video_blit_format): New enum.
8278 (grub_video_mode_info): Added new member blit_format.
8279 (grub_video_get_blit_format): New function prototype.
8281 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
8283 (grub_video_vbe_map_rgb): Likewise.
8284 (grub_video_vbe_unmap_color): Likewise.
8286 * include/grub/i386/pc/vbeblit.h: New file.
8288 * include/grub/i386/pc/vbefill.h: New file.
8290 * video/video.c (grub_video_get_blit_format): New function.
8291 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
8292 (grub_video_vbe_map_rgb): Likewise.
8293 (grub_video_vbe_unmap_color): Likewise.
8295 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
8297 (grub_video_vbe_blit_render_target): Changed to use more optimized
8299 (grub_video_vbe_setup): Added detection for optimized settings.
8300 (grub_video_vbe_create_render_target): Likewise.
8302 * video/i386/pc/vbeblit.c: New file.
8304 * video/i386/pc/vbefill.c: New file.
8306 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
8308 * font/manager.c (grub_font_get_glyph): Removed font fixup from
8311 * util/unifont2pff.rb: ... and moved it to here. Improved argument
8312 parsing to support both hex and dec ranges. If filename was missing
8313 show usage information.
8315 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
8317 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
8318 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
8320 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
8321 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
8322 (video_mod_SOURCES): Added.
8323 (video_mod_CFLAGS): Likewise.
8324 (video_mod_LDFLAGS): Likewise.
8325 (gfxterm_mod_SOURCES): Likewise.
8326 (gfxterm_mod_CFLAGS): Likewise.
8327 (gfxterm_mod_LDFLAGS): Likewise.
8328 (videotest_mod_SOURCES): Likewise.
8329 (videotest_mod_CFLAGS): Likewise.
8330 (videotest_mod_LDFLAGS): Likewise.
8331 (vesafb_mod_SOURCES): Removed.
8332 (vesafb_mod_CFLAGS): Likewise.
8333 (vesafb_mod_LDFLAGS): Likewise.
8334 (vga_mod_SOURCES): Likewise.
8335 (vga_mod_CFLAGS): Likewise.
8336 (vga_mod_LDFLAGS): Likewise.
8338 * commands/videotest.c: New file.
8340 * font/manager.c (fill_with_default_glyph): Modified to use
8342 (grub_font_get_glyph): Likewise.
8343 (fontmanager): Renamed from this...
8344 (font_manager): ... to this.
8346 * include/grub/font.h (grub_font_glyph): Added new structure.
8347 (grub_font_get_glyph): Modified to use grub_font_glyph.
8349 * include/grub/misc.h (grub_abs): Added as inline function.
8351 * include/grub/video.h: New file.
8353 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
8354 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
8355 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
8356 (grub_vbe_get_controller_info): Renamed from this...
8357 (grub_vbe_bios_get_controller_info): ... to this.
8358 (grub_vbe_get_mode_info): Renamed from this...
8359 (grub_vbe_bios_get_mode_info): ... to this.
8360 (grub_vbe_set_mode): Renamed from this...
8361 (grub_vbe_bios_set_mode): ... to this.
8362 (grub_vbe_get_mode): Renamed from this...
8363 (grub_vbe_bios_get_mode): ... to this.
8364 (grub_vbe_set_memory_window): Renamed from this...
8365 (grub_vbe_bios_set_memory_window): ... to this.
8366 (grub_vbe_get_memory_window): Renamed from this...
8367 (grub_vbe_bios_get_memory_window): ... to this.
8368 (grub_vbe_set_scanline_length): Renamed from this...
8369 (grub_vbe_set_scanline_length): ... to this.
8370 (grub_vbe_get_scanline_length): Renamed from this...
8371 (grub_vbe_bios_get_scanline_length): ... to this.
8372 (grub_vbe_set_display_start): Renamed from this...
8373 (grub_vbe_bios_set_display_start): ... to this.
8374 (grub_vbe_get_display_start): Renamed from this...
8375 (grub_vbe_bios_get_display_start): ... to this.
8376 (grub_vbe_set_palette_data): Renamed from this...
8377 (grub_vbe_bios_set_palette_data): ... to this.
8378 (grub_vbe_set_pixel_rgb): Removed.
8379 (grub_vbe_set_pixel_index): Likewise.
8381 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
8383 (grub_vbe_bios_get_controller_info): ... to this.
8384 (grub_vbe_get_mode_info): Renamed from this...
8385 (grub_vbe_bios_get_mode_info): ... to this.
8386 (grub_vbe_set_mode): Renamed from this...
8387 (grub_vbe_bios_set_mode): ... to this.
8388 (grub_vbe_get_mode): Renamed from this...
8389 (grub_vbe_bios_get_mode): ... to this.
8390 (grub_vbe_set_memory_window): Renamed from this...
8391 (grub_vbe_bios_set_memory_window): ... to this.
8392 (grub_vbe_get_memory_window): Renamed from this...
8393 (grub_vbe_bios_get_memory_window): ... to this.
8394 (grub_vbe_set_scanline_length): Renamed from this...
8395 (grub_vbe_set_scanline_length): ... to this.
8396 (grub_vbe_get_scanline_length): Renamed from this...
8397 (grub_vbe_bios_get_scanline_length): ... to this.
8398 (grub_vbe_set_display_start): Renamed from this...
8399 (grub_vbe_bios_set_display_start): ... to this.
8400 (grub_vbe_get_display_start): Renamed from this...
8401 (grub_vbe_bios_get_display_start): ... to this.
8402 (grub_vbe_set_palette_data): Renamed from this...
8403 (grub_vbe_bios_set_palette_data): ... to this.
8404 (grub_vbe_bios_get_controller_info): Fixed problem with registers
8405 getting corrupted after calling it. Added more pushes and pops.
8406 (grub_vbe_bios_set_mode): Likewise.
8407 (grub_vbe_bios_get_mode): Likewise.
8408 (grub_vbe_bios_get_memory_window): Likewise.
8409 (grub_vbe_bios_set_scanline_length): Likewise.
8410 (grub_vbe_bios_get_scanline_length): Likewise.
8411 (grub_vbe_bios_get_display_start): Likewise.
8412 (grub_vbe_bios_set_palette_data): Likewise.
8414 * normal/cmdline.c (cl_set_pos): Refresh the screen.
8415 (cl_insert): Likewise.
8416 (cl_delete): Likewise.
8418 * term/gfxterm.c: New file.
8420 * term/i386/pc/vesafb.c: Removed file.
8422 * video/video.c: New file.
8424 * video/i386/pc/vbe.c (real2pm): Added new function.
8425 (grub_video_vbe_draw_pixel): Likewise.
8426 (grub_video_vbe_get_video_ptr): Likewise.
8427 (grub_video_vbe_get_pixel): Likewise
8428 (grub_video_vbe_init): Likewise.
8429 (grub_video_vbe_fini): Likewise.
8430 (grub_video_vbe_setup): Likewise.
8431 (grub_video_vbe_get_info): Likewise.
8432 (grub_video_vbe_set_palette): Likewise.
8433 (grub_video_vbe_get_palette): Likewise.
8434 (grub_video_vbe_set_viewport): Likewise.
8435 (grub_video_vbe_get_viewport): Likewise.
8436 (grub_video_vbe_map_color): Likewise.
8437 (grub_video_vbe_map_rgb): Likewise.
8438 (grub_video_vbe_map_rgba): Likewise.
8439 (grub_video_vbe_unmap_color): Likewise.
8440 (grub_video_vbe_fill_rect): Likewise.
8441 (grub_video_vbe_blit_glyph): Likewise.
8442 (grub_video_vbe_blit_bitmap): Likewise.
8443 (grub_video_vbe_blit_render_target): Likewise.
8444 (grub_video_vbe_scroll): Likewise.
8445 (grub_video_vbe_swap_buffers): Likewise.
8446 (grub_video_vbe_create_render_target): Likewise.
8447 (grub_video_vbe_delete_render_target): Likewise.
8448 (grub_video_vbe_set_active_render_target): Likewise.
8449 (grub_vbe_set_pixel_rgb): Remove function.
8450 (grub_vbe_set_pixel_index): Likewise.
8451 (index_color_mode): Remove static variable.
8452 (active_mode): Likewise.
8453 (framebuffer): Likewise.
8454 (bytes_per_scan_line): Likewise.
8455 (grub_video_vbe_adapter): Added new static variable.
8456 (framebuffer): Likewise.
8457 (render_target): Likewise.
8458 (initial_mode): Likewise.
8459 (mode_in_use): Likewise.
8460 (mode_list): Likewise.
8462 2006-03-10 Marco Gerards <marco@gnu.org>
8464 * configure.ac (AC_INIT): Bumped to 1.93.
8466 * DISTLIST: Added `include/grub/hfs.h'.
8468 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
8470 * boot/i386/pc/boot.S (general_error): Before looping, try INT
8471 18H, which might help the BIOS falling back to next boot media.
8473 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
8475 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
8476 Poe Chen <poe.poechen@gmail.com>.
8478 2006-01-17 Marco Gerards <marco@gnu.org>
8480 * include/grub/normal.h: Include <grub/script.h>.
8481 (grub_command_list): Removed struct.
8482 (grub_command_list_t): Removed type.
8483 (grub_menu_entry): Remove members `num' and `command_list'. Add
8484 members `commands' and `sourcecode'.
8485 * include/grub/script.h: Add inclusion guards.
8486 (grub_script_cmd_menuentry): New struct.
8487 (grub_script_execute_menuentry): New prototype.
8488 (grub_script_lexer_record_start): Likewise.
8489 (grub_script_lexer_record_stop): Likewise.
8490 * normal/execute.c (grub_script_execute_menuentry): New function.
8491 * normal/lexer.c (record, recording, recordpos, recordlen): New
8493 (grub_script_lexer_record_start): New function.
8494 (grub_script_lexer_record_stop): Likewise.
8495 (recordchar): Likewise.
8496 (nextchar): Likewise.
8497 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
8498 2048 as the buffer size. Add the tokens `menuentry' and `@'.
8499 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
8500 (current_menu): New variable.
8501 (free_menu): Mainly rewritten.
8502 (grub_normal_menu_addentry): New function.
8503 (read_config_file): Rewritten.
8504 * normal/menu.c (run_menu_entry): Mainly rewritten.
8505 * normal/menu_entry.c (make_screen): Rewritten the code to insert
8507 (run): Mainly rewritten.
8508 * normal/parser.y (menu_entry): New variable.
8509 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
8510 (menuentry): New rule.
8511 (command): Add `menuentry'.
8512 (if_statement): Allow additional returns before `fi'.
8513 * normal/script.c (grub_script_create_cmdmenu): New function.
8515 2006-01-03 Marco Gerards <marco@gnu.org>
8517 * INSTALL: GNU Bison is required.
8518 * configure.ac: Rewritten the test to detect Bison.
8519 * Makefile.in (YACC): New variable. Reported by Xun Sun
8520 <xun.sun.cn@gmail.com>.
8522 2006-01-03 Marco Gerards <marco@gnu.org>
8524 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
8525 the HFS+ filesystem to filesystem blocks.
8526 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
8527 GCC warning is silenced.
8529 2006-01-03 Marco Gerards <marco@gnu.org>
8531 * partmap/apple.c (apple_partition_map_iterate): Convert the data
8532 read from disk from big endian to host byte order.
8534 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
8536 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
8538 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
8539 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
8540 embedded HFS+ filesystem.
8541 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
8542 (grub_hfs_sblock): Move from here...
8543 * include/grub/hfs.h: To here... New file.
8544 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
8546 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
8548 (grub_hfsplus_volheader): Change type of member `magic' to
8550 (grub_hfsplus_data): Add new member `embedded_offset'.
8551 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
8553 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
8554 Calculate the offset.
8556 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8558 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
8560 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
8562 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8564 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
8565 ENV->NAME is NULL after allocating ENV->VALUE.
8567 2005-12-25 Marco Gerards <marco@gnu.org>
8569 * kern/env.c (grub_env_set): Rewritten the error handling code.
8571 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8573 * geninit.sh: Made more robust, and more portable.
8575 2005-12-25 Marco Gerards <marco@gnu.org>
8577 Add support for Apple HFS+ filesystems.
8579 * fs/hfsplus.c: New file.
8581 * DISTLIST: Added `fs/hfsplus.c'.
8583 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
8584 (hfsplus_mod_SOURCES): New variable.
8585 (hfsplus_mod_CFLAGS): Likewise.
8586 (hfsplus_mod_LDFLAGS): Likewise.
8587 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
8588 (grub_setup_SOURCES): Likewise.
8589 (grub_mkdevicemap_SOURCES): Likewise.
8590 (grub_emu_SOURCES): Likewise.
8591 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8593 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
8595 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
8597 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
8599 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
8600 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
8601 include/grub/parser.h, include/grub/script.h, kern/parser.c,
8602 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
8603 normal/lexer.c, normal/parser.y, normal/script.c, and
8605 Removed kern/sparc64/cache.c.
8607 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
8608 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
8611 * configure.ac (AC_INIT): Bumped to 1.92.
8613 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
8615 * kern/err.c (grub_error_push): Added new function to support error
8617 (grub_error_pop): Likewise.
8618 (grub_error_stack_items): New local variable to support error stacks.
8619 (grub_error_stack_pos): Likewise.
8620 (grub_error_stack_assert): Likewise.
8621 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
8623 (grub_print_error): Added support to print errors from error stack.
8625 * include/grub/err.h (grub_error_push): Added function prototype.
8626 (grub_error_pop): Likewise.
8628 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
8630 * configure.ac: Accept `powerpc64' as host_cpu.
8631 (amd64): Rename to `biarch32'.
8633 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
8634 non-cacheline-aligned addresses.
8636 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
8637 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
8638 if `size' is non-zero.
8640 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
8642 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
8643 and `cd' to make sure the filename is not prefixed with a
8645 (pkgdata_MODULES): Add `gpt.mod'.
8646 (gpt_mod_SOURCES): New variable.
8647 (gpt_mod_CFLAGS): Likewise.
8648 (gpt_mod_LDFLAGS): Likewise.
8650 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
8652 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
8655 * partmap/gpt.c: New file.
8657 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
8658 GPT partition map is detected.
8660 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
8662 * commands/i386/pc/play.c: New file.
8663 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
8664 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
8667 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
8669 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
8670 ((unused))' to silence gcc warning.
8672 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
8674 * configure.ac: Correct `AC_PROG_YACC' test.
8676 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
8678 * util/powerpc/ieee1275/grub-install.in: Run the mount point
8679 check before installing files.
8681 2005-11-22 Mike Small <smallm@panix.com>
8683 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
8684 number regex so multidigit numbers are recognized correctly.
8686 2005-11-22 Mike Small <smallm@panix.com>
8688 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
8689 debugging message before attempting to claim memory.
8690 (grub_rescue_cmd_initrd): Add a claim debugging message and try
8691 multiple addresses in case of failure.
8693 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
8695 * term/tparm.c (get_space): Remove empty `if' statement.
8697 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
8699 * kern/parser.c (check_varstate): Rename `state' to 's'.
8701 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
8703 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
8704 variable definitions to the beginning of each function. Sort stack
8706 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
8707 `buf' argument to `char *'.
8709 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
8711 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
8712 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
8713 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
8714 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
8715 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
8716 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
8717 configfile.mod, search.mod, gzio.mod and test.mod.
8718 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
8719 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
8720 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
8721 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
8722 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
8723 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
8724 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
8725 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
8726 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
8727 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
8728 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8729 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8730 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
8731 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
8732 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
8733 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
8734 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8735 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
8736 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
8737 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
8738 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
8739 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
8740 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
8742 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
8744 (pkgdata_MODULES): Add test.mod.
8746 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8748 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
8749 appending to variables with "+=".
8750 (PModule): Use full pathname to generate *.lst filenames.
8752 * Makefile.in: Fixed list rules moved from genmk.rb.
8753 (.DELETE_ON_ERROR): New special target.
8754 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
8756 * conf/i386-pc.rmk: Include conf/common.mk.
8757 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
8758 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
8759 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
8760 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
8761 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
8762 configfile.mod, search.mod, gzio.mod and test.mod.
8763 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
8764 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
8765 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
8766 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
8767 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
8768 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
8769 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
8770 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
8771 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
8772 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
8773 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
8774 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
8775 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
8776 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
8777 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
8778 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
8779 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
8780 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
8781 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
8782 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
8783 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
8784 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
8785 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
8787 * conf/common.rmk: ... to here. New file.
8789 * conf/common.mk: New file.
8791 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
8793 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
8794 (grub_script.tab.c): ... here.
8796 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
8797 (grub_script.tab.c): ... here.
8799 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
8800 (grub_script.tab.c): ... here.
8802 * normal/command.c (grub_command_find): Fixed a memory leak of
8803 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
8805 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8807 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
8808 "@" which marks the start of a comment on ARM.
8809 (VARIABLE): Likewise.
8811 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
8813 Add support for Linux/ADFS partition tables.
8815 * partmap/acorn.c: New file.
8817 * include/grub/acorn_filecore.h: Likewise.
8819 * DISTLIST: Added `partmap/acorn.c' and
8820 `include/grub/acorn_filecore.h'.
8822 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8824 (pkgdata_MODULES): Add `acorn.mod'.
8825 (acorn_mod_SOURCES): New variable.
8826 (acorn_mod_CFLAGS): Likewise.
8828 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
8830 (pkgdata_MODULES): Add `acorn.mod'.
8831 (acorn_mod_SOURCES): New variable.
8832 (acorn_mod_CFLAGS): Likewise.
8834 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
8835 (pkgdata_MODULES): Add `acorn.mod'.
8836 (acorn_mod_SOURCES): New variable.
8837 (acorn_mod_CFLAGS): Likewise.
8838 (acorn_mod_LDFLAGS): Likewise.
8840 * include/types.h (grub_disk_addr_t): New typedef.
8842 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
8844 * geninit.sh: New file.
8846 * geninitheader.sh: Likewise.
8848 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
8849 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
8850 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
8851 * commands/configfile.c (grub_configfile_init)
8852 (grub_configfile_fini): Likewise.
8853 * commands/default.c (grub_default_init, grub_default_fini):
8855 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
8856 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
8857 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
8858 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
8860 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
8861 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
8863 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
8864 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
8866 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
8868 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
8870 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
8871 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
8872 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
8873 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
8874 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
8875 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
8876 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
8877 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
8878 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
8879 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
8880 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
8881 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
8882 * partmap/amiga.c (grub_amiga_partition_map_init)
8883 (grub_amiga_partition_map_fini): Likewise.
8884 * partmap/apple.c (grub_apple_partition_map_init)
8885 (grub_apple_partition_map_fini): Likewise.
8886 * partmap/pc.c (grub_pc_partition_map_init)
8887 (grub_pc_partition_map_fini): Likewise.
8888 * partmap/sun.c (grub_sun_partition_map_init,
8889 grub_sun_partition_map_fini): Likewise.
8890 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
8893 * util/grub-emu.c: Include <grub_modules_init.h>.
8894 (main): Don't initialize and de-initialize any modules directly,
8895 use `grub_init_all' and `grub_fini_all' instead.
8897 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
8898 `grub_vesafb_mod_init'.
8899 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
8901 * term/i386/pc/vga.c (grub_vga_init): Renamed to
8902 `grub_vga_mod_init'. Updated all users.
8903 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
8905 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
8906 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
8909 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
8910 Generate a function to initialize the module in utilities.
8911 Updated all callers.
8912 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
8913 initialize the module in utilities. Updated all callers.
8915 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
8917 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
8918 escape sequence and a literal ^L to clear the screen.
8920 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
8921 when returning from Open Firmware.
8923 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
8925 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
8926 (grub_ofconsole_height): Likewise.
8927 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
8928 manually insert a '\n'.
8929 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
8930 `grub_ofconsole_height'. Return early if these are already set.
8932 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
8934 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
8935 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
8936 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
8937 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
8938 and `normal/script.c'.
8939 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8940 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8941 (test_mod_SOURCES): New variable.
8942 (test_mod_CFLAGS): Likewise.
8943 (test_mod_LDFLAGS): Likewise.
8944 (pkgdata_MODULES): Add `test.mod'.
8945 (grub_script.tab.c): New rule.
8946 (grub_script.tab.h): Likewise.
8948 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
8950 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
8951 `commands/test.c', `normal/execute.c', `normal/lexer.c',
8952 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8953 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8954 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8955 (test_mod_SOURCES): New variable.
8956 (test_mod_CFLAGS): Likewise.
8957 (pkgdata_MODULES): Add `test.mod'.
8958 (grub_script.tab.c): New rule.
8959 (grub_script.tab.h): Likewise.
8961 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
8963 Add initial scripting support.
8965 * commands/test.c: New file.
8966 * include/grub/script.h: Likewise.
8967 * normal/execute.c: Likewise.
8968 * normal/function.c: Likewise.
8969 * normal/lexer.c: Likewise.
8970 * normal/parser.y: Likewise.
8971 * normal/script.c: Likewise.
8973 * configure.ac: Add `AC_PROG_YACC' test.
8975 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
8976 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
8977 `normal/function.c' and `normal/script.c'.
8978 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
8979 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
8980 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
8982 (pkgdata_MODULES): Add `test.mod'.
8983 (grub_script.tab.c): New rule.
8984 (grub_script.tab.h): Likewise.
8986 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
8988 * include/grub/normal.h (grub_test_init): New prototype.
8989 (grub_test_fini): Likewise.
8991 * normal/command.c: Include <grub/script.h>.
8992 (grub_command_execute): Rewritten.
8994 * util/grub-emu.c (main): Call `grub_test_init' and
8997 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
8999 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
9001 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
9002 there are no pending characters.
9004 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9006 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
9007 `grub_strndup' to drop device arguments. Replace unnecessary
9008 `grub_strndup' with `grub_strdup'.
9010 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
9012 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
9013 `debug' environment variable has been set.
9015 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
9017 * Makefile.in (install-local): Use $(DATA).
9018 (uninstall): Likewise.
9019 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
9020 (sbin_UTILITIES): ... to here.
9021 (sbin_SCRIPTS): New variable.
9022 (grub_install_SOURCES): New variable.
9023 * util/powerpc/ieee1275/grub-install.in: New file.
9024 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
9026 (add_segments): Call `grub_util_get_path'.
9028 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9030 From Timothy Baldwin:
9031 * commands/ls.c (grub_ls_list_files): Close FILE with
9033 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
9035 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
9037 * include/grub/parser.h: New file.
9039 * kern/parser.c: Likewise.
9041 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
9042 (grub_setup_SOURCES): Likewise.
9043 (grub_probefs_SOURCES): Likewise.
9044 (grub_emu_SOURCES): Likewise.
9045 (kernel_img_HEADERS): Add `parser.h'.
9047 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9048 (grub_emu_SOURCES): Add `kern/parser.c'.
9049 (grubof_SOURCES): Likewise.
9051 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
9052 (grubof_SOURCES): Add `kern/parser.c'.
9054 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
9056 * kern/misc.c (grub_split_cmdline): Removed function.
9058 * kern/rescue.c: Include <grub/parser.h>.
9059 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
9060 of `grub_split_cmdline'.
9062 * normal/command.c: Include <grub/parser.h>.
9063 (grub_command_execute): Use `grub_parser_split_cmdline' instead
9064 of `grub_split_cmdline'.
9066 * normal/completion.c: Include <grub/parser.h>.
9067 (cmdline_state): New variable.
9068 (iterate_dir): End the filename with a quote depending on the
9070 (get_state): new function.
9071 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
9072 split the arguments and determine the current argument. When the
9073 argument string is not quoted, escape all spaces.
9075 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9077 * normal/sparc64/setjmp.S: New file.
9079 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9081 * include/grub/sparc64/libgcc.h: New file.
9082 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
9083 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
9084 normal/sparc64/setjmp.c.
9086 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
9088 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
9089 * kern/sparc64/cache.S: New file.
9090 * kern/sparc64/cache.c: Removed.
9091 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
9092 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
9094 (COMMON_LDFLAGS): Add -melf64_sparc.
9095 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
9096 (grubof_SOURCES): Use cache.S instead of cache.c.
9097 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
9098 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
9099 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
9101 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
9102 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
9103 (linux_mod_CFLAGS): Commented out.
9104 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
9105 out because module isn't built.
9106 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
9107 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
9108 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
9109 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
9110 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
9111 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9112 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9113 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
9114 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
9115 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
9116 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
9117 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
9118 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
9119 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
9121 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
9123 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
9124 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
9125 longer, because HFS should not be used on PC.
9127 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
9129 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
9130 consistently within the loop.
9132 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
9134 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
9135 directory can not be read.
9137 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9139 * configure.ac (AC_INIT): Increase the version number to 1.91.
9141 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
9142 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
9143 term/i386/pc/serial.c.
9145 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9147 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
9148 file size must be permitted.
9150 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
9151 between %ah and %al.
9153 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9155 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
9157 Call the hook with a NUL-terminated filename.
9158 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
9161 * kern/term.c (cursor_state): New variable.
9162 (grub_term_set_current): Reset the cursor state on a new
9164 (grub_setcursor): Rewritten to use CURSOR_STATE.
9165 (grub_getcursor): New function.
9167 * include/grub/term.h (grub_getcursor): New prototype.
9169 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
9170 integers on ARM. Reported by Timothy Baldwin
9171 <T.E.Baldwin99@members.leeds.ac.uk>.
9173 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
9175 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
9177 (grub_sfs_dir): Likewise.
9179 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
9181 Add support for the SFS filesystem.
9183 * fs/sfs.c: New file.
9185 * DISTLIST: Added `fs/sfs.c'.
9187 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
9188 (grub_probefs_SOURCES): Likewise.
9189 (grub_emu_SOURCES): Likewise.
9190 (pkgdata_MODULES): Add `sfs.mod'.
9191 (sfs_mod_SOURCES): New variable.
9192 (sfs_mod_CFLAGS): Likewise.
9193 (sfs_mod_LDFLAGS): Likewise.
9195 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
9196 (pkgdata_MODULES): Add `sfs.mod'.
9197 (sfs_mod_SOURCES): New variable.
9198 (sfs_mod_CFLAGS): Likewise.
9200 * util/grub-emu.c (main): Call `grub_sfs_init' and
9203 * include/grub/fs.h (grub_sfs_init): New prototype.
9204 (grub_sfs_fini): Likewise.
9206 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
9208 Add support for the AFFS filesystem.
9210 * fs/affs.c: New file.
9212 * DISTLIST: Added `fs/affs.c'.
9214 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
9215 (grub_probefs_SOURCES): Likewise.
9216 (grub_emu_SOURCES): Likewise.
9217 (pkgdata_MODULES): Add `affs.mod'.
9218 (affs_mod_SOURCES): New variable.
9219 (affs_mod_CFLAGS): Likewise.
9220 (affs_mod_LDFLAGS): Likewise.
9222 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
9223 (pkgdata_MODULES): Add `affs.mod'.
9224 (affs_mod_SOURCES): New variable.
9225 (affs_mod_CFLAGS): Likewise.
9227 * util/grub-emu.c (main): Call `grub_affs_init' and
9230 * include/grub/fs.h (grub_affs_init): New prototype.
9231 (grub_affs_fini): Likewise.
9233 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9235 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
9237 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
9239 * configure.ac: Accept `x86_64' as host_cpu. In that case add
9242 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
9245 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
9246 (COMMON_LDFLAGS): New variable.
9247 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
9248 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
9249 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
9250 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
9251 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
9252 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
9253 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
9254 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
9255 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
9256 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
9257 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
9258 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
9259 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
9260 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
9261 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
9263 (normal_mod_ASFLAGS): Add `-m32'.
9265 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
9266 (grub_host_size_t, grub_host_ssize_t): New types.
9267 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
9268 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
9269 `GRUB_HOST_SIZEOF_VOID_P'.
9271 * include/grub/kernel.h (struct grub_module_header): Type of
9272 member offset changed to `grub_host_off_t'. Type of member size
9273 changed to `grub_host_size_t'.
9274 (struct grub_module_info): Type of member offset changed to
9275 `grub_host_off_t'. Type of member size changed to
9278 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
9280 Make GRUB's kernel compliant to Multiboot Specification.
9282 * kern/i386/pc/startup.S (multiboot_header): New label.
9283 (multiboot_entry): Likewise.
9284 (multiboot_trampoline): Likewise.
9286 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
9289 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
9290 put parentheses after a question mark.
9291 [!GRUB_UTIL] (my_mod): New variable.
9293 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
9295 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
9297 Adds support for the XFS filesystem. Btrees are not supported
9300 * fs/xfs.c: New file.
9302 * DISTLIST: Added `fs/xfs.c'.
9304 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
9305 (grub_probefs_SOURCES): Likewise.
9306 (grub_emu_SOURCES): Likewise.
9307 (pkgdata_MODULES): Add `xfs.mod'.
9308 (xfs_mod_SOURCES): New variable.
9309 (xfs_mod_CFLAGS): Likewise.
9311 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
9312 (pkgdata_MODULES): Add `xfs.mod'.
9313 (xfs_mod_SOURCES): New variable.
9314 (xfs_mod_CFLAGS): Likewise.
9316 * util/grub-emu.c (main): Call `grub_xfs_init' and
9319 * include/grub/fs.h (grub_xfs_init): New prototype.
9320 (grub_xfs_fini): Likewise.
9323 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
9325 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
9326 color modes, allow greater than 16 colors to be configured as
9329 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
9331 * normal/completion.c (complete_arguments): Add the qualifier
9334 From Omniflux <omniflux+lists@omniflux.com>:
9335 * include/grub/terminfo.h: New file.
9336 * include/grub/tparm.h: Likewise.
9337 * include/grub/i386/pc/serial.h: Likewise.
9338 * term/terminfo.c: Likewise.
9339 * term/tparm.c: Likewise.
9340 * term/i386/pc/serial.c: Likewise.
9341 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
9343 (terminfo_mod_SOURCES): New variable.
9344 (terminfo_mod_CFLAGS): Likewise.
9345 (serial_mod_SOURCES): Likewise.
9346 (serial_mod_CFLAGS): Likewise.
9348 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
9350 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
9351 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
9352 and kern/powerpc/ieee1275/cmain.c, respectively.
9354 * boot/powerpc/ieee1275/crt0.S: Moved to ...
9355 * kern/powerpc/ieee1275/crt0.S: ... here.
9357 * boot/powerpc/ieee1275/cmain.c: Moved to ...
9358 * kern/powerpc/ieee1275/cmain.c: ... here.
9360 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
9361 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
9362 instead of boot/powerpc/ieee1275/crt0.S and
9363 boot/powerpc/ieee1275/cmain.c, respectively.
9365 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
9366 sectors. It was not used anyway.
9368 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9370 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
9371 `unused parameter' warning.
9373 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
9375 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
9377 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
9380 2005-08-28 Marco Gerards <metgerards@student.han.nl>
9382 * include/grub/normal.h (enum grub_completion_type): Added
9383 `GRUB_COMPLETION_TYPE_ARGUMENT'.
9385 * normal/cmdline.c (print_completion): Handle
9386 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
9387 * normal/menu_entry.c (store_completion): Likewise.
9389 * normal/completion.c (complete_arguments): New function.
9390 (grub_normal_do_completion): Call `complete_arguments' when the
9391 current words start with a dash.
9393 2005-08-27 Marco Gerards <metgerards@student.han.nl>
9395 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
9396 `gzio.mod' instead of `io.mod').
9398 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
9400 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
9401 (DISTDIRS): Added io and video.
9402 Rewrite the search routine to make an output consistently.
9404 * DISTLIST: Added conf/sparc64-ieee1275.mk,
9405 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
9406 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
9407 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
9408 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
9409 util/powerpc/ieee1275/misc.c.
9411 * include/grub/gzio.h: New file.
9412 * io/gzio.c: Likewise.
9414 * kern/file.c (grub_file_close): Call grub_device_close only if
9415 FILE->DEVICE is not NULL.
9417 * include/grub/mm.h [!NULL] (NULL): New macro.
9419 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
9421 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
9422 (pkgdata_MODULES): Added gzio.mod.
9423 (gzio_mod_SOURCES): New variable.
9424 (gzio_mod_CFLAGS): Likewise.
9426 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
9427 (pkgdata_MODULES): Added gzio.mod.
9428 (gzio_mod_SOURCES): New variable.
9429 (gzio_mod_CFLAGS): Likewise.
9431 * commands/cat.c: Include grub/gzio.h.
9432 (grub_cmd_cat): Use grub_gzfile_open instead of
9435 * commands/cmp.c: Include grub/gzio.h.
9436 (grub_cmd_cmp): Use grub_gzfile_open instead of
9439 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
9440 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
9442 (grub_rescue_cmd_module): Likewise.
9444 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9446 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
9447 kern/sparc64/ieee1275/init.c because it contains _start.
9448 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
9450 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
9452 * configure.ac: Add support for sparc64 host with ieee1275
9454 * configure: Generated from configure.ac.
9455 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
9457 (grub_ofdisk_read): Likewise.
9458 (grub_ofdisk_open): Use %p to print pointer values, and cast the
9459 pointers as (void *) to remove a warning.
9460 (grub_ofdisk_close): Likewise.
9461 (grub_ofdisk_read): Likewise.
9462 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
9463 returns, so make it return void to remove a warning.
9464 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
9465 Corresponding prototype change.
9466 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
9467 values, and cast the pointers as (void *) to remove a warning.
9468 (grub_mm_dump): Likewise.
9469 * conf/sparc64-ieee1275.mk: New file.
9470 * conf/sparc64-ieee1275.rmk: Likewise.
9471 * include/grub/sparc64/setjmp.h: Likewise.
9472 * include/grub/sparc64/types.h: Likewise.
9473 * include/grub/sparc64/ieee1275/console.h: Likewise.
9474 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9475 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9476 * include/grub/sparc64/ieee1275/time.h: Likewise.
9477 * kern/sparc64/cache.c: Likewise.
9478 * kern/sparc64/dl.c: Likewise.
9479 * kern/sparc64/ieee1275/init.c: Likewise.
9480 * kern/sparc64/ieee1275/openfw.c: Likewise.
9482 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
9484 * util/console.c (grub_ncurses_putchar): If C is greater than
9485 0x7f, set C to a question mark.
9486 (grub_ncurses_getcharwidth): New function.
9487 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
9490 * normal/menu.c (print_entry): Made aware of Unicode. First,
9491 convert TITLE to UCS-4, and predict the cursor position by
9494 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
9496 * kern/misc.c (grub_utf16_to_utf8): Likewise.
9498 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9500 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
9501 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9504 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
9505 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
9506 grub_strcpy and grub_strlen. Take it into account that a space
9507 character is inserted as a delimiter.
9509 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9511 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
9512 invalid magic in the error.
9514 * commands/search.c: New file.
9516 * util/grub-emu.c (main): Call grub_search_init and
9519 * kern/rescue.c (grub_rescue_print_disks): Removed.
9520 (grub_rescue_print_devices): New function.
9521 (grub_rescue_cmd_ls): Use grub_device_iterate with
9522 grub_rescue_print_devices instead of grub_disk_dev_iterate with
9523 grub_rescue_print_disks.
9525 * kern/partition.c (grub_partition_iterate): Return the result of
9526 PARTMAP->ITERATE instead of GRUB_ERRNO.
9528 * kern/device.c: Include grub/partition.h.
9529 (grub_device_iterate): New function.
9531 * include/grub/partition.h (grub_partition_iterate): Return int
9532 instead of grub_err_t.
9534 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
9536 [GRUB_UTIL] (grub_search_fini): Likewise.
9538 * include/grub/device.h (grub_device_iterate): New prototype.
9540 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9542 (pkgdata_MODULES): Added search.mod.
9543 (search_mod_SOURCES): New variable.
9544 (search_mod_CFLAGS): Likewise.
9546 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
9547 (pkgdata_MODULES): Added search.mod.
9548 (search_mod_SOURCES): New variable.
9549 (search_mod_CFLAGS): Likewise.
9551 * commands/ls.c (grub_ls_list_disks): Renamed to ...
9552 (grub_ls_list_devices): ... this, and use grub_device_iterate.
9553 All callers changed.
9555 * DISTLIST: Added commands/search.c.
9557 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
9559 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
9561 (grub_getcharwidth): New function.
9563 * kern/misc.c (grub_utf8_to_ucs4): New function.
9565 * include/grub/term.h (struct grub_term): Added a new member
9567 (grub_getcharwidth): New prototype.
9569 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
9571 * term/i386/pc/console.c (map_char): New function. Segregated from
9572 grub_console_putchar.
9573 (grub_console_putchar): Use map_char.
9574 (grub_console_getcharwidth): New function.
9575 (grub_console_term): Specified grub_console_getcharwidth as
9578 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
9579 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
9581 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
9583 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
9584 on grub_strtoul completely.
9585 (write_char): Declare local variables in the beginning of the
9587 (grub_vesafb_getcharwidth): New function.
9588 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
9591 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
9593 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
9594 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
9595 commands/i386/pc/vbetest.c.
9597 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
9598 call grub_vbe_get_controller_info again, because the returned
9599 information is volatile.
9600 (grub_vbe_set_video_mode): Mostly rewritten.
9601 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
9602 grub_vbe_status_t correctly.
9603 (grub_vbe_get_video_mode_info): Likewise.
9604 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
9605 several if statements.
9607 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
9608 * commands/i386/pc/vbeinfo.c: ... this.
9610 * commands/i386/pc/vbe_test.c: Renamed to ...
9611 * commands/i386/pc/vbetest.c: ... this.
9613 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
9615 (grub_cmd_vbeinfo): ... this. Save video modes before
9616 iterating. Skip a video mode, if it is not available, not enough
9617 information is given or it is monochrome. Show the memory
9618 model. Leave the interpretation of MODEVAR to grub_strtoul
9620 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
9621 (GRUB_MOD_FINI): Likewise.
9623 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
9624 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
9625 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
9626 duplicated grub_env_get. Leave the interpretation of MODEVAR to
9627 grub_strtoul completely.
9629 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
9630 (GRUB_MOD_FINI): Likewise.
9632 * normal/misc.c: Include grub/mm.h.
9634 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
9635 vbe_list_modes with vbetest.mod and vbeinfo.mod.
9636 (vbe_list_modes_mod_SOURCES): Removed.
9637 (vbe_list_modes_mod_CFLAGS): Likewise.
9638 (vbe_test_mod_SOURCES): Likewise.
9639 (vbe_test_mod_CFLAGS): Likewise.
9640 (vbeinfo_mod_SOURCES): New variable.
9641 (vbeinfo_mod_CFLAGS): Likewise.
9642 (vbetest_mod_SOURCES): Likewise.
9643 (vbetest_mod_CFLAGS): Likewise.
9645 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
9647 * normal/misc.c: New file.
9649 * DISTLIST: Added normal/misc.c.
9651 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
9652 DISK to HOOK. Call HOOK with DISK.
9653 * partmap/apple.c (apple_partition_map_iterate): Likewise.
9654 * partmap/pc.c (pc_partition_map_iterate): Likewise.
9655 * partmap/sun.c (sun_partition_map_iterate): Likewise.
9657 * normal/menu_entry.c (struct screen): Added a new member
9659 (completion_buffer): New global variable.
9660 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
9661 (store_completion): New function.
9662 (complete): Likewise.
9663 (clear_completions): Likewise.
9664 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
9665 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
9666 a tab, call complete.
9668 * normal/completion.c (disk_dev): Removed.
9669 (print_simple_completion): Likewise.
9670 (print_partition_completion): Likewise.
9671 (print_func): New global variable.
9672 (add_completion): Do not take the arguments WHAT or PRINT any
9673 longer. Added a new argument TYPE. Instead of printing directly,
9674 call PRINT_FUNC if not NULL.
9675 All callers changed.
9676 (complete_device): Use a local variable DEV instead of
9677 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
9678 (grub_normal_do_completion): Take a new argument HOOK. Do not
9679 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
9680 empty string, return NULL instead.
9681 All callers changed.
9683 * normal/cmdline.c (print_completion): New function.
9685 * kern/partition.c (grub_partition_iterate): Add an argument DISK
9687 All callers changed.
9689 * kern/disk.c (grub_print_partinfo): Removed.
9691 * include/grub/partition.h (struct grub_partition_map): Add a new
9692 argument DISK into HOOK of ITERATE.
9693 (grub_partition_iterate): Add a new argument DISK to HOOK.
9695 * include/grub/normal.h (enum grub_completion_type): New enum.
9696 (grub_completion_type_t): New type.
9697 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
9698 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
9699 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
9700 (GRUB_COMPLETION_TYPE_FILE): Likewise.
9701 (grub_normal_do_completion): Added a new argument HOOK.
9702 (grub_normal_print_device_info): New prototype.
9704 * include/grub/disk.h (grub_print_partinfo): Removed.
9706 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
9707 (normal_mod_SOURCES): Likewise.
9708 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9709 (normal_mod_SOURCES): Likewise.
9711 * commands/ls.c (grub_ls_list_disks): Use
9712 grub_normal_print_device_info instead of grub_print_partinfo. Free
9714 (grub_ls_list_files): Use grub_normal_print_device_info instead of
9715 duplicating the code.
9717 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
9719 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
9720 follow GCS more precisely.
9721 * commands/i386/pc/vbe_test.c: Likewise.
9722 * include/grub/i386/pc/vbe.h: Likewise.
9723 * term/i386/pc/vesafb.c: Likewise.
9724 * video/i386/pc/vbe.c: Likewise.
9726 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
9728 * DISTLIST: Added term/i386/pc/vesafb.c
9729 DISTLIST: Added video/i386/pc/vbe.c
9730 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
9731 DISTLIST: Added commands/i386/pc/vbe_test.c.
9732 * commands/i386/pc/vbe_list_modes.c: New file.
9733 * commands/i386/pc/vbe_test.c: Likewise.
9734 * term/i386/pc/vesafb.c: Likewise.
9735 * video/i386/pc/vbe.c: Likewise.
9736 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
9737 (grub_vbe_probe) Added prototype.
9738 (grub_vbe_set_video_mode) Likewise.
9739 (grub_vbe_get_video_mode) Likewise.
9740 (grub_vbe_get_video_mode_info) Likewise.
9741 (grub_vbe_set_pixel_rgb) Likewise.
9742 (grub_vbe_set_pixel_index) Likewise.
9743 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
9744 (pkgdata_MODULES): Added vesafb.mod.
9745 (pkgdata_MODULES): Added vbe_list_modes.mod.
9746 (pkgdata_MODULES): Added vbe_test.mod.
9747 (vbe_mod_SOURCES): Added.
9748 (vbe_mod_CFLAGS): Likewise.
9749 (vesafb_mod_SOURCES): Likewise.
9750 (vesafb_mod_CFLAGS): Likewise.
9751 (vbe_list_modes_mod_SOURCES): Likewise.
9752 (vbe_list_modes_mod_CFLAGS): Likewise.
9753 (vbe_test_mod_SOURCES): Likewise.
9754 (vbe_test_mod_CFLAGS): Likewise.
9756 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
9758 * normal/command.c (grub_command_execute): If INTERACTIVE is
9759 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
9760 CMDLINE. Disable the pager if INTERACTIVE is true.
9761 All callers are changed.
9763 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
9764 before reading a config file.
9765 * normal/main.c (read_config_file): Even if a command is not
9766 found, register it if it is within an entry.
9768 * util/grub-emu.c: Include sys/types.h and unistd.h.
9769 (options): Added --hold.
9770 (struct arguments): Added a new member "hold".
9771 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
9773 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
9774 cleared by a debugger, if it is not zero.
9776 * include/grub/normal.h (grub_command_execute): Add an argument
9779 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
9781 * DISTLIST: Added include/grub/i386/pc/vbe.h.
9783 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
9785 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
9786 program with another one, because the old one didn't detect a bug
9787 in gcc-3.4. Always use regparm 2, because the new test is still
9788 not enough for gcc-4.0. Someone must investigate a simple test
9789 case which detects a bug in gcc-4.0.
9791 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
9793 * DISTLIST: Added normal/completion.c.
9795 * normal/completion.c: New file.
9797 * term/i386/pc/console.c (grub_console_getwh): New function.
9798 (grub_console_term): Assign grub_console_getwh to getwh.
9800 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
9801 function is defined in normal/completion.c as
9802 grub_normal_do_completion.
9803 (grub_cmdline_get): Use grub_normal_do_completion instead of
9806 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
9807 returns non-zero, otherwise return 0.
9808 (grub_partition_iterate): First, probe the partition map. Then,
9809 call ITERATE only for this partition map.
9811 * kern/misc.c (grub_strncmp): Rewritten.
9813 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
9814 returns non-zero. Otherwise return 0.
9816 * include/grub/partition.h (grub_partition_map_iterate): Return
9817 int instead of void.
9819 * include/grub/normal.h (grub_normal_do_completion): New prototype.
9821 * include/grub/misc.h (grub_strncmp): Change the type of N to
9824 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
9827 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
9828 unsigned explicitly before comparing it with I.
9830 * kern/main.c (grub_env_write_root): Add the attribute unused into
9833 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
9834 normal/completion.c.
9835 (normal_mod_SOURCES): Likewise.
9836 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9837 (normal_mod_SOURCES): Likewise.
9839 * normal/command.c (grub_iterate_commands): If ITERATE returns
9840 non-zero, return one immediately.
9842 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
9844 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
9845 * kern/i386/pc/startup.S: Updated Global Descriptor table's
9847 (grub_vbe_get_controller_info): New function.
9848 (grub_vbe_get_mode_info): Likewise.
9849 (grub_vbe_set_mode): Likewise.
9850 (grub_vbe_get_mode): Likewise.
9851 (grub_vbe_set_memory_window): Likewise.
9852 (grub_vbe_get_memory_window): Likewise.
9853 (grub_vbe_set_scanline_length): Likewise.
9854 (grub_vbe_get_scanline_length): Likewise.
9855 (grub_vbe_set_display_start): Likewise.
9856 (grub_vbe_get_display_start): Likewise.
9857 (grub_vbe_set_palette_data): Likewise.
9858 * include/grub/i386/pc/vbe.h: New file.
9860 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
9862 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
9863 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
9864 * DISTLIST: Likewise.
9865 * kern/ieee1275/of.c: Moved to ...
9866 * kern/ieee1275/ieee1275.c: ... here.
9868 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
9870 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
9871 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
9872 Pass 0 as `end' parameter to grub_strtoul().
9874 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
9876 * include/grub/powerpc/ieee1275/console.h: Do not include
9877 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
9879 (grub_console_cur_color): Remove i386-specific prototype.
9880 (grub_console_real_putchar): Likewise.
9881 (grub_console_checkkey): Likewise.
9882 (grub_console_getkey): Likewise.
9883 (grub_console_getxy): Likewise.
9884 (grub_console_gotoxy): Likewise.
9885 (grub_console_cls): Likewise.
9886 (grub_console_setcursor): Likewise.
9887 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
9888 Include <grub/machine/console.h>.
9889 * term/ieee1275/ofconsole.c: Likewise.
9891 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
9893 * Makefile.in (LIBLZO): New variable.
9895 * configure.ac: Check for LZO version 2.
9897 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
9898 lzo/lzo1x.h instead of lzo1x.h.
9900 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
9903 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
9904 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
9906 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
9907 copying the data from PARTITION to P.
9909 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
9911 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
9912 negative, unload the module.
9914 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
9915 map is "pc_partition_map" but not "pc".
9916 (usage): Fix the description. The options are --boot-image and
9917 --core-image but not --boot-file or --core-file.
9918 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
9919 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
9922 * util/i386/pc/grub-install.in: Do not specify --boot-file or
9923 --core-file. Specify INSTALL_DEVICE as an argument.
9925 * util/console.c: Include config.h.
9926 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
9927 [HAVE_NCURSES_H]: Include ncurses.h.
9928 [HAVE_CURSES_H]: Include curses.h.
9929 [!A_NORMAL] (A_NORMAL): Defined as zero.
9930 [!A_STANDOUT] (A_STANDOUT): Likewise.
9932 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
9934 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
9936 * configure.ac: Check for curses libraries and headers.
9938 * Makefile.in (LIBCURSES): New variable.
9940 * genmk.rb (Script::rule): Set the executable bits.
9942 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
9943 name of the PC partition map is "pc_partition_map" but not "pc".
9945 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
9947 * util/i386/pc/grub-install.in (grub_probefs): New variable.
9948 (modules): Likewise.
9949 (usage): Added descriptions for --modules and --grub-probefs.
9950 Handle --modules and --grub-probefs. Save the arguments in MODULES
9951 and GRUB_PROBEFS, respectively.
9952 Auto-detect a filesystem module against GRUBDIR. If the result is
9953 empty and modules are not specified explicitly, abort the
9954 installation. Add the result to MODULES.
9956 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
9957 disk/powerpc/ieee1275/ofdisk.c,
9958 include/grub/powerpc/ieee1275/init.h and
9959 term/powerpc/ieee1275/ofconsole.c.
9960 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
9961 term/ieee1275/ofconsole.c.
9963 * include/grub/powerpc/ieee1275/console.h: Resurrected.
9965 * COPYING: Upgraded to the latest version. Only the address of the
9966 FSF office has changed.
9968 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
9970 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
9971 kern/ieee1275.c with kern/ieee1275/of.c.
9973 * kern/ieee1275.c: Moved to ...
9974 * kern/ieee1275/of.c: ... here.
9976 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
9978 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
9981 * config.guess: Updated to the latest version from gnulib.
9982 * config.sub: Likewise.
9983 * install.sh: Likewise.
9984 * mkinstalldirs: Likewise.
9986 * include/grub/console.h: Removed. This file is arch-specific. Do
9987 not put this in include/grub.
9989 * include/grub/i386/pc/console.h: Resurrected.
9991 * util/console.c: Include grub/machine/console.h instead of
9993 * util/grub-emu.c: Likewise.
9995 2005-08-04 Marco Gerards <metgerards@student.han.nl>
9997 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
10000 From Vincent Pelletier <subdino2004@yahoo.fr>
10001 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
10002 Redefined to use grub_getwh.
10003 (grub_term): New member named getwh.
10004 (grub_getwh): New prototype.
10005 * kern/term.c (grub_getwh): New function.
10006 * term/i386/pc/console.c (grub_console_getwh): New function.
10007 (grub_console_term): New member `getwh'.
10008 * term/i386/pc/vga.c (grub_vga_getwh): New function.
10009 (grub_vga_term): New member `getwh'.
10010 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
10012 (grub_ofconsole_getw): New function.
10013 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
10014 (grub_ofconsole_term): New field named getwh and new initial
10017 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
10019 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
10020 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
10021 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
10022 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
10023 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
10024 of <grub/machine/ieee1275.h>.
10025 * commands/ieee1275/reboot.c: Likewise.
10026 * boot/powerpc/ieee1275/ieee1275.c: Move ...
10027 * kern/ieee1275.c: ... to here. All users updated. Change all
10028 parameter structs to use new type `grub_ieee1275_cell_t'.
10029 * term/powerpc/ieee1275/ofconsole.c: Move ...
10030 * term/ieee1275/ofconsole.c: ... to here. All users updated.
10031 * disk/powerpc/ieee1275/ofdisk.c: Move ...
10032 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
10033 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
10035 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
10036 Remove unused prototypes. All users updated.
10037 * include/grub/powerpc/ieee1275/console.h: Removed.
10038 * include/grub/powerpc/ieee1275/ieee1275.h: Define
10039 `grub_ieee1275_cell_t'.
10040 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
10041 Cast comparisons with -1 to the correct type.
10042 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
10043 type to match `grub_ieee1275_entry_fn'.
10045 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
10047 * DISTLIST: Added util/i386/pc/grub-probefs.c.
10049 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
10050 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
10052 (grub_probefs_SOURCES): New variable.
10054 * util/i386/pc/grub-probefs.c: New file.
10056 * util/i386/pc/grub-setup.c (main): Call
10057 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
10058 grub_hfs_init and grub_jfs_init to initialize the system. Call
10059 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
10060 grub_pc_partition_map_fini to finish the system.
10062 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
10064 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
10066 (grub_multiboot_load_elf32): Likewise.
10067 (grub_multiboot_is_elf64): Likewise.
10068 (grub_multiboot_load_elf64): Likewise.
10069 (grub_multiboot_load_elf): Likewise.
10070 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
10071 an ELF32 or ELF64 file.
10072 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
10074 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
10075 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
10076 NULL before calling FS->LABEL.
10077 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
10078 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
10079 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
10080 before calling FS->LABEL.
10082 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
10084 * util/i386/pc/grub-install.in (datadir): New variable.
10086 (pkgdatadir): New variable.
10087 (pkglibdir): Removed.
10089 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
10091 * DISTLIST: Added util/i386/pc/grub-install.in.
10093 * util/i386/pc/grub-install.in: New file.
10095 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
10096 (grub_install_SOURCES): Likewise.
10098 * genmk.rb: Added support for scripts.
10099 (Script): New class.
10100 (scripts): New variable.
10102 * Makefile.in (install-local): Install sbin_SCRIPTS by
10104 (uninstall): Remove sbin_SCRIPTS.
10106 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
10107 device, try to get a GRUB device by
10108 grub_util_biosdisk_get_grub_dev.
10111 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
10112 description for --device-map.
10114 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10116 Change the semantics of variable hooks. They now return strings
10117 instead of error values.
10119 * util/i386/pc/grub-setup.c: Include grub/env.h.
10120 (setup): Use grub_device_set_root instead of grub_env_set.
10122 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
10123 grub_env_get instead of grub_device_set_root and
10124 grub_device_get_root, respectively.
10126 * kern/main.c (grub_env_write_root): New function.
10127 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
10128 grub_env_set instead of grub_device_set_root.
10130 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
10132 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
10133 rather than calling ENV->WRITE_HOOK afterwards.
10134 (grub_env_get): Return the result of ENV->READ_HOOK rather than
10135 passing a pointer of a pointer.
10136 (grub_register_variable_hook): Change the types of "read_hook" and
10137 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
10139 Allocate the default empty string on the heap, because this string
10140 may be freed later.
10142 * kern/device.c: Include grub/env.h.
10143 (grub_device_set_root): Removed.
10144 (grub_device_get_root): Likewise.
10145 (grub_device_open): Use grub_env_get instead of
10146 grub_device_get_root.
10148 * include/grub/env.h (grub_env_read_hook_t): New type.
10149 (grub_env_write_hook_t): Likewise.
10150 (grub_env_var): Change the types of "read_hook" and "write_hook"
10151 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
10152 (grub_register_variable_hook): Likewise.
10154 * include/grub/device.h (grub_device_set_root): Removed.
10155 (grub_device_set_root): Likewise.
10157 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
10158 make sure that DIRNAME terminates with '/', so that
10159 grub_fat_find_dir will fail if PATH is not a directory.
10161 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
10163 Use the qualifier auto for print_files and print_files_long.
10164 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
10166 Put a newline only if there is no error.
10167 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
10170 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
10172 * kern/partition.c (grub_partition_probe): Initialize PART to
10173 NULL. Otherwise, when no partition map is registered, this returns
10176 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
10178 * partmap/apple.c (apple_partition_map_iterate): Check if POS
10179 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
10182 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
10184 * commands/ls.c (grub_ls_list_disks): Print the filesystem
10185 information on each device, if it does not have partitions. Print
10186 "Device" instead of "Disk", because this function is not specific
10189 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
10190 static to ensure that it is put on the memory rather than a
10193 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10195 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
10196 (grub_cat_init): Likewise.
10197 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
10198 (options): Likewise.
10199 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
10200 (grub_configfile_init): Likewise.
10201 * font/manager.c (GRUB_MOD_INIT): Likewise.
10202 * commands/help.c (GRUB_MOD_INIT): Likewise.
10203 (grub_help_init): Likewise.
10204 * normal/command.c (grub_command_init): Likewise.
10205 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
10206 * disk/loopback.c (grub_loop_init): Likewise.
10207 (GRUB_MOD_INIT): Likewise.
10208 * commands/ls.c (grub_ls_init): Likewise.
10209 (GRUB_MOD_INIT): Likewise.
10210 (options): Likewise.
10211 * commands/boot.c (grub_boot_init): Likewise.
10212 (GRUB_MOD_INIT): Likewise.
10213 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
10214 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
10215 (GRUB_MOD_INIT): Likewise.
10216 * commands/cmp.c (grub_cmp_init): Likewise.
10217 (GRUB_MOD_INIT): Likewise.
10219 * normal/arg.c: Use <> instead of "" to include header files.
10220 (SHORT_ARG_HELP): New macro.
10221 (SHORT_ARG_USAGE): Likewise.
10222 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
10223 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
10225 (find_short): Check if C is 'h' or 'u' explicitly.
10226 (grub_arg_show_help): Use space characters instead of tabs. Treat
10227 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
10228 are shown with --help and --usage only if they are not used for
10229 the command itself.
10230 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
10233 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
10234 const into "longarg". Change the type of "shortarg" to int.
10236 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10238 * boot/i386/pc/boot.S (boot_drive_check): New label.
10240 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
10243 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
10244 which do not pass a boot drive correctly. Copied from GRUB Legacy.
10246 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10248 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
10249 When turning off Gate A20, skip the check and return immediately,
10250 because this is not fatal usually.
10252 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
10254 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
10255 be 0x7C00 instead of 0x8000.
10257 * boot/i386/pc/pxeboot.S: Rewritten.
10259 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
10261 (gate_a20_check_state): Read a byte from 0x108000. Invert the
10264 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
10266 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
10267 robustness. This routine now supports a BIOS call and System
10268 Control Port A to modify the gate A20.
10270 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
10271 Increased to 0x440.
10273 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
10275 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
10276 device path and resulting ihandle.
10277 (grub_ofdisk_close): dprintf the ihandle being closed.
10278 (grub_ofdisk_read): dprintf function parameters.
10279 * kern/mm.c (grub_mm_init_region): Likewise.
10280 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
10281 (grub_linux_boot): dprintf the Linux entry point, initrd address and
10282 size, and boot arguments.
10283 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
10284 before loading into memory.
10285 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
10286 before loading into memory.
10288 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
10290 * kern/mm.c: Added much documentation.
10291 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
10292 8, set to 5 instead of 8.
10294 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
10296 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
10298 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
10299 (grub_mkdevicemap_SOURCES): New variable.
10301 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
10302 lib/device.c of GRUB Legacy.
10304 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
10306 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
10307 instead of PATH is NULL.
10309 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
10311 * commands/cmp.c (BUFFER_SIZE): New macro.
10312 (grub_cmd_cmp): Close the right file at the right time. Compare
10313 only data just read. Don't report files of different size as
10314 identical. Dynamically allocate buffers. Move variable
10315 declarations at the beginning of function.
10317 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
10319 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
10322 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
10324 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
10325 when backspace is pressed at beginning of line.
10327 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
10329 * DISTLIST: Added genfslist.sh.
10331 * normal/main.c (fs_module_list): New variable.
10332 (autoload_fs_module): New function.
10333 (read_fs_list): Likewise.
10334 (grub_normal_execute): Call read_fs_list.
10336 * kern/fs.c (grub_fs_autoload_hook): New variable.
10337 (grub_fs_probe): Added support for auto-loading.
10339 * include/grub/normal.h (struct grub_fs_module_list): New struct.
10340 (grub_fs_module_list_t): New type.
10342 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
10343 (grub_fs_autoload_hook): New prototype.
10345 * genfslist.sh: New file.
10347 * genmk.rb: Added a rule to generate a filesystem list.
10349 2005-06-30 Marco Gerards <metgerards@student.han.nl>
10351 * configure.ac: Fix the test for cross-compiling.
10353 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
10354 define GRUB_UTIL anymore.
10356 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
10357 so this function works on other systems than just big endian.
10358 (load_modules): Likewise.
10359 (add_segments): Likewise.
10361 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
10363 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
10364 contains `l' modifier, get a long from va_arg().
10366 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
10368 * kern/mm.c (grub_free): If the next free block which is being
10369 merged is the first free block, set the first block to the block
10371 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
10373 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10375 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
10376 `grub_ieee1275_chosen'.
10378 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
10380 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
10381 (grub_ieee1275_chosen): New variable.
10382 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
10384 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
10385 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
10386 Rename first argument to `phandle' for consistency.
10387 (grub_ieee1275_get_property_length): Likewise.
10388 (grub_ieee1275_next_property): Likewise. Change type of first argument
10389 to grub_ieee1275_phandle_t.
10390 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
10391 Move export next to declaration.
10392 (grub_ieee1275_chosen): New variable.
10393 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
10394 Correct cosmetic typo.
10395 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
10396 `grub_ieee1275_chosen'.
10397 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
10398 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
10399 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
10400 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
10401 `grub_ieee1275_chosen'.
10403 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
10405 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
10407 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
10408 /chosen/bootargs as "variable=value" pairs.
10410 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
10412 * include/grub/misc.h (grub_dprintf): New macro.
10413 (grub_real_dprintf): New prototype.
10414 (grub_strword): Likewise.
10415 (grub_iswordseparator): Likewise.
10416 * kern/misc.c (grub_real_dprintf): New function.
10417 (grub_strword): Likewise.
10418 (grub_iswordseparator): Likewise.
10420 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
10422 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
10423 (roundup): Remove macro.
10424 (grub_ieee1275_flags): Make static.
10425 (grub_ieee1275_realmode): Remove.
10426 (grub_ieee1275_test_flag): New function.
10427 (grub_ieee1275_set_flag): Likewise.
10428 (find_options): Rename to `grub_ieee1275_find_options'; update
10429 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
10430 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
10431 (cmain): New prototype.
10432 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
10433 `grub_ieee1275_flags' directly.
10434 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
10435 machine/biosdisk.h.
10436 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
10437 Don't include grub/machine/init.h.
10438 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
10439 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
10441 (grub_ieee1275_realmode): Likewise.
10442 (grub_ieee1275_flag): New enum.
10443 (grub_ieee1275_test_flag): New prototype.
10444 (grub_ieee1275_set_flag): New prototype.
10445 * include/grub/powerpc/ieee1275/init.h: Remove file.
10446 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
10447 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
10448 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
10449 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
10451 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
10452 `grub_ieee1275_test_flag'.
10453 (grub_ieee1275_encode_devname): Likewise.
10455 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
10457 * include/grub/powerpc/ieee1275/ieee1275.h
10458 (grub_ieee1275_encode_devname): New prototype.
10459 (grub_ieee1275_get_filename): Likewise.
10460 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
10462 (grub_set_prefix): Likewise.
10463 (grub_machine_init): Call grub_set_prefix.
10464 * kern/powerpc/ieee1275/openfw.c: Fix typos.
10465 (grub_parse_type): New enum.
10466 (grub_ieee1275_get_devargs): New function.
10467 (grub_ieee1275_get_devname): Likewise.
10468 (grub_ieee1275_parse_args): Likewise.
10469 (grub_ieee1275_get_filename): Likewise.
10470 (grub_ieee1275_encode_devname): Likewise.
10472 2005-03-30 Marco Gerards <metgerards@student.han.nl>
10474 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
10475 `grub_loader_unset'.
10477 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
10479 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
10480 instead of grub_ieee1275_interpret.
10481 (grub_halt_init): New function.
10482 (grub_halt_fini): Likewise.
10483 (GRUB_MOD_INIT): Correct message grammar.
10484 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
10485 instead of grub_ieee1275_interpret.
10486 (grub_reboot_init): New function.
10487 (grub_reboot_fini): Likewise.
10488 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
10489 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
10490 util/i386/pc/misc.c with commands/ieee1275/halt.c,
10491 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
10492 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
10494 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
10496 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
10498 (grub_halt): Likewise.
10499 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
10500 (cmain): Remove __attribute__((unused)).
10501 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
10502 (grub_heap_len): Likewise.
10503 (grub_machine_fini): New function.
10504 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
10505 (grub_halt): Likewise.
10506 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
10508 * util/powerpc/ieee1275/misc.c: New file.
10510 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
10512 * DISTLIST: New file.
10513 * gendistlist.sh: Likewise.
10515 * Makefile.in (COMMON_DISTFILES): Removed.
10516 (BOOT_DISTFILES): Likewise.
10517 (CONF_DISTFILES): Likewise.
10518 (DISK_DISTFILES): Likewise.
10519 (FS_DISTFILES): Likewise.
10520 (INCLUDE_DISTFILES): Likewise.
10521 (KERN_DISTFILES): Likewise.
10522 (LOADER_DISTFILES): Likewise.
10523 (TERM_DISTFILES): Likewise.
10524 (UTIL_DISTFILES): Likewise.
10525 (DISTFILES): Likewise.
10526 (uninstall): Uninstall files in $(pkgdata_DATA).
10527 (DISTLIST): New target.
10528 (distdir): Use the contents of the file DISTLIST to get a list of
10531 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
10533 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
10534 descriptor. This is ported from GRUB Legacy.
10536 * gencmdlist.sh: Added an extra semicolon to make it work with
10537 old sed versions. Reported by Robert Bihlmeyer
10538 <robbe@orcus.priv.at>.
10540 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
10542 Automatic loading of commands is supported.
10544 * normal/main.c (read_command_list): New function.
10545 (grub_normal_execute): Call read_command_list.
10547 * normal/command.c (grub_register_command): Return zero or CMD.
10548 Allocate CMD->NAME from the heap.
10549 Initialize CMD->MODULE_NAME to zero.
10550 Find the same name as well. If the same command is found and it is
10551 a dummy command, overwrite members. If it is not a dummy command,
10553 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
10554 (grub_command_find): If a dummy command is found, load a module
10555 and retry to find a command only once.
10557 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
10558 make sure that each command is loaded.
10560 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
10562 (struct grub_command): Remove const from the member `name'.
10563 Add a new member `module_name'.
10564 (grub_register_command): Return grub_command_t.
10566 * commands/help.c (grub_cmd_help): Call grub_command_find to make
10567 sure that each command is loaded.
10569 * genmk.rb (PModule::rule): Specify a module name without the
10570 suffix ".mod" to gencmdlist.sh.
10572 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10574 * gencmdlist.sh: New file.
10576 * genmk.rb (PModule::rule): Generate a rule for a command list.
10578 Generate command.lst from $(COMMANDFILES).
10580 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
10581 (DATA): Added $(pkgdata_DATA).
10582 (install-local): Install files in $(pkgdata_DATA).
10584 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
10586 * term/i386/pc/vga.c (debug_command): Removed.
10587 (GRUB_MOD_INIT): Do not register the command "debug".
10589 From Hollis Blanchard:
10590 * commands/configfile.c: New file.
10591 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10592 commands/configfile.c.
10593 (pkgdata_MODULES): Added configfile.mod.
10594 (configfile_mod_SOURCES): New variable.
10595 (configfile_mod_CFLAGS): Likewise.
10596 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
10597 commands/configfile.c.
10598 (pkgdata_MODULES): Added configfile.mod.
10599 (configfile_mod_SOURCES): New variable.
10600 (configfile_mod_CFLAGS): Likewise.
10601 * util/grub-emu.c (main): Call grub_configfile_init and
10602 grub_configfile_fini.
10603 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
10605 [GRUB_UTIL] (grub_configfile_fini): Likewise.
10607 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
10609 * normal/arg.c (grub_arg_show_help): Do not show the bug report
10612 * commands/help.c (grub_cmd_help): Do not print newlines after
10613 the last command in print_command_help.
10615 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
10617 * commands/default.h: New file.
10618 * commands/timeout.h: Likewise.
10619 * normal/context.c: Likewise.
10621 * util/misc.c: Do not include sys/times.h.
10622 Include sys/time.h and grub/machine/time.h.
10623 (grub_get_rtc): Rewritten with gettimeofday.
10625 * util/grub-emu.c (main): Call grub_default_init and
10626 grub_timeout_init before grub_normal_init, and call
10627 grub_timeout_fini and grub_default_fini after grub_main.
10629 * util/console.c (grub_ncurses_checkkey): Return the read
10632 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
10635 * normal/main.c (read_config_file): Push MENU. If this fails,
10636 print an error and wait for a user input.
10637 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
10638 If a menu is empty or an error occurs, pop MENU.
10639 (grub_normal_execute): Pop and free MENU after grub_menu_run
10642 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
10644 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
10646 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10648 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
10650 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
10653 * include/grub/normal.h (struct grub_menu_list): New struct.
10654 (grub_menu_list_t): New type.
10655 (struct grub_context): New struct.
10656 (grub_context_t): New type.
10657 (grub_register_command): Got rid of EXPORT_FUNC.
10658 (grub_unregister_command): Likewise.
10659 (grub_context_get): New prototype.
10660 (grub_context_get_current_menu): Likewise.
10661 (grub_context_push_menu): Likewise.
10662 (grub_context_pop_menu): Likewise.
10663 [GRUB_UTIL] (grub_default_init): Likewise.
10664 [GRUB_UTIL] (grub_default_fini): Likewise.
10665 [GRUB_UTIL] (grub_timeout_init): Likewise.
10666 [GRUB_UTIL] (grub_timeout_fini): Likewise.
10668 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
10669 commands/timeout.c and normal/context.c.
10670 (pkgdata_MODULES): Added default.mod and timeout.mod.
10671 (normal_mod_SOURCES): Added normal/context.c.
10672 (default_mod_SOURCES): New variable.
10673 (default_mod_CFLAGS): Likewise.
10674 (timeout_mod_SOURCES): Likewise.
10675 (timeout_mod_CFLAGS): Likewise.
10676 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
10678 (pkgdata_MODULES): Added default.mod and timeout.mod.
10679 (normal_mod_SOURCES): Added normal/context.c.
10680 (default_mod_SOURCES): New variable.
10681 (default_mod_CFLAGS): Likewise.
10682 (timeout_mod_SOURCES): Likewise.
10683 (timeout_mod_CFLAGS): Likewise.
10685 * Makefile.in (all-local): Added $(MKFILES).
10687 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
10689 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
10690 (grub_emu_SOURCES): Likewise.
10691 (pkgdata_MODULES): Add `sun.mod'.
10692 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
10693 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10695 (pkgdata_MODULES): Add `sun.mod'.
10696 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
10697 * include/grub/partition.h (grub_sun_partition_map_init): New
10699 (grub_sun_partition_map_fini): Likewise.
10700 * partmap/sun.c: New file.
10701 * util/grub-emu.c (main): Initialize and de-initialize the sun
10702 partitionmap support.
10704 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
10706 This implements an Emacs-like menu entry editor.
10708 * normal/menu_entry.c: New file.
10710 * util/console.c (grub_ncurses_putchar): Translate some Unicode
10711 characters to ASCII.
10712 (saved_char): New variable.
10713 (grub_ncurses_checkkey): Rewritten completely.
10714 (grub_ncurses_getkey): Likewise.
10715 (grub_ncurses_init): Call raw instead of cbreak.
10717 * normal/menu.c (print_entry): Do not put a space.
10718 (init_page): Renamed to ...
10719 (grub_menu_init_page): ... this. All callers changed.
10720 (edit_menu_entry): Removed.
10721 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
10723 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
10725 * kern/misc.c (grub_vprintf): Call grub_refresh.
10727 * normal/menu.c (DISP_LEFT): Renamed to ...
10728 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
10729 * normal/menu.c (DISP_UP): Renamed to ...
10730 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
10731 * normal/menu.c (DISP_RIGHT): Renamed to ...
10732 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
10733 * normal/menu.c (DISP_DOWN): Renamed to ...
10734 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
10735 * normal/menu.c (DISP_HLINE): Renamed to ...
10736 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
10737 * normal/menu.c (DISP_VLINE): Renamed to ...
10738 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
10739 * normal/menu.c (DISP_UL): Renamed to ...
10740 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
10741 * normal/menu.c (DISP_UR): Renamed to ...
10742 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
10743 * normal/menu.c (DISP_LL): Renamed to ...
10744 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
10745 * normal/menu.c (DISP_LR): Renamed to ...
10746 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
10747 * normal/menu.c (TERM_WIDTH): Renamed to ...
10748 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
10749 * normal/menu.c (TERM_HEIGHT): Renamed to ...
10750 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
10751 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
10752 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
10753 * normal/menu.c (TERM_MARGIN): Renamed to ...
10754 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
10755 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
10756 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
10757 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
10758 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
10759 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
10760 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
10761 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
10762 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
10763 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
10764 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
10765 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
10766 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
10767 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
10768 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
10769 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
10770 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
10771 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
10772 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
10773 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
10774 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
10775 All callers changed.
10777 * include/grub/normal.h: New prototype.
10779 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10780 normal/menu_entry.c.
10781 (normal_mod_SOURCES): Likewise.
10782 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10783 (normal_mod_SOURCES): Likewise.
10785 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
10787 * include/grub/normal.h (grub_halt_init): New prototype.
10788 (grub_halt_fini): Likewise.
10789 (grub_reboot_init): Likewise.
10790 (grub_reboot_fini): Likewise.
10792 * util/grub-emu.c: Include signal.h.
10793 (main_env): New global variable.
10794 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
10796 (grub_machine_fini): New function.
10797 (main): Call grub_halt_init and grub_reboot_init before
10798 grub_main, and grub_reboot_fini and grub_halt_fini after it.
10799 Call setjmp with MAIN_ENV to go back afterwards.
10800 Call grub_machine_fini right before return.
10802 * include/grub/util/misc.h: Include setjmp.h.
10803 (main_env): New prototype.
10805 * include/grub/kernel.h (grub_machine_fini): New prototype.
10806 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
10807 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
10809 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
10810 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
10811 * term/i386/pc/console.c (grub_console_fini): Likewise.
10813 * util/i386/pc/misc.c: New file.
10815 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10816 util/i386/pc/misc.c, commands/i386/pc/halt.c and
10817 commands/i386/pc/reboot.c.
10819 2005-02-14 Guillem Jover <guillem@hadrons.org>
10821 * include/grub/dl.h (grub_dl_check_header): New prototype.
10822 (grub_arch_dl_check_header): Change return type to grub_err_t,
10823 remove size parameter and export function. Update all callers.
10824 * kern/dl.c (grub_dl_check_header): New function.
10825 (grub_dl_load_core): Use `grub_dl_check_header' instead of
10826 `grub_arch_dl_check_header'. Check ELF type. Check if sections
10827 are inside the core.
10828 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
10829 independent ELF header checks.
10830 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
10831 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
10832 `grub_dl_check_header' instead of explicit checks. Check for the
10834 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
10835 `grub_dl_check_header' instead of explicit checks. Remove arch
10836 specific ELF header checks.
10838 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
10841 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
10843 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
10844 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
10846 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
10848 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
10849 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
10850 (part_map_iterate): Clear `grub_errno' and return 0 if
10851 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
10852 * partmap/amiga.c (amiga_partition_map_iterate): Return
10853 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
10854 * partmap/apple.c (apple_partition_map_iterate): Likewise.
10856 2005-02-01 Guillem Jover <guillem@hadrons.org>
10858 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
10861 2005-01-31 Marco Gerards <metgerards@student.han.nl>
10863 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
10865 (grub_rescue_cmd_linux): New prototype.
10866 (grub_rescue_cmd_initrd): Likewise.
10867 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
10869 (grub_linux_release_mem): Release the memory for the initrd.
10870 (grub_load_linux): Renamed from this...
10871 (grub_rescue_cmd_linux): ...To this. Changed all callers.
10872 Changed `entry' not to be static. Loop over memory regions to
10873 find another one when the default fails.
10874 (grub_rescue_cmd_initrd): New function.
10875 (grub_linux_init): Remove function.
10876 (grub_linux_fini): Likewise.
10877 (GRUB_MOD_INIT): Register `initrd'.
10878 (GRUB_MOD_FINI): Unregister `initrd'.
10879 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
10881 (grub_linux_normal_fini): Likewise.
10882 (GRUB_MOD_INIT): Register `initrd'.
10883 (GRUB_MOD_FINI): Unregister `initrd'.
10885 2005-01-31 Marco Gerards <metgerards@student.han.nl>
10887 * commands/help.c: New file.
10888 * normal/arg.c (show_help): Renamed to...
10889 (grub_arg_show_help): ... this.
10890 * commands/i386/pc/halt.c: New file.
10891 * commands/i386/pc/reboot.c: Likewise.
10892 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
10893 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
10894 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
10895 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
10897 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10899 (pkgdata_MODULES): Add `help.mod'.
10900 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
10901 * grub/i386/pc/init.h (grub_reboot): New prototype.
10902 (grub_halt): Likewise.
10903 * include/grub/normal.h (grub_arg_show_help): New prototype.
10904 (grub_help_init): Likewise.
10905 (grub_help_fini): Likewise.
10906 * util/grub-emu.c (main): Initialize and deinitialize the help
10909 * normal/cmdline.c (grub_cmdline_get): Doc fix.
10911 * normal/command.c (grub_command_init): Fixed the description of
10912 the `set' and `unset' commands.
10914 2005-01-31 Marco Gerards <metgerards@student.han.nl>
10916 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
10918 * commands/ieee1275/halt.c: New file.
10919 * commands/ieee1275/reboot.c: Likewise.
10920 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
10921 `__attribute__ ((unused))'. Some GCS related fixed.
10922 (grub_suspend_init) [GRUB_UTIL]: Function removed.
10923 (grub_suspend_fini): Likewise.
10924 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
10926 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
10927 (halt_mod_CFLAGS): New variables.
10928 * include/grub/powerpc/ieee1275/ieee1275.h
10929 (grub_ieee1275_interpret): New prototype.
10931 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
10933 * include/grub/misc.h (memmove): New prototype.
10934 (memcpy): Likewise.
10936 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
10938 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
10939 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
10941 2005-01-22 Marco Gerards <metgerards@student.han.nl>
10943 * kern/misc.c (grub_strndup): Function rewritten.
10945 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
10947 * normal/menu.c (TERM_WIDTH): Macro redefined.
10948 (TERM_TOP_BORDER_Y): Likewise.
10949 (draw_border): Replaced while-loop by a for-loop. Make the number
10950 of lines consistent with the number of lines displayed in
10951 print_entries. Added a margin below the rectangle.
10952 (print_entry): Make the entry fit in the rectangle.
10953 (print_entries): Display the scroll arrows next to the right
10956 2005-01-21 Marco Gerards <metgerards@student.han.nl>
10958 * fs/minix.c (grub_minix_find_file): Reserve more space for
10959 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
10960 `grub_strncpy' to copy `path' into it.
10962 2005-01-21 Marco Gerards <metgerards@student.han.nl>
10964 Add the loopback device, a device via which files can be accessed
10967 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
10968 (pkgdata_MODULES): Add loopback.mod.
10969 (loopback_mod_SOURCES): New variable.
10970 (loopback_mod_CFLAGS): Likewise.
10971 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10973 (pkgdata_MODULES): Add loopback.mod.
10974 (loopback_mod_SOURCES): New variable.
10975 (loopback_mod_CFLAGS): Likewise.
10976 * disk/loopback.c: new file.
10977 * include/grub/normal.h (grub_loop_init): New prototype.
10978 (grub_loop_fini): New prototype.
10979 * util/grub-emu.c (main): Initialize and de-initialize loopback
10981 * include/grub/disk.h (grub_disk_dev_id): Add
10982 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
10984 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
10986 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
10988 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
10989 (suspend_mod_SOURCES): New variable.
10990 (suspend_mod_CFLAGS): Likewise.
10991 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
10993 * commands/ieee1275/suspend.c: New file.
10995 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10997 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
10998 ((unused))' to `__attribute__ ((used))'.
10999 (GRUB_MOD_FINI): Likewise.
11000 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
11001 * genmk.rb (PModule): Assign space to common symbols when linking
11004 2005-01-20 Marco Gerards <metgerards@student.han.nl>
11006 * include/grub/mm.h (grub_mm_init_region): Change the type of the
11007 `unsigned' arguments to `grub_size_t'.
11008 (grub_malloc): Likewise.
11009 (grub_realloc): Likewise.
11010 (grub_memalign): Likewise.
11011 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
11012 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
11013 * util/misc.c (grub_malloc): Likewise.
11014 (grub_realloc): Likewise.
11015 * kern/mm.c (get_header_from_pointer): Change the casts to
11016 `unsigned' into a cast to `grub_size_t'.
11018 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
11019 point to `currnode' when `currnode' is changed.
11021 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
11022 Schottelius <nico-linux@schottelius.org>.
11024 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
11026 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
11027 (note_path): Remove variable.
11028 (GRUB_IEEE1275_NOTE_NAME): New macro.
11029 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
11030 (grub_ieee1275_note_hdr): New structure.
11031 (grub_ieee1275_note_desc): Likewise.
11032 (grub_ieee1275_note): Likewise.
11033 (load_note): Remove `dir' argument. All callers updated. Remove
11034 `note_img' and `path'. Do not load a file from `note_path'.
11035 Initialize a struct grub_ieee1275_note and write that to `out'.
11036 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
11038 2005-01-05 Marco Gerards <metgerards@student.han.nl>
11040 * util/misc.c (grub_util_read_image): Revert last change. It
11041 called `grub_util_read_at', which seeks from the beginning of the
11044 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
11046 * TODO: Add note about endianness in grub-mkimage.
11047 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
11049 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
11050 (grub_mkimage_SOURCES): New target.
11051 * include/grub/kernel.h (grub_start_addr): Remove variable.
11052 (grub_end_addr): Likewise.
11053 (grub_total_module_size): Likewise.
11054 (grub_kernel_image_size): Likewise.
11055 (GRUB_MODULE_MAGIC): New constant.
11056 (grub_module_info): New structure.
11057 (grub_arch_modules_addr): New prototype.
11058 (grub_get_end_addr): Remove prototype.
11059 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
11060 * include/grub/powerpc/ieee1275/kernel.h: New file.
11061 * include/grub/util/misc.h (grub_util_get_fp_size): New
11063 (grub_util_read_at): Likewise.
11064 (grub_util_write_image_at): Likewise.
11065 * kern/main.c (grub_get_end_addr): Remove function.
11066 (grub_load_modules): Call grub_arch_modules_addr instead of using
11067 grub_end_addr. Look for a grub_module_info struct in memory. Use
11068 the grub_module_info fields instead of calling grub_get_end_addr
11069 as loop conditions. Move grub_add_unused_region code here.
11070 (grub_add_unused_region): Remove function.
11071 * kern/i386/pc/init.c: Include grub/cache.h.
11072 (grub_machine_init): Remove call to grub_get_end_addr. Remove
11073 one call to add_mem_region.
11074 (grub_arch_modules_addr): New function.
11075 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
11076 (grub_total_module_size): Likewise.
11077 Include grub/machine/kernel.h.
11078 (grub_arch_modules_addr): New function.
11079 * util/grub-emu.c (grub_end_addr): Remove variable.
11080 (grub_total_module_size): Likewise.
11081 (grub_arch_modules_addr): New function.
11082 * util/misc.c: Include unistd.h.
11083 (grub_util_get_fp_size): New function.
11084 (grub_util_read_at): Likewise.
11085 (grub_util_write_image_at): Likewise.
11086 (grub_util_read_image): Call grub_util_read_at.
11087 (grub_util_write_image): Call grub_util_write_image_at.
11088 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
11089 additional memory in kernel_img for a struct grub_module_info.
11090 Fill in that grub_module_info.
11091 * util/powerpc/ieee1275/grub-mkimage.c: New file.
11093 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11095 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
11097 * include/grub/powerpc/ieee1275/ieee1275.h
11098 (grub_ieee1275_milliseconds): New prototype.
11099 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
11101 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
11102 grub_ieee1275_milliseconds.
11104 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
11106 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
11108 (find_options): New function.
11109 (cmain): Call find_options.
11110 * include/grub/powerpc/ieee1275/ieee1275.h
11111 (grub_ieee1275_realmode): New extern variable.
11112 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
11113 grub_map if grub_ieee1275_realmode is false.
11115 2004-12-29 Marco Gerards <metgerards@student.han.nl>
11117 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
11118 lines are inserted and make it work like readline. Reported by
11119 Vincent Pelletier <subdino2004@yahoo.fr>.
11121 2004-12-28 Marco Gerards <metgerards@student.han.nl>
11123 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
11125 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
11126 `kern/powerpc/cache.S'.
11128 2004-12-27 Marco Gerards <metgerards@student.han.nl>
11130 * genmk.rb: Handle the `Program' class in the main loop. Written
11131 by Johan Rydberg <jrydberg@gnu.org>.
11132 (Program): New class.
11133 (programs): New variable.
11134 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
11135 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
11136 instead of "grub/kernel.h". Include <grub/machine/init.h>.
11137 (help_arch): Function removed.
11138 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
11139 `powerpc/libgcc.h' and `loader.h'.
11140 (pkgdata_PROGRAMS): New variable.
11141 (sbin_UTILITIES): Variable removed.
11142 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
11143 (grubof_SOURCES): Variable re-defined so it only includes the
11144 core functionality.
11145 (grubof_CFLAGS): Remove `-DGRUBOF'.
11146 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
11147 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
11148 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
11149 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
11150 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
11151 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
11152 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
11153 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
11154 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
11155 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
11156 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
11157 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
11158 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
11159 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
11160 (pc_mod_CFLAGS): New variables.
11161 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
11162 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
11163 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
11164 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
11166 * include/grub/i386/pc/init.h (grub_os_area_addr)
11167 (rub_os_area_size): ... to here.
11168 * include/grub/powerpc/ieee1275/ieee1275.h
11169 (grub_ieee1275_entry_fn): Export symbol.
11170 * include/grub/powerpc/ieee1275/init.h: New file.
11171 * include/grub/powerpc/libgcc.h: Likewise.
11172 * include/grub/cache.h: Likewise.
11173 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
11174 <hollis@penguinppc.org>.
11175 * kern/dl.c: Include <grub/cache.h>.
11176 (grub_dl_flush_cache): New function.
11177 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
11179 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
11180 (grub_console_init): Removed prototypes.
11181 (grub_machine_init): Don't initialize the modules anymore.
11182 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
11184 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
11185 Macro undef removed.
11186 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
11187 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
11188 relocation `R_PPC_REL32'. Return an error when the relocation is
11190 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
11191 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
11192 * util/misc.c (grub_arch_sync_caches): Likewise.
11194 2004-12-19 Marco Gerards <metgerards@student.han.nl>
11196 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
11197 `symlist.c', add `grubof_symlist.c'.
11198 (symlist.c): Variable removed.
11199 (grubof_HEADERS): Variable added.
11200 (grubof_symlist.c): New target.
11201 (kernel_syms.lst): Use `grubof_HEADERS' instead of
11202 `kernel_img_HEADERS'.
11203 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
11204 * kern/powerpc/dl.c: New file.
11205 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
11207 (grub_arch_dl_relocate_symbols): Likewise.
11208 (grub_register_exported_symbols): Likewise.
11210 2004-12-13 Marco Gerards <metgerards@student.han.nl>
11212 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
11213 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
11214 to fail instead. Reported by Vincent Pelletier
11215 <subdino2004@yahoo.fr>.
11217 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
11218 it is not allocated. Reported by Vincent Pelletier
11219 <subdino2004@yahoo.fr>.
11221 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
11222 output so the output looks better.
11224 2004-12-04 Marco Gerards <metgerards@student.han.nl>
11226 Modulize the partition map support and add support for the amiga
11229 * commands/ls.c: Include <grub/partition.h> instead of
11230 <grub/machine/partition.h>.
11231 * kern/disk.c: Likewise.
11232 * kern/rescue.c: Likewise.
11233 * loader/i386/pc/chainloader.c: Likewise.
11234 * normal/cmdline.c: Likewise.
11235 * kern/powerpc/ieee1275/init.c: Likewise.
11236 (grub_machine_init): Call `grub_pc_partition_map_init',
11237 `grub_amiga_partition_map_init' and
11238 `grub_apple_partition_map_init'.
11239 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
11240 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
11241 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
11242 `partition.h' and `pc_partition.h'.
11243 (grub_setup_SOURCES): Remove
11244 `disk/i386/pc/partition.c'. Add `kern/partition.c',
11245 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11246 (grub_emu_SOURCES): Likewise.
11247 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
11248 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
11249 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
11250 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11251 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
11252 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
11253 (grubof_SOURCES): Likewise.
11254 * disk/i386/pc/partition.c: File removed.
11255 * disk/powerpc/ieee1275/partition.c: Likewise.
11256 * include/grub/powerpc/ieee1275/partition.h: Likewise.
11257 * include/grub/i386/pc/partition.h: Likewise.
11258 * kern/partition.c: New file.
11259 * partmap/amiga.c: Likewise.
11260 * partmap/apple.c: Likewise.
11261 * partmap/pc.c: Likewise.
11262 * include/grub/partition.h: Likewise..
11263 * include/grub/pc_partition.h: Likewise.
11264 * util/grub-emu.c: Include <grub/partition.h> instead of
11265 <grub/machine/partition.h>.
11266 (main): Call `grub_pc_partition_map_init',
11267 `grub_amiga_partition_map_init' and
11268 `grub_apple_partition_map_init' and deinitialize afterwards.
11269 * util/i386/pc/biosdisk.c: Include `#include
11270 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11271 `<grub/machine/partition.h>'.
11272 * util/i386/pc/grub-setup.c: Likewise.
11273 * util/i386/pc/biosdisk.c: Likewise.
11274 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
11275 partition information in case of a PC partition.
11276 * util/i386/pc/grub-setup.c: Include `#include
11277 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
11278 `<grub/machine/partition.h>'.
11279 (setup): Only access the PC specific partition information in case
11282 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
11284 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
11285 (grub_longjmp): Likewise.
11286 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
11288 * normal/powerpc/setjmp.S: New file.
11289 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11290 `normal/powerpc/setjmp.S'.
11291 (grubof_CFLAGS): Add `-DGRUBOF'.
11292 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
11293 [GRUB_UTIL && !GRUBOF].
11295 2004-11-16 Marco Gerards <metgerards@student.han.nl>
11297 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
11298 property named `name'. Correctly handle the error returned by
11299 `grub_ieee1275_finddevice' if a device can not be opened.
11301 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
11303 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
11304 `actual' for negativity.
11305 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
11308 2004-11-01 Marco Gerards <metgerards@student.han.nl>
11310 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
11311 (PAGE_OFFSET): New macro.
11312 (CRTC_ADDR_PORT): Likewise.
11313 (CRTC_DATA_PORT): Likewise.
11314 (START_ADDR_HIGH_REGISTER): Likewise.
11315 (START_ADDR_LOW_REGISTER): Likewise.
11316 (GRAPHICS_ADDR_PORT): Likewise.
11317 (GRAPHICS_DATA_PORT): Likewise.
11318 (READ_MAP_REGISTER): Likewise.
11319 (INPUT_STATUS1_REGISTER): Likewise.
11320 (INPUT_STATUS1_VERTR_BIT): Likewise.
11321 (page): New variable.
11322 (wait_vretrace): New function.
11323 (set_read_map): Likewise.
11324 (set_start_address): Likewise.
11325 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
11327 (check_vga_mem): Take the page into account.
11328 (write_char): Likewise.
11329 (write_cursor): Likewise.
11330 (scroll_up): Likewise. Copy the page to the page that is not
11331 shown and switch between both pages.
11332 (grub_vga_putchar): Fix off by one error.
11333 (grub_vga_cls): Wait for the vertical retrace. Take the page into
11336 2004-11-01 Marco Gerards <metgerards@student.han.nl>
11338 Add support for iso9660 (including rockridge).
11340 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11341 (iso9660_mod_SOURCES): New variable.
11342 (iso9660_mod_CFLAGS): Likewise.
11343 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
11344 * include/grub/fs.h (grub_iso9660_init): New prototype.
11345 * util/grub-emu.c (main): Call `grub_iso9660_init'.
11346 * fs/iso9660.c: New file.
11348 * include/grub/misc.h (grub_strncat): New prototype.
11349 * kern/misc.c (grub_strncat): New function.
11351 * fs/hfs.c (grub_hfs_mount): Translate the error
11352 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
11353 * fs/jfs.c (grub_jfs_mount): Likewise.
11354 * fs/ufs.c (grub_ufs_mount): Likewise.
11356 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
11358 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
11359 which initialized BAT registers.
11360 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
11361 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11363 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
11364 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
11366 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
11367 (grub_mapclaim): Likewise.
11368 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
11369 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
11372 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
11374 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
11375 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
11376 -ffreestanding and -msoft-float.
11378 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
11380 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
11381 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
11382 set in grub_ieee1275_flags.
11384 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
11386 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
11388 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
11389 grub_console_init first.
11390 Change the memory range used for grub_ieee1275_claim and
11391 grub_mm_init_region.
11392 Print an error message if the claim fails.
11393 Include <grub/misc.h>.
11395 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
11397 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
11398 Call grub_children_iterate for device nodes of type `scsi',
11400 (grub_ofdisk_open): Remove manual device alias resolution.
11401 Fix memory leak when device cannot be opened.
11402 * include/grub/powerpc/ieee1275/ieee1275.h
11403 (grub_children_iterate): New prototype.
11404 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
11406 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11407 Return -1 if args.size was -1.
11409 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11411 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
11412 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
11413 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
11414 Open Firmware's memory for it; claim memory from _start to _end.
11415 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
11416 (_end): New extern.
11417 (_start): Zero BSS from __bss_start to _end.
11418 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
11420 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
11422 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
11424 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
11425 -1 if args.base was -1.
11427 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
11429 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
11430 escape sequence instead of a literal ^L. Also call
11431 grub_ofconsole_gotoxy.
11433 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
11435 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
11436 void * arguments to grub_addr_t. All callers updated. Also make
11437 the `result' argument optional.
11438 (grub_ieee1275_release): change void * arguments to grub_addr_t.
11439 All callers updated.
11441 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
11443 * commands/ls.c (grub_ls_list_files): Use the string following the
11444 initial ')', if present, as the filesystem path.
11445 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
11447 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
11449 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
11451 Make the source code of the menu interface more readable.
11453 * normal/menu.c: Include grub/mm.h.
11454 (TERM_WIDTH): New macro.
11455 (TERM_HEIGHT): Likewise.
11456 (TERM_INFO_HEIGHT): Likewise.
11457 (TERM_MARGIN): Likewise.
11458 (TERM_SCROLL_WIDTH): Likewise.
11459 (TERM_TOP_BORDER_Y): Likewise.
11460 (TERM_LEFT_BORDER_X): Likewise.
11461 (TERM_BORDER_WIDTH): Likewise.
11462 (TERM_MESSAGE_HEIGHT): Likewise.
11463 (TERM_BORDER_HEIGHT): Likewise.
11464 (TERM_NUM_ENTRIES): Likewise.
11465 (TERM_FIRST_ENTRY_Y): Likewise.
11466 (TERM_ENTRY_WIDTH): Likewise.
11467 (TERM_CURSOR_X): Likewise.
11468 (draw_border): Use macros instead of magic numbers.
11469 (print_entry): Likewise.
11470 (print_entries): Likewise.
11471 (run_menu): Likewise. Also, handle the key 'e'.
11472 (run_menu_entry): Ignore empty command lines.
11473 (print_message): Added a new argument EDIT. If EDIT is true,
11474 print a different message.
11475 (init_page): Likewise.
11476 (edit_menu_entry): New function. Not implemented yet.
11478 2004-09-17 Marco Gerards <metgerards@student.han.nl>
11480 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
11481 can be loaded from normal mode.
11483 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
11485 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
11486 (multiboot_mod_CFLAGS): New variables.
11487 * loader/i386/pc/linux_normal.c: New file.
11488 * loader/i386/pc/multiboot_normal.c: Likewise.
11490 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
11491 attribute `unused'.
11493 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
11494 `fdiro' to read the mode information from instead of `diro'.
11496 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
11497 looking up a symlink.
11499 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
11501 * normal/command.c (grub_command_execute): Don't parse the
11502 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
11503 flags of the command.
11505 * normal/menu.c (grub_menu_run): Fix typo.
11507 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
11509 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
11511 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
11512 `y + 1' instead of `y - 1'.
11514 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
11516 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
11518 From Hollis Blanchard <hollis@penguinppc.org>:
11519 * kern/misc.c (memmove): New alias for grub_memmove.
11520 (memcmp): New alias for grub_memcmp.
11521 (memset): New alias for grub_memset.
11522 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
11523 Change "int handle" to "grub_ieee1275_phandle_t handle".
11524 * include/grub/powerpc/ieee1275/ieee1275.h
11525 (grub_ieee1275_get_property): Likewise.
11527 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
11529 Added normal mode command `chainloader' as module chain.mod, which
11530 depends on normal.mod and _chain.mod.
11532 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
11533 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
11534 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
11536 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
11537 but arguments parsing moved to ...
11538 (grub_chainloader_cmd): ... here. New function.
11539 * include/grub/i386/pc/chainloader.h: New file.
11540 * loader/i386/pc/chainloader_normal.c: Likewise.
11542 2004-09-11 Marco Gerards <metgerards@student.han.nl>
11544 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
11545 (grub_mkimage_LDFLAGS): Likewise.
11546 (grub_emu_SOURCES): Likewise.
11547 (kernel_img_HEADERS): Added fshelp.h.
11548 * fs/ext2.c: Include <grub/fshelp.h>.
11549 (FILETYPE_REG): New macro.
11550 (FILETYPE_INO_REG): Likewise.
11551 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
11553 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
11555 (grub_fshelp_node): New struct.
11556 (grub_ext2_data): Added member `diropen'. Changed member `inode'
11558 (grub_ext2_get_file_block): Removed function.
11559 (grub_ext2_read_block): New function.
11560 (grub_ext2_read_file): Replaced parameter `data' by `node'.
11561 This function was written.
11562 (grub_ext2_mount): Read the root inode. Create a diropen struct.
11563 (grub_ext2_find_file): Removed function.
11564 (grub_ext2_read_symlink): New function.
11565 (grub_ext2_iterate_dir): Likewise.
11566 (grub_ext2_open): Rewritten.
11567 (grub_ext2_dir): Rewritten.
11568 * include/grub/fshelp.h: New file.
11569 * fs/fshelp.c: Likewise.
11571 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
11573 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
11574 (print_message): Add a missing newline.
11575 (run_menu): Added timeout support.
11576 (run_menu_entry): New local function.
11577 (grub_menu_run): Added support for booting.
11579 * kern/loader.c (grub_loader_is_loaded): New function.
11581 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
11582 (grub_get_rtc): Exported.
11584 * include/grub/i386/pc/time.h: Include grub/symbol.h.
11585 (grub_get_rtc): Exported.
11587 * include/grub/normal.h (struct grub_command_list): Remove
11588 constant from the member `command'.
11590 * include/grub/loader.h (grub_loader_is_loaded): Declared.
11592 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
11594 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
11596 2004-08-28 Marco Gerards <metgerards@student.han.nl>
11598 Add support for the JFS filesystem.
11600 * fs/jfs.c: New file.
11601 * include/grub/fs.h (grub_jfs_init): New prototype.
11602 (grub_jfs_fini): New prototype.
11603 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
11604 (grub_emu_SOURCES): Likewise.
11605 (pkgdata_MODULES): Add jfs.mod.
11606 (jfs_mod_SOURCES): New variable.
11607 (jfs_mod_CFLAGS): Likewise.
11608 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
11609 (grubof_SOURCES): Likewise.
11610 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
11612 * fs/fat.c (grub_fat_find_dir): Convert the filename little
11613 endian to the host endian.
11614 (grub_fat_utf16_to_utf8): Move function from there...
11615 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
11616 the endianness of the source string anymore.
11617 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
11619 2004-08-24 Marco Gerards <metgerards@student.han.nl>
11621 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
11622 (grub_boot_fini) [GRUB_UTIL]: Likewise.
11623 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
11624 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
11626 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
11627 (grub_hfs_iterate_dir): Make the function static. Add prototypes
11628 for `node_found' and `it_dir'.
11629 (grub_hfs_dir): Add prototype for `dir_hook'.
11631 * fs/minix.c (grub_minix_get_file_block): Add prototype for
11632 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
11633 and `indir32' to silence a gcc warning.
11635 * include/grub/fs.h (grub_hfs_init): New prototype.
11636 (grub_hfs_fini): Likewise.
11639 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
11641 Each disk device has its own id now. This is useful to make use
11642 of multiple disk devices.
11644 * include/grub/disk.h (grub_disk_dev_id): New enum.
11645 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
11646 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
11648 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
11649 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11651 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
11652 GRUB_DISK_DEVICE_OFDISK_ID as an id.
11654 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
11655 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
11657 * include/grub/disk.h (struct grub_disk_dev): Added a new member
11658 "id" which is used by the cache manager.
11660 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
11663 2004-08-18 Marco Gerards <metgerards@student.han.nl>
11665 * fs/hfs.c: New file.
11666 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
11667 (grub_emu_SOURCES): Likewise.
11668 (pkgdata_MODULES): Add hfs.mod.
11669 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
11670 (grubof_SOURCES): Likewise.
11671 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
11673 * include/grub/misc.h (grub_strncasecmp): Add prototype.
11674 * kern/misc.c (grub_strncasecmp): Add function.
11676 2004-08-14 Marco Gerards <metgerards@student.han.nl>
11678 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
11681 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
11682 (grub_ext2_dir): In case the directory entry type is unknown, read
11685 2004-08-02 Peter Bruin <pjbruin@dds.nl>
11687 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
11688 grub_load_linux instead of grub_rescue_cmd_linux as second
11689 argument of grub_rescue_register_command.
11691 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
11693 2004-07-27 Marco Gerards <metgerards@student.han.nl>
11695 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
11697 * commands/boot.c: Remove the check for `GRUB_UTIL'.
11698 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
11699 `loader/powerpc/ieee1275/linux.c',
11700 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
11701 * include/grub/powerpc/ieee1275/ieee1275.h
11702 (grub_ieee1275_release): New prototype.
11703 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
11704 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
11705 normal, boot, linux and linux_normal.
11706 * loader/powerpc/ieee1275/linux.c: New file.
11707 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11709 2004-07-12 Marco Gerards <metgerards@student.han.nl>
11711 * normal/arg.c (grub_arg_parse): Correct error handling after
11712 reallocating the argumentlist (check if `argl' is not null instead
11713 of checking if `args' is not null).
11714 * kern/mm.c (grub_realloc): Return the same pointer when using the
11715 same region, instead of returning the header address.
11717 2004-07-11 Marco Gerards <metgerards@student.han.nl>
11719 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
11720 one block instead of two when looking for the initial partition.
11721 (grub_partition_probe): Initialize the local variable `p' with 0.
11722 Use base 10 for the grub_strtoul call.
11723 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
11724 need for one local variable.
11725 (grub_strtoul): Don't add the new value to `num', instead of that
11728 2004-07-11 Marco Gerards <metgerards@student.han.nl>
11730 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
11731 (pxeboot_img_SOURCES): New variable.
11732 (pxeboot_img_ASFLAGS): Likewise.
11733 (pxeboot_img_LDFLAGS): Likewise.
11734 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
11735 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
11736 <lode_leroy@hotmail.com>.
11738 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
11740 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
11741 there was no input.
11743 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
11745 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
11746 the history buffer logic.
11748 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
11750 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
11751 (FILETYPE_INO_SYMLINK): New macros.
11752 (grub_ext2_find_file): Check if the node is a directory using the
11753 inode stat information instead of using the filetype in the
11754 dirent. Exclude the first character of an absolute symlink.
11755 (grub_ext2_dir): Mask out the filetype part of the mode member of
11758 2004-05-24 Marco Gerards <metgerards@student.han.nl>
11760 Add support for UFS version 1 and 2. Add support for the minix
11761 filesystem version 1 and 2, both the variants with 14 and 30 long
11764 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
11766 (grub_emu_SOURCES): Likewise.
11767 (pkgdata_MODULES): Add ufs.mod and minix.mod.
11768 (ufs_mod_SOURCES): New variable.
11769 (ufs_mod_CFLAGS): Likewise.
11770 (minix_mod_SOURCES): Likewise.
11771 (minix_mod_CFLAGS): Likewise.
11772 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
11774 (grubof_SOURCES): Likewise.
11775 * fs/ufs.c: New file.
11776 * fs/minix.c: New file.
11777 * include/grub/fs.h (grub_ufs_init): New prototype.
11778 (grub_ufs_fini): Likewise.
11779 (grub_minix_init): Likewise.
11780 (grub_minix_fini): Likewise.
11781 * util/grub-emu.c (main): Initialize and deinitialize UFS and
11784 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
11786 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
11787 commands/ls.c, commands/terminal.c, commands/boot.c,
11788 commands/cmp.c and commands/cat.c.
11789 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
11791 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
11794 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
11796 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
11797 and grub_, respectively. Because the conversion is trivial and
11798 mechanical, I omit the details here. Please refer to the CVS
11799 if you need more information.
11801 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
11803 * include/pupa: Renamed to ...
11804 * include/grub: ... this.
11805 * util/i386/pc/pupa-mkimage.c: Renamed to ...
11806 * util/i386/pc/grub-mkimage.c: ... this.
11807 * util/i386/pc/pupa-setup.c: Renamed to ...
11808 * util/i386/pc/grub-setup.c: ... this.
11809 * util/pupa-emu.c: Renamed to ...
11810 * util/grub-emu.c: ... this.
11812 2004-03-29 Marco Gerards <metgerards@student.han.nl>
11814 Add support for the newworld apple macintosh (PPC). This has been
11815 tested on the powerbook 2000 only. It only adds support for
11816 generic ieee1275 functions, console and disk support. This should
11817 be easy to port to other architectures with support for Open
11820 * configure.ac: Accept the powerpc as host_cpu. In the case of
11821 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
11822 specific tests are only executed while building for the i386.
11823 Inverse test for crosscompile.
11824 * genmk.rb (Utility): Allow assembler files.
11825 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
11826 * conf/powerpc-ieee1275.rmk: New file.
11827 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
11828 * disk/powerpc/ieee1275/partition.c: Likewise.
11829 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
11830 * include/pupa/powerpc/ieee1275/console.h: Likewise.
11831 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
11832 * include/pupa/powerpc/ieee1275/time.h: Likewise.
11833 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
11834 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
11835 * include/pupa/powerpc/ieee1275/loader.h
11836 * include/pupa/powerpc/setjmp.h: Likewise.
11837 * include/pupa/powerpc/types.h: Likewise.
11838 * kern/powerpc/ieee1275/init.c: Likewise.
11839 * kern/powerpc/ieee1275/openfw.c: Likewise.
11840 * term/powerpc/ieee1275/ofconsole.c: Likewise.
11842 These files were written by Johan Rydberg
11843 (jrydberg@night.trouble.net) and I only modified them slightly.
11845 * boot/powerpc/ieee1275/cmain.c: New file.
11846 * boot/powerpc/ieee1275/crt0.S: Likewise.
11847 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
11848 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
11850 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
11852 * Makefile.in: Update copyright.
11853 * genmodsrc.sh: Likewise.
11854 * gensymlist.sh: Likewise.
11855 * term/i386/pc/vga.c: Indent correctly.
11857 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
11858 bugreporting address.
11859 * util/i386/pc/pupa-setup.c (usage): Likewise,
11860 (main): Call pupa_ext2_init and pupa_ext2_fini.
11862 * fs/fat.c (log2): Renamed to ...
11863 (fat_log2): ... this.
11864 All callers changed.
11865 * kern/misc.c (memcpy): Alias to pupa_memmove.
11866 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
11868 * util/console.c (pupa_ncurses_fini): Return 0.
11870 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
11871 Move fail label here.
11872 [__GNU__]: Don't warn when using stat.
11873 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
11874 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
11875 long int. Use strtol instead of strtoul.
11877 2004-03-14 Marco Gerards <metgerards@student.han.nl>
11879 * commands/boot.c: New file.
11880 * commands/cat.c: Likewise.
11881 * commands/cmp.c: Likewise.
11882 * commands/ls.c: Likewise.
11883 * commands/terminal.c: Likewise.
11884 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
11885 (pupa_register_command): Changed interface to match the new
11887 (pupa_command_execute): Changed (almost rewritten) so it uses
11888 pupa_split_command. Added support for setting variables using the
11890 (rescue_command): Changed to work with the new argument parser.
11891 (terminal_command): Moved from here to commands/terminal.c.
11892 (set_command): New function.
11893 (unset_command): New function.
11894 (insmod_command): New function.
11895 (rmmod_command): New function.
11896 (lsmod_command): New function.
11897 (pupa_command_init): Don't initialize the command terminal
11898 anymore. Initialize the commands set, unset, insmod, rmmod and
11900 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
11901 (kernel_img_HEADERS): Add arg.h and env.h.
11902 (pupa_mkimage_LDFLAGS): Add kern/env.c.
11903 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
11904 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
11906 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
11908 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
11909 (boot_mod_SOURCES): New variable.
11910 (terminal_mod_SOURCES): Likewise.
11911 (ls_mod_SOURCES): Likewise.
11912 (cmp_mod_SOURCES): Likewise.
11913 (cat_mod_SOURCES): Likewise.
11915 * normal/arg.c: New file.
11916 * kern/env.c: Likewise.
11917 * include/pupa/arg.h: Likewise.
11918 * include/pupa/env.h: Likewise.
11919 * font/manager.c (font_command): Changed to match argument parsing
11921 (PUPA_MOD_INIT): Likewise.
11922 * hello/hello.c (pupa_cmd_hello): Likewise.
11923 (PUPA_MOD_INIT): Likewise.
11924 * include/pupa/disk.h: Include <pupa/device.h>.
11925 (pupa_print_partinfo): New prototype.
11926 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
11927 (pupa_dl_get_prefix): Likewise.
11928 * include/pupa/misc.h: Include <pupa/err.h>.
11929 (pupa_isgraph): New prototype.
11930 (pupa_isdigit): Likewise.
11931 (pupa_split_cmdline): Likewise.
11932 * include/pupa/normal.h: Include <pupa/arg.h>.
11933 (pupa_command): Changed the prototype of the member `func' to
11934 match the argument parsing interface. Added member `options'.
11935 (pupa_register_command): Updated to match function.
11936 (pupa_arg_parse): New prototype.
11937 (pupa_hello_init) [PUPA_UTIL]: New prototype.
11938 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
11939 (pupa_ls_init) [PUPA_UTIL]: Likewise.
11940 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
11941 (pupa_cat_init) [PUPA_UTIL]: Likewise.
11942 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
11943 (pupa_boot_init) [PUPA_UTIL]: Likewise.
11944 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
11945 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
11946 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
11947 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
11948 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
11949 * kern/disk.c: Include <pupa/file.h>.
11950 (pupa_print_partinfo): New function.
11951 * kern/dl.c: Include <pupa/env.h>.
11952 (pupa_dl_dir): Variable removed.
11953 (pupa_dl_load): Use the environment variable `prefix' instead of
11954 the variable pupa_dl_dir.
11955 (pupa_dl_set_prefix): Function removed.
11956 (pupa_dl_get_prefix): Likewise.
11957 * kern/i386/pc/init.c: Include <pupa/env.h>.
11958 (pupa_machine_init): Use the environment variable `prefix' instead of
11959 using pupa_dl_set_prefix to set the prefix.
11960 * kern/main.c: Include <pupa/env.h>.
11961 (pupa_set_root_dev): Use the environment variable `prefix' instead of
11962 using pupa_dl_get_prefix to get the prefix.
11963 * kern/misc.c: Include <pupa/env.h>.
11964 (pupa_isdigit): New function.
11965 (pupa_isgraph): Likewise.
11966 (pupa_ftoa): Likewise.
11967 (pupa_vsprintf): Added support for printing values of the type
11968 `double'. Make it possible to format variable output when using
11969 formatting like `%1.2%f'.
11970 (pupa_split_cmdline): New function.
11971 * kern/rescue.c: Include <pupa/env.h>.
11972 (next_word): Removed function.
11973 (pupa_rescue_cmd_prefix): Likewise.
11974 (pupa_rescue_cmd_set): New function.
11975 (pupa_rescue_cmd_unset): New function.
11976 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
11977 split the command line instead of splitting it here. Added
11978 support for setting variables using the syntax `foo=bar'. Don't
11979 initialize the prefix command anymore. Initialized the set and
11981 * normal/cmdline.c: Include <pupa/env.h>.
11982 (pupa_tab_complete): Added prototypes for print_simple_completion,
11983 print_partition_completion, add_completion, iterate_commands,
11984 iterate_dev, iterate_part and iterate_dir. Moved code to print
11985 partition information from here to kern/disk.c.
11986 (pupa_cmdline_run): Don't check if the function exists anymore.
11987 * normal/main.c: Include <pupa/env.h>.
11988 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
11989 instead of using pupa_dl_get_prefix to get the prefix.
11990 * term/i386/pc/vga.c: Include <pupa/arg.h>.
11991 (check_vga_mem): Cast pointers to `void *' to silence a gcc
11993 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
11994 (pupa_vga_setcolor): Declare unused variables with `__attribute__
11995 ((unused))' to silence a gcc warning.
11996 (pupa_vga_setcolor): Likewise.
11997 (debug_command): Changed to match argument parsing
11999 * util/pupa-emu.c: Include <pupa/env.h>.
12000 (options): Added 0's for unused fields to silence a gcc warning.
12002 (main): Use the environment variable `prefix' instead of using
12003 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
12004 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
12007 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
12008 * util/misc.c: Include <malloc.h>.
12009 (pupa_malloc): Rewritten so errors are correctly reported.
12010 (pupa_realloc): Likewise.
12011 (pupa_memalign): Likewise.
12012 (pupa_mm_init_region): Declare unused variables with
12013 `__attribute__ ((unused))' to silence a gcc warning.
12014 * normal/i386/setjmp.S: Remove tab at the end of the file to
12015 silence a gcc warning.
12016 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
12017 variables with `__attribute__ ((unused))' to silence a gcc
12019 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
12020 local variable i unsigned to silence a gcc warning.
12022 * kern/term.c: Include <pupa/misc.h>.
12023 (pupa_more_lines): New variable.
12024 (pupa_more): Likewise.
12025 (pupa_putcode): When the pager is active pause at the end of every
12027 (pupa_set_more): New function.
12028 * include/pupa/term.h (pupa_set_more): New prototype.
12031 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
12033 Now this project is GRUB 2 rather than PUPA. The location of
12034 the CVS repository was moved to GRUB's.
12036 * configure.ac: Use bug-grub as the reporting address.
12037 Use GRUB instead of PUPA.
12038 Change the version number to 1.90.
12040 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
12042 * genkernsyms.sh: Updated copyright information.
12043 * genmk.rb: Likewise.
12044 * genmodsrc.sh: Likewise.
12045 * gensymlist.sh: Likewise.
12046 * boot/i386/pc/boot.S: Likewise.
12047 * boot/i386/pc/diskboot.S: Likewise.
12048 * disk/i386/pc/biosdisk.c: Likewise.
12049 * disk/i386/pc/partition.c: Likewise.
12050 * font/manager.c: Likewise.
12051 * fs/ext2.c: Likewise.
12052 * fs/fat.c: Likewise.
12053 * include/pupa/boot.h: Likewise.
12054 * include/pupa/device.h: Likewise.
12055 * include/pupa/disk.h: Likewise.
12056 * include/pupa/dl.h: Likewise.
12057 * include/pupa/elf.h: Likewise.
12058 * include/pupa/err.h: Likewise.
12059 * include/pupa/file.h: Likewise.
12060 * include/pupa/font.h: Likewise.
12061 * include/pupa/fs.h: Likewise.
12062 * include/pupa/kernel.h: Likewise.
12063 * include/pupa/loader.h: Likewise.
12064 * include/pupa/misc.h: Likewise.
12065 * include/pupa/mm.h: Likewise.
12066 * include/pupa/net.h: Likewise.
12067 * include/pupa/normal.h: Likewise.
12068 * include/pupa/rescue.h: Likewise.
12069 * include/pupa/setjmp.h: Likewise.
12070 * include/pupa/symbol.h: Likewise.
12071 * include/pupa/term.h: Likewise.
12072 * include/pupa/types.h: Likewise.
12073 * include/pupa/i386/setjmp.h: Likewise.
12074 * include/pupa/i386/types.h: Likewise.
12075 * include/pupa/i386/pc/biosdisk.h: Likewise.
12076 * include/pupa/i386/pc/boot.h: Likewise.
12077 * include/pupa/i386/pc/console.h: Likewise.
12078 * include/pupa/i386/pc/init.h: Likewise.
12079 * include/pupa/i386/pc/kernel.h: Likewise.
12080 * include/pupa/i386/pc/linux.h: Likewise.
12081 * include/pupa/i386/pc/loader.h: Likewise.
12082 * include/pupa/i386/pc/memory.h: Likewise.
12083 * include/pupa/i386/pc/multiboot.h: Likewise.
12084 * include/pupa/i386/pc/partition.h: Likewise.
12085 * include/pupa/i386/pc/time.h: Likewise.
12086 * include/pupa/i386/pc/vga.h: Likewise.
12087 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
12088 * include/pupa/util/getroot.h: Likewise.
12089 * include/pupa/util/misc.h: Likewise.
12090 * include/pupa/util/resolve.h: Likewise.
12091 * kern/device.c: Likewise.
12092 * kern/disk.c: Likewise.
12093 * kern/dl.c: Likewise.
12094 * kern/err.c: Likewise.
12095 * kern/file.c: Likewise.
12096 * kern/fs.c: Likewise.
12097 * kern/loader.c: Likewise.
12098 * kern/main.c: Likewise.
12099 * kern/misc.c: Likewise.
12100 * kern/mm.c: Likewise.
12101 * kern/rescue.c: Likewise.
12102 * kern/term.c: Likewise.
12103 * kern/i386/dl.c: Likewise.
12104 * kern/i386/pc/init.c: Likewise.
12105 * kern/i386/pc/lzo1x.S: Likewise.
12106 * kern/i386/pc/startup.S: Likewise.
12107 * loader/i386/pc/chainloader.c: Likewise.
12108 * loader/i386/pc/linux.c: Likewise.
12109 * loader/i386/pc/multiboot.c: Likewise.
12110 * normal/cmdline.c: Likewise.
12111 * normal/command.c: Likewise.
12112 * normal/main.c: Likewise.
12113 * normal/menu.c: Likewise.
12114 * normal/i386/setjmp.S: Likewise.
12115 * term/i386/pc/console.c: Likewise.
12116 * term/i386/pc/vga.c: Likewise.
12117 * util/console.c: Likewise.
12118 * util/genmoddep.c: Likewise.
12119 * util/misc.c: Likewise.
12120 * util/pupa-emu.c: Likewise.
12121 * util/resolve.c: Likewise.
12122 * util/unifont2pff.rb: Likewise.
12123 * util/i386/pc/biosdisk.c: Likewise.
12124 * util/i386/pc/getroot.c: Likewise.
12125 * util/i386/pc/pupa-mkimage.c: Likewise.
12126 * util/i386/pc/pupa-setup.c: Likewise.
12128 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
12130 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
12131 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
12132 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
12133 reading and reset it after reading.
12134 (pupa_ext2_close): Return PUPA_ERR_NONE.
12136 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
12138 (struct linux_kernel_header): Add kernel_version and
12140 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
12141 pupa_file_read succeeds.
12142 (pupa_rescue_cmd_initrd): Implement.
12144 2003-12-03 Marco Gerards <metgerards@student.han.nl>
12146 * fs/ext2.c (pupa_ext2_label): New function.
12147 (pupa_ext2_fs): Added label.
12148 * fs/fat.c (pupa_fat_label): New function.
12149 (pupa_fat_fs): Added label.
12150 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
12152 * kern/misc.c (pupa_strndup): New function.
12153 * include/pupa/misc.h (pupa_strndup): New prototype.
12155 * include/pupa/normal.h: Include <pupa/err.h>.
12156 (pupa_set_history): New prototype.
12157 (pupa_iterate_commands): New prototype.
12158 * normal/cmdline.c: Include <pupa/machine/partition.h>,
12159 <pupa/disk.h>, <pupa/file.h>.
12160 (hist_size): New variable.
12161 (hist_lines): Likewise.
12162 (hist_end): Likewise.
12163 (hist_used): Likewise.
12164 (pupa_set_history): New function.
12165 (pupa_history_get): Likewise.
12166 (pupa_history_add): Likewise.
12167 (pupa_history_replace): Likewise.
12168 (pupa_tab_complete): Likewise.
12169 (pupa_cmdline_run): Added tab completion and history buffer. Tab
12170 completion shows partitionnames while completing partitions, this
12171 feature was suggested by Jeff Bailey.
12172 * normal/command.c (pupa_iterate_commands): New function.
12173 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
12174 (pupa_normal_init): Initialize history buffer.
12175 (PUPA_MOD_INIT): Likewise.
12176 (pupa_normal_fini): Free the history buffer.
12177 (PUPA_MOD_FINI): Likewise.
12179 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
12182 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
12183 * configure.ac [i386]: Check for regparam bug.
12184 (NESTED_FUNC_ATTR) [! i386]: Defined.
12186 2003-11-17 Marco Gerards <metgerards@student.han.nl>
12188 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
12189 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
12190 (pupa_emu_SOURCES): New variable.
12191 (pupa_emu_LDFLAGS): Likewise.
12192 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
12193 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
12194 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
12195 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12196 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
12197 (pupa_jmp_buf): New typedef.
12198 (pupa_setjmp) [PUPA_UTIL]: New macro.
12199 (pupa_longjmp) [PUPA_UTIL]: Likewise.
12200 * include/pupa/term.h (struct pupa_term): New member `refresh'.
12201 (pupa_refresh): New prototype.
12202 * include/pupa/util/getroot.h: New file.
12203 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
12205 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
12206 (pupa_rescue_cmd_cat): Likewise.
12207 (pupa_rescue_cmd_ls): Likewise.
12208 (pupa_rescue_cmd_testload): Likewise.
12209 (pupa_rescue_cmd_lsmod): Likewise.
12210 * normal/cmdline.c (pupa_cmdline_get): Likewise.
12211 * normal/menu.c (run_menu): Likewise.
12212 * kern/term.c (pupa_cls): Likewise.
12213 (pupa_refresh): New function.
12214 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
12215 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
12216 * util/console.c: New file.
12218 * util/i386/pc/getroot.c: New file.
12219 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
12220 (pupa_putchar): New function.
12221 (pupa_refresh): Likewise.
12222 (xgetcwd): Function moved to ...
12223 (strip_extra_slashes): Likewise.
12224 (get_prefix): Likewise.
12225 * util/i386/pc/getroot.c: ... here.
12226 (find_root_device): Function moved and renamed to...
12227 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
12228 Changed all callers.
12229 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
12231 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
12232 Changed all callers.
12233 * util/misc.c (pupa_memalign): New function.
12234 (pupa_mm_init_region): Likewise.
12235 (pupa_register_exported_symbols): Likewise.
12236 (pupa_putchar): Function removed.
12237 * util/pupa-emu.c: New file.
12239 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
12241 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
12242 (_multiboot_mod_SOURCES): New variable.
12243 (_multiboot_mod_CFLAGS): Likewise.
12244 * loader/i386/pc/multiboot.c: New file.
12245 * include/pupa/i386/pc/multiboot.h: Likewise.
12246 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
12247 (pupa_multiboot_real_boot): New function.
12248 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
12249 (pupa_multiboot_real_boot): New prototype.
12250 (pupa_rescue_cmd_multiboot): Likewise
12251 (pupa_rescue_cmd_module): Likewise.
12253 * kern/loader.c (pupa_loader_set): Continue when
12254 pupa_loader_unload_func() fails.
12255 (pupa_loader_unset): New function.
12256 * include/pupa/loader.h (pupa_loader_unset): New prototype.
12258 * kern/misc.c (pupa_stpcpy): New function.
12259 * include/pupa/misc.h (pupa_stpcpy): New prototype.
12261 2003-11-12 Marco Gerards <metgerards@student.han.nl>
12263 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
12264 for available extensions.
12266 * include/pupa/i386/pc/time.h: New file.
12267 * kern/disk.c: Include <pupa/machine/time.h>.
12268 (PUPA_CACHE_TIMEOUT): New macro.
12269 (pupa_last_time): New variable.
12270 (pupa_disk_open): Flush the cache when there was a timeout.
12271 (pupa_disk_close): Reset the timer.
12272 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
12274 * util/misc.c: Include <sys/times.h>
12275 (pupa_get_rtc): New function.
12277 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
12279 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
12281 (pupa_ext2_get_file_block): Use blocks member.
12283 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
12284 first block. Return -1 instead of pupa_errno on error.
12286 2003-10-27 Marco Gerards <metgerards@student.han.nl>
12288 * README: In the pupa-mkimage example use _chain instead of chain
12289 and ext2 instead of fat.
12290 * TODO: Replace ext2fs with jfs as an example. Add an item for
12291 adding journal playback for ext2fs.
12292 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
12293 (pkgdata_MODULES): Added ext2.mod.
12294 (ext2_mod_SOURCES): New variable.
12295 (ext2_mod_CFLAGS): Likewise.
12296 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
12297 * include/pupa/misc.h (pupa_strncpy): New prototype.
12298 (pupa_strcat): Likewise.
12299 (pupa_strncmp): Likewise.
12300 * kern/misc.c (pupa_strcat): Enable function.
12301 (pupa_strncpy): New function.
12302 (pupa_strncmp): Likewise.
12303 * fs/ext2.c: New file.
12305 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
12306 when the read failed before retrying.
12307 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
12308 (_FILE_OFFSET_BITS): Likewise.
12309 * configure.ac: Added AC_SYS_LARGEFILE.
12311 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
12313 * genmk.rb (PModule#rule): Make sure to get only symbol names
12314 from the output of nm.
12315 Reported by Robert Millan <zeratul2@wanadoo.es>.
12317 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
12319 I forgot to check in these changes for a long time. This adds
12320 incomplete support for VGA console, and this is still very
12321 buggy. Also, a lot of consideration is required for I18N,
12322 UNICODE, and VGA font issues. Therefore, assume that this is
12323 such that "better than nothing".
12325 * font/manager.c: New file.
12326 * include/pupa/font.h: Likewise.
12327 * include/pupa/i386/pc/vga.h: Likewise.
12328 * term/i386/pc/vga.c: Likewise.
12329 * util/unifont2pff.rb: Likewise.
12331 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
12332 (pkgdata_MODULES): Added vga.mod and font.mod.
12333 (vga_mod_SOURCES): New variables.
12334 (vga_mod_CFLAGS): Likewise.
12335 (font_mod_SOURCES): Likewise.
12336 (font_mod_CFLAGS): Likewise.
12338 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
12340 * include/pupa/term.h: Include pupa/err.h.
12341 (struct pupa_term): Added init and fini.
12342 Changed the argument of putchar to pupa_uint32_t.
12344 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
12345 (pupa_console_real_putchar): New prototype.
12346 (pupa_console_putchar): Removed.
12347 (pupa_console_checkkey): Exported.
12348 (pupa_console_getkey): Likewise.
12350 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
12353 * kern/term.c (pupa_term_set_current): Rewritten.
12354 (pupa_putchar): Likewise.
12355 (pupa_putcode): New function.
12357 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
12358 (pupa_console_real_putchar): ... this.
12359 (pupa_vga_set_mode): New function.
12360 (pupa_vga_get_font): Likewise.
12362 * normal/command.c: Include pupa/term.h.
12363 (terminal_command): New function.
12364 (pupa_command_init): Register the command "terminal".
12366 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
12367 (DISP_UP): Likewise.
12368 (DISP_RIGHT): Likewise.
12369 (DISP_DOWN): Likewise.
12370 (DISP_HLINE): Likewise.
12371 (DISP_VLINE): Likewise.
12372 (DISP_UL): Likewise.
12373 (DISP_UR): Likewise.
12374 (DISP_LL): Likewise.
12375 (DISP_LR): Likewise.
12377 * term/i386/pc/console.c (pupa_console_putchar): New function.
12379 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
12381 * util/resolve.c (pupa_util_resolve_dependencies): BUG
12382 FIX. Reverse the path_list.
12384 * include/pupa/normal.h: Export pupa_register_command and
12385 pupa_unregister_command.
12387 * hello/hello.c (pupa_cmd_hello): New module.
12388 * conf/i386-pc.rmk: Added hello.mod.
12390 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
12392 * kern/i386/pc/lzo1x.S: New file.
12394 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
12395 (compress_kernel): New variable.
12396 (generate_image): Heavily modified to support compressing a
12397 large part of the core image.
12399 * util/misc.c (pupa_util_read_image): Fix a file descriptor
12401 (pupa_util_load_image): New function.
12403 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
12404 (pupa_compressed_size): New variable.
12405 (codestart): Enable Gate A20 here.
12406 Decompress the compressed part of the core image.
12407 Rearrange the code to put functions and variables which are
12408 required for initialization in the non-compressed part.
12411 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
12414 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
12416 * include/pupa/i386/pc/kernel.h
12417 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
12418 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
12419 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12420 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12421 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
12423 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
12425 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
12426 (Utility#rule): Likewise.
12428 * configure.ac: Check if LZO is available.
12430 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
12432 * include/pupa/normal.h: New file.
12433 * include/pupa/setjmp.h: Likewise.
12434 * include/pupa/i386/setjmp.h: Likewise.
12435 * normal/cmdline.c: Likewise.
12436 * normal/command.c: Likewise.
12437 * normal/main.c: Likewise.
12438 * normal/menu.c: Likewise.
12439 * normal/i386/setjmp.S: Likewise.
12441 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
12442 (pupa_rescue_cmd_initrd): Likewise.
12444 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
12447 * kern/i386/pc/startup.S (translation_table): New variable.
12448 (translate_keycode): New function.
12449 (pupa_console_getkey): Call translate_keycode.
12451 * kern/rescue.c (attempt_normal_mode): New function.
12452 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
12453 it failed, print a message.
12455 * kern/mm.c (pupa_real_malloc): Print more information when a
12456 free magic is broken.
12457 (pupa_free): If the first free header is not free actually, set
12460 * kern/main.c (pupa_load_normal_mode): Just load the module
12462 (pupa_main): Don't print the message
12463 "Entering into rescue mode..." here.
12465 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
12467 (pupa_rescue_cmd_initrd): Likewise.
12468 (pupa_rescue_cmd_initrd): Likewise.
12470 * include/pupa/symbol.h (FUNCTION): Specify the type.
12471 (VARIABLE): Likewise.
12473 * include/pupa/err.h (pupa_err_t): Added
12474 PUPA_ERR_UNKNOWN_COMMAND.
12476 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
12477 (pupa_dl_get_prefix): Likewise.
12479 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
12480 Added _chain.mod and _linux.mod instead of chain.mod and
12482 (chain_mod_SOURCES): Renamed to ...
12483 (_chain_mod_SOURCES): ... this.
12484 (chain_mod_CFLAGS): Renamed to ...
12485 (_chain_mod_CFLAGS): ... this.
12486 (linux_mod_SOURCES): Renamed to ...
12487 (_linux_mod_SOURCES): ... this.
12488 (linux_mod_CFLAGS): Renamed to ...
12489 (_linux_mod_CFLAGS): ... this.
12490 (normal_mod_SOURCES): New variable.
12491 (normal_mod_CFLAGS): Likewise.
12492 (normal_mod_ASFLAGS): Likewise.
12494 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
12496 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
12499 * kern/dl.c (pupa_dl_ref): Refer depending modules
12501 (pupa_dl_unref): Unrefer depending modules recursively.
12502 Don't call pupa_dl_unload implicitly, because PUPA can crash if
12503 a module is unloaded before one depending on that module is
12505 (pupa_dl_unload): Unload depending modules explicitly,
12508 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
12510 * include/pupa/i386/pc/linux.h: New file.
12511 * loader/i386/pc/linux.c: Likewise.
12513 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
12515 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
12516 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
12517 of PUPA_CHAINLOADER_BOOT_SECTOR.
12519 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
12520 (pupa_linux_prot_size): New variable.
12521 (pupa_linux_tmp_addr): Likewise.
12522 (pupa_linux_real_addr): Likewise.
12523 (pupa_linux_boot_zimage): New function.
12524 (pupa_linux_boot_bzimage): Likewise.
12526 * kern/i386/pc/init.c (struct mem_region): New structure.
12527 (MAX_REGIONS): New macro.
12528 (mem_regions): New variable.
12529 (num_regions): Likewise.
12530 (pupa_os_area_addr): Likewise.
12531 (pupa_os_area_size): Likewise.
12532 (pupa_lower_mem): Likewise.
12533 (pupa_upper_mem): Likewise.
12534 (add_mem_region): New function.
12535 (compact_mem_regions): Likewise.
12536 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
12537 the size of the conventional memory and that of so-called upper
12538 memory (before the first memory hole).
12539 Instead of adding each found region to free memory, use
12540 add_mem_region and add them after removing overlaps.
12541 Also, add only 1/4 of the upper memory to free memory. The rest
12542 is used for loading OS images. Maybe this is ad hoc, but this
12543 makes it much easier to relocate OS images when booting.
12545 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
12546 (pupa_enter_rescue_mode): Don't register initrd and module.
12548 * kern/mm.c: Include pupa/dl.h.
12550 * kern/main.c: Include pupa/file.h and pupa/device.h.
12552 * kern/loader.c (pupa_loader_load_module_func): Removed.
12553 (pupa_loader_load_module): Likewise.
12555 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
12558 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
12559 (pupa_linux_tmp_addr): Likewise.
12560 (pupa_linux_real_addr): Likewise.
12561 (pupa_linux_boot_zimage): Likewise.
12562 (pupa_linux_boot_bzimage): Likewise.
12564 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
12565 (pupa_upper_mem): Likewise.
12566 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
12567 module is too dangerous.
12569 * include/pupa/loader.h (pupa_os_area_addr): Declared.
12570 (pupa_os_area_size): Likewise.
12571 (pupa_loader_set): Remove the first argument. Loader doesn't
12572 manage modules or initrd any longer.
12573 (pupa_loader_load_module): Removed.
12575 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
12576 (linux_mod_SOURCES): New variable.
12577 (linux_mod_CFLAGS): Likewise.
12579 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
12581 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
12582 the length of a blocklist correctly.
12584 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
12585 Use ioctl only if the OS file is a block device.
12586 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
12587 not very useful for normal files.
12589 * kern/main.c (pupa_set_root_dev): New function.
12590 (pupa_load_normal_mode): Likewise.
12591 (pupa_main): Call those above.
12593 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
12596 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
12598 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
12600 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
12601 (setup): Configure the installed partition information and the
12604 * loader/i386/pc/chainloader.c (my_mod): New variable.
12605 (pupa_chainloader_unload): New function.
12606 (pupa_rescue_cmd_chainloader): Refer itself.
12607 (PUPA_MOD_INIT): Save its own module in MY_MOD.
12609 * kern/i386/pc/startup.S (install_partition): Removed.
12610 (version_string): Likewise.
12611 (config_file): Likewise.
12612 (pupa_install_dos_part): New variable.
12613 (pupa_install_bsd_part): Likewise.
12614 (pupa_prefix): Likewise.
12615 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
12617 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
12619 (make_install_device): New function.
12620 (pupa_machine_init): Set the dl prefix.
12622 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
12623 (buf): Renamed to ...
12624 (linebuf): ... this.
12625 (pupa_rescue_cmd_prefix): New function.
12626 (pupa_rescue_cmd_insmod): Likewise.
12627 (pupa_rescue_cmd_rmmod): Likewise.
12628 (pupa_rescue_cmd_lsmod): Likewise.
12629 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
12632 * kern/mm.c (pupa_memalign): If failed even after invalidating
12633 disk caches, unload unneeded modules and retry.
12635 * kern/misc.c (pupa_memmove): New function.
12636 (pupa_memcpy): Removed.
12637 (pupa_strcpy): New function.
12638 (pupa_itoa): Made static.
12640 * kern/dl.c (pupa_dl_iterate): New function.
12641 (pupa_dl_ref): Likewise.
12642 (pupa_dl_unref): Likewise.
12643 (pupa_dl_unload): Return if succeeded or not.
12644 (pupa_dl_unload_unneeded): New function.
12645 (pupa_dl_unload_all): Likewise.
12646 (pupa_dl_init): Renamed to ...
12647 (pupa_dl_set_prefix): ... this.
12648 (pupa_dl_get_prefix): New function.
12650 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
12651 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
12652 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
12653 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
12654 (pupa_install_dos_part): Declared.
12655 (pupa_install_bsd_part): Likewise.
12656 (pupa_prefix): Likewise.
12657 (pupa_boot_drive): Likewise.
12659 * include/pupa/types.h: Fix a typo.
12661 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
12663 (pupa_memmove): Declared.
12664 (pupa_strcpy): Likewise.
12666 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
12667 pupa_mod_init takes one argument, its own module.
12668 (pupa_dl_unload_unneeded): Declared.
12669 (pupa_dl_unload_all): Likewise.
12670 (pupa_dl_ref): Likewise.
12671 (pupa_dl_unref): Likewise.
12672 (pupa_dl_iterate): Likewise.
12673 (pupa_dl_init): Renamed to ...
12674 (pupa_dl_set_prefix): ... this.
12675 (pupa_dl_get_prefix): Declared.
12677 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
12678 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
12680 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
12681 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
12683 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
12684 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
12686 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
12688 * util/i386/pc/pupa-setup.c (setup): Define the internal
12689 function find_first_partition_start at the top level, because GCC
12690 3.0.x cannot compile internal functions in deeper scopes
12692 (find_root_device): Use lstat instead of stat.
12693 Don't follow symbolic links.
12694 Fix the path-constructing code.
12696 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
12697 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
12698 by a BLKGETSIZE ioctl first, because block devices don't fill
12699 the member st_mode of the structure stat on Linux.
12700 [__linux__] (linux_find_partition): Use a temporary buffer
12701 REAL_DEV for the working space. Copy it to DEV before returning.
12702 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
12703 buffer cache consistent.
12704 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
12705 strncmp. The previous value was merely wrong.
12706 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
12708 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
12709 FAT size is 12. The previous value was merely wrong.
12711 * kern/main.c (pupa_main): Don't split the starting message from
12714 * kern/term.c (pupa_putchar): Put CR after LF instead of before
12715 LF, because BIOS goes crazy about character attributes in this
12718 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
12720 * include/i386/pc/util/biosdisk.h: New file.
12721 * util/i386/pc/biosdisk.c: Likewise.
12722 * util/i386/pc/pupa-setup.c: Likewise.
12724 * Makefile.in (INCLUDE_DISTFILES): Added
12725 include/pupa/i386/pc/util/biosdisk.h.
12726 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
12727 directory util/i386/pc.
12728 (install-local): Added a rule for sbin_UTILITIES.
12729 (uninstall): Likewise.
12731 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
12733 * util/misc.c (xrealloc): New function.
12734 (pupa_malloc): Likewise.
12735 (pupa_free): Likewise.
12736 (pupa_realloc): Likewise.
12737 (pupa_stop): Likewise.
12738 (pupa_putchar): Likewise.
12740 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
12742 * include/pupa/util/misc.h (xrealloc): Declared.
12744 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
12746 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
12747 (PUPA_BOOT_MACHINE_BPB_END): ... this.
12749 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
12750 [PUPA_UTIL] (pupa_fat_fini): Likewise.
12752 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
12753 way should be implemented.
12754 [PUPA_UTIL] (pupa_fat_fini): Likewise.
12756 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
12757 the size of NAME for safety.
12758 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
12761 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
12762 (pupa_setup_SOURCES): Likewise.
12764 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
12766 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
12768 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
12769 bunch of pushl's from pusha, because this destroys the return
12772 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
12774 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
12775 This means that any missing prototypes could be fatal. Also, you
12776 must take care when writing assembly code. See the comments at
12777 the beginning of startup.S, for more details.
12779 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
12780 compilation mechanism.
12781 (pupa_chainloader_real_boot): Likewise.
12782 (pupa_biosdisk_rw_int13_extensions): Likewise.
12783 (pupa_biosdisk_rw_standard): Likewise.
12784 (pupa_biosdisk_check_int13_extensions): Likewise.
12785 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
12786 (pupa_biosdisk_get_diskinfo_standard): Likewise.
12787 (pupa_get_memsize): Likewise.
12788 (pupa_get_mmap_entry): Likewise.
12789 (pupa_console_putchar): Likewise.
12790 (pupa_console_setcursor): Likewise.
12791 (pupa_getrtsecs): Use pushl instead of push.
12793 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
12794 memory instead of the stack for a mmap entry, because some
12795 BIOSes may ignore the maximum size and overflow.
12797 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
12799 * genmk.rb (PModule#rule): Compile automatically generated
12800 sources with module-specific CFLAGS as well as other sources.
12802 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
12804 * configure.ac: Check ld.
12805 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
12806 respectively, before checking endianness and sizes.
12808 * Makefile.in (LD): New variable.
12810 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
12812 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
12814 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
12816 * Changelog: New file.