1 2008-01-30 Robert Millan <rmh@aybabtu.com>
3 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
4 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
5 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
6 (grub_probe_SOURCES): ... to here.
8 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
10 * conf/i386-ieee1275.rmk: Likewise.
11 * conf/i386-linuxbios.rmk: Likewise.
12 * conf/powerpc-ieee1275.rmk: Likewise.
14 2008-01-30 Tristan Gingold <gingold@free.fr>
16 * kern/rescue.c: Silently accept empty lines.
18 2008-01-29 Bean <bean123ch@gmail.com>
20 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
21 (real_code_2): Code cleanup and change comment style.
22 (move_memory): Avoid using 32-bit address mode.
24 2008-01-29 Bean <bean123ch@gmail.com>
26 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
27 (png_mod_SOURCES): New variable.
28 (png_mod_CFLAGS): Likewise.
29 (png_mod_LDFLAGS): Likewise.
31 * video/readers/png.c: New file.
33 2008-01-28 Robert Millan <rmh@aybabtu.com>
35 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
36 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
37 `ifndef GRUB_MOD_GAP' hack.
38 * util/elf/grub-mkimage.c (add_segments): Likewise.
40 2008-01-27 Robert Millan <rmh@aybabtu.com>
42 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
43 `GRUB_MOD_GAP' for platforms in which it's not defined.
44 * util/elf/grub-mkimage.c (add_segments): Likewise.
46 2008-01-27 Robert Millan <rmh@aybabtu.com>
48 Get grub-emu to build again (including parallel builds).
50 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
52 (util/grub-emu.c_DEPENDENCIES): ... this, ...
53 (normal/execute.c_DEPENDENCIES): ... this, ...
54 (grub-emu_DEPENDENCIES): ... and this.
56 * conf/i386-efi.rmk: Likewise.
57 * conf/i386-linuxbios.rmk: Likewise.
58 * conf/i386-ieee1275.rmk: Likewise.
59 * conf/powerpc-ieee1275.rmk: Likewise.
60 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
62 2008-01-27 Robert Millan <rmh@aybabtu.com>
64 * NEWS: Add a few items.
66 2008-01-27 Robert Millan <rmh@aybabtu.com>
68 Fix parallel builds with grub-emu. Based on earlier commit for
69 grub-probe and grub-setup.
71 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
72 (util/grub-emu.c_DEPENDENCIES): ... this.
73 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
74 (util/grub-emu.c_DEPENDENCIES): ... this.
75 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
76 (util/grub-emu.c_DEPENDENCIES): ... this.
77 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
78 (util/grub-emu.c_DEPENDENCIES): ... this.
79 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
80 (util/grub-emu.c_DEPENDENCIES): ... this.
82 2008-01-27 Pavel Roskin <proski@gnu.org>
84 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
85 to create a gap between _end and the modules added to the image
86 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
87 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
88 * util/elf/grub-mkimage.c (add_segments): Likewise.
90 2008-01-26 Pavel Roskin <proski@gnu.org>
92 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
95 2008-01-26 Bean <bean123ch@gmail.com>
97 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
98 (grub_reiserfs_get_item): Save offset of the next item.
99 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
101 2008-01-25 Robert Millan <rmh@aybabtu.com>
103 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
104 make all filesystem sources appear together (possibly fixing omissions
106 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
107 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
108 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
109 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
111 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
113 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
114 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
115 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
116 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
118 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
119 (probe): Add a sanity check to make sure of our ability to read
120 requested files when probing for filesystem type.
122 * genmk.rb: Update copyright year (2007).
124 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
125 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
126 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
127 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
128 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
129 : Remove function prototypes.
131 2008-01-25 Robert Millan <rmh@aybabtu.com>
133 Revert my previous commits (based on wrong assumption of how grub_errno
136 * kern/disk.c (grub_disk_open): Stop reseting grub_errno.
137 * kern/file.c (grub_file_open): Likewise.
139 2008-01-24 Pavel Roskin <proski@gnu.org>
141 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
142 that hang if GRUB tries to setup colors.
143 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
144 colors for firmwares that don't support it.
145 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
146 Recognize Open Hack'Ware, set flags to work around its
149 2008-01-24 Robert Millan <rmh@aybabtu.com>
151 * kern/file.c (grub_file_open): Do not account previous failures of
152 unrelated functions when grub_errno is checked for.
153 Reported by Oleg Strikov.
155 2008-01-24 Bean <bean123ch@gmail.com>
157 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
158 (grub_ufs_sblock): New member volume name.
159 (grub_ufs_find_file): Fix string copy bug.
160 (grub_ufs_label): Implement this function properly.
162 * fs/hfs.c (grub_hfs_cnid_type): New enum.
163 (grub_hfs_iterate_records): Use the correct file number for extents
164 and catalog file. Fix problem in next index calculation.
165 (grub_hfs_find_node): Replace recursive function call with loop.
166 (grub_hfs_iterate_dir): Replace recursive function call with loop.
168 2008-01-23 Robert Millan <rmh@aybabtu.com>
170 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
171 `<grub/symbol.h>' and `<grub/multiboot.h>'.
172 (grub_multiboot2_real_boot): New function prototype.
174 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
175 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
177 * kern/i386/ieee1275/init.c (grub_os_area_addr)
178 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
180 2008-01-23 Robert Millan <rmh@aybabtu.com>
182 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
183 #ifdef'ed out grub_printf().
185 2008-01-23 Robert Millan <rmh@aybabtu.com>
187 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
188 grub_dprintf calls, since they make "debug=all" mode unusable.
189 (grub_console_checkkey): Likewise.
191 2008-01-23 Robert Millan <rmh@aybabtu.com>
193 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
194 `term/i386/pc/at_keyboard.c'.
195 (pkglib_MODULES): Add `serial.mod'.
196 (serial_mod_SOURCES): New variable.
197 (serial_mod_CFLAGS): Likewise.
198 (serial_mod_LDFLAGS): Likewise.
200 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
201 `<grub/powerpc/ieee1275/console.h>'.
202 (grub_keyboard_controller_init): New function prototype.
203 (grub_console_checkkey): Likewise.
204 (grub_console_getkey): Likewise.
206 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
209 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
210 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
212 2008-01-23 Robert Millan <rmh@aybabtu.com>
214 * kern/i386/pc/init.c (make_install_device): When memdisk image is
215 present, "(memdisk)/boot/grub" becomes the default prefix.
217 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
218 a memdisk tarball with all the modules. Add --overlay=DIR option that
219 allows users to overlay additional files into the image.
221 2008-01-23 Robert Millan <rmh@aybabtu.com>
223 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
224 and `machine/memory.h'.
225 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
226 (_multiboot_mod_SOURCES): New variable.
227 (_multiboot_mod_CFLAGS): Likewise.
228 (_multiboot_mod_LDFLAGS): Likewise.
229 (multiboot_mod_SOURCES): Likewise.
230 (multiboot_mod_CFLAGS): Likewise.
231 (multiboot_mod_LDFLAGS): Likewise.
233 * include/grub/i386/ieee1275/loader.h: New file.
235 * include/grub/i386/ieee1275/machine.h: Likewise.
237 * include/grub/i386/ieee1275/memory.h: Likewise.
239 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
240 variable declaration.
241 (grub_os_area_size): Likewise.
243 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
244 (grub_lower_mem, grub_upper_mem): New variables.
245 (grub_stop_floppy): New function (just to make
246 grub_multiboot2_real_boot() happy).
248 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
249 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
250 (grub_stop): New function.
251 Include `"../realmode.S"' and `"../loader.S"'.
253 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
254 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
256 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
257 rely on grub_multiboot2_real_boot() for final boot.
259 2008-01-22 Robert Millan <rmh@aybabtu.com>
261 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
262 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
263 device that doesn't look like an SD card.
264 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
265 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
266 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
267 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
270 2008-01-22 Robert Millan <rmh@aybabtu.com>
272 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
273 avoid claiming over our own code.
275 2008-01-22 Bean <bean123ch@gmail.com>
277 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
278 (jpeg_mod_SOURCES): New variable.
279 (jpeg_mod_CFLAGS): Likewise.
280 (jpeg_mod_LDFLAGS): Likewise.
282 * video/readers/jpeg.c : New file.
284 2008-01-22 Bean <bean123ch@gmail.com>
286 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
287 there are no more items.
289 2008-01-21 Robert Millan <rmh@aybabtu.com>
291 * kern/mm.c (grub_mm_init_region): Improve debug message.
293 2008-01-21 Robert Millan <rmh@aybabtu.com>
295 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
296 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
298 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
300 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
301 Indicates start of upper memory.
302 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
303 (generate_image): Abort when image size is big enough to corrupt
306 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
307 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
308 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
309 instead of hardcoding 0xA0000.
310 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
311 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
312 instead of hardcoding 0xA0000.
314 2008-01-21 Robert Millan <rmh@aybabtu.com>
316 * disk/memdisk.c (memdisk_size): New variable.
317 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
319 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
320 image to dynamic memory.
321 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
322 `memdisk_size'. Free memdisk block.
324 2008-01-21 Robert Millan <rmh@aybabtu.com>
326 Fix detection of very small filesystems (like tar).
328 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
329 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
330 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
331 a problem with this disk).
333 2008-01-21 Robert Millan <rmh@aybabtu.com>
335 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
336 on grub_biosdisk_rw_standard() error.
338 2008-01-21 Robert Millan <rmh@aybabtu.com>
340 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
342 * kern/elf.c: Likewise.
343 * kern/ieee1275/ieee1275.c: Likewise.
344 * kern/powerpc/ieee1275/openfw.c: Likewise.
345 * term/ieee1275/ofconsole.c: Likewise.
347 2008-01-21 Robert Millan <rmh@aybabtu.com>
349 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
351 * include/grub/kernel.h (grub_arch_memdisk_addr)
352 (grub_arch_memdisk_size): Moved from here ...
354 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
355 (grub_arch_memdisk_size): ... to here.
357 2008-01-21 Robert Millan <rmh@aybabtu.com>
359 Mostly based on bugfix from Bean.
361 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
362 attribute with hook() parameter.
363 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
365 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
366 attribute with hook() parameter.
367 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
370 2008-01-21 Robert Millan <rmh@aybabtu.com>
372 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
373 (pkglib_MODULES): Add `memdisk.mod'.
374 (memdisk_mod_SOURCES): New variable.
375 (memdisk_mod_CFLAGS): Likewise.
376 (memdisk_mod_LDFLAGS): Likewise.
378 * disk/memdisk.c: New file.
380 * include/grub/disk.h (grub_disk_dev_id): Add
381 `GRUB_DISK_DEVICE_MEMDISK_ID'.
383 * include/grub/i386/pc/kernel.h
384 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
385 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
386 (grub_kernel_image_size): New variable declaration.
387 (grub_total_module_size): Likewise.
388 (grub_memdisk_image_size): Likewise.
390 * include/grub/i386/pc/memory.h
391 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
393 * include/grub/kernel.h: Include `<grub/symbol.h>'.
394 (grub_arch_memdisk_addr): New variable declaration.
395 (grub_arch_memdisk_size): Likewise.
397 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
398 (grub_arch_memdisk_size): Likewise.
400 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
401 (codestart): Replace hardcoded `0x100000' with
402 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
404 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
405 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
406 not NULL, append the contents of the file it refers to, at the end of
407 the compressed kernel image. Initialize `grub_memdisk_image_size'
408 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
409 (options): Add "memdisk"|'m' option.
410 (main): Parse --memdisk|-m option, and pass user-provided path as
411 parameter to generate_image().
413 2008-01-20 Robert Millan <rmh@aybabtu.com>
415 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
416 grub_dprintf() calls from here ...
417 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
419 2008-01-20 Robert Millan <rmh@aybabtu.com>
421 Fix detection of "real mode" when /options/real-mode? doesn't exist.
423 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
425 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
426 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
427 `GRUB_IEEE1275_FLAG_REAL_MODE'.
428 (cmain): Intialize `grub_ieee1275_mmu' (using /chosen/mmu integer
430 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
431 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
433 2008-01-19 Robert Millan <rmh@aybabtu.com>
435 Get rid of confusing function (superceeded by
436 `grub_ieee1275_get_integer_property')
437 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
439 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
441 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
442 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
443 in native endianess from grub_ieee1275_get_integer_property().
445 2008-01-19 Robert Millan <rmh@aybabtu.com>
447 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
448 command after "shut-down", since implementations differ on which
449 the command for halt is.
451 2008-01-19 Robert Millan <rmh@aybabtu.com>
453 * include/grub/i386/linuxbios/console.h: Add header protection.
454 (grub_keyboard_controller_init): New function prototype.
455 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
456 (KEYBOARD_COMMAND_READ): Likewise.
457 (KEYBOARD_COMMAND_WRITE): Likewise.
458 (KEYBOARD_SCANCODE_SET1): Likewise.
459 (grub_keyboard_controller_write): New function.
460 (grub_keyboard_controller_read): Likewise.
461 (grub_keyboard_controller_init): Likewise.
463 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
464 (grub_console_init): On coreboot/LinuxBIOS, call
465 grub_keyboard_controller_init().
467 2008-01-19 Robert Millan <rmh@aybabtu.com>
469 PowerPC changes provided by Pavel Roskin.
471 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
472 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
473 don't rely on cmain() doing it.
474 * kern/i386/ieee1275/startup.S (_start): Store %eax in
475 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
477 2008-01-16 Robert Millan <rmh@aybabtu.com>
479 * include/grub/i386/linuxbios/memory.h
480 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
481 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
482 receive `table_header' as argument. Instead, probe for it in the
483 known memory ranges where it can be present.
484 (grub_available_iterate): Do not pass a fixed `table_header' address
485 to grub_linuxbios_table_iterate().
487 2008-01-15 Robert Millan <rmh@aybabtu.com>
489 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
490 * conf/i386-ieee1275.rmk: New file.
491 * include/grub/i386/ieee1275/console.h: Likewise.
492 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
493 * include/grub/i386/ieee1275/kernel.h: Likewise.
494 * include/grub/i386/ieee1275/time.h: Likewise.
495 * kern/i386/ieee1275/init.c: Likewise.
496 * kern/i386/ieee1275/startup.S: Likewise.
498 2008-01-15 Robert Millan <rmh@aybabtu.com>
500 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
501 when pointers are 32-bit (but still do set it to one when they are
504 2008-01-15 Robert Millan <rmh@aybabtu.com>
506 * include/grub/ieee1275/ieee1275.h
507 (grub_ieee1275_get_integer_property): New function prototype.
509 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
510 (grub_ieee1275_get_integer_property): New function. Wraps around
511 grub_ieee1275_get_property() to handle endianess.
513 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
514 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
516 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
517 (grub_map): Likewise.
518 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
520 2008-01-15 Bean <bean123ch@gmail.com>
522 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
523 (grub_script_execute_cmdline): Reset grub_errno.
525 * normal/main.c (read_config_file): Reset grub_errno.
527 * normal/parse.y (script_init): New.
528 (script): Move function and menuentry here.
530 (command): Add delimiter at the end of command.
531 (commands): Adjust to match the new command.
532 (commandblock): Remove grub_script_lexer_record_start.
533 (menuentry): Add grub_script_lexer_record_start, use the new commands.
534 (if): Use the new commands.
536 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
538 2008-01-15 Robert Millan <rmh@aybabtu.com>
540 * normal/menu.c (run_menu): Move timeout message from here ...
541 (print_timeout): ... to here.
542 (run_menu): Use print_timeout() once during initial draw to print
543 the whole message, and again in every clock tick to update only
544 the number of seconds.
546 2008-01-15 Robert Millan <rmh@aybabtu.com>
548 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
549 actual size of `available' from grub_ieee1275_get_property(), and
550 restrict parsing to that bound.
552 2008-01-15 Christian Franke <franke@computer.org>
554 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
555 (argp_program_version): Remove variable.
556 (argp_program_bug_address): Likewise.
557 (options): Convert from struct argp_option to struct option.
558 (struct arguments): Remove.
560 (usage): New function.
561 (main): Replace struct args members by simple variables.
562 Replace argp_parse() by getopt_long().
563 Add switch to evaluate options.
564 Add missing "(...)" around root_dev in prefix string.
566 2008-01-14 Robert Millan <rmh@aybabtu.com>
568 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
569 for grub_ieee1275_exit(), in order to improve portability.
571 2008-01-14 Robert Millan <rmh@aybabtu.com>
573 * util/grub.d/10_linux.in (prefix): Define.
574 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
576 2008-01-13 Pavel Roskin <proski@gnu.org>
578 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
579 grub_errno if no errors have been detected.
581 2008-01-12 Robert Millan <rmh@aybabtu.com>
583 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
584 (grub_util_get_dev_abstraction): New function prototype.
586 * util/getroot.c: Include `<grub/util/getroot.h>'
587 (grub_util_get_grub_dev): Move detection of abstraction type to ...
588 (grub_util_get_dev_abstraction): ... here (new function).
590 * util/grub-probe.c: Convert PRINT_* to an enum. Add
592 (probe): Probe for abstraction type when requested.
593 (main): Understand `--target=abstraction'.
595 * util/i386/efi/grub-install.in: Add abstraction module to core
596 image when it is found to be necessary.
597 * util/i386/pc/grub-install.in: Likewise.
598 * util/powerpc/ieee1275/grub-install.in: Likewise.
600 * util/update-grub_lib.in (font_path): Return system path without
601 converting to GRUB path.
602 * util/update-grub.in: Convert system path returned by font_path()
603 to a GRUB path. Use `grub-probe -t abstraction' to determine what
604 abstraction module is needed for loading fonts (if any). Export
605 that as `GRUB_PRELOAD_MODULES'.
606 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
609 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
611 Remove some unused code from reiserfs.
613 * fs/reiserfs.c (struct grub_reiserfs_key)
614 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
615 (struct grub_reiserfs_node_body): Removed.
616 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
618 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
620 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
622 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
624 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
626 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
628 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
629 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
630 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
632 2008-01-10 Robert Millan <rmh@aybabtu.com>
634 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
635 Determines if a file is garbage left by packaging systems, etc.
636 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
637 for processing /etc/grub.d scripts.
638 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
639 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
640 as a condition for processing Linux images.
642 2008-01-10 Pavel Roskin <proski@gnu.org>
644 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
645 to compile reiserfs.c on PowerPC.
647 2008-01-10 Robert Millan <rmh@aybabtu.com>
649 * kern/device.c (grub_device_iterate): Do not abort device iteration
650 when one of the devices cannot be opened.
651 * kern/disk.c (grub_disk_open): Do not account previous failures of
652 unrelated functions when grub_errno is checked for.
654 2008-01-08 Robert Millan <rmh@aybabtu.com>
656 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
657 `! grub_linux_is_bzimage', change order of address comparison to make
658 it more intuitive, and improve "too big zImage" error message.
660 2008-01-08 Robert Millan <rmh@aybabtu.com>
662 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
663 `$(update-grub_DATA)'.
664 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
667 2008-01-07 Robert Millan <rmh@aybabtu.com>
669 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
670 which instruction is modified by grub-setup during installation
671 (since it wasn't obvious by only looking at this file).
673 2008-01-07 Robert Millan <rmh@aybabtu.com>
675 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
676 listing actual TODO items.
678 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
680 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
682 (grub_reiserfs_get_key_offset): Likewise.
683 (grub_reiserfs_set_key_offset): Likewise.
684 (grub_reiserfs_set_key_type): Likewise.
685 (grub_reiserfs_iterate_dir): Return 1 if found, otheriwise 0.
687 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
688 better to remove the bitfield version completely.
690 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
692 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
693 allocated from the heap, due to the fshelp implementation.
694 (grub_reiserfs_dir): Free NODE, due to the same reason.
696 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
698 Mostly from Vincent Pelletier:
700 * fs/reiserfs.c: New file.
702 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
703 (reiserfs_mod_SOURCES): New variable.
704 (reiserfs_mod_CFLAGS): Likewise.
705 (reiserfs_mod_LDFLAGS): Likewise.
707 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
708 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
709 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
712 2008-01-06 Robert Millan <rmh@aybabtu.com>
714 * normal/color.c: Remove `<grub/env.h>'.
716 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
718 * include/grub/normal.h: Include <grub/env.h>.
720 2008-01-05 Robert Millan <rmh@aybabtu.com>
722 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
723 usage example with `(hd0,1)'.
724 Reported by Samuel Thibault.
726 2008-01-05 Robert Millan <rmh@aybabtu.com>
728 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
729 (grub_linux_boot_zimage): Rename to ...
730 (grub_linux_boot): ... this.
731 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
732 (grub_linux_boot_zimage): Conditionalize zImage copy.
734 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
735 (grub_linux_boot_bzimage): Remove prototype.
736 (grub_linux_boot_zimage): Rename to ...
737 (grub_linux_boot): ... this.
739 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
740 (grub_linux_boot): Remove function.
742 2008-01-05 Robert Millan <rmh@aybabtu.com>
744 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
745 (grub_env_write_color_highlight): Likewise.
746 (grub_wait_after_message): Likewise.
748 * normal/color.c: New file.
750 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
751 (normal_mod_DEPENDENCIES): Likewise.
753 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
754 (normal_mod_DEPENDENCIES): Likewise.
756 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
757 (normal_mod_DEPENDENCIES): Likewise.
759 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
760 (normal_mod_DEPENDENCIES): Likewise.
762 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
763 for waiting after a message is printed.
764 * normal/main.c (read_config_file): Likewise.
765 (grub_normal_init): Register grub_env_write_color_normal() and
766 grub_env_write_color_highlight() hooks. Mark `color_normal' and
767 `color_highlight' variables as global.
769 * normal/menu.c (grub_wait_after_message): New function.
770 (grub_color_menu_normal): New variable. Replaces ...
771 (GRUB_COLOR_MENU_NORMAL): ... this macro.
772 (grub_color_menu_highlight): New variable. Replaces ...
773 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
774 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
775 `GRUB_TERM_COLOR_STANDARD'.
776 (print_message): Use `grub_setcolorstate' to reload colors. Rename
777 `normal_code' and `highlight_code' to `old_color_normal' and
778 `old_color_highlight', respectively.
779 (grub_menu_init_page): Update colors when drawing the menu, based on
780 `menu_color_normal' and `menu_color_highlight' variables.
781 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
782 a message is printed.
784 2008-01-05 Robert Millan <rmh@aybabtu.com>
786 * kern/env.c (grub_env_context_open): Propagate hooks for global
787 variables to new context.
789 * kern/main.c (grub_set_root_dev): Export `root' variable.
791 2008-01-05 Robert Millan <rmh@aybabtu.com>
793 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
794 discs unconditionaly, since udev and others have options to provide
797 2008-01-05 Robert Millan <rmh@aybabtu.com>
799 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
801 2008-01-04 Christian Franke <franke@computer.org>
803 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
806 2008-01-03 Pavel Roskin <proski@gnu.org>
808 * kern/i386/linuxbios/init.c: Put "void" to all function
809 declarations with no arguments.
810 * kern/powerpc/ieee1275/init.c: Likewise.
811 * term/i386/pc/at_keyboard.c: Likewise.
812 * term/i386/pc/vga_text.c: Likewise.
813 * util/grub-mkdevicemap.c: Likewise.
815 2008-01-02 Robert Millan <rmh@aybabtu.com>
817 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
818 message when loaded image is out of bounds.
819 (grub_multiboot_load_elf64): Likewise.
821 2008-01-02 Pavel Roskin <proski@gnu.org>
823 * util/grub.d/10_linux.in: Try version without ".old" when
824 looking for initrd. It's better to use initrd from the newer
825 kernel of the same version than no initrd at all.
827 2008-01-01 Robert Millan <rmh@aybabtu.com>
829 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
831 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
833 * include/grub/video.h: Added grub_video_unmap_color and
834 grub_video_get_active_render_target.
835 (grub_video_adapter): Added unmap_color and get_active_render_target.
837 * video/video.c: Added grub_video_unmap_color and
838 grub_video_get_active_render_target.
839 (grub_video_get_info): Changed method to accept NULL pointer as an
840 argument to allow detection of active video adapter.
842 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
843 grub_video_vbe_unmap_color_int.
844 Added grub_video_vbe_unmap_color and
845 grub_video_vbe_get_active_render_target.
846 (grub_video_vbe_adapter): Added unmap_color and
847 get_active_render_target.
849 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
850 with grub_video_vbe_unmap_color_int.
852 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
853 (DEFAULT_NORMAL_COLOR): Likewise.
854 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
855 (DEFAULT_FG_COLOR): Removed.
856 (DEFAULT_BG_COLOR): Likewise.
857 (DEFAULT_CURSOR_COLOR): Changed value.
858 (grub_virtual_screen): Added standard_color_setting,
859 normal_color_setting, highlight_color_setting and term_color.
860 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
861 (bitmap_width): Added.
862 (bitmap_height): Likewise.
864 (set_term_color): Likewise.
865 (grub_virtual_screen_setup): Changed to use new terminal coloring
867 (grub_gfxterm_init): Added init for bitmap.
868 (grub_gfxterm_fini): Added destroy for bitmap.
869 (redraw_screen_rect): Updated to use background bitmap and new
871 (scroll_up): Added optimization for case when there is no bitmap.
872 (grub_gfxterm_cls): Fixed to use correct background color.
873 (grub_virtual_screen_setcolorstate): Changed to use new terminal
875 (grub_virtual_screen_setcolor): Likewise.
876 (grub_virtual_screen_getcolor): Added.
877 (grub_gfxterm_background_image_cmd): Likewise.
878 (grub_video_term): Added setcolor and getcolor.
879 (MOD_INIT): Added registration of background_image command.
880 (MOD_TERM): Added unregistration for background_image command.
882 2007-12-30 Pavel Roskin <proski@gnu.org>
884 * loader/multiboot_loader.c: Fix multiboot command
885 unregistration. Fix all typos in the word "multiboot".
887 2007-12-29 Pavel Roskin <proski@gnu.org>
889 * util/grub.d/10_linux.in: Refactor search for initrd. Add
890 support for initrd names used in Fedora.
892 2007-12-26 Bean <bean123ch@gmail.com>
894 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
895 (cpio_mod_SOURCES): New variable.
896 (cpio_mod_CFLAGS): Likewise.
897 (cpio_mod_LDFLAGS): Likewise.
899 * fs/cpio.c: New file.
901 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
903 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
905 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
907 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
909 2007-12-25 Robert Millan <rmh@aybabtu.com>
911 * include/grub/term.h (struct grub_term): Add `getcolor' function.
912 (grub_getcolor): New function.
914 * kern/term.c (grub_getcolor): New function.
915 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
916 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
917 (print_entry): Set normal and highlight colors to
918 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
919 respectively, before printing and restore them to old
921 (grub_menu_init_page): Likewise. Fill an additional colored space
922 that would otherwise be left blank.
924 * term/efi/console.c (grub_console_getcolor): New function.
925 (struct grub_console_term.getcolor): New variable.
926 * term/i386/pc/console.c (grub_console_getcolor): New function.
927 (struct grub_console_term.getcolor): New variable.
928 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
929 (struct grub_console_term.getcolor): New variable.
931 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
932 (struct grub_console_term.setcolor): Remove variable.
933 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
934 (struct grub_console_term.setcolor): Remove variable.
935 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
936 (struct grub_console_term.setcolor): Remove variable.
937 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
938 (struct grub_console_term.setcolor): Remove variable.
940 2007-12-25 Robert Millan <rmh@aybabtu.com>
942 * configure.ac: Search for possible unifont.hex locations, and
943 define UNIFONT_HEX if found.
945 * Makefile.in (UNIFONT_HEX): Define variable.
946 (DATA): Rename to ...
947 (PKGLIB): ... this. Update all users.
948 (PKGDATA): New variable.
949 (pkgdata_IMAGES): Rename to ...
950 (pkglib_IMAGES): ... this. Update all users.
951 (pkgdata_MODULES): Rename to ...
952 (pkglib_MODULES): ... this. Update all users.
953 (pkgdata_PROGRAMS): Rename to ...
954 (pkglib_PROGRAMS): ... this. Update all users.
955 (pkgdata_DATA): Rename to ...
956 (pkglib_DATA): ... this. Update all users.
957 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
958 (unicode.pff, ascii.pff): New rules.
959 (all-local): Add `$(PKGDATA)' dependency.
960 (install-local): Process `$(PKGDATA)'.
962 * util/update-grub_lib.in (font_path): Search for *.pff files in
963 a few more locations, including `${pkgdata}'.
965 2007-12-23 Robert Millan <rmh@aybabtu.com>
967 Patch from Bean <bean123ch@gmail.com>:
968 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
971 2007-12-21 Bean <bean123ch@gmail.com>
973 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
974 (ntfscomp_mod_SOURCES): New variable.
975 (ntfscomp_mod_CFLAGS): Likewise.
976 (ntfscomp_mod_LDFLAGS): Likewise.
978 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
979 (grub_probe_SOURCES): Likewise.
980 (grub_emu_SOURCES): Likewise.
982 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
983 (grub_emu_SOURCES): Likewise.
985 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
986 (grub_emu_SOURCES): Likewise.
988 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
989 (grub_emu_SOURCES): Likewise.
991 * fs/ntfs.c (grub_ntfscomp_func): New variable.
992 (read_run_list): Renamed to grub_ntfs_read_run_list.
993 (decomp_nextvcn): Moved to ntfscomp.c.
994 (decomp_getch): Likewise.
995 (decomp_get16): Likewise.
996 (decomp_block): Likewise.
997 (read_block): Likewise.
998 (read_data): Partially moved to ntfscomp.c.
999 (fixup): Change unsigned to grub_uint16_t.
1000 (read_mft): Change unsigned long to grub_uint32_t.
1001 (read_attr): Likewise.
1002 (read_data): Likewise.
1003 (read_run_data): Likewise.
1004 (read_run_list): Likewise.
1005 (read_mft): Likewise.
1007 * fs/ntfscomp.c: New file.
1009 * include/grub/ntfs.h: New file.
1011 2007-12-16 Robert Millan <rmh@aybabtu.com>
1013 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
1014 IDE disk check, since Linux is known to support 20 IDE disks.
1015 Reported by Colin Watson.
1017 2007-12-15 Bean <bean123ch@gmail.com>
1019 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
1020 (lnxboot_img_SOURCES): New variable.
1021 (lnxboot_img_ASFLAGS): Likewise.
1022 (lnxboot_img_LDFLAGS): Likewise.
1024 * boot/i386/pc/lnxboot.S: New file.
1026 2007-11-24 Pavel Roskin <proski@gnu.org>
1028 * configure.ac: Test if '--build-id=none' is supported by the
1029 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
1030 objcopy to generate incorrect binary files (binutils
1031 2.17.50.0.18-1 as shipped by Fedora 8).
1032 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
1033 linking, so that build ID doesn't break the test.
1035 2007-11-24 Pavel Roskin <proski@gnu.org>
1037 * include/grub/i386/time.h: use "void" in the argument list
1039 * include/grub/powerpc/time.h: Likewise.
1040 * include/grub/sparc64/time.h: Likewise.
1042 2007-11-18 Christian Franke <franke@computer.org>
1044 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
1045 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
1046 This fixes the problem that function keys did not work in grub-emu.
1048 2007-11-18 Christian Franke <franke@computer.org>
1050 * disk/host.c (grub_host_open): Remove attribute unused from
1051 name parameter. Add check for "host". This fixes the problem
1052 that grub-emu does not find partitions.
1054 2007-11-18 Christian Franke <franke@computer.org>
1056 * util/hostfs.c (is_dir): New function.
1057 (grub_hostfs_dir): Handle missing dirent.d_type case.
1058 (grub_hostfs_read): Add missing fseek().
1059 (grub_hostfs_label): Clear label pointer. This fixes a crash
1060 of grub-emu on "ls (host)".
1062 2007-11-18 Christian Franke <franke@computer.org>
1064 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
1065 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
1066 to 64 bit boundary by default.
1068 2007-11-18 Bean <bean123ch@gmail.com>
1070 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
1071 (hexdump_mod_SOURCES): New variable.
1072 (hexdump_mod_CFLAGS): Likewise.
1073 (hexdump_mod_LDFLAGS): Likewise.
1075 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1077 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1079 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1081 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
1083 * include/grub/hexdump.h: New file.
1085 * commands/hexdump.c: New file.
1087 2007-11-10 Robert Millan <rmh@aybabtu.com>
1089 * commands/i386/pc/play.c (beep_off): Switch order of arguments
1090 in grub_outb() calls.
1091 (beep_on): Likewise.
1093 2007-11-10 Christian Franke <franke@computer.org>
1095 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
1096 (grub_menu_run): Likewise.
1098 2007-11-10 Robert Millan <rmh@aybabtu.com>
1100 * include/grub/i386/efi/machine.h: New file.
1101 * include/grub/i386/linuxbios/machine.h: Likewise.
1102 * include/grub/i386/pc/machine.h: Likewise.
1103 * include/grub/powerpc/ieee1275/machine.h: Likewise.
1104 * include/grub/sparc64/ieee1275/machine.h: Likewise.
1106 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
1107 (serial_hw_io_addr): New variable.
1108 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
1109 instead of `(unsigned short *) 0x400'.
1111 2007-11-10 Bean <bean123ch@gmail.com>
1113 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
1115 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
1117 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
1118 (vga_mod_SOURCES): Added.
1119 (vga_mod_CFLAGS): Likewise.
1120 (vga_mod_LDFLAGS): Likewise.
1122 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
1124 (set_map_mask): Likewise.
1125 (set_read_map): Likewise.
1126 (set_read_address): Likewise.
1127 (vga_font): Removed variable.
1128 (get_vga_glyph): Removed function.
1129 (invalidate_char): Likewise.
1130 (write_char): Changed to use grub_font_get_glyph() for font
1132 (grub_vga_putchar): Likewise.
1133 (grub_vga_getcharwidth): Likewise.
1135 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
1137 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
1139 (pxeboot_img_LDFLAGS): Likewise.
1140 (diskboot_img_LDFLAGS): Likewise.
1141 (kernel_img_LDFLAGS): Likewise.
1143 2007-11-06 Robert Millan <rmh@aybabtu.com>
1145 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
1146 in grub_outb() calls.
1147 (serial_hw_init): Likewise.
1149 2007-11-05 Robert Millan <rmh@aybabtu.com>
1151 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
1152 spaces. Skip non-regular files.
1154 2007-11-05 Robert Millan <rmh@aybabtu.com>
1156 * kern/disk.c (grub_disk_firmware_fini)
1157 (grub_disk_firmware_is_tainted): New variables.
1159 * include/grub/disk.h (grub_disk_firmware_fini)
1160 (grub_disk_firmware_is_tainted): Likewise.
1162 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
1163 (grub_disk_biosdisk_fini): ... to here.
1164 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
1165 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
1166 is set. Register grub_disk_biosdisk_fini() in
1167 `grub_disk_firmware_fini'.
1169 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
1170 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
1171 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
1172 to finish existing firmware disk interface.
1174 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
1175 (ata_mod_SOURCES): New variable.
1176 (ata_mod_CFLAGS): Likewise.
1177 (ata_mod_LDFLAGS): Likewise.
1179 2007-11-05 Robert Millan <rmh@aybabtu.com>
1181 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
1182 (grub_ata_wait): Reimplement using grub_millisleep().
1184 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
1185 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
1187 2007-11-03 Marco Gerards <marco@gnu.org>
1189 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
1190 (CRTC_ADDR_PORT): New macro.
1191 (CRTC_DATA_PORT): Likewise.
1192 (CRTC_CURSOR): Likewise.
1193 (CRTC_CURSOR_ADDR_HIGH): Likewise.
1194 (CRTC_CURSOR_ADDR_LOW): Likewise.
1195 (update_cursor): New function.
1196 (grub_console_real_putchar): Call `update_cursor'.
1197 (grub_console_gotoxy): Likewise.
1198 (grub_console_cls): Set the default color when clearing the
1200 (grub_console_setcursor): Implemented.
1202 2007-11-03 Marco Gerards <marco@gnu.org>
1204 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
1206 (grub_ata_pio_write): Likewise.
1208 (grub_atapi_identify): Wait after issuing an ATA command.
1209 (grub_atapi_packet): Likewise.
1210 (grub_ata_identify): Likewise.
1211 (grub_ata_readwrite): Likewise.
1213 2007-11-03 Marco Gerards <marco@gnu.org>
1215 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
1216 (grub_ata_pio_write): Likewise.
1217 (grub_ata_readwrite): Use `grub_error', instead of
1218 returning `grub_errno'.
1220 2007-11-03 Marco Gerards <marco@gnu.org>
1222 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
1223 grub_ata_pio_write once for every single sector, instead of for
1226 2007-10-31 Robert Millan <rmh@aybabtu.com>
1228 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
1230 * conf/i386-linuxbios.rmk: New file.
1232 * kern/i386/pc/hardware.c: Likewise.
1233 * term/i386/pc/at_keyboard.c: Likewise.
1234 * term/i386/pc/vga_text.c: Likewise.
1236 * include/grub/i386/linuxbios/boot.h: Likewise.
1237 * include/grub/i386/linuxbios/console.h: Likewise.
1238 * include/grub/i386/linuxbios/init.h: Likewise.
1239 * include/grub/i386/linuxbios/kernel.h: Likewise.
1240 * include/grub/i386/linuxbios/loader.h: Likewise.
1241 * include/grub/i386/linuxbios/memory.h: Likewise.
1242 * include/grub/i386/linuxbios/serial.h: Likewise.
1243 * include/grub/i386/linuxbios/time.h: Likewise.
1245 * kern/i386/linuxbios/init.c: Likewise.
1246 * kern/i386/linuxbios/startup.S: Likewise.
1247 * kern/i386/linuxbios/table.c: Likewise.
1249 2007-10-31 Marco Gerards <marco@gnu.org>
1251 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
1252 (ata_mod_SOURCES): New variable.
1253 (ata_mod_CFLAGS): Likewise.
1254 (ata_mod_LDFLAGS): Likewise.
1256 * disk/ata.c: New file.
1258 * include/grub/disk.h (grub_disk_dev_id): Add
1259 `GRUB_DISK_DEV_ATA_ID'.
1261 2007-10-31 Robert Millan <rmh@aybabtu.com>
1263 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
1264 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
1266 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
1267 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
1269 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
1272 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
1274 2007-10-27 Robert Millan <rmh@aybabtu.com>
1276 * include/grub/types.h (ULONG_MAX): Define macro.
1278 2007-10-22 Robert Millan <rmh@aybabtu.com>
1280 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
1282 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
1284 2007-10-22 Robert Millan <rmh@aybabtu.com>
1286 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
1287 (pkgdata_MODULES): Add `biosdisk.mod'.
1288 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
1291 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
1292 (grub_biosdisk_init): Replace with ...
1293 (GRUB_MOD_INIT(biosdisk)): ... this.
1294 (grub_biosdisk_fini): Replace with ...
1295 (GRUB_MOD_FINI(biosdisk)): ... this.
1297 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
1298 (grub_machine_init): Remove call to grub_biosdisk_init().
1299 (grub_machine_fini): Remove call to grub_machine_fini().
1301 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
1303 2007-10-22 Robert Millan <rmh@aybabtu.com>
1305 * include/grub/time.h: New file.
1306 * include/grub/i386/time.h: Likewise.
1307 * include/grub/powerpc/time.h: Likewise.
1308 * include/grub/sparc64/time.h: Likewise.
1310 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
1312 (KERNEL_MACHINE_TIME_HEADER): ... this.
1313 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
1315 (KERNEL_MACHINE_TIME_HEADER): ... this.
1316 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
1318 (KERNEL_MACHINE_TIME_HEADER): ... this.
1320 * kern/i386/efi/init.c: Include `<grub/time.h>'.
1321 (grub_millisleep): New function.
1322 * kern/i386/pc/init.c: Include `<grub/time.h>'.
1323 (grub_millisleep): New function.
1324 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
1325 Remove `grub/machine/time.h' include.
1326 (grub_millisleep): New function.
1327 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
1328 Remove `grub/machine/time.h' include.
1329 (grub_millisleep): New function.
1331 * include/grub/misc.h (grub_div_roundup): New function.
1333 * kern/misc.c: Include `<grub/time.h>'.
1334 (grub_millisleep_generic): New function.
1336 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
1338 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
1340 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
1341 `machine/time.h'. Add `time.h'.
1342 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
1344 2007-10-21 Robert Millan <rmh@aybabtu.com>
1346 * include/grub/misc.h (grub_max): New function.
1348 2007-10-21 Robert Millan <rmh@aybabtu.com>
1350 * util/misc.c (grub_util_info): Call fflush() before returning.
1352 2007-10-20 Robert Millan <rmh@aybabtu.com>
1354 * genmk.rb (Image): Copy `extra_flags' from here ...
1355 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
1357 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
1358 to `argc' and `args' arguments.
1360 2007-10-17 Robert Millan <rmh@aybabtu.com>
1362 * kern/i386/loader.S: New file.
1364 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
1365 * kern/i386/loader.S (grub_linux_prot_size)... to here.
1366 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
1367 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
1368 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
1369 * kern/i386/loader.S (grub_linux_real_addr)... to here.
1370 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
1371 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
1372 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
1373 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
1374 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
1375 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
1376 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
1377 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
1379 * kern/i386/realmode.S: New file.
1381 * kern/i386/pc/startup.S (protstack): Moved from here ...
1382 * kern/i386/realmode.S (protstack)... to here.
1383 * kern/i386/pc/startup.S (gdt): Moved from here ...
1384 * kern/i386/realmode.S (gdt)... to here.
1385 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
1386 * kern/i386/realmode.S (prot_to_real)... to here.
1388 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
1389 `kern/i386/realmode.S'.
1391 2007-10-17 Robert Millan <rmh@aybabtu.com>
1393 * include/grub/i386/loader.h: New file.
1395 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
1396 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
1397 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
1398 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
1399 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
1400 * include/grub/i386/loader.h (grub_linux_prot_size)
1401 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
1402 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
1403 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
1404 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
1406 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
1408 2007-10-15 Robert Millan <rmh@aybabtu.com>
1410 * normal/misc.c (grub_normal_print_device_info): Do not probe for
1411 filesystem when dev->disk is unset.
1412 Do probe for filesystem even when dev->disk->has_partitions is set.
1413 In case a filesystem is found, always report it.
1414 In case it isn't, if dev->disk->has_partitions is set, report that
1415 a partition table was found instead of reporting that no filesystem
1416 could be identified.
1418 2007-10-12 Robert Millan <rmh@aybabtu.com>
1420 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
1421 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
1423 * include/grub/types.h (grub_host_to_target16): New macro.
1424 (grub_host_to_target32): Likewise.
1425 (grub_host_to_target64): Likewise.
1426 (grub_target_to_host16): Likewise.
1427 (grub_target_to_host32): Likewise.
1428 (grub_target_to_host64): Likewise.
1430 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
1432 (GRUB_MOD_ALIGN): ...this. Update all users.
1434 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
1435 grub_host_to_target32.
1436 Replace grub_be_to_cpu32 with grub_target_to_host32.
1437 (load_modules): Likewise.
1438 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
1439 Replace grub_be_to_cpu32 with grub_target_to_host32.
1440 Replace grub_cpu_to_be16 with grub_host_to_target16.
1441 Replace grub_cpu_to_be32 grub_host_to_target32.
1443 2007-10-12 Robert Millan <rmh@aybabtu.com>
1445 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
1446 * util/elf/grub-mkimage.c: ... here.
1448 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
1449 `util/powerpc/ieee1275/grub-mkimage.c'.
1451 2007-10-07 Robert Millan <rmh@aybabtu.com>
1453 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
1454 and make it easier to figure out.
1455 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
1456 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
1457 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
1458 leave us with less than HEAP_MIN_SIZE total heap.
1459 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
1461 2007-10-03 Robert Millan <rmh@aybabtu.com>
1463 * include/grub/i386/io.h: New file.
1464 * commands/i386/pc/play.c (inb): Removed.
1466 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
1468 * term/i386/pc/serial.c (inb): Removed.
1470 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
1472 * term/i386/pc/vga.c (inb): Removed.
1474 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
1477 2007-10-02 Robert Millan <rmh@aybabtu.com>
1479 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
1480 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1481 Reported by Marcin Kurek.
1483 2007-09-07 Robert Millan <rmh@aybabtu.com>
1485 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
1486 SmartFirmware version updates (as released by Sven Luther), and avoid
1487 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
1488 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
1491 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
1494 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
1495 when merging two regions.
1497 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
1499 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
1500 * normal/completion.c (grub_normal_do_completion): Likewise.
1501 Reported by Hitoshi Ozeki.
1503 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
1505 Do not use devices at boot in chainloading.
1507 * loader/i386/pc/chainloader.c (boot_drive): New variable.
1508 (boot_part_addr): Likewise.
1509 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
1510 with BOOT_DRIVE and BOOT_PART_ADDR.
1511 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
1512 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
1514 2007-08-29 Robert Millan <rmh@aybabtu.com>
1516 Patch from Simon Peter <dn.tlp@gmx.net>:
1517 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
1518 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
1519 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
1520 util/i386/pc/grub-setup.c_DEPENDENCIES.
1521 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
1522 util/grub-probe.c_DEPENDENCIES.
1523 * conf/powerpc-ieee1275.rmk: Likewise.
1525 2007-08-28 Robert Millan <rmh@aybabtu.com>
1527 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
1528 to tell grub-mkdevicemap how to name devices.
1529 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
1532 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
1533 util/i386/get_disk_name.c.
1534 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
1535 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
1536 util/ieee1275/get_disk_name.c.
1538 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
1540 * DISTLIST: Add util/i386/get_disk_name.c and
1541 util/ieee1275/get_disk_name.c.
1543 * util/grub-mkdevicemap.c: Replace device naming logic with
1544 grub_util_get_disk_name() calls.
1546 2007-08-20 Robert Millan <rmh@aybabtu.com>
1548 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
1549 (so that it works for both plural and singular quantities).
1551 2007-08-05 Robert Millan <rmh@aybabtu.com>
1553 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
1554 so that [xz] isn't taken into account when determining order.
1556 2007-08-02 Marco Gerards <marco@gnu.org>
1558 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
1559 `include/multiboot2.h', `include/grub/elfload.h',
1560 `include/multiboot.h', `include/grub/multiboot.h',
1561 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
1562 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
1563 `kern/elf.c', `loader/multiboot_loader.c',
1564 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
1565 `loader/i386/pc/multiboot2.c',
1566 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
1567 `util/i386/pc/grub-mkrescue.in'. Remove
1568 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
1569 `include/grub/i386/pc/util/biosdisk.h' and
1570 `include/grub/powerpc/ieee1275/multiboot.h'.
1572 2007-08-02 Bean <bean123ch@gmail.com>
1574 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
1575 (ntfs_mod_SOURCES): New variable.
1576 (ntfs_mod_CFLAGS): Likewise.
1577 (ntfs_mod_LDFLAGS): Likewise.
1579 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
1580 (grub_probe_SOURCES): Likewise.
1581 (grub_emu_SOURCES): Likewise.
1583 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
1584 (grub_emu_SOURCES): Likewise.
1586 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
1587 (grub_emu_SOURCES): Likewise.
1589 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
1591 * fs/ntfs.c: New file.
1593 2007-08-02 Bean <bean123ch@gmail.com>
1595 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
1597 * file.h (grub_file): Likewise.
1599 * fshelp.h (grub_fshelp_read_file): Likewise.
1601 * util/i386/pc/grub-setup.c (setup): Likewise.
1602 (save_first_sector): Likewise.
1603 (save_blocklists): Likewise.
1605 * fs/affs.c (grub_affs_read_file): Likewise.
1607 * fs/ext2.c (grub_ext2_read_file): Likewise.
1609 * fs/fat.c (grub_fat_read_data): Likewise.
1611 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
1613 * fs/hfs.c (grub_hfs_read_file): Likewise.
1615 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
1617 * fs/jfs.c (grub_jfs_read_file): Likewise.
1619 * fs/minix.c (grub_minix_read_file): Likewise.
1621 * fs/sfs.c (grub_sfs_read_file): Likewise.
1623 * fs/ufs.c (grub_ufs_read_file): Likewise.
1625 * fs/xfs.c (grub_xfs_read_file): Likewise.
1627 * command/blocklist.c (read_blocklist): Likewise.
1628 (print_blocklist): Likewise.
1630 2007-08-02 Marco Gerards <marco@gnu.org>
1632 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
1635 * disk/host.c: New file.
1637 * util/hostfs.c: Likewise.
1639 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
1640 return `GRUB_ERR_BAD_FS'.
1641 * fs/sfs.c (grub_sfs_mount): Likewise.
1642 * fs/xfs.c (grub_xfs_mount): Likewise.
1644 * include/grub/disk.h (enum grub_disk_dev_id): Add
1645 `GRUB_DISK_DEVICE_HOST_ID'.
1647 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
1649 2007-07-24 Jerone Young <jerone@gmail.com>
1651 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
1652 modules for compilation.
1653 * conf/powerpc-ieee1275.rmk: Likewise.
1655 * include/multiboot.h: Move multiboot definitions to one file. Rename
1656 many definitions to not get grub specific.
1657 * include/multiboot2.h: Create header with multiboot 2 definitions.
1658 * include/grub/multiboot.h: Header for grub specific function
1659 prototypes and definitions.
1660 * include/grub/multiboot2.h: Likewise.
1661 * include/grub/multiboot_loader.h: Likewise.
1662 * include/grub/i386/pc/multiboot.h: Removed.
1663 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
1665 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
1666 and 2 to allow for one multiboot and module commands.
1667 * loader/multiboot2.c: Add multiboot2 functionality.
1668 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
1669 and definition names.
1670 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
1672 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
1673 ieee1275 specific multiboot2 code.
1675 * kern/i386/pc/startup.S: Change headers and definition names for
1676 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
1678 2007-07-22 Robert Millan <rmh@aybabtu.com>
1680 * geninitheader.sh: Process file specified in first parameter rather
1681 than hardcoding grub_modules_init.lst.
1682 * geninit.sh: Likewise. Also, construct header name dynamicaly rather
1683 than hardcoding grub_modules_init.h.
1685 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
1686 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
1687 grub_probe_init.[ch] and grub_setup_init.[ch].
1689 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
1690 grub_modules_init.h with grub_emu_init.h.
1691 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
1692 grub_probe_init.[ch] files.
1693 * conf/i386-efi.rmk: Likewise.
1694 * conf/i386-pc.rmk: Likewise.
1695 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
1696 grub_setup_init.[ch] files.
1698 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
1699 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
1700 to initialize modules rather than a list of hardcoded functions.
1701 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
1702 grub_init_all() to initialize modules rather than a list of hardcoded
1705 2007-07-22 Robert Millan <rmh@aybabtu.com>
1707 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
1708 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
1710 2007-07-22 Robert Millan <rmh@aybabtu.com>
1712 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
1713 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
1714 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
1715 flag when running on SmartFirmware.
1716 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
1717 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
1720 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
1721 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
1722 rather than decreasing it.
1724 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
1725 there's not enough space to do it, fail in the same way as when it
1726 can't be done because there are no partitions.
1728 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
1729 when nvsetenv failed.
1731 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
1733 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
1734 because this rule is automatically generated.
1735 (grub-mkrescue): Removed for the same reason as above.
1737 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
1739 Migrate to GNU General Public License Version 3.
1741 * COPYING: Replaced with the plain text version of GPLv3.
1743 * config.guess: Updated from gnulib.
1744 * config.sub: Likewise.
1746 * geninit.sh: Output a GPLv3 copyright notice.
1747 * geninitheader.sh: Likewise.
1748 * genmodsrc.sh: Likewise.
1749 * gensymlist.sh.in: Likewise.
1751 * boot/i386/pc/boot.S: Upgraded to GPLv3.
1752 * boot/i386/pc/diskboot.S: Likewise.
1753 * boot/i386/pc/pxeboot.S: Likewise.
1754 * commands/blocklist.c: Likewise.
1755 * commands/boot.c: Likewise.
1756 * commands/cat.c: Likewise.
1757 * commands/cmp.c: Likewise.
1758 * commands/configfile.c: Likewise.
1759 * commands/echo.c: Likewise.
1760 * commands/help.c: Likewise.
1761 * commands/ls.c: Likewise.
1762 * commands/search.c: Likewise.
1763 * commands/terminal.c: Likewise.
1764 * commands/test.c: Likewise.
1765 * commands/videotest.c: Likewise.
1766 * commands/i386/cpuid.c: Likewise.
1767 * commands/i386/pc/halt.c: Likewise.
1768 * commands/i386/pc/play.c: Likewise.
1769 * commands/i386/pc/reboot.c: Likewise.
1770 * commands/i386/pc/vbeinfo.c: Likewise.
1771 * commands/i386/pc/vbetest.c: Likewise.
1772 * commands/ieee1275/halt.c: Likewise.
1773 * commands/ieee1275/reboot.c: Likewise.
1774 * commands/ieee1275/suspend.c: Likewise.
1775 * disk/loopback.c: Likewise.
1776 * disk/lvm.c: Likewise.
1777 * disk/raid.c: Likewise.
1778 * disk/efi/efidisk.c: Likewise.
1779 * disk/i386/pc/biosdisk.c: Likewise.
1780 * disk/ieee1275/ofdisk.c: Likewise.
1781 * font/manager.c: Likewise.
1782 * fs/affs.c: Likewise.
1783 * fs/ext2.c: Likewise.
1784 * fs/fat.c: Likewise.
1785 * fs/fshelp.c: Likewise.
1786 * fs/hfs.c: Likewise.
1787 * fs/hfsplus.c: Likewise.
1788 * fs/iso9660.c: Likewise.
1789 * fs/jfs.c: Likewise.
1790 * fs/minix.c: Likewise.
1791 * fs/sfs.c: Likewise.
1792 * fs/ufs.c: Likewise.
1793 * fs/xfs.c: Likewise.
1794 * hello/hello.c: Likewise.
1795 * include/grub/acorn_filecore.h: Likewise.
1796 * include/grub/arg.h: Likewise.
1797 * include/grub/bitmap.h: Likewise.
1798 * include/grub/boot.h: Likewise.
1799 * include/grub/cache.h: Likewise.
1800 * include/grub/device.h: Likewise.
1801 * include/grub/disk.h: Likewise.
1802 * include/grub/dl.h: Likewise.
1803 * include/grub/elfload.h: Likewise.
1804 * include/grub/env.h: Likewise.
1805 * include/grub/err.h: Likewise.
1806 * include/grub/file.h: Likewise.
1807 * include/grub/font.h: Likewise.
1808 * include/grub/fs.h: Likewise.
1809 * include/grub/fshelp.h: Likewise.
1810 * include/grub/gzio.h: Likewise.
1811 * include/grub/hfs.h: Likewise.
1812 * include/grub/kernel.h: Likewise.
1813 * include/grub/loader.h: Likewise.
1814 * include/grub/lvm.h: Likewise.
1815 * include/grub/misc.h: Likewise.
1816 * include/grub/mm.h: Likewise.
1817 * include/grub/net.h: Likewise.
1818 * include/grub/normal.h: Likewise.
1819 * include/grub/parser.h: Likewise.
1820 * include/grub/partition.h: Likewise.
1821 * include/grub/pc_partition.h: Likewise.
1822 * include/grub/raid.h: Likewise.
1823 * include/grub/rescue.h: Likewise.
1824 * include/grub/script.h: Likewise.
1825 * include/grub/setjmp.h: Likewise.
1826 * include/grub/symbol.h: Likewise.
1827 * include/grub/term.h: Likewise.
1828 * include/grub/terminfo.h: Likewise.
1829 * include/grub/tparm.h: Likewise.
1830 * include/grub/types.h: Likewise.
1831 * include/grub/video.h: Likewise.
1832 * include/grub/efi/api.h: Likewise.
1833 * include/grub/efi/chainloader.h: Likewise.
1834 * include/grub/efi/console.h: Likewise.
1835 * include/grub/efi/console_control.h: Likewise.
1836 * include/grub/efi/disk.h: Likewise.
1837 * include/grub/efi/efi.h: Likewise.
1838 * include/grub/efi/pe32.h: Likewise.
1839 * include/grub/efi/time.h: Likewise.
1840 * include/grub/i386/linux.h: Likewise.
1841 * include/grub/i386/setjmp.h: Likewise.
1842 * include/grub/i386/types.h: Likewise.
1843 * include/grub/i386/efi/kernel.h: Likewise.
1844 * include/grub/i386/efi/loader.h: Likewise.
1845 * include/grub/i386/efi/time.h: Likewise.
1846 * include/grub/i386/pc/biosdisk.h: Likewise.
1847 * include/grub/i386/pc/boot.h: Likewise.
1848 * include/grub/i386/pc/chainloader.h: Likewise.
1849 * include/grub/i386/pc/console.h: Likewise.
1850 * include/grub/i386/pc/init.h: Likewise.
1851 * include/grub/i386/pc/kernel.h: Likewise.
1852 * include/grub/i386/pc/loader.h: Likewise.
1853 * include/grub/i386/pc/memory.h: Likewise.
1854 * include/grub/i386/pc/multiboot.h: Likewise.
1855 * include/grub/i386/pc/serial.h: Likewise.
1856 * include/grub/i386/pc/time.h: Likewise.
1857 * include/grub/i386/pc/vbe.h: Likewise.
1858 * include/grub/i386/pc/vbeblit.h: Likewise.
1859 * include/grub/i386/pc/vbefill.h: Likewise.
1860 * include/grub/i386/pc/vbeutil.h: Likewise.
1861 * include/grub/i386/pc/vga.h: Likewise.
1862 * include/grub/ieee1275/ieee1275.h: Likewise.
1863 * include/grub/ieee1275/ofdisk.h: Likewise.
1864 * include/grub/powerpc/libgcc.h: Likewise.
1865 * include/grub/powerpc/setjmp.h: Likewise.
1866 * include/grub/powerpc/types.h: Likewise.
1867 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
1868 * include/grub/powerpc/ieee1275/console.h: Likewise.
1869 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
1870 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
1871 * include/grub/powerpc/ieee1275/loader.h: Likewise.
1872 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
1873 * include/grub/powerpc/ieee1275/time.h: Likewise.
1874 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
1875 * include/grub/sparc64/libgcc.h: Likewise.
1876 * include/grub/sparc64/setjmp.h: Likewise.
1877 * include/grub/sparc64/types.h: Likewise.
1878 * include/grub/sparc64/ieee1275/console.h: Likewise.
1879 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
1880 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
1881 * include/grub/sparc64/ieee1275/time.h: Likewise.
1882 * include/grub/util/biosdisk.h: Likewise.
1883 * include/grub/util/getroot.h: Likewise.
1884 * include/grub/util/lvm.h: Likewise.
1885 * include/grub/util/misc.h: Likewise.
1886 * include/grub/util/raid.h: Likewise.
1887 * include/grub/util/resolve.h: Likewise.
1888 * io/gzio.c: Likewise.
1889 * kern/device.c: Likewise.
1890 * kern/disk.c: Likewise.
1891 * kern/dl.c: Likewise.
1892 * kern/elf.c: Likewise.
1893 * kern/env.c: Likewise.
1894 * kern/err.c: Likewise.
1895 * kern/file.c: Likewise.
1896 * kern/fs.c: Likewise.
1897 * kern/loader.c: Likewise.
1898 * kern/main.c: Likewise.
1899 * kern/misc.c: Likewise.
1900 * kern/mm.c: Likewise.
1901 * kern/parser.c: Likewise.
1902 * kern/partition.c: Likewise.
1903 * kern/rescue.c: Likewise.
1904 * kern/term.c: Likewise.
1905 * kern/efi/efi.c: Likewise.
1906 * kern/efi/init.c: Likewise.
1907 * kern/efi/mm.c: Likewise.
1908 * kern/i386/dl.c: Likewise.
1909 * kern/i386/efi/init.c: Likewise.
1910 * kern/i386/efi/startup.S: Likewise.
1911 * kern/i386/pc/init.c: Likewise.
1912 * kern/i386/pc/lzo1x.S: Likewise.
1913 * kern/i386/pc/startup.S: Likewise.
1914 * kern/ieee1275/ieee1275.c: Likewise.
1915 * kern/powerpc/cache.S: Likewise.
1916 * kern/powerpc/dl.c: Likewise.
1917 * kern/powerpc/ieee1275/cmain.c: Likewise.
1918 * kern/powerpc/ieee1275/crt0.S: Likewise.
1919 * kern/powerpc/ieee1275/init.c: Likewise.
1920 * kern/powerpc/ieee1275/openfw.c: Likewise.
1921 * kern/sparc64/cache.S: Likewise.
1922 * kern/sparc64/dl.c: Likewise.
1923 * kern/sparc64/ieee1275/init.c: Likewise.
1924 * kern/sparc64/ieee1275/openfw.c: Likewise.
1925 * loader/efi/chainloader.c: Likewise.
1926 * loader/efi/chainloader_normal.c: Likewise.
1927 * loader/i386/efi/linux.c: Likewise.
1928 * loader/i386/efi/linux_normal.c: Likewise.
1929 * loader/i386/pc/chainloader.c: Likewise.
1930 * loader/i386/pc/chainloader_normal.c: Likewise.
1931 * loader/i386/pc/linux.c: Likewise.
1932 * loader/i386/pc/linux_normal.c: Likewise.
1933 * loader/i386/pc/multiboot.c: Likewise.
1934 * loader/i386/pc/multiboot_normal.c: Likewise.
1935 * loader/powerpc/ieee1275/linux.c: Likewise.
1936 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1937 * normal/arg.c: Likewise.
1938 * normal/cmdline.c: Likewise.
1939 * normal/command.c: Likewise.
1940 * normal/completion.c: Likewise.
1941 * normal/execute.c: Likewise.
1942 * normal/function.c: Likewise.
1943 * normal/lexer.c: Likewise.
1944 * normal/main.c: Likewise.
1945 * normal/menu.c: Likewise.
1946 * normal/menu_entry.c: Likewise.
1947 * normal/misc.c: Likewise.
1948 * normal/parser.y: Likewise.
1949 * normal/script.c: Likewise.
1950 * normal/i386/setjmp.S: Likewise.
1951 * normal/powerpc/setjmp.S: Likewise.
1952 * normal/sparc64/setjmp.S: Likewise.
1953 * partmap/acorn.c: Likewise.
1954 * partmap/amiga.c: Likewise.
1955 * partmap/apple.c: Likewise.
1956 * partmap/gpt.c: Likewise.
1957 * partmap/pc.c: Likewise.
1958 * partmap/sun.c: Likewise.
1959 * term/gfxterm.c: Likewise.
1960 * term/terminfo.c: Likewise.
1961 * term/efi/console.c: Likewise.
1962 * term/i386/pc/console.c: Likewise.
1963 * term/i386/pc/serial.c: Likewise.
1964 * term/i386/pc/vesafb.c: Likewise.
1965 * term/i386/pc/vga.c: Likewise.
1966 * term/ieee1275/ofconsole.c: Likewise.
1967 * util/biosdisk.c: Likewise.
1968 * util/console.c: Likewise.
1969 * util/genmoddep.c: Likewise.
1970 * util/getroot.c: Likewise.
1971 * util/grub-emu.c: Likewise.
1972 * util/grub-mkdevicemap.c: Likewise.
1973 * util/grub-probe.c: Likewise.
1974 * util/lvm.c: Likewise.
1975 * util/misc.c: Likewise.
1976 * util/raid.c: Likewise.
1977 * util/resolve.c: Likewise.
1978 * util/update-grub.in: Likewise.
1979 * util/update-grub_lib.in: Likewise.
1980 * util/grub.d/00_header.in: Likewise.
1981 * util/grub.d/10_hurd.in: Likewise.
1982 * util/grub.d/10_linux.in: Likewise.
1983 * util/i386/efi/grub-install.in: Likewise.
1984 * util/i386/efi/grub-mkimage.c: Likewise.
1985 * util/i386/pc/grub-install.in: Likewise.
1986 * util/i386/pc/grub-mkimage.c: Likewise.
1987 * util/i386/pc/grub-mkrescue.in: Likewise.
1988 * util/i386/pc/grub-setup.c: Likewise.
1989 * util/i386/pc/misc.c: Likewise.
1990 * util/powerpc/ieee1275/grub-install.in: Likewise.
1991 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
1992 * util/powerpc/ieee1275/misc.c: Likewise.
1993 * video/bitmap.c: Likewise.
1994 * video/video.c: Likewise.
1995 * video/i386/pc/vbe.c: Likewise.
1996 * video/i386/pc/vbeblit.c: Likewise.
1997 * video/i386/pc/vbefill.c: Likewise.
1998 * video/i386/pc/vbeutil.c: Likewise.
1999 * video/readers/tga.c: Likewise.
2001 2007-07-02 Robert Millan <rmh@aybabtu.com>
2003 * conf/i386-efi.rmk: Replace obsolete reference to
2004 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
2005 with util/getroot.c.
2006 * conf/powerpc-ieee1275.rmk: Likewise.
2007 * conf/sparc64-ieee1275.rmk: Likewise.
2009 * util/grub-emu.c (main): Fix unchecked pointer handling.
2011 2007-07-02 Robert Millan <rmh@aybabtu.com>
2013 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
2014 invocation to fail, in order to support partition-less media.
2016 * util/i386/pc/grub-install.in: Likewise.
2018 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
2019 which fs or partmap modules are needed (akin to its sister scripts).
2021 Also use grub-probe to get rid of unportable /proc/mounts check.
2023 Print the same informational message that the other scripts do, before
2026 2007-06-23 Robert Millan <rmh@aybabtu.com>
2028 * util/update-grub_lib.in (font_path): New function. Determine wether
2029 a font file can be found and, if so, echo the GRUB path to it.
2031 * util/update-grub.in: Handle multiple terminals depending on user
2032 input, platform availability and font file presence. Propagate
2033 variables of our findings to /etc/grub.d/ children.
2035 * util/grub.d/00_header.in: Handle multiple terminals, based on
2036 environment setup by update-grub.
2038 2007-06-23 Robert Millan <rmh@aybabtu.com>
2040 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
2042 2007-06-21 Robert Millan <rmh@aybabtu.com>
2044 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
2045 indicate end of data section in kernel image.
2046 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
2047 GRUB_KERNEL_MACHINE_DATA_END.
2049 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
2051 * kern/i386/efi/startup.S: Likewise.
2053 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
2054 during image generation. Implement --prefix option to override this
2056 * util/i386/efi/grub-mkimage.c: Likewise.
2058 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
2059 code to make path relative to its root into a separate function.
2061 * util/i386/pc/grub-install.in: Use newly provided
2062 make_system_path_relative_to_its_root() to convert ${grubdir}, then
2063 pass the result to grub-install --prefix.
2065 2007-06-13 Robert Millan <rmh@aybabtu.com>
2067 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
2069 * util/grub-emu.c: Use above definitions from misc.h instead of
2071 * util/grub-mkdevicemap.c: Likewise.
2072 * util/i386/pc/grub-setup.c: Likewise.
2073 * util/grub-probe.c: Likewise.
2074 (probe): Abort with grub_util_error() when either
2075 grub_guess_root_device or grub_util_get_grub_dev fails.
2077 2007-06-12 Robert Millan <rmh@aybabtu.com>
2079 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
2081 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
2083 * util/grub-probe.c (probe): Likewise for "drive_name".
2085 2007-06-11 Robert Millan <rmh@aybabtu.com>
2087 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
2088 not just the cdrom one.
2090 2007-06-11 Robert Millan <rmh@aybabtu.com>
2092 * util/i386/pc/grub-mkrescue.in: Add "set -e".
2093 Add --pkglibdir=DIR option to override pkglibdir.
2094 Mention --image-type=TYPE in help output.
2095 Fix --grub-mkimage (it was a no-op).
2096 Abort gracefuly when no parameter is given.
2098 2007-06-11 Robert Millan <rmh@aybabtu.com>
2100 * util/i386/pc/grub-mkrescue.in: New file.
2101 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
2102 * Makefile.in: Handle bin_SCRIPTS.
2104 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
2106 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
2107 list of video modes.
2109 2007-06-06 Robert Millan <rmh@aybabtu.com>
2111 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
2112 file doesn't exist, or if it is in a filesystem grub can't read.
2114 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
2115 not abort if GRUB_DRIVE could not be defined. Rearrange generated
2116 header comment to fit in 80 columns when the variables are resolved.
2118 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
2119 could be identified by update-grub. Remove redundant check for
2120 unifont.pff existance (since convert_system_path_to_grub_path now
2123 2007-06-04 Robert Millan <rmh@aybabtu.com>
2125 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
2127 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
2129 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
2131 2007-06-04 Robert Millan <rmh@aybabtu.com>
2133 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
2135 * include/grub/partition.h: Declare grub_apple_partition_map_init and
2136 grub_apple_partition_map_fini.
2139 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
2140 to access >2 TiB disks).
2142 Print disk->total_sectors with %llu instead of %lu, since this
2143 variable is always 64-bit (prevents wrong disk size from being displayed
2144 on either >2 TiB disk or big-endian CPU).
2146 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
2147 into a generic case that supports all (sane) partition maps.
2149 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
2152 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
2153 and grub_apple_partition_map_fini() after that.
2155 2007-06-01 Robert Millan <rmh@aybabtu.com>
2157 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
2159 * util/grub.d/00_header.in: Only enable gfxterm when
2160 convert_system_path_to_grub_path() succeeds.
2162 2007-05-20 Robert Millan <rmh@aybabtu.com>
2164 * util/update-grub_lib.in: New file.
2165 * DISTLIST: Add update-grub_lib.in.
2166 * conf/common.rmk: Generate update-grub_lib and install it in
2168 * Makefile.in: Add install routine for $(lib_DATA).
2170 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
2171 function provided by update-grub_lib to support arbitrary paths of
2173 * util/update-grub.in: Use convert_system_path_to_grub_path() to
2174 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
2176 2007-05-19 Robert Millan <rmh@aybabtu.com>
2178 * commands/i386/cpuid.c: New module.
2180 * conf/i386-efi.rmk: Enable cpuid.mod.
2181 * conf/i386-pc.rmk: Likewise.
2183 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
2185 * kern/disk.c (grub_disk_read): Check return value of
2188 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
2190 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
2192 * disk/raid.c (grub_raid_open): Likewise.
2194 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
2196 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
2197 stack instead of on the heap.
2199 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
2200 before doing a read on it.
2202 * configure.ac: Only use -fno-stack-protector for the target
2205 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
2207 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
2208 __attribute_ ((unused)) to mode_type argument.
2210 * util/getroot.c (grub_guess_root_device): Fix #endif.
2212 * kern/misc.c (memcmp): Fix prototype.
2214 * include/grub/partition.h [GRUB_UTIL]
2215 (grub_gpt_partition_map_init): Add prototype.
2216 (grub_gpt_partition_map_fini): Likewise.
2218 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
2221 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
2222 (grub_fat_read_data): Likewise.
2223 (grub_fat_find_dir): Likewise.
2225 * font/manager.c (find_glyph): Make table a const.
2226 (grub_font_get_glyph): Remove bitmap from if statement.
2228 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
2230 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
2231 code, first search for device in /dev/mapper, then in /dev.
2232 (grub_util_get_grub_dev): New function.
2233 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
2235 * util/grub-probe.c (probe): Remove check for RAID, call
2236 grub_util_get_grub_dev() instead of
2237 grub_util_biosdisk_get_grub_dev().
2238 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
2239 grub_util_biosdisk_get_grub_dev().
2240 * util/i386/pc/grub-setup.c (main): Likewise.
2242 2007-05-16 Robert Millan <rmh@aybabtu.com>
2244 * DISTLIST: Update for the latest changes.
2245 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
2246 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
2247 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
2248 grub/util/biosdisk.h.
2249 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
2250 grub/util/biosdisk.h.
2252 2007-05-16 Robert Millan <rmh@aybabtu.com>
2254 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
2256 2007-05-16 Robert Millan <rmh@aybabtu.com>
2258 * util/i386/efi/grub-install.in: New.
2259 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
2260 newly added grub-install.
2261 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
2263 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
2264 grub/util/biosdisk.h.
2265 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
2266 grub/util/biosdisk.h.
2268 2007-05-16 Robert Millan <rmh@aybabtu.com>
2270 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
2271 * include/grub/util/biosdisk.h: ... here.
2272 * util/i386/pc/biosdisk.c: Moved to ...
2273 * util/biosdisk.c: ... here.
2274 * util/i386/pc/getroot.c: Moved to ...
2275 * util/getroot.c: ... here.
2276 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
2277 * util/grub-mkdevicemap.c: ... here.
2278 * util/i386/pc/grub-probe.c: Moved to ...
2279 * util/grub-probe.c: ... here.
2281 2007-05-15 Robert Millan <rmh@aybabtu.com>
2283 * util/update-grub.in: Remove duplicated line in grub.cfg header
2286 2007-05-13 Robert Millan <rmh@aybabtu.com>
2288 * util/update-grub.in: Fix a few assumptions about the devices holding
2289 /, /boot and /boot/grub being the same.
2290 * util/grub.d/00_header.in: Likewise.
2291 * util/grub.d/10_hurd.in: Likewise.
2292 * util/grub.d/10_linux.in: Likewise.
2294 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
2295 patterns. Use that to define the `.old' suffix as older than `'.
2297 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
2299 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
2300 the grub.cfg header message.
2302 2007-05-11 Robert Millan <rmh@aybabtu.com>
2304 * util/update-grub.in: Create device.map if it doesn't already exist,
2305 before attempting to run grub-probe.
2306 Check for grub-probe and grub-mkdevicemap with the same code
2307 grub-install is using.
2310 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
2312 * Makefile.in: Add the datarootdir autoconf variable.
2314 2007-05-09 Robert Millan <rmh@aybabtu.com>
2316 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
2317 fail gracefuly if dev->disk->partition == NULL.
2319 2007-05-07 Robert Millan <rmh@aybabtu.com>
2321 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
2322 determine partition map module.
2323 * util/i386/pc/grub-install.in: Use this feature to decide which
2324 partition module to load, instead of hardcoding pc and gpt.
2326 2007-05-07 Robert Millan <rmh@aybabtu.com>
2328 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
2329 source directory differs from build directory.
2331 2007-05-05 Robert Millan <rmh@aybabtu.com>
2333 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
2336 2007-05-05 Robert Millan <rmh@aybabtu.com>
2338 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
2340 2007-05-05 Robert Millan <rmh@aybabtu.com>
2342 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
2343 command-line arguments via ${GRUB_CMDLINE_LINUX}.
2345 2007-05-05 Robert Millan <rmh@aybabtu.com>
2347 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
2348 (grub_probe_SOURCES): Likewise.
2349 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
2350 GPT and initialize dos_part and bsd_part accordingly.
2351 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
2353 (main): Activate gpt module for use during partition identification,
2354 and deactivate it afterwards.
2355 * util/i386/pc/grub-install.in: Add gpt module to core.img.
2356 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
2357 partition identification, and deactivate it afterwards.
2359 2007-05-05 Robert Millan <rmh@aybabtu.com>
2361 * term/i386/pc/console.c (grub_console_fini): Call
2362 grub_term_set_current() before grub_term_unregister().
2364 2007-05-04 Robert Millan <rmh@aybabtu.com>
2366 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
2367 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
2368 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
2369 and update-grub_DATA.
2370 * conf/common.rmk: Build and install update-grub components.
2371 * conf/common.mk: Regenerate.
2372 * util/update-grub.in: New. Core of update-grub.
2373 * util/grub.d/00_header.in: New. Generates grub.cfg header.
2374 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
2375 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
2376 * util/grub.d/README: New. Document grub.d directory layout.
2378 2007-05-01 Robert Millan <rmh@aybabtu.com>
2380 * util/grub-emu.c: Move initialization functions
2381 grub_util_biosdisk_init() and grub_init_all() before
2382 grub_util_biosdisk_get_grub_dev(), which relies on them.
2384 2007-04-19 Robert Millan <rmh@aybabtu.com>
2386 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
2389 2007-04-18 Jerone Young <jerone@gmail.com>
2391 * kernel/elf.c: Add missing parenthesis for conditional statement
2394 2007-04-10 Jerone Young <jerone@gmail.com>
2396 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
2397 continue on and look for device node with real device name.
2399 2007-04-10 Jerone Young <jerone@gmail.com>
2401 * configure.ac: Add argument for autoconf to use tranformation
2403 * Makefile.in: Add autoconf package transformation code.
2404 * util/i386/pc/grub-install.in: Likewise.
2405 * util/powerpc/ieee1275/grub-install.in: Likewise.
2407 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
2409 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
2410 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
2411 (EXT2_REVISION): Likewise.
2412 (EXT2_INODE_SIZE): Likewise.
2413 (struct grub_ext2_block_group): Added a missing member
2415 (grub_ext2_read_inode): Divide by the inode size in a superblock
2416 instead of 128 to obtain INODES_PER_BLOCK.
2417 Use the macro EXT2_INODE_SIZE instead of directly using
2420 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
2422 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
2423 superblock instead of the structure size to compute an
2424 offset. This fixes the problem that GRUB could not read a
2425 filesystem when inode size is different from 128-byte.
2427 2007-03-05 Marco Gerards <marco@gnu.org>
2429 * normal/main.c (read_config_file): When "menu" is not set, create
2432 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
2434 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
2435 (HEAP_LIMIT): New macro.
2436 (grub_claim_heap): Claim memory up to `heaplimit'.
2438 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
2440 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
2441 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
2443 (grub_arch_modules_addr): Return address after `_end'.
2444 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
2445 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
2446 (add_segments): Calculate `_end' from phdr size and location.
2447 (ALIGN_UP): Moved to ...
2448 * include/grub/misc.h: here.
2449 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
2451 (GRUB_IEEE1275_MODULE_BASE): Removed.
2453 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
2455 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
2458 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
2460 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
2462 (grub_elf64_load_hook_t): Likewise.
2463 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
2466 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
2468 * kern/mm.c: Update copyright.
2469 (grub_mm_debug): Correct syntax error.
2470 (grub_mm_dump_free): New function.
2471 (grub_debug_free): Call `grub_free'.
2472 * include/grub/mm.h: Update copyright.
2473 (grub_mm_dump_free): Add declaration.
2475 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
2477 * include/grub/ieee1275/ieee1275.h: Update copyright.
2478 * kern/powerpc/ieee1275/init.c: Likewise.
2479 * kern/powerpc/ieee1275/openfw.c: Likewise.
2481 * loader/powerpc/ieee1275/linux.c: Likewise.
2482 * include/grub/elfload.h: Likewise.
2483 * kern/elf.c: Likewise.
2484 (grub_elf32_load): Pass `base' and `size' parameters. Update all
2486 (grub_elf64_load): Likewise.
2487 (grub_elf32_load_segment): Move to a nested function.
2488 (grub_elf64_load_segment): Likewise.
2490 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
2492 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
2494 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
2495 (grub_heap_len): Likewise.
2496 (HEAP_SIZE): New macro.
2497 (grub_claim_heap): New function.
2498 (grub_machine_init): Don't claim heap directly. Call
2500 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
2501 (grub_available_iterate): New function.
2503 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
2505 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
2506 * configure.ac: Use it for testing the HOST and TARGET compilers.
2508 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
2510 * Makefile.in (enable_grub_emu): New variable.
2511 * configure.ac (--enable-grub-emu): New option.
2512 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
2513 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
2514 * conf/i386-pc.rmk: Likewise.
2515 * conf/powerpc-ieee1275.rmk: Likewise.
2516 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
2518 2006-12-12 Marco Gerards <marco@gnu.org>
2520 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
2522 * kern/env.c (grub_env_unset): Don't free the member `value' when
2523 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
2526 * normal/main.c (current_menu): Removed.
2527 (free_menu): Unset the `menu' environment variable.
2528 (grub_normal_menu_addentry): Make use of the environment variable
2529 `menu', instead of using the global `current_menu'. Allocate
2530 memory for the sourcecode of this entry.
2531 (read_config_file): New argument `nested', changed all callers.
2532 Only in the case of a new context, initialize a new menu. Set the
2533 `menu' environment variable.
2534 (grub_normal_execute): Don't set and unset the environment
2535 variable `menu' here anymore. Only free the menu when leaving the
2538 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
2541 2006-12-11 Marco Gerards <marco@gnu.org>
2543 * normal/menu_entry.c (run): Fix off by one bug so the last line
2544 is executed. Move the loader check to outside the loop.
2546 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
2548 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
2550 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
2552 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
2553 the number of sectors. Reported by Andrey Shuvikov
2554 <mr_hyro@yahoo.com>.
2556 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
2558 * kern/disk.c (grub_disk_read): When there is a read error, always
2559 try to read only the necessary data.
2561 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
2563 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
2565 [GRUB_UTIL] (grub_raid_fini): Likewise.
2566 [GRUB_UTIL] (grub_lvm_init): Likewise.
2567 [GRUB_UTIL] (grub_lvm_fini): Likewise.
2568 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
2569 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
2570 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
2571 and grub_raid_fini().
2573 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
2575 * include/grub/types.h (__unused): Rename to UNUSED.
2576 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
2577 (grub_elf64_size): Likewise.
2579 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
2581 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
2582 grub_error_push and grub_error_pop in the error-handling path.
2583 (grub_elf32_load_segment): Only call grub_file_read with non-zero
2586 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
2588 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
2589 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2590 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2591 (kernel_elf_SOURCES): Likewise.
2592 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
2593 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
2594 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2595 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2596 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
2597 (elf_mod_SOURCES): New variable.
2598 (elf_mod_CFLAGS): Likewise.
2599 (elf_mod_LDFLAGS): Likewise.
2600 * include/grub/types.h (__unused): New macro.
2601 * include/grub/elfload.h: New file.
2602 * kern/elf.c: Likewise.
2603 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
2604 (ELF32_LOADMASK): New macro.
2605 (ELF64_LOADMASK): Likewise.
2607 (grub_linux_load32): New function.
2608 (grub_linux_load64): Likewise.
2609 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
2610 Use grub_elf_t instead of grub_file_t.
2612 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
2614 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
2615 `catch_result' to struct set_color_args.
2617 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
2619 * normal/menu.c: Include grub/script.h.
2620 * normal/menu_entry.c: Likewise.
2621 * include/grub/normal.h: Do not include grub/script.h.
2623 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
2625 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
2627 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
2629 * kern/disk.c (grub_disk_open): Print debug messages when opening a
2631 (grub_disk_close): Print debug messages when closing a disk.
2632 (grub_disk_read): Print debug messages when disk read fails.
2633 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
2635 * kern/partition.c: Include misc.h.
2636 (grub_partition_iterate): Print debug messages when detecting
2639 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
2641 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
2643 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
2645 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
2647 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
2648 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
2650 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
2652 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
2653 instead of sizeof(lv). Patch by Michael Guntsche.
2655 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
2657 * disk/lvm.c: Rename VGS to VG_LIST.
2658 (grub_lvm_iterate): Change VGS->LV to VG-LV.
2659 (grub_lvm_open): Likewise.
2660 Thanks to Michael Guntsche for finding this bug.
2662 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
2664 * configure.ac (AC_INIT): Bumped to 1.95.
2666 2006-10-14 Robert Millan <rmh@aybabtu.com>
2668 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
2669 with "/dev/.static/dev/md".
2671 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
2673 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
2674 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
2675 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
2676 DRIVE_NAME are always freed.
2678 * util/i386/pc/biosdisk.c (make_device_name): Add one into
2679 DOS_PART, as a DOS partition is counted from one instead of zero
2680 now. Reported by Robert Millan.
2682 2006-10-14 Robert Millan <rmh@aybabtu.com>
2684 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
2685 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
2686 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
2687 string returned by grub_guess_root_device.
2688 * util/i386/pc/grub-setup.c: Likewise.
2689 * util/i386/pc/grub-probefs.c: Likewise.
2691 * util/i386/pc/grub-probefs.c: Rename to ...
2692 * util/i386/pc/grub-probe.c: ... this.
2693 * DISTLIST: Remove grub-probefs, add grub-probe.
2694 * conf/i386-efi.rmk: Likewise.
2695 * conf/i386-pc.rmk: Likewise.
2696 * util/i386/pc/grub-install.in: Likewise.
2698 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
2699 choose which information we want to print.
2701 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
2703 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
2704 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
2705 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
2706 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
2707 video/readers/tga.c and video/i386/pc/vbeutil.c.
2709 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
2711 Added support for RAID and LVM.
2713 * disk/lvm.c: New file.
2714 * disk/raid.c: Likewise.
2715 * include/grub/lvm.h: Likewise.
2716 * include/grub/raid.h: Likewise.
2717 * include/grub/util/lvm.h: Likewise.
2718 * include/grub/util/raid.h: Likewise.
2719 * util/lvm.c: Likewise.
2720 * util/raid.c: Likewise.
2722 * include/grub/disk.h (grub_disk_dev_id): Add
2723 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
2724 (grub_disk_get_size): New prototype.
2725 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
2726 returns a partition.
2727 (grub_disk_get_size): New function.
2729 * kern/i386/pc/init.c (make_install_device): Copy the prefix
2730 verbatim if grub_install_dos_part is -2.
2732 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
2735 * util/i386/pc/grub-setup.c (setup): New argument
2736 MUST_EMBED. Force embedding of GRUB when the argument is
2737 true. Close FILE before returning.
2738 (main): Add support for RAID and LVM.
2740 * conf/common.rmk: Add RAID and LVM modules.
2741 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
2743 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
2745 * kern/misc.c (grub_strstr): New function.
2746 * include/grub/misc.h (grub_strstr): New prototype.
2748 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
2750 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
2752 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
2754 * kern/misc.c (grub_strtoull): Guess the base only if not
2757 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
2759 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
2762 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
2764 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
2766 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
2767 Remove `flags' argument. All callers changed.
2768 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
2769 (IEEE1275_IHANDLE_INVALID): New variable.
2770 (IEEE1275_CELL_INVALID): New variable.
2771 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2772 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
2773 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
2774 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
2775 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
2776 codes from Open Firmware. All callers updated.
2777 (grub_ieee1275_next_property): Directly return Open Firmware return
2779 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
2780 Standardize error checking from `grub_ieee1275_get_property'.
2781 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
2782 `devalias' to `aliases'. Correct comments. Consolidate error paths.
2784 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
2786 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
2787 `instance_to_package_args' to `instance_to_path_args'.
2789 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
2790 `grub_ieee1275_chosen'.
2792 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
2793 `grub_ieee1275_interpret'.
2795 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
2797 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
2799 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
2801 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
2802 (__cmpdi): Likewise.
2804 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
2805 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
2808 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
2810 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
2811 to type `grub_ssize_t'.
2812 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
2814 2006-09-22 Marco Gerards <marco@gnu.org>
2816 * normal/script.c (grub_script_create_cmdmenu): Skip leading
2819 2006-09-22 Marco Gerards <marco@gnu.org>
2821 * commands/echo.c: New file.
2823 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
2825 * conf/common.rmk (echo_mod_SOURCES): New variable.
2826 (echo_mod_CFLAGS): Likewise.
2827 (echo_mod_LDFLAGS): Likewise.
2829 2006-09-22 Marco Gerards <marco@gnu.org>
2831 * normal/main.c (get_line): Malloc memory instead of using
2832 preallocated memory. Removed the arguments `cmdline' and
2833 `max_len'. Updated all callers.
2835 2006-09-22 Marco Gerards <marco@gnu.org>
2837 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
2838 (normal_mod_DEPENDENCIES): Likewise.
2840 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
2841 (normal_mod_DEPENDENCIES): Likewise.
2843 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
2845 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
2847 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
2849 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
2850 (normal_mod_DEPENDENCIES): Likewise.
2851 * conf/i386-pc.mk: Regenerate.
2852 * conf/i386-efi.mk: Likewise
2853 * conf/common.mk: Likewise.
2854 * conf/powerpc-ieee1275.mk: Likewise.
2855 * conf/sparc64-ieee1275.mk: Likewise.
2857 2006-09-22 Robert Millan <rmh@aybabtu.com>
2859 Sync with i386 version.
2860 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
2861 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
2863 2006-09-21 Robert Millan <rmh@aybabtu.com>
2865 Import from GRUB Legacy (lib/device.c):
2866 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
2867 (init_device_map) [__linux__]: Add support for I2O devices.
2869 2006-09-14 Marco Gerards <marco@gnu.org>
2871 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
2874 2006-09-14 Robert Millan <rmh@aybabtu.com>
2876 * util/i386/pc/grub-install.in: Skip menu.lst when removing
2879 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
2881 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
2882 before adding it to device.map.
2884 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
2886 * genmk.rb: Let GCC generate dependenceies the first time it
2887 compiles a file; using the -MD option.
2888 * conf/common.mk: Regenerate.
2889 * conf/i386-pc.mk: Likewise.
2890 * conf/i386-efi.mk: Likewise.
2891 * conf/powerpc-ieee1275.mk: Likewise.
2892 * conf/sparc64-ieee1275.mk: Likewise.
2894 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
2896 Move the prototypes of grub_setjmp and grub_longjmp to
2897 cpu/setjmp.h, so that each architecture may specify different
2900 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
2901 (grub_longjmp): Likewise.
2902 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
2903 (grub_longjmp): Likewise.
2904 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
2905 (grub_longjmp): Likewise.
2907 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
2908 [!GRUB_UTIL] (grub_longjmp): Removed.
2910 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
2912 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
2913 "color!" method does not return any value.
2915 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
2917 * include/grub/bitmap.h: New file.
2919 * include/grub/i386/pc/vbeutil.h: Likewise.
2921 * video/bitmap.c: Likewise.
2923 * video/readers/tga.c: Likewise.
2925 * video/i386/pc/vbeutil.c: Likewise.
2927 * commands/videotest.c: Code cleanup and updated to reflect to new
2930 * term/gfxterm.c: Likewise.
2932 * video/video.c: Likewise.
2934 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
2935 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
2936 (bitmap_mod_SOURCES): New entry.
2937 (bitmap_mod_CFLAGS): Likewise.
2938 (bitmap_mod_LDFLAGS): Likewise.
2939 (tga_mod_SOURCES): Likewise.
2940 (tga_mod_CFLAGS): Likewise.
2941 (tga_mod_LDFLAGS): Likewise.
2943 * include/grub/video.h (grub_video_blit_operators): New enum type.
2944 (grub_video_render_target): Changed as forward declaration and moved
2945 actual definition to be video driver specific.
2946 (grub_video_adapter.blit_bitmap): Added blitting operator.
2947 (grub_video_adapter.blit_render_target): Likewise.
2948 (grub_video_blit_bitmap): Likewise.
2949 (grub_video_blit_render_target): Likewise.
2951 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
2952 driver specific render target definition.
2953 (grub_video_vbe_map_rgba): Added driver internal helper.
2954 (grub_video_vbe_unmap_color): Updated to use
2955 grub_video_i386_vbeblit_info.
2956 (grub_video_vbe_get_video_ptr): Likewise.
2958 * include/grub/i386/pc/vbeblit.h
2959 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
2960 grub_video_i386_vbeblit_info.
2961 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2962 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2963 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2964 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2965 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2966 (grub_video_i386_vbeblit_index_index): Likewise.
2967 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
2968 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2969 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2970 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
2972 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
2975 * video/i386/pc/vbeblit.c: Updated to reflect changes on
2976 include/grub/i386/pc/vbeblit.h.
2978 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
2979 Updated to use grub_video_i386_vbeblit_info.
2980 (grub_video_i386_vbefill_R8G8B8): Likewise.
2981 (grub_video_i386_vbefill_index): Likewise.
2982 (grub_video_i386_vbefill): Added generic filler.
2984 * video/i386/pc/vbefill.c: Updated to reflect changes on
2985 include/grub/i386/pc/vbefill.h.
2987 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
2988 grub_video_i386_vbeblit_info.
2989 (grub_video_vbe_unmap_color): Likewise.
2990 (grub_video_vbe_blit_glyph): Likewise.
2991 (grub_video_vbe_scroll): Likewise.
2992 (grub_video_vbe_draw_pixel): Removed function.
2993 (grub_video_vbe_get_pixel): Likewise.
2994 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
2995 updated code to use it.
2996 (common_blitter): Added common blitter for render target and bitmap.
2997 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
2998 (grub_video_vbe_blit_render_target): Likewise.
3000 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
3002 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
3003 is in text mode if there is no console control protocol instance
3006 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
3008 * include/grub/video.h: Code cleanup.
3010 * include/grub/i386/pc/vbe.h: Likewise.
3012 * video/i386/pc/vbe.c: Likewise.
3014 * video/i386/pc/vbeblit.c: Likewise.
3016 * video/i386/pc/vbefill.c: Likewise.
3018 * video/video.c: Likewise. Also added more comments.
3020 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
3022 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
3023 (struct grub_biosdisk_dap): Likewise.
3025 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
3026 linkage settings for all functions.
3028 2006-07-12 Marco Gerards <marco@gnu.org>
3030 * configure.ac (--enable-mm-debug): Fix typo.
3032 * genkernsyms.sh.in: Use proper quoting for `CC'.
3034 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
3036 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
3037 (normal_mod_ASFLAGS): Remove "-m32".
3039 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
3041 * util/misc.c: Include config.h.
3042 [!HAVE_MEMALIGN]: Do not include malloc.h.
3043 (grub_memalign): Use posix_memalign, if present. Then, use
3044 memalign, if present. Otherwise, emit an error.
3046 * util/grub-emu.c: Do not include malloc.h.
3048 * include/grub/util/misc.h: Include unistd.h. This is required for
3049 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
3050 D. Eades III <hde@foobar-qux.org>.
3052 * configure.ac (AC_GNU_SOURCE): Added.
3053 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
3056 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
3058 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
3059 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
3061 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
3063 * include/grub/types.h (grub_host_addr_t): Rename to
3065 (grub_host_off_t): Rename to grub_target_off_t.
3066 (grub_host_size_t): Rename to grub_target_size_t.
3067 (grub_host_ssize_t): Rename to grub_target_ssize_t.
3068 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
3070 * include/grub/kernel.h (struct grub_module_header): Change type
3071 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
3072 (grub_module_info): Likewise.
3074 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
3076 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
3077 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
3078 Velazquez <jesus.velazquez@gmail.com>.
3080 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
3082 Count partitions from 1 instead of 0 in the string representation
3083 of partitions. Still use 0-based internally.
3085 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
3086 (sun_partition_map_iterate): Use grub_partition_t instead of
3087 struct grub_partition *. Cast DESC->START_CYLINDER to
3088 grub_uint64_t after converting the endian.
3089 (sun_partition_map_probe): Subtract 1 for PARTNUM.
3090 (sun_partition_map_get_name): Add 1 to P->INDEX.
3092 * partmap/pc.c (grub_partition_parse): Subtract 1 for
3094 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
3096 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
3097 zero instead of one.
3098 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
3099 (gpt_partition_map_get_name): Add 1 into P->INDEX.
3101 * partmap/apple.c (apple_partition_map_iterate): Change the type
3103 (apple_partition_map_probe): Subtract 1 for PARTNUM.
3104 (apple_partition_map_get_name): Add 1 into P->INDEX.
3106 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
3108 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
3109 calculate the offset of a partition.
3110 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
3111 (amiga_partition_map_get_name): Add 1 into P->INDEX.
3113 * partmap/acorn.c (acorn_partition_map_find): Change the type of
3114 SECTOR to grub_disk_addr_t.
3115 (acorn_partition_map_iterate): Likewise.
3116 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
3117 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
3119 (acorn_partition_map_get_name): Add 1 into P->INDEX.
3121 * kern/i386/pc/init.c (make_install_device): Add 1 into
3122 GRUB_INSTALL_DOS_PART.
3124 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
3127 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
3129 Clean up the code to support 64-bit addressing in disks and
3130 files. This change is not enough for filesystems yet.
3132 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
3133 type of "start" to grub_uint64_t.
3134 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
3135 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
3136 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
3139 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
3140 to grub_disk_addr_t.
3142 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
3145 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3147 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
3150 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
3152 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
3154 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
3156 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
3157 to grub_off_t, to detect an error from grub_file_seek.
3158 (grub_multiboot_load_elf32): Likewise.
3160 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
3161 maximum unsigned long value when an overflow is detected.
3162 (grub_strtoull): New function.
3163 (grub_divmod64): Likewise.
3164 (grub_lltoa): use grub_divmod64.
3166 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
3168 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
3169 the pointer to next character. Use grub_strtoull instead of
3171 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
3172 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
3175 * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
3176 return value is signed.
3177 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
3178 test if OFFSET is less than zero, as OFFSET is unsigned now.
3180 * kern/disk.c (struct grub_disk_cache): Change the type of
3181 "sector" to grub_disk_addr_t.
3182 (grub_disk_cache_get_index): Change the type of SECTOR to
3183 grub_disk_addr_t. Calculate the hash with SECTOR casted to
3184 unsigned after shifting.
3185 (grub_disk_cache_invalidate): Change the type of SECTOR to
3187 (grub_disk_cache_unlock): Likewise.
3188 (grub_disk_cache_store): Likewise.
3189 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
3190 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
3191 grub_disk_addr_t and grub_uint64_t, respectively.
3192 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
3193 body, as the value of OFFSET is tweaked by
3194 grub_disk_check_range. Change the types of START_SECTOR, LEN and
3195 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
3197 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
3198 body, as the value of OFFSET is tweaked by
3199 grub_disk_check_range. Change the types of LEN and N to
3202 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
3203 and "saved_offset" to grub_off_t.
3204 (test_header): Cast BUF to char *.
3205 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
3207 (grub_gzio_read): Change the types of OFFSET and SIZE to
3208 grub_off_t and grub_size_t, respectively.
3210 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
3212 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
3213 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
3214 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
3215 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
3216 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
3218 * include/grub/types.h (grub_off_t): Unconditionally set to
3220 (grub_disk_addr_t): Changed to grub_uint64_t.
3222 * include/grub/partition.h (struct grub_partition): Change the
3223 types of "start", "len" and "offset" to grub_disk_addr_t,
3224 grub_uint64_t and grub_disk_addr_t, respectively.
3225 (grub_partition_get_start): Return grub_disk_addr_t.
3226 (grub_partition_get_len): Return grub_uint64_t.
3228 * include/grub/misc.h (grub_strtoull): New prototype.
3229 (grub_divmod64): Likewise.
3231 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
3232 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
3233 grub_off_t, respectively.
3234 All callers and references changed.
3236 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
3237 grub_size_t in "read".
3238 All callers and references changed.
3240 * include/grub/file.h (struct grub_file): Change the types of
3241 "offset" and "size" to grub_off_t and grub_off_t,
3242 respectively. Change the type of SECTOR to grub_disk_addr_t in
3244 (grub_file_read): Change the type of LEN to grub_size_t.
3245 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
3247 (grub_file_size): Return grub_off_t.
3248 (grub_file_tell): Likewise.
3249 All callers and references changed.
3251 * include/grub/disk.h (struct grub_disk_dev): Change the types of
3252 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
3254 (struct grub_disk): Change the type of "total_sectors" to
3255 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
3257 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
3258 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
3259 (grub_disk_write): Likewise.
3260 All callers and references changed.
3262 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
3263 char * for grub_strncmp to silence gcc.
3264 (grub_iso9660_mount): Likewise.
3265 (grub_iso9660_mount): Likewise.
3266 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
3268 (grub_iso9660_iterate_dir): Likewise.
3269 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
3271 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
3272 LEN to grub_disk_addr_t and grub_size_t, respectively.
3274 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
3276 * fs/jfs.c (grub_jfs_read_file): Likewise.
3278 * fs/minix.c (grub_jfs_read_file): Likewise.
3280 * fs/sfs.c (grub_jfs_read_file): Likewise.
3282 * fs/ufs.c (grub_jfs_read_file): Likewise.
3284 * fs/xfs.c (grub_jfs_read_file): Likewise.
3286 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
3287 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
3290 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
3291 BLKNR to -1 instead of returning GRUB_ERRNO.
3292 (grub_ext2_read_file): Change the types of SECTOR and
3293 LEN to grub_disk_addr_t and grub_size_t, respectively.
3295 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
3296 LEN to grub_disk_addr_t and grub_size_t, respectively.
3298 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
3301 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
3302 string. Do not cast SECTOR explicitly.
3304 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
3305 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
3306 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
3307 grub_disk_addr_t and grub_size_t, respectively. If the sector is
3308 over 2TB and LBA mode is not supported, raise an error.
3309 (get_safe_sectors): New function.
3310 (grub_biosdisk_read): Use get_safe_sectors.
3311 (grub_biosdisk_write): Likewise.
3313 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
3314 (grub_efidisk_write): Likewise.
3316 * disk/loopback.c (delete_loopback): Cosmetic changes.
3317 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
3319 (grub_loopback_open): Likewise.
3320 (grub_loopback_read): Likewise. Also, change the type of POS to
3321 grub_off_t, and fix the usage of grub_memset.
3323 * commands/i386/pc/play.c: Include grub/machine/time.h.
3325 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
3328 * commands/configfile.c: Include grub/env.h.
3330 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
3331 GRUB_ERRNO directly instead. Change the type of POS to
3332 grub_off_t. Follow the coding standard.
3334 * commands/blocklist.c: Include grub/partition.h.
3335 (grub_cmd_blocklist): Return an error if the underlying device is
3336 not a disk. Take the starting sector of a partition into account,
3337 if a partition is used.
3339 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
3341 (lba_mode): Support 64-bit addresses.
3342 (chs_mode): Likewise.
3343 (copy_buffer): Adapted to the new offsets of a length field and a
3345 (blocklist_default_start): Allocate 64-bit space.
3347 * boot/i386/pc/boot.S (force_lba): Removed.
3348 (boot_drive): Moved to under KERNEL_SECTOR.
3349 (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
3351 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
3353 (lba_mode): Refactored to support a 64-bit address. More size
3355 (setup_sectors): Likewise.
3357 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
3359 * DISTLIST: Added include/grub/i386/linux.h. Removed
3360 include/grub/i386/pc/linux.h
3362 * configure.ac (AC_INIT): Bumped to 1.94.
3364 * config.guess: Updated from gnulib.
3365 * config.sub: Likewise.
3366 * install-sh: Likewise.
3367 * mkinstalldirs: Likewise.
3369 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
3371 * conf/common.rmk (grub_modules_init.lst): Depended on
3372 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
3375 * genmk.rb (PModule::rule): Reverted the previous change.
3377 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
3379 * conf/common.rmk (grub_modules_init.lst): Depends on
3380 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
3381 that the target does not exist before producing.
3382 (grub_modules_init.h): Remove the target before generating.
3383 (grub_emu_init.c): Likewise.
3385 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
3387 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
3389 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
3390 for the target-specific tests. Make sure that we also have the
3391 up-to-date target variables for those tests.
3393 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
3395 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
3396 (PModule::rule): Likewise.
3398 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
3400 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
3401 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
3402 target-specific flags should be prefixed.
3403 (PModule::rule): Likewise.
3405 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
3407 * configure.ac (CMP): Check if cmp is available explicitly.
3409 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
3411 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
3412 (target_cpu): New variable.
3413 (pkglibdir): Use target_cpu instead of host_cpu.
3415 * util/i386/pc/grub-install.in (host_cpu): Removed.
3416 (target_cpu): New variable.
3417 (pkglibdir): Use target_cpu instead of host_cpu.
3419 * util/genmoddep.c: Removed.
3421 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
3422 instead of GRUB_HOST_SIZEOF_VOID_P.
3423 * kern/dl.c: Likewise.
3425 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
3427 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
3428 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
3429 (GRUB_TARGET_SIZEOF_LONG): ... this.
3430 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
3431 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
3432 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
3434 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
3435 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
3436 (GRUB_TARGET_SIZEOF_LONG): ... this.
3437 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
3438 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
3439 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
3441 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
3442 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
3443 (GRUB_TARGET_SIZEOF_LONG): ... this.
3444 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
3445 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
3447 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
3448 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
3449 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
3450 instead of GRUB_HOST_SIZEOF_LONG.
3451 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
3452 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
3453 GRUB_CPU_WORDS_BIGENDIAN.
3454 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
3455 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
3458 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
3459 (genmoddep_SOURCES): Likewise.
3460 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
3461 (genmoddep_SOURCES): Likewise.
3462 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
3463 (genmoddep_SOURCES): Likewise.
3464 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
3466 (genmoddep_SOURCES): Likewise.
3468 * genmoddep.awk: New file.
3470 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
3471 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
3472 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
3473 (PModule::rule): Likewise.
3474 (Program::rule): Likewise.
3475 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
3476 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
3479 * configure.ac: Rewritten intensively to use host and target
3480 instead of build and host, respectively.
3482 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
3483 (host_cpu): Removed.
3484 (target_cpu): New variable.
3485 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
3486 (BUILD_CC): Removed.
3487 (BUILD_CFLAGS): Likewise.
3488 (BUILD_CPPFLAGS): Likewise.
3489 (TARGET_CC): New variable.
3490 (TARGET_CFLAGS): Likewise.
3491 (TARGET_CPPFLAGS): Likewise.
3492 (TARGET_LDFLAGS): Likewise.
3494 (include): Use target_cpu instead of host_cpu.
3495 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
3497 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
3499 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
3501 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
3502 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
3503 field 'false' to 'exec_on_false'.
3504 (grub_script_create_cmdif): Renamed argument names to reflect above
3507 * normal/execute.c (grub_script_execute_cmdif): Likewise.
3509 * normal/script.c (grub_script_create_cmdif): Likewise.
3511 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
3513 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
3515 (grub_hfsplus_btree_recptr): Likewise.
3516 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
3517 FILEBLOCK both to pass a block number and store next block
3519 (grub_hfsplus_read_block): Rewritten heavily to support an extent
3520 overflow file correctly. Specify errors appropriately, because
3521 fshelp expects that GRUB_ERRNO is set when fails. Reuse
3522 grub_hfsplus_btree_recptr to get the pointer to a found key.
3523 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
3526 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
3528 (_linux_mod_SOURCES): New variable.
3529 (_linux_mod_CFLAGS): Likewise.
3530 (_linux_mod_LDFLAGS): Likewise.
3531 (linux_mod_SOURCES): Likewise.
3532 (linux_mod_CFLAGS): Likewise.
3533 (linux_mod_LDFLAGS): Likewise.
3535 * DISTLIST: Added loader/i386/efi/linux.c,
3536 loader/i386/efi/linux_normal.c and
3537 include/grub/i386/efi/loader.h.
3539 * loader/i386/efi/linux.c: New file.
3540 * loader/i386/efi/linux_normal.c: Likewise.
3541 * include/grub/i386/efi/loader.h: Likewise.
3543 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
3545 * commands/blocklist.c: New file.
3547 * DISTLIST: Added commands/blocklist.c.
3549 * term/efi/console.c (grub_console_highlight_color): Use a lighter
3550 color for the background, and a darker color for the foreground.
3551 (grub_console_checkkey): Return READ_KEY.
3552 (grub_console_cls): Set the background to
3553 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
3555 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
3557 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
3558 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
3560 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
3563 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
3564 BG. The spec is wrong again.
3566 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
3568 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
3570 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
3571 commands/blocklist.c.
3572 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3574 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
3575 (blocklist_mod_SOURCES): New variable.
3576 (blocklist_mod_CFLAGS): Likewise.
3577 (blocklist_mod_LDFLAGS): Likewise.
3579 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
3581 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
3583 (lba_mode): Use %eax more intensively to reduce the code size.
3585 2006-05-20 Marco Gerards <marco@gnu.org>
3587 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
3589 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
3591 (script): Accept leading newlines.
3592 (newlines): New rule to describe 0 or more newlines.
3593 (commands): Accept `command' with trailing newline. Fixed the
3594 order in which arguments were passed to `grub_script_add_cmd'.
3595 Accept commands separated by newlines.
3596 (function): Changed to accept newlines.
3597 (menuentry) Rewritten.
3599 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
3600 front of the list, instead of to the end.
3602 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
3604 * util/i386/pc/grub-install.in (bindir): New variable.
3605 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
3606 Shaver <lbgwjl@gmail.com>.
3608 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
3610 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
3611 grub/machine/linux.h
3612 * loader/i386/pc/linux.c: Likewise.
3614 * include/grub/i386/pc/linux.h: Moved to ...
3615 * include/grub/i386/linux.h: ... here.
3617 * include/grub/i386/linux.h (struct linux_kernel_params): New
3620 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
3622 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
3624 (grub_video_vbe_blit_glyph): Likewise.
3625 (grub_video_vbe_blit_bitmap): Likewise.
3626 (grub_video_vbe_blit_render_target): Likewise.
3628 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
3630 * configure.ac (--with-platform): Properly quote the square
3633 2006-05-08 Marco Gerards <marco@gnu.org>
3635 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
3637 (kernel_elf_HEADERS): ...to this. Updated all users.
3638 (grubof_symlist.c): Renamed from this...
3639 (kernel_elf_symlist.c): ...to this. Updated all users.
3640 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
3641 (grubof_SOURCES): Renamed from this...
3642 (kernel_elf_SOURCES): ...to this.
3643 (grubof_HEADERS): Renamed from this...
3644 (kernel_elf_HEADERS): ...to this.
3645 (grubof_CFLAGS): Renamed from this...
3646 (kernel_elf_CFLAGS): ...to this.
3647 (grubof_ASFLAGS): Renamed from this...
3648 (kernel_elf_ASFLAGS): ...to this.
3649 (grubof_LDFLAGS): Renamed from this...
3650 (kernel_elf_LDFLAGS): ...to this.
3652 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
3654 (kernel_elf_HEADERS): ...to this. Updated all users.
3655 (grubof_symlist.c): Renamed from this...
3656 (kernel_elf_symlist.c): ...to this. Updated all users.
3657 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
3658 (grubof_SOURCES): Renamed from this...
3659 (kernel_elf_SOURCES): ...to this.
3660 (grubof_HEADERS): Renamed from this...
3661 (kernel_elf_HEADERS): ...to this.
3662 (grubof_CFLAGS): Renamed from this...
3663 (kernel_elf_CFLAGS): ...to this.
3664 (grubof_ASFLAGS): Renamed from this...
3665 (kernel_elf_ASFLAGS): ...to this.
3666 (grubof_LDFLAGS): Renamed from this...
3667 (kernel_elf_LDFLAGS): ...to this.
3669 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
3670 `kernel.elf' instead of `grubof'.
3672 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
3674 Add --with-platform to configure. Use pkglibdir instead of
3675 pkgdatadir. This is reported by Roger Leigh.
3677 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
3678 (host_vendor): Likewise.
3679 (host_os): Likewise.
3680 (pkgdatadir): Likewise.
3681 (platform): New variable.
3682 (pkglibdir): Likewise.
3683 Use PKGLIBDIR instead of PKGDATADIR.
3685 * util/i386/pc/grub-install.in (datadir): Removed.
3686 (host_vendor): Likewise.
3687 (host_os): Likewise.
3688 (pkgdatadir): Likewise.
3689 (platform): New variable.
3690 (pkglibdir): Likewise.
3691 Use PKGLIBDIR instead of PKGDATADIR.
3693 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
3694 instead of GRUB_DATADIR.
3696 * util/i386/pc/grub-mkimage.c (usage): Likewise.
3698 * util/i386/efi/grub-mkimage.c (usage): Likewise.
3701 * configure.ac (--with-platform): New option.
3702 Use PLATFORM instead of HOST_VENDOR to specify a platform.
3704 * Makefile.in: Include a makefile based on PLATFORM instead of
3706 (pkgdatadir): Not appended by the machine type.
3707 (pkglibdir): Appended by the machine type.
3708 (host_vendor): Removed.
3709 (platform): New variable.
3710 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
3711 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
3712 (uninstall): Likewise.
3714 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
3716 Use the environment context in the menu. Remove the commands
3717 "default" and "timeout", and use variables instead.
3719 * normal/menu.c: Include grub/env.h.
3720 (print_entry): Cast TITLE to silence gcc.
3721 (get_timeout): New function.
3722 (set_timeout): Likewise.
3723 (get_entry_number): Likewise.
3724 (run_menu): Use a default entry, a fallback entry and a timeout
3725 in the environment variables "default", "fallback" and
3726 "timeout". Also, tweak the default entry if it is not within the
3727 current menu entries.
3728 (grub_menu_run): Use a fallback entry in the environment variable
3731 * normal/main.c (read_config_file): Do not initialize
3732 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
3734 (grub_normal_execute): Use a data slot to store the menu.
3736 * include/grub/normal.h (struct grub_menu): Removed default_entry,
3737 fallback_entry and timeout.
3738 (struct grub_menu_list): Removed.
3739 (grub_menu_list_t): Likewise.
3740 (struct grub_context): Likewise.
3741 (grub_context_t): Likewise.
3742 (grub_context_get): Likewise.
3743 (grub_context_get_current_menu): Likewise.
3744 (grub_context_push_menu): Likewise.
3745 (grub_context_pop_menu): Likewise.
3746 (grub_default_init): Likewise.
3747 (grub_default_fini): Likewise.
3748 (grub_timeout_init): Likewise.
3749 (grub_timeout_fini): Likewise.
3751 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
3753 (normal_mod_SOURCES): Removed normal/context.c.
3755 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
3756 commands/default.c, commands/timeout.c and normal/context.c.
3757 (normal_mod_SOURCES): Removed normal/context.c.
3759 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
3760 commands/timeout.c and normal/context.c.
3761 (normal_mod_SOURCES): Removed normal/context.c.
3763 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
3764 commands/default.c, commands/timeout.c and normal/context.c.
3765 (normal_mod_SOURCES): Removed normal/context.c.
3767 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
3769 (default_mod_SOURCES): Removed.
3770 (default_mod_CFLAGS): Likewise.
3771 (default_mod_LDFLAGS): Likewise.
3772 (timeout_mod_SOURCES): Removed.
3773 (timeout_mod_CFLAGS): Likewise.
3774 (timeout_mod_LDFLAGS): Likewise.
3776 * DISTLIST: Removed commands/default.c, commands/timeout.c and
3779 * commands/default.c: Removed.
3780 * commands/timeout.c: Likewise.
3781 * normal/context.c: Likewise.
3783 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
3785 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
3787 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
3789 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
3790 "next" to "prev" for readability.
3791 (struct grub_env_sorted_var): New struct.
3792 (grub_env_context): Renamed to ...
3793 (initial_context): ... this.
3794 (grub_env_var_context): Renamed to ...
3795 (current_context): ... this.
3796 (grub_env_find): Look only at CURRENT_CONTEXT.
3797 (grub_env_context_open): Rewritten to copy exported variables from
3799 (grub_env_context_close): Rewritten according to the new
3800 scheme. Also, add an assertion to prevent the initial context from
3802 (grub_env_insert): Removed the code for the sorted list.
3803 (grub_env_remove): Likewise.
3804 (grub_env_export): Simply mark the variable with
3805 GRUB_ENV_VAR_GLOBAL.
3806 (grub_env_set): A cosmetic change for naming consistency.
3807 (grub_env_get): Likewise.
3808 (grub_env_unset): Likewise.
3809 (grub_env_iterate): Rewritten to sort variables within this
3811 (grub_register_variable_hook): Fixed for naming consistency. Call
3812 grub_env_find again, only if NAME is not found at the first time.
3813 (mangle_data_slot_name): New function.
3814 (grub_env_set_data_slot): Likewise.
3815 (grub_env_get_data_slot): Likewise.
3816 (grub_env_unset_data_slot): Likewise.
3818 * include/grub/env.h (grub_env_var_type): New enum.
3819 (GRUB_ENV_VAR_LOCAL): New constant.
3820 (GRUB_ENV_VAR_GLOBAL): Likewise.
3821 (GRUB_ENV_VAR_DATA): Likewise.
3822 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
3824 (grub_env_set): Replace VAR with NAME for consistency.
3825 (grub_register_variable_hook): Likewise.
3826 (grub_env_export): Specify the name of the argument.
3827 (grub_env_set_data_slot): New prototype.
3828 (grub_env_get_data_slot): Likewise.
3829 (grub_env_unset_data_slot): Likewise.
3831 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
3833 Extend the loader so that GRUB can accept a loader which comes
3834 back to GRUB when a loaded image exits. Also, this change adds
3835 support for a chainloader on EFI.
3837 * term/efi/console.c: Include grub/misc.h.
3838 (grub_console_checkkey): Display a scan code on the top for
3839 debugging. This will be removed once the EFI port gets stable.
3840 Correct the scan code mapping.
3842 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
3843 allocate memory from larger regions, in order to reduce the number
3844 of allocated regions. Otherwise, the MacOSX loader panics.
3845 (filter_memory_map): Avoid less than 1MB for compatibility with
3847 (add_memory_regions): Allocate from the tail of a region, if
3848 possible, to avoid allocating a region near to 1MB, for the MacOSX
3851 * kern/efi/init.c (grub_efi_set_prefix): Specify
3852 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
3854 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
3855 argument IMAGE_HANDLE and specify it to get a loaded image.
3856 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
3857 grub_efi_get_loaded_image.
3858 (grub_efi_get_filename): Divide the legnth by the size of
3860 (grub_efi_get_device_path): New function.
3861 (grub_efi_print_device_path): Print End Device Path nodes. Divide
3862 the length by the size of grub_efi_char16_t for a file path device
3865 * kern/loader.c (grub_loader_noreturn): New variable.
3866 (grub_loader_set): Accept a new argument NORETURN. Set
3867 GRUB_LOADER_NORETURN to NORETURN.
3868 All callers changed.
3869 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
3872 * include/grub/efi/efi.h (grub_efi_get_device_path): New
3874 (grub_efi_get_loaded_image): Take an argument to specify an image
3877 * include/grub/loader.h (grub_loader_set): Added one more argument
3880 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
3881 instead of grub_efi_open_protocol.
3882 (grub_efidisk_get_device_name): Likewise.
3883 (grub_efidisk_close): Print a newline.
3884 (grub_efidisk_get_device_handle): Fixed to use
3885 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
3886 GRUB_EFI_DEVICE_PATH_TYPE.
3888 * disk/efi/efidisk.c (device_path_guid): Moved to ...
3889 * kern/efi/efi.c (device_path_guid): ... here.
3891 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
3893 (kernel_mod_HEADERS): Added efi/disk.h.
3894 (_chain_mod_SOURCES): New variable.
3895 (_chain_mod_CFLAGS): Likewise.
3896 (_chain_mod_LDFLAGS): Likewise.
3897 (chain_mod_SOURCES): Likewise.
3898 (chain_mod_CFLAGS): Likewise.
3899 (chain_mod_LDFLAGS): Likewise.
3901 * DISTLIST: Added include/grub/efi/chainloader.h,
3902 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
3904 * include/grub/efi/chainloader.h: New file.
3905 * loader/efi/chainloader.c: Likewise.
3906 * loader/efi/chainloader_normal.c: Likewise.
3908 2006-04-30 Marco Gerards <marco@gnu.org>
3910 * commands/configfile.c (grub_cmd_source): New function.
3911 (GRUB_MOD_INIT): Register the commands `source' and `.'.
3912 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
3914 2006-04-30 Marco Gerards <marco@gnu.org>
3916 * normal/execute.c (grub_script_execute_cmd): Change the return
3917 type to `grub_err_t'. Correctly return the error.
3918 (grub_script_execute_cmdline): In case a command line is not a
3919 command or a function, try to interpret it as an assignment.
3921 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
3923 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
3924 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
3925 skip a node whose name is obviously invalid as UTF-16,
3926 i.e. contains a NUL character. Stop the iteration when the last
3927 directory entry is found. Instead of using the return value of
3928 grub_hfsplus_btree_iterate_node, store the value in RET and use
3929 it, because the iterator can be stopped by the last directory
3932 2006-04-30 Marco Gerards <marco@gnu.org>
3934 * include/grub/env.h (grub_env_export): New prototype. Reported
3935 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
3937 2006-04-30 Marco Gerards <marco@gnu.org>
3939 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
3940 size of the extents in a catalog file record.
3942 2006-04-29 Marco Gerards <marco@gnu.org>
3944 * commands/configfile.c (grub_cmd_configfile): Execute the
3945 configfile within its own context.
3947 * include/grub/env.h (grub_env_context_open): New prototype.
3948 (grub_env_context_close): Likewise.
3950 * kern/env.c (grub_env): Removed.
3951 (grub_env_sorted): Likewise.
3952 (grub_env_context): New variable.
3953 (grub_env_var_context): Likewise.
3954 (grub_env_find): Search both the active context and the global
3956 (grub_env_context_open): New function.
3957 (grub_env_context_close): Likewise.
3958 (grub_env_insert): Likewise.
3959 (grub_env_remove): Likewise.
3960 (grub_env_export): Likewise.
3961 (grub_env_set): Changed to use helper functions to avoid code
3963 (grub_env_iterate): Rewritten so both the current context and the
3964 global context are being used.
3966 * normal/command.c (export_command): New function.
3967 (grub_command_init): Register the `export' function.
3969 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
3971 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
3972 explicitly to suppress gcc's warnings.
3973 * fs/fat.c (grub_fat_find_dir): Likewise.
3974 (grub_fat_label): Likewise.
3975 * fs/xfs.c (grub_xfs_read_inode): Likewise.
3976 (grub_xfs_mount): Likewise.
3977 (grub_xfs_label): Likewise.
3978 * fs/affs.c (grub_affs_mount): Likewise.
3979 (grub_affs_label): Likewise.
3980 (grub_affs_iterate_dir): Likewise.
3981 * fs/sfs.c (grub_sfs_mount): Likewise.
3982 (grub_sfs_iterate_dir): Likewise.
3983 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
3984 * fs/hfs.c (grub_hfs_mount): Likewise.
3985 (grub_hfs_cmp_catkeys): Likewise.
3986 (grub_hfs_find_dir): Likewise.
3987 (grub_hfs_dir): Likewise.
3988 (grub_hfs_label): Likewise.
3989 * fs/jfs.c (grub_jfs_mount): Likewise.
3990 (grub_jfs_opendir): Likewise.
3991 (grub_jfs_getent): Likewise.
3992 (grub_jfs_lookup_symlink): Likewise.
3993 (grub_jfs_label): Likewise.
3994 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
3995 (grub_hfsplus_iterate_dir): Likewise.
3996 (grub_hfsplus_btree_iterate_node): Made static.
3998 * util/grub-emu.c (prefix): New variable.
3999 (grub_machine_set_prefix): New function.
4000 (main): Do not set the environment variable "prefix" here. Only
4001 set PREFIX, which is used later by grub_machine_set_prefix.
4003 * include/grub/video.h: Do not include grub/symbol.h.
4004 (grub_video_register): Not exported. This symbol is not defined in
4006 (grub_video_unregister): Likewise.
4007 (grub_video_iterate): Likewise.
4008 (grub_video_setup): Likewise.
4009 (grub_video_restore): Likewise.
4010 (grub_video_get_info): Likewise.
4011 (grub_video_get_blit_format): Likewise.
4012 (grub_video_set_palette): Likewise.
4013 (grub_video_get_palette): Likewise.
4014 (grub_video_set_viewport): Likewise.
4015 (grub_video_get_viewport): Likewise.
4016 (grub_video_map_color): Likewise.
4017 (grub_video_map_rgb): Likewise.
4018 (grub_video_map_rgba): Likewise.
4019 (grub_video_fill_rect): Likewise.
4020 (grub_video_blit_glyph): Likewise.
4021 (grub_video_blit_bitmap): Likewise.
4022 (grub_video_blit_render_target): Likewise.
4023 (grub_video_scroll): Likewise.
4024 (grub_video_swap_buffers): Likewise.
4025 (grub_video_create_render_target): Likewise.
4026 (grub_video_delete_render_target): Likewise.
4027 (grub_video_set_active_render_target): Likewise.
4029 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
4031 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
4033 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
4034 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4035 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4036 instead of $(srcdir)/genkernsyms.sh.
4038 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
4039 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4040 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4041 instead of $(srcdir)/genkernsyms.sh.
4043 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
4044 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4045 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4046 instead of $(srcdir)/genkernsyms.sh.
4048 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
4049 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
4050 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
4051 instead of $(srcdir)/genkernsyms.sh.
4053 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
4056 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
4058 (gensymlist.sh): New target.
4059 (genkernsyms.sh): Likewise.
4061 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
4062 genkernsyms.sh.in and gensymlist.sh.in.
4064 * genkernsyms.sh: Removed.
4065 * gensymlist.sh: Likewise.
4067 * genkernsyms.sh.in: New file.
4068 * gensymlist.sh.in: Likewise.
4070 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
4072 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
4073 clobber "prefix", since we may have already set it manually.
4075 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
4077 * kern/misc.c (abort): New alias for grub_abort.
4079 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
4081 A new machine-specific function "grub_machine_set_prefix" is
4082 defined. This is called after loading modules, so that a prefix
4083 initialization can use modules. Also, this change adds an
4084 intensive debugging feature for the memory manager via the
4085 configure option "--enable-mm-debug".
4087 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
4090 * kern/sparc64/ieee1275/init.c (abort): Removed.
4091 (grub_stop): Likewise.
4092 (grub_exit): New function.
4093 (grub_set_prefix): Renamed to ...
4094 (grub_machine_set_prefix): ... this.
4095 (grub_machine_init): Do not call grub_set_prefix.
4097 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
4098 (grub_machine_set_prefix): ... this.
4099 (grub_machine_init): Do not call grub_set_prefix.
4101 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
4102 (grub_machine_init): Do not set the prefix here.
4104 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
4106 * kern/efi/init.c: Include grub/mm.h.
4107 (grub_efi_set_prefix): New function.
4109 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
4110 (grub_efi_get_filename): New function.
4111 (grub_print_device_path): Renamed to ...
4112 (grub_efi_print_device_path): ... this.
4114 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
4115 [MM_DEBUG] (grub_realloc): Likewise.
4116 [MM_DEBUG] (grub_free): Likewise.
4117 [MM_DEBUG] (grub_memalign): Likewise.
4118 [MM_DEBUG] (grub_mm_debug): New variable.
4119 [MM_DEBUG] (grub_debug_malloc): New function.
4120 [MM_DEBUG] (grub_debug_free): New function.
4121 [MM_DEBUG] (grub_debug_realloc): New function.
4122 [MM_DEBUG] (grub_debug_memalign): New function.
4124 * kern/misc.c (grub_abort): Print a newline to distinguish
4127 * kern/main.c (grub_main): Call grub_machine_set_prefix and
4128 grub_set_root_dev after loading modules. This is necessary when
4129 setting a prefix depends on modules.
4131 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
4132 (grub_efi_print_device_path): ... this.
4133 (grub_efi_get_filename): New prototype.
4134 (grub_efi_set_prefix): Likewise.
4136 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
4138 (grub_efidisk_get_device_handle): New prototype.
4139 (grub_efidisk_get_device_name): Likewise.
4141 * include/grub/mm.h: Include config.h.
4142 (MM_DEBUG): Removed.
4143 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
4144 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
4145 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
4146 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
4147 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
4148 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
4149 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
4150 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
4151 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
4153 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
4155 * disk/efi/efidisk.c: Include grub/partition.h.
4156 (iterate_child_devices): New function.
4157 (add_device): First, compare only last device path nodes, so that
4158 devices are sorted by the types.
4159 (grub_efidisk_get_device_handle): New function.
4160 (grub_efidisk_get_device_name): Likewise.
4162 * configure.ac (--enable-mm-debug): New option to enable the
4163 memory manager debugging feature. This makes the binary much
4164 bigger, so is disabled by default.
4166 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
4168 Use grub_abort instead of grub_stop, and grub_exit must be
4169 define in each architecture now. Also, this change adds support
4172 * util/i386/pc/grub-probefs.c: Include grub/term.h.
4173 (grub_getkey): New function.
4174 (grub_term_get_current): Likewise.
4176 * util/i386/pc/grub-setup.c: Include grub/term.h.
4177 (grub_getkey): New function.
4178 (grub_term_get_current): Likewise.
4180 * util/misc.c (grub_stop): Renamed to ...
4181 (grub_exit): ... this.
4183 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
4184 (grub_exit): ... this.
4185 (grub_machine_init): Use grub_abort instead of abort.
4186 (grub_stop): Removed.
4188 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
4191 * kern/i386/pc/startup.S (grub_exit): New function.
4192 (cold_reboot): New label.
4194 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
4195 (grub_efi_init): Call grub_efidisk_init.
4196 (grub_efi_fini): Call grub_efidisk_fini.
4198 * kern/efi/efi.c: Include grub/mm.h.
4199 (grub_efi_console_control_guid): Renamed to ...
4200 (console_control_guid): ... this.
4201 (grub_efi_loaded_image_guid): Renamed to ...
4202 (loaded_image_guid): ... this.
4203 (grub_efi_locate_handle): New function.
4204 (grub_efi_open_protocol): Likewise.
4205 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
4206 GRUB_EFI_CONSOLE_CONTROL_GUID.
4207 (grub_efi_exit): Removed.
4208 (grub_stop): Likewise.
4209 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
4210 (grub_exit): New function.
4211 (grub_print_device_path): Likewise.
4213 * kern/rescue.c (grub_rescue_cmd_exit): New function.
4214 (grub_enter_rescue_mode): Register "exit".
4216 * kern/misc.c (grub_real_dprintf): A cosmetic change.
4217 (grub_abort): New function.
4219 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
4221 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
4223 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
4225 * include/grub/efi/efi.h (grub_efi_exit): Removed.
4226 (grub_print_device_path): New prototype.
4227 (grub_efi_locate_handle): Likewise.
4228 (grub_efi_open_protocol): Likewise.
4230 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
4231 * disk/efi/efidisk.c: Likewise.
4233 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
4235 * include/grub/efi/console_control.h
4236 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
4238 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
4239 last 8 bytes as an array.
4240 (GRUB_EFI_DISK_IO_GUID): New macro.
4241 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
4242 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
4243 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
4245 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
4246 (struct grub_efi_device_path): Rename the member "sub_type" to
4248 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
4249 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
4250 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
4251 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
4252 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
4253 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
4254 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
4255 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
4256 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
4257 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
4258 (struct grub_efi_pci_device_path): New structure.
4259 (grub_efi_pci_device_path_t): New type.
4260 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
4261 (struct grub_efi_pccard_device_path): New structure.
4262 (grub_efi_pccard_device_path_t): New type.
4263 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
4264 (struct grub_efi_memory_mapped_device_path): New structure.
4265 (grub_efi_memory_mapped_device_path_t): New type.
4266 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
4267 (struct grub_efi_vendor_device_path): New structure.
4268 (grub_efi_vendor_device_path_t): New type.
4269 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
4270 (struct grub_efi_controller_device_path): New structure.
4271 (grub_efi_controller_device_path_t): New type.
4272 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
4273 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
4274 (struct grub_efi_acpi_device_path): New structure.
4275 (grub_efi_acpi_device_path_t): New type.
4276 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
4277 (struct grub_efi_expanded_acpi_device_path): New structure.
4278 (grub_efi_expanded_acpi_device_path_t): New type.
4279 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
4280 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
4281 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
4282 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
4283 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
4284 (struct grub_efi_atapi_device_path): New structure.
4285 (grub_efi_atapi_device_path_t): New type.
4286 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
4287 (struct grub_efi_fibre_channel_device_path): New structure.
4288 (grub_efi_fibre_channel_device_path_t): New type.
4289 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
4290 (struct grub_efi_1394_device_path): New structure.
4291 (grub_efi_1394_device_path_t): New type.
4292 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
4293 (struct grub_efi_usb_device_path): New structure.
4294 (grub_efi_usb_device_path_t): New type.
4295 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
4296 (struct grub_efi_usb_class_device_path): New structure.
4297 (grub_efi_usb_class_device_path_t): New type.
4298 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
4299 (struct grub_efi_i2o_device_path): New structure.
4300 (grub_efi_i2o_device_path_t): New type.
4301 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
4302 (struct grub_efi_mac_address_device_path): New structure.
4303 (grub_efi_mac_address_device_path_t): New type.
4304 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
4305 (struct grub_efi_ipv4_device_path): New structure.
4306 (grub_efi_ipv4_device_path_t): New type.
4307 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
4308 (struct grub_efi_ipv6_device_path): New structure.
4309 (grub_efi_ipv6_device_path_t): New type.
4310 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
4311 (struct grub_efi_infiniband_device_path): New structure.
4312 (grub_efi_infiniband_device_path_t): New type.
4313 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
4314 (struct grub_efi_uart_device_path): New structure.
4315 (grub_efi_uart_device_path_t): New type.
4316 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
4317 (struct grub_efi_vendor_messaging_device_path): New structure.
4318 (grub_efi_vendor_messaging_device_path_t): New type.
4319 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
4320 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
4321 (struct grub_efi_hard_drive_device_path): New structure.
4322 (grub_efi_hard_drive_device_path_t): New type.
4323 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
4324 (struct grub_efi_cdrom_device_path): New structure.
4325 (grub_efi_cdrom_device_path_t): New type.
4326 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
4327 (struct grub_efi_vendor_media_device_path): New structure.
4328 (grub_efi_vendor_media_device_path_t): New type.
4329 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
4330 (struct grub_efi_file_path_device_path): New structure.
4331 (grub_efi_file_path_device_path_t): New type.
4332 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
4333 (struct grub_efi_protocol_device_path): New structure.
4334 (grub_efi_protocol_device_path_t): New type.
4335 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
4336 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
4337 (struct grub_efi_bios_device_path): New structure.
4338 (grub_efi_bios_device_path_t): New type.
4339 (struct grub_efi_disk_io): New structure.
4340 (grub_efi_disk_io_t): New type.
4341 (struct grub_efi_block_io_media): New structure.
4342 (grub_efi_block_io_media_t): New type.
4343 (struct grub_efi_block_io): New structure.
4344 (grub_efi_block_io_t): New type.
4346 * include/grub/misc.h (grub_stop): Removed.
4347 (grub_exit): New prototype.
4348 (grub_abort): Likewise.
4350 * include/grub/disk.h (enum grub_disk_dev_id): Added
4351 GRUB_DISK_DEVICE_EFIDISK_ID.
4353 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
4355 (kernel_syms.lst): Remove the target if an error occurs.
4357 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
4359 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
4360 as it was simply too buggy.
4362 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
4364 * kern/misc.c (grub_lltoa): New function.
4365 (grub_vsprintf): Added support for the long long suffix,
4368 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
4370 * Makefile.in (LDFLAGS): Add variable.
4371 (LD): Remove variable.
4372 * configure.ac: Add -m32 to LDFLAGS.
4373 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
4374 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
4375 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
4376 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
4377 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
4379 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
4380 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
4381 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
4383 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
4385 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
4386 length for unknown glyph.
4388 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
4390 Add support for pre-loaded modules into the EFI port.
4392 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
4393 completely. Accept one more argument DIR. The caller has changed.
4395 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
4397 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
4398 (grub_efi_loaded_image_guid): New variable.
4399 (grub_efi_get_loaded_image): New function.
4400 (grub_arch_modules_addr): Likewise.
4402 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
4405 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
4406 (struct grub_efi_loaded_image): New structure.
4407 (grub_efi_loaded_image_t): New type.
4409 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
4411 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
4412 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
4413 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
4415 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
4417 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
4419 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
4421 * DISTLIST: Added include/grub/efi/console.h,
4422 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
4423 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
4425 * include/grub/efi/console.h: New file.
4426 * include/grub/efi/time.h: Likewise.
4427 * include/grub/i386/efi/kernel.h: Likewise.
4428 * kern/efi/init.c: Likewise.
4429 * kern/efi/mm.c: Likewise.
4430 * term/efi/console.c: Likewise.
4432 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
4433 (grub_stop): Removed.
4434 (grub_get_rtc): Likewise.
4435 (grub_machine_init): Simply call grub_efi_init.
4436 (grub_machine_fini): Call grub_efi_fini.
4438 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
4439 (grub_efi_output_string): Removed.
4440 (grub_efi_stall): New function.
4441 (grub_stop): Likewise.
4442 (grub_get_rtc): Likewise.
4444 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
4445 (grub_efi_stall): New prototype.
4446 (grub_efi_allocate_pages): Likewise.
4447 (grub_efi_free_pages): Likewise.
4448 (grub_efi_get_memory_map): Likewise.
4449 (grub_efi_mm_init): Likewise.
4450 (grub_efi_mm_fini): Likewise.
4451 (grub_efi_init): Likewise.
4452 (grub_efi_fini): Likewise.
4454 * include/grub/i386/efi/time.h: Do not include
4455 grub/symbol.h. Include grub/efi/time.h.
4456 (GRUB_TICKS_PER_SECOND): Removed.
4457 (grub_get_rtc): Likewise.
4459 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
4460 Added padding. The EFI spec is buggy.
4461 (GRUB_EFI_BLACK): New macro.
4462 (GRUB_EFI_BLUE): Likewise.
4463 (GRUB_EFI_GREEN): Likewise.
4464 (GRUB_EFI_CYAN): Likewise.
4465 (GRUB_EFI_RED): Likewise.
4466 (GRUB_EFI_MAGENTA): Likewise.
4467 (GRUB_EFI_BROWN): Likewise.
4468 (GRUB_EFI_LIGHTGRAY): Likewise.
4469 (GRUB_EFI_BRIGHT): Likewise.
4470 (GRUB_EFI_DARKGRAY): Likewise.
4471 (GRUB_EFI_LIGHTBLUE): Likewise.
4472 (GRUB_EFI_LIGHTGREEN): Likewise.
4473 (GRUB_EFI_LIGHTCYAN): Likewise.
4474 (GRUB_EFI_LIGHTRED): Likewise.
4475 (GRUB_EFI_LIGHTMAGENTA): Likewise.
4476 (GRUB_EFI_YELLOW): Likewise.
4477 (GRUB_EFI_WHITE): Likewise.
4478 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
4479 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
4480 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
4481 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
4482 (GRUB_EFI_BACKGROUND_RED): Likewise.
4483 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
4484 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
4485 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
4486 (GRUB_EFI_TEXT_ATTR): Likewise.
4488 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
4489 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
4490 (kernel_mod_HEADERS): Added efi/time.h.
4492 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
4494 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
4495 include/grub/efi/api.h, include/grub/efi/console_control.h,
4496 include/grub/efi/efi.h, include/grub/efi/pe32.h,
4497 include/grub/i386/efi/time.h, kern/efi/efi.c,
4498 kern/i386/efi/init.c, kern/i386/efi/startup.S,
4499 and util/i386/efi/grub-mkimage.c.
4501 * Makefile.in (RMKFILES): Added i386-efi.rmk.
4503 * genmk.rb (PModule#rule): Do not export symbols if
4504 #{prefix}_EXPORTS is set to "no".
4506 * conf/i386-efi.mk: New file.
4507 * conf/i386-efi.rmk: Likewise.
4508 * include/grub/efi/api.h: Likewise.
4509 * include/grub/efi/console_control.h: Likewise.
4510 * include/grub/efi/efi.h: Likewise.
4511 * include/grub/efi/pe32.h: Likewise.
4512 * include/grub/i386/efi/time.h: Likewise.
4513 * kern/efi/efi.c: Likewise.
4514 * kern/i386/efi/init.c: Likewise.
4515 * kern/i386/efi/startup.S: Likewise.
4516 * util/i386/efi/grub-mkimage.c: Likewise.
4518 2006-04-17 Marco Gerards <marco@gnu.org>
4520 * include/grub/script.h: Include <grub/parser.h> and
4521 "grub_script.tab.h".
4522 (struct grub_lexer_param): New struct.
4523 (struct grub_parser_param): Likewise.
4524 (grub_script_create_arglist): Pass the state in an argument.
4525 (grub_script_add_arglist): Likewise.
4526 (grub_script_create_cmdline): Likewise.
4527 (grub_script_create_cmdblock): Likewise.
4528 (grub_script_create_cmdif): Likewise.
4529 (grub_script_create_cmdmenu): Likewise.
4530 (grub_script_add_cmd): Likewise.
4531 (grub_script_arg_add): Likewise.
4532 (grub_script_lexer_ref): Likewise.
4533 (grub_script_lexer_deref): Likewise.
4534 (grub_script_lexer_record_start): Likewise.
4535 (grub_script_lexer_record_stop): Likewise.
4536 (grub_script_mem_record): Likewise.
4537 (grub_script_mem_record_stop): Likewise.
4538 (grub_script_malloc): Likewise.
4539 (grub_script_yylex): Likewise.
4540 (grub_script_yyparse): Likewise.
4541 (grub_script_yyerror): Likewise.
4542 (grub_script_yylex): Likewise.
4543 (grub_script_lexer_init): Return the state.
4545 * normal/lexer.c (grub_script_lexer_state): Removed variable.
4546 (grub_script_lexer_done): Likewise.
4547 (grub_script_lexer_getline): Likewise.
4548 (grub_script_lexer_refs): Likewise.
4550 (newscript): Likewise.
4552 (recording): Likewise.
4553 (recordpos): Likewise.
4554 (recordlen): Likewise.
4555 (grub_script_lexer_init): Return the state instead of setting
4557 (grub_script_lexer_ref): Use the newly added argument for state
4559 (grub_script_lexer_deref): Likewise.
4560 (grub_script_lexer_record_start): Likewise.
4561 (grub_script_lexer_record_stop): Likewise.
4562 (recordchar): Likewise.
4563 (nextchar): Likewise.
4564 (grub_script_yylex2): Likewise.
4565 (grub_script_yylex): Likewise.
4566 (grub_script_yyerror): Likewise.
4568 * normal/parser.y (func_mem): Removed variable.
4569 (menu_entry): Likewise.
4571 (%lex-param): New parser option.
4572 (%parse-param): Likewise.
4573 (script): Always return the AST.
4574 (argument): Pass the state around.
4575 (arguments): Likewise.
4576 (grubcmd): Likewise.
4577 (commands): Likewise.
4578 (function): Likewise.
4579 (menuentry): Likewise.
4580 (if_statement): Likewise.
4583 * normal/script.c (grub_script_memused): Removed variable.
4584 (grub_script_parsed): Likewise.
4585 (grub_script_malloc): Added a state argument. Use that instead of
4587 (grub_script_mem_record): Likewise.
4588 (grub_script_mem_record_stop): Likewise.
4589 (grub_script_arg_add): Likewise.
4590 (grub_script_add_arglist): Likewise.
4591 (grub_script_create_cmdline): Likewise.
4592 (grub_script_create_cmdif): Likewise.
4593 (grub_script_create_cmdmenu): Likewise.
4594 (grub_script_add_cmd): Likewise.
4595 (grub_script_parse): Setup the state before calling the parser.
4597 2006-04-16 Marco Gerards <marco@gnu.org>
4599 * normal/command.c (grub_command_init): Remove the title command.
4601 * normal/lexer.c (grub_script_yylex): Renamed from this...
4602 (grub_script_yylex2): ... to this.
4603 (grub_script_yylex): New function. Temporary
4604 introduced to filter some tokens.
4605 (grub_script_yyerror): Print a newline.
4607 * normal/main.c (read_config_file): Output information about the
4608 lines that contain errors. Wait for a key after all lines have
4609 been processed. Don't return an empty menu.
4611 * normal/parser.y (func_mem): Don't initialize.
4612 (menu_entry): Likewise.
4613 (err): New variable.
4614 (script): Don't return anything when an error was encountered.
4615 (ws, returns): Removed rules.
4616 (argument): Disabled concatenated variable support.
4617 (arguments): Remove explicit separators.
4618 (grubcmd): Likewise.
4619 (function): Likewise.
4620 (menuentry): Likewise.
4622 (commands): Likewise. Add error handling.
4624 * normal/script.c (grub_script_create_cmdline): If
4625 `grub_script_parsed' is 0, assume the parser encountered an error.
4627 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
4629 * configure.ac: Add support for EFI. Fix the typo
4630 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
4632 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
4634 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
4635 foreign multibyte characters should be shown correctly.
4637 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
4639 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
4641 (read_config_file): Made it to close file before returning.
4643 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
4645 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
4646 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
4647 video/i386/pc/vbefill.c.
4649 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
4650 video/i386/pc/vbefill.c.
4652 * include/grub/video.h (grub_video_blit_format): New enum.
4653 (grub_video_mode_info): Added new member blit_format.
4654 (grub_video_get_blit_format): New function prototype.
4656 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
4658 (grub_video_vbe_map_rgb): Likewise.
4659 (grub_video_vbe_unmap_color): Likewise.
4661 * include/grub/i386/pc/vbeblit.h: New file.
4663 * include/grub/i386/pc/vbefill.h: New file.
4665 * video/video.c (grub_video_get_blit_format): New function.
4666 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
4667 (grub_video_vbe_map_rgb): Likewise.
4668 (grub_video_vbe_unmap_color): Likewise.
4670 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
4672 (grub_video_vbe_blit_render_target): Changed to use more optimized
4674 (grub_video_vbe_setup): Added detection for optimized settings.
4675 (grub_video_vbe_create_render_target): Likewise.
4677 * video/i386/pc/vbeblit.c: New file.
4679 * video/i386/pc/vbefill.c: New file.
4681 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
4683 * font/manager.c (grub_font_get_glyph): Removed font fixup from
4686 * util/unifont2pff.rb: ... and moved it to here. Improved argument
4687 parsing to support both hex and dec ranges. If filename was missing
4688 show usage information.
4690 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
4692 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
4693 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
4695 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
4696 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
4697 (video_mod_SOURCES): Added.
4698 (video_mod_CFLAGS): Likewise.
4699 (video_mod_LDFLAGS): Likewise.
4700 (gfxterm_mod_SOURCES): Likewise.
4701 (gfxterm_mod_CFLAGS): Likewise.
4702 (gfxterm_mod_LDFLAGS): Likewise.
4703 (videotest_mod_SOURCES): Likewise.
4704 (videotest_mod_CFLAGS): Likewise.
4705 (videotest_mod_LDFLAGS): Likewise.
4706 (vesafb_mod_SOURCES): Removed.
4707 (vesafb_mod_CFLAGS): Likewise.
4708 (vesafb_mod_LDFLAGS): Likewise.
4709 (vga_mod_SOURCES): Likewise.
4710 (vga_mod_CFLAGS): Likewise.
4711 (vga_mod_LDFLAGS): Likewise.
4713 * commands/videotest.c: New file.
4715 * font/manager.c (fill_with_default_glyph): Modified to use
4717 (grub_font_get_glyph): Likewise.
4718 (fontmanager): Renamed from this...
4719 (font_manager): ... to this.
4721 * include/grub/font.h (grub_font_glyph): Added new structure.
4722 (grub_font_get_glyph): Modified to use grub_font_glyph.
4724 * include/grub/misc.h (grub_abs): Added as inline function.
4726 * include/grub/video.h: New file.
4728 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
4729 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
4730 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
4731 (grub_vbe_get_controller_info): Renamed from this...
4732 (grub_vbe_bios_get_controller_info): ... to this.
4733 (grub_vbe_get_mode_info): Renamed from this...
4734 (grub_vbe_bios_get_mode_info): ... to this.
4735 (grub_vbe_set_mode): Renamed from this...
4736 (grub_vbe_bios_set_mode): ... to this.
4737 (grub_vbe_get_mode): Renamed from this...
4738 (grub_vbe_bios_get_mode): ... to this.
4739 (grub_vbe_set_memory_window): Renamed from this...
4740 (grub_vbe_bios_set_memory_window): ... to this.
4741 (grub_vbe_get_memory_window): Renamed from this...
4742 (grub_vbe_bios_get_memory_window): ... to this.
4743 (grub_vbe_set_scanline_length): Renamed from this...
4744 (grub_vbe_set_scanline_length): ... to this.
4745 (grub_vbe_get_scanline_length): Renamed from this...
4746 (grub_vbe_bios_get_scanline_length): ... to this.
4747 (grub_vbe_set_display_start): Renamed from this...
4748 (grub_vbe_bios_set_display_start): ... to this.
4749 (grub_vbe_get_display_start): Renamed from this...
4750 (grub_vbe_bios_get_display_start): ... to this.
4751 (grub_vbe_set_palette_data): Renamed from this...
4752 (grub_vbe_bios_set_palette_data): ... to this.
4753 (grub_vbe_set_pixel_rgb): Removed.
4754 (grub_vbe_set_pixel_index): Likewise.
4756 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
4758 (grub_vbe_bios_get_controller_info): ... to this.
4759 (grub_vbe_get_mode_info): Renamed from this...
4760 (grub_vbe_bios_get_mode_info): ... to this.
4761 (grub_vbe_set_mode): Renamed from this...
4762 (grub_vbe_bios_set_mode): ... to this.
4763 (grub_vbe_get_mode): Renamed from this...
4764 (grub_vbe_bios_get_mode): ... to this.
4765 (grub_vbe_set_memory_window): Renamed from this...
4766 (grub_vbe_bios_set_memory_window): ... to this.
4767 (grub_vbe_get_memory_window): Renamed from this...
4768 (grub_vbe_bios_get_memory_window): ... to this.
4769 (grub_vbe_set_scanline_length): Renamed from this...
4770 (grub_vbe_set_scanline_length): ... to this.
4771 (grub_vbe_get_scanline_length): Renamed from this...
4772 (grub_vbe_bios_get_scanline_length): ... to this.
4773 (grub_vbe_set_display_start): Renamed from this...
4774 (grub_vbe_bios_set_display_start): ... to this.
4775 (grub_vbe_get_display_start): Renamed from this...
4776 (grub_vbe_bios_get_display_start): ... to this.
4777 (grub_vbe_set_palette_data): Renamed from this...
4778 (grub_vbe_bios_set_palette_data): ... to this.
4779 (grub_vbe_bios_get_controller_info): Fixed problem with registers
4780 getting corrupted after calling it. Added more pushes and pops.
4781 (grub_vbe_bios_set_mode): Likewise.
4782 (grub_vbe_bios_get_mode): Likewise.
4783 (grub_vbe_bios_get_memory_window): Likewise.
4784 (grub_vbe_bios_set_scanline_length): Likewise.
4785 (grub_vbe_bios_get_scanline_length): Likewise.
4786 (grub_vbe_bios_get_display_start): Likewise.
4787 (grub_vbe_bios_set_palette_data): Likewise.
4789 * normal/cmdline.c (cl_set_pos): Refresh the screen.
4790 (cl_insert): Likewise.
4791 (cl_delete): Likewise.
4793 * term/gfxterm.c: New file.
4795 * term/i386/pc/vesafb.c: Removed file.
4797 * video/video.c: New file.
4799 * video/i386/pc/vbe.c (real2pm): Added new function.
4800 (grub_video_vbe_draw_pixel): Likewise.
4801 (grub_video_vbe_get_video_ptr): Likewise.
4802 (grub_video_vbe_get_pixel): Likewise
4803 (grub_video_vbe_init): Likewise.
4804 (grub_video_vbe_fini): Likewise.
4805 (grub_video_vbe_setup): Likewise.
4806 (grub_video_vbe_get_info): Likewise.
4807 (grub_video_vbe_set_palette): Likewise.
4808 (grub_video_vbe_get_palette): Likewise.
4809 (grub_video_vbe_set_viewport): Likewise.
4810 (grub_video_vbe_get_viewport): Likewise.
4811 (grub_video_vbe_map_color): Likewise.
4812 (grub_video_vbe_map_rgb): Likewise.
4813 (grub_video_vbe_map_rgba): Likewise.
4814 (grub_video_vbe_unmap_color): Likewise.
4815 (grub_video_vbe_fill_rect): Likewise.
4816 (grub_video_vbe_blit_glyph): Likewise.
4817 (grub_video_vbe_blit_bitmap): Likewise.
4818 (grub_video_vbe_blit_render_target): Likewise.
4819 (grub_video_vbe_scroll): Likewise.
4820 (grub_video_vbe_swap_buffers): Likewise.
4821 (grub_video_vbe_create_render_target): Likewise.
4822 (grub_video_vbe_delete_render_target): Likewise.
4823 (grub_video_vbe_set_active_render_target): Likewise.
4824 (grub_vbe_set_pixel_rgb): Remove function.
4825 (grub_vbe_set_pixel_index): Likewise.
4826 (index_color_mode): Remove static variable.
4827 (active_mode): Likewise.
4828 (framebuffer): Likewise.
4829 (bytes_per_scan_line): Likewise.
4830 (grub_video_vbe_adapter): Added new static variable.
4831 (framebuffer): Likewise.
4832 (render_target): Likewise.
4833 (initial_mode): Likewise.
4834 (mode_in_use): Likewise.
4835 (mode_list): Likewise.
4837 2006-03-10 Marco Gerards <marco@gnu.org>
4839 * configure.ac (AC_INIT): Bumped to 1.93.
4841 * DISTLIST: Added `include/grub/hfs.h'.
4843 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
4845 * boot/i386/pc/boot.S (general_error): Before looping, try INT
4846 18H, which might help the BIOS falling back to next boot media.
4848 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
4850 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
4851 Poe Chen <poe.poechen@gmail.com>.
4853 2006-01-17 Marco Gerards <marco@gnu.org>
4855 * include/grub/normal.h: Include <grub/script.h>.
4856 (grub_command_list): Removed struct.
4857 (grub_command_list_t): Removed type.
4858 (grub_menu_entry): Remove members `num' and `command_list'. Add
4859 members `commands' and `sourcecode'.
4860 * include/grub/script.h: Add inclusion guards.
4861 (grub_script_cmd_menuentry): New struct.
4862 (grub_script_execute_menuentry): New prototype.
4863 (grub_script_lexer_record_start): Likewise.
4864 (grub_script_lexer_record_stop): Likewise.
4865 * normal/execute.c (grub_script_execute_menuentry): New function.
4866 * normal/lexer.c (record, recording, recordpos, recordlen): New
4868 (grub_script_lexer_record_start): New function.
4869 (grub_script_lexer_record_stop): Likewise.
4870 (recordchar): Likewise.
4871 (nextchar): Likewise.
4872 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
4873 2048 as the buffer size. Add the tokens `menuentry' and `@'.
4874 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
4875 (current_menu): New variable.
4876 (free_menu): Mainly rewritten.
4877 (grub_normal_menu_addentry): New function.
4878 (read_config_file): Rewritten.
4879 * normal/menu.c (run_menu_entry): Mainly rewritten.
4880 * normal/menu_entry.c (make_screen): Rewritten te code to insert
4882 (run): Mainly rewritten.
4883 * normal/parser.y (menu_entry): New variable.
4884 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
4885 (menuentry): New rule.
4886 (command): Add `menuentry'.
4887 (if_statement): Allow additional returns before `fi'.
4888 * normal/script.c (grub_script_create_cmdmenu): New function.
4890 2006-01-03 Marco Gerards <marco@gnu.org>
4892 * INSTALL: GNU Bison is required.
4893 * configure.ac: Rewritten the test to detect Bison.
4894 * Makefile.in (YACC): New variable. Reported by Xun Sun
4895 <xun.sun.cn@gmail.com>.
4897 2006-01-03 Marco Gerards <marco@gnu.org>
4899 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
4900 the HFS+ filesystem to filesystem blocks.
4901 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
4902 GCC warning is silenced.
4904 2006-01-03 Marco Gerards <marco@gnu.org>
4906 * partmap/apple.c (apple_partition_map_iterate): Convert the data
4907 read from disk from big endian to host byte order.
4909 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
4911 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
4913 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
4914 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
4915 embedded HFS+ filesystem.
4916 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
4917 (grub_hfs_sblock): Move from here...
4918 * include/grub/hfs.h: To here... New file.
4919 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
4921 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
4923 (grub_hfsplus_volheader): Change type of member `magic' to
4925 (grub_hfsplus_data): Add new member `embedded_offset'.
4926 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
4928 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
4929 Calculate the offset.
4931 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4933 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
4935 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
4937 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4939 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
4940 ENV->NAME is NULL after allocating ENV->VALUE.
4942 2005-12-25 Marco Gerards <marco@gnu.org>
4944 * kern/env.c (grub_env_set): Rewritten the error handling code.
4946 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4948 * geninit.sh: Made more robust, and more portable.
4950 2005-12-25 Marco Gerards <marco@gnu.org>
4952 Add support for Apple HFS+ filesystems.
4954 * fs/hfsplus.c: New file.
4956 * DISTLIST: Added `fs/hfsplus.c'.
4958 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
4959 (hfsplus_mod_SOURCES): New variable.
4960 (hfsplus_mod_CFLAGS): Likewise.
4961 (hfsplus_mod_LDFLAGS): Likewise.
4962 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
4963 (grub_setup_SOURCES): Likewise.
4964 (grub_mkdevicemap_SOURCES): Likewise.
4965 (grub_emu_SOURCES): Likewise.
4966 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4968 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
4970 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
4972 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4974 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
4975 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
4976 include/grub/parser.h, include/grub/script.h, kern/parser.c,
4977 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
4978 normal/lexer.c, normal/parser.y, normal/script.c, and
4980 Removed kern/sparc64/cache.c.
4982 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
4983 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
4986 * configure.ac (AC_INIT): Bumped to 1.92.
4988 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
4990 * kern/err.c (grub_error_push): Added new function to support error
4992 (grub_error_pop): Likewise.
4993 (grub_error_stack_items): New local variable to support error stacks.
4994 (grub_error_stack_pos): Likewise.
4995 (grub_error_stack_assert): Likewise.
4996 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
4998 (grub_print_error): Added support to print errors from error stack.
5000 * include/grub/err.h (grub_error_push): Added function prototype.
5001 (grub_error_pop): Likewise.
5003 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
5005 * configure.ac: Accept `powerpc64' as host_cpu.
5006 (amd64): Rename to `biarch32'.
5008 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
5009 non-cacheline-aligned addresses.
5011 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
5012 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
5013 if `size' is non-zero.
5015 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
5017 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
5018 and `cd' to make sure the filename is not prefixed with a
5020 (pkgdata_MODULES): Add `gpt.mod'.
5021 (gpt_mod_SOURCES): New variable.
5022 (gpt_mod_CFLAGS): Likewise.
5023 (gpt_mod_LDFLAGS): Likewise.
5025 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
5027 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
5030 * partmap/gpt.c: New file.
5032 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
5033 GPT partition map is detected.
5035 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
5037 * commands/i386/pc/play.c: New file.
5038 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
5039 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
5042 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
5044 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
5045 ((unused))' to silence gcc warning.
5047 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
5049 * configure.ac: Correct `AC_PROG_YACC' test.
5051 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
5053 * util/powerpc/ieee1275/grub-install.in: Run the mount point
5054 check before installing files.
5056 2005-11-22 Mike Small <smallm@panix.com>
5058 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
5059 number regex so multidigit numbers are recognized correctly.
5061 2005-11-22 Mike Small <smallm@panix.com>
5063 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
5064 debugging message before attempting to claim memory.
5065 (grub_rescue_cmd_initrd): Add a claim debugging message and try
5066 multiple addresses in case of failure.
5068 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
5070 * term/tparm.c (get_space): Remove empty `if' statement.
5072 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
5074 * kern/parser.c (check_varstate): Rename `state' to 's'.
5076 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
5078 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
5079 variable definitions to the beginning of each function. Sort stack
5081 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
5082 `buf' argument to `char *'.
5084 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
5086 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
5087 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
5088 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
5089 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
5090 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
5091 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
5092 configfile.mod, search.mod, gzio.mod and test.mod.
5093 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
5094 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
5095 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
5096 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
5097 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
5098 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
5099 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
5100 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
5101 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
5102 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
5103 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
5104 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
5105 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
5106 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
5107 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
5108 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
5109 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
5110 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
5111 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
5112 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
5113 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
5114 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
5115 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
5117 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
5119 (pkgdata_MODULES): Add test.mod.
5121 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
5123 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
5124 appending to variables with "+=".
5125 (PModule): Use full pathname to generate *.lst filenames.
5127 * Makefile.in: Fixed list rules moved from genmk.rb.
5128 (.DELETE_ON_ERROR): New special target.
5129 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
5131 * conf/i386-pc.rmk: Include conf/common.mk.
5132 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
5133 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
5134 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
5135 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
5136 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
5137 configfile.mod, search.mod, gzio.mod and test.mod.
5138 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
5139 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
5140 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
5141 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
5142 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
5143 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
5144 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
5145 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
5146 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
5147 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
5148 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
5149 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
5150 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
5151 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
5152 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
5153 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
5154 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
5155 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
5156 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
5157 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
5158 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
5159 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
5160 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
5162 * conf/common.rmk: ... to here. New file.
5164 * conf/common.mk: New file.
5166 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
5168 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
5169 (grub_script.tab.c): ... here.
5171 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
5172 (grub_script.tab.c): ... here.
5174 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
5175 (grub_script.tab.c): ... here.
5177 * normal/command.c (grub_command_find): Fixed a memory leak of
5178 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
5180 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
5182 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
5183 "@" which marks the start of a comment on ARM.
5184 (VARIABLE): Likewise.
5186 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
5188 Add support for Linux/ADFS partition tables.
5190 * partmap/acorn.c: New file.
5192 * include/grub/acorn_filecore.h: Likewise.
5194 * DISTLIST: Added `partmap/acorn.c' and
5195 `include/grub/acorn_filecore.h'.
5197 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
5199 (pkgdata_MODULES): Add `acorn.mod'.
5200 (acorn_mod_SOURCES): New variable.
5201 (acorn_mod_CFLAGS): Likewise.
5203 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
5205 (pkgdata_MODULES): Add `acorn.mod'.
5206 (acorn_mod_SOURCES): New variable.
5207 (acorn_mod_CFLAGS): Likewise.
5209 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
5210 (pkgdata_MODULES): Add `acorn.mod'.
5211 (acorn_mod_SOURCES): New variable.
5212 (acorn_mod_CFLAGS): Likewise.
5213 (acorn_mod_LDFLAGS): Likewise.
5215 * include/types.h (grub_disk_addr_t): New typedef.
5217 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
5219 * geninit.sh: New file.
5221 * geninitheader.sh: Likewise.
5223 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
5224 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
5225 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
5226 * commands/configfile.c (grub_configfile_init)
5227 (grub_configfile_fini): Likewise.
5228 * commands/default.c (grub_default_init, grub_default_fini):
5230 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
5231 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
5232 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
5233 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
5235 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
5236 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
5238 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
5239 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
5241 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
5243 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
5245 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
5246 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
5247 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
5248 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
5249 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
5250 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
5251 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
5252 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
5253 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
5254 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
5255 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
5256 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
5257 * partmap/amiga.c (grub_amiga_partition_map_init)
5258 (grub_amiga_partition_map_fini): Likewise.
5259 * partmap/apple.c (grub_apple_partition_map_init)
5260 (grub_apple_partition_map_fini): Likewise.
5261 * partmap/pc.c (grub_pc_partition_map_init)
5262 (grub_pc_partition_map_fini): Likewise.
5263 * partmap/sun.c (grub_sun_partition_map_init,
5264 grub_sun_partition_map_fini): Likewise.
5265 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
5268 * util/grub-emu.c: Include <grub_modules_init.h>.
5269 (main): Don't initialize and de-initialize any modules directly,
5270 use `grub_init_all' and `grub_fini_all' instead.
5272 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
5273 `grub_vesafb_mod_init'.
5274 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
5276 * term/i386/pc/vga.c (grub_vga_init): Renamed to
5277 `grub_vga_mod_init'. Updated all users.
5278 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
5280 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
5281 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
5284 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
5285 Generate a function to initialize the module in utilities.
5286 Updated all callers.
5287 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
5288 initialize the module in utilities. Updated all callers.
5290 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
5292 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
5293 escape sequence and a literal ^L to clear the screen.
5295 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
5296 when returning from Open Firmware.
5298 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
5300 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
5301 (grub_ofconsole_height): Likewise.
5302 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
5303 manually insert a '\n'.
5304 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
5305 `grub_ofconsole_height'. Return early if these are already set.
5307 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
5309 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
5310 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
5311 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
5312 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
5313 and `normal/script.c'.
5314 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
5315 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
5316 (test_mod_SOURCES): New variable.
5317 (test_mod_CFLAGS): Likewise.
5318 (test_mod_LDFLAGS): Likewise.
5319 (pkgdata_MODULES): Add `test.mod'.
5320 (grub_script.tab.c): New rule.
5321 (grub_script.tab.h): Likewise.
5323 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
5325 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
5326 `commands/test.c', `normal/execute.c', `normal/lexer.c',
5327 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
5328 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
5329 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
5330 (test_mod_SOURCES): New variable.
5331 (test_mod_CFLAGS): Likewise.
5332 (pkgdata_MODULES): Add `test.mod'.
5333 (grub_script.tab.c): New rule.
5334 (grub_script.tab.h): Likewise.
5336 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
5338 Add initial scripting support.
5340 * commands/test.c: New file.
5341 * include/grub/script.h: Likewise.
5342 * normal/execute.c: Likewise.
5343 * normal/function.c: Likewise.
5344 * normal/lexer.c: Likewise.
5345 * normal/parser.y: Likewise.
5346 * normal/script.c: Likewise.
5348 * configure.ac: Add `AC_PROG_YACC' test.
5350 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
5351 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
5352 `normal/function.c' and `normal/script.c'.
5353 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
5354 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
5355 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
5357 (pkgdata_MODULES): Add `test.mod'.
5358 (grub_script.tab.c): New rule.
5359 (grub_script.tab.h): Likewise.
5361 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
5363 * include/grub/normal.h (grub_test_init): New prototype.
5364 (grub_test_fini): Likewise.
5366 * normal/command.c: Include <grub/script.h>.
5367 (grub_command_execute): Rewritten.
5369 * util/grub-emu.c (main): Call `grub_test_init' and
5372 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
5374 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
5376 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
5377 there are no pending characters.
5379 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
5381 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
5382 `grub_strndup' to drop device arguments. Replace unnecessary
5383 `grub_strndup' with `grub_strdup'.
5385 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
5387 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
5388 `debug' environment variable has been set.
5390 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
5392 * Makefile.in (install-local): Use $(DATA).
5393 (uninstall): Likewise.
5394 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
5395 (sbin_UTILITIES): ... to here.
5396 (sbin_SCRIPTS): New variable.
5397 (grub_install_SOURCES): New variable.
5398 * util/powerpc/ieee1275/grub-install.in: New file.
5399 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
5401 (add_segments): Call `grub_util_get_path'.
5403 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
5405 From Timothy Baldwin:
5406 * commands/ls.c (grub_ls_list_files): Close FILE with
5408 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
5410 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
5412 * include/grub/parser.h: New file.
5414 * kern/parser.c: Likewise.
5416 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
5417 (grub_setup_SOURCES): Likewise.
5418 (grub_probefs_SOURCES): Likewise.
5419 (grub_emu_SOURCES): Likewise.
5420 (kernel_img_HEADERS): Add `parser.h'.
5422 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
5423 (grub_emu_SOURCES): Add `kern/parser.c'.
5424 (grubof_SOURCES): Likewise.
5426 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
5427 (grubof_SOURCES): Add `kern/parser.c'.
5429 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
5431 * kern/misc.c (grub_split_cmdline): Removed function.
5433 * kern/rescue.c: Include <grub/parser.h>.
5434 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
5435 of `grub_split_cmdline'.
5437 * normal/command.c: Include <grub/parser.h>.
5438 (grub_command_execute): Use `grub_parser_split_cmdline' instead
5439 of `grub_split_cmdline'.
5441 * normal/completion.c: Include <grub/parser.h>.
5442 (cmdline_state): New variable.
5443 (iterate_dir): End the filename with a quote depending on the
5445 (get_state): new function.
5446 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
5447 split the arguments and determine the current argument. When the
5448 argument string is not quoted, escape all spaces.
5450 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
5452 * normal/sparc64/setjmp.S: New file.
5454 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
5456 * include/grub/sparc64/libgcc.h: New file.
5457 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
5458 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
5459 normal/sparc64/setjmp.c.
5461 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
5463 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
5464 * kern/sparc64/cache.S: New file.
5465 * kern/sparc64/cache.c: Removed.
5466 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
5467 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
5469 (COMMON_LDFLAGS): Add -melf64_sparc.
5470 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
5471 (grubof_SOURCES): Use cache.S instead of cache.c.
5472 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
5473 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
5474 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
5476 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
5477 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
5478 (linux_mod_CFLAGS): Commented out.
5479 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
5480 out because module isn't built.
5481 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
5482 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
5483 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
5484 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
5485 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
5486 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
5487 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
5488 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
5489 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
5490 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
5491 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
5492 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
5493 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
5494 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
5496 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
5498 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
5499 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
5500 longer, because HFS should not be used on PC.
5502 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
5504 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
5505 consistently within the loop.
5507 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
5509 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
5510 directory can not be read.
5512 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
5514 * configure.ac (AC_INIT): Increase the version number to 1.91.
5516 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
5517 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
5518 term/i386/pc/serial.c.
5520 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
5522 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
5523 file size must be permitted.
5525 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
5526 between %ah and %al.
5528 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
5530 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
5532 Call the hook with a NUL-terminated filename.
5533 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
5536 * kern/term.c (cursor_state): New variable.
5537 (grub_term_set_current): Reset the cursor state on a new
5539 (grub_setcursor): Rewritten to use CURSOR_STATE.
5540 (grub_getcursor): New function.
5542 * include/grub/term.h (grub_getcursor): New prototype.
5544 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
5545 integers on ARM. Reported by Timothy Baldwin
5546 <T.E.Baldwin99@members.leeds.ac.uk>.
5548 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
5550 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
5552 (grub_sfs_dir): Likewise.
5554 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
5556 Add support for the SFS filesystem.
5558 * fs/sfs.c: New file.
5560 * DISTLIST: Added `fs/sfs.c'.
5562 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
5563 (grub_probefs_SOURCES): Likewise.
5564 (grub_emu_SOURCES): Likewise.
5565 (pkgdata_MODULES): Add `sfs.mod'.
5566 (sfs_mod_SOURCES): New variable.
5567 (sfs_mod_CFLAGS): Likewise.
5568 (sfs_mod_LDFLAGS): Likewise.
5570 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
5571 (pkgdata_MODULES): Add `sfs.mod'.
5572 (sfs_mod_SOURCES): New variable.
5573 (sfs_mod_CFLAGS): Likewise.
5575 * util/grub-emu.c (main): Call `grub_sfs_init' and
5578 * include/grub/fs.h (grub_sfs_init): New prototype.
5579 (grub_sfs_fini): Likewise.
5581 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
5583 Add support for the AFFS filesystem.
5585 * fs/affs.c: New file.
5587 * DISTLIST: Added `fs/affs.c'.
5589 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
5590 (grub_probefs_SOURCES): Likewise.
5591 (grub_emu_SOURCES): Likewise.
5592 (pkgdata_MODULES): Add `affs.mod'.
5593 (affs_mod_SOURCES): New variable.
5594 (affs_mod_CFLAGS): Likewise.
5595 (affs_mod_LDFLAGS): Likewise.
5597 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
5598 (pkgdata_MODULES): Add `affs.mod'.
5599 (affs_mod_SOURCES): New variable.
5600 (affs_mod_CFLAGS): Likewise.
5602 * util/grub-emu.c (main): Call `grub_affs_init' and
5605 * include/grub/fs.h (grub_affs_init): New prototype.
5606 (grub_affs_fini): Likewise.
5608 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
5610 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
5612 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
5614 * configure.ac: Accept `x86_64' as host_cpu. In that case add
5617 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
5620 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
5621 (COMMON_LDFLAGS): New variable.
5622 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
5623 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
5624 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
5625 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
5626 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
5627 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
5628 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
5629 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
5630 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
5631 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
5632 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
5633 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
5634 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
5635 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
5636 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
5638 (normal_mod_ASFLAGS): Add `-m32'.
5640 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
5641 (grub_host_size_t, grub_host_ssize_t): New types.
5642 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
5643 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
5644 `GRUB_HOST_SIZEOF_VOID_P'.
5646 * include/grub/kernel.h (struct grub_module_header): Type of
5647 member offset changed to `grub_host_off_t'. Type of member size
5648 changed to `grub_host_size_t'.
5649 (struct grub_module_info): Type of member offset changed to
5650 `grub_host_off_t'. Type of member size changed to
5653 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
5655 Make GRUB's kernel compliant to Multiboot Specification.
5657 * kern/i386/pc/startup.S (multiboot_header): New label.
5658 (multiboot_entry): Likewise.
5659 (multiboot_trampoline): Likewise.
5661 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5664 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
5665 put parentheses after a question mark.
5666 [!GRUB_UTIL] (my_mod): New variable.
5668 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
5670 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
5672 Adds support for the XFS filesystem. Btrees are not supported
5675 * fs/xfs.c: New file.
5677 * DISTLIST: Added `fs/xfs.c'.
5679 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
5680 (grub_probefs_SOURCES): Likewise.
5681 (grub_emu_SOURCES): Likewise.
5682 (pkgdata_MODULES): Add `xfs.mod'.
5683 (xfs_mod_SOURCES): New variable.
5684 (xfs_mod_CFLAGS): Likewise.
5686 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
5687 (pkgdata_MODULES): Add `xfs.mod'.
5688 (xfs_mod_SOURCES): New variable.
5689 (xfs_mod_CFLAGS): Likewise.
5691 * util/grub-emu.c (main): Call `grub_xfs_init' and
5694 * include/grub/fs.h (grub_xfs_init): New prototype.
5695 (grub_xfs_fini): Likewise.
5698 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
5700 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
5701 color modes, allow greater than 16 colors to be configured as
5704 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5706 * normal/completion.c (complete_arguments): Add the qualifier
5709 From Omniflux <omniflux+lists@omniflux.com>:
5710 * include/grub/terminfo.h: New file.
5711 * include/grub/tparm.h: Likewise.
5712 * include/grub/i386/pc/serial.h: Likewise.
5713 * term/terminfo.c: Likewise.
5714 * term/tparm.c: Likewise.
5715 * term/i386/pc/serial.c: Likewise.
5716 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
5718 (terminfo_mod_SOURCES): New variable.
5719 (terminfo_mod_CFLAGS): Likewise.
5720 (serial_mod_SOURCES): Likewise.
5721 (serial_mod_CFLAGS): Likewise.
5723 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
5725 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
5726 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
5727 and kern/powerpc/ieee1275/cmain.c, respectively.
5729 * boot/powerpc/ieee1275/crt0.S: Moved to ...
5730 * kern/powerpc/ieee1275/crt0.S: ... here.
5732 * boot/powerpc/ieee1275/cmain.c: Moved to ...
5733 * kern/powerpc/ieee1275/cmain.c: ... here.
5735 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
5736 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
5737 instead of boot/powerpc/ieee1275/crt0.S and
5738 boot/powerpc/ieee1275/cmain.c, respectively.
5740 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
5741 sectors. It was not used anyway.
5743 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
5745 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
5746 `unused parameter' warning.
5748 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
5750 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
5752 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
5755 2005-08-28 Marco Gerards <metgerards@student.han.nl>
5757 * include/grub/normal.h (enum grub_completion_type): Added
5758 `GRUB_COMPLETION_TYPE_ARGUMENT'.
5760 * normal/cmdline.c (print_completion): Handle
5761 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
5762 * normal/menu_entry.c (store_completion): Likewise.
5764 * normal/completion.c (complete_arguments): New function.
5765 (grub_normal_do_completion): Call `complete_arguments' when the
5766 current words start with a dash.
5768 2005-08-27 Marco Gerards <metgerards@student.han.nl>
5770 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
5771 `gzio.mod' instead of `io.mod').
5773 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
5775 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
5776 (DISTDIRS): Added io and video.
5777 Rewrite the search routine to make an output consistently.
5779 * DISTLIST: Added conf/sparc64-ieee1275.mk,
5780 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
5781 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
5782 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
5783 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
5784 util/powerpc/ieee1275/misc.c.
5786 * include/grub/gzio.h: New file.
5787 * io/gzio.c: Likewise.
5789 * kern/file.c (grub_file_close): Call grub_device_close only if
5790 FILE->DEVICE is not NULL.
5792 * include/grub/mm.h [!NULL] (NULL): New macro.
5794 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
5796 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
5797 (pkgdata_MODULES): Added gzio.mod.
5798 (gzio_mod_SOURCES): New variable.
5799 (gzio_mod_CFLAGS): Likewise.
5801 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
5802 (pkgdata_MODULES): Added gzio.mod.
5803 (gzio_mod_SOURCES): New variable.
5804 (gzio_mod_CFLAGS): Likewise.
5806 * commands/cat.c: Include grub/gzio.h.
5807 (grub_cmd_cat): Use grub_gzfile_open instead of
5810 * commands/cmp.c: Include grub/gzio.h.
5811 (grub_cmd_cmp): Use grub_gzfile_open instead of
5814 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
5815 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
5817 (grub_rescue_cmd_module): Likewise.
5819 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
5821 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
5822 kern/sparc64/ieee1275/init.c because it contains _start.
5823 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
5825 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
5827 * configure.ac: Add support for sparc64 host with ieee1275
5829 * configure: Generated from configure.ac.
5830 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
5832 (grub_ofdisk_read): Likewise.
5833 (grub_ofdisk_open): Use %p to print pointer values, and cast the
5834 pointers as (void *) to remove a warning.
5835 (grub_ofdisk_close): Likewise.
5836 (grub_ofdisk_read): Likewise.
5837 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
5838 returns, so make it return void to remove a warning.
5839 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
5840 Corresponding prototype change.
5841 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
5842 values, and cast the pointers as (void *) to remove a warning.
5843 (grub_mm_dump): Likewise.
5844 * conf/sparc64-ieee1275.mk: New file.
5845 * conf/sparc64-ieee1275.rmk: Likewise.
5846 * include/grub/sparc64/setjmp.h: Likewise.
5847 * include/grub/sparc64/types.h: Likewise.
5848 * include/grub/sparc64/ieee1275/console.h: Likewise.
5849 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
5850 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
5851 * include/grub/sparc64/ieee1275/time.h: Likewise.
5852 * kern/sparc64/cache.c: Likewise.
5853 * kern/sparc64/dl.c: Likewise.
5854 * kern/sparc64/ieee1275/init.c: Likewise.
5855 * kern/sparc64/ieee1275/openfw.c: Likewise.
5857 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
5859 * util/console.c (grub_ncurses_putchar): If C is greater than
5860 0x7f, set C to a question mark.
5861 (grub_ncurses_getcharwidth): New function.
5862 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
5865 * normal/menu.c (print_entry): Made aware of Unicode. First,
5866 convert TITLE to UCS-4, and predict the cursor position by
5869 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
5871 * kern/misc.c (grub_utf16_to_utf8): Likewise.
5873 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
5875 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
5876 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
5879 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
5880 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
5881 grub_strcpy and grub_strlen. Take it into account that a space
5882 character is inserted as a delimiter.
5884 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
5886 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
5887 invalid magic in thre error.
5889 * commands/search.c: New file.
5891 * util/grub-emu.c (main): Call grub_search_init and
5894 * kern/rescue.c (grub_rescue_print_disks): Removed.
5895 (grub_rescue_print_devices): New function.
5896 (grub_rescue_cmd_ls): Use grub_device_iterate with
5897 grub_rescue_print_devices instead of grub_disk_dev_iterate with
5898 grub_rescue_print_disks.
5900 * kern/partition.c (grub_partition_iterate): Return the result of
5901 PARTMAP->ITERATE instead of GRUB_ERRNO.
5903 * kern/device.c: Include grub/partition.h.
5904 (grub_device_iterate): New function.
5906 * include/grub/partition.h (grub_partition_iterate): Return int
5907 instead of grub_err_t.
5909 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
5911 [GRUB_UTIL] (grub_search_fini): Likewise.
5913 * include/grub/device.h (grub_device_iterate): New prototype.
5915 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
5917 (pkgdata_MODULES): Added search.mod.
5918 (search_mod_SOURCES): New variable.
5919 (search_mod_CFLAGS): Likewise.
5921 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
5922 (pkgdata_MODULES): Added search.mod.
5923 (search_mod_SOURCES): New variable.
5924 (search_mod_CFLAGS): Likewise.
5926 * commands/ls.c (grub_ls_list_disks): Renamed to ...
5927 (grub_ls_list_devices): ... this, and use grub_device_iterate.
5928 All callers changed.
5930 * DISTLIST: Added commands/search.c.
5932 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
5934 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
5936 (grub_getcharwidth): New function.
5938 * kern/misc.c (grub_utf8_to_ucs4): New function.
5940 * include/grub/term.h (struct grub_term): Added a new member
5942 (grub_getcharwidth): New prototype.
5944 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
5946 * term/i386/pc/console.c (map_char): New function. Segregated from
5947 grub_console_putchar.
5948 (grub_console_putchar): Use map_char.
5949 (grub_console_getcharwidth): New function.
5950 (grub_console_term): Specified grub_console_getcharwidth as
5953 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
5954 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
5956 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
5958 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
5959 on grub_strtoul completely.
5960 (write_char): Declare local variables in the beginning of the
5962 (grub_vesafb_getcharwidth): New function.
5963 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
5966 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
5968 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
5969 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
5970 commands/i386/pc/vbetest.c.
5972 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
5973 call grub_vbe_get_controller_info again, because the returned
5974 information is volatile.
5975 (grub_vbe_set_video_mode): Mostly rewritten.
5976 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
5977 grub_vbe_status_t correctly.
5978 (grub_vbe_get_video_mode_info): Likewise.
5979 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
5980 several if statements.
5982 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
5983 * commands/i386/pc/vbeinfo.c: ... this.
5985 * commands/i386/pc/vbe_test.c: Renamed to ...
5986 * commands/i386/pc/vbetest.c: ... this.
5988 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
5990 (grub_cmd_vbeinfo): ... this. Save video modes before
5991 iterating. Skip a video mode, if it is not available, not enough
5992 information is given or it is monochrome. Show the memory
5993 model. Leave the interpretation of MODEVAR to grub_strtoul
5995 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
5996 (GRUB_MOD_FINI): Likewise.
5998 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
5999 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
6000 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
6001 duplicated grub_env_get. Leave the interpretation of MODEVAR to
6002 grub_strtoul completely.
6004 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
6005 (GRUB_MOD_FINI): Likewise.
6007 * normal/misc.c: Include grub/mm.h.
6009 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
6010 vbe_list_modes with vbetest.mod and vbeinfo.mod.
6011 (vbe_list_modes_mod_SOURCES): Removed.
6012 (vbe_list_modes_mod_CFLAGS): Likewise.
6013 (vbe_test_mod_SOURCES): Likewise.
6014 (vbe_test_mod_CFLAGS): Likewise.
6015 (vbeinfo_mod_SOURCES): New variable.
6016 (vbeinfo_mod_CFLAGS): Likewise.
6017 (vbetest_mod_SOURCES): Likewise.
6018 (vbetest_mod_CFLAGS): Likewise.
6020 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
6022 * normal/misc.c: New file.
6024 * DISTLIST: Added normal/misc.c.
6026 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
6027 DISK to HOOK. Call HOOK with DISK.
6028 * partmap/apple.c (apple_partition_map_iterate): Likewise.
6029 * partmap/pc.c (pc_partition_map_iterate): Likewise.
6030 * partmap/sun.c (sun_partition_map_iterate): Likewise.
6032 * normal/menu_entry.c (struct screen): Added a new member
6034 (completion_buffer): New global variable.
6035 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
6036 (store_completion): New function.
6037 (complete): Likewise.
6038 (clear_completions): Likewise.
6039 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
6040 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
6041 a tab, call complete.
6043 * normal/completion.c (disk_dev): Removed.
6044 (print_simple_completion): Likewise.
6045 (print_partition_completion): Likewise.
6046 (print_func): New global variable.
6047 (add_completion): Do not take the arguments WHAT or PRINT any
6048 longer. Added a new argument TYPE. Instead of printing directly,
6049 call PRINT_FUNC if not NULL.
6050 All callers changed.
6051 (complete_device): Use a local variable DEV instead of
6052 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
6053 (grub_normal_do_completion): Take a new argument HOOK. Do not
6054 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
6055 empty string, return NULL instead.
6056 All callers changed.
6058 * normal/cmdline.c (print_completion): New function.
6060 * kern/partition.c (grub_partition_iterate): Add an argument DISK
6062 All callers changed.
6064 * kern/disk.c (grub_print_partinfo): Removed.
6066 * include/grub/partition.h (struct grub_partition_map): Add a new
6067 argument DISK into HOOK of ITERATE.
6068 (grub_partition_iterate): Add a new argument DISK to HOOK.
6070 * include/grub/normal.h (enum grub_completion_type): New enum.
6071 (grub_completion_type_t): New type.
6072 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
6073 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
6074 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
6075 (GRUB_COMPLETION_TYPE_FILE): Likewise.
6076 (grub_normal_do_completion): Added a new argument HOOK.
6077 (grub_normal_print_device_info): New prototype.
6079 * include/grub/disk.h (grub_print_partinfo): Removed.
6081 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
6082 (normal_mod_SOURCES): Likewise.
6083 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6084 (normal_mod_SOURCES): Likewise.
6086 * commands/ls.c (grub_ls_list_disks): Use
6087 grub_normal_print_device_info instead of grub_print_partinfo. Free
6089 (grub_ls_list_files): Use grub_normal_print_device_info instead of
6090 duplicating the code.
6092 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
6094 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
6095 follow GCS more precisely.
6096 * commands/i386/pc/vbe_test.c: Likewise.
6097 * include/grub/i386/pc/vbe.h: Likewise.
6098 * term/i386/pc/vesafb.c: Likewise.
6099 * video/i386/pc/vbe.c: Likewise.
6101 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
6103 * DISTLIST: Added term/i386/pc/vesafb.c
6104 DISTLIST: Added video/i386/pc/vbe.c
6105 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
6106 DISTLIST: Added commands/i386/pc/vbe_test.c.
6107 * commands/i386/pc/vbe_list_modes.c: New file.
6108 * commands/i386/pc/vbe_test.c: Likewise.
6109 * term/i386/pc/vesafb.c: Likewise.
6110 * video/i386/pc/vbe.c: Likewise.
6111 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
6112 (grub_vbe_probe) Added prototype.
6113 (grub_vbe_set_video_mode) Likewise.
6114 (grub_vbe_get_video_mode) Likewise.
6115 (grub_vbe_get_video_mode_info) Likewise.
6116 (grub_vbe_set_pixel_rgb) Likewise.
6117 (grub_vbe_set_pixel_index) Likewise.
6118 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
6119 (pkgdata_MODULES): Added vesafb.mod.
6120 (pkgdata_MODULES): Added vbe_list_modes.mod.
6121 (pkgdata_MODULES): Added vbe_test.mod.
6122 (vbe_mod_SOURCES): Added.
6123 (vbe_mod_CFLAGS): Likewise.
6124 (vesafb_mod_SOURCES): Likewise.
6125 (vesafb_mod_CFLAGS): Likewise.
6126 (vbe_list_modes_mod_SOURCES): Likewise.
6127 (vbe_list_modes_mod_CFLAGS): Likewise.
6128 (vbe_test_mod_SOURCES): Likewise.
6129 (vbe_test_mod_CFLAGS): Likewise.
6131 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
6133 * normal/command.c (grub_command_execute): If INTERACTIVE is
6134 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
6135 CMDLINE. Disable the pager if INTERACTIVE is true.
6136 All callers are changed.
6138 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
6139 before reading a config file.
6140 * normal/main.c (read_config_file): Even if a command is not
6141 found, register it if it is within an entry.
6143 * util/grub-emu.c: Include sys/types.h and unistd.h.
6144 (options): Added --hold.
6145 (struct arguments): Added a new member "hold".
6146 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
6148 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
6149 cleared by a debugger, if it is not zero.
6151 * include/grub/normal.h (grub_command_execute): Add an argument
6154 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
6156 * DISTLIST: Added include/grub/i386/pc/vbe.h.
6158 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
6160 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
6161 program with another one, because the old one didn't detect a bug
6162 in gcc-3.4. Always use regparm 2, because the new test is still
6163 not enough for gcc-4.0. Someone must investigate a simple test
6164 case which detects a bug in gcc-4.0.
6166 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
6168 * DISTLIST: Added normal/completion.c.
6170 * normal/completion.c: New file.
6172 * term/i386/pc/console.c (grub_console_getwh): New function.
6173 (grub_console_term): Assign grub_console_getwh to getwh.
6175 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
6176 function is defined in normal/completion.c as
6177 grub_normal_do_completion.
6178 (grub_cmdline_get): Use grub_normal_do_completion instead of
6181 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
6182 returns non-zero, otherwise return 0.
6183 (grub_partition_iterate): First, probe the partition map. Then,
6184 call ITERATE only for this partition map.
6186 * kern/misc.c (grub_strncmp): Rewritten.
6188 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
6189 returns non-zero. Otherwise return 0.
6191 * include/grub/partition.h (grub_partition_map_iterate): Return
6192 int instead of void.
6194 * include/grub/normal.h (grub_normal_do_completion): New prototype.
6196 * include/grub/misc.h (grub_strncmp): Change the type of N to
6199 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
6202 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
6203 unsigned explictly before comparing it with I.
6205 * kern/main.c (grub_env_write_root): Add the attribute unused into
6208 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
6209 normal/completion.c.
6210 (normal_mod_SOURCES): Likewise.
6211 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6212 (normal_mod_SOURCES): Likewise.
6214 * normal/command.c (grub_iterate_commands): If ITERATE returns
6215 non-zero, return one immediately.
6217 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
6219 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
6220 * kern/i386/pc/startup.S: Updated Global Descriptor table's
6222 (grub_vbe_get_controller_info): New function.
6223 (grub_vbe_get_mode_info): Likewise.
6224 (grub_vbe_set_mode): Likewise.
6225 (grub_vbe_get_mode): Likewise.
6226 (grub_vbe_set_memory_window): Likewise.
6227 (grub_vbe_get_memory_window): Likewise.
6228 (grub_vbe_set_scanline_length): Likewise.
6229 (grub_vbe_get_scanline_length): Likewise.
6230 (grub_vbe_set_display_start): Likewise.
6231 (grub_vbe_get_display_start): Likewise.
6232 (grub_vbe_set_palette_data): Likewise.
6233 * include/grub/i386/pc/vbe.h: New file.
6235 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
6237 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
6238 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
6239 * DISTLIST: Likewise.
6240 * kern/ieee1275/of.c: Moved to ...
6241 * kern/ieee1275/ieee1275.c: ... here.
6243 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
6245 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
6246 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
6247 Pass 0 as `end' parameter to grub_strtoul().
6249 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
6251 * include/grub/powerpc/ieee1275/console.h: Do not include
6252 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
6254 (grub_console_cur_color): Remove i386-specific prototype.
6255 (grub_console_real_putchar): Likewise.
6256 (grub_console_checkkey): Likewise.
6257 (grub_console_getkey): Likewise.
6258 (grub_console_getxy): Likewise.
6259 (grub_console_gotoxy): Likewise.
6260 (grub_console_cls): Likewise.
6261 (grub_console_setcursor): Likewise.
6262 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
6263 Include <grub/machine/console.h>.
6264 * term/ieee1275/ofconsole.c: Likewise.
6266 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
6268 * Makefile.in (LIBLZO): New variable.
6270 * configure.ac: Check for LZO version 2.
6272 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
6273 lzo/lzo1x.h instead of lzo1x.h.
6275 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
6278 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
6279 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
6281 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
6282 copying the data from PARTITION to P.
6284 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
6286 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
6287 negative, unload the module.
6289 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
6290 map is "pc_partition_map" but not "pc".
6291 (usage): Fix the description. The options are --boot-image and
6292 --core-image but not --boot-file or --core-file.
6293 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
6294 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
6297 * util/i386/pc/grub-install.in: Do not specify --boot-file or
6298 --core-file. Specify INSTALL_DEVICE as an argument.
6300 * util/console.c: Include config.h.
6301 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
6302 [HAVE_NCURSES_H]: Include ncurses.h.
6303 [HAVE_CURSES_H]: Include curses.h.
6304 [!A_NORMAL] (A_NORMAL): Defined as zero.
6305 [!A_STANDOUT] (A_STANDOUT): Likewise.
6307 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
6309 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
6311 * configure.ac: Check for curses libraries and headers.
6313 * Makefile.in (LIBCURSES): New variable.
6315 * genmk.rb (Script::rule): Set the executable bits.
6317 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
6318 name of the PC partition map is "pc_partition_map" but not "pc".
6320 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
6322 * util/i386/pc/grub-install.in (grub_probefs): New variable.
6323 (modules): Likewise.
6324 (usage): Added descriptions for --modules and --grub-probefs.
6325 Handle --modules and --grub-probefs. Save the arguments in MODULES
6326 and GRUB_PROBEFS, respectively.
6327 Auto-detect a filesystem module against GRUBDIR. If the result is
6328 empty and modules are not specified explicitly, abort the
6329 installation. Add the result to MODULES.
6331 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
6332 disk/powerpc/ieee1275/ofdisk.c,
6333 include/grub/powerpc/ieee1275/init.h and
6334 term/powerpc/ieee1275/ofconsole.c.
6335 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
6336 term/ieee1275/ofconsole.c.
6338 * include/grub/powerpc/ieee1275/console.h: Resurrected.
6340 * COPYING: Upgraded to the latest version. Only the address of the
6341 FSF office has changed.
6343 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
6345 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
6346 kern/ieee1275.c with kern/ieee1275/of.c.
6348 * kern/ieee1275.c: Moved to ...
6349 * kern/ieee1275/of.c: ... here.
6351 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
6353 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
6356 * config.guess: Updated to the latest version from gnulib.
6357 * config.sub: Likewise.
6358 * install.sh: Likewise.
6359 * mkinstalldirs: Likewise.
6361 * include/grub/console.h: Removed. This file is arch-specific. Do
6362 not put this in include/grub.
6364 * include/grub/i386/pc/console.h: Resurrected.
6366 * util/console.c: Include grub/machine/console.h instead of
6368 * util/grub-emu.c: Likewise.
6370 2005-08-04 Marco Gerards <metgerards@student.han.nl>
6372 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
6375 From Vincent Pelletier <subdino2004@yahoo.fr>
6376 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
6377 Redefined to use grub_getwh.
6378 (grub_term): New member named getwh.
6379 (grub_getwh): New prototype.
6380 * kern/term.c (grub_getwh): New function.
6381 * term/i386/pc/console.c (grub_console_getwh): New function.
6382 (grub_console_term): New member `getwh'.
6383 * term/i386/pc/vga.c (grub_vga_getwh): New function.
6384 (grub_vga_term): New member `getwh'.
6385 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
6387 (grub_ofconsole_getw): New function.
6388 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
6389 (grub_ofconsole_term): New field named getwh and new initial
6392 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
6394 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
6395 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
6396 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
6397 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
6398 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
6399 of <grub/machine/ieee1275.h>.
6400 * commands/ieee1275/reboot.c: Likewise.
6401 * boot/powerpc/ieee1275/ieee1275.c: Move ...
6402 * kern/ieee1275.c: ... to here. All users updated. Change all
6403 parameter structs to use new type `grub_ieee1275_cell_t'.
6404 * term/powerpc/ieee1275/ofconsole.c: Move ...
6405 * term/ieee1275/ofconsole.c: ... to here. All users updated.
6406 * disk/powerpc/ieee1275/ofdisk.c: Move ...
6407 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
6408 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
6410 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
6411 Remove unused prototypes. All users updated.
6412 * include/grub/powerpc/ieee1275/console.h: Removed.
6413 * include/grub/powerpc/ieee1275/ieee1275.h: Define
6414 `grub_ieee1275_cell_t'.
6415 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
6416 Cast comparisons with -1 to the correct type.
6417 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
6418 type to match `grub_ieee1275_entry_fn'.
6420 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
6422 * DISTLIST: Added util/i386/pc/grub-probefs.c.
6424 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
6425 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
6427 (grub_probefs_SOURCES): New variable.
6429 * util/i386/pc/grub-probefs.c: New file.
6431 * util/i386/pc/grub-setup.c (main): Call
6432 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
6433 grub_hfs_init and grub_jfs_init to initialize the system. Call
6434 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
6435 grub_pc_partition_map_fini to finish the system.
6437 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
6439 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
6441 (grub_multiboot_load_elf32): Likewise.
6442 (grub_multiboot_is_elf64): Likewise.
6443 (grub_multiboot_load_elf64): Likewise.
6444 (grub_multiboot_load_elf): Likewise.
6445 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
6446 an ELF32 or ELF64 file.
6447 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
6449 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
6450 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
6451 NULL before calling FS->LABEL.
6452 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
6453 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
6454 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
6455 before calling FS->LABEL.
6457 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
6459 * util/i386/pc/grub-install.in (datadir): New variable.
6461 (pkgdatadir): New variable.
6462 (pkglibdir): Removed.
6464 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
6466 * DISTLIST: Added util/i386/pc/grub-install.in.
6468 * util/i386/pc/grub-install.in: New file.
6470 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
6471 (grub_install_SOURCES): Likewise.
6473 * genmk.rb: Added support for scripts.
6474 (Script): New class.
6475 (scripts): New variable.
6477 * Makefile.in (install-local): Install sbin_SCRIPTS by
6479 (uninstall): Remove sbin_SCRIPTS.
6481 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
6482 device, try to get a GRUB device by
6483 grub_util_biosdisk_get_grub_dev.
6486 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
6487 description for --device-map.
6489 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
6491 Change the semantics of variable hooks. They now return strings
6492 instead of error values.
6494 * util/i386/pc/grub-setup.c: Include grub/env.h.
6495 (setup): Use grub_device_set_root instead of grub_env_set.
6497 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
6498 grub_env_get instead of grub_device_set_root and
6499 grub_device_get_root, respectively.
6501 * kern/main.c (grub_env_write_root): New function.
6502 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
6503 grub_env_set instead of grub_device_set_root.
6505 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
6507 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
6508 rather than calling ENV->WRITE_HOOK afterwards.
6509 (grub_env_get): Return the result of ENV->READ_HOOK rather than
6510 passing a pointer of a pointer.
6511 (grub_register_variable_hook): Change the types of "read_hook" and
6512 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
6514 Allocate the default empty string on the heap, because this string
6517 * kern/device.c: Include grub/env.h.
6518 (grub_device_set_root): Removed.
6519 (grub_device_get_root): Likewise.
6520 (grub_device_open): Use grub_env_get instead of
6521 grub_device_get_root.
6523 * include/grub/env.h (grub_env_read_hook_t): New type.
6524 (grub_env_write_hook_t): Likewise.
6525 (grub_env_var): Change the types of "read_hook" and "write_hook"
6526 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
6527 (grub_register_variable_hook): Likewise.
6529 * include/grub/device.h (grub_device_set_root): Removed.
6530 (grub_device_set_root): Likewise.
6532 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
6533 make sure that DIRNAME terminates with '/', so that
6534 grub_fat_find_dir will fail if PATH is not a directory.
6536 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
6538 Use the qualifier auto for print_files and print_files_long.
6539 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
6541 Put a newline only if there is no error.
6542 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
6545 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
6547 * kern/partition.c (grub_partition_probe): Initialize PART to
6548 NULL. Otherwise, when no partition map is registered, this returns
6551 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
6553 * partmap/apple.c (apple_partition_map_iterate): Check if POS
6554 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
6557 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
6559 * commands/ls.c (grub_ls_list_disks): Print the filesystem
6560 information on each device, if it does not have partitions. Print
6561 "Device" instead of "Disk", because this function is not specific
6564 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
6565 static to ensure that it is put on the memory rather than a
6568 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
6570 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
6571 (grub_cat_init): Likewise.
6572 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
6573 (options): Likewise.
6574 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
6575 (grub_configfile_init): Likewise.
6576 * font/manager.c (GRUB_MOD_INIT): Likewise.
6577 * commands/help.c (GRUB_MOD_INIT): Likewise.
6578 (grub_help_init): Likewise.
6579 * normal/command.c (grub_command_init): Likewise.
6580 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
6581 * disk/loopback.c (grub_loop_init): Likewise.
6582 (GRUB_MOD_INIT): Likewise.
6583 * commands/ls.c (grub_ls_init): Likewise.
6584 (GRUB_MOD_INIT): Likewise.
6585 (options): Likewise.
6586 * commands/boot.c (grub_boot_init): Likewise.
6587 (GRUB_MOD_INIT): Likewise.
6588 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
6589 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
6590 (GRUB_MOD_INIT): Likewise.
6591 * commands/cmp.c (grub_cmp_init): Likewise.
6592 (GRUB_MOD_INIT): Likewise.
6594 * normal/arg.c: Use <> instead of "" to include header files.
6595 (SHORT_ARG_HELP): New macro.
6596 (SHORT_ARG_USAGE): Likewise.
6597 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
6598 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
6600 (find_short): Check if C is 'h' or 'u' explicitly.
6601 (grub_arg_show_help): Use space characters instead of tabs. Treat
6602 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
6603 are shown with --help and --usage only if they are not used for
6605 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
6608 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
6609 const into "longarg". Change the type of "shortarg" to int.
6611 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
6613 * boot/i386/pc/boot.S (boot_drive_check): New label.
6615 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
6618 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
6619 which do not pass a boot drive correctly. Copied from GRUB Legacy.
6621 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
6623 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
6624 When turning off Gate A20, skip the check and return immediately,
6625 because this is not fatal usually.
6627 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
6629 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
6630 be 0x7C00 instead of 0x8000.
6632 * boot/i386/pc/pxeboot.S: Rewritten.
6634 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
6636 (gate_a20_check_state): Read a byte from 0x108000. Invert the
6639 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
6641 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
6642 robustness. This routine now supports a BIOS call and System
6643 Control Port A to modify the gate A20.
6645 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6648 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
6650 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
6651 device path and resulting ihandle.
6652 (grub_ofdisk_close): dprintf the ihandle being closed.
6653 (grub_ofdisk_read): dprintf function parameters.
6654 * kern/mm.c (grub_mm_init_region): Likewise.
6655 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
6656 (grub_linux_boot): dprintf the Linux entry point, initrd address and
6657 size, and boot arguments.
6658 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
6659 before loading into memory.
6660 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
6661 before loading into memory.
6663 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
6665 * kern/mm.c: Added much documentation.
6666 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
6667 8, set to 5 instead of 8.
6669 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
6671 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
6673 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
6674 (grub_mkdevicemap_SOURCES): New variable.
6676 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
6677 lib/device.c of GRUB Legacy.
6679 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
6681 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
6682 instead of PATH is NULL.
6684 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
6686 * commands/cmp.c (BUFFER_SIZE): New macro.
6687 (grub_cmd_cmp): Close the right file at the right time. Compare
6688 only data just read. Don't report files of different size as
6689 identical. Dynamically allocate buffers. Move variable
6690 declarations at the beginning of function.
6692 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
6694 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
6697 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
6699 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
6700 when backspace is pressed at beginning of line.
6702 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
6704 * DISTLIST: Added genfslist.sh.
6706 * normal/main.c (fs_module_list): New variable.
6707 (autoload_fs_module): New function.
6708 (read_fs_list): Likewise.
6709 (grub_normal_execute): Call read_fs_list.
6711 * kern/fs.c (grub_fs_autoload_hook): New variable.
6712 (grub_fs_probe): Added support for auto-loading.
6714 * include/grub/normal.h (struct grub_fs_module_list): New struct.
6715 (grub_fs_module_list_t): New type.
6717 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
6718 (grub_fs_autoload_hook): New prototype.
6720 * genfslist.sh: New file.
6722 * genmk.rb: Added a rule to generate a filesystem list.
6724 2005-06-30 Marco Gerards <metgerards@student.han.nl>
6726 * configure.ac: Fix the test for cross-compiling.
6728 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
6729 define GRUB_UTIL anymore.
6731 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
6732 so this function works on other systems than just big endian.
6733 (load_modules): Likewise.
6734 (add_segments): Likewise.
6736 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
6738 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
6739 contains `l' modifier, get a long from va_arg().
6741 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
6743 * kern/mm.c (grub_free): If the next free block which is being
6744 merged is the first free block, set the first block to the block
6746 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
6748 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
6750 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
6751 `grub_ieee1275_chosen'.
6753 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
6755 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
6756 (grub_ieee1275_chosen): New variable.
6757 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
6759 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
6760 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
6761 Rename first argument to `phandle' for consistency.
6762 (grub_ieee1275_get_property_length): Likewise.
6763 (grub_ieee1275_next_property): Likewise. Change type of first argument
6764 to grub_ieee1275_phandle_t.
6765 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
6766 Move export next to declaration.
6767 (grub_ieee1275_chosen): New variable.
6768 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
6769 Correct cosmetic typo.
6770 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
6771 `grub_ieee1275_chosen'.
6772 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
6773 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
6774 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
6775 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
6776 `grub_ieee1275_chosen'.
6778 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
6780 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
6782 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
6783 /chosen/bootargs as "variable=value" pairs.
6785 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
6787 * include/grub/misc.h (grub_dprintf): New macro.
6788 (grub_real_dprintf): New prototype.
6789 (grub_strword): Likewise.
6790 (grub_iswordseparator): Likewise.
6791 * kern/misc.c (grub_real_dprintf): New function.
6792 (grub_strword): Likewise.
6793 (grub_iswordseparator): Likewise.
6795 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
6797 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
6798 (roundup): Remove macro.
6799 (grub_ieee1275_flags): Make static.
6800 (grub_ieee1275_realmode): Remove.
6801 (grub_ieee1275_test_flag): New function.
6802 (grub_ieee1275_set_flag): Likewise.
6803 (find_options): Rename to `grub_ieee1275_find_options'; update
6804 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
6805 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
6806 (cmain): New prototype.
6807 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
6808 `grub_ieee1275_flags' directly.
6809 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
6811 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
6812 Don't include grub/machine/init.h.
6813 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
6814 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
6816 (grub_ieee1275_realmode): Likewise.
6817 (grub_ieee1275_flag): New enum.
6818 (grub_ieee1275_test_flag): New prototype.
6819 (grub_ieee1275_set_flag): New prototype.
6820 * include/grub/powerpc/ieee1275/init.h: Remove file.
6821 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
6822 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
6823 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
6824 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
6826 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
6827 `grub_ieee1275_test_flag'.
6828 (grub_ieee1275_encode_devname): Likewise.
6830 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
6832 * include/grub/powerpc/ieee1275/ieee1275.h
6833 (grub_ieee1275_encode_devname): New prototype.
6834 (grub_ieee1275_get_filename): Likewise.
6835 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
6837 (grub_set_prefix): Likewise.
6838 (grub_machine_init): Call grub_set_prefix.
6839 * kern/powerpc/ieee1275/openfw.c: Fix typos.
6840 (grub_parse_type): New enum.
6841 (grub_ieee1275_get_devargs): New function.
6842 (grub_ieee1275_get_devname): Likewise.
6843 (grub_ieee1275_parse_args): Likewise.
6844 (grub_ieee1275_get_filename): Likewise.
6845 (grub_ieee1275_encode_devname): Likewise.
6847 2005-03-30 Marco Gerards <metgerards@student.han.nl>
6849 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
6850 `grub_loader_unset'.
6852 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
6854 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
6855 instead of grub_ieee1275_interpret.
6856 (grub_halt_init): New function.
6857 (grub_halt_fini): Likewise.
6858 (GRUB_MOD_INIT): Correct message grammar.
6859 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
6860 instead of grub_ieee1275_interpret.
6861 (grub_reboot_init): New function.
6862 (grub_reboot_fini): Likewise.
6863 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
6864 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
6865 util/i386/pc/misc.c with commands/ieee1275/halt.c,
6866 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
6867 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
6869 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
6871 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
6873 (grub_halt): Likewise.
6874 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
6875 (cmain): Remove __attribute__((unused)).
6876 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
6877 (grub_heap_len): Likewise.
6878 (grub_machine_fini): New function.
6879 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
6880 (grub_halt): Likewise.
6881 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
6883 * util/powerpc/ieee1275/misc.c: New file.
6885 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
6887 * DISTLIST: New file.
6888 * gendistlist.sh: Likewise.
6890 * Makefile.in (COMMON_DISTFILES): Removed.
6891 (BOOT_DISTFILES): Likewise.
6892 (CONF_DISTFILES): Likewise.
6893 (DISK_DISTFILES): Likewise.
6894 (FS_DISTFILES): Likewise.
6895 (INCLUDE_DISTFILES): Likewise.
6896 (KERN_DISTFILES): Likewise.
6897 (LOADER_DISTFILES): Likewise.
6898 (TERM_DISTFILES): Likewise.
6899 (UTIL_DISTFILES): Likewise.
6900 (DISTFILES): Likewise.
6901 (uninstall): Uninstall files in $(pkgdata_DATA).
6902 (DISTLIST): New target.
6903 (distdir): Use the contents of the file DISTLIST to get a list of
6906 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
6908 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
6909 descriptor. This is ported from GRUB Legacy.
6911 * gencmdlist.sh: Added an extra semicolon to make it work with
6912 old sed versions. Reported by Robert Bihlmeyer
6913 <robbe@orcus.priv.at>.
6915 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
6917 Automatic loading of commands is supported.
6919 * normal/main.c (read_command_list): New function.
6920 (grub_normal_execute): Call read_command_list.
6922 * normal/command.c (grub_register_command): Return zero or CMD.
6923 Allocate CMD->NAME from the heap.
6924 Initialize CMD->MODULE_NAME to zero.
6925 Find the same name as well. If the same command is found and it is
6926 a dummy command, overwrite members. If it is not a dummy command,
6928 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
6929 (grub_command_find): If a dummy command is found, load a module
6930 and retry to find a command only once.
6932 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
6933 make sure that each command is loaded.
6935 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
6937 (struct grub_command): Remove const from the member `name'.
6938 Add a new member `module_name'.
6939 (grub_register_command): Return grub_command_t.
6941 * commands/help.c (grub_cmd_help): Call grub_command_find to make
6942 sure that each command is loaded.
6944 * genmk.rb (PModule::rule): Specify a module name without the
6945 suffix ".mod" to gencmdlist.sh.
6947 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
6949 * gencmdlist.sh: New file.
6951 * genmk.rb (PModule::rule): Generate a rule for a command list.
6953 Generate command.lst from $(COMMANDFILES).
6955 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
6956 (DATA): Added $(pkgdata_DATA).
6957 (install-local): Install files in $(pkgdata_DATA).
6959 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
6961 * term/i386/pc/vga.c (debug_command): Removed.
6962 (GRUB_MOD_INIT): Do not register the command "debug".
6964 From Hollis Blanchard:
6965 * commands/configfile.c: New file.
6966 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6967 commands/configfile.c.
6968 (pkgdata_MODULES): Added configfile.mod.
6969 (configfile_mod_SOURCES): New variable.
6970 (configfile_mod_CFLAGS): Likewise.
6971 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
6972 commands/configfile.c.
6973 (pkgdata_MODULES): Added configfile.mod.
6974 (configfile_mod_SOURCES): New variable.
6975 (configfile_mod_CFLAGS): Likewise.
6976 * util/grub-emu.c (main): Call grub_configfile_init and
6977 grub_configfile_fini.
6978 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
6980 [GRUB_UTIL] (grub_configfile_fini): Likewise.
6982 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
6984 * normal/arg.c (grub_arg_show_help): Do not show the bug report
6987 * commands/help.c (grub_cmd_help): Do not print newlines after
6988 the last command in print_command_help.
6990 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
6992 * commands/default.h: New file.
6993 * commands/timeout.h: Likewise.
6994 * normal/context.c: Likewise.
6996 * util/misc.c: Do not include sys/times.h.
6997 Include sys/time.h and grub/machine/time.h.
6998 (grub_get_rtc): Rewritten with gettimeofday.
7000 * util/grub-emu.c (main): Call grub_default_init and
7001 grub_timeout_init before grub_normal_init, and call
7002 grub_timeout_fini and grub_default_fini after grub_main.
7004 * util/console.c (grub_ncurses_checkkey): Return the read
7007 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
7010 * normal/main.c (read_config_file): Push MENU. If this fails,
7011 print an error and wait for a user input.
7012 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
7013 If a menu is empty or an error occurs, pop MENU.
7014 (grub_normal_execute): Pop and free MENU after grub_menu_run
7017 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
7019 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
7021 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
7023 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
7025 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
7028 * include/grub/normal.h (struct grub_menu_list): New struct.
7029 (grub_menu_list_t): New type.
7030 (struct grub_context): New struct.
7031 (grub_context_t): New type.
7032 (grub_register_command): Got rid of EXPORT_FUNC.
7033 (grub_unregister_command): Likewise.
7034 (grub_context_get): New prototype.
7035 (grub_context_get_current_menu): Likewise.
7036 (grub_context_push_menu): Likewise.
7037 (grub_context_pop_menu): Likewise.
7038 [GRUB_UTIL] (grub_default_init): Likewise.
7039 [GRUB_UTIL] (grub_default_fini): Likewise.
7040 [GRUB_UTIL] (grub_timeout_init): Likewise.
7041 [GRUB_UTIL] (grub_timeout_fini): Likewise.
7043 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
7044 commands/timeout.c and normal/context.c.
7045 (pkgdata_MODULES): Added default.mod and timeout.mod.
7046 (normal_mod_SOURCES): Added normal/context.c.
7047 (default_mod_SOURCES): New variable.
7048 (default_mod_CFLAGS): Likewise.
7049 (timeout_mod_SOURCES): Likewise.
7050 (timeout_mod_CFLAGS): Likewise.
7051 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
7053 (pkgdata_MODULES): Added default.mod and timeout.mod.
7054 (normal_mod_SOURCES): Added normal/context.c.
7055 (default_mod_SOURCES): New variable.
7056 (default_mod_CFLAGS): Likewise.
7057 (timeout_mod_SOURCES): Likewise.
7058 (timeout_mod_CFLAGS): Likewise.
7060 * Makefile.in (all-local): Added $(MKFILES).
7062 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
7064 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
7065 (grub_emu_SOURCES): Likewise.
7066 (pkgdata_MODULES): Add `sun.mod'.
7067 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
7068 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7070 (pkgdata_MODULES): Add `sun.mod'.
7071 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
7072 * include/grub/partition.h (grub_sun_partition_map_init): New
7074 (grub_sun_partition_map_fini): Likewise.
7075 * partmap/sun.c: New file.
7076 * util/grub-emu.c (main): Initialize and de-initialize the sun
7077 partitionmap support.
7079 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
7081 This implements an Emacs-like menu entry editor.
7083 * normal/menu_entry.c: New file.
7085 * util/console.c (grub_ncurses_putchar): Translate some Unicode
7086 characters to ASCII.
7087 (saved_char): New variable.
7088 (grub_ncurses_checkkey): Rewritten completely.
7089 (grub_ncurses_getkey): Likewise.
7090 (grub_ncurses_init): Call raw instead of cbreak.
7092 * normal/menu.c (print_entry): Do not put a space.
7093 (init_page): Renamed to ...
7094 (grub_menu_init_page): ... this. All callers changed.
7095 (edit_menu_entry): Removed.
7096 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
7098 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
7100 * kern/misc.c (grub_vprintf): Call grub_refresh.
7102 * normal/menu.c (DISP_LEFT): Renamed to ...
7103 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
7104 * normal/menu.c (DISP_UP): Renamed to ...
7105 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
7106 * normal/menu.c (DISP_RIGHT): Renamed to ...
7107 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
7108 * normal/menu.c (DISP_DOWN): Renamed to ...
7109 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
7110 * normal/menu.c (DISP_HLINE): Renamed to ...
7111 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
7112 * normal/menu.c (DISP_VLINE): Renamed to ...
7113 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
7114 * normal/menu.c (DISP_UL): Renamed to ...
7115 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
7116 * normal/menu.c (DISP_UR): Renamed to ...
7117 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
7118 * normal/menu.c (DISP_LL): Renamed to ...
7119 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
7120 * normal/menu.c (DISP_LR): Renamed to ...
7121 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
7122 * normal/menu.c (TERM_WIDTH): Renamed to ...
7123 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
7124 * normal/menu.c (TERM_HEIGHT): Renamed to ...
7125 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
7126 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
7127 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
7128 * normal/menu.c (TERM_MARGIN): Renamed to ...
7129 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
7130 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
7131 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
7132 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
7133 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
7134 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
7135 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
7136 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
7137 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
7138 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
7139 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
7140 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
7141 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
7142 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
7143 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
7144 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
7145 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
7146 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
7147 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
7148 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
7149 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
7150 All callers changed.
7152 * include/grub/normal.h: New prototype.
7154 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7155 normal/menu_entry.c.
7156 (normal_mod_SOURCES): Likewise.
7157 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7158 (normal_mod_SOURCES): Likewise.
7160 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
7162 * include/grub/normal.h (grub_halt_init): New prototype.
7163 (grub_halt_fini): Likewise.
7164 (grub_reboot_init): Likewise.
7165 (grub_reboot_fini): Likewise.
7167 * util/grub-emu.c: Include signal.h.
7168 (main_env): New global variable.
7169 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
7171 (grub_machine_fini): New function.
7172 (main): Call grub_halt_init and grub_reboot_init before
7173 grub_main, and grub_reboot_fini and grub_halt_fini after it.
7174 Call setjmp with MAIN_ENV to go back afterwards.
7175 Call grub_machine_fini right before return.
7177 * include/grub/util/misc.h: Include setjmp.h.
7178 (main_env): New prototype.
7180 * include/grub/kernel.h (grub_machine_fini): New prototype.
7181 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
7182 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
7184 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
7185 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
7186 * term/i386/pc/console.c (grub_console_fini): Likewise.
7188 * util/i386/pc/misc.c: New file.
7190 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
7191 util/i386/pc/misc.c, commands/i386/pc/halt.c and
7192 commands/i386/pc/reboot.c.
7194 2005-02-14 Guillem Jover <guillem@hadrons.org>
7196 * include/grub/dl.h (grub_dl_check_header): New prototype.
7197 (grub_arch_dl_check_header): Change return type to grub_err_t,
7198 remove size parameter and export function. Update all callers.
7199 * kern/dl.c (grub_dl_check_header): New function.
7200 (grub_dl_load_core): Use `grub_dl_check_header' instead of
7201 `grub_arch_dl_check_header'. Check ELF type. Check if sections
7202 are inside the core.
7203 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
7204 independent ELF header checks.
7205 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
7206 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
7207 `grub_dl_check_header' instead of explicit checks. Check for the
7209 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
7210 `grub_dl_check_header' instead of explicit checks. Remove arch
7211 specific ELF header checks.
7213 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
7216 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
7218 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
7219 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
7221 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
7223 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
7224 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
7225 (part_map_iterate): Clear `grub_errno' and return 0 if
7226 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
7227 * partmap/amiga.c (amiga_partition_map_iterate): Return
7228 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
7229 * partmap/apple.c (apple_partition_map_iterate): Likewise.
7231 2005-02-01 Guillem Jover <guillem@hadrons.org>
7233 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
7236 2005-01-31 Marco Gerards <metgerards@student.han.nl>
7238 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
7240 (grub_rescue_cmd_linux): New prototype.
7241 (grub_rescue_cmd_initrd): Likewise.
7242 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
7244 (grub_linux_release_mem): Release the memory for the initrd.
7245 (grub_load_linux): Renamed from this...
7246 (grub_rescue_cmd_linux): ...To this. Changed all callers.
7247 Changed `entry' not to be static. Loop over memory regions to
7248 find another one when the default fails.
7249 (grub_rescue_cmd_initrd): New function.
7250 (grub_linux_init): Remove function.
7251 (grub_linux_fini): Likewise.
7252 (GRUB_MOD_INIT): Register `initrd'.
7253 (GRUB_MOD_FINI): Unregister `initrd'.
7254 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
7256 (grub_linux_normal_fini): Likewise.
7257 (GRUB_MOD_INIT): Register `initrd'.
7258 (GRUB_MOD_FINI): Unregister `initrd'.
7260 2005-01-31 Marco Gerards <metgerards@student.han.nl>
7262 * commands/help.c: New file.
7263 * normal/arg.c (show_help): Renamed to...
7264 (grub_arg_show_help): ... this.
7265 * commands/i386/pc/halt.c: New file.
7266 * commands/i386/pc/reboot.c: Likewise.
7267 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
7268 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
7269 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
7270 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
7272 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7274 (pkgdata_MODULES): Add `help.mod'.
7275 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
7276 * grub/i386/pc/init.h (grub_reboot): New prototype.
7277 (grub_halt): Likewise.
7278 * include/grub/normal.h (grub_arg_show_help): New prototype.
7279 (grub_help_init): Likewise.
7280 (grub_help_fini): Likewise.
7281 * util/grub-emu.c (main): Initialize and deinitialize the help
7284 * normal/cmdline.c (grub_cmdline_get): Doc fix.
7286 * normal/command.c (grub_command_init): Fixed the description of
7287 the `set' and `unset' commands.
7289 2005-01-31 Marco Gerards <metgerards@student.han.nl>
7291 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
7293 * commands/ieee1275/halt.c: New file.
7294 * commands/ieee1275/reboot.c: Likewise.
7295 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
7296 `__attribute__ ((unused))'. Some GCS related fixed.
7297 (grub_suspend_init) [GRUB_UTIL]: Function removed.
7298 (grub_suspend_fini): Likewise.
7299 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
7301 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
7302 (halt_mod_CFLAGS): New variables.
7303 * include/grub/powerpc/ieee1275/ieee1275.h
7304 (grub_ieee1275_interpret): New prototype.
7306 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
7308 * include/grub/misc.h (memmove): New prototype.
7311 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
7313 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
7314 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
7316 2005-01-22 Marco Gerards <metgerards@student.han.nl>
7318 * kern/misc.c (grub_strndup): Function rewritten.
7320 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
7322 * normal/menu.c (TERM_WIDTH): Macro redefined.
7323 (TERM_TOP_BORDER_Y): Likewise.
7324 (draw_border): Replaced while-loop by a for-loop. Make the number
7325 of lines consistent with the number of lines displayed in
7326 print_entries. Added a margin below the rectangle.
7327 (print_entry): Make the entry fit in the rectangle.
7328 (print_entries): Display the scroll arrows next to the right
7331 2005-01-21 Marco Gerards <metgerards@student.han.nl>
7333 * fs/minix.c (grub_minix_find_file): Reserve more space for
7334 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
7335 `grub_strncpy' to copy `path' into it.
7337 2005-01-21 Marco Gerards <metgerards@student.han.nl>
7339 Add the loopback device, a device via which files can be accessed
7342 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
7343 (pkgdata_MODULES): Add loopback.mod.
7344 (loopback_mod_SOURCES): New variable.
7345 (loopback_mod_CFLAGS): Likewise.
7346 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
7348 (pkgdata_MODULES): Add loopback.mod.
7349 (loopback_mod_SOURCES): New variable.
7350 (loopback_mod_CFLAGS): Likewise.
7351 * disk/loopback.c: new file.
7352 * include/grub/normal.h (grub_loop_init): New prototype.
7353 (grub_loop_fini): New prototype.
7354 * util/grub-emu.c (main): Initialize and de-initialize loopback
7356 * include/grub/disk.h (grub_disk_dev_id): Add
7357 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
7359 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
7361 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
7363 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
7364 (suspend_mod_SOURCES): New variable.
7365 (suspend_mod_CFLAGS): Likewise.
7366 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
7368 * commands/ieee1275/suspend.c: New file.
7370 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
7372 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
7373 ((unused))' to `__attribute__ ((used))'.
7374 (GRUB_MOD_FINI): Likewise.
7375 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
7376 * genmk.rb (PModule): Assign space to common symbols when linking
7379 2005-01-20 Marco Gerards <metgerards@student.han.nl>
7381 * include/grub/mm.h (grub_mm_init_region): Change the type of the
7382 `unsigned' arguments to `grub_size_t'.
7383 (grub_malloc): Likewise.
7384 (grub_realloc): Likewise.
7385 (grub_memalign): Likewise.
7386 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
7387 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
7388 * util/misc.c (grub_malloc): Likewise.
7389 (grub_realloc): Likewise.
7390 * kern/mm.c (get_header_from_pointer): Change the casts to
7391 `unsigned' into a cast to `grub_size_t'.
7393 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
7394 point to `currnode' when `currnode' is changed.
7396 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
7397 Schottelius <nico-linux@schottelius.org>.
7399 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
7401 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
7402 (note_path): Remove variable.
7403 (GRUB_IEEE1275_NOTE_NAME): New macro.
7404 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
7405 (grub_ieee1275_note_hdr): New structure.
7406 (grub_ieee1275_note_desc): Likewise.
7407 (grub_ieee1275_note): Likewise.
7408 (load_note): Remove `dir' argument. All callers updated. Remove
7409 `note_img' and `path'. Do not load a file from `note_path'.
7410 Initialize a struct grub_ieee1275_note and write that to `out'.
7411 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
7413 2005-01-05 Marco Gerards <metgerards@student.han.nl>
7415 * util/misc.c (grub_util_read_image): Revert last change. It
7416 called `grub_util_read_at', which seeks from the beginning of the
7419 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
7421 * TODO: Add note about endianness in grub-mkimage.
7422 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
7424 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
7425 (grub_mkimage_SOURCES): New target.
7426 * include/grub/kernel.h (grub_start_addr): Remove variable.
7427 (grub_end_addr): Likewise.
7428 (grub_total_module_size): Likewise.
7429 (grub_kernel_image_size): Likewise.
7430 (GRUB_MODULE_MAGIC): New constant.
7431 (grub_module_info): New structure.
7432 (grub_arch_modules_addr): New prototype.
7433 (grub_get_end_addr): Remove prototype.
7434 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
7435 * include/grub/powerpc/ieee1275/kernel.h: New file.
7436 * include/grub/util/misc.h (grub_util_get_fp_size): New
7438 (grub_util_read_at): Likewise.
7439 (grub_util_write_image_at): Likewise.
7440 * kern/main.c (grub_get_end_addr): Remove function.
7441 (grub_load_modules): Call grub_arch_modules_addr instead of using
7442 grub_end_addr. Look for a grub_module_info struct in memory. Use
7443 the grub_module_info fields instead of calling grub_get_end_addr
7444 as loop conditions. Move grub_add_unused_region code here.
7445 (grub_add_unused_region): Remove function.
7446 * kern/i386/pc/init.c: Include grub/cache.h.
7447 (grub_machine_init): Remove call to grub_get_end_addr. Remove
7448 one call to add_mem_region.
7449 (grub_arch_modules_addr): New function.
7450 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
7451 (grub_total_module_size): Likewise.
7452 Include grub/machine/kernel.h.
7453 (grub_arch_modules_addr): New function.
7454 * util/grub-emu.c (grub_end_addr): Remove variable.
7455 (grub_total_module_size): Likewise.
7456 (grub_arch_modules_addr): New function.
7457 * util/misc.c: Include unistd.h.
7458 (grub_util_get_fp_size): New function.
7459 (grub_util_read_at): Likewise.
7460 (grub_util_write_image_at): Likewise.
7461 (grub_util_read_image): Call grub_util_read_at.
7462 (grub_util_write_image): Call grub_util_write_image_at.
7463 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
7464 additional memory in kernel_img for a struct grub_module_info.
7465 Fill in that grub_module_info.
7466 * util/powerpc/ieee1275/grub-mkimage.c: New file.
7468 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
7470 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
7472 * include/grub/powerpc/ieee1275/ieee1275.h
7473 (grub_ieee1275_milliseconds): New prototype.
7474 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
7476 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
7477 grub_ieee1275_milliseconds.
7479 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
7481 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
7483 (find_options): New function.
7484 (cmain): Call find_options.
7485 * include/grub/powerpc/ieee1275/ieee1275.h
7486 (grub_ieee1275_realmode): New extern variable.
7487 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
7488 grub_map if grub_ieee1275_realmode is false.
7490 2004-12-29 Marco Gerards <metgerards@student.han.nl>
7492 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
7493 lines are inserted and make it work like readline. Reported by
7494 Vincent Pelletier <subdino2004@yahoo.fr>.
7496 2004-12-28 Marco Gerards <metgerards@student.han.nl>
7498 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
7500 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
7501 `kern/powerpc/cache.S'.
7503 2004-12-27 Marco Gerards <metgerards@student.han.nl>
7505 * genmk.rb: Handle the `Program' class in the main loop. Written
7506 by Johan Rydberg <jrydberg@gnu.org>.
7507 (Program): New class.
7508 (programs): New variable.
7509 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
7510 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
7511 instead of "grub/kernel.h". Include <grub/machine/init.h>.
7512 (help_arch): Function removed.
7513 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
7514 `powerpc/libgcc.h' and `loader.h'.
7515 (pkgdata_PROGRAMS): New variable.
7516 (sbin_UTILITIES): Variable removed.
7517 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
7518 (grubof_SOURCES): Variable re-defined so it only includes the
7520 (grubof_CFLAGS): Remove `-DGRUBOF'.
7521 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
7522 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
7523 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
7524 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
7525 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
7526 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
7527 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
7528 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
7529 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
7530 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
7531 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
7532 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
7533 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
7534 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
7535 (pc_mod_CFLAGS): New variables.
7536 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
7537 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
7538 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
7539 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
7541 * include/grub/i386/pc/init.h (grub_os_area_addr)
7542 (rub_os_area_size): ... to here.
7543 * include/grub/powerpc/ieee1275/ieee1275.h
7544 (grub_ieee1275_entry_fn): Export symbol.
7545 * include/grub/powerpc/ieee1275/init.h: New file.
7546 * include/grub/powerpc/libgcc.h: Likewise.
7547 * include/grub/cache.h: Likewise.
7548 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
7549 <hollis@penguinppc.org>.
7550 * kern/dl.c: Include <grub/cache.h>.
7551 (grub_dl_flush_cache): New function.
7552 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
7554 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
7555 (grub_console_init): Removed prototypes.
7556 (grub_machine_init): Don't initialize the modules anymore.
7557 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
7559 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
7560 Macro undef removed.
7561 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
7562 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
7563 relocation `R_PPC_REL32'. Return an error when the relocation is
7565 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
7566 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
7567 * util/misc.c (grub_arch_sync_caches): Likewise.
7569 2004-12-19 Marco Gerards <metgerards@student.han.nl>
7571 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
7572 `symlist.c', add `grubof_symlist.c'.
7573 (symlist.c): Variable removed.
7574 (grubof_HEADERS): Variable added.
7575 (grubof_symlist.c): New target.
7576 (kernel_syms.lst): Use `grubof_HEADERS' instead of
7577 `kernel_img_HEADERS'.
7578 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
7579 * kern/powerpc/dl.c: New file.
7580 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
7582 (grub_arch_dl_relocate_symbols): Likewise.
7583 (grub_register_exported_symbols): Likewise.
7585 2004-12-13 Marco Gerards <metgerards@student.han.nl>
7587 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
7588 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
7589 to fail instead. Reported by Vincent Pelletier
7590 <subdino2004@yahoo.fr>.
7592 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
7593 it is not allocated. Reported by Vincent Pelletier
7594 <subdino2004@yahoo.fr>.
7596 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
7597 output so the output looks better.
7599 2004-12-04 Marco Gerards <metgerards@student.han.nl>
7601 Modulize the partition map support and add support for the amiga
7604 * commands/ls.c: Include <grub/partition.h> instead of
7605 <grub/machine/partition.h>.
7606 * kern/disk.c: Likewise.
7607 * kern/rescue.c: Likewise.
7608 * loader/i386/pc/chainloader.c: Likewise.
7609 * normal/cmdline.c: Likewise.
7610 * kern/powerpc/ieee1275/init.c: Likewise.
7611 (grub_machine_init): Call `grub_pc_partition_map_init',
7612 `grub_amiga_partition_map_init' and
7613 `grub_apple_partition_map_init'.
7614 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
7615 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
7616 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
7617 `partition.h' and `pc_partition.h'.
7618 (grub_setup_SOURCES): Remove
7619 `disk/i386/pc/partition.c'. Add `kern/partition.c',
7620 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
7621 (grub_emu_SOURCES): Likewise.
7622 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
7623 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
7624 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
7625 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
7626 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
7627 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
7628 (grubof_SOURCES): Likewise.
7629 * disk/i386/pc/partition.c: File removed.
7630 * disk/powerpc/ieee1275/partition.c: Likewise.
7631 * include/grub/powerpc/ieee1275/partition.h: Likewise.
7632 * include/grub/i386/pc/partition.h: Likewise.
7633 * kern/partition.c: New file.
7634 * partmap/amiga.c: Likewise.
7635 * partmap/apple.c: Likewise.
7636 * partmap/pc.c: Likewise.
7637 * include/grub/partition.h: Likewise..
7638 * include/grub/pc_partition.h: Likewise.
7639 * util/grub-emu.c: Include <grub/partition.h> instead of
7640 <grub/machine/partition.h>.
7641 (main): Call `grub_pc_partition_map_init',
7642 `grub_amiga_partition_map_init' and
7643 `grub_apple_partition_map_init' and deinitialize afterwards.
7644 * util/i386/pc/biosdisk.c: Include `#include
7645 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
7646 `<grub/machine/partition.h>'.
7647 * util/i386/pc/grub-setup.c: Likewise.
7648 * util/i386/pc/biosdisk.c: Likewise.
7649 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
7650 partition information in case of a PC partition.
7651 * util/i386/pc/grub-setup.c: Include `#include
7652 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
7653 `<grub/machine/partition.h>'.
7654 (setup): Only access the PC specific partition information in case
7657 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
7659 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
7660 (grub_longjmp): Likewise.
7661 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
7663 * normal/powerpc/setjmp.S: New file.
7664 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
7665 `normal/powerpc/setjmp.S'.
7666 (grubof_CFLAGS): Add `-DGRUBOF'.
7667 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
7668 [GRUB_UTIL && !GRUBOF].
7670 2004-11-16 Marco Gerards <metgerards@student.han.nl>
7672 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
7673 property named `name'. Correctly handle the error returned by
7674 `grub_ieee1275_finddevice' if a device can not be opened.
7676 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
7678 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
7679 `actual' for negativity.
7680 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
7683 2004-11-01 Marco Gerards <metgerards@student.han.nl>
7685 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
7686 (PAGE_OFFSET): New macro.
7687 (CRTC_ADDR_PORT): Likewise.
7688 (CRTC_DATA_PORT): Likewise.
7689 (START_ADDR_HIGH_REGISTER): Likewise.
7690 (START_ADDR_LOW_REGISTER): Likewise.
7691 (GRAPHICS_ADDR_PORT): Likewise.
7692 (GRAPHICS_DATA_PORT): Likewise.
7693 (READ_MAP_REGISTER): Likewise.
7694 (INPUT_STATUS1_REGISTER): Likewise.
7695 (INPUT_STATUS1_VERTR_BIT): Likewise.
7696 (page): New variable.
7697 (wait_vretrace): New function.
7698 (set_read_map): Likewise.
7699 (set_start_address): Likewise.
7700 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
7702 (check_vga_mem): Take the page into account.
7703 (write_char): Likewise.
7704 (write_cursor): Likewise.
7705 (scroll_up): Likewise. Copy the page to the page that is not
7706 shown and switch between both pages.
7707 (grub_vga_putchar): Fix off by one error.
7708 (grub_vga_cls): Wait for the vertical retrace. Take the page into
7711 2004-11-01 Marco Gerards <metgerards@student.han.nl>
7713 Add support for iso9660 (including rockridge).
7715 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
7716 (iso9660_mod_SOURCES): New variable.
7717 (iso9660_mod_CFLAGS): Likewise.
7718 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
7719 * include/grub/fs.h (grub_iso9660_init): New prototype.
7720 * util/grub-emu.c (main): Call `grub_iso9660_init'.
7721 * fs/iso9660.c: New file.
7723 * include/grub/misc.h (grub_strncat): New prototype.
7724 * kern/misc.c (grub_strncat): New function.
7726 * fs/hfs.c (grub_hfs_mount): Translate the error
7727 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
7728 * fs/jfs.c (grub_jfs_mount): Likewise.
7729 * fs/ufs.c (grub_ufs_mount): Likewise.
7731 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
7733 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
7734 which initialized BAT registers.
7735 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
7736 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
7738 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
7739 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
7741 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
7742 (grub_mapclaim): Likewise.
7743 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
7744 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
7747 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
7749 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
7750 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
7751 -ffreestanding and -msoft-float.
7753 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
7755 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
7756 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
7757 set in grub_ieee1275_flags.
7759 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
7761 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
7763 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
7764 grub_console_init first.
7765 Change the memory range used for grub_ieee1275_claim and
7766 grub_mm_init_region.
7767 Print an error message if the claim fails.
7768 Include <grub/misc.h>.
7770 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
7772 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
7773 Call grub_children_iterate for device nodes of type `scsi',
7775 (grub_ofdisk_open): Remove manual device alias resolution.
7776 Fix memory leak when device cannot be opened.
7777 * include/grub/powerpc/ieee1275/ieee1275.h
7778 (grub_children_iterate): New prototype.
7779 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
7781 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
7782 Return -1 if args.size was -1.
7784 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
7786 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
7787 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
7788 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
7789 Open Firmware's memory for it; claim memory from _start to _end.
7790 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
7792 (_start): Zero BSS from __bss_start to _end.
7793 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
7795 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
7797 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
7799 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
7800 -1 if args.base was -1.
7802 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
7804 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
7805 escape sequence instead of a literal ^L. Also call
7806 grub_ofconsole_gotoxy.
7808 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
7810 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
7811 void * arguments to grub_addr_t. All callers updated. Also make
7812 the `result' argument optional.
7813 (grub_ieee1275_release): change void * arguments to grub_addr_t.
7814 All callers updated.
7816 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
7818 * commands/ls.c (grub_ls_list_files): Use the string following the
7819 initial ')', if present, as the filesystem path.
7820 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
7822 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
7824 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
7826 Make the source code of the menu interface more readable.
7828 * normal/menu.c: Include grub/mm.h.
7829 (TERM_WIDTH): New macro.
7830 (TERM_HEIGHT): Likewise.
7831 (TERM_INFO_HEIGHT): Likewise.
7832 (TERM_MARGIN): Likewise.
7833 (TERM_SCROLL_WIDTH): Likewise.
7834 (TERM_TOP_BORDER_Y): Likewise.
7835 (TERM_LEFT_BORDER_X): Likewise.
7836 (TERM_BORDER_WIDTH): Likewise.
7837 (TERM_MESSAGE_HEIGHT): Likewise.
7838 (TERM_BORDER_HEIGHT): Likewise.
7839 (TERM_NUM_ENTRIES): Likewise.
7840 (TERM_FIRST_ENTRY_Y): Likewise.
7841 (TERM_ENTRY_WIDTH): Likewise.
7842 (TERM_CURSOR_X): Likewise.
7843 (draw_border): Use macros instead of magic numbers.
7844 (print_entry): Likewise.
7845 (print_entries): Likewise.
7846 (run_menu): Likewise. Also, handle the key 'e'.
7847 (run_menu_entry): Ignore empty command lines.
7848 (print_message): Added a new argument EDIT. If EDIT is true,
7849 print a different message.
7850 (init_page): Likewise.
7851 (edit_menu_entry): New function. Not implemented yet.
7853 2004-09-17 Marco Gerards <metgerards@student.han.nl>
7855 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
7856 can be loaded from normal mode.
7858 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
7860 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
7861 (multiboot_mod_CFLAGS): New variables.
7862 * loader/i386/pc/linux_normal.c: New file.
7863 * loader/i386/pc/multiboot_normal.c: Likewise.
7865 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
7868 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
7869 `fdiro' to read the mode information from instead of `diro'.
7871 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
7872 looking up a symlink.
7874 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
7876 * normal/command.c (grub_command_execute): Don't parse the
7877 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
7878 flags of the command.
7880 * normal/menu.c (grub_menu_run): Fix typo.
7882 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
7884 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
7886 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
7887 `y + 1' instead of `y - 1'.
7889 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
7891 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
7893 From Hollis Blanchard <hollis@penguinppc.org>:
7894 * kern/misc.c (memmove): New alias for grub_memmove.
7895 (memcmp): New alias for grub_memcmp.
7896 (memset): New alias for grub_memset.
7897 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
7898 Change "int handle" to "grub_ieee1275_phandle_t handle".
7899 * include/grub/powerpc/ieee1275/ieee1275.h
7900 (grub_ieee1275_get_property): Likewise.
7902 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
7904 Added normal mode command `chainloader' as module chain.mod, which
7905 depends on normal.mod and _chain.mod.
7907 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
7908 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
7909 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
7911 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
7912 but arguments parsing moved to ...
7913 (grub_chainloader_cmd): ... here. New function.
7914 * include/grub/i386/pc/chainloader.h: New file.
7915 * loader/i386/pc/chainloader_normal.c: Likewise.
7917 2004-09-11 Marco Gerards <metgerards@student.han.nl>
7919 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
7920 (grub_mkimage_LDFLAGS): Likewise.
7921 (grub_emu_SOURCES): Likewise.
7922 (kernel_img_HEADERS): Added fshelp.h.
7923 * fs/ext2.c: Include <grub/fshelp.h>.
7924 (FILETYPE_REG): New macro.
7925 (FILETYPE_INO_REG): Likewise.
7926 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
7928 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
7930 (grub_fshelp_node): New struct.
7931 (grub_ext2_data): Added member `diropen'. Changed member `inode'
7933 (grub_ext2_get_file_block): Removed function.
7934 (grub_ext2_read_block): New function.
7935 (grub_ext2_read_file): Replaced parameter `data' by `node'.
7936 This function was written.
7937 (grub_ext2_mount): Read the root inode. Create a diropen struct.
7938 (grub_ext2_find_file): Removed function.
7939 (grub_ext2_read_symlink): New function.
7940 (grub_ext2_iterate_dir): Likewise.
7941 (grub_ext2_open): Rewritten.
7942 (grub_ext2_dir): Rewritten.
7943 * include/grub/fshelp.h: New file.
7944 * fs/fshelp.c: Likewise.
7946 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
7948 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
7949 (print_message): Add a missing newline.
7950 (run_menu): Added timeout support.
7951 (run_menu_entry): New local function.
7952 (grub_menu_run): Added support for booting.
7954 * kern/loader.c (grub_loader_is_loaded): New function.
7956 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
7957 (grub_get_rtc): Exported.
7959 * include/grub/i386/pc/time.h: Include grub/symbol.h.
7960 (grub_get_rtc): Exported.
7962 * include/grub/normal.h (struct grub_command_list): Remove
7963 constant from the member `command'.
7965 * include/grub/loader.h (grub_loader_is_loaded): Declared.
7967 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
7969 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
7971 2004-08-28 Marco Gerards <metgerards@student.han.nl>
7973 Add support for the JFS filesystem.
7975 * fs/jfs.c: New file.
7976 * include/grub/fs.h (grub_jfs_init): New prototype.
7977 (grub_jfs_fini): New prototype.
7978 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
7979 (grub_emu_SOURCES): Likewise.
7980 (pkgdata_MODULES): Add jfs.mod.
7981 (jfs_mod_SOURCES): New variable.
7982 (jfs_mod_CFLAGS): Likewise.
7983 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
7984 (grubof_SOURCES): Likewise.
7985 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
7987 * fs/fat.c (grub_fat_find_dir): Convert the filename little
7988 endian to the host endian.
7989 (grub_fat_utf16_to_utf8): Move function from there...
7990 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
7991 the endianess of the source string anymore.
7992 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
7994 2004-08-24 Marco Gerards <metgerards@student.han.nl>
7996 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
7997 (grub_boot_fini) [GRUB_UTIL]: Likewise.
7998 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
7999 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
8001 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
8002 (grub_hfs_iterate_dir): Make the function static. Add prototypes
8003 for `node_found' and `it_dir'.
8004 (grub_hfs_dir): Add prototype for `dir_hook'.
8006 * fs/minix.c (grub_minix_get_file_block): Add prototype for
8007 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
8008 and `indir32' to silence a gcc warning.
8010 * include/grub/fs.h (grub_hfs_init): New prototype.
8011 (grub_hfs_fini): Likewise.
8014 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
8016 Each disk device has its own id now. This is useful to make use
8017 of multiple disk devices.
8019 * include/grub/disk.h (grub_disk_dev_id): New enum.
8020 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
8021 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
8023 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
8024 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
8026 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
8027 GRUB_DISK_DEVICE_OFDISK_ID as an id.
8029 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
8030 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
8032 * include/grub/disk.h (struct grub_disk_dev): Added a new member
8033 "id" which is used by the cache manager.
8035 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
8038 2004-08-18 Marco Gerards <metgerards@student.han.nl>
8040 * fs/hfs.c: New file.
8041 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
8042 (grub_emu_SOURCES): Likewise.
8043 (pkgdata_MODULES): Add hfs.mod.
8044 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
8045 (grubof_SOURCES): Likewise.
8046 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
8048 * include/grub/misc.h (grub_strncasecmp): Add prototype.
8049 * kern/misc.c (grub_strncasecmp): Add function.
8051 2004-08-14 Marco Gerards <metgerards@student.han.nl>
8053 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
8056 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
8057 (grub_ext2_dir): In case the directory entry type is unknown, read
8060 2004-08-02 Peter Bruin <pjbruin@dds.nl>
8062 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
8063 grub_load_linux instead of grub_rescue_cmd_linux as second
8064 argument of grub_rescue_register_command.
8066 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
8068 2004-07-27 Marco Gerards <metgerards@student.han.nl>
8070 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
8072 * commands/boot.c: Remove the check for `GRUB_UTIL'.
8073 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
8074 `loader/powerpc/ieee1275/linux.c',
8075 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
8076 * include/grub/powerpc/ieee1275/ieee1275.h
8077 (grub_ieee1275_release): New prototype.
8078 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
8079 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
8080 normal, boot, linux and linux_normal.
8081 * loader/powerpc/ieee1275/linux.c: New file.
8082 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
8084 2004-07-12 Marco Gerards <metgerards@student.han.nl>
8086 * normal/arg.c (grub_arg_parse): Correct error handling after
8087 reallocating the argumentlist (check if `argl' is not null instead
8088 of checking if `args' is not null).
8089 * kern/mm.c (grub_realloc): Return the same pointer when using the
8090 same region, instead of returning the header address.
8092 2004-07-11 Marco Gerards <metgerards@student.han.nl>
8094 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
8095 one block instead of two when looking for the initial partition.
8096 (grub_partition_probe): Initialize the local variable `p' with 0.
8097 Use base 10 for the grub_strtoul call.
8098 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
8099 need for one local variable.
8100 (grub_strtoul): Don't add the new value to `num', instead of that
8103 2004-07-11 Marco Gerards <metgerards@student.han.nl>
8105 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
8106 (pxeboot_img_SOURCES): New variable.
8107 (pxeboot_img_ASFLAGS): Likewise.
8108 (pxeboot_img_LDFLAGS): Likewise.
8109 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
8110 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
8111 <lode_leroy@hotmail.com>.
8113 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
8115 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
8118 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
8120 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
8121 the history buffer logic.
8123 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
8125 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
8126 (FILETYPE_INO_SYMLINK): New macros.
8127 (grub_ext2_find_file): Check if the node is a directory using the
8128 inode stat information instead of using the filetype in the
8129 dirent. Exclude the first character of an absolute symlink.
8130 (grub_ext2_dir): Mask out the filetype part of the mode member of
8133 2004-05-24 Marco Gerards <metgerards@student.han.nl>
8135 Add support for UFS version 1 and 2. Add support for the minix
8136 filesystem version 1 and 2, both the variants with 14 and 30 long
8139 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
8141 (grub_emu_SOURCES): Likewise.
8142 (pkgdata_MODULES): Add ufs.mod and minix.mod.
8143 (ufs_mod_SOURCES): New variable.
8144 (ufs_mod_CFLAGS): Likewise.
8145 (minix_mod_SOURCES): Likewise.
8146 (minix_mod_CFLAGS): Likewise.
8147 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
8149 (grubof_SOURCES): Likewise.
8150 * fs/ufs.c: New file.
8151 * fs/minix.c: New file.
8152 * include/grub/fs.h (grub_ufs_init): New prototype.
8153 (grub_ufs_fini): Likewise.
8154 (grub_minix_init): Likewise.
8155 (grub_minix_fini): Likewise.
8156 * util/grub-emu.c (main): Initialize and deinitialize UFS and
8159 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
8161 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
8162 commands/ls.c, commands/terminal.c, commands/boot.c,
8163 commands/cmp.c and commands/cat.c.
8164 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
8166 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
8169 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
8171 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
8172 and grub_, respectively. Because the conversion is trivial and
8173 mechanical, I omit the details here. Please refer to the CVS
8174 if you need more information.
8176 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
8178 * include/pupa: Renamed to ...
8179 * include/grub: ... this.
8180 * util/i386/pc/pupa-mkimage.c: Renamed to ...
8181 * util/i386/pc/grub-mkimage.c: ... this.
8182 * util/i386/pc/pupa-setup.c: Renamed to ...
8183 * util/i386/pc/grub-setup.c: ... this.
8184 * util/pupa-emu.c: Renamed to ...
8185 * util/grub-emu.c: ... this.
8187 2004-03-29 Marco Gerards <metgerards@student.han.nl>
8189 Add support for the newworld apple macintosh (PPC). This has been
8190 tested on the powerbook 2000 only. It only adds support for
8191 generic ieee1275 functions, console and disk support. This should
8192 be easy to port to other architectures with support for Open
8195 * configure.ac: Accept the powerpc as host_cpu. In the case of
8196 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
8197 specific tests are only executed while building for the i386.
8198 Inverse test for crosscompile.
8199 * genmk.rb (Utility): Allow assembler files.
8200 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
8201 * conf/powerpc-ieee1275.rmk: New file.
8202 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
8203 * disk/powerpc/ieee1275/partition.c: Likewise.
8204 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
8205 * include/pupa/powerpc/ieee1275/console.h: Likewise.
8206 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
8207 * include/pupa/powerpc/ieee1275/time.h: Likewise.
8208 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
8209 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
8210 * include/pupa/powerpc/ieee1275/loader.h
8211 * include/pupa/powerpc/setjmp.h: Likewise.
8212 * include/pupa/powerpc/types.h: Likewise.
8213 * kern/powerpc/ieee1275/init.c: Likewise.
8214 * kern/powerpc/ieee1275/openfw.c: Likewise.
8215 * term/powerpc/ieee1275/ofconsole.c: Likewise.
8217 These files were written by Johan Rydberg
8218 (jrydberg@night.trouble.net) and I only modified them slightly.
8220 * boot/powerpc/ieee1275/cmain.c: New file.
8221 * boot/powerpc/ieee1275/crt0.S: Likewise.
8222 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
8223 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
8225 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
8227 * Makefile.in: Update copyright.
8228 * genmodsrc.sh: Likewise.
8229 * gensymlist.sh: Likewise.
8230 * term/i386/pc/vga.c: Indent correctly.
8232 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
8233 bugreporting address.
8234 * util/i386/pc/pupa-setup.c (usage): Likewise,
8235 (main): Call pupa_ext2_init and pupa_ext2_fini.
8237 * fs/fat.c (log2): Renamed to ...
8238 (fat_log2): ... this.
8239 All callers changed.
8240 * kern/misc.c (memcpy): Alias to pupa_memmove.
8241 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
8243 * util/console.c (pupa_ncurses_fini): Return 0.
8245 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
8246 Move fail label here.
8247 [__GNU__]: Don't warn when using stat.
8248 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
8249 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
8250 long int. Use strtol instead of strtoul.
8252 2004-03-14 Marco Gerards <metgerards@student.han.nl>
8254 * commands/boot.c: New file.
8255 * commands/cat.c: Likewise.
8256 * commands/cmp.c: Likewise.
8257 * commands/ls.c: Likewise.
8258 * commands/terminal.c: Likewise.
8259 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
8260 (pupa_register_command): Changed interface to match the new
8262 (pupa_command_execute): Changed (almost rewritten) so it uses
8263 pupa_split_command. Added support for setting variables using the
8265 (rescue_command): Changed to work with the new argument parser.
8266 (terminal_command): Moved from here to commands/terminal.c.
8267 (set_command): New function.
8268 (unset_command): New function.
8269 (insmod_command): New function.
8270 (rmmod_command): New function.
8271 (lsmod_command): New function.
8272 (pupa_command_init): Don't initialize the command terminal
8273 anymore. Initialize the commands set, unset, insmod, rmmod and
8275 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
8276 (kernel_img_HEADERS): Add arg.h and env.h.
8277 (pupa_mkimage_LDFLAGS): Add kern/env.c.
8278 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
8279 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
8281 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
8283 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
8284 (boot_mod_SOURCES): New variable.
8285 (terminal_mod_SOURCES): Likewise.
8286 (ls_mod_SOURCES): Likewise.
8287 (cmp_mod_SOURCES): Likewise.
8288 (cat_mod_SOURCES): Likewise.
8290 * normal/arg.c: New file.
8291 * kern/env.c: Likewise.
8292 * include/pupa/arg.h: Likewise.
8293 * include/pupa/env.h: Likewise.
8294 * font/manager.c (font_command): Changed to match argument parsing
8296 (PUPA_MOD_INIT): Likewise.
8297 * hello/hello.c (pupa_cmd_hello): Likewise.
8298 (PUPA_MOD_INIT): Likewise.
8299 * include/pupa/disk.h: Include <pupa/device.h>.
8300 (pupa_print_partinfo): New prototype.
8301 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
8302 (pupa_dl_get_prefix): Likewise.
8303 * include/pupa/misc.h: Include <pupa/err.h>.
8304 (pupa_isgraph): New prototype.
8305 (pupa_isdigit): Likewise.
8306 (pupa_split_cmdline): Likewise.
8307 * include/pupa/normal.h: Include <pupa/arg.h>.
8308 (pupa_command): Changed the prototype of the member `func' to
8309 match the argument parsing interface. Added member `options'.
8310 (pupa_register_command): Updated to match function.
8311 (pupa_arg_parse): New prototype.
8312 (pupa_hello_init) [PUPA_UTIL]: New prototype.
8313 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
8314 (pupa_ls_init) [PUPA_UTIL]: Likewise.
8315 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
8316 (pupa_cat_init) [PUPA_UTIL]: Likewise.
8317 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
8318 (pupa_boot_init) [PUPA_UTIL]: Likewise.
8319 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
8320 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
8321 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
8322 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
8323 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
8324 * kern/disk.c: Include <pupa/file.h>.
8325 (pupa_print_partinfo): New function.
8326 * kern/dl.c: Include <pupa/env.h>.
8327 (pupa_dl_dir): Variable removed.
8328 (pupa_dl_load): Use the environment variable `prefix' instead of
8329 the variable pupa_dl_dir.
8330 (pupa_dl_set_prefix): Function removed.
8331 (pupa_dl_get_prefix): Likewise.
8332 * kern/i386/pc/init.c: Include <pupa/env.h>.
8333 (pupa_machine_init): Use the environment variable `prefix' instead of
8334 using pupa_dl_set_prefix to set the prefix.
8335 * kern/main.c: Include <pupa/env.h>.
8336 (pupa_set_root_dev): Use the environment variable `prefix' instead of
8337 using pupa_dl_get_prefix to get the prefix.
8338 * kern/misc.c: Include <pupa/env.h>.
8339 (pupa_isdigit): New function.
8340 (pupa_isgraph): Likewise.
8341 (pupa_ftoa): Likewise.
8342 (pupa_vsprintf): Added support for printing values of the type
8343 `double'. Make it possible to format variable output when using
8344 formatting like `%1.2%f'.
8345 (pupa_split_cmdline): New function.
8346 * kern/rescue.c: Include <pupa/env.h>.
8347 (next_word): Removed function.
8348 (pupa_rescue_cmd_prefix): Likewise.
8349 (pupa_rescue_cmd_set): New function.
8350 (pupa_rescue_cmd_unset): New function.
8351 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
8352 split the command line instead of splitting it here. Added
8353 support for setting variables using the syntax `foo=bar'. Don't
8354 initialize the prefix command anymore. Initialized the set and
8356 * normal/cmdline.c: Include <pupa/env.h>.
8357 (pupa_tab_complete): Added prototypes for print_simple_completion,
8358 print_partition_completion, add_completion, iterate_commands,
8359 iterate_dev, iterate_part and iterate_dir. Moved code to print
8360 partition information from here to kern/disk.c.
8361 (pupa_cmdline_run): Don't check if the funtion exists anymore.
8362 * normal/main.c: Include <pupa/env.h>.
8363 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
8364 instead of using pupa_dl_get_prefix to get the prefix.
8365 * term/i386/pc/vga.c: Include <pupa/arg.h>.
8366 (check_vga_mem): Cast pointers to `void *' to silence a gcc
8368 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
8369 (pupa_vga_setcolor): Declare unused variables with `__attribute__
8370 ((unused))' to silence a gcc warning.
8371 (pupa_vga_setcolor): Likewise.
8372 (debug_command): Changed to match argument parsing
8374 * util/pupa-emu.c: Include <pupa/env.h>.
8375 (options): Added 0's for unused fields to silence a gcc warning.
8377 (main): Use the environment variable `prefix' instead of using
8378 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
8379 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
8382 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
8383 * util/misc.c: Include <malloc.h>.
8384 (pupa_malloc): Rewritten so errors are correctly reported.
8385 (pupa_realloc): Likewise.
8386 (pupa_memalign): Likewise.
8387 (pupa_mm_init_region): Declare unused variables with
8388 `__attribute__ ((unused))' to silence a gcc warning.
8389 * normal/i386/setjmp.S: Remove tab at the end of the file to
8390 silence a gcc warning.
8391 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
8392 variables with `__attribute__ ((unused))' to silence a gcc
8394 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
8395 local variable i unsigned to silence a gcc warning.
8397 * kern/term.c: Include <pupa/misc.h>.
8398 (pupa_more_lines): New variable.
8399 (pupa_more): Likewise.
8400 (pupa_putcode): When the pager is active pause at the end of every
8402 (pupa_set_more): New function.
8403 * include/pupa/term.h (pupa_set_more): New prototype.
8406 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
8408 Now this project is GRUB 2 rather than PUPA. The location of
8409 the CVS repository was moved to GRUB's.
8411 * configure.ac: Use bug-grub as the reporting address.
8412 Use GRUB instead of PUPA.
8413 Change the version number to 1.90.
8415 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
8417 * genkernsyms.sh: Updated copyright information.
8418 * genmk.rb: Likewise.
8419 * genmodsrc.sh: Likewise.
8420 * gensymlist.sh: Likewise.
8421 * boot/i386/pc/boot.S: Likewise.
8422 * boot/i386/pc/diskboot.S: Likewise.
8423 * disk/i386/pc/biosdisk.c: Likewise.
8424 * disk/i386/pc/partition.c: Likewise.
8425 * font/manager.c: Likewise.
8426 * fs/ext2.c: Likewise.
8427 * fs/fat.c: Likewise.
8428 * include/pupa/boot.h: Likewise.
8429 * include/pupa/device.h: Likewise.
8430 * include/pupa/disk.h: Likewise.
8431 * include/pupa/dl.h: Likewise.
8432 * include/pupa/elf.h: Likewise.
8433 * include/pupa/err.h: Likewise.
8434 * include/pupa/file.h: Likewise.
8435 * include/pupa/font.h: Likewise.
8436 * include/pupa/fs.h: Likewise.
8437 * include/pupa/kernel.h: Likewise.
8438 * include/pupa/loader.h: Likewise.
8439 * include/pupa/misc.h: Likewise.
8440 * include/pupa/mm.h: Likewise.
8441 * include/pupa/net.h: Likewise.
8442 * include/pupa/normal.h: Likewise.
8443 * include/pupa/rescue.h: Likewise.
8444 * include/pupa/setjmp.h: Likewise.
8445 * include/pupa/symbol.h: Likewise.
8446 * include/pupa/term.h: Likewise.
8447 * include/pupa/types.h: Likewise.
8448 * include/pupa/i386/setjmp.h: Likewise.
8449 * include/pupa/i386/types.h: Likewise.
8450 * include/pupa/i386/pc/biosdisk.h: Likewise.
8451 * include/pupa/i386/pc/boot.h: Likewise.
8452 * include/pupa/i386/pc/console.h: Likewise.
8453 * include/pupa/i386/pc/init.h: Likewise.
8454 * include/pupa/i386/pc/kernel.h: Likewise.
8455 * include/pupa/i386/pc/linux.h: Likewise.
8456 * include/pupa/i386/pc/loader.h: Likewise.
8457 * include/pupa/i386/pc/memory.h: Likewise.
8458 * include/pupa/i386/pc/multiboot.h: Likewise.
8459 * include/pupa/i386/pc/partition.h: Likewise.
8460 * include/pupa/i386/pc/time.h: Likewise.
8461 * include/pupa/i386/pc/vga.h: Likewise.
8462 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
8463 * include/pupa/util/getroot.h: Likewise.
8464 * include/pupa/util/misc.h: Likewise.
8465 * include/pupa/util/resolve.h: Likewise.
8466 * kern/device.c: Likewise.
8467 * kern/disk.c: Likewise.
8468 * kern/dl.c: Likewise.
8469 * kern/err.c: Likewise.
8470 * kern/file.c: Likewise.
8471 * kern/fs.c: Likewise.
8472 * kern/loader.c: Likewise.
8473 * kern/main.c: Likewise.
8474 * kern/misc.c: Likewise.
8475 * kern/mm.c: Likewise.
8476 * kern/rescue.c: Likewise.
8477 * kern/term.c: Likewise.
8478 * kern/i386/dl.c: Likewise.
8479 * kern/i386/pc/init.c: Likewise.
8480 * kern/i386/pc/lzo1x.S: Likewise.
8481 * kern/i386/pc/startup.S: Likewise.
8482 * loader/i386/pc/chainloader.c: Likewise.
8483 * loader/i386/pc/linux.c: Likewise.
8484 * loader/i386/pc/multiboot.c: Likewise.
8485 * normal/cmdline.c: Likewise.
8486 * normal/command.c: Likewise.
8487 * normal/main.c: Likewise.
8488 * normal/menu.c: Likewise.
8489 * normal/i386/setjmp.S: Likewise.
8490 * term/i386/pc/console.c: Likewise.
8491 * term/i386/pc/vga.c: Likewise.
8492 * util/console.c: Likewise.
8493 * util/genmoddep.c: Likewise.
8494 * util/misc.c: Likewise.
8495 * util/pupa-emu.c: Likewise.
8496 * util/resolve.c: Likewise.
8497 * util/unifont2pff.rb: Likewise.
8498 * util/i386/pc/biosdisk.c: Likewise.
8499 * util/i386/pc/getroot.c: Likewise.
8500 * util/i386/pc/pupa-mkimage.c: Likewise.
8501 * util/i386/pc/pupa-setup.c: Likewise.
8503 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
8505 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
8506 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
8507 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
8508 reading and reset it after reading.
8509 (pupa_ext2_close): Return PUPA_ERR_NONE.
8511 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
8513 (struct linux_kernel_header): Add kernel_version and
8515 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
8516 pupa_file_read succeeds.
8517 (pupa_rescue_cmd_initrd): Implement.
8519 2003-12-03 Marco Gerards <metgerards@student.han.nl>
8521 * fs/ext2.c (pupa_ext2_label): New function.
8522 (pupa_ext2_fs): Added label.
8523 * fs/fat.c (pupa_fat_label): New function.
8524 (pupa_fat_fs): Added label.
8525 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
8527 * kern/misc.c (pupa_strndup): New function.
8528 * include/pupa/misc.h (pupa_strndup): New prototype.
8530 * include/pupa/normal.h: Include <pupa/err.h>.
8531 (pupa_set_history): New prototype.
8532 (pupa_iterate_commands): New prototype.
8533 * normal/cmdline.c: Include <pupa/machine/partition.h>,
8534 <pupa/disk.h>, <pupa/file.h>.
8535 (hist_size): New variable.
8536 (hist_lines): Likewise.
8537 (hist_end): Likewise.
8538 (hist_used): Likewise.
8539 (pupa_set_history): New function.
8540 (pupa_history_get): Likewise.
8541 (pupa_history_add): Likewise.
8542 (pupa_history_replace): Likewise.
8543 (pupa_tab_complete): Likewise.
8544 (pupa_cmdline_run): Added tab completion and history buffer. Tab
8545 completion shows partitionnames while completing partitions, this
8546 feature was suggested by Jeff Bailey.
8547 * normal/command.c (pupa_iterate_commands): New function.
8548 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
8549 (pupa_normal_init): Initialize history buffer.
8550 (PUPA_MOD_INIT): Likewise.
8551 (pupa_normal_fini): Free the history buffer.
8552 (PUPA_MOD_FINI): Likewise.
8554 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
8557 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
8558 * configure.ac [i386]: Check for regparam bug.
8559 (NESTED_FUNC_ATTR) [! i386]: Defined.
8561 2003-11-17 Marco Gerards <metgerards@student.han.nl>
8563 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
8564 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
8565 (pupa_emu_SOURCES): New variable.
8566 (pupa_emu_LDFLAGS): Likewise.
8567 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
8568 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
8569 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
8570 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
8571 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
8572 (pupa_jmp_buf): New typedef.
8573 (pupa_setjmp) [PUPA_UTIL]: New macro.
8574 (pupa_longjmp) [PUPA_UTIL]: Likewise.
8575 * include/pupa/term.h (struct pupa_term): New member `refresh'.
8576 (pupa_refresh): New prototype.
8577 * include/pupa/util/getroot.h: New file.
8578 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
8580 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
8581 (pupa_rescue_cmd_cat): Likewise.
8582 (pupa_rescue_cmd_ls): Likewise.
8583 (pupa_rescue_cmd_testload): Likewise.
8584 (pupa_rescue_cmd_lsmod): Likewise.
8585 * normal/cmdline.c (pupa_cmdline_get): Likewise.
8586 * normal/menu.c (run_menu): Likewise.
8587 * kern/term.c (pupa_cls): Likewise.
8588 (pupa_refresh): New function.
8589 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
8590 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
8591 * util/console.c: New file.
8593 * util/i386/pc/getroot.c: New file.
8594 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
8595 (pupa_putchar): New function.
8596 (pupa_refresh): Likewise.
8597 (xgetcwd): Function moved to ...
8598 (strip_extra_slashes): Likewise.
8599 (get_prefix): Likewise.
8600 * util/i386/pc/getroot.c: ... here.
8601 (find_root_device): Function moved and renamed to...
8602 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
8603 Changed all callers.
8604 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
8606 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
8607 Changed all callers.
8608 * util/misc.c (pupa_memalign): New function.
8609 (pupa_mm_init_region): Likewise.
8610 (pupa_register_exported_symbols): Likewise.
8611 (pupa_putchar): Function removed.
8612 * util/pupa-emu.c: New file.
8614 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
8616 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
8617 (_multiboot_mod_SOURCES): New variable.
8618 (_multiboot_mod_CFLAGS): Likewise.
8619 * loader/i386/pc/multiboot.c: New file.
8620 * include/pupa/i386/pc/multiboot.h: Likewise.
8621 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
8622 (pupa_multiboot_real_boot): New function.
8623 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
8624 (pupa_multiboot_real_boot): New prototype.
8625 (pupa_rescue_cmd_multiboot): Likewise
8626 (pupa_rescue_cmd_module): Likewise.
8628 * kern/loader.c (pupa_loader_set): Continue when
8629 pupa_loader_unload_func() fails.
8630 (pupa_loader_unset): New function.
8631 * include/pupa/loader.h (pupa_loader_unset): New prototype.
8633 * kern/misc.c (pupa_stpcpy): New function.
8634 * include/pupa/misc.h (pupa_stpcpy): New prototype.
8636 2003-11-12 Marco Gerards <metgerards@student.han.nl>
8638 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
8639 for available extensions.
8641 * include/pupa/i386/pc/time.h: New file.
8642 * kern/disk.c: Include <pupa/machine/time.h>.
8643 (PUPA_CACHE_TIMEOUT): New macro.
8644 (pupa_last_time): New variable.
8645 (pupa_disk_open): Flush the cache when there was a timeout.
8646 (pupa_disk_close): Reset the timer.
8647 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
8649 * util/misc.c: Include <sys/times.h>
8650 (pupa_get_rtc): New function.
8652 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
8654 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
8656 (pupa_ext2_get_file_block): Use blocks member.
8658 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
8659 first block. Return -1 instead of pupa_errno on error.
8661 2003-10-27 Marco Gerards <metgerards@student.han.nl>
8663 * README: In the pupa-mkimage example use _chain instead of chain
8664 and ext2 instead of fat.
8665 * TODO: Replace ext2fs with jfs as an example. Add an item for
8666 adding journal playback for ext2fs.
8667 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
8668 (pkgdata_MODULES): Added ext2.mod.
8669 (ext2_mod_SOURCES): New variable.
8670 (ext2_mod_CFLAGS): Likewise.
8671 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
8672 * include/pupa/misc.h (pupa_strncpy): New prototype.
8673 (pupa_strcat): Likewise.
8674 (pupa_strncmp): Likewise.
8675 * kern/misc.c (pupa_strcat): Enable function.
8676 (pupa_strncpy): New function.
8677 (pupa_strncmp): Likewise.
8678 * fs/ext2.c: New file.
8680 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
8681 when the read failed before retrying.
8682 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
8683 (_FILE_OFFSET_BITS): Likewise.
8684 * configure.ac: Added AC_SYS_LARGEFILE.
8686 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
8688 * genmk.rb (PModule#rule): Make sure to get only symbol names
8689 from the output of nm.
8690 Reported by Robert Millan <zeratul2@wanadoo.es>.
8692 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
8694 I forgot to check in these changes for a long time. This adds
8695 incomplete support for VGA console, and this is still very
8696 buggy. Also, a lot of consideration is required for I18N,
8697 UNICODE, and VGA font issues. Therefore, assume that this is
8698 such that "better than nothing".
8700 * font/manager.c: New file.
8701 * include/pupa/font.h: Likewise.
8702 * include/pupa/i386/pc/vga.h: Likewise.
8703 * term/i386/pc/vga.c: Likewise.
8704 * util/unifont2pff.rb: Likewise.
8706 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
8707 (pkgdata_MODULES): Added vga.mod and font.mod.
8708 (vga_mod_SOURCES): New variables.
8709 (vga_mod_CFLAGS): Likewise.
8710 (font_mod_SOURCES): Likewise.
8711 (font_mod_CFLAGS): Likewise.
8713 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
8715 * include/pupa/term.h: Include pupa/err.h.
8716 (struct pupa_term): Added init and fini.
8717 Changed the argument of putchar to pupa_uint32_t.
8719 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
8720 (pupa_console_real_putchar): New prototype.
8721 (pupa_console_putchar): Removed.
8722 (pupa_console_checkkey): Exported.
8723 (pupa_console_getkey): Likewise.
8725 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
8728 * kern/term.c (pupa_term_set_current): Rewritten.
8729 (pupa_putchar): Likewise.
8730 (pupa_putcode): New function.
8732 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
8733 (pupa_console_real_putchar): ... this.
8734 (pupa_vga_set_mode): New function.
8735 (pupa_vga_get_font): Likewise.
8737 * normal/command.c: Include pupa/term.h.
8738 (terminal_command): New function.
8739 (pupa_command_init): Register the command "terminal".
8741 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
8742 (DISP_UP): Likewise.
8743 (DISP_RIGHT): Likewise.
8744 (DISP_DOWN): Likewise.
8745 (DISP_HLINE): Likewise.
8746 (DISP_VLINE): Likewise.
8747 (DISP_UL): Likewise.
8748 (DISP_UR): Likewise.
8749 (DISP_LL): Likewise.
8750 (DISP_LR): Likewise.
8752 * term/i386/pc/console.c (pupa_console_putchar): New function.
8754 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
8756 * util/resolve.c (pupa_util_resolve_dependencies): BUG
8757 FIX. Reverse the path_list.
8759 * include/pupa/normal.h: Export pupa_register_command and
8760 pupa_unregister_command.
8762 * hello/hello.c (pupa_cmd_hello): New module.
8763 * conf/i386-pc.rmk: Added hello.mod.
8765 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
8767 * kern/i386/pc/lzo1x.S: New file.
8769 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
8770 (compress_kernel): New variable.
8771 (generate_image): Heavily modified to support compressing a
8772 large part of the core image.
8774 * util/misc.c (pupa_util_read_image): Fix a file descriptor
8776 (pupa_util_load_image): New function.
8778 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
8779 (pupa_compressed_size): New variable.
8780 (codestart): Enable Gate A20 here.
8781 Decompress the compressed part of the core image.
8782 Rearrange the code to put functions and variables which are
8783 required for initialization in the non-compressed part.
8786 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
8789 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
8791 * include/pupa/i386/pc/kernel.h
8792 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
8793 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
8794 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
8795 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
8796 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
8798 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
8800 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
8801 (Utility#rule): Likewise.
8803 * configure.ac: Check if LZO is available.
8805 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
8807 * include/pupa/normal.h: New file.
8808 * include/pupa/setjmp.h: Likewise.
8809 * include/pupa/i386/setjmp.h: Likewise.
8810 * normal/cmdline.c: Likewise.
8811 * normal/command.c: Likewise.
8812 * normal/main.c: Likewise.
8813 * normal/menu.c: Likewise.
8814 * normal/i386/setjmp.S: Likewise.
8816 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
8817 (pupa_rescue_cmd_initrd): Likewise.
8819 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
8822 * kern/i386/pc/startup.S (translation_table): New variable.
8823 (translate_keycode): New function.
8824 (pupa_console_getkey): Call translate_keycode.
8826 * kern/rescue.c (attempt_normal_mode): New function.
8827 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
8828 it failed, print a message.
8830 * kern/mm.c (pupa_real_malloc): Print more information when a
8831 free magic is broken.
8832 (pupa_free): If the first free header is not free actually, set
8835 * kern/main.c (pupa_load_normal_mode): Just load the module
8837 (pupa_main): Don't print the message
8838 "Entering into rescue mode..." here.
8840 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
8842 (pupa_rescue_cmd_initrd): Likewise.
8843 (pupa_rescue_cmd_initrd): Likewise.
8845 * include/pupa/symbol.h (FUNCTION): Specify the type.
8846 (VARIABLE): Likewise.
8848 * include/pupa/err.h (pupa_err_t): Added
8849 PUPA_ERR_UNKNOWN_COMMAND.
8851 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
8852 (pupa_dl_get_prefix): Likewise.
8854 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
8855 Added _chain.mod and _linux.mod instead of chain.mod and
8857 (chain_mod_SOURCES): Renamed to ...
8858 (_chain_mod_SOURCES): ... this.
8859 (chain_mod_CFLAGS): Renamed to ...
8860 (_chain_mod_CFLAGS): ... this.
8861 (linux_mod_SOURCES): Renamed to ...
8862 (_linux_mod_SOURCES): ... this.
8863 (linux_mod_CFLAGS): Renamed to ...
8864 (_linux_mod_CFLAGS): ... this.
8865 (normal_mod_SOURCES): New variable.
8866 (normal_mod_CFLAGS): Likewise.
8867 (normal_mod_ASFLAGS): Likewise.
8869 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
8871 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
8874 * kern/dl.c (pupa_dl_ref): Refer dependending modules
8876 (pupa_dl_unref): Unrefer depending modules recursively.
8877 Don't call pupa_dl_unload implicitly, because PUPA can crash if
8878 a module is unloaded before one depending on that module is
8880 (pupa_dl_unload): Unload depending modules explicitly,
8883 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
8885 * include/pupa/i386/pc/linux.h: New file.
8886 * loader/i386/pc/linux.c: Likewise.
8888 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
8890 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
8891 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
8892 of PUPA_CHAINLOADER_BOOT_SECTOR.
8894 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
8895 (pupa_linux_prot_size): New variable.
8896 (pupa_linux_tmp_addr): Likewise.
8897 (pupa_linux_real_addr): Likewise.
8898 (pupa_linux_boot_zimage): New function.
8899 (pupa_linux_boot_bzimage): Likewise.
8901 * kern/i386/pc/init.c (struct mem_region): New structure.
8902 (MAX_REGIONS): New macro.
8903 (mem_regions): New variable.
8904 (num_regions): Likewise.
8905 (pupa_os_area_addr): Likewise.
8906 (pupa_os_area_size): Likewise.
8907 (pupa_lower_mem): Likewise.
8908 (pupa_upper_mem): Likewise.
8909 (add_mem_region): New function.
8910 (compact_mem_regions): Likewise.
8911 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
8912 the size of the conventional memory and that of so-called upper
8913 memory (before the first memory hole).
8914 Instead of adding each found region to free memory, use
8915 add_mem_region and add them after removing overlaps.
8916 Also, add only 1/4 of the upper memory to free memory. The rest
8917 is used for loading OS images. Maybe this is ad hoc, but this
8918 makes it much easier to relocate OS images when booting.
8920 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
8921 (pupa_enter_rescue_mode): Don't register initrd and module.
8923 * kern/mm.c: Include pupa/dl.h.
8925 * kern/main.c: Include pupa/file.h and pupa/device.h.
8927 * kern/loader.c (pupa_loader_load_module_func): Removed.
8928 (pupa_loader_load_module): Likewise.
8930 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
8933 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
8934 (pupa_linux_tmp_addr): Likewise.
8935 (pupa_linux_real_addr): Likewise.
8936 (pupa_linux_boot_zimage): Likewise.
8937 (pupa_linux_boot_bzimage): Likewise.
8939 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
8940 (pupa_upper_mem): Likewise.
8941 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
8942 module is too dangerous.
8944 * include/pupa/loader.h (pupa_os_area_addr): Declared.
8945 (pupa_os_area_size): Likewise.
8946 (pupa_loader_set): Remove the first argument. Loader doesn't
8947 manage modules or initrd any longer.
8948 (pupa_loader_load_module): Removed.
8950 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
8951 (linux_mod_SOURCES): New variable.
8952 (linux_mod_CFLAGS): Likewise.
8954 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
8956 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
8957 the length of a blocklist correctly.
8959 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
8960 Use ioctl only if the OS file is a block device.
8961 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
8962 not very useful for normal files.
8964 * kern/main.c (pupa_set_root_dev): New function.
8965 (pupa_load_normal_mode): Likewise.
8966 (pupa_main): Call those above.
8968 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
8971 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
8973 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8975 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
8976 (setup): Configure the installed partition information and the
8979 * loader/i386/pc/chainloader.c (my_mod): New variable.
8980 (pupa_chainloader_unload): New function.
8981 (pupa_rescue_cmd_chainloader): Refer itself.
8982 (PUPA_MOD_INIT): Save its own module in MY_MOD.
8984 * kern/i386/pc/startup.S (install_partition): Removed.
8985 (version_string): Likewise.
8986 (config_file): Likewise.
8987 (pupa_install_dos_part): New variable.
8988 (pupa_install_bsd_part): Likewise.
8989 (pupa_prefix): Likewise.
8990 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
8992 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
8994 (make_install_device): New function.
8995 (pupa_machine_init): Set the dl prefix.
8997 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
8998 (buf): Renamed to ...
8999 (linebuf): ... this.
9000 (pupa_rescue_cmd_prefix): New function.
9001 (pupa_rescue_cmd_insmod): Likewise.
9002 (pupa_rescue_cmd_rmmod): Likewise.
9003 (pupa_rescue_cmd_lsmod): Likewise.
9004 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
9007 * kern/mm.c (pupa_memalign): If failed even after invalidating
9008 disk caches, unload unneeded modules and retry.
9010 * kern/misc.c (pupa_memmove): New function.
9011 (pupa_memcpy): Removed.
9012 (pupa_strcpy): New function.
9013 (pupa_itoa): Made static.
9015 * kern/dl.c (pupa_dl_iterate): New function.
9016 (pupa_dl_ref): Likewise.
9017 (pupa_dl_unref): Likewise.
9018 (pupa_dl_unload): Return if succeeded or not.
9019 (pupa_dl_unload_unneeded): New function.
9020 (pupa_dl_unload_all): Likewise.
9021 (pupa_dl_init): Renamed to ...
9022 (pupa_dl_set_prefix): ... this.
9023 (pupa_dl_get_prefix): New function.
9025 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
9026 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
9027 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
9028 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
9029 (pupa_install_dos_part): Declared.
9030 (pupa_install_bsd_part): Likewise.
9031 (pupa_prefix): Likewise.
9032 (pupa_boot_drive): Likewise.
9034 * include/pupa/types.h: Fix a typo.
9036 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
9038 (pupa_memmove): Declared.
9039 (pupa_strcpy): Likewise.
9041 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
9042 pupa_mod_init takes one argument, its own module.
9043 (pupa_dl_unload_unneeded): Declared.
9044 (pupa_dl_unload_all): Likewise.
9045 (pupa_dl_ref): Likewise.
9046 (pupa_dl_unref): Likewise.
9047 (pupa_dl_iterate): Likewise.
9048 (pupa_dl_init): Renamed to ...
9049 (pupa_dl_set_prefix): ... this.
9050 (pupa_dl_get_prefix): Declared.
9052 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
9053 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
9055 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
9056 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
9058 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
9059 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
9061 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
9063 * util/i386/pc/pupa-setup.c (setup): Define the internal
9064 function find_first_partition_start at the top level, because GCC
9065 3.0.x cannot compile internal functions in deeper scopes
9067 (find_root_device): Use lstat instead of stat.
9068 Don't follow symbolic links.
9069 Fix the path-constructing code.
9071 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
9072 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
9073 by a BLKGETSIZE ioctl first, because block devices don't fill
9074 the member st_mode of the structure stat on Linux.
9075 [__linux__] (linux_find_partition): Use a temporary buffer
9076 REAL_DEV for the working space. Copy it to DEV before returning.
9077 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
9078 buffer cache consistent.
9079 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
9080 strncmp. The previous value was merely wrong.
9081 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
9083 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
9084 FAT size is 12. The previous value was merely wrong.
9086 * kern/main.c (pupa_main): Don't split the starting message from
9089 * kern/term.c (pupa_putchar): Put CR after LF instead of before
9090 LF, because BIOS goes crazy about character attributes in this
9093 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
9095 * include/i386/pc/util/biosdisk.h: New file.
9096 * util/i386/pc/biosdisk.c: Likewise.
9097 * util/i386/pc/pupa-setup.c: Likewise.
9099 * Makefile.in (INCLUDE_DISTFILES): Added
9100 include/pupa/i386/pc/util/biosdisk.h.
9101 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
9102 directory util/i386/pc.
9103 (install-local): Added a rule for sbin_UTILITIES.
9104 (uninstall): Likewise.
9106 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
9108 * util/misc.c (xrealloc): New function.
9109 (pupa_malloc): Likewise.
9110 (pupa_free): Likewise.
9111 (pupa_realloc): Likewise.
9112 (pupa_stop): Likewise.
9113 (pupa_putchar): Likewise.
9115 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
9117 * include/pupa/util/misc.h (xrealloc): Declared.
9119 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
9121 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
9122 (PUPA_BOOT_MACHINE_BPB_END): ... this.
9124 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
9125 [PUPA_UTIL] (pupa_fat_fini): Likewise.
9127 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
9128 way should be implemented.
9129 [PUPA_UTIL] (pupa_fat_fini): Likewise.
9131 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
9132 the size of NAME for safety.
9133 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
9136 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
9137 (pupa_setup_SOURCES): Likewise.
9139 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
9141 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
9143 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
9144 bunch of pushl's from pusha, because this destroys the return
9147 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
9149 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
9150 This means that any missing prototypes could be fatal. Also, you
9151 must take care when writing assembly code. See the comments at
9152 the beginning of startup.S, for more details.
9154 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
9155 compilation mechanism.
9156 (pupa_chainloader_real_boot): Likewise.
9157 (pupa_biosdisk_rw_int13_extensions): Likewise.
9158 (pupa_biosdisk_rw_standard): Likewise.
9159 (pupa_biosdisk_check_int13_extensions): Likewise.
9160 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
9161 (pupa_biosdisk_get_diskinfo_standard): Likewise.
9162 (pupa_get_memsize): Likewise.
9163 (pupa_get_mmap_entry): Likewise.
9164 (pupa_console_putchar): Likewise.
9165 (pupa_console_setcursor): Likewise.
9166 (pupa_getrtsecs): Use pushl instead of push.
9168 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
9169 memory instead of the stack for a mmap entry, because some
9170 BIOSes may ignore the maximum size and overflow.
9172 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
9174 * genmk.rb (PModule#rule): Compile automatically generated
9175 sources with module-specific CFLAGS as well as other sources.
9177 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
9179 * configure.ac: Check ld.
9180 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
9181 respectively, before checking endianness and sizes.
9183 * Makefile.in (LD): New variable.
9185 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
9187 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
9189 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
9191 * Changelog: New file.