1 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
3 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
5 * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
7 (linux_vesafb_modes): Add a lot of additional modes to the list (based
8 on documentation from Wikipedia).
10 2009-05-04 Pavel Roskin <proski@gnu.org>
12 * disk/ata.c: Spelling fixes.
13 * disk/raid.c: Likewise.
14 * disk/usbms.c: Likewise.
15 * disk/dmraid_nvidia.c: Likewise.
16 * kern/ieee1275/openfw.c: Likewise.
17 * kern/ieee1275/init.c: Likewise.
18 * kern/ieee1275/cmain.c: Likewise.
19 * boot/i386/pc/cdboot.S: Likewise.
20 * video/readers/png.c: Likewise.
21 * video/i386/pc/vbe.c: Likewise.
24 * fs/reiserfs.c: Likewise.
25 * efiemu/runtime/efiemu.c: Likewise.
26 * efiemu/main.c: Likewise.
27 * efiemu/mm.c: Likewise.
28 * include/grub/elf.h: Likewise.
29 * include/grub/xnu.h: Likewise.
30 * include/grub/usbdesc.h: Likewise.
31 * include/grub/usb.h: Likewise.
32 * include/grub/script_sh.h: Likewise.
33 * include/grub/lib/LzmaEnc.h: Likewise.
34 * include/grub/efiemu/efiemu.h: Likewise.
35 * include/grub/command.h: Likewise.
36 * normal/menu.c: Likewise.
37 * normal/main.c: Likewise.
38 * normal/datetime.c: Likewise.
39 * bus/usb/uhci.c: Likewise.
40 * mmap/i386/uppermem.c: Likewise.
41 * mmap/mmap.c: Likewise.
42 * commands/acpi.c: Likewise.
43 * commands/test.c: Likewise.
44 * partmap/apple.c: Likewise.
45 * font/font.c: Likewise.
46 * loader/sparc64/ieee1275/linux.c: Likewise.
47 * loader/macho.c: Likewise.
48 * loader/i386/bsd_trampoline.S: Likewise.
49 * loader/i386/bsd.c: Likewise.
50 * loader/xnu.c: Likewise.
51 * term/i386/pc/vesafb.c: Likewise.
52 * term/usb_keyboard.c: Likewise.
53 * util/resolve.c: Likewise.
54 * util/getroot.c: Likewise.
56 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
58 * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
60 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
62 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
65 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
67 * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
68 parameter only available on BIOS.
70 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
72 Removed wrong semicolon in declaration
74 * grub/misc.h (grub_dprintf): remove semicolon
76 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
78 * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
79 (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
80 is done by grub_cmd_linux() now).
81 [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
82 restore video to text mode.
83 (grub_cmd_linux): Default `vid_mode' initialization to 0, which
84 indicates lack of "vga=" parameter. "vga=0" is mapped to
85 `GRUB_LINUX_VID_MODE_NORMAL'.
87 2009-05-04 Felix Zielcke <fzielcke@z-51.de>
89 * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
90 `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
91 and `normal/script.c'. Add `kern/rescue_reader.c',
92 `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
93 `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
96 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
97 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
98 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
99 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
100 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
102 * Makefile.in: Remove duplicated 2008 in Copyright line.
104 2009-05-04 Robert Millan <rmh.grub@aybabtu.com>
106 * util/misc.c (grub_util_warn): New function. Emmits a warning
108 * include/grub/util/misc.h (grub_util_warn): New declaration.
110 * util/i386/pc/grub-install.in: Understand --force and pass it down
113 * util/i386/pc/grub-setup.c (main): Understand --force and pass it
115 (setup): Improve error messages and add warnings when requested to
116 install in odd layouts. Refuse to install using blocklists unless
119 2009-05-04 martin f. krafft <madduck@madduck.net>
121 * disk/raid.c (grub_raid_scan_device): Improve debug message.
123 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
125 Updated copyright year
127 * fs/hfsplus.c: updated copyright year
129 2009-05-04 Vladimir Serbinenko <phcoder@gmail.com>
133 * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
134 in the space previously used by unused3
135 (grub_hfsplus_uuid): new function
136 (grub_hfsplus_fs): added uuid field
138 2009-05-03 Pavel Roskin <proski@gnu.org>
140 * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
141 suppress warnings. It's no longer needed.
142 * disk/host.c: Likewise.
143 * disk/ata_pthru.c: Likewise.
144 * disk/loopback.c: Likewise.
145 * hook/datehook.c: Likewise.
146 * parttool/pcpart.c: Likewise.
147 * fs/i386/pc/pxe.c: Likewise.
148 * fs/ntfscomp.c: Likewise.
149 * efiemu/main.c: Likewise.
150 * mmap/mmap.c: Likewise.
151 * commands/crc.c: Likewise.
152 * commands/hexdump.c: Likewise.
153 * commands/hdparm.c: Likewise.
154 * commands/acpi.c: Likewise.
155 * commands/echo.c: Likewise.
156 * commands/minicmd.c: Likewise.
157 * commands/blocklist.c: Likewise.
158 * commands/memrw.c: Likewise.
159 * commands/loadenv.c: Likewise.
160 * commands/usbtest.c: Likewise.
161 * commands/lsmmap.c: Likewise.
162 * commands/boot.c: Likewise.
163 * commands/parttool.c: Likewise.
164 * commands/configfile.c: Likewise.
165 * commands/search.c: Likewise.
166 * commands/ieee1275/suspend.c: Likewise.
167 * commands/cat.c: Likewise.
168 * commands/i386/pc/pxecmd.c: Likewise.
169 * commands/i386/pc/play.c: Likewise.
170 * commands/i386/pc/halt.c: Likewise.
171 * commands/i386/pc/vbeinfo.c: Likewise.
172 * commands/i386/pc/vbetest.c: Likewise.
173 * commands/lspci.c: Likewise.
174 * commands/date.c: Likewise.
175 * commands/handler.c: Likewise.
176 * commands/ls.c: Likewise.
177 * commands/test.c: Likewise.
178 * commands/cmp.c: Likewise.
179 * commands/efi/loadbios.c: Likewise.
180 * commands/efi/fixvideo.c: Likewise.
181 * commands/halt.c: Likewise.
182 * commands/help.c: Likewise.
183 * commands/reboot.c: Likewise.
184 * hello/hello.c: Likewise.
185 * script/sh/main.c: Likewise.
186 * loader/xnu.c: Likewise.
187 * term/terminfo.c: Likewise.
188 * term/i386/pc/serial.c: Likewise.
189 * term/usb_keyboard.c: Likewise.
191 2009-05-03 David S. Miller <davem@davemloft.net>
193 * normal/menu.c: Include grub/parser.h
195 2009-05-03 Pavel Roskin <proski@gnu.org>
197 * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
199 * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
200 Suggested by Javier MartÃn <lordhabbit@gmail.com>
202 * util/i386/pc/grub-mkrescue.in: Allow for the case when
203 efiemu??.o doesn't exist.
204 * util/i386/pc/grub-install.in: Likewise. Use "cp -f" for
207 2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
209 FreeBSD 64-bit support
211 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
212 and loader/i386/bsd_trampoline.S
213 (bsd_mod_ASFLAGS): new variable
214 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
215 (FREEBSD_MODTYPE_KERNEL64): likewise
216 (grub_bsd64_trampoline_start): likewise
217 (grub_bsd64_trampoline_end): likewise
218 (grub_bsd64_trampoline_selfjump): likewise
219 (grub_bsd64_trampoline_gdt): likewise
220 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
221 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
222 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
223 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
224 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
226 * loader/i386/bsd_pagetable.c: new file
227 * loader/i386/bsd_trampoline.S: likewise
228 * loader/i386/bsd.c (ALIGN_QWORD): new macro
229 (ALIGN_VAR): likewise
230 (entry_hi): new variable
231 (kern_end_mdofs): likewise
233 (grub_freebsd_add_meta): use ALIGN_VAR
234 (grub_e820_mmap): new declaration
235 (grub_freebsd_add_mmap): new function
236 (grub_freebsd_add_meta_module): support 64 bit kernels
237 (grub_freebsd_list_modules): use ALIGN_VAR
238 (gdt_descriptor): new declaration
239 (grub_freebsd_boot): support 64 bit kernels
240 (grub_bsd_elf64_hook): new function
241 (grub_bsd_load_elf): support elf64
243 2009-05-03 Bean <bean123ch@gmail.com>
245 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
246 after we get the result of if statement.
248 2009-05-03 Bean <bean123ch@gmail.com>
250 * Makefile.in (enable_efiemu): New variable.
252 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
254 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
256 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
257 path, add -mno-red-zone option.
258 (efiemu64_s.o): Likewise.
259 (efiemu64.o): Use macro $^ for source file.
261 * configure.ac (--enable-efiemu): New option.
263 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
267 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
268 (pkglib_MODULES): add xnu.mod
269 (xnu_mod_SOURCES): new variable
270 (xnu_mod_CFLAGS): likewise
271 (xnu_mod_LDFLAGS): likewise
272 (xnu_mod_ASFLAGS): likewise
273 * conf/i386-pc.rmk: likewise
274 * conf/x86_64-efi.rmk: likewise
275 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
277 * include/grub/i386/macho.h: new file
278 * include/grub/i386/xnu.h: likewise
279 * include/grub/macho.h: likewise
280 * include/grub/machoload.h: likewise
281 * include/grub/x86_64/macho.h: likewise
282 * include/grub/x86_64/xnu.h: likewise
283 * include/grub/xnu.h: likewise
284 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
285 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
286 * loader/i386/efi/xnu.c: new file
287 * loader/i386/pc/xnu.c: likewise
288 * loader/i386/xnu.c: likewise
289 * loader/i386/xnu_helper.S: likewise
290 * loader/macho.c: likewise
291 * loader/xnu.c: likewise
292 * loader/xnu_resume.c: likewise
293 * util/grub-dumpdevtree: likewise
294 * include/grub/i386/pit.h: include grub/err.h
295 (grub_pit_wait): export
296 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
298 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
302 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
303 _linux_efi, linux_efi.
304 new files in grub-emu
305 new targets efiemu32.o and efiemu64.o
306 * loader/linux_normal_efiemu.c: likewise
307 * loader/i386/efi/linux.c: added preliminary efiemu support
308 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
310 * include/grub/autoefi.h: new file
311 * include/grub/i386/efiemu.h: likewise
312 * include/grub/i386/pc/efiemu.h: likewise
313 * include/grub/efi/api.h: add LL suffix when necessary
314 new definitions relating to tables
315 * include/grub/efiemu/efiemu.h: new file
316 * include/grub/efiemu/runtime.h: likewise
317 * efiemu/prepare.c: likewise
318 * efiemu/loadcore_common.c: likewise
319 * efiemu/loadcore64.c: likewise
320 * efiemu/runtime/efiemu.sh: likewise
321 * efiemu/runtime/efiemu.S: likewise
322 * efiemu/runtime/efiemu.c: likewise
323 * efiemu/runtime/config.h: likewise
324 * efiemu/prepare32.c: likewise
325 * efiemu/main.c: likewise
326 * efiemu/modules/pnvram.c: likewise
327 * efiemu/modules/i386: likewise
328 * efiemu/modules/i386/pc: likewise
329 * efiemu/modules/acpi.c: likewise
330 * efiemu/i386/pc/cfgtables.c: likewise
331 * efiemu/i386/loadcore64.c: likewise
332 * efiemu/i386/loadcore32.c: likewise
333 * efiemu/prepare64.c: likewise
334 * efiemu/loadcore.c: likewise
335 * efiemu/symbols.c: likewise
336 * efiemu/mm.c: likewise
337 * efiemu/loadcore32.c: likewise
339 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
343 * commands/acpi.c: new file
344 * commands/i386/pc/acpi.c: likewise
345 * commands/efi/acpi.c: likewise
346 * include/grub/acpi.h: likewise
347 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
348 (acpi_mod_SOURCES): new variable
349 (acpi_mod_CFLAGS): likewise
350 (acpi_mod_LDFLAGS): likewise
351 * conf/i386-efi.rmk: likewise
352 * conf/x86_64-efi.rmk: likewise
354 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
356 Missing part from mmap patch
358 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
359 (grub_mmap_unregister)
360 (grub_mmap_free_and_unregister): use grub_mmap_register
362 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
366 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
367 * loader/i386/linux.c (find_mmap_size): likewise
368 (allocate_pages): likewise
369 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
370 (grub_fill_multiboot_mmap): likewise
371 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
372 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
373 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
374 (OPENBSD_MMAP_RESERVED): likewise
375 * include/grub/i386/pc/memory.h: include grub/memory.h
376 (grub_lower_mem): removed
377 (grub_upper_mem): likewise
378 (GRUB_MACHINE_MEMORY_ACPI): new definition
379 (GRUB_MACHINE_MEMORY_NVS): likewise
380 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
381 (GRUB_MACHINE_MEMORY_HOLE): likewise
382 (grub_machine_mmap_register): likewise
383 (grub_machine_mmap_unregister): likewise
384 (grub_machine_get_upper): likewise
385 (grub_machine_get_lower): likewise
386 (grub_machine_get_post64): likewise
387 * include/grub/i386/efi/memory.h: new file
388 * include/grub/x86_64/efi/memory.h: likewise
389 * include/grub/efi/memory.h: likewise
390 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
391 (mmap_mod_SOURCES): new variable
392 (mmap_mod_LDFLAGS): likewise
393 (mmap_mod_ASFLAGS): likewise
394 * conf/i386-coreboot.rmk: likewise
395 * conf/i386-ieee1275.rmk: likewise
396 * conf/i386-efi.rmk: likewise
397 * conf/x86_64-efi.rmk: likewise
398 * include/grub/types.h (UINT_TO_PTR): new macro
399 (PTR_TO_UINT32): likewise
400 (PTR_TO_UINT64): likewise
401 * include/grub/memory.h: new file
402 * mmap/i386/pc/mmap.c: likewise
403 * mmap/i386/pc/mmap_helper.S: likewise
404 * mmap/i386/uppermem.c: likewise
405 * mmap/mmap.c: likewise
406 * mmap/efi/mmap.c: likewise
407 * kern/i386/coreboot/init.c (grub_machine_init): don't use
409 * kern/i386/pc/init.c (grub_lower_mem): removed variable
410 (grub_upper_mem): likewise
411 (grub_machine_init): don't use grub_upper_mem,
412 make grub_lower_mem local
413 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
414 grub_mmap_iterate and grub_mmap_get_upper
415 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
417 2009-05-02 Bean <bean123ch@gmail.com>
419 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
421 (pkglib_MODULES): Add normal.mod and sh.mod.
422 (normal_SOURCES): New variable.
423 (normal_mod_CFLAGS): Likewise.
424 (normal_mod_LDFLAGS): Likewise.
425 (sh_mod_SOURCES): Likewise.
426 (sh_mod_CFLAGS): Likewise.
427 (sh_mod_LDFLAGS): Likewise.
429 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
430 script/sh/lexer.c_DEPENDENCIES.
431 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
432 kern/rescue_reader.c and kern/rescue_parser.c.
433 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
434 (grub_emu_SOURCES): Change source files.
435 (pkglib_MODULES): Remove normal.mod.
436 (normal_SOURCES): Removed.
437 (normal_mod_CFLAGS): Likewise.
438 (normal_mod_LDFLAGS): Likewise.
439 * conf/i386-coreboot.rmk: Likewise.
440 * conf/i386-efi.rmk: Likewise.
441 * conf/i386-ieee1276.rmk: Likewise.
442 * conf/powerpc-ieee1275.rmk: Likewise.
443 * conf/sparc64-ieee1275.rmk: Likewise.
444 * conf/x86_64-efi.rmk: Likewise.
446 * include/grub/command.h (grub_command_execute): New inline function.
448 * include/grub/menu.h (grub_menu_entry): Removed commands field.
450 * include/grub/normal.h: Remove <grub/setjmp.h>.
451 (grub_fs_module_list): Moved to normal/autofs.c.
452 (grub_exit_env): Removed.
453 (grub_command_execute): Likewise.
454 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
456 (read_command_list): New function declaration.
457 (read_fs_list): Likewise.
459 * include/parser.h: Include <grub/reader.h>.
460 (grub_parser_split_cmdline): Change type of getline parameter.
461 (grub_parser): New structure.
462 (grub_parser_class): New variable.
463 (grub_parser_execute): New function declaration.
464 (grub_register_rescue_parser): Likewise.
465 (grub_parser_register): New inline function.
466 (grub_parser_unregister): Likewise.
467 (grub_parser_get_current): Likewise.
468 (grub_parser_set_current): Likewise.
470 * include/grub/reader.h: New file.
471 * kern/reader.c: Likewise.
472 * kern/rescue_parser.c: Likewise.
473 * kern/rescue_reader.c: Likewise.
474 * normal/autofs.c: Likewise.
475 * normal/dyncmd.c: Likewise.
477 * include/grub/rescue.h: Removed.
478 * normal/command.h: Likewise.
480 * include/grub/script.h: Moved to ...
481 * include/grub/script_sh.h: ... Moved here.
482 * normal/execute.c: Moved to ...
483 * script/sh/execute.c: ... Moved here.
484 * normal/function.c: Moved to ...
485 * script/sh/function.c: ... Moved here.
486 * normal/lexer.c: Moved to ...
487 * script/sh/lexer.c: ... Moved here.
488 * normal/parser.y: Moved to ...
489 * script/sh/parser.y: ... Moved here.
490 * normal/script.c: Moved to ...
491 * script/sh/script.c: ... Moved here.
493 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
495 (grub_exit_env): Removed.
496 (fs_module_list): Moved to normal/autofs.c.
497 (grub_file_getline): Don't handle comment here.
498 (free_menu): Skip removed field entry->commands.
499 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
501 (read_config_file): Removed nested parameter, change getline function.
502 (grub_enter_normal_mode): Removed.
503 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
504 (read_command_list): Likewise.
505 (autoload_fs_module): Moved to normal/autofs.c.
506 (read_fs_list): Likewise.
507 (reader_nested): New variable.
508 (grub_normal_execute): Run parser.sh to switch to sh parser.
509 (grub_cmd_rescue): Removed.
510 (cmd_normal): Removed.
511 (grub_cmd_normal): Unregister itself at the beginning. Don't register
513 (grub_cmdline_run): New function.
514 (grub_normal_reader_init): Likewise.
515 (grub_normal_read_line): Likewise.
516 (grub_env_write_pager): Likewise.
517 (cmdline): New variable.
518 (grub_normal_reader): Likewise.
519 (GRUB_MOD_INIT): Register normal reader and set as current, register
520 pager hook, register normal command with grub_register_command_prio,
521 so that it won't show up in command.lst.
522 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
523 grub_fs_autoload_hook.
525 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
526 (grub_menu_execute_entry): Replace grub_script_execute with
527 grub_parser_execute, change parameter to grub_command_execute.
529 * normal/menu_text.c: Remove <grub/script.h>.
531 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
533 (run): Change editor_getline to use new parser interface. Change
534 parameter to grub_command_execute.
536 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
537 <grub/reader.h> and <grub/parser.h>.
538 (grub_load_normal_mode): Execute normal command.
539 (grub_main): Call grub_register_core_commands,
540 grub_register_rescue_parser and grub_register_rescue_reader, use
541 grub_reader_loop to enter input loop.
543 * kern/parser.c (grub_parser_split_cmdline): Change type of
545 (grub_parser_class): New variable.
546 (grub_parser_execute): New function.
548 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
549 * loader/multiboot2.c: Likewise.
550 * loader/sparc64/ieee1275/linux.c: Likewise.
552 * util/grub-emu.c (read_command_list): New dummy function.
554 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
556 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
557 count to 16 for CCISS and IDA.
559 2009-05-02 Robert Millan <rmh.grub@aybabtu.com>
561 * normal/menu_text.c (grub_wait_after_message): Print a newline
562 after waiting for user input.
564 * loader/i386/linux.c: Include `<grub/normal.h>'.
565 (grub_cmd_linux): Improve the error message about `ask' mode, by
566 waiting for user input so it's not missed (we can do this, since
567 user requested interaction).
569 2009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
571 Added missing lst to grub-mkrescue
573 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
574 and ${input_dir}/parttool.lst
576 2009-04-30 David S. Miller <davem@davemloft.net>
578 * util/hostdisk.c (device_is_wholedisk): New function.
579 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
580 zero only if device_is_wholedisk() returns true.
582 * util/hostdisk.c (convert_system_partition_to_system_disk):
583 Handle virtual disk devices named /dev/vdiskX as found on sparc
586 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
587 lettered partition specifier is found, convert to numbered.
589 2009-04-29 David S. Miller <davem@davemloft.net>
591 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
592 * include/grub/sparc64/ieee1275/memory.h: Likewise.
594 * normal/command.c: Add missing newline at end of file.
596 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
598 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
599 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
600 grub_ofdisk_read): Likewise, and deal similarly with the fact that
601 ihandles have a 32-bit type but need to be stored in a "void *".
603 2009-04-28 Pavel Roskin <proski@gnu.org>
605 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
606 not disk. Adjust all dependencies.
607 (grub_fs_uuid_close): Use grub_device_close(), not
610 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
611 parent's partition, don't copy it by reference, as it gets freed
614 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
616 Preboot hooks support
618 * commands/boot.c (struct grub_preboot_t): new declaration
619 (preboots_head): new variable
620 (preboots_tail): likewise
621 (grub_loader_register_preboot_hook): new function
622 (grub_loader_unregister_preboot_hook): likewise
623 (grub_loader_set): launch preboot hooks
624 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
625 (grub_loader_register_preboot_hook): new declaration
626 (grub_loader_unregister_preboot_hook): likewise
628 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
632 * disk/scsi.c (grub_scsi_open): added missing cast when
635 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
637 Bug and warning fixes
639 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
641 * commands/test.c (test_parse): fixed bug with file tests and corrected
642 declaration of find_file
644 2009-04-26 Pavel Roskin <proski@gnu.org>
646 * Makefile.in: Don't install empty manual pages if help2man is
647 missing. Use help2man option for output, not shell redirection.
649 2009-04-26 David S. Miller <davem@davemloft.net>
651 * util/grub-mkdevicemap.c (make_device_map): Add missing
652 NESTED_FUNC_ATTR to process_device().
654 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
658 * commands/test.c: rewritten to use bash-like test
660 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
662 Parttool autoloading and improvements
664 * Makefile.in (pkglib_DATA): add parttool.lst
665 (parttool.lst): new target
666 * genmk.rb: generate parttool-*
667 (CLEANFILES): add #{parttool}
668 (PARTTOOLFILES): new variable
669 * genparttoollist.sh: new file
670 * parttool/pcpart.c (grub_pcpart_boot): more feedback
671 (grub_pcpart_type): likewise
672 * commands/parttool.c (helpmsg): new variable
673 (grub_cmd_parttool): output help if not enough arguments are supplied
675 (GRUB_MOD_INIT(parttool)): use helpmsg
677 2009-04-24 David S. Miller <davem@davemloft.net>
679 Avoiding opening same device multiple times in device iterator.
681 * kern/device.c: (grub_device_iterate): Define struct part_ent,
682 and use it to build a list of partitions in iterate_disk() and
685 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
688 * disk/ieee1275/nand.c (grub_nand_iterate): Return
689 grub_devalias_iterate() result instead of unconditional 0.
690 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
691 Also, capture hook return value, either directly or via
692 grub_children_iterate(), and propagate to caller.
693 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
694 grub_children_iterate): Return value is now 'int' instead of
696 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
697 like a proper iterator, stopping when hooks return non-zero.
698 (grub_devalias_iterate): Likewise.
700 2009-04-23 David S. Miller <davem@davemloft.net>
702 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
704 2009-04-22 David S. Miller <davem@davemloft.net>
706 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
707 is larger than address_cells, use that value for address_cells too.
709 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
710 IEEE1275_MAX_PATH_LEN): Define.
711 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
712 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
713 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
714 'devtype'. Explicitly NULL terminate devalias expansion.
716 * util/sparc64/ieee1275/misc.c: New file.
717 * util/sparc64/ieee1275/grub-setup.c: New file.
718 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
719 * util/sparc64/ieee1275/grub-mkimage.c: New file.
720 * util/sparc64/ieee1275/grub-install.in: New file.
721 * util/ieee1275/ofpath.c: New file.
722 * util/ieee1275/devicemap.c: New file.
723 * util/devicemap.c: New file.
724 * util/deviceiter.c: New file.
725 * kern/sparc64/ieee1275/init.c: New file.
726 * include/grub/util/ofpath.h: New file.
727 * include/grub/util/deviceiter.h: New file.
728 * util/grub-mkdevicemap.c: Include deviceiter.h.
729 Implement using grub_util_emit_devicemap_entry and
730 grub_util_iterate_devices.
731 * conf/i386-corebook.rmk: Build util/deviceiter.c and
732 util/devicemap.c into grub-mkdevicemap
733 * conf/i386-efi.rmk: Likewise.
734 * conf/i386-ieee1275.rmk: Likewise.
735 * conf/i386-pc.rmk: Likewise.
736 * conf/powerpc-ieee1275.rmk: Likewise.
737 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
738 images and installation utilities. Build kernel as image
739 instead of as elf binary. Use common rules as much as possible.
741 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
743 Correct GPT definition
745 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
748 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
750 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
752 2009-04-19 David S. Miller <davem@davemloft.net>
754 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
755 (grub_rescue_cmd_linux): Rename to...
756 (grub_cmd_linux): and fix prototype.
757 (grub_rescue_cmd_initrd): Rename to...
758 (grub_cmd_initrd): and fix prototype.
759 (cmd_linux, cmd_initrd): New.
760 (GRUB_MOD_INIT(linux)): Use grub_register_command().
761 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
763 2009-04-17 Pavel Roskin <proski@gnu.org>
765 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
767 (grub_ohci_transfer): Likewise.
769 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
771 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
772 return without a value. Fix inconsistent indentation.
774 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
775 match struct grub_fs.
777 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
778 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
779 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
780 * commands/lspci.c (grub_lspci_iter): Likewise.
782 2009-04-16 Bean <bean123ch@gmail.com>
784 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
787 2009-04-15 Pavel Roskin <proski@gnu.org>
789 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
790 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
791 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
794 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
796 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
797 that no multiple data or metadata areas are supported and `Unknown
800 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
802 Move loader out of the kernel
804 * kern/loader.c: moved to ...
805 * commands/boot.c: ... moved here
806 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
807 * commands/boot.c (grub_cmd_boot): moved here. All users updated
808 * include/grub/kernel.h (grub_machine_fini): export
809 * include/grub/loader.h (grub_loader_is_loaded): update declaration
810 (grub_loader_set): likewise
811 (grub_loader_unset): likewise
812 (grub_loader_boot): likewise
813 * conf/common.rmk: new module boot.mod
814 (pkglib_MODULES): add boot.mod
815 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
816 (grub_emu_SOURCES): likewise
817 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
818 (grub_emu_SOURCES): likewise
819 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
820 (grub_emu_SOURCES): likewise
821 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
822 (grub_emu_SOURCES): likewise
823 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
824 (grub_emu_SOURCES): likewise
825 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
826 (grub_emu_SOURCES): likewise
827 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
828 (grub_emu_SOURCES): likewise
830 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
832 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
834 * kern/misc.c (grub_itoa): Removed function
835 (grub_ltoa): likewise
836 (grub_vsprintf): use grub_lltoa
838 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
842 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
843 * conf/i386-coreboot.rmk: likewise
844 * conf/i386-ieee1275.rmk: likewise
845 * conf/powerpc-ieee1275.rmk: likewise
847 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
849 * INSTALL: Add that `./autogen.sh' needs to be run before
852 2009-04-14 Bean <bean123ch@gmail.com>
854 * Makefile.in (pkglib_DATA): Add handler.lst.
855 (handler.lst): New rule.
857 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
858 * conf/i386-coreboot.rmk: Likewise.
859 * conf/i386-ieee1275.rmk: Likewise.
860 * conf/i386-efi.rmk: Likewise.
861 * conf/x86_64-efi.rmk: Likewise.
862 * conf/powerpc-ieee1275.rmk: Likewise.
863 * conf/sparc64-ieee1275.rmk: Likewise.
865 * genhandlerlist.sh: New file.
867 * genmk.rb: Add rules to generate handler.lst.
869 * include/grub/normal.h (grub_file_getline): New function definition.
870 (read_handler_list): Likewise.
871 (free_handler_list): Likewise.
873 * include/grub/term.h (grub_term_register_input): Add name parameter
874 for auto generation of handler.lst.
875 (grub_term_register_output): Likewise.
877 * normal/handler.c: New file.
879 * normal/main.c (get_line): Renamed to grub_file_getline.
880 (read_config_file): Use the newly renamed grub_file_getline.
881 (read_command_list): Likewise.
882 (read_fs_list): Likewise.
883 (grub_normal_execute): Call read_handler_list to parse handler.lst.
884 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
886 * term/efi/console.c (grub_console_init): Add name parameter for auto
887 generation of handler.lst.
888 * term/gfxterm.c: Likewise.
889 * term/i386/pc/at_keyboard.c: Likewise.
890 * term/i386/pc/console.c: Likewise.
891 * term/i386/pc/serial.c: Likewise.
892 * term/i386/pc/vesafb.c: Likewise.
893 * term/i386/pc/vga.c: Likewise.
894 * term/i386/pc/vga_text.c: Likewise.
895 * term/ieee1275/ofconsole.c: Likewise.
896 * term/usb_keyboard.c: Likewise.
898 2009-04-14 Bean <bean123ch@gmail.com>
900 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
901 properly with null character.
903 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
906 * config.h.in: Likewise.
907 * stamp-h.in: Likewise.
908 * DISTLIST: Likewise.
909 * conf/common.mk: Likewise.
910 * conf/i386-coreboot.mk: Likewise.
911 * conf/i386-efi.mk: Likewise.
912 * conf/i386-ieee1275.mk: Likewise.
913 * conf/i386.mk: Likewise.
914 * conf/i386-pc.mk: Likewise.
915 * conf/powerpc-ieee1275.mk: Likewise.
916 * conf/sparc64-ieee1275.mk: Likewise.
917 * conf/x86_64-efi.mk: Likewise.
919 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
922 2009-04-14 John Stanley <jpsinthemix@verizon.net>
923 David S. Miller <davem@davemloft.net>
925 * util/hostdisk.c (make_device_name): Fix buffer length
928 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
930 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
931 <sys/param.h> and <sys/sysctl.h>.
932 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
933 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
934 opening the device and reset them afterwards.
936 2009-04-13 Pavel Roskin <proski@gnu.org>
938 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
939 Reported by John Stanley <jpsinthemix@verizon.net>
941 2009-04-13 Robert Millan <rmh@aybabtu.com>
943 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
944 that name for menuentries when appropriate.
946 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
948 * util/grub.d/10_freebsd.in: Add a missing `fi'.
950 2009-04-13 Robert Millan <rmh@aybabtu.com>
952 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
953 to Linux, simply abort telling the user it's no longer supported.
955 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
957 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
958 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
959 `freebsd_loadenv' only when devices.hints exist.
961 2009-04-13 Pavel Roskin <proski@gnu.org>
963 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
965 2009-04-13 Felix Zielcke <fzielcke@z-51.de>
967 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
969 (grub_drive): Likewise.
971 2009-04-13 David S. Miller <davem@davemloft.net>
973 * kern/sparc64/ieee1275/ieee1275.c: New file.
974 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
975 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
976 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
977 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
978 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
979 grub_ieee1275_alloc_physmem): Declare new exported functions.
981 * include/grub/sparc64/ieee1275/loader.h: New file.
982 * include/grub/sparc64/ieee1275/memory.h: Likewise.
983 * include/grub/sparc64/kernel.h: Likewise.
984 * loader/sparc64/ieee1275/linux.c: Likewise.
986 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
987 (grub_fstest_SOURCES): Likewise.
989 * util/hostdisk.c (make_device_name): Do not make any assumptions
990 about the length of drive names.
992 * kern/dl.c (grub_dl_load_file): Close file immediately when
993 we are done using it.
995 2009-04-12 David S. Miller <davem@davemloft.net>
997 * kern/misc.c (grub_ltoa): Fix cast when handling negative
998 values. Noticed by Pavel Roskin.
1000 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1003 * genmk.rb: Add more flexible image type specification, also
1004 pass --strip-unneeded to objcopy.
1005 * conf/i386-pc.rmk: Use *_FORMAT.
1006 * conf/i386-pc.mk: Rebuilt.
1008 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1009 (OFDISK_HASH_SZ): Define.
1010 (ofdisk_hash): New hash table.
1011 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1012 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1013 instead of device phandle which is not unique.
1015 * kern/sparc64/ieee1275/init.c: Delete, replace with...
1016 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1017 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1018 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1019 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1020 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1021 GRUB_KERNEL_MACHINE_DATA_END): Define.
1022 (grub_kernel_image_size, grub_total_module_size): Declare.
1024 2009-04-12 Pavel Roskin <proski@gnu.org>
1026 * configure.ac: Change the logic when we check for target tools.
1027 Do it when the target is specified and it's different from the
1028 specified value of the host.
1030 2009-04-11 Felix Zielcke <fzielcke@z-51.de>
1032 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1033 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1034 GNU/kFreeBSD. Check if a device is a character device. Use
1035 DIOCGMEDIASIZE to get the size.
1036 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1037 support for GNU/kFreeBSD.
1038 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1039 is a character device instead of a block device. Add support for
1040 FreeBSD device names.
1042 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1043 is a character device instead of a block device.
1045 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1046 is a character device instead of a block device.
1048 2009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
1050 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1051 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1052 FreeBSD. Check if a device is a character device. Use
1053 DIOCGMEDIASIZE to get the size.
1054 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1055 support for FreeBSD.
1056 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1057 is a character device instead of a block device. Add support for
1058 FreeBSD device names.
1060 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1061 a character device instead of a block device.
1062 (grub_util_check_char_device): New function.
1064 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1065 a character device instead of a block device.
1067 * include/grub/util/getroot.h (grub_util_check_char_device): New
1070 2009-04-11 David S. Miller <davem@davemloft.net>
1072 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
1074 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
1075 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
1076 function, if present.
1077 (__bswapdi2): Likewise.
1079 * include/grub/sparc64/ieee1275/boot.h: New file.
1080 * boot/sparc64/ieee1275/boot.S: Likewise.
1081 * boot/sparc64/ieee1275/diskboot.S: Likewise.
1083 * kern/misc.c (grub_ltoa): New function.
1084 (grub_vsprintf): Use it to format 'long' integers.
1086 2009-04-10 David S. Miller <davem@davemloft.net>
1088 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
1089 slots are of type grub_ieee1275_cell_t.
1090 (grub_nand_read): Likewise.
1091 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
1092 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
1093 macros are used to compare values in arg/ret block of the call.
1094 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
1095 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
1096 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
1097 grub_ieee1275_instance_to_path, grub_ieee1275_write,
1098 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
1099 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
1100 grub_ieee1275_close, grub_ieee1275_set_property,
1101 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
1102 grub_ieee1275_cell_t.
1103 * kern/ieee1275/openfw.c (grub_map): Likewise.
1104 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
1105 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
1107 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
1108 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
1109 (grub_devalias_iterate): Likewise.
1111 2009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
1115 * fs/ufs.c (INODE_NBLOCKS): new definition
1116 (struct grub_ufs_dirent): added fields for non-BSD dirents
1117 (grub_ufs_get_file_block): fixed double indirect handling
1118 (grub_ufs_lookup_symlink): use more robust way to determine whether
1120 (grub_ufs_find_file): support for non-BSD dirents
1121 (grub_ufs_dir): support for non-BSD dirents
1123 2009-04-10 Bean <bean123ch@gnail.com>
1125 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
1126 attribute, otherwise the size would be wrong for i386 platform.
1128 * include/grub/pci.h (grub_pci_read_word): New inline function.
1129 (grub_pci_read_byte): Likewise.
1130 (grub_pci_write): Likewise.
1131 (grub_pci_write_word): Likewise.
1132 (grub_pci_write_byte): Likewise.
1134 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
1136 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
1137 (find_framebuf): Scan pci to locate the frame buffer address.
1139 * commands/efi/fixvideo.c: New file.
1141 * commands/efi/loadbios.c: Likewise.
1143 * commands/memrw.c: Likewise.
1145 * util/grub-dumpbios.in: Likewise.
1147 * conf/common.rmk (grub-dumpbios): New utility.
1148 (pkglib_MODULES): New module memrw.mod.
1149 (memrw_mod_SOURCE): New macro.
1150 (memrw_mod_CFLAGS): Likewise.
1151 (memrw_mod_LDFLAGS): Likewise.
1153 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
1155 (loadbios_mod_SOURCE): New macro.
1156 (loadbios_mod_CFLAGS): Likewise.
1157 (loadbios_mod_LDFLAGS): Likewise.
1158 (fixvideo_mod_SOURCE): Likewise.
1159 (fixvideo_mod_CFLAGS): Likewise.
1160 (fixvideo_mod_LDFLAGS): Likewise.
1162 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
1164 (loadbios_mod_SOURCE): New macro.
1165 (loadbios_mod_CFLAGS): Likewise.
1166 (loadbios_mod_LDFLAGS): Likewise.
1167 (fixvideo_mod_SOURCE): Likewise.
1168 (fixvideo_mod_CFLAGS): Likewise.
1169 (fixvideo_mod_LDFLAGS): Likewise.
1171 2009-04-08 Felix Zielcke <fzielcke@z-51.de>
1173 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
1175 2009-04-07 David S. Miller <davem@davemloft.net>
1177 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
1178 support for R_SPARC_OLO10 relocations. Fix compile warning for
1179 R_SPARC_WDISP30 case.
1180 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
1182 2009-04-06 Pavel Roskin <proski@gnu.org>
1184 * include/grub/misc.h (ARRAY_SIZE): New macro.
1185 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
1187 * loader/i386/linux.c (allocate_pages): Use free_pages().
1188 (grub_linux_unload): Don't use free_pages().
1189 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
1190 wrong index. Treat all other modes as text modes.
1191 (grub_cmd_linux): Initialize vid_mode unconditionally to
1192 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
1194 * commands/help.c (print_command_help): Use cmd->prio, not
1195 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
1197 2009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
1201 * parttool/pcpart.c: new file
1202 * commands/parttool.c: likewise
1203 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
1204 (parttool_mod_SOURCES): new variable
1205 (parttool_mod_CFLAGS): likewise
1206 (parttool_mod_LDFLAGS): likewise
1207 (pcpart_mod_SOURCES): likewise
1208 (pcpart_mod_CFLAGS): likewise
1209 (pcpart_mod_LDFLAGS): likewise
1210 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
1211 and parttool/pcpart.c
1212 * conf/i386-efi.rmk: likewise
1213 * conf/i386-ieee1275.rmk: likewise
1214 * conf/i386-pc.rmk: likewise
1215 * conf/powerpc-ieee1275.rmk: likewise
1216 * conf/sparc64-ieee1275.rmk: likewise
1217 * conf/x86_64-ieee1275.rmk: likewise
1219 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1221 Support for mtime and further expandability of dir command
1223 * include/grub/lib/datetime.h: moved to ...
1224 * include/grub/datetime.h: ... moved here and added
1225 declaration of grub_unixtime2datetime. All users updated
1226 * include/grub/fs.h: new syntax for dir and mtime functions in
1228 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1229 and GRUB_FSHELP_FLAGS_MASK
1230 * commands/ls.c (grub_ls_list_files): Write mtime in long format
1231 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1232 (grub_ext2_mtime): new function
1233 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1234 (grub_hfsplus_mtime): new function
1235 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1236 (GRUB_UFS_ATTR_FILE): likewise
1237 (GRUB_UFS_ATTR_LNK): likewise
1238 (struct grub_ufs_sblock): new fields mtime
1239 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1241 (grub_ufs_dir): mtime support
1242 (grub_ufs_mtime): new function
1243 * fs/affs.c (grub_affs_dir): use new dir syntax
1244 * fs/afs.c (grub_afs_dir): likewise
1245 * fs/cpio.c (grub_cpio_dir): likewise
1246 * fs/fat.c (grub_fat_find_dir): likewise
1247 * fs/hfs.c (grub_hfs_dir): likewise
1248 * fs/iso9660.c (grub_iso9660_dir): likewise
1249 * fs/jfs.c (grub_jfs_dir): likewise
1250 * fs/minix.c (grub_minix_dir): likewise
1251 * fs/ntfs.c (grub_ntfs_dir): likewise
1252 * fs/reiserfs.c (grub_reiserfs_dir): likewise
1253 * fs/sfs.c (grub_sfs_dir): likewise
1254 * fs/xfs.c (grub_xfs_dir): likewise
1255 * util/hostfs.c (grub_hostfs_dir): likewise
1256 * lib/datetime.c: moved to ...
1257 * normal/datetime.c: ... moved here
1258 (grub_unixtime2datetime): new function
1259 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
1260 * normal/completion.c (iterate_dir): use new dir syntax
1261 * normal/misc.c (grub_normal_print_device_info): tell the
1262 last modification time of a volume
1263 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
1264 * conf/common.rmk: added lib/datetime.c to ls.mod
1265 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
1266 (normal_mod_SOURCES): likewise
1267 (datetime_mod_SOURCES): Removed lib/datetime.c
1268 * conf/i386-efi.rmk: likewise
1269 * conf/i386-ieee1275.rmk: likewise
1270 * conf/i386-pc.rmk: likewise
1271 * conf/powerpc-ieee1275.rmk: likewise
1272 * conf/sparc64-ieee1275.rmk: likewise
1273 * conf/x86_64-efi.rmk: likewise
1275 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1277 Trim trailing spaces in FAT label and support mtools-like labels
1279 * fs/fat.c (grub_fat_iterate_dir): New function based
1280 on grub_fat_find_dir
1281 (grub_fat_find_dir): use grub_fat_iterate_dir
1282 (grub_fat_label): likewise
1284 2009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
1286 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
1288 remove extraneous kernel_elf_HEADERS
1290 2009-04-04 Bean <bean123ch@gnail.com>
1292 * include/grub/util/misc.h: Add dummy function fsync for mingw.
1294 * util/misc.c: Likewise.
1296 2009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1298 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1299 instead of grub_printf.
1301 2009-04-03 Robert Millan <rmh@aybabtu.com>
1303 * loader/i386/linux.c (grub_linux_setup_video): Fill
1304 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1305 values from `mode info' structure instead of hardcoded
1308 2009-04-01 Pavel Roskin <proski@gnu.org>
1310 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1312 * genmk.rb: Likewise.
1313 * configure.ac: Likewise.
1315 2009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
1317 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1318 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
1320 2009-04-01 David S. Miller <davem@davemloft.net>
1322 * normal/sparc64/setjmp.S: Fix setjmp implementation.
1323 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
1324 (grub_setjmp): Mark with 'returns_twice' attribute.
1325 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1326 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1327 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1329 2009-04-01 Robert Millan <rmh@aybabtu.com>
1331 Reapply fix from 2008-07-28 which was accidentally reverted; also
1332 perform the same fix to a similar check in same function.
1334 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1335 with the same number are found, just use issue a warning with
1336 grub_dprintf(), as this error has been reported to be non-fatal.
1338 2009-03-31 Pavel Roskin <proski@gnu.org>
1340 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1341 for cross-compilation.
1343 2009-03-30 Robert Millan <rmh@aybabtu.com>
1345 Fix i386-ieee1275 build.
1347 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1350 2009-03-30 Pavel Roskin <proski@gnu.org>
1352 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1353 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
1354 zero-terminated, rely only on the strlen value. Fix comparison
1355 of strings differing in length.
1357 2009-03-30 Robert Millan <rmh@aybabtu.com>
1359 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1360 checking for abi version. Improve error messages on BIOS to notify
1361 user about `linux16' command.
1363 2009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
1367 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1368 in case of collision
1369 * disk/scsi.c (grub_scsi_open): free scsi in case of error
1371 2009-03-29 Robert Millan <rmh@aybabtu.com>
1373 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1374 set `vid_mode' accordingly.
1375 (grub_linux_boot): Process `vid_mode' and set video mode.
1377 2009-03-29 Robert Millan <rmh@aybabtu.com>
1379 * util/grub.d/10_linux.in (linux_entry): New function.
1380 Factorize generation of Linux boot entries.
1382 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
1384 Make the format of Environment Block plain text. The boot loader
1385 part is not tested well yet.
1387 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1390 (usage): Remove "info" and "clear". Add "unset". Update the
1391 description of "set", as this does not delete variables any
1393 (create_envblk_file): Complete rewrite.
1394 (open_envblk_file): Likewise.
1395 (cmd_info): Removed.
1396 (cmd_list): Likewise.
1397 (cmd_set): Likewise.
1398 (cmd_clear): Likewise.
1399 (list_variables): New function.
1400 (write_envblk): Likewise.
1401 (set_variables): Likewise.
1402 (unset_variables): Likewise.
1403 (main): Complete rewrite.
1405 * commands/loadenv.c (buffer): Removed.
1407 (open_envblk_file): New function.
1408 (read_envblk_file): Complete rewrite.
1409 (grub_cmd_load_env): Likewise.
1410 (grub_cmd_list_env): Likewise.
1411 (struct blocklist): New struct.
1412 (free_blocklists): New function.
1413 (check_blocklists): Likewise.
1414 (write_blocklists): Likewise.
1415 (grub_cmd_save_env): Complete rewrite.
1417 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1418 a plain text signature.
1419 (GRUB_ENVBLK_MAXLEN): Removed.
1420 (struct grub_envblk): Complete rewrite.
1421 (grub_envblk_find): Removed.
1422 (grub_envblk_insert): Likewise.
1423 (grub_envblk_open): New prototype.
1424 (grub_envblk_set): Likewise.
1425 (grub_envblk_delete): Put const to VALUE.
1426 (grub_envblk_iterate): Put const to NAME and VALUE.
1427 (grub_envblk_close): New prototype.
1428 (grub_envblk_buffer): New inline function.
1429 (grub_envblk_size): Likewise.
1431 * lib/envblk.c: Include grub/mm.h.
1432 (grub_env_find): Removed.
1433 (grub_envblk_open): New function.
1434 (grub_envblk_close): Likewise.
1435 (escaped_value_len): Likewise.
1436 (find_next_line): Likewise.
1437 (grub_envblk_insert): Removed.
1438 (grub_envblk_set): New function.
1439 (grub_envblk_delete): Complete rewrite.
1440 (grub_envblk_iterate): Likewise.
1442 2009-03-28 Robert Millan <rmh@aybabtu.com>
1444 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1445 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1446 variables. Use 16-bit loader.
1447 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1449 * kern/i386/loader.S (grub_linux_boot): Rename to ...
1450 (grub_linux16_boot): ... this. Update all users.
1451 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1452 (grub_linux_boot): ... this. Update all users.
1454 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1455 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
1456 commands to `linux16' and `initrd16'.
1457 (GRUB_MOD_FINI(linux)): Rename to ...
1458 (GRUB_MOD_FINI(linux16)): ... this.
1460 2009-03-24 Pavel Roskin <proski@gnu.org>
1462 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1463 not just for compilation.
1465 2009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
1467 Move multiboot helper out of kernel
1469 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1470 `loader/i386/multiboot_helper.S'.
1471 * conf/i386-coreboot.rmk: Likewise
1472 * conf/i386-ieee1275.rmk: Likewise
1474 * kern/i386/loader.S: Move multiboot helpers from here...
1475 * loader/i386/multiboot_helper.S: ...moved here
1476 * include/grub/i386/loader.h: Move declarations of multiboot
1477 helpers from here...
1478 * include/grub/i386/multiboot.h: ...moved here
1479 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1481 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1483 * kern/env.c (grub_env_context_open): Added an argument to specify
1484 whether a new context inherits exported variables from current
1485 one. This is useful when making a sandbox to interpret a config
1487 All callers updated.
1489 * include/grub/env.h (grub_env_context_open): Updated the prototype.
1491 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1493 * kern/env.c (grub_env_context_close): Fix memory leaks.
1495 2009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1497 * normal/main.c (grub_normal_execute): Added an argument
1498 BATCH to specify if an interactive interface should be provided
1499 after reading a config file.
1500 All callers updated.
1501 (read_command_list): Prevent being executed twice.
1502 (read_fs_list): Likewise.
1504 * include/grub/normal.h (grub_normal_execute): Updated the
1507 2009-03-22 Pavel Roskin <proski@gno.org>
1509 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1511 * kern/i386/pc/startup.S: Likewise.
1512 * kern/i386/efi/startup.S: Likewise.
1513 * kern/i386/ieee1275/startup.S: Likewise.
1514 * kern/i386/coreboot/startup.S: Likewise.
1515 * kern/x86_64/efi/startup.S: Likewise.
1517 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1518 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1519 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1521 2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
1523 Bugfixes in multiboot for bugs uncovered by solaris kernel.
1525 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1527 Use vaddr of correct segment for entry_point.
1529 2009-03-21 Bean <bean123ch@gmail.com>
1531 * commands/blocklist.c: Add include file <grub/command.h>, remove
1532 <grub/normal.h> and <grub/arg.h>.
1533 (grub_cmd_blocklist): Use the new command interface.
1534 (GRUB_MOD_INIT): Likewise.
1535 (GRUB_MOD_FINI): Likewise.
1536 * commands/boot.c: Likewise.
1537 * commands/cat.c: Likewise.
1538 * commands/cmp.c: Likewise.
1539 * commands/configfile.c: Likewise.
1540 * commands/crc.c: Likewise.
1541 * commands/echo.c: Likewise.
1542 * commands/halt.c: Likewise.
1543 * commands/handler.c: Likewise.
1544 * commands/hdparm.c: Likewise.
1545 * commands/help.c: Likewise.
1546 * commands/hexdump.c: Likewise.
1547 * commands/loadenv.c: Likewise.
1548 * commands/ls.c: Likewise.
1549 * commands/lsmmap.c: Likewise.
1550 * commands/lspci.c: Likewise.
1551 * commands/loadenv.c: Likewise.
1552 * commands/read.c: Likewise.
1553 * commands/reboot.c: Likewise.
1554 * commands/search.c: Likewise.
1555 * commands/sleep.c: Likewise.
1556 * commands/test.c: Likewise.
1557 * commands/usbtest.c: Likewise.
1558 * commands/videotest.c: Likewise.
1559 * commands/i386/cpuid.c: Likewise.
1560 * commands/i386/pc/halt.c: Likewise.
1561 * commands/i386/pc/play.c: Likewise.
1562 * commands/i386/pc/pxecmd.c: Likewise.
1563 * commands/i386/pc/vbeinfo.c: Likewise.
1564 * commands/i386/pc/vbetest.c: Likewise.
1565 * commands/ieee1275/suspend.c: Likewise.
1566 * disk/loopback.c: Likewise.
1567 * font/font_cmd.c: Likewise.
1568 * hello/hello.c: Likewise.
1569 * loader/efi/appleloader.c: Likewise.
1570 * loader/efi/chainloader.c: Likewise.
1571 * loader/i386/bsd.c: Likewise.
1572 * loader/i386/efi/linux.c: Likewise.
1573 * loader/i386/ieee1275/linux.c: Likewise.
1574 * loader/i386/linux.c: Likewise.
1575 * loader/i386/pc/chainloader.c: Likewise.
1576 * loader/i386/pc/linux.c: Likewise.
1577 * loader/powerpc/ieee1275/linux.c: Likewise.
1578 * loader/multiboot_loader.c: Likewise.
1579 * term/gfxterm.c: Likewise.
1580 * term/i386/pc/serial.c: Likewise.
1581 * term/terminfo.c: Likewise.
1583 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
1584 * term/i386/pc/vga.c: Likewise.
1585 * video/readers/jpeg.c: Likewise.
1586 * video/readers/png.c: Likewise.
1587 * video/readers/tga.c: Likewise.
1589 * util/grub-fstest (cmd_loopback): Removed.
1590 (cmd_blocklist): Likewise.
1592 (grub_register_command): Likewise.
1593 (grub_unregister_command): Likewise.
1594 (execute_command): Use grub_command_find to locate command and execute
1597 * include/grub/efi/chainloader.h: Removed.
1598 * loader/efi/chainloader_normal.c: Likewise.
1599 * loader/i386/bsd_normal.c: Likewise.
1600 * loader/i386/pc/chainloader_normal.c: Likewise.
1601 * loader/i386/pc/multiboot_normal.c: Likewise.
1602 * loader/linux_normal.c: Likewise.
1603 * loader/multiboot_loader_normal.c: Likewise.
1604 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1606 * gencmdlist.sh: Scan new registration command grub_register_extcmd
1607 and grub_register_command_p1.
1609 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1610 kern/command.c, lib/arg.c and commands/extcmd.c.
1611 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1612 (minicmd_mod_SOURCES): New variable.
1613 (minicmd_mod_CFLAGS): Likewise.
1614 (minicmd_mod_LDFLAGS): Likewise.
1615 (extcmd_mod_SOURCES): Likewise.
1616 (extcmd_mod_CFLAGS): Likewise.
1617 (extcmd_mod_LDFLAGS): Likewise.
1618 (boot_mod_SOURCES): Removed.
1619 (boot_mod_CFLAGS): Likewise.
1620 (boot_mod_LDFLAGS): Likewise.
1622 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
1624 (kernel_img_HEADERS): Add command.h.
1625 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
1626 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
1628 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
1629 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
1630 remove the corresponding normal mode command.
1631 (normal_mod_SOURCES): Remove normal/arg.c.
1632 * conf/i386-coreboot.rmk: Likewise.
1633 * conf/i386-efi.rmk: Likewise.
1634 * conf/i386-ieee1275.rmk: Likewise.
1635 * conf/powerpc-ieee1275.rmk: Likewise.
1636 * conf/x86_64-efi.rmk: Likewise.
1638 * include/grub/arg.h: Move from here ...
1639 * include/grub/lib/arg.h: ... to here.
1641 * normal/arg.c: Move from here ...
1642 * lib/arg.c: ... to here.
1644 * commands/extcmd.c: New file.
1645 * commands/minicmd.c: Likewise.
1646 * include/grub/command.h: Likewise.
1647 * include/grub/extcmd.h: Likewise.
1648 * kern/command.c: Likewise.
1649 * kern/corecmd.c: Likewise.
1651 * kern/list.c (grub_list_iterate): Return int instead of void.
1652 (grub_list_insert): New function.
1653 (grub_prio_list_insert): Likewise.
1655 * kern/rescue.c (grub_rescue_command): Removed.
1656 (grub_rescue_command_list): Likewise.
1657 (grub_rescue_register_command): Likewise.
1658 (grub_rescue_unregister_command): Likewise.
1659 (grub_rescue_cmd_boot): Move to minicmd.c
1660 (grub_rescue_cmd_help): Likewise.
1661 (grub_rescue_cmd_info): Likewise.
1662 (grub_rescue_cmd_boot): Likewise.
1663 (grub_rescue_cmd_testload): Likewise.
1664 (grub_rescue_cmd_dump): Likewise.
1665 (grub_rescue_cmd_rmmod): Likewise.
1666 (grub_rescue_cmd_lsmod): Likewise.
1667 (grub_rescue_cmd_exit): Likewise.
1668 (grub_rescue_print_devices): Moved to corecmd.c.
1669 (grub_rescue_print_files): Likewise.
1670 (grub_rescue_cmd_ls): Likewise.
1671 (grub_rescue_cmd_insmod): Likewise.
1672 (grub_rescue_cmd_set): Likewise.
1673 (grub_rescue_cmd_unset): Likewise.
1674 (attempt_normal_mode): Use grub_command_find to get normal module.
1675 (grub_enter_rescue_mode): Use grub_register_core_commands to register
1676 commands, remove grub_rescue_register_command calls.
1678 * normal/command.c (grub_register_command): Removed.
1679 (grub_unregister_command): Likewise.
1680 (grub_command_find): Likewise.
1681 (grub_iterate_commands): Likewise.
1682 (rescue_command): Likewise.
1683 (export_command): Moved to corecmd.c.
1684 (set_command): Removed.
1685 (unset_command): Likewise.
1686 (insmod_command): Likewise.
1687 (rmmod_command): Likewise.
1688 (lsmod_command): Likewise.
1689 (grub_command_init): Likewise.
1691 * normal/completion.c (iterate_command): Use cmd->prio to check for
1693 (complete_arguments): Use grub_extcmd_t structure to find options.
1694 (grub_normal_do_completion): Change function grub_iterate_commands to
1695 grub_command_iterate.
1697 * normal/execute.c (grub_script_execute_cmd): No need to parse
1700 * normal/main.c (grub_dyncmd_dispatcher): New function.
1701 (read_command_list): Register unload commands as dyncmd.
1702 (grub_cmd_normal): Use new command interface, register rescue,
1703 unregister normal at entry, register normal, unregister rescue at exit.
1705 * include/grub/list.h (grub_list_test_t): New type.
1706 (grub_list_iterate): Return int instead of void.
1707 (grub_list_insert): New function.
1708 (GRUB_AS_NAMED_LIST_P): New macro.
1709 (GRUB_AS_PRIO_LIST): Likewise.
1710 (GRUB_AS_PRIO_LIST_P): Likewise.
1711 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
1712 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
1713 (grub_prio_list): New structure.
1714 (grub_prio_list_insert): New function.
1715 (grub_prio_list_remove): New inline function.
1717 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
1718 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
1719 (GRUB_COMMAND_FLAG_MENU): Likewise.
1720 (GRUB_COMMAND_FLAG_BOTH): Likewise.
1721 (GRUB_COMMAND_FLAG_TITLE): Likewise.
1722 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
1723 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
1724 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
1725 (grub_command): Likewise.
1726 (grub_register_command): Likewise.
1727 (grub_command_find): Likewise.
1728 (grub_iterate_commands): Likewise.
1729 (grub_command_init): Likewise.
1730 (grub_arg_parse): Likewise.
1731 (grub_arg_show_help): Likewise.
1733 * include/grub/rescue.h (grub_rescue_register_command): Removed.
1734 (grub_rescue_unregister_command): Likewise.
1736 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
1737 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
1738 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
1740 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
1741 grub_rescue_cmd_initrd.
1742 * include/grub/i386/loader.h: Likewise.
1743 * include/grub/x86_64/loader.h: Likewise.
1745 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
1747 2009-03-21 Bean <bean123ch@gmail.com>
1749 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
1750 instead of stat in mingw environment.
1752 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
1754 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
1756 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
1759 2009-03-21 Bean <bean123ch@gmail.com>
1761 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
1764 2009-03-18 Michel Dänzer <michel@daenzer.net>
1766 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
1767 checking inode flags for EXT4_EXTENTS_FLAG.
1769 2009-03-18 Robert Millan <rmh@aybabtu.com>
1771 * loader/i386/linux.c: Include `<grub/video.h>' and
1772 `<grub/i386/pc/vbe.h>'..
1773 (grub_linux_setup_video): New function. Loosely based on the EFI one.
1774 (grub_linux32_boot): Attempt to configure video settings with
1775 grub_linux_setup_video().
1776 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
1777 to avoid grub_console_fini() which would step out of graphical mode
1780 2009-03-14 Robert Millan <rmh@aybabtu.com>
1782 Fix build on powerpc.
1783 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
1785 2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
1787 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
1788 background image command.
1790 2009-03-12 Colin D Bennett <colin@gibibit.com>
1792 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
1793 (grub_gfxterm_putchar): Extract pairs of identical calls to
1794 draw_cursor out of conditional blocks.
1796 2009-03-11 Pavel Roskin <proski@gnu.org>
1798 * fs/hfs.c (grub_hfs_strncasecmp): New function.
1799 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
1801 2009-03-11 Robert Millan <rmh@aybabtu.com>
1803 * loader/i386/multiboot_elfxx.c
1804 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
1806 2009-03-11 Felix Zielcke <fzielcke@z-51.de>
1808 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
1811 2009-03-11 Robert Millan <rmh@aybabtu.com>
1813 * loader/i386/multiboot.c (code_size): New variable.
1814 (grub_multiboot): Define offsets by adding to `code_size' rather
1815 than subtracting from `grub_multiboot_payload_size'. Provide
1816 4-byte alignment to MBI and others by increasing
1817 `boot_loader_name_length' appropriately.
1819 * loader/i386/multiboot_elfxx.c
1820 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
1822 2009-03-09 Felix Zielcke <fzielcke@z-51.de>
1824 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
1827 2009-03-08 Robert Millan <rmh@aybabtu.com>
1829 Make loader/i386/linux.c usable on i386-pc again.
1831 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
1833 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
1836 2009-03-07 Bean <bean123ch@gmail.com>
1838 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
1841 2009-03-06 Robert Millan <rmh@aybabtu.com>
1843 Fix display issue on terminals with screen size other than 80x25
1844 (e.g. gfxterm with resolution higher than 640x480).
1846 * normal/main.c (grub_normal_init_page): Display title text in a
1847 position relative to the center of the terminal instead of relying
1848 on a hardcoded offset.
1850 2009-03-04 Robert Millan <rmh@aybabtu.com>
1852 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
1855 * Makefile.in (host_kernel): New variable.
1856 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
1857 scripts instead of just the windows one.
1858 * configure.ac: Initialize and AC_SUBST `host_kernel'.
1860 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
1862 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
1864 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1865 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1866 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1867 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1868 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1869 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1871 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
1873 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
1874 or if there's no space for the disk label and print the partition number on a
1877 2009-03-04 Felix Zielcke <fzielcke@z-51.de>
1879 * util/misc.c: Include <time.h>.
1880 (grub_millisleep): New function.
1882 2009-03-04 Bean <bean123ch@gmail.com>
1884 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
1885 another option -mno-red-zone.
1887 * commands/handler.c: Change module description.
1889 * kern/handler.c: Add missing space at the end of description line.
1891 * kern/list.c: Likewise.
1893 2009-03-03 Robert Millan <rmh@aybabtu.com>
1895 Move more components to the relocation area, and fix mbi pointer
1896 handling to use the destination rather than the origin (thanks to
1897 Vladimir Serbinenko for spotting).
1899 * loader/i386/multiboot.c (mbi_dest): New variable.
1900 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
1901 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
1904 2009-03-01 Bean <bean123ch@gmail.com>
1906 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
1907 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
1908 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
1909 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
1911 * loader/i386/efi/linux.c (acpi_guid): New variable.
1912 (acpi_guid): Likewise.
1913 (EBDA_SEG_ADDR): New constant.
1914 (LOW_MEM_ADDR): Likewise.
1915 (FAKE_EBDA_SEG): Likewise.
1916 (fake_bios_data): New function.
1917 (grub_linux_boot): Call fake_bios_data.
1919 2009-03-01 Bean <bean123ch@gmail.com>
1921 * commands/terminal.c: Removed.
1923 * commands/handler.c: New file.
1925 * include/grub/list.h: Likewise.
1927 * include/grub/handler.h: Likewise.
1929 * kern/list.c: Likewise.
1931 * kern/handler.c: Likewise.
1933 * kern/term.h: Include header file <grub/handler.h>.
1934 (grub_term_input): Move next field to the beginning.
1935 (grub_term_output): Likewise.
1936 (grub_term_input_class): New variable.
1937 (grub_term_output_class): Likewise.
1938 (grub_term_register_input): Changed to inline function.
1939 (grub_term_register_output): Likewise.
1940 (grub_term_unregister_input): Likewise.
1941 (grub_term_unregister_output): Likewise.
1942 (grub_term_set_current_input): Likewise.
1943 (grub_term_set_current_output): Likewise.
1944 (grub_term_get_current_input): Likewise.
1945 (grub_term_get_current_output): Likewise.
1946 (grub_term_iterate_input): Removed.
1947 (grub_term_iterate_output): Likewise.
1949 * kern/term.c (grub_term_list_input): Removed.
1950 (grub_term_list_output): Likewise.
1951 (grub_term_input_class): New variable.
1952 (grub_term_output_class): Likewise.
1953 (grub_cur_term_input): Change variable as macro.
1954 (grub_cur_term_output): Likewise.
1955 (grub_term_register_input): Removed.
1956 (grub_term_register_output): Likewise.
1957 (grub_term_unregister_input): Likewise.
1958 (grub_term_unregister_output): Likewise.
1959 (grub_term_set_current_input): Likewise.
1960 (grub_term_set_current_output): Likewise.
1961 (grub_term_iterate_input): Likewise.
1962 (grub_term_iterate_output): Likewise.
1963 (grub_term_get_current_input): Likewise.
1964 (grub_term_get_current_output): Likewise.
1966 * util/grub-editenv.c: Include header file <grub/handler.h>.
1967 (grub_term_get_current_input): Removed.
1968 (grub_term_get_current_output): Likewise.
1969 (grub_term_input_class): New variable.
1970 (grub_term_output_class): Likewise.
1972 * util/grub-fstest.c (grub_term_get_current_input): Removed.
1973 (grub_term_get_current_output): Likewise.
1974 (grub_term_input_class): New variable.
1975 (grub_term_output_class): Likewise.
1977 * util/grub-probe.c (grub_term_get_current_input): Removed.
1978 (grub_term_get_current_output): Likewise.
1979 (grub_term_input_class): New variable.
1980 (grub_term_output_class): Likewise.
1982 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
1983 (grub_term_get_current_output): Likewise.
1984 (grub_term_input_class): New variable.
1985 (grub_term_output_class): Likewise.
1987 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
1988 (terminal_mod_SOURCES): Likewise.
1989 (terminal_mod_CFLAGS): Likewise.
1990 (terminal_mod_LDFLAGS): Likewise.
1992 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
1994 (kernel_img_SOURCES): Add list.c and handler.c.
1995 (kernel_img_HEADERS): Add list.h and handler.h.
1997 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1999 (kernel_mod_SOURCES): Add list.c and handler.c.
2000 (kernel_mod_HEADERS): Add list.h and handler.h.
2002 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2004 (kernel_elf_SOURCES): Add list.c and handler.c.
2005 (kernel_elf_HEADERS): Add list.h and handler.h.
2007 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2009 (kernel_elf_SOURCES): Add list.c and handler.c.
2010 (kernel_elf_HEADERS): Add list.h and handler.h.
2012 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2014 (kernel_mod_SOURCES): Add list.c and handler.c.
2015 (kernel_mod_HEADERS): Add list.h and handler.h.
2017 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2019 (kernel_elf_SOURCES): Add list.c and handler.c.
2020 (kernel_elf_HEADERS): Add list.h and handler.h.
2022 2009-02-27 Robert Millan <rmh@aybabtu.com>
2024 Factorize elf32 / elf64 code in Multiboot loader. This will
2025 prevent it from getting out of sync again.
2027 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2028 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2029 grub_multiboot_load_elf64): Move from here ...
2030 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2031 grub_multiboot_load_elf): ... to here (new file).
2033 2009-02-27 Robert Millan <rmh@aybabtu.com>
2035 * util/grub.d/10_linux.in: Rename "single-user mode" to
2038 2009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
2040 Don't leak in SCSI code.
2041 * disk/scsi.c (grub_scsi_close): free `scsi'.
2043 2009-02-27 Robert Millan <rmh@aybabtu.com>
2045 * loader/i386/pc/multiboot.c: Move from here ...
2046 * loader/i386/multiboot.c: ... to here. Update all users.
2048 2009-02-27 Robert Millan <rmh@aybabtu.com>
2050 Patch from Alexandre Bique <bique.alexandre@gmail.com>
2051 * util/i386/pc/grub-setup.c (setup): Fix directory path.
2053 2009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
2055 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2058 2009-02-27 Robert Millan <rmh@aybabtu.com>
2060 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2061 `0x' qualifier as 0 when base is specified as parameter).
2063 2009-02-24 Bean <bean123ch@gmail.com>
2065 * configure.ac: Check for -mcmodel=large in x86_64 target.
2067 * include/grub/efi/api.h (efi_call_10): New macro.
2068 (efi_wrap_10): New function.
2070 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2071 (GRUB_PE32_REL_BASED_HIGH): Likewise.
2072 (GRUB_PE32_REL_BASED_LOW): Likewise.
2073 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
2074 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
2075 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
2076 (GRUB_PE32_REL_BASED_SECTION): Likewise.
2077 (GRUB_PE32_REL_BASED_REL): Likewise.
2078 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
2079 (GRUB_PE32_REL_BASED_DIR64): Likewise.
2080 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
2082 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
2085 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
2086 (efi_wrap_10): New function.
2088 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
2090 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
2091 MB/MBP model (NV chipset).
2092 (devdata_devs): Add devpath_5 to the list.
2094 * load/i386/efi/linux.c (video_base): Remove variable.
2095 (RGB_MASK): New macro.
2096 (RGB_MAGIC): Likewise.
2097 (LINE_MIN): Likewise.
2098 (LINE_MAX): Likewise.
2099 (FBTEST_STEP): Likewise.
2100 (FBTEST_COUNT): Likewise.
2101 (fb_list): New variable.
2102 (grub_find_video_card): Remove function.
2103 (find_framebuf): New function.
2104 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
2107 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
2110 2009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
2112 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
2114 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
2117 2009-02-22 Robert Millan <rmh@aybabtu.com>
2119 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
2120 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
2121 in our relocation, instead of using it directly from heap. Also
2122 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
2124 2009-02-21 Robert Millan <rmh@aybabtu.com>
2126 Implement USB keyboard support (based on patch by Marco Gerards)
2128 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
2129 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
2130 (usb_keyboard_mod_LDFLAGS): New variables.
2132 * term/usb_keyboard.c: New file.
2134 2009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
2136 Corrected wrong declaration
2138 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
2140 2009-02-14 Christian Franke <franke@computer.org>
2142 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
2143 (grub_lspci_iter): Print class code and programming interface byte.
2145 2009-02-14 Christian Franke <franke@computer.org>
2147 * gendistlist.sh: Ignore `.svn' directories.
2149 2009-02-14 Felix Zielcke <fzielcke@z-51.de>
2151 * fs/fat.c: Add 2009 to Copyright line.
2153 2009-02-14 Christian Franke <franke@computer.org>
2155 * commands/hdparm.c: New file. Provides `hdparm' command
2156 which sends ATA commands via grub_disk_ata_pass_through ().
2158 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
2160 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
2161 and <grub/cpu/io.h> to include/grub/ata.h.
2162 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
2163 (GRUB_CDROM_SECTOR_SIZE): Remove.
2164 (GRUB_ATA_*): Move to include/grub/ata.h.
2165 (GRUB_ATAPI_*): Likewise.
2166 (enum grub_ata_commands): Likewise.
2167 (enum grub_ata_timeout_milliseconds): Likewise.
2168 (struct grub_ata_device): Likewise.
2169 (grub_ata_regset): Likewise.
2170 (grub_ata_regget): Likewise.
2171 (grub_ata_regset2): Likewise.
2172 (grub_ata_regget2): Likewise.
2173 (grub_ata_check_ready): Likewise.
2174 (grub_ata_wait_not_busy): Remove static, exported in
2176 (grub_ata_wait_drq): Likewise.
2177 (grub_ata_pio_read): Likewise.
2179 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
2180 function for hdparm.mod.
2182 * include/grub/ata.h: New file, contains declarations from
2184 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
2186 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
2187 (grub_disk_ata_pass_through): New exported variable.
2189 * kern/disk.c (grub_disk_ata_pass_through): New variable.
2191 2009-02-13 Colin D Bennett <colin@gibibit.com>
2193 Support multiple fallback entries, and provide an API to support
2194 executing default+fallback menu entries. Renamed the `terminal' menu
2197 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
2198 variable declaration.
2199 (grub_menu_execute_callback): New structure declaration.
2200 (grub_menu_execute_callback_t): New typedef.
2201 (grub_menu_execute_with_fallback): New function declaration.
2202 (grub_menu_get_entry): Likewise.
2203 (grub_menu_get_timeout): Likewise.
2204 (grub_menu_set_timeout): Likewise.
2206 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2208 * normal/menu.c (grub_wait_after_message): Moved to
2209 `normal/menu_text.c'.
2210 (draw_border): Likewise.
2211 (print_message): Likewise.
2212 (print_entry): Likewise.
2213 (print_entries): Likewise.
2214 (grub_menu_init_page): Likewise.
2215 (get_entry_number): Likewise.
2216 (print_timeout): Likewise.
2217 (run_menu): Likewise.
2218 (grub_menu_execute_entry): Likewise.
2219 (show_text_menu): Likewise.
2220 (get_and_remove_first_entry_number): New function.
2221 (grub_menu_execute_with_fallback): Likewise.
2222 (get_entry): Renamed to ...
2223 (grub_menu_get_entry): .. this and made it global.
2224 (get_timeout): Renamed to ...
2225 (grub_menu_get_timeout): ... this and made it global.
2226 (set_timeout): Renamed to ...
2227 (grub_menu_set_timeout): ... this and made it global.
2228 (grub_normal_terminal_menu_viewer): Renamed to ...
2229 (grub_normal_text_menu_viewer): ... this.
2231 * normal/menu_text.c: New file. Extracted text-menu-specific code
2234 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2235 (normal_mod_SOURCES): Likewise.
2237 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2238 (normal_mod_SOURCES): Likewise.
2240 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2241 (normal_mod_SOURCES): Likewise.
2243 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2244 (normal_mod_SOURCES): Likewise.
2246 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2247 (normal_mod_SOURCES): Likewise.
2249 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2250 (normal_mod_SOURCES): Likewise.
2252 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2253 (normal_mod_SOURCES): Likewise.
2255 2009-02-11 Robert Millan <rmh@aybabtu.com>
2257 * util/grub.d/00_header.in: Update old reference to `font' command.
2259 2009-02-10 Felix Zielcke <fzielcke@z-51.de>
2261 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2263 Based on patch from Javier MartÃn.
2265 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
2267 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
2268 to avoid false positives with FAT.
2269 (grub_fstest_SOURCES): Likewise.
2270 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2271 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2272 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2273 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2274 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2275 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2277 2009-02-09 Felix Zielcke <fzielcke@z-51.de>
2279 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
2280 bpb.version_specific.fat12_or_fat16.fstype and
2281 bpb.version_specific.fat32.fstype.
2283 2009-02-08 Robert Millan <rmh@aybabtu.com>
2285 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2287 2009-02-08 Robert Millan <rmh@aybabtu.com>
2289 * Makefile.in (host_os, host_cpu): New variables.
2290 (target_os): Remove. Update all users.
2292 2009-02-08 Marco Gerards <marco@gnu.org>
2294 * Makefile.in (enable_grub_emu_usb): New variable.
2295 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2296 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2297 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2298 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2299 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2300 `usbtest.mod' and `usbms.mod'.
2301 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2302 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2303 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2304 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2305 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2308 * disk/usbms.c: New file.
2310 * include/grub/usb.h: Likewise.
2312 * include/grub/usbtrans.h: Likewise.
2314 * include/grub/usbdesc.h: Likewise.
2316 * bus/usb/usbtrans.c: Likewise.
2318 * bus/usb/ohci.c: Likewise.
2320 * bus/usb/uhci.c: Likewise.
2322 * bus/usb/usbhub.c: Likewise.
2324 * bus/usb/usb.c: Likewise.
2326 * commands/usbtest.c: Likewise.
2328 * util/usb.c: Likewise.
2330 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2332 * configure.ac: Test for libusb presence.
2334 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2336 2009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
2338 * kern/mm.c: Add more comments.
2340 2009-02-08 Robert Millan <rmh@aybabtu.com>
2342 Patch from Javier MartÃn.
2343 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2344 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2346 2009-02-08 Robert Millan <rmh@aybabtu.com>
2348 * fs/cpio.c: Split tar functionality to ...
2349 * fs/tar.c: ... here (new file). Update all users.
2351 2009-02-07 Robert Millan <rmh@aybabtu.com>
2353 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2354 backward-incompatible features.
2356 Based on patch from Javier MartÃn, with some adjustments.
2358 2009-02-07 Michael Scherer <misc@mandriva.org>
2360 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2362 2009-02-07 Robert Millan <rmh@aybabtu.com>
2364 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2365 position of `disk/lvm.c' to ensure grub_init_all() always picks it
2366 after the RAID stuff.
2368 2009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
2370 Fixes problem when running vbetest command as reported by
2371 Vladimir Serbinenko <phcoder@gmail.com>.
2373 * (grub_vbe_set_video_mode): Fixed problem with text modes.
2375 2009-02-04 Felix Zielcke <fzielcke@z-51.de>
2377 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2378 /dev/md/NpN style mdraid devices.
2380 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2382 * util/unifont2pff.rb: Remove.
2384 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2386 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2389 2009-02-03 Felix Zielcke <fzielcke@z-51.de>
2391 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2392 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2393 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2394 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2395 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2396 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2397 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2399 2009-02-02 Christian Franke <franke@computer.org>
2401 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2403 2009-02-01 Felix Zielcke <fzielcke@z-51.de>
2405 * INSTALL: Note that we now require at least autoconf 2.59 and
2406 that LZO is optional.
2408 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2410 Base on patch on bug #24154 created by Tomas Tintera
2413 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2415 2009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2417 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
2418 <bero@arklinux.org>.
2420 * normal/parser.y (script_init): Add missing semicolon.
2422 2009-01-31 Colin D Bennett <colin@gibibit.com>
2424 * normal/main.c: Add include to grub/menu_viewer.h.
2425 (free_menu_entry_classes): Added.
2426 (grub_normal_menu_addentry): Added class property handling.
2427 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2428 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2430 * normal/menu_viewer.c: New file.
2432 * normal/menu.c (run_menu_entry): Renamed to ...
2433 (grub_menu_execute_entry): ... this and made it as global.
2434 (grub_menu_run): Renamed to ...
2435 (show_text_menu): ... this and made it local.
2436 (show_text_menu): Adapt to new function names.
2437 (grub_normal_terminal_menu_viewer): New global variable.
2439 * include/grub/menu.h: New file.
2441 * include/grub/menu_viewer.h: New file.
2443 * include/grub/normal.h: Added include to grub/menu.h.
2444 (grub_menu_entry): Moved to include/grub/menu.h.
2445 (grub_menu_entry_t): Likewise.
2446 (grub_menu): Likewise.
2447 (grub_menu_t): Likewise.
2448 (grub_normal_terminal_menu_viewer): Added.
2449 (grub_menu_execute_entry): Likewise.
2450 (grub_menu_run): Removed.
2452 * DISTLIST: Added include/grub/menu.h.
2453 Added include/grub/menu_viewer.h.
2454 Added normal/menu_viewer.c.
2456 2009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
2458 * normal/execute.c (grub_script_execute_menuentry): Changed to use
2459 arglist for menutitle arguments.
2461 * normal/main.c (grub_normal_menu_addentry): Likewise.
2463 * normal/parser.y (menuentry): Likewise.
2465 * normal/script.c (grub_script_create_cmdmenu): Likewise.
2467 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2468 (grub_script_create_cmdmenu): Likewise.
2470 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2472 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2475 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2477 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2479 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2481 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2483 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2485 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2487 2009-01-30 Christian Franke <franke@computer.org>
2489 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2490 in option help text.
2492 2009-01-27 Pavel Roskin <proski@gnu.org>
2494 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2496 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2498 * commands/lsmmap.c: Add include to grub/machine/memory.h.
2500 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2502 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2503 unregister function.
2505 2009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2507 * disk/scsi.c (grub_scsi_read): Fix sign problem.
2509 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2511 * util/grub-mkfont.c (usage): Fix typo.
2513 * util/elf/grub-mkimage.c (load_modules): Fix warning.
2515 2009-01-26 Daniel Mierswa <impulze@impulze.org>
2517 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2519 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2521 * kern/misc.c (grub_strcasecmp): New function.
2522 (grub_strcasecmp): Use grub_size_t instead of int for length.
2524 * include/grub/misc.h: Update function prototypes.
2526 2009-01-26 Robert Millan <rmh@aybabtu.com>
2528 * configure.ac: Fix cross-compilation check.
2530 2009-01-22 Christian Franke <franke@computer.org>
2532 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2533 (precision) digit string. Allow `.format2' without `format1' (width).
2534 Limit input chars for `%s' output to `format2' if specified. This is
2535 compatible with standard printf ().
2537 2009-01-22 Christian Franke <franke@computer.org>
2539 * disk/ata.c (grub_ata_wait_status): Replace by ...
2540 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
2541 other status bits may be invalid while BSY is asserted.
2542 (grub_ata_check_ready): New function.
2543 (grub_ata_cmd): Removed.
2544 (grub_ata_wait_drq): New function.
2545 (grub_ata_strncpy): Remove inline.
2546 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
2547 and error check now done by grub_ata_wait_drq ().
2548 (grub_ata_pio_write): Likewise.
2549 (grub_atapi_identify): Set DEV before check for !BSY. Use
2550 grub_ata_wait_drq () to wait for data.
2551 (grub_ata_device_initialize): Add status register check to
2552 detect missing SATA slave devices. Add debug messages.
2553 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2554 (grub_atapi_packet): Set DEV before check for !BSY. Replace
2555 transfer loop by grub_ata_pio_write ().
2556 (grub_ata_identify): Set DEV before check for !BSY. Use
2557 grub_ata_wait_drq () to wait for data.
2558 (grub_ata_setaddress): Set DEV before check for !BSY.
2559 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2560 read/write in one loop. Fix invalid command on write. Fix incomplete
2561 command on (size % batch) == 0. Add missing error check after write of
2562 last block. Add debug messages.
2563 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
2565 2009-01-19 Christian Franke <franke@computer.org>
2567 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
2568 (GRUB_ATAPI_IREASON_*): Likewise.
2569 (grub_ata_pio_write): Fix timeout error return.
2570 (grub_atapi_identify): Add grub_ata_wait () after cmd.
2571 (grub_atapi_wait_drq): New function.
2572 (grub_atapi_packet): New parameter `size'.
2573 Use grub_atapi_wait_drq () and direct write instead of
2574 grub_ata_pio_write ().
2575 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
2576 reads the number of bytes requested by the device for each DRQ
2578 (grub_atapi_write): Remove old implementation, return not
2579 implemented instead.
2581 2009-01-19 Christian Franke <franke@computer.org>
2583 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
2584 of 512 to calculate data size.
2585 (grub_scsi_read12): Likewise.
2586 (grub_scsi_write10): Likewise.
2587 (grub_scsi_write12): Likewise.
2588 (grub_scsi_read): Adjust size according to blocksize.
2589 Add checks for invalid blocksize and unaligned transfer.
2591 2009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
2593 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
2595 * term/gfxterm.c (write_char): Fix background rendering for wide
2598 2009-01-19 Robert Millan <rmh@aybabtu.com>
2600 * config.guess: Update to latest version from config git.
2601 * config.sub: Likewise.
2603 2009-01-17 Felix Zielcke <fzielcke@z-51.de>
2605 * Makefile.in: Change font compilation to use new grub-mkfont instead
2608 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2609 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2610 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2611 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2612 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2613 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2614 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2615 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2616 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2618 2009-01-16 Christian Franke <franke@computer.org>
2620 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
2621 (enum grub_ata_timeout_milliseconds): New enum.
2622 (grub_ata_wait_status): Add parameter milliseconds.
2623 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
2624 recovery from timed-out commands.
2625 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
2626 return grub_errno instead of REG_ERROR.
2627 (grub_ata_pio_write): Add parameter milliseconds.
2628 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
2629 Pass milliseconds to grub_ata_wait_status () and
2630 grub_ata_pio_read ().
2631 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
2632 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
2633 grub_ata_wait_status (). Fix IDENTIFY timeout check.
2634 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
2635 It is not suitable for device detection, because DEV bit is ignored,
2636 the command may run too long, and not all devices set the signature
2638 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
2639 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
2640 Fix device selection, DEV bit must be set first to address the registers
2641 of the correct device.
2642 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
2643 grub_ata_pio_read/write ().
2644 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
2645 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
2647 2009-01-13 Carles Pina i Estany <carles@pina.cat>
2649 * util/grub-editenv.c (main): Use fseeko(), not fseek().
2651 2009-01-13 Bean <bean123ch@gmail.com>
2653 * util/grub-mkfont.c (write_font): forget to remove some debug code.
2655 2009-01-13 Bean <bean123ch@gmail.com>
2657 * Makefile.in: (enable_grub_mkfont): New variable.
2658 (freetype_cflags): Likewise.
2659 (freetype_libs): Likewise.
2661 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
2662 (grub_mkfont_SOURCES): New variable.
2663 (grub_mkfont_CFLAGS): Likewise.
2664 (grub_mkfont_LDFLAGS): Likewise.
2666 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
2667 library if `--enable-grub-mkfont' is requested.
2668 (enable_grub_mkfont): New variable.
2669 (freetype_cflags): Likewise.
2670 (freetype_libs): Likewise.
2672 * util/grub-mkfont.c: New file.
2674 2009-01-12 Christian Franke <franke@computer.org>
2676 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
2677 mode check. Fix setting of compat_use[].
2679 2009-01-10 Robert Millan <rmh@aybabtu.com>
2681 Update a few copyright years which we forgot to do in 2008 (only for
2682 files whose changes made in 2008 were copyright-significant)
2684 * Makefile.in: Add 2008 to Copyright line.
2685 * disk/ieee1275/ofdisk.c: Likewise.
2686 * disk/efi/efidisk.c: Likewise.
2687 * kern/dl.c: Likewise.
2688 * kern/sparc64/ieee1275/init.c: Likewise.
2689 * kern/mm.c: Likewise.
2690 * kern/efi/mm.c: Likewise.
2691 * boot/i386/pc/boot.S: Likewise.
2692 * genfslist.sh: Likewise.
2693 * fs/iso9660.c: Likewise.
2694 * fs/hfs.c: Likewise.
2695 * fs/jfs.c: Likewise.
2696 * fs/minix.c: Likewise.
2697 * fs/ufs.c: Likewise.
2698 * gensymlist.sh.in: Likewise.
2699 * genkernsyms.sh.in: Likewise.
2700 * include/grub/misc.h: Likewise.
2701 * include/grub/types.h: Likewise.
2702 * include/grub/symbol.h: Likewise.
2703 * include/grub/elf.h: Likewise.
2704 * include/grub/kernel.h: Likewise.
2705 * include/grub/disk.h: Likewise.
2706 * include/grub/dl.h: Likewise.
2707 * include/grub/i386/linux.h: Likewise.
2708 * include/grub/i386/pc/biosdisk.h: Likewise.
2709 * include/grub/efi/api.h: Likewise.
2710 * include/grub/efi/pe32.h: Likewise.
2711 * include/grub/util/misc.h: Likewise.
2712 * normal/execute.c: Likewise.
2713 * normal/arg.c: Likewise.
2714 * normal/completion.c: Likewise.
2715 * normal/lexer.c: Likewise.
2716 * normal/parser.y: Likewise.
2717 * normal/misc.c: Likewise.
2718 * commands/i386/pc/vbeinfo.c: Likewise.
2719 * commands/hexdump.c: Likewise.
2720 * commands/terminal.c: Likewise.
2721 * commands/ls.c: Likewise.
2722 * commands/help.c: Likewise.
2723 * partmap/pc.c: Likewise.
2724 * loader/efi/chainloader.c: Likewise.
2725 * loader/multiboot_loader.c: Likewise.
2726 * loader/i386/pc/multiboot2.c: Likewise.
2727 * term/efi/console.c: Likewise.
2728 * term/i386/pc/serial.c: Likewise.
2729 * util/lvm.c: Likewise.
2730 * util/console.c: Likewise.
2731 * util/i386/efi/grub-mkimage.c: Likewise.
2732 * util/raid.c: Likewise.
2734 2009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
2736 * commands/videotest.c: Removed include to grub/machine/memory.h.
2738 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
2739 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
2740 (video_mod_SOURCES): Removed.
2741 (video_mod_CFLAGS): Likewise.
2742 (video_mod_LDFLAGS): Likewise.
2743 (gfxterm_mod_SOURCES): Likewise.
2744 (gfxterm_mod_CFLAGS): Likewise.
2745 (gfxterm_mod_LDFLAGS): Likewise.
2746 (videotest_mod_SOURCES): Likewise.
2747 (videotest_mod_CFLAGS): Likewise.
2748 (videotest_mod_LDFLAGS): Likewise.
2749 (bitmap_mod_SOURCES): Likewise.
2750 (bitmap_mod_CFLAGS): Likewise.
2751 (bitmap_mod_LDFLAGS): Likewise.
2752 (tga_mod_SOURCES): Likewise.
2753 (tga_mod_CFLAGS): Likewise.
2754 (tga_mod_LDFLAGS): Likewise.
2755 (jpeg_mod_SOURCES): Likewise.
2756 (jpeg_mod_CFLAGS): Likewise.
2757 (jpeg_mod_LDFLAGS): Likewise.
2758 (png_mod_SOURCES): Likewise.
2759 (png_mod_CFLAGS): Likewise.
2760 (png_mod_LDFLAGS): Likewise.
2762 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
2763 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
2764 (video_mod_SOURCES): Added.
2765 (video_mod_CFLAGS): Likewise.
2766 (video_mod_LDFLAGS): Likewise.
2767 (videotest_mod_SOURCES): Likewise.
2768 (videotest_mod_CFLAGS): Likewise.
2769 (videotest_mod_LDFLAGS): Likewise.
2770 (bitmap_mod_SOURCES): Likewise.
2771 (bitmap_mod_CFLAGS): Likewise.
2772 (bitmap_mod_LDFLAGS): Likewise.
2773 (tga_mod_SOURCES): Likewise.
2774 (tga_mod_CFLAGS): Likewise.
2775 (tga_mod_LDFLAGS): Likewise.
2776 (jpeg_mod_SOURCES): Likewise.
2777 (jpeg_mod_CFLAGS): Likewise.
2778 (jpeg_mod_LDFLAGS): Likewise.
2779 (png_mod_SOURCES): Likewise.
2780 (png_mod_CFLAGS): Likewise.
2781 (png_mod_LDFLAGS): Likewise.
2782 (gfxterm_mod_SOURCES): Likewise.
2783 (gfxterm_mod_CFLAGS): Likewise.
2784 (gfxterm_mod_LDFLAGS): Likewise.
2786 * term/gfxterm.c: Removed include to grub/machine/memory.h,
2787 grub/machine/console.h.
2789 2009-01-04 Jerone Young <jerone@gmail.com>
2791 Make on screen instructions clearer
2793 Based on patch created by Jidanni <jidanni@jidanni.org>
2795 * normal/menu.c: print clearer instructions on the screen
2797 2009-01-02 Colin D Bennett <colin@gibibit.com>
2801 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
2802 build system and fixed gfxterm.c to work with different sized fonts.
2804 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
2806 * configure: Re-generated.
2808 * DISTLIST: Removed font/manager.c.
2810 Added font/font_cmd.c.
2812 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
2815 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
2817 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
2819 * kern/term.c: Changed users of grub_utf8_to_ucs4.
2821 * normal/menu.c: Likewise.
2823 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
2824 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
2826 * include/grub/font.h: Replaced with new file.
2828 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
2829 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
2830 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
2831 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
2832 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
2833 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
2834 fg_red, fg_green, fg_blue, fg_alpha.
2835 (grub_video_adapter): Removed blit_glyph.
2836 (grub_video_blit_glyph): Removed.
2838 * font/manager.c: Removed file.
2840 * font/font.c: New file.
2842 * font/font_cmd.c: Likewise.
2844 * video/video.c (grub_video_blit_glyph): Removed.
2846 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
2847 (grub_video_vbe_map_rgba): Likewise.
2848 (grub_video_vbe_unmap_color_int): Likewise.
2849 (grub_video_vbe_blit_glyph): Removed.
2850 (grub_video_vbe_adapter): Removed blit_glyph.
2852 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
2853 (get_pixel): Likewise.
2854 (set_pixel): Likewise.
2856 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
2858 * term/gfxterm.c: Adapted to new font engine.
2860 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
2862 * term/i386/pc/vga.c: Likewise.
2864 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
2866 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2868 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2870 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2872 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2874 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2876 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2878 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2880 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2882 * util/grub.d/00_header.in: Changed to use new loadfont command.
2884 * util/grub-mkconfig_lib.in: Changed font extension.
2886 2008-12-28 Felix Zielcke <fzielcke@z-51.de>
2888 * util/getroot.c (grub_util_get_grub_dev): Add support for
2889 /dev/md/dNNpNN style partitionable mdraid devices.
2891 2008-12-12 Alex Smith <alex@alex-smith.me.uk>
2893 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
2894 at a time limit of the PXE TFTP API correctly.
2895 (grub_pxefs_close): Likewise.
2897 2008-11-29 Robert Millan <rmh@aybabtu.com>
2899 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
2900 grub_ata_device_initialize() calls.
2902 2008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
2904 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
2906 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
2908 2008-11-28 Robert Millan <rmh@aybabtu.com>
2910 Fix build on powerpc-ieee1275. Based on patch created by
2911 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
2912 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2913 `kern/ieee1275/mmap.c'.
2914 * include/grub/powerpc/ieee1275/memory.h: New file.
2916 Provide grub-install on coreboot.
2917 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
2918 (grub_install_SOURCES): New variable.
2919 * util/i386/pc/grub-install.in: Add a few condition checks to make it
2922 2008-11-25 Felix Zielcke <fzielcke@z-51.de>
2924 * util/grub-fstest.c (grub_term_get_current_input): Change return type
2925 to `grub_term_input_t'.
2926 (grub_term_get_current_output): Change return type to
2927 `grub_term_output_t'.
2929 2008-11-22 Robert Millan <rmh@aybabtu.com>
2931 Fix breakage on coreboot due to declaration mismatch.
2932 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
2933 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
2934 grub_vga_text_cls().
2936 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
2937 comments. Avoid copying one more byte than necessary (just in case).
2939 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
2940 to 0x200000 (avoids trouble with some OFW implementations, and matches
2941 with the one in Yaboot).
2942 Reported by Manoel Abranches
2944 2008-11-20 Robert Millan <rmh@aybabtu.com>
2946 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
2947 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
2949 * util/grub-mkconfig_lib.in (grub_warn): New function.
2950 (convert_system_path_to_grub_path): Use grub_warn() when issuing
2951 warnings, to obtain consistent formatting.
2952 * util/grub.d/00_header.in: Likewise.
2953 * util/update-grub_lib.in: Likewise.
2955 * loader/i386/linux.c (allocate_pages): Fix a warning.
2956 Move comment text to `#error' stanza.
2958 Harmonize ieee1275's grub_available_iterate() with the generic
2959 grub_machine_mmap_iterate() interface (fixes a recently-introduced
2960 build problem on i386-ieee1275):
2961 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
2962 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
2963 parameter `type'. Update all users of this function.
2964 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
2965 `kern/ieee1275/mmap.c'.
2966 * kern/ieee1275/init.c
2967 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
2969 (grub_machine_mmap_iterate): ... this.
2970 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
2971 return type to `grub_err_t'. Update all implementations of this
2973 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
2976 Add `lsmmap' command (lists firmware-provided memory map):
2977 * commands/lsmmap.c: New file.
2978 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
2979 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
2981 * conf/powerpc-ieee1275.rmk: Likewise.
2982 * conf/i386-coreboot.rmk: Likewise.
2983 * conf/i386-ieee1275.rmk: Likewise.
2985 2008-11-19 Robert Millan <rmh@aybabtu.com>
2987 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
2988 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
2989 constraints to initrd allocation (based on code from
2990 loader/i386/pc/linux.c). Without them, initrd was allocated too high
2991 for Linux to find it.
2993 2008-11-14 Robert Millan <rmh@aybabtu.com>
2995 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
2996 order to cope with duplicate slashes.
2998 2008-11-14 Robert Millan <rmh@aybabtu.com>
3000 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3001 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
3002 don't want to mess with lower memory, because it is used in the Linux
3005 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3006 an appropriate place in lower memory, between 0x10000 and 0x90000,
3007 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
3008 is in our heap (probably as a result of it being corrupted during
3009 decompression). Add #error instance with comment to explain why this
3010 loader isn't currently usable on PC/BIOS.
3012 2008-11-14 Robert Millan <rmh@aybabtu.com>
3014 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3015 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3017 2008-11-12 Robert Millan <rmh@aybabtu.com>
3019 Make loader/i386/linux.c buildable on i386-pc (although disabled).
3021 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3022 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3024 * include/grub/i386/pc/memory.h: ... to here.
3026 2008-11-12 Robert Millan <rmh@aybabtu.com>
3028 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3031 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3032 (grub_console_cur_color, grub_console_real_putchar)
3033 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3034 (grub_console_setcolorstate, grub_console_setcolor)
3035 (grub_console_getcolor): Move from here ...
3036 * include/grub/i386/vga_common.h: ... to here (new file).
3038 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3039 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3041 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3042 `<grub/i386/vga_common.h>'.
3044 2008-11-12 Robert Millan <rmh@aybabtu.com>
3046 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3047 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3048 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3050 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3051 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3053 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3054 grub_console_init() with call to grub_vga_text_init().
3055 (grub_machine_fini): Replace call to
3056 grub_console_fini() with call to grub_vga_text_fini() and
3057 grub_at_keyboard_fini().
3059 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3060 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3061 (grub_console_setcolorstate, grub_console_setcolor)
3062 (grub_console_getcolor): New function prototypes.
3064 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3065 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3066 (grub_vga_text_setcursor): Static-ize.
3067 (grub_vga_text_term): New structure.
3068 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3070 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3071 (grub_console_cur_color, grub_console_standard_color)
3072 (grub_console_normal_color, grub_console_highlight_color)
3073 (map_char, grub_console_putchar, grub_console_getcharwidth)
3074 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
3075 (grub_console_getcolor): Move from here ...
3076 * term/i386/vga_common.c: ... to here (same function names).
3078 2008-11-12 Robert Millan <rmh@aybabtu.com>
3080 Use newly-added Multiboot support in coreboot.
3082 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3083 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
3085 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
3086 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
3087 (codestart): Store the MBI in `startup_multiboot_info' when we're
3088 being loaded using Multiboot.
3090 * kern/i386/coreboot/init.c (grub_machine_init): Move
3091 grub_at_keyboard_init() call to beginning of function (useful for
3092 debugging). Call grub_machine_mmap_init() before attempting to use
3093 grub_machine_mmap_iterate().
3094 (grub_lower_mem, grub_upper_mem): Move from here ...
3095 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
3098 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
3101 2008-11-12 Robert Millan <rmh@aybabtu.com>
3103 Fix a regression introduced by the at_keyboard.mod split. Because
3104 some terminals are default on some platforms and non-default on
3105 others, the first terminal being registered determines which is
3106 going to be default.
3108 * kern/term.c (grub_term_register_input): If this is the first
3109 terminal being registered, set it as the current one.
3110 (grub_term_register_output): Likewise.
3112 * term/efi/console.c (grub_console_init): Do not call
3113 grub_term_set_current_output() or grub_term_set_current_input().
3114 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
3115 * term/i386/pc/console.c (grub_console_init): Likewise.
3116 (grub_console_fini): Do not call grub_term_set_current_input()
3117 (but leave grub_term_set_current_output() to restore text mode).
3119 2008-11-10 Robert Millan <rmh@aybabtu.com>
3121 * util/grub.d/00_header.in: Add backward compatibility check for
3122 versions of terminal.mod that don't understand `terminal_input' or
3125 2008-11-09 Robert Millan <rmh@aybabtu.com>
3127 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
3128 `terminal_input' / `terminal_output', not `terminal'.
3130 2008-11-08 Robert Millan <rmh@aybabtu.com>
3132 * Makefile.in (include_DATA): Fix srcdir=. assumption.
3133 (DISTCLEANFILES): Add `build_env.mk'.
3135 2008-11-08 Robert Millan <rmh@aybabtu.com>
3137 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
3138 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3139 members. Update all users.
3140 * util/console.c (grub_ncurses_term): Split in ...
3141 (grub_ncurses_term_input): ... this, and ...
3142 (grub_ncurses_term_output): ... this. Update all users.
3143 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
3145 2008-11-08 Robert Millan <rmh@aybabtu.com>
3147 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
3148 (PKGDATA): Add $(pkgdata_SRCDIR).
3149 (pkglib_BUILDDIR): New variable.
3150 (pkgdata_SRCDIR): New variable.
3151 (build_env.mk): New target.
3152 (include_DATA): New variable.
3153 (install-local): Install $(include_DATA) files in $(includedir).
3155 2008-11-07 Pavel Roskin <proski@gnu.org>
3157 * gendistlist.sh: Use C locale for sorting to ensure consistent
3158 output on all systems.
3160 * util/grub.d/00_header.in: Remove incorrect space before
3163 2008-11-07 Robert Millan <rmh@aybabtu.com>
3165 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
3167 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
3168 * loader/multiboot_loader.c (find_multi_boot2_header): New function
3169 (based on find_multi_boot1_header).
3170 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
3171 using find_multi_boot2_header(), and abort if neither Multiboot or
3172 Multiboot headers were found.
3174 2008-11-07 Robert Millan <rmh@aybabtu.com>
3176 Modularize at_keyboard.mod:
3178 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
3179 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
3180 (at_keyboard_mod_LDFLAGS): New variables.
3182 Actual terminal split:
3184 * include/grub/term.h (struct grub_term): Split in ...
3185 (struct grub_term_input): ... this, and ...
3186 (struct grub_term_output): ... this. Update all users.
3187 (grub_term_set_current): Split in ...
3188 (grub_term_set_current_input): ... this, and ...
3189 (grub_term_set_current_output): ... this.
3190 (grub_term_get_current): Split in ...
3191 (grub_term_get_current_input): ... this, and ...
3192 (grub_term_get_current_output): ... this.
3193 (grub_term_register): Split in ...
3194 (grub_term_register_input): ... this, and ...
3195 (grub_term_register_output): ... this.
3196 (grub_term_unregister): Split in ...
3197 (grub_term_unregister_input): ... this, and ...
3198 (grub_term_unregister_output): ... this.
3199 (grub_term_iterate): Split in ...
3200 (grub_term_iterate_input): ... this, and ...
3201 (grub_term_iterate_output): ... this.
3203 * kern/term.c (grub_term_list): Split in ...
3204 (grub_term_list_input): ... this, and ...
3205 (grub_term_list_output): ... this. Update all users.
3206 (grub_cur_term): Split in ...
3207 (grub_cur_term_input): ... this, and ...
3208 (grub_cur_term_output): ... this. Update all users.
3209 (grub_term_set_current): Split in ...
3210 (grub_term_set_current_input): ... this, and ...
3211 (grub_term_set_current_output): ... this.
3212 (grub_term_get_current): Split in ...
3213 (grub_term_get_current_input): ... this, and ...
3214 (grub_term_get_current_output): ... this.
3215 (grub_term_register): Split in ...
3216 (grub_term_register_input): ... this, and ...
3217 (grub_term_register_output): ... this.
3218 (grub_term_unregister): Split in ...
3219 (grub_term_unregister_input): ... this, and ...
3220 (grub_term_unregister_output): ... this.
3221 (grub_term_iterate): Split in ...
3222 (grub_term_iterate_input): ... this, and ...
3223 (grub_term_iterate_output): ... this.
3225 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3226 a check for input and one for output (and only attempt to get keys
3227 from user when input works).
3229 * util/grub-probe.c (grub_term_get_current): Split in ...
3230 (grub_term_get_current_input): ... this, and ...
3231 (grub_term_get_current_output): ... this.
3232 * util/grub-fstest.c: Likewise.
3233 * util/i386/pc/grub-setup.c: Likewise.
3234 * util/grub-editenv.c: Likewise.
3236 Portability adjustments:
3238 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3239 `term/i386/pc/at_keyboard.c'.
3240 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3241 grub_keyboard_controller_init() (now handled by terminal .init).
3242 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3243 grub_at_keyboard_init().
3244 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3245 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3246 at_keyboard.mod via input terminal interface).
3247 * include/grub/i386/coreboot/console.h: Convert into a stub for
3248 `<grub/i386/pc/console.h>'.
3250 Migrate full terminals to new API:
3252 * term/efi/console.c (grub_console_term): Split into ...
3253 (grub_console_term_input): ... this, and ...
3254 (grub_console_term_output): ... this. Update all users.
3255 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3256 (grub_ofconsole_init): Split into ...
3257 (grub_ofconsole_init_input): ... this, and ...
3258 (grub_ofconsole_init_output): ... this.
3259 (grub_ofconsole_term): Split into ...
3260 (grub_ofconsole_term_input): ... this, and ...
3261 (grub_ofconsole_term_output): ... this. Update all users.
3262 * term/i386/pc/serial.c (grub_serial_term): Split into ...
3263 (grub_serial_term_input): ... this, and ...
3264 (grub_serial_term_output): ... this. Update all users.
3265 * term/i386/pc/console.c (grub_console_term): Split into ...
3266 (grub_console_term_input): ... this, and ...
3267 (grub_console_term_output): ... this. Update all users.
3268 (grub_console_term_input): Only enable it on PC/BIOS platform.
3269 (grub_console_init): Remove grub_keyboard_controller_init() call.
3271 Migrate input terminals to new API:
3273 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3274 `i386' and `i386/pc' to enable build on x86_64 (this driver is
3275 i386-specific anyway).
3276 (grub_console_checkkey): Rename to ...
3277 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
3279 (grub_keyboard_controller_orig): New variable.
3280 (grub_console_getkey): Rename to ...
3281 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
3283 (grub_keyboard_controller_init): Static-ize. Save original
3284 controller value so that it can be restored ...
3285 (grub_keyboard_controller_fini): ... here (new function).
3286 (grub_at_keyboard_term): New structure.
3287 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3290 Migrate output terminals to new API:
3292 * term/i386/pc/vga.c (grub_vga_term): Change type to
3293 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3294 members. Update all users.
3295 * term/gfxterm.c (grub_video_term): Change type to
3296 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3297 members. Update all users.
3298 * include/grub/i386/pc/console.h (grub_console_checkkey)
3299 (grub_console_getkey): Do not export (no longer needed by gfxterm,
3302 Migrate `terminal' command and userland tools to new API:
3304 * commands/terminal.c (grub_cmd_terminal): Split into ...
3305 (grub_cmd_terminal_input): ... this, and ...
3306 (grub_cmd_terminal_output): ... this.
3307 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3308 `terminal_input' and `terminal_output'.
3309 * util/grub.d/00_header.in: Adjust `terminal' calls to new
3310 `terminal_input' / `terminal_output' API.
3311 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3312 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3313 provided ${GRUB_TERMINAL}, convert it).
3315 2008-11-04 Robert Millan <rmh@aybabtu.com>
3317 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
3319 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3321 2008-11-03 Bean <bean123ch@gmail.com>
3323 * kern/elf.c (grub_elf32_load): Revert to previous code.
3324 (grub_elf64_load): Likewise.
3326 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3328 2008-11-01 Robert Millan <rmh@aybabtu.com>
3330 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3331 (TARGET_CPPFLAGS): Likewise.
3332 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3334 2008-11-01 Carles Pina i Estany <carles@pina.cat>
3336 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3338 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
3340 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3341 addition of objects until the code is not going to be able to fail.
3343 2008-10-29 Guillem Jover <guillem.jover@nokia.com>
3345 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3346 (add a missing NULL check, and correct them by moving the pointer
3347 operations after the actual check).
3349 2008-10-29 Robert Millan <rmh@aybabtu.com>
3351 * util/i386/pc/grub-install.in: Handle empty string as output from
3352 make_system_path_relative_to_its_root().
3354 2008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
3356 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3357 circular metadata worst case scenario. If the metadata is circular
3358 then copy the wrap in place.
3359 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3360 project lib/format_text/layout.h
3361 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3363 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
3365 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
3367 2008-10-03 Felix Zielcke <fzielcke@z-51.de>
3369 * util/update-grub_lib.in: Mention filename in warning message.
3371 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
3373 * NEWS: Update for rename of update-grub to grub-mkconfig.
3375 2008-09-29 Felix Zielcke <fzielcke@z-51.de>
3377 * util/update-grub_lib.in: Copy to ...
3378 * util/grub-mkconfig_lib.in: ... this. Update all users.
3379 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
3380 * util/update-grub.in: Rename to ...
3381 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
3382 option. Add `--output' option to allow users to specify the generated
3383 configuration file. Default to stdout.
3384 (update_grub_dir): Rename to ...
3385 (grub_mkconfig_dir): ... this.
3386 (grub_cfg): Default to an empty string.
3387 * conf/common.rmk (update-grub): Rename to ...
3388 (grub-mkconfig): ... this.
3389 (update-grub_lib): Copy to ...
3390 (grub-mkconfig_lib): ... this.
3391 (update-grub_SCRIPTS): Copy to ...
3392 (grub-mkconfig_SCRIPTS): ... this. Update all users.
3393 (update-grub_DATA): Rename to ...
3394 (grub-mkconfig_DATA): ... this.
3396 2008-09-28 Robert Millan <rmh@aybabtu.com>
3398 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3399 to `modified'. Add the real `created' field.
3400 (grub_iso9660_uuid): Use `modified' rather than `created' for
3401 constructing the UUID.
3403 2008-09-28 Felix Zielcke <fzielcke@z-51.de>
3405 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3406 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3408 2008-09-28 Bean <bean123ch@gmail.com>
3410 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3411 Thanks to Christian Franke for finding this bug.
3413 2008-09-25 Robert Millan <rmh@aybabtu.com>
3415 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3416 instances of grub_util_get_disk_name() (see previous commit).
3418 2008-09-25 Robert Millan <rmh@aybabtu.com>
3420 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3421 `util/i386/get_disk_name.c'.
3422 * conf/i386-efi.rmk: Likewise.
3423 * conf/x86_64-efi.rmk: Likewise.
3424 * conf/i386-coreboot.rmk: Likewise.
3425 * conf/i386-ieee1275.rmk: Likewise.
3426 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3427 `util/ieee1275/get_disk_name.c'.
3428 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3429 * util/ieee1275/get_disk_name.c: Remove file.
3430 * util/i386/get_disk_name.c: Remove file.
3431 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3432 "hd%d" for device.map entries, rather than using
3433 grub_util_get_disk_name().
3435 2008-09-24 Carles Pina i Estany <carles@pina.cat>
3437 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3439 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3441 2008-09-24 Carles Pina i Estany <carles@pina.cat>
3443 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3445 (GRUB_TERM_PPAGE): Changed to 0x4900.
3447 2008-09-24 Robert Millan <rmh@aybabtu.com>
3449 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3450 macros (they were i386-pc specific).
3451 * include/grub/sparc64/ieee1275/console.h: Likewise.
3452 * include/grub/efi/console.h: Likewise.
3454 2008-09-22 Bean <bean123ch@gmail.com>
3456 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3457 resident and in attribute list.
3459 * include/grub/ntfs.h (BMP_LEN): Removed.
3461 2008-09-22 Bean <bean123ch@gmail.com>
3463 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
3464 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3466 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3467 error occurs, as grub_disk_open will call grub_disk_close, which will
3468 call p->close (scsi).
3470 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
3472 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3473 (AC_PREREQ): Bumped to 2.59.
3474 (AC_TRY_COMPILE): Replace obsolete macro with ...
3475 (AC_COMPILE_IFELSE): ... this.
3476 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3477 (AC_LINK_IFELSE): ... this.
3479 2008-09-21 Felix Zielcke <fzielcke@z-51.de>
3481 * autogen.sh: Add a call to `gendistlist.sh'.
3483 2008-09-19 Christian Franke <franke@computer.org>
3485 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3486 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3487 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3488 Export __enable_execute_stack() to modules.
3489 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3492 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
3494 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3497 2008-09-09 Felix Zielcke <fzielcke@z-51.de>
3499 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
3500 #include <grub/util/hostdisk.h>.
3502 2008-09-08 Robert Millan <rmh@aybabtu.com>
3504 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3505 segments when their filesz is zero (grub_file_read() interprets
3506 zero-size as "read until EOF", which results in memory corruption).
3507 Use `lowest_segment' rather than 0 for calculating the current
3508 segment load address.
3510 2008-09-08 Robert Millan <rmh@aybabtu.com>
3512 * util/hostdisk.c (open_device): Replace a grub_util_info() call
3513 with grub_dprintf("hostdisk", ...), as it was so verbose that it
3514 clobbered useful information.
3516 2008-09-08 Robert Millan <rmh@aybabtu.com>
3518 * include/grub/util/biosdisk.h: Move to ...
3519 * include/grub/util/hostdisk.h: ... here. Update all users.
3520 * util/biosdisk.c: Move to ...
3521 * util/hostdisk.c: ... here. Update all users.
3523 2008-09-07 Robert Millan <rmh@aybabtu.com>
3525 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3527 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3528 and length can be stored directly in the `mbi->mmap_addr' and
3529 `mbi->mmap_length' struct fields.
3531 2008-09-07 Robert Millan <rmh@aybabtu.com>
3533 * conf/i386.rmk: New file. Provides declaration for building
3535 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3536 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3538 Include `conf/i386.mk'.
3539 * conf/i386-efi.rmk: Likewise.
3540 * conf/x86_64-efi.rmk: Likewise.
3541 * conf/i386-coreboot.rmk: Likewise.
3542 * conf/i386-ieee1275.rmk: Likewise.
3544 2008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
3546 Based on patch created by Colin D Bennett <colin@gibibit.com>.
3547 Adds optimization support for BGR based modes.
3549 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3550 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3551 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3552 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3553 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3554 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3555 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3556 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3557 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3558 (grub_video_i386_vbeblit_index_index): Likewise.
3559 (grub_video_i386_vbeblit_replace_directN): Added.
3560 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3561 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3562 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3563 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3564 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3565 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3566 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3567 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3568 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3569 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3570 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3571 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3572 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3574 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
3575 (grub_video_i386_vbefill_R8G8B8): Likewise.
3576 (grub_video_i386_vbefill_index): Likewise.
3577 (grub_video_i386_vbefill_direct32): Added.
3578 (grub_video_i386_vbefill_direct24): Likewise.
3579 (grub_video_i386_vbefill_direct16): Likewise.
3580 (grub_video_i386_vbefill_direct8): Likewise.
3582 * include/grub/video.h (grub_video_blit_format): Removed
3583 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
3584 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
3585 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
3586 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
3587 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
3589 * video/video.c (grub_video_get_blit_format): Updated to use new
3590 blit formats. Added handling for 16 bit color modes.
3592 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
3594 (common_blitter): Updated to use new blitters.
3596 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
3598 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3599 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3600 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3601 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3602 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3603 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3604 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3605 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3606 (grub_video_i386_vbeblit_index_index): Likewise.
3607 (grub_video_i386_vbeblit_replace_directN): Added.
3608 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3609 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3610 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3611 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3612 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3613 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3614 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3615 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3616 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3617 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3618 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3619 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3620 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3622 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
3623 (grub_video_i386_vbefill_R8G8B8): Likewise.
3624 (grub_video_i386_vbefill_index): Likewise.
3625 (grub_video_i386_vbefill_direct32): Added.
3626 (grub_video_i386_vbefill_direct24): Likewise.
3627 (grub_video_i386_vbefill_direct16): Likewise.
3628 (grub_video_i386_vbefill_direct8): Likewise.
3630 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
3633 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
3636 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
3639 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
3642 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
3644 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
3647 2008-09-06 Felix Zielcke <fzielcke@z-51.de>
3649 * fs/iso9660.c (grub_iso9660_date): New structure.
3650 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
3651 (grub_iso9660_uuid): New function.
3653 2008-09-05 Bean <bean123ch@gmail.com>
3655 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
3657 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
3658 insensitive bit for names in Win32 and Win32 & DOS namespace.
3660 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
3662 * include/grub/types.h (LONG_MAX): Likewise.
3664 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
3666 * util/getroot.c: Include <config.h>.
3667 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
3668 add support for /dev/md/N devices and handle LVM double dash escaping.
3670 2008-09-04 Felix Zielcke <fzielcke@z-51.de>
3672 * config.guess: Update to latest version from config git.
3673 * config.sub: Likewise.
3675 2008-09-03 Robert Millan <rmh@aybabtu.com>
3677 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
3678 `disk->total_sectors'.
3680 2008-09-01 Colin D Bennett <colin@gibibit.com>
3682 * include/grub/normal.h: Fixed incorrect comment for
3683 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
3685 2008-09-01 Colin D Bennett <colin@gibibit.com>
3687 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
3688 values with defines.
3690 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
3691 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
3692 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
3693 (GRUB_VBE_MODEATTR_COLOR): Likewise.
3694 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
3695 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
3696 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
3697 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
3698 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
3699 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
3700 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
3701 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
3702 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
3703 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
3704 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
3705 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
3706 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
3707 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
3708 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
3710 2008-08-31 Robert Millan <rmh@aybabtu.com>
3712 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
3714 (grub_multiboot): Fix a few warnings.
3716 2008-08-31 Robert Millan <rmh@aybabtu.com>
3718 * loader/i386/pc/multiboot.c: Update comment not to say that
3719 boot_device support is unimplemented.
3721 2008-08-31 Robert Millan <rmh@aybabtu.com>
3723 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
3724 or memory map support are unimplemented.
3726 2008-08-31 Colin D Bennett <colin@gibibit.com>
3728 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
3730 2008-08-31 Colin D Bennett <colin@gibibit.com>
3732 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
3733 total video memory in 'vbeinfo' output; show color format details for
3736 2008-08-30 Pavel Roskin <proski@gnu.org>
3738 * util/genmoddep.c: Remove for real this time.
3739 * DISTLIST: Remove util/genmoddep.c.
3741 2008-08-30 Robert Millan <rmh@aybabtu.com>
3743 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
3744 as required by Multiboot spec (it was already 4-byte aligned, but
3747 2008-08-29 Pavel Roskin <proski@gnu.org>
3749 * kern/powerpc/ieee1275/crt0.S: Rename to ...
3750 * kern/powerpc/ieee1275/startup.S: ... this.
3751 * conf/powerpc-ieee1275.rmk: Adjust for the above.
3752 * DISTLIST: Likewise.
3754 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
3755 grub/cpu/kernel.h. Add start label for consistency with other
3756 platforms. Add grub_prefix immediately after start. Add jump
3757 to the code after grub_prefix.
3758 * include/grub/powerpc/kernel.h: Provide valid values for
3759 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
3761 2008-08-29 Bean <bean123ch@gmail.com>
3763 * configure.ac: Change host_os to cygwin for mingw.
3764 (asprintf): New check for function.
3766 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
3767 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
3769 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
3770 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
3771 sync, sleep and grub_util_get_disk_size for mingw.
3773 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
3774 to get size in mingw.
3775 (open_device): Use flag O_BINARY if it's defined.
3776 (find_root_device): Add dummy code for mingw.
3778 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
3779 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
3780 (get_scsi_disk_name): Return 0 for mingw.
3782 * util/hostfs.c: #include <grub/util/misc.h>.
3783 (grub_hostfs_open): Use "rb" flag to open file, use
3784 grub_util_get_disk_size to get disk size for mingw.
3786 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
3787 (asprintf): New function if HAVE_ASPRINTF is not set.
3788 (sync): New function for mingw.
3790 (grub_util_get_disk_size): Likewise.
3792 2008-08-28 Pavel Roskin <proski@gnu.org>
3794 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3797 2008-08-28 Robert Millan <rmh@aybabtu.com>
3799 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
3801 2008-08-28 Robert Millan <rmh@aybabtu.com>
3803 Change find_grub_drive() syntax so it doesn't prevent it from
3804 detecting NULL names as errors.
3806 * util/biosdisk.c (find_grub_drive): Move free slot search code
3808 (find_free_slot): ... to here.
3809 (read_device_map): Use find_free_slot() to search for free slots.
3811 2008-08-27 Marco Gerards <marco@gnu.org>
3813 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
3814 (scsi_mod_SOURCES): New variable.
3815 (scsi_mod_CFLAGS): Likewise
3816 (scsi_mod_LDFLAGS): Likewise.
3818 * disk/scsi.c: New file.
3820 * include/grub/scsi.h: Likewise.
3822 * include/grub/scsicmd.h: Likewise.
3824 * disk/ata.c: Include <grub/scsi.h>.
3825 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
3827 (grub_ata_iterate): Skip ATAPI devices.
3828 (grub_ata_open): Only handle ATAPI devices.
3829 (struct grub_atapi_read): Removed.
3830 (grub_atapi_readsector): Likewise.
3831 (grub_ata_read): No longer handle ATAPI devices.
3832 (grub_ata_write): Likewise.
3833 (grub_atapi_iterate): New function.
3834 (grub_atapi_read): Likewise.
3835 (grub_atapi_write): Likewise.
3836 (grub_atapi_open): Likewise.
3837 (grub_atapi_close): Likewise.
3838 (grub_atapi_dev): New variable.
3839 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
3840 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
3842 * include/grub/disk.h (enum grub_disk_dev_id): Add
3843 `GRUB_DISK_DEVICE_SCSI_ID'.
3845 2008-08-26 Robert Millan <rmh@aybabtu.com>
3847 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
3848 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
3851 2008-08-23 Bean <bean123ch@gmail.com>
3853 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
3854 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3855 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
3856 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
3858 (raid5rec_mod_SOURCES): New macro.
3859 (raid5rec_mod_CFLAGS): Likewise.
3860 (raid5rec_mod_LDFLAGS): Likewise.
3861 (raid6rec_mod_SOURCES): Likewise.
3862 (raid6rec_mod_CFLAGS): Likewise.
3863 (raid6rec_mod_LDFLAGS): Likewise.
3864 (mdraid_mod_SOURCES): Likewise.
3865 (mdraid_mod_CFLAGS): Likewise.
3866 (mdraid_mod_LDFLAGS): Likewise.
3867 (dm_nv_mod_SOURCES): Likewise.
3868 (dm_nv_mod_CFLAGS): Likewise.
3869 (dm_nv_mod_LDFLAGS): Likewise.
3871 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
3872 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3873 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3875 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
3876 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3878 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3880 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3882 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3884 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3886 * disk/raid5_recover.c: New file.
3888 * disk/raid6_recover.c: Likewise.
3890 * disk/mdraid_linux.c: Likewise.
3892 * disk/dmraid_nvidia.c: Likewise.
3894 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
3897 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
3898 calculate the size of raid device.
3899 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
3900 different layout of raid5.
3901 (grub_raid_scan_device): Remove code specific to mdraid.
3902 (grub_raid_list): New variable.
3903 (free_array): New function.
3904 (grub_raid_register): Likewise.
3905 (grub_raid_unregister): Likewise.
3906 (grub_raid_rescan): Likewise.
3907 (GRUB_MOD_INIT): Don't iterate device here.
3908 (GRUB_MOD_FINI): Use free_array to release resource.
3910 * include/grub/raid.h: Remove macro and structure specific to mdraid.
3911 (grub_raid5_recover_func_t): New function variable type.
3912 (grub_raid6_recover_func_t): Likewise.
3913 (grub_raid5_recover_func): New variable.
3914 (grub_raid6_recover_func): Likewise.
3915 (grub_raid_register): New function.
3916 (grub_raid_unregister): Likewise.
3917 (grub_raid_rescan): Likewise.
3918 (grub_raid_block_xor): Likewise.
3920 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
3921 (CMD_CRC): New macro.
3923 (read_file): Handle device as well as file.
3924 (cmd_crc): New function.
3925 (fstest): Handle multiple disks.
3926 (options): Remove part, raw and long, add root and diskcount.
3927 (usage): Add crc, remove -p, -r, -l, add -r and -c.
3928 (main): Find the first non option entry and ignore subsequent options,
3929 add handling for the new options, support multiple disks.
3931 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
3933 2008-08-23 Bean <bean123ch@gmail.com>
3935 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
3937 * genfslist.sh: Ignore kernel.mod.
3939 * genpartmaplist.sh: Likewise.
3941 2008-08-23 Robert Millan <rmh@aybabtu.com>
3943 * util/getroot.c (find_root_device): Skip anything that starts with
3944 a dot, not just directories. This avoids things like /dev/.tmp.md0.
3946 2008-08-22 Felix Zielcke <fzielcke@z-51.de>
3948 * util/update-grub.in (GRUB_GFXMODE): Export variable.
3949 * util/grub.d/00_header.in: Allow the administrator to change default
3950 gfxmode via ${GRUB_GFXMODE}.
3952 2008-08-21 Felix Zielcke <fzielcke@z-51.de>
3954 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
3956 2008-08-21 Robert Millan <rmh@aybabtu.com>
3958 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
3960 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
3961 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
3963 2008-08-20 Carles Pina i Estany <carles@pina.cat>
3965 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
3966 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
3968 2008-08-19 Robert Millan <rmh@aybabtu.com>
3970 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
3971 (struct grub_virtual_screen): Remove `cursor_color'.
3972 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
3974 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
3976 2008-08-18 Robert Millan <rmh@aybabtu.com>
3978 Unify (identical) linux_normal.c files.
3979 * loader/i386/efi/linux_normal.c: Move from here ...
3980 * loader/linux_normal.c: ... to here. Update all users.
3981 * loader/i386/pc/linux_normal.c: Delete. Update all users.
3982 * loader/i386/ieee1275/linux_normal.c: Likewise.
3984 2008-08-18 Robert Millan <rmh@aybabtu.com>
3986 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
3987 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
3988 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
3989 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
3990 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
3992 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
3993 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
3994 (GRUB_LINUX_CL_END_OFFSET): ... to here.
3995 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
3996 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
3997 (GRUB_EFI_CL_END_OFFSET): Rename to ...
3998 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
3999 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4000 Initialize `params->video_cursor_x' and `params->video_cursor_y'
4001 portably using grub_getxy().
4002 Replace `-EFI' with `-bzImage' in boot message.
4004 2008-08-17 Robert Millan <rmh@aybabtu.com>
4006 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4008 2008-08-17 Robert Millan <rmh@aybabtu.com>
4010 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4012 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4013 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4014 (grub_machine_mmap_iterate): New function declaration.
4015 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4017 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4020 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4021 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4022 Move e820 parsing from here ...
4023 * kern/i386/pc/mmap.c: New file.
4024 (grub_machine_mmap_iterate): ... to here.
4026 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4027 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4028 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
4029 (grub_available_iterate): Redeclare to return `void', and redeclare
4030 its hook to use grub_uint64_t as addr and size parameters, and rename
4032 (grub_machine_mmap_iterate): ... this. Update all users.
4034 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4035 to make it more readable. Rename to ...
4036 (grub_machine_mmap_iterate): ... this.
4038 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4039 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4040 (grub_multiboot): Allocate an extra region after the payload, and fill
4041 it with a Multiboot memory map. Adjust a.out loader to calculate size
4042 with the extra space.
4043 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4044 with the extra space.
4046 2008-08-17 Carles Pina i Estany <carles@pina.cat>
4048 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4050 2008-08-17 Felix Zielcke <fzielcke@z-51.de>
4052 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4053 mdate-sh to the list `find' searches for.
4054 * DISTLIST: Regenerated.
4056 2008-08-16 Felix Zielcke <fzielcke@z-51.de>
4058 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4059 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4060 genmoddep.awk, gensymlist.sh.in.
4061 (DISTDIRS): Add bus, docs, hook, lib.
4062 * DISTLIST: Regenerated.
4063 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4065 2008-08-16 Robert Millan <rmh@aybabtu.com>
4067 * disk/raid.c (grub_raid_init): Handle/report errors set by
4068 grub_device_iterate().
4069 * disk/lvm.c (grub_lvm_init): Likewise.
4071 2008-08-15 Bean <bean123ch@gmail.com>
4073 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4075 (datetime_mod_SOURCES): New macro.
4076 (datetime_mod_CFLAGS): Likewise.
4077 (datetime_mod_LDFLAGS): Likewise.
4078 (date_mod_SOURCES): Likewise.
4079 (date_mod_CFLAGS): Likewise.
4080 (date_mod_LDFLAGS): Likewise.
4081 (datehook_mod_SOURCES): Likewise.
4082 (datehook_mod_CFLAGS): Likewise.
4083 (datehook_mod_LDFLAGS): Likewise.
4085 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4087 (datetime_mod_SOURCES): New macro.
4088 (datetime_mod_CFLAGS): Likewise.
4089 (datetime_mod_LDFLAGS): Likewise.
4090 (date_mod_SOURCES): Likewise.
4091 (date_mod_CFLAGS): Likewise.
4092 (date_mod_LDFLAGS): Likewise.
4093 (datehook_mod_SOURCES): Likewise.
4094 (datehook_mod_CFLAGS): Likewise.
4095 (datehook_mod_LDFLAGS): Likewise.
4097 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4099 (datetime_mod_SOURCES): New macro.
4100 (datetime_mod_CFLAGS): Likewise.
4101 (datetime_mod_LDFLAGS): Likewise.
4102 (date_mod_SOURCES): Likewise.
4103 (date_mod_CFLAGS): Likewise.
4104 (date_mod_LDFLAGS): Likewise.
4105 (datehook_mod_SOURCES): Likewise.
4106 (datehook_mod_CFLAGS): Likewise.
4107 (datehook_mod_LDFLAGS): Likewise.
4109 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4111 (datetime_mod_SOURCES): New macro.
4112 (datetime_mod_CFLAGS): Likewise.
4113 (datetime_mod_LDFLAGS): Likewise.
4114 (date_mod_SOURCES): Likewise.
4115 (date_mod_CFLAGS): Likewise.
4116 (date_mod_LDFLAGS): Likewise.
4117 (datehook_mod_SOURCES): Likewise.
4118 (datehook_mod_CFLAGS): Likewise.
4119 (datehook_mod_LDFLAGS): Likewise.
4121 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
4123 (datetime_mod_SOURCES): New macro.
4124 (datetime_mod_CFLAGS): Likewise.
4125 (datetime_mod_LDFLAGS): Likewise.
4126 (date_mod_SOURCES): Likewise.
4127 (date_mod_CFLAGS): Likewise.
4128 (date_mod_LDFLAGS): Likewise.
4129 (datehook_mod_SOURCES): Likewise.
4130 (datehook_mod_CFLAGS): Likewise.
4131 (datehook_mod_LDFLAGS): Likewise.
4133 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
4135 * commands/date.c: New file.
4137 * hook/datehook.c: Likewise.
4139 * include/grub/lib/datetime.h: Likewise.
4141 * include/grub/i386/cmos.h: Likewise.
4143 * lib/datetime.c: Likewise.
4145 * lib/i386/datetime.c: Likewise.
4147 * lib/efi/datetime.c: Likewise.
4149 2008-08-14 Robert Millan <rmh@aybabtu.com>
4151 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
4152 (grub_mkelfimage_SOURCES): New variable.
4153 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
4155 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
4156 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
4157 * conf/powerpc-ieee1275.rmk: Likewise.
4158 * conf/i386-ieee1275.rmk: Likewise.
4160 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
4161 * kern/i386/coreboot/init.c: Likewise.
4163 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
4164 with `<grub/cpu/kernel.h>'.
4165 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
4167 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
4168 * kern/i386/coreboot/startup.S: Likewise.
4170 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
4171 (GRUB_MOD_GAP): Remove.
4172 * include/grub/powerpc/kernel.h: New file.
4173 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
4174 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4175 * include/grub/i386/kernel.h: New file.
4176 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
4177 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
4178 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
4180 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
4182 Use --directory when invoking grub_mkimage.
4184 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
4185 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
4186 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
4187 and GRUB_KERNEL_CPU_PREFIX.
4189 2008-08-14 Felix Zielcke <fzielcke@z-51.de>
4191 * include/grub/err.h (grub_err_printf): New function prototype.
4192 * util/misc.c (grub_err_printf): New function.
4193 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
4195 * kern/err.c (grub_print_error): Use grub_err_printf.
4197 2008-08-13 Robert Millan <rmh@aybabtu.com>
4199 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
4201 2008-08-13 Robert Millan <rmh@aybabtu.com>
4203 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
4206 2008-08-12 Robert Millan <rmh@aybabtu.com>
4208 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4209 of the relocation code from here ...
4210 (grub_multiboot): ... to here.
4211 (forward_relocator, backward_relocator): Move from here ...
4212 * kern/i386/loader.S (grub_multiboot_forward_relocator)
4213 (grub_multiboot_backward_relocator): ... to here.
4214 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
4215 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
4216 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4217 (grub_multiboot_forward_relocator_end)
4218 (grub_multiboot_backward_relocator)
4219 (grub_multiboot_backward_relocator_end): New variables.
4221 2008-08-12 Bean <bean123ch@gmail.com>
4223 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4225 2008-08-11 Robert Millan <rmh@aybabtu.com>
4227 * kern/i386/linuxbios/startup.S: Move from here ...
4228 * kern/i386/coreboot/startup.S: ... to here.
4230 * kern/i386/linuxbios/init.c: Move from here ...
4231 * kern/i386/coreboot/init.c: ... to here.
4233 * kern/i386/linuxbios/table.c: Move from here ...
4234 * kern/i386/coreboot/mmap.c: ... to here.
4236 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4238 2008-08-11 Robert Millan <rmh@aybabtu.com>
4240 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4241 errors. Leave it to the upper layer to handle them.
4243 2008-08-09 Christian Franke <franke@computer.org>
4245 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4246 * conf/common.rmk: Install `grub-pe2elf' only if requested.
4247 Install `grub.d/10_windows' only on Cygwin.
4248 * configure.ac: Add subst of `target_os'.
4249 Check `target_os' also before setting TARGET_OBJ2ELF.
4250 Add `--enable-grub-pe2elf'.
4252 2008-08-08 Robert Millan <rmh@aybabtu.com>
4254 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4255 (grub_last_time): Change type to grub_uint64_t.
4256 (grub_disk_open): Migrate code from to using grub_get_time_ms().
4257 (grub_disk_close): Likewise.
4259 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4260 (run_menu): Migrate code from to using grub_get_time_ms().
4262 * util/misc.c (grub_get_time_ms): New function.
4264 2008-08-08 Marco Gerards <marco@gnu.org>
4266 * disk/ata.c (grub_ata_regget): Change return type to
4268 (grub_ata_regget2): Likewise.
4269 (grub_ata_wait_status): New function.
4270 (grub_ata_wait_busy): Removed function, updated all users to use
4271 `grub_ata_wait_status'.
4272 (grub_ata_wait_drq): Likewise.
4273 (grub_ata_cmd): New function.
4274 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
4276 (grub_ata_pio_write): Add error handling.
4277 (grub_atapi_identify): Likewise.
4278 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4280 (grub_ata_identify): Use `grub_ata_cmd' and improve error
4281 handling. Actually use the detected registers. Reorder the
4282 detection logic such that it is easier to read.
4283 (grub_ata_pciinit): Do not assign the same ID to each controller.
4284 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4286 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4288 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4290 2008-08-08 Marco Gerards <marco@gnu.org>
4294 2008-08-07 Bean <bean123ch@gmail.com>
4296 * include/grub/x86_64/pci.h: New file.
4298 2008-08-07 Christian Franke <franke@computer.org>
4300 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4301 (TIMER2_GATE): Likewise.
4302 (grub_pit_wait): Add enable/disable of the timer2 gate
4303 bit of port 0x61. This fixes a possible infinite loop.
4305 2008-08-07 Bean <bean123ch@gmail.com>
4307 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4308 kern/i386/tsc.c and kern/i386/pit.c.
4310 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4313 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4316 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4318 2008-08-07 Bean <bean123ch@gmail.com>
4320 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4322 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4324 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4325 multiple inclusion. Add #include <grub/types.h>.
4327 2008-08-06 Christian Franke <franke@computer.org>
4329 * conf/common.rmk: Build and install `10_windows'.
4330 * util/grub.d/10_windows.in: New script.
4332 2008-08-06 Pavel Roskin <proski@gnu.org>
4334 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4336 2008-08-06 Robert Millan <rmh@aybabtu.com>
4338 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4339 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4341 2008-08-06 Bean <bean123ch@gmail.com>
4343 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4344 (grub_pxefs_fs_int): Remove dummy definition.
4345 (grub_pxefs_open): Use data->block_size to store the current block
4347 (grub_pxefs_read): Use block size stored in data->block_size. As the
4348 value of grub_pxe_blksize can be changed after the file is opened.
4350 2008-08-06 Bean <bean123ch@gmail.com>
4352 * fs/i386/pc/pxe.c (curr_file): new variable.
4353 (grub_pxefs_open): Simply the handling of pxe file system. Don't
4354 require the dummy internal file system anymore.
4355 (grub_pxefs_read): Removed.
4356 (grub_pxefs_close): Likewise.
4357 (grub_pxefs_fs_int): Likewise.
4358 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4359 connection when we switch file.
4360 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4362 2008-08-06 Robert Millan <rmh@aybabtu.com>
4364 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4366 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4367 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4369 * kern/i386/halt.c: New file.
4370 * kern/i386/reboot.c: Likewise.
4371 * include/grub/i386/reboot.h: Likewise.
4372 * include/grub/i386/halt.h: Likewise.
4374 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4375 Include `<grub/cpu/halt.h>'.
4376 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4377 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4379 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4380 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4381 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4382 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4383 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4384 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4386 * include/grub/i386/at_keyboard.h: ... to here.
4388 2008-08-05 Robert Millan <rmh@aybabtu.com>
4390 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4391 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4392 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4393 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4394 `kern/generic/millisleep.c'.
4396 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4397 instead of grub_get_rtc().
4398 (grub_tsc_init): Initialize `tsc_boot_time'.
4400 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4401 (grub_machine_init): Use grub_tsc_init() rather than
4402 installing an RTC-based handler via grub_install_get_time_ms().
4404 * kern/i386/pit.c: New file.
4405 * include/grub/i386/pit.h: Likewise.
4407 2008-08-05 Bean <bean123ch@gmail.com>
4409 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4411 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4412 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4413 (pxe_mod_SOURCES): New macro.
4414 (pxe_mod_CFLAGS): Likewise.
4415 (pxe_mod_LDFLAGS): Likewise.
4416 (pxecmd_mod_SOURCES): Likewise.
4417 (pxecmd_mod_CFLAGS): Likewise.
4418 (pxecmd_mod_LDFLAGS): Likewise.
4420 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4421 (grub_pxe_call): Likewise.
4423 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4425 * commands/i386/pc/pxecmd.c: New file.
4427 * fs/i386/pc/pxe.c: Likewise.
4429 * include/grub/i386/pc/pxe.h: Likewise.
4431 2008-08-05 Bean <bean123ch@gmail.com>
4433 * util/console.c (grub_console_cur_color): New variable.
4434 (grub_console_standard_color): Likewise.
4435 (grub_console_normal_color): Likewise.
4436 (grub_console_highlight_color): Likewise.
4437 (color_map): Likewise.
4438 (use_color): Likewise.
4439 (NUM_COLORS): New macro.
4440 (grub_ncurses_setcolorstate): Handle color properly.
4441 (grub_ncurses_setcolor): Don't change color here, just remember the
4442 settings, color will be set in grub_ncurses_setcolorstate.
4443 (grub_ncurses_getcolor): New function.
4444 (grub_ncurses_init): Initialize color pairs.
4445 (grub_ncurses_term): New member grub_ncurses_getcolor.
4447 2008-08-05 Colin D Bennett <colin@gibibit.com>
4449 High resolution timer support. Implemented for x86 CPUs using TSC.
4450 Extracted generic grub_millisleep() so it's linked in only as needed.
4451 This requires a Pentium compatible CPU; if the RDTSC instruction is
4452 not supported, then it falls back on the generic grub_get_time_ms()
4453 implementation that uses the machine's RTC.
4455 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4456 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4457 `kern/generic/millisleep.c'.
4459 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4460 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4462 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4463 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4465 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4467 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4468 `kern/generic/millisleep.c'.
4470 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4472 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4474 * kern/generic/rtc_get_time_ms.c: New file.
4476 * kern/generic/millisleep.c: New file.
4478 * kern/misc.c: Don't include
4479 <kern/time.h> anymore.
4480 (grub_millisleep_generic): Removed.
4482 * commands/sleep.c (grub_interruptible_millisleep): Uses
4483 grub_get_time_ms() instead of grub_get_rtc().
4485 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
4487 (grub_cpu_is_cpuid_supported): New inline function.
4488 (grub_cpu_is_tsc_supported): New inline function.
4489 (grub_tsc_init): New function prototype.
4490 (grub_tsc_get_time_ms): New function prototype.
4492 * kern/i386/tsc.c (grub_get_time_ms): New file.
4494 * include/grub/time.h: Include <grub/types.h.
4495 (grub_millisleep_generic): Removed.
4496 (grub_get_time_ms): New prototype.
4497 (grub_install_get_time_ms): New prototype.
4498 (grub_rtc_get_time_ms): New prototype.
4500 * kern/time.c (grub_get_time_ms): New function.
4501 (grub_install_get_time_ms): New function.
4503 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
4504 <grub/time.h> anymore.
4505 (grub_millisleep): Removed.
4506 (grub_machine_init): Call grub_tsc_init.
4508 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4509 get_time_ms() implementation.
4511 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4512 (ieee1275_get_time_ms): New function.
4513 (grub_machine_init): Install get_time_ms() implementation.
4515 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4516 (grub_machine_init): Call grub_tsc_init().
4517 (grub_millisleep): Removed.
4519 * kern/ieee1275/init.c (grub_millisleep): Removed.
4520 (grub_machine_init): Install ieee1275_get_time_ms()
4522 (ieee1275_get_time_ms): New function.
4523 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4526 2008-08-05 Marco Gerards <marco@gnu.org>
4528 * disk/ata.c: Include <grub/pci.h>.
4529 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4530 (grub_ata_initialize): Rewritten.
4531 (grub_ata_device_initialize): New function.
4533 2008-08-04 Pavel Roskin <proski@gnu.org>
4535 * kern/main.c: Include grub/mm.h.
4537 2008-08-04 Robert Millan <rmh@aybabtu.com>
4539 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4540 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4541 corruption problem).
4543 2008-08-04 Robert Millan <rmh@aybabtu.com>
4545 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4546 warnings introduced in my last commit.
4548 2008-08-03 Robert Millan <rmh@aybabtu.com>
4550 Make PCI available on all i386 architectures.
4552 * include/grub/i386/pc/pci.h: Move from here ...
4553 * include/grub/i386/pci.h: ... to here.
4555 * include/grub/i386/pc/pci.h: Remove.
4556 * include/grub/i386/efi/pci.h: Remove.
4557 * include/grub/x86_64/efi/pci.h: Remove.
4559 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4562 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4563 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
4564 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
4566 * conf/i386-ieee1275.rmk: Likewise.
4568 2008-08-03 Robert Millan <rmh@aybabtu.com>
4570 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4571 (grub_console_setcursor): Make it possible to set cursor off.
4573 2008-08-03 Robert Millan <rmh@aybabtu.com>
4575 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
4576 of modules instead of assuming which platform provides what.
4577 * util/update-grub.in: Likewise.
4579 2008-08-03 Robert Millan <rmh@aybabtu.com>
4581 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4582 instead of `grub_install_dos_part' to determine whether a drive needs
4583 to be prepended to prefix (`grub_install_dos_part' is not reliable,
4584 because it can be overridden when loading GRUB via Multiboot).
4586 2008-08-02 Robert Millan <rmh@aybabtu.com>
4588 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
4590 2008-08-02 Robert Millan <rmh@aybabtu.com>
4592 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
4593 of informational grub_dprintf() calls.
4595 2008-08-02 Robert Millan <rmh@aybabtu.com>
4597 * disk/memdisk.c (memdisk_size): Don't initialize.
4598 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
4600 * include/grub/i386/pc/kernel.h
4601 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4602 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4603 (grub_memdisk_image_size, grub_arch_memdisk_addr)
4604 (grub_arch_memdisk_size): Remove.
4606 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4607 field (was only used to transfer a constant). Add `type' field to
4608 support multiple module types.
4609 (grub_module_iterate): New function.
4611 * kern/device.c (grub_device_open): Do not hide error messages
4612 when grub_disk_open() fails. Use grub_print_error() instead.
4614 * kern/i386/pc/init.c (grub_arch_modules_addr)
4615 (grub_arch_memdisk_size): Remove functions.
4616 (grub_arch_modules_addr): Return the module address in high memory
4617 (now that it isn't copied anymore).
4619 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
4620 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
4621 decompression routine (grub_total_module_size already includes that
4622 now). Don't copy modules back to low memory.
4624 * kern/main.c: Include `<grub/mm.h>'.
4625 (grub_load_modules): Split out (and use) ...
4626 (grub_module_iterate): ... this function, which iterates through
4627 module objects and runs a hook.
4628 Comment out grub_mm_init_region() call, as it would cause non-ELF
4629 modules to be overwritten.
4631 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
4632 the memdisk image in its own region, make it part of the module list.
4633 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
4634 (main): Parse --memdisk|-m option, and pass user-provided path as
4635 parameter to generate_image().
4636 (add_segments): Pass `memdisk_path' down to load_modules().
4637 (load_modules): Embed memdisk image in module section when requested.
4638 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
4639 `header.type' instead of `header.offset'.
4641 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
4642 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
4643 (memdisk_mod_LDFLAGS): New variables.
4644 * conf/i386-coreboot.rmk: Likewise.
4645 * conf/i386-ieee1275.rmk: Likewise.
4647 2008-08-02 Robert Millan <rmh@aybabtu.com>
4649 * loader/i386/pc/multiboot.c (playground, forward_relocator)
4650 (backward_relocator): New variables. Used to allocate and relocate
4651 the payload, respectively.
4652 (grub_multiboot_load_elf32): Load into heap instead of requested
4653 address, install the appropriate relocator code in each bound of
4654 the payload, and set the entry point such that
4655 grub_multiboot_real_boot() will jump to one of them.
4657 * kern/i386/loader.S (grub_multiboot_payload_size)
4658 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4659 (grub_multiboot_payload_entry_offset): New variables.
4660 (grub_multiboot_real_boot): Set cpu context to what the relocator
4661 expects, and jump to the relocator instead of the payload.
4663 * include/grub/i386/loader.h (grub_multiboot_payload_size)
4664 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4665 (grub_multiboot_payload_entry_offset): Export.
4667 2008-08-01 Bean <bean123ch@gmail.com>
4669 * normal/menu_entry.c (editor_getline): Don't return the original
4670 string as result, as it will be released by lexer once it has done
4673 2008-08-01 Robert Millan <rmh@aybabtu.com>
4675 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
4676 within menuentries, not before them.
4677 util/grub.d/10_hurd.in: Likewise.
4679 2008-08-01 Bean <bean123ch@gmail.com>
4681 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
4682 (bufio_mod_SOURCES): New macro.
4683 (bufio_mod_CFLAGS): Likewise.
4684 (bufio_mod_LDFLAGS): Likewise.
4686 * include/grub/bufio.h: New file.
4688 * io/bufio.c: Likewise.
4690 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
4691 (grub_video_reader_png): Use grub_buffile_open to open file.
4693 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
4694 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
4696 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
4697 (grub_video_reader_tga): Use grub_buffile_open to open file.
4699 * font/manager.c: Include <grub/bufio.h>.
4700 (add_font): Use grub_buffile_open to open file.
4702 2008-07-31 Robert Millan <rmh@aybabtu.com>
4704 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
4705 ELF segments, use a macro for arbitrarily accessing any of them instead
4706 of preparing a pointer that allows access to one at a time.
4707 (grub_multiboot_load_elf64): Likewise.
4709 2008-07-31 Bean <bean123ch@gmail.com>
4711 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
4712 GRUB_KERNEL_MACHINE_DATA_END.
4714 2008-07-30 Robert Millan <rmh@aybabtu.com>
4716 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
4717 Increase from 0x50 to 0x60.
4718 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
4719 use UUIDs to identify the root drive for them. If that's not
4721 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
4722 check, for cross-disk installs.
4724 2008-07-30 Robert Millan <rmh@aybabtu.com>
4726 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
4727 is non-empty, use it to set the `prefix' environment variable instead
4728 of the usual approach.
4729 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
4730 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
4731 environment variable instead of dummy make_install_device().
4733 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
4734 (start): Insert a data section, with `grub_prefix' variable.
4735 * kern/i386/linuxbios/startup.S: Likewise.
4737 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
4738 New variable reference.
4739 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
4740 New macro. Defines offset of `grub_prefix' within startup.S (relative
4742 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
4743 section within startup.S (relative to `start').
4744 * include/grub/i386/coreboot/kernel.h: Likewise.
4746 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
4747 Overwrite grub_prefix with its contents, at the beginning of the
4749 (main): Understand -p|--prefix.
4751 2008-07-30 Robert Millan <rmh@aybabtu.com>
4753 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
4755 2008-07-30 Robert Millan <rmh@aybabtu.com>
4757 * term/i386/pc/vga_text.c (grub_console_cls): Use
4758 grub_console_gotoxy() to go back to beginning of the screen.
4759 Found by Patrick Georgi <patrick.georgi@coresystems.de>
4761 2008-07-29 Christian Franke <franke@computer.org>
4763 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4764 Add conversion of emulated mount points on Cygwin.
4766 2008-07-29 Christian Franke <franke@computer.org>
4768 * util/update-grub.in: Add a check for admin
4770 Remove old `grub.cfg.new' before creation.
4771 Add `-f' to `mv' to handle the different filesystem
4772 semantics of Windows.
4774 2008-07-29 Bean <bean123ch@gmail.com>
4776 * normal/main.c (get_line): Fix buffer overflow bug.
4778 2008-07-28 Robert Millan <rmh@aybabtu.com>
4780 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
4781 (struct grub_apple_header): New struct. Describes the layout of
4783 (apple_partition_map_iterate): Check the header magic as well as the
4784 partition magic (which was already being checked).
4786 2008-07-28 Pavel Roskin <proski@gnu.org>
4788 * genmk.rb: Add a warning to the beginning of the output that
4789 it's a generated file and should not be edited.
4791 2008-07-28 Robert Millan <rmh@aybabtu.com>
4793 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4794 with the same number are found, just use issue a warning with
4795 grub_dprintf(), as this error has been reported to be non-fatal.
4797 2008-07-27 Robert Millan <rmh@aybabtu.com>
4799 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
4802 2008-07-27 Bean <bean123ch@gmail.com>
4804 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
4805 (grub_fat_find_dir): Ignore case when comparing filename.
4807 2008-07-27 Bean <bean123ch@gmail.com>
4809 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
4810 smallino, as it's more descriptive, and i8count can be confused with
4811 the other field count.
4812 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
4815 2008-07-27 Bean <bean123ch@gmail.com>
4817 * commands/crc.c: New file.
4819 * lib/crc.c: Likewise.
4821 * include/grub/lib/crc.h: Likewise.
4823 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
4825 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
4826 (hexdump): Move this function to ...
4828 * lib/hexdump.c: ... here.
4830 * include/grub/hexdump.h: Renamed to ...
4832 * include/grub/lib/hexdump.h: ... this.
4834 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
4836 * util/grub-editenv.c: Likewise.
4838 * include/envblk.h: Renamed to ...
4840 * include/lib/envblk.h: ... this.
4842 * util/envblk.c: Renamed to ...
4844 * lib/envblk.c: ... this.
4846 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
4848 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
4849 (pkglib_MODULES): Add crc.mod.
4850 (hexdump_mod_SOURCES): Add lib/hexdump.c.
4851 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
4852 (crc_mod_SOURCES): New macro.
4853 (crc_mod_CFLAGS): Likewise.
4854 (crc_mod_LDFLAGS): Likewise.
4856 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
4858 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4860 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4862 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4864 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4866 2008-07-27 Felix Zielcke <fzielcke@z-51.de>
4868 * commands/help.c: Include <grub/term.h>.
4869 (TERM_WIDTH): Removed. Updated all users.
4871 2008-07-27 Pavel Roskin <proski@gnu.org>
4873 * util/getroot.c (find_root_device): Rephrase a comment to avoid
4874 spurious warnings about a comment within a comment.
4876 2008-07-25 Robert Millan <rmh@aybabtu.com>
4878 * util/getroot.c (find_root_device): Skip devices that match
4879 /dev/dm-[0-9]. This lets the real device be found for any type of
4880 abstraction (LVM, EVMS, RAID..).
4881 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
4882 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
4883 device is found first, find_root_device() will now skip it.
4885 2008-07-24 Pavel Roskin <proski@gnu.org>
4887 * include/grub/types.h: Use __builtin_bswap32() and
4888 __builtin_bswap64() with gcc 4.3 and newer.
4890 2008-07-24 Christian Franke <franke@computer.org>
4892 * util/i386/pc/grub-install.in: If `--debug' is specified,
4893 pass `--verbose' to grub-setup.
4894 Abort script if make_system_path_relative_to_its_root() fails.
4896 2008-07-24 Bean <bean123ch@gmail.com>
4898 * configure.ac: Fixed a bug caused by the previous cygwin patch,
4899 variable `target_platform' should be `platform'.
4901 2008-07-24 Bean <bean123ch@gmail.com>
4903 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
4904 (grub_png_init_fixed_block): New function.
4905 (grub_png_decode_image_data): Handle fixed huffman code compression.
4907 2008-07-24 Bean <bean123ch@gmail.com>
4909 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
4910 (grub_pe2elf_SOURCES): New macro.
4911 (CLEANFILES): Add grub-pe2elf.
4913 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
4914 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
4915 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
4916 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
4917 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
4918 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
4919 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
4920 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
4921 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
4922 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
4923 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
4924 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
4925 (GRUB_PE32_DT_FUNCTION): Likewise.
4926 (GRUB_PE32_REL_I386_DIR32): Likewise.
4927 (GRUB_PE32_REL_I386_REL32): Likewise.
4928 (grub_pe32_symbol): New structure.
4929 (grub_pe32_reloc): Likewise.
4931 * util/grub-pe2elf.c: New file.
4933 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
4934 start symbol in non pc platform.
4936 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
4938 The following patches are from Christian Franke.
4940 * include/grub/dl.h: Remove .previous, gas supports this only
4943 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
4944 Remove .type, gas supports this only for ELF format.
4946 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
4947 nullbytes in symbol table. This fixes an infinite loop if table is
4950 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
4951 TARGET_IMG_LDFLAGS and EXEEXT.
4953 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
4954 TARGET_IMG_LDFLAGS_AC.
4955 (grub_CHECK_STACK_ARG_PROBE): New function.
4957 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
4959 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
4961 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
4962 to set TARGET_IMG_LD* accordingly.
4963 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
4964 Add call to grub_CHECK_STACK_ARG_PROBE.
4965 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
4967 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
4969 * genmk.rb: Add EXEEXT to CLEANFILES.
4971 2008-07-23 Robert Millan <rmh@aybabtu.com>
4973 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
4974 define the codes for arrows and lines used for the menu).
4975 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
4978 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
4979 fonts, because the latter are too slow.
4981 2008-07-21 Bean <bean123ch@gmail.com>
4983 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
4984 a20. Run keyboard test last, as it will cause macbook to halt.
4986 2008-07-18 Pavel Roskin <proski@gnu.org>
4988 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
4989 load foreign architecture modules correctly anyway. Keep
4990 support for loading host architecture modules, whether we
4991 compile them or not.
4993 2008-07-17 Pavel Roskin <proski@gnu.org>
4995 * configure.ac: Use -m32 or -m64 regardless of whether we had to
4996 change target_cpu. The compiler default can mismatch target_cpu
4999 * disk/efi/efidisk.c: Fix format warnings on x86_64.
5000 * kern/efi/efi.c: Likewise.
5002 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
5003 target compiler is functional.
5004 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5007 * configure.ac: Default to efi platform for x86_64-apple. Allow
5008 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
5009 adjustments from the rest, only do them if target is not
5010 explicitly given. Merge other adjustments with the final sanity
5011 check. Remove an extraneous check for supported CPU. Be
5012 specific which CPU and which platform is not supported.
5014 * configure.ac: Default to pc platform for x86_64.
5016 2008-07-17 Robert Millan <rmh@aybabtu.com>
5018 Partial LinuxBIOS -> Coreboot rename.
5020 * conf/i386-linuxbios.rmk: Renamed to ...
5021 * conf/i386-coreboot.rmk: ... this.
5022 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5023 * configure.ac: Accept "coreboot" as input platform (but maintain
5024 compatibility with "linuxbios").
5025 * include/grub/i386/linuxbios: Renamed to ...
5026 * include/grub/i386/coreboot: ... this.
5028 2008-07-17 Bean <bean123ch@gmail.com>
5030 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5031 (appleldr_mod_SOURCE): New variable.
5032 (appleldr_mod_CFLAGS): Likewise.
5033 (appleldr_mod_LDFLAGS): Likewise.
5034 (pci_mod_SOURCES): Likewise.
5035 (pci_mod_CFLAGS): Likewise.
5036 (pci_mod_LDFLAGS): Likewise.
5037 (lspci_mod_SOURCES): Likewise.
5038 (lspci_mod_CFLAGS): Likewise.
5039 (lspci_mod_LDFLAGS): Likewise.
5041 * conf/x86_64-efi.rmk: New file.
5043 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5045 (grub_efidisk_write): Likewise.
5047 * include/efi/api.h (efi_call_0): New macro.
5048 (efi_call_1): Likewise.
5049 (efi_call_2): Likewise.
5050 (efi_call_3): Likewise.
5051 (efi_call_4): Likewise.
5052 (efi_call_5): Likewise.
5053 (efi_call_6): Likewise.
5055 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5056 grub_rescue_cmd_chainloader.
5058 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5059 (grub_pe32_optional_header): Change some fields based on i386 or
5061 (GRUB_PE32_PE32_MAGIC): Likewise.
5063 * include/grub/efi/uga_draw.h: New file.
5065 * include/grub/elf.h (STN_ABS): New constant.
5066 (R_X86_64_NONE): Relocation constant for x86_64.
5067 (R_X86_64_64): Likewise.
5068 (R_X86_64_PC32): Likewise.
5069 (R_X86_64_GOT32): Likewise.
5070 (R_X86_64_PLT32): Likewise.
5071 (R_X86_64_COPY): Likewise.
5072 (R_X86_64_GLOB_DAT): Likewise.
5073 (R_X86_64_JUMP_SLOT): Likewise.
5074 (R_X86_64_RELATIVE): Likewise.
5075 (R_X86_64_GOTPCREL): Likewise.
5076 (R_X86_64_32): Likewise.
5077 (R_X86_64_32S): Likewise.
5078 (R_X86_64_16): Likewise.
5079 (R_X86_64_PC16): Likewise.
5080 (R_X86_64_8): Likewise.
5081 (R_X86_64_PC8): Likewise.
5083 * include/grub/i386/efi/pci.h: New file.
5085 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
5086 Change it value based on platform.
5087 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
5088 (GRUB_E820_RAM): Likewise.
5089 (GRUB_E820_RESERVED): Likewise.
5090 (GRUB_E820_ACPI): Likewise.
5091 (GRUB_E820_NVS): Likewise.
5092 (GRUB_E820_EXEC_CODE): Likewise.
5093 (GRUB_E820_MAX_ENTRY): Likewise.
5094 (grub_e820_mmap): New structure.
5095 (linux_kernel_header): Change the efi field according to different
5096 kernel version, also field from linux_kernel_header.
5098 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
5100 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
5101 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
5102 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
5103 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
5104 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
5105 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
5106 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
5107 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
5108 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
5109 (GRUB_PCI_ADDR_IO_MASK): Likewise.
5111 * include/grub/x86_64/efi/kernel.h: New file.
5113 * include/grub/x86_64/efi/loader.h: Likewise.
5115 * include/grub/x86_64/efi/machine.h: Likewise.
5117 * include/grub/x86_64/efi/pci.h: Likewise.
5119 * include/grub/x86_64/efi/time.h: Likewise.
5121 * include/grub/x86_64/linux.h: Likewise.
5123 * include/grub/x86_64/setjmp.h: Likewise.
5125 * include/grub/x86_64/time.h: Likewise.
5127 * include/grub/x86_64/types.h: Likewise.
5129 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
5130 GRUB_TARGET_SIZEOF_VOID_P.
5132 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
5133 (grub_efi_locate_handle): Likewise.
5134 (grub_efi_open_protocol): Likewise.
5135 (grub_efi_set_text_mode): Likewise.
5136 (grub_efi_stall): Likewise.
5137 (grub_exit): Likewise.
5138 (grub_reboot): Likewise.
5139 (grub_halt): Likewise.
5140 (grub_efi_exit_boot_services): Likewise.
5141 (grub_get_rtc): Likewise.
5143 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
5144 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
5145 (grub_efi_allocate_pages): Wrap efi calls.
5146 (grub_efi_free_pages): Wrap efi calls.
5147 (grub_efi_get_memory_map): Wrap efi calls.
5149 * kern/x86_64/dl.c: New file.
5151 * kern/x86_64/efi/callwrap.S: Likewise.
5153 * kern/x86_64/efi/startup.S: Likewise.
5155 * loader/efi/appleloader.c: Likewise.
5157 * loader/efi/chainloader.c (cmdline): New variable.
5158 (grub_chainloader_unload): Wrap efi calls.
5159 (grub_chainloader_boot): Likewise.
5160 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
5163 * loader/efi/chainloader_normal.c (chainloader_command):
5164 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
5167 * loader/i386/efi/linux.c (allocate_pages): Change allocation
5169 (grub_e820_add_region): New function.
5170 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
5172 (grub_find_video_card): New function.
5173 (grub_linux_setup_video): New function.
5174 (grub_rescue_cmd_linux): Probe for video information.
5176 * normal/x86_64/setjmp.S: New file.
5178 * term/efi/console.c (map_char): New function.
5179 (grub_console_putchar): Map unicode char.
5180 (grub_console_checkkey): Wrap efi calls.
5181 (grub_console_getkey): Likewise.
5182 (grub_console_getwh): Likewise.
5183 (grub_console_gotoxy): Likewise.
5184 (grub_console_cls): Likewise.
5185 (grub_console_setcolorstate): Likewise.
5186 (grub_console_setcursor): Likewise.
5188 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
5190 2008-07-16 Pavel Roskin <proski@gnu.org>
5192 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
5195 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
5196 pointer, not an integer. This fixes a warning and prevents
5197 precision loss on 64-bit systems.
5198 (relocate_addresses): Remove unneeded cast.
5200 2008-07-15 Pavel Roskin <proski@gnu.org>
5202 * kern/i386/ieee1275/init.c: Include grub/cache.h.
5204 * term/ieee1275/ofconsole.c: Disable code unused on i386.
5206 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5207 Fix comparison between signed and unsigned.
5209 * include/grub/i386/ieee1275/console.h: Declare
5210 grub_console_init() and grub_console_fini().
5212 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5213 It's empty and unused.
5215 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5216 beginning to avoid warnings with some compilers.
5218 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5219 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5221 2008-07-14 Pavel Roskin <proski@gnu.org>
5223 * kern/env.c (grub_register_variable_hook): Don't copy empty
5224 string, it leaks memory. Pass "" to grub_env_set(), it should
5225 handle constant strings.
5227 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5228 * commands/cmp.c (grub_cmd_cmp): Likewise.
5229 * kern/dl.c (grub_dl_flush_cache): Likewise.
5230 (grub_dl_load_core): Likewise.
5231 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5232 (grub_elf64_load_phdrs): Likewise.
5234 2008-07-13 Pavel Roskin <proski@gnu.org>
5236 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5237 between signed and unsigned.
5238 (LzmaEnc_Finish): Fix warning about an unused parameter.
5240 2008-07-13 Bean <bean123ch@gmail.com>
5242 * Makefile.in (enable_lzo): New rule.
5244 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5246 * configure.ac (ENABLE_LZO): New option --enable-lzo.
5248 * boot/i386/pc/lnxboot.S: #include <config.h>.
5250 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
5251 its value according to the compression algorithm used, lzo or lzma.
5253 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5254 compression algorithm according to configure macro.
5256 * kern/i386/pc/startup.S (codestart): Likewise.
5258 * kern/i386/pc/lzma_decode.S: New file.
5260 * include/grub/lib/LzFind.h: Likewise.
5262 * include/grub/lib/LzHash.h: Likewise.
5264 * include/grub/lib/LzmaDec.h: Likewise.
5266 * include/grub/lib/LzmaEnc.h: Likewise.
5268 * include/grub/lib/LzmaTypes.h: Likewise.
5270 * lib/LzFind.c: Likewise.
5272 * lib/LzmaDec.c: Likewise.
5274 * lib/LzmaEnc.c: Likewise.
5276 2008-07-13 Bean <bean123ch@gmail.com>
5278 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5279 (grub_ext4_extent_header): New structure.
5280 (grub_ext4_extent): Likewise.
5281 (grub_ext4_extent_idx): Likewise.
5282 (grub_ext4_find_leaf): New function.
5283 (grub_ext2_read_block): Handle extents.
5285 2008-07-12 Robert Millan <rmh@aybabtu.com>
5287 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5289 2008-07-11 Robert Millan <rmh@aybabtu.com>
5291 * util/grub.d/40_custom.in: New file. Example on how to add custom
5292 entries to /etc/grub.d.
5293 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5294 40_custom (implicitly, by merging all the grub.d rules).
5296 2008-07-11 Pavel Roskin <proski@gnu.org>
5298 * commands/read.c (grub_getline): Fix invalid memory access.
5299 Don't add newline to the variable value.
5301 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5302 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5303 (serial_hw_get_port): Check validity of the port number.
5304 (grub_cmd_serial): Check return value of serial_hw_get_port().
5306 2008-07-07 Pavel Roskin <proski@gnu.org>
5308 * boot/i386/pc/diskboot.S (notification_string): Replace
5309 "Loading kernel" with just "loading". This is shorter, less
5310 confusing and saves a few bytes for possible future changes.
5312 2008-07-05 Pavel Roskin <proski@gnu.org>
5314 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5315 size for ATAPI devices, they are undefined. Output sector
5316 number in decimal form.
5318 * disk/ata.c: Use named constants for status bits.
5320 2008-07-04 Pavel Roskin <proski@gnu.org>
5322 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5323 grub_addr_t before casting it to the void pointer to fix a
5324 warning. Non-addressable regions are discarded earlier.
5325 (grub_arch_modules_addr): Cast _end to grub_addr_t.
5326 * kern/i386/linuxbios/table.c: Include grub/misc.h.
5327 (check_signature): Don't shadow table_header.
5328 (grub_linuxbios_table_iterate): Cast numeric constants to
5329 grub_linuxbios_table_header_t.
5330 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5333 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5336 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5337 pointer, which can cause warnings. Support 64-bit addresses.
5339 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5340 of sizeof(long). This fixes PowerPC image generation on x86_64.
5342 2008-07-04 Robert Millan <rmh@aybabtu.com>
5344 This fixes a performance issue when pc & gpt partmap iterators
5345 didn't abort iteration even after our hook found what it was
5346 looking for (often causing expensive probes of non-existent drives).
5348 Some callers relied on previous buggy behaviour, since they would
5349 raise an error when their own hooks caused early abortion of its
5352 * kern/device.c (grub_device_open): Improve error message.
5353 * disk/lvm.c (grub_lvm_open): Likewise.
5354 * disk/raid.c (grub_raid_open): Likewise.
5356 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5357 when hook requests it, independently of grub_errno.
5358 (pc_partition_map_probe): Do not fail when find_func() caused
5359 early abortion of pc_partition_map_iterate().
5361 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5362 when hook requests it, independently of grub_errno.
5363 (gpt_partition_map_probe): Do not fail when find_func() caused
5364 early abortion of gpt_partition_map_iterate().
5366 * kern/partition.c (grub_partition_iterate): Abort parent iteration
5367 when hook requests it, independently of grub_errno. Do not fail when
5368 part_map_iterate_hook() caused early abortion of p->iterate().
5370 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5371 when grub_partition_iterate() returned with non-zero.
5373 2008-07-03 Pavel Roskin <proski@gnu.org>
5375 * disk/ata.c (grub_ata_pio_write): Check status before writing,
5376 like we do in grub_ata_pio_read().
5377 (grub_ata_readwrite): Always write individual sectors. Fix the
5378 sector count for the remainder.
5379 (grub_ata_write): Enable writing to ATA devices. Correctly
5380 report error for ATAPI devices.
5382 2008-07-02 Pavel Roskin <proski@gnu.org>
5384 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5387 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5388 for every read sector, we already increment it for the whole
5389 batch. This fixes reading more than 256 sectors at once.
5391 * util/grub-editenv.c (cmd_info): Cast argument to long
5392 explicitly. ptrdiff_t reduces to int on i386.
5394 * util/grub-editenv.c (main): Be specific which parameter is
5397 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5398 (memdisk): Make memdisk_orig_addr a pointer.
5400 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5401 for file offsets, use grub_off_t instead. Fix printf format
5404 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5405 there. Real unexpected warnings should not drown in the noise
5406 about known problems.
5408 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5409 grub_disk_addr_t for memory addresses.
5411 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5412 explicitly to fix a warning.
5414 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5416 * Makefile.in (MODULE_LDFLAGS): New variable.
5417 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
5418 the linker accepts --build-id=none.
5419 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
5421 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5423 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5424 those in Linux XFS code. Provide a way to access 64-bit parent
5426 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
5427 the end of struct grub_xfs_dir_header.
5429 2008-07-02 Bean <bean123ch@gmail.com>
5431 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5432 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5433 and GRUB_IEEE1275_FLAG_NO_ANSI.
5435 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5436 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5437 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5439 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5440 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5442 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5443 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5445 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5446 esc sequence on non ANSI terminal.
5447 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5449 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5452 2008-07-02 Bean <bean123ch@gmail.com>
5454 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5455 (grub_editenv_SOURCES): New variable.
5456 (pkglib_MODULES): Add loadenv.mod.
5457 (loadenv_mod_SOURCES): New variable.
5458 (loadenv_mod_CFLAGS): Likewise.
5459 (loadenv_mod_LDFLAGS): Likewise.
5461 * include/grub/envblk.h: New file.
5463 * util/envblk.c: New file.
5465 * util/grub-editenv.c: New file.
5467 * commands/loadenv.c: New file.
5469 2008-07-01 Pavel Roskin <proski@gnu.org>
5471 * include/multiboot2.h (struct multiboot_tag_module): Use char,
5472 not unsigned char. This fixes warnings and is consistent with
5475 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5477 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5479 * term/tparm.c (analyze): Always set *popcount.
5481 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5482 cast to fix a warning.
5484 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5485 cast to suppress a warning.
5487 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5488 grub_fshelp_read_file() expects.
5490 * fs/fat.c: Fix UUID calculation on big-endian systems. We
5491 write uuid as a 32-bit value in CPU byte order, so declare and
5494 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5495 long if the format specifier expects it.
5496 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5497 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5498 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5499 long to fix a warning.
5500 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5501 grub_dprintf() arguments to fix warnings.
5503 2008-06-30 Pavel Roskin <proski@gnu.org>
5505 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5506 install_bsd_part immediately before core.img is embedded or
5507 modified on disk. This fixes core.img verification if core.img
5510 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5511 core_path to calculate the blocklist.
5512 Patch from Javier MartÃn <lordhabbit@gmail.com>
5514 2008-06-29 Robert Millan <rmh@aybabtu.com>
5516 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
5517 block to disk block.
5518 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5519 Patch from Niels Böhm <bitbucket@arcor.de>
5521 2008-06-29 Robert Millan <rmh@aybabtu.com>
5523 * util/update-grub_lib.in (font_path): Search for fonts in
5524 /boot/grub first, which is more likely to be readable (we aren't
5525 deciding where fonts live, just looking for them).
5527 2008-06-26 Pavel Roskin <proski@gnu.org>
5529 * util/biosdisk.c (read_device_map): Don't leave dead map
5530 entries for devices failing stat() check.
5532 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5533 core_path_dev for the core.img path on the target device.
5535 2008-06-26 Robert Millan <rmh@aybabtu.com>
5537 * disk/fs_uuid.c: New file.
5538 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5539 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5540 (fs_uuid_mod_LDFLAGS): New variables.
5541 * include/grub/disk.h (grub_disk_dev_id): Add
5542 `GRUB_DISK_DEVICE_UUID_ID'.
5543 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5544 implement iterate().
5546 2008-06-26 Robert Millan <rmh@aybabtu.com>
5548 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5549 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5550 Linux image includes no initrd.
5552 2008-06-21 Javier MartÃn <lordhabbit@gmail.com>
5554 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5555 call to resolve the core image location that effectively appended the
5558 2008-06-21 Robert Millan <rmh@aybabtu.com>
5560 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5563 * util/grub.d/10_hurd.in: ... to here ...
5564 * util/grub.d/10_linux.in: ... and here.
5566 2008-06-19 Robert Millan <rmh@aybabtu.com>
5568 * kern/main.c (grub_main): Export `prefix' variable immediately
5569 after it has been set by grub_machine_set_prefix().
5571 2008-06-19 Robert Millan <rmh@aybabtu.com>
5573 * commands/search.c (search_label, search_fs_uuid, search_file): Print
5574 search result when not saving to variable, not the other way around.
5575 When saving to variable, abort iteration as soon as a match is found.
5577 2008-06-19 Robert Millan <rmh@aybabtu.com>
5579 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
5580 check for partition that provides /boot/grub. Its logic is flawed,
5581 as it prevents prepare_grub_to_access_device() from being called
5584 2008-06-19 Robert Millan <rmh@aybabtu.com>
5586 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
5587 "insmod" command directly when abstraction modules are needed,
5588 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
5589 since it had already been processed).
5591 2008-06-19 Pavel Roskin <proski@gnu.org>
5593 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
5594 changed. This is needed in case GRUB_LIBDIR changes.
5595 * conf/i386-ieee1275.rmk: Likewise.
5596 * conf/i386-linuxbios.rmk: Likewise.
5597 * conf/i386-pc.rmk: Likewise.
5598 * conf/powerpc-ieee1275.rmk: Likewise.
5600 2008-06-18 Pavel Roskin <proski@gnu.org>
5602 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5603 kernel_elf_symlist.c to symlist.c for consistency with other
5604 architectures. Update all users.
5605 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5607 2008-06-18 Robert Millan <rmh@aybabtu.com>
5609 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5612 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
5613 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
5614 a RAID device, run setup() for all members independently on whether
5615 LVM abstraction is being used.
5616 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5617 If grub-mkimage has set `*install_dos_part == -2', don't override this
5619 Perform *install_dos_part adjustments independently on whether
5620 we're embedding or not.
5621 Clarify error message when image is too big for embedding.
5622 Remove duplicate *install_dos_part stanza.
5624 2008-06-17 Robert Millan <rmh@aybabtu.com>
5626 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
5627 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
5629 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
5630 values in grub_ofconsole_normal_color and
5631 grub_ofconsole_highlight_color (they're not directly related to
5632 background and foreground).
5633 (grub_ofconsole_setcolorstate): Extract background and foreground
5634 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
5636 2008-06-17 Robert Millan <rmh@aybabtu.com>
5638 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
5639 /boot/grub for the check in last commit, not /boot (they could be
5640 different partitions).
5642 2008-06-16 Robert Millan <rmh@aybabtu.com>
5644 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
5645 asked to setup access for the same partition that provides /boot,
5646 don't bother using UUIDs since our root already has the value we
5649 2008-06-16 Robert Millan <rmh@aybabtu.com>
5651 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
5653 Patch from Sven Mueller <sven@debian.org>.
5655 2008-06-16 Robert Millan <rmh@aybabtu.com>
5657 * util/update-grub.in: Check for $EUID instead of $UID.
5658 Reported by Vincent Zweije.
5660 2008-06-16 Bean <bean123ch@gmail.com>
5662 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
5663 (grub_ext2_read_block): Likewise.
5664 (grub_ext2_read_inode): Likewise.
5665 (grub_ext2_mount): Likewise.
5666 (grub_ext2_close): Likewise.
5667 (grub_ext3_get_journal): Removed.
5669 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
5670 (grub_reiserfs_read_symlink): Likewise.
5671 (grub_reiserfs_mount): Likewise.
5672 (grub_reiserfs_open): Likewise.
5673 (grub_reiserfs_read): Likewise.
5674 (grub_reiserfs_close): Likewise.
5675 (grub_reiserfs_get_journal): Removed.
5677 * fs/fshelp.c (grub_fshelp_read): Removed.
5678 (grub_fshelp_map_block): Likewise.
5680 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
5681 (grub_fshelp_journal): Likewise.
5682 (grub_fshelp_read): Likewise.
5683 (grub_fshelp_map_block): Likewise.
5685 2008-06-16 Pavel Roskin <proski@gnu.org>
5687 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
5688 floating point anymore.
5689 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
5691 2008-06-15 Pavel Roskin <proski@gnu.org>
5693 * commands/ls.c (grub_ls_list_files): Use integer calculations
5694 for human readable format, avoid floating point use.
5695 * kern/misc.c (grub_ftoa): Remove.
5696 (grub_vsprintf): Remove floating point support.
5698 2008-06-15 Robert Millan <rmh@aybabtu.com>
5700 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
5702 Reported by Max Vozeler.
5704 2008-06-15 Robert Millan <rmh@aybabtu.com>
5706 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
5707 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
5709 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
5710 the beginning of the prefix.
5712 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
5713 It is assumed that if we have a memdisk, grub-mkimage has set
5714 grub_prefix to include the "(memdisk)" drive in it.
5716 2008-06-15 Robert Millan <rmh@aybabtu.com>
5718 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
5719 Initialize keyboard controller after registering the terminal, so that
5720 grub_printf() can be called from grub_keyboard_controller_init().
5722 2008-06-15 Robert Millan <rmh@aybabtu.com>
5724 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
5725 extent-btree which is written as big endian on disk.
5726 Reported by Alain Greppin <al@chilibi.org>.
5728 2008-06-14 Robert Millan <rmh@aybabtu.com>
5730 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
5731 * util/i386/pc/grub-install.in (modules): Likewise.
5733 2008-06-13 Pavel Roskin <proski@gnu.org>
5735 * commands/ls.c (grub_ls_list_files): Fix format warnings.
5737 2008-06-13 Bean <bean123ch@gmail.com>
5739 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
5741 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
5743 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
5744 to indicate sparse block.
5746 2008-06-12 Pavel Roskin <proski@gnu.org>
5748 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
5749 number, grub_fshelp_read() does it for us.
5751 * fs/fshelp.c (grub_fshelp_read): New function. Implement
5752 linear disk read with journal translation.
5753 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
5754 * include/grub/fshelp.h: Declare grub_fshelp_read().
5756 2008-06-09 Pavel Roskin <proski@gnu.org>
5758 * fs/minix.c (grub_minix_mount): Handle error reading
5761 2008-06-08 Robert Millan <rmh@aybabtu.com>
5763 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
5764 don't append the RAID prefix afterwards.
5765 Reported by Clint Adams.
5767 2008-06-08 Robert Millan <rmh@aybabtu.com>
5769 Based on description from Pavel:
5770 * kern/disk.c (grub_disk_check_range): Rename to ...
5771 (grub_disk_adjust_range): ... this. Add a comment explaining the
5772 tasks performed by this function.
5774 2008-06-08 Robert Millan <rmh@aybabtu.com>
5776 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
5777 `num_serial' (for consistency with other variables).
5778 (struct grub_ntfs_data): Add `uuid' member.
5779 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
5780 (grub_ntfs_uuid): New function.
5781 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
5783 2008-06-07 Pavel Roskin <proski@gnu.org>
5785 * util/biosdisk.c (open_device): Revert last change to the
5786 function, it broke installation. The sector needs to be
5787 different dependent on which device is opened.
5789 2008-06-06 Robert Millan <rmh@aybabtu.com>
5791 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
5792 rest of GRUB, and breakage doesn't happen if its value were modified.
5794 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5795 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
5796 a constant (same value).
5797 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
5798 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
5800 2008-06-06 Robert Millan <rmh@aybabtu.com>
5802 * util/biosdisk.c (open_device): Do not modify sector offset when
5803 accessing a partition. kern/disk.c already handles this for us.
5805 2008-06-06 Robert Millan <rmh@aybabtu.com>
5807 * util/grub-emu.c (grub_machine_init): Move code in this function from
5809 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
5810 segfault in case grub_printf() is called).
5812 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
5813 grub_probe. Update all users not to explicitly add it again.
5814 (grub_device): New variable; contains corresponding device for grubdir.
5815 (fs_module, partmap_module, devabstraction_module): Pass
5816 `--device ${grub_device}' to grub_probe to avoid traversing /dev
5819 2008-06-05 Robert Millan <rmh@aybabtu.com>
5821 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
5822 is found, print it (same layout as with labels).
5824 2008-06-04 Robert Millan <rmh@aybabtu.com>
5826 * util/biosdisk.c (get_drive): Rename to ...
5827 (find_grub_drive): ... this. Update all users.
5829 (get_os_disk): Rename to ...
5830 (convert_system_partition_to_system_disk): ... this. Update all users.
5832 (find_drive): Rename to ...
5833 (find_system_device): ... this. Update all users.
5835 2008-06-04 Robert Millan <rmh@aybabtu.com>
5837 * util/biosdisk.c (get_os_disk): Handle IDA devices.
5838 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5839 (make_device_map): Likewise.
5841 2008-06-01 Robert Millan <rmh@aybabtu.com>
5843 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
5844 before dereferencing it.
5846 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
5847 union with fat12/fat16-specific ones. Add some new fields, including
5848 `num_serial' for both versions.
5849 (struct grub_fat_data): Add `uuid' member.
5850 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
5851 names. Initialize `data->uuid' using `num_serial'.
5852 (grub_fat_uuid): New function.
5853 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
5855 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
5856 (grub_reiserfs_uuid): New function.
5857 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
5860 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
5861 (grub_xfs_uuid): New function.
5862 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
5864 2008-06-01 Robert Millan <rmh@aybabtu.com>
5866 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
5867 code that is backward compatible with pre-uuid search command.
5869 2008-05-31 Robert Millan <rmh@aybabtu.com>
5871 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
5872 floppies after everything else, to ensure floppy drive isn't accessed
5873 unnecessarily (patch from Bean).
5875 2008-05-31 Robert Millan <rmh@aybabtu.com>
5877 * commands/search.c (search_label, search_fs_uuid, search_file): Do
5878 not print device names when we were asked to set a variable.
5880 2008-05-31 Robert Millan <rmh@aybabtu.com>
5882 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
5883 using "cursor-on" and "cursor-off" commands (understood at least by
5884 the Open Firmware flavour on OLPC).
5886 2008-05-31 Michael Gorven <michael@gorven.za.net>
5888 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
5889 on and off sequences.
5891 2008-05-31 Robert Millan <rmh@aybabtu.com>
5893 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
5894 * util/update-grub.in: Likewise.
5896 2008-05-30 Pavel Roskin <proski@gnu.org>
5898 * util/biosdisk.c (linux_find_partition): Simplify logic and
5899 make the code more universal. Keep special processing for
5900 devfs, but use a simple rule for all other devices. If the
5901 device ends with a number, append 'p' and the partition number.
5902 Otherwise, append only the partition number.
5904 2008-05-30 Robert Millan <rmh@aybabtu.com>
5906 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
5907 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
5908 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
5909 the `root' parameter to Linux.
5911 2008-05-30 Robert Millan <rmh@aybabtu.com>
5913 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
5914 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
5915 --fs_uuid with --fs-uuid.
5916 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
5917 all filesystems support them).
5919 2008-05-30 Robert Millan <rmh@aybabtu.com>
5921 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
5922 grub_printf() flags, since we're printing in units of 2 bytes.
5924 2008-05-30 Robert Millan <rmh@aybabtu.com>
5926 * util/grub.d/00_header.in: Remove obsolete comment referencing
5927 convert_system_path_to_grub_path().
5928 * util/update-grub.in: Likewise.
5929 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
5930 (convert_system_path_to_grub_path): Add a warning message explaining
5931 that this function is deprecated. Rely on is_path_readable_by_grub()
5932 for the readability checks.
5933 (font_path): Use is_path_readable_by_grub() for the readability
5934 check rather than convert_system_path_to_grub_path().
5936 2008-05-30 Robert Millan <rmh@aybabtu.com>
5938 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
5939 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
5940 converting it first.
5941 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
5942 grub.cfg for access to font file, and afterwards call it again to set
5945 2008-05-30 Robert Millan <rmh@aybabtu.com>
5947 * commands/search.c (options): Add --fs_uuid option.
5948 (search_fs_uuid): New function.
5949 (grub_cmd_search): Fix --set argument passing.
5950 Use search_fs_uuid() when requested via --fs_uuid.
5951 (grub_search_init): Update help message.
5952 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
5953 and redeclare it as an array of 16-bit words.
5954 (grub_ext2_uuid): New function.
5955 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
5956 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
5957 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
5958 (GRUB_DEVICE_BOOT_UUID): New variables.
5959 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
5960 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
5962 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
5963 just assume `root' variable has the right value.
5964 * util/grub.d/10_linux.in: Likewise.
5965 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
5967 (main): Recognise `-t fs_uuid' argument.
5969 2008-05-30 Robert Millan <rmh@aybabtu.com>
5971 * util/biosdisk.c (map): Redefine structure to hold information
5972 about GRUB drive name.
5973 (get_drive): Reimplement without assuming (and verifying) BIOS-like
5975 (call_hook): Remove.
5976 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
5977 member. Assume drive has partitions.
5978 (grub_util_biosdisk_open): Access device names via `.device' struct
5980 (open_device): Likewise.
5981 (find_drive): Likewise.
5982 (read_device_map): Adjust map[] usage to match the new struct
5983 definition. Don't check for duplicates (still possible, but not cheap
5985 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
5986 (make_device_name): Remove assumption of BIOS-like drive names.
5988 2008-05-30 Pavel Roskin <proski@gnu.org>
5990 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
5991 compiling execute.c doesn't need grub_script.tab.h anymore.
5992 (normal/command.c_DEPENDENCIES): Likewise.
5993 (normal/function.c_DEPENDENCIES): Likewise.
5994 * conf/i386-ieee1275.rmk: Likewise.
5995 * conf/i386-linuxbios.rmk: Likewise.
5996 * conf/i386-pc.rmk: Likewise.
5997 * conf/powerpc-ieee1275.rmk: Likewise.
5998 * conf/sparc64-ieee1275.rmk: Likewise.
6000 2008-05-29 Pavel Roskin <proski@gnu.org>
6002 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6003 when scanning metadata for volume group name.
6005 * include/grub/script.h: Don't include grub_script.tab.h. It's
6006 a generated file, which may only be included from the files with
6007 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
6008 use union YYSTYPE, as the later allows forward declaration.
6009 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6011 2008-05-29 Robert Millan <rmh@aybabtu.com>
6013 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6014 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6015 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6016 (grub_console_checkkey): Add grub_dprintf() call to report unknown
6019 2008-05-29 Robert Millan <rmh@aybabtu.com>
6021 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6022 control key combinations.
6024 2008-05-29 Robert Millan <rmh@aybabtu.com>
6026 * util/powerpc/ieee1275/grub-install.in: Move from here ...
6027 * util/ieee1275/grub-install.in: ... to here.
6028 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6029 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6030 (grub_install_SOURCES): Likewise.
6032 2008-05-29 Robert Millan <rmh@aybabtu.com>
6034 * fs/affs.c: Update copyright year.
6035 * fs/ext2.c: Likewise.
6036 * fs/fshelp.c: Likewise.
6037 * fs/hfsplus.c: Likewise.
6038 * fs/ntfs.c: Likewise.
6039 * fs/xfs.c: Likewise.
6040 * include/grub/fshelp.h: Likewise.
6041 * util/grub-mkdevicemap.c: Likewise.
6043 2008-05-28 Robert Millan <rmh@aybabtu.com>
6045 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6046 might need to be fatfs to support some firmware implementations
6049 2008-05-28 Robert Millan <rmh@aybabtu.com>
6051 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6053 * util/grub-mkdevicemap.c (get_mmc_disk_name)
6054 (make_device_map): Likewise.
6056 2008-05-20 Bean <bean123ch@gmail.com>
6058 * fs/fshelp.c (grub_fshelp_map_block): New function.
6059 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6060 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6062 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6063 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6064 (grub_fshelp_journal): New structure.
6065 (grub_fshelp_map_block): New function prototype.
6066 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6067 (grub_fshelp_map_block): Likewise.
6069 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6070 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6071 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6072 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
6073 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
6074 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
6075 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
6076 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
6077 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
6078 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
6079 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
6080 (grub_ext2_sblock): New members for journal support.
6081 (grub_ext3_journal_header): New structure.
6082 (grub_ext3_journal_revoke_header): Likewise.
6083 (grub_ext3_journal_block_tag): Likewise.
6084 (grub_ext3_journal_sblock): Likewise.
6085 (grub_fshelp_node): New members logfile and journal.
6086 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
6087 grub_fshelp_map_block to get real block number.
6088 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
6090 (grub_ext2_read_inode): Likewise.
6091 (grub_ext3_get_journal): New function.
6092 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
6093 (grub_ext2_close): Release memory used by journal.
6095 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
6096 (REISERFS_MAGIC_DESC_BLOCK): New macro.
6097 (grub_reiserfs_transaction_header): Renamed to
6098 grub_reiserfs_description_block, replace field data with real_blocks.
6099 (grub_reiserfs_commit_block): New structure.
6100 (grub_reiserfs_data): New member journal.
6101 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
6103 (grub_reiserfs_read_symlink): Likewise.
6104 (grub_reiserfs_iterate_dir): Likewise.
6105 (grub_reiserfs_open): Likewise.
6106 (grub_reiserfs_read): Likewise.
6107 (grub_reiserfs_get_journal): New function.
6108 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
6109 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
6110 using grub_reiserfs_get_journal.
6111 (grub_reiserfs_close): Release memory used by journal.
6113 * fs/affs.c (grub_affs_read_block): Change block type to
6114 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
6116 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
6118 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
6120 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
6122 * fs/udf.c (grub_udf_read_block): Change block type to
6123 grub_disk_addr_t. Use type cast to avoid warning.
6125 * fs/xfs.c (grub_xfs_read_block): Likewise.
6127 2008-05-16 Christian Franke <franke@computer.org>
6129 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
6130 to ensure that break with ESC will always work.
6131 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
6132 Remove ESC from keyboard queue.
6134 2008-05-16 Christian Franke <franke@computer.org>
6136 * util/biosdisk.c: [__CYGWIN__] Add includes.
6137 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
6138 (get_os_disk): Move variable declarations to OS specific
6139 parts to avoid warning.
6140 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
6141 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
6142 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
6144 * util/getroot.c: [__CYGWIN__] Add includes.
6145 (strip_extra_slashes): Fix "/" case.
6146 [__CYGWIN__] (get_win32_path): New function.
6147 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
6148 [__CYGWIN__] (find_root_device): Disable.
6149 [__CYGWIN__] (get_bootsec_serial): New function.
6150 [__CYGWIN__] (find_cygwin_root_device): Likewise.
6151 [__linux__] (grub_guess_root_device): Add early returns to simplify
6153 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
6154 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
6155 check for Linux only.
6157 2008-05-15 Bean <bean123ch@gmail.com>
6159 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
6160 keyboard hang problem in apple's intel mac.
6162 2008-05-09 Robert Millan <rmh@aybabtu.com>
6164 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
6166 * util/grub-mkdevicemap.c (get_virtio_disk_name)
6167 (make_device_map): Likewise.
6168 Reported by Aurelien Jarno <aurel32@debian.org>
6170 2008-05-07 Ian Campbell <ijc@hellion.org.uk>
6172 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
6173 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
6174 (make_device_map): Output entries for xvd type disks.
6176 2008-05-07 Robert Millan <rmh@aybabtu.com>
6178 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
6180 * util/grub-mkdevicemap.c (get_cciss_disk_name)
6181 (make_device_map): Likewise.
6182 Reported by Roland Dreier <rdreier@cisco.com>
6184 2008-05-07 Robert Millan <rmh@aybabtu.com>
6186 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
6187 grub_strstr() call. Correct a few mistakes in failure path handling.
6189 2008-05-06 Robert Millan <rmh@aybabtu.com>
6191 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6192 Do not print a trailing slash (therefore, the root directory is an
6194 (convert_system_path_to_grub_path): Do not remove trailing slash
6195 from make_system_path_relative_to_its_root() output.
6197 * util/i386/pc/grub-install.in: Add trailing slash to output from
6198 make_system_path_relative_to_its_root().
6200 2008-05-06 Robert Millan <rmh@aybabtu.com>
6202 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
6203 ensures that output lines aren't intermangled with those sent to
6204 stderr (via grub_util_info()).
6205 * util/grub-probe.c (grub_refresh): Likewise.
6206 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6208 2008-05-05 Christian Franke <franke@computer.org>
6210 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6211 Add Cygwin device names.
6212 (get_ide_disk_name) [__CYGWIN__]: Likewise.
6213 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6214 (check_device): Return error instead of success on empty name.
6215 (make_device_map): Move label inside linux specific code to
6216 prevent compiler warning.
6218 2008-04-30 Robert Millan <rmh@aybabtu.com>
6220 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6221 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6223 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6225 2008-04-29 Robert Millan <rmh@aybabtu.com>
6227 * docs/grub.cfg: New file (example GRUB configuration).
6229 2008-04-26 Robert Millan <rmh@aybabtu.com>
6231 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
6232 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6233 and `disk/ieee1275/nand.c'.
6235 2008-04-25 Bean <bean123ch@gmail.com>
6237 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6240 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6241 change the buffer size to 4096 for cdrom device.
6243 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6245 (_linux_mod_SOURCES): New variable.
6246 (_linux_mod_CFLAGS): Likewise.
6247 (_linux_mod_LDFLAGS): Likewise.
6248 (linux_mod_SOURCES): Likewise.
6249 (linux_mod_CFLAGS): Likewise.
6250 (linux_mod_LDFLAGS): Likewise.
6251 (nand_mod_SOURCES): Likewise.
6252 (nand_mod_CFLAGS): Likewise.
6253 (nand_mod_LDFLAGS): Likewise.
6255 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6256 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6257 type property. (nand device in olpc don't have this property)
6259 * include/grub/disk.h (grub_disk_dev_id): New macro
6260 GRUB_DISK_DEVICE_NAND_ID.
6262 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6264 (grub_rescue_cmd_initrd): Likewise.
6266 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6267 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6268 ofw_cif_handler and ofw_idt, adjust padding number.
6270 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6271 GRUB_MACHINE_IEEE1275 is defined.
6273 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6274 Use NESTED_FUNC_ATTR attribute on the hook parameter.
6276 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6277 on nested function heap_init.
6278 (grub_upper_mem): New variable for i386-ieee1275.
6279 (grub_get_extended_memory): New function for i386-ieee1275.
6280 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6282 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6283 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6286 * loader/i386/ieee1275/linux.c: New file.
6288 * loader/i386/ieee1275/linux_normal.c: New file.
6290 * disk/ieee1275/nand.c: New file.
6292 2008-04-18 Thomas Schwinge <tschwinge@gnu.org>
6294 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6296 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6298 2008-04-18 Robert Millan <rmh@aybabtu.com>
6300 Restructures early code path on ieee1275 to unify grub_main() as
6301 the first C function that is executed in every platform.
6303 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6304 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6306 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6307 * kern/ieee1275/cmain.c (cmain): Rename to ...
6308 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6309 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6312 2008-04-18 Robert Millan <rmh@aybabtu.com>
6314 * util/update-grub.in: Fix syntax error when setting
6315 `GRUB_PRELOAD_MODULES'.
6316 Reported by Stephane Chazelas <stephane@artesyncp.com>
6318 2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
6320 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6321 section into account, newer toolchains generate unique build ids
6322 * configure.ac: remove the test for --build-id=none acceptance,
6323 we want build ids to be preserved
6324 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6325 far from other sections don't cause the raw binary images grow
6328 2008-04-15 Robert Millan <rmh@aybabtu.com>
6330 * disk/lvm.c: Update copyright year.
6331 * kern/misc.c: Likewise.
6333 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6335 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
6336 there is no memory left for physical volume name.
6338 2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6340 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6341 volume name mapping to support bigger than 9 character names properly.
6343 2008-04-13 Robert Millan <rmh@aybabtu.com>
6345 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6346 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6348 2008-04-13 Christian Franke <franke@computer.org>
6350 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6351 to create a floppy emulation boot CD when non emulation mode
6353 Enable Joliet CD filesystem extension.
6355 2008-04-13 Robert Millan <rmh@aybabtu.com>
6357 * kern/misc.c (grub_strncat): Fix off-by-one error.
6358 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6360 * kern/env.c (grub_env_context_close): Clear current context, not
6362 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6364 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6366 2008-04-13 Robert Millan <rmh@aybabtu.com>
6368 Improve robustness when handling LVM.
6370 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
6371 (and leave `*p' unmodified).
6372 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6374 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6375 iterating through it.
6376 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6378 (grub_lvm_scan_device): Check the return value (and fail gracefully
6379 when due) on each grub_lvm_getvalue() or grub_strstr() call.
6380 Don't assume `vg->pvs != NULL' when iterating through it.
6382 2008-04-13 Robert Millan <rmh@aybabtu.com>
6384 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6385 * genmk.rb (partmap): New variable.
6386 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6387 (#{partmap}): New target rule.
6388 * genpartmaplist.sh: New file.
6389 * Makefile.in (pkglib_DATA): Add partmap.lst.
6390 (partmap.lst): New target rule.
6391 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6392 modules (including all partition maps), instead of preloading them.
6394 2007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
6396 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6397 `linux-boot-prober' (if installed) to detect other operating
6398 systems which are installed on the computer and add them to
6400 * conf/common.rmk: Build and install 30_os-prober.
6402 2008-04-12 Robert Millan <rmh@aybabtu.com>
6404 * kern/powerpc/ieee1275/init.c: Move from here ...
6405 * kern/ieee1275/init.c: ... to here. Update all users.
6407 * kern/powerpc/ieee1275/cmain.c: Move from here ...
6408 * kern/ieee1275/cmain.c: ... to here. Update all users.
6410 * kern/powerpc/ieee1275/openfw.c: Move from here ...
6411 * kern/ieee1275/openfw.c: ... to here. Update all users.
6413 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6414 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
6416 2008-04-10 Pavel Roskin <proski@gnu.org>
6418 * configure.ac: Always use "_cv_" in cache variables for
6419 compatibility with Autoconf 2.62.
6421 2008-04-07 Robert Millan <rmh@aybabtu.com>
6423 Revert grub/machine/init.h addition by Pavel (since it breaks on
6424 i386-ieee1275 and others):
6425 * util/i386/pc/misc.c: Remove grub/machine/init.h.
6426 * util/powerpc/ieee1275/misc.c: Likewise.
6428 2008-04-07 Robert Millan <rmh@aybabtu.com>
6430 * util/grub-probe.c (probe): Improve error message.
6432 2008-04-07 Robert Millan <rmh@aybabtu.com>
6434 * util/biosdisk.c (read_device_map): Skip devices that don't exist
6435 (this prevents the presence of a bogus entry from ruining the whole
6438 2008-04-06 Pavel Roskin <proski@gnu.org>
6440 * util/biosdisk.c: Include grub/util/biosdisk.h.
6441 * util/grub-fstest.c (execute_command): Make static.
6442 * util/grub-mkdevicemap.c (check_device): Likewise.
6443 * util/i386/pc/misc.c: Include grub/machine/init.h.
6444 * util/powerpc/ieee1275/misc.c: Likewise.
6445 * util/lvm.c: Include grub/util/lvm.h.
6446 * util/misc.c: Include grub/kernel.h, grub/misc.h and
6448 * util/raid.c: Include grub/util/raid.h.
6449 (grub_util_getdiskname): Make static.
6451 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6452 grub_hostfs_fini(), as they are called from grub_init_all() and
6453 grub_fini_all() respectively. This fixes an infinite loop in
6454 grub-fstest due to double registration of hostfs.
6455 Reported by Christian Franke <Christian.Franke@t-online.de>
6457 2008-04-05 Pavel Roskin <proski@gnu.org>
6459 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6460 all 8 functions. Otherwise, probe function 0 only.
6462 2008-04-04 Pavel Roskin <proski@gnu.org>
6464 * commands/lspci.c (grub_lspci_iter): Print the bus number
6467 * commands/lspci.c (grub_pci_classes): Fix typos.
6468 (grub_lspci_iter): Don't print func twice. Print vendor ID
6469 before device ID, as it's normally done.
6471 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6472 Fix signedness warnings.
6473 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6475 * util/ieee1275/get_disk_name.c: Include config.h so that
6476 _GNU_SOURCE is defined and getline() is declared. Mark an
6477 unused argument as such. Fix a signedness warning.
6479 2008-04-02 Pavel Roskin <proski@gnu.org>
6481 * genkernsyms.sh.in: Use more robust assignments for CC and
6482 srcdir. Quote srcdir.
6483 * gensymlist.sh.in: Likewise. Assert at the compile time that
6484 the symbol table is not empty.
6486 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6487 * fs/cpio.c (grub_cpio_read): Likewise.
6489 2008-04-01 Pavel Roskin <proski@gnu.org>
6491 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6492 * disk/host.c (grub_host_open): Likewise.
6493 * disk/loopback.c (grub_loopback_open): Likewise.
6494 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6495 disk->id as in disk/host.c, not a multi-character constant.
6497 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
6498 later is obsolete, potentially dangerous and sets a bad example.
6499 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6500 * util/misc.c (grub_util_get_image_size): Likewise.
6502 * disk/loopback.c (options): Improve help for "--partitions".
6504 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6505 options to align them with the short options, e.g. "echo -e".
6507 2008-03-31 Bean <bean123ch@gmail.com>
6509 * video/reader/png.c (grub_png_data): New member is_16bit and
6511 (grub_png_decode_image_header): Detect 16 bit png image.
6512 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6513 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6514 (grub_video_reader_png): Release memory occupied by image_data.
6516 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6518 (grub_nfs_mount): Skip the test for sector per cluster.
6520 * include/grub/ntfs.h (MAX_SPC): Removed.
6522 2008-03-31 Bean <bean123ch@gmail.com>
6524 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6525 (grub_probe_SOURCES): Add fs/afs.c.
6526 (grub_fstest_SOURCES): Likewise.
6527 (afs_mod_SOURCES): New variable.
6528 (afs_mod_CFLAGS): Likewise.
6529 (afs_mod_LDFLAGS): Likewise.
6531 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6532 (grub_emu_SOURCES): Likewise.
6534 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6536 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6538 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6540 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6542 * fs/afs.c: New file.
6544 2008-03-30 Pavel Roskin <proski@gnu.org>
6546 * disk/host.c: Include grub/misc.h to fix a warning.
6547 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6548 warnings about implicit declarations.
6550 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6552 * include/grub/i386/loader.h: Change declaration of
6553 grub_linux_boot() to match what grub_loader_set() expects.
6554 * util/getroot.c (grub_guess_root_device): Return const char* to
6556 * util/grub-probe.c (probe): Fix a warning about uninitialized
6557 abstraction_name variable.
6558 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6559 second argument as unused to fix a warning.
6561 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6562 missing grub_error() call.
6564 * util/update-grub_lib.in: Define datarootdir, since Autoconf
6565 2.60 and newer uses it to define datadir.
6567 * commands/sleep.c: Fix warning about implicit declaration.
6568 * disk/memdisk.c: Likewise.
6569 * loader/aout.c: Likewise.
6570 * loader/i386/bsd_normal.c: Likewise.
6571 * util/grub-probe.c: Likewise.
6573 * commands/i386/cpuid.c (has_longmode): Make static.
6574 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
6575 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
6577 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
6578 GDT. This is more robust, as %ds can change.
6579 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
6580 calling real_to_prot().
6581 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
6583 2008-03-28 Pavel Roskin <proski@gnu.org>
6585 * kern/i386/pc/startup.S: Assert that uncompressed functions
6586 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
6587 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
6588 code, as they push parts of the code (error handlers) beyond
6589 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
6590 code as correctness and size.
6592 2008-03-28 Pavel Roskin <proski@gnu.org>
6594 * kern/i386/pc/startup.S
6595 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
6596 data block address to the real mode, keep offset minimal. This
6597 works around a bug in AWARD BIOS on old Athlon systems, which
6598 makes CD detection hang.
6600 2008-03-26 Pavel Roskin <proski@gnu.org>
6602 * normal/color.c (grub_parse_color_name_pair): Make `name' a
6604 * include/grub/normal.h: Add grub_parse_color_name_pair()
6607 2008-03-24 Bean <bean123ch@gmail.com>
6609 * disk/i386/pc/biosdisk.c (cd_start): Removed.
6610 (cd_count): Removed.
6611 (cd_drive): New variable.
6612 (grub_biosdisk_get_drive): Don't check for (cdN) device.
6613 (grub_biosdisk_call_hook): Likewise.
6614 (grub_biosdisk_iterate): Change cdrom detection method.
6615 (grub_biosdisk_open): Replace cd_start with cd_drive.
6616 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6617 detect cdrom device.
6619 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
6621 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
6622 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
6623 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
6624 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
6625 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
6626 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
6627 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
6628 (grub_biosdisk_cdrp): New structure.
6629 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
6631 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
6633 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
6636 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
6639 2008-03-20 Robert Millan <rmh@aybabtu.com>
6641 Remove 2 TiB limit in ata.mod.
6642 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
6643 (grub_ata_dumpinfo): Print sector count with 0x%llx.
6644 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
6645 grub_uint64_t instead of grub_uint32_t.
6647 2008-03-05 Bean <bean123ch@gmail.com>
6649 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
6650 (grub_multiboot): Set boot device.
6652 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
6654 2008-03-02 Bean <bean123ch@gmail.com>
6656 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
6659 2008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
6661 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
6664 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
6667 * docs/fdl.texi: New file.
6669 * docs/mdate-sh: New file. Copied from gnulib.
6670 * docs/texinfo.tex: Likewise.
6672 * config.guess: Updated from gnulib.
6673 * install-sh: Likewise.
6675 2008-02-28 Robert Millan <rmh@aybabtu.com>
6677 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
6678 (aout_mod_SOURCES): New variable.
6679 (aout_mod_CFLAGS): Likewise.
6680 (aout_mod_LDFLAGS): Likewise.
6682 * conf/i386-ieee1275.rmk: Likewise.
6684 2008-02-28 Robert Millan <rmh@aybabtu.com>
6686 * util/update-grub.in: Reorganise terminal validity check. Accept
6687 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
6688 Based on suggestion by Franklin PIAT.
6690 2008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
6692 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
6694 * util/getroot.c (grub_util_check_block_device): New function that
6695 returns the given argument if it is a block device and returns NULL else.
6696 * util/grub-probe.c (argument_is_device): New variable.
6697 (probe): Promote device_name from a variable to an argument. Receive
6698 device_name from grub_util_check_block_device() if path is NULL and from
6699 grub_guess_root_device() else. Do not free() device_name anymore.
6700 (options): Introduce new parameter '-d, --device'.
6701 (main): Add description of the new parameter to the help screen.
6702 Rename path variable to argument. Set argument_is_device if the '-d'
6703 option is given. Pass argument to probe() depending on
6706 2008-02-24 Bean <bean123ch@gmail.com>
6708 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
6709 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
6710 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
6711 (GRUB_ISO9660_VOLDESC_PART): Likewise.
6712 (GRUB_ISO9660_VOLDESC_END): Likewise.
6713 (grub_iso9660_primary_voldesc): New member escape.
6714 (grub_iso9660_data): New member joliet.
6715 (grub_iso9660_convert_string): New function.
6716 (grub_iso9660_mount): Detect joliet extension.
6717 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
6718 (grub_iso9660_iso9660_label): Likewise.
6720 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
6721 (grub_setup_SOURCES): Add fs/udf.c.
6722 (grub_fstest_SOURCES): Likewise.
6723 (udf_mod_SOURCES): New variable.
6724 (udf_mod_CFLAGS): Likewise.
6725 (udf_mod_LDFLAGS): Likewise.
6727 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
6728 (grub_emu_SOURCES): Likewise.
6730 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6732 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6734 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6736 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6738 * fs/udf.c: New file.
6740 2008-02-24 Robert Millan <rmh@aybabtu.com>
6742 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
6743 (normal/lexer.c_DEPENDENCIES): New variables.
6744 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6745 (normal/lexer.c_DEPENDENCIES): Likewise.
6746 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
6747 (normal/lexer.c_DEPENDENCIES): Likewise.
6748 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
6749 (normal/lexer.c_DEPENDENCIES): Likewise.
6750 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6751 (normal/lexer.c_DEPENDENCIES): Likewise.
6752 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6753 (normal/lexer.c_DEPENDENCIES): Likewise.
6755 2008-02-23 Robert Millan <rmh@aybabtu.com>
6757 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
6758 since they were intended to be in hex. This didn't break previously
6759 because of a bug in gpt_partition_map_iterate() (see below).
6761 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
6762 when checking the validity of GPT header.
6763 Remove `partno', since it always provides the same information as `i'.
6765 2008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
6767 * include/grub/efi/time.h: Fix a wrong comment.
6769 2008-02-19 Pavel Roskin <proski@gnu.org>
6771 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
6774 2008-02-19 Bean <bean123ch@gmail.com>
6776 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
6777 (aout_mod_SOURCES): New variable.
6778 (aout_mod_CFLAGS): Likewise.
6779 (aout_mod_LDFLAGS): Likewise.
6780 (_bsd_mod_SOURCES): New variable.
6781 (_bsd_mod_CFLAGS): Likewise.
6782 (_bsd_mod_LDFLAGS): Likewise.
6783 (bsd_mod_SOURCES): New variable.
6784 (bsd_mod_CFLAGS): Likewise.
6785 (bsd_mod_LDFLAGS): Likewise.
6787 * include/grub/aout.h: New file.
6789 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
6791 * include/grub/i386/bsd.h: New file.
6793 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
6796 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
6797 function is called, so that it's possible to change it inside the hook.
6798 (grub_elf64_load): Likewise.
6799 (grub_elf_file): Don't close the file if elf header is not found.
6800 (grub_elf_close): Close the file if grub_elf_file fails (The new
6801 grub_elf_file won't close it).
6802 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
6803 (grub_elf64_size): Likewise.
6805 * kern/i386/loader.S (grub_unix_real_boot): New function.
6807 * loader/aout.c: New file.
6809 * loader/i386/bsd.c: New file.
6811 * loader/i386/bsd_normal.c: New file.
6813 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
6815 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
6816 can test other formats.
6818 2008-02-19 Robert Millan <rmh@aybabtu.com>
6820 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
6821 (grub_gpt_partition_type_empty): Redefine with macro from
6822 `<grub/gpt_partition.h>'.
6823 (gpt_partition_map_iterate): Adjust partition type comparison.
6825 Export `entry' as partmap-specific `part.data' struct.
6826 (grub_gpt_header, grub_gpt_partentry): Move from here ...
6828 * include/grub/gpt_partition.h (grub_gpt_header)
6829 (grub_gpt_partentry): ... to here (new file).
6831 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
6833 (grub_gpt_partition_type_bios_boot): New const variable, defined
6834 with macro from `<grub/gpt_partition.h>'.
6836 (setup): Replace `first_start' with `embed_region', which keeps
6837 track of the embed region (and is partmap-agnostic).
6839 Replace find_first_partition_start() with find_usable_region(),
6840 which finds a usable region for embedding using partmap-specific
6841 knowledge (supports PC/MSDOS and GPT).
6843 Fix all assumptions that the embed region start at sector 1, using
6844 `embed_region.start' from now on. Similarly, use `embed_region.end'
6845 rather than `first_start' to calculate available size.
6847 In grub_util_info() message, replace "into after the MBR" with an
6848 indication of the specific sector our embed region starts at.
6850 2008-02-19 Robert Millan <rmh@aybabtu.com>
6852 * DISTLIST: Replace `commands/ieee1275/halt.c' and
6853 `commands/ieee1275/reboot.c' with `commands/halt.c' and
6854 `commands/reboot.c'.
6855 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6856 (halt_mod_SOURCES): Likewise.
6857 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6858 (halt_mod_SOURCES): Likewise.
6860 2008-02-17 Christian Franke <franke@computer.org>
6862 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
6864 2008-02-17 Robert Millan <rmh@aybabtu.com>
6866 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6867 set `first_start' to 0 for non-PC/MSDOS partition maps.
6869 2008-02-16 Robert Millan <rmh@aybabtu.com>
6871 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6872 do not assume partition map is PC/MSDOS before performing checks that
6873 are specific to that layout.
6875 2008-02-13 Robert Millan <rmh@aybabtu.com>
6877 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
6878 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
6879 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
6881 2008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
6883 * configure.ac: Only a cosmetic change on the handling of
6884 -fno-stack-protector.
6886 2008-02-12 Alexandre Boeglin <alex@boeglin.org>
6888 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
6889 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
6891 (grub_install_SOURCES): Add halt.mod and reboot.mod.
6892 (halt_mod_SOURCES): New variable.
6893 (halt_mod_CFLAGS): Likewise.
6894 (halt_mod_LDFLAGS): Likewise.
6895 (reboot_mod_SOURCES): Likewise.
6896 (reboot_mod_CFLAGS): Likewise.
6897 (reboot_mod_LDFLAGS): Likewise.
6899 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
6900 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
6902 (halt_mod_SOURCES): Likewise.
6903 (reboot_mod_SOURCES): Likewise.
6905 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
6906 commands/i386/pc/reboot.c by commands/reboot.c.
6907 (reboot_mod_SOURCES): Likewise.
6909 * commands/i386/pc/reboot.c: merge this file ...
6911 * commands/ieee1275/reboot.c: ... and this file ...
6913 * commands/reboot.c: ... to this file.
6914 Add some precompiler directive to include the correct header for
6917 * commands/ieee1275/halt.c: move this file ...
6919 * commands/halt.c: ... to here.
6920 Add some precompiler directive to include the correct header for
6923 * include/grub/efi/efi.h (grub_reboot): New function declaration.
6924 (grub_halt): Likewise.
6926 * kern/efi/efi.c (grub_reboot): New function.
6927 (grub_halt): Likewise.
6929 2008-02-12 Robert Millan <rmh@aybabtu.com>
6931 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
6932 /dev (like it is done for /dev/mapper). This doesn't provide support
6933 for EVMS, but at least it is now easy to identify the problem when it
6936 2008-02-11 Robert Millan <rmh@aybabtu.com>
6938 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
6939 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
6940 comparing it with -1, not 0.
6942 2008-02-10 Robert Millan <rmh@aybabtu.com>
6944 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
6946 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6947 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
6949 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
6950 `disk/lvm.c' to the end of the list.
6951 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6952 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6954 2008-02-10 Robert Millan <rmh@aybabtu.com>
6956 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
6957 grub_print_error() instead. This will let user know why we're entering
6959 Based on suggestions from Sam Morris.
6961 2008-02-10 Alexandre Boeglin <alex@boeglin.org>
6963 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
6964 on remaining N args, instead of "--" arg N times.
6966 2008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
6968 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
6969 (fill_with_default_glyph): Changed to use unknown_glyph for fill
6970 pattern for unknown glyphs.
6972 2008-02-09 Robert Millan <rmh@aybabtu.com>
6974 * configure.ac: Probe for `help2man'.
6975 * Makefile.in (builddir): New variable.
6976 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
6977 or otherwise add a few flags/options to it.
6978 (install-local): For every executable utility or script that is
6979 installed, invoke $(HELP2MAN) to install a manpage based on --help
6982 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
6983 that it doesn't prevent --help from working in build tree.
6985 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
6986 with `bug-grub@gnu.org'.
6987 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
6988 * util/update-grub.in (usage): New function.
6989 Implement proper argument check, with support for --help and --version
6990 (as well as existing -y).
6992 2008-02-09 Christian Franke <franke@computer.org>
6994 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
6995 avoid overwriting previous output.
6996 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
6998 2008-02-09 Robert Millan <rmh@aybabtu.com>
7000 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7003 2008-02-09 Robert Millan <rmh@aybabtu.com>
7005 * commands/sleep.c: New file.
7006 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7007 (sleep_mod_SOURCES): New variable.
7008 (sleep_mod_CFLAGS): Likewise.
7009 (sleep_mod_LDFLAGS): Likewise.
7011 2008-02-09 Robert Millan <rmh@aybabtu.com>
7013 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7014 situations in which we can deduce the RAID size and the superblock
7017 2008-02-09 Robert Millan <rmh@aybabtu.com>
7019 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
7020 and return a grub_diskmemberlist_t composed of LVM physical volumes.
7021 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7023 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
7024 and return a grub_diskmemberlist_t composed of physical array members.
7025 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7027 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7029 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7030 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7031 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7033 * util/grub-probe.c (probe): Move partmap probing code from here ...
7034 (probe_partmap): ... to here.
7035 (probe): Use probe_partmap() once for the disk we're probing, and
7036 additionally, when such disk contains a memberlist() struct member,
7037 once for each disk that is contained in the structure returned by
7040 2008-02-09 Robert Millan <rmh@aybabtu.com>
7042 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7043 environment variable to 'all' in order to obtain debug output from
7045 * util/i386/pc/grub-setup.c (main): Likewise.
7047 2008-02-08 Robert Millan <rmh@aybabtu.com>
7049 * disk/raid.c (grub_raid_scan_device): Check for
7050 `array->device[sb.this_disk.number]' rather than for
7051 `array->device[sb.this_disk.number]->name', since the latter is not
7052 guaranteed to be accessible.
7054 2008-02-08 Robert Millan <rmh@aybabtu.com>
7056 * disk/raid.c: Update copyright.
7057 * fs/cpio.c: Likewise.
7058 * include/grub/raid.h: Likewise.
7059 * loader/i386/pc/multiboot.c: Likewise.
7060 * util/hostfs.c: Likewise.
7062 2008-02-08 Robert Millan <rmh@aybabtu.com>
7064 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7065 to a grub_disk_t array.
7066 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7068 (grub_raid_scan_device): Replace `device[x].name' accesses with
7069 `device[x]->name'. Simplify initialization of `array->device[x]'.
7071 2008-02-08 Robert Millan <rmh@aybabtu.com>
7073 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
7074 grub_dprintf() calls.
7075 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
7078 2008-02-07 Christian Franke <franke@computer.org>
7080 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
7081 instead of fseek and ftell to support large files.
7082 (grub_hostfs_read): Likewise.
7084 2008-02-07 Robert Millan <rmh@aybabtu.com>
7086 Patch from Jeroen Dekkers.
7087 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
7088 failure, since successfully reading all array members might not be
7091 2008-02-06 Robert Millan <rmh@aybabtu.com>
7093 * util/grub-probe.c (probe): Simplify partmap probing (with the
7094 assumption that the first word up to the underscore equals to
7097 2008-02-06 Christian Franke <franke@computer.org>
7099 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
7100 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
7101 last block of a cpio or tar stream.
7102 Check for "TRAILER!!!" instead of any empty data
7103 block to detect last block of a cpio stream.
7104 (grub_cpio_dir): Fix constness of variable np.
7105 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
7106 cpio or tar trailer is detected. This fixes a crash
7107 on open of a non existing file.
7109 2008-02-05 Bean <bean123ch@gmail.com>
7111 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
7113 (grub_multiboot_load_elf64): Likewise.
7114 (grub_multiboot): Initialize mbi structure.
7116 * util/grub-fstest.c: Don't include unused header file script.h.
7118 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
7120 (grub_fstest_SOURCES): Likewise.
7122 2008-02-05 Robert Millan <rmh@aybabtu.com>
7124 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
7125 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
7126 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
7127 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
7129 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
7130 (translation_table): Replace hardcoded values with macros
7131 provided by `<grub/term.h>'.
7133 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
7134 (keyboard_map): Correct/add a few values, with macros provided
7136 (keyboard_map_shift): Zero values that don't differ from their
7137 `keyboard_map' equivalents.
7138 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
7139 Discard the second scan code that is always sent by Caps lock.
7140 Only use `keyboard_map_shift' when it provides a non-zero value,
7141 otherwise fallback to `keyboard_map'.
7143 2008-02-04 Bean <bean123ch@gmail.com>
7145 * Makefile.in (enable_grub_fstest): New variable.
7147 * conf/common.rmk (grub_fstest_init.lst): New rule.
7148 (grub_fstest_init.h): Likewise.
7149 (grub_fstest_init.c): Likewise.
7150 (util/grub-fstest.c_DEPENDENCIES): New variable.
7151 (grub_fstest_SOURCES): Likewise.
7153 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
7155 * util/grub-fstest.c: New file.
7157 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7159 Make grub-setup handle a separate root device.
7161 * util/i386/pc/grub-setup.c (setup): Always open the root device,
7162 so that the root device can be compared with the destination
7164 When embedding the core image, if the root and destination devices
7165 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
7167 When not embedding, set ROOT_DRIVE to 0xFF.
7169 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7171 Add support for having a grub directory in a different drive. This
7172 is still only the data handling part.
7174 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
7175 (codestart): Save %dh in GRUB_ROOT_DRIVE.
7176 (grub_root_drive): New variable.
7178 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
7179 instead of GRUB_BOOT_DRIVE to construct a device name. Set
7180 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
7183 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
7185 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
7187 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
7189 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
7190 is bogus, because PXE booting does not specify any drive
7193 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
7194 am not sure if this is really correct.
7196 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
7197 is always identical to the boot drive when booting from a CD.
7199 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
7201 (root_drive): New variable.
7202 (real_start): Unconditionally set %dh to ROOT_DRIVE.
7203 (setup_sectors): Push %dx right after popping it, because %dh will
7205 (copy_buffer): Restore %dx.
7207 2008-02-03 Robert Millan <rmh@aybabtu.com>
7209 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7210 use `cdboot.img' for cdrom images.
7212 2008-02-03 Robert Millan <rmh@aybabtu.com>
7214 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7215 only setup gfxterm when `font' command has succeeded.
7217 2008-02-03 Robert Millan <rmh@aybabtu.com>
7219 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7220 (grub_rescue_cmd_multiboot_loader)
7221 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7223 2008-02-03 Pavel Roskin <proski@gnu.org>
7225 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
7226 %edx and %esi from stack only after grub_gate_a20() is called.
7227 grub_gate_a20() clobbers %edx.
7229 2008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7231 * configure.ac (AC_INIT): Bumped to 1.96.
7233 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7234 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7235 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7236 video/readers/png.c.
7238 2008-02-03 Bean <bean123ch@gmail.com>
7240 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7241 (cdboot_img_SOURCES): New variable.
7242 (cdboot_img_ASFLAGS): New variable.
7243 (cdboot_img_LDFLAGS): New variable.
7245 * boot/i386/pc/cdboot.S: New file.
7247 * disk/i386/pc/biosdisk.c (cd_start): New variable.
7248 (cd_count): Likewise.
7249 (grub_biosdisk_get_drive): Add support for cd device.
7250 (grub_biosdisk_call_hook): Likewise.
7251 (grub_biosdisk_iterate): Likewise.
7252 (grub_biosdisk_open): Likewise.
7253 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7254 (grub_biosdisk_rw): Support reading from cd device.
7255 (GRUB_MOD_INIT): Iterate cd devices.
7257 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7258 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7259 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7261 * kern/i386/pc/init.c (make_install_device): Check for cd device.
7263 2008-02-02 Robert Millan <rmh@aybabtu.com>
7265 * commands/read.c: New file.
7266 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7267 (read_mod_SOURCES): New variable.
7268 (read_mod_CFLAGS): Likewise.
7269 (read_mod_LDFLAGS): Likewise.
7271 2008-02-02 Robert Millan <rmh@aybabtu.com>
7273 * normal/main.c (grub_normal_execute): Check for `menu->size' when
7274 determining whether menu has to be displayed.
7276 2008-02-02 Marco Gerards <marco@gnu.org>
7278 * bus/pci.c: New file.
7280 * include/grub/pci.h: Likewise.
7282 * include/grub/i386/pc/pci.h: Likewise.
7284 * commands/lspci.c: Likewise.
7286 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7288 (pci_mod_SOURCES): New variable.
7289 (pci_mod_CFLAGS): Likewise.
7290 (pci_mod_LDFLAGS): Likewise.
7291 (lspci_mod_SOURCES): Likewise.
7292 (lspci_mod_CFLAGS): Likewise.
7293 (lspci_mod_LDFLAGS): Likewise.
7295 2008-02-02 Bean <bean123ch@gmail.com>
7297 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7298 (grub_ufs_get_file_block): Fix indirect block calculation problem.
7300 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7301 (grub_xfs_btree_node): New structure.
7302 (grub_xfs_btree_root): New structure.
7303 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7304 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7305 (GRUB_XFS_EXTENT_BLOCK): Likewise.
7306 (GRUB_XFS_EXTENT_SIZE): Likewise.
7307 (grub_xfs_read_block): Support btree format type.
7308 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7309 Use directory block as basic unit.
7311 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7313 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7314 __attribute__ ((__regparm__ (1))).
7316 2008-02-01 Robert Millan <rmh@aybabtu.com>
7318 Correct a mistake in previous commit.
7320 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7322 (normal/command.c_DEPENDENCIES): New variable.
7324 2008-02-01 Robert Millan <rmh@aybabtu.com>
7326 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7328 (normal/command.c_DEPENDENCIES): New variable.
7329 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7330 * conf/i386-ieee1275.rmk: Likewise.
7331 * conf/i386-linuxbios.rmk: Likewise.
7332 * conf/i386-pc.rmk: Likewise.
7333 * conf/sparc64-ieee1275.rmk: Likewise.
7334 * conf/powerpc-ieee1275.rmk: Likewise.
7335 (grub_emu_SOURCES): Add `fs/fshelp.c'.
7337 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7339 2008-02-01 Robert Millan <rmh@aybabtu.com>
7341 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7342 call at beginning of function.
7344 2008-01-31 Pavel Roskin <proski@gnu.org>
7346 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
7347 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7348 (grub_mkrescue_SOURCES): Likewise.
7349 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7351 2008-01-30 Robert Millan <rmh@aybabtu.com>
7353 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7354 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7355 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7356 (grub_probe_SOURCES): ... to here.
7358 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7359 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7360 * conf/i386-ieee1275.rmk: Likewise.
7361 * conf/i386-linuxbios.rmk: Likewise.
7362 * conf/powerpc-ieee1275.rmk: Likewise.
7364 2008-01-30 Tristan Gingold <gingold@free.fr>
7366 * kern/rescue.c: Silently accept empty lines.
7368 2008-01-29 Bean <bean123ch@gmail.com>
7370 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7371 (real_code_2): Code cleanup and change comment style.
7372 (move_memory): Avoid using 32-bit address mode.
7374 2008-01-29 Bean <bean123ch@gmail.com>
7376 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7377 (png_mod_SOURCES): New variable.
7378 (png_mod_CFLAGS): Likewise.
7379 (png_mod_LDFLAGS): Likewise.
7381 * video/readers/png.c: New file.
7383 2008-01-28 Robert Millan <rmh@aybabtu.com>
7385 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7386 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7387 `ifndef GRUB_MOD_GAP' hack.
7388 * util/elf/grub-mkimage.c (add_segments): Likewise.
7390 2008-01-27 Robert Millan <rmh@aybabtu.com>
7392 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7393 `GRUB_MOD_GAP' for platforms in which it's not defined.
7394 * util/elf/grub-mkimage.c (add_segments): Likewise.
7396 2008-01-27 Robert Millan <rmh@aybabtu.com>
7398 Get grub-emu to build again (including parallel builds).
7400 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7402 (util/grub-emu.c_DEPENDENCIES): ... this, ...
7403 (normal/execute.c_DEPENDENCIES): ... this, ...
7404 (grub-emu_DEPENDENCIES): ... and this.
7406 * conf/i386-efi.rmk: Likewise.
7407 * conf/i386-linuxbios.rmk: Likewise.
7408 * conf/i386-ieee1275.rmk: Likewise.
7409 * conf/powerpc-ieee1275.rmk: Likewise.
7410 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7412 2008-01-27 Robert Millan <rmh@aybabtu.com>
7414 * NEWS: Add a few items.
7416 2008-01-27 Robert Millan <rmh@aybabtu.com>
7418 Fix parallel builds with grub-emu. Based on earlier commit for
7419 grub-probe and grub-setup.
7421 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7422 (util/grub-emu.c_DEPENDENCIES): ... this.
7423 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7424 (util/grub-emu.c_DEPENDENCIES): ... this.
7425 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7426 (util/grub-emu.c_DEPENDENCIES): ... this.
7427 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7428 (util/grub-emu.c_DEPENDENCIES): ... this.
7429 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7430 (util/grub-emu.c_DEPENDENCIES): ... this.
7432 2008-01-27 Pavel Roskin <proski@gnu.org>
7434 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7435 to create a gap between _end and the modules added to the image
7436 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
7437 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7438 * util/elf/grub-mkimage.c (add_segments): Likewise.
7440 2008-01-26 Pavel Roskin <proski@gnu.org>
7442 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7443 just return an error.
7445 2008-01-26 Bean <bean123ch@gmail.com>
7447 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7448 (grub_reiserfs_get_item): Save offset of the next item.
7449 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7451 2008-01-25 Robert Millan <rmh@aybabtu.com>
7453 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7454 make all filesystem sources appear together (possibly fixing omissions
7456 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7457 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7458 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7459 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7461 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
7463 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7464 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7465 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7466 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7468 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7469 (probe): Add a sanity check to make sure of our ability to read
7470 requested files when probing for filesystem type.
7472 * genmk.rb: Update copyright year (2007).
7474 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7475 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7476 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7477 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7478 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7479 : Remove function prototypes.
7481 2008-01-25 Robert Millan <rmh@aybabtu.com>
7483 Revert my previous commits (based on wrong assumption of how grub_errno
7486 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
7487 * kern/file.c (grub_file_open): Likewise.
7489 2008-01-24 Pavel Roskin <proski@gnu.org>
7491 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7492 that hang if GRUB tries to setup colors.
7493 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7494 colors for firmwares that don't support it.
7495 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7496 Recognize Open Hack'Ware, set flags to work around its
7499 2008-01-24 Robert Millan <rmh@aybabtu.com>
7501 * kern/file.c (grub_file_open): Do not account previous failures of
7502 unrelated functions when grub_errno is checked for.
7503 Reported by Oleg Strikov.
7505 2008-01-24 Bean <bean123ch@gmail.com>
7507 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7508 (grub_ufs_sblock): New member volume name.
7509 (grub_ufs_find_file): Fix string copy bug.
7510 (grub_ufs_label): Implement this function properly.
7512 * fs/hfs.c (grub_hfs_cnid_type): New enum.
7513 (grub_hfs_iterate_records): Use the correct file number for extents
7514 and catalog file. Fix problem in next index calculation.
7515 (grub_hfs_find_node): Replace recursive function call with loop.
7516 (grub_hfs_iterate_dir): Replace recursive function call with loop.
7518 2008-01-23 Robert Millan <rmh@aybabtu.com>
7520 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7521 `<grub/symbol.h>' and `<grub/multiboot.h>'.
7522 (grub_multiboot2_real_boot): New function prototype.
7524 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7525 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7527 * kern/i386/ieee1275/init.c (grub_os_area_addr)
7528 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7530 2008-01-23 Robert Millan <rmh@aybabtu.com>
7532 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7533 #ifdef'ed out grub_printf().
7535 2008-01-23 Robert Millan <rmh@aybabtu.com>
7537 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7538 grub_dprintf calls, since they make "debug=all" mode unusable.
7539 (grub_console_checkkey): Likewise.
7541 2008-01-23 Robert Millan <rmh@aybabtu.com>
7543 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7544 `term/i386/pc/at_keyboard.c'.
7545 (pkglib_MODULES): Add `serial.mod'.
7546 (serial_mod_SOURCES): New variable.
7547 (serial_mod_CFLAGS): Likewise.
7548 (serial_mod_LDFLAGS): Likewise.
7550 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
7551 `<grub/powerpc/ieee1275/console.h>'.
7552 (grub_keyboard_controller_init): New function prototype.
7553 (grub_console_checkkey): Likewise.
7554 (grub_console_getkey): Likewise.
7556 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7559 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7560 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7562 2008-01-23 Robert Millan <rmh@aybabtu.com>
7564 * kern/i386/pc/init.c (make_install_device): When memdisk image is
7565 present, "(memdisk)/boot/grub" becomes the default prefix.
7567 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
7568 a memdisk tarball with all the modules. Add --overlay=DIR option that
7569 allows users to overlay additional files into the image.
7571 2008-01-23 Robert Millan <rmh@aybabtu.com>
7573 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
7574 and `machine/memory.h'.
7575 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
7576 (_multiboot_mod_SOURCES): New variable.
7577 (_multiboot_mod_CFLAGS): Likewise.
7578 (_multiboot_mod_LDFLAGS): Likewise.
7579 (multiboot_mod_SOURCES): Likewise.
7580 (multiboot_mod_CFLAGS): Likewise.
7581 (multiboot_mod_LDFLAGS): Likewise.
7583 * include/grub/i386/ieee1275/loader.h: New file.
7585 * include/grub/i386/ieee1275/machine.h: Likewise.
7587 * include/grub/i386/ieee1275/memory.h: Likewise.
7589 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
7590 variable declaration.
7591 (grub_os_area_size): Likewise.
7593 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
7594 (grub_lower_mem, grub_upper_mem): New variables.
7595 (grub_stop_floppy): New function (just to make
7596 grub_multiboot2_real_boot() happy).
7598 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
7599 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
7600 (grub_stop): New function.
7601 Include `"../realmode.S"' and `"../loader.S"'.
7603 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7604 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7606 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7607 rely on grub_multiboot2_real_boot() for final boot.
7609 2008-01-22 Robert Millan <rmh@aybabtu.com>
7611 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7612 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7613 device that doesn't look like an SD card.
7614 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7615 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7616 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7617 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
7620 2008-01-22 Robert Millan <rmh@aybabtu.com>
7622 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
7623 avoid claiming over our own code.
7625 2008-01-22 Bean <bean123ch@gmail.com>
7627 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
7628 (jpeg_mod_SOURCES): New variable.
7629 (jpeg_mod_CFLAGS): Likewise.
7630 (jpeg_mod_LDFLAGS): Likewise.
7632 * video/readers/jpeg.c : New file.
7634 2008-01-22 Bean <bean123ch@gmail.com>
7636 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
7637 there are no more items.
7639 2008-01-21 Robert Millan <rmh@aybabtu.com>
7641 * kern/mm.c (grub_mm_init_region): Improve debug message.
7643 2008-01-21 Robert Millan <rmh@aybabtu.com>
7645 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
7646 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
7648 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
7650 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
7651 Indicates start of upper memory.
7652 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
7653 (generate_image): Abort when image size is big enough to corrupt
7656 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
7657 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
7658 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7659 instead of hardcoding 0xA0000.
7660 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
7661 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7662 instead of hardcoding 0xA0000.
7664 2008-01-21 Robert Millan <rmh@aybabtu.com>
7666 * disk/memdisk.c (memdisk_size): New variable.
7667 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
7669 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
7670 image to dynamic memory.
7671 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
7672 `memdisk_size'. Free memdisk block.
7674 2008-01-21 Robert Millan <rmh@aybabtu.com>
7676 Fix detection of very small filesystems (like tar).
7678 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
7679 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
7680 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
7681 a problem with this disk).
7683 2008-01-21 Robert Millan <rmh@aybabtu.com>
7685 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
7686 on grub_biosdisk_rw_standard() error.
7688 2008-01-21 Robert Millan <rmh@aybabtu.com>
7690 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
7692 * kern/elf.c: Likewise.
7693 * kern/ieee1275/ieee1275.c: Likewise.
7694 * kern/powerpc/ieee1275/openfw.c: Likewise.
7695 * term/ieee1275/ofconsole.c: Likewise.
7697 2008-01-21 Robert Millan <rmh@aybabtu.com>
7699 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
7701 * include/grub/kernel.h (grub_arch_memdisk_addr)
7702 (grub_arch_memdisk_size): Moved from here ...
7704 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
7705 (grub_arch_memdisk_size): ... to here.
7707 2008-01-21 Robert Millan <rmh@aybabtu.com>
7709 Mostly based on bugfix from Bean.
7711 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
7712 attribute with hook() parameter.
7713 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
7715 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
7716 attribute with hook() parameter.
7717 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
7720 2008-01-21 Robert Millan <rmh@aybabtu.com>
7722 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
7723 (pkglib_MODULES): Add `memdisk.mod'.
7724 (memdisk_mod_SOURCES): New variable.
7725 (memdisk_mod_CFLAGS): Likewise.
7726 (memdisk_mod_LDFLAGS): Likewise.
7728 * disk/memdisk.c: New file.
7730 * include/grub/disk.h (grub_disk_dev_id): Add
7731 `GRUB_DISK_DEVICE_MEMDISK_ID'.
7733 * include/grub/i386/pc/kernel.h
7734 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
7735 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
7736 (grub_kernel_image_size): New variable declaration.
7737 (grub_total_module_size): Likewise.
7738 (grub_memdisk_image_size): Likewise.
7740 * include/grub/i386/pc/memory.h
7741 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
7743 * include/grub/kernel.h: Include `<grub/symbol.h>'.
7744 (grub_arch_memdisk_addr): New variable declaration.
7745 (grub_arch_memdisk_size): Likewise.
7747 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
7748 (grub_arch_memdisk_size): Likewise.
7750 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
7751 (codestart): Replace hardcoded `0x100000' with
7752 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
7754 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
7755 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
7756 not NULL, append the contents of the file it refers to, at the end of
7757 the compressed kernel image. Initialize `grub_memdisk_image_size'
7758 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
7759 (options): Add "memdisk"|'m' option.
7760 (main): Parse --memdisk|-m option, and pass user-provided path as
7761 parameter to generate_image().
7763 2008-01-20 Robert Millan <rmh@aybabtu.com>
7765 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
7766 grub_dprintf() calls from here ...
7767 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
7769 2008-01-20 Robert Millan <rmh@aybabtu.com>
7771 Fix detection of "real mode" when /options/real-mode? doesn't exist.
7773 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
7775 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
7776 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
7777 `GRUB_IEEE1275_FLAG_REAL_MODE'.
7778 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
7780 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
7781 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
7783 2008-01-19 Robert Millan <rmh@aybabtu.com>
7785 Get rid of confusing function (superseded by
7786 `grub_ieee1275_get_integer_property')
7787 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
7789 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
7791 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
7792 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
7793 in native endianness from grub_ieee1275_get_integer_property().
7795 2008-01-19 Robert Millan <rmh@aybabtu.com>
7797 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
7798 command after "shut-down", since implementations differ on which
7799 the command for halt is.
7801 2008-01-19 Robert Millan <rmh@aybabtu.com>
7803 * include/grub/i386/linuxbios/console.h: Add header protection.
7804 (grub_keyboard_controller_init): New function prototype.
7805 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
7806 (KEYBOARD_COMMAND_READ): Likewise.
7807 (KEYBOARD_COMMAND_WRITE): Likewise.
7808 (KEYBOARD_SCANCODE_SET1): Likewise.
7809 (grub_keyboard_controller_write): New function.
7810 (grub_keyboard_controller_read): Likewise.
7811 (grub_keyboard_controller_init): Likewise.
7813 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
7814 (grub_console_init): On coreboot/LinuxBIOS, call
7815 grub_keyboard_controller_init().
7817 2008-01-19 Robert Millan <rmh@aybabtu.com>
7819 PowerPC changes provided by Pavel Roskin.
7821 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
7822 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
7823 don't rely on cmain() doing it.
7824 * kern/i386/ieee1275/startup.S (_start): Store %eax in
7825 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
7827 2008-01-16 Robert Millan <rmh@aybabtu.com>
7829 * include/grub/i386/linuxbios/memory.h
7830 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
7831 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
7832 receive `table_header' as argument. Instead, probe for it in the
7833 known memory ranges where it can be present.
7834 (grub_available_iterate): Do not pass a fixed `table_header' address
7835 to grub_linuxbios_table_iterate().
7837 2008-01-15 Robert Millan <rmh@aybabtu.com>
7839 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
7840 * conf/i386-ieee1275.rmk: New file.
7841 * include/grub/i386/ieee1275/console.h: Likewise.
7842 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
7843 * include/grub/i386/ieee1275/kernel.h: Likewise.
7844 * include/grub/i386/ieee1275/time.h: Likewise.
7845 * kern/i386/ieee1275/init.c: Likewise.
7846 * kern/i386/ieee1275/startup.S: Likewise.
7848 2008-01-15 Robert Millan <rmh@aybabtu.com>
7850 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
7851 when pointers are 32-bit (but still do set it to one when they are
7854 2008-01-15 Robert Millan <rmh@aybabtu.com>
7856 * include/grub/ieee1275/ieee1275.h
7857 (grub_ieee1275_get_integer_property): New function prototype.
7859 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
7860 (grub_ieee1275_get_integer_property): New function. Wraps around
7861 grub_ieee1275_get_property() to handle endianness.
7863 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
7864 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
7866 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
7867 (grub_map): Likewise.
7868 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
7870 2008-01-15 Bean <bean123ch@gmail.com>
7872 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
7873 (grub_script_execute_cmdline): Reset grub_errno.
7875 * normal/main.c (read_config_file): Reset grub_errno.
7877 * normal/parse.y (script_init): New.
7878 (script): Move function and menuentry here.
7880 (command): Add delimiter at the end of command.
7881 (commands): Adjust to match the new command.
7882 (commandblock): Remove grub_script_lexer_record_start.
7883 (menuentry): Add grub_script_lexer_record_start, use the new commands.
7884 (if): Use the new commands.
7886 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
7888 2008-01-15 Robert Millan <rmh@aybabtu.com>
7890 * normal/menu.c (run_menu): Move timeout message from here ...
7891 (print_timeout): ... to here.
7892 (run_menu): Use print_timeout() once during initial draw to print
7893 the whole message, and again in every clock tick to update only
7894 the number of seconds.
7896 2008-01-15 Robert Millan <rmh@aybabtu.com>
7898 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
7899 actual size of `available' from grub_ieee1275_get_property(), and
7900 restrict parsing to that bound.
7902 2008-01-15 Christian Franke <franke@computer.org>
7904 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
7905 (argp_program_version): Remove variable.
7906 (argp_program_bug_address): Likewise.
7907 (options): Convert from struct argp_option to struct option.
7908 (struct arguments): Remove.
7909 (parse_opt): Remove.
7910 (usage): New function.
7911 (main): Replace struct args members by simple variables.
7912 Replace argp_parse() by getopt_long().
7913 Add switch to evaluate options.
7914 Add missing "(...)" around root_dev in prefix string.
7916 2008-01-14 Robert Millan <rmh@aybabtu.com>
7918 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
7919 for grub_ieee1275_exit(), in order to improve portability.
7921 2008-01-14 Robert Millan <rmh@aybabtu.com>
7923 * util/grub.d/10_linux.in (prefix): Define.
7924 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
7926 2008-01-13 Pavel Roskin <proski@gnu.org>
7928 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
7929 grub_errno if no errors have been detected.
7931 2008-01-12 Robert Millan <rmh@aybabtu.com>
7933 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
7934 (grub_util_get_dev_abstraction): New function prototype.
7936 * util/getroot.c: Include `<grub/util/getroot.h>'
7937 (grub_util_get_grub_dev): Move detection of abstraction type to ...
7938 (grub_util_get_dev_abstraction): ... here (new function).
7940 * util/grub-probe.c: Convert PRINT_* to an enum. Add
7941 `PRINT_ABSTRACTION'.
7942 (probe): Probe for abstraction type when requested.
7943 (main): Understand `--target=abstraction'.
7945 * util/i386/efi/grub-install.in: Add abstraction module to core
7946 image when it is found to be necessary.
7947 * util/i386/pc/grub-install.in: Likewise.
7948 * util/powerpc/ieee1275/grub-install.in: Likewise.
7950 * util/update-grub_lib.in (font_path): Return system path without
7951 converting to GRUB path.
7952 * util/update-grub.in: Convert system path returned by font_path()
7953 to a GRUB path. Use `grub-probe -t abstraction' to determine what
7954 abstraction module is needed for loading fonts (if any). Export
7955 that as `GRUB_PRELOAD_MODULES'.
7956 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
7959 2008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
7961 Remove some unused code from reiserfs.
7963 * fs/reiserfs.c (struct grub_reiserfs_key)
7964 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
7965 (struct grub_reiserfs_node_body): Removed.
7966 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7968 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7970 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7972 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7974 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7976 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
7978 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7979 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7980 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7982 2008-01-10 Robert Millan <rmh@aybabtu.com>
7984 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
7985 Determines if a file is garbage left by packaging systems, etc.
7986 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
7987 for processing /etc/grub.d scripts.
7988 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
7989 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
7990 as a condition for processing Linux images.
7992 2008-01-10 Pavel Roskin <proski@gnu.org>
7994 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
7995 to compile reiserfs.c on PowerPC.
7997 2008-01-10 Robert Millan <rmh@aybabtu.com>
7999 * kern/device.c (grub_device_iterate): Do not abort device iteration
8000 when one of the devices cannot be opened.
8001 * kern/disk.c (grub_disk_open): Do not account previous failures of
8002 unrelated functions when grub_errno is checked for.
8004 2008-01-08 Robert Millan <rmh@aybabtu.com>
8006 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8007 `! grub_linux_is_bzimage', change order of address comparison to make
8008 it more intuitive, and improve "too big zImage" error message.
8010 2008-01-08 Robert Millan <rmh@aybabtu.com>
8012 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8013 `$(update-grub_DATA)'.
8014 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8017 2008-01-07 Robert Millan <rmh@aybabtu.com>
8019 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8020 which instruction is modified by grub-setup during installation
8021 (since it wasn't obvious by only looking at this file).
8023 2008-01-07 Robert Millan <rmh@aybabtu.com>
8025 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
8026 listing actual TODO items.
8028 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8030 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8032 (grub_reiserfs_get_key_offset): Likewise.
8033 (grub_reiserfs_set_key_offset): Likewise.
8034 (grub_reiserfs_set_key_type): Likewise.
8035 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8037 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8038 better to remove the bitfield version completely.
8040 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8042 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8043 allocated from the heap, due to the fshelp implementation.
8044 (grub_reiserfs_dir): Free NODE, due to the same reason.
8046 2008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8048 Mostly from Vincent Pelletier:
8050 * fs/reiserfs.c: New file.
8052 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8053 (reiserfs_mod_SOURCES): New variable.
8054 (reiserfs_mod_CFLAGS): Likewise.
8055 (reiserfs_mod_LDFLAGS): Likewise.
8057 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8058 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8059 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8062 2008-01-06 Robert Millan <rmh@aybabtu.com>
8064 * normal/color.c: Remove `<grub/env.h>'.
8066 2008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
8068 * include/grub/normal.h: Include <grub/env.h>.
8070 2008-01-05 Robert Millan <rmh@aybabtu.com>
8072 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
8073 usage example with `(hd0,1)'.
8074 Reported by Samuel Thibault.
8076 2008-01-05 Robert Millan <rmh@aybabtu.com>
8078 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
8079 (grub_linux_boot_zimage): Rename to ...
8080 (grub_linux_boot): ... this.
8081 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
8082 (grub_linux_boot_zimage): Conditionalize zImage copy.
8084 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
8085 (grub_linux_boot_bzimage): Remove prototype.
8086 (grub_linux_boot_zimage): Rename to ...
8087 (grub_linux_boot): ... this.
8089 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
8090 (grub_linux_boot): Remove function.
8092 2008-01-05 Robert Millan <rmh@aybabtu.com>
8094 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
8095 (grub_env_write_color_highlight): Likewise.
8096 (grub_wait_after_message): Likewise.
8098 * normal/color.c: New file.
8100 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8101 (normal_mod_DEPENDENCIES): Likewise.
8103 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8104 (normal_mod_DEPENDENCIES): Likewise.
8106 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8107 (normal_mod_DEPENDENCIES): Likewise.
8109 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
8110 (normal_mod_DEPENDENCIES): Likewise.
8112 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
8113 for waiting after a message is printed.
8114 * normal/main.c (read_config_file): Likewise.
8115 (grub_normal_init): Register grub_env_write_color_normal() and
8116 grub_env_write_color_highlight() hooks. Mark `color_normal' and
8117 `color_highlight' variables as global.
8119 * normal/menu.c (grub_wait_after_message): New function.
8120 (grub_color_menu_normal): New variable. Replaces ...
8121 (GRUB_COLOR_MENU_NORMAL): ... this macro.
8122 (grub_color_menu_highlight): New variable. Replaces ...
8123 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
8124 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
8125 `GRUB_TERM_COLOR_STANDARD'.
8126 (print_message): Use `grub_setcolorstate' to reload colors. Rename
8127 `normal_code' and `highlight_code' to `old_color_normal' and
8128 `old_color_highlight', respectively.
8129 (grub_menu_init_page): Update colors when drawing the menu, based on
8130 `menu_color_normal' and `menu_color_highlight' variables.
8131 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
8132 a message is printed.
8134 2008-01-05 Robert Millan <rmh@aybabtu.com>
8136 * kern/env.c (grub_env_context_open): Propagate hooks for global
8137 variables to new context.
8139 * kern/main.c (grub_set_root_dev): Export `root' variable.
8141 2008-01-05 Robert Millan <rmh@aybabtu.com>
8143 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
8144 discs unconditionally, since udev and others have options to provide
8147 2008-01-05 Robert Millan <rmh@aybabtu.com>
8149 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
8151 2008-01-04 Christian Franke <franke@computer.org>
8153 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
8156 2008-01-03 Pavel Roskin <proski@gnu.org>
8158 * kern/i386/linuxbios/init.c: Put "void" to all function
8159 declarations with no arguments.
8160 * kern/powerpc/ieee1275/init.c: Likewise.
8161 * term/i386/pc/at_keyboard.c: Likewise.
8162 * term/i386/pc/vga_text.c: Likewise.
8163 * util/grub-mkdevicemap.c: Likewise.
8165 2008-01-02 Robert Millan <rmh@aybabtu.com>
8167 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
8168 message when loaded image is out of bounds.
8169 (grub_multiboot_load_elf64): Likewise.
8171 2008-01-02 Pavel Roskin <proski@gnu.org>
8173 * util/grub.d/10_linux.in: Try version without ".old" when
8174 looking for initrd. It's better to use initrd from the newer
8175 kernel of the same version than no initrd at all.
8177 2008-01-01 Robert Millan <rmh@aybabtu.com>
8179 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
8181 2008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
8183 * include/grub/video.h: Added grub_video_unmap_color and
8184 grub_video_get_active_render_target.
8185 (grub_video_adapter): Added unmap_color and get_active_render_target.
8187 * video/video.c: Added grub_video_unmap_color and
8188 grub_video_get_active_render_target.
8189 (grub_video_get_info): Changed method to accept NULL pointer as an
8190 argument to allow detection of active video adapter.
8192 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
8193 grub_video_vbe_unmap_color_int.
8194 Added grub_video_vbe_unmap_color and
8195 grub_video_vbe_get_active_render_target.
8196 (grub_video_vbe_adapter): Added unmap_color and
8197 get_active_render_target.
8199 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
8200 with grub_video_vbe_unmap_color_int.
8202 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
8203 (DEFAULT_NORMAL_COLOR): Likewise.
8204 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
8205 (DEFAULT_FG_COLOR): Removed.
8206 (DEFAULT_BG_COLOR): Likewise.
8207 (DEFAULT_CURSOR_COLOR): Changed value.
8208 (grub_virtual_screen): Added standard_color_setting,
8209 normal_color_setting, highlight_color_setting and term_color.
8210 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8211 (bitmap_width): Added.
8212 (bitmap_height): Likewise.
8214 (set_term_color): Likewise.
8215 (grub_virtual_screen_setup): Changed to use new terminal coloring
8217 (grub_gfxterm_init): Added init for bitmap.
8218 (grub_gfxterm_fini): Added destroy for bitmap.
8219 (redraw_screen_rect): Updated to use background bitmap and new
8221 (scroll_up): Added optimization for case when there is no bitmap.
8222 (grub_gfxterm_cls): Fixed to use correct background color.
8223 (grub_virtual_screen_setcolorstate): Changed to use new terminal
8225 (grub_virtual_screen_setcolor): Likewise.
8226 (grub_virtual_screen_getcolor): Added.
8227 (grub_gfxterm_background_image_cmd): Likewise.
8228 (grub_video_term): Added setcolor and getcolor.
8229 (MOD_INIT): Added registration of background_image command.
8230 (MOD_TERM): Added unregistration for background_image command.
8232 2007-12-30 Pavel Roskin <proski@gnu.org>
8234 * loader/multiboot_loader.c: Fix multiboot command
8235 unregistration. Fix all typos in the word "multiboot".
8237 2007-12-29 Pavel Roskin <proski@gnu.org>
8239 * util/grub.d/10_linux.in: Refactor search for initrd. Add
8240 support for initrd names used in Fedora.
8242 2007-12-26 Bean <bean123ch@gmail.com>
8244 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8245 (cpio_mod_SOURCES): New variable.
8246 (cpio_mod_CFLAGS): Likewise.
8247 (cpio_mod_LDFLAGS): Likewise.
8249 * fs/cpio.c: New file.
8251 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8253 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8255 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8257 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8259 2007-12-25 Robert Millan <rmh@aybabtu.com>
8261 * include/grub/term.h (struct grub_term): Add `getcolor' function.
8262 (grub_getcolor): New function.
8264 * kern/term.c (grub_getcolor): New function.
8265 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8266 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8267 (print_entry): Set normal and highlight colors to
8268 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8269 respectively, before printing and restore them to old
8271 (grub_menu_init_page): Likewise. Fill an additional colored space
8272 that would otherwise be left blank.
8274 * term/efi/console.c (grub_console_getcolor): New function.
8275 (struct grub_console_term.getcolor): New variable.
8276 * term/i386/pc/console.c (grub_console_getcolor): New function.
8277 (struct grub_console_term.getcolor): New variable.
8278 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8279 (struct grub_console_term.getcolor): New variable.
8281 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8282 (struct grub_console_term.setcolor): Remove variable.
8283 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8284 (struct grub_console_term.setcolor): Remove variable.
8285 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8286 (struct grub_console_term.setcolor): Remove variable.
8287 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8288 (struct grub_console_term.setcolor): Remove variable.
8290 2007-12-25 Robert Millan <rmh@aybabtu.com>
8292 * configure.ac: Search for possible unifont.hex locations, and
8293 define UNIFONT_HEX if found.
8295 * Makefile.in (UNIFONT_HEX): Define variable.
8296 (DATA): Rename to ...
8297 (PKGLIB): ... this. Update all users.
8298 (PKGDATA): New variable.
8299 (pkgdata_IMAGES): Rename to ...
8300 (pkglib_IMAGES): ... this. Update all users.
8301 (pkgdata_MODULES): Rename to ...
8302 (pkglib_MODULES): ... this. Update all users.
8303 (pkgdata_PROGRAMS): Rename to ...
8304 (pkglib_PROGRAMS): ... this. Update all users.
8305 (pkgdata_DATA): Rename to ...
8306 (pkglib_DATA): ... this. Update all users.
8307 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8308 (unicode.pff, ascii.pff): New rules.
8309 (all-local): Add `$(PKGDATA)' dependency.
8310 (install-local): Process `$(PKGDATA)'.
8312 * util/update-grub_lib.in (font_path): Search for *.pff files in
8313 a few more locations, including `${pkgdata}'.
8315 2007-12-23 Robert Millan <rmh@aybabtu.com>
8317 Patch from Bean <bean123ch@gmail.com>:
8318 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8321 2007-12-21 Bean <bean123ch@gmail.com>
8323 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8324 (ntfscomp_mod_SOURCES): New variable.
8325 (ntfscomp_mod_CFLAGS): Likewise.
8326 (ntfscomp_mod_LDFLAGS): Likewise.
8328 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8329 (grub_probe_SOURCES): Likewise.
8330 (grub_emu_SOURCES): Likewise.
8332 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8333 (grub_emu_SOURCES): Likewise.
8335 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8336 (grub_emu_SOURCES): Likewise.
8338 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8339 (grub_emu_SOURCES): Likewise.
8341 * fs/ntfs.c (grub_ntfscomp_func): New variable.
8342 (read_run_list): Renamed to grub_ntfs_read_run_list.
8343 (decomp_nextvcn): Moved to ntfscomp.c.
8344 (decomp_getch): Likewise.
8345 (decomp_get16): Likewise.
8346 (decomp_block): Likewise.
8347 (read_block): Likewise.
8348 (read_data): Partially moved to ntfscomp.c.
8349 (fixup): Change unsigned to grub_uint16_t.
8350 (read_mft): Change unsigned long to grub_uint32_t.
8351 (read_attr): Likewise.
8352 (read_data): Likewise.
8353 (read_run_data): Likewise.
8354 (read_run_list): Likewise.
8355 (read_mft): Likewise.
8357 * fs/ntfscomp.c: New file.
8359 * include/grub/ntfs.h: New file.
8361 2007-12-16 Robert Millan <rmh@aybabtu.com>
8363 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8364 IDE disk check, since Linux is known to support 20 IDE disks.
8365 Reported by Colin Watson.
8367 2007-12-15 Bean <bean123ch@gmail.com>
8369 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8370 (lnxboot_img_SOURCES): New variable.
8371 (lnxboot_img_ASFLAGS): Likewise.
8372 (lnxboot_img_LDFLAGS): Likewise.
8374 * boot/i386/pc/lnxboot.S: New file.
8376 2007-11-24 Pavel Roskin <proski@gnu.org>
8378 * configure.ac: Test if '--build-id=none' is supported by the
8379 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
8380 objcopy to generate incorrect binary files (binutils
8381 2.17.50.0.18-1 as shipped by Fedora 8).
8382 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8383 linking, so that build ID doesn't break the test.
8385 2007-11-24 Pavel Roskin <proski@gnu.org>
8387 * include/grub/i386/time.h: use "void" in the argument list
8389 * include/grub/powerpc/time.h: Likewise.
8390 * include/grub/sparc64/time.h: Likewise.
8392 2007-11-18 Christian Franke <franke@computer.org>
8394 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8395 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8396 This fixes the problem that function keys did not work in grub-emu.
8398 2007-11-18 Christian Franke <franke@computer.org>
8400 * disk/host.c (grub_host_open): Remove attribute unused from
8401 name parameter. Add check for "host". This fixes the problem
8402 that grub-emu does not find partitions.
8404 2007-11-18 Christian Franke <franke@computer.org>
8406 * util/hostfs.c (is_dir): New function.
8407 (grub_hostfs_dir): Handle missing dirent.d_type case.
8408 (grub_hostfs_read): Add missing fseek().
8409 (grub_hostfs_label): Clear label pointer. This fixes a crash
8410 of grub-emu on "ls (host)".
8412 2007-11-18 Christian Franke <franke@computer.org>
8414 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8415 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8416 to 64 bit boundary by default.
8418 2007-11-18 Bean <bean123ch@gmail.com>
8420 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8421 (hexdump_mod_SOURCES): New variable.
8422 (hexdump_mod_CFLAGS): Likewise.
8423 (hexdump_mod_LDFLAGS): Likewise.
8425 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8427 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8429 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8431 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8433 * include/grub/hexdump.h: New file.
8435 * commands/hexdump.c: New file.
8437 2007-11-10 Robert Millan <rmh@aybabtu.com>
8439 * commands/i386/pc/play.c (beep_off): Switch order of arguments
8440 in grub_outb() calls.
8441 (beep_on): Likewise.
8443 2007-11-10 Christian Franke <franke@computer.org>
8445 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8446 (grub_menu_run): Likewise.
8448 2007-11-10 Robert Millan <rmh@aybabtu.com>
8450 * include/grub/i386/efi/machine.h: New file.
8451 * include/grub/i386/linuxbios/machine.h: Likewise.
8452 * include/grub/i386/pc/machine.h: Likewise.
8453 * include/grub/powerpc/ieee1275/machine.h: Likewise.
8454 * include/grub/sparc64/ieee1275/machine.h: Likewise.
8456 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8457 (serial_hw_io_addr): New variable.
8458 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8459 instead of `(unsigned short *) 0x400'.
8461 2007-11-10 Bean <bean123ch@gmail.com>
8463 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8465 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8467 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8468 (vga_mod_SOURCES): Added.
8469 (vga_mod_CFLAGS): Likewise.
8470 (vga_mod_LDFLAGS): Likewise.
8472 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8474 (set_map_mask): Likewise.
8475 (set_read_map): Likewise.
8476 (set_read_address): Likewise.
8477 (vga_font): Removed variable.
8478 (get_vga_glyph): Removed function.
8479 (invalidate_char): Likewise.
8480 (write_char): Changed to use grub_font_get_glyph() for font
8482 (grub_vga_putchar): Likewise.
8483 (grub_vga_getcharwidth): Likewise.
8485 2007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8487 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8489 (pxeboot_img_LDFLAGS): Likewise.
8490 (diskboot_img_LDFLAGS): Likewise.
8491 (kernel_img_LDFLAGS): Likewise.
8493 2007-11-06 Robert Millan <rmh@aybabtu.com>
8495 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8496 in grub_outb() calls.
8497 (serial_hw_init): Likewise.
8499 2007-11-05 Robert Millan <rmh@aybabtu.com>
8501 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8502 spaces. Skip non-regular files.
8504 2007-11-05 Robert Millan <rmh@aybabtu.com>
8506 * kern/disk.c (grub_disk_firmware_fini)
8507 (grub_disk_firmware_is_tainted): New variables.
8509 * include/grub/disk.h (grub_disk_firmware_fini)
8510 (grub_disk_firmware_is_tainted): Likewise.
8512 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8513 (grub_disk_biosdisk_fini): ... to here.
8514 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8515 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8516 is set. Register grub_disk_biosdisk_fini() in
8517 `grub_disk_firmware_fini'.
8519 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8520 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8521 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8522 to finish existing firmware disk interface.
8524 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8525 (ata_mod_SOURCES): New variable.
8526 (ata_mod_CFLAGS): Likewise.
8527 (ata_mod_LDFLAGS): Likewise.
8529 2007-11-05 Robert Millan <rmh@aybabtu.com>
8531 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
8532 (grub_ata_wait): Reimplement using grub_millisleep().
8534 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8535 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8537 2007-11-03 Marco Gerards <marco@gnu.org>
8539 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8540 (CRTC_ADDR_PORT): New macro.
8541 (CRTC_DATA_PORT): Likewise.
8542 (CRTC_CURSOR): Likewise.
8543 (CRTC_CURSOR_ADDR_HIGH): Likewise.
8544 (CRTC_CURSOR_ADDR_LOW): Likewise.
8545 (update_cursor): New function.
8546 (grub_console_real_putchar): Call `update_cursor'.
8547 (grub_console_gotoxy): Likewise.
8548 (grub_console_cls): Set the default color when clearing the
8550 (grub_console_setcursor): Implemented.
8552 2007-11-03 Marco Gerards <marco@gnu.org>
8554 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8556 (grub_ata_pio_write): Likewise.
8558 (grub_atapi_identify): Wait after issuing an ATA command.
8559 (grub_atapi_packet): Likewise.
8560 (grub_ata_identify): Likewise.
8561 (grub_ata_readwrite): Likewise.
8563 2007-11-03 Marco Gerards <marco@gnu.org>
8565 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
8566 (grub_ata_pio_write): Likewise.
8567 (grub_ata_readwrite): Use `grub_error', instead of
8568 returning `grub_errno'.
8570 2007-11-03 Marco Gerards <marco@gnu.org>
8572 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
8573 grub_ata_pio_write once for every single sector, instead of for
8576 2007-10-31 Robert Millan <rmh@aybabtu.com>
8578 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
8580 * conf/i386-linuxbios.rmk: New file.
8582 * kern/i386/pc/hardware.c: Likewise.
8583 * term/i386/pc/at_keyboard.c: Likewise.
8584 * term/i386/pc/vga_text.c: Likewise.
8586 * include/grub/i386/linuxbios/boot.h: Likewise.
8587 * include/grub/i386/linuxbios/console.h: Likewise.
8588 * include/grub/i386/linuxbios/init.h: Likewise.
8589 * include/grub/i386/linuxbios/kernel.h: Likewise.
8590 * include/grub/i386/linuxbios/loader.h: Likewise.
8591 * include/grub/i386/linuxbios/memory.h: Likewise.
8592 * include/grub/i386/linuxbios/serial.h: Likewise.
8593 * include/grub/i386/linuxbios/time.h: Likewise.
8595 * kern/i386/linuxbios/init.c: Likewise.
8596 * kern/i386/linuxbios/startup.S: Likewise.
8597 * kern/i386/linuxbios/table.c: Likewise.
8599 2007-10-31 Marco Gerards <marco@gnu.org>
8601 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8602 (ata_mod_SOURCES): New variable.
8603 (ata_mod_CFLAGS): Likewise.
8604 (ata_mod_LDFLAGS): Likewise.
8606 * disk/ata.c: New file.
8608 * include/grub/disk.h (grub_disk_dev_id): Add
8609 `GRUB_DISK_DEV_ATA_ID'.
8611 2007-10-31 Robert Millan <rmh@aybabtu.com>
8613 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8614 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8616 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8617 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
8619 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
8622 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
8624 2007-10-27 Robert Millan <rmh@aybabtu.com>
8626 * include/grub/types.h (ULONG_MAX): Define macro.
8628 2007-10-22 Robert Millan <rmh@aybabtu.com>
8630 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
8632 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
8634 2007-10-22 Robert Millan <rmh@aybabtu.com>
8636 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
8637 (pkgdata_MODULES): Add `biosdisk.mod'.
8638 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
8641 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
8642 (grub_biosdisk_init): Replace with ...
8643 (GRUB_MOD_INIT(biosdisk)): ... this.
8644 (grub_biosdisk_fini): Replace with ...
8645 (GRUB_MOD_FINI(biosdisk)): ... this.
8647 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
8648 (grub_machine_init): Remove call to grub_biosdisk_init().
8649 (grub_machine_fini): Remove call to grub_machine_fini().
8651 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
8653 2007-10-22 Robert Millan <rmh@aybabtu.com>
8655 * include/grub/time.h: New file.
8656 * include/grub/i386/time.h: Likewise.
8657 * include/grub/powerpc/time.h: Likewise.
8658 * include/grub/sparc64/time.h: Likewise.
8660 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
8662 (KERNEL_MACHINE_TIME_HEADER): ... this.
8663 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8665 (KERNEL_MACHINE_TIME_HEADER): ... this.
8666 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8668 (KERNEL_MACHINE_TIME_HEADER): ... this.
8670 * kern/i386/efi/init.c: Include `<grub/time.h>'.
8671 (grub_millisleep): New function.
8672 * kern/i386/pc/init.c: Include `<grub/time.h>'.
8673 (grub_millisleep): New function.
8674 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
8675 Remove `grub/machine/time.h' include.
8676 (grub_millisleep): New function.
8677 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
8678 Remove `grub/machine/time.h' include.
8679 (grub_millisleep): New function.
8681 * include/grub/misc.h (grub_div_roundup): New function.
8683 * kern/misc.c: Include `<grub/time.h>'.
8684 (grub_millisleep_generic): New function.
8686 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
8688 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
8690 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
8691 `machine/time.h'. Add `time.h'.
8692 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8694 2007-10-21 Robert Millan <rmh@aybabtu.com>
8696 * include/grub/misc.h (grub_max): New function.
8698 2007-10-21 Robert Millan <rmh@aybabtu.com>
8700 * util/misc.c (grub_util_info): Call fflush() before returning.
8702 2007-10-20 Robert Millan <rmh@aybabtu.com>
8704 * genmk.rb (Image): Copy `extra_flags' from here ...
8705 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
8707 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
8708 to `argc' and `args' arguments.
8710 2007-10-17 Robert Millan <rmh@aybabtu.com>
8712 * kern/i386/loader.S: New file.
8714 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
8715 * kern/i386/loader.S (grub_linux_prot_size)... to here.
8716 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
8717 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
8718 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
8719 * kern/i386/loader.S (grub_linux_real_addr)... to here.
8720 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
8721 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
8722 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
8723 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
8724 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
8725 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
8726 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
8727 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
8729 * kern/i386/realmode.S: New file.
8731 * kern/i386/pc/startup.S (protstack): Moved from here ...
8732 * kern/i386/realmode.S (protstack)... to here.
8733 * kern/i386/pc/startup.S (gdt): Moved from here ...
8734 * kern/i386/realmode.S (gdt)... to here.
8735 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
8736 * kern/i386/realmode.S (prot_to_real)... to here.
8738 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
8739 `kern/i386/realmode.S'.
8741 2007-10-17 Robert Millan <rmh@aybabtu.com>
8743 * include/grub/i386/loader.h: New file.
8745 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
8746 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8747 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8748 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8749 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
8750 * include/grub/i386/loader.h (grub_linux_prot_size)
8751 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8752 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8753 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8754 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
8756 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
8758 2007-10-15 Robert Millan <rmh@aybabtu.com>
8760 * normal/misc.c (grub_normal_print_device_info): Do not probe for
8761 filesystem when dev->disk is unset.
8762 Do probe for filesystem even when dev->disk->has_partitions is set.
8763 In case a filesystem is found, always report it.
8764 In case it isn't, if dev->disk->has_partitions is set, report that
8765 a partition table was found instead of reporting that no filesystem
8766 could be identified.
8768 2007-10-12 Robert Millan <rmh@aybabtu.com>
8770 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
8771 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
8773 * include/grub/types.h (grub_host_to_target16): New macro.
8774 (grub_host_to_target32): Likewise.
8775 (grub_host_to_target64): Likewise.
8776 (grub_target_to_host16): Likewise.
8777 (grub_target_to_host32): Likewise.
8778 (grub_target_to_host64): Likewise.
8780 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8782 (GRUB_MOD_ALIGN): ...this. Update all users.
8784 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
8785 grub_host_to_target32.
8786 Replace grub_be_to_cpu32 with grub_target_to_host32.
8787 (load_modules): Likewise.
8788 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
8789 Replace grub_be_to_cpu32 with grub_target_to_host32.
8790 Replace grub_cpu_to_be16 with grub_host_to_target16.
8791 Replace grub_cpu_to_be32 grub_host_to_target32.
8793 2007-10-12 Robert Millan <rmh@aybabtu.com>
8795 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
8796 * util/elf/grub-mkimage.c: ... here.
8798 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
8799 `util/powerpc/ieee1275/grub-mkimage.c'.
8801 2007-10-07 Robert Millan <rmh@aybabtu.com>
8803 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
8804 and make it easier to figure out.
8805 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
8806 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
8807 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
8808 leave us with less than HEAP_MIN_SIZE total heap.
8809 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
8811 2007-10-03 Robert Millan <rmh@aybabtu.com>
8813 * include/grub/i386/io.h: New file.
8814 * commands/i386/pc/play.c (inb): Removed.
8816 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8818 * term/i386/pc/serial.c (inb): Removed.
8820 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8822 * term/i386/pc/vga.c (inb): Removed.
8824 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8827 2007-10-02 Robert Millan <rmh@aybabtu.com>
8829 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
8830 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8831 Reported by Marcin Kurek.
8833 2007-09-07 Robert Millan <rmh@aybabtu.com>
8835 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
8836 SmartFirmware version updates (as released by Sven Luther), and avoid
8837 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
8838 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
8841 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8844 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
8845 when merging two regions.
8847 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8849 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
8850 * normal/completion.c (grub_normal_do_completion): Likewise.
8851 Reported by Hitoshi Ozeki.
8853 2007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8855 Do not use devices at boot in chainloading.
8857 * loader/i386/pc/chainloader.c (boot_drive): New variable.
8858 (boot_part_addr): Likewise.
8859 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
8860 with BOOT_DRIVE and BOOT_PART_ADDR.
8861 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
8862 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
8864 2007-08-29 Robert Millan <rmh@aybabtu.com>
8866 Patch from Simon Peter <dn.tlp@gmx.net>:
8867 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
8868 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
8869 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
8870 util/i386/pc/grub-setup.c_DEPENDENCIES.
8871 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
8872 util/grub-probe.c_DEPENDENCIES.
8873 * conf/powerpc-ieee1275.rmk: Likewise.
8875 2007-08-28 Robert Millan <rmh@aybabtu.com>
8877 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
8878 to tell grub-mkdevicemap how to name devices.
8879 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
8882 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
8883 util/i386/get_disk_name.c.
8884 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
8885 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
8886 util/ieee1275/get_disk_name.c.
8888 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
8890 * DISTLIST: Add util/i386/get_disk_name.c and
8891 util/ieee1275/get_disk_name.c.
8893 * util/grub-mkdevicemap.c: Replace device naming logic with
8894 grub_util_get_disk_name() calls.
8896 2007-08-20 Robert Millan <rmh@aybabtu.com>
8898 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
8899 (so that it works for both plural and singular quantities).
8901 2007-08-05 Robert Millan <rmh@aybabtu.com>
8903 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
8904 so that [xz] isn't taken into account when determining order.
8906 2007-08-02 Marco Gerards <marco@gnu.org>
8908 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
8909 `include/multiboot2.h', `include/grub/elfload.h',
8910 `include/multiboot.h', `include/grub/multiboot.h',
8911 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
8912 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
8913 `kern/elf.c', `loader/multiboot_loader.c',
8914 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
8915 `loader/i386/pc/multiboot2.c',
8916 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
8917 `util/i386/pc/grub-mkrescue.in'. Remove
8918 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
8919 `include/grub/i386/pc/util/biosdisk.h' and
8920 `include/grub/powerpc/ieee1275/multiboot.h'.
8922 2007-08-02 Bean <bean123ch@gmail.com>
8924 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
8925 (ntfs_mod_SOURCES): New variable.
8926 (ntfs_mod_CFLAGS): Likewise.
8927 (ntfs_mod_LDFLAGS): Likewise.
8929 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
8930 (grub_probe_SOURCES): Likewise.
8931 (grub_emu_SOURCES): Likewise.
8933 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8934 (grub_emu_SOURCES): Likewise.
8936 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8937 (grub_emu_SOURCES): Likewise.
8939 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
8941 * fs/ntfs.c: New file.
8943 2007-08-02 Bean <bean123ch@gmail.com>
8945 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
8947 * file.h (grub_file): Likewise.
8949 * fshelp.h (grub_fshelp_read_file): Likewise.
8951 * util/i386/pc/grub-setup.c (setup): Likewise.
8952 (save_first_sector): Likewise.
8953 (save_blocklists): Likewise.
8955 * fs/affs.c (grub_affs_read_file): Likewise.
8957 * fs/ext2.c (grub_ext2_read_file): Likewise.
8959 * fs/fat.c (grub_fat_read_data): Likewise.
8961 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
8963 * fs/hfs.c (grub_hfs_read_file): Likewise.
8965 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8967 * fs/jfs.c (grub_jfs_read_file): Likewise.
8969 * fs/minix.c (grub_minix_read_file): Likewise.
8971 * fs/sfs.c (grub_sfs_read_file): Likewise.
8973 * fs/ufs.c (grub_ufs_read_file): Likewise.
8975 * fs/xfs.c (grub_xfs_read_file): Likewise.
8977 * command/blocklist.c (read_blocklist): Likewise.
8978 (print_blocklist): Likewise.
8980 2007-08-02 Marco Gerards <marco@gnu.org>
8982 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
8985 * disk/host.c: New file.
8987 * util/hostfs.c: Likewise.
8989 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
8990 return `GRUB_ERR_BAD_FS'.
8991 * fs/sfs.c (grub_sfs_mount): Likewise.
8992 * fs/xfs.c (grub_xfs_mount): Likewise.
8994 * include/grub/disk.h (enum grub_disk_dev_id): Add
8995 `GRUB_DISK_DEVICE_HOST_ID'.
8997 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
8999 2007-07-24 Jerone Young <jerone@gmail.com>
9001 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9002 modules for compilation.
9003 * conf/powerpc-ieee1275.rmk: Likewise.
9005 * include/multiboot.h: Move multiboot definitions to one file. Rename
9006 many definitions to not get grub specific.
9007 * include/multiboot2.h: Create header with multiboot 2 definitions.
9008 * include/grub/multiboot.h: Header for grub specific function
9009 prototypes and definitions.
9010 * include/grub/multiboot2.h: Likewise.
9011 * include/grub/multiboot_loader.h: Likewise.
9012 * include/grub/i386/pc/multiboot.h: Removed.
9013 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9015 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9016 and 2 to allow for one multiboot and module commands.
9017 * loader/multiboot2.c: Add multiboot2 functionality.
9018 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9019 and definition names.
9020 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9022 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9023 ieee1275 specific multiboot2 code.
9025 * kern/i386/pc/startup.S: Change headers and definition names for
9026 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9028 2007-07-22 Robert Millan <rmh@aybabtu.com>
9030 * geninitheader.sh: Process file specified in first parameter rather
9031 than hardcoding grub_modules_init.lst.
9032 * geninit.sh: Likewise. Also, construct header name dynamically rather
9033 than hardcoding grub_modules_init.h.
9035 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9036 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
9037 grub_probe_init.[ch] and grub_setup_init.[ch].
9039 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9040 grub_modules_init.h with grub_emu_init.h.
9041 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9042 grub_probe_init.[ch] files.
9043 * conf/i386-efi.rmk: Likewise.
9044 * conf/i386-pc.rmk: Likewise.
9045 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9046 grub_setup_init.[ch] files.
9048 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9049 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
9050 to initialize modules rather than a list of hardcoded functions.
9051 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
9052 grub_init_all() to initialize modules rather than a list of hardcoded
9055 2007-07-22 Robert Millan <rmh@aybabtu.com>
9057 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9058 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9060 2007-07-22 Robert Millan <rmh@aybabtu.com>
9062 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9063 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9064 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9065 flag when running on SmartFirmware.
9066 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9067 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9070 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9071 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9072 rather than decreasing it.
9074 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
9075 there's not enough space to do it, fail in the same way as when it
9076 can't be done because there are no partitions.
9078 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
9079 when nvsetenv failed.
9081 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9083 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
9084 because this rule is automatically generated.
9085 (grub-mkrescue): Removed for the same reason as above.
9087 2007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
9089 Migrate to GNU General Public License Version 3.
9091 * COPYING: Replaced with the plain text version of GPLv3.
9093 * config.guess: Updated from gnulib.
9094 * config.sub: Likewise.
9096 * geninit.sh: Output a GPLv3 copyright notice.
9097 * geninitheader.sh: Likewise.
9098 * genmodsrc.sh: Likewise.
9099 * gensymlist.sh.in: Likewise.
9101 * boot/i386/pc/boot.S: Upgraded to GPLv3.
9102 * boot/i386/pc/diskboot.S: Likewise.
9103 * boot/i386/pc/pxeboot.S: Likewise.
9104 * commands/blocklist.c: Likewise.
9105 * commands/boot.c: Likewise.
9106 * commands/cat.c: Likewise.
9107 * commands/cmp.c: Likewise.
9108 * commands/configfile.c: Likewise.
9109 * commands/echo.c: Likewise.
9110 * commands/help.c: Likewise.
9111 * commands/ls.c: Likewise.
9112 * commands/search.c: Likewise.
9113 * commands/terminal.c: Likewise.
9114 * commands/test.c: Likewise.
9115 * commands/videotest.c: Likewise.
9116 * commands/i386/cpuid.c: Likewise.
9117 * commands/i386/pc/halt.c: Likewise.
9118 * commands/i386/pc/play.c: Likewise.
9119 * commands/i386/pc/reboot.c: Likewise.
9120 * commands/i386/pc/vbeinfo.c: Likewise.
9121 * commands/i386/pc/vbetest.c: Likewise.
9122 * commands/ieee1275/halt.c: Likewise.
9123 * commands/ieee1275/reboot.c: Likewise.
9124 * commands/ieee1275/suspend.c: Likewise.
9125 * disk/loopback.c: Likewise.
9126 * disk/lvm.c: Likewise.
9127 * disk/raid.c: Likewise.
9128 * disk/efi/efidisk.c: Likewise.
9129 * disk/i386/pc/biosdisk.c: Likewise.
9130 * disk/ieee1275/ofdisk.c: Likewise.
9131 * font/manager.c: Likewise.
9132 * fs/affs.c: Likewise.
9133 * fs/ext2.c: Likewise.
9134 * fs/fat.c: Likewise.
9135 * fs/fshelp.c: Likewise.
9136 * fs/hfs.c: Likewise.
9137 * fs/hfsplus.c: Likewise.
9138 * fs/iso9660.c: Likewise.
9139 * fs/jfs.c: Likewise.
9140 * fs/minix.c: Likewise.
9141 * fs/sfs.c: Likewise.
9142 * fs/ufs.c: Likewise.
9143 * fs/xfs.c: Likewise.
9144 * hello/hello.c: Likewise.
9145 * include/grub/acorn_filecore.h: Likewise.
9146 * include/grub/arg.h: Likewise.
9147 * include/grub/bitmap.h: Likewise.
9148 * include/grub/boot.h: Likewise.
9149 * include/grub/cache.h: Likewise.
9150 * include/grub/device.h: Likewise.
9151 * include/grub/disk.h: Likewise.
9152 * include/grub/dl.h: Likewise.
9153 * include/grub/elfload.h: Likewise.
9154 * include/grub/env.h: Likewise.
9155 * include/grub/err.h: Likewise.
9156 * include/grub/file.h: Likewise.
9157 * include/grub/font.h: Likewise.
9158 * include/grub/fs.h: Likewise.
9159 * include/grub/fshelp.h: Likewise.
9160 * include/grub/gzio.h: Likewise.
9161 * include/grub/hfs.h: Likewise.
9162 * include/grub/kernel.h: Likewise.
9163 * include/grub/loader.h: Likewise.
9164 * include/grub/lvm.h: Likewise.
9165 * include/grub/misc.h: Likewise.
9166 * include/grub/mm.h: Likewise.
9167 * include/grub/net.h: Likewise.
9168 * include/grub/normal.h: Likewise.
9169 * include/grub/parser.h: Likewise.
9170 * include/grub/partition.h: Likewise.
9171 * include/grub/pc_partition.h: Likewise.
9172 * include/grub/raid.h: Likewise.
9173 * include/grub/rescue.h: Likewise.
9174 * include/grub/script.h: Likewise.
9175 * include/grub/setjmp.h: Likewise.
9176 * include/grub/symbol.h: Likewise.
9177 * include/grub/term.h: Likewise.
9178 * include/grub/terminfo.h: Likewise.
9179 * include/grub/tparm.h: Likewise.
9180 * include/grub/types.h: Likewise.
9181 * include/grub/video.h: Likewise.
9182 * include/grub/efi/api.h: Likewise.
9183 * include/grub/efi/chainloader.h: Likewise.
9184 * include/grub/efi/console.h: Likewise.
9185 * include/grub/efi/console_control.h: Likewise.
9186 * include/grub/efi/disk.h: Likewise.
9187 * include/grub/efi/efi.h: Likewise.
9188 * include/grub/efi/pe32.h: Likewise.
9189 * include/grub/efi/time.h: Likewise.
9190 * include/grub/i386/linux.h: Likewise.
9191 * include/grub/i386/setjmp.h: Likewise.
9192 * include/grub/i386/types.h: Likewise.
9193 * include/grub/i386/efi/kernel.h: Likewise.
9194 * include/grub/i386/efi/loader.h: Likewise.
9195 * include/grub/i386/efi/time.h: Likewise.
9196 * include/grub/i386/pc/biosdisk.h: Likewise.
9197 * include/grub/i386/pc/boot.h: Likewise.
9198 * include/grub/i386/pc/chainloader.h: Likewise.
9199 * include/grub/i386/pc/console.h: Likewise.
9200 * include/grub/i386/pc/init.h: Likewise.
9201 * include/grub/i386/pc/kernel.h: Likewise.
9202 * include/grub/i386/pc/loader.h: Likewise.
9203 * include/grub/i386/pc/memory.h: Likewise.
9204 * include/grub/i386/pc/multiboot.h: Likewise.
9205 * include/grub/i386/pc/serial.h: Likewise.
9206 * include/grub/i386/pc/time.h: Likewise.
9207 * include/grub/i386/pc/vbe.h: Likewise.
9208 * include/grub/i386/pc/vbeblit.h: Likewise.
9209 * include/grub/i386/pc/vbefill.h: Likewise.
9210 * include/grub/i386/pc/vbeutil.h: Likewise.
9211 * include/grub/i386/pc/vga.h: Likewise.
9212 * include/grub/ieee1275/ieee1275.h: Likewise.
9213 * include/grub/ieee1275/ofdisk.h: Likewise.
9214 * include/grub/powerpc/libgcc.h: Likewise.
9215 * include/grub/powerpc/setjmp.h: Likewise.
9216 * include/grub/powerpc/types.h: Likewise.
9217 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9218 * include/grub/powerpc/ieee1275/console.h: Likewise.
9219 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9220 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9221 * include/grub/powerpc/ieee1275/loader.h: Likewise.
9222 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9223 * include/grub/powerpc/ieee1275/time.h: Likewise.
9224 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9225 * include/grub/sparc64/libgcc.h: Likewise.
9226 * include/grub/sparc64/setjmp.h: Likewise.
9227 * include/grub/sparc64/types.h: Likewise.
9228 * include/grub/sparc64/ieee1275/console.h: Likewise.
9229 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9230 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9231 * include/grub/sparc64/ieee1275/time.h: Likewise.
9232 * include/grub/util/biosdisk.h: Likewise.
9233 * include/grub/util/getroot.h: Likewise.
9234 * include/grub/util/lvm.h: Likewise.
9235 * include/grub/util/misc.h: Likewise.
9236 * include/grub/util/raid.h: Likewise.
9237 * include/grub/util/resolve.h: Likewise.
9238 * io/gzio.c: Likewise.
9239 * kern/device.c: Likewise.
9240 * kern/disk.c: Likewise.
9241 * kern/dl.c: Likewise.
9242 * kern/elf.c: Likewise.
9243 * kern/env.c: Likewise.
9244 * kern/err.c: Likewise.
9245 * kern/file.c: Likewise.
9246 * kern/fs.c: Likewise.
9247 * kern/loader.c: Likewise.
9248 * kern/main.c: Likewise.
9249 * kern/misc.c: Likewise.
9250 * kern/mm.c: Likewise.
9251 * kern/parser.c: Likewise.
9252 * kern/partition.c: Likewise.
9253 * kern/rescue.c: Likewise.
9254 * kern/term.c: Likewise.
9255 * kern/efi/efi.c: Likewise.
9256 * kern/efi/init.c: Likewise.
9257 * kern/efi/mm.c: Likewise.
9258 * kern/i386/dl.c: Likewise.
9259 * kern/i386/efi/init.c: Likewise.
9260 * kern/i386/efi/startup.S: Likewise.
9261 * kern/i386/pc/init.c: Likewise.
9262 * kern/i386/pc/lzo1x.S: Likewise.
9263 * kern/i386/pc/startup.S: Likewise.
9264 * kern/ieee1275/ieee1275.c: Likewise.
9265 * kern/powerpc/cache.S: Likewise.
9266 * kern/powerpc/dl.c: Likewise.
9267 * kern/powerpc/ieee1275/cmain.c: Likewise.
9268 * kern/powerpc/ieee1275/crt0.S: Likewise.
9269 * kern/powerpc/ieee1275/init.c: Likewise.
9270 * kern/powerpc/ieee1275/openfw.c: Likewise.
9271 * kern/sparc64/cache.S: Likewise.
9272 * kern/sparc64/dl.c: Likewise.
9273 * kern/sparc64/ieee1275/init.c: Likewise.
9274 * kern/sparc64/ieee1275/openfw.c: Likewise.
9275 * loader/efi/chainloader.c: Likewise.
9276 * loader/efi/chainloader_normal.c: Likewise.
9277 * loader/i386/efi/linux.c: Likewise.
9278 * loader/i386/efi/linux_normal.c: Likewise.
9279 * loader/i386/pc/chainloader.c: Likewise.
9280 * loader/i386/pc/chainloader_normal.c: Likewise.
9281 * loader/i386/pc/linux.c: Likewise.
9282 * loader/i386/pc/linux_normal.c: Likewise.
9283 * loader/i386/pc/multiboot.c: Likewise.
9284 * loader/i386/pc/multiboot_normal.c: Likewise.
9285 * loader/powerpc/ieee1275/linux.c: Likewise.
9286 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9287 * normal/arg.c: Likewise.
9288 * normal/cmdline.c: Likewise.
9289 * normal/command.c: Likewise.
9290 * normal/completion.c: Likewise.
9291 * normal/execute.c: Likewise.
9292 * normal/function.c: Likewise.
9293 * normal/lexer.c: Likewise.
9294 * normal/main.c: Likewise.
9295 * normal/menu.c: Likewise.
9296 * normal/menu_entry.c: Likewise.
9297 * normal/misc.c: Likewise.
9298 * normal/parser.y: Likewise.
9299 * normal/script.c: Likewise.
9300 * normal/i386/setjmp.S: Likewise.
9301 * normal/powerpc/setjmp.S: Likewise.
9302 * normal/sparc64/setjmp.S: Likewise.
9303 * partmap/acorn.c: Likewise.
9304 * partmap/amiga.c: Likewise.
9305 * partmap/apple.c: Likewise.
9306 * partmap/gpt.c: Likewise.
9307 * partmap/pc.c: Likewise.
9308 * partmap/sun.c: Likewise.
9309 * term/gfxterm.c: Likewise.
9310 * term/terminfo.c: Likewise.
9311 * term/efi/console.c: Likewise.
9312 * term/i386/pc/console.c: Likewise.
9313 * term/i386/pc/serial.c: Likewise.
9314 * term/i386/pc/vesafb.c: Likewise.
9315 * term/i386/pc/vga.c: Likewise.
9316 * term/ieee1275/ofconsole.c: Likewise.
9317 * util/biosdisk.c: Likewise.
9318 * util/console.c: Likewise.
9319 * util/genmoddep.c: Likewise.
9320 * util/getroot.c: Likewise.
9321 * util/grub-emu.c: Likewise.
9322 * util/grub-mkdevicemap.c: Likewise.
9323 * util/grub-probe.c: Likewise.
9324 * util/lvm.c: Likewise.
9325 * util/misc.c: Likewise.
9326 * util/raid.c: Likewise.
9327 * util/resolve.c: Likewise.
9328 * util/update-grub.in: Likewise.
9329 * util/update-grub_lib.in: Likewise.
9330 * util/grub.d/00_header.in: Likewise.
9331 * util/grub.d/10_hurd.in: Likewise.
9332 * util/grub.d/10_linux.in: Likewise.
9333 * util/i386/efi/grub-install.in: Likewise.
9334 * util/i386/efi/grub-mkimage.c: Likewise.
9335 * util/i386/pc/grub-install.in: Likewise.
9336 * util/i386/pc/grub-mkimage.c: Likewise.
9337 * util/i386/pc/grub-mkrescue.in: Likewise.
9338 * util/i386/pc/grub-setup.c: Likewise.
9339 * util/i386/pc/misc.c: Likewise.
9340 * util/powerpc/ieee1275/grub-install.in: Likewise.
9341 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9342 * util/powerpc/ieee1275/misc.c: Likewise.
9343 * video/bitmap.c: Likewise.
9344 * video/video.c: Likewise.
9345 * video/i386/pc/vbe.c: Likewise.
9346 * video/i386/pc/vbeblit.c: Likewise.
9347 * video/i386/pc/vbefill.c: Likewise.
9348 * video/i386/pc/vbeutil.c: Likewise.
9349 * video/readers/tga.c: Likewise.
9351 2007-07-02 Robert Millan <rmh@aybabtu.com>
9353 * conf/i386-efi.rmk: Replace obsolete reference to
9354 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9355 with util/getroot.c.
9356 * conf/powerpc-ieee1275.rmk: Likewise.
9357 * conf/sparc64-ieee1275.rmk: Likewise.
9359 * util/grub-emu.c (main): Fix unchecked pointer handling.
9361 2007-07-02 Robert Millan <rmh@aybabtu.com>
9363 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9364 invocation to fail, in order to support partition-less media.
9366 * util/i386/pc/grub-install.in: Likewise.
9368 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9369 which fs or partmap modules are needed (akin to its sister scripts).
9371 Also use grub-probe to get rid of unportable /proc/mounts check.
9373 Print the same informational message that the other scripts do, before
9376 2007-06-23 Robert Millan <rmh@aybabtu.com>
9378 * util/update-grub_lib.in (font_path): New function. Determine whether
9379 a font file can be found and, if so, echo the GRUB path to it.
9381 * util/update-grub.in: Handle multiple terminals depending on user
9382 input, platform availability and font file presence. Propagate
9383 variables of our findings to /etc/grub.d/ children.
9385 * util/grub.d/00_header.in: Handle multiple terminals, based on
9386 environment setup by update-grub.
9388 2007-06-23 Robert Millan <rmh@aybabtu.com>
9390 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
9392 2007-06-21 Robert Millan <rmh@aybabtu.com>
9394 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9395 indicate end of data section in kernel image.
9396 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9397 GRUB_KERNEL_MACHINE_DATA_END.
9399 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9401 * kern/i386/efi/startup.S: Likewise.
9403 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9404 during image generation. Implement --prefix option to override this
9406 * util/i386/efi/grub-mkimage.c: Likewise.
9408 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9409 code to make path relative to its root into a separate function.
9411 * util/i386/pc/grub-install.in: Use newly provided
9412 make_system_path_relative_to_its_root() to convert ${grubdir}, then
9413 pass the result to grub-install --prefix.
9415 2007-06-13 Robert Millan <rmh@aybabtu.com>
9417 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9419 * util/grub-emu.c: Use above definitions from misc.h instead of
9421 * util/grub-mkdevicemap.c: Likewise.
9422 * util/i386/pc/grub-setup.c: Likewise.
9423 * util/grub-probe.c: Likewise.
9424 (probe): Abort with grub_util_error() when either
9425 grub_guess_root_device or grub_util_get_grub_dev fails.
9427 2007-06-12 Robert Millan <rmh@aybabtu.com>
9429 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9431 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9433 * util/grub-probe.c (probe): Likewise for "drive_name".
9435 2007-06-11 Robert Millan <rmh@aybabtu.com>
9437 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9438 not just the cdrom one.
9440 2007-06-11 Robert Millan <rmh@aybabtu.com>
9442 * util/i386/pc/grub-mkrescue.in: Add "set -e".
9443 Add --pkglibdir=DIR option to override pkglibdir.
9444 Mention --image-type=TYPE in help output.
9445 Fix --grub-mkimage (it was a no-op).
9446 Abort gracefully when no parameter is given.
9448 2007-06-11 Robert Millan <rmh@aybabtu.com>
9450 * util/i386/pc/grub-mkrescue.in: New file.
9451 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
9452 * Makefile.in: Handle bin_SCRIPTS.
9454 2007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
9456 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9457 list of video modes.
9459 2007-06-06 Robert Millan <rmh@aybabtu.com>
9461 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9462 file doesn't exist, or if it is in a filesystem grub can't read.
9464 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
9465 not abort if GRUB_DRIVE could not be defined. Rearrange generated
9466 header comment to fit in 80 columns when the variables are resolved.
9468 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9469 could be identified by update-grub. Remove redundant check for
9470 unifont.pff existence (since convert_system_path_to_grub_path now
9473 2007-06-04 Robert Millan <rmh@aybabtu.com>
9475 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9477 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9479 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9481 2007-06-04 Robert Millan <rmh@aybabtu.com>
9483 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9485 * include/grub/partition.h: Declare grub_apple_partition_map_init and
9486 grub_apple_partition_map_fini.
9489 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9490 to access >2 TiB disks).
9492 Print disk->total_sectors with %llu instead of %lu, since this
9493 variable is always 64-bit (prevents wrong disk size from being displayed
9494 on either >2 TiB disk or big-endian CPU).
9496 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9497 into a generic case that supports all (sane) partition maps.
9499 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9502 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9503 and grub_apple_partition_map_fini() after that.
9505 2007-06-01 Robert Millan <rmh@aybabtu.com>
9507 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9509 * util/grub.d/00_header.in: Only enable gfxterm when
9510 convert_system_path_to_grub_path() succeeds.
9512 2007-05-20 Robert Millan <rmh@aybabtu.com>
9514 * util/update-grub_lib.in: New file.
9515 * DISTLIST: Add update-grub_lib.in.
9516 * conf/common.rmk: Generate update-grub_lib and install it in
9518 * Makefile.in: Add install routine for $(lib_DATA).
9520 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9521 function provided by update-grub_lib to support arbitrary paths of
9523 * util/update-grub.in: Use convert_system_path_to_grub_path() to
9524 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9526 2007-05-19 Robert Millan <rmh@aybabtu.com>
9528 * commands/i386/cpuid.c: New module.
9530 * conf/i386-efi.rmk: Enable cpuid.mod.
9531 * conf/i386-pc.rmk: Likewise.
9533 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9535 * kern/disk.c (grub_disk_read): Check return value of
9538 2007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9540 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9542 * disk/raid.c (grub_raid_open): Likewise.
9544 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9546 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9547 stack instead of on the heap.
9549 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9550 before doing a read on it.
9552 * configure.ac: Only use -fno-stack-protector for the target
9555 2007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9557 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9558 __attribute_ ((unused)) to mode_type argument.
9560 * util/getroot.c (grub_guess_root_device): Fix #endif.
9562 * kern/misc.c (memcmp): Fix prototype.
9564 * include/grub/partition.h [GRUB_UTIL]
9565 (grub_gpt_partition_map_init): Add prototype.
9566 (grub_gpt_partition_map_fini): Likewise.
9568 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
9571 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
9572 (grub_fat_read_data): Likewise.
9573 (grub_fat_find_dir): Likewise.
9575 * font/manager.c (find_glyph): Make table a const.
9576 (grub_font_get_glyph): Remove bitmap from if statement.
9578 2007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
9580 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
9581 code, first search for device in /dev/mapper, then in /dev.
9582 (grub_util_get_grub_dev): New function.
9583 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
9585 * util/grub-probe.c (probe): Remove check for RAID, call
9586 grub_util_get_grub_dev() instead of
9587 grub_util_biosdisk_get_grub_dev().
9588 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
9589 grub_util_biosdisk_get_grub_dev().
9590 * util/i386/pc/grub-setup.c (main): Likewise.
9592 2007-05-16 Robert Millan <rmh@aybabtu.com>
9594 * DISTLIST: Update for the latest changes.
9595 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
9596 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
9597 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
9598 grub/util/biosdisk.h.
9599 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
9600 grub/util/biosdisk.h.
9602 2007-05-16 Robert Millan <rmh@aybabtu.com>
9604 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9606 2007-05-16 Robert Millan <rmh@aybabtu.com>
9608 * util/i386/efi/grub-install.in: New.
9609 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9610 newly added grub-install.
9611 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9613 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9614 grub/util/biosdisk.h.
9615 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9616 grub/util/biosdisk.h.
9618 2007-05-16 Robert Millan <rmh@aybabtu.com>
9620 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
9621 * include/grub/util/biosdisk.h: ... here.
9622 * util/i386/pc/biosdisk.c: Moved to ...
9623 * util/biosdisk.c: ... here.
9624 * util/i386/pc/getroot.c: Moved to ...
9625 * util/getroot.c: ... here.
9626 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
9627 * util/grub-mkdevicemap.c: ... here.
9628 * util/i386/pc/grub-probe.c: Moved to ...
9629 * util/grub-probe.c: ... here.
9631 2007-05-15 Robert Millan <rmh@aybabtu.com>
9633 * util/update-grub.in: Remove duplicated line in grub.cfg header
9636 2007-05-13 Robert Millan <rmh@aybabtu.com>
9638 * util/update-grub.in: Fix a few assumptions about the devices holding
9639 /, /boot and /boot/grub being the same.
9640 * util/grub.d/00_header.in: Likewise.
9641 * util/grub.d/10_hurd.in: Likewise.
9642 * util/grub.d/10_linux.in: Likewise.
9644 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
9645 patterns. Use that to define the `.old' suffix as older than `'.
9647 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
9649 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
9650 the grub.cfg header message.
9652 2007-05-11 Robert Millan <rmh@aybabtu.com>
9654 * util/update-grub.in: Create device.map if it doesn't already exist,
9655 before attempting to run grub-probe.
9656 Check for grub-probe and grub-mkdevicemap with the same code
9657 grub-install is using.
9660 2007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
9662 * Makefile.in: Add the datarootdir autoconf variable.
9664 2007-05-09 Robert Millan <rmh@aybabtu.com>
9666 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
9667 fail gracefully if dev->disk->partition == NULL.
9669 2007-05-07 Robert Millan <rmh@aybabtu.com>
9671 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
9672 determine partition map module.
9673 * util/i386/pc/grub-install.in: Use this feature to decide which
9674 partition module to load, instead of hardcoding pc and gpt.
9676 2007-05-07 Robert Millan <rmh@aybabtu.com>
9678 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
9679 source directory differs from build directory.
9681 2007-05-05 Robert Millan <rmh@aybabtu.com>
9683 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
9686 2007-05-05 Robert Millan <rmh@aybabtu.com>
9688 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
9690 2007-05-05 Robert Millan <rmh@aybabtu.com>
9692 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
9693 command-line arguments via ${GRUB_CMDLINE_LINUX}.
9695 2007-05-05 Robert Millan <rmh@aybabtu.com>
9697 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
9698 (grub_probe_SOURCES): Likewise.
9699 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
9700 GPT and initialize dos_part and bsd_part accordingly.
9701 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
9703 (main): Activate gpt module for use during partition identification,
9704 and deactivate it afterwards.
9705 * util/i386/pc/grub-install.in: Add gpt module to core.img.
9706 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
9707 partition identification, and deactivate it afterwards.
9709 2007-05-05 Robert Millan <rmh@aybabtu.com>
9711 * term/i386/pc/console.c (grub_console_fini): Call
9712 grub_term_set_current() before grub_term_unregister().
9714 2007-05-04 Robert Millan <rmh@aybabtu.com>
9716 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
9717 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
9718 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
9719 and update-grub_DATA.
9720 * conf/common.rmk: Build and install update-grub components.
9721 * conf/common.mk: Regenerate.
9722 * util/update-grub.in: New. Core of update-grub.
9723 * util/grub.d/00_header.in: New. Generates grub.cfg header.
9724 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
9725 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
9726 * util/grub.d/README: New. Document grub.d directory layout.
9728 2007-05-01 Robert Millan <rmh@aybabtu.com>
9730 * util/grub-emu.c: Move initialization functions
9731 grub_util_biosdisk_init() and grub_init_all() before
9732 grub_util_biosdisk_get_grub_dev(), which relies on them.
9734 2007-04-19 Robert Millan <rmh@aybabtu.com>
9736 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
9739 2007-04-18 Jerone Young <jerone@gmail.com>
9741 * kernel/elf.c: Add missing parenthesis for conditional statement
9744 2007-04-10 Jerone Young <jerone@gmail.com>
9746 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
9747 continue on and look for device node with real device name.
9749 2007-04-10 Jerone Young <jerone@gmail.com>
9751 * configure.ac: Add argument for autoconf to use transformation
9753 * Makefile.in: Add autoconf package transformation code.
9754 * util/i386/pc/grub-install.in: Likewise.
9755 * util/powerpc/ieee1275/grub-install.in: Likewise.
9757 2007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
9759 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
9760 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
9761 (EXT2_REVISION): Likewise.
9762 (EXT2_INODE_SIZE): Likewise.
9763 (struct grub_ext2_block_group): Added a missing member
9765 (grub_ext2_read_inode): Divide by the inode size in a superblock
9766 instead of 128 to obtain INODES_PER_BLOCK.
9767 Use the macro EXT2_INODE_SIZE instead of directly using
9770 2007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
9772 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
9773 superblock instead of the structure size to compute an
9774 offset. This fixes the problem that GRUB could not read a
9775 filesystem when inode size is different from 128-byte.
9777 2007-03-05 Marco Gerards <marco@gnu.org>
9779 * normal/main.c (read_config_file): When "menu" is not set, create
9782 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
9784 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
9785 (HEAP_LIMIT): New macro.
9786 (grub_claim_heap): Claim memory up to `heaplimit'.
9788 2007-02-21 Hollis Blanchard <hollis@penguinppc.org>
9790 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
9791 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
9793 (grub_arch_modules_addr): Return address after `_end'.
9794 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
9795 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
9796 (add_segments): Calculate `_end' from phdr size and location.
9797 (ALIGN_UP): Moved to ...
9798 * include/grub/misc.h: here.
9799 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9801 (GRUB_IEEE1275_MODULE_BASE): Removed.
9803 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9805 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
9808 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9810 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
9812 (grub_elf64_load_hook_t): Likewise.
9813 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
9816 2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9818 * kern/mm.c: Update copyright.
9819 (grub_mm_debug): Correct syntax error.
9820 (grub_mm_dump_free): New function.
9821 (grub_debug_free): Call `grub_free'.
9822 * include/grub/mm.h: Update copyright.
9823 (grub_mm_dump_free): Add declaration.
9825 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9827 * include/grub/ieee1275/ieee1275.h: Update copyright.
9828 * kern/powerpc/ieee1275/init.c: Likewise.
9829 * kern/powerpc/ieee1275/openfw.c: Likewise.
9831 * loader/powerpc/ieee1275/linux.c: Likewise.
9832 * include/grub/elfload.h: Likewise.
9833 * kern/elf.c: Likewise.
9834 (grub_elf32_load): Pass `base' and `size' parameters. Update all
9836 (grub_elf64_load): Likewise.
9837 (grub_elf32_load_segment): Move to a nested function.
9838 (grub_elf64_load_segment): Likewise.
9840 2007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9842 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
9844 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
9845 (grub_heap_len): Likewise.
9846 (HEAP_SIZE): New macro.
9847 (grub_claim_heap): New function.
9848 (grub_machine_init): Don't claim heap directly. Call
9850 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
9851 (grub_available_iterate): New function.
9853 2007-02-03 Thomas Schwinge <tschwinge@gnu.org>
9855 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
9856 * configure.ac: Use it for testing the HOST and TARGET compilers.
9858 2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
9860 * Makefile.in (enable_grub_emu): New variable.
9861 * configure.ac (--enable-grub-emu): New option.
9862 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
9863 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
9864 * conf/i386-pc.rmk: Likewise.
9865 * conf/powerpc-ieee1275.rmk: Likewise.
9866 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
9868 2006-12-12 Marco Gerards <marco@gnu.org>
9870 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
9872 * kern/env.c (grub_env_unset): Don't free the member `value' when
9873 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
9876 * normal/main.c (current_menu): Removed.
9877 (free_menu): Unset the `menu' environment variable.
9878 (grub_normal_menu_addentry): Make use of the environment variable
9879 `menu', instead of using the global `current_menu'. Allocate
9880 memory for the sourcecode of this entry.
9881 (read_config_file): New argument `nested', changed all callers.
9882 Only in the case of a new context, initialize a new menu. Set the
9883 `menu' environment variable.
9884 (grub_normal_execute): Don't set and unset the environment
9885 variable `menu' here anymore. Only free the menu when leaving the
9888 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
9891 2006-12-11 Marco Gerards <marco@gnu.org>
9893 * normal/menu_entry.c (run): Fix off by one bug so the last line
9894 is executed. Move the loader check to outside the loop.
9896 2006-12-08 Hollis Blanchard <hollis@penguinppc.org>
9898 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
9900 2006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
9902 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
9903 the number of sectors. Reported by Andrey Shuvikov
9904 <mr_hyro@yahoo.com>.
9906 2006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
9908 * kern/disk.c (grub_disk_read): When there is a read error, always
9909 try to read only the necessary data.
9911 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
9913 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
9915 [GRUB_UTIL] (grub_raid_fini): Likewise.
9916 [GRUB_UTIL] (grub_lvm_init): Likewise.
9917 [GRUB_UTIL] (grub_lvm_fini): Likewise.
9918 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
9919 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
9920 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
9921 and grub_raid_fini().
9923 2006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
9925 * include/grub/types.h (__unused): Rename to UNUSED.
9926 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
9927 (grub_elf64_size): Likewise.
9929 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
9931 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
9932 grub_error_push and grub_error_pop in the error-handling path.
9933 (grub_elf32_load_segment): Only call grub_file_read with non-zero
9936 2006-11-03 Hollis Blanchard <hollis@penguinppc.org>
9938 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
9939 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9940 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9941 (kernel_elf_SOURCES): Likewise.
9942 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
9943 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
9944 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9945 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9946 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
9947 (elf_mod_SOURCES): New variable.
9948 (elf_mod_CFLAGS): Likewise.
9949 (elf_mod_LDFLAGS): Likewise.
9950 * include/grub/types.h (__unused): New macro.
9951 * include/grub/elfload.h: New file.
9952 * kern/elf.c: Likewise.
9953 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
9954 (ELF32_LOADMASK): New macro.
9955 (ELF64_LOADMASK): Likewise.
9957 (grub_linux_load32): New function.
9958 (grub_linux_load64): Likewise.
9959 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
9960 Use grub_elf_t instead of grub_file_t.
9962 2006-11-02 Hollis Blanchard <hollis@penguinppc.org>
9964 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
9965 `catch_result' to struct set_color_args.
9967 2006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9969 * normal/menu.c: Include grub/script.h.
9970 * normal/menu_entry.c: Likewise.
9971 * include/grub/normal.h: Do not include grub/script.h.
9973 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9975 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
9977 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9979 * kern/disk.c (grub_disk_open): Print debug messages when opening a
9981 (grub_disk_close): Print debug messages when closing a disk.
9982 (grub_disk_read): Print debug messages when disk read fails.
9983 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
9985 * kern/partition.c: Include misc.h.
9986 (grub_partition_iterate): Print debug messages when detecting
9989 2006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9991 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
9993 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
9995 2006-10-26 Hollis Blanchard <hollis@penguinppc.org>
9997 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9998 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10000 2006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
10002 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10003 instead of sizeof(lv). Patch by Michael Guntsche.
10005 2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
10007 * disk/lvm.c: Rename VGS to VG_LIST.
10008 (grub_lvm_iterate): Change VGS->LV to VG-LV.
10009 (grub_lvm_open): Likewise.
10010 Thanks to Michael Guntsche for finding this bug.
10012 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10014 * configure.ac (AC_INIT): Bumped to 1.95.
10016 2006-10-14 Robert Millan <rmh@aybabtu.com>
10018 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10019 with "/dev/.static/dev/md".
10021 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10023 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10024 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10025 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10026 DRIVE_NAME are always freed.
10028 * util/i386/pc/biosdisk.c (make_device_name): Add one into
10029 DOS_PART, as a DOS partition is counted from one instead of zero
10030 now. Reported by Robert Millan.
10032 2006-10-14 Robert Millan <rmh@aybabtu.com>
10034 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10035 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10036 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10037 string returned by grub_guess_root_device.
10038 * util/i386/pc/grub-setup.c: Likewise.
10039 * util/i386/pc/grub-probefs.c: Likewise.
10041 * util/i386/pc/grub-probefs.c: Rename to ...
10042 * util/i386/pc/grub-probe.c: ... this.
10043 * DISTLIST: Remove grub-probefs, add grub-probe.
10044 * conf/i386-efi.rmk: Likewise.
10045 * conf/i386-pc.rmk: Likewise.
10046 * util/i386/pc/grub-install.in: Likewise.
10048 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10049 choose which information we want to print.
10051 2006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
10053 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10054 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10055 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10056 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10057 video/readers/tga.c and video/i386/pc/vbeutil.c.
10059 2006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
10061 Added support for RAID and LVM.
10063 * disk/lvm.c: New file.
10064 * disk/raid.c: Likewise.
10065 * include/grub/lvm.h: Likewise.
10066 * include/grub/raid.h: Likewise.
10067 * include/grub/util/lvm.h: Likewise.
10068 * include/grub/util/raid.h: Likewise.
10069 * util/lvm.c: Likewise.
10070 * util/raid.c: Likewise.
10072 * include/grub/disk.h (grub_disk_dev_id): Add
10073 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
10074 (grub_disk_get_size): New prototype.
10075 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
10076 returns a partition.
10077 (grub_disk_get_size): New function.
10079 * kern/i386/pc/init.c (make_install_device): Copy the prefix
10080 verbatim if grub_install_dos_part is -2.
10082 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
10085 * util/i386/pc/grub-setup.c (setup): New argument
10086 MUST_EMBED. Force embedding of GRUB when the argument is
10087 true. Close FILE before returning.
10088 (main): Add support for RAID and LVM.
10090 * conf/common.rmk: Add RAID and LVM modules.
10091 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
10093 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
10095 * kern/misc.c (grub_strstr): New function.
10096 * include/grub/misc.h (grub_strstr): New prototype.
10098 2006-10-10 Tristan Gingold <tristan.gingold@bull.net>
10100 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
10102 2006-10-05 Tristan Gingold <tristan.gingold@bull.net>
10104 * kern/misc.c (grub_strtoull): Guess the base only if not
10107 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10109 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
10112 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10114 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
10116 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
10117 Remove `flags' argument. All callers changed.
10118 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
10119 (IEEE1275_IHANDLE_INVALID): New variable.
10120 (IEEE1275_CELL_INVALID): New variable.
10121 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
10122 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
10123 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
10124 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
10125 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
10126 codes from Open Firmware. All callers updated.
10127 (grub_ieee1275_next_property): Directly return Open Firmware return
10129 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
10130 Standardize error checking from `grub_ieee1275_get_property'.
10131 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
10132 `devalias' to `aliases'. Correct comments. Consolidate error paths.
10134 2006-10-01 Hollis Blanchard <hollis@penguinppc.org>
10136 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
10137 `instance_to_package_args' to `instance_to_path_args'.
10139 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
10140 `grub_ieee1275_chosen'.
10142 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
10143 `grub_ieee1275_interpret'.
10145 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
10147 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
10149 2006-09-25 Hollis Blanchard <hollis@penguinppc.org>
10151 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
10152 (__cmpdi): Likewise.
10154 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
10155 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
10158 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
10160 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
10161 to type `grub_ssize_t'.
10162 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
10164 2006-09-22 Marco Gerards <marco@gnu.org>
10166 * normal/script.c (grub_script_create_cmdmenu): Skip leading
10169 2006-09-22 Marco Gerards <marco@gnu.org>
10171 * commands/echo.c: New file.
10173 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
10175 * conf/common.rmk (echo_mod_SOURCES): New variable.
10176 (echo_mod_CFLAGS): Likewise.
10177 (echo_mod_LDFLAGS): Likewise.
10179 2006-09-22 Marco Gerards <marco@gnu.org>
10181 * normal/main.c (get_line): Malloc memory instead of using
10182 preallocated memory. Removed the arguments `cmdline' and
10183 `max_len'. Updated all callers.
10185 2006-09-22 Marco Gerards <marco@gnu.org>
10187 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
10188 (normal_mod_DEPENDENCIES): Likewise.
10190 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
10191 (normal_mod_DEPENDENCIES): Likewise.
10193 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
10195 2006-09-22 Johan Rydberg <jrydberg@gnu.org>
10197 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
10199 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
10200 (normal_mod_DEPENDENCIES): Likewise.
10201 * conf/i386-pc.mk: Regenerate.
10202 * conf/i386-efi.mk: Likewise
10203 * conf/common.mk: Likewise.
10204 * conf/powerpc-ieee1275.mk: Likewise.
10205 * conf/sparc64-ieee1275.mk: Likewise.
10207 2006-09-22 Robert Millan <rmh@aybabtu.com>
10209 Sync with i386 version.
10210 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10211 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10213 2006-09-21 Robert Millan <rmh@aybabtu.com>
10215 Import from GRUB Legacy (lib/device.c):
10216 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10217 (init_device_map) [__linux__]: Add support for I2O devices.
10219 2006-09-14 Marco Gerards <marco@gnu.org>
10221 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10224 2006-09-14 Robert Millan <rmh@aybabtu.com>
10226 * util/i386/pc/grub-install.in: Skip menu.lst when removing
10229 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
10231 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10232 before adding it to device.map.
10234 2006-08-15 Johan Rydberg <jrydberg@gnu.org>
10236 * genmk.rb: Let GCC generate dependencies the first time it
10237 compiles a file; using the -MD option.
10238 * conf/common.mk: Regenerate.
10239 * conf/i386-pc.mk: Likewise.
10240 * conf/i386-efi.mk: Likewise.
10241 * conf/powerpc-ieee1275.mk: Likewise.
10242 * conf/sparc64-ieee1275.mk: Likewise.
10244 2006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
10246 Move the prototypes of grub_setjmp and grub_longjmp to
10247 cpu/setjmp.h, so that each architecture may specify different
10250 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10251 (grub_longjmp): Likewise.
10252 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10253 (grub_longjmp): Likewise.
10254 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10255 (grub_longjmp): Likewise.
10257 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10258 [!GRUB_UTIL] (grub_longjmp): Removed.
10260 2006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
10262 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10263 "color!" method does not return any value.
10265 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10267 * include/grub/bitmap.h: New file.
10269 * include/grub/i386/pc/vbeutil.h: Likewise.
10271 * video/bitmap.c: Likewise.
10273 * video/readers/tga.c: Likewise.
10275 * video/i386/pc/vbeutil.c: Likewise.
10277 * commands/videotest.c: Code cleanup and updated to reflect to new
10280 * term/gfxterm.c: Likewise.
10282 * video/video.c: Likewise.
10284 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10285 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10286 (bitmap_mod_SOURCES): New entry.
10287 (bitmap_mod_CFLAGS): Likewise.
10288 (bitmap_mod_LDFLAGS): Likewise.
10289 (tga_mod_SOURCES): Likewise.
10290 (tga_mod_CFLAGS): Likewise.
10291 (tga_mod_LDFLAGS): Likewise.
10293 * include/grub/video.h (grub_video_blit_operators): New enum type.
10294 (grub_video_render_target): Changed as forward declaration and moved
10295 actual definition to be video driver specific.
10296 (grub_video_adapter.blit_bitmap): Added blitting operator.
10297 (grub_video_adapter.blit_render_target): Likewise.
10298 (grub_video_blit_bitmap): Likewise.
10299 (grub_video_blit_render_target): Likewise.
10301 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10302 driver specific render target definition.
10303 (grub_video_vbe_map_rgba): Added driver internal helper.
10304 (grub_video_vbe_unmap_color): Updated to use
10305 grub_video_i386_vbeblit_info.
10306 (grub_video_vbe_get_video_ptr): Likewise.
10308 * include/grub/i386/pc/vbeblit.h
10309 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10310 grub_video_i386_vbeblit_info.
10311 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10312 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10313 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10314 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10315 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10316 (grub_video_i386_vbeblit_index_index): Likewise.
10317 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10318 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10319 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10320 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10322 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10325 * video/i386/pc/vbeblit.c: Updated to reflect changes on
10326 include/grub/i386/pc/vbeblit.h.
10328 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10329 Updated to use grub_video_i386_vbeblit_info.
10330 (grub_video_i386_vbefill_R8G8B8): Likewise.
10331 (grub_video_i386_vbefill_index): Likewise.
10332 (grub_video_i386_vbefill): Added generic filler.
10334 * video/i386/pc/vbefill.c: Updated to reflect changes on
10335 include/grub/i386/pc/vbefill.h.
10337 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10338 grub_video_i386_vbeblit_info.
10339 (grub_video_vbe_unmap_color): Likewise.
10340 (grub_video_vbe_blit_glyph): Likewise.
10341 (grub_video_vbe_scroll): Likewise.
10342 (grub_video_vbe_draw_pixel): Removed function.
10343 (grub_video_vbe_get_pixel): Likewise.
10344 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10345 updated code to use it.
10346 (common_blitter): Added common blitter for render target and bitmap.
10347 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10348 (grub_video_vbe_blit_render_target): Likewise.
10350 2006-07-30 Johan Rydberg <jrydberg@gnu.org>
10352 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10353 is in text mode if there is no console control protocol instance
10356 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10358 * include/grub/video.h: Code cleanup.
10360 * include/grub/i386/pc/vbe.h: Likewise.
10362 * video/i386/pc/vbe.c: Likewise.
10364 * video/i386/pc/vbeblit.c: Likewise.
10366 * video/i386/pc/vbefill.c: Likewise.
10368 * video/video.c: Likewise. Also added more comments.
10370 2006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10372 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10373 (struct grub_biosdisk_dap): Likewise.
10375 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
10376 linkage settings for all functions.
10378 2006-07-12 Marco Gerards <marco@gnu.org>
10380 * configure.ac (--enable-mm-debug): Fix typo.
10382 * genkernsyms.sh.in: Use proper quoting for `CC'.
10384 2006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
10386 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10387 (normal_mod_ASFLAGS): Remove "-m32".
10389 2006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
10391 * util/misc.c: Include config.h.
10392 [!HAVE_MEMALIGN]: Do not include malloc.h.
10393 (grub_memalign): Use posix_memalign, if present. Then, use
10394 memalign, if present. Otherwise, emit an error.
10396 * util/grub-emu.c: Do not include malloc.h.
10398 * include/grub/util/misc.h: Include unistd.h. This is required for
10399 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10400 D. Eades III <hde@foobar-qux.org>.
10402 * configure.ac (AC_GNU_SOURCE): Added.
10403 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10406 2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
10408 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10409 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10411 2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
10413 * include/grub/types.h (grub_host_addr_t): Rename to
10414 grub_target_addr_t.
10415 (grub_host_off_t): Rename to grub_target_off_t.
10416 (grub_host_size_t): Rename to grub_target_size_t.
10417 (grub_host_ssize_t): Rename to grub_target_ssize_t.
10418 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10420 * include/grub/kernel.h (struct grub_module_header): Change type
10421 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10422 (grub_module_info): Likewise.
10424 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10426 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10427 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10428 Velazquez <jesus.velazquez@gmail.com>.
10430 2006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10432 Count partitions from 1 instead of 0 in the string representation
10433 of partitions. Still use 0-based internally.
10435 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10436 (sun_partition_map_iterate): Use grub_partition_t instead of
10437 struct grub_partition *. Cast DESC->START_CYLINDER to
10438 grub_uint64_t after converting the endian.
10439 (sun_partition_map_probe): Subtract 1 for PARTNUM.
10440 (sun_partition_map_get_name): Add 1 to P->INDEX.
10442 * partmap/pc.c (grub_partition_parse): Subtract 1 for
10444 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10446 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10447 zero instead of one.
10448 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10449 (gpt_partition_map_get_name): Add 1 into P->INDEX.
10451 * partmap/apple.c (apple_partition_map_iterate): Change the type
10452 of POS to unsigned.
10453 (apple_partition_map_probe): Subtract 1 for PARTNUM.
10454 (apple_partition_map_get_name): Add 1 into P->INDEX.
10456 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10457 of POS to unsigned.
10458 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10459 calculate the offset of a partition.
10460 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10461 (amiga_partition_map_get_name): Add 1 into P->INDEX.
10463 * partmap/acorn.c (acorn_partition_map_find): Change the type of
10464 SECTOR to grub_disk_addr_t.
10465 (acorn_partition_map_iterate): Likewise.
10466 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10467 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10469 (acorn_partition_map_get_name): Add 1 into P->INDEX.
10471 * kern/i386/pc/init.c (make_install_device): Add 1 into
10472 GRUB_INSTALL_DOS_PART.
10474 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10477 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10479 Clean up the code to support 64-bit addressing in disks and
10480 files. This change is not enough for filesystems yet.
10482 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10483 type of "start" to grub_uint64_t.
10484 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10485 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10486 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10489 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10490 to grub_disk_addr_t.
10492 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10495 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10497 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10500 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10502 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10504 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10506 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10507 to grub_off_t, to detect an error from grub_file_seek.
10508 (grub_multiboot_load_elf32): Likewise.
10510 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10511 maximum unsigned long value when an overflow is detected.
10512 (grub_strtoull): New function.
10513 (grub_divmod64): Likewise.
10514 (grub_lltoa): use grub_divmod64.
10516 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10518 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10519 the pointer to next character. Use grub_strtoull instead of
10521 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10522 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10525 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
10526 return value is signed.
10527 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10528 test if OFFSET is less than zero, as OFFSET is unsigned now.
10530 * kern/disk.c (struct grub_disk_cache): Change the type of
10531 "sector" to grub_disk_addr_t.
10532 (grub_disk_cache_get_index): Change the type of SECTOR to
10533 grub_disk_addr_t. Calculate the hash with SECTOR casted to
10534 unsigned after shifting.
10535 (grub_disk_cache_invalidate): Change the type of SECTOR to
10537 (grub_disk_cache_unlock): Likewise.
10538 (grub_disk_cache_store): Likewise.
10539 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10540 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10541 grub_disk_addr_t and grub_uint64_t, respectively.
10542 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10543 body, as the value of OFFSET is tweaked by
10544 grub_disk_check_range. Change the types of START_SECTOR, LEN and
10545 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10547 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10548 body, as the value of OFFSET is tweaked by
10549 grub_disk_check_range. Change the types of LEN and N to
10552 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10553 and "saved_offset" to grub_off_t.
10554 (test_header): Cast BUF to char *.
10555 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10557 (grub_gzio_read): Change the types of OFFSET and SIZE to
10558 grub_off_t and grub_size_t, respectively.
10560 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10562 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10563 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
10564 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
10565 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
10566 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
10568 * include/grub/types.h (grub_off_t): Unconditionally set to
10570 (grub_disk_addr_t): Changed to grub_uint64_t.
10572 * include/grub/partition.h (struct grub_partition): Change the
10573 types of "start", "len" and "offset" to grub_disk_addr_t,
10574 grub_uint64_t and grub_disk_addr_t, respectively.
10575 (grub_partition_get_start): Return grub_disk_addr_t.
10576 (grub_partition_get_len): Return grub_uint64_t.
10578 * include/grub/misc.h (grub_strtoull): New prototype.
10579 (grub_divmod64): Likewise.
10581 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
10582 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
10583 grub_off_t, respectively.
10584 All callers and references changed.
10586 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
10587 grub_size_t in "read".
10588 All callers and references changed.
10590 * include/grub/file.h (struct grub_file): Change the types of
10591 "offset" and "size" to grub_off_t and grub_off_t,
10592 respectively. Change the type of SECTOR to grub_disk_addr_t in
10594 (grub_file_read): Change the type of LEN to grub_size_t.
10595 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
10597 (grub_file_size): Return grub_off_t.
10598 (grub_file_tell): Likewise.
10599 All callers and references changed.
10601 * include/grub/disk.h (struct grub_disk_dev): Change the types of
10602 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10604 (struct grub_disk): Change the type of "total_sectors" to
10605 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
10607 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10608 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10609 (grub_disk_write): Likewise.
10610 All callers and references changed.
10612 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10613 char * for grub_strncmp to silence gcc.
10614 (grub_iso9660_mount): Likewise.
10615 (grub_iso9660_mount): Likewise.
10616 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10618 (grub_iso9660_iterate_dir): Likewise.
10619 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
10621 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
10622 LEN to grub_disk_addr_t and grub_size_t, respectively.
10624 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10626 * fs/jfs.c (grub_jfs_read_file): Likewise.
10628 * fs/minix.c (grub_jfs_read_file): Likewise.
10630 * fs/sfs.c (grub_jfs_read_file): Likewise.
10632 * fs/ufs.c (grub_jfs_read_file): Likewise.
10634 * fs/xfs.c (grub_jfs_read_file): Likewise.
10636 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
10637 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
10640 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
10641 BLKNR to -1 instead of returning GRUB_ERRNO.
10642 (grub_ext2_read_file): Change the types of SECTOR and
10643 LEN to grub_disk_addr_t and grub_size_t, respectively.
10645 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
10646 LEN to grub_disk_addr_t and grub_size_t, respectively.
10648 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
10651 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
10652 string. Do not cast SECTOR explicitly.
10654 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
10655 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
10656 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
10657 grub_disk_addr_t and grub_size_t, respectively. If the sector is
10658 over 2TB and LBA mode is not supported, raise an error.
10659 (get_safe_sectors): New function.
10660 (grub_biosdisk_read): Use get_safe_sectors.
10661 (grub_biosdisk_write): Likewise.
10663 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
10664 (grub_efidisk_write): Likewise.
10666 * disk/loopback.c (delete_loopback): Cosmetic changes.
10667 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
10669 (grub_loopback_open): Likewise.
10670 (grub_loopback_read): Likewise. Also, change the type of POS to
10671 grub_off_t, and fix the usage of grub_memset.
10673 * commands/i386/pc/play.c: Include grub/machine/time.h.
10675 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
10678 * commands/configfile.c: Include grub/env.h.
10680 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
10681 GRUB_ERRNO directly instead. Change the type of POS to
10682 grub_off_t. Follow the coding standard.
10684 * commands/blocklist.c: Include grub/partition.h.
10685 (grub_cmd_blocklist): Return an error if the underlying device is
10686 not a disk. Take the starting sector of a partition into account,
10687 if a partition is used.
10689 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
10691 (lba_mode): Support 64-bit addresses.
10692 (chs_mode): Likewise.
10693 (copy_buffer): Adapted to the new offsets of a length field and a
10695 (blocklist_default_start): Allocate 64-bit space.
10697 * boot/i386/pc/boot.S (force_lba): Removed.
10698 (boot_drive): Moved to under KERNEL_SECTOR.
10699 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
10701 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
10703 (lba_mode): Refactored to support a 64-bit address. More size
10705 (setup_sectors): Likewise.
10707 2006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10709 * DISTLIST: Added include/grub/i386/linux.h. Removed
10710 include/grub/i386/pc/linux.h
10712 * configure.ac (AC_INIT): Bumped to 1.94.
10714 * config.guess: Updated from gnulib.
10715 * config.sub: Likewise.
10716 * install-sh: Likewise.
10717 * mkinstalldirs: Likewise.
10719 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
10721 * conf/common.rmk (grub_modules_init.lst): Depended on
10722 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
10725 * genmk.rb (PModule::rule): Reverted the previous change.
10727 2006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
10729 * conf/common.rmk (grub_modules_init.lst): Depends on
10730 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
10731 that the target does not exist before producing.
10732 (grub_modules_init.h): Remove the target before generating.
10733 (grub_emu_init.c): Likewise.
10735 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
10737 2006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
10739 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
10740 for the target-specific tests. Make sure that we also have the
10741 up-to-date target variables for those tests.
10743 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
10745 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
10746 (PModule::rule): Likewise.
10748 2006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
10750 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
10751 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
10752 target-specific flags should be prefixed.
10753 (PModule::rule): Likewise.
10755 2006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
10757 * configure.ac (CMP): Check if cmp is available explicitly.
10759 2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
10761 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
10762 (target_cpu): New variable.
10763 (pkglibdir): Use target_cpu instead of host_cpu.
10765 * util/i386/pc/grub-install.in (host_cpu): Removed.
10766 (target_cpu): New variable.
10767 (pkglibdir): Use target_cpu instead of host_cpu.
10769 * util/genmoddep.c: Removed.
10771 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
10772 instead of GRUB_HOST_SIZEOF_VOID_P.
10773 * kern/dl.c: Likewise.
10775 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
10777 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10778 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10779 (GRUB_TARGET_SIZEOF_LONG): ... this.
10780 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10781 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10782 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10784 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10785 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10786 (GRUB_TARGET_SIZEOF_LONG): ... this.
10787 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10788 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10789 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10791 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10792 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10793 (GRUB_TARGET_SIZEOF_LONG): ... this.
10794 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10795 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10797 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
10798 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
10799 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
10800 instead of GRUB_HOST_SIZEOF_LONG.
10801 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
10802 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
10803 GRUB_CPU_WORDS_BIGENDIAN.
10804 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
10805 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
10808 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
10809 (genmoddep_SOURCES): Likewise.
10810 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
10811 (genmoddep_SOURCES): Likewise.
10812 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
10813 (genmoddep_SOURCES): Likewise.
10814 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
10816 (genmoddep_SOURCES): Likewise.
10818 * genmoddep.awk: New file.
10820 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
10821 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
10822 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
10823 (PModule::rule): Likewise.
10824 (Program::rule): Likewise.
10825 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
10826 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
10829 * configure.ac: Rewritten intensively to use host and target
10830 instead of build and host, respectively.
10832 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
10833 (host_cpu): Removed.
10834 (target_cpu): New variable.
10835 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
10836 (BUILD_CC): Removed.
10837 (BUILD_CFLAGS): Likewise.
10838 (BUILD_CPPFLAGS): Likewise.
10839 (TARGET_CC): New variable.
10840 (TARGET_CFLAGS): Likewise.
10841 (TARGET_CPPFLAGS): Likewise.
10842 (TARGET_LDFLAGS): Likewise.
10844 (include): Use target_cpu instead of host_cpu.
10845 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
10847 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
10849 2006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
10851 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
10852 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
10853 field 'false' to 'exec_on_false'.
10854 (grub_script_create_cmdif): Renamed argument names to reflect above
10857 * normal/execute.c (grub_script_execute_cmdif): Likewise.
10859 * normal/script.c (grub_script_create_cmdif): Likewise.
10861 2006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
10863 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
10865 (grub_hfsplus_btree_recptr): Likewise.
10866 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
10867 FILEBLOCK both to pass a block number and store next block
10869 (grub_hfsplus_read_block): Rewritten heavily to support an extent
10870 overflow file correctly. Specify errors appropriately, because
10871 fshelp expects that GRUB_ERRNO is set when fails. Reuse
10872 grub_hfsplus_btree_recptr to get the pointer to a found key.
10873 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
10876 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
10878 (_linux_mod_SOURCES): New variable.
10879 (_linux_mod_CFLAGS): Likewise.
10880 (_linux_mod_LDFLAGS): Likewise.
10881 (linux_mod_SOURCES): Likewise.
10882 (linux_mod_CFLAGS): Likewise.
10883 (linux_mod_LDFLAGS): Likewise.
10885 * DISTLIST: Added loader/i386/efi/linux.c,
10886 loader/i386/efi/linux_normal.c and
10887 include/grub/i386/efi/loader.h.
10889 * loader/i386/efi/linux.c: New file.
10890 * loader/i386/efi/linux_normal.c: Likewise.
10891 * include/grub/i386/efi/loader.h: Likewise.
10893 2006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
10895 * commands/blocklist.c: New file.
10897 * DISTLIST: Added commands/blocklist.c.
10899 * term/efi/console.c (grub_console_highlight_color): Use a lighter
10900 color for the background, and a darker color for the foreground.
10901 (grub_console_checkkey): Return READ_KEY.
10902 (grub_console_cls): Set the background to
10903 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
10905 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
10907 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
10908 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
10910 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
10913 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
10914 BG. The spec is wrong again.
10916 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
10918 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
10920 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10921 commands/blocklist.c.
10922 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10924 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
10925 (blocklist_mod_SOURCES): New variable.
10926 (blocklist_mod_CFLAGS): Likewise.
10927 (blocklist_mod_LDFLAGS): Likewise.
10929 2006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
10931 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
10933 (lba_mode): Use %eax more intensively to reduce the code size.
10935 2006-05-20 Marco Gerards <marco@gnu.org>
10937 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
10939 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
10941 (script): Accept leading newlines.
10942 (newlines): New rule to describe 0 or more newlines.
10943 (commands): Accept `command' with trailing newline. Fixed the
10944 order in which arguments were passed to `grub_script_add_cmd'.
10945 Accept commands separated by newlines.
10946 (function): Changed to accept newlines.
10947 (menuentry) Rewritten.
10949 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
10950 front of the list, instead of to the end.
10952 2006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
10954 * util/i386/pc/grub-install.in (bindir): New variable.
10955 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
10956 Shaver <lbgwjl@gmail.com>.
10958 2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
10960 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
10961 grub/machine/linux.h
10962 * loader/i386/pc/linux.c: Likewise.
10964 * include/grub/i386/pc/linux.h: Moved to ...
10965 * include/grub/i386/linux.h: ... here.
10967 * include/grub/i386/linux.h (struct linux_kernel_params): New
10970 2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
10972 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
10974 (grub_video_vbe_blit_glyph): Likewise.
10975 (grub_video_vbe_blit_bitmap): Likewise.
10976 (grub_video_vbe_blit_render_target): Likewise.
10978 2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
10980 * configure.ac (--with-platform): Properly quote the square
10983 2006-05-08 Marco Gerards <marco@gnu.org>
10985 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
10987 (kernel_elf_HEADERS): ...to this. Updated all users.
10988 (grubof_symlist.c): Renamed from this...
10989 (kernel_elf_symlist.c): ...to this. Updated all users.
10990 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10991 (grubof_SOURCES): Renamed from this...
10992 (kernel_elf_SOURCES): ...to this.
10993 (grubof_HEADERS): Renamed from this...
10994 (kernel_elf_HEADERS): ...to this.
10995 (grubof_CFLAGS): Renamed from this...
10996 (kernel_elf_CFLAGS): ...to this.
10997 (grubof_ASFLAGS): Renamed from this...
10998 (kernel_elf_ASFLAGS): ...to this.
10999 (grubof_LDFLAGS): Renamed from this...
11000 (kernel_elf_LDFLAGS): ...to this.
11002 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11004 (kernel_elf_HEADERS): ...to this. Updated all users.
11005 (grubof_symlist.c): Renamed from this...
11006 (kernel_elf_symlist.c): ...to this. Updated all users.
11007 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11008 (grubof_SOURCES): Renamed from this...
11009 (kernel_elf_SOURCES): ...to this.
11010 (grubof_HEADERS): Renamed from this...
11011 (kernel_elf_HEADERS): ...to this.
11012 (grubof_CFLAGS): Renamed from this...
11013 (kernel_elf_CFLAGS): ...to this.
11014 (grubof_ASFLAGS): Renamed from this...
11015 (kernel_elf_ASFLAGS): ...to this.
11016 (grubof_LDFLAGS): Renamed from this...
11017 (kernel_elf_LDFLAGS): ...to this.
11019 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11020 `kernel.elf' instead of `grubof'.
11022 2006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
11024 Add --with-platform to configure. Use pkglibdir instead of
11025 pkgdatadir. This is reported by Roger Leigh.
11027 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11028 (host_vendor): Likewise.
11029 (host_os): Likewise.
11030 (pkgdatadir): Likewise.
11031 (platform): New variable.
11032 (pkglibdir): Likewise.
11033 Use PKGLIBDIR instead of PKGDATADIR.
11035 * util/i386/pc/grub-install.in (datadir): Removed.
11036 (host_vendor): Likewise.
11037 (host_os): Likewise.
11038 (pkgdatadir): Likewise.
11039 (platform): New variable.
11040 (pkglibdir): Likewise.
11041 Use PKGLIBDIR instead of PKGDATADIR.
11043 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11044 instead of GRUB_DATADIR.
11046 * util/i386/pc/grub-mkimage.c (usage): Likewise.
11048 * util/i386/efi/grub-mkimage.c (usage): Likewise.
11051 * configure.ac (--with-platform): New option.
11052 Use PLATFORM instead of HOST_VENDOR to specify a platform.
11054 * Makefile.in: Include a makefile based on PLATFORM instead of
11056 (pkgdatadir): Not appended by the machine type.
11057 (pkglibdir): Appended by the machine type.
11058 (host_vendor): Removed.
11059 (platform): New variable.
11060 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11061 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11062 (uninstall): Likewise.
11064 2006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
11066 Use the environment context in the menu. Remove the commands
11067 "default" and "timeout", and use variables instead.
11069 * normal/menu.c: Include grub/env.h.
11070 (print_entry): Cast TITLE to silence gcc.
11071 (get_timeout): New function.
11072 (set_timeout): Likewise.
11073 (get_entry_number): Likewise.
11074 (run_menu): Use a default entry, a fallback entry and a timeout
11075 in the environment variables "default", "fallback" and
11076 "timeout". Also, tweak the default entry if it is not within the
11077 current menu entries.
11078 (grub_menu_run): Use a fallback entry in the environment variable
11081 * normal/main.c (read_config_file): Do not initialize
11082 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
11084 (grub_normal_execute): Use a data slot to store the menu.
11086 * include/grub/normal.h (struct grub_menu): Removed default_entry,
11087 fallback_entry and timeout.
11088 (struct grub_menu_list): Removed.
11089 (grub_menu_list_t): Likewise.
11090 (struct grub_context): Likewise.
11091 (grub_context_t): Likewise.
11092 (grub_context_get): Likewise.
11093 (grub_context_get_current_menu): Likewise.
11094 (grub_context_push_menu): Likewise.
11095 (grub_context_pop_menu): Likewise.
11096 (grub_default_init): Likewise.
11097 (grub_default_fini): Likewise.
11098 (grub_timeout_init): Likewise.
11099 (grub_timeout_fini): Likewise.
11101 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
11103 (normal_mod_SOURCES): Removed normal/context.c.
11105 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
11106 commands/default.c, commands/timeout.c and normal/context.c.
11107 (normal_mod_SOURCES): Removed normal/context.c.
11109 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
11110 commands/timeout.c and normal/context.c.
11111 (normal_mod_SOURCES): Removed normal/context.c.
11113 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
11114 commands/default.c, commands/timeout.c and normal/context.c.
11115 (normal_mod_SOURCES): Removed normal/context.c.
11117 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
11119 (default_mod_SOURCES): Removed.
11120 (default_mod_CFLAGS): Likewise.
11121 (default_mod_LDFLAGS): Likewise.
11122 (timeout_mod_SOURCES): Removed.
11123 (timeout_mod_CFLAGS): Likewise.
11124 (timeout_mod_LDFLAGS): Likewise.
11126 * DISTLIST: Removed commands/default.c, commands/timeout.c and
11129 * commands/default.c: Removed.
11130 * commands/timeout.c: Likewise.
11131 * normal/context.c: Likewise.
11133 2006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
11135 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
11137 2006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
11139 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
11140 "next" to "prev" for readability.
11141 (struct grub_env_sorted_var): New struct.
11142 (grub_env_context): Renamed to ...
11143 (initial_context): ... this.
11144 (grub_env_var_context): Renamed to ...
11145 (current_context): ... this.
11146 (grub_env_find): Look only at CURRENT_CONTEXT.
11147 (grub_env_context_open): Rewritten to copy exported variables from
11149 (grub_env_context_close): Rewritten according to the new
11150 scheme. Also, add an assertion to prevent the initial context from
11152 (grub_env_insert): Removed the code for the sorted list.
11153 (grub_env_remove): Likewise.
11154 (grub_env_export): Simply mark the variable with
11155 GRUB_ENV_VAR_GLOBAL.
11156 (grub_env_set): A cosmetic change for naming consistency.
11157 (grub_env_get): Likewise.
11158 (grub_env_unset): Likewise.
11159 (grub_env_iterate): Rewritten to sort variables within this
11161 (grub_register_variable_hook): Fixed for naming consistency. Call
11162 grub_env_find again, only if NAME is not found at the first time.
11163 (mangle_data_slot_name): New function.
11164 (grub_env_set_data_slot): Likewise.
11165 (grub_env_get_data_slot): Likewise.
11166 (grub_env_unset_data_slot): Likewise.
11168 * include/grub/env.h (grub_env_var_type): New enum.
11169 (GRUB_ENV_VAR_LOCAL): New constant.
11170 (GRUB_ENV_VAR_GLOBAL): Likewise.
11171 (GRUB_ENV_VAR_DATA): Likewise.
11172 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
11174 (grub_env_set): Replace VAR with NAME for consistency.
11175 (grub_register_variable_hook): Likewise.
11176 (grub_env_export): Specify the name of the argument.
11177 (grub_env_set_data_slot): New prototype.
11178 (grub_env_get_data_slot): Likewise.
11179 (grub_env_unset_data_slot): Likewise.
11181 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11183 Extend the loader so that GRUB can accept a loader which comes
11184 back to GRUB when a loaded image exits. Also, this change adds
11185 support for a chainloader on EFI.
11187 * term/efi/console.c: Include grub/misc.h.
11188 (grub_console_checkkey): Display a scan code on the top for
11189 debugging. This will be removed once the EFI port gets stable.
11190 Correct the scan code mapping.
11192 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
11193 allocate memory from larger regions, in order to reduce the number
11194 of allocated regions. Otherwise, the MacOSX loader panics.
11195 (filter_memory_map): Avoid less than 1MB for compatibility with
11197 (add_memory_regions): Allocate from the tail of a region, if
11198 possible, to avoid allocating a region near to 1MB, for the MacOSX
11201 * kern/efi/init.c (grub_efi_set_prefix): Specify
11202 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
11204 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
11205 argument IMAGE_HANDLE and specify it to get a loaded image.
11206 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11207 grub_efi_get_loaded_image.
11208 (grub_efi_get_filename): Divide the length by the size of
11210 (grub_efi_get_device_path): New function.
11211 (grub_efi_print_device_path): Print End Device Path nodes. Divide
11212 the length by the size of grub_efi_char16_t for a file path device
11215 * kern/loader.c (grub_loader_noreturn): New variable.
11216 (grub_loader_set): Accept a new argument NORETURN. Set
11217 GRUB_LOADER_NORETURN to NORETURN.
11218 All callers changed.
11219 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11222 * include/grub/efi/efi.h (grub_efi_get_device_path): New
11224 (grub_efi_get_loaded_image): Take an argument to specify an image
11227 * include/grub/loader.h (grub_loader_set): Added one more argument
11230 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11231 instead of grub_efi_open_protocol.
11232 (grub_efidisk_get_device_name): Likewise.
11233 (grub_efidisk_close): Print a newline.
11234 (grub_efidisk_get_device_handle): Fixed to use
11235 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11236 GRUB_EFI_DEVICE_PATH_TYPE.
11238 * disk/efi/efidisk.c (device_path_guid): Moved to ...
11239 * kern/efi/efi.c (device_path_guid): ... here.
11241 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11243 (kernel_mod_HEADERS): Added efi/disk.h.
11244 (_chain_mod_SOURCES): New variable.
11245 (_chain_mod_CFLAGS): Likewise.
11246 (_chain_mod_LDFLAGS): Likewise.
11247 (chain_mod_SOURCES): Likewise.
11248 (chain_mod_CFLAGS): Likewise.
11249 (chain_mod_LDFLAGS): Likewise.
11251 * DISTLIST: Added include/grub/efi/chainloader.h,
11252 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11254 * include/grub/efi/chainloader.h: New file.
11255 * loader/efi/chainloader.c: Likewise.
11256 * loader/efi/chainloader_normal.c: Likewise.
11258 2006-04-30 Marco Gerards <marco@gnu.org>
11260 * commands/configfile.c (grub_cmd_source): New function.
11261 (GRUB_MOD_INIT): Register the commands `source' and `.'.
11262 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11264 2006-04-30 Marco Gerards <marco@gnu.org>
11266 * normal/execute.c (grub_script_execute_cmd): Change the return
11267 type to `grub_err_t'. Correctly return the error.
11268 (grub_script_execute_cmdline): In case a command line is not a
11269 command or a function, try to interpret it as an assignment.
11271 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11273 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11274 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11275 skip a node whose name is obviously invalid as UTF-16,
11276 i.e. contains a NUL character. Stop the iteration when the last
11277 directory entry is found. Instead of using the return value of
11278 grub_hfsplus_btree_iterate_node, store the value in RET and use
11279 it, because the iterator can be stopped by the last directory
11282 2006-04-30 Marco Gerards <marco@gnu.org>
11284 * include/grub/env.h (grub_env_export): New prototype. Reported
11285 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11287 2006-04-30 Marco Gerards <marco@gnu.org>
11289 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11290 size of the extents in a catalog file record.
11292 2006-04-29 Marco Gerards <marco@gnu.org>
11294 * commands/configfile.c (grub_cmd_configfile): Execute the
11295 configfile within its own context.
11297 * include/grub/env.h (grub_env_context_open): New prototype.
11298 (grub_env_context_close): Likewise.
11300 * kern/env.c (grub_env): Removed.
11301 (grub_env_sorted): Likewise.
11302 (grub_env_context): New variable.
11303 (grub_env_var_context): Likewise.
11304 (grub_env_find): Search both the active context and the global
11306 (grub_env_context_open): New function.
11307 (grub_env_context_close): Likewise.
11308 (grub_env_insert): Likewise.
11309 (grub_env_remove): Likewise.
11310 (grub_env_export): Likewise.
11311 (grub_env_set): Changed to use helper functions to avoid code
11313 (grub_env_iterate): Rewritten so both the current context and the
11314 global context are being used.
11316 * normal/command.c (export_command): New function.
11317 (grub_command_init): Register the `export' function.
11319 2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
11321 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11322 explicitly to suppress gcc's warnings.
11323 * fs/fat.c (grub_fat_find_dir): Likewise.
11324 (grub_fat_label): Likewise.
11325 * fs/xfs.c (grub_xfs_read_inode): Likewise.
11326 (grub_xfs_mount): Likewise.
11327 (grub_xfs_label): Likewise.
11328 * fs/affs.c (grub_affs_mount): Likewise.
11329 (grub_affs_label): Likewise.
11330 (grub_affs_iterate_dir): Likewise.
11331 * fs/sfs.c (grub_sfs_mount): Likewise.
11332 (grub_sfs_iterate_dir): Likewise.
11333 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11334 * fs/hfs.c (grub_hfs_mount): Likewise.
11335 (grub_hfs_cmp_catkeys): Likewise.
11336 (grub_hfs_find_dir): Likewise.
11337 (grub_hfs_dir): Likewise.
11338 (grub_hfs_label): Likewise.
11339 * fs/jfs.c (grub_jfs_mount): Likewise.
11340 (grub_jfs_opendir): Likewise.
11341 (grub_jfs_getent): Likewise.
11342 (grub_jfs_lookup_symlink): Likewise.
11343 (grub_jfs_label): Likewise.
11344 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11345 (grub_hfsplus_iterate_dir): Likewise.
11346 (grub_hfsplus_btree_iterate_node): Made static.
11348 * util/grub-emu.c (prefix): New variable.
11349 (grub_machine_set_prefix): New function.
11350 (main): Do not set the environment variable "prefix" here. Only
11351 set PREFIX, which is used later by grub_machine_set_prefix.
11353 * include/grub/video.h: Do not include grub/symbol.h.
11354 (grub_video_register): Not exported. This symbol is not defined in
11356 (grub_video_unregister): Likewise.
11357 (grub_video_iterate): Likewise.
11358 (grub_video_setup): Likewise.
11359 (grub_video_restore): Likewise.
11360 (grub_video_get_info): Likewise.
11361 (grub_video_get_blit_format): Likewise.
11362 (grub_video_set_palette): Likewise.
11363 (grub_video_get_palette): Likewise.
11364 (grub_video_set_viewport): Likewise.
11365 (grub_video_get_viewport): Likewise.
11366 (grub_video_map_color): Likewise.
11367 (grub_video_map_rgb): Likewise.
11368 (grub_video_map_rgba): Likewise.
11369 (grub_video_fill_rect): Likewise.
11370 (grub_video_blit_glyph): Likewise.
11371 (grub_video_blit_bitmap): Likewise.
11372 (grub_video_blit_render_target): Likewise.
11373 (grub_video_scroll): Likewise.
11374 (grub_video_swap_buffers): Likewise.
11375 (grub_video_create_render_target): Likewise.
11376 (grub_video_delete_render_target): Likewise.
11377 (grub_video_set_active_render_target): Likewise.
11379 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11381 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11383 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11384 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11385 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11386 instead of $(srcdir)/genkernsyms.sh.
11388 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11389 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11390 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11391 instead of $(srcdir)/genkernsyms.sh.
11393 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11394 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11395 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11396 instead of $(srcdir)/genkernsyms.sh.
11398 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11399 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11400 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11401 instead of $(srcdir)/genkernsyms.sh.
11403 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11406 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11408 (gensymlist.sh): New target.
11409 (genkernsyms.sh): Likewise.
11411 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11412 genkernsyms.sh.in and gensymlist.sh.in.
11414 * genkernsyms.sh: Removed.
11415 * gensymlist.sh: Likewise.
11417 * genkernsyms.sh.in: New file.
11418 * gensymlist.sh.in: Likewise.
11420 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11422 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11423 clobber "prefix", since we may have already set it manually.
11425 2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11427 * kern/misc.c (abort): New alias for grub_abort.
11429 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
11431 A new machine-specific function "grub_machine_set_prefix" is
11432 defined. This is called after loading modules, so that a prefix
11433 initialization can use modules. Also, this change adds an
11434 intensive debugging feature for the memory manager via the
11435 configure option "--enable-mm-debug".
11437 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11440 * kern/sparc64/ieee1275/init.c (abort): Removed.
11441 (grub_stop): Likewise.
11442 (grub_exit): New function.
11443 (grub_set_prefix): Renamed to ...
11444 (grub_machine_set_prefix): ... this.
11445 (grub_machine_init): Do not call grub_set_prefix.
11447 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11448 (grub_machine_set_prefix): ... this.
11449 (grub_machine_init): Do not call grub_set_prefix.
11451 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11452 (grub_machine_init): Do not set the prefix here.
11454 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11456 * kern/efi/init.c: Include grub/mm.h.
11457 (grub_efi_set_prefix): New function.
11459 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11460 (grub_efi_get_filename): New function.
11461 (grub_print_device_path): Renamed to ...
11462 (grub_efi_print_device_path): ... this.
11464 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11465 [MM_DEBUG] (grub_realloc): Likewise.
11466 [MM_DEBUG] (grub_free): Likewise.
11467 [MM_DEBUG] (grub_memalign): Likewise.
11468 [MM_DEBUG] (grub_mm_debug): New variable.
11469 [MM_DEBUG] (grub_debug_malloc): New function.
11470 [MM_DEBUG] (grub_debug_free): New function.
11471 [MM_DEBUG] (grub_debug_realloc): New function.
11472 [MM_DEBUG] (grub_debug_memalign): New function.
11474 * kern/misc.c (grub_abort): Print a newline to distinguish
11477 * kern/main.c (grub_main): Call grub_machine_set_prefix and
11478 grub_set_root_dev after loading modules. This is necessary when
11479 setting a prefix depends on modules.
11481 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11482 (grub_efi_print_device_path): ... this.
11483 (grub_efi_get_filename): New prototype.
11484 (grub_efi_set_prefix): Likewise.
11486 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11488 (grub_efidisk_get_device_handle): New prototype.
11489 (grub_efidisk_get_device_name): Likewise.
11491 * include/grub/mm.h: Include config.h.
11492 (MM_DEBUG): Removed.
11493 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11494 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11495 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11496 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11497 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11498 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11499 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11500 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11501 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11503 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11505 * disk/efi/efidisk.c: Include grub/partition.h.
11506 (iterate_child_devices): New function.
11507 (add_device): First, compare only last device path nodes, so that
11508 devices are sorted by the types.
11509 (grub_efidisk_get_device_handle): New function.
11510 (grub_efidisk_get_device_name): Likewise.
11512 * configure.ac (--enable-mm-debug): New option to enable the
11513 memory manager debugging feature. This makes the binary much
11514 bigger, so is disabled by default.
11516 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
11518 Use grub_abort instead of grub_stop, and grub_exit must be
11519 define in each architecture now. Also, this change adds support
11522 * util/i386/pc/grub-probefs.c: Include grub/term.h.
11523 (grub_getkey): New function.
11524 (grub_term_get_current): Likewise.
11526 * util/i386/pc/grub-setup.c: Include grub/term.h.
11527 (grub_getkey): New function.
11528 (grub_term_get_current): Likewise.
11530 * util/misc.c (grub_stop): Renamed to ...
11531 (grub_exit): ... this.
11533 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11534 (grub_exit): ... this.
11535 (grub_machine_init): Use grub_abort instead of abort.
11536 (grub_stop): Removed.
11538 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11541 * kern/i386/pc/startup.S (grub_exit): New function.
11542 (cold_reboot): New label.
11544 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11545 (grub_efi_init): Call grub_efidisk_init.
11546 (grub_efi_fini): Call grub_efidisk_fini.
11548 * kern/efi/efi.c: Include grub/mm.h.
11549 (grub_efi_console_control_guid): Renamed to ...
11550 (console_control_guid): ... this.
11551 (grub_efi_loaded_image_guid): Renamed to ...
11552 (loaded_image_guid): ... this.
11553 (grub_efi_locate_handle): New function.
11554 (grub_efi_open_protocol): Likewise.
11555 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11556 GRUB_EFI_CONSOLE_CONTROL_GUID.
11557 (grub_efi_exit): Removed.
11558 (grub_stop): Likewise.
11559 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11560 (grub_exit): New function.
11561 (grub_print_device_path): Likewise.
11563 * kern/rescue.c (grub_rescue_cmd_exit): New function.
11564 (grub_enter_rescue_mode): Register "exit".
11566 * kern/misc.c (grub_real_dprintf): A cosmetic change.
11567 (grub_abort): New function.
11569 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
11571 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
11573 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
11575 * include/grub/efi/efi.h (grub_efi_exit): Removed.
11576 (grub_print_device_path): New prototype.
11577 (grub_efi_locate_handle): Likewise.
11578 (grub_efi_open_protocol): Likewise.
11580 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
11581 * disk/efi/efidisk.c: Likewise.
11583 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
11585 * include/grub/efi/console_control.h
11586 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
11588 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
11589 last 8 bytes as an array.
11590 (GRUB_EFI_DISK_IO_GUID): New macro.
11591 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
11592 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
11593 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
11595 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
11596 (struct grub_efi_device_path): Rename the member "sub_type" to
11598 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
11599 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
11600 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
11601 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11602 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11603 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11604 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11605 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11606 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11607 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11608 (struct grub_efi_pci_device_path): New structure.
11609 (grub_efi_pci_device_path_t): New type.
11610 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11611 (struct grub_efi_pccard_device_path): New structure.
11612 (grub_efi_pccard_device_path_t): New type.
11613 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11614 (struct grub_efi_memory_mapped_device_path): New structure.
11615 (grub_efi_memory_mapped_device_path_t): New type.
11616 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11617 (struct grub_efi_vendor_device_path): New structure.
11618 (grub_efi_vendor_device_path_t): New type.
11619 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
11620 (struct grub_efi_controller_device_path): New structure.
11621 (grub_efi_controller_device_path_t): New type.
11622 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
11623 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
11624 (struct grub_efi_acpi_device_path): New structure.
11625 (grub_efi_acpi_device_path_t): New type.
11626 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
11627 (struct grub_efi_expanded_acpi_device_path): New structure.
11628 (grub_efi_expanded_acpi_device_path_t): New type.
11629 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
11630 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
11631 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
11632 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
11633 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
11634 (struct grub_efi_atapi_device_path): New structure.
11635 (grub_efi_atapi_device_path_t): New type.
11636 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
11637 (struct grub_efi_fibre_channel_device_path): New structure.
11638 (grub_efi_fibre_channel_device_path_t): New type.
11639 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
11640 (struct grub_efi_1394_device_path): New structure.
11641 (grub_efi_1394_device_path_t): New type.
11642 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
11643 (struct grub_efi_usb_device_path): New structure.
11644 (grub_efi_usb_device_path_t): New type.
11645 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
11646 (struct grub_efi_usb_class_device_path): New structure.
11647 (grub_efi_usb_class_device_path_t): New type.
11648 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
11649 (struct grub_efi_i2o_device_path): New structure.
11650 (grub_efi_i2o_device_path_t): New type.
11651 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
11652 (struct grub_efi_mac_address_device_path): New structure.
11653 (grub_efi_mac_address_device_path_t): New type.
11654 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
11655 (struct grub_efi_ipv4_device_path): New structure.
11656 (grub_efi_ipv4_device_path_t): New type.
11657 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
11658 (struct grub_efi_ipv6_device_path): New structure.
11659 (grub_efi_ipv6_device_path_t): New type.
11660 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
11661 (struct grub_efi_infiniband_device_path): New structure.
11662 (grub_efi_infiniband_device_path_t): New type.
11663 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
11664 (struct grub_efi_uart_device_path): New structure.
11665 (grub_efi_uart_device_path_t): New type.
11666 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
11667 (struct grub_efi_vendor_messaging_device_path): New structure.
11668 (grub_efi_vendor_messaging_device_path_t): New type.
11669 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
11670 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
11671 (struct grub_efi_hard_drive_device_path): New structure.
11672 (grub_efi_hard_drive_device_path_t): New type.
11673 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
11674 (struct grub_efi_cdrom_device_path): New structure.
11675 (grub_efi_cdrom_device_path_t): New type.
11676 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
11677 (struct grub_efi_vendor_media_device_path): New structure.
11678 (grub_efi_vendor_media_device_path_t): New type.
11679 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
11680 (struct grub_efi_file_path_device_path): New structure.
11681 (grub_efi_file_path_device_path_t): New type.
11682 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
11683 (struct grub_efi_protocol_device_path): New structure.
11684 (grub_efi_protocol_device_path_t): New type.
11685 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
11686 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
11687 (struct grub_efi_bios_device_path): New structure.
11688 (grub_efi_bios_device_path_t): New type.
11689 (struct grub_efi_disk_io): New structure.
11690 (grub_efi_disk_io_t): New type.
11691 (struct grub_efi_block_io_media): New structure.
11692 (grub_efi_block_io_media_t): New type.
11693 (struct grub_efi_block_io): New structure.
11694 (grub_efi_block_io_t): New type.
11696 * include/grub/misc.h (grub_stop): Removed.
11697 (grub_exit): New prototype.
11698 (grub_abort): Likewise.
11700 * include/grub/disk.h (enum grub_disk_dev_id): Added
11701 GRUB_DISK_DEVICE_EFIDISK_ID.
11703 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
11704 disk/efi/efidisk.c.
11705 (kernel_syms.lst): Remove the target if an error occurs.
11707 2006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
11709 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
11710 as it was simply too buggy.
11712 2006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
11714 * kern/misc.c (grub_lltoa): New function.
11715 (grub_vsprintf): Added support for the long long suffix,
11718 2006-04-20 Hollis Blanchard <hollis@penguinppc.org>
11720 * Makefile.in (LDFLAGS): Add variable.
11721 (LD): Remove variable.
11722 * configure.ac: Add -m32 to LDFLAGS.
11723 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
11724 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
11725 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
11726 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
11727 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
11729 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
11730 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
11731 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
11733 2006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
11735 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
11736 length for unknown glyph.
11738 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
11740 Add support for pre-loaded modules into the EFI port.
11742 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
11743 completely. Accept one more argument DIR. The caller has changed.
11745 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
11747 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
11748 (grub_efi_loaded_image_guid): New variable.
11749 (grub_efi_get_loaded_image): New function.
11750 (grub_arch_modules_addr): Likewise.
11752 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
11755 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
11756 (struct grub_efi_loaded_image): New structure.
11757 (grub_efi_loaded_image_t): New type.
11759 2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
11761 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
11762 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
11763 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
11765 2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
11767 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
11769 2006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
11771 * DISTLIST: Added include/grub/efi/console.h,
11772 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
11773 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11775 * include/grub/efi/console.h: New file.
11776 * include/grub/efi/time.h: Likewise.
11777 * include/grub/i386/efi/kernel.h: Likewise.
11778 * kern/efi/init.c: Likewise.
11779 * kern/efi/mm.c: Likewise.
11780 * term/efi/console.c: Likewise.
11782 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
11783 (grub_stop): Removed.
11784 (grub_get_rtc): Likewise.
11785 (grub_machine_init): Simply call grub_efi_init.
11786 (grub_machine_fini): Call grub_efi_fini.
11788 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
11789 (grub_efi_output_string): Removed.
11790 (grub_efi_stall): New function.
11791 (grub_stop): Likewise.
11792 (grub_get_rtc): Likewise.
11794 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
11795 (grub_efi_stall): New prototype.
11796 (grub_efi_allocate_pages): Likewise.
11797 (grub_efi_free_pages): Likewise.
11798 (grub_efi_get_memory_map): Likewise.
11799 (grub_efi_mm_init): Likewise.
11800 (grub_efi_mm_fini): Likewise.
11801 (grub_efi_init): Likewise.
11802 (grub_efi_fini): Likewise.
11804 * include/grub/i386/efi/time.h: Do not include
11805 grub/symbol.h. Include grub/efi/time.h.
11806 (GRUB_TICKS_PER_SECOND): Removed.
11807 (grub_get_rtc): Likewise.
11809 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
11810 Added padding. The EFI spec is buggy.
11811 (GRUB_EFI_BLACK): New macro.
11812 (GRUB_EFI_BLUE): Likewise.
11813 (GRUB_EFI_GREEN): Likewise.
11814 (GRUB_EFI_CYAN): Likewise.
11815 (GRUB_EFI_RED): Likewise.
11816 (GRUB_EFI_MAGENTA): Likewise.
11817 (GRUB_EFI_BROWN): Likewise.
11818 (GRUB_EFI_LIGHTGRAY): Likewise.
11819 (GRUB_EFI_BRIGHT): Likewise.
11820 (GRUB_EFI_DARKGRAY): Likewise.
11821 (GRUB_EFI_LIGHTBLUE): Likewise.
11822 (GRUB_EFI_LIGHTGREEN): Likewise.
11823 (GRUB_EFI_LIGHTCYAN): Likewise.
11824 (GRUB_EFI_LIGHTRED): Likewise.
11825 (GRUB_EFI_LIGHTMAGENTA): Likewise.
11826 (GRUB_EFI_YELLOW): Likewise.
11827 (GRUB_EFI_WHITE): Likewise.
11828 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
11829 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
11830 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
11831 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
11832 (GRUB_EFI_BACKGROUND_RED): Likewise.
11833 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
11834 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
11835 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
11836 (GRUB_EFI_TEXT_ATTR): Likewise.
11838 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
11839 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11840 (kernel_mod_HEADERS): Added efi/time.h.
11842 2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
11844 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
11845 include/grub/efi/api.h, include/grub/efi/console_control.h,
11846 include/grub/efi/efi.h, include/grub/efi/pe32.h,
11847 include/grub/i386/efi/time.h, kern/efi/efi.c,
11848 kern/i386/efi/init.c, kern/i386/efi/startup.S,
11849 and util/i386/efi/grub-mkimage.c.
11851 * Makefile.in (RMKFILES): Added i386-efi.rmk.
11853 * genmk.rb (PModule#rule): Do not export symbols if
11854 #{prefix}_EXPORTS is set to "no".
11856 * conf/i386-efi.mk: New file.
11857 * conf/i386-efi.rmk: Likewise.
11858 * include/grub/efi/api.h: Likewise.
11859 * include/grub/efi/console_control.h: Likewise.
11860 * include/grub/efi/efi.h: Likewise.
11861 * include/grub/efi/pe32.h: Likewise.
11862 * include/grub/i386/efi/time.h: Likewise.
11863 * kern/efi/efi.c: Likewise.
11864 * kern/i386/efi/init.c: Likewise.
11865 * kern/i386/efi/startup.S: Likewise.
11866 * util/i386/efi/grub-mkimage.c: Likewise.
11868 2006-04-17 Marco Gerards <marco@gnu.org>
11870 * include/grub/script.h: Include <grub/parser.h> and
11871 "grub_script.tab.h".
11872 (struct grub_lexer_param): New struct.
11873 (struct grub_parser_param): Likewise.
11874 (grub_script_create_arglist): Pass the state in an argument.
11875 (grub_script_add_arglist): Likewise.
11876 (grub_script_create_cmdline): Likewise.
11877 (grub_script_create_cmdblock): Likewise.
11878 (grub_script_create_cmdif): Likewise.
11879 (grub_script_create_cmdmenu): Likewise.
11880 (grub_script_add_cmd): Likewise.
11881 (grub_script_arg_add): Likewise.
11882 (grub_script_lexer_ref): Likewise.
11883 (grub_script_lexer_deref): Likewise.
11884 (grub_script_lexer_record_start): Likewise.
11885 (grub_script_lexer_record_stop): Likewise.
11886 (grub_script_mem_record): Likewise.
11887 (grub_script_mem_record_stop): Likewise.
11888 (grub_script_malloc): Likewise.
11889 (grub_script_yylex): Likewise.
11890 (grub_script_yyparse): Likewise.
11891 (grub_script_yyerror): Likewise.
11892 (grub_script_yylex): Likewise.
11893 (grub_script_lexer_init): Return the state.
11895 * normal/lexer.c (grub_script_lexer_state): Removed variable.
11896 (grub_script_lexer_done): Likewise.
11897 (grub_script_lexer_getline): Likewise.
11898 (grub_script_lexer_refs): Likewise.
11899 (script): Likewise.
11900 (newscript): Likewise.
11901 (record): Likewise.
11902 (recording): Likewise.
11903 (recordpos): Likewise.
11904 (recordlen): Likewise.
11905 (grub_script_lexer_init): Return the state instead of setting
11907 (grub_script_lexer_ref): Use the newly added argument for state
11908 instead of globals.
11909 (grub_script_lexer_deref): Likewise.
11910 (grub_script_lexer_record_start): Likewise.
11911 (grub_script_lexer_record_stop): Likewise.
11912 (recordchar): Likewise.
11913 (nextchar): Likewise.
11914 (grub_script_yylex2): Likewise.
11915 (grub_script_yylex): Likewise.
11916 (grub_script_yyerror): Likewise.
11918 * normal/parser.y (func_mem): Removed variable.
11919 (menu_entry): Likewise.
11921 (%lex-param): New parser option.
11922 (%parse-param): Likewise.
11923 (script): Always return the AST.
11924 (argument): Pass the state around.
11925 (arguments): Likewise.
11926 (grubcmd): Likewise.
11927 (commands): Likewise.
11928 (function): Likewise.
11929 (menuentry): Likewise.
11930 (if_statement): Likewise.
11933 * normal/script.c (grub_script_memused): Removed variable.
11934 (grub_script_parsed): Likewise.
11935 (grub_script_malloc): Added a state argument. Use that instead of
11937 (grub_script_mem_record): Likewise.
11938 (grub_script_mem_record_stop): Likewise.
11939 (grub_script_arg_add): Likewise.
11940 (grub_script_add_arglist): Likewise.
11941 (grub_script_create_cmdline): Likewise.
11942 (grub_script_create_cmdif): Likewise.
11943 (grub_script_create_cmdmenu): Likewise.
11944 (grub_script_add_cmd): Likewise.
11945 (grub_script_parse): Setup the state before calling the parser.
11947 2006-04-16 Marco Gerards <marco@gnu.org>
11949 * normal/command.c (grub_command_init): Remove the title command.
11951 * normal/lexer.c (grub_script_yylex): Renamed from this...
11952 (grub_script_yylex2): ... to this.
11953 (grub_script_yylex): New function. Temporary
11954 introduced to filter some tokens.
11955 (grub_script_yyerror): Print a newline.
11957 * normal/main.c (read_config_file): Output information about the
11958 lines that contain errors. Wait for a key after all lines have
11959 been processed. Don't return an empty menu.
11961 * normal/parser.y (func_mem): Don't initialize.
11962 (menu_entry): Likewise.
11963 (err): New variable.
11964 (script): Don't return anything when an error was encountered.
11965 (ws, returns): Removed rules.
11966 (argument): Disabled concatenated variable support.
11967 (arguments): Remove explicit separators.
11968 (grubcmd): Likewise.
11969 (function): Likewise.
11970 (menuentry): Likewise.
11972 (commands): Likewise. Add error handling.
11974 * normal/script.c (grub_script_create_cmdline): If
11975 `grub_script_parsed' is 0, assume the parser encountered an error.
11977 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
11979 * configure.ac: Add support for EFI. Fix the typo
11980 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
11982 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11984 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
11985 foreign multibyte characters should be shown correctly.
11987 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11989 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
11991 (read_config_file): Made it to close file before returning.
11993 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
11995 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
11996 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
11997 video/i386/pc/vbefill.c.
11999 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12000 video/i386/pc/vbefill.c.
12002 * include/grub/video.h (grub_video_blit_format): New enum.
12003 (grub_video_mode_info): Added new member blit_format.
12004 (grub_video_get_blit_format): New function prototype.
12006 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12007 function prototype.
12008 (grub_video_vbe_map_rgb): Likewise.
12009 (grub_video_vbe_unmap_color): Likewise.
12011 * include/grub/i386/pc/vbeblit.h: New file.
12013 * include/grub/i386/pc/vbefill.h: New file.
12015 * video/video.c (grub_video_get_blit_format): New function.
12016 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12017 (grub_video_vbe_map_rgb): Likewise.
12018 (grub_video_vbe_unmap_color): Likewise.
12020 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12022 (grub_video_vbe_blit_render_target): Changed to use more optimized
12024 (grub_video_vbe_setup): Added detection for optimized settings.
12025 (grub_video_vbe_create_render_target): Likewise.
12027 * video/i386/pc/vbeblit.c: New file.
12029 * video/i386/pc/vbefill.c: New file.
12031 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
12033 * font/manager.c (grub_font_get_glyph): Removed font fixup from
12036 * util/unifont2pff.rb: ... and moved it to here. Improved argument
12037 parsing to support both hex and dec ranges. If filename was missing
12038 show usage information.
12040 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
12042 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12043 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
12045 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12046 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
12047 (video_mod_SOURCES): Added.
12048 (video_mod_CFLAGS): Likewise.
12049 (video_mod_LDFLAGS): Likewise.
12050 (gfxterm_mod_SOURCES): Likewise.
12051 (gfxterm_mod_CFLAGS): Likewise.
12052 (gfxterm_mod_LDFLAGS): Likewise.
12053 (videotest_mod_SOURCES): Likewise.
12054 (videotest_mod_CFLAGS): Likewise.
12055 (videotest_mod_LDFLAGS): Likewise.
12056 (vesafb_mod_SOURCES): Removed.
12057 (vesafb_mod_CFLAGS): Likewise.
12058 (vesafb_mod_LDFLAGS): Likewise.
12059 (vga_mod_SOURCES): Likewise.
12060 (vga_mod_CFLAGS): Likewise.
12061 (vga_mod_LDFLAGS): Likewise.
12063 * commands/videotest.c: New file.
12065 * font/manager.c (fill_with_default_glyph): Modified to use
12067 (grub_font_get_glyph): Likewise.
12068 (fontmanager): Renamed from this...
12069 (font_manager): ... to this.
12071 * include/grub/font.h (grub_font_glyph): Added new structure.
12072 (grub_font_get_glyph): Modified to use grub_font_glyph.
12074 * include/grub/misc.h (grub_abs): Added as inline function.
12076 * include/grub/video.h: New file.
12078 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
12079 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
12080 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
12081 (grub_vbe_get_controller_info): Renamed from this...
12082 (grub_vbe_bios_get_controller_info): ... to this.
12083 (grub_vbe_get_mode_info): Renamed from this...
12084 (grub_vbe_bios_get_mode_info): ... to this.
12085 (grub_vbe_set_mode): Renamed from this...
12086 (grub_vbe_bios_set_mode): ... to this.
12087 (grub_vbe_get_mode): Renamed from this...
12088 (grub_vbe_bios_get_mode): ... to this.
12089 (grub_vbe_set_memory_window): Renamed from this...
12090 (grub_vbe_bios_set_memory_window): ... to this.
12091 (grub_vbe_get_memory_window): Renamed from this...
12092 (grub_vbe_bios_get_memory_window): ... to this.
12093 (grub_vbe_set_scanline_length): Renamed from this...
12094 (grub_vbe_set_scanline_length): ... to this.
12095 (grub_vbe_get_scanline_length): Renamed from this...
12096 (grub_vbe_bios_get_scanline_length): ... to this.
12097 (grub_vbe_set_display_start): Renamed from this...
12098 (grub_vbe_bios_set_display_start): ... to this.
12099 (grub_vbe_get_display_start): Renamed from this...
12100 (grub_vbe_bios_get_display_start): ... to this.
12101 (grub_vbe_set_palette_data): Renamed from this...
12102 (grub_vbe_bios_set_palette_data): ... to this.
12103 (grub_vbe_set_pixel_rgb): Removed.
12104 (grub_vbe_set_pixel_index): Likewise.
12106 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
12108 (grub_vbe_bios_get_controller_info): ... to this.
12109 (grub_vbe_get_mode_info): Renamed from this...
12110 (grub_vbe_bios_get_mode_info): ... to this.
12111 (grub_vbe_set_mode): Renamed from this...
12112 (grub_vbe_bios_set_mode): ... to this.
12113 (grub_vbe_get_mode): Renamed from this...
12114 (grub_vbe_bios_get_mode): ... to this.
12115 (grub_vbe_set_memory_window): Renamed from this...
12116 (grub_vbe_bios_set_memory_window): ... to this.
12117 (grub_vbe_get_memory_window): Renamed from this...
12118 (grub_vbe_bios_get_memory_window): ... to this.
12119 (grub_vbe_set_scanline_length): Renamed from this...
12120 (grub_vbe_set_scanline_length): ... to this.
12121 (grub_vbe_get_scanline_length): Renamed from this...
12122 (grub_vbe_bios_get_scanline_length): ... to this.
12123 (grub_vbe_set_display_start): Renamed from this...
12124 (grub_vbe_bios_set_display_start): ... to this.
12125 (grub_vbe_get_display_start): Renamed from this...
12126 (grub_vbe_bios_get_display_start): ... to this.
12127 (grub_vbe_set_palette_data): Renamed from this...
12128 (grub_vbe_bios_set_palette_data): ... to this.
12129 (grub_vbe_bios_get_controller_info): Fixed problem with registers
12130 getting corrupted after calling it. Added more pushes and pops.
12131 (grub_vbe_bios_set_mode): Likewise.
12132 (grub_vbe_bios_get_mode): Likewise.
12133 (grub_vbe_bios_get_memory_window): Likewise.
12134 (grub_vbe_bios_set_scanline_length): Likewise.
12135 (grub_vbe_bios_get_scanline_length): Likewise.
12136 (grub_vbe_bios_get_display_start): Likewise.
12137 (grub_vbe_bios_set_palette_data): Likewise.
12139 * normal/cmdline.c (cl_set_pos): Refresh the screen.
12140 (cl_insert): Likewise.
12141 (cl_delete): Likewise.
12143 * term/gfxterm.c: New file.
12145 * term/i386/pc/vesafb.c: Removed file.
12147 * video/video.c: New file.
12149 * video/i386/pc/vbe.c (real2pm): Added new function.
12150 (grub_video_vbe_draw_pixel): Likewise.
12151 (grub_video_vbe_get_video_ptr): Likewise.
12152 (grub_video_vbe_get_pixel): Likewise
12153 (grub_video_vbe_init): Likewise.
12154 (grub_video_vbe_fini): Likewise.
12155 (grub_video_vbe_setup): Likewise.
12156 (grub_video_vbe_get_info): Likewise.
12157 (grub_video_vbe_set_palette): Likewise.
12158 (grub_video_vbe_get_palette): Likewise.
12159 (grub_video_vbe_set_viewport): Likewise.
12160 (grub_video_vbe_get_viewport): Likewise.
12161 (grub_video_vbe_map_color): Likewise.
12162 (grub_video_vbe_map_rgb): Likewise.
12163 (grub_video_vbe_map_rgba): Likewise.
12164 (grub_video_vbe_unmap_color): Likewise.
12165 (grub_video_vbe_fill_rect): Likewise.
12166 (grub_video_vbe_blit_glyph): Likewise.
12167 (grub_video_vbe_blit_bitmap): Likewise.
12168 (grub_video_vbe_blit_render_target): Likewise.
12169 (grub_video_vbe_scroll): Likewise.
12170 (grub_video_vbe_swap_buffers): Likewise.
12171 (grub_video_vbe_create_render_target): Likewise.
12172 (grub_video_vbe_delete_render_target): Likewise.
12173 (grub_video_vbe_set_active_render_target): Likewise.
12174 (grub_vbe_set_pixel_rgb): Remove function.
12175 (grub_vbe_set_pixel_index): Likewise.
12176 (index_color_mode): Remove static variable.
12177 (active_mode): Likewise.
12178 (framebuffer): Likewise.
12179 (bytes_per_scan_line): Likewise.
12180 (grub_video_vbe_adapter): Added new static variable.
12181 (framebuffer): Likewise.
12182 (render_target): Likewise.
12183 (initial_mode): Likewise.
12184 (mode_in_use): Likewise.
12185 (mode_list): Likewise.
12187 2006-03-10 Marco Gerards <marco@gnu.org>
12189 * configure.ac (AC_INIT): Bumped to 1.93.
12191 * DISTLIST: Added `include/grub/hfs.h'.
12193 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
12195 * boot/i386/pc/boot.S (general_error): Before looping, try INT
12196 18H, which might help the BIOS falling back to next boot media.
12198 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
12200 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
12201 Poe Chen <poe.poechen@gmail.com>.
12203 2006-01-17 Marco Gerards <marco@gnu.org>
12205 * include/grub/normal.h: Include <grub/script.h>.
12206 (grub_command_list): Removed struct.
12207 (grub_command_list_t): Removed type.
12208 (grub_menu_entry): Remove members `num' and `command_list'. Add
12209 members `commands' and `sourcecode'.
12210 * include/grub/script.h: Add inclusion guards.
12211 (grub_script_cmd_menuentry): New struct.
12212 (grub_script_execute_menuentry): New prototype.
12213 (grub_script_lexer_record_start): Likewise.
12214 (grub_script_lexer_record_stop): Likewise.
12215 * normal/execute.c (grub_script_execute_menuentry): New function.
12216 * normal/lexer.c (record, recording, recordpos, recordlen): New
12218 (grub_script_lexer_record_start): New function.
12219 (grub_script_lexer_record_stop): Likewise.
12220 (recordchar): Likewise.
12221 (nextchar): Likewise.
12222 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
12223 2048 as the buffer size. Add the tokens `menuentry' and `@'.
12224 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12225 (current_menu): New variable.
12226 (free_menu): Mainly rewritten.
12227 (grub_normal_menu_addentry): New function.
12228 (read_config_file): Rewritten.
12229 * normal/menu.c (run_menu_entry): Mainly rewritten.
12230 * normal/menu_entry.c (make_screen): Rewritten the code to insert
12232 (run): Mainly rewritten.
12233 * normal/parser.y (menu_entry): New variable.
12234 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12235 (menuentry): New rule.
12236 (command): Add `menuentry'.
12237 (if_statement): Allow additional returns before `fi'.
12238 * normal/script.c (grub_script_create_cmdmenu): New function.
12240 2006-01-03 Marco Gerards <marco@gnu.org>
12242 * INSTALL: GNU Bison is required.
12243 * configure.ac: Rewritten the test to detect Bison.
12244 * Makefile.in (YACC): New variable. Reported by Xun Sun
12245 <xun.sun.cn@gmail.com>.
12247 2006-01-03 Marco Gerards <marco@gnu.org>
12249 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12250 the HFS+ filesystem to filesystem blocks.
12251 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12252 GCC warning is silenced.
12254 2006-01-03 Marco Gerards <marco@gnu.org>
12256 * partmap/apple.c (apple_partition_map_iterate): Convert the data
12257 read from disk from big endian to host byte order.
12259 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
12261 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
12263 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12264 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12265 embedded HFS+ filesystem.
12266 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12267 (grub_hfs_sblock): Move from here...
12268 * include/grub/hfs.h: To here... New file.
12269 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
12271 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12273 (grub_hfsplus_volheader): Change type of member `magic' to
12275 (grub_hfsplus_data): Add new member `embedded_offset'.
12276 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12278 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12279 Calculate the offset.
12281 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12283 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12285 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12287 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12289 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12290 ENV->NAME is NULL after allocating ENV->VALUE.
12292 2005-12-25 Marco Gerards <marco@gnu.org>
12294 * kern/env.c (grub_env_set): Rewritten the error handling code.
12296 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12298 * geninit.sh: Made more robust, and more portable.
12300 2005-12-25 Marco Gerards <marco@gnu.org>
12302 Add support for Apple HFS+ filesystems.
12304 * fs/hfsplus.c: New file.
12306 * DISTLIST: Added `fs/hfsplus.c'.
12308 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12309 (hfsplus_mod_SOURCES): New variable.
12310 (hfsplus_mod_CFLAGS): Likewise.
12311 (hfsplus_mod_LDFLAGS): Likewise.
12312 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12313 (grub_setup_SOURCES): Likewise.
12314 (grub_mkdevicemap_SOURCES): Likewise.
12315 (grub_emu_SOURCES): Likewise.
12316 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12318 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12320 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12322 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12324 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12325 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12326 include/grub/parser.h, include/grub/script.h, kern/parser.c,
12327 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12328 normal/lexer.c, normal/parser.y, normal/script.c, and
12330 Removed kern/sparc64/cache.c.
12332 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12333 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12336 * configure.ac (AC_INIT): Bumped to 1.92.
12338 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
12340 * kern/err.c (grub_error_push): Added new function to support error
12342 (grub_error_pop): Likewise.
12343 (grub_error_stack_items): New local variable to support error stacks.
12344 (grub_error_stack_pos): Likewise.
12345 (grub_error_stack_assert): Likewise.
12346 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12348 (grub_print_error): Added support to print errors from error stack.
12350 * include/grub/err.h (grub_error_push): Added function prototype.
12351 (grub_error_pop): Likewise.
12353 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
12355 * configure.ac: Accept `powerpc64' as host_cpu.
12356 (amd64): Rename to `biarch32'.
12358 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12359 non-cacheline-aligned addresses.
12361 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12362 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
12363 if `size' is non-zero.
12365 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
12367 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12368 and `cd' to make sure the filename is not prefixed with a
12370 (pkgdata_MODULES): Add `gpt.mod'.
12371 (gpt_mod_SOURCES): New variable.
12372 (gpt_mod_CFLAGS): Likewise.
12373 (gpt_mod_LDFLAGS): Likewise.
12375 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12377 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12380 * partmap/gpt.c: New file.
12382 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12383 GPT partition map is detected.
12385 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
12387 * commands/i386/pc/play.c: New file.
12388 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12389 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12392 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
12394 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12395 ((unused))' to silence gcc warning.
12397 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
12399 * configure.ac: Correct `AC_PROG_YACC' test.
12401 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12403 * util/powerpc/ieee1275/grub-install.in: Run the mount point
12404 check before installing files.
12406 2005-11-22 Mike Small <smallm@panix.com>
12408 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12409 number regex so multidigit numbers are recognized correctly.
12411 2005-11-22 Mike Small <smallm@panix.com>
12413 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12414 debugging message before attempting to claim memory.
12415 (grub_rescue_cmd_initrd): Add a claim debugging message and try
12416 multiple addresses in case of failure.
12418 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12420 * term/tparm.c (get_space): Remove empty `if' statement.
12422 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12424 * kern/parser.c (check_varstate): Rename `state' to 's'.
12426 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12428 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
12429 variable definitions to the beginning of each function. Sort stack
12431 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
12432 `buf' argument to `char *'.
12434 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12436 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12437 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12438 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12439 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12440 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12441 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12442 configfile.mod, search.mod, gzio.mod and test.mod.
12443 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12444 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12445 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12446 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12447 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12448 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12449 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12450 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12451 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12452 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12453 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12454 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12455 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12456 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12457 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12458 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12459 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12460 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12461 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12462 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12463 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12464 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12465 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12467 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12469 (pkgdata_MODULES): Add test.mod.
12471 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12473 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
12474 appending to variables with "+=".
12475 (PModule): Use full pathname to generate *.lst filenames.
12477 * Makefile.in: Fixed list rules moved from genmk.rb.
12478 (.DELETE_ON_ERROR): New special target.
12479 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12481 * conf/i386-pc.rmk: Include conf/common.mk.
12482 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
12483 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
12484 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12485 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12486 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12487 configfile.mod, search.mod, gzio.mod and test.mod.
12488 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12489 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12490 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12491 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12492 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12493 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12494 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12495 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12496 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12497 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12498 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12499 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12500 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12501 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12502 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12503 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12504 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12505 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12506 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12507 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12508 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12509 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12510 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12512 * conf/common.rmk: ... to here. New file.
12514 * conf/common.mk: New file.
12516 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
12518 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12519 (grub_script.tab.c): ... here.
12521 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12522 (grub_script.tab.c): ... here.
12524 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12525 (grub_script.tab.c): ... here.
12527 * normal/command.c (grub_command_find): Fixed a memory leak of
12528 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12530 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12532 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12533 "@" which marks the start of a comment on ARM.
12534 (VARIABLE): Likewise.
12536 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12538 Add support for Linux/ADFS partition tables.
12540 * partmap/acorn.c: New file.
12542 * include/grub/acorn_filecore.h: Likewise.
12544 * DISTLIST: Added `partmap/acorn.c' and
12545 `include/grub/acorn_filecore.h'.
12547 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12549 (pkgdata_MODULES): Add `acorn.mod'.
12550 (acorn_mod_SOURCES): New variable.
12551 (acorn_mod_CFLAGS): Likewise.
12553 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12555 (pkgdata_MODULES): Add `acorn.mod'.
12556 (acorn_mod_SOURCES): New variable.
12557 (acorn_mod_CFLAGS): Likewise.
12559 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12560 (pkgdata_MODULES): Add `acorn.mod'.
12561 (acorn_mod_SOURCES): New variable.
12562 (acorn_mod_CFLAGS): Likewise.
12563 (acorn_mod_LDFLAGS): Likewise.
12565 * include/types.h (grub_disk_addr_t): New typedef.
12567 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
12569 * geninit.sh: New file.
12571 * geninitheader.sh: Likewise.
12573 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
12574 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
12575 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
12576 * commands/configfile.c (grub_configfile_init)
12577 (grub_configfile_fini): Likewise.
12578 * commands/default.c (grub_default_init, grub_default_fini):
12580 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
12581 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
12582 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
12583 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
12585 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
12586 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
12588 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
12589 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
12591 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
12593 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
12595 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
12596 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
12597 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
12598 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
12599 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
12600 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
12601 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12602 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12603 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12604 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12605 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12606 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12607 * partmap/amiga.c (grub_amiga_partition_map_init)
12608 (grub_amiga_partition_map_fini): Likewise.
12609 * partmap/apple.c (grub_apple_partition_map_init)
12610 (grub_apple_partition_map_fini): Likewise.
12611 * partmap/pc.c (grub_pc_partition_map_init)
12612 (grub_pc_partition_map_fini): Likewise.
12613 * partmap/sun.c (grub_sun_partition_map_init,
12614 grub_sun_partition_map_fini): Likewise.
12615 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12618 * util/grub-emu.c: Include <grub_modules_init.h>.
12619 (main): Don't initialize and de-initialize any modules directly,
12620 use `grub_init_all' and `grub_fini_all' instead.
12622 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
12623 `grub_vesafb_mod_init'.
12624 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
12626 * term/i386/pc/vga.c (grub_vga_init): Renamed to
12627 `grub_vga_mod_init'. Updated all users.
12628 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
12630 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
12631 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
12634 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
12635 Generate a function to initialize the module in utilities.
12636 Updated all callers.
12637 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
12638 initialize the module in utilities. Updated all callers.
12640 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12642 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
12643 escape sequence and a literal ^L to clear the screen.
12645 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
12646 when returning from Open Firmware.
12648 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12650 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
12651 (grub_ofconsole_height): Likewise.
12652 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
12653 manually insert a '\n'.
12654 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
12655 `grub_ofconsole_height'. Return early if these are already set.
12657 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
12659 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12660 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
12661 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
12662 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
12663 and `normal/script.c'.
12664 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12665 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12666 (test_mod_SOURCES): New variable.
12667 (test_mod_CFLAGS): Likewise.
12668 (test_mod_LDFLAGS): Likewise.
12669 (pkgdata_MODULES): Add `test.mod'.
12670 (grub_script.tab.c): New rule.
12671 (grub_script.tab.h): Likewise.
12673 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
12675 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12676 `commands/test.c', `normal/execute.c', `normal/lexer.c',
12677 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12678 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12679 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12680 (test_mod_SOURCES): New variable.
12681 (test_mod_CFLAGS): Likewise.
12682 (pkgdata_MODULES): Add `test.mod'.
12683 (grub_script.tab.c): New rule.
12684 (grub_script.tab.h): Likewise.
12686 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
12688 Add initial scripting support.
12690 * commands/test.c: New file.
12691 * include/grub/script.h: Likewise.
12692 * normal/execute.c: Likewise.
12693 * normal/function.c: Likewise.
12694 * normal/lexer.c: Likewise.
12695 * normal/parser.y: Likewise.
12696 * normal/script.c: Likewise.
12698 * configure.ac: Add `AC_PROG_YACC' test.
12700 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
12701 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
12702 `normal/function.c' and `normal/script.c'.
12703 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12704 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12705 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
12707 (pkgdata_MODULES): Add `test.mod'.
12708 (grub_script.tab.c): New rule.
12709 (grub_script.tab.h): Likewise.
12711 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
12713 * include/grub/normal.h (grub_test_init): New prototype.
12714 (grub_test_fini): Likewise.
12716 * normal/command.c: Include <grub/script.h>.
12717 (grub_command_execute): Rewritten.
12719 * util/grub-emu.c (main): Call `grub_test_init' and
12722 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12724 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
12726 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
12727 there are no pending characters.
12729 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12731 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
12732 `grub_strndup' to drop device arguments. Replace unnecessary
12733 `grub_strndup' with `grub_strdup'.
12735 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12737 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
12738 `debug' environment variable has been set.
12740 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
12742 * Makefile.in (install-local): Use $(DATA).
12743 (uninstall): Likewise.
12744 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
12745 (sbin_UTILITIES): ... to here.
12746 (sbin_SCRIPTS): New variable.
12747 (grub_install_SOURCES): New variable.
12748 * util/powerpc/ieee1275/grub-install.in: New file.
12749 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
12751 (add_segments): Call `grub_util_get_path'.
12753 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
12755 From Timothy Baldwin:
12756 * commands/ls.c (grub_ls_list_files): Close FILE with
12758 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
12760 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
12762 * include/grub/parser.h: New file.
12764 * kern/parser.c: Likewise.
12766 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
12767 (grub_setup_SOURCES): Likewise.
12768 (grub_probefs_SOURCES): Likewise.
12769 (grub_emu_SOURCES): Likewise.
12770 (kernel_img_HEADERS): Add `parser.h'.
12772 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12773 (grub_emu_SOURCES): Add `kern/parser.c'.
12774 (grubof_SOURCES): Likewise.
12776 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12777 (grubof_SOURCES): Add `kern/parser.c'.
12779 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
12781 * kern/misc.c (grub_split_cmdline): Removed function.
12783 * kern/rescue.c: Include <grub/parser.h>.
12784 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
12785 of `grub_split_cmdline'.
12787 * normal/command.c: Include <grub/parser.h>.
12788 (grub_command_execute): Use `grub_parser_split_cmdline' instead
12789 of `grub_split_cmdline'.
12791 * normal/completion.c: Include <grub/parser.h>.
12792 (cmdline_state): New variable.
12793 (iterate_dir): End the filename with a quote depending on the
12794 command line state.
12795 (get_state): new function.
12796 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
12797 split the arguments and determine the current argument. When the
12798 argument string is not quoted, escape all spaces.
12800 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12802 * normal/sparc64/setjmp.S: New file.
12804 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12806 * include/grub/sparc64/libgcc.h: New file.
12807 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
12808 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
12809 normal/sparc64/setjmp.c.
12811 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12813 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
12814 * kern/sparc64/cache.S: New file.
12815 * kern/sparc64/cache.c: Removed.
12816 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
12817 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
12819 (COMMON_LDFLAGS): Add -melf64_sparc.
12820 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
12821 (grubof_SOURCES): Use cache.S instead of cache.c.
12822 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
12823 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
12824 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
12826 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
12827 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
12828 (linux_mod_CFLAGS): Commented out.
12829 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
12830 out because module isn't built.
12831 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
12832 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
12833 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
12834 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
12835 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
12836 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12837 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12838 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
12839 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
12840 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
12841 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12842 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12843 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
12844 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
12846 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
12848 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
12849 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
12850 longer, because HFS should not be used on PC.
12852 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12854 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
12855 consistently within the loop.
12857 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
12859 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
12860 directory can not be read.
12862 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12864 * configure.ac (AC_INIT): Increase the version number to 1.91.
12866 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
12867 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
12868 term/i386/pc/serial.c.
12870 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12872 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
12873 file size must be permitted.
12875 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
12876 between %ah and %al.
12878 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12880 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
12882 Call the hook with a NUL-terminated filename.
12883 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
12886 * kern/term.c (cursor_state): New variable.
12887 (grub_term_set_current): Reset the cursor state on a new
12889 (grub_setcursor): Rewritten to use CURSOR_STATE.
12890 (grub_getcursor): New function.
12892 * include/grub/term.h (grub_getcursor): New prototype.
12894 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
12895 integers on ARM. Reported by Timothy Baldwin
12896 <T.E.Baldwin99@members.leeds.ac.uk>.
12898 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
12900 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
12902 (grub_sfs_dir): Likewise.
12904 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
12906 Add support for the SFS filesystem.
12908 * fs/sfs.c: New file.
12910 * DISTLIST: Added `fs/sfs.c'.
12912 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
12913 (grub_probefs_SOURCES): Likewise.
12914 (grub_emu_SOURCES): Likewise.
12915 (pkgdata_MODULES): Add `sfs.mod'.
12916 (sfs_mod_SOURCES): New variable.
12917 (sfs_mod_CFLAGS): Likewise.
12918 (sfs_mod_LDFLAGS): Likewise.
12920 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
12921 (pkgdata_MODULES): Add `sfs.mod'.
12922 (sfs_mod_SOURCES): New variable.
12923 (sfs_mod_CFLAGS): Likewise.
12925 * util/grub-emu.c (main): Call `grub_sfs_init' and
12928 * include/grub/fs.h (grub_sfs_init): New prototype.
12929 (grub_sfs_fini): Likewise.
12931 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
12933 Add support for the AFFS filesystem.
12935 * fs/affs.c: New file.
12937 * DISTLIST: Added `fs/affs.c'.
12939 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
12940 (grub_probefs_SOURCES): Likewise.
12941 (grub_emu_SOURCES): Likewise.
12942 (pkgdata_MODULES): Add `affs.mod'.
12943 (affs_mod_SOURCES): New variable.
12944 (affs_mod_CFLAGS): Likewise.
12945 (affs_mod_LDFLAGS): Likewise.
12947 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
12948 (pkgdata_MODULES): Add `affs.mod'.
12949 (affs_mod_SOURCES): New variable.
12950 (affs_mod_CFLAGS): Likewise.
12952 * util/grub-emu.c (main): Call `grub_affs_init' and
12955 * include/grub/fs.h (grub_affs_init): New prototype.
12956 (grub_affs_fini): Likewise.
12958 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
12960 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
12962 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
12964 * configure.ac: Accept `x86_64' as host_cpu. In that case add
12967 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
12970 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
12971 (COMMON_LDFLAGS): New variable.
12972 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
12973 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
12974 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
12975 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
12976 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
12977 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
12978 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
12979 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
12980 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
12981 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
12982 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12983 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12984 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
12985 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
12986 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
12988 (normal_mod_ASFLAGS): Add `-m32'.
12990 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
12991 (grub_host_size_t, grub_host_ssize_t): New types.
12992 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
12993 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
12994 `GRUB_HOST_SIZEOF_VOID_P'.
12996 * include/grub/kernel.h (struct grub_module_header): Type of
12997 member offset changed to `grub_host_off_t'. Type of member size
12998 changed to `grub_host_size_t'.
12999 (struct grub_module_info): Type of member offset changed to
13000 `grub_host_off_t'. Type of member size changed to
13001 `grub_host_size_t'.
13003 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
13005 Make GRUB's kernel compliant to Multiboot Specification.
13007 * kern/i386/pc/startup.S (multiboot_header): New label.
13008 (multiboot_entry): Likewise.
13009 (multiboot_trampoline): Likewise.
13011 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13012 Increased to 0x4A0.
13014 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13015 put parentheses after a question mark.
13016 [!GRUB_UTIL] (my_mod): New variable.
13018 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13020 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
13022 Adds support for the XFS filesystem. Btrees are not supported
13025 * fs/xfs.c: New file.
13027 * DISTLIST: Added `fs/xfs.c'.
13029 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13030 (grub_probefs_SOURCES): Likewise.
13031 (grub_emu_SOURCES): Likewise.
13032 (pkgdata_MODULES): Add `xfs.mod'.
13033 (xfs_mod_SOURCES): New variable.
13034 (xfs_mod_CFLAGS): Likewise.
13036 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13037 (pkgdata_MODULES): Add `xfs.mod'.
13038 (xfs_mod_SOURCES): New variable.
13039 (xfs_mod_CFLAGS): Likewise.
13041 * util/grub-emu.c (main): Call `grub_xfs_init' and
13044 * include/grub/fs.h (grub_xfs_init): New prototype.
13045 (grub_xfs_fini): Likewise.
13048 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
13050 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13051 color modes, allow greater than 16 colors to be configured as
13054 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
13056 * normal/completion.c (complete_arguments): Add the qualifier
13057 const into OPTIONS.
13059 From Omniflux <omniflux+lists@omniflux.com>:
13060 * include/grub/terminfo.h: New file.
13061 * include/grub/tparm.h: Likewise.
13062 * include/grub/i386/pc/serial.h: Likewise.
13063 * term/terminfo.c: Likewise.
13064 * term/tparm.c: Likewise.
13065 * term/i386/pc/serial.c: Likewise.
13066 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13068 (terminfo_mod_SOURCES): New variable.
13069 (terminfo_mod_CFLAGS): Likewise.
13070 (serial_mod_SOURCES): Likewise.
13071 (serial_mod_CFLAGS): Likewise.
13073 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
13075 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
13076 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
13077 and kern/powerpc/ieee1275/cmain.c, respectively.
13079 * boot/powerpc/ieee1275/crt0.S: Moved to ...
13080 * kern/powerpc/ieee1275/crt0.S: ... here.
13082 * boot/powerpc/ieee1275/cmain.c: Moved to ...
13083 * kern/powerpc/ieee1275/cmain.c: ... here.
13085 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
13086 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
13087 instead of boot/powerpc/ieee1275/crt0.S and
13088 boot/powerpc/ieee1275/cmain.c, respectively.
13090 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
13091 sectors. It was not used anyway.
13093 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13095 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
13096 `unused parameter' warning.
13098 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
13100 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
13102 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
13105 2005-08-28 Marco Gerards <metgerards@student.han.nl>
13107 * include/grub/normal.h (enum grub_completion_type): Added
13108 `GRUB_COMPLETION_TYPE_ARGUMENT'.
13110 * normal/cmdline.c (print_completion): Handle
13111 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
13112 * normal/menu_entry.c (store_completion): Likewise.
13114 * normal/completion.c (complete_arguments): New function.
13115 (grub_normal_do_completion): Call `complete_arguments' when the
13116 current words start with a dash.
13118 2005-08-27 Marco Gerards <metgerards@student.han.nl>
13120 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
13121 `gzio.mod' instead of `io.mod').
13123 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
13125 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
13126 (DISTDIRS): Added io and video.
13127 Rewrite the search routine to make an output consistently.
13129 * DISTLIST: Added conf/sparc64-ieee1275.mk,
13130 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
13131 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
13132 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
13133 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
13134 util/powerpc/ieee1275/misc.c.
13136 * include/grub/gzio.h: New file.
13137 * io/gzio.c: Likewise.
13139 * kern/file.c (grub_file_close): Call grub_device_close only if
13140 FILE->DEVICE is not NULL.
13142 * include/grub/mm.h [!NULL] (NULL): New macro.
13144 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
13146 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
13147 (pkgdata_MODULES): Added gzio.mod.
13148 (gzio_mod_SOURCES): New variable.
13149 (gzio_mod_CFLAGS): Likewise.
13151 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
13152 (pkgdata_MODULES): Added gzio.mod.
13153 (gzio_mod_SOURCES): New variable.
13154 (gzio_mod_CFLAGS): Likewise.
13156 * commands/cat.c: Include grub/gzio.h.
13157 (grub_cmd_cat): Use grub_gzfile_open instead of
13160 * commands/cmp.c: Include grub/gzio.h.
13161 (grub_cmd_cmp): Use grub_gzfile_open instead of
13164 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
13165 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
13167 (grub_rescue_cmd_module): Likewise.
13169 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13171 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
13172 kern/sparc64/ieee1275/init.c because it contains _start.
13173 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
13175 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
13177 * configure.ac: Add support for sparc64 host with ieee1275
13179 * configure: Generated from configure.ac.
13180 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
13182 (grub_ofdisk_read): Likewise.
13183 (grub_ofdisk_open): Use %p to print pointer values, and cast the
13184 pointers as (void *) to remove a warning.
13185 (grub_ofdisk_close): Likewise.
13186 (grub_ofdisk_read): Likewise.
13187 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
13188 returns, so make it return void to remove a warning.
13189 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
13190 Corresponding prototype change.
13191 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
13192 values, and cast the pointers as (void *) to remove a warning.
13193 (grub_mm_dump): Likewise.
13194 * conf/sparc64-ieee1275.mk: New file.
13195 * conf/sparc64-ieee1275.rmk: Likewise.
13196 * include/grub/sparc64/setjmp.h: Likewise.
13197 * include/grub/sparc64/types.h: Likewise.
13198 * include/grub/sparc64/ieee1275/console.h: Likewise.
13199 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
13200 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
13201 * include/grub/sparc64/ieee1275/time.h: Likewise.
13202 * kern/sparc64/cache.c: Likewise.
13203 * kern/sparc64/dl.c: Likewise.
13204 * kern/sparc64/ieee1275/init.c: Likewise.
13205 * kern/sparc64/ieee1275/openfw.c: Likewise.
13207 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13209 * util/console.c (grub_ncurses_putchar): If C is greater than
13210 0x7f, set C to a question mark.
13211 (grub_ncurses_getcharwidth): New function.
13212 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13215 * normal/menu.c (print_entry): Made aware of Unicode. First,
13216 convert TITLE to UCS-4, and predict the cursor position by
13219 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13221 * kern/misc.c (grub_utf16_to_utf8): Likewise.
13223 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13225 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13226 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13229 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13230 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13231 grub_strcpy and grub_strlen. Take it into account that a space
13232 character is inserted as a delimiter.
13234 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13236 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
13237 invalid magic in the error.
13239 * commands/search.c: New file.
13241 * util/grub-emu.c (main): Call grub_search_init and
13244 * kern/rescue.c (grub_rescue_print_disks): Removed.
13245 (grub_rescue_print_devices): New function.
13246 (grub_rescue_cmd_ls): Use grub_device_iterate with
13247 grub_rescue_print_devices instead of grub_disk_dev_iterate with
13248 grub_rescue_print_disks.
13250 * kern/partition.c (grub_partition_iterate): Return the result of
13251 PARTMAP->ITERATE instead of GRUB_ERRNO.
13253 * kern/device.c: Include grub/partition.h.
13254 (grub_device_iterate): New function.
13256 * include/grub/partition.h (grub_partition_iterate): Return int
13257 instead of grub_err_t.
13259 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13261 [GRUB_UTIL] (grub_search_fini): Likewise.
13263 * include/grub/device.h (grub_device_iterate): New prototype.
13265 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13267 (pkgdata_MODULES): Added search.mod.
13268 (search_mod_SOURCES): New variable.
13269 (search_mod_CFLAGS): Likewise.
13271 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13272 (pkgdata_MODULES): Added search.mod.
13273 (search_mod_SOURCES): New variable.
13274 (search_mod_CFLAGS): Likewise.
13276 * commands/ls.c (grub_ls_list_disks): Renamed to ...
13277 (grub_ls_list_devices): ... this, and use grub_device_iterate.
13278 All callers changed.
13280 * DISTLIST: Added commands/search.c.
13282 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13284 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13286 (grub_getcharwidth): New function.
13288 * kern/misc.c (grub_utf8_to_ucs4): New function.
13290 * include/grub/term.h (struct grub_term): Added a new member
13292 (grub_getcharwidth): New prototype.
13294 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13296 * term/i386/pc/console.c (map_char): New function. Segregated from
13297 grub_console_putchar.
13298 (grub_console_putchar): Use map_char.
13299 (grub_console_getcharwidth): New function.
13300 (grub_console_term): Specified grub_console_getcharwidth as
13303 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13304 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13306 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13308 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13309 on grub_strtoul completely.
13310 (write_char): Declare local variables in the beginning of the
13312 (grub_vesafb_getcharwidth): New function.
13313 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13316 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
13318 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13319 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13320 commands/i386/pc/vbetest.c.
13322 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13323 call grub_vbe_get_controller_info again, because the returned
13324 information is volatile.
13325 (grub_vbe_set_video_mode): Mostly rewritten.
13326 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13327 grub_vbe_status_t correctly.
13328 (grub_vbe_get_video_mode_info): Likewise.
13329 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13330 several if statements.
13332 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13333 * commands/i386/pc/vbeinfo.c: ... this.
13335 * commands/i386/pc/vbe_test.c: Renamed to ...
13336 * commands/i386/pc/vbetest.c: ... this.
13338 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13340 (grub_cmd_vbeinfo): ... this. Save video modes before
13341 iterating. Skip a video mode, if it is not available, not enough
13342 information is given or it is monochrome. Show the memory
13343 model. Leave the interpretation of MODEVAR to grub_strtoul
13345 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13346 (GRUB_MOD_FINI): Likewise.
13348 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13349 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13350 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13351 duplicated grub_env_get. Leave the interpretation of MODEVAR to
13352 grub_strtoul completely.
13353 (real2pm): Removed.
13354 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13355 (GRUB_MOD_FINI): Likewise.
13357 * normal/misc.c: Include grub/mm.h.
13359 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13360 vbe_list_modes with vbetest.mod and vbeinfo.mod.
13361 (vbe_list_modes_mod_SOURCES): Removed.
13362 (vbe_list_modes_mod_CFLAGS): Likewise.
13363 (vbe_test_mod_SOURCES): Likewise.
13364 (vbe_test_mod_CFLAGS): Likewise.
13365 (vbeinfo_mod_SOURCES): New variable.
13366 (vbeinfo_mod_CFLAGS): Likewise.
13367 (vbetest_mod_SOURCES): Likewise.
13368 (vbetest_mod_CFLAGS): Likewise.
13370 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
13372 * normal/misc.c: New file.
13374 * DISTLIST: Added normal/misc.c.
13376 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13377 DISK to HOOK. Call HOOK with DISK.
13378 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13379 * partmap/pc.c (pc_partition_map_iterate): Likewise.
13380 * partmap/sun.c (sun_partition_map_iterate): Likewise.
13382 * normal/menu_entry.c (struct screen): Added a new member
13383 "completion_shown".
13384 (completion_buffer): New global variable.
13385 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13386 (store_completion): New function.
13387 (complete): Likewise.
13388 (clear_completions): Likewise.
13389 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13390 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13391 a tab, call complete.
13393 * normal/completion.c (disk_dev): Removed.
13394 (print_simple_completion): Likewise.
13395 (print_partition_completion): Likewise.
13396 (print_func): New global variable.
13397 (add_completion): Do not take the arguments WHAT or PRINT any
13398 longer. Added a new argument TYPE. Instead of printing directly,
13399 call PRINT_FUNC if not NULL.
13400 All callers changed.
13401 (complete_device): Use a local variable DEV instead of
13402 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13403 (grub_normal_do_completion): Take a new argument HOOK. Do not
13404 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13405 empty string, return NULL instead.
13406 All callers changed.
13408 * normal/cmdline.c (print_completion): New function.
13410 * kern/partition.c (grub_partition_iterate): Add an argument DISK
13412 All callers changed.
13414 * kern/disk.c (grub_print_partinfo): Removed.
13416 * include/grub/partition.h (struct grub_partition_map): Add a new
13417 argument DISK into HOOK of ITERATE.
13418 (grub_partition_iterate): Add a new argument DISK to HOOK.
13420 * include/grub/normal.h (enum grub_completion_type): New enum.
13421 (grub_completion_type_t): New type.
13422 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13423 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13424 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13425 (GRUB_COMPLETION_TYPE_FILE): Likewise.
13426 (grub_normal_do_completion): Added a new argument HOOK.
13427 (grub_normal_print_device_info): New prototype.
13429 * include/grub/disk.h (grub_print_partinfo): Removed.
13431 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13432 (normal_mod_SOURCES): Likewise.
13433 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13434 (normal_mod_SOURCES): Likewise.
13436 * commands/ls.c (grub_ls_list_disks): Use
13437 grub_normal_print_device_info instead of grub_print_partinfo. Free
13439 (grub_ls_list_files): Use grub_normal_print_device_info instead of
13440 duplicating the code.
13442 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13444 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
13445 follow GCS more precisely.
13446 * commands/i386/pc/vbe_test.c: Likewise.
13447 * include/grub/i386/pc/vbe.h: Likewise.
13448 * term/i386/pc/vesafb.c: Likewise.
13449 * video/i386/pc/vbe.c: Likewise.
13451 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13453 * DISTLIST: Added term/i386/pc/vesafb.c
13454 DISTLIST: Added video/i386/pc/vbe.c
13455 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13456 DISTLIST: Added commands/i386/pc/vbe_test.c.
13457 * commands/i386/pc/vbe_list_modes.c: New file.
13458 * commands/i386/pc/vbe_test.c: Likewise.
13459 * term/i386/pc/vesafb.c: Likewise.
13460 * video/i386/pc/vbe.c: Likewise.
13461 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13462 (grub_vbe_probe) Added prototype.
13463 (grub_vbe_set_video_mode) Likewise.
13464 (grub_vbe_get_video_mode) Likewise.
13465 (grub_vbe_get_video_mode_info) Likewise.
13466 (grub_vbe_set_pixel_rgb) Likewise.
13467 (grub_vbe_set_pixel_index) Likewise.
13468 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13469 (pkgdata_MODULES): Added vesafb.mod.
13470 (pkgdata_MODULES): Added vbe_list_modes.mod.
13471 (pkgdata_MODULES): Added vbe_test.mod.
13472 (vbe_mod_SOURCES): Added.
13473 (vbe_mod_CFLAGS): Likewise.
13474 (vesafb_mod_SOURCES): Likewise.
13475 (vesafb_mod_CFLAGS): Likewise.
13476 (vbe_list_modes_mod_SOURCES): Likewise.
13477 (vbe_list_modes_mod_CFLAGS): Likewise.
13478 (vbe_test_mod_SOURCES): Likewise.
13479 (vbe_test_mod_CFLAGS): Likewise.
13481 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
13483 * normal/command.c (grub_command_execute): If INTERACTIVE is
13484 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13485 CMDLINE. Disable the pager if INTERACTIVE is true.
13486 All callers are changed.
13488 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13489 before reading a config file.
13490 * normal/main.c (read_config_file): Even if a command is not
13491 found, register it if it is within an entry.
13493 * util/grub-emu.c: Include sys/types.h and unistd.h.
13494 (options): Added --hold.
13495 (struct arguments): Added a new member "hold".
13496 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13498 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13499 cleared by a debugger, if it is not zero.
13501 * include/grub/normal.h (grub_command_execute): Add an argument
13504 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
13506 * DISTLIST: Added include/grub/i386/pc/vbe.h.
13508 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
13510 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13511 program with another one, because the old one didn't detect a bug
13512 in gcc-3.4. Always use regparm 2, because the new test is still
13513 not enough for gcc-4.0. Someone must investigate a simple test
13514 case which detects a bug in gcc-4.0.
13516 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
13518 * DISTLIST: Added normal/completion.c.
13520 * normal/completion.c: New file.
13522 * term/i386/pc/console.c (grub_console_getwh): New function.
13523 (grub_console_term): Assign grub_console_getwh to getwh.
13525 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13526 function is defined in normal/completion.c as
13527 grub_normal_do_completion.
13528 (grub_cmdline_get): Use grub_normal_do_completion instead of
13531 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13532 returns non-zero, otherwise return 0.
13533 (grub_partition_iterate): First, probe the partition map. Then,
13534 call ITERATE only for this partition map.
13536 * kern/misc.c (grub_strncmp): Rewritten.
13538 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13539 returns non-zero. Otherwise return 0.
13541 * include/grub/partition.h (grub_partition_map_iterate): Return
13542 int instead of void.
13544 * include/grub/normal.h (grub_normal_do_completion): New prototype.
13546 * include/grub/misc.h (grub_strncmp): Change the type of N to
13549 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13552 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
13553 unsigned explicitly before comparing it with I.
13555 * kern/main.c (grub_env_write_root): Add the attribute unused into
13558 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13559 normal/completion.c.
13560 (normal_mod_SOURCES): Likewise.
13561 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13562 (normal_mod_SOURCES): Likewise.
13564 * normal/command.c (grub_iterate_commands): If ITERATE returns
13565 non-zero, return one immediately.
13567 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
13569 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
13570 * kern/i386/pc/startup.S: Updated Global Descriptor table's
13572 (grub_vbe_get_controller_info): New function.
13573 (grub_vbe_get_mode_info): Likewise.
13574 (grub_vbe_set_mode): Likewise.
13575 (grub_vbe_get_mode): Likewise.
13576 (grub_vbe_set_memory_window): Likewise.
13577 (grub_vbe_get_memory_window): Likewise.
13578 (grub_vbe_set_scanline_length): Likewise.
13579 (grub_vbe_get_scanline_length): Likewise.
13580 (grub_vbe_set_display_start): Likewise.
13581 (grub_vbe_get_display_start): Likewise.
13582 (grub_vbe_set_palette_data): Likewise.
13583 * include/grub/i386/pc/vbe.h: New file.
13585 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13587 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13588 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
13589 * DISTLIST: Likewise.
13590 * kern/ieee1275/of.c: Moved to ...
13591 * kern/ieee1275/ieee1275.c: ... here.
13593 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13595 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
13596 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
13597 Pass 0 as `end' parameter to grub_strtoul().
13599 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13601 * include/grub/powerpc/ieee1275/console.h: Do not include
13602 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
13604 (grub_console_cur_color): Remove i386-specific prototype.
13605 (grub_console_real_putchar): Likewise.
13606 (grub_console_checkkey): Likewise.
13607 (grub_console_getkey): Likewise.
13608 (grub_console_getxy): Likewise.
13609 (grub_console_gotoxy): Likewise.
13610 (grub_console_cls): Likewise.
13611 (grub_console_setcursor): Likewise.
13612 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13613 Include <grub/machine/console.h>.
13614 * term/ieee1275/ofconsole.c: Likewise.
13616 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
13618 * Makefile.in (LIBLZO): New variable.
13620 * configure.ac: Check for LZO version 2.
13622 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
13623 lzo/lzo1x.h instead of lzo1x.h.
13625 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
13628 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
13629 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
13631 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
13632 copying the data from PARTITION to P.
13634 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13636 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
13637 negative, unload the module.
13639 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
13640 map is "pc_partition_map" but not "pc".
13641 (usage): Fix the description. The options are --boot-image and
13642 --core-image but not --boot-file or --core-file.
13643 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
13644 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
13647 * util/i386/pc/grub-install.in: Do not specify --boot-file or
13648 --core-file. Specify INSTALL_DEVICE as an argument.
13650 * util/console.c: Include config.h.
13651 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
13652 [HAVE_NCURSES_H]: Include ncurses.h.
13653 [HAVE_CURSES_H]: Include curses.h.
13654 [!A_NORMAL] (A_NORMAL): Defined as zero.
13655 [!A_STANDOUT] (A_STANDOUT): Likewise.
13657 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
13659 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
13661 * configure.ac: Check for curses libraries and headers.
13663 * Makefile.in (LIBCURSES): New variable.
13665 * genmk.rb (Script::rule): Set the executable bits.
13667 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
13668 name of the PC partition map is "pc_partition_map" but not "pc".
13670 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13672 * util/i386/pc/grub-install.in (grub_probefs): New variable.
13673 (modules): Likewise.
13674 (usage): Added descriptions for --modules and --grub-probefs.
13675 Handle --modules and --grub-probefs. Save the arguments in MODULES
13676 and GRUB_PROBEFS, respectively.
13677 Auto-detect a filesystem module against GRUBDIR. If the result is
13678 empty and modules are not specified explicitly, abort the
13679 installation. Add the result to MODULES.
13681 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
13682 disk/powerpc/ieee1275/ofdisk.c,
13683 include/grub/powerpc/ieee1275/init.h and
13684 term/powerpc/ieee1275/ofconsole.c.
13685 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
13686 term/ieee1275/ofconsole.c.
13688 * include/grub/powerpc/ieee1275/console.h: Resurrected.
13690 * COPYING: Upgraded to the latest version. Only the address of the
13691 FSF office has changed.
13693 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13695 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13696 kern/ieee1275.c with kern/ieee1275/of.c.
13698 * kern/ieee1275.c: Moved to ...
13699 * kern/ieee1275/of.c: ... here.
13701 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
13703 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
13706 * config.guess: Updated to the latest version from gnulib.
13707 * config.sub: Likewise.
13708 * install.sh: Likewise.
13709 * mkinstalldirs: Likewise.
13711 * include/grub/console.h: Removed. This file is arch-specific. Do
13712 not put this in include/grub.
13714 * include/grub/i386/pc/console.h: Resurrected.
13716 * util/console.c: Include grub/machine/console.h instead of
13718 * util/grub-emu.c: Likewise.
13720 2005-08-04 Marco Gerards <metgerards@student.han.nl>
13722 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
13725 From Vincent Pelletier <subdino2004@yahoo.fr>
13726 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
13727 Redefined to use grub_getwh.
13728 (grub_term): New member named getwh.
13729 (grub_getwh): New prototype.
13730 * kern/term.c (grub_getwh): New function.
13731 * term/i386/pc/console.c (grub_console_getwh): New function.
13732 (grub_console_term): New member `getwh'.
13733 * term/i386/pc/vga.c (grub_vga_getwh): New function.
13734 (grub_vga_term): New member `getwh'.
13735 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
13737 (grub_ofconsole_getw): New function.
13738 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
13739 (grub_ofconsole_term): New field named getwh and new initial
13742 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
13744 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
13745 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
13746 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
13747 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
13748 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
13749 of <grub/machine/ieee1275.h>.
13750 * commands/ieee1275/reboot.c: Likewise.
13751 * boot/powerpc/ieee1275/ieee1275.c: Move ...
13752 * kern/ieee1275.c: ... to here. All users updated. Change all
13753 parameter structs to use new type `grub_ieee1275_cell_t'.
13754 * term/powerpc/ieee1275/ofconsole.c: Move ...
13755 * term/ieee1275/ofconsole.c: ... to here. All users updated.
13756 * disk/powerpc/ieee1275/ofdisk.c: Move ...
13757 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
13758 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
13760 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
13761 Remove unused prototypes. All users updated.
13762 * include/grub/powerpc/ieee1275/console.h: Removed.
13763 * include/grub/powerpc/ieee1275/ieee1275.h: Define
13764 `grub_ieee1275_cell_t'.
13765 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
13766 Cast comparisons with -1 to the correct type.
13767 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
13768 type to match `grub_ieee1275_entry_fn'.
13770 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
13772 * DISTLIST: Added util/i386/pc/grub-probefs.c.
13774 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
13775 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
13777 (grub_probefs_SOURCES): New variable.
13779 * util/i386/pc/grub-probefs.c: New file.
13781 * util/i386/pc/grub-setup.c (main): Call
13782 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
13783 grub_hfs_init and grub_jfs_init to initialize the system. Call
13784 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
13785 grub_pc_partition_map_fini to finish the system.
13787 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
13789 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
13791 (grub_multiboot_load_elf32): Likewise.
13792 (grub_multiboot_is_elf64): Likewise.
13793 (grub_multiboot_load_elf64): Likewise.
13794 (grub_multiboot_load_elf): Likewise.
13795 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
13796 an ELF32 or ELF64 file.
13797 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
13799 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
13800 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
13801 NULL before calling FS->LABEL.
13802 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
13803 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
13804 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
13805 before calling FS->LABEL.
13807 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
13809 * util/i386/pc/grub-install.in (datadir): New variable.
13811 (pkgdatadir): New variable.
13812 (pkglibdir): Removed.
13814 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
13816 * DISTLIST: Added util/i386/pc/grub-install.in.
13818 * util/i386/pc/grub-install.in: New file.
13820 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
13821 (grub_install_SOURCES): Likewise.
13823 * genmk.rb: Added support for scripts.
13824 (Script): New class.
13825 (scripts): New variable.
13827 * Makefile.in (install-local): Install sbin_SCRIPTS by
13829 (uninstall): Remove sbin_SCRIPTS.
13831 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
13832 device, try to get a GRUB device by
13833 grub_util_biosdisk_get_grub_dev.
13836 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
13837 description for --device-map.
13839 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13841 Change the semantics of variable hooks. They now return strings
13842 instead of error values.
13844 * util/i386/pc/grub-setup.c: Include grub/env.h.
13845 (setup): Use grub_device_set_root instead of grub_env_set.
13847 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
13848 grub_env_get instead of grub_device_set_root and
13849 grub_device_get_root, respectively.
13851 * kern/main.c (grub_env_write_root): New function.
13852 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
13853 grub_env_set instead of grub_device_set_root.
13855 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
13857 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
13858 rather than calling ENV->WRITE_HOOK afterwards.
13859 (grub_env_get): Return the result of ENV->READ_HOOK rather than
13860 passing a pointer of a pointer.
13861 (grub_register_variable_hook): Change the types of "read_hook" and
13862 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
13864 Allocate the default empty string on the heap, because this string
13865 may be freed later.
13867 * kern/device.c: Include grub/env.h.
13868 (grub_device_set_root): Removed.
13869 (grub_device_get_root): Likewise.
13870 (grub_device_open): Use grub_env_get instead of
13871 grub_device_get_root.
13873 * include/grub/env.h (grub_env_read_hook_t): New type.
13874 (grub_env_write_hook_t): Likewise.
13875 (grub_env_var): Change the types of "read_hook" and "write_hook"
13876 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
13877 (grub_register_variable_hook): Likewise.
13879 * include/grub/device.h (grub_device_set_root): Removed.
13880 (grub_device_set_root): Likewise.
13882 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
13883 make sure that DIRNAME terminates with '/', so that
13884 grub_fat_find_dir will fail if PATH is not a directory.
13886 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
13888 Use the qualifier auto for print_files and print_files_long.
13889 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
13891 Put a newline only if there is no error.
13892 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
13895 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13897 * kern/partition.c (grub_partition_probe): Initialize PART to
13898 NULL. Otherwise, when no partition map is registered, this returns
13901 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
13903 * partmap/apple.c (apple_partition_map_iterate): Check if POS
13904 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
13907 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
13909 * commands/ls.c (grub_ls_list_disks): Print the filesystem
13910 information on each device, if it does not have partitions. Print
13911 "Device" instead of "Disk", because this function is not specific
13914 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
13915 static to ensure that it is put on the memory rather than a
13918 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13920 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
13921 (grub_cat_init): Likewise.
13922 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
13923 (options): Likewise.
13924 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
13925 (grub_configfile_init): Likewise.
13926 * font/manager.c (GRUB_MOD_INIT): Likewise.
13927 * commands/help.c (GRUB_MOD_INIT): Likewise.
13928 (grub_help_init): Likewise.
13929 * normal/command.c (grub_command_init): Likewise.
13930 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
13931 * disk/loopback.c (grub_loop_init): Likewise.
13932 (GRUB_MOD_INIT): Likewise.
13933 * commands/ls.c (grub_ls_init): Likewise.
13934 (GRUB_MOD_INIT): Likewise.
13935 (options): Likewise.
13936 * commands/boot.c (grub_boot_init): Likewise.
13937 (GRUB_MOD_INIT): Likewise.
13938 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
13939 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
13940 (GRUB_MOD_INIT): Likewise.
13941 * commands/cmp.c (grub_cmp_init): Likewise.
13942 (GRUB_MOD_INIT): Likewise.
13944 * normal/arg.c: Use <> instead of "" to include header files.
13945 (SHORT_ARG_HELP): New macro.
13946 (SHORT_ARG_USAGE): Likewise.
13947 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
13948 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
13950 (find_short): Check if C is 'h' or 'u' explicitly.
13951 (grub_arg_show_help): Use space characters instead of tabs. Treat
13952 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
13953 are shown with --help and --usage only if they are not used for
13954 the command itself.
13955 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
13958 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
13959 const into "longarg". Change the type of "shortarg" to int.
13961 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13963 * boot/i386/pc/boot.S (boot_drive_check): New label.
13965 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
13968 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
13969 which do not pass a boot drive correctly. Copied from GRUB Legacy.
13971 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13973 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
13974 When turning off Gate A20, skip the check and return immediately,
13975 because this is not fatal usually.
13977 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
13979 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
13980 be 0x7C00 instead of 0x8000.
13982 * boot/i386/pc/pxeboot.S: Rewritten.
13984 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
13986 (gate_a20_check_state): Read a byte from 0x108000. Invert the
13989 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
13991 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
13992 robustness. This routine now supports a BIOS call and System
13993 Control Port A to modify the gate A20.
13995 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13996 Increased to 0x440.
13998 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
14000 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14001 device path and resulting ihandle.
14002 (grub_ofdisk_close): dprintf the ihandle being closed.
14003 (grub_ofdisk_read): dprintf function parameters.
14004 * kern/mm.c (grub_mm_init_region): Likewise.
14005 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14006 (grub_linux_boot): dprintf the Linux entry point, initrd address and
14007 size, and boot arguments.
14008 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14009 before loading into memory.
14010 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14011 before loading into memory.
14013 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
14015 * kern/mm.c: Added much documentation.
14016 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14017 8, set to 5 instead of 8.
14019 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14021 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14023 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14024 (grub_mkdevicemap_SOURCES): New variable.
14026 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14027 lib/device.c of GRUB Legacy.
14029 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
14031 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14032 instead of PATH is NULL.
14034 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
14036 * commands/cmp.c (BUFFER_SIZE): New macro.
14037 (grub_cmd_cmp): Close the right file at the right time. Compare
14038 only data just read. Don't report files of different size as
14039 identical. Dynamically allocate buffers. Move variable
14040 declarations at the beginning of function.
14042 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
14044 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14047 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
14049 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14050 when backspace is pressed at beginning of line.
14052 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
14054 * DISTLIST: Added genfslist.sh.
14056 * normal/main.c (fs_module_list): New variable.
14057 (autoload_fs_module): New function.
14058 (read_fs_list): Likewise.
14059 (grub_normal_execute): Call read_fs_list.
14061 * kern/fs.c (grub_fs_autoload_hook): New variable.
14062 (grub_fs_probe): Added support for auto-loading.
14064 * include/grub/normal.h (struct grub_fs_module_list): New struct.
14065 (grub_fs_module_list_t): New type.
14067 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14068 (grub_fs_autoload_hook): New prototype.
14070 * genfslist.sh: New file.
14072 * genmk.rb: Added a rule to generate a filesystem list.
14074 2005-06-30 Marco Gerards <metgerards@student.han.nl>
14076 * configure.ac: Fix the test for cross-compiling.
14078 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
14079 define GRUB_UTIL anymore.
14081 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
14082 so this function works on other systems than just big endian.
14083 (load_modules): Likewise.
14084 (add_segments): Likewise.
14086 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
14088 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
14089 contains `l' modifier, get a long from va_arg().
14091 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
14093 * kern/mm.c (grub_free): If the next free block which is being
14094 merged is the first free block, set the first block to the block
14096 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
14098 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14100 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
14101 `grub_ieee1275_chosen'.
14103 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
14105 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
14106 (grub_ieee1275_chosen): New variable.
14107 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
14109 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
14110 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14111 Rename first argument to `phandle' for consistency.
14112 (grub_ieee1275_get_property_length): Likewise.
14113 (grub_ieee1275_next_property): Likewise. Change type of first argument
14114 to grub_ieee1275_phandle_t.
14115 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
14116 Move export next to declaration.
14117 (grub_ieee1275_chosen): New variable.
14118 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
14119 Correct cosmetic typo.
14120 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
14121 `grub_ieee1275_chosen'.
14122 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
14123 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
14124 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
14125 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
14126 `grub_ieee1275_chosen'.
14128 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
14130 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
14132 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
14133 /chosen/bootargs as "variable=value" pairs.
14135 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
14137 * include/grub/misc.h (grub_dprintf): New macro.
14138 (grub_real_dprintf): New prototype.
14139 (grub_strword): Likewise.
14140 (grub_iswordseparator): Likewise.
14141 * kern/misc.c (grub_real_dprintf): New function.
14142 (grub_strword): Likewise.
14143 (grub_iswordseparator): Likewise.
14145 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
14147 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
14148 (roundup): Remove macro.
14149 (grub_ieee1275_flags): Make static.
14150 (grub_ieee1275_realmode): Remove.
14151 (grub_ieee1275_test_flag): New function.
14152 (grub_ieee1275_set_flag): Likewise.
14153 (find_options): Rename to `grub_ieee1275_find_options'; update
14154 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
14155 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
14156 (cmain): New prototype.
14157 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
14158 `grub_ieee1275_flags' directly.
14159 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
14160 machine/biosdisk.h.
14161 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
14162 Don't include grub/machine/init.h.
14163 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
14164 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14166 (grub_ieee1275_realmode): Likewise.
14167 (grub_ieee1275_flag): New enum.
14168 (grub_ieee1275_test_flag): New prototype.
14169 (grub_ieee1275_set_flag): New prototype.
14170 * include/grub/powerpc/ieee1275/init.h: Remove file.
14171 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
14172 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
14173 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
14174 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
14176 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
14177 `grub_ieee1275_test_flag'.
14178 (grub_ieee1275_encode_devname): Likewise.
14180 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
14182 * include/grub/powerpc/ieee1275/ieee1275.h
14183 (grub_ieee1275_encode_devname): New prototype.
14184 (grub_ieee1275_get_filename): Likewise.
14185 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
14187 (grub_set_prefix): Likewise.
14188 (grub_machine_init): Call grub_set_prefix.
14189 * kern/powerpc/ieee1275/openfw.c: Fix typos.
14190 (grub_parse_type): New enum.
14191 (grub_ieee1275_get_devargs): New function.
14192 (grub_ieee1275_get_devname): Likewise.
14193 (grub_ieee1275_parse_args): Likewise.
14194 (grub_ieee1275_get_filename): Likewise.
14195 (grub_ieee1275_encode_devname): Likewise.
14197 2005-03-30 Marco Gerards <metgerards@student.han.nl>
14199 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
14200 `grub_loader_unset'.
14202 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
14204 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
14205 instead of grub_ieee1275_interpret.
14206 (grub_halt_init): New function.
14207 (grub_halt_fini): Likewise.
14208 (GRUB_MOD_INIT): Correct message grammar.
14209 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14210 instead of grub_ieee1275_interpret.
14211 (grub_reboot_init): New function.
14212 (grub_reboot_fini): Likewise.
14213 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14214 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14215 util/i386/pc/misc.c with commands/ieee1275/halt.c,
14216 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14217 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14219 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14221 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14223 (grub_halt): Likewise.
14224 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14225 (cmain): Remove __attribute__((unused)).
14226 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14227 (grub_heap_len): Likewise.
14228 (grub_machine_fini): New function.
14229 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14230 (grub_halt): Likewise.
14231 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14233 * util/powerpc/ieee1275/misc.c: New file.
14235 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14237 * DISTLIST: New file.
14238 * gendistlist.sh: Likewise.
14240 * Makefile.in (COMMON_DISTFILES): Removed.
14241 (BOOT_DISTFILES): Likewise.
14242 (CONF_DISTFILES): Likewise.
14243 (DISK_DISTFILES): Likewise.
14244 (FS_DISTFILES): Likewise.
14245 (INCLUDE_DISTFILES): Likewise.
14246 (KERN_DISTFILES): Likewise.
14247 (LOADER_DISTFILES): Likewise.
14248 (TERM_DISTFILES): Likewise.
14249 (UTIL_DISTFILES): Likewise.
14250 (DISTFILES): Likewise.
14251 (uninstall): Uninstall files in $(pkgdata_DATA).
14252 (DISTLIST): New target.
14253 (distdir): Use the contents of the file DISTLIST to get a list of
14256 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14258 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14259 descriptor. This is ported from GRUB Legacy.
14261 * gencmdlist.sh: Added an extra semicolon to make it work with
14262 old sed versions. Reported by Robert Bihlmeyer
14263 <robbe@orcus.priv.at>.
14265 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
14267 Automatic loading of commands is supported.
14269 * normal/main.c (read_command_list): New function.
14270 (grub_normal_execute): Call read_command_list.
14272 * normal/command.c (grub_register_command): Return zero or CMD.
14273 Allocate CMD->NAME from the heap.
14274 Initialize CMD->MODULE_NAME to zero.
14275 Find the same name as well. If the same command is found and it is
14276 a dummy command, overwrite members. If it is not a dummy command,
14278 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14279 (grub_command_find): If a dummy command is found, load a module
14280 and retry to find a command only once.
14282 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14283 make sure that each command is loaded.
14285 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14287 (struct grub_command): Remove const from the member `name'.
14288 Add a new member `module_name'.
14289 (grub_register_command): Return grub_command_t.
14291 * commands/help.c (grub_cmd_help): Call grub_command_find to make
14292 sure that each command is loaded.
14294 * genmk.rb (PModule::rule): Specify a module name without the
14295 suffix ".mod" to gencmdlist.sh.
14297 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14299 * gencmdlist.sh: New file.
14301 * genmk.rb (PModule::rule): Generate a rule for a command list.
14303 Generate command.lst from $(COMMANDFILES).
14305 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14306 (DATA): Added $(pkgdata_DATA).
14307 (install-local): Install files in $(pkgdata_DATA).
14309 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14311 * term/i386/pc/vga.c (debug_command): Removed.
14312 (GRUB_MOD_INIT): Do not register the command "debug".
14314 From Hollis Blanchard:
14315 * commands/configfile.c: New file.
14316 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14317 commands/configfile.c.
14318 (pkgdata_MODULES): Added configfile.mod.
14319 (configfile_mod_SOURCES): New variable.
14320 (configfile_mod_CFLAGS): Likewise.
14321 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14322 commands/configfile.c.
14323 (pkgdata_MODULES): Added configfile.mod.
14324 (configfile_mod_SOURCES): New variable.
14325 (configfile_mod_CFLAGS): Likewise.
14326 * util/grub-emu.c (main): Call grub_configfile_init and
14327 grub_configfile_fini.
14328 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14330 [GRUB_UTIL] (grub_configfile_fini): Likewise.
14332 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14334 * normal/arg.c (grub_arg_show_help): Do not show the bug report
14337 * commands/help.c (grub_cmd_help): Do not print newlines after
14338 the last command in print_command_help.
14340 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14342 * commands/default.h: New file.
14343 * commands/timeout.h: Likewise.
14344 * normal/context.c: Likewise.
14346 * util/misc.c: Do not include sys/times.h.
14347 Include sys/time.h and grub/machine/time.h.
14348 (grub_get_rtc): Rewritten with gettimeofday.
14350 * util/grub-emu.c (main): Call grub_default_init and
14351 grub_timeout_init before grub_normal_init, and call
14352 grub_timeout_fini and grub_default_fini after grub_main.
14354 * util/console.c (grub_ncurses_checkkey): Return the read
14357 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14360 * normal/main.c (read_config_file): Push MENU. If this fails,
14361 print an error and wait for a user input.
14362 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14363 If a menu is empty or an error occurs, pop MENU.
14364 (grub_normal_execute): Pop and free MENU after grub_menu_run
14367 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14369 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14371 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14373 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14375 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14378 * include/grub/normal.h (struct grub_menu_list): New struct.
14379 (grub_menu_list_t): New type.
14380 (struct grub_context): New struct.
14381 (grub_context_t): New type.
14382 (grub_register_command): Got rid of EXPORT_FUNC.
14383 (grub_unregister_command): Likewise.
14384 (grub_context_get): New prototype.
14385 (grub_context_get_current_menu): Likewise.
14386 (grub_context_push_menu): Likewise.
14387 (grub_context_pop_menu): Likewise.
14388 [GRUB_UTIL] (grub_default_init): Likewise.
14389 [GRUB_UTIL] (grub_default_fini): Likewise.
14390 [GRUB_UTIL] (grub_timeout_init): Likewise.
14391 [GRUB_UTIL] (grub_timeout_fini): Likewise.
14393 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14394 commands/timeout.c and normal/context.c.
14395 (pkgdata_MODULES): Added default.mod and timeout.mod.
14396 (normal_mod_SOURCES): Added normal/context.c.
14397 (default_mod_SOURCES): New variable.
14398 (default_mod_CFLAGS): Likewise.
14399 (timeout_mod_SOURCES): Likewise.
14400 (timeout_mod_CFLAGS): Likewise.
14401 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14403 (pkgdata_MODULES): Added default.mod and timeout.mod.
14404 (normal_mod_SOURCES): Added normal/context.c.
14405 (default_mod_SOURCES): New variable.
14406 (default_mod_CFLAGS): Likewise.
14407 (timeout_mod_SOURCES): Likewise.
14408 (timeout_mod_CFLAGS): Likewise.
14410 * Makefile.in (all-local): Added $(MKFILES).
14412 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
14414 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14415 (grub_emu_SOURCES): Likewise.
14416 (pkgdata_MODULES): Add `sun.mod'.
14417 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14418 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14420 (pkgdata_MODULES): Add `sun.mod'.
14421 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14422 * include/grub/partition.h (grub_sun_partition_map_init): New
14424 (grub_sun_partition_map_fini): Likewise.
14425 * partmap/sun.c: New file.
14426 * util/grub-emu.c (main): Initialize and de-initialize the sun
14427 partitionmap support.
14429 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
14431 This implements an Emacs-like menu entry editor.
14433 * normal/menu_entry.c: New file.
14435 * util/console.c (grub_ncurses_putchar): Translate some Unicode
14436 characters to ASCII.
14437 (saved_char): New variable.
14438 (grub_ncurses_checkkey): Rewritten completely.
14439 (grub_ncurses_getkey): Likewise.
14440 (grub_ncurses_init): Call raw instead of cbreak.
14442 * normal/menu.c (print_entry): Do not put a space.
14443 (init_page): Renamed to ...
14444 (grub_menu_init_page): ... this. All callers changed.
14445 (edit_menu_entry): Removed.
14446 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14448 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14450 * kern/misc.c (grub_vprintf): Call grub_refresh.
14452 * normal/menu.c (DISP_LEFT): Renamed to ...
14453 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14454 * normal/menu.c (DISP_UP): Renamed to ...
14455 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14456 * normal/menu.c (DISP_RIGHT): Renamed to ...
14457 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14458 * normal/menu.c (DISP_DOWN): Renamed to ...
14459 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14460 * normal/menu.c (DISP_HLINE): Renamed to ...
14461 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14462 * normal/menu.c (DISP_VLINE): Renamed to ...
14463 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14464 * normal/menu.c (DISP_UL): Renamed to ...
14465 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14466 * normal/menu.c (DISP_UR): Renamed to ...
14467 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14468 * normal/menu.c (DISP_LL): Renamed to ...
14469 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14470 * normal/menu.c (DISP_LR): Renamed to ...
14471 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14472 * normal/menu.c (TERM_WIDTH): Renamed to ...
14473 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14474 * normal/menu.c (TERM_HEIGHT): Renamed to ...
14475 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14476 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14477 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14478 * normal/menu.c (TERM_MARGIN): Renamed to ...
14479 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14480 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14481 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14482 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14483 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14484 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14485 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14486 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14487 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14488 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14489 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14490 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14491 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14492 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14493 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14494 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14495 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14496 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14497 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14498 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14499 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14500 All callers changed.
14502 * include/grub/normal.h: New prototype.
14504 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14505 normal/menu_entry.c.
14506 (normal_mod_SOURCES): Likewise.
14507 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14508 (normal_mod_SOURCES): Likewise.
14510 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
14512 * include/grub/normal.h (grub_halt_init): New prototype.
14513 (grub_halt_fini): Likewise.
14514 (grub_reboot_init): Likewise.
14515 (grub_reboot_fini): Likewise.
14517 * util/grub-emu.c: Include signal.h.
14518 (main_env): New global variable.
14519 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14521 (grub_machine_fini): New function.
14522 (main): Call grub_halt_init and grub_reboot_init before
14523 grub_main, and grub_reboot_fini and grub_halt_fini after it.
14524 Call setjmp with MAIN_ENV to go back afterwards.
14525 Call grub_machine_fini right before return.
14527 * include/grub/util/misc.h: Include setjmp.h.
14528 (main_env): New prototype.
14530 * include/grub/kernel.h (grub_machine_fini): New prototype.
14531 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14532 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14534 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14535 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14536 * term/i386/pc/console.c (grub_console_fini): Likewise.
14538 * util/i386/pc/misc.c: New file.
14540 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14541 util/i386/pc/misc.c, commands/i386/pc/halt.c and
14542 commands/i386/pc/reboot.c.
14544 2005-02-14 Guillem Jover <guillem@hadrons.org>
14546 * include/grub/dl.h (grub_dl_check_header): New prototype.
14547 (grub_arch_dl_check_header): Change return type to grub_err_t,
14548 remove size parameter and export function. Update all callers.
14549 * kern/dl.c (grub_dl_check_header): New function.
14550 (grub_dl_load_core): Use `grub_dl_check_header' instead of
14551 `grub_arch_dl_check_header'. Check ELF type. Check if sections
14552 are inside the core.
14553 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14554 independent ELF header checks.
14555 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14556 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14557 `grub_dl_check_header' instead of explicit checks. Check for the
14559 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14560 `grub_dl_check_header' instead of explicit checks. Remove arch
14561 specific ELF header checks.
14563 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
14566 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
14568 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
14569 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
14571 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
14573 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
14574 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
14575 (part_map_iterate): Clear `grub_errno' and return 0 if
14576 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
14577 * partmap/amiga.c (amiga_partition_map_iterate): Return
14578 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
14579 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14581 2005-02-01 Guillem Jover <guillem@hadrons.org>
14583 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
14586 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14588 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
14590 (grub_rescue_cmd_linux): New prototype.
14591 (grub_rescue_cmd_initrd): Likewise.
14592 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
14594 (grub_linux_release_mem): Release the memory for the initrd.
14595 (grub_load_linux): Renamed from this...
14596 (grub_rescue_cmd_linux): ...To this. Changed all callers.
14597 Changed `entry' not to be static. Loop over memory regions to
14598 find another one when the default fails.
14599 (grub_rescue_cmd_initrd): New function.
14600 (grub_linux_init): Remove function.
14601 (grub_linux_fini): Likewise.
14602 (GRUB_MOD_INIT): Register `initrd'.
14603 (GRUB_MOD_FINI): Unregister `initrd'.
14604 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14606 (grub_linux_normal_fini): Likewise.
14607 (GRUB_MOD_INIT): Register `initrd'.
14608 (GRUB_MOD_FINI): Unregister `initrd'.
14610 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14612 * commands/help.c: New file.
14613 * normal/arg.c (show_help): Renamed to...
14614 (grub_arg_show_help): ... this.
14615 * commands/i386/pc/halt.c: New file.
14616 * commands/i386/pc/reboot.c: Likewise.
14617 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14618 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
14619 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
14620 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
14622 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14624 (pkgdata_MODULES): Add `help.mod'.
14625 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
14626 * grub/i386/pc/init.h (grub_reboot): New prototype.
14627 (grub_halt): Likewise.
14628 * include/grub/normal.h (grub_arg_show_help): New prototype.
14629 (grub_help_init): Likewise.
14630 (grub_help_fini): Likewise.
14631 * util/grub-emu.c (main): Initialize and deinitialize the help
14634 * normal/cmdline.c (grub_cmdline_get): Doc fix.
14636 * normal/command.c (grub_command_init): Fixed the description of
14637 the `set' and `unset' commands.
14639 2005-01-31 Marco Gerards <metgerards@student.han.nl>
14641 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
14643 * commands/ieee1275/halt.c: New file.
14644 * commands/ieee1275/reboot.c: Likewise.
14645 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
14646 `__attribute__ ((unused))'. Some GCS related fixed.
14647 (grub_suspend_init) [GRUB_UTIL]: Function removed.
14648 (grub_suspend_fini): Likewise.
14649 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
14651 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
14652 (halt_mod_CFLAGS): New variables.
14653 * include/grub/powerpc/ieee1275/ieee1275.h
14654 (grub_ieee1275_interpret): New prototype.
14656 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
14658 * include/grub/misc.h (memmove): New prototype.
14659 (memcpy): Likewise.
14661 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
14663 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
14664 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
14666 2005-01-22 Marco Gerards <metgerards@student.han.nl>
14668 * kern/misc.c (grub_strndup): Function rewritten.
14670 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
14672 * normal/menu.c (TERM_WIDTH): Macro redefined.
14673 (TERM_TOP_BORDER_Y): Likewise.
14674 (draw_border): Replaced while-loop by a for-loop. Make the number
14675 of lines consistent with the number of lines displayed in
14676 print_entries. Added a margin below the rectangle.
14677 (print_entry): Make the entry fit in the rectangle.
14678 (print_entries): Display the scroll arrows next to the right
14681 2005-01-21 Marco Gerards <metgerards@student.han.nl>
14683 * fs/minix.c (grub_minix_find_file): Reserve more space for
14684 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
14685 `grub_strncpy' to copy `path' into it.
14687 2005-01-21 Marco Gerards <metgerards@student.han.nl>
14689 Add the loopback device, a device via which files can be accessed
14692 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
14693 (pkgdata_MODULES): Add loopback.mod.
14694 (loopback_mod_SOURCES): New variable.
14695 (loopback_mod_CFLAGS): Likewise.
14696 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14698 (pkgdata_MODULES): Add loopback.mod.
14699 (loopback_mod_SOURCES): New variable.
14700 (loopback_mod_CFLAGS): Likewise.
14701 * disk/loopback.c: new file.
14702 * include/grub/normal.h (grub_loop_init): New prototype.
14703 (grub_loop_fini): New prototype.
14704 * util/grub-emu.c (main): Initialize and de-initialize loopback
14706 * include/grub/disk.h (grub_disk_dev_id): Add
14707 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
14709 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
14711 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
14713 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
14714 (suspend_mod_SOURCES): New variable.
14715 (suspend_mod_CFLAGS): Likewise.
14716 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
14718 * commands/ieee1275/suspend.c: New file.
14720 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14722 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
14723 ((unused))' to `__attribute__ ((used))'.
14724 (GRUB_MOD_FINI): Likewise.
14725 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
14726 * genmk.rb (PModule): Assign space to common symbols when linking
14729 2005-01-20 Marco Gerards <metgerards@student.han.nl>
14731 * include/grub/mm.h (grub_mm_init_region): Change the type of the
14732 `unsigned' arguments to `grub_size_t'.
14733 (grub_malloc): Likewise.
14734 (grub_realloc): Likewise.
14735 (grub_memalign): Likewise.
14736 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
14737 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14738 * util/misc.c (grub_malloc): Likewise.
14739 (grub_realloc): Likewise.
14740 * kern/mm.c (get_header_from_pointer): Change the casts to
14741 `unsigned' into a cast to `grub_size_t'.
14743 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
14744 point to `currnode' when `currnode' is changed.
14746 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
14747 Schottelius <nico-linux@schottelius.org>.
14749 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
14751 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
14752 (note_path): Remove variable.
14753 (GRUB_IEEE1275_NOTE_NAME): New macro.
14754 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
14755 (grub_ieee1275_note_hdr): New structure.
14756 (grub_ieee1275_note_desc): Likewise.
14757 (grub_ieee1275_note): Likewise.
14758 (load_note): Remove `dir' argument. All callers updated. Remove
14759 `note_img' and `path'. Do not load a file from `note_path'.
14760 Initialize a struct grub_ieee1275_note and write that to `out'.
14761 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
14763 2005-01-05 Marco Gerards <metgerards@student.han.nl>
14765 * util/misc.c (grub_util_read_image): Revert last change. It
14766 called `grub_util_read_at', which seeks from the beginning of the
14769 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
14771 * TODO: Add note about endianness in grub-mkimage.
14772 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
14774 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
14775 (grub_mkimage_SOURCES): New target.
14776 * include/grub/kernel.h (grub_start_addr): Remove variable.
14777 (grub_end_addr): Likewise.
14778 (grub_total_module_size): Likewise.
14779 (grub_kernel_image_size): Likewise.
14780 (GRUB_MODULE_MAGIC): New constant.
14781 (grub_module_info): New structure.
14782 (grub_arch_modules_addr): New prototype.
14783 (grub_get_end_addr): Remove prototype.
14784 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
14785 * include/grub/powerpc/ieee1275/kernel.h: New file.
14786 * include/grub/util/misc.h (grub_util_get_fp_size): New
14788 (grub_util_read_at): Likewise.
14789 (grub_util_write_image_at): Likewise.
14790 * kern/main.c (grub_get_end_addr): Remove function.
14791 (grub_load_modules): Call grub_arch_modules_addr instead of using
14792 grub_end_addr. Look for a grub_module_info struct in memory. Use
14793 the grub_module_info fields instead of calling grub_get_end_addr
14794 as loop conditions. Move grub_add_unused_region code here.
14795 (grub_add_unused_region): Remove function.
14796 * kern/i386/pc/init.c: Include grub/cache.h.
14797 (grub_machine_init): Remove call to grub_get_end_addr. Remove
14798 one call to add_mem_region.
14799 (grub_arch_modules_addr): New function.
14800 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
14801 (grub_total_module_size): Likewise.
14802 Include grub/machine/kernel.h.
14803 (grub_arch_modules_addr): New function.
14804 * util/grub-emu.c (grub_end_addr): Remove variable.
14805 (grub_total_module_size): Likewise.
14806 (grub_arch_modules_addr): New function.
14807 * util/misc.c: Include unistd.h.
14808 (grub_util_get_fp_size): New function.
14809 (grub_util_read_at): Likewise.
14810 (grub_util_write_image_at): Likewise.
14811 (grub_util_read_image): Call grub_util_read_at.
14812 (grub_util_write_image): Call grub_util_write_image_at.
14813 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
14814 additional memory in kernel_img for a struct grub_module_info.
14815 Fill in that grub_module_info.
14816 * util/powerpc/ieee1275/grub-mkimage.c: New file.
14818 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14820 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
14822 * include/grub/powerpc/ieee1275/ieee1275.h
14823 (grub_ieee1275_milliseconds): New prototype.
14824 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
14826 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
14827 grub_ieee1275_milliseconds.
14829 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14831 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
14833 (find_options): New function.
14834 (cmain): Call find_options.
14835 * include/grub/powerpc/ieee1275/ieee1275.h
14836 (grub_ieee1275_realmode): New extern variable.
14837 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
14838 grub_map if grub_ieee1275_realmode is false.
14840 2004-12-29 Marco Gerards <metgerards@student.han.nl>
14842 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
14843 lines are inserted and make it work like readline. Reported by
14844 Vincent Pelletier <subdino2004@yahoo.fr>.
14846 2004-12-28 Marco Gerards <metgerards@student.han.nl>
14848 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
14850 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
14851 `kern/powerpc/cache.S'.
14853 2004-12-27 Marco Gerards <metgerards@student.han.nl>
14855 * genmk.rb: Handle the `Program' class in the main loop. Written
14856 by Johan Rydberg <jrydberg@gnu.org>.
14857 (Program): New class.
14858 (programs): New variable.
14859 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
14860 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
14861 instead of "grub/kernel.h". Include <grub/machine/init.h>.
14862 (help_arch): Function removed.
14863 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
14864 `powerpc/libgcc.h' and `loader.h'.
14865 (pkgdata_PROGRAMS): New variable.
14866 (sbin_UTILITIES): Variable removed.
14867 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
14868 (grubof_SOURCES): Variable re-defined so it only includes the
14869 core functionality.
14870 (grubof_CFLAGS): Remove `-DGRUBOF'.
14871 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
14872 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
14873 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
14874 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
14875 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
14876 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
14877 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
14878 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
14879 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
14880 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
14881 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14882 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
14883 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
14884 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
14885 (pc_mod_CFLAGS): New variables.
14886 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
14887 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
14888 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
14889 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
14891 * include/grub/i386/pc/init.h (grub_os_area_addr)
14892 (rub_os_area_size): ... to here.
14893 * include/grub/powerpc/ieee1275/ieee1275.h
14894 (grub_ieee1275_entry_fn): Export symbol.
14895 * include/grub/powerpc/ieee1275/init.h: New file.
14896 * include/grub/powerpc/libgcc.h: Likewise.
14897 * include/grub/cache.h: Likewise.
14898 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
14899 <hollis@penguinppc.org>.
14900 * kern/dl.c: Include <grub/cache.h>.
14901 (grub_dl_flush_cache): New function.
14902 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
14904 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
14905 (grub_console_init): Removed prototypes.
14906 (grub_machine_init): Don't initialize the modules anymore.
14907 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
14909 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
14910 Macro undef removed.
14911 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
14912 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
14913 relocation `R_PPC_REL32'. Return an error when the relocation is
14915 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
14916 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
14917 * util/misc.c (grub_arch_sync_caches): Likewise.
14919 2004-12-19 Marco Gerards <metgerards@student.han.nl>
14921 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
14922 `symlist.c', add `grubof_symlist.c'.
14923 (symlist.c): Variable removed.
14924 (grubof_HEADERS): Variable added.
14925 (grubof_symlist.c): New target.
14926 (kernel_syms.lst): Use `grubof_HEADERS' instead of
14927 `kernel_img_HEADERS'.
14928 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
14929 * kern/powerpc/dl.c: New file.
14930 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
14932 (grub_arch_dl_relocate_symbols): Likewise.
14933 (grub_register_exported_symbols): Likewise.
14935 2004-12-13 Marco Gerards <metgerards@student.han.nl>
14937 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
14938 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
14939 to fail instead. Reported by Vincent Pelletier
14940 <subdino2004@yahoo.fr>.
14942 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
14943 it is not allocated. Reported by Vincent Pelletier
14944 <subdino2004@yahoo.fr>.
14946 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
14947 output so the output looks better.
14949 2004-12-04 Marco Gerards <metgerards@student.han.nl>
14951 Modulize the partition map support and add support for the amiga
14954 * commands/ls.c: Include <grub/partition.h> instead of
14955 <grub/machine/partition.h>.
14956 * kern/disk.c: Likewise.
14957 * kern/rescue.c: Likewise.
14958 * loader/i386/pc/chainloader.c: Likewise.
14959 * normal/cmdline.c: Likewise.
14960 * kern/powerpc/ieee1275/init.c: Likewise.
14961 (grub_machine_init): Call `grub_pc_partition_map_init',
14962 `grub_amiga_partition_map_init' and
14963 `grub_apple_partition_map_init'.
14964 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
14965 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
14966 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
14967 `partition.h' and `pc_partition.h'.
14968 (grub_setup_SOURCES): Remove
14969 `disk/i386/pc/partition.c'. Add `kern/partition.c',
14970 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14971 (grub_emu_SOURCES): Likewise.
14972 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
14973 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
14974 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
14975 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14976 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
14977 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14978 (grubof_SOURCES): Likewise.
14979 * disk/i386/pc/partition.c: File removed.
14980 * disk/powerpc/ieee1275/partition.c: Likewise.
14981 * include/grub/powerpc/ieee1275/partition.h: Likewise.
14982 * include/grub/i386/pc/partition.h: Likewise.
14983 * kern/partition.c: New file.
14984 * partmap/amiga.c: Likewise.
14985 * partmap/apple.c: Likewise.
14986 * partmap/pc.c: Likewise.
14987 * include/grub/partition.h: Likewise..
14988 * include/grub/pc_partition.h: Likewise.
14989 * util/grub-emu.c: Include <grub/partition.h> instead of
14990 <grub/machine/partition.h>.
14991 (main): Call `grub_pc_partition_map_init',
14992 `grub_amiga_partition_map_init' and
14993 `grub_apple_partition_map_init' and deinitialize afterwards.
14994 * util/i386/pc/biosdisk.c: Include `#include
14995 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14996 `<grub/machine/partition.h>'.
14997 * util/i386/pc/grub-setup.c: Likewise.
14998 * util/i386/pc/biosdisk.c: Likewise.
14999 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15000 partition information in case of a PC partition.
15001 * util/i386/pc/grub-setup.c: Include `#include
15002 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15003 `<grub/machine/partition.h>'.
15004 (setup): Only access the PC specific partition information in case
15007 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
15009 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15010 (grub_longjmp): Likewise.
15011 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15013 * normal/powerpc/setjmp.S: New file.
15014 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15015 `normal/powerpc/setjmp.S'.
15016 (grubof_CFLAGS): Add `-DGRUBOF'.
15017 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15018 [GRUB_UTIL && !GRUBOF].
15020 2004-11-16 Marco Gerards <metgerards@student.han.nl>
15022 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15023 property named `name'. Correctly handle the error returned by
15024 `grub_ieee1275_finddevice' if a device can not be opened.
15026 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
15028 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15029 `actual' for negativity.
15030 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15033 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15035 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15036 (PAGE_OFFSET): New macro.
15037 (CRTC_ADDR_PORT): Likewise.
15038 (CRTC_DATA_PORT): Likewise.
15039 (START_ADDR_HIGH_REGISTER): Likewise.
15040 (START_ADDR_LOW_REGISTER): Likewise.
15041 (GRAPHICS_ADDR_PORT): Likewise.
15042 (GRAPHICS_DATA_PORT): Likewise.
15043 (READ_MAP_REGISTER): Likewise.
15044 (INPUT_STATUS1_REGISTER): Likewise.
15045 (INPUT_STATUS1_VERTR_BIT): Likewise.
15046 (page): New variable.
15047 (wait_vretrace): New function.
15048 (set_read_map): Likewise.
15049 (set_start_address): Likewise.
15050 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
15052 (check_vga_mem): Take the page into account.
15053 (write_char): Likewise.
15054 (write_cursor): Likewise.
15055 (scroll_up): Likewise. Copy the page to the page that is not
15056 shown and switch between both pages.
15057 (grub_vga_putchar): Fix off by one error.
15058 (grub_vga_cls): Wait for the vertical retrace. Take the page into
15061 2004-11-01 Marco Gerards <metgerards@student.han.nl>
15063 Add support for iso9660 (including rockridge).
15065 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15066 (iso9660_mod_SOURCES): New variable.
15067 (iso9660_mod_CFLAGS): Likewise.
15068 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15069 * include/grub/fs.h (grub_iso9660_init): New prototype.
15070 * util/grub-emu.c (main): Call `grub_iso9660_init'.
15071 * fs/iso9660.c: New file.
15073 * include/grub/misc.h (grub_strncat): New prototype.
15074 * kern/misc.c (grub_strncat): New function.
15076 * fs/hfs.c (grub_hfs_mount): Translate the error
15077 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
15078 * fs/jfs.c (grub_jfs_mount): Likewise.
15079 * fs/ufs.c (grub_ufs_mount): Likewise.
15081 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
15083 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
15084 which initialized BAT registers.
15085 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
15086 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15088 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
15089 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
15091 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
15092 (grub_mapclaim): Likewise.
15093 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
15094 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
15097 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
15099 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
15100 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
15101 -ffreestanding and -msoft-float.
15103 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
15105 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
15106 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
15107 set in grub_ieee1275_flags.
15109 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
15111 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
15113 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
15114 grub_console_init first.
15115 Change the memory range used for grub_ieee1275_claim and
15116 grub_mm_init_region.
15117 Print an error message if the claim fails.
15118 Include <grub/misc.h>.
15120 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
15122 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
15123 Call grub_children_iterate for device nodes of type `scsi',
15125 (grub_ofdisk_open): Remove manual device alias resolution.
15126 Fix memory leak when device cannot be opened.
15127 * include/grub/powerpc/ieee1275/ieee1275.h
15128 (grub_children_iterate): New prototype.
15129 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
15131 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15132 Return -1 if args.size was -1.
15134 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15136 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
15137 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
15138 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
15139 Open Firmware's memory for it; claim memory from _start to _end.
15140 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
15141 (_end): New extern.
15142 (_start): Zero BSS from __bss_start to _end.
15143 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15145 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
15147 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
15149 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
15150 -1 if args.base was -1.
15152 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
15154 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
15155 escape sequence instead of a literal ^L. Also call
15156 grub_ofconsole_gotoxy.
15158 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
15160 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
15161 void * arguments to grub_addr_t. All callers updated. Also make
15162 the `result' argument optional.
15163 (grub_ieee1275_release): change void * arguments to grub_addr_t.
15164 All callers updated.
15166 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
15168 * commands/ls.c (grub_ls_list_files): Use the string following the
15169 initial ')', if present, as the filesystem path.
15170 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
15172 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
15174 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
15176 Make the source code of the menu interface more readable.
15178 * normal/menu.c: Include grub/mm.h.
15179 (TERM_WIDTH): New macro.
15180 (TERM_HEIGHT): Likewise.
15181 (TERM_INFO_HEIGHT): Likewise.
15182 (TERM_MARGIN): Likewise.
15183 (TERM_SCROLL_WIDTH): Likewise.
15184 (TERM_TOP_BORDER_Y): Likewise.
15185 (TERM_LEFT_BORDER_X): Likewise.
15186 (TERM_BORDER_WIDTH): Likewise.
15187 (TERM_MESSAGE_HEIGHT): Likewise.
15188 (TERM_BORDER_HEIGHT): Likewise.
15189 (TERM_NUM_ENTRIES): Likewise.
15190 (TERM_FIRST_ENTRY_Y): Likewise.
15191 (TERM_ENTRY_WIDTH): Likewise.
15192 (TERM_CURSOR_X): Likewise.
15193 (draw_border): Use macros instead of magic numbers.
15194 (print_entry): Likewise.
15195 (print_entries): Likewise.
15196 (run_menu): Likewise. Also, handle the key 'e'.
15197 (run_menu_entry): Ignore empty command lines.
15198 (print_message): Added a new argument EDIT. If EDIT is true,
15199 print a different message.
15200 (init_page): Likewise.
15201 (edit_menu_entry): New function. Not implemented yet.
15203 2004-09-17 Marco Gerards <metgerards@student.han.nl>
15205 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15206 can be loaded from normal mode.
15208 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15210 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15211 (multiboot_mod_CFLAGS): New variables.
15212 * loader/i386/pc/linux_normal.c: New file.
15213 * loader/i386/pc/multiboot_normal.c: Likewise.
15215 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15216 attribute `unused'.
15218 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
15219 `fdiro' to read the mode information from instead of `diro'.
15221 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15222 looking up a symlink.
15224 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15226 * normal/command.c (grub_command_execute): Don't parse the
15227 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15228 flags of the command.
15230 * normal/menu.c (grub_menu_run): Fix typo.
15232 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
15234 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15236 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15237 `y + 1' instead of `y - 1'.
15239 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
15241 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
15243 From Hollis Blanchard <hollis@penguinppc.org>:
15244 * kern/misc.c (memmove): New alias for grub_memmove.
15245 (memcmp): New alias for grub_memcmp.
15246 (memset): New alias for grub_memset.
15247 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15248 Change "int handle" to "grub_ieee1275_phandle_t handle".
15249 * include/grub/powerpc/ieee1275/ieee1275.h
15250 (grub_ieee1275_get_property): Likewise.
15252 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
15254 Added normal mode command `chainloader' as module chain.mod, which
15255 depends on normal.mod and _chain.mod.
15257 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15258 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15259 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15261 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15262 but arguments parsing moved to ...
15263 (grub_chainloader_cmd): ... here. New function.
15264 * include/grub/i386/pc/chainloader.h: New file.
15265 * loader/i386/pc/chainloader_normal.c: Likewise.
15267 2004-09-11 Marco Gerards <metgerards@student.han.nl>
15269 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15270 (grub_mkimage_LDFLAGS): Likewise.
15271 (grub_emu_SOURCES): Likewise.
15272 (kernel_img_HEADERS): Added fshelp.h.
15273 * fs/ext2.c: Include <grub/fshelp.h>.
15274 (FILETYPE_REG): New macro.
15275 (FILETYPE_INO_REG): Likewise.
15276 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15278 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
15280 (grub_fshelp_node): New struct.
15281 (grub_ext2_data): Added member `diropen'. Changed member `inode'
15283 (grub_ext2_get_file_block): Removed function.
15284 (grub_ext2_read_block): New function.
15285 (grub_ext2_read_file): Replaced parameter `data' by `node'.
15286 This function was written.
15287 (grub_ext2_mount): Read the root inode. Create a diropen struct.
15288 (grub_ext2_find_file): Removed function.
15289 (grub_ext2_read_symlink): New function.
15290 (grub_ext2_iterate_dir): Likewise.
15291 (grub_ext2_open): Rewritten.
15292 (grub_ext2_dir): Rewritten.
15293 * include/grub/fshelp.h: New file.
15294 * fs/fshelp.c: Likewise.
15296 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
15298 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15299 (print_message): Add a missing newline.
15300 (run_menu): Added timeout support.
15301 (run_menu_entry): New local function.
15302 (grub_menu_run): Added support for booting.
15304 * kern/loader.c (grub_loader_is_loaded): New function.
15306 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15307 (grub_get_rtc): Exported.
15309 * include/grub/i386/pc/time.h: Include grub/symbol.h.
15310 (grub_get_rtc): Exported.
15312 * include/grub/normal.h (struct grub_command_list): Remove
15313 constant from the member `command'.
15315 * include/grub/loader.h (grub_loader_is_loaded): Declared.
15317 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15319 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15321 2004-08-28 Marco Gerards <metgerards@student.han.nl>
15323 Add support for the JFS filesystem.
15325 * fs/jfs.c: New file.
15326 * include/grub/fs.h (grub_jfs_init): New prototype.
15327 (grub_jfs_fini): New prototype.
15328 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15329 (grub_emu_SOURCES): Likewise.
15330 (pkgdata_MODULES): Add jfs.mod.
15331 (jfs_mod_SOURCES): New variable.
15332 (jfs_mod_CFLAGS): Likewise.
15333 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15334 (grubof_SOURCES): Likewise.
15335 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15337 * fs/fat.c (grub_fat_find_dir): Convert the filename little
15338 endian to the host endian.
15339 (grub_fat_utf16_to_utf8): Move function from there...
15340 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
15341 the endianness of the source string anymore.
15342 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15344 2004-08-24 Marco Gerards <metgerards@student.han.nl>
15346 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15347 (grub_boot_fini) [GRUB_UTIL]: Likewise.
15348 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15349 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
15351 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15352 (grub_hfs_iterate_dir): Make the function static. Add prototypes
15353 for `node_found' and `it_dir'.
15354 (grub_hfs_dir): Add prototype for `dir_hook'.
15356 * fs/minix.c (grub_minix_get_file_block): Add prototype for
15357 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
15358 and `indir32' to silence a gcc warning.
15360 * include/grub/fs.h (grub_hfs_init): New prototype.
15361 (grub_hfs_fini): Likewise.
15364 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15366 Each disk device has its own id now. This is useful to make use
15367 of multiple disk devices.
15369 * include/grub/disk.h (grub_disk_dev_id): New enum.
15370 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15371 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15373 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15374 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15376 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15377 GRUB_DISK_DEVICE_OFDISK_ID as an id.
15379 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15380 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15382 * include/grub/disk.h (struct grub_disk_dev): Added a new member
15383 "id" which is used by the cache manager.
15385 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15388 2004-08-18 Marco Gerards <metgerards@student.han.nl>
15390 * fs/hfs.c: New file.
15391 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15392 (grub_emu_SOURCES): Likewise.
15393 (pkgdata_MODULES): Add hfs.mod.
15394 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15395 (grubof_SOURCES): Likewise.
15396 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15398 * include/grub/misc.h (grub_strncasecmp): Add prototype.
15399 * kern/misc.c (grub_strncasecmp): Add function.
15401 2004-08-14 Marco Gerards <metgerards@student.han.nl>
15403 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15406 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15407 (grub_ext2_dir): In case the directory entry type is unknown, read
15410 2004-08-02 Peter Bruin <pjbruin@dds.nl>
15412 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15413 grub_load_linux instead of grub_rescue_cmd_linux as second
15414 argument of grub_rescue_register_command.
15416 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15418 2004-07-27 Marco Gerards <metgerards@student.han.nl>
15420 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15422 * commands/boot.c: Remove the check for `GRUB_UTIL'.
15423 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15424 `loader/powerpc/ieee1275/linux.c',
15425 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15426 * include/grub/powerpc/ieee1275/ieee1275.h
15427 (grub_ieee1275_release): New prototype.
15428 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15429 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15430 normal, boot, linux and linux_normal.
15431 * loader/powerpc/ieee1275/linux.c: New file.
15432 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15434 2004-07-12 Marco Gerards <metgerards@student.han.nl>
15436 * normal/arg.c (grub_arg_parse): Correct error handling after
15437 reallocating the argumentlist (check if `argl' is not null instead
15438 of checking if `args' is not null).
15439 * kern/mm.c (grub_realloc): Return the same pointer when using the
15440 same region, instead of returning the header address.
15442 2004-07-11 Marco Gerards <metgerards@student.han.nl>
15444 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15445 one block instead of two when looking for the initial partition.
15446 (grub_partition_probe): Initialize the local variable `p' with 0.
15447 Use base 10 for the grub_strtoul call.
15448 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
15449 need for one local variable.
15450 (grub_strtoul): Don't add the new value to `num', instead of that
15453 2004-07-11 Marco Gerards <metgerards@student.han.nl>
15455 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15456 (pxeboot_img_SOURCES): New variable.
15457 (pxeboot_img_ASFLAGS): Likewise.
15458 (pxeboot_img_LDFLAGS): Likewise.
15459 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
15460 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
15461 <lode_leroy@hotmail.com>.
15463 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15465 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15466 there was no input.
15468 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15470 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
15471 the history buffer logic.
15473 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15475 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15476 (FILETYPE_INO_SYMLINK): New macros.
15477 (grub_ext2_find_file): Check if the node is a directory using the
15478 inode stat information instead of using the filetype in the
15479 dirent. Exclude the first character of an absolute symlink.
15480 (grub_ext2_dir): Mask out the filetype part of the mode member of
15483 2004-05-24 Marco Gerards <metgerards@student.han.nl>
15485 Add support for UFS version 1 and 2. Add support for the minix
15486 filesystem version 1 and 2, both the variants with 14 and 30 long
15489 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15491 (grub_emu_SOURCES): Likewise.
15492 (pkgdata_MODULES): Add ufs.mod and minix.mod.
15493 (ufs_mod_SOURCES): New variable.
15494 (ufs_mod_CFLAGS): Likewise.
15495 (minix_mod_SOURCES): Likewise.
15496 (minix_mod_CFLAGS): Likewise.
15497 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15499 (grubof_SOURCES): Likewise.
15500 * fs/ufs.c: New file.
15501 * fs/minix.c: New file.
15502 * include/grub/fs.h (grub_ufs_init): New prototype.
15503 (grub_ufs_fini): Likewise.
15504 (grub_minix_init): Likewise.
15505 (grub_minix_fini): Likewise.
15506 * util/grub-emu.c (main): Initialize and deinitialize UFS and
15509 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
15511 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15512 commands/ls.c, commands/terminal.c, commands/boot.c,
15513 commands/cmp.c and commands/cat.c.
15514 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15516 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15519 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15521 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15522 and grub_, respectively. Because the conversion is trivial and
15523 mechanical, I omit the details here. Please refer to the CVS
15524 if you need more information.
15526 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15528 * include/pupa: Renamed to ...
15529 * include/grub: ... this.
15530 * util/i386/pc/pupa-mkimage.c: Renamed to ...
15531 * util/i386/pc/grub-mkimage.c: ... this.
15532 * util/i386/pc/pupa-setup.c: Renamed to ...
15533 * util/i386/pc/grub-setup.c: ... this.
15534 * util/pupa-emu.c: Renamed to ...
15535 * util/grub-emu.c: ... this.
15537 2004-03-29 Marco Gerards <metgerards@student.han.nl>
15539 Add support for the newworld apple macintosh (PPC). This has been
15540 tested on the powerbook 2000 only. It only adds support for
15541 generic ieee1275 functions, console and disk support. This should
15542 be easy to port to other architectures with support for Open
15545 * configure.ac: Accept the powerpc as host_cpu. In the case of
15546 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
15547 specific tests are only executed while building for the i386.
15548 Inverse test for crosscompile.
15549 * genmk.rb (Utility): Allow assembler files.
15550 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15551 * conf/powerpc-ieee1275.rmk: New file.
15552 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15553 * disk/powerpc/ieee1275/partition.c: Likewise.
15554 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15555 * include/pupa/powerpc/ieee1275/console.h: Likewise.
15556 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15557 * include/pupa/powerpc/ieee1275/time.h: Likewise.
15558 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15559 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15560 * include/pupa/powerpc/ieee1275/loader.h
15561 * include/pupa/powerpc/setjmp.h: Likewise.
15562 * include/pupa/powerpc/types.h: Likewise.
15563 * kern/powerpc/ieee1275/init.c: Likewise.
15564 * kern/powerpc/ieee1275/openfw.c: Likewise.
15565 * term/powerpc/ieee1275/ofconsole.c: Likewise.
15567 These files were written by Johan Rydberg
15568 (jrydberg@night.trouble.net) and I only modified them slightly.
15570 * boot/powerpc/ieee1275/cmain.c: New file.
15571 * boot/powerpc/ieee1275/crt0.S: Likewise.
15572 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
15573 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
15575 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
15577 * Makefile.in: Update copyright.
15578 * genmodsrc.sh: Likewise.
15579 * gensymlist.sh: Likewise.
15580 * term/i386/pc/vga.c: Indent correctly.
15582 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
15583 bugreporting address.
15584 * util/i386/pc/pupa-setup.c (usage): Likewise,
15585 (main): Call pupa_ext2_init and pupa_ext2_fini.
15587 * fs/fat.c (log2): Renamed to ...
15588 (fat_log2): ... this.
15589 All callers changed.
15590 * kern/misc.c (memcpy): Alias to pupa_memmove.
15591 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
15593 * util/console.c (pupa_ncurses_fini): Return 0.
15595 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
15596 Move fail label here.
15597 [__GNU__]: Don't warn when using stat.
15598 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
15599 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
15600 long int. Use strtol instead of strtoul.
15602 2004-03-14 Marco Gerards <metgerards@student.han.nl>
15604 * commands/boot.c: New file.
15605 * commands/cat.c: Likewise.
15606 * commands/cmp.c: Likewise.
15607 * commands/ls.c: Likewise.
15608 * commands/terminal.c: Likewise.
15609 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15610 (pupa_register_command): Changed interface to match the new
15612 (pupa_command_execute): Changed (almost rewritten) so it uses
15613 pupa_split_command. Added support for setting variables using the
15615 (rescue_command): Changed to work with the new argument parser.
15616 (terminal_command): Moved from here to commands/terminal.c.
15617 (set_command): New function.
15618 (unset_command): New function.
15619 (insmod_command): New function.
15620 (rmmod_command): New function.
15621 (lsmod_command): New function.
15622 (pupa_command_init): Don't initialize the command terminal
15623 anymore. Initialize the commands set, unset, insmod, rmmod and
15625 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
15626 (kernel_img_HEADERS): Add arg.h and env.h.
15627 (pupa_mkimage_LDFLAGS): Add kern/env.c.
15628 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
15629 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
15631 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
15633 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
15634 (boot_mod_SOURCES): New variable.
15635 (terminal_mod_SOURCES): Likewise.
15636 (ls_mod_SOURCES): Likewise.
15637 (cmp_mod_SOURCES): Likewise.
15638 (cat_mod_SOURCES): Likewise.
15640 * normal/arg.c: New file.
15641 * kern/env.c: Likewise.
15642 * include/pupa/arg.h: Likewise.
15643 * include/pupa/env.h: Likewise.
15644 * font/manager.c (font_command): Changed to match argument parsing
15646 (PUPA_MOD_INIT): Likewise.
15647 * hello/hello.c (pupa_cmd_hello): Likewise.
15648 (PUPA_MOD_INIT): Likewise.
15649 * include/pupa/disk.h: Include <pupa/device.h>.
15650 (pupa_print_partinfo): New prototype.
15651 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
15652 (pupa_dl_get_prefix): Likewise.
15653 * include/pupa/misc.h: Include <pupa/err.h>.
15654 (pupa_isgraph): New prototype.
15655 (pupa_isdigit): Likewise.
15656 (pupa_split_cmdline): Likewise.
15657 * include/pupa/normal.h: Include <pupa/arg.h>.
15658 (pupa_command): Changed the prototype of the member `func' to
15659 match the argument parsing interface. Added member `options'.
15660 (pupa_register_command): Updated to match function.
15661 (pupa_arg_parse): New prototype.
15662 (pupa_hello_init) [PUPA_UTIL]: New prototype.
15663 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
15664 (pupa_ls_init) [PUPA_UTIL]: Likewise.
15665 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
15666 (pupa_cat_init) [PUPA_UTIL]: Likewise.
15667 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
15668 (pupa_boot_init) [PUPA_UTIL]: Likewise.
15669 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
15670 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
15671 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
15672 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
15673 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
15674 * kern/disk.c: Include <pupa/file.h>.
15675 (pupa_print_partinfo): New function.
15676 * kern/dl.c: Include <pupa/env.h>.
15677 (pupa_dl_dir): Variable removed.
15678 (pupa_dl_load): Use the environment variable `prefix' instead of
15679 the variable pupa_dl_dir.
15680 (pupa_dl_set_prefix): Function removed.
15681 (pupa_dl_get_prefix): Likewise.
15682 * kern/i386/pc/init.c: Include <pupa/env.h>.
15683 (pupa_machine_init): Use the environment variable `prefix' instead of
15684 using pupa_dl_set_prefix to set the prefix.
15685 * kern/main.c: Include <pupa/env.h>.
15686 (pupa_set_root_dev): Use the environment variable `prefix' instead of
15687 using pupa_dl_get_prefix to get the prefix.
15688 * kern/misc.c: Include <pupa/env.h>.
15689 (pupa_isdigit): New function.
15690 (pupa_isgraph): Likewise.
15691 (pupa_ftoa): Likewise.
15692 (pupa_vsprintf): Added support for printing values of the type
15693 `double'. Make it possible to format variable output when using
15694 formatting like `%1.2%f'.
15695 (pupa_split_cmdline): New function.
15696 * kern/rescue.c: Include <pupa/env.h>.
15697 (next_word): Removed function.
15698 (pupa_rescue_cmd_prefix): Likewise.
15699 (pupa_rescue_cmd_set): New function.
15700 (pupa_rescue_cmd_unset): New function.
15701 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
15702 split the command line instead of splitting it here. Added
15703 support for setting variables using the syntax `foo=bar'. Don't
15704 initialize the prefix command anymore. Initialized the set and
15706 * normal/cmdline.c: Include <pupa/env.h>.
15707 (pupa_tab_complete): Added prototypes for print_simple_completion,
15708 print_partition_completion, add_completion, iterate_commands,
15709 iterate_dev, iterate_part and iterate_dir. Moved code to print
15710 partition information from here to kern/disk.c.
15711 (pupa_cmdline_run): Don't check if the function exists anymore.
15712 * normal/main.c: Include <pupa/env.h>.
15713 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
15714 instead of using pupa_dl_get_prefix to get the prefix.
15715 * term/i386/pc/vga.c: Include <pupa/arg.h>.
15716 (check_vga_mem): Cast pointers to `void *' to silence a gcc
15718 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
15719 (pupa_vga_setcolor): Declare unused variables with `__attribute__
15720 ((unused))' to silence a gcc warning.
15721 (pupa_vga_setcolor): Likewise.
15722 (debug_command): Changed to match argument parsing
15724 * util/pupa-emu.c: Include <pupa/env.h>.
15725 (options): Added 0's for unused fields to silence a gcc warning.
15727 (main): Use the environment variable `prefix' instead of using
15728 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
15729 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
15732 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
15733 * util/misc.c: Include <malloc.h>.
15734 (pupa_malloc): Rewritten so errors are correctly reported.
15735 (pupa_realloc): Likewise.
15736 (pupa_memalign): Likewise.
15737 (pupa_mm_init_region): Declare unused variables with
15738 `__attribute__ ((unused))' to silence a gcc warning.
15739 * normal/i386/setjmp.S: Remove tab at the end of the file to
15740 silence a gcc warning.
15741 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
15742 variables with `__attribute__ ((unused))' to silence a gcc
15744 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
15745 local variable i unsigned to silence a gcc warning.
15747 * kern/term.c: Include <pupa/misc.h>.
15748 (pupa_more_lines): New variable.
15749 (pupa_more): Likewise.
15750 (pupa_putcode): When the pager is active pause at the end of every
15752 (pupa_set_more): New function.
15753 * include/pupa/term.h (pupa_set_more): New prototype.
15756 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
15758 Now this project is GRUB 2 rather than PUPA. The location of
15759 the CVS repository was moved to GRUB's.
15761 * configure.ac: Use bug-grub as the reporting address.
15762 Use GRUB instead of PUPA.
15763 Change the version number to 1.90.
15765 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
15767 * genkernsyms.sh: Updated copyright information.
15768 * genmk.rb: Likewise.
15769 * genmodsrc.sh: Likewise.
15770 * gensymlist.sh: Likewise.
15771 * boot/i386/pc/boot.S: Likewise.
15772 * boot/i386/pc/diskboot.S: Likewise.
15773 * disk/i386/pc/biosdisk.c: Likewise.
15774 * disk/i386/pc/partition.c: Likewise.
15775 * font/manager.c: Likewise.
15776 * fs/ext2.c: Likewise.
15777 * fs/fat.c: Likewise.
15778 * include/pupa/boot.h: Likewise.
15779 * include/pupa/device.h: Likewise.
15780 * include/pupa/disk.h: Likewise.
15781 * include/pupa/dl.h: Likewise.
15782 * include/pupa/elf.h: Likewise.
15783 * include/pupa/err.h: Likewise.
15784 * include/pupa/file.h: Likewise.
15785 * include/pupa/font.h: Likewise.
15786 * include/pupa/fs.h: Likewise.
15787 * include/pupa/kernel.h: Likewise.
15788 * include/pupa/loader.h: Likewise.
15789 * include/pupa/misc.h: Likewise.
15790 * include/pupa/mm.h: Likewise.
15791 * include/pupa/net.h: Likewise.
15792 * include/pupa/normal.h: Likewise.
15793 * include/pupa/rescue.h: Likewise.
15794 * include/pupa/setjmp.h: Likewise.
15795 * include/pupa/symbol.h: Likewise.
15796 * include/pupa/term.h: Likewise.
15797 * include/pupa/types.h: Likewise.
15798 * include/pupa/i386/setjmp.h: Likewise.
15799 * include/pupa/i386/types.h: Likewise.
15800 * include/pupa/i386/pc/biosdisk.h: Likewise.
15801 * include/pupa/i386/pc/boot.h: Likewise.
15802 * include/pupa/i386/pc/console.h: Likewise.
15803 * include/pupa/i386/pc/init.h: Likewise.
15804 * include/pupa/i386/pc/kernel.h: Likewise.
15805 * include/pupa/i386/pc/linux.h: Likewise.
15806 * include/pupa/i386/pc/loader.h: Likewise.
15807 * include/pupa/i386/pc/memory.h: Likewise.
15808 * include/pupa/i386/pc/multiboot.h: Likewise.
15809 * include/pupa/i386/pc/partition.h: Likewise.
15810 * include/pupa/i386/pc/time.h: Likewise.
15811 * include/pupa/i386/pc/vga.h: Likewise.
15812 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
15813 * include/pupa/util/getroot.h: Likewise.
15814 * include/pupa/util/misc.h: Likewise.
15815 * include/pupa/util/resolve.h: Likewise.
15816 * kern/device.c: Likewise.
15817 * kern/disk.c: Likewise.
15818 * kern/dl.c: Likewise.
15819 * kern/err.c: Likewise.
15820 * kern/file.c: Likewise.
15821 * kern/fs.c: Likewise.
15822 * kern/loader.c: Likewise.
15823 * kern/main.c: Likewise.
15824 * kern/misc.c: Likewise.
15825 * kern/mm.c: Likewise.
15826 * kern/rescue.c: Likewise.
15827 * kern/term.c: Likewise.
15828 * kern/i386/dl.c: Likewise.
15829 * kern/i386/pc/init.c: Likewise.
15830 * kern/i386/pc/lzo1x.S: Likewise.
15831 * kern/i386/pc/startup.S: Likewise.
15832 * loader/i386/pc/chainloader.c: Likewise.
15833 * loader/i386/pc/linux.c: Likewise.
15834 * loader/i386/pc/multiboot.c: Likewise.
15835 * normal/cmdline.c: Likewise.
15836 * normal/command.c: Likewise.
15837 * normal/main.c: Likewise.
15838 * normal/menu.c: Likewise.
15839 * normal/i386/setjmp.S: Likewise.
15840 * term/i386/pc/console.c: Likewise.
15841 * term/i386/pc/vga.c: Likewise.
15842 * util/console.c: Likewise.
15843 * util/genmoddep.c: Likewise.
15844 * util/misc.c: Likewise.
15845 * util/pupa-emu.c: Likewise.
15846 * util/resolve.c: Likewise.
15847 * util/unifont2pff.rb: Likewise.
15848 * util/i386/pc/biosdisk.c: Likewise.
15849 * util/i386/pc/getroot.c: Likewise.
15850 * util/i386/pc/pupa-mkimage.c: Likewise.
15851 * util/i386/pc/pupa-setup.c: Likewise.
15853 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
15855 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
15856 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
15857 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
15858 reading and reset it after reading.
15859 (pupa_ext2_close): Return PUPA_ERR_NONE.
15861 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
15863 (struct linux_kernel_header): Add kernel_version and
15865 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
15866 pupa_file_read succeeds.
15867 (pupa_rescue_cmd_initrd): Implement.
15869 2003-12-03 Marco Gerards <metgerards@student.han.nl>
15871 * fs/ext2.c (pupa_ext2_label): New function.
15872 (pupa_ext2_fs): Added label.
15873 * fs/fat.c (pupa_fat_label): New function.
15874 (pupa_fat_fs): Added label.
15875 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
15877 * kern/misc.c (pupa_strndup): New function.
15878 * include/pupa/misc.h (pupa_strndup): New prototype.
15880 * include/pupa/normal.h: Include <pupa/err.h>.
15881 (pupa_set_history): New prototype.
15882 (pupa_iterate_commands): New prototype.
15883 * normal/cmdline.c: Include <pupa/machine/partition.h>,
15884 <pupa/disk.h>, <pupa/file.h>.
15885 (hist_size): New variable.
15886 (hist_lines): Likewise.
15887 (hist_end): Likewise.
15888 (hist_used): Likewise.
15889 (pupa_set_history): New function.
15890 (pupa_history_get): Likewise.
15891 (pupa_history_add): Likewise.
15892 (pupa_history_replace): Likewise.
15893 (pupa_tab_complete): Likewise.
15894 (pupa_cmdline_run): Added tab completion and history buffer. Tab
15895 completion shows partitionnames while completing partitions, this
15896 feature was suggested by Jeff Bailey.
15897 * normal/command.c (pupa_iterate_commands): New function.
15898 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
15899 (pupa_normal_init): Initialize history buffer.
15900 (PUPA_MOD_INIT): Likewise.
15901 (pupa_normal_fini): Free the history buffer.
15902 (PUPA_MOD_FINI): Likewise.
15904 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
15907 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
15908 * configure.ac [i386]: Check for regparam bug.
15909 (NESTED_FUNC_ATTR) [! i386]: Defined.
15911 2003-11-17 Marco Gerards <metgerards@student.han.nl>
15913 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
15914 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
15915 (pupa_emu_SOURCES): New variable.
15916 (pupa_emu_LDFLAGS): Likewise.
15917 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
15918 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
15919 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
15920 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15921 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
15922 (pupa_jmp_buf): New typedef.
15923 (pupa_setjmp) [PUPA_UTIL]: New macro.
15924 (pupa_longjmp) [PUPA_UTIL]: Likewise.
15925 * include/pupa/term.h (struct pupa_term): New member `refresh'.
15926 (pupa_refresh): New prototype.
15927 * include/pupa/util/getroot.h: New file.
15928 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
15930 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
15931 (pupa_rescue_cmd_cat): Likewise.
15932 (pupa_rescue_cmd_ls): Likewise.
15933 (pupa_rescue_cmd_testload): Likewise.
15934 (pupa_rescue_cmd_lsmod): Likewise.
15935 * normal/cmdline.c (pupa_cmdline_get): Likewise.
15936 * normal/menu.c (run_menu): Likewise.
15937 * kern/term.c (pupa_cls): Likewise.
15938 (pupa_refresh): New function.
15939 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
15940 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15941 * util/console.c: New file.
15943 * util/i386/pc/getroot.c: New file.
15944 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
15945 (pupa_putchar): New function.
15946 (pupa_refresh): Likewise.
15947 (xgetcwd): Function moved to ...
15948 (strip_extra_slashes): Likewise.
15949 (get_prefix): Likewise.
15950 * util/i386/pc/getroot.c: ... here.
15951 (find_root_device): Function moved and renamed to...
15952 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
15953 Changed all callers.
15954 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
15956 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
15957 Changed all callers.
15958 * util/misc.c (pupa_memalign): New function.
15959 (pupa_mm_init_region): Likewise.
15960 (pupa_register_exported_symbols): Likewise.
15961 (pupa_putchar): Function removed.
15962 * util/pupa-emu.c: New file.
15964 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
15966 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
15967 (_multiboot_mod_SOURCES): New variable.
15968 (_multiboot_mod_CFLAGS): Likewise.
15969 * loader/i386/pc/multiboot.c: New file.
15970 * include/pupa/i386/pc/multiboot.h: Likewise.
15971 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
15972 (pupa_multiboot_real_boot): New function.
15973 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
15974 (pupa_multiboot_real_boot): New prototype.
15975 (pupa_rescue_cmd_multiboot): Likewise
15976 (pupa_rescue_cmd_module): Likewise.
15978 * kern/loader.c (pupa_loader_set): Continue when
15979 pupa_loader_unload_func() fails.
15980 (pupa_loader_unset): New function.
15981 * include/pupa/loader.h (pupa_loader_unset): New prototype.
15983 * kern/misc.c (pupa_stpcpy): New function.
15984 * include/pupa/misc.h (pupa_stpcpy): New prototype.
15986 2003-11-12 Marco Gerards <metgerards@student.han.nl>
15988 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
15989 for available extensions.
15991 * include/pupa/i386/pc/time.h: New file.
15992 * kern/disk.c: Include <pupa/machine/time.h>.
15993 (PUPA_CACHE_TIMEOUT): New macro.
15994 (pupa_last_time): New variable.
15995 (pupa_disk_open): Flush the cache when there was a timeout.
15996 (pupa_disk_close): Reset the timer.
15997 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
15999 * util/misc.c: Include <sys/times.h>
16000 (pupa_get_rtc): New function.
16002 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
16004 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16006 (pupa_ext2_get_file_block): Use blocks member.
16008 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16009 first block. Return -1 instead of pupa_errno on error.
16011 2003-10-27 Marco Gerards <metgerards@student.han.nl>
16013 * README: In the pupa-mkimage example use _chain instead of chain
16014 and ext2 instead of fat.
16015 * TODO: Replace ext2fs with jfs as an example. Add an item for
16016 adding journal playback for ext2fs.
16017 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16018 (pkgdata_MODULES): Added ext2.mod.
16019 (ext2_mod_SOURCES): New variable.
16020 (ext2_mod_CFLAGS): Likewise.
16021 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16022 * include/pupa/misc.h (pupa_strncpy): New prototype.
16023 (pupa_strcat): Likewise.
16024 (pupa_strncmp): Likewise.
16025 * kern/misc.c (pupa_strcat): Enable function.
16026 (pupa_strncpy): New function.
16027 (pupa_strncmp): Likewise.
16028 * fs/ext2.c: New file.
16030 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16031 when the read failed before retrying.
16032 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16033 (_FILE_OFFSET_BITS): Likewise.
16034 * configure.ac: Added AC_SYS_LARGEFILE.
16036 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16038 * genmk.rb (PModule#rule): Make sure to get only symbol names
16039 from the output of nm.
16040 Reported by Robert Millan <zeratul2@wanadoo.es>.
16042 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
16044 I forgot to check in these changes for a long time. This adds
16045 incomplete support for VGA console, and this is still very
16046 buggy. Also, a lot of consideration is required for I18N,
16047 UNICODE, and VGA font issues. Therefore, assume that this is
16048 such that "better than nothing".
16050 * font/manager.c: New file.
16051 * include/pupa/font.h: Likewise.
16052 * include/pupa/i386/pc/vga.h: Likewise.
16053 * term/i386/pc/vga.c: Likewise.
16054 * util/unifont2pff.rb: Likewise.
16056 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16057 (pkgdata_MODULES): Added vga.mod and font.mod.
16058 (vga_mod_SOURCES): New variables.
16059 (vga_mod_CFLAGS): Likewise.
16060 (font_mod_SOURCES): Likewise.
16061 (font_mod_CFLAGS): Likewise.
16063 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16065 * include/pupa/term.h: Include pupa/err.h.
16066 (struct pupa_term): Added init and fini.
16067 Changed the argument of putchar to pupa_uint32_t.
16069 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16070 (pupa_console_real_putchar): New prototype.
16071 (pupa_console_putchar): Removed.
16072 (pupa_console_checkkey): Exported.
16073 (pupa_console_getkey): Likewise.
16075 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
16078 * kern/term.c (pupa_term_set_current): Rewritten.
16079 (pupa_putchar): Likewise.
16080 (pupa_putcode): New function.
16082 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
16083 (pupa_console_real_putchar): ... this.
16084 (pupa_vga_set_mode): New function.
16085 (pupa_vga_get_font): Likewise.
16087 * normal/command.c: Include pupa/term.h.
16088 (terminal_command): New function.
16089 (pupa_command_init): Register the command "terminal".
16091 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
16092 (DISP_UP): Likewise.
16093 (DISP_RIGHT): Likewise.
16094 (DISP_DOWN): Likewise.
16095 (DISP_HLINE): Likewise.
16096 (DISP_VLINE): Likewise.
16097 (DISP_UL): Likewise.
16098 (DISP_UR): Likewise.
16099 (DISP_LL): Likewise.
16100 (DISP_LR): Likewise.
16102 * term/i386/pc/console.c (pupa_console_putchar): New function.
16104 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
16106 * util/resolve.c (pupa_util_resolve_dependencies): BUG
16107 FIX. Reverse the path_list.
16109 * include/pupa/normal.h: Export pupa_register_command and
16110 pupa_unregister_command.
16112 * hello/hello.c (pupa_cmd_hello): New module.
16113 * conf/i386-pc.rmk: Added hello.mod.
16115 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
16117 * kern/i386/pc/lzo1x.S: New file.
16119 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
16120 (compress_kernel): New variable.
16121 (generate_image): Heavily modified to support compressing a
16122 large part of the core image.
16124 * util/misc.c (pupa_util_read_image): Fix a file descriptor
16126 (pupa_util_load_image): New function.
16128 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
16129 (pupa_compressed_size): New variable.
16130 (codestart): Enable Gate A20 here.
16131 Decompress the compressed part of the core image.
16132 Rearrange the code to put functions and variables which are
16133 required for initialization in the non-compressed part.
16136 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
16139 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
16141 * include/pupa/i386/pc/kernel.h
16142 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
16143 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
16144 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16145 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16146 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
16148 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
16150 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
16151 (Utility#rule): Likewise.
16153 * configure.ac: Check if LZO is available.
16155 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
16157 * include/pupa/normal.h: New file.
16158 * include/pupa/setjmp.h: Likewise.
16159 * include/pupa/i386/setjmp.h: Likewise.
16160 * normal/cmdline.c: Likewise.
16161 * normal/command.c: Likewise.
16162 * normal/main.c: Likewise.
16163 * normal/menu.c: Likewise.
16164 * normal/i386/setjmp.S: Likewise.
16166 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
16167 (pupa_rescue_cmd_initrd): Likewise.
16169 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
16172 * kern/i386/pc/startup.S (translation_table): New variable.
16173 (translate_keycode): New function.
16174 (pupa_console_getkey): Call translate_keycode.
16176 * kern/rescue.c (attempt_normal_mode): New function.
16177 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
16178 it failed, print a message.
16180 * kern/mm.c (pupa_real_malloc): Print more information when a
16181 free magic is broken.
16182 (pupa_free): If the first free header is not free actually, set
16185 * kern/main.c (pupa_load_normal_mode): Just load the module
16187 (pupa_main): Don't print the message
16188 "Entering into rescue mode..." here.
16190 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
16192 (pupa_rescue_cmd_initrd): Likewise.
16193 (pupa_rescue_cmd_initrd): Likewise.
16195 * include/pupa/symbol.h (FUNCTION): Specify the type.
16196 (VARIABLE): Likewise.
16198 * include/pupa/err.h (pupa_err_t): Added
16199 PUPA_ERR_UNKNOWN_COMMAND.
16201 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
16202 (pupa_dl_get_prefix): Likewise.
16204 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
16205 Added _chain.mod and _linux.mod instead of chain.mod and
16207 (chain_mod_SOURCES): Renamed to ...
16208 (_chain_mod_SOURCES): ... this.
16209 (chain_mod_CFLAGS): Renamed to ...
16210 (_chain_mod_CFLAGS): ... this.
16211 (linux_mod_SOURCES): Renamed to ...
16212 (_linux_mod_SOURCES): ... this.
16213 (linux_mod_CFLAGS): Renamed to ...
16214 (_linux_mod_CFLAGS): ... this.
16215 (normal_mod_SOURCES): New variable.
16216 (normal_mod_CFLAGS): Likewise.
16217 (normal_mod_ASFLAGS): Likewise.
16219 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
16221 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16224 * kern/dl.c (pupa_dl_ref): Refer depending modules
16226 (pupa_dl_unref): Unrefer depending modules recursively.
16227 Don't call pupa_dl_unload implicitly, because PUPA can crash if
16228 a module is unloaded before one depending on that module is
16230 (pupa_dl_unload): Unload depending modules explicitly,
16233 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
16235 * include/pupa/i386/pc/linux.h: New file.
16236 * loader/i386/pc/linux.c: Likewise.
16238 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16240 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16241 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16242 of PUPA_CHAINLOADER_BOOT_SECTOR.
16244 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16245 (pupa_linux_prot_size): New variable.
16246 (pupa_linux_tmp_addr): Likewise.
16247 (pupa_linux_real_addr): Likewise.
16248 (pupa_linux_boot_zimage): New function.
16249 (pupa_linux_boot_bzimage): Likewise.
16251 * kern/i386/pc/init.c (struct mem_region): New structure.
16252 (MAX_REGIONS): New macro.
16253 (mem_regions): New variable.
16254 (num_regions): Likewise.
16255 (pupa_os_area_addr): Likewise.
16256 (pupa_os_area_size): Likewise.
16257 (pupa_lower_mem): Likewise.
16258 (pupa_upper_mem): Likewise.
16259 (add_mem_region): New function.
16260 (compact_mem_regions): Likewise.
16261 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16262 the size of the conventional memory and that of so-called upper
16263 memory (before the first memory hole).
16264 Instead of adding each found region to free memory, use
16265 add_mem_region and add them after removing overlaps.
16266 Also, add only 1/4 of the upper memory to free memory. The rest
16267 is used for loading OS images. Maybe this is ad hoc, but this
16268 makes it much easier to relocate OS images when booting.
16270 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16271 (pupa_enter_rescue_mode): Don't register initrd and module.
16273 * kern/mm.c: Include pupa/dl.h.
16275 * kern/main.c: Include pupa/file.h and pupa/device.h.
16277 * kern/loader.c (pupa_loader_load_module_func): Removed.
16278 (pupa_loader_load_module): Likewise.
16280 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16283 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16284 (pupa_linux_tmp_addr): Likewise.
16285 (pupa_linux_real_addr): Likewise.
16286 (pupa_linux_boot_zimage): Likewise.
16287 (pupa_linux_boot_bzimage): Likewise.
16289 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16290 (pupa_upper_mem): Likewise.
16291 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16292 module is too dangerous.
16294 * include/pupa/loader.h (pupa_os_area_addr): Declared.
16295 (pupa_os_area_size): Likewise.
16296 (pupa_loader_set): Remove the first argument. Loader doesn't
16297 manage modules or initrd any longer.
16298 (pupa_loader_load_module): Removed.
16300 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16301 (linux_mod_SOURCES): New variable.
16302 (linux_mod_CFLAGS): Likewise.
16304 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
16306 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16307 the length of a blocklist correctly.
16309 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16310 Use ioctl only if the OS file is a block device.
16311 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16312 not very useful for normal files.
16314 * kern/main.c (pupa_set_root_dev): New function.
16315 (pupa_load_normal_mode): Likewise.
16316 (pupa_main): Call those above.
16318 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16321 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16323 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
16325 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16326 (setup): Configure the installed partition information and the
16329 * loader/i386/pc/chainloader.c (my_mod): New variable.
16330 (pupa_chainloader_unload): New function.
16331 (pupa_rescue_cmd_chainloader): Refer itself.
16332 (PUPA_MOD_INIT): Save its own module in MY_MOD.
16334 * kern/i386/pc/startup.S (install_partition): Removed.
16335 (version_string): Likewise.
16336 (config_file): Likewise.
16337 (pupa_install_dos_part): New variable.
16338 (pupa_install_bsd_part): Likewise.
16339 (pupa_prefix): Likewise.
16340 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16342 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16344 (make_install_device): New function.
16345 (pupa_machine_init): Set the dl prefix.
16347 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16348 (buf): Renamed to ...
16349 (linebuf): ... this.
16350 (pupa_rescue_cmd_prefix): New function.
16351 (pupa_rescue_cmd_insmod): Likewise.
16352 (pupa_rescue_cmd_rmmod): Likewise.
16353 (pupa_rescue_cmd_lsmod): Likewise.
16354 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16357 * kern/mm.c (pupa_memalign): If failed even after invalidating
16358 disk caches, unload unneeded modules and retry.
16360 * kern/misc.c (pupa_memmove): New function.
16361 (pupa_memcpy): Removed.
16362 (pupa_strcpy): New function.
16363 (pupa_itoa): Made static.
16365 * kern/dl.c (pupa_dl_iterate): New function.
16366 (pupa_dl_ref): Likewise.
16367 (pupa_dl_unref): Likewise.
16368 (pupa_dl_unload): Return if succeeded or not.
16369 (pupa_dl_unload_unneeded): New function.
16370 (pupa_dl_unload_all): Likewise.
16371 (pupa_dl_init): Renamed to ...
16372 (pupa_dl_set_prefix): ... this.
16373 (pupa_dl_get_prefix): New function.
16375 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16376 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16377 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16378 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16379 (pupa_install_dos_part): Declared.
16380 (pupa_install_bsd_part): Likewise.
16381 (pupa_prefix): Likewise.
16382 (pupa_boot_drive): Likewise.
16384 * include/pupa/types.h: Fix a typo.
16386 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16388 (pupa_memmove): Declared.
16389 (pupa_strcpy): Likewise.
16391 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16392 pupa_mod_init takes one argument, its own module.
16393 (pupa_dl_unload_unneeded): Declared.
16394 (pupa_dl_unload_all): Likewise.
16395 (pupa_dl_ref): Likewise.
16396 (pupa_dl_unref): Likewise.
16397 (pupa_dl_iterate): Likewise.
16398 (pupa_dl_init): Renamed to ...
16399 (pupa_dl_set_prefix): ... this.
16400 (pupa_dl_get_prefix): Declared.
16402 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
16403 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
16405 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16406 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16408 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16409 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16411 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16413 * util/i386/pc/pupa-setup.c (setup): Define the internal
16414 function find_first_partition_start at the top level, because GCC
16415 3.0.x cannot compile internal functions in deeper scopes
16417 (find_root_device): Use lstat instead of stat.
16418 Don't follow symbolic links.
16419 Fix the path-constructing code.
16421 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16422 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16423 by a BLKGETSIZE ioctl first, because block devices don't fill
16424 the member st_mode of the structure stat on Linux.
16425 [__linux__] (linux_find_partition): Use a temporary buffer
16426 REAL_DEV for the working space. Copy it to DEV before returning.
16427 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16428 buffer cache consistent.
16429 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16430 strncmp. The previous value was merely wrong.
16431 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16433 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16434 FAT size is 12. The previous value was merely wrong.
16436 * kern/main.c (pupa_main): Don't split the starting message from
16439 * kern/term.c (pupa_putchar): Put CR after LF instead of before
16440 LF, because BIOS goes crazy about character attributes in this
16443 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16445 * include/i386/pc/util/biosdisk.h: New file.
16446 * util/i386/pc/biosdisk.c: Likewise.
16447 * util/i386/pc/pupa-setup.c: Likewise.
16449 * Makefile.in (INCLUDE_DISTFILES): Added
16450 include/pupa/i386/pc/util/biosdisk.h.
16451 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16452 directory util/i386/pc.
16453 (install-local): Added a rule for sbin_UTILITIES.
16454 (uninstall): Likewise.
16456 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16458 * util/misc.c (xrealloc): New function.
16459 (pupa_malloc): Likewise.
16460 (pupa_free): Likewise.
16461 (pupa_realloc): Likewise.
16462 (pupa_stop): Likewise.
16463 (pupa_putchar): Likewise.
16465 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16467 * include/pupa/util/misc.h (xrealloc): Declared.
16469 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16471 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16472 (PUPA_BOOT_MACHINE_BPB_END): ... this.
16474 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16475 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16477 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16478 way should be implemented.
16479 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16481 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16482 the size of NAME for safety.
16483 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16486 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16487 (pupa_setup_SOURCES): Likewise.
16489 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16491 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16493 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16494 bunch of pushl's from pusha, because this destroys the return
16497 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16499 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16500 This means that any missing prototypes could be fatal. Also, you
16501 must take care when writing assembly code. See the comments at
16502 the beginning of startup.S, for more details.
16504 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16505 compilation mechanism.
16506 (pupa_chainloader_real_boot): Likewise.
16507 (pupa_biosdisk_rw_int13_extensions): Likewise.
16508 (pupa_biosdisk_rw_standard): Likewise.
16509 (pupa_biosdisk_check_int13_extensions): Likewise.
16510 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16511 (pupa_biosdisk_get_diskinfo_standard): Likewise.
16512 (pupa_get_memsize): Likewise.
16513 (pupa_get_mmap_entry): Likewise.
16514 (pupa_console_putchar): Likewise.
16515 (pupa_console_setcursor): Likewise.
16516 (pupa_getrtsecs): Use pushl instead of push.
16518 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16519 memory instead of the stack for a mmap entry, because some
16520 BIOSes may ignore the maximum size and overflow.
16522 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16524 * genmk.rb (PModule#rule): Compile automatically generated
16525 sources with module-specific CFLAGS as well as other sources.
16527 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16529 * configure.ac: Check ld.
16530 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16531 respectively, before checking endianness and sizes.
16533 * Makefile.in (LD): New variable.
16535 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16537 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16539 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16541 * Changelog: New file.