]> git.proxmox.com Git - grub2.git/blame - ChangeLog
missing files from previous commit
[grub2.git] / ChangeLog
CommitLineData
cef17233 12009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
2
3 FreeBSD 64-bit support
4
5 * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
6 and loader/i386/bsd_trampoline.S
7 (bsd_mod_ASFLAGS): new variable
8 * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
9 (FREEBSD_MODTYPE_KERNEL64): likewise
10 (grub_bsd64_trampoline_start): likewise
11 (grub_bsd64_trampoline_end): likewise
12 (grub_bsd64_trampoline_selfjump): likewise
13 (grub_bsd64_trampoline_gdt): likewise
14 * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
15 * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
16 * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
17 * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
18 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
19 of "attrib" member
20 * loader/i386/bsd_pagetable.c: new file
21 * loader/i386/bsd_trampoline.S: likewise
22 * loader/i386/bsd.c (ALIGN_QWORD): new macro
23 (ALIGN_VAR): likewise
24 (entry_hi): new variable
25 (kern_end_mdofs): likewise
26 (is_64bit): likewise
27 (grub_freebsd_add_meta): use ALIGN_VAR
28 (grub_e820_mmap): new declaration
29 (grub_freebsd_add_mmap): new function
30 (grub_freebsd_add_meta_module): support 64 bit kernels
31 (grub_freebsd_list_modules): use ALIGN_VAR
32 (gdt_descriptor): new declaration
33 (grub_freebsd_boot): support 64 bit kernels
34 (grub_bsd_elf64_hook): new function
35 (grub_bsd_load_elf): support elf64
36
038c5720 372009-05-03 Bean <bean123ch@gmail.com>
38
39 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
40 after we get the result of if statement.
41
fc45fb58 422009-05-03 Bean <bean123ch@gmail.com>
43
44 * Makefile.in (enable_efiemu): New variable.
45
46 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
47 set.
48 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
49 path.
50 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
51 path, add -mno-red-zone option.
52 (efiemu64_s.o): Likewise.
53 (efiemu64.o): Use macro $^ for source file.
54
55 * configure.ac (--enable-efiemu): New option.
56
bbee0f2b 572009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
58
59 xnu support
60
61 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
62 (pkglib_MODULES): add xnu.mod
63 (xnu_mod_SOURCES): new variable
64 (xnu_mod_CFLAGS): likewise
65 (xnu_mod_LDFLAGS): likewise
66 (xnu_mod_ASFLAGS): likewise
67 * conf/i386-pc.rmk: likewise
68 * conf/x86_64-efi.rmk: likewise
7dd4a573 69 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 70 new declaration
71 * include/grub/i386/macho.h: new file
72 * include/grub/i386/xnu.h: likewise
73 * include/grub/macho.h: likewise
74 * include/grub/machoload.h: likewise
75 * include/grub/x86_64/macho.h: likewise
76 * include/grub/x86_64/xnu.h: likewise
77 * include/grub/xnu.h: likewise
78 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
79 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
80 * loader/i386/efi/xnu.c: new file
81 * loader/i386/pc/xnu.c: likewise
82 * loader/i386/xnu.c: likewise
83 * loader/i386/xnu_helper.S: likewise
84 * loader/macho.c: likewise
85 * loader/xnu.c: likewise
86 * loader/xnu_resume.c: likewise
87 * util/grub-dumpdevtree: likewise
88 * include/grub/i386/pit.h: include grub/err.h
89 (grub_pit_wait): export
90 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 91
5caf964d 922009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
93
94 Efiemu
7dd4a573 95
5caf964d 96 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 97 _linux_efi, linux_efi.
98 new files in grub-emu
5caf964d 99 new targets efiemu32.o and efiemu64.o
100 * loader/linux_normal_efiemu.c: likewise
101 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 102 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 103 files to copy
104 * include/grub/autoefi.h: new file
7dd4a573 105 * include/grub/i386/efiemu.h: likewise
5caf964d 106 * include/grub/i386/pc/efiemu.h: likewise
107 * include/grub/efi/api.h: add LL suffix when necessary
108 new definitions relating to tables
109 * include/grub/efiemu/efiemu.h: new file
110 * include/grub/efiemu/runtime.h: likewise
111 * efiemu/prepare.c: likewise
112 * efiemu/loadcore_common.c: likewise
113 * efiemu/loadcore64.c: likewise
114 * efiemu/runtime/efiemu.sh: likewise
115 * efiemu/runtime/efiemu.S: likewise
116 * efiemu/runtime/efiemu.c: likewise
117 * efiemu/runtime/config.h: likewise
118 * efiemu/prepare32.c: likewise
119 * efiemu/main.c: likewise
120 * efiemu/modules/pnvram.c: likewise
121 * efiemu/modules/i386: likewise
122 * efiemu/modules/i386/pc: likewise
123 * efiemu/modules/acpi.c: likewise
124 * efiemu/i386/pc/cfgtables.c: likewise
125 * efiemu/i386/loadcore64.c: likewise
126 * efiemu/i386/loadcore32.c: likewise
127 * efiemu/prepare64.c: likewise
128 * efiemu/loadcore.c: likewise
129 * efiemu/symbols.c: likewise
130 * efiemu/mm.c: likewise
131 * efiemu/loadcore32.c: likewise
7dd4a573 132
1332009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 134
135 ACPI spoofing
136
137 * commands/acpi.c: new file
138 * commands/i386/pc/acpi.c: likewise
139 * commands/efi/acpi.c: likewise
140 * include/grub/acpi.h: likewise
141 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
142 (acpi_mod_SOURCES): new variable
143 (acpi_mod_CFLAGS): likewise
144 (acpi_mod_LDFLAGS): likewise
145 * conf/i386-efi.rmk: likewise
146 * conf/x86_64-efi.rmk: likewise
147
7dd4a573 1482009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 149
150 Missing part from mmap patch
151
152 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
153 (grub_mmap_unregister)
154 (grub_mmap_free_and_unregister): use grub_mmap_register
155
7dd4a573 1562009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 157
158 Mmap services
159
160 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
161 * loader/i386/linux.c (find_mmap_size): likewise
162 (allocate_pages): likewise
163 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
164 (grub_fill_multiboot_mmap): likewise
165 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
166 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
167 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
168 (OPENBSD_MMAP_RESERVED): likewise
169 * include/grub/i386/pc/memory.h: include grub/memory.h
170 (grub_lower_mem): removed
171 (grub_upper_mem): likewise
172 (GRUB_MACHINE_MEMORY_ACPI): new definition
173 (GRUB_MACHINE_MEMORY_NVS): likewise
174 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
175 (GRUB_MACHINE_MEMORY_HOLE): likewise
176 (grub_machine_mmap_register): likewise
177 (grub_machine_mmap_unregister): likewise
178 (grub_machine_get_upper): likewise
179 (grub_machine_get_lower): likewise
180 (grub_machine_get_post64): likewise
181 * include/grub/i386/efi/memory.h: new file
182 * include/grub/x86_64/efi/memory.h: likewise
183 * include/grub/efi/memory.h: likewise
184 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
185 (mmap_mod_SOURCES): new variable
186 (mmap_mod_LDFLAGS): likewise
187 (mmap_mod_ASFLAGS): likewise
188 * conf/i386-coreboot.rmk: likewise
189 * conf/i386-ieee1275.rmk: likewise
190 * conf/i386-efi.rmk: likewise
191 * conf/x86_64-efi.rmk: likewise
192 * include/grub/types.h (UINT_TO_PTR): new macro
193 (PTR_TO_UINT32): likewise
194 (PTR_TO_UINT64): likewise
195 * include/grub/memory.h: new file
196 * mmap/i386/pc/mmap.c: likewise
197 * mmap/i386/pc/mmap_helper.S: likewise
198 * mmap/i386/uppermem.c: likewise
199 * mmap/mmap.c: likewise
200 * mmap/efi/mmap.c: likewise
7dd4a573 201 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 202 grub_upper_mem
203 * kern/i386/pc/init.c (grub_lower_mem): removed variable
204 (grub_upper_mem): likewise
205 (grub_machine_init): don't use grub_upper_mem,
206 make grub_lower_mem local
207 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
208 grub_mmap_iterate and grub_mmap_get_upper
209 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
210
d558e6b5 2112009-05-02 Bean <bean123ch@gmail.com>
212
213 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
214 script/sh/parser.y.
215 (pkglib_MODULES): Add normal.mod and sh.mod.
216 (normal_SOURCES): New variable.
217 (normal_mod_CFLAGS): Likewise.
218 (normal_mod_LDFLAGS): Likewise.
219 (sh_mod_SOURCES): Likewise.
220 (sh_mod_CFLAGS): Likewise.
221 (sh_mod_LDFLAGS): Likewise.
222
223 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
224 script/sh/lexer.c_DEPENDENCIES.
225 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
226 kern/rescue_reader.c and kern/rescue_parser.c.
227 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
228 (grub_emu_SOURCES): Change source files.
229 (pkglib_MODULES): Remove normal.mod.
230 (normal_SOURCES): Removed.
231 (normal_mod_CFLAGS): Likewise.
232 (normal_mod_LDFLAGS): Likewise.
233 * conf/i386-coreboot.rmk: Likewise.
234 * conf/i386-efi.rmk: Likewise.
235 * conf/i386-ieee1276.rmk: Likewise.
236 * conf/powerpc-ieee1275.rmk: Likewise.
237 * conf/sparc64-ieee1275.rmk: Likewise.
238 * conf/x86_64-efi.rmk: Likewise.
239
240 * include/grub/command.h (grub_command_execute): New inline function.
241
242 * include/grub/menu.h (grub_menu_entry): Removed commands field.
243
244 * include/grub/normal.h: Remove <grub/setjmp.h>.
245 (grub_fs_module_list): Moved to normal/autofs.c.
246 (grub_exit_env): Removed.
247 (grub_command_execute): Likewise.
248 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
249 parameter script.
250 (read_command_list): New function declaration.
251 (read_fs_list): Likewise.
252
253 * include/parser.h: Include <grub/reader.h>.
254 (grub_parser_split_cmdline): Change type of getline parameter.
255 (grub_parser): New structure.
256 (grub_parser_class): New variable.
257 (grub_parser_execute): New function declaration.
258 (grub_register_rescue_parser): Likewise.
259 (grub_parser_register): New inline function.
260 (grub_parser_unregister): Likewise.
261 (grub_parser_get_current): Likewise.
262 (grub_parser_set_current): Likewise.
263
264 * include/grub/reader.h: New file.
265 * kern/reader.c: Likewise.
266 * kern/rescue_parser.c: Likewise.
267 * kern/rescue_reader.c: Likewise.
268 * normal/autofs.c: Likewise.
269 * normal/dyncmd.c: Likewise.
270
271 * include/grub/rescue.h: Removed.
272 * normal/command.h: Likewise.
273
274 * include/grub/script.h: Moved to ...
275 * include/grub/script_sh.h: ... Moved here.
276 * normal/execute.c: Moved to ...
277 * script/sh/execute.c: ... Moved here.
278 * normal/function.c: Moved to ...
279 * script/sh/function.c: ... Moved here.
280 * normal/lexer.c: Moved to ...
281 * script/sh/lexer.c: ... Moved here.
282 * normal/parser.y: Moved to ...
283 * script/sh/parser.y: ... Moved here.
284 * normal/script.c: Moved to ...
285 * script/sh/script.c: ... Moved here.
286
287 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
288 <grub/reader.h>.
289 (grub_exit_env): Removed.
290 (fs_module_list): Moved to normal/autofs.c.
291 (grub_file_getline): Don't handle comment here.
292 (free_menu): Skip removed field entry->commands.
293 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
294 script parameter.
295 (read_config_file): Removed nested parameter, change getline function.
296 (grub_enter_normal_mode): Removed.
297 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
298 (read_command_list): Likewise.
299 (autoload_fs_module): Moved to normal/autofs.c.
300 (read_fs_list): Likewise.
301 (reader_nested): New variable.
302 (grub_normal_execute): Run parser.sh to switch to sh parser.
303 (grub_cmd_rescue): Removed.
304 (cmd_normal): Removed.
305 (grub_cmd_normal): Unregister itself at the beginning. Don't register
306 rescue command.
307 (grub_cmdline_run): New function.
308 (grub_normal_reader_init): Likewise.
309 (grub_normal_read_line): Likewise.
310 (grub_env_write_pager): Likewise.
311 (cmdline): New variable.
312 (grub_normal_reader): Likewise.
313 (GRUB_MOD_INIT): Register normal reader and set as current, register
314 pager hook, register normal command with grub_register_command_prio,
315 so that it won't show up in command.lst.
316 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
317 grub_fs_autoload_hook.
318
319 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
320 (grub_menu_execute_entry): Replace grub_script_execute with
321 grub_parser_execute, change parameter to grub_command_execute.
322
323 * normal/menu_text.c: Remove <grub/script.h>.
324
325 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
326 and <grub/parser.h>.
327 (run): Change editor_getline to use new parser interface. Change
328 parameter to grub_command_execute.
329
330 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
331 <grub/reader.h> and <grub/parser.h>.
332 (grub_load_normal_mode): Execute normal command.
333 (grub_main): Call grub_register_core_commands,
334 grub_register_rescue_parser and grub_register_rescue_reader, use
335 grub_reader_loop to enter input loop.
336
7dd4a573 337 * kern/parser.c (grub_parser_split_cmdline): Change type of
338 getline parameter.
d558e6b5 339 (grub_parser_class): New variable.
340 (grub_parser_execute): New function.
341
342 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
343 * loader/multiboot2.c: Likewise.
344 * loader/sparc64/ieee1275/linux.c: Likewise.
345
346 * util/grub-emu.c (read_command_list): New dummy function.
347
18db813d 3482009-05-02 Robert Millan <rmh.grub@aybabtu.com>
349
350 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
351 count to 16 for CCISS and IDA.
352
6c67de15 3532009-05-02 Robert Millan <rmh.grub@aybabtu.com>
354
355 * normal/menu_text.c (grub_wait_after_message): Print a newline
356 after waiting for user input.
357
358 * loader/i386/linux.c: Include `<grub/normal.h>'.
359 (grub_cmd_linux): Improve the error message about `ask' mode, by
360 waiting for user input so it's not missed (we can do this, since
361 user requested interaction).
362
d9dc87b0 3632009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
364
365 Added missing lst to grub-mkrescue
366
367 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
368 and ${input_dir}/parttool.lst
369
ac8a2baa 3702009-04-30 David S. Miller <davem@davemloft.net>
371
ad22a610 372 * util/hostdisk.c (device_is_wholedisk): New function.
373 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
374 zero only if device_is_wholedisk() returns true.
375
6966215d 376 * util/hostdisk.c (convert_system_partition_to_system_disk):
377 Handle virtual disk devices named /dev/vdiskX as found on sparc
378 and powerpc.
379
ac8a2baa 380 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
381 lettered partition specifier is found, convert to numbered.
382
979b4fb4 3832009-04-29 David S. Miller <davem@davemloft.net>
384
e2bf39b2 385 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
386 * include/grub/sparc64/ieee1275/memory.h: Likewise.
387
3c64e104 388 * normal/command.c: Add missing newline at end of file.
389
979b4fb4 390 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
391 warnings.
392 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
393 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
394 grub_ofdisk_read): Likewise, and deal similarly with the fact that
395 ihandles have a 32-bit type but need to be stored in a "void *".
396
136d9f82 3972009-04-28 Pavel Roskin <proski@gnu.org>
398
9459c306 399 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
400 not disk. Adjust all dependencies.
2e08a26a 401 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 402 grub_disk_close().
403
136d9f82 404 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
405 parent's partition, don't copy it by reference, as it gets freed
406 on close.
407
7dd4a573 4082009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 409
410 Preboot hooks support
411
412 * commands/boot.c (struct grub_preboot_t): new declaration
413 (preboots_head): new variable
414 (preboots_tail): likewise
415 (grub_loader_register_preboot_hook): new function
416 (grub_loader_unregister_preboot_hook): likewise
417 (grub_loader_set): launch preboot hooks
418 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
419 (grub_loader_register_preboot_hook): new declaration
420 (grub_loader_unregister_preboot_hook): likewise
421
5af922b5 4222009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
423
424 Warning fix
425
7dd4a573 426 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 427 calling grub_dprintf
428
a5562c30 4292009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
430
431 Bug and warning fixes
432
7dd4a573 433 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 434 declaration
435 * commands/test.c (test_parse): fixed bug with file tests and corrected
436 declaration of find_file
437
4006f85c 4382009-04-26 Pavel Roskin <proski@gnu.org>
439
440 * Makefile.in: Don't install empty manual pages if help2man is
441 missing. Use help2man option for output, not shell redirection.
442
5c77c3de 4432009-04-26 David S. Miller <davem@davemloft.net>
444
445 * util/grub-mkdevicemap.c (make_device_map): Add missing
446 NESTED_FUNC_ATTR to process_device().
447
033b10a8 4482009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
449
450 Test command
451
452 * commands/test.c: rewritten to use bash-like test
453
e4343593 4542009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
455
456 Parttool autoloading and improvements
457
7dd4a573 458 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 459 (parttool.lst): new target
460 * genmk.rb: generate parttool-*
461 (CLEANFILES): add #{parttool}
462 (PARTTOOLFILES): new variable
463 * genparttoollist.sh: new file
7dd4a573 464 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 465 (grub_pcpart_type): likewise
466 * commands/parttool.c (helpmsg): new variable
467 (grub_cmd_parttool): output help if not enough arguments are supplied
468 autoload modules
469 (GRUB_MOD_INIT(parttool)): use helpmsg
470
0d312500 4712009-04-24 David S. Miller <davem@davemloft.net>
472
7dd4a573 473 Avoiding opening same device multiple times in device iterator.
0d312500 474
475 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 476 and use it to build a list of partitions in iterate_disk() and
0d312500 477 iterate_partition().
478
ac20caff 479 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
480 on disk->data.
481
0dcf7495 482 * disk/ieee1275/nand.c (grub_nand_iterate): Return
483 grub_devalias_iterate() result instead of unconditional 0.
484 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
485 Also, capture hook return value, either directly or via
486 grub_children_iterate(), and propagate to caller.
487 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
488 grub_children_iterate): Return value is now 'int' instead of
489 'grub_err_t'.
490 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
491 like a proper iterator, stopping when hooks return non-zero.
492 (grub_devalias_iterate): Likewise.
493
c8c08833 4942009-04-23 David S. Miller <davem@davemloft.net>
495
496 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
497
f01005a8 4982009-04-22 David S. Miller <davem@davemloft.net>
499
500 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
501 is larger than address_cells, use that value for address_cells too.
502
4e8269da 503 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
504 IEEE1275_MAX_PATH_LEN): Define.
505 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
506 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
507 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
508 'devtype'. Explicitly NULL terminate devalias expansion.
509
a1447506 510 * util/sparc64/ieee1275/misc.c: New file.
511 * util/sparc64/ieee1275/grub-setup.c: New file.
512 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
513 * util/sparc64/ieee1275/grub-mkimage.c: New file.
514 * util/sparc64/ieee1275/grub-install.in: New file.
515 * util/ieee1275/ofpath.c: New file.
516 * util/ieee1275/devicemap.c: New file.
517 * util/devicemap.c: New file.
518 * util/deviceiter.c: New file.
519 * kern/sparc64/ieee1275/init.c: New file.
520 * include/grub/util/ofpath.h: New file.
521 * include/grub/util/deviceiter.h: New file.
522 * util/grub-mkdevicemap.c: Include deviceiter.h.
523 Implement using grub_util_emit_devicemap_entry and
524 grub_util_iterate_devices.
525 * conf/i386-corebook.rmk: Build util/deviceiter.c and
526 util/devicemap.c into grub-mkdevicemap
527 * conf/i386-efi.rmk: Likewise.
528 * conf/i386-ieee1275.rmk: Likewise.
529 * conf/i386-pc.rmk: Likewise.
530 * conf/powerpc-ieee1275.rmk: Likewise.
531 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
532 images and installation utilities. Build kernel as image
533 instead of as elf binary. Use common rules as much as possible.
534
7dd4a573 5352009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 536
537 Correct GPT definition
538
7dd4a573 539 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 540 of "attrib" member
541
c6c5219f 5422009-04-19 Felix Zielcke <fzielcke@z-51.de>
543
544 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
545
0552ff9f 5462009-04-19 David S. Miller <davem@davemloft.net>
547
548 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
549 (grub_rescue_cmd_linux): Rename to...
550 (grub_cmd_linux): and fix prototype.
551 (grub_rescue_cmd_initrd): Rename to...
552 (grub_cmd_initrd): and fix prototype.
553 (cmd_linux, cmd_initrd): New.
554 (GRUB_MOD_INIT(linux)): Use grub_register_command().
555 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
556
d1a282fc 5572009-04-17 Pavel Roskin <proski@gnu.org>
558
07c5039f 559 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
560 format.
561 (grub_ohci_transfer): Likewise.
562
b012002d 563 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
564
1bc09c35 565 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
566 return without a value. Fix inconsistent indentation.
567
e0ff9126 568 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
569 match struct grub_fs.
570
d1a282fc 571 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
572 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
573 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
574 * commands/lspci.c (grub_lspci_iter): Likewise.
575
a96df3f2 5762009-04-16 Bean <bean123ch@gmail.com>
577
578 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
579 value.
580
41bb0fe9 5812009-04-15 Pavel Roskin <proski@gnu.org>
582
583 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
584 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
585 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
586 definitions.
587
596c6970 5882009-04-15 Felix Zielcke <fzielcke@z-51.de>
589
590 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 591 that no multiple data or metadata areas are supported and `Unknown
596c6970 592 metadata header'.
593
7dd4a573 5942009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 595
596 Move loader out of the kernel
597
598 * kern/loader.c: moved to ...
599 * commands/boot.c: ... moved here
600 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
601 * commands/boot.c (grub_cmd_boot): moved here. All users updated
602 * include/grub/kernel.h (grub_machine_fini): export
603 * include/grub/loader.h (grub_loader_is_loaded): update declaration
604 (grub_loader_set): likewise
605 (grub_loader_unset): likewise
606 (grub_loader_boot): likewise
607 * conf/common.rmk: new module boot.mod
608 (pkglib_MODULES): add boot.mod
609 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
610 (grub_emu_SOURCES): likewise
611 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
612 (grub_emu_SOURCES): likewise
613 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
614 (grub_emu_SOURCES): likewise
615 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
616 (grub_emu_SOURCES): likewise
617 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
618 (grub_emu_SOURCES): likewise
7dd4a573 619 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
620 (grub_emu_SOURCES): likewise
0d5d5653 621 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 622 (grub_emu_SOURCES): likewise
0d5d5653 623
7dd4a573 6242009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 625
626 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 627
5999d619 628 * kern/misc.c (grub_itoa): Removed function
629 (grub_ltoa): likewise
630 (grub_vsprintf): use grub_lltoa
631
7dd4a573 6322009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 633
634 Restore grub-emu
635
636 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
637 * conf/i386-coreboot.rmk: likewise
638 * conf/i386-ieee1275.rmk: likewise
639 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 640
20318222 6412009-04-15 Felix Zielcke <fzielcke@z-51.de>
642
643 * INSTALL: Add that `./autogen.sh' needs to be run before
644 `./configure.'.
645
d05f0df3 6462009-04-14 Bean <bean123ch@gmail.com>
647
648 * Makefile.in (pkglib_DATA): Add handler.lst.
649 (handler.lst): New rule.
650
651 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
652 * conf/i386-coreboot.rmk: Likewise.
653 * conf/i386-ieee1275.rmk: Likewise.
654 * conf/i386-efi.rmk: Likewise.
655 * conf/x86_64-efi.rmk: Likewise.
656 * conf/powerpc-ieee1275.rmk: Likewise.
657 * conf/sparc64-ieee1275.rmk: Likewise.
658
659 * genhandlerlist.sh: New file.
660
661 * genmk.rb: Add rules to generate handler.lst.
662
663 * include/grub/normal.h (grub_file_getline): New function definition.
664 (read_handler_list): Likewise.
665 (free_handler_list): Likewise.
666
667 * include/grub/term.h (grub_term_register_input): Add name parameter
668 for auto generation of handler.lst.
669 (grub_term_register_output): Likewise.
670
671 * normal/handler.c: New file.
672
673 * normal/main.c (get_line): Renamed to grub_file_getline.
674 (read_config_file): Use the newly renamed grub_file_getline.
675 (read_command_list): Likewise.
676 (read_fs_list): Likewise.
677 (grub_normal_execute): Call read_handler_list to parse handler.lst.
678 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
679
680 * term/efi/console.c (grub_console_init): Add name parameter for auto
681 generation of handler.lst.
682 * term/gfxterm.c: Likewise.
683 * term/i386/pc/at_keyboard.c: Likewise.
684 * term/i386/pc/console.c: Likewise.
685 * term/i386/pc/serial.c: Likewise.
686 * term/i386/pc/vesafb.c: Likewise.
687 * term/i386/pc/vga.c: Likewise.
688 * term/i386/pc/vga_text.c: Likewise.
689 * term/ieee1275/ofconsole.c: Likewise.
690 * term/usb_keyboard.c: Likewise.
691
33c846be 6922009-04-14 Bean <bean123ch@gmail.com>
693
694 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
695 properly with null character.
696
4484e01e 6972009-04-14 Felix Zielcke <fzielcke@z-51.de>
698
699 * configure: Remove.
700 * config.h.in: Likewise.
f93d668e 701 * stamp-h.in: Likewise.
4484e01e 702 * DISTLIST: Likewise.
703 * conf/common.mk: Likewise.
704 * conf/i386-coreboot.mk: Likewise.
705 * conf/i386-efi.mk: Likewise.
706 * conf/i386-ieee1275.mk: Likewise.
707 * conf/i386.mk: Likewise.
708 * conf/i386-pc.mk: Likewise.
709 * conf/powerpc-ieee1275.mk: Likewise.
710 * conf/sparc64-ieee1275.mk: Likewise.
711 * conf/x86_64-efi.mk: Likewise.
712
713 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
714 develop on GRUB.
715
7dd4a573 7162009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 717 David S. Miller <davem@davemloft.net>
718
719 * util/hostdisk.c (make_device_name): Fix buffer length
720 calculations.
721
e25b5a8c 7222009-04-14 Felix Zielcke <fzielcke@z-51.de>
723
724 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
725 <sys/param.h> and <sys/sysctl.h>.
726 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
727 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
728 opening the device and reset them afterwards.
729
1f1f580c 7302009-04-13 Pavel Roskin <proski@gnu.org>
731
732 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
733 Reported by John Stanley <jpsinthemix@verizon.net>
734
7ebc2d6b 7352009-04-13 Robert Millan <rmh@aybabtu.com>
736
737 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 738 that name for menuentries when appropriate.
7ebc2d6b 739
d8ba3667 7402009-04-13 Felix Zielcke <fzielcke@z-51.de>
741
742 * util/grub.d/10_freebsd.in: Add a missing `fi'.
743
cba416eb 7442009-04-13 Robert Millan <rmh@aybabtu.com>
745
746 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
747 to Linux, simply abort telling the user it's no longer supported.
748
a547a745 7492009-04-13 Felix Zielcke <fzielcke@z-51.de>
750
751 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 752 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 753 `freebsd_loadenv' only when devices.hints exist.
754
232a769c 7552009-04-13 Pavel Roskin <proski@gnu.org>
756
757 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
758
c3012039 7592009-04-13 Felix Zielcke <fzielcke@z-51.de>
760
761 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
762 partition number.
763 (grub_drive): Likewise.
764
234022fe 7652009-04-13 David S. Miller <davem@davemloft.net>
766
767 * kern/sparc64/ieee1275/ieee1275.c: New file.
768 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
769 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
770 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
771 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
772 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
773 grub_ieee1275_alloc_physmem): Declare new exported functions.
774
d8e1836c 775 * include/grub/sparc64/ieee1275/loader.h: New file.
776 * include/grub/sparc64/ieee1275/memory.h: Likewise.
777 * include/grub/sparc64/kernel.h: Likewise.
778 * loader/sparc64/ieee1275/linux.c: Likewise.
779
96bd81ec 780 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
781 (grub_fstest_SOURCES): Likewise.
782
6a4737e5 783 * util/hostdisk.c (make_device_name): Do not make any assumptions
784 about the length of drive names.
785
1d7a72fd 786 * kern/dl.c (grub_dl_load_file): Close file immediately when
787 we are done using it.
788
56bc2471 7892009-04-12 David S. Miller <davem@davemloft.net>
790
791 * kern/misc.c (grub_ltoa): Fix cast when handling negative
792 values. Noticed by Pavel Roskin.
793
df38d0bb 794 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
795 target compiler.
7dd4a573 796
e382e93a 797 * genmk.rb: Add more flexible image type specification, also
798 pass --strip-unneeded to objcopy.
799 * conf/i386-pc.rmk: Use *_FORMAT.
800 * conf/i386-pc.mk: Rebuilt.
801
f5dbbca9 802 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
803 (OFDISK_HASH_SZ): Define.
804 (ofdisk_hash): New hash table.
805 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
806 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
807 instead of device phandle which is not unique.
808
91c88b12 809 * kern/sparc64/ieee1275/init.c: Delete, replace with...
810 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
811 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
812 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
813 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
814 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
815 GRUB_KERNEL_MACHINE_DATA_END): Define.
816 (grub_kernel_image_size, grub_total_module_size): Declare.
817
5b5d4aa5 8182009-04-12 Pavel Roskin <proski@gnu.org>
819
7dd4a573 820 * configure.ac: Change the logic when we check for target tools.
821 Do it when the target is specified and it's different from the
822 specified value of the host.
5b5d4aa5 823
c91e1793 8242009-04-11 Felix Zielcke <fzielcke@z-51.de>
825
826 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
827 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
828 GNU/kFreeBSD. Check if a device is a character device. Use
829 DIOCGMEDIASIZE to get the size.
830 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
831 support for GNU/kFreeBSD.
832 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
833 is a character device instead of a block device. Add support for
834 FreeBSD device names.
835
836 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
837 is a character device instead of a block device.
838
839 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
840 is a character device instead of a block device.
841
b1ac8644 8422009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
843
844 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
845 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
846 FreeBSD. Check if a device is a character device. Use
847 DIOCGMEDIASIZE to get the size.
848 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
849 support for FreeBSD.
850 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
851 is a character device instead of a block device. Add support for
852 FreeBSD device names.
853
854 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
855 a character device instead of a block device.
856 (grub_util_check_char_device): New function.
857
858 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
859 a character device instead of a block device.
860
861 * include/grub/util/getroot.h (grub_util_check_char_device): New
862 prototype.
863
a3f7515a 8642009-04-11 David S. Miller <davem@davemloft.net>
865
866 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
867 static libgcc.
868 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
869 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
870 function, if present.
871 (__bswapdi2): Likewise.
872
0d44993d 873 * include/grub/sparc64/ieee1275/boot.h: New file.
874 * boot/sparc64/ieee1275/boot.S: Likewise.
875 * boot/sparc64/ieee1275/diskboot.S: Likewise.
876
ed3d2bc2 877 * kern/misc.c (grub_ltoa): New function.
878 (grub_vsprintf): Use it to format 'long' integers.
879
d3bfb59c 8802009-04-10 David S. Miller <davem@davemloft.net>
881
882 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
883 slots are of type grub_ieee1275_cell_t.
884 (grub_nand_read): Likewise.
885 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
886 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
887 macros are used to compare values in arg/ret block of the call.
888 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
889 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
890 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
891 grub_ieee1275_instance_to_path, grub_ieee1275_write,
892 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
893 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
894 grub_ieee1275_close, grub_ieee1275_set_property,
895 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
896 grub_ieee1275_cell_t.
897 * kern/ieee1275/openfw.c (grub_map): Likewise.
898 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
899 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
900
450e2238 901 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
902 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
903 (grub_devalias_iterate): Likewise.
904
7dd4a573 9052009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 906
907 UFS improvements
908
909 * fs/ufs.c (INODE_NBLOCKS): new definition
910 (struct grub_ufs_dirent): added fields for non-BSD dirents
911 (grub_ufs_get_file_block): fixed double indirect handling
912 (grub_ufs_lookup_symlink): use more robust way to determine whether
913 symlink is inline
914 (grub_ufs_find_file): support for non-BSD dirents
915 (grub_ufs_dir): support for non-BSD dirents
916
e7e6862a 9172009-04-10 Bean <bean123ch@gnail.com>
918
919 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
920 attribute, otherwise the size would be wrong for i386 platform.
921
922 * include/grub/pci.h (grub_pci_read_word): New inline function.
923 (grub_pci_read_byte): Likewise.
924 (grub_pci_write): Likewise.
925 (grub_pci_write_word): Likewise.
926 (grub_pci_write_byte): Likewise.
927
928 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
929
930 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
931 (find_framebuf): Scan pci to locate the frame buffer address.
932
933 * commands/efi/fixvideo.c: New file.
934
935 * commands/efi/loadbios.c: Likewise.
936
937 * commands/memrw.c: Likewise.
938
939 * util/grub-dumpbios.in: Likewise.
940
941 * conf/common.rmk (grub-dumpbios): New utility.
942 (pkglib_MODULES): New module memrw.mod.
943 (memrw_mod_SOURCE): New macro.
944 (memrw_mod_CFLAGS): Likewise.
945 (memrw_mod_LDFLAGS): Likewise.
946
7dd4a573 947 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 948 fixvideo.mod.
949 (loadbios_mod_SOURCE): New macro.
950 (loadbios_mod_CFLAGS): Likewise.
951 (loadbios_mod_LDFLAGS): Likewise.
952 (fixvideo_mod_SOURCE): Likewise.
953 (fixvideo_mod_CFLAGS): Likewise.
954 (fixvideo_mod_LDFLAGS): Likewise.
955
7dd4a573 956 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 957 fixvideo.mod.
958 (loadbios_mod_SOURCE): New macro.
959 (loadbios_mod_CFLAGS): Likewise.
960 (loadbios_mod_LDFLAGS): Likewise.
961 (fixvideo_mod_SOURCE): Likewise.
962 (fixvideo_mod_CFLAGS): Likewise.
963 (fixvideo_mod_LDFLAGS): Likewise.
964
af63ada2 9652009-04-08 Felix Zielcke <fzielcke@z-51.de>
966
967 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
968
c2cdde70 9692009-04-07 David S. Miller <davem@davemloft.net>
970
971 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
972 support for R_SPARC_OLO10 relocations. Fix compile warning for
973 R_SPARC_WDISP30 case.
ea3f72cf 974 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 975
761319cf 9762009-04-06 Pavel Roskin <proski@gnu.org>
977
1007d1f5 978 * include/grub/misc.h (ARRAY_SIZE): New macro.
979 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
980 New macro.
981 * loader/i386/linux.c (allocate_pages): Use free_pages().
982 (grub_linux_unload): Don't use free_pages().
983 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
984 wrong index. Treat all other modes as text modes.
985 (grub_cmd_linux): Initialize vid_mode unconditionally to
986 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
987
761319cf 988 * commands/help.c (print_command_help): Use cmd->prio, not
989 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
990
ea761d40 9912009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 992
ea761d40 993 Parttool
994
995 * parttool/pcpart.c: new file
996 * commands/parttool.c: likewise
997 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
998 (parttool_mod_SOURCES): new variable
999 (parttool_mod_CFLAGS): likewise
1000 (parttool_mod_LDFLAGS): likewise
1001 (pcpart_mod_SOURCES): likewise
1002 (pcpart_mod_CFLAGS): likewise
1003 (pcpart_mod_LDFLAGS): likewise
7dd4a573 1004 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 1005 and parttool/pcpart.c
1006 * conf/i386-efi.rmk: likewise
1007 * conf/i386-ieee1275.rmk: likewise
1008 * conf/i386-pc.rmk: likewise
1009 * conf/powerpc-ieee1275.rmk: likewise
1010 * conf/sparc64-ieee1275.rmk: likewise
1011 * conf/x86_64-ieee1275.rmk: likewise
1012
05aaebfb 10132009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1014
1015 Support for mtime and further expandability of dir command
1016
1017 * include/grub/lib/datetime.h: moved to ...
7dd4a573 1018 * include/grub/datetime.h: ... moved here and added
05aaebfb 1019 declaration of grub_unixtime2datetime. All users updated
7dd4a573 1020 * include/grub/fs.h: new syntax for dir and mtime functions in
1021 struct grub_fs
05aaebfb 1022 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
1023 and GRUB_FSHELP_FLAGS_MASK
1024 * commands/ls.c (grub_ls_list_files): Write mtime in long format
1025 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
1026 (grub_ext2_mtime): new function
1027 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
1028 (grub_hfsplus_mtime): new function
1029 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
1030 (GRUB_UFS_ATTR_FILE): likewise
1031 (GRUB_UFS_ATTR_LNK): likewise
1032 (struct grub_ufs_sblock): new fields mtime
1033 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
1034 all users updated
1035 (grub_ufs_dir): mtime support
1036 (grub_ufs_mtime): new function
1037 * fs/affs.c (grub_affs_dir): use new dir syntax
1038 * fs/afs.c (grub_afs_dir): likewise
1039 * fs/cpio.c (grub_cpio_dir): likewise
1040 * fs/fat.c (grub_fat_find_dir): likewise
1041 * fs/hfs.c (grub_hfs_dir): likewise
1042 * fs/iso9660.c (grub_iso9660_dir): likewise
1043 * fs/jfs.c (grub_jfs_dir): likewise
1044 * fs/minix.c (grub_minix_dir): likewise
1045 * fs/ntfs.c (grub_ntfs_dir): likewise
1046 * fs/reiserfs.c (grub_reiserfs_dir): likewise
1047 * fs/sfs.c (grub_sfs_dir): likewise
1048 * fs/xfs.c (grub_xfs_dir): likewise
1049 * util/hostfs.c (grub_hostfs_dir): likewise
1050 * lib/datetime.c: moved to ...
1051 * normal/datetime.c: ... moved here
1052 (grub_unixtime2datetime): new function
1053 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 1054 * normal/completion.c (iterate_dir): use new dir syntax
1055 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 1056 last modification time of a volume
7dd4a573 1057 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 1058 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 1059 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 1060 (normal_mod_SOURCES): likewise
1061 (datetime_mod_SOURCES): Removed lib/datetime.c
1062 * conf/i386-efi.rmk: likewise
7dd4a573 1063 * conf/i386-ieee1275.rmk: likewise
05aaebfb 1064 * conf/i386-pc.rmk: likewise
1065 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 1066 * conf/sparc64-ieee1275.rmk: likewise
1067 * conf/x86_64-efi.rmk: likewise
05aaebfb 1068
8a7e1a14 10692009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1070
1071 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 1072
1073 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 1074 on grub_fat_find_dir
1075 (grub_fat_find_dir): use grub_fat_iterate_dir
1076 (grub_fat_label): likewise
1077
04186a9c 10782009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
1079
7dd4a573 1080 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 1081 and command.h
1082 remove extraneous kernel_elf_HEADERS
1083
da4c0bb6 10842009-04-04 Bean <bean123ch@gnail.com>
1085
1086 * include/grub/util/misc.h: Add dummy function fsync for mingw.
1087
1088 * util/misc.c: Likewise.
1089
54ad9555 10902009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1091
1092 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1093 instead of grub_printf.
1094
7a6bf9f2 10952009-04-03 Robert Millan <rmh@aybabtu.com>
1096
1097 * loader/i386/linux.c (grub_linux_setup_video): Fill
1098 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1099 values from `mode info' structure instead of hardcoded
1100 values.
1101
3fcc2083 11022009-04-01 Pavel Roskin <proski@gnu.org>
1103
1104 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1105 unused now.
1106 * genmk.rb: Likewise.
1107 * configure.ac: Likewise.
1108
5ec9740b 11092009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
1110
1111 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1112 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
1113
5270cec8 11142009-04-01 David S. Miller <davem@davemloft.net>
1115
1116 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 1117 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 1118 (grub_setjmp): Mark with 'returns_twice' attribute.
1119 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1120 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1121 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1122
9c3dd854 11232009-04-01 Robert Millan <rmh@aybabtu.com>
1124
1125 Reapply fix from 2008-07-28 which was accidentally reverted; also
1126 perform the same fix to a similar check in same function.
1127
1128 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1129 with the same number are found, just use issue a warning with
1130 grub_dprintf(), as this error has been reported to be non-fatal.
1131
0d818b7e 11322009-03-31 Pavel Roskin <proski@gnu.org>
1133
1134 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1135 for cross-compilation.
1136
95646d92 11372009-03-30 Robert Millan <rmh@aybabtu.com>
1138
1139 Fix i386-ieee1275 build.
1140
1141 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1142 Remove declaration.
1143
6a003ed1 11442009-03-30 Pavel Roskin <proski@gnu.org>
1145
1146 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1147 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
1148 zero-terminated, rely only on the strlen value. Fix comparison
1149 of strings differing in length.
1150
92f33540 11512009-03-30 Robert Millan <rmh@aybabtu.com>
1152
1153 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1154 checking for abi version. Improve error messages on BIOS to notify
1155 user about `linux16' command.
1156
a8c48fd5 11572009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
1158
f968172e 1159 Leak fixes
a8c48fd5 1160
f968172e 1161 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1162 in case of collision
1163 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 1164
9c323f09 11652009-03-29 Robert Millan <rmh@aybabtu.com>
1166
1167 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1168 set `vid_mode' accordingly.
1169 (grub_linux_boot): Process `vid_mode' and set video mode.
1170
ae68f423 11712009-03-29 Robert Millan <rmh@aybabtu.com>
1172
1173 * util/grub.d/10_linux.in (linux_entry): New function.
1174 Factorize generation of Linux boot entries.
1175
5709cfc4 11762009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
1177
1178 Make the format of Environment Block plain text. The boot loader
1179 part is not tested well yet.
7dd4a573 1180
5709cfc4 1181 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1182 (buffer): Removed.
1183 (envblk): Likewise.
1184 (usage): Remove "info" and "clear". Add "unset". Update the
1185 description of "set", as this does not delete variables any
1186 longer.
1187 (create_envblk_file): Complete rewrite.
1188 (open_envblk_file): Likewise.
1189 (cmd_info): Removed.
1190 (cmd_list): Likewise.
1191 (cmd_set): Likewise.
1192 (cmd_clear): Likewise.
1193 (list_variables): New function.
1194 (write_envblk): Likewise.
1195 (set_variables): Likewise.
1196 (unset_variables): Likewise.
1197 (main): Complete rewrite.
1198
1199 * commands/loadenv.c (buffer): Removed.
1200 (envblk): Likewise.
1201 (open_envblk_file): New function.
1202 (read_envblk_file): Complete rewrite.
1203 (grub_cmd_load_env): Likewise.
1204 (grub_cmd_list_env): Likewise.
1205 (struct blocklist): New struct.
1206 (free_blocklists): New function.
1207 (check_blocklists): Likewise.
1208 (write_blocklists): Likewise.
1209 (grub_cmd_save_env): Complete rewrite.
1210
1211 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1212 a plain text signature.
1213 (GRUB_ENVBLK_MAXLEN): Removed.
1214 (struct grub_envblk): Complete rewrite.
1215 (grub_envblk_find): Removed.
1216 (grub_envblk_insert): Likewise.
1217 (grub_envblk_open): New prototype.
1218 (grub_envblk_set): Likewise.
1219 (grub_envblk_delete): Put const to VALUE.
1220 (grub_envblk_iterate): Put const to NAME and VALUE.
1221 (grub_envblk_close): New prototype.
1222 (grub_envblk_buffer): New inline function.
1223 (grub_envblk_size): Likewise.
1224
1225 * lib/envblk.c: Include grub/mm.h.
1226 (grub_env_find): Removed.
1227 (grub_envblk_open): New function.
1228 (grub_envblk_close): Likewise.
1229 (escaped_value_len): Likewise.
1230 (find_next_line): Likewise.
1231 (grub_envblk_insert): Removed.
1232 (grub_envblk_set): New function.
1233 (grub_envblk_delete): Complete rewrite.
1234 (grub_envblk_iterate): Likewise.
1235
a9368fd3 12362009-03-28 Robert Millan <rmh@aybabtu.com>
1237
1238 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1239 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1240 variables. Use 16-bit loader.
1241 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1242 loader.
1243 * kern/i386/loader.S (grub_linux_boot): Rename to ...
1244 (grub_linux16_boot): ... this. Update all users.
1245 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1246 (grub_linux_boot): ... this. Update all users.
1247
1248 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1249 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
1250 commands to `linux16' and `initrd16'.
1251 (GRUB_MOD_FINI(linux)): Rename to ...
1252 (GRUB_MOD_FINI(linux16)): ... this.
1253
e4dd5a7e 12542009-03-24 Pavel Roskin <proski@gnu.org>
1255
1256 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1257 not just for compilation.
1258
c04d6e05 12592009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
1260
1261 Move multiboot helper out of kernel
1262
1263 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1264 `loader/i386/multiboot_helper.S'.
1265 * conf/i386-coreboot.rmk: Likewise
1266 * conf/i386-ieee1275.rmk: Likewise
1267
1268 * kern/i386/loader.S: Move multiboot helpers from here...
1269 * loader/i386/multiboot_helper.S: ...moved here
1270 * include/grub/i386/loader.h: Move declarations of multiboot
1271 helpers from here...
1272 * include/grub/i386/multiboot.h: ...moved here
1273 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1274
42a5b3fc 12752009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1276
1277 * kern/env.c (grub_env_context_open): Added an argument to specify
1278 whether a new context inherits exported variables from current
1279 one. This is useful when making a sandbox to interpret a config
1280 file.
1281 All callers updated.
1282
1283 * include/grub/env.h (grub_env_context_open): Updated the prototype.
1284
b28bbc4e 12852009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1286
1287 * kern/env.c (grub_env_context_close): Fix memory leaks.
1288
f04f02e4 12892009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1290
1291 * normal/main.c (grub_normal_execute): Added an argument
1292 BATCH to specify if an interactive interface should be provided
1293 after reading a config file.
1294 All callers updated.
1295 (read_command_list): Prevent being executed twice.
1296 (read_fs_list): Likewise.
1297
42a5b3fc 1298 * include/grub/normal.h (grub_normal_execute): Updated the
1299 prototype.
f04f02e4 1300
41473ac2 13012009-03-22 Pavel Roskin <proski@gno.org>
1302
fbc00b0c 1303 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1304 _start.
1305 * kern/i386/pc/startup.S: Likewise.
1306 * kern/i386/efi/startup.S: Likewise.
1307 * kern/i386/ieee1275/startup.S: Likewise.
1308 * kern/i386/coreboot/startup.S: Likewise.
1309 * kern/x86_64/efi/startup.S: Likewise.
1310
41473ac2 1311 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1312 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1313 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1314
2274cc8f 13152009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
1316
1317 Bugfixes in multiboot for bugs uncovered by solaris kernel.
1318
1319 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1320 limit detection.
1321 Use vaddr of correct segment for entry_point.
1322
b1b797cb 13232009-03-21 Bean <bean123ch@gmail.com>
1324
1325 * commands/blocklist.c: Add include file <grub/command.h>, remove
1326 <grub/normal.h> and <grub/arg.h>.
1327 (grub_cmd_blocklist): Use the new command interface.
1328 (GRUB_MOD_INIT): Likewise.
1329 (GRUB_MOD_FINI): Likewise.
1330 * commands/boot.c: Likewise.
1331 * commands/cat.c: Likewise.
1332 * commands/cmp.c: Likewise.
1333 * commands/configfile.c: Likewise.
1334 * commands/crc.c: Likewise.
1335 * commands/echo.c: Likewise.
1336 * commands/halt.c: Likewise.
1337 * commands/handler.c: Likewise.
1338 * commands/hdparm.c: Likewise.
1339 * commands/help.c: Likewise.
1340 * commands/hexdump.c: Likewise.
1341 * commands/loadenv.c: Likewise.
1342 * commands/ls.c: Likewise.
1343 * commands/lsmmap.c: Likewise.
1344 * commands/lspci.c: Likewise.
1345 * commands/loadenv.c: Likewise.
1346 * commands/read.c: Likewise.
1347 * commands/reboot.c: Likewise.
1348 * commands/search.c: Likewise.
1349 * commands/sleep.c: Likewise.
1350 * commands/test.c: Likewise.
1351 * commands/usbtest.c: Likewise.
1352 * commands/videotest.c: Likewise.
1353 * commands/i386/cpuid.c: Likewise.
1354 * commands/i386/pc/halt.c: Likewise.
1355 * commands/i386/pc/play.c: Likewise.
1356 * commands/i386/pc/pxecmd.c: Likewise.
1357 * commands/i386/pc/vbeinfo.c: Likewise.
1358 * commands/i386/pc/vbetest.c: Likewise.
1359 * commands/ieee1275/suspend.c: Likewise.
1360 * disk/loopback.c: Likewise.
1361 * font/font_cmd.c: Likewise.
1362 * hello/hello.c: Likewise.
1363 * loader/efi/appleloader.c: Likewise.
1364 * loader/efi/chainloader.c: Likewise.
1365 * loader/i386/bsd.c: Likewise.
1366 * loader/i386/efi/linux.c: Likewise.
1367 * loader/i386/ieee1275/linux.c: Likewise.
1368 * loader/i386/linux.c: Likewise.
1369 * loader/i386/pc/chainloader.c: Likewise.
1370 * loader/i386/pc/linux.c: Likewise.
1371 * loader/powerpc/ieee1275/linux.c: Likewise.
1372 * loader/multiboot_loader.c: Likewise.
1373 * term/gfxterm.c: Likewise.
1374 * term/i386/pc/serial.c: Likewise.
1375 * term/terminfo.c: Likewise.
1376
1377 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
1378 * term/i386/pc/vga.c: Likewise.
1379 * video/readers/jpeg.c: Likewise.
1380 * video/readers/png.c: Likewise.
1381 * video/readers/tga.c: Likewise.
1382
1383 * util/grub-fstest (cmd_loopback): Removed.
1384 (cmd_blocklist): Likewise.
1385 (cmd_ls): Likewise.
1386 (grub_register_command): Likewise.
1387 (grub_unregister_command): Likewise.
1388 (execute_command): Use grub_command_find to locate command and execute
1389 it.
1390
1391 * include/grub/efi/chainloader.h: Removed.
1392 * loader/efi/chainloader_normal.c: Likewise.
1393 * loader/i386/bsd_normal.c: Likewise.
1394 * loader/i386/pc/chainloader_normal.c: Likewise.
1395 * loader/i386/pc/multiboot_normal.c: Likewise.
1396 * loader/linux_normal.c: Likewise.
1397 * loader/multiboot_loader_normal.c: Likewise.
1398 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1399
1400 * gencmdlist.sh: Scan new registration command grub_register_extcmd
1401 and grub_register_command_p1.
1402
1403 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1404 kern/command.c, lib/arg.c and commands/extcmd.c.
1405 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1406 (minicmd_mod_SOURCES): New variable.
1407 (minicmd_mod_CFLAGS): Likewise.
1408 (minicmd_mod_LDFLAGS): Likewise.
1409 (extcmd_mod_SOURCES): Likewise.
1410 (extcmd_mod_CFLAGS): Likewise.
1411 (extcmd_mod_LDFLAGS): Likewise.
1412 (boot_mod_SOURCES): Removed.
1413 (boot_mod_CFLAGS): Likewise.
1414 (boot_mod_LDFLAGS): Likewise.
1415
1416 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
1417 kern/corecmd.c.
1418 (kernel_img_HEADERS): Add command.h.
1419 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
1420 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
1421 and lib/arg.c.
1422 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
1423 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
1424 remove the corresponding normal mode command.
1425 (normal_mod_SOURCES): Remove normal/arg.c.
1426 * conf/i386-coreboot.rmk: Likewise.
1427 * conf/i386-efi.rmk: Likewise.
1428 * conf/i386-ieee1275.rmk: Likewise.
1429 * conf/powerpc-ieee1275.rmk: Likewise.
1430 * conf/x86_64-efi.rmk: Likewise.
1431
1432 * include/grub/arg.h: Move from here ...
1433 * include/grub/lib/arg.h: ... to here.
1434
1435 * normal/arg.c: Move from here ...
1436 * lib/arg.c: ... to here.
1437
1438 * commands/extcmd.c: New file.
1439 * commands/minicmd.c: Likewise.
1440 * include/grub/command.h: Likewise.
1441 * include/grub/extcmd.h: Likewise.
1442 * kern/command.c: Likewise.
1443 * kern/corecmd.c: Likewise.
1444
1445 * kern/list.c (grub_list_iterate): Return int instead of void.
1446 (grub_list_insert): New function.
1447 (grub_prio_list_insert): Likewise.
1448
1449 * kern/rescue.c (grub_rescue_command): Removed.
1450 (grub_rescue_command_list): Likewise.
1451 (grub_rescue_register_command): Likewise.
1452 (grub_rescue_unregister_command): Likewise.
1453 (grub_rescue_cmd_boot): Move to minicmd.c
1454 (grub_rescue_cmd_help): Likewise.
1455 (grub_rescue_cmd_info): Likewise.
1456 (grub_rescue_cmd_boot): Likewise.
1457 (grub_rescue_cmd_testload): Likewise.
1458 (grub_rescue_cmd_dump): Likewise.
1459 (grub_rescue_cmd_rmmod): Likewise.
1460 (grub_rescue_cmd_lsmod): Likewise.
1461 (grub_rescue_cmd_exit): Likewise.
1462 (grub_rescue_print_devices): Moved to corecmd.c.
1463 (grub_rescue_print_files): Likewise.
1464 (grub_rescue_cmd_ls): Likewise.
1465 (grub_rescue_cmd_insmod): Likewise.
1466 (grub_rescue_cmd_set): Likewise.
1467 (grub_rescue_cmd_unset): Likewise.
7d074e3c 1468 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 1469 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 1470 commands, remove grub_rescue_register_command calls.
b1b797cb 1471
7d074e3c 1472 * normal/command.c (grub_register_command): Removed.
b1b797cb 1473 (grub_unregister_command): Likewise.
1474 (grub_command_find): Likewise.
1475 (grub_iterate_commands): Likewise.
1476 (rescue_command): Likewise.
1477 (export_command): Moved to corecmd.c.
1478 (set_command): Removed.
1479 (unset_command): Likewise.
1480 (insmod_command): Likewise.
1481 (rmmod_command): Likewise.
1482 (lsmod_command): Likewise.
1483 (grub_command_init): Likewise.
1484
1485 * normal/completion.c (iterate_command): Use cmd->prio to check for
1486 active command.
1487 (complete_arguments): Use grub_extcmd_t structure to find options.
1488 (grub_normal_do_completion): Change function grub_iterate_commands to
1489 grub_command_iterate.
1490
1491 * normal/execute.c (grub_script_execute_cmd): No need to parse
1492 argument here.
1493
1494 * normal/main.c (grub_dyncmd_dispatcher): New function.
1495 (read_command_list): Register unload commands as dyncmd.
1496 (grub_cmd_normal): Use new command interface, register rescue,
1497 unregister normal at entry, register normal, unregister rescue at exit.
1498
1499 * include/grub/list.h (grub_list_test_t): New type.
1500 (grub_list_iterate): Return int instead of void.
1501 (grub_list_insert): New function.
1502 (GRUB_AS_NAMED_LIST_P): New macro.
1503 (GRUB_AS_PRIO_LIST): Likewise.
1504 (GRUB_AS_PRIO_LIST_P): Likewise.
1505 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
1506 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
1507 (grub_prio_list): New structure.
1508 (grub_prio_list_insert): New function.
1509 (grub_prio_list_remove): New inline function.
1510
1511 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
1512 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
1513 (GRUB_COMMAND_FLAG_MENU): Likewise.
1514 (GRUB_COMMAND_FLAG_BOTH): Likewise.
1515 (GRUB_COMMAND_FLAG_TITLE): Likewise.
1516 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
1517 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
1518 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
1519 (grub_command): Likewise.
1520 (grub_register_command): Likewise.
1521 (grub_command_find): Likewise.
1522 (grub_iterate_commands): Likewise.
1523 (grub_command_init): Likewise.
1524 (grub_arg_parse): Likewise.
1525 (grub_arg_show_help): Likewise.
1526
1527 * include/grub/rescue.h (grub_rescue_register_command): Removed.
1528 (grub_rescue_unregister_command): Likewise.
1529
1530 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
1531 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
1532 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
1533
1534 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
1535 grub_rescue_cmd_initrd.
1536 * include/grub/i386/loader.h: Likewise.
1537 * include/grub/x86_64/loader.h: Likewise.
1538
1539 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
1540
1f4147aa 15412009-03-21 Bean <bean123ch@gmail.com>
1542
1543 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
1544 instead of stat in mingw environment.
1545
1546 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
1547
1548 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
1549
1550 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
1551 AC_CONFIG_LINKS.
1552
2156d5ba 15532009-03-21 Bean <bean123ch@gmail.com>
1554
1555 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
1556 out of range error.
1557
177b82ca 15582009-03-18 Michel Dänzer <michel@daenzer.net>
1559
1560 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
1561 checking inode flags for EXT4_EXTENTS_FLAG.
1562
14aad807 15632009-03-18 Robert Millan <rmh@aybabtu.com>
1564
1565 * loader/i386/linux.c: Include `<grub/video.h>' and
1566 `<grub/i386/pc/vbe.h>'..
1567 (grub_linux_setup_video): New function. Loosely based on the EFI one.
1568 (grub_linux32_boot): Attempt to configure video settings with
1569 grub_linux_setup_video().
1570 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
1571 to avoid grub_console_fini() which would step out of graphical mode
1572 unconditionally.
1573
8cf83a27 15742009-03-14 Robert Millan <rmh@aybabtu.com>
1575
1576 Fix build on powerpc.
1577 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
1578
40164e75 15792009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
1580
1581 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
1582 background image command.
1583
c58bc32a 15842009-03-12 Colin D Bennett <colin@gibibit.com>
1585
1586 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
1587 (grub_gfxterm_putchar): Extract pairs of identical calls to
1588 draw_cursor out of conditional blocks.
1589
5415144a 15902009-03-11 Pavel Roskin <proski@gnu.org>
1591
1592 * fs/hfs.c (grub_hfs_strncasecmp): New function.
1593 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
1594
6394042e 15952009-03-11 Robert Millan <rmh@aybabtu.com>
1596
1597 * loader/i386/multiboot_elfxx.c
1598 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
1599
b7b50e5f 16002009-03-11 Felix Zielcke <fzielcke@z-51.de>
1601
1602 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
1603 `kern/handler.c'.
1604
1ca7fc96 16052009-03-11 Robert Millan <rmh@aybabtu.com>
1606
1607 * loader/i386/multiboot.c (code_size): New variable.
1608 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 1609 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 1610 4-byte alignment to MBI and others by increasing
7d074e3c 1611 `boot_loader_name_length' appropriately.
1ca7fc96 1612
1613 * loader/i386/multiboot_elfxx.c
1614 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
1615
a83ea1d2 16162009-03-09 Felix Zielcke <fzielcke@z-51.de>
1617
1618 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
1619 `fs/ext2.c'.
1620
aa9f3bff 16212009-03-08 Robert Millan <rmh@aybabtu.com>
1622
1623 Make loader/i386/linux.c usable on i386-pc again.
1624
1625 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
1626 memory to heap.
1627 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
1628 `#error' stanza.
1629
d8b3b60e 16302009-03-07 Bean <bean123ch@gmail.com>
1631
1632 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
1633 allocation.
1634
b362c9e9 16352009-03-06 Robert Millan <rmh@aybabtu.com>
1636
1637 Fix display issue on terminals with screen size other than 80x25
1638 (e.g. gfxterm with resolution higher than 640x480).
1639
1640 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 1641 position relative to the center of the terminal instead of relying
b362c9e9 1642 on a hardcoded offset.
1643
9304eef1 16442009-03-04 Robert Millan <rmh@aybabtu.com>
1645
1646 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
1647 installed.
1648
1649 * Makefile.in (host_kernel): New variable.
1650 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
1651 scripts instead of just the windows one.
1652 * configure.ac: Initialize and AC_SUBST `host_kernel'.
1653
eabc95fb 16542009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 1655
1656 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
1657 `kern/handler.c'.
1658 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1659 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1660 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1661 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1662 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1663 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1664
ceb1223c 16652009-03-04 Felix Zielcke <fzielcke@z-51.de>
1666
1667 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
1668 or if there's no space for the disk label and print the partition number on a
1669 invalid magic.
1670
4910684a 16712009-03-04 Felix Zielcke <fzielcke@z-51.de>
1672
1673 * util/misc.c: Include <time.h>.
1674 (grub_millisleep): New function.
1675
7e9ca17a 16762009-03-04 Bean <bean123ch@gmail.com>
1677
1678 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
1679 another option -mno-red-zone.
1680
1681 * commands/handler.c: Change module description.
1682
1683 * kern/handler.c: Add missing space at the end of description line.
1684
1685 * kern/list.c: Likewise.
1686
f501677c 16872009-03-03 Robert Millan <rmh@aybabtu.com>
1688
1689 Move more components to the relocation area, and fix mbi pointer
1690 handling to use the destination rather than the origin (thanks to
1691 Vladimir Serbinenko for spotting).
1692
1693 * loader/i386/multiboot.c (mbi_dest): New variable.
1694 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
1695 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
1696 relocation area.
1697
9902d047 16982009-03-01 Bean <bean123ch@gmail.com>
1699
50fb7002 1700 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 1701 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
1702 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
1703 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
1704
1705 * loader/i386/efi/linux.c (acpi_guid): New variable.
1706 (acpi_guid): Likewise.
1707 (EBDA_SEG_ADDR): New constant.
1708 (LOW_MEM_ADDR): Likewise.
1709 (FAKE_EBDA_SEG): Likewise.
1710 (fake_bios_data): New function.
1711 (grub_linux_boot): Call fake_bios_data.
1712
71b9f361 17132009-03-01 Bean <bean123ch@gmail.com>
1714
1715 * commands/terminal.c: Removed.
1716
1717 * commands/handler.c: New file.
1718
1719 * include/grub/list.h: Likewise.
1720
1721 * include/grub/handler.h: Likewise.
1722
1723 * kern/list.c: Likewise.
1724
1725 * kern/handler.c: Likewise.
1726
1727 * kern/term.h: Include header file <grub/handler.h>.
1728 (grub_term_input): Move next field to the beginning.
1729 (grub_term_output): Likewise.
1730 (grub_term_input_class): New variable.
1731 (grub_term_output_class): Likewise.
1732 (grub_term_register_input): Changed to inline function.
1733 (grub_term_register_output): Likewise.
1734 (grub_term_unregister_input): Likewise.
1735 (grub_term_unregister_output): Likewise.
1736 (grub_term_set_current_input): Likewise.
1737 (grub_term_set_current_output): Likewise.
1738 (grub_term_get_current_input): Likewise.
1739 (grub_term_get_current_output): Likewise.
1740 (grub_term_iterate_input): Removed.
1741 (grub_term_iterate_output): Likewise.
1742
1743 * kern/term.c (grub_term_list_input): Removed.
1744 (grub_term_list_output): Likewise.
1745 (grub_term_input_class): New variable.
1746 (grub_term_output_class): Likewise.
50fb7002 1747 (grub_cur_term_input): Change variable as macro.
71b9f361 1748 (grub_cur_term_output): Likewise.
1749 (grub_term_register_input): Removed.
1750 (grub_term_register_output): Likewise.
1751 (grub_term_unregister_input): Likewise.
1752 (grub_term_unregister_output): Likewise.
1753 (grub_term_set_current_input): Likewise.
1754 (grub_term_set_current_output): Likewise.
1755 (grub_term_iterate_input): Likewise.
1756 (grub_term_iterate_output): Likewise.
1757 (grub_term_get_current_input): Likewise.
1758 (grub_term_get_current_output): Likewise.
1759
1760 * util/grub-editenv.c: Include header file <grub/handler.h>.
1761 (grub_term_get_current_input): Removed.
1762 (grub_term_get_current_output): Likewise.
1763 (grub_term_input_class): New variable.
50fb7002 1764 (grub_term_output_class): Likewise.
71b9f361 1765
1766 * util/grub-fstest.c (grub_term_get_current_input): Removed.
1767 (grub_term_get_current_output): Likewise.
1768 (grub_term_input_class): New variable.
50fb7002 1769 (grub_term_output_class): Likewise.
71b9f361 1770
1771 * util/grub-probe.c (grub_term_get_current_input): Removed.
1772 (grub_term_get_current_output): Likewise.
1773 (grub_term_input_class): New variable.
50fb7002 1774 (grub_term_output_class): Likewise.
71b9f361 1775
1776 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
1777 (grub_term_get_current_output): Likewise.
1778 (grub_term_input_class): New variable.
50fb7002 1779 (grub_term_output_class): Likewise.
71b9f361 1780
1781 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
1782 (terminal_mod_SOURCES): Likewise.
1783 (terminal_mod_CFLAGS): Likewise.
1784 (terminal_mod_LDFLAGS): Likewise.
1785
1786 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
1787 handler.c.
1788 (kernel_img_SOURCES): Add list.c and handler.c.
1789 (kernel_img_HEADERS): Add list.h and handler.h.
1790
1791 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1792 handler.c.
1793 (kernel_mod_SOURCES): Add list.c and handler.c.
1794 (kernel_mod_HEADERS): Add list.h and handler.h.
1795
1796 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
1797 handler.c.
1798 (kernel_elf_SOURCES): Add list.c and handler.c.
1799 (kernel_elf_HEADERS): Add list.h and handler.h.
1800
1801 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1802 handler.c.
1803 (kernel_elf_SOURCES): Add list.c and handler.c.
1804 (kernel_elf_HEADERS): Add list.h and handler.h.
1805
1806 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1807 handler.c.
1808 (kernel_mod_SOURCES): Add list.c and handler.c.
1809 (kernel_mod_HEADERS): Add list.h and handler.h.
1810
1811 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1812 handler.c.
1813 (kernel_elf_SOURCES): Add list.c and handler.c.
1814 (kernel_elf_HEADERS): Add list.h and handler.h.
1815
8a31787f 18162009-02-27 Robert Millan <rmh@aybabtu.com>
1817
1818 Factorize elf32 / elf64 code in Multiboot loader. This will
1819 prevent it from getting out of sync again.
1820
1821 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
1822 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
1823 grub_multiboot_load_elf64): Move from here ...
1824 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
1825 grub_multiboot_load_elf): ... to here (new file).
1826
51cd3dfc 18272009-02-27 Robert Millan <rmh@aybabtu.com>
1828
1829 * util/grub.d/10_linux.in: Rename "single-user mode" to
1830 "recovery mode".
1831
6e8c9c3a 18322009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
1833
1834 Don't leak in SCSI code.
1835 * disk/scsi.c (grub_scsi_close): free `scsi'.
1836
4b6bf4f9 18372009-02-27 Robert Millan <rmh@aybabtu.com>
1838
1839 * loader/i386/pc/multiboot.c: Move from here ...
1840 * loader/i386/multiboot.c: ... to here. Update all users.
1841
b9413424 18422009-02-27 Robert Millan <rmh@aybabtu.com>
1843
1844 Patch from Alexandre Bique <bique.alexandre@gmail.com>
1845 * util/i386/pc/grub-setup.c (setup): Fix directory path.
1846
50fb7002 18472009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 1848
1849 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
1850 b-tree.
1851
8cc50345 18522009-02-27 Robert Millan <rmh@aybabtu.com>
1853
1854 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
1855 `0x' qualifier as 0 when base is specified as parameter).
1856
6e09b8b7 18572009-02-24 Bean <bean123ch@gmail.com>
1858
1859 * configure.ac: Check for -mcmodel=large in x86_64 target.
1860
1861 * include/grub/efi/api.h (efi_call_10): New macro.
1862 (efi_wrap_10): New function.
1863
1864 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
1865 (GRUB_PE32_REL_BASED_HIGH): Likewise.
1866 (GRUB_PE32_REL_BASED_LOW): Likewise.
1867 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
1868 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
1869 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
1870 (GRUB_PE32_REL_BASED_SECTION): Likewise.
1871 (GRUB_PE32_REL_BASED_REL): Likewise.
1872 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
1873 (GRUB_PE32_REL_BASED_DIR64): Likewise.
1874 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
1875
1876 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
1877 issue.
1878
1879 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
1880 (efi_wrap_10): New function.
1881
1882 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
1883
1884 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
1885 MB/MBP model (NV chipset).
1886 (devdata_devs): Add devpath_5 to the list.
1887
1888 * load/i386/efi/linux.c (video_base): Remove variable.
1889 (RGB_MASK): New macro.
1890 (RGB_MAGIC): Likewise.
1891 (LINE_MIN): Likewise.
1892 (LINE_MAX): Likewise.
1893 (FBTEST_STEP): Likewise.
1894 (FBTEST_COUNT): Likewise.
1895 (fb_list): New variable.
1896 (grub_find_video_card): Remove function.
1897 (find_framebuf): New function.
1898 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
1899 line length.
1900
1901 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
1902 problem for x86_64.
1903
74b21bee 19042009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
1905
1906 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
1907
1908 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
1909 coding tool name.
1910
a455f472 19112009-02-22 Robert Millan <rmh@aybabtu.com>
1912
1913 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
1914 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
1915 in our relocation, instead of using it directly from heap. Also
1916 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
1917
6374daf3 19182009-02-21 Robert Millan <rmh@aybabtu.com>
1919
1920 Implement USB keyboard support (based on patch by Marco Gerards)
1921
1922 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
1923 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
1924 (usb_keyboard_mod_LDFLAGS): New variables.
1925
1926 * term/usb_keyboard.c: New file.
1927
8fa4ea70 19282009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
1929
1930 Corrected wrong declaration
1931
1932 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
1933
353976ac 19342009-02-14 Christian Franke <franke@computer.org>
1935
1936 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
1937 (grub_lspci_iter): Print class code and programming interface byte.
1938
6aa1169b 19392009-02-14 Christian Franke <franke@computer.org>
1940
1941 * gendistlist.sh: Ignore `.svn' directories.
1942
265372ca 19432009-02-14 Felix Zielcke <fzielcke@z-51.de>
1944
1945 * fs/fat.c: Add 2009 to Copyright line.
1946
9ff516f3 19472009-02-14 Christian Franke <franke@computer.org>
1948
1949 * commands/hdparm.c: New file. Provides `hdparm' command
1950 which sends ATA commands via grub_disk_ata_pass_through ().
1951
1952 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
1953
1954 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
1955 and <grub/cpu/io.h> to include/grub/ata.h.
1956 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
1957 (GRUB_CDROM_SECTOR_SIZE): Remove.
1958 (GRUB_ATA_*): Move to include/grub/ata.h.
1959 (GRUB_ATAPI_*): Likewise.
1960 (enum grub_ata_commands): Likewise.
1961 (enum grub_ata_timeout_milliseconds): Likewise.
1962 (struct grub_ata_device): Likewise.
1963 (grub_ata_regset): Likewise.
1964 (grub_ata_regget): Likewise.
1965 (grub_ata_regset2): Likewise.
1966 (grub_ata_regget2): Likewise.
1967 (grub_ata_check_ready): Likewise.
1968 (grub_ata_wait_not_busy): Remove static, exported in
1969 include/grub/ata.h.
1970 (grub_ata_wait_drq): Likewise.
1971 (grub_ata_pio_read): Likewise.
1972
1973 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
1974 function for hdparm.mod.
1975
1976 * include/grub/ata.h: New file, contains declarations from
1977 disk/ata.c.
1978 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
1979
1980 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
1981 (grub_disk_ata_pass_through): New exported variable.
1982
1983 * kern/disk.c (grub_disk_ata_pass_through): New variable.
1984
772e23da 19852009-02-13 Colin D Bennett <colin@gibibit.com>
1986
1987 Support multiple fallback entries, and provide an API to support
1988 executing default+fallback menu entries. Renamed the `terminal' menu
1989 viewer to `text'.
1990
1991 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
1992 variable declaration.
1993 (grub_menu_execute_callback): New structure declaration.
1994 (grub_menu_execute_callback_t): New typedef.
1995 (grub_menu_execute_with_fallback): New function declaration.
1996 (grub_menu_get_entry): Likewise.
1997 (grub_menu_get_timeout): Likewise.
1998 (grub_menu_set_timeout): Likewise.
1999
2000 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
2001
2002 * normal/menu.c (grub_wait_after_message): Moved to
2003 `normal/menu_text.c'.
2004 (draw_border): Likewise.
2005 (print_message): Likewise.
2006 (print_entry): Likewise.
2007 (print_entries): Likewise.
2008 (grub_menu_init_page): Likewise.
2009 (get_entry_number): Likewise.
2010 (print_timeout): Likewise.
2011 (run_menu): Likewise.
2012 (grub_menu_execute_entry): Likewise.
2013 (show_text_menu): Likewise.
2014 (get_and_remove_first_entry_number): New function.
2015 (grub_menu_execute_with_fallback): Likewise.
2016 (get_entry): Renamed to ...
2017 (grub_menu_get_entry): .. this and made it global.
2018 (get_timeout): Renamed to ...
2019 (grub_menu_get_timeout): ... this and made it global.
2020 (set_timeout): Renamed to ...
2021 (grub_menu_set_timeout): ... this and made it global.
2022 (grub_normal_terminal_menu_viewer): Renamed to ...
2023 (grub_normal_text_menu_viewer): ... this.
2024
2025 * normal/menu_text.c: New file. Extracted text-menu-specific code
2026 from normal/menu.c.
2027
2028 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
2029 (normal_mod_SOURCES): Likewise.
2030
2031 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2032 (normal_mod_SOURCES): Likewise.
2033
2034 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2035 (normal_mod_SOURCES): Likewise.
2036
2037 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2038 (normal_mod_SOURCES): Likewise.
2039
2040 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2041 (normal_mod_SOURCES): Likewise.
2042
2043 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2044 (normal_mod_SOURCES): Likewise.
2045
2046 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2047 (normal_mod_SOURCES): Likewise.
2048
16ac430e 20492009-02-11 Robert Millan <rmh@aybabtu.com>
2050
2051 * util/grub.d/00_header.in: Update old reference to `font' command.
2052
06ff20fc 20532009-02-10 Felix Zielcke <fzielcke@z-51.de>
2054
2055 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2056
2057 Based on patch from Javier Martín.
2058
96da9407 20592009-02-09 Felix Zielcke <fzielcke@z-51.de>
2060
2061 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 2062 to avoid false positives with FAT.
96da9407 2063 (grub_fstest_SOURCES): Likewise.
2064 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2065 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2066 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2067 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2068 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2069 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2070
6dca6fe4 20712009-02-09 Felix Zielcke <fzielcke@z-51.de>
2072
06ff20fc 2073 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 2074 bpb.version_specific.fat12_or_fat16.fstype and
2075 bpb.version_specific.fat32.fstype.
2076
2550c62f 20772009-02-08 Robert Millan <rmh@aybabtu.com>
2078
be110b30 2079 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 2080
56978920 20812009-02-08 Robert Millan <rmh@aybabtu.com>
2082
2083 * Makefile.in (host_os, host_cpu): New variables.
2084 (target_os): Remove. Update all users.
2085
d64399b5 20862009-02-08 Marco Gerards <marco@gnu.org>
2087
2088 * Makefile.in (enable_grub_emu_usb): New variable.
2089 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2090 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2091 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2092 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2093 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2094 `usbtest.mod' and `usbms.mod'.
2095 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2096 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2097 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2098 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2099 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2100 variables.
2101
2102 * disk/usbms.c: New file.
2103
2104 * include/grub/usb.h: Likewise.
2105
2106 * include/grub/usbtrans.h: Likewise.
2107
2108 * include/grub/usbdesc.h: Likewise.
2109
2110 * bus/usb/usbtrans.c: Likewise.
2111
2112 * bus/usb/ohci.c: Likewise.
2113
2114 * bus/usb/uhci.c: Likewise.
2115
2116 * bus/usb/usbhub.c: Likewise.
2117
2118 * bus/usb/usb.c: Likewise.
2119
2120 * commands/usbtest.c: Likewise.
2121
2122 * util/usb.c: Likewise.
50fb7002 2123
d64399b5 2124 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2125
2126 * configure.ac: Test for libusb presence.
50fb7002 2127
d64399b5 2128 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2129
2b40d6bb 21302009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
2131
2132 * kern/mm.c: Add more comments.
2133
73a4ce81 21342009-02-08 Robert Millan <rmh@aybabtu.com>
2135
2136 Patch from Javier Martín.
2137 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2138 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2139
f821ce59 21402009-02-08 Robert Millan <rmh@aybabtu.com>
2141
2142 * fs/cpio.c: Split tar functionality to ...
2143 * fs/tar.c: ... here (new file). Update all users.
2144
aebfc4b0 21452009-02-07 Robert Millan <rmh@aybabtu.com>
2146
2147 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2148 backward-incompatible features.
2149
2150 Based on patch from Javier Martín, with some adjustments.
2151
50fb7002 21522009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 2153
2154 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2155
0bb5115e 21562009-02-07 Robert Millan <rmh@aybabtu.com>
2157
2158 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2159 position of `disk/lvm.c' to ensure grub_init_all() always picks it
2160 after the RAID stuff.
2161
38a0f8e7 21622009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
2163
50fb7002 2164 Fixes problem when running vbetest command as reported by
38a0f8e7 2165 Vladimir Serbinenko <phcoder@gmail.com>.
2166
2167 * (grub_vbe_set_video_mode): Fixed problem with text modes.
2168
3143cc1c 21692009-02-04 Felix Zielcke <fzielcke@z-51.de>
2170
2171 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2172 /dev/md/NpN style mdraid devices.
2173
9cba6fce 21742009-02-03 Felix Zielcke <fzielcke@z-51.de>
2175
2176 * util/unifont2pff.rb: Remove.
2177
e507a2c1 21782009-02-03 Felix Zielcke <fzielcke@z-51.de>
2179
2180 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2181 `#'.
2182
d2c2b4cd 21832009-02-03 Felix Zielcke <fzielcke@z-51.de>
2184
2185 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2186 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2187 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2188 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2189 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2190 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2191 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2192
b4315fb0 21932009-02-02 Christian Franke <franke@computer.org>
2194
2195 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2196
de3aa260 21972009-02-01 Felix Zielcke <fzielcke@z-51.de>
2198
7c3ff286 2199 * INSTALL: Note that we now require at least autoconf 2.59 and
2200 that LZO is optional.
de3aa260 2201
825a182b 22022009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2203
2204 Base on patch on bug #24154 created by Tomas Tintera
2205 <trosos@seznam.cz>.
2206
2207 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2208
a69ef770 22092009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2210
7c3ff286 2211 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 2212 <bero@arklinux.org>.
2213
2214 * normal/parser.y (script_init): Add missing semicolon.
2215
6fa42fa6 22162009-01-31 Colin D Bennett <colin@gibibit.com>
2217
7c3ff286 2218 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 2219 (free_menu_entry_classes): Added.
2220 (grub_normal_menu_addentry): Added class property handling.
2221 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2222 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2223
2224 * normal/menu_viewer.c: New file.
2225
2226 * normal/menu.c (run_menu_entry): Renamed to ...
2227 (grub_menu_execute_entry): ... this and made it as global.
2228 (grub_menu_run): Renamed to ...
2229 (show_text_menu): ... this and made it local.
2230 (show_text_menu): Adapt to new function names.
2231 (grub_normal_terminal_menu_viewer): New global variable.
2232
2233 * include/grub/menu.h: New file.
2234
2235 * include/grub/menu_viewer.h: New file.
2236
2237 * include/grub/normal.h: Added include to grub/menu.h.
2238 (grub_menu_entry): Moved to include/grub/menu.h.
2239 (grub_menu_entry_t): Likewise.
2240 (grub_menu): Likewise.
2241 (grub_menu_t): Likewise.
2242 (grub_normal_terminal_menu_viewer): Added.
2243 (grub_menu_execute_entry): Likewise.
2244 (grub_menu_run): Removed.
2245
2246 * DISTLIST: Added include/grub/menu.h.
2247 Added include/grub/menu_viewer.h.
2248 Added normal/menu_viewer.c.
2249
22502009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
2251
2252 * normal/execute.c (grub_script_execute_menuentry): Changed to use
2253 arglist for menutitle arguments.
2254
2255 * normal/main.c (grub_normal_menu_addentry): Likewise.
2256
2257 * normal/parser.y (menuentry): Likewise.
2258
2259 * normal/script.c (grub_script_create_cmdmenu): Likewise.
2260
2261 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2262 (grub_script_create_cmdmenu): Likewise.
2263
2264 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2265
2266 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2267 changes.
2268
2269 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2270
2271 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2272
2273 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2274
2275 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2276
2277 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2278
2279 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2280
56192c23 22812009-01-30 Christian Franke <franke@computer.org>
2282
2283 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2284 in option help text.
2285
d72521b3 22862009-01-27 Pavel Roskin <proski@gnu.org>
2287
2288 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2289
994b5e84 22902009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2291
2292 * commands/lsmmap.c: Add include to grub/machine/memory.h.
2293
2294 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2295
2296 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2297 unregister function.
2298
6a7eab2c 22992009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2300
2301 * disk/scsi.c (grub_scsi_read): Fix sign problem.
2302
2303 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2304
2305 * util/grub-mkfont.c (usage): Fix typo.
2306
2307 * util/elf/grub-mkimage.c (load_modules): Fix warning.
2308
1806b56e 23092009-01-26 Daniel Mierswa <impulze@impulze.org>
2310
3fb18f09 2311 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2312
336e1fb9 2313 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2314
1806b56e 2315 * kern/misc.c (grub_strcasecmp): New function.
2316 (grub_strcasecmp): Use grub_size_t instead of int for length.
2317 Fix return value.
2318 * include/grub/misc.h: Update function prototypes.
2319
580b2a0f 23202009-01-26 Robert Millan <rmh@aybabtu.com>
2321
2322 * configure.ac: Fix cross-compilation check.
ef257b36 2323
d31c24f1 23242009-01-22 Christian Franke <franke@computer.org>
2325
2326 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2327 (precision) digit string. Allow `.format2' without `format1' (width).
2328 Limit input chars for `%s' output to `format2' if specified. This is
2329 compatible with standard printf ().
2330
3138b44c 23312009-01-22 Christian Franke <franke@computer.org>
2332
2333 * disk/ata.c (grub_ata_wait_status): Replace by ...
2334 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
2335 other status bits may be invalid while BSY is asserted.
2336 (grub_ata_check_ready): New function.
2337 (grub_ata_cmd): Removed.
2338 (grub_ata_wait_drq): New function.
2339 (grub_ata_strncpy): Remove inline.
2340 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
2341 and error check now done by grub_ata_wait_drq ().
2342 (grub_ata_pio_write): Likewise.
2343 (grub_atapi_identify): Set DEV before check for !BSY. Use
2344 grub_ata_wait_drq () to wait for data.
2345 (grub_ata_device_initialize): Add status register check to
2346 detect missing SATA slave devices. Add debug messages.
2347 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2348 (grub_atapi_packet): Set DEV before check for !BSY. Replace
2349 transfer loop by grub_ata_pio_write ().
2350 (grub_ata_identify): Set DEV before check for !BSY. Use
2351 grub_ata_wait_drq () to wait for data.
ef257b36 2352 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 2353 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2354 read/write in one loop. Fix invalid command on write. Fix incomplete
2355 command on (size % batch) == 0. Add missing error check after write of
2356 last block. Add debug messages.
2357 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
2358
59a64ef6 23592009-01-19 Christian Franke <franke@computer.org>
2360
2361 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
2362 (GRUB_ATAPI_IREASON_*): Likewise.
2363 (grub_ata_pio_write): Fix timeout error return.
2364 (grub_atapi_identify): Add grub_ata_wait () after cmd.
2365 (grub_atapi_wait_drq): New function.
2366 (grub_atapi_packet): New parameter `size'.
2367 Use grub_atapi_wait_drq () and direct write instead of
2368 grub_ata_pio_write ().
2369 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
2370 reads the number of bytes requested by the device for each DRQ
2371 assertion.
2372 (grub_atapi_write): Remove old implementation, return not
2373 implemented instead.
2374
1cfe20b3 23752009-01-19 Christian Franke <franke@computer.org>
2376
2377 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
2378 of 512 to calculate data size.
2379 (grub_scsi_read12): Likewise.
2380 (grub_scsi_write10): Likewise.
2381 (grub_scsi_write12): Likewise.
2382 (grub_scsi_read): Adjust size according to blocksize.
2383 Add checks for invalid blocksize and unaligned transfer.
2384
bee5fe5d 23852009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
2386
2387 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
2388
ef257b36 2389 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 2390 width glyphs.
2391
3e643f8c 23922009-01-19 Robert Millan <rmh@aybabtu.com>
2393
2394 * config.guess: Update to latest version from config git.
2395 * config.sub: Likewise.
2396
4fa80998 23972009-01-17 Felix Zielcke <fzielcke@z-51.de>
2398
2399 * Makefile.in: Change font compilation to use new grub-mkfont instead
2400 of java version.
2401
2402 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2403 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2404 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2405 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2406 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2407 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2408 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2409 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2410 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2411
7086085b 24122009-01-16 Christian Franke <franke@computer.org>
2413
2414 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
2415 (enum grub_ata_timeout_milliseconds): New enum.
2416 (grub_ata_wait_status): Add parameter milliseconds.
2417 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
2418 recovery from timed-out commands.
2419 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
2420 return grub_errno instead of REG_ERROR.
2421 (grub_ata_pio_write): Add parameter milliseconds.
2422 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
2423 Pass milliseconds to grub_ata_wait_status () and
2424 grub_ata_pio_read ().
2425 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
2426 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
2427 grub_ata_wait_status (). Fix IDENTIFY timeout check.
2428 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
2429 It is not suitable for device detection, because DEV bit is ignored,
2430 the command may run too long, and not all devices set the signature
2431 properly.
2432 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
2433 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
2434 Fix device selection, DEV bit must be set first to address the registers
2435 of the correct device.
2436 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
2437 grub_ata_pio_read/write ().
2438 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
2439 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
2440
4a412913 24412009-01-13 Carles Pina i Estany <carles@pina.cat>
2442
2443 * util/grub-editenv.c (main): Use fseeko(), not fseek().
2444
7795c55e 24452009-01-13 Bean <bean123ch@gmail.com>
d913988c 2446
2447 * util/grub-mkfont.c (write_font): forget to remove some debug code.
2448
7795c55e 24492009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 2450
2451 * Makefile.in: (enable_grub_mkfont): New variable.
2452 (freetype_cflags): Likewise.
2453 (freetype_libs): Likewise.
2454
2455 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
2456 (grub_mkfont_SOURCES): New variable.
2457 (grub_mkfont_CFLAGS): Likewise.
2458 (grub_mkfont_LDFLAGS): Likewise.
2459
2460 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
2461 library if `--enable-grub-mkfont' is requested.
2462 (enable_grub_mkfont): New variable.
2463 (freetype_cflags): Likewise.
2464 (freetype_libs): Likewise.
2465
2466 * util/grub-mkfont.c: New file.
2467
093af1fe 24682009-01-12 Christian Franke <franke@computer.org>
2469
2470 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
2471 mode check. Fix setting of compat_use[].
2472
f36cc108 24732009-01-10 Robert Millan <rmh@aybabtu.com>
2474
2475 Update a few copyright years which we forgot to do in 2008 (only for
2476 files whose changes made in 2008 were copyright-significant)
2477
2478 * Makefile.in: Add 2008 to Copyright line.
2479 * disk/ieee1275/ofdisk.c: Likewise.
2480 * disk/efi/efidisk.c: Likewise.
2481 * kern/dl.c: Likewise.
2482 * kern/sparc64/ieee1275/init.c: Likewise.
2483 * kern/mm.c: Likewise.
2484 * kern/efi/mm.c: Likewise.
2485 * boot/i386/pc/boot.S: Likewise.
2486 * genfslist.sh: Likewise.
2487 * fs/iso9660.c: Likewise.
2488 * fs/hfs.c: Likewise.
2489 * fs/jfs.c: Likewise.
2490 * fs/minix.c: Likewise.
2491 * fs/ufs.c: Likewise.
2492 * gensymlist.sh.in: Likewise.
2493 * genkernsyms.sh.in: Likewise.
2494 * include/grub/misc.h: Likewise.
2495 * include/grub/types.h: Likewise.
2496 * include/grub/symbol.h: Likewise.
2497 * include/grub/elf.h: Likewise.
2498 * include/grub/kernel.h: Likewise.
2499 * include/grub/disk.h: Likewise.
2500 * include/grub/dl.h: Likewise.
2501 * include/grub/i386/linux.h: Likewise.
2502 * include/grub/i386/pc/biosdisk.h: Likewise.
2503 * include/grub/efi/api.h: Likewise.
2504 * include/grub/efi/pe32.h: Likewise.
2505 * include/grub/util/misc.h: Likewise.
2506 * normal/execute.c: Likewise.
2507 * normal/arg.c: Likewise.
2508 * normal/completion.c: Likewise.
2509 * normal/lexer.c: Likewise.
2510 * normal/parser.y: Likewise.
2511 * normal/misc.c: Likewise.
2512 * commands/i386/pc/vbeinfo.c: Likewise.
2513 * commands/hexdump.c: Likewise.
2514 * commands/terminal.c: Likewise.
2515 * commands/ls.c: Likewise.
2516 * commands/help.c: Likewise.
2517 * partmap/pc.c: Likewise.
2518 * loader/efi/chainloader.c: Likewise.
2519 * loader/multiboot_loader.c: Likewise.
2520 * loader/i386/pc/multiboot2.c: Likewise.
2521 * term/efi/console.c: Likewise.
2522 * term/i386/pc/serial.c: Likewise.
2523 * util/lvm.c: Likewise.
2524 * util/console.c: Likewise.
2525 * util/i386/efi/grub-mkimage.c: Likewise.
2526 * util/raid.c: Likewise.
2527
7f02114b 25282009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
2529
2530 * commands/videotest.c: Removed include to grub/machine/memory.h.
2531
2532 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
2533 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
2534 (video_mod_SOURCES): Removed.
2535 (video_mod_CFLAGS): Likewise.
2536 (video_mod_LDFLAGS): Likewise.
2537 (gfxterm_mod_SOURCES): Likewise.
2538 (gfxterm_mod_CFLAGS): Likewise.
2539 (gfxterm_mod_LDFLAGS): Likewise.
2540 (videotest_mod_SOURCES): Likewise.
2541 (videotest_mod_CFLAGS): Likewise.
2542 (videotest_mod_LDFLAGS): Likewise.
2543 (bitmap_mod_SOURCES): Likewise.
2544 (bitmap_mod_CFLAGS): Likewise.
2545 (bitmap_mod_LDFLAGS): Likewise.
2546 (tga_mod_SOURCES): Likewise.
2547 (tga_mod_CFLAGS): Likewise.
2548 (tga_mod_LDFLAGS): Likewise.
2549 (jpeg_mod_SOURCES): Likewise.
2550 (jpeg_mod_CFLAGS): Likewise.
2551 (jpeg_mod_LDFLAGS): Likewise.
2552 (png_mod_SOURCES): Likewise.
2553 (png_mod_CFLAGS): Likewise.
2554 (png_mod_LDFLAGS): Likewise.
2555
2556 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
2557 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
2558 (video_mod_SOURCES): Added.
2559 (video_mod_CFLAGS): Likewise.
2560 (video_mod_LDFLAGS): Likewise.
2561 (videotest_mod_SOURCES): Likewise.
2562 (videotest_mod_CFLAGS): Likewise.
2563 (videotest_mod_LDFLAGS): Likewise.
2564 (bitmap_mod_SOURCES): Likewise.
2565 (bitmap_mod_CFLAGS): Likewise.
2566 (bitmap_mod_LDFLAGS): Likewise.
2567 (tga_mod_SOURCES): Likewise.
2568 (tga_mod_CFLAGS): Likewise.
2569 (tga_mod_LDFLAGS): Likewise.
2570 (jpeg_mod_SOURCES): Likewise.
2571 (jpeg_mod_CFLAGS): Likewise.
2572 (jpeg_mod_LDFLAGS): Likewise.
2573 (png_mod_SOURCES): Likewise.
2574 (png_mod_CFLAGS): Likewise.
2575 (png_mod_LDFLAGS): Likewise.
2576 (gfxterm_mod_SOURCES): Likewise.
2577 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 2578 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 2579
2580 * term/gfxterm.c: Removed include to grub/machine/memory.h,
2581 grub/machine/console.h.
2582
644fff97 25832009-01-04 Jerone Young <jerone@gmail.com>
2584
2585 Make on screen instructions clearer
2586
2587 Based on patch created by Jidanni <jidanni@jidanni.org>
2588
2589 * normal/menu.c: print clearer instructions on the screen
2590
1e901a75 25912009-01-02 Colin D Bennett <colin@gibibit.com>
2592
2593 New font engine.
34c44600 2594
1e901a75 2595 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
2596 build system and fixed gfxterm.c to work with different sized fonts.
2597
2598 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 2599
1e901a75 2600 * configure: Re-generated.
34c44600 2601
1e901a75 2602 * DISTLIST: Removed font/manager.c.
2603 Added font/font.c.
2604 Added font/font_cmd.c.
34c44600 2605
1e901a75 2606 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
2607 compilation.
34c44600 2608
1e901a75 2609 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 2610
2611 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 2612
2613 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 2614
1e901a75 2615 * normal/menu.c: Likewise.
34c44600 2616
1e901a75 2617 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
2618 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 2619
1e901a75 2620 * include/grub/font.h: Replaced with new file.
34c44600 2621
1e901a75 2622 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
2623 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
2624 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
2625 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
2626 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 2627 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 2628 fg_red, fg_green, fg_blue, fg_alpha.
2629 (grub_video_adapter): Removed blit_glyph.
34c44600 2630 (grub_video_blit_glyph): Removed.
2631
1e901a75 2632 * font/manager.c: Removed file.
34c44600 2633
2634 * font/font.c: New file.
2635
1e901a75 2636 * font/font_cmd.c: Likewise.
34c44600 2637
1e901a75 2638 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 2639
1e901a75 2640 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
2641 (grub_video_vbe_map_rgba): Likewise.
2642 (grub_video_vbe_unmap_color_int): Likewise.
2643 (grub_video_vbe_blit_glyph): Removed.
2644 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 2645
1e901a75 2646 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
2647 (get_pixel): Likewise.
34c44600 2648 (set_pixel): Likewise.
2649
1e901a75 2650 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 2651
1e901a75 2652 * term/gfxterm.c: Adapted to new font engine.
34c44600 2653
1e901a75 2654 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 2655
1e901a75 2656 * term/i386/pc/vga.c: Likewise.
34c44600 2657
1e901a75 2658 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 2659
1e901a75 2660 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 2661
1e901a75 2662 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 2663
1e901a75 2664 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 2665
1e901a75 2666 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 2667
1e901a75 2668 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 2669
1e901a75 2670 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 2671
1e901a75 2672 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 2673
1e901a75 2674 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2675
2676 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 2677
1e901a75 2678 * util/grub-mkconfig_lib.in: Changed font extension.
2679
278922e8 26802008-12-28 Felix Zielcke <fzielcke@z-51.de>
2681
2682 * util/getroot.c (grub_util_get_grub_dev): Add support for
2683 /dev/md/dNNpNN style partitionable mdraid devices.
2684
3ced05cf 26852008-12-12 Alex Smith <alex@alex-smith.me.uk>
2686
2687 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
2688 at a time limit of the PXE TFTP API correctly.
2689 (grub_pxefs_close): Likewise.
2690
7fd0ee30 26912008-11-29 Robert Millan <rmh@aybabtu.com>
2692
34c44600 2693 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 2694 grub_ata_device_initialize() calls.
2695
34c44600 26962008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 2697
2698 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
2699 iteration failed.
2700 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
2701
89313780 27022008-11-28 Robert Millan <rmh@aybabtu.com>
2703
2704 Fix build on powerpc-ieee1275. Based on patch created by
2705 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
2706 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2707 `kern/ieee1275/mmap.c'.
2708 * include/grub/powerpc/ieee1275/memory.h: New file.
2709
15257703 2710 Provide grub-install on coreboot.
2711 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
2712 (grub_install_SOURCES): New variable.
2713 * util/i386/pc/grub-install.in: Add a few condition checks to make it
2714 usable on coreboot.
2715
9fc5388a 27162008-11-25 Felix Zielcke <fzielcke@z-51.de>
2717
2718 * util/grub-fstest.c (grub_term_get_current_input): Change return type
2719 to `grub_term_input_t'.
2720 (grub_term_get_current_output): Change return type to
2721 `grub_term_output_t'.
2722
bc3a2f31 27232008-11-22 Robert Millan <rmh@aybabtu.com>
2724
34c44600 2725 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 2726 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
2727 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
2728 grub_vga_text_cls().
2729
80fc88f2 2730 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 2731 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 2732
cbf36fd3 2733 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
2734 to 0x200000 (avoids trouble with some OFW implementations, and matches
2735 with the one in Yaboot).
2736 Reported by Manoel Abranches
2737
73e8e268 27382008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 2739
2740 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
2741 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
2742
73e8e268 2743 * util/grub-mkconfig_lib.in (grub_warn): New function.
2744 (convert_system_path_to_grub_path): Use grub_warn() when issuing
2745 warnings, to obtain consistent formatting.
2746 * util/grub.d/00_header.in: Likewise.
2747 * util/update-grub_lib.in: Likewise.
2748
e94045a1 2749 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 2750 Move comment text to `#error' stanza.
e94045a1 2751
79d29fd7 2752 Harmonize ieee1275's grub_available_iterate() with the generic
2753 grub_machine_mmap_iterate() interface (fixes a recently-introduced
2754 build problem on i386-ieee1275):
2755 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
2756 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
2757 parameter `type'. Update all users of this function.
2758 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
2759 `kern/ieee1275/mmap.c'.
2760 * kern/ieee1275/init.c
2761 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
2762 with ...
2763 (grub_machine_mmap_iterate): ... this.
2764 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
2765 return type to `grub_err_t'. Update all implementations of this
2766 function prototype.
2767 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
2768 Likewise.
2769
60d6b16e 2770 Add `lsmmap' command (lists firmware-provided memory map):
2771 * commands/lsmmap.c: New file.
2772 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
2773 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
2774 variables.
2775 * conf/powerpc-ieee1275.rmk: Likewise.
2776 * conf/i386-coreboot.rmk: Likewise.
2777 * conf/i386-ieee1275.rmk: Likewise.
2778
ebaaf49b 27792008-11-19 Robert Millan <rmh@aybabtu.com>
2780
2781 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 2782 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
2783 constraints to initrd allocation (based on code from
2784 loader/i386/pc/linux.c). Without them, initrd was allocated too high
2785 for Linux to find it.
ebaaf49b 2786
dfab719f 27872008-11-14 Robert Millan <rmh@aybabtu.com>
2788
2789 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
2790 order to cope with duplicate slashes.
2791
10fc3eb9 27922008-11-14 Robert Millan <rmh@aybabtu.com>
2793
2794 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
2795 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
2796 don't want to mess with lower memory, because it is used in the Linux
2797 loader.
2798
2799 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 2800 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 2801 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
2802 is in our heap (probably as a result of it being corrupted during
2f2a3442 2803 decompression). Add #error instance with comment to explain why this
2804 loader isn't currently usable on PC/BIOS.
10fc3eb9 2805
e2e07847 28062008-11-14 Robert Millan <rmh@aybabtu.com>
2807
2808 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 2809 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 2810
fe8e8d69 28112008-11-12 Robert Millan <rmh@aybabtu.com>
2812
2813 Make loader/i386/linux.c buildable on i386-pc (although disabled).
2814
2815 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
2816 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
2817 from here ...
2818 * include/grub/i386/pc/memory.h: ... to here.
2819
976b07d0 28202008-11-12 Robert Millan <rmh@aybabtu.com>
2821
2822 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
2823 split).
2824
2825 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
2826 (grub_console_cur_color, grub_console_real_putchar)
2827 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2828 (grub_console_setcolorstate, grub_console_setcolor)
2829 (grub_console_getcolor): Move from here ...
2830 * include/grub/i386/vga_common.h: ... to here (new file).
2831
2832 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
2833 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
2834 `<grub/i386/io.h>'.
2835 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
2836 `<grub/i386/vga_common.h>'.
2837
76679cd3 28382008-11-12 Robert Millan <rmh@aybabtu.com>
2839
2840 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
2841 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
2842 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
2843 variables.
2844 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2845 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
2846
2847 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
2848 grub_console_init() with call to grub_vga_text_init().
2849 (grub_machine_fini): Replace call to
2850 grub_console_fini() with call to grub_vga_text_fini() and
2851 grub_at_keyboard_fini().
2852
2853 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
2854 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2855 (grub_console_setcolorstate, grub_console_setcolor)
2856 (grub_console_getcolor): New function prototypes.
2857
2858 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
2859 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
2860 (grub_vga_text_setcursor): Static-ize.
2861 (grub_vga_text_term): New structure.
2862 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
2863
2864 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
2865 (grub_console_cur_color, grub_console_standard_color)
2866 (grub_console_normal_color, grub_console_highlight_color)
2867 (map_char, grub_console_putchar, grub_console_getcharwidth)
2868 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
2869 (grub_console_getcolor): Move from here ...
2870 * term/i386/vga_common.c: ... to here (same function names).
2871
95b841d3 28722008-11-12 Robert Millan <rmh@aybabtu.com>
2873
2874 Use newly-added Multiboot support in coreboot.
2875
2876 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2877 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
2878
2879 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
2880 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
2881 (codestart): Store the MBI in `startup_multiboot_info' when we're
2882 being loaded using Multiboot.
2883
2884 * kern/i386/coreboot/init.c (grub_machine_init): Move
2885 grub_at_keyboard_init() call to beginning of function (useful for
2886 debugging). Call grub_machine_mmap_init() before attempting to use
2887 grub_machine_mmap_iterate().
2888 (grub_lower_mem, grub_upper_mem): Move from here ...
2889 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
2890 here (new file).
2891
2892 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
2893 function prototype.
2894
761ca975 28952008-11-12 Robert Millan <rmh@aybabtu.com>
2896
2897 Fix a regression introduced by the at_keyboard.mod split. Because
2898 some terminals are default on some platforms and non-default on
2899 others, the first terminal being registered determines which is
2900 going to be default.
2901
2902 * kern/term.c (grub_term_register_input): If this is the first
2903 terminal being registered, set it as the current one.
2904 (grub_term_register_output): Likewise.
2905
2906 * term/efi/console.c (grub_console_init): Do not call
2907 grub_term_set_current_output() or grub_term_set_current_input().
2908 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
2909 * term/i386/pc/console.c (grub_console_init): Likewise.
2910 (grub_console_fini): Do not call grub_term_set_current_input()
2911 (but leave grub_term_set_current_output() to restore text mode).
2912
6c529df7 29132008-11-10 Robert Millan <rmh@aybabtu.com>
2914
2915 * util/grub.d/00_header.in: Add backward compatibility check for
2916 versions of terminal.mod that don't understand `terminal_input' or
2917 `terminal_output'.
2918
132e4113 29192008-11-09 Robert Millan <rmh@aybabtu.com>
2920
2921 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
2922 `terminal_input' / `terminal_output', not `terminal'.
2923
ac293d50 29242008-11-08 Robert Millan <rmh@aybabtu.com>
2925
2926 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 2927 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 2928
0025933a 29292008-11-08 Robert Millan <rmh@aybabtu.com>
2930
2931 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 2932 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 2933 members. Update all users.
2934 * util/console.c (grub_ncurses_term): Split in ...
2935 (grub_ncurses_term_input): ... this, and ...
2936 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 2937 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 2938
37c86336 29392008-11-08 Robert Millan <rmh@aybabtu.com>
2940
2941 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
2942 (PKGDATA): Add $(pkgdata_SRCDIR).
2943 (pkglib_BUILDDIR): New variable.
2944 (pkgdata_SRCDIR): New variable.
2945 (build_env.mk): New target.
2946 (include_DATA): New variable.
2947 (install-local): Install $(include_DATA) files in $(includedir).
2948
b6c15a2d 29492008-11-07 Pavel Roskin <proski@gnu.org>
2950
d99d46f1 2951 * gendistlist.sh: Use C locale for sorting to ensure consistent
2952 output on all systems.
2953
b6c15a2d 2954 * util/grub.d/00_header.in: Remove incorrect space before
2955 "serial".
2956
c32ee8c9 29572008-11-07 Robert Millan <rmh@aybabtu.com>
2958
2959 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
2960 per specification.
2961 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
2962 * loader/multiboot_loader.c (find_multi_boot2_header): New function
2963 (based on find_multi_boot1_header).
2964 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
2965 using find_multi_boot2_header(), and abort if neither Multiboot or
2966 Multiboot headers were found.
2967
651c29b7 29682008-11-07 Robert Millan <rmh@aybabtu.com>
2969
2970 Modularize at_keyboard.mod:
2971
2972 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
2973 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
2974 (at_keyboard_mod_LDFLAGS): New variables.
2975
2976 Actual terminal split:
2977
2978 * include/grub/term.h (struct grub_term): Split in ...
2979 (struct grub_term_input): ... this, and ...
2980 (struct grub_term_output): ... this. Update all users.
2981 (grub_term_set_current): Split in ...
2982 (grub_term_set_current_input): ... this, and ...
2983 (grub_term_set_current_output): ... this.
2984 (grub_term_get_current): Split in ...
2985 (grub_term_get_current_input): ... this, and ...
2986 (grub_term_get_current_output): ... this.
2987 (grub_term_register): Split in ...
2988 (grub_term_register_input): ... this, and ...
2989 (grub_term_register_output): ... this.
2990 (grub_term_unregister): Split in ...
2991 (grub_term_unregister_input): ... this, and ...
2992 (grub_term_unregister_output): ... this.
2993 (grub_term_iterate): Split in ...
2994 (grub_term_iterate_input): ... this, and ...
2995 (grub_term_iterate_output): ... this.
2996
2997 * kern/term.c (grub_term_list): Split in ...
2998 (grub_term_list_input): ... this, and ...
2999 (grub_term_list_output): ... this. Update all users.
3000 (grub_cur_term): Split in ...
3001 (grub_cur_term_input): ... this, and ...
3002 (grub_cur_term_output): ... this. Update all users.
3003 (grub_term_set_current): Split in ...
3004 (grub_term_set_current_input): ... this, and ...
3005 (grub_term_set_current_output): ... this.
3006 (grub_term_get_current): Split in ...
3007 (grub_term_get_current_input): ... this, and ...
3008 (grub_term_get_current_output): ... this.
3009 (grub_term_register): Split in ...
3010 (grub_term_register_input): ... this, and ...
3011 (grub_term_register_output): ... this.
3012 (grub_term_unregister): Split in ...
3013 (grub_term_unregister_input): ... this, and ...
3014 (grub_term_unregister_output): ... this.
3015 (grub_term_iterate): Split in ...
3016 (grub_term_iterate_input): ... this, and ...
3017 (grub_term_iterate_output): ... this.
3018
3019 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
3020 a check for input and one for output (and only attempt to get keys
3021 from user when input works).
3022
3023 * util/grub-probe.c (grub_term_get_current): Split in ...
3024 (grub_term_get_current_input): ... this, and ...
3025 (grub_term_get_current_output): ... this.
3026 * util/grub-fstest.c: Likewise.
3027 * util/i386/pc/grub-setup.c: Likewise.
3028 * util/grub-editenv.c: Likewise.
3029
3030 Portability adjustments:
3031
3032 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
3033 `term/i386/pc/at_keyboard.c'.
3034 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
3035 grub_keyboard_controller_init() (now handled by terminal .init).
3036 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3037 grub_at_keyboard_init().
3038 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3039 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3040 at_keyboard.mod via input terminal interface).
3041 * include/grub/i386/coreboot/console.h: Convert into a stub for
3042 `<grub/i386/pc/console.h>'.
3043
3044 Migrate full terminals to new API:
3045
3046 * term/efi/console.c (grub_console_term): Split into ...
3047 (grub_console_term_input): ... this, and ...
3048 (grub_console_term_output): ... this. Update all users.
3049 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3050 (grub_ofconsole_init): Split into ...
3051 (grub_ofconsole_init_input): ... this, and ...
3052 (grub_ofconsole_init_output): ... this.
3053 (grub_ofconsole_term): Split into ...
3054 (grub_ofconsole_term_input): ... this, and ...
3055 (grub_ofconsole_term_output): ... this. Update all users.
3056 * term/i386/pc/serial.c (grub_serial_term): Split into ...
3057 (grub_serial_term_input): ... this, and ...
3058 (grub_serial_term_output): ... this. Update all users.
3059 * term/i386/pc/console.c (grub_console_term): Split into ...
3060 (grub_console_term_input): ... this, and ...
3061 (grub_console_term_output): ... this. Update all users.
3062 (grub_console_term_input): Only enable it on PC/BIOS platform.
3063 (grub_console_init): Remove grub_keyboard_controller_init() call.
3064
3065 Migrate input terminals to new API:
3066
3067 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3068 `i386' and `i386/pc' to enable build on x86_64 (this driver is
3069 i386-specific anyway).
3070 (grub_console_checkkey): Rename to ...
3071 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
3072 users.
3073 (grub_keyboard_controller_orig): New variable.
3074 (grub_console_getkey): Rename to ...
3075 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
3076 users.
3077 (grub_keyboard_controller_init): Static-ize. Save original
3078 controller value so that it can be restored ...
3079 (grub_keyboard_controller_fini): ... here (new function).
3080 (grub_at_keyboard_term): New structure.
3081 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3082 functions.
3083
3084 Migrate output terminals to new API:
3085
3086 * term/i386/pc/vga.c (grub_vga_term): Change type to
3087 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3088 members. Update all users.
3089 * term/gfxterm.c (grub_video_term): Change type to
3090 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3091 members. Update all users.
3092 * include/grub/i386/pc/console.h (grub_console_checkkey)
3093 (grub_console_getkey): Do not export (no longer needed by gfxterm,
3094 etc).
3095
3096 Migrate `terminal' command and userland tools to new API:
3097
3098 * commands/terminal.c (grub_cmd_terminal): Split into ...
3099 (grub_cmd_terminal_input): ... this, and ...
3100 (grub_cmd_terminal_output): ... this.
3101 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3102 `terminal_input' and `terminal_output'.
3103 * util/grub.d/00_header.in: Adjust `terminal' calls to new
3104 `terminal_input' / `terminal_output' API.
3105 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3106 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3107 provided ${GRUB_TERMINAL}, convert it).
3108
96e5d876 31092008-11-04 Robert Millan <rmh@aybabtu.com>
3110
3111 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
3112 for FreeBSD.
3113 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3114
556f3775 31152008-11-03 Bean <bean123ch@gmail.com>
3116
3117 * kern/elf.c (grub_elf32_load): Revert to previous code.
3118 (grub_elf64_load): Likewise.
3119
3120 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3121
926b9823 31222008-11-01 Robert Millan <rmh@aybabtu.com>
3123
3124 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3125 (TARGET_CPPFLAGS): Likewise.
3126 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3127
1432e958 31282008-11-01 Carles Pina i Estany <carles@pina.cat>
3129
3130 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3131
dba3f844 31322008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 3133
3134 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3135 addition of objects until the code is not going to be able to fail.
3136
dba3f844 31372008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 3138
3139 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3140 (add a missing NULL check, and correct them by moving the pointer
3141 operations after the actual check).
3142
7ab28c21 31432008-10-29 Robert Millan <rmh@aybabtu.com>
3144
3145 * util/i386/pc/grub-install.in: Handle empty string as output from
3146 make_system_path_relative_to_its_root().
3147
1b7748eb 31482008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
3149
3150 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3151 circular metadata worst case scenario. If the metadata is circular
3152 then copy the wrap in place.
3153 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3154 project lib/format_text/layout.h
3155 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3156
c9618ab2 31572008-10-03 Felix Zielcke <fzielcke@z-51.de>
3158
7a36edca 3159 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 3160
bf981c62 31612008-10-03 Felix Zielcke <fzielcke@z-51.de>
3162
3163 * util/update-grub_lib.in: Mention filename in warning message.
3164
6d994591 31652008-09-29 Felix Zielcke <fzielcke@z-51.de>
3166
3167 * NEWS: Update for rename of update-grub to grub-mkconfig.
3168
18ade780 31692008-09-29 Felix Zielcke <fzielcke@z-51.de>
3170
3171 * util/update-grub_lib.in: Copy to ...
3172 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 3173 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 3174 * util/update-grub.in: Rename to ...
3175 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
3176 option. Add `--output' option to allow users to specify the generated
3177 configuration file. Default to stdout.
3178 (update_grub_dir): Rename to ...
3179 (grub_mkconfig_dir): ... this.
3180 (grub_cfg): Default to an empty string.
3181 * conf/common.rmk (update-grub): Rename to ...
3182 (grub-mkconfig): ... this.
3183 (update-grub_lib): Copy to ...
3184 (grub-mkconfig_lib): ... this.
3185 (update-grub_SCRIPTS): Copy to ...
3186 (grub-mkconfig_SCRIPTS): ... this. Update all users.
3187 (update-grub_DATA): Rename to ...
3188 (grub-mkconfig_DATA): ... this.
3189
556ce6ac 31902008-09-28 Robert Millan <rmh@aybabtu.com>
3191
3192 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3193 to `modified'. Add the real `created' field.
3194 (grub_iso9660_uuid): Use `modified' rather than `created' for
3195 constructing the UUID.
3196
31972008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 3198
3199 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3200 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3201
92274e85 32022008-09-28 Bean <bean123ch@gmail.com>
3203
3204 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3205 Thanks to Christian Franke for finding this bug.
3206
add6f17a 32072008-09-25 Robert Millan <rmh@aybabtu.com>
3208
3209 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3210 instances of grub_util_get_disk_name() (see previous commit).
3211
d2a367b8 32122008-09-25 Robert Millan <rmh@aybabtu.com>
3213
3214 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3215 `util/i386/get_disk_name.c'.
3216 * conf/i386-efi.rmk: Likewise.
3217 * conf/x86_64-efi.rmk: Likewise.
3218 * conf/i386-coreboot.rmk: Likewise.
3219 * conf/i386-ieee1275.rmk: Likewise.
3220 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3221 `util/ieee1275/get_disk_name.c'.
3222 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3223 * util/ieee1275/get_disk_name.c: Remove file.
3224 * util/i386/get_disk_name.c: Remove file.
3225 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3226 "hd%d" for device.map entries, rather than using
3227 grub_util_get_disk_name().
3228
81a06771 32292008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 3230
3231 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3232 warning.
3233 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3234
5a004279 32352008-09-24 Carles Pina i Estany <carles@pina.cat>
3236
3237 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3238 Changed to 0x5100.
3239 (GRUB_TERM_PPAGE): Changed to 0x4900.
3240
397093d3 32412008-09-24 Robert Millan <rmh@aybabtu.com>
3242
3243 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3244 macros (they were i386-pc specific).
3245 * include/grub/sparc64/ieee1275/console.h: Likewise.
3246 * include/grub/efi/console.h: Likewise.
3247
a91b6c7c 32482008-09-22 Bean <bean123ch@gmail.com>
3249
3250 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3251 resident and in attribute list.
3252
3253 * include/grub/ntfs.h (BMP_LEN): Removed.
3254
c40fd116 32552008-09-22 Bean <bean123ch@gmail.com>
3256
81a06771 3257 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 3258 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3259
3260 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3261 error occurs, as grub_disk_open will call grub_disk_close, which will
3262 call p->close (scsi).
3263
81a06771 32642008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 3265
3266 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3267 (AC_PREREQ): Bumped to 2.59.
3268 (AC_TRY_COMPILE): Replace obsolete macro with ...
3269 (AC_COMPILE_IFELSE): ... this.
3270 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3271 (AC_LINK_IFELSE): ... this.
3272
5dc43410 32732008-09-21 Felix Zielcke <fzielcke@z-51.de>
3274
3275 * autogen.sh: Add a call to `gendistlist.sh'.
3276
9035dce4 32772008-09-19 Christian Franke <franke@computer.org>
3278
3279 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3280 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3281 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3282 Export __enable_execute_stack() to modules.
3283 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3284 New function.
3285
7fd75377 32862008-09-09 Felix Zielcke <fzielcke@z-51.de>
3287
040030b3 3288 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3289 Sort the list.
3290
32912008-09-09 Felix Zielcke <fzielcke@z-51.de>
3292
3293 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 3294 #include <grub/util/hostdisk.h>.
3295
89d5ffcf 32962008-09-08 Robert Millan <rmh@aybabtu.com>
3297
3298 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3299 segments when their filesz is zero (grub_file_read() interprets
81a06771 3300 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 3301 Use `lowest_segment' rather than 0 for calculating the current
3302 segment load address.
3303
40da438f 33042008-09-08 Robert Millan <rmh@aybabtu.com>
3305
3306 * util/hostdisk.c (open_device): Replace a grub_util_info() call
3307 with grub_dprintf("hostdisk", ...), as it was so verbose that it
3308 clobbered useful information.
3309
ddbf5556 33102008-09-08 Robert Millan <rmh@aybabtu.com>
3311
3312 * include/grub/util/biosdisk.h: Move to ...
3313 * include/grub/util/hostdisk.h: ... here. Update all users.
3314 * util/biosdisk.c: Move to ...
3315 * util/hostdisk.c: ... here. Update all users.
3316
783d0f48 33172008-09-07 Robert Millan <rmh@aybabtu.com>
3318
3319 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3320 variables.
3321 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3322 and length can be stored directly in the `mbi->mmap_addr' and
3323 `mbi->mmap_length' struct fields.
3324
548e2ea5 33252008-09-07 Robert Millan <rmh@aybabtu.com>
3326
3327 * conf/i386.rmk: New file. Provides declaration for building
3328 `cpuid.mod'.
3329 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3330 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3331 variables.
3332 Include `conf/i386.mk'.
3333 * conf/i386-efi.rmk: Likewise.
3334 * conf/x86_64-efi.rmk: Likewise.
3335 * conf/i386-coreboot.rmk: Likewise.
3336 * conf/i386-ieee1275.rmk: Likewise.
3337
0ea85a37 33382008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
3339
3340 Based on patch created by Colin D Bennett <colin@gibibit.com>.
3341 Adds optimization support for BGR based modes.
3342
3343 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3344 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3345 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3346 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3347 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3348 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3349 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3350 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3351 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3352 (grub_video_i386_vbeblit_index_index): Likewise.
3353 (grub_video_i386_vbeblit_replace_directN): Added.
3354 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3355 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3356 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3357 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3358 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3359 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 3360 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 3361 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3362 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3363 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3364 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3365 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3366 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3367
3368 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
3369 (grub_video_i386_vbefill_R8G8B8): Likewise.
3370 (grub_video_i386_vbefill_index): Likewise.
3371 (grub_video_i386_vbefill_direct32): Added.
3372 (grub_video_i386_vbefill_direct24): Likewise.
3373 (grub_video_i386_vbefill_direct16): Likewise.
3374 (grub_video_i386_vbefill_direct8): Likewise.
3375
81a06771 3376 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 3377 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
3378 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
3379 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
3380 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
3381 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 3382
0ea85a37 3383 * video/video.c (grub_video_get_blit_format): Updated to use new
3384 blit formats. Added handling for 16 bit color modes.
81a06771 3385
3386 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 3387 fillers.
3388 (common_blitter): Updated to use new blitters.
3389
3390 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
3391 Removed.
3392 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3393 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3394 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3395 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3396 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3397 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3398 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3399 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3400 (grub_video_i386_vbeblit_index_index): Likewise.
3401 (grub_video_i386_vbeblit_replace_directN): Added.
3402 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3403 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3404 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3405 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3406 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3407 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3408 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3409 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3410 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3411 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3412 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3413 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3414 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 3415
0ea85a37 3416 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
3417 (grub_video_i386_vbefill_R8G8B8): Likewise.
3418 (grub_video_i386_vbefill_index): Likewise.
3419 (grub_video_i386_vbefill_direct32): Added.
3420 (grub_video_i386_vbefill_direct24): Likewise.
3421 (grub_video_i386_vbefill_direct16): Likewise.
3422 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 3423
0ea85a37 3424 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
3425 types.
81a06771 3426
0ea85a37 3427 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
3428 types.
81a06771 3429
0ea85a37 3430 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
3431 blitter types.
81a06771 3432
0ea85a37 3433 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
3434 types.
3435
e8a83df6 34362008-09-06 Felix Zielcke <fzielcke@z-51.de>
3437
3438 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
3439 RAID level 1.
3440
6bcd8ee5 34412008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 3442
6bcd8ee5 3443 * fs/iso9660.c (grub_iso9660_date): New structure.
3444 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
3445 (grub_iso9660_uuid): New function.
c375ae58 3446
59261157 34472008-09-05 Bean <bean123ch@gmail.com>
3448
3449 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
3450
3451 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
3452 insensitive bit for names in Win32 and Win32 & DOS namespace.
3453
3454 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
3455
3456 * include/grub/types.h (LONG_MAX): Likewise.
3457
58b6645a 34582008-09-04 Felix Zielcke <fzielcke@z-51.de>
3459
4ee55921 3460 * util/getroot.c: Include <config.h>.
3461 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
3462 add support for /dev/md/N devices and handle LVM double dash escaping.
3463
34642008-09-04 Felix Zielcke <fzielcke@z-51.de>
3465
3466 * config.guess: Update to latest version from config git.
3467 * config.sub: Likewise.
58b6645a 3468
9124f65d 34692008-09-03 Robert Millan <rmh@aybabtu.com>
3470
3471 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
3472 `disk->total_sectors'.
3473
81a06771 34742008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 3475
3476 * include/grub/normal.h: Fixed incorrect comment for
3477 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
3478
81a06771 34792008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 3480
3481 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
3482 values with defines.
3483
3484 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
3485 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
3486 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
3487 (GRUB_VBE_MODEATTR_COLOR): Likewise.
3488 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
3489 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
3490 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
3491 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
3492 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
3493 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
3494 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
3495 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
3496 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
3497 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
3498 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
3499 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
3500 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
3501 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
3502 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
3503
93d5cbf8 35042008-08-31 Robert Millan <rmh@aybabtu.com>
3505
3506 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
3507 declaration.
3508 (grub_multiboot): Fix a few warnings.
3509
21751d50 35102008-08-31 Robert Millan <rmh@aybabtu.com>
3511
3512 * loader/i386/pc/multiboot.c: Update comment not to say that
3513 boot_device support is unimplemented.
3514
e27a75c5 35152008-08-31 Robert Millan <rmh@aybabtu.com>
3516
3517 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
3518 or memory map support are unimplemented.
3519
81a06771 35202008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 3521
3522 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
3523
81a06771 35242008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 3525
3526 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
3527 total video memory in 'vbeinfo' output; show color format details for
3528 each video mode.
3529
7c5d8d95 35302008-08-30 Pavel Roskin <proski@gnu.org>
3531
3532 * util/genmoddep.c: Remove for real this time.
3533 * DISTLIST: Remove util/genmoddep.c.
3534
4cebd25a 35352008-08-30 Robert Millan <rmh@aybabtu.com>
3536
3537 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
3538 as required by Multiboot spec (it was already 4-byte aligned, but
3539 only by chance).
3540
b497a269 35412008-08-29 Pavel Roskin <proski@gnu.org>
3542
e3925185 3543 * kern/powerpc/ieee1275/crt0.S: Rename to ...
3544 * kern/powerpc/ieee1275/startup.S: ... this.
3545 * conf/powerpc-ieee1275.rmk: Adjust for the above.
3546 * DISTLIST: Likewise.
3547
b497a269 3548 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
3549 grub/cpu/kernel.h. Add start label for consistency with other
3550 platforms. Add grub_prefix immediately after start. Add jump
3551 to the code after grub_prefix.
3552 * include/grub/powerpc/kernel.h: Provide valid values for
3553 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
3554
6e5a42fe 35552008-08-29 Bean <bean123ch@gmail.com>
3556
3557 * configure.ac: Change host_os to cygwin for mingw.
3558 (asprintf): New check for function.
3559
3560 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
3561 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
3562
3563 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 3564 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 3565 sync, sleep and grub_util_get_disk_size for mingw.
3566
3567 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
3568 to get size in mingw.
3569 (open_device): Use flag O_BINARY if it's defined.
3570 (find_root_device): Add dummy code for mingw.
3571
3572 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
3573 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
3574 (get_scsi_disk_name): Return 0 for mingw.
3575
3576 * util/hostfs.c: #include <grub/util/misc.h>.
3577 (grub_hostfs_open): Use "rb" flag to open file, use
3578 grub_util_get_disk_size to get disk size for mingw.
3579
3580 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
3581 (asprintf): New function if HAVE_ASPRINTF is not set.
3582 (sync): New function for mingw.
3583 (sleep): Likewise.
3584 (grub_util_get_disk_size): Likewise.
3585
ab3f2673 35862008-08-28 Pavel Roskin <proski@gnu.org>
3587
3588 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3589 kern/time.c.
3590
1c282483 35912008-08-28 Robert Millan <rmh@aybabtu.com>
3592
3593 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
3594
678e849c 35952008-08-28 Robert Millan <rmh@aybabtu.com>
3596
3597 Change find_grub_drive() syntax so it doesn't prevent it from
3598 detecting NULL names as errors.
3599
3600 * util/biosdisk.c (find_grub_drive): Move free slot search code
3601 from here ...
3602 (find_free_slot): ... to here.
3603 (read_device_map): Use find_free_slot() to search for free slots.
3604
965c75ca 36052008-08-27 Marco Gerards <marco@gnu.org>
3606
3607 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
3608 (scsi_mod_SOURCES): New variable.
3609 (scsi_mod_CFLAGS): Likewise
3610 (scsi_mod_LDFLAGS): Likewise.
3611
3612 * disk/scsi.c: New file.
3613
3614 * include/grub/scsi.h: Likewise.
3615
3616 * include/grub/scsicmd.h: Likewise.
3617
3618 * disk/ata.c: Include <grub/scsi.h>.
3619 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
3620 instead.
3621 (grub_ata_iterate): Skip ATAPI devices.
3622 (grub_ata_open): Only handle ATAPI devices.
3623 (struct grub_atapi_read): Removed.
3624 (grub_atapi_readsector): Likewise.
3625 (grub_ata_read): No longer handle ATAPI devices.
3626 (grub_ata_write): Likewise.
3627 (grub_atapi_iterate): New function.
3628 (grub_atapi_read): Likewise.
3629 (grub_atapi_write): Likewise.
3630 (grub_atapi_open): Likewise.
3631 (grub_atapi_close): Likewise.
3632 (grub_atapi_dev): New variable.
3633 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
3634 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
3635
3636 * include/grub/disk.h (enum grub_disk_dev_id): Add
3637 `GRUB_DISK_DEVICE_SCSI_ID'.
3638
c07ae501 36392008-08-26 Robert Millan <rmh@aybabtu.com>
3640
3641 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
3642 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
3643 descriptive.
3644
5ed20adc 36452008-08-23 Bean <bean123ch@gmail.com>
3646
3647 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
3648 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3649 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
3650 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
3651 dm_nv.mod.
3652 (raid5rec_mod_SOURCES): New macro.
3653 (raid5rec_mod_CFLAGS): Likewise.
3654 (raid5rec_mod_LDFLAGS): Likewise.
3655 (raid6rec_mod_SOURCES): Likewise.
3656 (raid6rec_mod_CFLAGS): Likewise.
3657 (raid6rec_mod_LDFLAGS): Likewise.
3658 (mdraid_mod_SOURCES): Likewise.
3659 (mdraid_mod_CFLAGS): Likewise.
3660 (mdraid_mod_LDFLAGS): Likewise.
3661 (dm_nv_mod_SOURCES): Likewise.
3662 (dm_nv_mod_CFLAGS): Likewise.
3663 (dm_nv_mod_LDFLAGS): Likewise.
3664
3665 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
3666 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3667 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3668
3669 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
3670 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3671
3672 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3673
3674 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3675
3676 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3677
3678 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3679
3680 * disk/raid5_recover.c: New file.
3681
3682 * disk/raid6_recover.c: Likewise.
3683
3684 * disk/mdraid_linux.c: Likewise.
3685
3686 * disk/dmraid_nvidia.c: Likewise.
3687
3688 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
3689 ULONG_MAX.
3690
3691 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
3692 calculate the size of raid device.
3693 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
3694 different layout of raid5.
3695 (grub_raid_scan_device): Remove code specific to mdraid.
3696 (grub_raid_list): New variable.
3697 (free_array): New function.
3698 (grub_raid_register): Likewise.
3699 (grub_raid_unregister): Likewise.
3700 (grub_raid_rescan): Likewise.
3701 (GRUB_MOD_INIT): Don't iterate device here.
3702 (GRUB_MOD_FINI): Use free_array to release resource.
3703
3704 * include/grub/raid.h: Remove macro and structure specific to mdraid.
3705 (grub_raid5_recover_func_t): New function variable type.
3706 (grub_raid6_recover_func_t): Likewise.
3707 (grub_raid5_recover_func): New variable.
3708 (grub_raid6_recover_func): Likewise.
3709 (grub_raid_register): New function.
3710 (grub_raid_unregister): Likewise.
3711 (grub_raid_rescan): Likewise.
3712 (grub_raid_block_xor): Likewise.
3713
3714 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
3715 (CMD_CRC): New macro.
3716 (part): Removed.
3717 (read_file): Handle device as well as file.
3718 (cmd_crc): New function.
3719 (fstest): Handle multiple disks.
3720 (options): Remove part, raw and long, add root and diskcount.
3721 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 3722 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 3723 add handling for the new options, support multiple disks.
3724
3725 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
3726
29c18915 37272008-08-23 Bean <bean123ch@gmail.com>
3728
3729 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
3730
3731 * genfslist.sh: Ignore kernel.mod.
3732
3733 * genpartmaplist.sh: Likewise.
3734
8415f261 37352008-08-23 Robert Millan <rmh@aybabtu.com>
3736
3737 * util/getroot.c (find_root_device): Skip anything that starts with
3738 a dot, not just directories. This avoids things like /dev/.tmp.md0.
3739
d5a7dc5b 37402008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 3741
d5a7dc5b 3742 * util/update-grub.in (GRUB_GFXMODE): Export variable.
3743 * util/grub.d/00_header.in: Allow the administrator to change default
3744 gfxmode via ${GRUB_GFXMODE}.
3745
380cfbb4 37462008-08-21 Felix Zielcke <fzielcke@z-51.de>
3747
3748 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
3749
c9baafe7 37502008-08-21 Robert Millan <rmh@aybabtu.com>
3751
3752 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
3753 loader.
3754 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
3755 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
3756
e290bef2 37572008-08-20 Carles Pina i Estany <carles@pina.cat>
3758
3759 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
3760 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
3761
f9dbfc96 37622008-08-19 Robert Millan <rmh@aybabtu.com>
3763
3764 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
3765 (struct grub_virtual_screen): Remove `cursor_color'.
3766 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
3767 initialization.
3768 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
3769
dd6bd6ab 37702008-08-18 Robert Millan <rmh@aybabtu.com>
3771
3772 Unify (identical) linux_normal.c files.
3773 * loader/i386/efi/linux_normal.c: Move from here ...
3774 * loader/linux_normal.c: ... to here. Update all users.
3775 * loader/i386/pc/linux_normal.c: Delete. Update all users.
3776 * loader/i386/ieee1275/linux_normal.c: Likewise.
3777
7f42f83e 37782008-08-18 Robert Millan <rmh@aybabtu.com>
3779
3780 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
3781 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
3782 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
3783 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
3784 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
3785 New macros.
3786 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
3787 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
3788 (GRUB_LINUX_CL_END_OFFSET): ... to here.
3789 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
3790 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
3791 (GRUB_EFI_CL_END_OFFSET): Rename to ...
3792 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
3793 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
3794 Initialize `params->video_cursor_x' and `params->video_cursor_y'
3795 portably using grub_getxy().
3796 Replace `-EFI' with `-bzImage' in boot message.
3797
38487ddb 37982008-08-17 Robert Millan <rmh@aybabtu.com>
3799
3800 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
3801
deceb3ec 38022008-08-17 Robert Millan <rmh@aybabtu.com>
3803
3804 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
3805
3806 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
3807 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
3808 (grub_machine_mmap_iterate): New function declaration.
3809 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
3810 structure.
3811 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
3812 macros.
3813
3814 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
3815 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
3816 Move e820 parsing from here ...
3817 * kern/i386/pc/mmap.c: New file.
3818 (grub_machine_mmap_iterate): ... to here.
3819
3820 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
3821 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
3822 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
3823 (grub_available_iterate): Redeclare to return `void', and redeclare
3824 its hook to use grub_uint64_t as addr and size parameters, and rename
3825 to ...
3826 (grub_machine_mmap_iterate): ... this. Update all users.
3827
3828 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
3829 to make it more readable. Rename to ...
3830 (grub_machine_mmap_iterate): ... this.
3831
3832 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
3833 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
3834 (grub_multiboot): Allocate an extra region after the payload, and fill
3835 it with a Multiboot memory map. Adjust a.out loader to calculate size
3836 with the extra space.
3837 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
3838 with the extra space.
3839
f8aa0f43 38402008-08-17 Carles Pina i Estany <carles@pina.cat>
3841
9807deb9 3842 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 3843
605f5bb6 38442008-08-17 Felix Zielcke <fzielcke@z-51.de>
3845
3846 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
3847 mdate-sh to the list `find' searches for.
3848 * DISTLIST: Regenerated.
3849
210db6c6 38502008-08-16 Felix Zielcke <fzielcke@z-51.de>
3851
3852 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
3853 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 3854 genmoddep.awk, gensymlist.sh.in.
3855 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 3856 * DISTLIST: Regenerated.
48cdbfd4 3857 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 3858
1082b929 38592008-08-16 Robert Millan <rmh@aybabtu.com>
3860
3861 * disk/raid.c (grub_raid_init): Handle/report errors set by
3862 grub_device_iterate().
3863 * disk/lvm.c (grub_lvm_init): Likewise.
3864
42ce5170 38652008-08-15 Bean <bean123ch@gmail.com>
3866
3867 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3868 and datehook.mod.
3869 (datetime_mod_SOURCES): New macro.
3870 (datetime_mod_CFLAGS): Likewise.
3871 (datetime_mod_LDFLAGS): Likewise.
3872 (date_mod_SOURCES): Likewise.
3873 (date_mod_CFLAGS): Likewise.
3874 (date_mod_LDFLAGS): Likewise.
3875 (datehook_mod_SOURCES): Likewise.
3876 (datehook_mod_CFLAGS): Likewise.
3877 (datehook_mod_LDFLAGS): Likewise.
3878
3879 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3880 and datehook.mod.
3881 (datetime_mod_SOURCES): New macro.
3882 (datetime_mod_CFLAGS): Likewise.
3883 (datetime_mod_LDFLAGS): Likewise.
3884 (date_mod_SOURCES): Likewise.
3885 (date_mod_CFLAGS): Likewise.
3886 (date_mod_LDFLAGS): Likewise.
3887 (datehook_mod_SOURCES): Likewise.
3888 (datehook_mod_CFLAGS): Likewise.
3889 (datehook_mod_LDFLAGS): Likewise.
3890
3891 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3892 and datehook.mod.
3893 (datetime_mod_SOURCES): New macro.
3894 (datetime_mod_CFLAGS): Likewise.
3895 (datetime_mod_LDFLAGS): Likewise.
3896 (date_mod_SOURCES): Likewise.
3897 (date_mod_CFLAGS): Likewise.
3898 (date_mod_LDFLAGS): Likewise.
3899 (datehook_mod_SOURCES): Likewise.
3900 (datehook_mod_CFLAGS): Likewise.
3901 (datehook_mod_LDFLAGS): Likewise.
3902
3903 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3904 and datehook.mod.
3905 (datetime_mod_SOURCES): New macro.
3906 (datetime_mod_CFLAGS): Likewise.
3907 (datetime_mod_LDFLAGS): Likewise.
3908 (date_mod_SOURCES): Likewise.
3909 (date_mod_CFLAGS): Likewise.
3910 (date_mod_LDFLAGS): Likewise.
3911 (datehook_mod_SOURCES): Likewise.
3912 (datehook_mod_CFLAGS): Likewise.
3913 (datehook_mod_LDFLAGS): Likewise.
3914
3915 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3916 and datehook.mod.
3917 (datetime_mod_SOURCES): New macro.
3918 (datetime_mod_CFLAGS): Likewise.
3919 (datetime_mod_LDFLAGS): Likewise.
3920 (date_mod_SOURCES): Likewise.
3921 (date_mod_CFLAGS): Likewise.
3922 (date_mod_LDFLAGS): Likewise.
3923 (datehook_mod_SOURCES): Likewise.
3924 (datehook_mod_CFLAGS): Likewise.
3925 (datehook_mod_LDFLAGS): Likewise.
3926
3927 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
3928
3929 * commands/date.c: New file.
3930
3931 * hook/datehook.c: Likewise.
3932
3933 * include/grub/lib/datetime.h: Likewise.
3934
3935 * include/grub/i386/cmos.h: Likewise.
3936
3937 * lib/datetime.c: Likewise.
3938
3939 * lib/i386/datetime.c: Likewise.
3940
3941 * lib/efi/datetime.c: Likewise.
3942
0e9242da 39432008-08-14 Robert Millan <rmh@aybabtu.com>
3944
3945 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
3946 (grub_mkelfimage_SOURCES): New variable.
3947 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
3948
3949 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
3950 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
3951 * conf/powerpc-ieee1275.rmk: Likewise.
3952 * conf/i386-ieee1275.rmk: Likewise.
3953
3954 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
3955 * kern/i386/coreboot/init.c: Likewise.
3956
3957 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
3958 with `<grub/cpu/kernel.h>'.
3959 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
3960 to ...
3961 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
3962 * kern/i386/coreboot/startup.S: Likewise.
3963
3964 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
3965 (GRUB_MOD_GAP): Remove.
3966 * include/grub/powerpc/kernel.h: New file.
3967 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
3968 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3969 * include/grub/i386/kernel.h: New file.
3970 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
3971 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
3972 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3973
3974 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
3975 `grub-mkelfimage'.
3976 Use --directory when invoking grub_mkimage.
3977
3978 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
3979 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
3980 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
3981 and GRUB_KERNEL_CPU_PREFIX.
3982
b86408f8 39832008-08-14 Felix Zielcke <fzielcke@z-51.de>
3984
d5e619ca 3985 * include/grub/err.h (grub_err_printf): New function prototype.
3986 * util/misc.c (grub_err_printf): New function.
3987 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
3988 grub_printf.
3989 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 3990
7161f0e0 39912008-08-13 Robert Millan <rmh@aybabtu.com>
3992
3993 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
3994
a1967522 39952008-08-13 Robert Millan <rmh@aybabtu.com>
3996
3997 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
3998 boot entry.
3999
371458b5 40002008-08-12 Robert Millan <rmh@aybabtu.com>
4001
4002 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
4003 of the relocation code from here ...
4004 (grub_multiboot): ... to here.
4005 (forward_relocator, backward_relocator): Move from here ...
4006 * kern/i386/loader.S (grub_multiboot_forward_relocator)
4007 (grub_multiboot_backward_relocator): ... to here.
4008 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
4009 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
4010 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
4011 (grub_multiboot_forward_relocator_end)
4012 (grub_multiboot_backward_relocator)
4013 (grub_multiboot_backward_relocator_end): New variables.
4014
05f9452b 40152008-08-12 Bean <bean123ch@gmail.com>
4016
4017 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
4018
20024ab0 40192008-08-11 Robert Millan <rmh@aybabtu.com>
4020
4021 * kern/i386/linuxbios/startup.S: Move from here ...
4022 * kern/i386/coreboot/startup.S: ... to here.
4023
4024 * kern/i386/linuxbios/init.c: Move from here ...
4025 * kern/i386/coreboot/init.c: ... to here.
4026
4027 * kern/i386/linuxbios/table.c: Move from here ...
4028 * kern/i386/coreboot/mmap.c: ... to here.
4029
4030 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
4031
e352e9cd 40322008-08-11 Robert Millan <rmh@aybabtu.com>
4033
4034 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
4035 errors. Leave it to the upper layer to handle them.
4036
2d05bc6a 40372008-08-09 Christian Franke <franke@computer.org>
4038
4039 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4040 * conf/common.rmk: Install `grub-pe2elf' only if requested.
4041 Install `grub.d/10_windows' only on Cygwin.
4042 * configure.ac: Add subst of `target_os'.
4043 Check `target_os' also before setting TARGET_OBJ2ELF.
4044 Add `--enable-grub-pe2elf'.
4045
042bd419 40462008-08-08 Robert Millan <rmh@aybabtu.com>
4047
4048 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4049 (grub_last_time): Change type to grub_uint64_t.
4050 (grub_disk_open): Migrate code from to using grub_get_time_ms().
4051 (grub_disk_close): Likewise.
4052
4053 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4054 (run_menu): Migrate code from to using grub_get_time_ms().
4055
4056 * util/misc.c (grub_get_time_ms): New function.
4057
7f280db5 40582008-08-08 Marco Gerards <marco@gnu.org>
4059
4060 * disk/ata.c (grub_ata_regget): Change return type to
4061 `grub_uint8_t'.
4062 (grub_ata_regget2): Likewise.
4063 (grub_ata_wait_status): New function.
4064 (grub_ata_wait_busy): Removed function, updated all users to use
4065 `grub_ata_wait_status'.
4066 (grub_ata_wait_drq): Likewise.
4067 (grub_ata_cmd): New function.
4068 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
4069 error handling.
4070 (grub_ata_pio_write): Add error handling.
4071 (grub_atapi_identify): Likewise.
4072 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4073 handling.
4074 (grub_ata_identify): Use `grub_ata_cmd' and improve error
4075 handling. Actually use the detected registers. Reorder the
4076 detection logic such that it is easier to read.
4077 (grub_ata_pciinit): Do not assign the same ID to each controller.
4078 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4079 handling.
4080 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4081
4082 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4083
1fbc5e66 40842008-08-08 Marco Gerards <marco@gnu.org>
4085
4086 * NEWS: Update.
4087
819ce6c0 40882008-08-07 Bean <bean123ch@gmail.com>
4089
4090 * include/grub/x86_64/pci.h: New file.
4091
5c41d44d 40922008-08-07 Christian Franke <franke@computer.org>
4093
4094 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4095 (TIMER2_GATE): Likewise.
4096 (grub_pit_wait): Add enable/disable of the timer2 gate
4097 bit of port 0x61. This fixes a possible infinite loop.
4098
5ebc275d 40992008-08-07 Bean <bean123ch@gmail.com>
4100
4101 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4102 kern/i386/tsc.c and kern/i386/pit.c.
4103
4104 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4105 x86_64 platform.
4106
4107 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4108 <grub/i386/tsc.h>.
4109
4110 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4111
e383b3d0 41122008-08-07 Bean <bean123ch@gmail.com>
4113
4114 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4115
4116 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4117
4118 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4119 multiple inclusion. Add #include <grub/types.h>.
4120
1cbb58ac 41212008-08-06 Christian Franke <franke@computer.org>
4122
4123 * conf/common.rmk: Build and install `10_windows'.
4124 * util/grub.d/10_windows.in: New script.
4125
337f5a1e 41262008-08-06 Pavel Roskin <proski@gnu.org>
4127
4128 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4129
057bc4ac 41302008-08-06 Robert Millan <rmh@aybabtu.com>
4131
4132 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4133 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4134
2b99f123 41352008-08-06 Bean <bean123ch@gmail.com>
4136
4137 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4138 (grub_pxefs_fs_int): Remove dummy definition.
4139 (grub_pxefs_open): Use data->block_size to store the current block
4140 size setting.
4141 (grub_pxefs_read): Use block size stored in data->block_size. As the
4142 value of grub_pxe_blksize can be changed after the file is opened.
4143
9f0234cb 41442008-08-06 Bean <bean123ch@gmail.com>
4145
4146 * fs/i386/pc/pxe.c (curr_file): new variable.
4147 (grub_pxefs_open): Simply the handling of pxe file system. Don't
4148 require the dummy internal file system anymore.
4149 (grub_pxefs_read): Removed.
4150 (grub_pxefs_close): Likewise.
4151 (grub_pxefs_fs_int): Likewise.
4152 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4153 connection when we switch file.
4154 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4155
a55d42e0 41562008-08-06 Robert Millan <rmh@aybabtu.com>
4157
4158 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4159 `halt.mod'.
4160 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4161 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4162
4163 * kern/i386/halt.c: New file.
4164 * kern/i386/reboot.c: Likewise.
4165 * include/grub/i386/reboot.h: Likewise.
4166 * include/grub/i386/halt.h: Likewise.
4167
4168 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4169 Include `<grub/cpu/halt.h>'.
4170 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4171 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4172
4173 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4174 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4175 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4176 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4177 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4178 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4179 from here ...
4180 * include/grub/i386/at_keyboard.h: ... to here.
4181
24371d26 41822008-08-05 Robert Millan <rmh@aybabtu.com>
4183
4184 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4185 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4186 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4187 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4188 `kern/generic/millisleep.c'.
4189
4190 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4191 instead of grub_get_rtc().
4192 (grub_tsc_init): Initialize `tsc_boot_time'.
4193
4194 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4195 (grub_machine_init): Use grub_tsc_init() rather than
4196 installing an RTC-based handler via grub_install_get_time_ms().
4197
4198 * kern/i386/pit.c: New file.
4199 * include/grub/i386/pit.h: Likewise.
4200
9e7007b3 42012008-08-05 Bean <bean123ch@gmail.com>
4202
4203 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4204
4205 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4206 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4207 (pxe_mod_SOURCES): New macro.
4208 (pxe_mod_CFLAGS): Likewise.
4209 (pxe_mod_LDFLAGS): Likewise.
4210 (pxecmd_mod_SOURCES): Likewise.
4211 (pxecmd_mod_CFLAGS): Likewise.
4212 (pxecmd_mod_LDFLAGS): Likewise.
4213
4214 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4215 (grub_pxe_call): Likewise.
4216
4217 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4218
4219 * commands/i386/pc/pxecmd.c: New file.
4220
9f0234cb 4221 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 4222
4223 * include/grub/i386/pc/pxe.h: Likewise.
4224
6977d49f 42252008-08-05 Bean <bean123ch@gmail.com>
4226
4227 * util/console.c (grub_console_cur_color): New variable.
4228 (grub_console_standard_color): Likewise.
4229 (grub_console_normal_color): Likewise.
4230 (grub_console_highlight_color): Likewise.
4231 (color_map): Likewise.
4232 (use_color): Likewise.
4233 (NUM_COLORS): New macro.
4234 (grub_ncurses_setcolorstate): Handle color properly.
4235 (grub_ncurses_setcolor): Don't change color here, just remember the
4236 settings, color will be set in grub_ncurses_setcolorstate.
4237 (grub_ncurses_getcolor): New function.
4238 (grub_ncurses_init): Initialize color pairs.
4239 (grub_ncurses_term): New member grub_ncurses_getcolor.
4240
9c2ff3ee 42412008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 4242
9c2ff3ee 4243 High resolution timer support. Implemented for x86 CPUs using TSC.
4244 Extracted generic grub_millisleep() so it's linked in only as needed.
4245 This requires a Pentium compatible CPU; if the RDTSC instruction is
4246 not supported, then it falls back on the generic grub_get_time_ms()
4247 implementation that uses the machine's RTC.
4248
4249 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4250 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4251 `kern/generic/millisleep.c'.
4252
4253 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4254 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4255
4256 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4257 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4258
4259 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4260
4261 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4262 `kern/generic/millisleep.c'.
4263
4264 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4265
4266 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4267
4268 * kern/generic/rtc_get_time_ms.c: New file.
4269
4270 * kern/generic/millisleep.c: New file.
337f5a1e 4271
9c2ff3ee 4272 * kern/misc.c: Don't include
4273 <kern/time.h> anymore.
4274 (grub_millisleep_generic): Removed.
4275
4276 * commands/sleep.c (grub_interruptible_millisleep): Uses
4277 grub_get_time_ms() instead of grub_get_rtc().
4278
4279 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
4280 function.
4281 (grub_cpu_is_cpuid_supported): New inline function.
4282 (grub_cpu_is_tsc_supported): New inline function.
4283 (grub_tsc_init): New function prototype.
4284 (grub_tsc_get_time_ms): New function prototype.
4285
4286 * kern/i386/tsc.c (grub_get_time_ms): New file.
4287
4288 * include/grub/time.h: Include <grub/types.h.
4289 (grub_millisleep_generic): Removed.
4290 (grub_get_time_ms): New prototype.
4291 (grub_install_get_time_ms): New prototype.
4292 (grub_rtc_get_time_ms): New prototype.
4293
4294 * kern/time.c (grub_get_time_ms): New function.
4295 (grub_install_get_time_ms): New function.
4296
4297 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
4298 <grub/time.h> anymore.
4299 (grub_millisleep): Removed.
4300 (grub_machine_init): Call grub_tsc_init.
4301
4302 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4303 get_time_ms() implementation.
4304
4305 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4306 (ieee1275_get_time_ms): New function.
4307 (grub_machine_init): Install get_time_ms() implementation.
4308
4309 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4310 (grub_machine_init): Call grub_tsc_init().
4311 (grub_millisleep): Removed.
bf06a93f 4312
9c2ff3ee 4313 * kern/ieee1275/init.c (grub_millisleep): Removed.
4314 (grub_machine_init): Install ieee1275_get_time_ms()
4315 implementation.
4316 (ieee1275_get_time_ms): New function.
4317 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4318 real work.
4319
9ec92aaf 43202008-08-05 Marco Gerards <marco@gnu.org>
4321
4322 * disk/ata.c: Include <grub/pci.h>.
4323 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4324 (grub_ata_initialize): Rewritten.
4325 (grub_ata_device_initialize): New function.
4326
8d23f507 43272008-08-04 Pavel Roskin <proski@gnu.org>
4328
4329 * kern/main.c: Include grub/mm.h.
4330
5e15ee3d 43312008-08-04 Robert Millan <rmh@aybabtu.com>
4332
4333 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4334 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4335 corruption problem).
4336
a9053f8f 43372008-08-04 Robert Millan <rmh@aybabtu.com>
4338
4339 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4340 warnings introduced in my last commit.
4341
dd19c7d7 43422008-08-03 Robert Millan <rmh@aybabtu.com>
4343
4344 Make PCI available on all i386 architectures.
4345
4346 * include/grub/i386/pc/pci.h: Move from here ...
4347 * include/grub/i386/pci.h: ... to here.
4348
4349 * include/grub/i386/pc/pci.h: Remove.
4350 * include/grub/i386/efi/pci.h: Remove.
4351 * include/grub/x86_64/efi/pci.h: Remove.
4352
4353 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4354 `<grub/cpu/pci.h>'.
4355
4356 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4357 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
4358 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
4359
4360 * conf/i386-ieee1275.rmk: Likewise.
4361
e14a6184 43622008-08-03 Robert Millan <rmh@aybabtu.com>
4363
4364 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4365 (grub_console_setcursor): Make it possible to set cursor off.
4366
52768e37 43672008-08-03 Robert Millan <rmh@aybabtu.com>
4368
4369 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
4370 of modules instead of assuming which platform provides what.
4371 * util/update-grub.in: Likewise.
4372
2d52f57f 43732008-08-03 Robert Millan <rmh@aybabtu.com>
4374
4375 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4376 instead of `grub_install_dos_part' to determine whether a drive needs
4377 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 4378 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 4379
2a5cd121 43802008-08-02 Robert Millan <rmh@aybabtu.com>
4381
4382 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
4383
93808428 43842008-08-02 Robert Millan <rmh@aybabtu.com>
4385
4386 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
4387 of informational grub_dprintf() calls.
4388
3bd0a12a 43892008-08-02 Robert Millan <rmh@aybabtu.com>
4390
4391 * disk/memdisk.c (memdisk_size): Don't initialize.
4392 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
4393
4394 * include/grub/i386/pc/kernel.h
4395 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4396 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4397 (grub_memdisk_image_size, grub_arch_memdisk_addr)
4398 (grub_arch_memdisk_size): Remove.
4399
4400 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4401 field (was only used to transfer a constant). Add `type' field to
4402 support multiple module types.
4403 (grub_module_iterate): New function.
4404
4405 * kern/device.c (grub_device_open): Do not hide error messages
4406 when grub_disk_open() fails. Use grub_print_error() instead.
4407
4408 * kern/i386/pc/init.c (grub_arch_modules_addr)
4409 (grub_arch_memdisk_size): Remove functions.
4410 (grub_arch_modules_addr): Return the module address in high memory
4411 (now that it isn't copied anymore).
4412
4413 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
4414 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
4415 decompression routine (grub_total_module_size already includes that
4416 now). Don't copy modules back to low memory.
4417
4418 * kern/main.c: Include `<grub/mm.h>'.
4419 (grub_load_modules): Split out (and use) ...
4420 (grub_module_iterate): ... this function, which iterates through
4421 module objects and runs a hook.
4422 Comment out grub_mm_init_region() call, as it would cause non-ELF
4423 modules to be overwritten.
4424
4425 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
4426 the memdisk image in its own region, make it part of the module list.
4427 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
4428 (main): Parse --memdisk|-m option, and pass user-provided path as
4429 parameter to generate_image().
4430 (add_segments): Pass `memdisk_path' down to load_modules().
4431 (load_modules): Embed memdisk image in module section when requested.
4432 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
4433 `header.type' instead of `header.offset'.
4434
4435 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
4436 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
4437 (memdisk_mod_LDFLAGS): New variables.
4438 * conf/i386-coreboot.rmk: Likewise.
4439 * conf/i386-ieee1275.rmk: Likewise.
4440
a927cc73 44412008-08-02 Robert Millan <rmh@aybabtu.com>
4442
4443 * loader/i386/pc/multiboot.c (playground, forward_relocator)
4444 (backward_relocator): New variables. Used to allocate and relocate
4445 the payload, respectively.
4446 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 4447 address, install the appropriate relocator code in each bound of
a927cc73 4448 the payload, and set the entry point such that
4449 grub_multiboot_real_boot() will jump to one of them.
4450
4451 * kern/i386/loader.S (grub_multiboot_payload_size)
4452 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4453 (grub_multiboot_payload_entry_offset): New variables.
4454 (grub_multiboot_real_boot): Set cpu context to what the relocator
4455 expects, and jump to the relocator instead of the payload.
4456
4457 * include/grub/i386/loader.h (grub_multiboot_payload_size)
4458 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4459 (grub_multiboot_payload_entry_offset): Export.
4460
b15d8a0c 44612008-08-01 Bean <bean123ch@gmail.com>
4462
4463 * normal/menu_entry.c (editor_getline): Don't return the original
4464 string as result, as it will be released by lexer once it has done
4465 using it.
4466
cdfb3d22 44672008-08-01 Robert Millan <rmh@aybabtu.com>
4468
4469 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
4470 within menuentries, not before them.
4471 util/grub.d/10_hurd.in: Likewise.
4472
9175e93d 44732008-08-01 Bean <bean123ch@gmail.com>
4474
4475 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
4476 (bufio_mod_SOURCES): New macro.
4477 (bufio_mod_CFLAGS): Likewise.
4478 (bufio_mod_LDFLAGS): Likewise.
4479
4480 * include/grub/bufio.h: New file.
4481
4482 * io/bufio.c: Likewise.
4483
4484 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
4485 (grub_video_reader_png): Use grub_buffile_open to open file.
4486
4487 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
4488 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
4489
4490 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
4491 (grub_video_reader_tga): Use grub_buffile_open to open file.
4492
4493 * font/manager.c: Include <grub/bufio.h>.
4494 (add_font): Use grub_buffile_open to open file.
4495
3d8383e7 44962008-07-31 Robert Millan <rmh@aybabtu.com>
4497
4498 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
4499 ELF segments, use a macro for arbitrarily accessing any of them instead
4500 of preparing a pointer that allows access to one at a time.
4501 (grub_multiboot_load_elf64): Likewise.
4502
16e641b6 45032008-07-31 Bean <bean123ch@gmail.com>
4504
4505 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
4506 GRUB_KERNEL_MACHINE_DATA_END.
4507
59198b72 45082008-07-30 Robert Millan <rmh@aybabtu.com>
4509
4510 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
4511 Increase from 0x50 to 0x60.
4512 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
4513 use UUIDs to identify the root drive for them. If that's not
4514 possible, abort.
4515 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
4516 check, for cross-disk installs.
4517
ae88bca3 45182008-07-30 Robert Millan <rmh@aybabtu.com>
4519
4520 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
4521 is non-empty, use it to set the `prefix' environment variable instead
4522 of the usual approach.
4523 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
4524 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
4525 environment variable instead of dummy make_install_device().
4526
4527 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
4528 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 4529 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 4530
4531 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
4532 New variable reference.
4533 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
4534 New macro. Defines offset of `grub_prefix' within startup.S (relative
4535 to `start').
4536 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
4537 section within startup.S (relative to `start').
4538 * include/grub/i386/coreboot/kernel.h: Likewise.
4539
4540 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
4541 Overwrite grub_prefix with its contents, at the beginning of the
4542 first segment.
4543 (main): Understand -p|--prefix.
4544
14f41dd1 45452008-07-30 Robert Millan <rmh@aybabtu.com>
4546
4547 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
4548
4ca049a3 45492008-07-30 Robert Millan <rmh@aybabtu.com>
4550
4551 * term/i386/pc/vga_text.c (grub_console_cls): Use
4552 grub_console_gotoxy() to go back to beginning of the screen.
4553 Found by Patrick Georgi <patrick.georgi@coresystems.de>
4554
2921d337 45552008-07-29 Christian Franke <franke@computer.org>
4556
4557 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4558 Add conversion of emulated mount points on Cygwin.
4559
b609876d 45602008-07-29 Christian Franke <franke@computer.org>
4561
4562 * util/update-grub.in: Add a check for admin
4563 group on Cygwin.
4564 Remove old `grub.cfg.new' before creation.
4565 Add `-f' to `mv' to handle the different filesystem
4566 semantics of Windows.
4567
e93e4679 45682008-07-29 Bean <bean123ch@gmail.com>
4569
4570 * normal/main.c (get_line): Fix buffer overflow bug.
4571
41694fd0 45722008-07-28 Robert Millan <rmh@aybabtu.com>
4573
4574 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
4575 (struct grub_apple_header): New struct. Describes the layout of
4576 the partmap header.
4577 (apple_partition_map_iterate): Check the header magic as well as the
4578 partition magic (which was already being checked).
4579
cfd0b4e6 45802008-07-28 Pavel Roskin <proski@gnu.org>
4581
4582 * genmk.rb: Add a warning to the beginning of the output that
4583 it's a generated file and should not be edited.
4584
93cce016 45852008-07-28 Robert Millan <rmh@aybabtu.com>
4586
4587 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4588 with the same number are found, just use issue a warning with
4589 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 4590
cd1df915 45912008-07-27 Robert Millan <rmh@aybabtu.com>
4592
4593 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
4594 information.
4595
b70a8427 45962008-07-27 Bean <bean123ch@gmail.com>
4597
4598 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
4599 (grub_fat_find_dir): Ignore case when comparing filename.
4600
8f5e379f 46012008-07-27 Bean <bean123ch@gmail.com>
4602
4603 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
4604 smallino, as it's more descriptive, and i8count can be confused with
4605 the other field count.
4606 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
4607 inode type.
4608
a85cd5a0 46092008-07-27 Bean <bean123ch@gmail.com>
4610
4611 * commands/crc.c: New file.
4612
4613 * lib/crc.c: Likewise.
4614
4615 * include/grub/lib/crc.h: Likewise.
4616
4617 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
4618
4619 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
4620 (hexdump): Move this function to ...
4621
4622 * lib/hexdump.c: ... here.
4623
4624 * include/grub/hexdump.h: Renamed to ...
4625
4626 * include/grub/lib/hexdump.h: ... this.
4627
4628 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
4629
4630 * util/grub-editenv.c: Likewise.
4631
4632 * include/envblk.h: Renamed to ...
4633
4634 * include/lib/envblk.h: ... this.
4635
4636 * util/envblk.c: Renamed to ...
4637
4638 * lib/envblk.c: ... this.
4639
4640 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
4641 lib/hexdump.c.
4642 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
4643 (pkglib_MODULES): Add crc.mod.
4644 (hexdump_mod_SOURCES): Add lib/hexdump.c.
4645 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
4646 (crc_mod_SOURCES): New macro.
4647 (crc_mod_CFLAGS): Likewise.
4648 (crc_mod_LDFLAGS): Likewise.
4649
4650 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
4651
4652 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4653
4654 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4655
4656 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4657
4658 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4659
c298def0 46602008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 4661
4662 * commands/help.c: Include <grub/term.h>.
4663 (TERM_WIDTH): Removed. Updated all users.
4664
cc349fb3 46652008-07-27 Pavel Roskin <proski@gnu.org>
4666
4667 * util/getroot.c (find_root_device): Rephrase a comment to avoid
4668 spurious warnings about a comment within a comment.
4669
9051607e 46702008-07-25 Robert Millan <rmh@aybabtu.com>
4671
4672 * util/getroot.c (find_root_device): Skip devices that match
4673 /dev/dm-[0-9]. This lets the real device be found for any type of
4674 abstraction (LVM, EVMS, RAID..).
4675 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
4676 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
4677 device is found first, find_root_device() will now skip it.
4678
01453bfc 46792008-07-24 Pavel Roskin <proski@gnu.org>
4680
4681 * include/grub/types.h: Use __builtin_bswap32() and
4682 __builtin_bswap64() with gcc 4.3 and newer.
4683
6af9849f 46842008-07-24 Christian Franke <franke@computer.org>
4685
3a0fa256 4686 * util/i386/pc/grub-install.in: If `--debug' is specified,
4687 pass `--verbose' to grub-setup.
4688 Abort script if make_system_path_relative_to_its_root() fails.
4689
7810e747 46902008-07-24 Bean <bean123ch@gmail.com>
4691
4692 * configure.ac: Fixed a bug caused by the previous cygwin patch,
4693 variable `target_platform' should be `platform'.
4694
42290e17 46952008-07-24 Bean <bean123ch@gmail.com>
4696
51cc5193 4697 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 4698 (grub_png_init_fixed_block): New function.
4699 (grub_png_decode_image_data): Handle fixed huffman code compression.
4700
2a8a80e4 47012008-07-24 Bean <bean123ch@gmail.com>
4702
4703 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
4704 (grub_pe2elf_SOURCES): New macro.
4705 (CLEANFILES): Add grub-pe2elf.
4706
4707 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
4708 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
4709 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
4710 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
4711 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
4712 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
4713 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
4714 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
4715 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
4716 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
4717 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
4718 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
4719 (GRUB_PE32_DT_FUNCTION): Likewise.
4720 (GRUB_PE32_REL_I386_DIR32): Likewise.
4721 (GRUB_PE32_REL_I386_REL32): Likewise.
4722 (grub_pe32_symbol): New structure.
4723 (grub_pe32_reloc): Likewise.
4724
4725 * util/grub-pe2elf.c: New file.
4726
4727 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
4728 start symbol in non pc platform.
4729
4730 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
4731
4732 The following patches are from Christian Franke.
4733
4734 * include/grub/dl.h: Remove .previous, gas supports this only
4735 for ELF format.
4736
4737 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
4738 Remove .type, gas supports this only for ELF format.
4739
4740 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
4741 nullbytes in symbol table. This fixes an infinite loop if table is
4742 zero filled.
4743
4744 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
4745 TARGET_IMG_LDFLAGS and EXEEXT.
4746
4747 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
4748 TARGET_IMG_LDFLAGS_AC.
4749 (grub_CHECK_STACK_ARG_PROBE): New function.
4750
4751 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
4752
4753 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
4754
4755 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
4756 to set TARGET_IMG_LD* accordingly.
4757 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
4758 Add call to grub_CHECK_STACK_ARG_PROBE.
4759 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
4760
4761 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
4762
4763 * genmk.rb: Add EXEEXT to CLEANFILES.
4764
12ccdb75 47652008-07-23 Robert Millan <rmh@aybabtu.com>
4766
4767 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
4768 define the codes for arrows and lines used for the menu).
4769 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
4770 as well.
4771
4772 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
4773 fonts, because the latter are too slow.
4774
18eeaf04 47752008-07-21 Bean <bean123ch@gmail.com>
4776
4777 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
4778 a20. Run keyboard test last, as it will cause macbook to halt.
4779
b095e2ad 47802008-07-18 Pavel Roskin <proski@gnu.org>
4781
4782 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
4783 load foreign architecture modules correctly anyway. Keep
4784 support for loading host architecture modules, whether we
4785 compile them or not.
4786
737feb35 47872008-07-17 Pavel Roskin <proski@gnu.org>
4788
3f4ce737 4789 * configure.ac: Use -m32 or -m64 regardless of whether we had to
4790 change target_cpu. The compiler default can mismatch target_cpu
4791 in any case.
4792
4ad2d049 4793 * disk/efi/efidisk.c: Fix format warnings on x86_64.
4794 * kern/efi/efi.c: Likewise.
4795
f6130a12 4796 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
4797 target compiler is functional.
4798 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
4799 are set up.
4800
58393a2d 4801 * configure.ac: Default to efi platform for x86_64-apple. Allow
4802 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
4803 adjustments from the rest, only do them if target is not
4804 explicitly given. Merge other adjustments with the final sanity
4805 check. Remove an extraneous check for supported CPU. Be
4806 specific which CPU and which platform is not supported.
4807
737feb35 4808 * configure.ac: Default to pc platform for x86_64.
4809
546f966a 48102008-07-17 Robert Millan <rmh@aybabtu.com>
4811
4812 Partial LinuxBIOS -> Coreboot rename.
4813
4814 * conf/i386-linuxbios.rmk: Renamed to ...
4815 * conf/i386-coreboot.rmk: ... this.
4816 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
4817 * configure.ac: Accept "coreboot" as input platform (but maintain
4818 compatibility with "linuxbios").
4819 * include/grub/i386/linuxbios: Renamed to ...
4820 * include/grub/i386/coreboot: ... this.
4821
20011694 48222008-07-17 Bean <bean123ch@gmail.com>
4823
4824 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 4825 (appleldr_mod_SOURCE): New variable.
20011694 4826 (appleldr_mod_CFLAGS): Likewise.
4827 (appleldr_mod_LDFLAGS): Likewise.
4828 (pci_mod_SOURCES): Likewise.
4829 (pci_mod_CFLAGS): Likewise.
4830 (pci_mod_LDFLAGS): Likewise.
4831 (lspci_mod_SOURCES): Likewise.
4832 (lspci_mod_CFLAGS): Likewise.
4833 (lspci_mod_LDFLAGS): Likewise.
4834
4835 * conf/x86_64-efi.rmk: New file.
4836
4837 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
4838 macro.
4839 (grub_efidisk_write): Likewise.
4840
4841 * include/efi/api.h (efi_call_0): New macro.
4842 (efi_call_1): Likewise.
4843 (efi_call_2): Likewise.
4844 (efi_call_3): Likewise.
4845 (efi_call_4): Likewise.
4846 (efi_call_5): Likewise.
4847 (efi_call_6): Likewise.
4848
4849 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
4850 grub_rescue_cmd_chainloader.
4851
4852 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
4853 (grub_pe32_optional_header): Change some fields based on i386 or
4854 x86_64 platform.
4855 (GRUB_PE32_PE32_MAGIC): Likewise.
4856
4857 * include/grub/efi/uga_draw.h: New file.
4858
4859 * include/grub/elf.h (STN_ABS): New constant.
4860 (R_X86_64_NONE): Relocation constant for x86_64.
4861 (R_X86_64_64): Likewise.
4862 (R_X86_64_PC32): Likewise.
4863 (R_X86_64_GOT32): Likewise.
4864 (R_X86_64_PLT32): Likewise.
4865 (R_X86_64_COPY): Likewise.
4866 (R_X86_64_GLOB_DAT): Likewise.
4867 (R_X86_64_JUMP_SLOT): Likewise.
4868 (R_X86_64_RELATIVE): Likewise.
4869 (R_X86_64_GOTPCREL): Likewise.
4870 (R_X86_64_32): Likewise.
4871 (R_X86_64_32S): Likewise.
4872 (R_X86_64_16): Likewise.
4873 (R_X86_64_PC16): Likewise.
4874 (R_X86_64_8): Likewise.
4875 (R_X86_64_PC8): Likewise.
4876
4877 * include/grub/i386/efi/pci.h: New file.
4878
4879 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
4880 Change it value based on platform.
4881 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
4882 (GRUB_E820_RAM): Likewise.
4883 (GRUB_E820_RESERVED): Likewise.
4884 (GRUB_E820_ACPI): Likewise.
4885 (GRUB_E820_NVS): Likewise.
4886 (GRUB_E820_EXEC_CODE): Likewise.
4887 (GRUB_E820_MAX_ENTRY): Likewise.
4888 (grub_e820_mmap): New structure.
4889 (linux_kernel_header): Change the efi field according to different
4890 kernel version, also field from linux_kernel_header.
4891
4892 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
4893
4894 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
4895 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
4896 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
4897 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
4898 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
4899 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
4900 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
4901 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
4902 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
4903 (GRUB_PCI_ADDR_IO_MASK): Likewise.
4904
4905 * include/grub/x86_64/efi/kernel.h: New file.
4906
4907 * include/grub/x86_64/efi/loader.h: Likewise.
4908
4909 * include/grub/x86_64/efi/machine.h: Likewise.
4910
4911 * include/grub/x86_64/efi/pci.h: Likewise.
4912
4913 * include/grub/x86_64/efi/time.h: Likewise.
4914
4915 * include/grub/x86_64/linux.h: Likewise.
4916
4917 * include/grub/x86_64/setjmp.h: Likewise.
4918
4919 * include/grub/x86_64/time.h: Likewise.
4920
4921 * include/grub/x86_64/types.h: Likewise.
4922
4923 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
4924 GRUB_TARGET_SIZEOF_VOID_P.
4925
4926 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
4927 (grub_efi_locate_handle): Likewise.
4928 (grub_efi_open_protocol): Likewise.
4929 (grub_efi_set_text_mode): Likewise.
4930 (grub_efi_stall): Likewise.
4931 (grub_exit): Likewise.
4932 (grub_reboot): Likewise.
4933 (grub_halt): Likewise.
4934 (grub_efi_exit_boot_services): Likewise.
4935 (grub_get_rtc): Likewise.
4936
4937 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
4938 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
4939 (grub_efi_allocate_pages): Wrap efi calls.
4940 (grub_efi_free_pages): Wrap efi calls.
4941 (grub_efi_get_memory_map): Wrap efi calls.
4942
4943 * kern/x86_64/dl.c: New file.
4944
4945 * kern/x86_64/efi/callwrap.S: Likewise.
4946
4947 * kern/x86_64/efi/startup.S: Likewise.
4948
4949 * loader/efi/appleloader.c: Likewise.
4950
4951 * loader/efi/chainloader.c (cmdline): New variable.
4952 (grub_chainloader_unload): Wrap efi calls.
4953 (grub_chainloader_boot): Likewise.
4954 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
4955 command line.
4956
4957 * loader/efi/chainloader_normal.c (chainloader_command):
4958 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
4959 command line.
4960
4961 * loader/i386/efi/linux.c (allocate_pages): Change allocation
4962 method.
4963 (grub_e820_add_region): New function.
4964 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
4965 booting.
4966 (grub_find_video_card): New function.
4967 (grub_linux_setup_video): New function.
4968 (grub_rescue_cmd_linux): Probe for video information.
4969
4970 * normal/x86_64/setjmp.S: New file.
4971
4972 * term/efi/console.c (map_char): New function.
4973 (grub_console_putchar): Map unicode char.
4974 (grub_console_checkkey): Wrap efi calls.
4975 (grub_console_getkey): Likewise.
4976 (grub_console_getwh): Likewise.
4977 (grub_console_gotoxy): Likewise.
4978 (grub_console_cls): Likewise.
4979 (grub_console_setcolorstate): Likewise.
4980 (grub_console_setcursor): Likewise.
4981
4982 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
4983
59652a20 49842008-07-16 Pavel Roskin <proski@gnu.org>
4985
ef294055 4986 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
4987 format strings.
4988
59652a20 4989 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
4990 pointer, not an integer. This fixes a warning and prevents
4991 precision loss on 64-bit systems.
4992 (relocate_addresses): Remove unneeded cast.
4993
afc3b5d7 49942008-07-15 Pavel Roskin <proski@gnu.org>
4995
506b2b3e 4996 * kern/i386/ieee1275/init.c: Include grub/cache.h.
4997
62ead89c 4998 * term/ieee1275/ofconsole.c: Disable code unused on i386.
4999
c4cd51d7 5000 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
5001 Fix comparison between signed and unsigned.
5002
0d3d8f28 5003 * include/grub/i386/ieee1275/console.h: Declare
5004 grub_console_init() and grub_console_fini().
5005
8804b286 5006 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
5007 It's empty and unused.
5008
ee01cf35 5009 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
5010 beginning to avoid warnings with some compilers.
5011
afc3b5d7 5012 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
5013 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
5014
e4e8eaa5 50152008-07-14 Pavel Roskin <proski@gnu.org>
5016
407aceb4 5017 * kern/env.c (grub_register_variable_hook): Don't copy empty
5018 string, it leaks memory. Pass "" to grub_env_set(), it should
5019 handle constant strings.
5020
e4e8eaa5 5021 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
5022 * commands/cmp.c (grub_cmd_cmp): Likewise.
5023 * kern/dl.c (grub_dl_flush_cache): Likewise.
5024 (grub_dl_load_core): Likewise.
5025 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
5026 (grub_elf64_load_phdrs): Likewise.
5027
d4e2dad3 50282008-07-13 Pavel Roskin <proski@gnu.org>
5029
5030 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
5031 between signed and unsigned.
5032 (LzmaEnc_Finish): Fix warning about an unused parameter.
5033
aa24b516 50342008-07-13 Bean <bean123ch@gmail.com>
5035
5036 * Makefile.in (enable_lzo): New rule.
5037
5038 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5039
5040 * configure.ac (ENABLE_LZO): New option --enable-lzo.
5041
5042 * boot/i386/pc/lnxboot.S: #include <config.h>.
5043
5044 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 5045 its value according to the compression algorithm used, lzo or lzma.
aa24b516 5046
5047 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5048 compression algorithm according to configure macro.
5049
5050 * kern/i386/pc/startup.S (codestart): Likewise.
5051
5052 * kern/i386/pc/lzma_decode.S: New file.
5053
5054 * include/grub/lib/LzFind.h: Likewise.
5055
5056 * include/grub/lib/LzHash.h: Likewise.
5057
5058 * include/grub/lib/LzmaDec.h: Likewise.
5059
5060 * include/grub/lib/LzmaEnc.h: Likewise.
5061
5062 * include/grub/lib/LzmaTypes.h: Likewise.
5063
5064 * lib/LzFind.c: Likewise.
5065
5066 * lib/LzmaDec.c: Likewise.
5067
5068 * lib/LzmaEnc.c: Likewise.
5069
4ae821ac 50702008-07-13 Bean <bean123ch@gmail.com>
5071
5072 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5073 (grub_ext4_extent_header): New structure.
5074 (grub_ext4_extent): Likewise.
5075 (grub_ext4_extent_idx): Likewise.
5076 (grub_ext4_find_leaf): New function.
5077 (grub_ext2_read_block): Handle extents.
5078
9a745147 50792008-07-12 Robert Millan <rmh@aybabtu.com>
5080
5081 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5082
d49a4cf6 50832008-07-11 Robert Millan <rmh@aybabtu.com>
5084
5085 * util/grub.d/40_custom.in: New file. Example on how to add custom
5086 entries to /etc/grub.d.
5087 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5088 40_custom (implicitly, by merging all the grub.d rules).
5089
947414b4 50902008-07-11 Pavel Roskin <proski@gnu.org>
5091
0059cf6f 5092 * commands/read.c (grub_getline): Fix invalid memory access.
5093 Don't add newline to the variable value.
5094
947414b4 5095 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5096 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5097 (serial_hw_get_port): Check validity of the port number.
5098 (grub_cmd_serial): Check return value of serial_hw_get_port().
5099
62a02d00 51002008-07-07 Pavel Roskin <proski@gnu.org>
5101
5102 * boot/i386/pc/diskboot.S (notification_string): Replace
5103 "Loading kernel" with just "loading". This is shorter, less
5104 confusing and saves a few bytes for possible future changes.
5105
3e5581b0 51062008-07-05 Pavel Roskin <proski@gnu.org>
5107
ea387a48 5108 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5109 size for ATAPI devices, they are undefined. Output sector
5110 number in decimal form.
5111
3e5581b0 5112 * disk/ata.c: Use named constants for status bits.
5113
fdecb8fd 51142008-07-04 Pavel Roskin <proski@gnu.org>
5115
bcd35b90 5116 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5117 grub_addr_t before casting it to the void pointer to fix a
5118 warning. Non-addressable regions are discarded earlier.
5119 (grub_arch_modules_addr): Cast _end to grub_addr_t.
5120 * kern/i386/linuxbios/table.c: Include grub/misc.h.
5121 (check_signature): Don't shadow table_header.
5122 (grub_linuxbios_table_iterate): Cast numeric constants to
5123 grub_linuxbios_table_header_t.
5124 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5125 grub_stop().
5126
af58ab3d 5127 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5128 prevent warnings.
5129
1759aa57 5130 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5131 pointer, which can cause warnings. Support 64-bit addresses.
5132
fdecb8fd 5133 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5134 of sizeof(long). This fixes PowerPC image generation on x86_64.
5135
8516d2a8 51362008-07-04 Robert Millan <rmh@aybabtu.com>
5137
5138 This fixes a performance issue when pc & gpt partmap iterators
5139 didn't abort iteration even after our hook found what it was
fe987087 5140 looking for (often causing expensive probes of non-existent drives).
8516d2a8 5141
5142 Some callers relied on previous buggy behaviour, since they would
34c44600 5143 raise an error when their own hooks caused early abortion of its
8516d2a8 5144 iteration.
5145
5146 * kern/device.c (grub_device_open): Improve error message.
5147 * disk/lvm.c (grub_lvm_open): Likewise.
5148 * disk/raid.c (grub_raid_open): Likewise.
5149
5150 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5151 when hook requests it, independently of grub_errno.
5152 (pc_partition_map_probe): Do not fail when find_func() caused
5153 early abortion of pc_partition_map_iterate().
5154
5155 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5156 when hook requests it, independently of grub_errno.
5157 (gpt_partition_map_probe): Do not fail when find_func() caused
5158 early abortion of gpt_partition_map_iterate().
5159
5160 * kern/partition.c (grub_partition_iterate): Abort parent iteration
5161 when hook requests it, independently of grub_errno. Do not fail when
5162 part_map_iterate_hook() caused early abortion of p->iterate().
5163
5164 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5165 when grub_partition_iterate() returned with non-zero.
5166
277d0de9 51672008-07-03 Pavel Roskin <proski@gnu.org>
5168
5169 * disk/ata.c (grub_ata_pio_write): Check status before writing,
5170 like we do in grub_ata_pio_read().
5171 (grub_ata_readwrite): Always write individual sectors. Fix the
5172 sector count for the remainder.
5173 (grub_ata_write): Enable writing to ATA devices. Correctly
5174 report error for ATAPI devices.
5175
d4c9b428 51762008-07-02 Pavel Roskin <proski@gnu.org>
5177
e43fc690 5178 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5179 warning.
5180
f707af42 5181 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5182 for every read sector, we already increment it for the whole
5183 batch. This fixes reading more than 256 sectors at once.
5184
11e16b15 5185 * util/grub-editenv.c (cmd_info): Cast argument to long
5186 explicitly. ptrdiff_t reduces to int on i386.
5187
cbabfdd4 5188 * util/grub-editenv.c (main): Be specific which parameter is
5189 missing.
5190
b8fbce0a 5191 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5192 (memdisk): Make memdisk_orig_addr a pointer.
5193
c9c8e606 5194 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5195 for file offsets, use grub_off_t instead. Fix printf format
5196 warnings.
5197
ca62e598 5198 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5199 there. Real unexpected warnings should not drown in the noise
5200 about known problems.
5201
ce8d1766 5202 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5203 grub_disk_addr_t for memory addresses.
5204
00c7a56a 5205 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5206 explicitly to fix a warning.
5207
08d3ef09 5208 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5209
cb71ba20 5210 * Makefile.in (MODULE_LDFLAGS): New variable.
5211 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
5212 the linker accepts --build-id=none.
5213 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
5214 MODULE_LDFLAGS.
5215 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5216
d4c9b428 5217 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5218 those in Linux XFS code. Provide a way to access 64-bit parent
5219 inode.
5220 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
5221 the end of struct grub_xfs_dir_header.
5222
d4156eee 52232008-07-02 Bean <bean123ch@gmail.com>
5224
5225 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5226 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5227 and GRUB_IEEE1275_FLAG_NO_ANSI.
5228
5229 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5230 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5231 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5232
5233 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5234 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5235
5236 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5237 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5238
5239 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5240 esc sequence on non ANSI terminal.
5241 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5242
5243 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5244 beginning of file.
5245
2270f77b 52462008-07-02 Bean <bean123ch@gmail.com>
5247
5248 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5249 (grub_editenv_SOURCES): New variable.
5250 (pkglib_MODULES): Add loadenv.mod.
5251 (loadenv_mod_SOURCES): New variable.
5252 (loadenv_mod_CFLAGS): Likewise.
5253 (loadenv_mod_LDFLAGS): Likewise.
5254
5255 * include/grub/envblk.h: New file.
5256
5257 * util/envblk.c: New file.
5258
5259 * util/grub-editenv.c: New file.
5260
5261 * commands/loadenv.c: New file.
5262
0e9e51ec 52632008-07-01 Pavel Roskin <proski@gnu.org>
5264
d89b7634 5265 * include/multiboot2.h (struct multiboot_tag_module): Use char,
5266 not unsigned char. This fixes warnings and is consistent with
5267 other tags.
5268
bf1835b1 5269 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5270
8222a04b 5271 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5272
6a42d99d 5273 * term/tparm.c (analyze): Always set *popcount.
5274
10b159d1 5275 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5276 cast to fix a warning.
5277
b8789f6c 5278 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5279 cast to suppress a warning.
5280
29d7e38a 5281 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5282 grub_fshelp_read_file() expects.
5283
f341f669 5284 * fs/fat.c: Fix UUID calculation on big-endian systems. We
5285 write uuid as a 32-bit value in CPU byte order, so declare and
5286 use it as such.
5287
0e9e51ec 5288 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5289 long if the format specifier expects it.
5290 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5291 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5292 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5293 long to fix a warning.
5294 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5295 grub_dprintf() arguments to fix warnings.
5296
3aefa857 52972008-06-30 Pavel Roskin <proski@gnu.org>
5298
56c7668b 5299 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5300 install_bsd_part immediately before core.img is embedded or
5301 modified on disk. This fixes core.img verification if core.img
5302 cannot be embedded.
5303
3aefa857 5304 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5305 core_path to calculate the blocklist.
5306 Patch from Javier Martín <lordhabbit@gmail.com>
5307
5444088d 53082008-06-29 Robert Millan <rmh@aybabtu.com>
5309
5310 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
5311 block to disk block.
5312 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5313 Patch from Niels Böhm <bitbucket@arcor.de>
5314
674835c8 53152008-06-29 Robert Millan <rmh@aybabtu.com>
5316
5317 * util/update-grub_lib.in (font_path): Search for fonts in
5318 /boot/grub first, which is more likely to be readable (we aren't
5319 deciding where fonts live, just looking for them).
5320
f527dbc8 53212008-06-26 Pavel Roskin <proski@gnu.org>
5322
6c2d8df6 5323 * util/biosdisk.c (read_device_map): Don't leave dead map
5324 entries for devices failing stat() check.
5325
f527dbc8 5326 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5327 core_path_dev for the core.img path on the target device.
5328
aebe3d13 53292008-06-26 Robert Millan <rmh@aybabtu.com>
5330
5331 * disk/fs_uuid.c: New file.
5332 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5333 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5334 (fs_uuid_mod_LDFLAGS): New variables.
5335 * include/grub/disk.h (grub_disk_dev_id): Add
5336 `GRUB_DISK_DEVICE_UUID_ID'.
5337 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5338 implement iterate().
5339
37aaf354 53402008-06-26 Robert Millan <rmh@aybabtu.com>
5341
5342 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5343 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5344 Linux image includes no initrd.
5345
25ff262a 53462008-06-21 Javier Martín <lordhabbit@gmail.com>
5347
5348 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5349 call to resolve the core image location that effectively appended the
5350 name twice.
5351
76a2bd44 53522008-06-21 Robert Millan <rmh@aybabtu.com>
5353
5354 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5355 call from here ...
5356
5357 * util/grub.d/10_hurd.in: ... to here ...
5358 * util/grub.d/10_linux.in: ... and here.
5359
650e1c79 53602008-06-19 Robert Millan <rmh@aybabtu.com>
5361
fe987087 5362 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 5363 after it has been set by grub_machine_set_prefix().
5364
6ce63911 53652008-06-19 Robert Millan <rmh@aybabtu.com>
5366
5367 * commands/search.c (search_label, search_fs_uuid, search_file): Print
5368 search result when not saving to variable, not the other way around.
5369 When saving to variable, abort iteration as soon as a match is found.
5370
73940cec 53712008-06-19 Robert Millan <rmh@aybabtu.com>
5372
5373 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
5374 check for partition that provides /boot/grub. Its logic is flawed,
5375 as it prevents prepare_grub_to_access_device() from being called
5376 multiple times.
5377
3c62a39d 53782008-06-19 Robert Millan <rmh@aybabtu.com>
5379
5380 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
5381 "insmod" command directly when abstraction modules are needed,
fe987087 5382 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 5383 since it had already been processed).
5384
47395a42 53852008-06-19 Pavel Roskin <proski@gnu.org>
5386
5387 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
5388 changed. This is needed in case GRUB_LIBDIR changes.
5389 * conf/i386-ieee1275.rmk: Likewise.
5390 * conf/i386-linuxbios.rmk: Likewise.
5391 * conf/i386-pc.rmk: Likewise.
5392 * conf/powerpc-ieee1275.rmk: Likewise.
5393
a145ac2d 53942008-06-18 Pavel Roskin <proski@gnu.org>
5395
5396 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5397 kernel_elf_symlist.c to symlist.c for consistency with other
5398 architectures. Update all users.
5399 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5400
7847c51e 54012008-06-18 Robert Millan <rmh@aybabtu.com>
5402
5403 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5404 it in prefix.
5405
5406 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
5407 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
5408 a RAID device, run setup() for all members independently on whether
5409 LVM abstraction is being used.
5410 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5411 If grub-mkimage has set `*install_dos_part == -2', don't override this
5412 value.
5413 Perform *install_dos_part adjustments independently on whether
5414 we're embedding or not.
5415 Clarify error message when image is too big for embedding.
5416 Remove duplicate *install_dos_part stanza.
5417
b23e5644 54182008-06-17 Robert Millan <rmh@aybabtu.com>
5419
5420 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
5421 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
5422 variables.
5423 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
5424 values in grub_ofconsole_normal_color and
5425 grub_ofconsole_highlight_color (they're not directly related to
5426 background and foreground).
5427 (grub_ofconsole_setcolorstate): Extract background and foreground
5428 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
5429
0aac2f79 54302008-06-17 Robert Millan <rmh@aybabtu.com>
5431
5432 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
5433 /boot/grub for the check in last commit, not /boot (they could be
5434 different partitions).
5435
3cca7ef3 54362008-06-16 Robert Millan <rmh@aybabtu.com>
5437
5438 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
5439 asked to setup access for the same partition that provides /boot,
5440 don't bother using UUIDs since our root already has the value we
5441 want.
5442
347396d8 54432008-06-16 Robert Millan <rmh@aybabtu.com>
5444
5445 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
5446 I2O devices.
5447 Patch from Sven Mueller <sven@debian.org>.
5448
991477f8 54492008-06-16 Robert Millan <rmh@aybabtu.com>
5450
5451 * util/update-grub.in: Check for $EUID instead of $UID.
5452 Reported by Vincent Zweije.
5453
d31a32a1 54542008-06-16 Bean <bean123ch@gmail.com>
5455
fe987087 5456 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 5457 (grub_ext2_read_block): Likewise.
5458 (grub_ext2_read_inode): Likewise.
5459 (grub_ext2_mount): Likewise.
5460 (grub_ext2_close): Likewise.
5461 (grub_ext3_get_journal): Removed.
5462
fe987087 5463 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 5464 (grub_reiserfs_read_symlink): Likewise.
5465 (grub_reiserfs_mount): Likewise.
5466 (grub_reiserfs_open): Likewise.
5467 (grub_reiserfs_read): Likewise.
5468 (grub_reiserfs_close): Likewise.
5469 (grub_reiserfs_get_journal): Removed.
5470
5471 * fs/fshelp.c (grub_fshelp_read): Removed.
5472 (grub_fshelp_map_block): Likewise.
5473
5474 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
5475 (grub_fshelp_journal): Likewise.
5476 (grub_fshelp_read): Likewise.
5477 (grub_fshelp_map_block): Likewise.
5478
3540a760 54792008-06-16 Pavel Roskin <proski@gnu.org>
5480
5481 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
5482 floating point anymore.
5483 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
5484
95614c84 54852008-06-15 Pavel Roskin <proski@gnu.org>
5486
5487 * commands/ls.c (grub_ls_list_files): Use integer calculations
5488 for human readable format, avoid floating point use.
5489 * kern/misc.c (grub_ftoa): Remove.
5490 (grub_vsprintf): Remove floating point support.
5491
50465dd6 54922008-06-15 Robert Millan <rmh@aybabtu.com>
5493
fe6b695a 5494 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 5495 devices.
5496 Reported by Max Vozeler.
5497
a9207284 54982008-06-15 Robert Millan <rmh@aybabtu.com>
5499
5500 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
5501 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
5502 skipped later.
5503 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
5504 the beginning of the prefix.
5505
5506 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
5507 It is assumed that if we have a memdisk, grub-mkimage has set
5508 grub_prefix to include the "(memdisk)" drive in it.
5509
a7cbd45a 55102008-06-15 Robert Millan <rmh@aybabtu.com>
5511
5512 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
5513 Initialize keyboard controller after registering the terminal, so that
5514 grub_printf() can be called from grub_keyboard_controller_init().
5515
21cf716a 55162008-06-15 Robert Millan <rmh@aybabtu.com>
5517
5518 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
5519 extent-btree which is written as big endian on disk.
5520 Reported by Alain Greppin <al@chilibi.org>.
5521
23a64d8e 55222008-06-14 Robert Millan <rmh@aybabtu.com>
5523
5524 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
5525 * util/i386/pc/grub-install.in (modules): Likewise.
5526
d687651c 55272008-06-13 Pavel Roskin <proski@gnu.org>
5528
5529 * commands/ls.c (grub_ls_list_files): Fix format warnings.
5530
dfe9ddd4 55312008-06-13 Bean <bean123ch@gmail.com>
5532
5533 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
5534
5535 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
5536
5537 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
5538 to indicate sparse block.
5539
16ae7781 55402008-06-12 Pavel Roskin <proski@gnu.org>
5541
e6d1a308 5542 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
5543 number, grub_fshelp_read() does it for us.
5544
16ae7781 5545 * fs/fshelp.c (grub_fshelp_read): New function. Implement
5546 linear disk read with journal translation.
5547 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
5548 * include/grub/fshelp.h: Declare grub_fshelp_read().
5549
40fd3a2b 55502008-06-09 Pavel Roskin <proski@gnu.org>
5551
5552 * fs/minix.c (grub_minix_mount): Handle error reading
5553 superblock.
5554
f5679726 55552008-06-08 Robert Millan <rmh@aybabtu.com>
5556
5557 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
5558 don't append the RAID prefix afterwards.
5559 Reported by Clint Adams.
5560
ce525529 55612008-06-08 Robert Millan <rmh@aybabtu.com>
5562
5563 Based on description from Pavel:
5564 * kern/disk.c (grub_disk_check_range): Rename to ...
5565 (grub_disk_adjust_range): ... this. Add a comment explaining the
5566 tasks performed by this function.
5567
ad4936a0 55682008-06-08 Robert Millan <rmh@aybabtu.com>
5569
5570 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
5571 `num_serial' (for consistency with other variables).
5572 (struct grub_ntfs_data): Add `uuid' member.
5573 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
5574 (grub_ntfs_uuid): New function.
5575 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
5576
dc20b0f9 55772008-06-07 Pavel Roskin <proski@gnu.org>
5578
5579 * util/biosdisk.c (open_device): Revert last change to the
5580 function, it broke installation. The sector needs to be
5581 different dependent on which device is opened.
5582
c5e3cfba 55832008-06-06 Robert Millan <rmh@aybabtu.com>
5584
5585 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
5586 rest of GRUB, and breakage doesn't happen if its value were modified.
5587
5588 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5589 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
5590 a constant (same value).
5591 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
5592 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
5593
26a1f8c4 55942008-06-06 Robert Millan <rmh@aybabtu.com>
5595
5596 * util/biosdisk.c (open_device): Do not modify sector offset when
5597 accessing a partition. kern/disk.c already handles this for us.
5598
25d6b327 55992008-06-06 Robert Millan <rmh@aybabtu.com>
5600
5601 * util/grub-emu.c (grub_machine_init): Move code in this function from
5602 here ...
5603 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
5604 segfault in case grub_printf() is called).
5605
5606 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
5607 grub_probe. Update all users not to explicitly add it again.
5608 (grub_device): New variable; contains corresponding device for grubdir.
5609 (fs_module, partmap_module, devabstraction_module): Pass
5610 `--device ${grub_device}' to grub_probe to avoid traversing /dev
5611 every time.
5612
9ece62fb 56132008-06-05 Robert Millan <rmh@aybabtu.com>
5614
5615 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
5616 is found, print it (same layout as with labels).
5617
1ad36d37 56182008-06-04 Robert Millan <rmh@aybabtu.com>
5619
5620 * util/biosdisk.c (get_drive): Rename to ...
5621 (find_grub_drive): ... this. Update all users.
5622
5623 (get_os_disk): Rename to ...
5624 (convert_system_partition_to_system_disk): ... this. Update all users.
5625
5626 (find_drive): Rename to ...
5627 (find_system_device): ... this. Update all users.
5628
e6a30859 56292008-06-04 Robert Millan <rmh@aybabtu.com>
5630
5631 * util/biosdisk.c (get_os_disk): Handle IDA devices.
5632 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5633 (make_device_map): Likewise.
5634
00c108a4 56352008-06-01 Robert Millan <rmh@aybabtu.com>
5636
5637 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
5638 before dereferencing it.
5639
5640 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
5641 union with fat12/fat16-specific ones. Add some new fields, including
5642 `num_serial' for both versions.
5643 (struct grub_fat_data): Add `uuid' member.
5644 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
5645 names. Initialize `data->uuid' using `num_serial'.
5646 (grub_fat_uuid): New function.
5647 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
5648
5649 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
5650 (grub_reiserfs_uuid): New function.
5651 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
5652 member.
5653
5654 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
5655 (grub_xfs_uuid): New function.
5656 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
5657
1385c5bb 56582008-06-01 Robert Millan <rmh@aybabtu.com>
5659
5660 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
5661 code that is backward compatible with pre-uuid search command.
5662
c682dfd7 56632008-05-31 Robert Millan <rmh@aybabtu.com>
5664
5665 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
5666 floppies after everything else, to ensure floppy drive isn't accessed
5667 unnecessarily (patch from Bean).
5668
b7db5d47 56692008-05-31 Robert Millan <rmh@aybabtu.com>
5670
5671 * commands/search.c (search_label, search_fs_uuid, search_file): Do
5672 not print device names when we were asked to set a variable.
5673
6e037aa9 56742008-05-31 Robert Millan <rmh@aybabtu.com>
5675
5676 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
5677 using "cursor-on" and "cursor-off" commands (understood at least by
5678 the Open Firmware flavour on OLPC).
5679
41305bc8 56802008-05-31 Michael Gorven <michael@gorven.za.net>
5681
5682 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
5683 on and off sequences.
5684
69ba137e 56852008-05-31 Robert Millan <rmh@aybabtu.com>
5686
5687 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
5688 * util/update-grub.in: Likewise.
5689
520ae21b 56902008-05-30 Pavel Roskin <proski@gnu.org>
5691
5692 * util/biosdisk.c (linux_find_partition): Simplify logic and
5693 make the code more universal. Keep special processing for
5694 devfs, but use a simple rule for all other devices. If the
5695 device ends with a number, append 'p' and the partition number.
5696 Otherwise, append only the partition number.
5697
5786569b 56982008-05-30 Robert Millan <rmh@aybabtu.com>
5699
5700 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
5701 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
5702 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
5703 the `root' parameter to Linux.
5704
51500452 57052008-05-30 Robert Millan <rmh@aybabtu.com>
5706
5707 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
5708 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
5709 --fs_uuid with --fs-uuid.
5710 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
5711 all filesystems support them).
5712
811d3878 57132008-05-30 Robert Millan <rmh@aybabtu.com>
5714
5715 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 5716 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 5717
cab63c95 57182008-05-30 Robert Millan <rmh@aybabtu.com>
5719
5720 * util/grub.d/00_header.in: Remove obsolete comment referencing
5721 convert_system_path_to_grub_path().
5722 * util/update-grub.in: Likewise.
5723 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
5724 (convert_system_path_to_grub_path): Add a warning message explaining
5725 that this function is deprecated. Rely on is_path_readable_by_grub()
5726 for the readability checks.
5727 (font_path): Use is_path_readable_by_grub() for the readability
5728 check rather than convert_system_path_to_grub_path().
5729
972e2f7a 57302008-05-30 Robert Millan <rmh@aybabtu.com>
5731
5732 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
5733 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
5734 converting it first.
5735 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
5736 grub.cfg for access to font file, and afterwards call it again to set
5737 the root device.
5738
62191274 57392008-05-30 Robert Millan <rmh@aybabtu.com>
5740
5741 * commands/search.c (options): Add --fs_uuid option.
5742 (search_fs_uuid): New function.
5743 (grub_cmd_search): Fix --set argument passing.
5744 Use search_fs_uuid() when requested via --fs_uuid.
5745 (grub_search_init): Update help message.
5746 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
5747 and redeclare it as an array of 16-bit words.
5748 (grub_ext2_uuid): New function.
5749 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
5750 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
5751 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
5752 (GRUB_DEVICE_BOOT_UUID): New variables.
5753 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
5754 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
5755 whenever possible.
5756 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
5757 just assume `root' variable has the right value.
5758 * util/grub.d/10_linux.in: Likewise.
5759 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
5760 via PRINT_FS_UUID.
5761 (main): Recognise `-t fs_uuid' argument.
5762
01b73ec8 57632008-05-30 Robert Millan <rmh@aybabtu.com>
5764
5765 * util/biosdisk.c (map): Redefine structure to hold information
5766 about GRUB drive name.
fe6b695a 5767 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 5768 drive names.
5769 (call_hook): Remove.
5770 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
5771 member. Assume drive has partitions.
5772 (grub_util_biosdisk_open): Access device names via `.device' struct
5773 member.
5774 (open_device): Likewise.
5775 (find_drive): Likewise.
5776 (read_device_map): Adjust map[] usage to match the new struct
5777 definition. Don't check for duplicates (still possible, but not cheap
5778 anymore).
5779 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
5780 (make_device_name): Remove assumption of BIOS-like drive names.
5781
22f16596 57822008-05-30 Pavel Roskin <proski@gnu.org>
5783
5784 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
5785 compiling execute.c doesn't need grub_script.tab.h anymore.
5786 (normal/command.c_DEPENDENCIES): Likewise.
5787 (normal/function.c_DEPENDENCIES): Likewise.
5788 * conf/i386-ieee1275.rmk: Likewise.
5789 * conf/i386-linuxbios.rmk: Likewise.
5790 * conf/i386-pc.rmk: Likewise.
5791 * conf/powerpc-ieee1275.rmk: Likewise.
5792 * conf/sparc64-ieee1275.rmk: Likewise.
5793
528ad8f2 57942008-05-29 Pavel Roskin <proski@gnu.org>
5795
d1dff95d 5796 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
5797 when scanning metadata for volume group name.
5798
528ad8f2 5799 * include/grub/script.h: Don't include grub_script.tab.h. It's
5800 a generated file, which may only be included from the files with
5801 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
5802 use union YYSTYPE, as the later allows forward declaration.
5803 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
5804
47248e08 58052008-05-29 Robert Millan <rmh@aybabtu.com>
5806
5807 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
5808 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
5809 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
5810 (grub_console_checkkey): Add grub_dprintf() call to report unknown
5811 scan codes.
5812
ee632529 58132008-05-29 Robert Millan <rmh@aybabtu.com>
5814
5815 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
5816 control key combinations.
5817
eee96e08 58182008-05-29 Robert Millan <rmh@aybabtu.com>
5819
5820 * util/powerpc/ieee1275/grub-install.in: Move from here ...
5821 * util/ieee1275/grub-install.in: ... to here.
5822 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
5823 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
5824 (grub_install_SOURCES): Likewise.
5825
da9a6a94 58262008-05-29 Robert Millan <rmh@aybabtu.com>
5827
5828 * fs/affs.c: Update copyright year.
5829 * fs/ext2.c: Likewise.
5830 * fs/fshelp.c: Likewise.
5831 * fs/hfsplus.c: Likewise.
5832 * fs/ntfs.c: Likewise.
5833 * fs/xfs.c: Likewise.
5834 * include/grub/fshelp.h: Likewise.
5835 * util/grub-mkdevicemap.c: Likewise.
5836
12e65f3a 58372008-05-28 Robert Millan <rmh@aybabtu.com>
5838
5839 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
5840 might need to be fatfs to support some firmware implementations
5841 (e.g. OFW or EFI).
5842
23023641 58432008-05-28 Robert Millan <rmh@aybabtu.com>
5844
5845 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
5846 devices.
5847 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5848 (make_device_map): Likewise.
5849
887d2619 58502008-05-20 Bean <bean123ch@gmail.com>
5851
5852 * fs/fshelp.c (grub_fshelp_map_block): New function.
5853 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
5854 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
5855
5856 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
5857 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
5858 (grub_fshelp_journal): New structure.
5859 (grub_fshelp_map_block): New function prototype.
5860 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
5861 (grub_fshelp_map_block): Likewise.
5862
5863 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
5864 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
5865 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
5866 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
5867 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
5868 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
5869 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
5870 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
5871 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
5872 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
5873 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
5874 (grub_ext2_sblock): New members for journal support.
5875 (grub_ext3_journal_header): New structure.
5876 (grub_ext3_journal_revoke_header): Likewise.
5877 (grub_ext3_journal_block_tag): Likewise.
5878 (grub_ext3_journal_sblock): Likewise.
5879 (grub_fshelp_node): New members logfile and journal.
5880 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
5881 grub_fshelp_map_block to get real block number.
5882 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
5883 number.
5884 (grub_ext2_read_inode): Likewise.
5885 (grub_ext3_get_journal): New function.
5886 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
5887 (grub_ext2_close): Release memory used by journal.
5888
5889 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
5890 (REISERFS_MAGIC_DESC_BLOCK): New macro.
5891 (grub_reiserfs_transaction_header): Renamed to
5892 grub_reiserfs_description_block, replace field data with real_blocks.
5893 (grub_reiserfs_commit_block): New structure.
5894 (grub_reiserfs_data): New member journal.
5895 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
5896 number.
5897 (grub_reiserfs_read_symlink): Likewise.
5898 (grub_reiserfs_iterate_dir): Likewise.
5899 (grub_reiserfs_open): Likewise.
5900 (grub_reiserfs_read): Likewise.
5901 (grub_reiserfs_get_journal): New function.
5902 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
5903 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
5904 using grub_reiserfs_get_journal.
5905 (grub_reiserfs_close): Release memory used by journal.
5906
5907 * fs/affs.c (grub_affs_read_block): Change block type to
5908 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
5909
5910 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
5911
5912 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
5913
5914 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
5915
5916 * fs/udf.c (grub_udf_read_block): Change block type to
5917 grub_disk_addr_t. Use type cast to avoid warning.
5918
5919 * fs/xfs.c (grub_xfs_read_block): Likewise.
5920
b7c6bed5 59212008-05-16 Christian Franke <franke@computer.org>
5922
5923 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
5924 to ensure that break with ESC will always work.
5925 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
5926 Remove ESC from keyboard queue.
5927
eedf167f 59282008-05-16 Christian Franke <franke@computer.org>
5929
5930 * util/biosdisk.c: [__CYGWIN__] Add includes.
5931 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
5932 (get_os_disk): Move variable declarations to OS specific
5933 parts to avoid warning.
5934 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
5935 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
5936 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
5937 Cygwin.
5938 * util/getroot.c: [__CYGWIN__] Add includes.
5939 (strip_extra_slashes): Fix "/" case.
5940 [__CYGWIN__] (get_win32_path): New function.
5941 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
5942 [__CYGWIN__] (find_root_device): Disable.
5943 [__CYGWIN__] (get_bootsec_serial): New function.
5944 [__CYGWIN__] (find_cygwin_root_device): Likewise.
5945 [__linux__] (grub_guess_root_device): Add early returns to simplify
5946 structure.
5947 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
5948 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
5949 check for Linux only.
5950
a079699e 59512008-05-15 Bean <bean123ch@gmail.com>
5952
5953 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
5954 keyboard hang problem in apple's intel mac.
5955
1cf4059a 59562008-05-09 Robert Millan <rmh@aybabtu.com>
5957
5958 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
5959 devices.
5960 * util/grub-mkdevicemap.c (get_virtio_disk_name)
5961 (make_device_map): Likewise.
5962 Reported by Aurelien Jarno <aurel32@debian.org>
5963
ed759390 59642008-05-07 Ian Campbell <ijc@hellion.org.uk>
5965
5966 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
5967 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
5968 (make_device_map): Output entries for xvd type disks.
5969
b56c4eaa 59702008-05-07 Robert Millan <rmh@aybabtu.com>
5971
5972 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
5973 devices.
5974 * util/grub-mkdevicemap.c (get_cciss_disk_name)
5975 (make_device_map): Likewise.
5976 Reported by Roland Dreier <rdreier@cisco.com>
5977
7f8866ed 59782008-05-07 Robert Millan <rmh@aybabtu.com>
5979
5980 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
5981 grub_strstr() call. Correct a few mistakes in failure path handling.
5982
b0346e0f 59832008-05-06 Robert Millan <rmh@aybabtu.com>
5984
5985 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5986 Do not print a trailing slash (therefore, the root directory is an
5987 empty string).
5988 (convert_system_path_to_grub_path): Do not remove trailing slash
5989 from make_system_path_relative_to_its_root() output.
5990
5991 * util/i386/pc/grub-install.in: Add trailing slash to output from
5992 make_system_path_relative_to_its_root().
5993
6cf12cbd 59942008-05-06 Robert Millan <rmh@aybabtu.com>
5995
5996 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
5997 ensures that output lines aren't intermangled with those sent to
5998 stderr (via grub_util_info()).
5999 * util/grub-probe.c (grub_refresh): Likewise.
6000 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
6001
0fbb3117 60022008-05-05 Christian Franke <franke@computer.org>
6003
6004 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
6005 Add Cygwin device names.
6006 (get_ide_disk_name) [__CYGWIN__]: Likewise.
6007 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
6008 (check_device): Return error instead of success on empty name.
6009 (make_device_map): Move label inside linux specific code to
6010 prevent compiler warning.
6011
8124cdb7 60122008-04-30 Robert Millan <rmh@aybabtu.com>
6013
6014 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
6015 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
6016 first boot option.
6017 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
6018
094c01d0 60192008-04-29 Robert Millan <rmh@aybabtu.com>
6020
6021 * docs/grub.cfg: New file (example GRUB configuration).
6022
f4b1fc02 60232008-04-26 Robert Millan <rmh@aybabtu.com>
6024
329ce2a5 6025 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
6026 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
6027 and `disk/ieee1275/nand.c'.
f4b1fc02 6028
25f16ec1 60292008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 6030
25f16ec1 6031 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
6032 i386-linuxbios.
6033
6034 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
6035 change the buffer size to 4096 for cdrom device.
6036
6037 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6038 and nand.mod.
6039 (_linux_mod_SOURCES): New variable.
6040 (_linux_mod_CFLAGS): Likewise.
6041 (_linux_mod_LDFLAGS): Likewise.
6042 (linux_mod_SOURCES): Likewise.
6043 (linux_mod_CFLAGS): Likewise.
6044 (linux_mod_LDFLAGS): Likewise.
6045 (nand_mod_SOURCES): Likewise.
6046 (nand_mod_CFLAGS): Likewise.
6047 (nand_mod_LDFLAGS): Likewise.
6048
6049 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6050 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6051 type property. (nand device in olpc don't have this property)
6052
6053 * include/grub/disk.h (grub_disk_dev_id): New macro
6054 GRUB_DISK_DEVICE_NAND_ID.
6055
6056 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6057 function prototype.
6058 (grub_rescue_cmd_initrd): Likewise.
6059
6060 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6061 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6062 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 6063
25f16ec1 6064 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6065 GRUB_MACHINE_IEEE1275 is defined.
6066
6067 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6068 Use NESTED_FUNC_ATTR attribute on the hook parameter.
6069
6070 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6071 on nested function heap_init.
6072 (grub_upper_mem): New variable for i386-ieee1275.
6073 (grub_get_extended_memory): New function for i386-ieee1275.
6074 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6075
6076 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6077 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6078 property.
f19dbdb7 6079
25f16ec1 6080 * loader/i386/ieee1275/linux.c: New file.
6081
6082 * loader/i386/ieee1275/linux_normal.c: New file.
6083
6084 * disk/ieee1275/nand.c: New file.
6085
e89d61e9 60862008-04-18 Thomas Schwinge <tschwinge@gnu.org>
6087
6088 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6089 value.
6090 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6091
602566f6 60922008-04-18 Robert Millan <rmh@aybabtu.com>
6093
6094 Restructures early code path on ieee1275 to unify grub_main() as
6095 the first C function that is executed in every platform.
6096
6097 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6098 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6099 cmain().
6100 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6101 * kern/ieee1275/cmain.c (cmain): Rename to ...
6102 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6103 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6104 at the beginning.
6105
57490c2b 61062008-04-18 Robert Millan <rmh@aybabtu.com>
6107
6108 * util/update-grub.in: Fix syntax error when setting
6109 `GRUB_PRELOAD_MODULES'.
6110 Reported by Stephane Chazelas <stephane@artesyncp.com>
6111
1977517d 61122008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
6113
6114 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6115 section into account, newer toolchains generate unique build ids
6116 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 6117 we want build ids to be preserved
1977517d 6118 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6119 far from other sections don't cause the raw binary images grow
6120 size
6121
bfb1f1a2 61222008-04-15 Robert Millan <rmh@aybabtu.com>
6123
6124 * disk/lvm.c: Update copyright year.
6125 * kern/misc.c: Likewise.
6126
01979850 61272008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6128
6129 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 6130 there is no memory left for physical volume name.
01979850 6131
0a1150e2 61322008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6133
6134 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6135 volume name mapping to support bigger than 9 character names properly.
6136
82ead3fe 61372008-04-13 Robert Millan <rmh@aybabtu.com>
6138
6139 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6140 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6141
e54a72f5 61422008-04-13 Christian Franke <franke@computer.org>
6143
6144 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6145 to create a floppy emulation boot CD when non emulation mode
6146 does not work.
6147 Enable Joliet CD filesystem extension.
6148
9fe86034 61492008-04-13 Robert Millan <rmh@aybabtu.com>
6150
6151 * kern/misc.c (grub_strncat): Fix off-by-one error.
6152 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6153
6154 * kern/env.c (grub_env_context_close): Clear current context, not
6155 previous one.
6156 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6157
6158 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6159
7ceeee39 61602008-04-13 Robert Millan <rmh@aybabtu.com>
6161
6162 Improve robustness when handling LVM.
6163
6164 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 6165 (and leave `*p' unmodified).
7ceeee39 6166 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6167 through it.
6168 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6169 iterating through it.
6170 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6171 through it.
fe6b695a 6172 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 6173 when due) on each grub_lvm_getvalue() or grub_strstr() call.
6174 Don't assume `vg->pvs != NULL' when iterating through it.
6175
58cd3d85 61762008-04-13 Robert Millan <rmh@aybabtu.com>
6177
6178 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6179 * genmk.rb (partmap): New variable.
6180 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6181 (#{partmap}): New target rule.
6182 * genpartmaplist.sh: New file.
6183 * Makefile.in (pkglib_DATA): Add partmap.lst.
6184 (partmap.lst): New target rule.
6185 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6186 modules (including all partition maps), instead of preloading them.
6187
78b51059 61882007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
6189
6190 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6191 `linux-boot-prober' (if installed) to detect other operating
6192 systems which are installed on the computer and add them to
6193 the boot menu.
6194 * conf/common.rmk: Build and install 30_os-prober.
6195
a91627b4 61962008-04-12 Robert Millan <rmh@aybabtu.com>
6197
6198 * kern/powerpc/ieee1275/init.c: Move from here ...
6199 * kern/ieee1275/init.c: ... to here. Update all users.
6200
6201 * kern/powerpc/ieee1275/cmain.c: Move from here ...
6202 * kern/ieee1275/cmain.c: ... to here. Update all users.
6203
6204 * kern/powerpc/ieee1275/openfw.c: Move from here ...
6205 * kern/ieee1275/openfw.c: ... to here. Update all users.
6206
6207 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6208 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
6209
322562ea 62102008-04-10 Pavel Roskin <proski@gnu.org>
6211
6212 * configure.ac: Always use "_cv_" in cache variables for
6213 compatibility with Autoconf 2.62.
6214
a02a73c5 62152008-04-07 Robert Millan <rmh@aybabtu.com>
6216
6217 Revert grub/machine/init.h addition by Pavel (since it breaks on
6218 i386-ieee1275 and others):
6219 * util/i386/pc/misc.c: Remove grub/machine/init.h.
6220 * util/powerpc/ieee1275/misc.c: Likewise.
6221
25c024b1 62222008-04-07 Robert Millan <rmh@aybabtu.com>
6223
6224 * util/grub-probe.c (probe): Improve error message.
6225
3cbd2f98 62262008-04-07 Robert Millan <rmh@aybabtu.com>
6227
6228 * util/biosdisk.c (read_device_map): Skip devices that don't exist
6229 (this prevents the presence of a bogus entry from ruining the whole
6230 thing).
6231
87a297bf 62322008-04-06 Pavel Roskin <proski@gnu.org>
6233
36747a62 6234 * util/biosdisk.c: Include grub/util/biosdisk.h.
6235 * util/grub-fstest.c (execute_command): Make static.
6236 * util/grub-mkdevicemap.c (check_device): Likewise.
6237 * util/i386/pc/misc.c: Include grub/machine/init.h.
6238 * util/powerpc/ieee1275/misc.c: Likewise.
6239 * util/lvm.c: Include grub/util/lvm.h.
6240 * util/misc.c: Include grub/kernel.h, grub/misc.h and
6241 grub/cache.h.
6242 * util/raid.c: Include grub/util/raid.h.
6243 (grub_util_getdiskname): Make static.
6244
87a297bf 6245 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6246 grub_hostfs_fini(), as they are called from grub_init_all() and
6247 grub_fini_all() respectively. This fixes an infinite loop in
6248 grub-fstest due to double registration of hostfs.
6249 Reported by Christian Franke <Christian.Franke@t-online.de>
6250
f6ce7629 62512008-04-05 Pavel Roskin <proski@gnu.org>
6252
6253 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6254 all 8 functions. Otherwise, probe function 0 only.
6255
070e49e4 62562008-04-04 Pavel Roskin <proski@gnu.org>
6257
8b088a4c 6258 * commands/lspci.c (grub_lspci_iter): Print the bus number
6259 correctly.
6260
4f657021 6261 * commands/lspci.c (grub_pci_classes): Fix typos.
6262 (grub_lspci_iter): Don't print func twice. Print vendor ID
6263 before device ID, as it's normally done.
6264
070e49e4 6265 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6266 Fix signedness warnings.
6267 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6268 Likewise.
6269 * util/ieee1275/get_disk_name.c: Include config.h so that
6270 _GNU_SOURCE is defined and getline() is declared. Mark an
6271 unused argument as such. Fix a signedness warning.
6272
ba7328dc 62732008-04-02 Pavel Roskin <proski@gnu.org>
6274
26887f22 6275 * genkernsyms.sh.in: Use more robust assignments for CC and
6276 srcdir. Quote srcdir.
6277 * gensymlist.sh.in: Likewise. Assert at the compile time that
6278 the symbol table is not empty.
6279
ba7328dc 6280 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6281 * fs/cpio.c (grub_cpio_read): Likewise.
6282
0f582c6b 62832008-04-01 Pavel Roskin <proski@gnu.org>
6284
4b6e1995 6285 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6286 * disk/host.c (grub_host_open): Likewise.
6287 * disk/loopback.c (grub_loopback_open): Likewise.
6288 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6289 disk->id as in disk/host.c, not a multi-character constant.
6290
828a2768 6291 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
6292 later is obsolete, potentially dangerous and sets a bad example.
6293 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6294 * util/misc.c (grub_util_get_image_size): Likewise.
6295
2bb4fb47 6296 * disk/loopback.c (options): Improve help for "--partitions".
6297
0f582c6b 6298 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6299 options to align them with the short options, e.g. "echo -e".
6300
a33224e0 63012008-03-31 Bean <bean123ch@gmail.com>
6302
6303 * video/reader/png.c (grub_png_data): New member is_16bit and
6304 image_data.
6305 (grub_png_decode_image_header): Detect 16 bit png image.
6306 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6307 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6308 (grub_video_reader_png): Release memory occupied by image_data.
6309
6310 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6311 4096 bytes.
6312 (grub_nfs_mount): Skip the test for sector per cluster.
6313
6314 * include/grub/ntfs.h (MAX_SPC): Removed.
6315
86cb4f54 63162008-03-31 Bean <bean123ch@gmail.com>
6317
6318 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6319 (grub_probe_SOURCES): Add fs/afs.c.
6320 (grub_fstest_SOURCES): Likewise.
6321 (afs_mod_SOURCES): New variable.
6322 (afs_mod_CFLAGS): Likewise.
6323 (afs_mod_LDFLAGS): Likewise.
6324
6325 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6326 (grub_emu_SOURCES): Likewise.
6327
6328 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6329
6330 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6331
6332 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6333
6334 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6335
6336 * fs/afs.c: New file.
6337
17c74c21 63382008-03-30 Pavel Roskin <proski@gnu.org>
6339
4cb68e89 6340 * disk/host.c: Include grub/misc.h to fix a warning.
6341 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6342 warnings about implicit declarations.
6343
8790bb04 6344 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6345 variable.
6346 * include/grub/i386/loader.h: Change declaration of
6347 grub_linux_boot() to match what grub_loader_set() expects.
6348 * util/getroot.c (grub_guess_root_device): Return const char* to
6349 fix a warning.
6350 * util/grub-probe.c (probe): Fix a warning about uninitialized
6351 abstraction_name variable.
6352 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6353 second argument as unused to fix a warning.
6354
9a3f3296 6355 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6356 missing grub_error() call.
6357
0ecef90d 6358 * util/update-grub_lib.in: Define datarootdir, since Autoconf
6359 2.60 and newer uses it to define datadir.
6360
0bf6d401 6361 * commands/sleep.c: Fix warning about implicit declaration.
6362 * disk/memdisk.c: Likewise.
6363 * loader/aout.c: Likewise.
6364 * loader/i386/bsd_normal.c: Likewise.
6365 * util/grub-probe.c: Likewise.
6366
7cdacf97 6367 * commands/i386/cpuid.c (has_longmode): Make static.
6368 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
6369 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
6370
17c74c21 6371 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
6372 GDT. This is more robust, as %ds can change.
6373 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
6374 calling real_to_prot().
6375 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
6376
80a3e68b 63772008-03-28 Pavel Roskin <proski@gnu.org>
6378
6379 * kern/i386/pc/startup.S: Assert that uncompressed functions
6380 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
6381 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
6382 code, as they push parts of the code (error handlers) beyond
6383 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
6384 code as correctness and size.
6385
77bcd272 63862008-03-28 Pavel Roskin <proski@gnu.org>
6387
6388 * kern/i386/pc/startup.S
6389 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
6390 data block address to the real mode, keep offset minimal. This
6391 works around a bug in AWARD BIOS on old Athlon systems, which
6392 makes CD detection hang.
6393
c5dfd43b 63942008-03-26 Pavel Roskin <proski@gnu.org>
6395
6396 * normal/color.c (grub_parse_color_name_pair): Make `name' a
6397 const.
6398 * include/grub/normal.h: Add grub_parse_color_name_pair()
6399 declaration.
6400
bf962df2 64012008-03-24 Bean <bean123ch@gmail.com>
6402
6403 * disk/i386/pc/biosdisk.c (cd_start): Removed.
6404 (cd_count): Removed.
6405 (cd_drive): New variable.
6406 (grub_biosdisk_get_drive): Don't check for (cdN) device.
6407 (grub_biosdisk_call_hook): Likewise.
6408 (grub_biosdisk_iterate): Change cdrom detection method.
6409 (grub_biosdisk_open): Replace cd_start with cd_drive.
6410 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6411 detect cdrom device.
6412
6413 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
6414 Removed.
6415 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
6416 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
6417 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
6418 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
6419 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
6420 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
6421 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
6422 (grub_biosdisk_cdrp): New structure.
6423 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
6424
6425 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
6426
6427 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
6428 device.
6429
6430 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
6431 New function.
6432
68e7fc7a 64332008-03-20 Robert Millan <rmh@aybabtu.com>
6434
6435 Remove 2 TiB limit in ata.mod.
6436 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
6437 (grub_ata_dumpinfo): Print sector count with 0x%llx.
6438 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
6439 grub_uint64_t instead of grub_uint32_t.
6440
38ad2cf5 64412008-03-05 Bean <bean123ch@gmail.com>
6442
6443 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
6444 (grub_multiboot): Set boot device.
6445
6446 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
6447
2b89344e 64482008-03-02 Bean <bean123ch@gmail.com>
6449
6450 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
6451 symlink_buffer.
6452
87a95d1f 64532008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
6454
6455 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
6456 texinfo.tex.
6457
6458 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
6459 modified.
6460
6461 * docs/fdl.texi: New file.
f19dbdb7 6462
87a95d1f 6463 * docs/mdate-sh: New file. Copied from gnulib.
6464 * docs/texinfo.tex: Likewise.
6465
6466 * config.guess: Updated from gnulib.
6467 * install-sh: Likewise.
6468
7dc15d8e 64692008-02-28 Robert Millan <rmh@aybabtu.com>
6470
6471 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
6472 (aout_mod_SOURCES): New variable.
6473 (aout_mod_CFLAGS): Likewise.
6474 (aout_mod_LDFLAGS): Likewise.
6475
6476 * conf/i386-ieee1275.rmk: Likewise.
6477
b00ab696 64782008-02-28 Robert Millan <rmh@aybabtu.com>
6479
6480 * util/update-grub.in: Reorganise terminal validity check. Accept
6481 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
6482 Based on suggestion by Franklin PIAT.
6483
79ca2d78 64842008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
6485
6486 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
6487 function.
6488 * util/getroot.c (grub_util_check_block_device): New function that
6489 returns the given argument if it is a block device and returns NULL else.
6490 * util/grub-probe.c (argument_is_device): New variable.
6491 (probe): Promote device_name from a variable to an argument. Receive
6492 device_name from grub_util_check_block_device() if path is NULL and from
6493 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 6494 (options): Introduce new parameter '-d, --device'.
79ca2d78 6495 (main): Add description of the new parameter to the help screen.
6496 Rename path variable to argument. Set argument_is_device if the '-d'
6497 option is given. Pass argument to probe() depending on
6498 argument_is_device.
6499
0d16e571 65002008-02-24 Bean <bean123ch@gmail.com>
6501
6502 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
6503 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
6504 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
6505 (GRUB_ISO9660_VOLDESC_PART): Likewise.
6506 (GRUB_ISO9660_VOLDESC_END): Likewise.
6507 (grub_iso9660_primary_voldesc): New member escape.
6508 (grub_iso9660_data): New member joliet.
6509 (grub_iso9660_convert_string): New function.
6510 (grub_iso9660_mount): Detect joliet extension.
6511 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
6512 (grub_iso9660_iso9660_label): Likewise.
6513
6514 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
6515 (grub_setup_SOURCES): Add fs/udf.c.
6516 (grub_fstest_SOURCES): Likewise.
6517 (udf_mod_SOURCES): New variable.
6518 (udf_mod_CFLAGS): Likewise.
6519 (udf_mod_LDFLAGS): Likewise.
6520
6521 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
6522 (grub_emu_SOURCES): Likewise.
6523
6524 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6525
6526 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6527
6528 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6529
6530 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6531
6532 * fs/udf.c: New file.
6533
8a594a17 65342008-02-24 Robert Millan <rmh@aybabtu.com>
6535
6536 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
6537 (normal/lexer.c_DEPENDENCIES): New variables.
6538 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6539 (normal/lexer.c_DEPENDENCIES): Likewise.
6540 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
6541 (normal/lexer.c_DEPENDENCIES): Likewise.
6542 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
6543 (normal/lexer.c_DEPENDENCIES): Likewise.
6544 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6545 (normal/lexer.c_DEPENDENCIES): Likewise.
6546 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6547 (normal/lexer.c_DEPENDENCIES): Likewise.
6548
2dc33c03 65492008-02-23 Robert Millan <rmh@aybabtu.com>
6550
6551 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
6552 since they were intended to be in hex. This didn't break previously
6553 because of a bug in gpt_partition_map_iterate() (see below).
6554
6555 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
6556 when checking the validity of GPT header.
6557 Remove `partno', since it always provides the same information as `i'.
6558
f6f4cfb0 65592008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
6560
6561 * include/grub/efi/time.h: Fix a wrong comment.
6562
79ff665f 65632008-02-19 Pavel Roskin <proski@gnu.org>
6564
6565 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
6566 message.
6567
d38e24c2 65682008-02-19 Bean <bean123ch@gmail.com>
6569
6570 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
6571 (aout_mod_SOURCES): New variable.
6572 (aout_mod_CFLAGS): Likewise.
6573 (aout_mod_LDFLAGS): Likewise.
6574 (_bsd_mod_SOURCES): New variable.
6575 (_bsd_mod_CFLAGS): Likewise.
6576 (_bsd_mod_LDFLAGS): Likewise.
6577 (bsd_mod_SOURCES): New variable.
6578 (bsd_mod_CFLAGS): Likewise.
6579 (bsd_mod_LDFLAGS): Likewise.
6580
6581 * include/grub/aout.h: New file.
6582
6583 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
6584
6585 * include/grub/i386/bsd.h: New file.
6586
6587 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
6588 to make it public.
6589
6590 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
6591 function is called, so that it's possible to change it inside the hook.
6592 (grub_elf64_load): Likewise.
6593 (grub_elf_file): Don't close the file if elf header is not found.
6594 (grub_elf_close): Close the file if grub_elf_file fails (The new
6595 grub_elf_file won't close it).
6596 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
6597 (grub_elf64_size): Likewise.
6598
6599 * kern/i386/loader.S (grub_unix_real_boot): New function.
6600
6601 * loader/aout.c: New file.
6602
6603 * loader/i386/bsd.c: New file.
6604
6605 * loader/i386/bsd_normal.c: New file.
6606
6607 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
6608
6609 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 6610 can test other formats.
d38e24c2 6611
b93bdb0f 66122008-02-19 Robert Millan <rmh@aybabtu.com>
6613
6614 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
6615 (grub_gpt_partition_type_empty): Redefine with macro from
6616 `<grub/gpt_partition.h>'.
6617 (gpt_partition_map_iterate): Adjust partition type comparison.
6618
6619 Export `entry' as partmap-specific `part.data' struct.
6620 (grub_gpt_header, grub_gpt_partentry): Move from here ...
6621
6622 * include/grub/gpt_partition.h (grub_gpt_header)
6623 (grub_gpt_partentry): ... to here (new file).
6624
6625 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
6626
6627 (grub_gpt_partition_type_bios_boot): New const variable, defined
6628 with macro from `<grub/gpt_partition.h>'.
6629
6630 (setup): Replace `first_start' with `embed_region', which keeps
6631 track of the embed region (and is partmap-agnostic).
6632
6633 Replace find_first_partition_start() with find_usable_region(),
6634 which finds a usable region for embedding using partmap-specific
6635 knowledge (supports PC/MSDOS and GPT).
6636
6637 Fix all assumptions that the embed region start at sector 1, using
6638 `embed_region.start' from now on. Similarly, use `embed_region.end'
6639 rather than `first_start' to calculate available size.
6640
6641 In grub_util_info() message, replace "into after the MBR" with an
6642 indication of the specific sector our embed region starts at.
6643
66cb40f6 66442008-02-19 Robert Millan <rmh@aybabtu.com>
6645
6646 * DISTLIST: Replace `commands/ieee1275/halt.c' and
6647 `commands/ieee1275/reboot.c' with `commands/halt.c' and
6648 `commands/reboot.c'.
6649 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6650 (halt_mod_SOURCES): Likewise.
6651 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6652 (halt_mod_SOURCES): Likewise.
6653
b7202015 66542008-02-17 Christian Franke <franke@computer.org>
6655
6656 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
6657
32b0fc49 66582008-02-17 Robert Millan <rmh@aybabtu.com>
6659
6660 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6661 set `first_start' to 0 for non-PC/MSDOS partition maps.
6662
aca63502 66632008-02-16 Robert Millan <rmh@aybabtu.com>
6664
6665 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6666 do not assume partition map is PC/MSDOS before performing checks that
6667 are specific to that layout.
6668
0de8be86 66692008-02-13 Robert Millan <rmh@aybabtu.com>
6670
6671 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
6672 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
6673 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
6674
c3db8364 66752008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
6676
6677 * configure.ac: Only a cosmetic change on the handling of
6678 -fno-stack-protector.
6679
f714229e 66802008-02-12 Alexandre Boeglin <alex@boeglin.org>
6681
c3db8364 6682 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
6683 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
6684 reboot.c.
f714229e 6685 (grub_install_SOURCES): Add halt.mod and reboot.mod.
6686 (halt_mod_SOURCES): New variable.
6687 (halt_mod_CFLAGS): Likewise.
6688 (halt_mod_LDFLAGS): Likewise.
6689 (reboot_mod_SOURCES): Likewise.
6690 (reboot_mod_CFLAGS): Likewise.
6691 (reboot_mod_LDFLAGS): Likewise.
6692
c3db8364 6693 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
6694 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
6695 reboot.c.
f714229e 6696 (halt_mod_SOURCES): Likewise.
6697 (reboot_mod_SOURCES): Likewise.
6698
c3db8364 6699 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
6700 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 6701 (reboot_mod_SOURCES): Likewise.
6702
6703 * commands/i386/pc/reboot.c: merge this file ...
6704
6705 * commands/ieee1275/reboot.c: ... and this file ...
6706
6707 * commands/reboot.c: ... to this file.
c3db8364 6708 Add some precompiler directive to include the correct header for
6709 each machine.
f714229e 6710
6711 * commands/ieee1275/halt.c: move this file ...
6712
6713 * commands/halt.c: ... to here.
c3db8364 6714 Add some precompiler directive to include the correct header for
6715 each machine.
f714229e 6716
6717 * include/grub/efi/efi.h (grub_reboot): New function declaration.
6718 (grub_halt): Likewise.
6719
6720 * kern/efi/efi.c (grub_reboot): New function.
6721 (grub_halt): Likewise.
6722
c74493e0 67232008-02-12 Robert Millan <rmh@aybabtu.com>
6724
6725 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
6726 /dev (like it is done for /dev/mapper). This doesn't provide support
6727 for EVMS, but at least it is now easy to identify the problem when it
6728 arises.
6729
d0db4b04 67302008-02-11 Robert Millan <rmh@aybabtu.com>
6731
6732 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
6733 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
6734 comparing it with -1, not 0.
6735
bf748642 67362008-02-10 Robert Millan <rmh@aybabtu.com>
6737
6738 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
6739 `disk/lvm.c'.
6740 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6741 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
6742
6743 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
6744 `disk/lvm.c' to the end of the list.
6745 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6746 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6747
b5db202a 67482008-02-10 Robert Millan <rmh@aybabtu.com>
6749
6750 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
6751 grub_print_error() instead. This will let user know why we're entering
6752 rescue mode.
6753 Based on suggestions from Sam Morris.
6754
83abee31 67552008-02-10 Alexandre Boeglin <alex@boeglin.org>
6756
6757 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
6758 on remaining N args, instead of "--" arg N times.
6759
78d5a08b 67602008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
6761
6762 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
6763 (fill_with_default_glyph): Changed to use unknown_glyph for fill
6764 pattern for unknown glyphs.
6765
68807e5f 67662008-02-09 Robert Millan <rmh@aybabtu.com>
6767
6768 * configure.ac: Probe for `help2man'.
6769 * Makefile.in (builddir): New variable.
6770 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
6771 or otherwise add a few flags/options to it.
6772 (install-local): For every executable utility or script that is
6773 installed, invoke $(HELP2MAN) to install a manpage based on --help
6774 output.
6775
6776 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
6777 that it doesn't prevent --help from working in build tree.
6778
6779 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
6780 with `bug-grub@gnu.org'.
6781 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
6782 * util/update-grub.in (usage): New function.
6783 Implement proper argument check, with support for --help and --version
6784 (as well as existing -y).
6785
67862008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 6787
6788 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
6789 avoid overwriting previous output.
6790 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
6791
c1962162 67922008-02-09 Robert Millan <rmh@aybabtu.com>
6793
6794 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
6795 drawing the menu.
6796
3dac2e3f 67972008-02-09 Robert Millan <rmh@aybabtu.com>
6798
6799 * commands/sleep.c: New file.
6800 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
6801 (sleep_mod_SOURCES): New variable.
6802 (sleep_mod_CFLAGS): Likewise.
6803 (sleep_mod_LDFLAGS): Likewise.
6804
7a634e08 68052008-02-09 Robert Millan <rmh@aybabtu.com>
6806
6807 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
6808 situations in which we can deduce the RAID size and the superblock
6809 doesn't match it.
6810
b92f0c18 68112008-02-09 Robert Millan <rmh@aybabtu.com>
6812
6813 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
6814 and return a grub_diskmemberlist_t composed of LVM physical volumes.
6815 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
6816
6817 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
6818 and return a grub_diskmemberlist_t composed of physical array members.
6819 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
6820
6821 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
6822 prototype.
6823 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
6824 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
6825 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
6826
6827 * util/grub-probe.c (probe): Move partmap probing code from here ...
6828 (probe_partmap): ... to here.
6829 (probe): Use probe_partmap() once for the disk we're probing, and
6830 additionally, when such disk contains a memberlist() struct member,
6831 once for each disk that is contained in the structure returned by
6832 memberlist().
6833
91a4bf68 68342008-02-09 Robert Millan <rmh@aybabtu.com>
6835
6836 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
6837 environment variable to 'all' in order to obtain debug output from
6838 non-util/ code.
6839 * util/i386/pc/grub-setup.c (main): Likewise.
6840
a96f9caa 68412008-02-08 Robert Millan <rmh@aybabtu.com>
6842
6843 * disk/raid.c (grub_raid_scan_device): Check for
6844 `array->device[sb.this_disk.number]' rather than for
6845 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 6846 guaranteed to be accessible.
a96f9caa 6847
b37a9222 68482008-02-08 Robert Millan <rmh@aybabtu.com>
6849
6850 * disk/raid.c: Update copyright.
6851 * fs/cpio.c: Likewise.
6852 * include/grub/raid.h: Likewise.
6853 * loader/i386/pc/multiboot.c: Likewise.
6854 * util/hostfs.c: Likewise.
6855
5626aee1 68562008-02-08 Robert Millan <rmh@aybabtu.com>
6857
6858 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
6859 to a grub_disk_t array.
6860 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
6861 `device[x]'.
6862 (grub_raid_scan_device): Replace `device[x].name' accesses with
6863 `device[x]->name'. Simplify initialization of `array->device[x]'.
6864
554f0187 68652008-02-08 Robert Millan <rmh@aybabtu.com>
6866
6867 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
6868 grub_dprintf() calls.
6869 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
6870 error message.
6871
1ec8425d 68722008-02-07 Christian Franke <franke@computer.org>
6873
6874 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
6875 instead of fseek and ftell to support large files.
6876 (grub_hostfs_read): Likewise.
6877
f2156fda 68782008-02-07 Robert Millan <rmh@aybabtu.com>
6879
6880 Patch from Jeroen Dekkers.
6881 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 6882 failure, since successfully reading all array members might not be
f2156fda 6883 required.
6884
9216e0e7 68852008-02-06 Robert Millan <rmh@aybabtu.com>
6886
6887 * util/grub-probe.c (probe): Simplify partmap probing (with the
6888 assumption that the first word up to the underscore equals to
6889 the module name).
6890
b0dfd29a 68912008-02-06 Christian Franke <franke@computer.org>
6892
6893 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
6894 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
6895 last block of a cpio or tar stream.
6896 Check for "TRAILER!!!" instead of any empty data
6897 block to detect last block of a cpio stream.
6898 (grub_cpio_dir): Fix constness of variable np.
6899 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
6900 cpio or tar trailer is detected. This fixes a crash
6901 on open of a non existing file.
6902
c32865bf 69032008-02-05 Bean <bean123ch@gmail.com>
6904
6905 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
6906 address of entry.
6907 (grub_multiboot_load_elf64): Likewise.
6908 (grub_multiboot): Initialize mbi structure.
6909
6910 * util/grub-fstest.c: Don't include unused header file script.h.
6911
fe6b695a 6912 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 6913 of file.
6914 (grub_fstest_SOURCES): Likewise.
6915
409480b7 69162008-02-05 Robert Millan <rmh@aybabtu.com>
6917
6918 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
6919 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
6920 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
6921 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
6922
6923 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
6924 (translation_table): Replace hardcoded values with macros
6925 provided by `<grub/term.h>'.
6926
6927 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
6928 (keyboard_map): Correct/add a few values, with macros provided
6929 by `<grub/term.h>'.
6930 (keyboard_map_shift): Zero values that don't differ from their
6931 `keyboard_map' equivalents.
6932 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
6933 Discard the second scan code that is always sent by Caps lock.
6934 Only use `keyboard_map_shift' when it provides a non-zero value,
6935 otherwise fallback to `keyboard_map'.
6936
99fadbaa 69372008-02-04 Bean <bean123ch@gmail.com>
6938
6939 * Makefile.in (enable_grub_fstest): New variable.
6940
6941 * conf/common.rmk (grub_fstest_init.lst): New rule.
6942 (grub_fstest_init.h): Likewise.
6943 (grub_fstest_init.c): Likewise.
6944 (util/grub-fstest.c_DEPENDENCIES): New variable.
6945 (grub_fstest_SOURCES): Likewise.
6946
6947 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
6948
6949 * util/grub-fstest.c: New file.
6950
bf567c50 69512008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6952
6953 Make grub-setup handle a separate root device.
f19dbdb7 6954
bf567c50 6955 * util/i386/pc/grub-setup.c (setup): Always open the root device,
6956 so that the root device can be compared with the destination
6957 device.
6958 When embedding the core image, if the root and destination devices
6959 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
6960 0xFF.
6961 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 6962
9be6b98b 69632008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6964
6965 Add support for having a grub directory in a different drive. This
6966 is still only the data handling part.
f19dbdb7 6967
9be6b98b 6968 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
6969 (codestart): Save %dh in GRUB_ROOT_DRIVE.
6970 (grub_root_drive): New variable.
6971
6972 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
6973 instead of GRUB_BOOT_DRIVE to construct a device name. Set
6974 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
6975 as it was.
6976
6977 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
6978
6979 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
6980 macro.
6981 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
6982
6983 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
6984 is bogus, because PXE booting does not specify any drive
6985 correctly.
6986
6987 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
6988 am not sure if this is really correct.
6989
6990 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
6991 is always identical to the boot drive when booting from a CD.
6992
6993 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
6994 longer.
6995 (root_drive): New variable.
6996 (real_start): Unconditionally set %dh to ROOT_DRIVE.
6997 (setup_sectors): Push %dx right after popping it, because %dh will
6998 be modified later.
6999 (copy_buffer): Restore %dx.
7000
e0ca0677 70012008-02-03 Robert Millan <rmh@aybabtu.com>
7002
7003 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
7004 use `cdboot.img' for cdrom images.
7005
3b3f6629 70062008-02-03 Robert Millan <rmh@aybabtu.com>
7007
7008 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
7009 only setup gfxterm when `font' command has succeeded.
7010
d42b3672 70112008-02-03 Robert Millan <rmh@aybabtu.com>
7012
7013 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
7014 (grub_rescue_cmd_multiboot_loader)
7015 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
7016
fa370ea6 70172008-02-03 Pavel Roskin <proski@gnu.org>
7018
e0c5dacb 7019 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 7020 %edx and %esi from stack only after grub_gate_a20() is called.
7021 grub_gate_a20() clobbers %edx.
7022
f2a76e1d 70232008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
7024
7025 * configure.ac (AC_INIT): Bumped to 1.96.
7026
7027 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
7028 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
7029 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
7030 video/readers/png.c.
7031
90fd32d1 70322008-02-03 Bean <bean123ch@gmail.com>
9be665dd 7033
7034 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
7035 (cdboot_img_SOURCES): New variable.
7036 (cdboot_img_ASFLAGS): New variable.
7037 (cdboot_img_LDFLAGS): New variable.
7038
7039 * boot/i386/pc/cdboot.S: New file.
7040
7041 * disk/i386/pc/biosdisk.c (cd_start): New variable.
7042 (cd_count): Likewise.
7043 (grub_biosdisk_get_drive): Add support for cd device.
7044 (grub_biosdisk_call_hook): Likewise.
7045 (grub_biosdisk_iterate): Likewise.
7046 (grub_biosdisk_open): Likewise.
7047 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7048 (grub_biosdisk_rw): Support reading from cd device.
7049 (GRUB_MOD_INIT): Iterate cd devices.
7050
7051 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7052 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7053 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7054
7055 * kern/i386/pc/init.c (make_install_device): Check for cd device.
7056
4020aa53 70572008-02-02 Robert Millan <rmh@aybabtu.com>
7058
7059 * commands/read.c: New file.
7060 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7061 (read_mod_SOURCES): New variable.
7062 (read_mod_CFLAGS): Likewise.
7063 (read_mod_LDFLAGS): Likewise.
7064
e03a1132 70652008-02-02 Robert Millan <rmh@aybabtu.com>
7066
7067 * normal/main.c (grub_normal_execute): Check for `menu->size' when
7068 determining whether menu has to be displayed.
7069
58c69220 70702008-02-02 Marco Gerards <marco@gnu.org>
7071
7072 * bus/pci.c: New file.
7073
7074 * include/grub/pci.h: Likewise.
7075
7076 * include/grub/i386/pc/pci.h: Likewise.
7077
7078 * commands/lspci.c: Likewise.
7079
7080 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7081 `lspci.mod'.
7082 (pci_mod_SOURCES): New variable.
7083 (pci_mod_CFLAGS): Likewise.
7084 (pci_mod_LDFLAGS): Likewise.
7085 (lspci_mod_SOURCES): Likewise.
7086 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 7087 (lspci_mod_LDFLAGS): Likewise.
58c69220 7088
c004e1b4 70892008-02-02 Bean <bean123ch@gmail.com>
7090
7091 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7092 (grub_ufs_get_file_block): Fix indirect block calculation problem.
7093
7094 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7095 (grub_xfs_btree_node): New structure.
7096 (grub_xfs_btree_root): New structure.
7097 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7098 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7099 (GRUB_XFS_EXTENT_BLOCK): Likewise.
7100 (GRUB_XFS_EXTENT_SIZE): Likewise.
7101 (grub_xfs_read_block): Support btree format type.
7102 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7103 Use directory block as basic unit.
7104
7105 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7106
7107 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7108 __attribute__ ((__regparm__ (1))).
7109
f95562bf 71102008-02-01 Robert Millan <rmh@aybabtu.com>
7111
7112 Correct a mistake in previous commit.
7113
7114 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7115 top.
7116 (normal/command.c_DEPENDENCIES): New variable.
7117
7d31f41f 71182008-02-01 Robert Millan <rmh@aybabtu.com>
7119
7120 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7121 top.
7122 (normal/command.c_DEPENDENCIES): New variable.
7123 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7124 * conf/i386-ieee1275.rmk: Likewise.
7125 * conf/i386-linuxbios.rmk: Likewise.
7126 * conf/i386-pc.rmk: Likewise.
7127 * conf/sparc64-ieee1275.rmk: Likewise.
7128 * conf/powerpc-ieee1275.rmk: Likewise.
7129 (grub_emu_SOURCES): Add `fs/fshelp.c'.
7130
7131 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7132
60b6be74 71332008-02-01 Robert Millan <rmh@aybabtu.com>
7134
7135 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7136 call at beginning of function.
7137
078522ab 71382008-01-31 Pavel Roskin <proski@gnu.org>
7139
7140 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 7141 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7142 (grub_mkrescue_SOURCES): Likewise.
078522ab 7143 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7144
ccaa8a5f 71452008-01-30 Robert Millan <rmh@aybabtu.com>
7146
7147 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7148 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7149 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7150 (grub_probe_SOURCES): ... to here.
7151
7152 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7153 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7154 * conf/i386-ieee1275.rmk: Likewise.
7155 * conf/i386-linuxbios.rmk: Likewise.
7156 * conf/powerpc-ieee1275.rmk: Likewise.
7157
ae5a9cd7 71582008-01-30 Tristan Gingold <gingold@free.fr>
7159
7160 * kern/rescue.c: Silently accept empty lines.
7161
70bc2ef2 71622008-01-29 Bean <bean123ch@gmail.com>
7163
7164 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7165 (real_code_2): Code cleanup and change comment style.
7166 (move_memory): Avoid using 32-bit address mode.
7167
6a4d50ea 71682008-01-29 Bean <bean123ch@gmail.com>
7169
7170 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7171 (png_mod_SOURCES): New variable.
7172 (png_mod_CFLAGS): Likewise.
7173 (png_mod_LDFLAGS): Likewise.
7174
7175 * video/readers/png.c: New file.
7176
11cc30ac 71772008-01-28 Robert Millan <rmh@aybabtu.com>
7178
7179 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7180 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7181 `ifndef GRUB_MOD_GAP' hack.
7182 * util/elf/grub-mkimage.c (add_segments): Likewise.
7183
3abc589f 71842008-01-27 Robert Millan <rmh@aybabtu.com>
7185
7186 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7187 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 7188 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 7189
e1907778 71902008-01-27 Robert Millan <rmh@aybabtu.com>
7191
7192 Get grub-emu to build again (including parallel builds).
7193
7194 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7195 Split into ...
7196 (util/grub-emu.c_DEPENDENCIES): ... this, ...
7197 (normal/execute.c_DEPENDENCIES): ... this, ...
7198 (grub-emu_DEPENDENCIES): ... and this.
7199
7200 * conf/i386-efi.rmk: Likewise.
7201 * conf/i386-linuxbios.rmk: Likewise.
7202 * conf/i386-ieee1275.rmk: Likewise.
7203 * conf/powerpc-ieee1275.rmk: Likewise.
7204 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7205
2216b101 72062008-01-27 Robert Millan <rmh@aybabtu.com>
7207
7208 * NEWS: Add a few items.
7209
f75172d9 72102008-01-27 Robert Millan <rmh@aybabtu.com>
7211
7212 Fix parallel builds with grub-emu. Based on earlier commit for
7213 grub-probe and grub-setup.
7214
7215 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7216 (util/grub-emu.c_DEPENDENCIES): ... this.
7217 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7218 (util/grub-emu.c_DEPENDENCIES): ... this.
7219 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7220 (util/grub-emu.c_DEPENDENCIES): ... this.
7221 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7222 (util/grub-emu.c_DEPENDENCIES): ... this.
7223 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7224 (util/grub-emu.c_DEPENDENCIES): ... this.
7225
3f51de77 72262008-01-27 Pavel Roskin <proski@gnu.org>
7227
7228 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7229 to create a gap between _end and the modules added to the image
7230 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
7231 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7232 * util/elf/grub-mkimage.c (add_segments): Likewise.
7233
2033f53e 72342008-01-26 Pavel Roskin <proski@gnu.org>
7235
7236 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7237 just return an error.
7238
22da1f6f 72392008-01-26 Bean <bean123ch@gmail.com>
7240
7241 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7242 (grub_reiserfs_get_item): Save offset of the next item.
7243 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7244
2a9525e6 72452008-01-25 Robert Millan <rmh@aybabtu.com>
7246
7247 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7248 make all filesystem sources appear together (possibly fixing omissions
7249 while at it).
7250 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7251 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7252 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7253 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7254
7255 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
7256 add `kern/file.c'.
7257 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7258 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7259 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7260 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7261
7262 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7263 (probe): Add a sanity check to make sure of our ability to read
7264 requested files when probing for filesystem type.
7265
7266 * genmk.rb: Update copyright year (2007).
7267
7268 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7269 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7270 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7271 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7272 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7273 : Remove function prototypes.
7274
b95f71b5 72752008-01-25 Robert Millan <rmh@aybabtu.com>
7276
7277 Revert my previous commits (based on wrong assumption of how grub_errno
7278 works).
7279
fe6b695a 7280 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 7281 * kern/file.c (grub_file_open): Likewise.
7282
d08bbb49 72832008-01-24 Pavel Roskin <proski@gnu.org>
7284
7285 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7286 that hang if GRUB tries to setup colors.
7287 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7288 colors for firmwares that don't support it.
7289 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7290 Recognize Open Hack'Ware, set flags to work around its
7291 limitations.
7292
605e36ed 72932008-01-24 Robert Millan <rmh@aybabtu.com>
7294
7295 * kern/file.c (grub_file_open): Do not account previous failures of
7296 unrelated functions when grub_errno is checked for.
7297 Reported by Oleg Strikov.
7298
bac332a1 72992008-01-24 Bean <bean123ch@gmail.com>
7300
7301 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7302 (grub_ufs_sblock): New member volume name.
7303 (grub_ufs_find_file): Fix string copy bug.
7304 (grub_ufs_label): Implement this function properly.
7305
7306 * fs/hfs.c (grub_hfs_cnid_type): New enum.
7307 (grub_hfs_iterate_records): Use the correct file number for extents
7308 and catalog file. Fix problem in next index calculation.
7309 (grub_hfs_find_node): Replace recursive function call with loop.
7310 (grub_hfs_iterate_dir): Replace recursive function call with loop.
7311
15c80c09 73122008-01-23 Robert Millan <rmh@aybabtu.com>
7313
7314 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7315 `<grub/symbol.h>' and `<grub/multiboot.h>'.
7316 (grub_multiboot2_real_boot): New function prototype.
7317
7318 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7319 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7320
7321 * kern/i386/ieee1275/init.c (grub_os_area_addr)
7322 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7323
305338fd 73242008-01-23 Robert Millan <rmh@aybabtu.com>
7325
7326 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7327 #ifdef'ed out grub_printf().
7328
3ea52685 73292008-01-23 Robert Millan <rmh@aybabtu.com>
7330
7331 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7332 grub_dprintf calls, since they make "debug=all" mode unusable.
7333 (grub_console_checkkey): Likewise.
7334
5882ae4b 73352008-01-23 Robert Millan <rmh@aybabtu.com>
7336
7337 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7338 `term/i386/pc/at_keyboard.c'.
7339 (pkglib_MODULES): Add `serial.mod'.
7340 (serial_mod_SOURCES): New variable.
7341 (serial_mod_CFLAGS): Likewise.
7342 (serial_mod_LDFLAGS): Likewise.
7343
7344 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
7345 `<grub/powerpc/ieee1275/console.h>'.
7346 (grub_keyboard_controller_init): New function prototype.
7347 (grub_console_checkkey): Likewise.
7348 (grub_console_getkey): Likewise.
7349
7350 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7351 keyboard on i386.
7352
7353 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7354 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7355
06ab5303 73562008-01-23 Robert Millan <rmh@aybabtu.com>
7357
7358 * kern/i386/pc/init.c (make_install_device): When memdisk image is
7359 present, "(memdisk)/boot/grub" becomes the default prefix.
7360
7361 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
7362 a memdisk tarball with all the modules. Add --overlay=DIR option that
7363 allows users to overlay additional files into the image.
7364
dbb475a4 73652008-01-23 Robert Millan <rmh@aybabtu.com>
7366
7367 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
7368 and `machine/memory.h'.
7369 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
7370 (_multiboot_mod_SOURCES): New variable.
7371 (_multiboot_mod_CFLAGS): Likewise.
7372 (_multiboot_mod_LDFLAGS): Likewise.
7373 (multiboot_mod_SOURCES): Likewise.
7374 (multiboot_mod_CFLAGS): Likewise.
7375 (multiboot_mod_LDFLAGS): Likewise.
7376
7377 * include/grub/i386/ieee1275/loader.h: New file.
7378
7379 * include/grub/i386/ieee1275/machine.h: Likewise.
7380
7381 * include/grub/i386/ieee1275/memory.h: Likewise.
7382
7383 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
7384 variable declaration.
7385 (grub_os_area_size): Likewise.
7386
7387 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
7388 (grub_lower_mem, grub_upper_mem): New variables.
7389 (grub_stop_floppy): New function (just to make
7390 grub_multiboot2_real_boot() happy).
7391
7392 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
7393 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
7394 (grub_stop): New function.
7395 Include `"../realmode.S"' and `"../loader.S"'.
7396
7397 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7398 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7399
7400 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7401 rely on grub_multiboot2_real_boot() for final boot.
7402
25638629 74032008-01-22 Robert Millan <rmh@aybabtu.com>
7404
7405 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7406 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7407 device that doesn't look like an SD card.
7408 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7409 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7410 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7411 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
7412 found.
7413
9dad816d 74142008-01-22 Robert Millan <rmh@aybabtu.com>
7415
7416 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
7417 avoid claiming over our own code.
7418
34842f2d 74192008-01-22 Bean <bean123ch@gmail.com>
7420
7421 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
7422 (jpeg_mod_SOURCES): New variable.
7423 (jpeg_mod_CFLAGS): Likewise.
7424 (jpeg_mod_LDFLAGS): Likewise.
7425
7426 * video/readers/jpeg.c : New file.
7427
44023a28 74282008-01-22 Bean <bean123ch@gmail.com>
7429
7430 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
7431 there are no more items.
7432
bc2d8ac6 74332008-01-21 Robert Millan <rmh@aybabtu.com>
7434
7435 * kern/mm.c (grub_mm_init_region): Improve debug message.
7436
261bd4bc 74372008-01-21 Robert Millan <rmh@aybabtu.com>
7438
7439 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
7440 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
7441 address.
7442 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
7443 a C macro.
7444 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
7445 Indicates start of upper memory.
7446 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
7447 (generate_image): Abort when image size is big enough to corrupt
7448 upper memory.
7449
7450 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
7451 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
7452 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7453 instead of hardcoding 0xA0000.
7454 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
7455 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7456 instead of hardcoding 0xA0000.
7457
f970b55e 74582008-01-21 Robert Millan <rmh@aybabtu.com>
7459
7460 * disk/memdisk.c (memdisk_size): New variable.
7461 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
7462 `memdisk_size'.
7463 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
7464 image to dynamic memory.
7465 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
7466 `memdisk_size'. Free memdisk block.
7467
1a8b0526 74682008-01-21 Robert Millan <rmh@aybabtu.com>
7469
7470 Fix detection of very small filesystems (like tar).
7471
7472 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
7473 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
7474 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
7475 a problem with this disk).
7476
6e9b4aab 74772008-01-21 Robert Millan <rmh@aybabtu.com>
7478
7479 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
7480 on grub_biosdisk_rw_standard() error.
7481
0d8837b2 74822008-01-21 Robert Millan <rmh@aybabtu.com>
7483
7484 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
7485 recent changes.
7486 * kern/elf.c: Likewise.
7487 * kern/ieee1275/ieee1275.c: Likewise.
7488 * kern/powerpc/ieee1275/openfw.c: Likewise.
7489 * term/ieee1275/ofconsole.c: Likewise.
7490
ffd36e34 74912008-01-21 Robert Millan <rmh@aybabtu.com>
7492
7493 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
7494
3f0093d0 7495 * include/grub/kernel.h (grub_arch_memdisk_addr)
7496 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 7497
3f0093d0 7498 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
7499 (grub_arch_memdisk_size): ... to here.
ffd36e34 7500
6c391b21 75012008-01-21 Robert Millan <rmh@aybabtu.com>
7502
7503 Mostly based on bugfix from Bean.
7504
7505 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
7506 attribute with hook() parameter.
7507 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
7508 declaration.
7509 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
7510 attribute with hook() parameter.
7511 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
7512 declaration.
7513
55a581dc 75142008-01-21 Robert Millan <rmh@aybabtu.com>
7515
7516 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
7517 (pkglib_MODULES): Add `memdisk.mod'.
7518 (memdisk_mod_SOURCES): New variable.
7519 (memdisk_mod_CFLAGS): Likewise.
7520 (memdisk_mod_LDFLAGS): Likewise.
7521
7522 * disk/memdisk.c: New file.
7523
7524 * include/grub/disk.h (grub_disk_dev_id): Add
7525 `GRUB_DISK_DEVICE_MEMDISK_ID'.
7526
7527 * include/grub/i386/pc/kernel.h
7528 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
7529 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
7530 (grub_kernel_image_size): New variable declaration.
7531 (grub_total_module_size): Likewise.
7532 (grub_memdisk_image_size): Likewise.
7533
7534 * include/grub/i386/pc/memory.h
7535 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
7536
7537 * include/grub/kernel.h: Include `<grub/symbol.h>'.
7538 (grub_arch_memdisk_addr): New variable declaration.
7539 (grub_arch_memdisk_size): Likewise.
7540
7541 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
7542 (grub_arch_memdisk_size): Likewise.
7543
7544 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
7545 (codestart): Replace hardcoded `0x100000' with
7546 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
7547
7548 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
7549 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
7550 not NULL, append the contents of the file it refers to, at the end of
7551 the compressed kernel image. Initialize `grub_memdisk_image_size'
7552 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
7553 (options): Add "memdisk"|'m' option.
7554 (main): Parse --memdisk|-m option, and pass user-provided path as
7555 parameter to generate_image().
7556
3d7f54c9 75572008-01-20 Robert Millan <rmh@aybabtu.com>
7558
7559 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
7560 grub_dprintf() calls from here ...
7561 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
7562
0bf74728 75632008-01-20 Robert Millan <rmh@aybabtu.com>
7564
7565 Fix detection of "real mode" when /options/real-mode? doesn't exist.
7566
7567 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
7568 declaration.
7569 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
7570 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
7571 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 7572 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 7573 property).
7574 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
7575 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
7576
33bf70a7 75772008-01-19 Robert Millan <rmh@aybabtu.com>
7578
fe6b695a 7579 Get rid of confusing function (superseded by
33bf70a7 7580 `grub_ieee1275_get_integer_property')
7581 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
7582 prototype.
7583 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
7584 function.
7585 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
7586 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 7587 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 7588
e2da7d26 75892008-01-19 Robert Millan <rmh@aybabtu.com>
7590
7591 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
7592 command after "shut-down", since implementations differ on which
7593 the command for halt is.
7594
59f1fd8d 75952008-01-19 Robert Millan <rmh@aybabtu.com>
7596
7597 * include/grub/i386/linuxbios/console.h: Add header protection.
7598 (grub_keyboard_controller_init): New function prototype.
7599 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
7600 (KEYBOARD_COMMAND_READ): Likewise.
7601 (KEYBOARD_COMMAND_WRITE): Likewise.
7602 (KEYBOARD_SCANCODE_SET1): Likewise.
7603 (grub_keyboard_controller_write): New function.
7604 (grub_keyboard_controller_read): Likewise.
7605 (grub_keyboard_controller_init): Likewise.
7606
7607 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
7608 (grub_console_init): On coreboot/LinuxBIOS, call
7609 grub_keyboard_controller_init().
7610
5f5a7c15 76112008-01-19 Robert Millan <rmh@aybabtu.com>
7612
7613 PowerPC changes provided by Pavel Roskin.
7614
7615 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
7616 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
7617 don't rely on cmain() doing it.
7618 * kern/i386/ieee1275/startup.S (_start): Store %eax in
7619 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
7620
1210e168 76212008-01-16 Robert Millan <rmh@aybabtu.com>
7622
7623 * include/grub/i386/linuxbios/memory.h
7624 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
7625 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
7626 receive `table_header' as argument. Instead, probe for it in the
7627 known memory ranges where it can be present.
7628 (grub_available_iterate): Do not pass a fixed `table_header' address
7629 to grub_linuxbios_table_iterate().
7630
3d04eab8 76312008-01-15 Robert Millan <rmh@aybabtu.com>
7632
7633 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
7634 * conf/i386-ieee1275.rmk: New file.
7635 * include/grub/i386/ieee1275/console.h: Likewise.
7636 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
7637 * include/grub/i386/ieee1275/kernel.h: Likewise.
7638 * include/grub/i386/ieee1275/time.h: Likewise.
7639 * kern/i386/ieee1275/init.c: Likewise.
7640 * kern/i386/ieee1275/startup.S: Likewise.
7641
d1bc1b73 76422008-01-15 Robert Millan <rmh@aybabtu.com>
7643
7644 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
7645 when pointers are 32-bit (but still do set it to one when they are
7646 64-bit).
7647
66a65807 76482008-01-15 Robert Millan <rmh@aybabtu.com>
7649
7650 * include/grub/ieee1275/ieee1275.h
7651 (grub_ieee1275_get_integer_property): New function prototype.
7652
7653 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
7654 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 7655 grub_ieee1275_get_property() to handle endianness.
66a65807 7656
7657 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
7658 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 7659 where appropriate.
66a65807 7660 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
7661 (grub_map): Likewise.
7662 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
7663
a83ccafd 76642008-01-15 Bean <bean123ch@gmail.com>
7665
7666 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
7667 (grub_script_execute_cmdline): Reset grub_errno.
7668
7669 * normal/main.c (read_config_file): Reset grub_errno.
7670
7671 * normal/parse.y (script_init): New.
7672 (script): Move function and menuentry here.
7673 (delimiter): New.
7674 (command): Add delimiter at the end of command.
7675 (commands): Adjust to match the new command.
7676 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 7677 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 7678 (if): Use the new commands.
7679
7680 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
7681
df6ecfc6 76822008-01-15 Robert Millan <rmh@aybabtu.com>
7683
7684 * normal/menu.c (run_menu): Move timeout message from here ...
7685 (print_timeout): ... to here.
7686 (run_menu): Use print_timeout() once during initial draw to print
7687 the whole message, and again in every clock tick to update only
7688 the number of seconds.
7689
87ae25eb 76902008-01-15 Robert Millan <rmh@aybabtu.com>
7691
7692 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
7693 actual size of `available' from grub_ieee1275_get_property(), and
7694 restrict parsing to that bound.
7695
47bf09a4 76962008-01-15 Christian Franke <franke@computer.org>
7697
7698 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
7699 (argp_program_version): Remove variable.
7700 (argp_program_bug_address): Likewise.
7701 (options): Convert from struct argp_option to struct option.
7702 (struct arguments): Remove.
7703 (parse_opt): Remove.
7704 (usage): New function.
7705 (main): Replace struct args members by simple variables.
7706 Replace argp_parse() by getopt_long().
7707 Add switch to evaluate options.
7708 Add missing "(...)" around root_dev in prefix string.
7709
c86f1469 77102008-01-14 Robert Millan <rmh@aybabtu.com>
7711
7712 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
7713 for grub_ieee1275_exit(), in order to improve portability.
7714
e622c559 77152008-01-14 Robert Millan <rmh@aybabtu.com>
7716
7717 * util/grub.d/10_linux.in (prefix): Define.
7718 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
7719
44cb1ec8 77202008-01-13 Pavel Roskin <proski@gnu.org>
7721
7722 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
7723 grub_errno if no errors have been detected.
7724
1eb8c802 77252008-01-12 Robert Millan <rmh@aybabtu.com>
7726
7727 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
7728 (grub_util_get_dev_abstraction): New function prototype.
7729
7730 * util/getroot.c: Include `<grub/util/getroot.h>'
7731 (grub_util_get_grub_dev): Move detection of abstraction type to ...
7732 (grub_util_get_dev_abstraction): ... here (new function).
7733
7734 * util/grub-probe.c: Convert PRINT_* to an enum. Add
7735 `PRINT_ABSTRACTION'.
7736 (probe): Probe for abstraction type when requested.
7737 (main): Understand `--target=abstraction'.
7738
7739 * util/i386/efi/grub-install.in: Add abstraction module to core
7740 image when it is found to be necessary.
7741 * util/i386/pc/grub-install.in: Likewise.
7742 * util/powerpc/ieee1275/grub-install.in: Likewise.
7743
7744 * util/update-grub_lib.in (font_path): Return system path without
7745 converting to GRUB path.
7746 * util/update-grub.in: Convert system path returned by font_path()
7747 to a GRUB path. Use `grub-probe -t abstraction' to determine what
7748 abstraction module is needed for loading fonts (if any). Export
7749 that as `GRUB_PRELOAD_MODULES'.
7750 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
7751 insmod commands).
7752
52bd3de9 77532008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
7754
7755 Remove some unused code from reiserfs.
f19dbdb7 7756
52bd3de9 7757 * fs/reiserfs.c (struct grub_reiserfs_key)
7758 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
7759 (struct grub_reiserfs_node_body): Removed.
7760 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7761 Likewise.
7762 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7763 Likewise.
7764 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7765 Likewise.
7766 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7767 Likewise.
7768 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7769 Likewise.
7770 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
7771 Likewise.
7772 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7773 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7774 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7775
2f80039d 77762008-01-10 Robert Millan <rmh@aybabtu.com>
7777
7778 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
7779 Determines if a file is garbage left by packaging systems, etc.
7780 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
7781 for processing /etc/grub.d scripts.
7782 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
7783 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
7784 as a condition for processing Linux images.
7785
87888032 77862008-01-10 Pavel Roskin <proski@gnu.org>
7787
7788 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
7789 to compile reiserfs.c on PowerPC.
7790
7e54fced 77912008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 7792
7793 * kern/device.c (grub_device_iterate): Do not abort device iteration
7794 when one of the devices cannot be opened.
7795 * kern/disk.c (grub_disk_open): Do not account previous failures of
7796 unrelated functions when grub_errno is checked for.
7797
5aa541e6 77982008-01-08 Robert Millan <rmh@aybabtu.com>
7799
7800 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
7801 `! grub_linux_is_bzimage', change order of address comparison to make
7802 it more intuitive, and improve "too big zImage" error message.
7803
7076340d 78042008-01-08 Robert Millan <rmh@aybabtu.com>
7805
7806 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
7807 `$(update-grub_DATA)'.
7808 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
7809 targets.
7810
9ca70333 78112008-01-07 Robert Millan <rmh@aybabtu.com>
7812
7813 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
7814 which instruction is modified by grub-setup during installation
7815 (since it wasn't obvious by only looking at this file).
7816
38ccf575 78172008-01-07 Robert Millan <rmh@aybabtu.com>
7818
7819 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
7820 listing actual TODO items.
7821
f5db4291 78222008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7823
868967cf 7824 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
7825 correctly.
7826 (grub_reiserfs_get_key_offset): Likewise.
7827 (grub_reiserfs_set_key_offset): Likewise.
7828 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 7829 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 7830
7831 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
7832 better to remove the bitfield version completely.
f19dbdb7 7833
868967cf 78342008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 7835
f5db4291 7836 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
7837 allocated from the heap, due to the fshelp implementation.
7838 (grub_reiserfs_dir): Free NODE, due to the same reason.
7839
492e6d9d 78402008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7841
7842 Mostly from Vincent Pelletier:
f19dbdb7 7843
492e6d9d 7844 * fs/reiserfs.c: New file.
f19dbdb7 7845
492e6d9d 7846 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
7847 (reiserfs_mod_SOURCES): New variable.
7848 (reiserfs_mod_CFLAGS): Likewise.
7849 (reiserfs_mod_LDFLAGS): Likewise.
7850
7851 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
7852 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
7853 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
7854 normal/color.c.
7855
9ce3e7c1 78562008-01-06 Robert Millan <rmh@aybabtu.com>
7857
7858 * normal/color.c: Remove `<grub/env.h>'.
7859
f3b58148 78602008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
7861
7862 * include/grub/normal.h: Include <grub/env.h>.
7863
7ac3bcfa 78642008-01-05 Robert Millan <rmh@aybabtu.com>
7865
7866 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
7867 usage example with `(hd0,1)'.
fb358190 7868 Reported by Samuel Thibault.
7ac3bcfa 7869
c8ee99d7 78702008-01-05 Robert Millan <rmh@aybabtu.com>
7871
7872 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
7873 (grub_linux_boot_zimage): Rename to ...
7874 (grub_linux_boot): ... this.
7875 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
7876 (grub_linux_boot_zimage): Conditionalize zImage copy.
7877
7878 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
7879 (grub_linux_boot_bzimage): Remove prototype.
7880 (grub_linux_boot_zimage): Rename to ...
7881 (grub_linux_boot): ... this.
7882
7883 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
7884 (grub_linux_boot): Remove function.
7885
0ece25b1 78862008-01-05 Robert Millan <rmh@aybabtu.com>
7887
7888 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
7889 (grub_env_write_color_highlight): Likewise.
7890 (grub_wait_after_message): Likewise.
7891
7892 * normal/color.c: New file.
7893
7894 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7895 (normal_mod_DEPENDENCIES): Likewise.
7896
7897 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7898 (normal_mod_DEPENDENCIES): Likewise.
7899
7900 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7901 (normal_mod_DEPENDENCIES): Likewise.
7902
7903 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7904 (normal_mod_DEPENDENCIES): Likewise.
7905
7906 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
7907 for waiting after a message is printed.
7908 * normal/main.c (read_config_file): Likewise.
7909 (grub_normal_init): Register grub_env_write_color_normal() and
7910 grub_env_write_color_highlight() hooks. Mark `color_normal' and
7911 `color_highlight' variables as global.
7912
7913 * normal/menu.c (grub_wait_after_message): New function.
7914 (grub_color_menu_normal): New variable. Replaces ...
7915 (GRUB_COLOR_MENU_NORMAL): ... this macro.
7916 (grub_color_menu_highlight): New variable. Replaces ...
7917 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
7918 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
7919 `GRUB_TERM_COLOR_STANDARD'.
7920 (print_message): Use `grub_setcolorstate' to reload colors. Rename
7921 `normal_code' and `highlight_code' to `old_color_normal' and
7922 `old_color_highlight', respectively.
7923 (grub_menu_init_page): Update colors when drawing the menu, based on
7924 `menu_color_normal' and `menu_color_highlight' variables.
7925 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
7926 a message is printed.
7927
182dd4e5 79282008-01-05 Robert Millan <rmh@aybabtu.com>
7929
7930 * kern/env.c (grub_env_context_open): Propagate hooks for global
7931 variables to new context.
7932
7933 * kern/main.c (grub_set_root_dev): Export `root' variable.
7934
ddf8f6ad 79352008-01-05 Robert Millan <rmh@aybabtu.com>
7936
7937 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 7938 discs unconditionally, since udev and others have options to provide
ddf8f6ad 7939 them.
7940
d8b43d9b 79412008-01-05 Robert Millan <rmh@aybabtu.com>
7942
7943 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
7944
2bff2de3 79452008-01-04 Christian Franke <franke@computer.org>
7946
7947 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
7948 of eisa_mmap.
7949
97eab917 79502008-01-03 Pavel Roskin <proski@gnu.org>
7951
7952 * kern/i386/linuxbios/init.c: Put "void" to all function
7953 declarations with no arguments.
7954 * kern/powerpc/ieee1275/init.c: Likewise.
7955 * term/i386/pc/at_keyboard.c: Likewise.
7956 * term/i386/pc/vga_text.c: Likewise.
7957 * util/grub-mkdevicemap.c: Likewise.
7958
b9416d00 79592008-01-02 Robert Millan <rmh@aybabtu.com>
7960
7961 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
7962 message when loaded image is out of bounds.
7963 (grub_multiboot_load_elf64): Likewise.
7964
92695df9 79652008-01-02 Pavel Roskin <proski@gnu.org>
7966
7967 * util/grub.d/10_linux.in: Try version without ".old" when
7968 looking for initrd. It's better to use initrd from the newer
7969 kernel of the same version than no initrd at all.
7970
d98d9cad 79712008-01-01 Robert Millan <rmh@aybabtu.com>
7972
7973 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
7974
dbfdce36 79752008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
7976
f19dbdb7 7977 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 7978 grub_video_get_active_render_target.
7979 (grub_video_adapter): Added unmap_color and get_active_render_target.
7980
f19dbdb7 7981 * video/video.c: Added grub_video_unmap_color and
dbfdce36 7982 grub_video_get_active_render_target.
7983 (grub_video_get_info): Changed method to accept NULL pointer as an
7984 argument to allow detection of active video adapter.
7985
7986 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
7987 grub_video_vbe_unmap_color_int.
7988 Added grub_video_vbe_unmap_color and
7989 grub_video_vbe_get_active_render_target.
7990 (grub_video_vbe_adapter): Added unmap_color and
7991 get_active_render_target.
7992
f19dbdb7 7993 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 7994 with grub_video_vbe_unmap_color_int.
7995
7996 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
7997 (DEFAULT_NORMAL_COLOR): Likewise.
7998 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
7999 (DEFAULT_FG_COLOR): Removed.
8000 (DEFAULT_BG_COLOR): Likewise.
8001 (DEFAULT_CURSOR_COLOR): Changed value.
8002 (grub_virtual_screen): Added standard_color_setting,
8003 normal_color_setting, highlight_color_setting and term_color.
8004 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
8005 (bitmap_width): Added.
8006 (bitmap_height): Likewise.
8007 (bitmap): Likewise.
8008 (set_term_color): Likewise.
8009 (grub_virtual_screen_setup): Changed to use new terminal coloring
8010 settings.
8011 (grub_gfxterm_init): Added init for bitmap.
8012 (grub_gfxterm_fini): Added destroy for bitmap.
8013 (redraw_screen_rect): Updated to use background bitmap and new
8014 terminal coloring.
8015 (scroll_up): Added optimization for case when there is no bitmap.
8016 (grub_gfxterm_cls): Fixed to use correct background color.
8017 (grub_virtual_screen_setcolorstate): Changed to use new terminal
8018 coloring.
8019 (grub_virtual_screen_setcolor): Likewise.
8020 (grub_virtual_screen_getcolor): Added.
8021 (grub_gfxterm_background_image_cmd): Likewise.
8022 (grub_video_term): Added setcolor and getcolor.
8023 (MOD_INIT): Added registration of background_image command.
8024 (MOD_TERM): Added unregistration for background_image command.
8025
c3c20931 80262007-12-30 Pavel Roskin <proski@gnu.org>
8027
8028 * loader/multiboot_loader.c: Fix multiboot command
8029 unregistration. Fix all typos in the word "multiboot".
8030
df266716 80312007-12-29 Pavel Roskin <proski@gnu.org>
94239199 8032
8033 * util/grub.d/10_linux.in: Refactor search for initrd. Add
8034 support for initrd names used in Fedora.
8035
fc6e896c 80362007-12-26 Bean <bean123ch@gmail.com>
8037
8038 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8039 (cpio_mod_SOURCES): New variable.
8040 (cpio_mod_CFLAGS): Likewise.
8041 (cpio_mod_LDFLAGS): Likewise.
8042
8043 * fs/cpio.c: New file.
8044
8045 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8046
8047 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8048
8049 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8050
8051 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8052
533110ad 80532007-12-25 Robert Millan <rmh@aybabtu.com>
8054
8055 * include/grub/term.h (struct grub_term): Add `getcolor' function.
8056 (grub_getcolor): New function.
8057
8058 * kern/term.c (grub_getcolor): New function.
8059 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8060 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8061 (print_entry): Set normal and highlight colors to
8062 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8063 respectively, before printing and restore them to old
8064 values afterwards.
8065 (grub_menu_init_page): Likewise. Fill an additional colored space
8066 that would otherwise be left blank.
8067
8068 * term/efi/console.c (grub_console_getcolor): New function.
8069 (struct grub_console_term.getcolor): New variable.
8070 * term/i386/pc/console.c (grub_console_getcolor): New function.
8071 (struct grub_console_term.getcolor): New variable.
8072 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8073 (struct grub_console_term.getcolor): New variable.
8074
8075 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8076 (struct grub_console_term.setcolor): Remove variable.
8077 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8078 (struct grub_console_term.setcolor): Remove variable.
8079 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8080 (struct grub_console_term.setcolor): Remove variable.
8081 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8082 (struct grub_console_term.setcolor): Remove variable.
8083
4931827f 80842007-12-25 Robert Millan <rmh@aybabtu.com>
8085
8086 * configure.ac: Search for possible unifont.hex locations, and
8087 define UNIFONT_HEX if found.
8088
8089 * Makefile.in (UNIFONT_HEX): Define variable.
8090 (DATA): Rename to ...
8091 (PKGLIB): ... this. Update all users.
8092 (PKGDATA): New variable.
8093 (pkgdata_IMAGES): Rename to ...
8094 (pkglib_IMAGES): ... this. Update all users.
8095 (pkgdata_MODULES): Rename to ...
8096 (pkglib_MODULES): ... this. Update all users.
8097 (pkgdata_PROGRAMS): Rename to ...
8098 (pkglib_PROGRAMS): ... this. Update all users.
8099 (pkgdata_DATA): Rename to ...
8100 (pkglib_DATA): ... this. Update all users.
8101 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8102 (unicode.pff, ascii.pff): New rules.
8103 (all-local): Add `$(PKGDATA)' dependency.
8104 (install-local): Process `$(PKGDATA)'.
8105
8106 * util/update-grub_lib.in (font_path): Search for *.pff files in
8107 a few more locations, including `${pkgdata}'.
8108
57e57e31 81092007-12-23 Robert Millan <rmh@aybabtu.com>
8110
8111 Patch from Bean <bean123ch@gmail.com>:
8112 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8113 `size'.
8114
4bc72aa9 81152007-12-21 Bean <bean123ch@gmail.com>
8116
8117 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8118 (ntfscomp_mod_SOURCES): New variable.
8119 (ntfscomp_mod_CFLAGS): Likewise.
8120 (ntfscomp_mod_LDFLAGS): Likewise.
8121
8122 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8123 (grub_probe_SOURCES): Likewise.
8124 (grub_emu_SOURCES): Likewise.
8125
8126 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8127 (grub_emu_SOURCES): Likewise.
8128
8129 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8130 (grub_emu_SOURCES): Likewise.
8131
8132 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8133 (grub_emu_SOURCES): Likewise.
8134
8135 * fs/ntfs.c (grub_ntfscomp_func): New variable.
8136 (read_run_list): Renamed to grub_ntfs_read_run_list.
8137 (decomp_nextvcn): Moved to ntfscomp.c.
8138 (decomp_getch): Likewise.
8139 (decomp_get16): Likewise.
8140 (decomp_block): Likewise.
8141 (read_block): Likewise.
8142 (read_data): Partially moved to ntfscomp.c.
8143 (fixup): Change unsigned to grub_uint16_t.
8144 (read_mft): Change unsigned long to grub_uint32_t.
8145 (read_attr): Likewise.
8146 (read_data): Likewise.
8147 (read_run_data): Likewise.
8148 (read_run_list): Likewise.
8149 (read_mft): Likewise.
8150
8151 * fs/ntfscomp.c: New file.
8152
8153 * include/grub/ntfs.h: New file.
8154
af680a87 81552007-12-16 Robert Millan <rmh@aybabtu.com>
8156
8157 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8158 IDE disk check, since Linux is known to support 20 IDE disks.
8159 Reported by Colin Watson.
8160
84be7599 81612007-12-15 Bean <bean123ch@gmail.com>
8162
8163 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8164 (lnxboot_img_SOURCES): New variable.
8165 (lnxboot_img_ASFLAGS): Likewise.
8166 (lnxboot_img_LDFLAGS): Likewise.
8167
8168 * boot/i386/pc/lnxboot.S: New file.
8169
6af9db01 81702007-11-24 Pavel Roskin <proski@gnu.org>
8171
8172 * configure.ac: Test if '--build-id=none' is supported by the
8173 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
8174 objcopy to generate incorrect binary files (binutils
8175 2.17.50.0.18-1 as shipped by Fedora 8).
8176 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8177 linking, so that build ID doesn't break the test.
8178
7361cfe6 81792007-11-24 Pavel Roskin <proski@gnu.org>
8180
8181 * include/grub/i386/time.h: use "void" in the argument list
8182 of grub_cpu_idle().
8183 * include/grub/powerpc/time.h: Likewise.
8184 * include/grub/sparc64/time.h: Likewise.
8185
1593e10c 81862007-11-18 Christian Franke <franke@computer.org>
8187
8188 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8189 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8190 This fixes the problem that function keys did not work in grub-emu.
8191
3b8db1a8 81922007-11-18 Christian Franke <franke@computer.org>
8193
8194 * disk/host.c (grub_host_open): Remove attribute unused from
8195 name parameter. Add check for "host". This fixes the problem
8196 that grub-emu does not find partitions.
8197
2e29408d 81982007-11-18 Christian Franke <franke@computer.org>
8199
8200 * util/hostfs.c (is_dir): New function.
8201 (grub_hostfs_dir): Handle missing dirent.d_type case.
8202 (grub_hostfs_read): Add missing fseek().
8203 (grub_hostfs_label): Clear label pointer. This fixes a crash
8204 of grub-emu on "ls (host)".
8205
398cd047 82062007-11-18 Christian Franke <franke@computer.org>
8207
8208 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8209 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8210 to 64 bit boundary by default.
8211
c405c391 82122007-11-18 Bean <bean123ch@gmail.com>
8213
8214 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8215 (hexdump_mod_SOURCES): New variable.
8216 (hexdump_mod_CFLAGS): Likewise.
8217 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 8218
c405c391 8219 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8220
8221 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8222
8223 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8224
8225 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8226
8227 * include/grub/hexdump.h: New file.
8228
8229 * commands/hexdump.c: New file.
8230
5cced7fd 82312007-11-10 Robert Millan <rmh@aybabtu.com>
8232
8233 * commands/i386/pc/play.c (beep_off): Switch order of arguments
8234 in grub_outb() calls.
8235 (beep_on): Likewise.
8236
8b714eb0 82372007-11-10 Christian Franke <franke@computer.org>
8238
8239 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8240 (grub_menu_run): Likewise.
8241
ce0f1839 82422007-11-10 Robert Millan <rmh@aybabtu.com>
8243
8244 * include/grub/i386/efi/machine.h: New file.
8245 * include/grub/i386/linuxbios/machine.h: Likewise.
8246 * include/grub/i386/pc/machine.h: Likewise.
8247 * include/grub/powerpc/ieee1275/machine.h: Likewise.
8248 * include/grub/sparc64/ieee1275/machine.h: Likewise.
8249
8250 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8251 (serial_hw_io_addr): New variable.
8252 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8253 instead of `(unsigned short *) 0x400'.
8254
270c237d 82552007-11-10 Bean <bean123ch@gmail.com>
8256
8257 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8258
a87783bf 82592007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8260
8261 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8262 (vga_mod_SOURCES): Added.
8263 (vga_mod_CFLAGS): Likewise.
8264 (vga_mod_LDFLAGS): Likewise.
8265
8266 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8267 grub_outb() calls.
8268 (set_map_mask): Likewise.
8269 (set_read_map): Likewise.
8270 (set_read_address): Likewise.
8271 (vga_font): Removed variable.
8272 (get_vga_glyph): Removed function.
8273 (invalidate_char): Likewise.
8274 (write_char): Changed to use grub_font_get_glyph() for font
8275 information.
8276 (grub_vga_putchar): Likewise.
8277 (grub_vga_getcharwidth): Likewise.
8278
6433b448 82792007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8280
8281 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8282 flags.
8283 (pxeboot_img_LDFLAGS): Likewise.
8284 (diskboot_img_LDFLAGS): Likewise.
8285 (kernel_img_LDFLAGS): Likewise.
8286
49178511 82872007-11-06 Robert Millan <rmh@aybabtu.com>
8288
8289 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8290 in grub_outb() calls.
8291 (serial_hw_init): Likewise.
8292
53b052de 82932007-11-05 Robert Millan <rmh@aybabtu.com>
8294
8295 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8296 spaces. Skip non-regular files.
8297
5ab33bba 82982007-11-05 Robert Millan <rmh@aybabtu.com>
8299
8300 * kern/disk.c (grub_disk_firmware_fini)
8301 (grub_disk_firmware_is_tainted): New variables.
8302
8303 * include/grub/disk.h (grub_disk_firmware_fini)
8304 (grub_disk_firmware_is_tainted): Likewise.
8305
8306 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8307 (grub_disk_biosdisk_fini): ... to here.
8308 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8309 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8310 is set. Register grub_disk_biosdisk_fini() in
8311 `grub_disk_firmware_fini'.
8312
8313 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8314 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8315 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8316 to finish existing firmware disk interface.
8317
8318 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8319 (ata_mod_SOURCES): New variable.
8320 (ata_mod_CFLAGS): Likewise.
8321 (ata_mod_LDFLAGS): Likewise.
8322
0149ab7c 83232007-11-05 Robert Millan <rmh@aybabtu.com>
8324
8325 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
8326 (grub_ata_wait): Reimplement using grub_millisleep().
8327
8328 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8329 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8330
be7ac41e 83312007-11-03 Marco Gerards <marco@gnu.org>
8332
8333 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8334 (CRTC_ADDR_PORT): New macro.
8335 (CRTC_DATA_PORT): Likewise.
8336 (CRTC_CURSOR): Likewise.
8337 (CRTC_CURSOR_ADDR_HIGH): Likewise.
8338 (CRTC_CURSOR_ADDR_LOW): Likewise.
8339 (update_cursor): New function.
8340 (grub_console_real_putchar): Call `update_cursor'.
8341 (grub_console_gotoxy): Likewise.
8342 (grub_console_cls): Set the default color when clearing the
8343 screen.
8344 (grub_console_setcursor): Implemented.
8345
bb06ab2e 83462007-11-03 Marco Gerards <marco@gnu.org>
8347
8348 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8349 become activate.
8350 (grub_ata_pio_write): Likewise.
8351
8352 (grub_atapi_identify): Wait after issuing an ATA command.
8353 (grub_atapi_packet): Likewise.
8354 (grub_ata_identify): Likewise.
8355 (grub_ata_readwrite): Likewise.
8356
cf8f780b 83572007-11-03 Marco Gerards <marco@gnu.org>
8358
8359 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
8360 (grub_ata_pio_write): Likewise.
8361 (grub_ata_readwrite): Use `grub_error', instead of
8362 returning `grub_errno'.
8363
ed649e54 83642007-11-03 Marco Gerards <marco@gnu.org>
8365
8366 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
8367 grub_ata_pio_write once for every single sector, instead of for
8368 multiple sectors.
8369
ca25d8f0 83702007-10-31 Robert Millan <rmh@aybabtu.com>
8371
8372 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
8373
8374 * conf/i386-linuxbios.rmk: New file.
8375
8376 * kern/i386/pc/hardware.c: Likewise.
8377 * term/i386/pc/at_keyboard.c: Likewise.
8378 * term/i386/pc/vga_text.c: Likewise.
8379
8380 * include/grub/i386/linuxbios/boot.h: Likewise.
8381 * include/grub/i386/linuxbios/console.h: Likewise.
8382 * include/grub/i386/linuxbios/init.h: Likewise.
8383 * include/grub/i386/linuxbios/kernel.h: Likewise.
8384 * include/grub/i386/linuxbios/loader.h: Likewise.
8385 * include/grub/i386/linuxbios/memory.h: Likewise.
8386 * include/grub/i386/linuxbios/serial.h: Likewise.
8387 * include/grub/i386/linuxbios/time.h: Likewise.
8388
8389 * kern/i386/linuxbios/init.c: Likewise.
8390 * kern/i386/linuxbios/startup.S: Likewise.
8391 * kern/i386/linuxbios/table.c: Likewise.
8392
e911ecc1 83932007-10-31 Marco Gerards <marco@gnu.org>
8394
8395 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8396 (ata_mod_SOURCES): New variable.
8397 (ata_mod_CFLAGS): Likewise.
8398 (ata_mod_LDFLAGS): Likewise.
8399
8400 * disk/ata.c: New file.
8401
8402 * include/grub/disk.h (grub_disk_dev_id): Add
8403 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 8404
7f66d0e0 84052007-10-31 Robert Millan <rmh@aybabtu.com>
8406
8407 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8408 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8409
8410 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8411 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
8412
8413 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
8414 `<grub/types.h>'.
8415
8416 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
8417
5cd7dd46 84182007-10-27 Robert Millan <rmh@aybabtu.com>
8419
3236ca65 8420 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 8421
2ebfc90f 84222007-10-22 Robert Millan <rmh@aybabtu.com>
8423
8424 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
8425 `"../realmode.S"'.
8426 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
8427
73fcb0f3 84282007-10-22 Robert Millan <rmh@aybabtu.com>
8429
8430 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
8431 (pkgdata_MODULES): Add `biosdisk.mod'.
8432 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
8433 variables.
8434
8435 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
8436 (grub_biosdisk_init): Replace with ...
8437 (GRUB_MOD_INIT(biosdisk)): ... this.
8438 (grub_biosdisk_fini): Replace with ...
8439 (GRUB_MOD_FINI(biosdisk)): ... this.
8440
8441 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
8442 (grub_machine_init): Remove call to grub_biosdisk_init().
8443 (grub_machine_fini): Remove call to grub_machine_fini().
8444
8445 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
8446
3381d274 84472007-10-22 Robert Millan <rmh@aybabtu.com>
8448
8449 * include/grub/time.h: New file.
8450 * include/grub/i386/time.h: Likewise.
8451 * include/grub/powerpc/time.h: Likewise.
8452 * include/grub/sparc64/time.h: Likewise.
8453
8454 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
8455 instances to ...
8456 (KERNEL_MACHINE_TIME_HEADER): ... this.
8457 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8458 instances to ...
8459 (KERNEL_MACHINE_TIME_HEADER): ... this.
8460 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8461 instances to ...
8462 (KERNEL_MACHINE_TIME_HEADER): ... this.
8463
8464 * kern/i386/efi/init.c: Include `<grub/time.h>'.
8465 (grub_millisleep): New function.
8466 * kern/i386/pc/init.c: Include `<grub/time.h>'.
8467 (grub_millisleep): New function.
8468 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
8469 Remove `grub/machine/time.h' include.
8470 (grub_millisleep): New function.
8471 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
8472 Remove `grub/machine/time.h' include.
8473 (grub_millisleep): New function.
8474
8475 * include/grub/misc.h (grub_div_roundup): New function.
8476
8477 * kern/misc.c: Include `<grub/time.h>'.
8478 (grub_millisleep_generic): New function.
8479
8480 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
8481 Add `time.h'.
8482 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
8483 Add `time.h'.
8484 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
8485 `machine/time.h'. Add `time.h'.
8486 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8487
a39a0312 84882007-10-21 Robert Millan <rmh@aybabtu.com>
8489
8490 * include/grub/misc.h (grub_max): New function.
8491
2aad70e2 84922007-10-21 Robert Millan <rmh@aybabtu.com>
8493
8494 * util/misc.c (grub_util_info): Call fflush() before returning.
8495
54b71c4b 84962007-10-20 Robert Millan <rmh@aybabtu.com>
8497
8498 * genmk.rb (Image): Copy `extra_flags' from here ...
8499 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
8500
8501 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
8502 to `argc' and `args' arguments.
8503
a979f513 85042007-10-17 Robert Millan <rmh@aybabtu.com>
8505
8506 * kern/i386/loader.S: New file.
8507
8508 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
8509 * kern/i386/loader.S (grub_linux_prot_size)... to here.
8510 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
8511 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
8512 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
8513 * kern/i386/loader.S (grub_linux_real_addr)... to here.
8514 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
8515 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
8516 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
8517 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
8518 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
8519 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
8520 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
8521 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
8522
8523 * kern/i386/realmode.S: New file.
8524
8525 * kern/i386/pc/startup.S (protstack): Moved from here ...
8526 * kern/i386/realmode.S (protstack)... to here.
8527 * kern/i386/pc/startup.S (gdt): Moved from here ...
8528 * kern/i386/realmode.S (gdt)... to here.
8529 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
8530 * kern/i386/realmode.S (prot_to_real)... to here.
8531
8532 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
8533 `kern/i386/realmode.S'.
8534
825fc8fd 85352007-10-17 Robert Millan <rmh@aybabtu.com>
8536
8537 * include/grub/i386/loader.h: New file.
8538
8539 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
8540 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8541 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8542 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8543 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
8544 * include/grub/i386/loader.h (grub_linux_prot_size)
8545 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8546 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8547 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8548 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
8549
8550 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
8551
e179b2f4 85522007-10-15 Robert Millan <rmh@aybabtu.com>
8553
8554 * normal/misc.c (grub_normal_print_device_info): Do not probe for
8555 filesystem when dev->disk is unset.
8556 Do probe for filesystem even when dev->disk->has_partitions is set.
8557 In case a filesystem is found, always report it.
8558 In case it isn't, if dev->disk->has_partitions is set, report that
8559 a partition table was found instead of reporting that no filesystem
8560 could be identified.
8561
5db82af6 85622007-10-12 Robert Millan <rmh@aybabtu.com>
8563
8564 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
8565 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
8566
68f6ac74 8567 * include/grub/types.h (grub_host_to_target16): New macro.
8568 (grub_host_to_target32): Likewise.
8569 (grub_host_to_target64): Likewise.
8570 (grub_target_to_host16): Likewise.
8571 (grub_target_to_host32): Likewise.
8572 (grub_target_to_host64): Likewise.
5db82af6 8573
8574 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8575 Renamed from to ...
8576 (GRUB_MOD_ALIGN): ...this. Update all users.
8577
68f6ac74 8578 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
8579 grub_host_to_target32.
8580 Replace grub_be_to_cpu32 with grub_target_to_host32.
8581 (load_modules): Likewise.
8582 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
8583 Replace grub_be_to_cpu32 with grub_target_to_host32.
8584 Replace grub_cpu_to_be16 with grub_host_to_target16.
8585 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 8586
3cf497cc 85872007-10-12 Robert Millan <rmh@aybabtu.com>
8588
8589 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
8590 * util/elf/grub-mkimage.c: ... here.
8591
8592 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
8593 `util/powerpc/ieee1275/grub-mkimage.c'.
8594
c8cc3692 85952007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 8596
c8cc3692 8597 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
8598 and make it easier to figure out.
8599 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
8600 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
8601 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
8602 leave us with less than HEAP_MIN_SIZE total heap.
8603 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 8604
5c58b791 86052007-10-03 Robert Millan <rmh@aybabtu.com>
8606
8607 * include/grub/i386/io.h: New file.
8608 * commands/i386/pc/play.c (inb): Removed.
8609 (outb): Removed.
8610 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8611 with grub_outb().
afcd2ef8 8612 * term/i386/pc/serial.c (inb): Removed.
8613 (outb): Removed.
8614 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8615 with grub_outb().
8616 * term/i386/pc/vga.c (inb): Removed.
8617 (outb): Removed.
8618 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8619 with grub_outb().
5c58b791 8620
1a477ed6 86212007-10-02 Robert Millan <rmh@aybabtu.com>
8622
8623 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
8624 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8625 Reported by Marcin Kurek.
8626
6b5d80fa 86272007-09-07 Robert Millan <rmh@aybabtu.com>
8628
8629 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
8630 SmartFirmware version updates (as released by Sven Luther), and avoid
8631 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
8632 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
8633 known broken.
8634
5618afbf 86352007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8636
8637 From Hitoshi Ozeki:
8638 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
8639 when merging two regions.
8640
6139dcd9 86412007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8642
508e39ee 8643 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
8644 * normal/completion.c (grub_normal_do_completion): Likewise.
8645 Reported by Hitoshi Ozeki.
8646
86472007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 8648
6139dcd9 8649 Do not use devices at boot in chainloading.
f19dbdb7 8650
6139dcd9 8651 * loader/i386/pc/chainloader.c (boot_drive): New variable.
8652 (boot_part_addr): Likewise.
8653 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
8654 with BOOT_DRIVE and BOOT_PART_ADDR.
8655 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
8656 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
8657
38da6516 86582007-08-29 Robert Millan <rmh@aybabtu.com>
8659
8660 Patch from Simon Peter <dn.tlp@gmx.net>:
8661 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
8662 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
8663 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
8664 util/i386/pc/grub-setup.c_DEPENDENCIES.
8665 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
8666 util/grub-probe.c_DEPENDENCIES.
8667 * conf/powerpc-ieee1275.rmk: Likewise.
8668
29d0928c 86692007-08-28 Robert Millan <rmh@aybabtu.com>
8670
8671 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
8672 to tell grub-mkdevicemap how to name devices.
8673 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
8674 feature).
8675
8676 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
8677 util/i386/get_disk_name.c.
8678 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
8679 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
8680 util/ieee1275/get_disk_name.c.
8681
8682 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
8683
8684 * DISTLIST: Add util/i386/get_disk_name.c and
8685 util/ieee1275/get_disk_name.c.
8686
8687 * util/grub-mkdevicemap.c: Replace device naming logic with
8688 grub_util_get_disk_name() calls.
8689
5a0d3cca 86902007-08-20 Robert Millan <rmh@aybabtu.com>
8691
8692 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
8693 (so that it works for both plural and singular quantities).
8694
8b72db2f 86952007-08-05 Robert Millan <rmh@aybabtu.com>
8696
8697 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
8698 so that [xz] isn't taken into account when determining order.
8699
352466bf 87002007-08-02 Marco Gerards <marco@gnu.org>
8701
8702 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
8703 `include/multiboot2.h', `include/grub/elfload.h',
8704 `include/multiboot.h', `include/grub/multiboot.h',
8705 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
8706 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
8707 `kern/elf.c', `loader/multiboot_loader.c',
8708 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
8709 `loader/i386/pc/multiboot2.c',
8710 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
8711 `util/i386/pc/grub-mkrescue.in'. Remove
8712 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
8713 `include/grub/i386/pc/util/biosdisk.h' and
8714 `include/grub/powerpc/ieee1275/multiboot.h'.
8715
8f096014 87162007-08-02 Bean <bean123ch@gmail.com>
8717
8718 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
8719 (ntfs_mod_SOURCES): New variable.
8720 (ntfs_mod_CFLAGS): Likewise.
8721 (ntfs_mod_LDFLAGS): Likewise.
8722
8723 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
8724 (grub_probe_SOURCES): Likewise.
8725 (grub_emu_SOURCES): Likewise.
8726
8727 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8728 (grub_emu_SOURCES): Likewise.
8729
8730 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8731 (grub_emu_SOURCES): Likewise.
f19dbdb7 8732
8f096014 8733 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
8734
8735 * fs/ntfs.c: New file.
8736
9959f7db 87372007-08-02 Bean <bean123ch@gmail.com>
8738
8739 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
8740
8741 * file.h (grub_file): Likewise.
8742
8743 * fshelp.h (grub_fshelp_read_file): Likewise.
8744
8745 * util/i386/pc/grub-setup.c (setup): Likewise.
8746 (save_first_sector): Likewise.
8747 (save_blocklists): Likewise.
f19dbdb7 8748
9959f7db 8749 * fs/affs.c (grub_affs_read_file): Likewise.
8750
8751 * fs/ext2.c (grub_ext2_read_file): Likewise.
8752
8753 * fs/fat.c (grub_fat_read_data): Likewise.
8754
8755 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
8756
8757 * fs/hfs.c (grub_hfs_read_file): Likewise.
8758
8759 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8760
8761 * fs/jfs.c (grub_jfs_read_file): Likewise.
8762
8763 * fs/minix.c (grub_minix_read_file): Likewise.
8764
8765 * fs/sfs.c (grub_sfs_read_file): Likewise.
8766
8767 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 8768
9959f7db 8769 * fs/xfs.c (grub_xfs_read_file): Likewise.
8770
8771 * command/blocklist.c (read_blocklist): Likewise.
8772 (print_blocklist): Likewise.
8773
0a203f83 87742007-08-02 Marco Gerards <marco@gnu.org>
8775
8776 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
8777 `util/hostfs.c'.
8778
8779 * disk/host.c: New file.
8780
8781 * util/hostfs.c: Likewise.
8782
8783 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
8784 return `GRUB_ERR_BAD_FS'.
8785 * fs/sfs.c (grub_sfs_mount): Likewise.
8786 * fs/xfs.c (grub_xfs_mount): Likewise.
8787
8788 * include/grub/disk.h (enum grub_disk_dev_id): Add
8789 `GRUB_DISK_DEVICE_HOST_ID'.
8790
8791 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
8792
e5dfe777 87932007-07-24 Jerone Young <jerone@gmail.com>
8794
f19dbdb7 8795 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 8796 modules for compilation.
8797 * conf/powerpc-ieee1275.rmk: Likewise.
8798
8799 * include/multiboot.h: Move multiboot definitions to one file. Rename
8800 many definitions to not get grub specific.
8801 * include/multiboot2.h: Create header with multiboot 2 definitions.
8802 * include/grub/multiboot.h: Header for grub specific function
8803 prototypes and definitions.
8804 * include/grub/multiboot2.h: Likewise.
8805 * include/grub/multiboot_loader.h: Likewise.
8806 * include/grub/i386/pc/multiboot.h: Removed.
8807 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
8808
8809 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
8810 and 2 to allow for one multiboot and module commands.
8811 * loader/multiboot2.c: Add multiboot2 functionality.
8812 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
8813 and definition names.
8814 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
8815 2 functions.
8816 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
8817 ieee1275 specific multiboot2 code.
8818
8819 * kern/i386/pc/startup.S: Change headers and definition names for
8820 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
8821
daf0f0ba 88222007-07-22 Robert Millan <rmh@aybabtu.com>
8823
8824 * geninitheader.sh: Process file specified in first parameter rather
8825 than hardcoding grub_modules_init.lst.
fe6b695a 8826 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 8827 than hardcoding grub_modules_init.h.
8828
8829 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
8830 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
8831 grub_probe_init.[ch] and grub_setup_init.[ch].
8832
8833 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
8834 grub_modules_init.h with grub_emu_init.h.
8835 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
8836 grub_probe_init.[ch] files.
8837 * conf/i386-efi.rmk: Likewise.
8838 * conf/i386-pc.rmk: Likewise.
8839 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
8840 grub_setup_init.[ch] files.
8841
8842 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
8843 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
8844 to initialize modules rather than a list of hardcoded functions.
8845 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
8846 grub_init_all() to initialize modules rather than a list of hardcoded
8847 functions.
8848
54cdc1cc 88492007-07-22 Robert Millan <rmh@aybabtu.com>
8850
8851 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
8852 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
8853
ad0686cc 88542007-07-22 Robert Millan <rmh@aybabtu.com>
8855
8856 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8857 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
8858 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
8859 flag when running on SmartFirmware.
8860 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
8861 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
8862 was set.
8863
8864 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8865 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
8866 rather than decreasing it.
8867
8868 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
8869 there's not enough space to do it, fail in the same way as when it
8870 can't be done because there are no partitions.
8871
8872 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
8873 when nvsetenv failed.
8874
969c02ec 88752007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8876
8877 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
8878 because this rule is automatically generated.
8879 (grub-mkrescue): Removed for the same reason as above.
8880
5a79f472 88812007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8882
8883 Migrate to GNU General Public License Version 3.
f19dbdb7 8884
5a79f472 8885 * COPYING: Replaced with the plain text version of GPLv3.
8886
8887 * config.guess: Updated from gnulib.
8888 * config.sub: Likewise.
8889
8890 * geninit.sh: Output a GPLv3 copyright notice.
8891 * geninitheader.sh: Likewise.
8892 * genmodsrc.sh: Likewise.
8893 * gensymlist.sh.in: Likewise.
8894
8895 * boot/i386/pc/boot.S: Upgraded to GPLv3.
8896 * boot/i386/pc/diskboot.S: Likewise.
8897 * boot/i386/pc/pxeboot.S: Likewise.
8898 * commands/blocklist.c: Likewise.
8899 * commands/boot.c: Likewise.
8900 * commands/cat.c: Likewise.
8901 * commands/cmp.c: Likewise.
8902 * commands/configfile.c: Likewise.
8903 * commands/echo.c: Likewise.
8904 * commands/help.c: Likewise.
8905 * commands/ls.c: Likewise.
8906 * commands/search.c: Likewise.
8907 * commands/terminal.c: Likewise.
8908 * commands/test.c: Likewise.
8909 * commands/videotest.c: Likewise.
8910 * commands/i386/cpuid.c: Likewise.
8911 * commands/i386/pc/halt.c: Likewise.
8912 * commands/i386/pc/play.c: Likewise.
8913 * commands/i386/pc/reboot.c: Likewise.
8914 * commands/i386/pc/vbeinfo.c: Likewise.
8915 * commands/i386/pc/vbetest.c: Likewise.
8916 * commands/ieee1275/halt.c: Likewise.
8917 * commands/ieee1275/reboot.c: Likewise.
8918 * commands/ieee1275/suspend.c: Likewise.
8919 * disk/loopback.c: Likewise.
8920 * disk/lvm.c: Likewise.
8921 * disk/raid.c: Likewise.
8922 * disk/efi/efidisk.c: Likewise.
8923 * disk/i386/pc/biosdisk.c: Likewise.
8924 * disk/ieee1275/ofdisk.c: Likewise.
8925 * font/manager.c: Likewise.
8926 * fs/affs.c: Likewise.
8927 * fs/ext2.c: Likewise.
8928 * fs/fat.c: Likewise.
8929 * fs/fshelp.c: Likewise.
8930 * fs/hfs.c: Likewise.
8931 * fs/hfsplus.c: Likewise.
8932 * fs/iso9660.c: Likewise.
8933 * fs/jfs.c: Likewise.
8934 * fs/minix.c: Likewise.
8935 * fs/sfs.c: Likewise.
8936 * fs/ufs.c: Likewise.
8937 * fs/xfs.c: Likewise.
8938 * hello/hello.c: Likewise.
8939 * include/grub/acorn_filecore.h: Likewise.
8940 * include/grub/arg.h: Likewise.
8941 * include/grub/bitmap.h: Likewise.
8942 * include/grub/boot.h: Likewise.
8943 * include/grub/cache.h: Likewise.
8944 * include/grub/device.h: Likewise.
8945 * include/grub/disk.h: Likewise.
8946 * include/grub/dl.h: Likewise.
8947 * include/grub/elfload.h: Likewise.
8948 * include/grub/env.h: Likewise.
8949 * include/grub/err.h: Likewise.
8950 * include/grub/file.h: Likewise.
8951 * include/grub/font.h: Likewise.
8952 * include/grub/fs.h: Likewise.
8953 * include/grub/fshelp.h: Likewise.
8954 * include/grub/gzio.h: Likewise.
8955 * include/grub/hfs.h: Likewise.
8956 * include/grub/kernel.h: Likewise.
8957 * include/grub/loader.h: Likewise.
8958 * include/grub/lvm.h: Likewise.
8959 * include/grub/misc.h: Likewise.
8960 * include/grub/mm.h: Likewise.
8961 * include/grub/net.h: Likewise.
8962 * include/grub/normal.h: Likewise.
8963 * include/grub/parser.h: Likewise.
8964 * include/grub/partition.h: Likewise.
8965 * include/grub/pc_partition.h: Likewise.
8966 * include/grub/raid.h: Likewise.
8967 * include/grub/rescue.h: Likewise.
8968 * include/grub/script.h: Likewise.
8969 * include/grub/setjmp.h: Likewise.
8970 * include/grub/symbol.h: Likewise.
8971 * include/grub/term.h: Likewise.
8972 * include/grub/terminfo.h: Likewise.
8973 * include/grub/tparm.h: Likewise.
8974 * include/grub/types.h: Likewise.
8975 * include/grub/video.h: Likewise.
8976 * include/grub/efi/api.h: Likewise.
8977 * include/grub/efi/chainloader.h: Likewise.
8978 * include/grub/efi/console.h: Likewise.
8979 * include/grub/efi/console_control.h: Likewise.
8980 * include/grub/efi/disk.h: Likewise.
8981 * include/grub/efi/efi.h: Likewise.
8982 * include/grub/efi/pe32.h: Likewise.
8983 * include/grub/efi/time.h: Likewise.
8984 * include/grub/i386/linux.h: Likewise.
8985 * include/grub/i386/setjmp.h: Likewise.
8986 * include/grub/i386/types.h: Likewise.
8987 * include/grub/i386/efi/kernel.h: Likewise.
8988 * include/grub/i386/efi/loader.h: Likewise.
8989 * include/grub/i386/efi/time.h: Likewise.
8990 * include/grub/i386/pc/biosdisk.h: Likewise.
8991 * include/grub/i386/pc/boot.h: Likewise.
8992 * include/grub/i386/pc/chainloader.h: Likewise.
8993 * include/grub/i386/pc/console.h: Likewise.
8994 * include/grub/i386/pc/init.h: Likewise.
8995 * include/grub/i386/pc/kernel.h: Likewise.
8996 * include/grub/i386/pc/loader.h: Likewise.
8997 * include/grub/i386/pc/memory.h: Likewise.
8998 * include/grub/i386/pc/multiboot.h: Likewise.
8999 * include/grub/i386/pc/serial.h: Likewise.
9000 * include/grub/i386/pc/time.h: Likewise.
9001 * include/grub/i386/pc/vbe.h: Likewise.
9002 * include/grub/i386/pc/vbeblit.h: Likewise.
9003 * include/grub/i386/pc/vbefill.h: Likewise.
9004 * include/grub/i386/pc/vbeutil.h: Likewise.
9005 * include/grub/i386/pc/vga.h: Likewise.
9006 * include/grub/ieee1275/ieee1275.h: Likewise.
9007 * include/grub/ieee1275/ofdisk.h: Likewise.
9008 * include/grub/powerpc/libgcc.h: Likewise.
9009 * include/grub/powerpc/setjmp.h: Likewise.
9010 * include/grub/powerpc/types.h: Likewise.
9011 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
9012 * include/grub/powerpc/ieee1275/console.h: Likewise.
9013 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
9014 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
9015 * include/grub/powerpc/ieee1275/loader.h: Likewise.
9016 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
9017 * include/grub/powerpc/ieee1275/time.h: Likewise.
9018 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
9019 * include/grub/sparc64/libgcc.h: Likewise.
9020 * include/grub/sparc64/setjmp.h: Likewise.
9021 * include/grub/sparc64/types.h: Likewise.
9022 * include/grub/sparc64/ieee1275/console.h: Likewise.
9023 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
9024 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
9025 * include/grub/sparc64/ieee1275/time.h: Likewise.
9026 * include/grub/util/biosdisk.h: Likewise.
9027 * include/grub/util/getroot.h: Likewise.
9028 * include/grub/util/lvm.h: Likewise.
9029 * include/grub/util/misc.h: Likewise.
9030 * include/grub/util/raid.h: Likewise.
9031 * include/grub/util/resolve.h: Likewise.
9032 * io/gzio.c: Likewise.
9033 * kern/device.c: Likewise.
9034 * kern/disk.c: Likewise.
9035 * kern/dl.c: Likewise.
9036 * kern/elf.c: Likewise.
9037 * kern/env.c: Likewise.
9038 * kern/err.c: Likewise.
9039 * kern/file.c: Likewise.
9040 * kern/fs.c: Likewise.
9041 * kern/loader.c: Likewise.
9042 * kern/main.c: Likewise.
9043 * kern/misc.c: Likewise.
9044 * kern/mm.c: Likewise.
9045 * kern/parser.c: Likewise.
9046 * kern/partition.c: Likewise.
9047 * kern/rescue.c: Likewise.
9048 * kern/term.c: Likewise.
9049 * kern/efi/efi.c: Likewise.
9050 * kern/efi/init.c: Likewise.
9051 * kern/efi/mm.c: Likewise.
9052 * kern/i386/dl.c: Likewise.
9053 * kern/i386/efi/init.c: Likewise.
9054 * kern/i386/efi/startup.S: Likewise.
9055 * kern/i386/pc/init.c: Likewise.
9056 * kern/i386/pc/lzo1x.S: Likewise.
9057 * kern/i386/pc/startup.S: Likewise.
9058 * kern/ieee1275/ieee1275.c: Likewise.
9059 * kern/powerpc/cache.S: Likewise.
9060 * kern/powerpc/dl.c: Likewise.
9061 * kern/powerpc/ieee1275/cmain.c: Likewise.
9062 * kern/powerpc/ieee1275/crt0.S: Likewise.
9063 * kern/powerpc/ieee1275/init.c: Likewise.
9064 * kern/powerpc/ieee1275/openfw.c: Likewise.
9065 * kern/sparc64/cache.S: Likewise.
9066 * kern/sparc64/dl.c: Likewise.
9067 * kern/sparc64/ieee1275/init.c: Likewise.
9068 * kern/sparc64/ieee1275/openfw.c: Likewise.
9069 * loader/efi/chainloader.c: Likewise.
9070 * loader/efi/chainloader_normal.c: Likewise.
9071 * loader/i386/efi/linux.c: Likewise.
9072 * loader/i386/efi/linux_normal.c: Likewise.
9073 * loader/i386/pc/chainloader.c: Likewise.
9074 * loader/i386/pc/chainloader_normal.c: Likewise.
9075 * loader/i386/pc/linux.c: Likewise.
9076 * loader/i386/pc/linux_normal.c: Likewise.
9077 * loader/i386/pc/multiboot.c: Likewise.
9078 * loader/i386/pc/multiboot_normal.c: Likewise.
9079 * loader/powerpc/ieee1275/linux.c: Likewise.
9080 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9081 * normal/arg.c: Likewise.
9082 * normal/cmdline.c: Likewise.
9083 * normal/command.c: Likewise.
9084 * normal/completion.c: Likewise.
9085 * normal/execute.c: Likewise.
9086 * normal/function.c: Likewise.
9087 * normal/lexer.c: Likewise.
9088 * normal/main.c: Likewise.
9089 * normal/menu.c: Likewise.
9090 * normal/menu_entry.c: Likewise.
9091 * normal/misc.c: Likewise.
9092 * normal/parser.y: Likewise.
9093 * normal/script.c: Likewise.
9094 * normal/i386/setjmp.S: Likewise.
9095 * normal/powerpc/setjmp.S: Likewise.
9096 * normal/sparc64/setjmp.S: Likewise.
9097 * partmap/acorn.c: Likewise.
9098 * partmap/amiga.c: Likewise.
9099 * partmap/apple.c: Likewise.
9100 * partmap/gpt.c: Likewise.
9101 * partmap/pc.c: Likewise.
9102 * partmap/sun.c: Likewise.
9103 * term/gfxterm.c: Likewise.
9104 * term/terminfo.c: Likewise.
9105 * term/efi/console.c: Likewise.
9106 * term/i386/pc/console.c: Likewise.
9107 * term/i386/pc/serial.c: Likewise.
9108 * term/i386/pc/vesafb.c: Likewise.
9109 * term/i386/pc/vga.c: Likewise.
9110 * term/ieee1275/ofconsole.c: Likewise.
9111 * util/biosdisk.c: Likewise.
9112 * util/console.c: Likewise.
9113 * util/genmoddep.c: Likewise.
9114 * util/getroot.c: Likewise.
9115 * util/grub-emu.c: Likewise.
9116 * util/grub-mkdevicemap.c: Likewise.
9117 * util/grub-probe.c: Likewise.
9118 * util/lvm.c: Likewise.
9119 * util/misc.c: Likewise.
9120 * util/raid.c: Likewise.
9121 * util/resolve.c: Likewise.
9122 * util/update-grub.in: Likewise.
9123 * util/update-grub_lib.in: Likewise.
9124 * util/grub.d/00_header.in: Likewise.
9125 * util/grub.d/10_hurd.in: Likewise.
9126 * util/grub.d/10_linux.in: Likewise.
9127 * util/i386/efi/grub-install.in: Likewise.
9128 * util/i386/efi/grub-mkimage.c: Likewise.
9129 * util/i386/pc/grub-install.in: Likewise.
9130 * util/i386/pc/grub-mkimage.c: Likewise.
9131 * util/i386/pc/grub-mkrescue.in: Likewise.
9132 * util/i386/pc/grub-setup.c: Likewise.
9133 * util/i386/pc/misc.c: Likewise.
9134 * util/powerpc/ieee1275/grub-install.in: Likewise.
9135 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9136 * util/powerpc/ieee1275/misc.c: Likewise.
9137 * video/bitmap.c: Likewise.
9138 * video/video.c: Likewise.
9139 * video/i386/pc/vbe.c: Likewise.
9140 * video/i386/pc/vbeblit.c: Likewise.
9141 * video/i386/pc/vbefill.c: Likewise.
9142 * video/i386/pc/vbeutil.c: Likewise.
9143 * video/readers/tga.c: Likewise.
9144
3572d015 91452007-07-02 Robert Millan <rmh@aybabtu.com>
9146
9147 * conf/i386-efi.rmk: Replace obsolete reference to
9148 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9149 with util/getroot.c.
9150 * conf/powerpc-ieee1275.rmk: Likewise.
9151 * conf/sparc64-ieee1275.rmk: Likewise.
9152
9153 * util/grub-emu.c (main): Fix unchecked pointer handling.
9154
2c2a681b 91552007-07-02 Robert Millan <rmh@aybabtu.com>
9156
9157 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9158 invocation to fail, in order to support partition-less media.
9159
9160 * util/i386/pc/grub-install.in: Likewise.
9161
9162 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9163 which fs or partmap modules are needed (akin to its sister scripts).
9164
9165 Also use grub-probe to get rid of unportable /proc/mounts check.
9166
9167 Print the same informational message that the other scripts do, before
fe6b695a 9168 exiting.
2c2a681b 9169
6193defe 91702007-06-23 Robert Millan <rmh@aybabtu.com>
9171
fe6b695a 9172 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 9173 a font file can be found and, if so, echo the GRUB path to it.
9174
9175 * util/update-grub.in: Handle multiple terminals depending on user
9176 input, platform availability and font file presence. Propagate
9177 variables of our findings to /etc/grub.d/ children.
9178
9179 * util/grub.d/00_header.in: Handle multiple terminals, based on
9180 environment setup by update-grub.
9181
eface1dc 91822007-06-23 Robert Millan <rmh@aybabtu.com>
9183
ba50d28f 9184 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 9185
bf697e28 91862007-06-21 Robert Millan <rmh@aybabtu.com>
9187
9188 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9189 indicate end of data section in kernel image.
9190 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9191 GRUB_KERNEL_MACHINE_DATA_END.
9192
9193 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9194 space for it.
9195 * kern/i386/efi/startup.S: Likewise.
9196
9197 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9198 during image generation. Implement --prefix option to override this
9199 patch.
9200 * util/i386/efi/grub-mkimage.c: Likewise.
9201
9202 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9203 code to make path relative to its root into a separate function.
9204
9205 * util/i386/pc/grub-install.in: Use newly provided
9206 make_system_path_relative_to_its_root() to convert ${grubdir}, then
9207 pass the result to grub-install --prefix.
9208
baa574b4 92092007-06-13 Robert Millan <rmh@aybabtu.com>
9210
9211 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9212 DEFAULT_DEVICE_MAP.
9213 * util/grub-emu.c: Use above definitions from misc.h instead of
9214 defining them.
9215 * util/grub-mkdevicemap.c: Likewise.
9216 * util/i386/pc/grub-setup.c: Likewise.
9217 * util/grub-probe.c: Likewise.
9218 (probe): Abort with grub_util_error() when either
9219 grub_guess_root_device or grub_util_get_grub_dev fails.
9220
0215dcbf 92212007-06-12 Robert Millan <rmh@aybabtu.com>
9222
9223 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9224 "pager" assignment.
9225 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9226 "pcdata".
9227 * util/grub-probe.c (probe): Likewise for "drive_name".
9228
8af2ab7b 92292007-06-11 Robert Millan <rmh@aybabtu.com>
9230
9231 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9232 not just the cdrom one.
9233
59d31694 92342007-06-11 Robert Millan <rmh@aybabtu.com>
9235
9236 * util/i386/pc/grub-mkrescue.in: Add "set -e".
9237 Add --pkglibdir=DIR option to override pkglibdir.
9238 Mention --image-type=TYPE in help output.
9239 Fix --grub-mkimage (it was a no-op).
fe6b695a 9240 Abort gracefully when no parameter is given.
59d31694 9241
7ee367e4 92422007-06-11 Robert Millan <rmh@aybabtu.com>
9243
9244 * util/i386/pc/grub-mkrescue.in: New file.
9245 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
9246 * Makefile.in: Handle bin_SCRIPTS.
9247
29b0ed46 92482007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
9249
9250 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9251 list of video modes.
9252
c0f90770 92532007-06-06 Robert Millan <rmh@aybabtu.com>
9254
9255 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9256 file doesn't exist, or if it is in a filesystem grub can't read.
9257
9258 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
9259 not abort if GRUB_DRIVE could not be defined. Rearrange generated
9260 header comment to fit in 80 columns when the variables are resolved.
9261
9262 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9263 could be identified by update-grub. Remove redundant check for
fe6b695a 9264 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 9265 handles that).
9266
fb36dc26 92672007-06-04 Robert Millan <rmh@aybabtu.com>
9268
9269 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9270
9271 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9272
9273 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9274
0c68c93e 92752007-06-04 Robert Millan <rmh@aybabtu.com>
9276
9277 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9278
9279 * include/grub/partition.h: Declare grub_apple_partition_map_init and
9280 grub_apple_partition_map_fini.
9281
9282 * util/biosdisk.c
9283 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9284 to access >2 TiB disks).
9285
9286 Print disk->total_sectors with %llu instead of %lu, since this
9287 variable is always 64-bit (prevents wrong disk size from being displayed
9288 on either >2 TiB disk or big-endian CPU).
9289
9290 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9291 into a generic case that supports all (sane) partition maps.
9292
9293 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9294 breaks big-endian.
9295
9296 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9297 and grub_apple_partition_map_fini() after that.
9298
0f23eb74 92992007-06-01 Robert Millan <rmh@aybabtu.com>
9300
9301 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9302
9303 * util/grub.d/00_header.in: Only enable gfxterm when
9304 convert_system_path_to_grub_path() succeeds.
9305
42c71976 93062007-05-20 Robert Millan <rmh@aybabtu.com>
9307
9308 * util/update-grub_lib.in: New file.
9309 * DISTLIST: Add update-grub_lib.in.
9310 * conf/common.rmk: Generate update-grub_lib and install it in
9311 $(lib_DATA).
9312 * Makefile.in: Add install routine for $(lib_DATA).
9313
9314 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9315 function provided by update-grub_lib to support arbitrary paths of
9316 unifont.pff.
9317 * util/update-grub.in: Use convert_system_path_to_grub_path() to
9318 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9319
5beb2291 93202007-05-19 Robert Millan <rmh@aybabtu.com>
9321
9322 * commands/i386/cpuid.c: New module.
9323 * DISTLIST: Add it.
9324 * conf/i386-efi.rmk: Enable cpuid.mod.
9325 * conf/i386-pc.rmk: Likewise.
9326
7262eca1 93272007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9328
9329 * kern/disk.c (grub_disk_read): Check return value of
9330 grub_realloc().
9331
260ba823 93322007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9333
9334 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9335 arrays.
9336 * disk/raid.c (grub_raid_open): Likewise.
9337
1ecb6cf2 93382007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9339
9340 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9341 stack instead of on the heap.
9342
9343 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9344 before doing a read on it.
9345
9346 * configure.ac: Only use -fno-stack-protector for the target
9347 environment.
f19dbdb7 9348
21c8cbb1 93492007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9350
9351 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9352 __attribute_ ((unused)) to mode_type argument.
9353
9354 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 9355
21c8cbb1 9356 * kern/misc.c (memcmp): Fix prototype.
9357
9358 * include/grub/partition.h [GRUB_UTIL]
9359 (grub_gpt_partition_map_init): Add prototype.
9360 (grub_gpt_partition_map_fini): Likewise.
9361
9362 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
9363 at the right place.
9364
9365 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
9366 (grub_fat_read_data): Likewise.
9367 (grub_fat_find_dir): Likewise.
9368
9369 * font/manager.c (find_glyph): Make table a const.
9370 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 9371
849d55d3 93722007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
9373
9374 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
9375 code, first search for device in /dev/mapper, then in /dev.
9376 (grub_util_get_grub_dev): New function.
9377 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
9378 prototype.
9379 * util/grub-probe.c (probe): Remove check for RAID, call
9380 grub_util_get_grub_dev() instead of
9381 grub_util_biosdisk_get_grub_dev().
9382 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
9383 grub_util_biosdisk_get_grub_dev().
9384 * util/i386/pc/grub-setup.c (main): Likewise.
9385
8fff7c2f 93862007-05-16 Robert Millan <rmh@aybabtu.com>
9387
9388 * DISTLIST: Update for the latest changes.
9389 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
9390 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
9391 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
9392 grub/util/biosdisk.h.
9393 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
9394 grub/util/biosdisk.h.
9395
48e12b52 93962007-05-16 Robert Millan <rmh@aybabtu.com>
9397
9398 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9399
46b9d128 94002007-05-16 Robert Millan <rmh@aybabtu.com>
9401
9402 * util/i386/efi/grub-install.in: New.
9403 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9404 newly added grub-install.
9405 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9406 include.
9407 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9408 grub/util/biosdisk.h.
9409 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9410 grub/util/biosdisk.h.
9411
2d1a40a9 94122007-05-16 Robert Millan <rmh@aybabtu.com>
9413
9414 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
9415 * include/grub/util/biosdisk.h: ... here.
9416 * util/i386/pc/biosdisk.c: Moved to ...
9417 * util/biosdisk.c: ... here.
9418 * util/i386/pc/getroot.c: Moved to ...
9419 * util/getroot.c: ... here.
9420 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
9421 * util/grub-mkdevicemap.c: ... here.
9422 * util/i386/pc/grub-probe.c: Moved to ...
9423 * util/grub-probe.c: ... here.
9424
9e26e3bc 94252007-05-15 Robert Millan <rmh@aybabtu.com>
9426
9427 * util/update-grub.in: Remove duplicated line in grub.cfg header
9428 message.
9429
57f96397 94302007-05-13 Robert Millan <rmh@aybabtu.com>
9431
9432 * util/update-grub.in: Fix a few assumptions about the devices holding
9433 /, /boot and /boot/grub being the same.
9434 * util/grub.d/00_header.in: Likewise.
9435 * util/grub.d/10_hurd.in: Likewise.
9436 * util/grub.d/10_linux.in: Likewise.
9437
9438 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
9439 patterns. Use that to define the `.old' suffix as older than `'.
9440
9441 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
9442
9443 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
9444 the grub.cfg header message.
9445
2e610d62 94462007-05-11 Robert Millan <rmh@aybabtu.com>
9447
9448 * util/update-grub.in: Create device.map if it doesn't already exist,
9449 before attempting to run grub-probe.
9450 Check for grub-probe and grub-mkdevicemap with the same code
9451 grub-install is using.
9452 Remove test mode.
9453
3f6a10ef 94542007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
9455
9456 * Makefile.in: Add the datarootdir autoconf variable.
9457
02e7b75e 94582007-05-09 Robert Millan <rmh@aybabtu.com>
9459
9460 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 9461 fail gracefully if dev->disk->partition == NULL.
02e7b75e 9462
75f396cc 94632007-05-07 Robert Millan <rmh@aybabtu.com>
9464
9465 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
9466 determine partition map module.
9467 * util/i386/pc/grub-install.in: Use this feature to decide which
9468 partition module to load, instead of hardcoding pc and gpt.
9469
da65cb36 94702007-05-07 Robert Millan <rmh@aybabtu.com>
9471
9472 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
9473 source directory differs from build directory.
9474
b57d6a91 94752007-05-05 Robert Millan <rmh@aybabtu.com>
9476
9477 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
9478 initialisation.
9479
509d00f1 94802007-05-05 Robert Millan <rmh@aybabtu.com>
9481
9482 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
9483
c48f23ef 94842007-05-05 Robert Millan <rmh@aybabtu.com>
9485
9486 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
9487 command-line arguments via ${GRUB_CMDLINE_LINUX}.
9488
20b97658 94892007-05-05 Robert Millan <rmh@aybabtu.com>
9490
9491 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
9492 (grub_probe_SOURCES): Likewise.
9493 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
9494 GPT and initialize dos_part and bsd_part accordingly.
9495 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
9496 install_bsd_part.
9497 (main): Activate gpt module for use during partition identification,
9498 and deactivate it afterwards.
9499 * util/i386/pc/grub-install.in: Add gpt module to core.img.
9500 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
9501 partition identification, and deactivate it afterwards.
9502
99123174 95032007-05-05 Robert Millan <rmh@aybabtu.com>
9504
9505 * term/i386/pc/console.c (grub_console_fini): Call
9506 grub_term_set_current() before grub_term_unregister().
9507
ebd97f6e 95082007-05-04 Robert Millan <rmh@aybabtu.com>
9509
9510 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
9511 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
9512 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
9513 and update-grub_DATA.
9514 * conf/common.rmk: Build and install update-grub components.
9515 * conf/common.mk: Regenerate.
9516 * util/update-grub.in: New. Core of update-grub.
9517 * util/grub.d/00_header.in: New. Generates grub.cfg header.
9518 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
9519 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
9520 * util/grub.d/README: New. Document grub.d directory layout.
9521
b06a264d 95222007-05-01 Robert Millan <rmh@aybabtu.com>
9523
9524 * util/grub-emu.c: Move initialization functions
9525 grub_util_biosdisk_init() and grub_init_all() before
9526 grub_util_biosdisk_get_grub_dev(), which relies on them.
9527
41f0050e 95282007-04-19 Robert Millan <rmh@aybabtu.com>
9529
9530 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
9531 it is used later.
9532
04582bb3 95332007-04-18 Jerone Young <jerone@gmail.com>
9534
f19dbdb7 9535 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 9536 stanza.
9537
08db4632 95382007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 9539
08db4632 9540 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
9541 continue on and look for device node with real device name.
9542
801b76be 95432007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 9544
fe6b695a 9545 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 9546 ability.
9547 * Makefile.in: Add autoconf package transformation code.
9548 * util/i386/pc/grub-install.in: Likewise.
9549 * util/powerpc/ieee1275/grub-install.in: Likewise.
9550
6795c4e1 95512007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
9552
9553 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
9554 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
9555 (EXT2_REVISION): Likewise.
9556 (EXT2_INODE_SIZE): Likewise.
9557 (struct grub_ext2_block_group): Added a missing member
9558 "used_dirs".
9559 (grub_ext2_read_inode): Divide by the inode size in a superblock
9560 instead of 128 to obtain INODES_PER_BLOCK.
9561 Use the macro EXT2_INODE_SIZE instead of directly using
9562 SBLOCK->INODE_SIZE.
9563
d70af616 95642007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
9565
9566 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
9567 superblock instead of the structure size to compute an
9568 offset. This fixes the problem that GRUB could not read a
9569 filesystem when inode size is different from 128-byte.
9570
3b801603 95712007-03-05 Marco Gerards <marco@gnu.org>
9572
9573 * normal/main.c (read_config_file): When "menu" is not set, create
9574 an initial context.
9575
4785bfe4 95762007-02-21 Hollis Blanchard <hollis@penguinppc.org>
9577
9578 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
9579 (HEAP_LIMIT): New macro.
9580 (grub_claim_heap): Claim memory up to `heaplimit'.
9581
a0cbb023 95822007-02-21 Hollis Blanchard <hollis@penguinppc.org>
9583
9584 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
9585 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
9586 (_start): Likewise.
9587 (grub_arch_modules_addr): Return address after `_end'.
9588 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
9589 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
9590 (add_segments): Calculate `_end' from phdr size and location.
9591 (ALIGN_UP): Moved to ...
9592 * include/grub/misc.h: here.
9593 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9594 New macro.
9595 (GRUB_IEEE1275_MODULE_BASE): Removed.
9596
fd7d8eba 95972007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9598
9599 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
9600 loop boundary.
9601
9b09e6fc 96022007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9603
9604 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
9605 All users updated.
9606 (grub_elf64_load_hook_t): Likewise.
9607 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
9608 debug output.
9609
3ce27299 96102007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9611
9612 * kern/mm.c: Update copyright.
9613 (grub_mm_debug): Correct syntax error.
9614 (grub_mm_dump_free): New function.
9615 (grub_debug_free): Call `grub_free'.
9616 * include/grub/mm.h: Update copyright.
9617 (grub_mm_dump_free): Add declaration.
9618
077d5fee 96192007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9620
9621 * include/grub/ieee1275/ieee1275.h: Update copyright.
9622 * kern/powerpc/ieee1275/init.c: Likewise.
9623 * kern/powerpc/ieee1275/openfw.c: Likewise.
9624
9625 * loader/powerpc/ieee1275/linux.c: Likewise.
9626 * include/grub/elfload.h: Likewise.
9627 * kern/elf.c: Likewise.
9628 (grub_elf32_load): Pass `base' and `size' parameters. Update all
9629 callers.
9630 (grub_elf64_load): Likewise.
9631 (grub_elf32_load_segment): Move to a nested function.
9632 (grub_elf64_load_segment): Likewise.
9633
dc946850 96342007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9635
9636 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
9637 prototype.
9638 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
9639 (grub_heap_len): Likewise.
9640 (HEAP_SIZE): New macro.
9641 (grub_claim_heap): New function.
9642 (grub_machine_init): Don't claim heap directly. Call
9643 `grub_claim_heap'.
9644 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
9645 (grub_available_iterate): New function.
9646
baa2a121 96472007-02-03 Thomas Schwinge <tschwinge@gnu.org>
9648
9649 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
9650 * configure.ac: Use it for testing the HOST and TARGET compilers.
9651
4fe9862e 96522006-12-13 Thomas Schwinge <tschwinge@gnu.org>
9653
9654 * Makefile.in (enable_grub_emu): New variable.
9655 * configure.ac (--enable-grub-emu): New option.
9656 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
9657 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
9658 * conf/i386-pc.rmk: Likewise.
9659 * conf/powerpc-ieee1275.rmk: Likewise.
9660 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
9661
a8aa5762 96622006-12-12 Marco Gerards <marco@gnu.org>
9663
9664 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
9665
9666 * kern/env.c (grub_env_unset): Don't free the member `value' when
9667 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
9668 pointer.
9669
9670 * normal/main.c (current_menu): Removed.
9671 (free_menu): Unset the `menu' environment variable.
9672 (grub_normal_menu_addentry): Make use of the environment variable
9673 `menu', instead of using the global `current_menu'. Allocate
9674 memory for the sourcecode of this entry.
9675 (read_config_file): New argument `nested', changed all callers.
9676 Only in the case of a new context, initialize a new menu. Set the
9677 `menu' environment variable.
9678 (grub_normal_execute): Don't set and unset the environment
9679 variable `menu' here anymore. Only free the menu when leaving the
9680 context.
9681
9682 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
9683 leak.
9684
957b3a3e 96852006-12-11 Marco Gerards <marco@gnu.org>
9686
9687 * normal/menu_entry.c (run): Fix off by one bug so the last line
9688 is executed. Move the loader check to outside the loop.
9689
ef875714 96902006-12-08 Hollis Blanchard <hollis@penguinppc.org>
9691
9692 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
9693
4e739985 96942006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
9695
9696 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
9697 the number of sectors. Reported by Andrey Shuvikov
9698 <mr_hyro@yahoo.com>.
f19dbdb7 9699
790707f2 97002006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
9701
9702 * kern/disk.c (grub_disk_read): When there is a read error, always
9703 try to read only the necessary data.
f19dbdb7 9704
790707f2 9705 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
9706 disk/raid.c.
9707 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
9708 prototype.
9709 [GRUB_UTIL] (grub_raid_fini): Likewise.
9710 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 9711 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 9712 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
9713 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
9714 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
9715 and grub_raid_fini().
f19dbdb7 9716
03e58196 97172006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
9718
9719 * include/grub/types.h (__unused): Rename to UNUSED.
9720 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
9721 (grub_elf64_size): Likewise.
f19dbdb7 9722
ae4f23bf 97232006-11-03 Hollis Blanchard <hollis@penguinppc.org>
9724
9725 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
9726 grub_error_push and grub_error_pop in the error-handling path.
9727 (grub_elf32_load_segment): Only call grub_file_read with non-zero
9728 length.
9729
2166cc83 97302006-11-03 Hollis Blanchard <hollis@penguinppc.org>
9731
9732 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
9733 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9734 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9735 (kernel_elf_SOURCES): Likewise.
9736 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
9737 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
9738 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9739 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9740 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
9741 (elf_mod_SOURCES): New variable.
9742 (elf_mod_CFLAGS): Likewise.
9743 (elf_mod_LDFLAGS): Likewise.
9744 * include/grub/types.h (__unused): New macro.
9745 * include/grub/elfload.h: New file.
9746 * kern/elf.c: Likewise.
9747 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
9748 (ELF32_LOADMASK): New macro.
9749 (ELF64_LOADMASK): Likewise.
9750 (vmlinux): Removed.
9751 (grub_linux_load32): New function.
9752 (grub_linux_load64): Likewise.
9753 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
9754 Use grub_elf_t instead of grub_file_t.
9755
a09d5aa5 97562006-11-02 Hollis Blanchard <hollis@penguinppc.org>
9757
9758 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
9759 `catch_result' to struct set_color_args.
9760
d976fc51 97612006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9762
9763 * normal/menu.c: Include grub/script.h.
9764 * normal/menu_entry.c: Likewise.
9765 * include/grub/normal.h: Do not include grub/script.h.
9766
67507549 97672006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9768
9769 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
9770
69203a99 97712006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9772
9773 * kern/disk.c (grub_disk_open): Print debug messages when opening a
9774 disk.
9775 (grub_disk_close): Print debug messages when closing a disk.
9776 (grub_disk_read): Print debug messages when disk read fails.
9777 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
9778 filesystem type.
9779 * kern/partition.c: Include misc.h.
9780 (grub_partition_iterate): Print debug messages when detecting
9781 partition type.
9782
e2b8278c 97832006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9784
9785 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
9786 is negative.
9787 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
9788
97b2f2ff 97892006-10-26 Hollis Blanchard <hollis@penguinppc.org>
9790
9791 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9792 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
9793
6555d655 97942006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
9795
9796 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
9797 instead of sizeof(lv). Patch by Michael Guntsche.
9798
4d42b77f 97992006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
9800
9801 * disk/lvm.c: Rename VGS to VG_LIST.
9802 (grub_lvm_iterate): Change VGS->LV to VG-LV.
9803 (grub_lvm_open): Likewise.
9804 Thanks to Michael Guntsche for finding this bug.
9805
5d74d927 98062006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9807
9808 * configure.ac (AC_INIT): Bumped to 1.95.
9809
a1bb27e4 98102006-10-14 Robert Millan <rmh@aybabtu.com>
9811
9812 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
9813 with "/dev/.static/dev/md".
9814
e0994b8b 98152006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
9816
9817 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
9818 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
9819 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
9820 DRIVE_NAME are always freed.
9821
9822 * util/i386/pc/biosdisk.c (make_device_name): Add one into
9823 DOS_PART, as a DOS partition is counted from one instead of zero
9824 now. Reported by Robert Millan.
9825
ddd5cee9 98262006-10-14 Robert Millan <rmh@aybabtu.com>
9827
9828 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
9829 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
9830 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
9831 string returned by grub_guess_root_device.
9832 * util/i386/pc/grub-setup.c: Likewise.
9833 * util/i386/pc/grub-probefs.c: Likewise.
9834
9835 * util/i386/pc/grub-probefs.c: Rename to ...
9836 * util/i386/pc/grub-probe.c: ... this.
9837 * DISTLIST: Remove grub-probefs, add grub-probe.
9838 * conf/i386-efi.rmk: Likewise.
9839 * conf/i386-pc.rmk: Likewise.
9840 * util/i386/pc/grub-install.in: Likewise.
9841
9842 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
9843 choose which information we want to print.
9844
2b002173 98452006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
9846
9847 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
9848 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
9849 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
9850 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
9851 video/readers/tga.c and video/i386/pc/vbeutil.c.
9852
98532006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
9854
9855 Added support for RAID and LVM.
f19dbdb7 9856
2b002173 9857 * disk/lvm.c: New file.
9858 * disk/raid.c: Likewise.
9859 * include/grub/lvm.h: Likewise.
f19dbdb7 9860 * include/grub/raid.h: Likewise.
2b002173 9861 * include/grub/util/lvm.h: Likewise.
9862 * include/grub/util/raid.h: Likewise.
9863 * util/lvm.c: Likewise.
9864 * util/raid.c: Likewise.
9865
9866 * include/grub/disk.h (grub_disk_dev_id): Add
9867 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
9868 (grub_disk_get_size): New prototype.
9869 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
9870 returns a partition.
9871 (grub_disk_get_size): New function.
f19dbdb7 9872
2b002173 9873 * kern/i386/pc/init.c (make_install_device): Copy the prefix
9874 verbatim if grub_install_dos_part is -2.
9875
9876 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
9877 and LVM devices.
9878
9879 * util/i386/pc/grub-setup.c (setup): New argument
9880 MUST_EMBED. Force embedding of GRUB when the argument is
9881 true. Close FILE before returning.
9882 (main): Add support for RAID and LVM.
f19dbdb7 9883
2b002173 9884 * conf/common.rmk: Add RAID and LVM modules.
9885 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
9886 util/lvm.c.
9887 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
9888
9889 * kern/misc.c (grub_strstr): New function.
9890 * include/grub/misc.h (grub_strstr): New prototype.
9891
050548d0 98922006-10-10 Tristan Gingold <tristan.gingold@bull.net>
9893
9894 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
9895
da849d2d 98962006-10-05 Tristan Gingold <tristan.gingold@bull.net>
9897
9898 * kern/misc.c (grub_strtoull): Guess the base only if not
9899 specified.
9900
97b2f2ff 99012006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 9902
9903 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
9904 PowerMac support.
9905
97b2f2ff 99062006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 9907
9908 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
9909
9910 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
9911 Remove `flags' argument. All callers changed.
9912 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
9913 (IEEE1275_IHANDLE_INVALID): New variable.
9914 (IEEE1275_CELL_INVALID): New variable.
9915 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
9916 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
9917 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
9918 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
9919 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
9920 codes from Open Firmware. All callers updated.
9921 (grub_ieee1275_next_property): Directly return Open Firmware return
9922 code.
9923 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9924 Standardize error checking from `grub_ieee1275_get_property'.
9925 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
9926 `devalias' to `aliases'. Correct comments. Consolidate error paths.
9927
97b2f2ff 99282006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 9929
9930 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
9931 `instance_to_package_args' to `instance_to_path_args'.
9932
9933 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
9934 `grub_ieee1275_chosen'.
9935
9936 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
9937 `grub_ieee1275_interpret'.
9938
97b2f2ff 99392006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 9940
9941 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
9942
97b2f2ff 99432006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 9944
9945 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
9946 (__cmpdi): Likewise.
9947
9948 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
9949 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
9950 `grub_ssize_t'.
9951
02bb8acc 9952 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 9953
9954 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
9955 to type `grub_ssize_t'.
9956 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
9957
7f9a8531 99582006-09-22 Marco Gerards <marco@gnu.org>
9959
9960 * normal/script.c (grub_script_create_cmdmenu): Skip leading
9961 newlines.
9962
b5ef1102 99632006-09-22 Marco Gerards <marco@gnu.org>
9964
9965 * commands/echo.c: New file.
9966
9967 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
9968
9969 * conf/common.rmk (echo_mod_SOURCES): New variable.
9970 (echo_mod_CFLAGS): Likewise.
9971 (echo_mod_LDFLAGS): Likewise.
9972
2cff3677 99732006-09-22 Marco Gerards <marco@gnu.org>
9974
9975 * normal/main.c (get_line): Malloc memory instead of using
9976 preallocated memory. Removed the arguments `cmdline' and
9977 `max_len'. Updated all callers.
9978
6ba4688b 99792006-09-22 Marco Gerards <marco@gnu.org>
9980
9981 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
9982 (normal_mod_DEPENDENCIES): Likewise.
9983
9984 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
9985 (normal_mod_DEPENDENCIES): Likewise.
9986
9987 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
9988
e02ac02c 99892006-09-22 Johan Rydberg <jrydberg@gnu.org>
9990
9991 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
9992 programs.
9993 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
9994 (normal_mod_DEPENDENCIES): Likewise.
9995 * conf/i386-pc.mk: Regenerate.
9996 * conf/i386-efi.mk: Likewise
9997 * conf/common.mk: Likewise.
9998 * conf/powerpc-ieee1275.mk: Likewise.
9999 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 10000
8d252e44 100012006-09-22 Robert Millan <rmh@aybabtu.com>
10002
10003 Sync with i386 version.
10004 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
10005 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
10006
209bf7ac 100072006-09-21 Robert Millan <rmh@aybabtu.com>
10008
10009 Import from GRUB Legacy (lib/device.c):
10010 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
10011 (init_device_map) [__linux__]: Add support for I2O devices.
10012
6b146090 100132006-09-14 Marco Gerards <marco@gnu.org>
10014
10015 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
10016 `-melf_i386'.
10017
e38600a8 100182006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 10019
10020 * util/i386/pc/grub-install.in: Skip menu.lst when removing
10021 /boot/grub/*.lst.
78fa1790 10022
2952da5d 10023 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 10024
2952da5d 10025 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
10026 before adding it to device.map.
10027
01b82a64 100282006-08-15 Johan Rydberg <jrydberg@gnu.org>
10029
fe6b695a 10030 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 10031 compiles a file; using the -MD option.
10032 * conf/common.mk: Regenerate.
10033 * conf/i386-pc.mk: Likewise.
10034 * conf/i386-efi.mk: Likewise.
10035 * conf/powerpc-ieee1275.mk: Likewise.
10036 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 10037
1064790d 100382006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
10039
10040 Move the prototypes of grub_setjmp and grub_longjmp to
10041 cpu/setjmp.h, so that each architecture may specify different
10042 attributes.
f19dbdb7 10043
1064790d 10044 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10045 (grub_longjmp): Likewise.
10046 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10047 (grub_longjmp): Likewise.
10048 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10049 (grub_longjmp): Likewise.
10050
10051 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10052 [!GRUB_UTIL] (grub_longjmp): Removed.
10053
29dda3ed 100542006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
10055
10056 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10057 "color!" method does not return any value.
10058
ad2a06ed 100592006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10060
10061 * include/grub/bitmap.h: New file.
10062
10063 * include/grub/i386/pc/vbeutil.h: Likewise.
10064
10065 * video/bitmap.c: Likewise.
10066
10067 * video/readers/tga.c: Likewise.
10068
10069 * video/i386/pc/vbeutil.c: Likewise.
10070
10071 * commands/videotest.c: Code cleanup and updated to reflect to new
10072 video API.
10073
10074 * term/gfxterm.c: Likewise.
10075
10076 * video/video.c: Likewise.
10077
10078 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10079 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10080 (bitmap_mod_SOURCES): New entry.
10081 (bitmap_mod_CFLAGS): Likewise.
10082 (bitmap_mod_LDFLAGS): Likewise.
10083 (tga_mod_SOURCES): Likewise.
10084 (tga_mod_CFLAGS): Likewise.
10085 (tga_mod_LDFLAGS): Likewise.
10086
10087 * include/grub/video.h (grub_video_blit_operators): New enum type.
10088 (grub_video_render_target): Changed as forward declaration and moved
10089 actual definition to be video driver specific.
10090 (grub_video_adapter.blit_bitmap): Added blitting operator.
10091 (grub_video_adapter.blit_render_target): Likewise.
10092 (grub_video_blit_bitmap): Likewise.
10093 (grub_video_blit_render_target): Likewise.
10094
10095 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10096 driver specific render target definition.
10097 (grub_video_vbe_map_rgba): Added driver internal helper.
10098 (grub_video_vbe_unmap_color): Updated to use
10099 grub_video_i386_vbeblit_info.
10100 (grub_video_vbe_get_video_ptr): Likewise.
10101
10102 * include/grub/i386/pc/vbeblit.h
10103 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10104 grub_video_i386_vbeblit_info.
10105 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10106 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10107 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10108 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10109 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10110 (grub_video_i386_vbeblit_index_index): Likewise.
10111 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10112 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10113 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10114 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10115 operator.
10116 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10117 operator.
10118
10119 * video/i386/pc/vbeblit.c: Updated to reflect changes on
10120 include/grub/i386/pc/vbeblit.h.
10121
10122 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10123 Updated to use grub_video_i386_vbeblit_info.
10124 (grub_video_i386_vbefill_R8G8B8): Likewise.
10125 (grub_video_i386_vbefill_index): Likewise.
10126 (grub_video_i386_vbefill): Added generic filler.
10127
10128 * video/i386/pc/vbefill.c: Updated to reflect changes on
10129 include/grub/i386/pc/vbefill.h.
10130
10131 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10132 grub_video_i386_vbeblit_info.
10133 (grub_video_vbe_unmap_color): Likewise.
10134 (grub_video_vbe_blit_glyph): Likewise.
10135 (grub_video_vbe_scroll): Likewise.
10136 (grub_video_vbe_draw_pixel): Removed function.
10137 (grub_video_vbe_get_pixel): Likewise.
10138 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10139 updated code to use it.
10140 (common_blitter): Added common blitter for render target and bitmap.
10141 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10142 (grub_video_vbe_blit_render_target): Likewise.
10143
bc8c036d 101442006-07-30 Johan Rydberg <jrydberg@gnu.org>
10145
10146 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10147 is in text mode if there is no console control protocol instance
10148 available.
10149
684a8eff 101502006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10151
10152 * include/grub/video.h: Code cleanup.
10153
10154 * include/grub/i386/pc/vbe.h: Likewise.
10155
10156 * video/i386/pc/vbe.c: Likewise.
10157
10158 * video/i386/pc/vbeblit.c: Likewise.
10159
10160 * video/i386/pc/vbefill.c: Likewise.
10161
10162 * video/video.c: Likewise. Also added more comments.
10163
5915059b 101642006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10165
10166 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10167 (struct grub_biosdisk_dap): Likewise.
10168
10169 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
10170 linkage settings for all functions.
10171
90ce5d56 101722006-07-12 Marco Gerards <marco@gnu.org>
10173
10174 * configure.ac (--enable-mm-debug): Fix typo.
10175
10176 * genkernsyms.sh.in: Use proper quoting for `CC'.
10177
43e7f879 101782006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
10179
10180 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10181 (normal_mod_ASFLAGS): Remove "-m32".
10182
4889bdec 101832006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
10184
10185 * util/misc.c: Include config.h.
10186 [!HAVE_MEMALIGN]: Do not include malloc.h.
10187 (grub_memalign): Use posix_memalign, if present. Then, use
10188 memalign, if present. Otherwise, emit an error.
10189
10190 * util/grub-emu.c: Do not include malloc.h.
10191
10192 * include/grub/util/misc.h: Include unistd.h. This is required for
10193 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10194 D. Eades III <hde@foobar-qux.org>.
10195
10196 * configure.ac (AC_GNU_SOURCE): Added.
10197 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10198 type.
10199
fd39d4da 102002006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
10201
10202 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10203 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10204
b786f3b5 102052006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
10206
10207 * include/grub/types.h (grub_host_addr_t): Rename to
10208 grub_target_addr_t.
10209 (grub_host_off_t): Rename to grub_target_off_t.
10210 (grub_host_size_t): Rename to grub_target_size_t.
10211 (grub_host_ssize_t): Rename to grub_target_ssize_t.
10212 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10213
10214 * include/grub/kernel.h (struct grub_module_header): Change type
10215 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10216 (grub_module_info): Likewise.
f19dbdb7 10217
051988bb 102182006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10219
10220 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10221 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10222 Velazquez <jesus.velazquez@gmail.com>.
10223
deae281b 102242006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10225
10226 Count partitions from 1 instead of 0 in the string representation
10227 of partitions. Still use 0-based internally.
f19dbdb7 10228
deae281b 10229 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10230 (sun_partition_map_iterate): Use grub_partition_t instead of
10231 struct grub_partition *. Cast DESC->START_CYLINDER to
10232 grub_uint64_t after converting the endian.
10233 (sun_partition_map_probe): Subtract 1 for PARTNUM.
10234 (sun_partition_map_get_name): Add 1 to P->INDEX.
10235
10236 * partmap/pc.c (grub_partition_parse): Subtract 1 for
10237 PCDATA->DOS_PART.
10238 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10239
10240 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10241 zero instead of one.
10242 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10243 (gpt_partition_map_get_name): Add 1 into P->INDEX.
10244
10245 * partmap/apple.c (apple_partition_map_iterate): Change the type
10246 of POS to unsigned.
10247 (apple_partition_map_probe): Subtract 1 for PARTNUM.
10248 (apple_partition_map_get_name): Add 1 into P->INDEX.
10249
10250 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10251 of POS to unsigned.
10252 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10253 calculate the offset of a partition.
10254 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10255 (amiga_partition_map_get_name): Add 1 into P->INDEX.
10256
10257 * partmap/acorn.c (acorn_partition_map_find): Change the type of
10258 SECTOR to grub_disk_addr_t.
10259 (acorn_partition_map_iterate): Likewise.
10260 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10261 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10262 top.
10263 (acorn_partition_map_get_name): Add 1 into P->INDEX.
10264
10265 * kern/i386/pc/init.c (make_install_device): Add 1 into
10266 GRUB_INSTALL_DOS_PART.
10267
10268 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10269 conditional.
10270
524a1e6a 102712006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10272
10273 Clean up the code to support 64-bit addressing in disks and
10274 files. This change is not enough for filesystems yet.
f19dbdb7 10275
524a1e6a 10276 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10277 type of "start" to grub_uint64_t.
10278 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10279 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10280 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10281 convert addresses.
10282
10283 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10284 to grub_disk_addr_t.
10285
10286 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10287 string.
10288
10289 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10290
10291 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10292 to char *.
10293
10294 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10295
10296 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10297
10298 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10299
10300 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10301 to grub_off_t, to detect an error from grub_file_seek.
10302 (grub_multiboot_load_elf32): Likewise.
10303
10304 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10305 maximum unsigned long value when an overflow is detected.
10306 (grub_strtoull): New function.
10307 (grub_divmod64): Likewise.
10308 (grub_lltoa): use grub_divmod64.
10309
10310 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10311 grub_disk_addr_t.
10312 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10313 the pointer to next character. Use grub_strtoull instead of
10314 grub_strtoul.
10315 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10316 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10317 respectively.
10318
fe6b695a 10319 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 10320 return value is signed.
10321 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10322 test if OFFSET is less than zero, as OFFSET is unsigned now.
10323
10324 * kern/disk.c (struct grub_disk_cache): Change the type of
10325 "sector" to grub_disk_addr_t.
10326 (grub_disk_cache_get_index): Change the type of SECTOR to
10327 grub_disk_addr_t. Calculate the hash with SECTOR casted to
10328 unsigned after shifting.
10329 (grub_disk_cache_invalidate): Change the type of SECTOR to
10330 grub_disk_addr_t.
10331 (grub_disk_cache_unlock): Likewise.
10332 (grub_disk_cache_store): Likewise.
10333 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10334 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10335 grub_disk_addr_t and grub_uint64_t, respectively.
10336 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10337 body, as the value of OFFSET is tweaked by
10338 grub_disk_check_range. Change the types of START_SECTOR, LEN and
10339 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10340 respectively.
10341 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10342 body, as the value of OFFSET is tweaked by
10343 grub_disk_check_range. Change the types of LEN and N to
10344 grub_size_t.
10345
10346 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10347 and "saved_offset" to grub_off_t.
10348 (test_header): Cast BUF to char *.
10349 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10350 to char *.
10351 (grub_gzio_read): Change the types of OFFSET and SIZE to
10352 grub_off_t and grub_size_t, respectively.
10353
10354 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10355 Removed.
10356 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10357 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
10358 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
10359 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
10360 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
10361
10362 * include/grub/types.h (grub_off_t): Unconditionally set to
10363 grub_uint64_t.
10364 (grub_disk_addr_t): Changed to grub_uint64_t.
10365
10366 * include/grub/partition.h (struct grub_partition): Change the
10367 types of "start", "len" and "offset" to grub_disk_addr_t,
10368 grub_uint64_t and grub_disk_addr_t, respectively.
10369 (grub_partition_get_start): Return grub_disk_addr_t.
10370 (grub_partition_get_len): Return grub_uint64_t.
10371
10372 * include/grub/misc.h (grub_strtoull): New prototype.
10373 (grub_divmod64): Likewise.
10374
10375 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
10376 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
10377 grub_off_t, respectively.
10378 All callers and references changed.
10379
10380 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
10381 grub_size_t in "read".
10382 All callers and references changed.
10383
10384 * include/grub/file.h (struct grub_file): Change the types of
10385 "offset" and "size" to grub_off_t and grub_off_t,
10386 respectively. Change the type of SECTOR to grub_disk_addr_t in
10387 "read_hook".
10388 (grub_file_read): Change the type of LEN to grub_size_t.
10389 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
10390 grub_off_t.
10391 (grub_file_size): Return grub_off_t.
10392 (grub_file_tell): Likewise.
10393 All callers and references changed.
10394
10395 * include/grub/disk.h (struct grub_disk_dev): Change the types of
10396 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10397 "write".
10398 (struct grub_disk): Change the type of "total_sectors" to
10399 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 10400 "read_hook".
524a1e6a 10401 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10402 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10403 (grub_disk_write): Likewise.
10404 All callers and references changed.
10405
10406 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10407 char * for grub_strncmp to silence gcc.
10408 (grub_iso9660_mount): Likewise.
10409 (grub_iso9660_mount): Likewise.
10410 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10411 return statement.
10412 (grub_iso9660_iterate_dir): Likewise.
10413 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
10414
10415 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
10416 LEN to grub_disk_addr_t and grub_size_t, respectively.
10417
10418 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10419
10420 * fs/jfs.c (grub_jfs_read_file): Likewise.
10421
10422 * fs/minix.c (grub_jfs_read_file): Likewise.
10423
10424 * fs/sfs.c (grub_jfs_read_file): Likewise.
10425
10426 * fs/ufs.c (grub_jfs_read_file): Likewise.
10427
10428 * fs/xfs.c (grub_jfs_read_file): Likewise.
10429
10430 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
10431 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
10432 respectively.
10433
10434 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
10435 BLKNR to -1 instead of returning GRUB_ERRNO.
10436 (grub_ext2_read_file): Change the types of SECTOR and
10437 LEN to grub_disk_addr_t and grub_size_t, respectively.
10438
10439 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
10440 LEN to grub_disk_addr_t and grub_size_t, respectively.
10441
10442 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
10443 grub_file_read.
10444
10445 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
10446 string. Do not cast SECTOR explicitly.
10447
10448 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
10449 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
10450 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
10451 grub_disk_addr_t and grub_size_t, respectively. If the sector is
10452 over 2TB and LBA mode is not supported, raise an error.
10453 (get_safe_sectors): New function.
10454 (grub_biosdisk_read): Use get_safe_sectors.
10455 (grub_biosdisk_write): Likewise.
10456
10457 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
10458 (grub_efidisk_write): Likewise.
10459
10460 * disk/loopback.c (delete_loopback): Cosmetic changes.
10461 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
10462 correctly.
10463 (grub_loopback_open): Likewise.
10464 (grub_loopback_read): Likewise. Also, change the type of POS to
10465 grub_off_t, and fix the usage of grub_memset.
10466
10467 * commands/i386/pc/play.c: Include grub/machine/time.h.
10468
10469 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
10470 print FILE->SIZE.
10471
10472 * commands/configfile.c: Include grub/env.h.
10473
10474 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
10475 GRUB_ERRNO directly instead. Change the type of POS to
10476 grub_off_t. Follow the coding standard.
10477
10478 * commands/blocklist.c: Include grub/partition.h.
10479 (grub_cmd_blocklist): Return an error if the underlying device is
10480 not a disk. Take the starting sector of a partition into account,
10481 if a partition is used.
10482
10483 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
10484 a length field.
10485 (lba_mode): Support 64-bit addresses.
10486 (chs_mode): Likewise.
10487 (copy_buffer): Adapted to the new offsets of a length field and a
10488 segment field.
10489 (blocklist_default_start): Allocate 64-bit space.
10490
10491 * boot/i386/pc/boot.S (force_lba): Removed.
10492 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 10493 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 10494 space.
10495 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
10496 is useless.
10497 (lba_mode): Refactored to support a 64-bit address. More size
10498 optimization.
10499 (setup_sectors): Likewise.
10500
53af98ad 105012006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10502
10503 * DISTLIST: Added include/grub/i386/linux.h. Removed
10504 include/grub/i386/pc/linux.h
10505
10506 * configure.ac (AC_INIT): Bumped to 1.94.
10507
10508 * config.guess: Updated from gnulib.
10509 * config.sub: Likewise.
10510 * install-sh: Likewise.
10511 * mkinstalldirs: Likewise.
10512
b4c1940a 105132006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
10514
10515 * conf/common.rmk (grub_modules_init.lst): Depended on
10516 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
10517 MODSRCFILES.
10518
10519 * genmk.rb (PModule::rule): Reverted the previous change.
10520
cfca1cfd 105212006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
10522
10523 * conf/common.rmk (grub_modules_init.lst): Depends on
10524 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
10525 that the target does not exist before producing.
10526 (grub_modules_init.h): Remove the target before generating.
10527 (grub_emu_init.c): Likewise.
10528
10529 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
10530
aa6d7826 105312006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
10532
10533 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
10534 for the target-specific tests. Make sure that we also have the
10535 up-to-date target variables for those tests.
10536
26c607b9 105372006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
10538
10539 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
10540 (PModule::rule): Likewise.
10541
0162321a 105422006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
10543
10544 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
10545 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
10546 target-specific flags should be prefixed.
10547 (PModule::rule): Likewise.
10548
6c826348 105492006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
10550
10551 * configure.ac (CMP): Check if cmp is available explicitly.
10552
b977bf01 105532006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
10554
10555 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
10556 (target_cpu): New variable.
10557 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 10558
b977bf01 10559 * util/i386/pc/grub-install.in (host_cpu): Removed.
10560 (target_cpu): New variable.
10561 (pkglibdir): Use target_cpu instead of host_cpu.
10562
10563 * util/genmoddep.c: Removed.
f19dbdb7 10564
b977bf01 10565 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
10566 instead of GRUB_HOST_SIZEOF_VOID_P.
10567 * kern/dl.c: Likewise.
10568
10569 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
10570 ...
10571 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10572 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10573 (GRUB_TARGET_SIZEOF_LONG): ... this.
10574 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10575 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10576 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10577 to ...
10578 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10579 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10580 (GRUB_TARGET_SIZEOF_LONG): ... this.
10581 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10582 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10583 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10584 to ...
10585 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10586 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10587 (GRUB_TARGET_SIZEOF_LONG): ... this.
10588 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10589 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10590
10591 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
10592 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
10593 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
10594 instead of GRUB_HOST_SIZEOF_LONG.
10595 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
10596 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
10597 GRUB_CPU_WORDS_BIGENDIAN.
10598 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
10599 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
10600 grub_host_ssize_t.
10601
10602 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
10603 (genmoddep_SOURCES): Likewise.
10604 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
10605 (genmoddep_SOURCES): Likewise.
10606 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
10607 (genmoddep_SOURCES): Likewise.
10608 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
10609 Likewise.
10610 (genmoddep_SOURCES): Likewise.
10611
10612 * genmoddep.awk: New file.
10613
10614 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
10615 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
10616 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
10617 (PModule::rule): Likewise.
10618 (Program::rule): Likewise.
10619 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
10620 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
10621 respectively.
10622
10623 * configure.ac: Rewritten intensively to use host and target
10624 instead of build and host, respectively.
10625
10626 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
10627 (host_cpu): Removed.
10628 (target_cpu): New variable.
10629 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
10630 (BUILD_CC): Removed.
10631 (BUILD_CFLAGS): Likewise.
10632 (BUILD_CPPFLAGS): Likewise.
10633 (TARGET_CC): New variable.
10634 (TARGET_CFLAGS): Likewise.
10635 (TARGET_CPPFLAGS): Likewise.
10636 (TARGET_LDFLAGS): Likewise.
10637 (AWK): Likewise.
10638 (include): Use target_cpu instead of host_cpu.
10639 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 10640
b977bf01 10641 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
10642
f09771a1 106432006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
10644
10645 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
10646 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
10647 field 'false' to 'exec_on_false'.
10648 (grub_script_create_cmdif): Renamed argument names to reflect above
10649 changes.
10650
10651 * normal/execute.c (grub_script_execute_cmdif): Likewise.
10652
10653 * normal/script.c (grub_script_create_cmdif): Likewise.
10654
118f4fb3 106552006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
10656
10657 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
10658 top.
10659 (grub_hfsplus_btree_recptr): Likewise.
10660 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
10661 FILEBLOCK both to pass a block number and store next block
10662 number.
10663 (grub_hfsplus_read_block): Rewritten heavily to support an extent
10664 overflow file correctly. Specify errors appropriately, because
10665 fshelp expects that GRUB_ERRNO is set when fails. Reuse
10666 grub_hfsplus_btree_recptr to get the pointer to a found key.
10667 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
10668 is found.
10669
10670 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
10671 linux.mod.
10672 (_linux_mod_SOURCES): New variable.
10673 (_linux_mod_CFLAGS): Likewise.
10674 (_linux_mod_LDFLAGS): Likewise.
10675 (linux_mod_SOURCES): Likewise.
10676 (linux_mod_CFLAGS): Likewise.
10677 (linux_mod_LDFLAGS): Likewise.
10678
10679 * DISTLIST: Added loader/i386/efi/linux.c,
10680 loader/i386/efi/linux_normal.c and
10681 include/grub/i386/efi/loader.h.
10682
10683 * loader/i386/efi/linux.c: New file.
10684 * loader/i386/efi/linux_normal.c: Likewise.
10685 * include/grub/i386/efi/loader.h: Likewise.
10686
89a7d726 106872006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
10688
10689 * commands/blocklist.c: New file.
10690
10691 * DISTLIST: Added commands/blocklist.c.
10692
10693 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 10694 color for the background, and a darker color for the foreground.
89a7d726 10695 (grub_console_checkkey): Return READ_KEY.
10696 (grub_console_cls): Set the background to
10697 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
10698
10699 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
10700
10701 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
10702 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
10703
10704 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
10705 prototype.
10706
10707 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
10708 BG. The spec is wrong again.
10709
10710 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
10711 prototype.
10712 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
10713
10714 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10715 commands/blocklist.c.
10716 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 10717
89a7d726 10718 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
10719 (blocklist_mod_SOURCES): New variable.
10720 (blocklist_mod_CFLAGS): Likewise.
10721 (blocklist_mod_LDFLAGS): Likewise.
10722
75c8f258 107232006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
10724
10725 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
10726 duplication.
10727 (lba_mode): Use %eax more intensively to reduce the code size.
10728
da2eb181 107292006-05-20 Marco Gerards <marco@gnu.org>
10730
10731 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
10732
10733 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
10734 for `menuentry'.
10735 (script): Accept leading newlines.
10736 (newlines): New rule to describe 0 or more newlines.
10737 (commands): Accept `command' with trailing newline. Fixed the
10738 order in which arguments were passed to `grub_script_add_cmd'.
10739 Accept commands separated by newlines.
10740 (function): Changed to accept newlines.
10741 (menuentry) Rewritten.
10742
10743 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
10744 front of the list, instead of to the end.
10745
577b4050 107462006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
10747
10748 * util/i386/pc/grub-install.in (bindir): New variable.
10749 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
10750 Shaver <lbgwjl@gmail.com>.
10751
0d6e1189 107522006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
10753
10754 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
10755 grub/machine/linux.h
10756 * loader/i386/pc/linux.c: Likewise.
10757
10758 * include/grub/i386/pc/linux.h: Moved to ...
10759 * include/grub/i386/linux.h: ... here.
10760
10761 * include/grub/i386/linux.h (struct linux_kernel_params): New
10762 struct.
f19dbdb7 10763
31b86e9f 107642006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
10765
10766 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
10767 checking.
10768 (grub_video_vbe_blit_glyph): Likewise.
10769 (grub_video_vbe_blit_bitmap): Likewise.
10770 (grub_video_vbe_blit_render_target): Likewise.
10771
83b984de 107722006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
10773
10774 * configure.ac (--with-platform): Properly quote the square
10775 brackets.
10776
5f0413bd 107772006-05-08 Marco Gerards <marco@gnu.org>
10778
10779 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
10780 this...
10781 (kernel_elf_HEADERS): ...to this. Updated all users.
10782 (grubof_symlist.c): Renamed from this...
10783 (kernel_elf_symlist.c): ...to this. Updated all users.
10784 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10785 (grubof_SOURCES): Renamed from this...
10786 (kernel_elf_SOURCES): ...to this.
10787 (grubof_HEADERS): Renamed from this...
10788 (kernel_elf_HEADERS): ...to this.
10789 (grubof_CFLAGS): Renamed from this...
10790 (kernel_elf_CFLAGS): ...to this.
10791 (grubof_ASFLAGS): Renamed from this...
10792 (kernel_elf_ASFLAGS): ...to this.
10793 (grubof_LDFLAGS): Renamed from this...
10794 (kernel_elf_LDFLAGS): ...to this.
10795
10796 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
10797 this...
10798 (kernel_elf_HEADERS): ...to this. Updated all users.
10799 (grubof_symlist.c): Renamed from this...
10800 (kernel_elf_symlist.c): ...to this. Updated all users.
10801 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10802 (grubof_SOURCES): Renamed from this...
10803 (kernel_elf_SOURCES): ...to this.
10804 (grubof_HEADERS): Renamed from this...
10805 (kernel_elf_HEADERS): ...to this.
10806 (grubof_CFLAGS): Renamed from this...
10807 (kernel_elf_CFLAGS): ...to this.
10808 (grubof_ASFLAGS): Renamed from this...
10809 (kernel_elf_ASFLAGS): ...to this.
10810 (grubof_LDFLAGS): Renamed from this...
10811 (kernel_elf_LDFLAGS): ...to this.
10812
10813 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
10814 `kernel.elf' instead of `grubof'.
10815
05568c2e 108162006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
10817
10818 Add --with-platform to configure. Use pkglibdir instead of
10819 pkgdatadir. This is reported by Roger Leigh.
10820
10821 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
10822 (host_vendor): Likewise.
10823 (host_os): Likewise.
10824 (pkgdatadir): Likewise.
10825 (platform): New variable.
10826 (pkglibdir): Likewise.
10827 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 10828
05568c2e 10829 * util/i386/pc/grub-install.in (datadir): Removed.
10830 (host_vendor): Likewise.
10831 (host_os): Likewise.
10832 (pkgdatadir): Likewise.
10833 (platform): New variable.
10834 (pkglibdir): Likewise.
10835 Use PKGLIBDIR instead of PKGDATADIR.
10836
10837 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
10838 instead of GRUB_DATADIR.
10839 (main): Likewise.
10840 * util/i386/pc/grub-mkimage.c (usage): Likewise.
10841 (main): Likewise.
10842 * util/i386/efi/grub-mkimage.c (usage): Likewise.
10843 (main): Likewise.
10844
10845 * configure.ac (--with-platform): New option.
10846 Use PLATFORM instead of HOST_VENDOR to specify a platform.
10847
10848 * Makefile.in: Include a makefile based on PLATFORM instead of
10849 HOST_VENDOR.
10850 (pkgdatadir): Not appended by the machine type.
10851 (pkglibdir): Appended by the machine type.
10852 (host_vendor): Removed.
10853 (platform): New variable.
10854 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
10855 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
10856 (uninstall): Likewise.
10857
4e93851c 108582006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
10859
10860 Use the environment context in the menu. Remove the commands
10861 "default" and "timeout", and use variables instead.
f19dbdb7 10862
4e93851c 10863 * normal/menu.c: Include grub/env.h.
10864 (print_entry): Cast TITLE to silence gcc.
10865 (get_timeout): New function.
10866 (set_timeout): Likewise.
10867 (get_entry_number): Likewise.
10868 (run_menu): Use a default entry, a fallback entry and a timeout
10869 in the environment variables "default", "fallback" and
10870 "timeout". Also, tweak the default entry if it is not within the
10871 current menu entries.
10872 (grub_menu_run): Use a fallback entry in the environment variable
10873 "fallback".
10874
10875 * normal/main.c (read_config_file): Do not initialize
10876 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
10877 NEWMENU->TIMEOUT.
10878 (grub_normal_execute): Use a data slot to store the menu.
10879
10880 * include/grub/normal.h (struct grub_menu): Removed default_entry,
10881 fallback_entry and timeout.
10882 (struct grub_menu_list): Removed.
10883 (grub_menu_list_t): Likewise.
10884 (struct grub_context): Likewise.
10885 (grub_context_t): Likewise.
10886 (grub_context_get): Likewise.
10887 (grub_context_get_current_menu): Likewise.
10888 (grub_context_push_menu): Likewise.
10889 (grub_context_pop_menu): Likewise.
10890 (grub_default_init): Likewise.
10891 (grub_default_fini): Likewise.
10892 (grub_timeout_init): Likewise.
10893 (grub_timeout_fini): Likewise.
10894
10895 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
10896 and timeout.mod.
10897 (normal_mod_SOURCES): Removed normal/context.c.
10898
10899 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
10900 commands/default.c, commands/timeout.c and normal/context.c.
10901 (normal_mod_SOURCES): Removed normal/context.c.
10902
10903 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
10904 commands/timeout.c and normal/context.c.
10905 (normal_mod_SOURCES): Removed normal/context.c.
10906
10907 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
10908 commands/default.c, commands/timeout.c and normal/context.c.
10909 (normal_mod_SOURCES): Removed normal/context.c.
10910
10911 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
10912 timeout.mod.
10913 (default_mod_SOURCES): Removed.
10914 (default_mod_CFLAGS): Likewise.
10915 (default_mod_LDFLAGS): Likewise.
10916 (timeout_mod_SOURCES): Removed.
10917 (timeout_mod_CFLAGS): Likewise.
10918 (timeout_mod_LDFLAGS): Likewise.
10919
10920 * DISTLIST: Removed commands/default.c, commands/timeout.c and
10921 normal/context.c.
10922
10923 * commands/default.c: Removed.
10924 * commands/timeout.c: Likewise.
10925 * normal/context.c: Likewise.
10926
1eb9cc1d 109272006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
10928
10929 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
10930
385bd9c1 109312006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
10932
10933 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
10934 "next" to "prev" for readability.
10935 (struct grub_env_sorted_var): New struct.
10936 (grub_env_context): Renamed to ...
10937 (initial_context): ... this.
10938 (grub_env_var_context): Renamed to ...
10939 (current_context): ... this.
10940 (grub_env_find): Look only at CURRENT_CONTEXT.
10941 (grub_env_context_open): Rewritten to copy exported variables from
10942 previous context.
10943 (grub_env_context_close): Rewritten according to the new
10944 scheme. Also, add an assertion to prevent the initial context from
10945 removed.
10946 (grub_env_insert): Removed the code for the sorted list.
10947 (grub_env_remove): Likewise.
10948 (grub_env_export): Simply mark the variable with
10949 GRUB_ENV_VAR_GLOBAL.
10950 (grub_env_set): A cosmetic change for naming consistency.
10951 (grub_env_get): Likewise.
10952 (grub_env_unset): Likewise.
10953 (grub_env_iterate): Rewritten to sort variables within this
10954 function.
10955 (grub_register_variable_hook): Fixed for naming consistency. Call
10956 grub_env_find again, only if NAME is not found at the first time.
10957 (mangle_data_slot_name): New function.
10958 (grub_env_set_data_slot): Likewise.
10959 (grub_env_get_data_slot): Likewise.
10960 (grub_env_unset_data_slot): Likewise.
10961
10962 * include/grub/env.h (grub_env_var_type): New enum.
10963 (GRUB_ENV_VAR_LOCAL): New constant.
10964 (GRUB_ENV_VAR_GLOBAL): Likewise.
10965 (GRUB_ENV_VAR_DATA): Likewise.
10966 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
10967 "type".
10968 (grub_env_set): Replace VAR with NAME for consistency.
10969 (grub_register_variable_hook): Likewise.
10970 (grub_env_export): Specify the name of the argument.
10971 (grub_env_set_data_slot): New prototype.
10972 (grub_env_get_data_slot): Likewise.
10973 (grub_env_unset_data_slot): Likewise.
10974
7f362539 109752006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
10976
10977 Extend the loader so that GRUB can accept a loader which comes
10978 back to GRUB when a loaded image exits. Also, this change adds
10979 support for a chainloader on EFI.
f19dbdb7 10980
7f362539 10981 * term/efi/console.c: Include grub/misc.h.
10982 (grub_console_checkkey): Display a scan code on the top for
10983 debugging. This will be removed once the EFI port gets stable.
10984 Correct the scan code mapping.
10985
10986 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
10987 allocate memory from larger regions, in order to reduce the number
10988 of allocated regions. Otherwise, the MacOSX loader panics.
10989 (filter_memory_map): Avoid less than 1MB for compatibility with
10990 other loaders.
10991 (add_memory_regions): Allocate from the tail of a region, if
10992 possible, to avoid allocating a region near to 1MB, for the MacOSX
10993 loader.
10994
10995 * kern/efi/init.c (grub_efi_set_prefix): Specify
10996 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
10997
10998 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
10999 argument IMAGE_HANDLE and specify it to get a loaded image.
11000 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
11001 grub_efi_get_loaded_image.
fe6b695a 11002 (grub_efi_get_filename): Divide the length by the size of
7f362539 11003 grub_efi_char16_t.
11004 (grub_efi_get_device_path): New function.
11005 (grub_efi_print_device_path): Print End Device Path nodes. Divide
11006 the length by the size of grub_efi_char16_t for a file path device
11007 path node.
11008
11009 * kern/loader.c (grub_loader_noreturn): New variable.
11010 (grub_loader_set): Accept a new argument NORETURN. Set
11011 GRUB_LOADER_NORETURN to NORETURN.
11012 All callers changed.
11013 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
11014 grub_machine_fini.
11015
11016 * include/grub/efi/efi.h (grub_efi_get_device_path): New
11017 prototype.
11018 (grub_efi_get_loaded_image): Take an argument to specify an image
11019 handle.
11020
11021 * include/grub/loader.h (grub_loader_set): Added one more argument
11022 NORETURN.
11023
11024 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
11025 instead of grub_efi_open_protocol.
11026 (grub_efidisk_get_device_name): Likewise.
11027 (grub_efidisk_close): Print a newline.
11028 (grub_efidisk_get_device_handle): Fixed to use
11029 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
11030 GRUB_EFI_DEVICE_PATH_TYPE.
11031
11032 * disk/efi/efidisk.c (device_path_guid): Moved to ...
11033 * kern/efi/efi.c (device_path_guid): ... here.
11034
11035 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11036 chain.mod.
11037 (kernel_mod_HEADERS): Added efi/disk.h.
11038 (_chain_mod_SOURCES): New variable.
11039 (_chain_mod_CFLAGS): Likewise.
11040 (_chain_mod_LDFLAGS): Likewise.
11041 (chain_mod_SOURCES): Likewise.
11042 (chain_mod_CFLAGS): Likewise.
11043 (chain_mod_LDFLAGS): Likewise.
11044
11045 * DISTLIST: Added include/grub/efi/chainloader.h,
11046 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11047
11048 * include/grub/efi/chainloader.h: New file.
11049 * loader/efi/chainloader.c: Likewise.
11050 * loader/efi/chainloader_normal.c: Likewise.
11051
c0111d6e 110522006-04-30 Marco Gerards <marco@gnu.org>
11053
11054 * commands/configfile.c (grub_cmd_source): New function.
11055 (GRUB_MOD_INIT): Register the commands `source' and `.'.
11056 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11057
df5341da 110582006-04-30 Marco Gerards <marco@gnu.org>
11059
11060 * normal/execute.c (grub_script_execute_cmd): Change the return
11061 type to `grub_err_t'. Correctly return the error.
11062 (grub_script_execute_cmdline): In case a command line is not a
11063 command or a function, try to interpret it as an assignment.
11064
f85934bd 110652006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11066
11067 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11068 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11069 skip a node whose name is obviously invalid as UTF-16,
11070 i.e. contains a NUL character. Stop the iteration when the last
11071 directory entry is found. Instead of using the return value of
11072 grub_hfsplus_btree_iterate_node, store the value in RET and use
11073 it, because the iterator can be stopped by the last directory
11074 entry.
11075
8f8a2cf8 110762006-04-30 Marco Gerards <marco@gnu.org>
11077
11078 * include/grub/env.h (grub_env_export): New prototype. Reported
11079 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11080
a27e84ce 110812006-04-30 Marco Gerards <marco@gnu.org>
11082
11083 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11084 size of the extents in a catalog file record.
11085
eaef0553 110862006-04-29 Marco Gerards <marco@gnu.org>
11087
11088 * commands/configfile.c (grub_cmd_configfile): Execute the
11089 configfile within its own context.
11090
11091 * include/grub/env.h (grub_env_context_open): New prototype.
11092 (grub_env_context_close): Likewise.
11093
11094 * kern/env.c (grub_env): Removed.
11095 (grub_env_sorted): Likewise.
11096 (grub_env_context): New variable.
11097 (grub_env_var_context): Likewise.
11098 (grub_env_find): Search both the active context and the global
11099 context.
11100 (grub_env_context_open): New function.
11101 (grub_env_context_close): Likewise.
11102 (grub_env_insert): Likewise.
11103 (grub_env_remove): Likewise.
11104 (grub_env_export): Likewise.
11105 (grub_env_set): Changed to use helper functions to avoid code
11106 duplication.
11107 (grub_env_iterate): Rewritten so both the current context and the
11108 global context are being used.
11109
11110 * normal/command.c (export_command): New function.
11111 (grub_command_init): Register the `export' function.
11112
7b455f4d 111132006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
11114
11115 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11116 explicitly to suppress gcc's warnings.
11117 * fs/fat.c (grub_fat_find_dir): Likewise.
11118 (grub_fat_label): Likewise.
11119 * fs/xfs.c (grub_xfs_read_inode): Likewise.
11120 (grub_xfs_mount): Likewise.
11121 (grub_xfs_label): Likewise.
11122 * fs/affs.c (grub_affs_mount): Likewise.
11123 (grub_affs_label): Likewise.
11124 (grub_affs_iterate_dir): Likewise.
11125 * fs/sfs.c (grub_sfs_mount): Likewise.
11126 (grub_sfs_iterate_dir): Likewise.
11127 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11128 * fs/hfs.c (grub_hfs_mount): Likewise.
11129 (grub_hfs_cmp_catkeys): Likewise.
11130 (grub_hfs_find_dir): Likewise.
11131 (grub_hfs_dir): Likewise.
11132 (grub_hfs_label): Likewise.
11133 * fs/jfs.c (grub_jfs_mount): Likewise.
11134 (grub_jfs_opendir): Likewise.
11135 (grub_jfs_getent): Likewise.
11136 (grub_jfs_lookup_symlink): Likewise.
11137 (grub_jfs_label): Likewise.
11138 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11139 (grub_hfsplus_iterate_dir): Likewise.
11140 (grub_hfsplus_btree_iterate_node): Made static.
11141
11142 * util/grub-emu.c (prefix): New variable.
11143 (grub_machine_set_prefix): New function.
11144 (main): Do not set the environment variable "prefix" here. Only
11145 set PREFIX, which is used later by grub_machine_set_prefix.
11146
11147 * include/grub/video.h: Do not include grub/symbol.h.
11148 (grub_video_register): Not exported. This symbol is not defined in
11149 the kernel.
11150 (grub_video_unregister): Likewise.
11151 (grub_video_iterate): Likewise.
11152 (grub_video_setup): Likewise.
11153 (grub_video_restore): Likewise.
11154 (grub_video_get_info): Likewise.
11155 (grub_video_get_blit_format): Likewise.
11156 (grub_video_set_palette): Likewise.
11157 (grub_video_get_palette): Likewise.
11158 (grub_video_set_viewport): Likewise.
11159 (grub_video_get_viewport): Likewise.
11160 (grub_video_map_color): Likewise.
11161 (grub_video_map_rgb): Likewise.
11162 (grub_video_map_rgba): Likewise.
11163 (grub_video_fill_rect): Likewise.
11164 (grub_video_blit_glyph): Likewise.
11165 (grub_video_blit_bitmap): Likewise.
11166 (grub_video_blit_render_target): Likewise.
11167 (grub_video_scroll): Likewise.
11168 (grub_video_swap_buffers): Likewise.
11169 (grub_video_create_render_target): Likewise.
11170 (grub_video_delete_render_target): Likewise.
11171 (grub_video_set_active_render_target): Likewise.
11172
11173 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11174 Undefined.
11175 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11176
11177 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11178 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11179 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11180 instead of $(srcdir)/genkernsyms.sh.
11181
11182 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11183 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11184 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11185 instead of $(srcdir)/genkernsyms.sh.
11186
11187 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11188 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11189 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11190 instead of $(srcdir)/genkernsyms.sh.
11191
11192 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11193 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11194 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11195 instead of $(srcdir)/genkernsyms.sh.
11196
11197 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11198 genkernsyms.sh.
11199
11200 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11201 genkernsyms.sh.
11202 (gensymlist.sh): New target.
11203 (genkernsyms.sh): Likewise.
11204
11205 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11206 genkernsyms.sh.in and gensymlist.sh.in.
11207
11208 * genkernsyms.sh: Removed.
11209 * gensymlist.sh: Likewise.
f19dbdb7 11210
7b455f4d 11211 * genkernsyms.sh.in: New file.
11212 * gensymlist.sh.in: Likewise.
11213
1885bb27 112142006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11215
11216 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11217 clobber "prefix", since we may have already set it manually.
11218
71538dff 112192006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11220
11221 * kern/misc.c (abort): New alias for grub_abort.
11222
2965c7cc 112232006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
11224
11225 A new machine-specific function "grub_machine_set_prefix" is
11226 defined. This is called after loading modules, so that a prefix
11227 initialization can use modules. Also, this change adds an
11228 intensive debugging feature for the memory manager via the
11229 configure option "--enable-mm-debug".
f19dbdb7 11230
2965c7cc 11231 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11232 PART.LEN.
11233
11234 * kern/sparc64/ieee1275/init.c (abort): Removed.
11235 (grub_stop): Likewise.
11236 (grub_exit): New function.
11237 (grub_set_prefix): Renamed to ...
11238 (grub_machine_set_prefix): ... this.
11239 (grub_machine_init): Do not call grub_set_prefix.
11240
11241 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11242 (grub_machine_set_prefix): ... this.
11243 (grub_machine_init): Do not call grub_set_prefix.
11244
11245 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11246 (grub_machine_init): Do not set the prefix here.
11247
11248 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11249
11250 * kern/efi/init.c: Include grub/mm.h.
11251 (grub_efi_set_prefix): New function.
11252
11253 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11254 (grub_efi_get_filename): New function.
11255 (grub_print_device_path): Renamed to ...
11256 (grub_efi_print_device_path): ... this.
11257
11258 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11259 [MM_DEBUG] (grub_realloc): Likewise.
11260 [MM_DEBUG] (grub_free): Likewise.
11261 [MM_DEBUG] (grub_memalign): Likewise.
11262 [MM_DEBUG] (grub_mm_debug): New variable.
11263 [MM_DEBUG] (grub_debug_malloc): New function.
11264 [MM_DEBUG] (grub_debug_free): New function.
11265 [MM_DEBUG] (grub_debug_realloc): New function.
11266 [MM_DEBUG] (grub_debug_memalign): New function.
11267
11268 * kern/misc.c (grub_abort): Print a newline to distinguish
11269 the message.
11270
11271 * kern/main.c (grub_main): Call grub_machine_set_prefix and
11272 grub_set_root_dev after loading modules. This is necessary when
11273 setting a prefix depends on modules.
11274
11275 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11276 (grub_efi_print_device_path): ... this.
11277 (grub_efi_get_filename): New prototype.
11278 (grub_efi_set_prefix): Likewise.
11279
11280 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11281 and grub/disk.h.
11282 (grub_efidisk_get_device_handle): New prototype.
11283 (grub_efidisk_get_device_name): Likewise.
11284
11285 * include/grub/mm.h: Include config.h.
11286 (MM_DEBUG): Removed.
11287 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11288 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11289 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11290 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11291 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11292 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11293 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11294 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11295 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11296
11297 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11298
11299 * disk/efi/efidisk.c: Include grub/partition.h.
11300 (iterate_child_devices): New function.
11301 (add_device): First, compare only last device path nodes, so that
11302 devices are sorted by the types.
11303 (grub_efidisk_get_device_handle): New function.
11304 (grub_efidisk_get_device_name): Likewise.
11305
11306 * configure.ac (--enable-mm-debug): New option to enable the
11307 memory manager debugging feature. This makes the binary much
11308 bigger, so is disabled by default.
11309
9cacaa17 113102006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
11311
11312 Use grub_abort instead of grub_stop, and grub_exit must be
11313 define in each architecture now. Also, this change adds support
11314 for EFI disks.
f19dbdb7 11315
9cacaa17 11316 * util/i386/pc/grub-probefs.c: Include grub/term.h.
11317 (grub_getkey): New function.
11318 (grub_term_get_current): Likewise.
11319
11320 * util/i386/pc/grub-setup.c: Include grub/term.h.
11321 (grub_getkey): New function.
11322 (grub_term_get_current): Likewise.
11323
11324 * util/misc.c (grub_stop): Renamed to ...
11325 (grub_exit): ... this.
11326
11327 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11328 (grub_exit): ... this.
11329 (grub_machine_init): Use grub_abort instead of abort.
11330 (grub_stop): Removed.
11331
11332 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11333 abort.
11334
11335 * kern/i386/pc/startup.S (grub_exit): New function.
11336 (cold_reboot): New label.
11337
11338 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11339 (grub_efi_init): Call grub_efidisk_init.
11340 (grub_efi_fini): Call grub_efidisk_fini.
11341
11342 * kern/efi/efi.c: Include grub/mm.h.
11343 (grub_efi_console_control_guid): Renamed to ...
11344 (console_control_guid): ... this.
11345 (grub_efi_loaded_image_guid): Renamed to ...
11346 (loaded_image_guid): ... this.
11347 (grub_efi_locate_handle): New function.
11348 (grub_efi_open_protocol): Likewise.
11349 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11350 GRUB_EFI_CONSOLE_CONTROL_GUID.
11351 (grub_efi_exit): Removed.
11352 (grub_stop): Likewise.
11353 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11354 (grub_exit): New function.
11355 (grub_print_device_path): Likewise.
11356
11357 * kern/rescue.c (grub_rescue_cmd_exit): New function.
11358 (grub_enter_rescue_mode): Register "exit".
11359
11360 * kern/misc.c (grub_real_dprintf): A cosmetic change.
11361 (grub_abort): New function.
11362
11363 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
11364
11365 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
11366
11367 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
11368
11369 * include/grub/efi/efi.h (grub_efi_exit): Removed.
11370 (grub_print_device_path): New prototype.
11371 (grub_efi_locate_handle): Likewise.
11372 (grub_efi_open_protocol): Likewise.
11373
11374 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
11375 * disk/efi/efidisk.c: Likewise.
11376
11377 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
11378
11379 * include/grub/efi/console_control.h
11380 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
11381
11382 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
11383 last 8 bytes as an array.
11384 (GRUB_EFI_DISK_IO_GUID): New macro.
11385 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
11386 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
11387 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
11388 grub_uint8_t.
11389 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
11390 (struct grub_efi_device_path): Rename the member "sub_type" to
11391 "subtype".
11392 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
11393 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
11394 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
11395 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11396 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11397 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11398 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11399 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11400 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11401 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11402 (struct grub_efi_pci_device_path): New structure.
11403 (grub_efi_pci_device_path_t): New type.
11404 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11405 (struct grub_efi_pccard_device_path): New structure.
11406 (grub_efi_pccard_device_path_t): New type.
11407 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11408 (struct grub_efi_memory_mapped_device_path): New structure.
11409 (grub_efi_memory_mapped_device_path_t): New type.
11410 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11411 (struct grub_efi_vendor_device_path): New structure.
11412 (grub_efi_vendor_device_path_t): New type.
11413 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
11414 (struct grub_efi_controller_device_path): New structure.
11415 (grub_efi_controller_device_path_t): New type.
11416 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
11417 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
11418 (struct grub_efi_acpi_device_path): New structure.
11419 (grub_efi_acpi_device_path_t): New type.
11420 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
11421 (struct grub_efi_expanded_acpi_device_path): New structure.
11422 (grub_efi_expanded_acpi_device_path_t): New type.
11423 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
11424 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
11425 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
11426 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
11427 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
11428 (struct grub_efi_atapi_device_path): New structure.
11429 (grub_efi_atapi_device_path_t): New type.
11430 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
11431 (struct grub_efi_fibre_channel_device_path): New structure.
11432 (grub_efi_fibre_channel_device_path_t): New type.
11433 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
11434 (struct grub_efi_1394_device_path): New structure.
11435 (grub_efi_1394_device_path_t): New type.
11436 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
11437 (struct grub_efi_usb_device_path): New structure.
11438 (grub_efi_usb_device_path_t): New type.
11439 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
11440 (struct grub_efi_usb_class_device_path): New structure.
11441 (grub_efi_usb_class_device_path_t): New type.
11442 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
11443 (struct grub_efi_i2o_device_path): New structure.
11444 (grub_efi_i2o_device_path_t): New type.
11445 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
11446 (struct grub_efi_mac_address_device_path): New structure.
11447 (grub_efi_mac_address_device_path_t): New type.
11448 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
11449 (struct grub_efi_ipv4_device_path): New structure.
11450 (grub_efi_ipv4_device_path_t): New type.
11451 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
11452 (struct grub_efi_ipv6_device_path): New structure.
11453 (grub_efi_ipv6_device_path_t): New type.
11454 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
11455 (struct grub_efi_infiniband_device_path): New structure.
11456 (grub_efi_infiniband_device_path_t): New type.
11457 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
11458 (struct grub_efi_uart_device_path): New structure.
11459 (grub_efi_uart_device_path_t): New type.
11460 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
11461 (struct grub_efi_vendor_messaging_device_path): New structure.
11462 (grub_efi_vendor_messaging_device_path_t): New type.
11463 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
11464 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
11465 (struct grub_efi_hard_drive_device_path): New structure.
11466 (grub_efi_hard_drive_device_path_t): New type.
11467 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
11468 (struct grub_efi_cdrom_device_path): New structure.
11469 (grub_efi_cdrom_device_path_t): New type.
11470 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
11471 (struct grub_efi_vendor_media_device_path): New structure.
11472 (grub_efi_vendor_media_device_path_t): New type.
11473 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
11474 (struct grub_efi_file_path_device_path): New structure.
11475 (grub_efi_file_path_device_path_t): New type.
11476 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
11477 (struct grub_efi_protocol_device_path): New structure.
11478 (grub_efi_protocol_device_path_t): New type.
11479 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
11480 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
11481 (struct grub_efi_bios_device_path): New structure.
11482 (grub_efi_bios_device_path_t): New type.
11483 (struct grub_efi_disk_io): New structure.
11484 (grub_efi_disk_io_t): New type.
11485 (struct grub_efi_block_io_media): New structure.
11486 (grub_efi_block_io_media_t): New type.
11487 (struct grub_efi_block_io): New structure.
11488 (grub_efi_block_io_t): New type.
11489
11490 * include/grub/misc.h (grub_stop): Removed.
11491 (grub_exit): New prototype.
11492 (grub_abort): Likewise.
11493
11494 * include/grub/disk.h (enum grub_disk_dev_id): Added
11495 GRUB_DISK_DEVICE_EFIDISK_ID.
11496
11497 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
11498 disk/efi/efidisk.c.
11499 (kernel_syms.lst): Remove the target if an error occurs.
11500
49986a9f 115012006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
11502
11503 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
11504 as it was simply too buggy.
11505
970d3b8a 115062006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
11507
11508 * kern/misc.c (grub_lltoa): New function.
11509 (grub_vsprintf): Added support for the long long suffix,
11510 i.e. "ll".
11511
ff04ec24 115122006-04-20 Hollis Blanchard <hollis@penguinppc.org>
11513
11514 * Makefile.in (LDFLAGS): Add variable.
11515 (LD): Remove variable.
11516 * configure.ac: Add -m32 to LDFLAGS.
11517 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
11518 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
11519 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
11520 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
11521 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
11522 variables.
11523 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
11524 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
11525 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
11526
37e5e1a4 115272006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
11528
11529 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
11530 length for unknown glyph.
11531
c352d8dd 115322006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
11533
2eab1c0d 11534 Add support for pre-loaded modules into the EFI port.
f19dbdb7 11535
2eab1c0d 11536 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
11537 completely. Accept one more argument DIR. The caller has changed.
11538
11539 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
11540
11541 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
11542 (grub_efi_loaded_image_guid): New variable.
11543 (grub_efi_get_loaded_image): New function.
11544 (grub_arch_modules_addr): Likewise.
11545
11546 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
11547 prototype.
11548
11549 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
11550 (struct grub_efi_loaded_image): New structure.
11551 (grub_efi_loaded_image_t): New type.
11552
115532006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 11554
c352d8dd 11555 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
11556 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
11557 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
11558
6d01d6b4 115592006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
11560
11561 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
11562
976a4ea0 115632006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
11564
11565 * DISTLIST: Added include/grub/efi/console.h,
11566 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
11567 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11568
11569 * include/grub/efi/console.h: New file.
11570 * include/grub/efi/time.h: Likewise.
11571 * include/grub/i386/efi/kernel.h: Likewise.
11572 * kern/efi/init.c: Likewise.
11573 * kern/efi/mm.c: Likewise.
11574 * term/efi/console.c: Likewise.
f19dbdb7 11575
976a4ea0 11576 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
11577 (grub_stop): Removed.
11578 (grub_get_rtc): Likewise.
11579 (grub_machine_init): Simply call grub_efi_init.
11580 (grub_machine_fini): Call grub_efi_fini.
11581
11582 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
11583 (grub_efi_output_string): Removed.
11584 (grub_efi_stall): New function.
11585 (grub_stop): Likewise.
11586 (grub_get_rtc): Likewise.
11587
11588 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
11589 (grub_efi_stall): New prototype.
11590 (grub_efi_allocate_pages): Likewise.
11591 (grub_efi_free_pages): Likewise.
11592 (grub_efi_get_memory_map): Likewise.
11593 (grub_efi_mm_init): Likewise.
11594 (grub_efi_mm_fini): Likewise.
11595 (grub_efi_init): Likewise.
11596 (grub_efi_fini): Likewise.
11597
11598 * include/grub/i386/efi/time.h: Do not include
11599 grub/symbol.h. Include grub/efi/time.h.
11600 (GRUB_TICKS_PER_SECOND): Removed.
11601 (grub_get_rtc): Likewise.
11602
11603 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
11604 Added padding. The EFI spec is buggy.
11605 (GRUB_EFI_BLACK): New macro.
11606 (GRUB_EFI_BLUE): Likewise.
11607 (GRUB_EFI_GREEN): Likewise.
11608 (GRUB_EFI_CYAN): Likewise.
11609 (GRUB_EFI_RED): Likewise.
11610 (GRUB_EFI_MAGENTA): Likewise.
11611 (GRUB_EFI_BROWN): Likewise.
11612 (GRUB_EFI_LIGHTGRAY): Likewise.
11613 (GRUB_EFI_BRIGHT): Likewise.
11614 (GRUB_EFI_DARKGRAY): Likewise.
11615 (GRUB_EFI_LIGHTBLUE): Likewise.
11616 (GRUB_EFI_LIGHTGREEN): Likewise.
11617 (GRUB_EFI_LIGHTCYAN): Likewise.
11618 (GRUB_EFI_LIGHTRED): Likewise.
11619 (GRUB_EFI_LIGHTMAGENTA): Likewise.
11620 (GRUB_EFI_YELLOW): Likewise.
11621 (GRUB_EFI_WHITE): Likewise.
11622 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
11623 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
11624 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
11625 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
11626 (GRUB_EFI_BACKGROUND_RED): Likewise.
11627 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
11628 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
11629 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
11630 (GRUB_EFI_TEXT_ATTR): Likewise.
11631
11632 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
11633 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11634 (kernel_mod_HEADERS): Added efi/time.h.
11635
83709125 116362006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
11637
11638 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
11639 include/grub/efi/api.h, include/grub/efi/console_control.h,
11640 include/grub/efi/efi.h, include/grub/efi/pe32.h,
11641 include/grub/i386/efi/time.h, kern/efi/efi.c,
11642 kern/i386/efi/init.c, kern/i386/efi/startup.S,
11643 and util/i386/efi/grub-mkimage.c.
11644
11645 * Makefile.in (RMKFILES): Added i386-efi.rmk.
11646
11647 * genmk.rb (PModule#rule): Do not export symbols if
11648 #{prefix}_EXPORTS is set to "no".
11649
11650 * conf/i386-efi.mk: New file.
11651 * conf/i386-efi.rmk: Likewise.
11652 * include/grub/efi/api.h: Likewise.
11653 * include/grub/efi/console_control.h: Likewise.
11654 * include/grub/efi/efi.h: Likewise.
11655 * include/grub/efi/pe32.h: Likewise.
11656 * include/grub/i386/efi/time.h: Likewise.
11657 * kern/efi/efi.c: Likewise.
11658 * kern/i386/efi/init.c: Likewise.
11659 * kern/i386/efi/startup.S: Likewise.
11660 * util/i386/efi/grub-mkimage.c: Likewise.
11661
116622006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 11663
11664 * include/grub/script.h: Include <grub/parser.h> and
11665 "grub_script.tab.h".
11666 (struct grub_lexer_param): New struct.
11667 (struct grub_parser_param): Likewise.
11668 (grub_script_create_arglist): Pass the state in an argument.
11669 (grub_script_add_arglist): Likewise.
11670 (grub_script_create_cmdline): Likewise.
11671 (grub_script_create_cmdblock): Likewise.
11672 (grub_script_create_cmdif): Likewise.
11673 (grub_script_create_cmdmenu): Likewise.
11674 (grub_script_add_cmd): Likewise.
11675 (grub_script_arg_add): Likewise.
11676 (grub_script_lexer_ref): Likewise.
11677 (grub_script_lexer_deref): Likewise.
11678 (grub_script_lexer_record_start): Likewise.
11679 (grub_script_lexer_record_stop): Likewise.
11680 (grub_script_mem_record): Likewise.
11681 (grub_script_mem_record_stop): Likewise.
11682 (grub_script_malloc): Likewise.
11683 (grub_script_yylex): Likewise.
11684 (grub_script_yyparse): Likewise.
11685 (grub_script_yyerror): Likewise.
11686 (grub_script_yylex): Likewise.
11687 (grub_script_lexer_init): Return the state.
11688
11689 * normal/lexer.c (grub_script_lexer_state): Removed variable.
11690 (grub_script_lexer_done): Likewise.
11691 (grub_script_lexer_getline): Likewise.
11692 (grub_script_lexer_refs): Likewise.
11693 (script): Likewise.
11694 (newscript): Likewise.
11695 (record): Likewise.
11696 (recording): Likewise.
11697 (recordpos): Likewise.
11698 (recordlen): Likewise.
11699 (grub_script_lexer_init): Return the state instead of setting
11700 global variables.
11701 (grub_script_lexer_ref): Use the newly added argument for state
11702 instead of globals.
11703 (grub_script_lexer_deref): Likewise.
11704 (grub_script_lexer_record_start): Likewise.
11705 (grub_script_lexer_record_stop): Likewise.
11706 (recordchar): Likewise.
11707 (nextchar): Likewise.
11708 (grub_script_yylex2): Likewise.
11709 (grub_script_yylex): Likewise.
11710 (grub_script_yyerror): Likewise.
11711
11712 * normal/parser.y (func_mem): Removed variable.
11713 (menu_entry): Likewise.
11714 (err): Likewise.
11715 (%lex-param): New parser option.
11716 (%parse-param): Likewise.
11717 (script): Always return the AST.
11718 (argument): Pass the state around.
11719 (arguments): Likewise.
11720 (grubcmd): Likewise.
11721 (commands): Likewise.
11722 (function): Likewise.
11723 (menuentry): Likewise.
11724 (if_statement): Likewise.
11725 (if): Likewise.
11726
11727 * normal/script.c (grub_script_memused): Removed variable.
11728 (grub_script_parsed): Likewise.
11729 (grub_script_malloc): Added a state argument. Use that instead of
11730 global variables.
11731 (grub_script_mem_record): Likewise.
11732 (grub_script_mem_record_stop): Likewise.
11733 (grub_script_arg_add): Likewise.
11734 (grub_script_add_arglist): Likewise.
11735 (grub_script_create_cmdline): Likewise.
11736 (grub_script_create_cmdif): Likewise.
11737 (grub_script_create_cmdmenu): Likewise.
11738 (grub_script_add_cmd): Likewise.
11739 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 11740
e2a8c904 117412006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 11742
11743 * normal/command.c (grub_command_init): Remove the title command.
11744
11745 * normal/lexer.c (grub_script_yylex): Renamed from this...
11746 (grub_script_yylex2): ... to this.
11747 (grub_script_yylex): New function. Temporary
11748 introduced to filter some tokens.
11749 (grub_script_yyerror): Print a newline.
11750
11751 * normal/main.c (read_config_file): Output information about the
11752 lines that contain errors. Wait for a key after all lines have
11753 been processed. Don't return an empty menu.
11754
11755 * normal/parser.y (func_mem): Don't initialize.
11756 (menu_entry): Likewise.
11757 (err): New variable.
11758 (script): Don't return anything when an error was encountered.
11759 (ws, returns): Removed rules.
11760 (argument): Disabled concatenated variable support.
11761 (arguments): Remove explicit separators.
11762 (grubcmd): Likewise.
11763 (function): Likewise.
11764 (menuentry): Likewise.
11765 (if): Likewise.
11766 (commands): Likewise. Add error handling.
11767
11768 * normal/script.c (grub_script_create_cmdline): If
11769 `grub_script_parsed' is 0, assume the parser encountered an error.
11770
c9a86192 117712006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
11772
11773 * configure.ac: Add support for EFI. Fix the typo
11774 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
11775
70f3b243 117762006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11777
11778 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
11779 foreign multibyte characters should be shown correctly.
11780
65f201ad 117812006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11782
11783 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
11784 calculation.
11785 (read_config_file): Made it to close file before returning.
11786
b4b93674 117872006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
11788
11789 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
11790 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
11791 video/i386/pc/vbefill.c.
11792
11793 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
11794 video/i386/pc/vbefill.c.
11795
11796 * include/grub/video.h (grub_video_blit_format): New enum.
11797 (grub_video_mode_info): Added new member blit_format.
11798 (grub_video_get_blit_format): New function prototype.
11799
11800 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
11801 function prototype.
11802 (grub_video_vbe_map_rgb): Likewise.
11803 (grub_video_vbe_unmap_color): Likewise.
11804
11805 * include/grub/i386/pc/vbeblit.h: New file.
11806
11807 * include/grub/i386/pc/vbefill.h: New file.
11808
11809 * video/video.c (grub_video_get_blit_format): New function.
11810 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
11811 (grub_video_vbe_map_rgb): Likewise.
11812 (grub_video_vbe_unmap_color): Likewise.
11813
11814 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
11815 optimized fills.
11816 (grub_video_vbe_blit_render_target): Changed to use more optimized
11817 blits.
11818 (grub_video_vbe_setup): Added detection for optimized settings.
11819 (grub_video_vbe_create_render_target): Likewise.
11820
11821 * video/i386/pc/vbeblit.c: New file.
11822
11823 * video/i386/pc/vbefill.c: New file.
11824
c2379b9c 118252006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
11826
11827 * font/manager.c (grub_font_get_glyph): Removed font fixup from
11828 here...
11829
11830 * util/unifont2pff.rb: ... and moved it to here. Improved argument
11831 parsing to support both hex and dec ranges. If filename was missing
11832 show usage information.
11833
bd0d7896 118342006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
11835
11836 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
11837 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
11838
11839 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
11840 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
11841 (video_mod_SOURCES): Added.
11842 (video_mod_CFLAGS): Likewise.
11843 (video_mod_LDFLAGS): Likewise.
11844 (gfxterm_mod_SOURCES): Likewise.
11845 (gfxterm_mod_CFLAGS): Likewise.
11846 (gfxterm_mod_LDFLAGS): Likewise.
11847 (videotest_mod_SOURCES): Likewise.
11848 (videotest_mod_CFLAGS): Likewise.
11849 (videotest_mod_LDFLAGS): Likewise.
11850 (vesafb_mod_SOURCES): Removed.
11851 (vesafb_mod_CFLAGS): Likewise.
11852 (vesafb_mod_LDFLAGS): Likewise.
11853 (vga_mod_SOURCES): Likewise.
11854 (vga_mod_CFLAGS): Likewise.
11855 (vga_mod_LDFLAGS): Likewise.
11856
11857 * commands/videotest.c: New file.
11858
11859 * font/manager.c (fill_with_default_glyph): Modified to use
11860 grub_font_glyph.
11861 (grub_font_get_glyph): Likewise.
11862 (fontmanager): Renamed from this...
11863 (font_manager): ... to this.
11864
11865 * include/grub/font.h (grub_font_glyph): Added new structure.
11866 (grub_font_get_glyph): Modified to use grub_font_glyph.
11867
11868 * include/grub/misc.h (grub_abs): Added as inline function.
11869
11870 * include/grub/video.h: New file.
11871
11872 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
11873 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
11874 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
11875 (grub_vbe_get_controller_info): Renamed from this...
11876 (grub_vbe_bios_get_controller_info): ... to this.
11877 (grub_vbe_get_mode_info): Renamed from this...
11878 (grub_vbe_bios_get_mode_info): ... to this.
11879 (grub_vbe_set_mode): Renamed from this...
11880 (grub_vbe_bios_set_mode): ... to this.
11881 (grub_vbe_get_mode): Renamed from this...
11882 (grub_vbe_bios_get_mode): ... to this.
11883 (grub_vbe_set_memory_window): Renamed from this...
11884 (grub_vbe_bios_set_memory_window): ... to this.
11885 (grub_vbe_get_memory_window): Renamed from this...
11886 (grub_vbe_bios_get_memory_window): ... to this.
11887 (grub_vbe_set_scanline_length): Renamed from this...
11888 (grub_vbe_set_scanline_length): ... to this.
11889 (grub_vbe_get_scanline_length): Renamed from this...
11890 (grub_vbe_bios_get_scanline_length): ... to this.
11891 (grub_vbe_set_display_start): Renamed from this...
11892 (grub_vbe_bios_set_display_start): ... to this.
11893 (grub_vbe_get_display_start): Renamed from this...
11894 (grub_vbe_bios_get_display_start): ... to this.
11895 (grub_vbe_set_palette_data): Renamed from this...
11896 (grub_vbe_bios_set_palette_data): ... to this.
11897 (grub_vbe_set_pixel_rgb): Removed.
11898 (grub_vbe_set_pixel_index): Likewise.
11899
11900 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
11901 from this...
11902 (grub_vbe_bios_get_controller_info): ... to this.
11903 (grub_vbe_get_mode_info): Renamed from this...
11904 (grub_vbe_bios_get_mode_info): ... to this.
11905 (grub_vbe_set_mode): Renamed from this...
11906 (grub_vbe_bios_set_mode): ... to this.
11907 (grub_vbe_get_mode): Renamed from this...
11908 (grub_vbe_bios_get_mode): ... to this.
11909 (grub_vbe_set_memory_window): Renamed from this...
11910 (grub_vbe_bios_set_memory_window): ... to this.
11911 (grub_vbe_get_memory_window): Renamed from this...
11912 (grub_vbe_bios_get_memory_window): ... to this.
11913 (grub_vbe_set_scanline_length): Renamed from this...
11914 (grub_vbe_set_scanline_length): ... to this.
11915 (grub_vbe_get_scanline_length): Renamed from this...
11916 (grub_vbe_bios_get_scanline_length): ... to this.
11917 (grub_vbe_set_display_start): Renamed from this...
11918 (grub_vbe_bios_set_display_start): ... to this.
11919 (grub_vbe_get_display_start): Renamed from this...
11920 (grub_vbe_bios_get_display_start): ... to this.
11921 (grub_vbe_set_palette_data): Renamed from this...
11922 (grub_vbe_bios_set_palette_data): ... to this.
11923 (grub_vbe_bios_get_controller_info): Fixed problem with registers
11924 getting corrupted after calling it. Added more pushes and pops.
11925 (grub_vbe_bios_set_mode): Likewise.
11926 (grub_vbe_bios_get_mode): Likewise.
11927 (grub_vbe_bios_get_memory_window): Likewise.
11928 (grub_vbe_bios_set_scanline_length): Likewise.
11929 (grub_vbe_bios_get_scanline_length): Likewise.
11930 (grub_vbe_bios_get_display_start): Likewise.
11931 (grub_vbe_bios_set_palette_data): Likewise.
11932
11933 * normal/cmdline.c (cl_set_pos): Refresh the screen.
11934 (cl_insert): Likewise.
11935 (cl_delete): Likewise.
11936
11937 * term/gfxterm.c: New file.
11938
11939 * term/i386/pc/vesafb.c: Removed file.
11940
11941 * video/video.c: New file.
11942
11943 * video/i386/pc/vbe.c (real2pm): Added new function.
11944 (grub_video_vbe_draw_pixel): Likewise.
11945 (grub_video_vbe_get_video_ptr): Likewise.
11946 (grub_video_vbe_get_pixel): Likewise
11947 (grub_video_vbe_init): Likewise.
11948 (grub_video_vbe_fini): Likewise.
11949 (grub_video_vbe_setup): Likewise.
11950 (grub_video_vbe_get_info): Likewise.
11951 (grub_video_vbe_set_palette): Likewise.
11952 (grub_video_vbe_get_palette): Likewise.
11953 (grub_video_vbe_set_viewport): Likewise.
11954 (grub_video_vbe_get_viewport): Likewise.
11955 (grub_video_vbe_map_color): Likewise.
11956 (grub_video_vbe_map_rgb): Likewise.
11957 (grub_video_vbe_map_rgba): Likewise.
11958 (grub_video_vbe_unmap_color): Likewise.
11959 (grub_video_vbe_fill_rect): Likewise.
11960 (grub_video_vbe_blit_glyph): Likewise.
11961 (grub_video_vbe_blit_bitmap): Likewise.
11962 (grub_video_vbe_blit_render_target): Likewise.
11963 (grub_video_vbe_scroll): Likewise.
11964 (grub_video_vbe_swap_buffers): Likewise.
11965 (grub_video_vbe_create_render_target): Likewise.
11966 (grub_video_vbe_delete_render_target): Likewise.
11967 (grub_video_vbe_set_active_render_target): Likewise.
11968 (grub_vbe_set_pixel_rgb): Remove function.
11969 (grub_vbe_set_pixel_index): Likewise.
11970 (index_color_mode): Remove static variable.
11971 (active_mode): Likewise.
11972 (framebuffer): Likewise.
11973 (bytes_per_scan_line): Likewise.
11974 (grub_video_vbe_adapter): Added new static variable.
11975 (framebuffer): Likewise.
11976 (render_target): Likewise.
11977 (initial_mode): Likewise.
11978 (mode_in_use): Likewise.
11979 (mode_list): Likewise.
11980
5f97350b 119812006-03-10 Marco Gerards <marco@gnu.org>
11982
11983 * configure.ac (AC_INIT): Bumped to 1.93.
11984
11985 * DISTLIST: Added `include/grub/hfs.h'.
11986
a3c5c6f8 119872006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
11988
11989 * boot/i386/pc/boot.S (general_error): Before looping, try INT
11990 18H, which might help the BIOS falling back to next boot media.
11991
6de53d26 119922006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
11993
11994 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
11995 Poe Chen <poe.poechen@gmail.com>.
11996
77c4a393 119972006-01-17 Marco Gerards <marco@gnu.org>
11998
11999 * include/grub/normal.h: Include <grub/script.h>.
12000 (grub_command_list): Removed struct.
12001 (grub_command_list_t): Removed type.
12002 (grub_menu_entry): Remove members `num' and `command_list'. Add
12003 members `commands' and `sourcecode'.
12004 * include/grub/script.h: Add inclusion guards.
12005 (grub_script_cmd_menuentry): New struct.
12006 (grub_script_execute_menuentry): New prototype.
12007 (grub_script_lexer_record_start): Likewise.
12008 (grub_script_lexer_record_stop): Likewise.
12009 * normal/execute.c (grub_script_execute_menuentry): New function.
12010 * normal/lexer.c (record, recording, recordpos, recordlen): New
12011 variables.
12012 (grub_script_lexer_record_start): New function.
12013 (grub_script_lexer_record_stop): Likewise.
12014 (recordchar): Likewise.
12015 (nextchar): Likewise.
12016 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
12017 2048 as the buffer size. Add the tokens `menuentry' and `@'.
12018 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
12019 (current_menu): New variable.
12020 (free_menu): Mainly rewritten.
12021 (grub_normal_menu_addentry): New function.
12022 (read_config_file): Rewritten.
12023 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 12024 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 12025 the menu entry.
12026 (run): Mainly rewritten.
12027 * normal/parser.y (menu_entry): New variable.
12028 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
12029 (menuentry): New rule.
12030 (command): Add `menuentry'.
12031 (if_statement): Allow additional returns before `fi'.
12032 * normal/script.c (grub_script_create_cmdmenu): New function.
12033
144f1f98 120342006-01-03 Marco Gerards <marco@gnu.org>
12035
12036 * INSTALL: GNU Bison is required.
12037 * configure.ac: Rewritten the test to detect Bison.
12038 * Makefile.in (YACC): New variable. Reported by Xun Sun
12039 <xun.sun.cn@gmail.com>.
12040
af4b2d89 120412006-01-03 Marco Gerards <marco@gnu.org>
12042
12043 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12044 the HFS+ filesystem to filesystem blocks.
12045 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12046 GCC warning is silenced.
12047
15643b71 120482006-01-03 Marco Gerards <marco@gnu.org>
12049
12050 * partmap/apple.c (apple_partition_map_iterate): Convert the data
12051 read from disk from big endian to host byte order.
12052
00905879 120532006-01-03 Hollis Blanchard <hollis@penguinppc.org>
12054
12055 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
12056 documentation.
12057 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12058 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12059 embedded HFS+ filesystem.
12060 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12061 (grub_hfs_sblock): Move from here...
12062 * include/grub/hfs.h: To here... New file.
12063 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
12064 documentation.
12065 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12066 New macros.
12067 (grub_hfsplus_volheader): Change type of member `magic' to
12068 `grub_uint16_t'.
12069 (grub_hfsplus_data): Add new member `embedded_offset'.
12070 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12071 returned block.
12072 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12073 Calculate the offset.
12074
8899bc3e 120752005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12076
12077 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12078 Removed.
12079 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12080
ae8c0277 120812005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12082
12083 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12084 ENV->NAME is NULL after allocating ENV->VALUE.
12085
07084456 120862005-12-25 Marco Gerards <marco@gnu.org>
12087
12088 * kern/env.c (grub_env_set): Rewritten the error handling code.
12089
4750f5f1 120902005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12091
12092 * geninit.sh: Made more robust, and more portable.
12093
50214199 120942005-12-25 Marco Gerards <marco@gnu.org>
12095
12096 Add support for Apple HFS+ filesystems.
f19dbdb7 12097
50214199 12098 * fs/hfsplus.c: New file.
12099
12100 * DISTLIST: Added `fs/hfsplus.c'.
12101
12102 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12103 (hfsplus_mod_SOURCES): New variable.
12104 (hfsplus_mod_CFLAGS): Likewise.
12105 (hfsplus_mod_LDFLAGS): Likewise.
12106 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12107 (grub_setup_SOURCES): Likewise.
12108 (grub_mkdevicemap_SOURCES): Likewise.
12109 (grub_emu_SOURCES): Likewise.
12110 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12111
12112 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12113
12114 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12115
befaed6c 121162005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12117
12118 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12119 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12120 include/grub/parser.h, include/grub/script.h, kern/parser.c,
12121 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12122 normal/lexer.c, normal/parser.y, normal/script.c, and
12123 partmap/gpt.c.
12124 Removed kern/sparc64/cache.c.
12125
12126 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12127 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12128 grub_emu_init.c.
12129
12130 * configure.ac (AC_INIT): Bumped to 1.92.
12131
6a124103 121322005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
12133
12134 * kern/err.c (grub_error_push): Added new function to support error
12135 stacks.
12136 (grub_error_pop): Likewise.
12137 (grub_error_stack_items): New local variable to support error stacks.
12138 (grub_error_stack_pos): Likewise.
12139 (grub_error_stack_assert): Likewise.
12140 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12141 stack depth.
12142 (grub_print_error): Added support to print errors from error stack.
12143
12144 * include/grub/err.h (grub_error_push): Added function prototype.
12145 (grub_error_pop): Likewise.
12146
be973c1b 121472005-12-09 Hollis Blanchard <hollis@penguinppc.org>
12148
12149 * configure.ac: Accept `powerpc64' as host_cpu.
12150 (amd64): Rename to `biarch32'.
12151
12152 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12153 non-cacheline-aligned addresses.
12154
12155 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12156 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
12157 if `size' is non-zero.
12158
b04216ab 121592005-12-03 Marco Gerards <mgerards@xs4all.nl>
12160
12161 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12162 and `cd' to make sure the filename is not prefixed with a
12163 directory name.
12164 (pkgdata_MODULES): Add `gpt.mod'.
12165 (gpt_mod_SOURCES): New variable.
12166 (gpt_mod_CFLAGS): Likewise.
12167 (gpt_mod_LDFLAGS): Likewise.
12168
12169 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12170
12171 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12172 New macro.
12173
12174 * partmap/gpt.c: New file.
12175
12176 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12177 GPT partition map is detected.
12178
41730ed9 121792005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
12180
12181 * commands/i386/pc/play.c: New file.
12182 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12183 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12184 macros.
f19dbdb7 12185
95dc3643 121862005-11-27 Marco Gerards <mgerards@xs4all.nl>
12187
12188 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12189 ((unused))' to silence gcc warning.
12190
1569ec51 121912005-11-26 Hollis Blanchard <hollis@penguinppc.org>
12192
12193 * configure.ac: Correct `AC_PROG_YACC' test.
12194
9abde152 121952005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12196
12197 * util/powerpc/ieee1275/grub-install.in: Run the mount point
12198 check before installing files.
12199
44b83271 122002005-11-22 Mike Small <smallm@panix.com>
12201
12202 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12203 number regex so multidigit numbers are recognized correctly.
12204
122052005-11-22 Mike Small <smallm@panix.com>
12206
12207 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12208 debugging message before attempting to claim memory.
12209 (grub_rescue_cmd_initrd): Add a claim debugging message and try
12210 multiple addresses in case of failure.
12211
9c12956b 122122005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12213
12214 * term/tparm.c (get_space): Remove empty `if' statement.
12215
12216 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12217
12218 * kern/parser.c (check_varstate): Rename `state' to 's'.
12219
aeaf81d9 122202005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12221
12222 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
12223 variable definitions to the beginning of each function. Sort stack
12224 variables by size.
12225 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
12226 `buf' argument to `char *'.
12227
79bbb63f 122282005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12229
12230 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12231 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 12232 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 12233 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12234 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12235 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12236 configfile.mod, search.mod, gzio.mod and test.mod.
12237 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12238 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12239 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12240 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12241 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12242 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12243 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12244 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12245 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12246 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12247 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12248 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12249 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12250 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12251 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12252 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12253 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12254 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12255 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12256 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12257 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12258 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12259 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12260
12261 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12262 `grep --include'.
12263 (pkgdata_MODULES): Add test.mod.
12264
233b1628 122652005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12266
12267 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
12268 appending to variables with "+=".
12269 (PModule): Use full pathname to generate *.lst filenames.
12270
12271 * Makefile.in: Fixed list rules moved from genmk.rb.
12272 (.DELETE_ON_ERROR): New special target.
12273 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12274
12275 * conf/i386-pc.rmk: Include conf/common.mk.
12276 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 12277 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 12278 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12279 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12280 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12281 configfile.mod, search.mod, gzio.mod and test.mod.
12282 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12283 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12284 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12285 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12286 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12287 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12288 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12289 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12290 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12291 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12292 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12293 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12294 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12295 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12296 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12297 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12298 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12299 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12300 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12301 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12302 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12303 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12304 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12305 here...
12306 * conf/common.rmk: ... to here. New file.
12307
12308 * conf/common.mk: New file.
12309
16f820c8 123102005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
12311
12312 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12313 (grub_script.tab.c): ... here.
12314
12315 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12316 (grub_script.tab.c): ... here.
12317
12318 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12319 (grub_script.tab.c): ... here.
12320
12321 * normal/command.c (grub_command_find): Fixed a memory leak of
12322 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12323
63ba1554 123242005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12325
12326 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12327 "@" which marks the start of a comment on ARM.
12328 (VARIABLE): Likewise.
12329
7f67dc13 123302005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12331
79bbb63f 12332 Add support for Linux/ADFS partition tables.
7f67dc13 12333
12334 * partmap/acorn.c: New file.
12335
12336 * include/grub/acorn_filecore.h: Likewise.
12337
12338 * DISTLIST: Added `partmap/acorn.c' and
12339 `include/grub/acorn_filecore.h'.
f19dbdb7 12340
7f67dc13 12341 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12342 `partmap/acorn.c'.
12343 (pkgdata_MODULES): Add `acorn.mod'.
12344 (acorn_mod_SOURCES): New variable.
12345 (acorn_mod_CFLAGS): Likewise.
12346
12347 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12348 `partmap/acorn.c'.
12349 (pkgdata_MODULES): Add `acorn.mod'.
12350 (acorn_mod_SOURCES): New variable.
12351 (acorn_mod_CFLAGS): Likewise.
12352
12353 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12354 (pkgdata_MODULES): Add `acorn.mod'.
12355 (acorn_mod_SOURCES): New variable.
12356 (acorn_mod_CFLAGS): Likewise.
12357 (acorn_mod_LDFLAGS): Likewise.
12358
12359 * include/types.h (grub_disk_addr_t): New typedef.
12360
6d099807 123612005-11-13 Marco Gerards <mgerards@xs4all.nl>
12362
12363 * geninit.sh: New file.
12364
12365 * geninitheader.sh: Likewise.
12366
12367 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
12368 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
12369 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
12370 * commands/configfile.c (grub_configfile_init)
12371 (grub_configfile_fini): Likewise.
12372 * commands/default.c (grub_default_init, grub_default_fini):
12373 Likewise.
12374 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
12375 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
12376 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
12377 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
12378 Likewise.
12379 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
12380 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
12381 Likewise.
12382 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 12383 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 12384 Likewise.
12385 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
12386 Likewise.
fe6b695a 12387 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 12388 Likewise.
12389 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
12390 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
12391 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
12392 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
12393 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
12394 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
12395 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12396 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12397 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12398 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12399 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12400 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12401 * partmap/amiga.c (grub_amiga_partition_map_init)
12402 (grub_amiga_partition_map_fini): Likewise.
12403 * partmap/apple.c (grub_apple_partition_map_init)
12404 (grub_apple_partition_map_fini): Likewise.
12405 * partmap/pc.c (grub_pc_partition_map_init)
12406 (grub_pc_partition_map_fini): Likewise.
12407 * partmap/sun.c (grub_sun_partition_map_init,
12408 grub_sun_partition_map_fini): Likewise.
12409 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12410 Likewise.
12411
12412 * util/grub-emu.c: Include <grub_modules_init.h>.
12413 (main): Don't initialize and de-initialize any modules directly,
12414 use `grub_init_all' and `grub_fini_all' instead.
12415
12416 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
12417 `grub_vesafb_mod_init'.
12418 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
12419 all users.
12420 * term/i386/pc/vga.c (grub_vga_init): Renamed to
12421 `grub_vga_mod_init'. Updated all users.
12422 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 12423
6d099807 12424 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
12425 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
12426 rules.
12427
12428 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
12429 Generate a function to initialize the module in utilities.
12430 Updated all callers.
12431 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
12432 initialize the module in utilities. Updated all callers.
12433
9046bcf0 124342005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12435
12436 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
12437 escape sequence and a literal ^L to clear the screen.
12438
12439 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
12440 when returning from Open Firmware.
12441
d13ea639 124422005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12443
12444 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
12445 (grub_ofconsole_height): Likewise.
12446 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
12447 manually insert a '\n'.
12448 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
12449 `grub_ofconsole_height'. Return early if these are already set.
12450
a8fcf206 124512005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
12452
12453 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12454 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
12455 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
12456 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
12457 and `normal/script.c'.
12458 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12459 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12460 (test_mod_SOURCES): New variable.
12461 (test_mod_CFLAGS): Likewise.
12462 (test_mod_LDFLAGS): Likewise.
12463 (pkgdata_MODULES): Add `test.mod'.
12464 (grub_script.tab.c): New rule.
12465 (grub_script.tab.h): Likewise.
12466
b6b32745 124672005-11-07 Marco Gerards <mgerards@xs4all.nl>
12468
12469 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12470 `commands/test.c', `normal/execute.c', `normal/lexer.c',
12471 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12472 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12473 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12474 (test_mod_SOURCES): New variable.
12475 (test_mod_CFLAGS): Likewise.
12476 (pkgdata_MODULES): Add `test.mod'.
12477 (grub_script.tab.c): New rule.
12478 (grub_script.tab.h): Likewise.
12479
daac212a 124802005-11-06 Marco Gerards <mgerards@xs4all.nl>
12481
12482 Add initial scripting support.
12483
12484 * commands/test.c: New file.
12485 * include/grub/script.h: Likewise.
12486 * normal/execute.c: Likewise.
12487 * normal/function.c: Likewise.
12488 * normal/lexer.c: Likewise.
12489 * normal/parser.y: Likewise.
12490 * normal/script.c: Likewise.
12491
12492 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 12493
daac212a 12494 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
12495 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
12496 `normal/function.c' and `normal/script.c'.
12497 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12498 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 12499 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
12500 variables.
daac212a 12501 (pkgdata_MODULES): Add `test.mod'.
12502 (grub_script.tab.c): New rule.
12503 (grub_script.tab.h): Likewise.
12504
12505 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
12506
12507 * include/grub/normal.h (grub_test_init): New prototype.
12508 (grub_test_fini): Likewise.
f19dbdb7 12509
daac212a 12510 * normal/command.c: Include <grub/script.h>.
12511 (grub_command_execute): Rewritten.
f19dbdb7 12512
daac212a 12513 * util/grub-emu.c (main): Call `grub_test_init' and
12514 `grub_test_fini'.
12515
77500b2b 125162005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12517
12518 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
12519 to 0.
12520 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
12521 there are no pending characters.
12522
e45deb9e 125232005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12524
12525 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
12526 `grub_strndup' to drop device arguments. Replace unnecessary
12527 `grub_strndup' with `grub_strdup'.
12528
4ce32619 125292005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12530
12531 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
12532 `debug' environment variable has been set.
12533
125342005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 12535
4ce32619 12536 * Makefile.in (install-local): Use $(DATA).
12537 (uninstall): Likewise.
12538 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
12539 (sbin_UTILITIES): ... to here.
12540 (sbin_SCRIPTS): New variable.
12541 (grub_install_SOURCES): New variable.
12542 * util/powerpc/ieee1275/grub-install.in: New file.
12543 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
12544 variable.
12545 (add_segments): Call `grub_util_get_path'.
12546
25fe6f03 125472005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
12548
12549 From Timothy Baldwin:
12550 * commands/ls.c (grub_ls_list_files): Close FILE with
12551 grub_file_close.
12552 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
12553
04ccf3ec 125542005-10-24 Marco Gerards <mgerards@xs4all.nl>
12555
12556 * include/grub/parser.h: New file.
12557
12558 * kern/parser.c: Likewise.
12559
12560 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
12561 (grub_setup_SOURCES): Likewise.
12562 (grub_probefs_SOURCES): Likewise.
12563 (grub_emu_SOURCES): Likewise.
12564 (kernel_img_HEADERS): Add `parser.h'.
12565
12566 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12567 (grub_emu_SOURCES): Add `kern/parser.c'.
12568 (grubof_SOURCES): Likewise.
12569
12570 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12571 (grubof_SOURCES): Add `kern/parser.c'.
12572
12573 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
12574
12575 * kern/misc.c (grub_split_cmdline): Removed function.
12576
12577 * kern/rescue.c: Include <grub/parser.h>.
12578 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
12579 of `grub_split_cmdline'.
12580
12581 * normal/command.c: Include <grub/parser.h>.
12582 (grub_command_execute): Use `grub_parser_split_cmdline' instead
12583 of `grub_split_cmdline'.
12584
12585 * normal/completion.c: Include <grub/parser.h>.
12586 (cmdline_state): New variable.
12587 (iterate_dir): End the filename with a quote depending on the
12588 command line state.
12589 (get_state): new function.
12590 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
12591 split the arguments and determine the current argument. When the
12592 argument string is not quoted, escape all spaces.
12593
6d8f4b0e 125942005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12595
12596 * normal/sparc64/setjmp.S: New file.
12597
15cf03ed 125982005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12599
12600 * include/grub/sparc64/libgcc.h: New file.
12601 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
12602 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
12603 normal/sparc64/setjmp.c.
12604
03e8661a 126052005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12606
12607 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
12608 * kern/sparc64/cache.S: New file.
12609 * kern/sparc64/cache.c: Removed.
12610 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
12611 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
12612 -mtune=ultrasparc.
12613 (COMMON_LDFLAGS): Add -melf64_sparc.
12614 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
12615 (grubof_SOURCES): Use cache.S instead of cache.c.
12616 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
12617 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
12618 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
12619 commented though.
12620 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
12621 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
12622 (linux_mod_CFLAGS): Commented out.
12623 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
12624 out because module isn't built.
12625 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
12626 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
12627 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
12628 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
12629 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
12630 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12631 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12632 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
12633 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
12634 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
12635 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12636 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12637 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
12638 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
12639
34eeec8a 126402005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
12641
12642 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
12643 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
12644 longer, because HFS should not be used on PC.
12645
708367a3 126462005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12647
12648 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
12649 consistently within the loop.
12650
6fa1251a 126512005-10-15 Marco Gerards <mgerards@xs4all.nl>
12652
12653 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
12654 directory can not be read.
12655
4801580b 126562005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12657
12658 * configure.ac (AC_INIT): Increase the version number to 1.91.
12659
12660 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
12661 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
12662 term/i386/pc/serial.c.
12663
219ad426 126642005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12665
12666 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
12667 file size must be permitted.
12668
12669 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
12670 between %ah and %al.
12671
688e5699 126722005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12673
12674 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
12675 grub_uint64_t.
12676 Call the hook with a NUL-terminated filename.
12677 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
12678 grub_cpu_to_be32.
12679
12680 * kern/term.c (cursor_state): New variable.
12681 (grub_term_set_current): Reset the cursor state on a new
12682 terminal.
12683 (grub_setcursor): Rewritten to use CURSOR_STATE.
12684 (grub_getcursor): New function.
12685
12686 * include/grub/term.h (grub_getcursor): New prototype.
12687
12688 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
12689 integers on ARM. Reported by Timothy Baldwin
12690 <T.E.Baldwin99@members.leeds.ac.uk>.
12691
bb34586c 126922005-10-11 Marco Gerards <mgerards@xs4all.nl>
12693
12694 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
12695 allocated.
12696 (grub_sfs_dir): Likewise.
12697
9a909877 126982005-10-09 Marco Gerards <mgerards@xs4all.nl>
12699
12700 Add support for the SFS filesystem.
12701
12702 * fs/sfs.c: New file.
12703
12704 * DISTLIST: Added `fs/sfs.c'.
12705
12706 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
12707 (grub_probefs_SOURCES): Likewise.
12708 (grub_emu_SOURCES): Likewise.
12709 (pkgdata_MODULES): Add `sfs.mod'.
12710 (sfs_mod_SOURCES): New variable.
12711 (sfs_mod_CFLAGS): Likewise.
12712 (sfs_mod_LDFLAGS): Likewise.
12713
12714 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
12715 (pkgdata_MODULES): Add `sfs.mod'.
12716 (sfs_mod_SOURCES): New variable.
12717 (sfs_mod_CFLAGS): Likewise.
12718
12719 * util/grub-emu.c (main): Call `grub_sfs_init' and
12720 `grub_sfs_fini'.
12721
12722 * include/grub/fs.h (grub_sfs_init): New prototype.
12723 (grub_sfs_fini): Likewise.
12724
57bdbde3 127252005-10-07 Marco Gerards <mgerards@xs4all.nl>
12726
12727 Add support for the AFFS filesystem.
12728
12729 * fs/affs.c: New file.
12730
12731 * DISTLIST: Added `fs/affs.c'.
12732
12733 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
12734 (grub_probefs_SOURCES): Likewise.
12735 (grub_emu_SOURCES): Likewise.
12736 (pkgdata_MODULES): Add `affs.mod'.
12737 (affs_mod_SOURCES): New variable.
12738 (affs_mod_CFLAGS): Likewise.
12739 (affs_mod_LDFLAGS): Likewise.
12740
12741 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
12742 (pkgdata_MODULES): Add `affs.mod'.
12743 (affs_mod_SOURCES): New variable.
12744 (affs_mod_CFLAGS): Likewise.
12745
12746 * util/grub-emu.c (main): Call `grub_affs_init' and
12747 `grub_affs_fini'.
12748
12749 * include/grub/fs.h (grub_affs_init): New prototype.
12750 (grub_affs_fini): Likewise.
12751
047b67e0 127522005-10-01 Marco Gerards <mgerards@xs4all.nl>
12753
12754 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
12755
59b8208a 127562005-10-01 Marco Gerards <mgerards@xs4all.nl>
12757
12758 * configure.ac: Accept `x86_64' as host_cpu. In that case add
12759 `-m32' to CFLAGS.
12760
12761 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
12762 linking.
f19dbdb7 12763
59b8208a 12764 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
12765 (COMMON_LDFLAGS): New variable.
12766 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
12767 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
12768 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
12769 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
12770 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
12771 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
12772 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
12773 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
12774 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
12775 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
12776 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12777 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12778 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
12779 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
12780 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
12781 variables.
12782 (normal_mod_ASFLAGS): Add `-m32'.
12783
12784 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
12785 (grub_host_size_t, grub_host_ssize_t): New types.
12786 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 12787 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 12788 `GRUB_HOST_SIZEOF_VOID_P'.
12789
12790 * include/grub/kernel.h (struct grub_module_header): Type of
12791 member offset changed to `grub_host_off_t'. Type of member size
12792 changed to `grub_host_size_t'.
12793 (struct grub_module_info): Type of member offset changed to
12794 `grub_host_off_t'. Type of member size changed to
12795 `grub_host_size_t'.
12796
b4093103 127972005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
12798
12799 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 12800
b4093103 12801 * kern/i386/pc/startup.S (multiboot_header): New label.
12802 (multiboot_entry): Likewise.
12803 (multiboot_trampoline): Likewise.
12804
12805 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12806 Increased to 0x4A0.
12807
12808 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
12809 put parentheses after a question mark.
12810 [!GRUB_UTIL] (my_mod): New variable.
12811
12812 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
12813
b2499b29 128142005-09-28 Marco Gerards <mgerards@xs4all.nl>
12815
12816 Adds support for the XFS filesystem. Btrees are not supported
12817 yet.
12818
12819 * fs/xfs.c: New file.
12820
12821 * DISTLIST: Added `fs/xfs.c'.
12822
12823 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
12824 (grub_probefs_SOURCES): Likewise.
12825 (grub_emu_SOURCES): Likewise.
12826 (pkgdata_MODULES): Add `xfs.mod'.
12827 (xfs_mod_SOURCES): New variable.
12828 (xfs_mod_CFLAGS): Likewise.
12829
12830 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
12831 (pkgdata_MODULES): Add `xfs.mod'.
12832 (xfs_mod_SOURCES): New variable.
12833 (xfs_mod_CFLAGS): Likewise.
12834
12835 * util/grub-emu.c (main): Call `grub_xfs_init' and
12836 `grub_xfs_fini'.
12837
12838 * include/grub/fs.h (grub_xfs_init): New prototype.
12839 (grub_xfs_fini): Likewise.
12840
f19dbdb7 12841
83d37a62 128422005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
12843
12844 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
12845 color modes, allow greater than 16 colors to be configured as
12846 a default palette.
12847
47d2d65e 128482005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
12849
12850 * normal/completion.c (complete_arguments): Add the qualifier
12851 const into OPTIONS.
12852
12853 From Omniflux <omniflux+lists@omniflux.com>:
12854 * include/grub/terminfo.h: New file.
12855 * include/grub/tparm.h: Likewise.
12856 * include/grub/i386/pc/serial.h: Likewise.
12857 * term/terminfo.c: Likewise.
12858 * term/tparm.c: Likewise.
12859 * term/i386/pc/serial.c: Likewise.
12860 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
12861 serial.mod.
12862 (terminfo_mod_SOURCES): New variable.
12863 (terminfo_mod_CFLAGS): Likewise.
12864 (serial_mod_SOURCES): Likewise.
12865 (serial_mod_CFLAGS): Likewise.
12866
48b671ff 128672005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
12868
12869 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
12870 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
12871 and kern/powerpc/ieee1275/cmain.c, respectively.
12872
12873 * boot/powerpc/ieee1275/crt0.S: Moved to ...
12874 * kern/powerpc/ieee1275/crt0.S: ... here.
12875
12876 * boot/powerpc/ieee1275/cmain.c: Moved to ...
12877 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 12878
48b671ff 12879 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
12880 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
12881 instead of boot/powerpc/ieee1275/crt0.S and
12882 boot/powerpc/ieee1275/cmain.c, respectively.
12883
12884 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
12885 sectors. It was not used anyway.
12886
09fc77a7 128872005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12888
12889 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
12890 `unused parameter' warning.
12891
003789c7 128922005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12893
12894 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
12895 function.
12896 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
12897 getcharwidth.
12898
67f44c86 128992005-08-28 Marco Gerards <metgerards@student.han.nl>
12900
12901 * include/grub/normal.h (enum grub_completion_type): Added
12902 `GRUB_COMPLETION_TYPE_ARGUMENT'.
12903
12904 * normal/cmdline.c (print_completion): Handle
12905 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
12906 * normal/menu_entry.c (store_completion): Likewise.
12907
12908 * normal/completion.c (complete_arguments): New function.
12909 (grub_normal_do_completion): Call `complete_arguments' when the
12910 current words start with a dash.
12911
0b5abe02 129122005-08-27 Marco Gerards <metgerards@student.han.nl>
12913
12914 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
12915 `gzio.mod' instead of `io.mod').
12916
d9864ee1 129172005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
12918
12919 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
12920 (DISTDIRS): Added io and video.
12921 Rewrite the search routine to make an output consistently.
12922
12923 * DISTLIST: Added conf/sparc64-ieee1275.mk,
12924 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
12925 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
12926 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
12927 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
12928 util/powerpc/ieee1275/misc.c.
f19dbdb7 12929
d9864ee1 12930 * include/grub/gzio.h: New file.
12931 * io/gzio.c: Likewise.
f19dbdb7 12932
d9864ee1 12933 * kern/file.c (grub_file_close): Call grub_device_close only if
12934 FILE->DEVICE is not NULL.
12935
12936 * include/grub/mm.h [!NULL] (NULL): New macro.
12937
12938 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
12939
12940 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
12941 (pkgdata_MODULES): Added gzio.mod.
12942 (gzio_mod_SOURCES): New variable.
12943 (gzio_mod_CFLAGS): Likewise.
12944
12945 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
12946 (pkgdata_MODULES): Added gzio.mod.
12947 (gzio_mod_SOURCES): New variable.
12948 (gzio_mod_CFLAGS): Likewise.
12949
12950 * commands/cat.c: Include grub/gzio.h.
12951 (grub_cmd_cat): Use grub_gzfile_open instead of
12952 grub_file_open.
f19dbdb7 12953
d9864ee1 12954 * commands/cmp.c: Include grub/gzio.h.
12955 (grub_cmd_cmp): Use grub_gzfile_open instead of
12956 grub_file_open.
12957
12958 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
12959 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
12960 grub_file_open.
12961 (grub_rescue_cmd_module): Likewise.
12962
fa46f4b5 129632005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12964
12965 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
12966 kern/sparc64/ieee1275/init.c because it contains _start.
12967 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
12968
e9211b5d 129692005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12970
12971 * configure.ac: Add support for sparc64 host with ieee1275
12972 firmware.
12973 * configure: Generated from configure.ac.
12974 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
12975 instead of int.
12976 (grub_ofdisk_read): Likewise.
12977 (grub_ofdisk_open): Use %p to print pointer values, and cast the
12978 pointers as (void *) to remove a warning.
12979 (grub_ofdisk_close): Likewise.
12980 (grub_ofdisk_read): Likewise.
12981 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
12982 returns, so make it return void to remove a warning.
12983 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
12984 Corresponding prototype change.
12985 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
12986 values, and cast the pointers as (void *) to remove a warning.
12987 (grub_mm_dump): Likewise.
12988 * conf/sparc64-ieee1275.mk: New file.
12989 * conf/sparc64-ieee1275.rmk: Likewise.
12990 * include/grub/sparc64/setjmp.h: Likewise.
12991 * include/grub/sparc64/types.h: Likewise.
12992 * include/grub/sparc64/ieee1275/console.h: Likewise.
12993 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12994 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12995 * include/grub/sparc64/ieee1275/time.h: Likewise.
12996 * kern/sparc64/cache.c: Likewise.
12997 * kern/sparc64/dl.c: Likewise.
12998 * kern/sparc64/ieee1275/init.c: Likewise.
12999 * kern/sparc64/ieee1275/openfw.c: Likewise.
13000
385c6a92 130012005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13002
13003 * util/console.c (grub_ncurses_putchar): If C is greater than
13004 0x7f, set C to a question mark.
13005 (grub_ncurses_getcharwidth): New function.
13006 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
13007 getcharwidth.
13008
13009 * normal/menu.c (print_entry): Made aware of Unicode. First,
13010 convert TITLE to UCS-4, and predict the cursor position by
13011 grub_getcharwidth.
13012
13013 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
13014 const to SRC.
13015 * kern/misc.c (grub_utf16_to_utf8): Likewise.
13016
16ccb8b1 130172005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13018
13019 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
13020 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13021 grub_strcat.
13022
13023 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
13024 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
13025 grub_strcpy and grub_strlen. Take it into account that a space
13026 character is inserted as a delimiter.
13027
6a85ce79 130282005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13029
13030 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 13031 invalid magic in the error.
6a85ce79 13032
13033 * commands/search.c: New file.
f19dbdb7 13034
6a85ce79 13035 * util/grub-emu.c (main): Call grub_search_init and
13036 grub_search_fini.
13037
13038 * kern/rescue.c (grub_rescue_print_disks): Removed.
13039 (grub_rescue_print_devices): New function.
13040 (grub_rescue_cmd_ls): Use grub_device_iterate with
13041 grub_rescue_print_devices instead of grub_disk_dev_iterate with
13042 grub_rescue_print_disks.
13043
13044 * kern/partition.c (grub_partition_iterate): Return the result of
13045 PARTMAP->ITERATE instead of GRUB_ERRNO.
13046
13047 * kern/device.c: Include grub/partition.h.
13048 (grub_device_iterate): New function.
13049
13050 * include/grub/partition.h (grub_partition_iterate): Return int
13051 instead of grub_err_t.
13052
13053 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13054 prototype.
13055 [GRUB_UTIL] (grub_search_fini): Likewise.
13056
13057 * include/grub/device.h (grub_device_iterate): New prototype.
13058
13059 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13060 commands/search.c.
13061 (pkgdata_MODULES): Added search.mod.
13062 (search_mod_SOURCES): New variable.
13063 (search_mod_CFLAGS): Likewise.
13064
13065 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13066 (pkgdata_MODULES): Added search.mod.
13067 (search_mod_SOURCES): New variable.
13068 (search_mod_CFLAGS): Likewise.
13069
13070 * commands/ls.c (grub_ls_list_disks): Renamed to ...
13071 (grub_ls_list_devices): ... this, and use grub_device_iterate.
13072 All callers changed.
13073
13074 * DISTLIST: Added commands/search.c.
13075
ef095434 130762005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13077
13078 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13079 conversion.
13080 (grub_getcharwidth): New function.
13081
13082 * kern/misc.c (grub_utf8_to_ucs4): New function.
13083
13084 * include/grub/term.h (struct grub_term): Added a new member
13085 "getcharwidth".
13086 (grub_getcharwidth): New prototype.
13087
13088 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13089
13090 * term/i386/pc/console.c (map_char): New function. Segregated from
13091 grub_console_putchar.
13092 (grub_console_putchar): Use map_char.
13093 (grub_console_getcharwidth): New function.
13094 (grub_console_term): Specified grub_console_getcharwidth as
13095 getcharwidth.
13096
13097 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13098 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13099
13100 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13101 GRUB_ERRNO.
13102 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13103 on grub_strtoul completely.
13104 (write_char): Declare local variables in the beginning of the
13105 function.
13106 (grub_vesafb_getcharwidth): New function.
13107 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13108 getcharwidth.
13109
1f0a95e4 131102005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
13111
13112 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13113 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13114 commands/i386/pc/vbetest.c.
13115
13116 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13117 call grub_vbe_get_controller_info again, because the returned
13118 information is volatile.
13119 (grub_vbe_set_video_mode): Mostly rewritten.
13120 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13121 grub_vbe_status_t correctly.
13122 (grub_vbe_get_video_mode_info): Likewise.
13123 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13124 several if statements.
13125
13126 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13127 * commands/i386/pc/vbeinfo.c: ... this.
13128
13129 * commands/i386/pc/vbe_test.c: Renamed to ...
13130 * commands/i386/pc/vbetest.c: ... this.
13131
13132 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13133 ...
13134 (grub_cmd_vbeinfo): ... this. Save video modes before
13135 iterating. Skip a video mode, if it is not available, not enough
13136 information is given or it is monochrome. Show the memory
13137 model. Leave the interpretation of MODEVAR to grub_strtoul
13138 completely.
13139 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13140 (GRUB_MOD_FINI): Likewise.
13141
13142 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13143 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13144 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13145 duplicated grub_env_get. Leave the interpretation of MODEVAR to
13146 grub_strtoul completely.
13147 (real2pm): Removed.
13148 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13149 (GRUB_MOD_FINI): Likewise.
13150
13151 * normal/misc.c: Include grub/mm.h.
13152
13153 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13154 vbe_list_modes with vbetest.mod and vbeinfo.mod.
13155 (vbe_list_modes_mod_SOURCES): Removed.
13156 (vbe_list_modes_mod_CFLAGS): Likewise.
13157 (vbe_test_mod_SOURCES): Likewise.
13158 (vbe_test_mod_CFLAGS): Likewise.
13159 (vbeinfo_mod_SOURCES): New variable.
13160 (vbeinfo_mod_CFLAGS): Likewise.
13161 (vbetest_mod_SOURCES): Likewise.
13162 (vbetest_mod_CFLAGS): Likewise.
13163
992ffbbe 131642005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
13165
13166 * normal/misc.c: New file.
13167
13168 * DISTLIST: Added normal/misc.c.
f19dbdb7 13169
992ffbbe 13170 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13171 DISK to HOOK. Call HOOK with DISK.
13172 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13173 * partmap/pc.c (pc_partition_map_iterate): Likewise.
13174 * partmap/sun.c (sun_partition_map_iterate): Likewise.
13175
13176 * normal/menu_entry.c (struct screen): Added a new member
13177 "completion_shown".
13178 (completion_buffer): New global variable.
13179 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13180 (store_completion): New function.
13181 (complete): Likewise.
13182 (clear_completions): Likewise.
13183 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13184 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13185 a tab, call complete.
13186
13187 * normal/completion.c (disk_dev): Removed.
13188 (print_simple_completion): Likewise.
13189 (print_partition_completion): Likewise.
13190 (print_func): New global variable.
13191 (add_completion): Do not take the arguments WHAT or PRINT any
13192 longer. Added a new argument TYPE. Instead of printing directly,
13193 call PRINT_FUNC if not NULL.
13194 All callers changed.
13195 (complete_device): Use a local variable DEV instead of
13196 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13197 (grub_normal_do_completion): Take a new argument HOOK. Do not
13198 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13199 empty string, return NULL instead.
13200 All callers changed.
13201
13202 * normal/cmdline.c (print_completion): New function.
13203
13204 * kern/partition.c (grub_partition_iterate): Add an argument DISK
13205 to HOOK.
13206 All callers changed.
13207
13208 * kern/disk.c (grub_print_partinfo): Removed.
13209
13210 * include/grub/partition.h (struct grub_partition_map): Add a new
13211 argument DISK into HOOK of ITERATE.
13212 (grub_partition_iterate): Add a new argument DISK to HOOK.
13213
13214 * include/grub/normal.h (enum grub_completion_type): New enum.
13215 (grub_completion_type_t): New type.
13216 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13217 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13218 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13219 (GRUB_COMPLETION_TYPE_FILE): Likewise.
13220 (grub_normal_do_completion): Added a new argument HOOK.
13221 (grub_normal_print_device_info): New prototype.
13222
13223 * include/grub/disk.h (grub_print_partinfo): Removed.
13224
13225 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13226 (normal_mod_SOURCES): Likewise.
13227 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13228 (normal_mod_SOURCES): Likewise.
13229
13230 * commands/ls.c (grub_ls_list_disks): Use
13231 grub_normal_print_device_info instead of grub_print_partinfo. Free
13232 PNAME.
13233 (grub_ls_list_files): Use grub_normal_print_device_info instead of
13234 duplicating the code.
13235
0bd41162 132362005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13237
13238 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 13239 follow GCS more precisely.
13240 * commands/i386/pc/vbe_test.c: Likewise.
13241 * include/grub/i386/pc/vbe.h: Likewise.
13242 * term/i386/pc/vesafb.c: Likewise.
13243 * video/i386/pc/vbe.c: Likewise.
0bd41162 13244
6323696a 132452005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13246
13247 * DISTLIST: Added term/i386/pc/vesafb.c
13248 DISTLIST: Added video/i386/pc/vbe.c
13249 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13250 DISTLIST: Added commands/i386/pc/vbe_test.c.
13251 * commands/i386/pc/vbe_list_modes.c: New file.
13252 * commands/i386/pc/vbe_test.c: Likewise.
13253 * term/i386/pc/vesafb.c: Likewise.
13254 * video/i386/pc/vbe.c: Likewise.
13255 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13256 (grub_vbe_probe) Added prototype.
13257 (grub_vbe_set_video_mode) Likewise.
13258 (grub_vbe_get_video_mode) Likewise.
13259 (grub_vbe_get_video_mode_info) Likewise.
13260 (grub_vbe_set_pixel_rgb) Likewise.
13261 (grub_vbe_set_pixel_index) Likewise.
13262 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13263 (pkgdata_MODULES): Added vesafb.mod.
13264 (pkgdata_MODULES): Added vbe_list_modes.mod.
13265 (pkgdata_MODULES): Added vbe_test.mod.
13266 (vbe_mod_SOURCES): Added.
13267 (vbe_mod_CFLAGS): Likewise.
13268 (vesafb_mod_SOURCES): Likewise.
13269 (vesafb_mod_CFLAGS): Likewise.
13270 (vbe_list_modes_mod_SOURCES): Likewise.
13271 (vbe_list_modes_mod_CFLAGS): Likewise.
13272 (vbe_test_mod_SOURCES): Likewise.
13273 (vbe_test_mod_CFLAGS): Likewise.
13274
0a74e62f 132752005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
13276
0a74e62f 13277 * normal/command.c (grub_command_execute): If INTERACTIVE is
13278 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13279 CMDLINE. Disable the pager if INTERACTIVE is true.
13280 All callers are changed.
13281
13282 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13283 before reading a config file.
13284 * normal/main.c (read_config_file): Even if a command is not
13285 found, register it if it is within an entry.
13286
13287 * util/grub-emu.c: Include sys/types.h and unistd.h.
13288 (options): Added --hold.
13289 (struct arguments): Added a new member "hold".
13290 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13291 missing.
13292 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13293 cleared by a debugger, if it is not zero.
13294
13295 * include/grub/normal.h (grub_command_execute): Add an argument
13296 INTERACTIVE.
13297
e51f85ae 132982005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
13299
13300 * DISTLIST: Added include/grub/i386/pc/vbe.h.
13301
e9c6f39b 133022005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
13303
13304 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13305 program with another one, because the old one didn't detect a bug
13306 in gcc-3.4. Always use regparm 2, because the new test is still
13307 not enough for gcc-4.0. Someone must investigate a simple test
13308 case which detects a bug in gcc-4.0.
13309
8de3495c 133102005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
13311
13312 * DISTLIST: Added normal/completion.c.
13313
13314 * normal/completion.c: New file.
f19dbdb7 13315
8de3495c 13316 * term/i386/pc/console.c (grub_console_getwh): New function.
13317 (grub_console_term): Assign grub_console_getwh to getwh.
13318
13319 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13320 function is defined in normal/completion.c as
13321 grub_normal_do_completion.
13322 (grub_cmdline_get): Use grub_normal_do_completion instead of
13323 grub_tab_complete.
13324
13325 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13326 returns non-zero, otherwise return 0.
13327 (grub_partition_iterate): First, probe the partition map. Then,
13328 call ITERATE only for this partition map.
13329
13330 * kern/misc.c (grub_strncmp): Rewritten.
13331
13332 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13333 returns non-zero. Otherwise return 0.
13334
13335 * include/grub/partition.h (grub_partition_map_iterate): Return
13336 int instead of void.
13337
13338 * include/grub/normal.h (grub_normal_do_completion): New prototype.
13339
13340 * include/grub/misc.h (grub_strncmp): Change the type of N to
13341 grub_size_t.
13342
13343 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13344 of void.
13345
13346 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 13347 unsigned explicitly before comparing it with I.
8de3495c 13348
13349 * kern/main.c (grub_env_write_root): Add the attribute unused into
13350 VAR.
13351
13352 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13353 normal/completion.c.
13354 (normal_mod_SOURCES): Likewise.
13355 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13356 (normal_mod_SOURCES): Likewise.
13357
13358 * normal/command.c (grub_iterate_commands): If ITERATE returns
13359 non-zero, return one immediately.
13360
e85e144b 133612005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
13362
13363 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
13364 * kern/i386/pc/startup.S: Updated Global Descriptor table's
13365 descriptions.
13366 (grub_vbe_get_controller_info): New function.
13367 (grub_vbe_get_mode_info): Likewise.
13368 (grub_vbe_set_mode): Likewise.
13369 (grub_vbe_get_mode): Likewise.
13370 (grub_vbe_set_memory_window): Likewise.
13371 (grub_vbe_get_memory_window): Likewise.
13372 (grub_vbe_set_scanline_length): Likewise.
13373 (grub_vbe_get_scanline_length): Likewise.
13374 (grub_vbe_set_display_start): Likewise.
13375 (grub_vbe_get_display_start): Likewise.
13376 (grub_vbe_set_palette_data): Likewise.
13377 * include/grub/i386/pc/vbe.h: New file.
13378
c46153d2 133792005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13380
13381 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13382 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
13383 * DISTLIST: Likewise.
13384 * kern/ieee1275/of.c: Moved to ...
13385 * kern/ieee1275/ieee1275.c: ... here.
13386
0cb90c45 133872005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13388
13389 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
13390 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
13391 Pass 0 as `end' parameter to grub_strtoul().
13392
a19fb360 133932005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13394
13395 * include/grub/powerpc/ieee1275/console.h: Do not include
13396 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
13397 ifdef.
13398 (grub_console_cur_color): Remove i386-specific prototype.
13399 (grub_console_real_putchar): Likewise.
13400 (grub_console_checkkey): Likewise.
13401 (grub_console_getkey): Likewise.
13402 (grub_console_getxy): Likewise.
13403 (grub_console_gotoxy): Likewise.
13404 (grub_console_cls): Likewise.
13405 (grub_console_setcursor): Likewise.
13406 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13407 Include <grub/machine/console.h>.
13408 * term/ieee1275/ofconsole.c: Likewise.
13409
4ac9bd04 134102005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
13411
13412 * Makefile.in (LIBLZO): New variable.
13413
13414 * configure.ac: Check for LZO version 2.
13415
13416 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
13417 lzo/lzo1x.h instead of lzo1x.h.
13418
13419 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
13420 of -llzo.
13421
13422 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
13423 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
13424
13425 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
13426 copying the data from PARTITION to P.
13427
f4917dfd 134282005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13429
13430 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
13431 negative, unload the module.
13432
13433 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
13434 map is "pc_partition_map" but not "pc".
13435 (usage): Fix the description. The options are --boot-image and
13436 --core-image but not --boot-file or --core-file.
13437 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
13438 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
13439 DEFAULT_DIRECTORY.
13440
13441 * util/i386/pc/grub-install.in: Do not specify --boot-file or
13442 --core-file. Specify INSTALL_DEVICE as an argument.
13443
13444 * util/console.c: Include config.h.
13445 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
13446 [HAVE_NCURSES_H]: Include ncurses.h.
13447 [HAVE_CURSES_H]: Include curses.h.
13448 [!A_NORMAL] (A_NORMAL): Defined as zero.
13449 [!A_STANDOUT] (A_STANDOUT): Likewise.
13450
13451 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
13452 -lncurses.
13453 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
13454
13455 * configure.ac: Check for curses libraries and headers.
13456
13457 * Makefile.in (LIBCURSES): New variable.
13458
13459 * genmk.rb (Script::rule): Set the executable bits.
13460
13461 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
13462 name of the PC partition map is "pc_partition_map" but not "pc".
13463
0e143073 134642005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13465
13466 * util/i386/pc/grub-install.in (grub_probefs): New variable.
13467 (modules): Likewise.
13468 (usage): Added descriptions for --modules and --grub-probefs.
13469 Handle --modules and --grub-probefs. Save the arguments in MODULES
13470 and GRUB_PROBEFS, respectively.
13471 Auto-detect a filesystem module against GRUBDIR. If the result is
13472 empty and modules are not specified explicitly, abort the
13473 installation. Add the result to MODULES.
13474
13475 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
13476 disk/powerpc/ieee1275/ofdisk.c,
13477 include/grub/powerpc/ieee1275/init.h and
13478 term/powerpc/ieee1275/ofconsole.c.
13479 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
13480 term/ieee1275/ofconsole.c.
13481
13482 * include/grub/powerpc/ieee1275/console.h: Resurrected.
13483
13484 * COPYING: Upgraded to the latest version. Only the address of the
13485 FSF office has changed.
f19dbdb7 13486
efd6e6d5 134872005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13488
13489 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13490 kern/ieee1275.c with kern/ieee1275/of.c.
13491
13492 * kern/ieee1275.c: Moved to ...
13493 * kern/ieee1275/of.c: ... here.
13494
8ceafda2 134952005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
13496
13497 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 13498 readability.
8ceafda2 13499
13500 * config.guess: Updated to the latest version from gnulib.
13501 * config.sub: Likewise.
13502 * install.sh: Likewise.
13503 * mkinstalldirs: Likewise.
13504
13505 * include/grub/console.h: Removed. This file is arch-specific. Do
13506 not put this in include/grub.
13507
13508 * include/grub/i386/pc/console.h: Resurrected.
13509
13510 * util/console.c: Include grub/machine/console.h instead of
13511 grub/console.h.
13512 * util/grub-emu.c: Likewise.
13513
267f6cd9 135142005-08-04 Marco Gerards <metgerards@student.han.nl>
13515
13516 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
13517 hardcoded value.
f19dbdb7 13518
267f6cd9 13519 From Vincent Pelletier <subdino2004@yahoo.fr>
13520 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
13521 Redefined to use grub_getwh.
13522 (grub_term): New member named getwh.
13523 (grub_getwh): New prototype.
13524 * kern/term.c (grub_getwh): New function.
13525 * term/i386/pc/console.c (grub_console_getwh): New function.
13526 (grub_console_term): New member `getwh'.
13527 * term/i386/pc/vga.c (grub_vga_getwh): New function.
13528 (grub_vga_term): New member `getwh'.
0b5abe02 13529 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 13530 grub_ssize_t.
13531 (grub_ofconsole_getw): New function.
13532 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
13533 (grub_ofconsole_term): New field named getwh and new initial
13534 value.
13535
3be7266d 135362005-08-03 Hollis Blanchard <hollis@penguinppc.org>
13537
13538 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
13539 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
13540 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
13541 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
13542 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
13543 of <grub/machine/ieee1275.h>.
13544 * commands/ieee1275/reboot.c: Likewise.
13545 * boot/powerpc/ieee1275/ieee1275.c: Move ...
13546 * kern/ieee1275.c: ... to here. All users updated. Change all
13547 parameter structs to use new type `grub_ieee1275_cell_t'.
13548 * term/powerpc/ieee1275/ofconsole.c: Move ...
13549 * term/ieee1275/ofconsole.c: ... to here. All users updated.
13550 * disk/powerpc/ieee1275/ofdisk.c: Move ...
13551 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
13552 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
13553 to return int.
13554 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
13555 Remove unused prototypes. All users updated.
13556 * include/grub/powerpc/ieee1275/console.h: Removed.
13557 * include/grub/powerpc/ieee1275/ieee1275.h: Define
13558 `grub_ieee1275_cell_t'.
13559 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
13560 Cast comparisons with -1 to the correct type.
13561 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
13562 type to match `grub_ieee1275_entry_fn'.
13563
8b5f3938 135642005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
13565
13566 * DISTLIST: Added util/i386/pc/grub-probefs.c.
13567
13568 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
13569 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
13570 partmap/sun.c.
13571 (grub_probefs_SOURCES): New variable.
13572
13573 * util/i386/pc/grub-probefs.c: New file.
13574
13575 * util/i386/pc/grub-setup.c (main): Call
13576 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
13577 grub_hfs_init and grub_jfs_init to initialize the system. Call
13578 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
13579 grub_pc_partition_map_fini to finish the system.
13580
ea409713 135812005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
13582
13583 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
13584 function.
13585 (grub_multiboot_load_elf32): Likewise.
13586 (grub_multiboot_is_elf64): Likewise.
13587 (grub_multiboot_load_elf64): Likewise.
13588 (grub_multiboot_load_elf): Likewise.
13589 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
13590 an ELF32 or ELF64 file.
13591 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
13592
13593 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
13594 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
13595 NULL before calling FS->LABEL.
13596 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
13597 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
13598 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
13599 before calling FS->LABEL.
13600
141a288b 136012005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
13602
13603 * util/i386/pc/grub-install.in (datadir): New variable.
13604 (libdir): Removed.
13605 (pkgdatadir): New variable.
13606 (pkglibdir): Removed.
13607
0d5f8a54 136082005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
13609
13610 * DISTLIST: Added util/i386/pc/grub-install.in.
13611
13612 * util/i386/pc/grub-install.in: New file.
13613
13614 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
13615 (grub_install_SOURCES): Likewise.
13616
13617 * genmk.rb: Added support for scripts.
13618 (Script): New class.
13619 (scripts): New variable.
13620
13621 * Makefile.in (install-local): Install sbin_SCRIPTS by
13622 INSTALL_SCRIPT.
13623 (uninstall): Remove sbin_SCRIPTS.
13624
13625 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
13626 device, try to get a GRUB device by
13627 grub_util_biosdisk_get_grub_dev.
13628 Free DEST_DEV.
13629
13630 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
13631 description for --device-map.
13632
5f968e1e 136332005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13634
13635 Change the semantics of variable hooks. They now return strings
13636 instead of error values.
f19dbdb7 13637
5f968e1e 13638 * util/i386/pc/grub-setup.c: Include grub/env.h.
13639 (setup): Use grub_device_set_root instead of grub_env_set.
13640
13641 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
13642 grub_env_get instead of grub_device_set_root and
13643 grub_device_get_root, respectively.
13644
13645 * kern/main.c (grub_env_write_root): New function.
13646 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
13647 grub_env_set instead of grub_device_set_root.
13648
13649 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
13650 many variables.
13651 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
13652 rather than calling ENV->WRITE_HOOK afterwards.
13653 (grub_env_get): Return the result of ENV->READ_HOOK rather than
13654 passing a pointer of a pointer.
13655 (grub_register_variable_hook): Change the types of "read_hook" and
13656 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
13657 respectively.
13658 Allocate the default empty string on the heap, because this string
13659 may be freed later.
13660
13661 * kern/device.c: Include grub/env.h.
13662 (grub_device_set_root): Removed.
13663 (grub_device_get_root): Likewise.
13664 (grub_device_open): Use grub_env_get instead of
13665 grub_device_get_root.
13666
13667 * include/grub/env.h (grub_env_read_hook_t): New type.
13668 (grub_env_write_hook_t): Likewise.
13669 (grub_env_var): Change the types of "read_hook" and "write_hook"
13670 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
13671 (grub_register_variable_hook): Likewise.
13672
13673 * include/grub/device.h (grub_device_set_root): Removed.
13674 (grub_device_set_root): Likewise.
13675
13676 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
13677 make sure that DIRNAME terminates with '/', so that
13678 grub_fat_find_dir will fail if PATH is not a directory.
13679
13680 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
13681 from DIRNAME.
13682 Use the qualifier auto for print_files and print_files_long.
13683 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
13684 as a regular file.
13685 Put a newline only if there is no error.
13686 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
13687 used.
13688
896f0afd 136892005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13690
13691 * kern/partition.c (grub_partition_probe): Initialize PART to
13692 NULL. Otherwise, when no partition map is registered, this returns
13693 a garbage.
13694
b28b81b2 136952005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
13696
13697 * partmap/apple.c (apple_partition_map_iterate): Check if POS
13698 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
13699 valid.
13700
5f3607e0 137012005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
13702
13703 * commands/ls.c (grub_ls_list_disks): Print the filesystem
13704 information on each device, if it does not have partitions. Print
13705 "Device" instead of "Disk", because this function is not specific
13706 to disk devices.
13707
13708 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
13709 static to ensure that it is put on the memory rather than a
13710 register.
13711
502c87e8 137122005-07-17 Yoshinori Okuji <okuji@enbug.org>
13713
13714 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
13715 (grub_cat_init): Likewise.
13716 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
13717 (options): Likewise.
13718 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
13719 (grub_configfile_init): Likewise.
13720 * font/manager.c (GRUB_MOD_INIT): Likewise.
13721 * commands/help.c (GRUB_MOD_INIT): Likewise.
13722 (grub_help_init): Likewise.
13723 * normal/command.c (grub_command_init): Likewise.
13724 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
13725 * disk/loopback.c (grub_loop_init): Likewise.
13726 (GRUB_MOD_INIT): Likewise.
13727 * commands/ls.c (grub_ls_init): Likewise.
13728 (GRUB_MOD_INIT): Likewise.
13729 (options): Likewise.
13730 * commands/boot.c (grub_boot_init): Likewise.
13731 (GRUB_MOD_INIT): Likewise.
13732 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
13733 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
13734 (GRUB_MOD_INIT): Likewise.
13735 * commands/cmp.c (grub_cmp_init): Likewise.
13736 (GRUB_MOD_INIT): Likewise.
13737
13738 * normal/arg.c: Use <> instead of "" to include header files.
13739 (SHORT_ARG_HELP): New macro.
13740 (SHORT_ARG_USAGE): Likewise.
13741 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
13742 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
13743 descriptions.
13744 (find_short): Check if C is 'h' or 'u' explicitly.
13745 (grub_arg_show_help): Use space characters instead of tabs. Treat
13746 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
13747 are shown with --help and --usage only if they are not used for
13748 the command itself.
13749 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
13750 'h' and 'u'.
13751
13752 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
13753 const into "longarg". Change the type of "shortarg" to int.
13754
f806d18e 137552005-07-17 Yoshinori Okuji <okuji@enbug.org>
13756
13757 * boot/i386/pc/boot.S (boot_drive_check): New label.
13758
13759 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
13760 macro.
13761
13762 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
13763 which do not pass a boot drive correctly. Copied from GRUB Legacy.
13764
e293232b 137652005-07-17 Yoshinori Okuji <okuji@enbug.org>
13766
13767 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
13768 When turning off Gate A20, skip the check and return immediately,
13769 because this is not fatal usually.
13770
ebedfd00 137712005-07-17 Yoshinori Okuji <okuji@enbug.org>
13772
13773 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
13774 be 0x7C00 instead of 0x8000.
13775
13776 * boot/i386/pc/pxeboot.S: Rewritten.
13777
13778 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
13779 EXT_C.
13780 (gate_a20_check_state): Read a byte from 0x108000. Invert the
13781 result.
13782
654fc59f 137832005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
13784
13785 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
13786 robustness. This routine now supports a BIOS call and System
13787 Control Port A to modify the gate A20.
13788
13789 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13790 Increased to 0x440.
13791
09f9923f 137922005-07-12 Hollis Blanchard <hollis@penguinppc.org>
13793
13794 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
13795 device path and resulting ihandle.
13796 (grub_ofdisk_close): dprintf the ihandle being closed.
13797 (grub_ofdisk_read): dprintf function parameters.
13798 * kern/mm.c (grub_mm_init_region): Likewise.
13799 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
13800 (grub_linux_boot): dprintf the Linux entry point, initrd address and
13801 size, and boot arguments.
13802 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
13803 before loading into memory.
13804 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
13805 before loading into memory.
13806
7ef504d8 138072005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
13808
13809 * kern/mm.c: Added much documentation.
13810 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
13811 8, set to 5 instead of 8.
13812
e0f050c2 138132005-07-10 Yoshinori Okuji <okuji@enbug.org>
13814
13815 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
13816
13817 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
13818 (grub_mkdevicemap_SOURCES): New variable.
13819
13820 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
13821 lib/device.c of GRUB Legacy.
13822
7224189a 138232005-07-10 Yoshinori Okuji <okuji@enbug.org>
13824
13825 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
13826 instead of PATH is NULL.
13827
68c864eb 138282005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
13829
13830 * commands/cmp.c (BUFFER_SIZE): New macro.
13831 (grub_cmd_cmp): Close the right file at the right time. Compare
13832 only data just read. Don't report files of different size as
13833 identical. Dynamically allocate buffers. Move variable
13834 declarations at the beginning of function.
13835
e6f3e614 138362005-07-09 Yoshinori Okuji <okuji@enbug.org>
13837
13838 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
13839 reverse.
13840
f8f1559a 138412004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
13842
13843 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
13844 when backspace is pressed at beginning of line.
13845
39c9d41d 138462005-07-03 Yoshinori Okuji <okuji@enbug.org>
13847
13848 * DISTLIST: Added genfslist.sh.
13849
13850 * normal/main.c (fs_module_list): New variable.
13851 (autoload_fs_module): New function.
13852 (read_fs_list): Likewise.
13853 (grub_normal_execute): Call read_fs_list.
13854
13855 * kern/fs.c (grub_fs_autoload_hook): New variable.
13856 (grub_fs_probe): Added support for auto-loading.
13857
13858 * include/grub/normal.h (struct grub_fs_module_list): New struct.
13859 (grub_fs_module_list_t): New type.
13860
13861 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
13862 (grub_fs_autoload_hook): New prototype.
13863
13864 * genfslist.sh: New file.
f19dbdb7 13865
39c9d41d 13866 * genmk.rb: Added a rule to generate a filesystem list.
13867
121c1d83 138682005-06-30 Marco Gerards <metgerards@student.han.nl>
13869
13870 * configure.ac: Fix the test for cross-compiling.
13871
13872 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
13873 define GRUB_UTIL anymore.
13874
13875 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
13876 so this function works on other systems than just big endian.
13877 (load_modules): Likewise.
13878 (add_segments): Likewise.
13879
e75d76e1 138802005-06-23 Hollis Blanchard <hollis@penguinppc.org>
13881
13882 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
13883 contains `l' modifier, get a long from va_arg().
13884
50b5a0a7 138852005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
13886
13887 * kern/mm.c (grub_free): If the next free block which is being
13888 merged is the first free block, set the first block to the block
13889 being freed.
13890 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
13891
89371b20 138922005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13893
13894 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
13895 `grub_ieee1275_chosen'.
13896
168d6e58 138972005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13898
13899 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
13900 (grub_ieee1275_chosen): New variable.
13901 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
13902 `chosen'.
13903 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
13904 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13905 Rename first argument to `phandle' for consistency.
13906 (grub_ieee1275_get_property_length): Likewise.
13907 (grub_ieee1275_next_property): Likewise. Change type of first argument
13908 to grub_ieee1275_phandle_t.
13909 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
13910 Move export next to declaration.
13911 (grub_ieee1275_chosen): New variable.
13912 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
13913 Correct cosmetic typo.
13914 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
13915 `grub_ieee1275_chosen'.
13916 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
13917 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
13918 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
13919 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
13920 `grub_ieee1275_chosen'.
13921
ca5baa3f 139222005-05-10 Hollis Blanchard <hollis@penguinppc.org>
13923
13924 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
13925 /chosen/bootargs.
13926 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
13927 /chosen/bootargs as "variable=value" pairs.
13928
708b345f 139292005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
13930
13931 * include/grub/misc.h (grub_dprintf): New macro.
13932 (grub_real_dprintf): New prototype.
13933 (grub_strword): Likewise.
13934 (grub_iswordseparator): Likewise.
13935 * kern/misc.c (grub_real_dprintf): New function.
13936 (grub_strword): Likewise.
13937 (grub_iswordseparator): Likewise.
13938
f4c5e67c 139392005-04-30 Hollis Blanchard <hollis@penguinppc.org>
13940
13941 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
13942 (roundup): Remove macro.
13943 (grub_ieee1275_flags): Make static.
13944 (grub_ieee1275_realmode): Remove.
13945 (grub_ieee1275_test_flag): New function.
13946 (grub_ieee1275_set_flag): Likewise.
13947 (find_options): Rename to `grub_ieee1275_find_options'; update
13948 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
13949 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
13950 (cmain): New prototype.
13951 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
13952 `grub_ieee1275_flags' directly.
13953 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
13954 machine/biosdisk.h.
13955 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
13956 Don't include grub/machine/init.h.
13957 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
13958 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13959 Remove prototype.
13960 (grub_ieee1275_realmode): Likewise.
13961 (grub_ieee1275_flag): New enum.
13962 (grub_ieee1275_test_flag): New prototype.
13963 (grub_ieee1275_set_flag): New prototype.
13964 * include/grub/powerpc/ieee1275/init.h: Remove file.
13965 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
13966 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
13967 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
13968 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
13969 comment.
13970 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
13971 `grub_ieee1275_test_flag'.
13972 (grub_ieee1275_encode_devname): Likewise.
13973
ed16607e 139742005-04-21 Hollis Blanchard <hollis@penguinppc.org>
13975
13976 * include/grub/powerpc/ieee1275/ieee1275.h
13977 (grub_ieee1275_encode_devname): New prototype.
13978 (grub_ieee1275_get_filename): Likewise.
13979 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
13980 function.
13981 (grub_set_prefix): Likewise.
13982 (grub_machine_init): Call grub_set_prefix.
13983 * kern/powerpc/ieee1275/openfw.c: Fix typos.
13984 (grub_parse_type): New enum.
13985 (grub_ieee1275_get_devargs): New function.
13986 (grub_ieee1275_get_devname): Likewise.
13987 (grub_ieee1275_parse_args): Likewise.
13988 (grub_ieee1275_get_filename): Likewise.
13989 (grub_ieee1275_encode_devname): Likewise.
13990
be369920 139912005-03-30 Marco Gerards <metgerards@student.han.nl>
13992
13993 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
13994 `grub_loader_unset'.
13995
a5ce3a4a 139962005-03-26 Hollis Blanchard <hollis@penguinppc.org>
13997
13998 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
13999 instead of grub_ieee1275_interpret.
14000 (grub_halt_init): New function.
14001 (grub_halt_fini): Likewise.
14002 (GRUB_MOD_INIT): Correct message grammar.
14003 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
14004 instead of grub_ieee1275_interpret.
14005 (grub_reboot_init): New function.
14006 (grub_reboot_fini): Likewise.
14007 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
14008 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
14009 util/i386/pc/misc.c with commands/ieee1275/halt.c,
14010 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
14011 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
14012 function.
14013 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
14014 Add prototype.
14015 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
14016 prototype.
14017 (grub_halt): Likewise.
14018 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
14019 (cmain): Remove __attribute__((unused)).
14020 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
14021 (grub_heap_len): Likewise.
14022 (grub_machine_fini): New function.
14023 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
14024 (grub_halt): Likewise.
14025 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
14026 function.
14027 * util/powerpc/ieee1275/misc.c: New file.
14028
0058f771 140292005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
14030
14031 * DISTLIST: New file.
14032 * gendistlist.sh: Likewise.
f19dbdb7 14033
0058f771 14034 * Makefile.in (COMMON_DISTFILES): Removed.
14035 (BOOT_DISTFILES): Likewise.
14036 (CONF_DISTFILES): Likewise.
14037 (DISK_DISTFILES): Likewise.
14038 (FS_DISTFILES): Likewise.
14039 (INCLUDE_DISTFILES): Likewise.
14040 (KERN_DISTFILES): Likewise.
14041 (LOADER_DISTFILES): Likewise.
14042 (TERM_DISTFILES): Likewise.
14043 (UTIL_DISTFILES): Likewise.
14044 (DISTFILES): Likewise.
14045 (uninstall): Uninstall files in $(pkgdata_DATA).
14046 (DISTLIST): New target.
14047 (distdir): Use the contents of the file DISTLIST to get a list of
14048 distributed files.
14049
46b3b8a5 140502005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14051
14052 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14053 descriptor. This is ported from GRUB Legacy.
14054
14055 * gencmdlist.sh: Added an extra semicolon to make it work with
14056 old sed versions. Reported by Robert Bihlmeyer
14057 <robbe@orcus.priv.at>.
14058
5822ff87 140592005-03-08 Yoshinori Okuji <okuji@enbug.org>
14060
14061 Automatic loading of commands is supported.
f19dbdb7 14062
5822ff87 14063 * normal/main.c (read_command_list): New function.
14064 (grub_normal_execute): Call read_command_list.
14065
14066 * normal/command.c (grub_register_command): Return zero or CMD.
14067 Allocate CMD->NAME from the heap.
14068 Initialize CMD->MODULE_NAME to zero.
14069 Find the same name as well. If the same command is found and it is
14070 a dummy command, overwrite members. If it is not a dummy command,
14071 return zero.
14072 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14073 (grub_command_find): If a dummy command is found, load a module
14074 and retry to find a command only once.
14075
14076 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14077 make sure that each command is loaded.
14078
14079 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14080 macro.
14081 (struct grub_command): Remove const from the member `name'.
14082 Add a new member `module_name'.
14083 (grub_register_command): Return grub_command_t.
14084
14085 * commands/help.c (grub_cmd_help): Call grub_command_find to make
14086 sure that each command is loaded.
14087
14088 * genmk.rb (PModule::rule): Specify a module name without the
14089 suffix ".mod" to gencmdlist.sh.
14090
7b1f4b57 140912005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14092
14093 * gencmdlist.sh: New file.
f19dbdb7 14094
7b1f4b57 14095 * genmk.rb (PModule::rule): Generate a rule for a command list.
14096 Clean command.lst.
14097 Generate command.lst from $(COMMANDFILES).
14098
14099 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14100 (DATA): Added $(pkgdata_DATA).
14101 (install-local): Install files in $(pkgdata_DATA).
14102
062aaf39 141032005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14104
14105 * term/i386/pc/vga.c (debug_command): Removed.
14106 (GRUB_MOD_INIT): Do not register the command "debug".
14107
14108 From Hollis Blanchard:
14109 * commands/configfile.c: New file.
14110 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14111 commands/configfile.c.
14112 (pkgdata_MODULES): Added configfile.mod.
14113 (configfile_mod_SOURCES): New variable.
14114 (configfile_mod_CFLAGS): Likewise.
14115 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14116 commands/configfile.c.
14117 (pkgdata_MODULES): Added configfile.mod.
14118 (configfile_mod_SOURCES): New variable.
14119 (configfile_mod_CFLAGS): Likewise.
14120 * util/grub-emu.c (main): Call grub_configfile_init and
14121 grub_configfile_fini.
14122 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14123 prototype.
14124 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 14125
cee01aa6 141262005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14127
14128 * normal/arg.c (grub_arg_show_help): Do not show the bug report
14129 address.
14130
14131 * commands/help.c (grub_cmd_help): Do not print newlines after
14132 the last command in print_command_help.
14133
93f3a1d8 141342005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14135
14136 * commands/default.h: New file.
14137 * commands/timeout.h: Likewise.
14138 * normal/context.c: Likewise.
f19dbdb7 14139
93f3a1d8 14140 * util/misc.c: Do not include sys/times.h.
14141 Include sys/time.h and grub/machine/time.h.
14142 (grub_get_rtc): Rewritten with gettimeofday.
14143
14144 * util/grub-emu.c (main): Call grub_default_init and
14145 grub_timeout_init before grub_normal_init, and call
14146 grub_timeout_fini and grub_default_fini after grub_main.
14147
14148 * util/console.c (grub_ncurses_checkkey): Return the read
14149 character or -1.
14150
14151 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14152 timeouts.
14153
14154 * normal/main.c (read_config_file): Push MENU. If this fails,
14155 print an error and wait for a user input.
14156 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14157 If a menu is empty or an error occurs, pop MENU.
14158 (grub_normal_execute): Pop and free MENU after grub_menu_run
14159 returns.
14160
14161 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14162
14163 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14164 include time.h.
14165 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14166 without GRUB_UTIL.
14167 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14168 time.h.
14169 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14170 without GRUB_UTIL.
14171
14172 * include/grub/normal.h (struct grub_menu_list): New struct.
14173 (grub_menu_list_t): New type.
14174 (struct grub_context): New struct.
14175 (grub_context_t): New type.
14176 (grub_register_command): Got rid of EXPORT_FUNC.
14177 (grub_unregister_command): Likewise.
14178 (grub_context_get): New prototype.
14179 (grub_context_get_current_menu): Likewise.
14180 (grub_context_push_menu): Likewise.
14181 (grub_context_pop_menu): Likewise.
14182 [GRUB_UTIL] (grub_default_init): Likewise.
14183 [GRUB_UTIL] (grub_default_fini): Likewise.
14184 [GRUB_UTIL] (grub_timeout_init): Likewise.
14185 [GRUB_UTIL] (grub_timeout_fini): Likewise.
14186
14187 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14188 commands/timeout.c and normal/context.c.
14189 (pkgdata_MODULES): Added default.mod and timeout.mod.
14190 (normal_mod_SOURCES): Added normal/context.c.
14191 (default_mod_SOURCES): New variable.
14192 (default_mod_CFLAGS): Likewise.
14193 (timeout_mod_SOURCES): Likewise.
14194 (timeout_mod_CFLAGS): Likewise.
14195 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14196 conf/i386-pc.rmk.
14197 (pkgdata_MODULES): Added default.mod and timeout.mod.
14198 (normal_mod_SOURCES): Added normal/context.c.
14199 (default_mod_SOURCES): New variable.
14200 (default_mod_CFLAGS): Likewise.
14201 (timeout_mod_SOURCES): Likewise.
14202 (timeout_mod_CFLAGS): Likewise.
14203
14204 * Makefile.in (all-local): Added $(MKFILES).
14205
4ed2e1dd 142062005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
14207
14208 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14209 (grub_emu_SOURCES): Likewise.
14210 (pkgdata_MODULES): Add `sun.mod'.
14211 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14212 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14213 `partmap/sun.c'.
14214 (pkgdata_MODULES): Add `sun.mod'.
14215 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14216 * include/grub/partition.h (grub_sun_partition_map_init): New
14217 prototype.
14218 (grub_sun_partition_map_fini): Likewise.
14219 * partmap/sun.c: New file.
14220 * util/grub-emu.c (main): Initialize and de-initialize the sun
14221 partitionmap support.
14222
4d4e372e 142232005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
14224
14225 This implements an Emacs-like menu entry editor.
f19dbdb7 14226
4d4e372e 14227 * normal/menu_entry.c: New file.
f19dbdb7 14228
4d4e372e 14229 * util/console.c (grub_ncurses_putchar): Translate some Unicode
14230 characters to ASCII.
14231 (saved_char): New variable.
14232 (grub_ncurses_checkkey): Rewritten completely.
14233 (grub_ncurses_getkey): Likewise.
14234 (grub_ncurses_init): Call raw instead of cbreak.
14235
14236 * normal/menu.c (print_entry): Do not put a space.
14237 (init_page): Renamed to ...
14238 (grub_menu_init_page): ... this. All callers changed.
14239 (edit_menu_entry): Removed.
14240 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14241
14242 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14243
14244 * kern/misc.c (grub_vprintf): Call grub_refresh.
14245
14246 * normal/menu.c (DISP_LEFT): Renamed to ...
14247 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14248 * normal/menu.c (DISP_UP): Renamed to ...
14249 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14250 * normal/menu.c (DISP_RIGHT): Renamed to ...
14251 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14252 * normal/menu.c (DISP_DOWN): Renamed to ...
14253 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14254 * normal/menu.c (DISP_HLINE): Renamed to ...
14255 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14256 * normal/menu.c (DISP_VLINE): Renamed to ...
14257 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14258 * normal/menu.c (DISP_UL): Renamed to ...
14259 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14260 * normal/menu.c (DISP_UR): Renamed to ...
14261 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14262 * normal/menu.c (DISP_LL): Renamed to ...
14263 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14264 * normal/menu.c (DISP_LR): Renamed to ...
14265 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14266 * normal/menu.c (TERM_WIDTH): Renamed to ...
14267 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14268 * normal/menu.c (TERM_HEIGHT): Renamed to ...
14269 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14270 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14271 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14272 * normal/menu.c (TERM_MARGIN): Renamed to ...
14273 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14274 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14275 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14276 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14277 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14278 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14279 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14280 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14281 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14282 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14283 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14284 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14285 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14286 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14287 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14288 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14289 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14290 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14291 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14292 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14293 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14294 All callers changed.
14295
14296 * include/grub/normal.h: New prototype.
14297
14298 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14299 normal/menu_entry.c.
14300 (normal_mod_SOURCES): Likewise.
14301 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14302 (normal_mod_SOURCES): Likewise.
14303
e6b92c8a 143042005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
14305
14306 * include/grub/normal.h (grub_halt_init): New prototype.
14307 (grub_halt_fini): Likewise.
14308 (grub_reboot_init): Likewise.
14309 (grub_reboot_fini): Likewise.
14310
14311 * util/grub-emu.c: Include signal.h.
14312 (main_env): New global variable.
14313 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14314 catch C-c.
14315 (grub_machine_fini): New function.
14316 (main): Call grub_halt_init and grub_reboot_init before
14317 grub_main, and grub_reboot_fini and grub_halt_fini after it.
14318 Call setjmp with MAIN_ENV to go back afterwards.
14319 Call grub_machine_fini right before return.
14320
14321 * include/grub/util/misc.h: Include setjmp.h.
14322 (main_env): New prototype.
14323
14324 * include/grub/kernel.h (grub_machine_fini): New prototype.
14325 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14326 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14327
14328 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14329 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14330 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 14331
e6b92c8a 14332 * util/i386/pc/misc.c: New file.
f19dbdb7 14333
e6b92c8a 14334 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14335 util/i386/pc/misc.c, commands/i386/pc/halt.c and
14336 commands/i386/pc/reboot.c.
14337
c642636f 143382005-02-14 Guillem Jover <guillem@hadrons.org>
14339
14340 * include/grub/dl.h (grub_dl_check_header): New prototype.
14341 (grub_arch_dl_check_header): Change return type to grub_err_t,
14342 remove size parameter and export function. Update all callers.
14343 * kern/dl.c (grub_dl_check_header): New function.
14344 (grub_dl_load_core): Use `grub_dl_check_header' instead of
14345 `grub_arch_dl_check_header'. Check ELF type. Check if sections
14346 are inside the core.
14347 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14348 independent ELF header checks.
14349 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14350 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14351 `grub_dl_check_header' instead of explicit checks. Check for the
14352 ELF type.
14353 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14354 `grub_dl_check_header' instead of explicit checks. Remove arch
14355 specific ELF header checks.
14356
e6b92c8a 14357 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
14358 argument SIZE.
14359
5eabe94b 143602005-02-13 Hollis Blanchard <hollis@penguinppc.org>
14361
14362 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
14363 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
14364
1b14a681 143652005-02-12 Hollis Blanchard <hollis@penguinppc.org>
14366
14367 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 14368 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 14369 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 14370 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 14371 * partmap/amiga.c (amiga_partition_map_iterate): Return
14372 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
14373 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14374
aca108aa 143752005-02-01 Guillem Jover <guillem@hadrons.org>
14376
14377 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
14378 help info.
14379
c9f9c556 143802005-01-31 Marco Gerards <metgerards@student.han.nl>
14381
14382 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
14383 Removed prototype.
14384 (grub_rescue_cmd_linux): New prototype.
14385 (grub_rescue_cmd_initrd): Likewise.
14386 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
14387 `bi_rec'.
14388 (grub_linux_release_mem): Release the memory for the initrd.
14389 (grub_load_linux): Renamed from this...
14390 (grub_rescue_cmd_linux): ...To this. Changed all callers.
14391 Changed `entry' not to be static. Loop over memory regions to
14392 find another one when the default fails.
14393 (grub_rescue_cmd_initrd): New function.
14394 (grub_linux_init): Remove function.
14395 (grub_linux_fini): Likewise.
14396 (GRUB_MOD_INIT): Register `initrd'.
14397 (GRUB_MOD_FINI): Unregister `initrd'.
14398 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14399 Function removed.
14400 (grub_linux_normal_fini): Likewise.
14401 (GRUB_MOD_INIT): Register `initrd'.
14402 (GRUB_MOD_FINI): Unregister `initrd'.
14403
990cf3aa 144042005-01-31 Marco Gerards <metgerards@student.han.nl>
14405
14406 * commands/help.c: New file.
14407 * normal/arg.c (show_help): Renamed to...
14408 (grub_arg_show_help): ... this.
14409 * commands/i386/pc/halt.c: New file.
14410 * commands/i386/pc/reboot.c: Likewise.
14411 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14412 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
14413 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
14414 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
14415 variables.
14416 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14417 `commands/help.c'.
14418 (pkgdata_MODULES): Add `help.mod'.
14419 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
14420 * grub/i386/pc/init.h (grub_reboot): New prototype.
14421 (grub_halt): Likewise.
14422 * include/grub/normal.h (grub_arg_show_help): New prototype.
14423 (grub_help_init): Likewise.
14424 (grub_help_fini): Likewise.
14425 * util/grub-emu.c (main): Initialize and deinitialize the help
14426 command.
14427
14428 * normal/cmdline.c (grub_cmdline_get): Doc fix.
14429
14430 * normal/command.c (grub_command_init): Fixed the description of
14431 the `set' and `unset' commands.
14432
144332005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 14434
14435 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
14436 function.
14437 * commands/ieee1275/halt.c: New file.
14438 * commands/ieee1275/reboot.c: Likewise.
14439 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
14440 `__attribute__ ((unused))'. Some GCS related fixed.
14441 (grub_suspend_init) [GRUB_UTIL]: Function removed.
14442 (grub_suspend_fini): Likewise.
14443 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
14444 and `halt.mod'.
14445 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
14446 (halt_mod_CFLAGS): New variables.
14447 * include/grub/powerpc/ieee1275/ieee1275.h
14448 (grub_ieee1275_interpret): New prototype.
14449
1ab09cc7 144502005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
14451
14452 * include/grub/misc.h (memmove): New prototype.
14453 (memcpy): Likewise.
14454
8b8cbdb2 144552005-01-22 Hollis Blanchard <hollis@penguinppc.org>
14456
14457 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
14458 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
14459
e3741a27 144602005-01-22 Marco Gerards <metgerards@student.han.nl>
14461
14462 * kern/misc.c (grub_strndup): Function rewritten.
14463
776bd780 144642005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
14465
14466 * normal/menu.c (TERM_WIDTH): Macro redefined.
14467 (TERM_TOP_BORDER_Y): Likewise.
14468 (draw_border): Replaced while-loop by a for-loop. Make the number
14469 of lines consistent with the number of lines displayed in
14470 print_entries. Added a margin below the rectangle.
14471 (print_entry): Make the entry fit in the rectangle.
14472 (print_entries): Display the scroll arrows next to the right
14473 border.
14474
78026bce 144752005-01-21 Marco Gerards <metgerards@student.han.nl>
14476
14477 * fs/minix.c (grub_minix_find_file): Reserve more space for
14478 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
14479 `grub_strncpy' to copy `path' into it.
14480
67bbaf0f 144812005-01-21 Marco Gerards <metgerards@student.han.nl>
14482
14483 Add the loopback device, a device via which files can be accessed
14484 as devices.
f19dbdb7 14485
67bbaf0f 14486 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
14487 (pkgdata_MODULES): Add loopback.mod.
14488 (loopback_mod_SOURCES): New variable.
14489 (loopback_mod_CFLAGS): Likewise.
14490 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14491 `disk/loopback.c'.
14492 (pkgdata_MODULES): Add loopback.mod.
14493 (loopback_mod_SOURCES): New variable.
14494 (loopback_mod_CFLAGS): Likewise.
14495 * disk/loopback.c: new file.
14496 * include/grub/normal.h (grub_loop_init): New prototype.
14497 (grub_loop_fini): New prototype.
14498 * util/grub-emu.c (main): Initialize and de-initialize loopback
14499 support.
14500 * include/grub/disk.h (grub_disk_dev_id): Add
14501 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
14502
6f1c18bd 145032005-01-20 Hollis Blanchard <hollis@penguinppc.org>
14504
14505 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
14506 function.
14507 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
14508 (suspend_mod_SOURCES): New variable.
14509 (suspend_mod_CFLAGS): Likewise.
14510 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
14511 New prototype.
14512 * commands/ieee1275/suspend.c: New file.
14513
b38551da 145142005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14515
14516 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 14517 ((unused))' to `__attribute__ ((used))'.
b38551da 14518 (GRUB_MOD_FINI): Likewise.
14519 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
14520 * genmk.rb (PModule): Assign space to common symbols when linking
14521 modules.
14522
777aff39 145232005-01-20 Marco Gerards <metgerards@student.han.nl>
14524
14525 * include/grub/mm.h (grub_mm_init_region): Change the type of the
14526 `unsigned' arguments to `grub_size_t'.
14527 (grub_malloc): Likewise.
14528 (grub_realloc): Likewise.
14529 (grub_memalign): Likewise.
14530 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
14531 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14532 * util/misc.c (grub_malloc): Likewise.
14533 (grub_realloc): Likewise.
14534 * kern/mm.c (get_header_from_pointer): Change the casts to
14535 `unsigned' into a cast to `grub_size_t'.
14536
14537 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
14538 point to `currnode' when `currnode' is changed.
14539
14540 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
14541 Schottelius <nico-linux@schottelius.org>.
14542
d0ff18e1 145432005-01-09 Hollis Blanchard <hollis@penguinppc.org>
14544
14545 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
14546 (note_path): Remove variable.
14547 (GRUB_IEEE1275_NOTE_NAME): New macro.
14548 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
14549 (grub_ieee1275_note_hdr): New structure.
14550 (grub_ieee1275_note_desc): Likewise.
14551 (grub_ieee1275_note): Likewise.
14552 (load_note): Remove `dir' argument. All callers updated. Remove
14553 `note_img' and `path'. Do not load a file from `note_path'.
14554 Initialize a struct grub_ieee1275_note and write that to `out'.
14555 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
14556
4ca7004c 145572005-01-05 Marco Gerards <metgerards@student.han.nl>
14558
14559 * util/misc.c (grub_util_read_image): Revert last change. It
14560 called `grub_util_read_at', which seeks from the beginning of the
14561 file.
14562
0b412211 145632005-01-04 Hollis Blanchard <hollis@penguinppc.org>
14564
14565 * TODO: Add note about endianness in grub-mkimage.
14566 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
14567 section.
14568 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
14569 (grub_mkimage_SOURCES): New target.
14570 * include/grub/kernel.h (grub_start_addr): Remove variable.
14571 (grub_end_addr): Likewise.
14572 (grub_total_module_size): Likewise.
14573 (grub_kernel_image_size): Likewise.
14574 (GRUB_MODULE_MAGIC): New constant.
14575 (grub_module_info): New structure.
14576 (grub_arch_modules_addr): New prototype.
14577 (grub_get_end_addr): Remove prototype.
14578 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
14579 * include/grub/powerpc/ieee1275/kernel.h: New file.
14580 * include/grub/util/misc.h (grub_util_get_fp_size): New
14581 prototype.
14582 (grub_util_read_at): Likewise.
14583 (grub_util_write_image_at): Likewise.
14584 * kern/main.c (grub_get_end_addr): Remove function.
14585 (grub_load_modules): Call grub_arch_modules_addr instead of using
14586 grub_end_addr. Look for a grub_module_info struct in memory. Use
14587 the grub_module_info fields instead of calling grub_get_end_addr
14588 as loop conditions. Move grub_add_unused_region code here.
14589 (grub_add_unused_region): Remove function.
14590 * kern/i386/pc/init.c: Include grub/cache.h.
14591 (grub_machine_init): Remove call to grub_get_end_addr. Remove
14592 one call to add_mem_region.
14593 (grub_arch_modules_addr): New function.
14594 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
14595 (grub_total_module_size): Likewise.
14596 Include grub/machine/kernel.h.
14597 (grub_arch_modules_addr): New function.
14598 * util/grub-emu.c (grub_end_addr): Remove variable.
14599 (grub_total_module_size): Likewise.
14600 (grub_arch_modules_addr): New function.
14601 * util/misc.c: Include unistd.h.
14602 (grub_util_get_fp_size): New function.
14603 (grub_util_read_at): Likewise.
14604 (grub_util_write_image_at): Likewise.
14605 (grub_util_read_image): Call grub_util_read_at.
14606 (grub_util_write_image): Call grub_util_write_image_at.
14607 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
14608 additional memory in kernel_img for a struct grub_module_info.
14609 Fill in that grub_module_info.
14610 * util/powerpc/ieee1275/grub-mkimage.c: New file.
14611
458786f8 146122005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14613
14614 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
14615 New function.
14616 * include/grub/powerpc/ieee1275/ieee1275.h
14617 (grub_ieee1275_milliseconds): New prototype.
14618 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
14619 Change to 1000.
14620 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
14621 grub_ieee1275_milliseconds.
14622
ac507d1b 146232005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14624
14625 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
14626 variable.
14627 (find_options): New function.
14628 (cmain): Call find_options.
14629 * include/grub/powerpc/ieee1275/ieee1275.h
14630 (grub_ieee1275_realmode): New extern variable.
14631 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
14632 grub_map if grub_ieee1275_realmode is false.
14633
6b8fd1c4 146342004-12-29 Marco Gerards <metgerards@student.han.nl>
14635
14636 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
14637 lines are inserted and make it work like readline. Reported by
14638 Vincent Pelletier <subdino2004@yahoo.fr>.
14639
8514a1e0 146402004-12-28 Marco Gerards <metgerards@student.han.nl>
14641
14642 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
14643
14644 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
14645 `kern/powerpc/cache.S'.
14646
924b6140 146472004-12-27 Marco Gerards <metgerards@student.han.nl>
14648
14649 * genmk.rb: Handle the `Program' class in the main loop. Written
14650 by Johan Rydberg <jrydberg@gnu.org>.
14651 (Program): New class.
14652 (programs): New variable.
14653 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
14654 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
14655 instead of "grub/kernel.h". Include <grub/machine/init.h>.
14656 (help_arch): Function removed.
14657 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
14658 `powerpc/libgcc.h' and `loader.h'.
14659 (pkgdata_PROGRAMS): New variable.
14660 (sbin_UTILITIES): Variable removed.
14661 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
14662 (grubof_SOURCES): Variable re-defined so it only includes the
14663 core functionality.
14664 (grubof_CFLAGS): Remove `-DGRUBOF'.
14665 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
14666 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
14667 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
14668 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
14669 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
14670 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
14671 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
14672 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
14673 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
14674 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
14675 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14676 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
14677 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
14678 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
14679 (pc_mod_CFLAGS): New variables.
14680 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
14681 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
14682 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
14683 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
14684 Moved from here...
14685 * include/grub/i386/pc/init.h (grub_os_area_addr)
14686 (rub_os_area_size): ... to here.
14687 * include/grub/powerpc/ieee1275/ieee1275.h
14688 (grub_ieee1275_entry_fn): Export symbol.
14689 * include/grub/powerpc/ieee1275/init.h: New file.
14690 * include/grub/powerpc/libgcc.h: Likewise.
14691 * include/grub/cache.h: Likewise.
14692 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
14693 <hollis@penguinppc.org>.
14694 * kern/dl.c: Include <grub/cache.h>.
14695 (grub_dl_flush_cache): New function.
14696 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
14697 for this module.
14698 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
14699 (grub_console_init): Removed prototypes.
14700 (grub_machine_init): Don't initialize the modules anymore.
14701 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
14702 static.
14703 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
14704 Macro undef removed.
14705 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
14706 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
14707 relocation `R_PPC_REL32'. Return an error when the relocation is
14708 unknown.
14709 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
14710 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
14711 * util/misc.c (grub_arch_sync_caches): Likewise.
14712
e4b47e0c 147132004-12-19 Marco Gerards <metgerards@student.han.nl>
14714
14715 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
14716 `symlist.c', add `grubof_symlist.c'.
14717 (symlist.c): Variable removed.
14718 (grubof_HEADERS): Variable added.
14719 (grubof_symlist.c): New target.
14720 (kernel_syms.lst): Use `grubof_HEADERS' instead of
14721 `kernel_img_HEADERS'.
14722 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
14723 * kern/powerpc/dl.c: New file.
14724 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
14725 Function removed.
14726 (grub_arch_dl_relocate_symbols): Likewise.
14727 (grub_register_exported_symbols): Likewise.
14728
4ceb3636 147292004-12-13 Marco Gerards <metgerards@student.han.nl>
14730
14731 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
14732 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
14733 to fail instead. Reported by Vincent Pelletier
14734 <subdino2004@yahoo.fr>.
14735
14736 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
14737 it is not allocated. Reported by Vincent Pelletier
14738 <subdino2004@yahoo.fr>.
14739
14740 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
14741 output so the output looks better.
f19dbdb7 14742
3f1578fe 147432004-12-04 Marco Gerards <metgerards@student.han.nl>
14744
14745 Modulize the partition map support and add support for the amiga
14746 partition map.
f19dbdb7 14747
3f1578fe 14748 * commands/ls.c: Include <grub/partition.h> instead of
14749 <grub/machine/partition.h>.
14750 * kern/disk.c: Likewise.
14751 * kern/rescue.c: Likewise.
14752 * loader/i386/pc/chainloader.c: Likewise.
14753 * normal/cmdline.c: Likewise.
14754 * kern/powerpc/ieee1275/init.c: Likewise.
14755 (grub_machine_init): Call `grub_pc_partition_map_init',
14756 `grub_amiga_partition_map_init' and
14757 `grub_apple_partition_map_init'.
14758 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
14759 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
14760 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
14761 `partition.h' and `pc_partition.h'.
14762 (grub_setup_SOURCES): Remove
14763 `disk/i386/pc/partition.c'. Add `kern/partition.c',
14764 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14765 (grub_emu_SOURCES): Likewise.
14766 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
14767 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
14768 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
14769 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14770 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
14771 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14772 (grubof_SOURCES): Likewise.
14773 * disk/i386/pc/partition.c: File removed.
14774 * disk/powerpc/ieee1275/partition.c: Likewise.
14775 * include/grub/powerpc/ieee1275/partition.h: Likewise.
14776 * include/grub/i386/pc/partition.h: Likewise.
14777 * kern/partition.c: New file.
14778 * partmap/amiga.c: Likewise.
14779 * partmap/apple.c: Likewise.
14780 * partmap/pc.c: Likewise.
14781 * include/grub/partition.h: Likewise..
14782 * include/grub/pc_partition.h: Likewise.
14783 * util/grub-emu.c: Include <grub/partition.h> instead of
14784 <grub/machine/partition.h>.
14785 (main): Call `grub_pc_partition_map_init',
14786 `grub_amiga_partition_map_init' and
14787 `grub_apple_partition_map_init' and deinitialize afterwards.
14788 * util/i386/pc/biosdisk.c: Include `#include
14789 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14790 `<grub/machine/partition.h>'.
14791 * util/i386/pc/grub-setup.c: Likewise.
14792 * util/i386/pc/biosdisk.c: Likewise.
14793 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
14794 partition information in case of a PC partition.
14795 * util/i386/pc/grub-setup.c: Include `#include
14796 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14797 `<grub/machine/partition.h>'.
14798 (setup): Only access the PC specific partition information in case
14799 of a PC partition.
14800
0ef4ced9 148012004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 14802
0ef4ced9 14803 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
14804 (grub_longjmp): Likewise.
14805 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
14806 20.
14807 * normal/powerpc/setjmp.S: New file.
14808 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14809 `normal/powerpc/setjmp.S'.
14810 (grubof_CFLAGS): Add `-DGRUBOF'.
14811 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
14812 [GRUB_UTIL && !GRUBOF].
f19dbdb7 14813
19950e29 148142004-11-16 Marco Gerards <metgerards@student.han.nl>
14815
14816 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
14817 property named `name'. Correctly handle the error returned by
14818 `grub_ieee1275_finddevice' if a device can not be opened.
14819
a2fea427 148202004-11-02 Hollis Blanchard <hollis@penguinppc.org>
14821
14822 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
14823 `actual' for negativity.
14824 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14825 kern/fshelp.c.
14826
41ea0ea3 148272004-11-01 Marco Gerards <metgerards@student.han.nl>
14828
14829 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
14830 (PAGE_OFFSET): New macro.
14831 (CRTC_ADDR_PORT): Likewise.
14832 (CRTC_DATA_PORT): Likewise.
14833 (START_ADDR_HIGH_REGISTER): Likewise.
14834 (START_ADDR_LOW_REGISTER): Likewise.
14835 (GRAPHICS_ADDR_PORT): Likewise.
14836 (GRAPHICS_DATA_PORT): Likewise.
14837 (READ_MAP_REGISTER): Likewise.
14838 (INPUT_STATUS1_REGISTER): Likewise.
14839 (INPUT_STATUS1_VERTR_BIT): Likewise.
14840 (page): New variable.
14841 (wait_vretrace): New function.
14842 (set_read_map): Likewise.
14843 (set_start_address): Likewise.
14844 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
14845 the right page.
14846 (check_vga_mem): Take the page into account.
14847 (write_char): Likewise.
14848 (write_cursor): Likewise.
14849 (scroll_up): Likewise. Copy the page to the page that is not
14850 shown and switch between both pages.
14851 (grub_vga_putchar): Fix off by one error.
14852 (grub_vga_cls): Wait for the vertical retrace. Take the page into
14853 account.
14854
ad0bd20b 148552004-11-01 Marco Gerards <metgerards@student.han.nl>
14856
14857 Add support for iso9660 (including rockridge).
f19dbdb7 14858
ad0bd20b 14859 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14860 (iso9660_mod_SOURCES): New variable.
14861 (iso9660_mod_CFLAGS): Likewise.
14862 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14863 * include/grub/fs.h (grub_iso9660_init): New prototype.
14864 * util/grub-emu.c (main): Call `grub_iso9660_init'.
14865 * fs/iso9660.c: New file.
14866
14867 * include/grub/misc.h (grub_strncat): New prototype.
14868 * kern/misc.c (grub_strncat): New function.
f19dbdb7 14869
ad0bd20b 14870 * fs/hfs.c (grub_hfs_mount): Translate the error
14871 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
14872 * fs/jfs.c (grub_jfs_mount): Likewise.
14873 * fs/ufs.c (grub_ufs_mount): Likewise.
14874
a5477a59 148752004-10-28 Hollis Blanchard <hollis@penguinppc.org>
14876
14877 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
14878 which initialized BAT registers.
14879 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
14880 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14881 Move from here...
14882 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
14883 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14884 ... to here.
14885 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
14886 (grub_mapclaim): Likewise.
14887 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
14888 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
14889 hand.
14890
9304c1f8 148912004-10-19 Hollis Blanchard <hollis@penguinppc.org>
14892
14893 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
14894 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
14895 -ffreestanding and -msoft-float.
14896
86f4ae25 148972004-10-15 Hollis Blanchard <hollis@penguinppc.org>
14898
14899 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
14900 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
14901 set in grub_ieee1275_flags.
14902
38912228 149032004-10-14 Hollis Blanchard <hollis@penguinppc.org>
14904
14905 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
14906 prototype.
14907 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
14908 grub_console_init first.
14909 Change the memory range used for grub_ieee1275_claim and
14910 grub_mm_init_region.
14911 Print an error message if the claim fails.
14912 Include <grub/misc.h>.
14913
d1923dc8 149142004-10-13 Hollis Blanchard <hollis@penguinppc.org>
14915
14916 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
14917 Call grub_children_iterate for device nodes of type `scsi',
14918 `ide', or `ata'.
14919 (grub_ofdisk_open): Remove manual device alias resolution.
14920 Fix memory leak when device cannot be opened.
f19dbdb7 14921 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 14922 (grub_children_iterate): New prototype.
14923 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
14924 New function.
14925 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14926 Return -1 if args.size was -1.
14927
4512e4f3 149282004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14929
14930 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
14931 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
14932 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
14933 Open Firmware's memory for it; claim memory from _start to _end.
14934 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
14935 (_end): New extern.
14936 (_start): Zero BSS from __bss_start to _end.
14937 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14938 New extern.
14939 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
14940
4d61feb0 149412004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14942
ad0bd20b 14943 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
14944 -1 if args.base was -1.
4d61feb0 14945
026fa2f9 149462004-10-08 Hollis Blanchard <hollis@penguinppc.org>
14947
14948 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
14949 escape sequence instead of a literal ^L. Also call
14950 grub_ofconsole_gotoxy.
14951
9f2220ef 149522004-10-03 Hollis Blanchard <hollis@penguinppc.org>
14953
14954 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
14955 void * arguments to grub_addr_t. All callers updated. Also make
14956 the `result' argument optional.
14957 (grub_ieee1275_release): change void * arguments to grub_addr_t.
14958 All callers updated.
14959
8a572cd7 149602004-09-22 Hollis Blanchard <hollis@penguinppc.org>
14961
14962 * commands/ls.c (grub_ls_list_files): Use the string following the
14963 initial ')', if present, as the filesystem path.
14964 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
14965
14966 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
14967
18aa81f2 149682004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
14969
14970 Make the source code of the menu interface more readable.
f19dbdb7 14971
18aa81f2 14972 * normal/menu.c: Include grub/mm.h.
14973 (TERM_WIDTH): New macro.
14974 (TERM_HEIGHT): Likewise.
14975 (TERM_INFO_HEIGHT): Likewise.
14976 (TERM_MARGIN): Likewise.
14977 (TERM_SCROLL_WIDTH): Likewise.
14978 (TERM_TOP_BORDER_Y): Likewise.
14979 (TERM_LEFT_BORDER_X): Likewise.
14980 (TERM_BORDER_WIDTH): Likewise.
14981 (TERM_MESSAGE_HEIGHT): Likewise.
14982 (TERM_BORDER_HEIGHT): Likewise.
14983 (TERM_NUM_ENTRIES): Likewise.
14984 (TERM_FIRST_ENTRY_Y): Likewise.
14985 (TERM_ENTRY_WIDTH): Likewise.
14986 (TERM_CURSOR_X): Likewise.
14987 (draw_border): Use macros instead of magic numbers.
14988 (print_entry): Likewise.
14989 (print_entries): Likewise.
14990 (run_menu): Likewise. Also, handle the key 'e'.
14991 (run_menu_entry): Ignore empty command lines.
14992 (print_message): Added a new argument EDIT. If EDIT is true,
14993 print a different message.
14994 (init_page): Likewise.
14995 (edit_menu_entry): New function. Not implemented yet.
14996
b47efe30 149972004-09-17 Marco Gerards <metgerards@student.han.nl>
14998
14999 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
15000 can be loaded from normal mode.
f19dbdb7 15001
b47efe30 15002 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
15003 `multiboot.mod'.
15004 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
15005 (multiboot_mod_CFLAGS): New variables.
15006 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 15007 * loader/i386/pc/multiboot_normal.c: Likewise.
15008
b47efe30 15009 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
15010 attribute `unused'.
f19dbdb7 15011
b47efe30 15012 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
15013 `fdiro' to read the mode information from instead of `diro'.
15014
15015 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
15016 looking up a symlink.
15017
15018 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
15019 macro.
15020 * normal/command.c (grub_command_execute): Don't parse the
15021 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
15022 flags of the command.
15023
15024 * normal/menu.c (grub_menu_run): Fix typo.
15025
da75ac71 150262004-09-14 Hollis Blanchard <hollis@penguinppc.org>
15027
15028 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
15029
15030 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
15031 `y + 1' instead of `y - 1'.
15032
15033 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 15034
062b24c2 150352004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
15036
15037 From Hollis Blanchard <hollis@penguinppc.org>:
15038 * kern/misc.c (memmove): New alias for grub_memmove.
15039 (memcmp): New alias for grub_memcmp.
15040 (memset): New alias for grub_memset.
f19dbdb7 15041 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 15042 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 15043 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 15044 (grub_ieee1275_get_property): Likewise.
f19dbdb7 15045
8ddad845 150462004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
15047
15048 Added normal mode command `chainloader' as module chain.mod, which
15049 depends on normal.mod and _chain.mod.
f19dbdb7 15050
8ddad845 15051 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15052 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15053 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15054 Deleted prototype.
15055 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15056 but arguments parsing moved to ...
15057 (grub_chainloader_cmd): ... here. New function.
15058 * include/grub/i386/pc/chainloader.h: New file.
15059 * loader/i386/pc/chainloader_normal.c: Likewise.
15060
2c1f4ce3 150612004-09-11 Marco Gerards <metgerards@student.han.nl>
15062
15063 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15064 (grub_mkimage_LDFLAGS): Likewise.
15065 (grub_emu_SOURCES): Likewise.
15066 (kernel_img_HEADERS): Added fshelp.h.
15067 * fs/ext2.c: Include <grub/fshelp.h>.
15068 (FILETYPE_REG): New macro.
15069 (FILETYPE_INO_REG): Likewise.
15070 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15071 Changed all users.
15072 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
15073 all users.
15074 (grub_fshelp_node): New struct.
15075 (grub_ext2_data): Added member `diropen'. Changed member `inode'
15076 to a pointer.
15077 (grub_ext2_get_file_block): Removed function.
15078 (grub_ext2_read_block): New function.
15079 (grub_ext2_read_file): Replaced parameter `data' by `node'.
15080 This function was written.
15081 (grub_ext2_mount): Read the root inode. Create a diropen struct.
15082 (grub_ext2_find_file): Removed function.
15083 (grub_ext2_read_symlink): New function.
15084 (grub_ext2_iterate_dir): Likewise.
15085 (grub_ext2_open): Rewritten.
15086 (grub_ext2_dir): Rewritten.
15087 * include/grub/fshelp.h: New file.
15088 * fs/fshelp.c: Likewise.
15089
3c52136a 150902004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
15091
15092 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15093 (print_message): Add a missing newline.
15094 (run_menu): Added timeout support.
15095 (run_menu_entry): New local function.
15096 (grub_menu_run): Added support for booting.
15097
15098 * kern/loader.c (grub_loader_is_loaded): New function.
15099
15100 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15101 (grub_get_rtc): Exported.
15102
15103 * include/grub/i386/pc/time.h: Include grub/symbol.h.
15104 (grub_get_rtc): Exported.
15105
15106 * include/grub/normal.h (struct grub_command_list): Remove
15107 constant from the member `command'.
15108
15109 * include/grub/loader.h (grub_loader_is_loaded): Declared.
15110
15111 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15112
15113 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15114
aa033560 151152004-08-28 Marco Gerards <metgerards@student.han.nl>
15116
15117 Add support for the JFS filesystem.
15118
15119 * fs/jfs.c: New file.
15120 * include/grub/fs.h (grub_jfs_init): New prototype.
15121 (grub_jfs_fini): New prototype.
15122 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15123 (grub_emu_SOURCES): Likewise.
15124 (pkgdata_MODULES): Add jfs.mod.
15125 (jfs_mod_SOURCES): New variable.
15126 (jfs_mod_CFLAGS): Likewise.
15127 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15128 (grubof_SOURCES): Likewise.
15129 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15130
15131 * fs/fat.c (grub_fat_find_dir): Convert the filename little
15132 endian to the host endian.
15133 (grub_fat_utf16_to_utf8): Move function from there...
15134 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 15135 the endianness of the source string anymore.
aa033560 15136 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15137
94bc45af 151382004-08-24 Marco Gerards <metgerards@student.han.nl>
15139
15140 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15141 (grub_boot_fini) [GRUB_UTIL]: Likewise.
15142 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15143 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 15144
94bc45af 15145 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15146 (grub_hfs_iterate_dir): Make the function static. Add prototypes
15147 for `node_found' and `it_dir'.
15148 (grub_hfs_dir): Add prototype for `dir_hook'.
15149
15150 * fs/minix.c (grub_minix_get_file_block): Add prototype for
15151 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
15152 and `indir32' to silence a gcc warning.
15153
15154 * include/grub/fs.h (grub_hfs_init): New prototype.
15155 (grub_hfs_fini): Likewise.
f19dbdb7 15156
15157
97543f08 151582004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15159
15160 Each disk device has its own id now. This is useful to make use
15161 of multiple disk devices.
f19dbdb7 15162
97543f08 15163 * include/grub/disk.h (grub_disk_dev_id): New enum.
15164 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15165 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15166
15167 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15168 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15169
15170 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15171 GRUB_DISK_DEVICE_OFDISK_ID as an id.
15172
15173 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15174 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15175
15176 * include/grub/disk.h (struct grub_disk_dev): Added a new member
15177 "id" which is used by the cache manager.
15178
15179 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15180 of just "GRUB".
15181
64372eb4 151822004-08-18 Marco Gerards <metgerards@student.han.nl>
15183
15184 * fs/hfs.c: New file.
15185 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15186 (grub_emu_SOURCES): Likewise.
15187 (pkgdata_MODULES): Add hfs.mod.
15188 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15189 (grubof_SOURCES): Likewise.
15190 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15191
15192 * include/grub/misc.h (grub_strncasecmp): Add prototype.
15193 * kern/misc.c (grub_strncasecmp): Add function.
15194
cc61b58f 151952004-08-14 Marco Gerards <metgerards@student.han.nl>
15196
15197 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15198 with parentheses.
15199
15200 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15201 (grub_ext2_dir): In case the directory entry type is unknown, read
15202 it from the inode.
15203
0ef123f6 152042004-08-02 Peter Bruin <pjbruin@dds.nl>
15205
15206 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15207 grub_load_linux instead of grub_rescue_cmd_linux as second
15208 argument of grub_rescue_register_command.
15209
15210 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15211
a447c5df 152122004-07-27 Marco Gerards <metgerards@student.han.nl>
15213
15214 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15215 function.
15216 * commands/boot.c: Remove the check for `GRUB_UTIL'.
15217 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15218 `loader/powerpc/ieee1275/linux.c',
15219 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15220 * include/grub/powerpc/ieee1275/ieee1275.h
15221 (grub_ieee1275_release): New prototype.
15222 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15223 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15224 normal, boot, linux and linux_normal.
15225 * loader/powerpc/ieee1275/linux.c: New file.
15226 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15227
5a9e3546 152282004-07-12 Marco Gerards <metgerards@student.han.nl>
15229
15230 * normal/arg.c (grub_arg_parse): Correct error handling after
15231 reallocating the argumentlist (check if `argl' is not null instead
15232 of checking if `args' is not null).
15233 * kern/mm.c (grub_realloc): Return the same pointer when using the
15234 same region, instead of returning the header address.
15235
e15199cb 152362004-07-11 Marco Gerards <metgerards@student.han.nl>
15237
15238 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15239 one block instead of two when looking for the initial partition.
15240 (grub_partition_probe): Initialize the local variable `p' with 0.
15241 Use base 10 for the grub_strtoul call.
15242 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
15243 need for one local variable.
15244 (grub_strtoul): Don't add the new value to `num', instead of that
15245 just assign it.
15246
020616c2 152472004-07-11 Marco Gerards <metgerards@student.han.nl>
15248
15249 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15250 (pxeboot_img_SOURCES): New variable.
15251 (pxeboot_img_ASFLAGS): Likewise.
15252 (pxeboot_img_LDFLAGS): Likewise.
15253 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
15254 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
15255 <lode_leroy@hotmail.com>.
15256
6c51eb64 152572004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15258
15259 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15260 there was no input.
15261
cfb12aff 152622004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15263
15264 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
15265 the history buffer logic.
15266
6eabba74 152672004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15268
15269 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15270 (FILETYPE_INO_SYMLINK): New macros.
15271 (grub_ext2_find_file): Check if the node is a directory using the
15272 inode stat information instead of using the filetype in the
15273 dirent. Exclude the first character of an absolute symlink.
15274 (grub_ext2_dir): Mask out the filetype part of the mode member of
15275 the inode.
15276
66e19ef8 152772004-05-24 Marco Gerards <metgerards@student.han.nl>
15278
15279 Add support for UFS version 1 and 2. Add support for the minix
15280 filesystem version 1 and 2, both the variants with 14 and 30 long
15281 filenames.
f19dbdb7 15282
66e19ef8 15283 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15284 fs/minix.c.
15285 (grub_emu_SOURCES): Likewise.
15286 (pkgdata_MODULES): Add ufs.mod and minix.mod.
15287 (ufs_mod_SOURCES): New variable.
15288 (ufs_mod_CFLAGS): Likewise.
15289 (minix_mod_SOURCES): Likewise.
15290 (minix_mod_CFLAGS): Likewise.
15291 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15292 fs/minix.c.
15293 (grubof_SOURCES): Likewise.
15294 * fs/ufs.c: New file.
15295 * fs/minix.c: New file.
15296 * include/grub/fs.h (grub_ufs_init): New prototype.
15297 (grub_ufs_fini): Likewise.
15298 (grub_minix_init): Likewise.
15299 (grub_minix_fini): Likewise.
15300 * util/grub-emu.c (main): Initialize and deinitialize UFS and
15301 minix fs.
15302
cc2e748a 153032004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
15304
15305 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15306 commands/ls.c, commands/terminal.c, commands/boot.c,
15307 commands/cmp.c and commands/cat.c.
15308 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15309
15310 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15311 "env.h"
15312
4b13b216 153132004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15314
15315 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15316 and grub_, respectively. Because the conversion is trivial and
15317 mechanical, I omit the details here. Please refer to the CVS
15318 if you need more information.
15319
6a142551 153202004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15321
15322 * include/pupa: Renamed to ...
15323 * include/grub: ... this.
15324 * util/i386/pc/pupa-mkimage.c: Renamed to ...
15325 * util/i386/pc/grub-mkimage.c: ... this.
15326 * util/i386/pc/pupa-setup.c: Renamed to ...
15327 * util/i386/pc/grub-setup.c: ... this.
15328 * util/pupa-emu.c: Renamed to ...
15329 * util/grub-emu.c: ... this.
15330
e56cdf21 153312004-03-29 Marco Gerards <metgerards@student.han.nl>
15332
15333 Add support for the newworld apple macintosh (PPC). This has been
15334 tested on the powerbook 2000 only. It only adds support for
15335 generic ieee1275 functions, console and disk support. This should
15336 be easy to port to other architectures with support for Open
15337 Firmware.
f19dbdb7 15338
e56cdf21 15339 * configure.ac: Accept the powerpc as host_cpu. In the case of
15340 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
15341 specific tests are only executed while building for the i386.
15342 Inverse test for crosscompile.
15343 * genmk.rb (Utility): Allow assembler files.
15344 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15345 * conf/powerpc-ieee1275.rmk: New file.
15346 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15347 * disk/powerpc/ieee1275/partition.c: Likewise.
15348 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15349 * include/pupa/powerpc/ieee1275/console.h: Likewise.
15350 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15351 * include/pupa/powerpc/ieee1275/time.h: Likewise.
15352 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15353 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15354 * include/pupa/powerpc/ieee1275/loader.h
15355 * include/pupa/powerpc/setjmp.h: Likewise.
15356 * include/pupa/powerpc/types.h: Likewise.
15357 * kern/powerpc/ieee1275/init.c: Likewise.
15358 * kern/powerpc/ieee1275/openfw.c: Likewise.
15359 * term/powerpc/ieee1275/ofconsole.c: Likewise.
15360
15361 These files were written by Johan Rydberg
15362 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 15363
e56cdf21 15364 * boot/powerpc/ieee1275/cmain.c: New file.
15365 * boot/powerpc/ieee1275/crt0.S: Likewise.
15366 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
15367 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
15368
8c8cc205 153692004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
15370
15371 * Makefile.in: Update copyright.
15372 * genmodsrc.sh: Likewise.
15373 * gensymlist.sh: Likewise.
15374 * term/i386/pc/vga.c: Indent correctly.
15375
15376 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
15377 bugreporting address.
15378 * util/i386/pc/pupa-setup.c (usage): Likewise,
15379 (main): Call pupa_ext2_init and pupa_ext2_fini.
15380
f19dbdb7 15381 * fs/fat.c (log2): Renamed to ...
8c8cc205 15382 (fat_log2): ... this.
15383 All callers changed.
15384 * kern/misc.c (memcpy): Alias to pupa_memmove.
15385 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
15386 lvalue cast.
15387 * util/console.c (pupa_ncurses_fini): Return 0.
15388
15389 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
15390 Move fail label here.
15391 [__GNU__]: Don't warn when using stat.
15392 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
15393 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
15394 long int. Use strtol instead of strtoul.
f19dbdb7 15395
db1771cf 153962004-03-14 Marco Gerards <metgerards@student.han.nl>
15397
15398 * commands/boot.c: New file.
15399 * commands/cat.c: Likewise.
15400 * commands/cmp.c: Likewise.
15401 * commands/ls.c: Likewise.
15402 * commands/terminal.c: Likewise.
15403 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15404 (pupa_register_command): Changed interface to match the new
15405 argument parser.
15406 (pupa_command_execute): Changed (almost rewritten) so it uses
15407 pupa_split_command. Added support for setting variables using the
15408 syntax `foo=bar'.
15409 (rescue_command): Changed to work with the new argument parser.
15410 (terminal_command): Moved from here to commands/terminal.c.
15411 (set_command): New function.
15412 (unset_command): New function.
15413 (insmod_command): New function.
15414 (rmmod_command): New function.
15415 (lsmod_command): New function.
15416 (pupa_command_init): Don't initialize the command terminal
15417 anymore. Initialize the commands set, unset, insmod, rmmod and
15418 lsmod.
15419 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
15420 (kernel_img_HEADERS): Add arg.h and env.h.
15421 (pupa_mkimage_LDFLAGS): Add kern/env.c.
15422 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
15423 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
15424 normal/arg.c.
15425 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
15426 terminal.mod.
15427 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
15428 (boot_mod_SOURCES): New variable.
15429 (terminal_mod_SOURCES): Likewise.
15430 (ls_mod_SOURCES): Likewise.
15431 (cmp_mod_SOURCES): Likewise.
15432 (cat_mod_SOURCES): Likewise.
15433
15434 * normal/arg.c: New file.
15435 * kern/env.c: Likewise.
15436 * include/pupa/arg.h: Likewise.
15437 * include/pupa/env.h: Likewise.
15438 * font/manager.c (font_command): Changed to match argument parsing
15439 interface changes.
15440 (PUPA_MOD_INIT): Likewise.
15441 * hello/hello.c (pupa_cmd_hello): Likewise.
15442 (PUPA_MOD_INIT): Likewise.
15443 * include/pupa/disk.h: Include <pupa/device.h>.
15444 (pupa_print_partinfo): New prototype.
15445 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
15446 (pupa_dl_get_prefix): Likewise.
15447 * include/pupa/misc.h: Include <pupa/err.h>.
15448 (pupa_isgraph): New prototype.
15449 (pupa_isdigit): Likewise.
15450 (pupa_split_cmdline): Likewise.
15451 * include/pupa/normal.h: Include <pupa/arg.h>.
15452 (pupa_command): Changed the prototype of the member `func' to
15453 match the argument parsing interface. Added member `options'.
15454 (pupa_register_command): Updated to match function.
15455 (pupa_arg_parse): New prototype.
15456 (pupa_hello_init) [PUPA_UTIL]: New prototype.
15457 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
15458 (pupa_ls_init) [PUPA_UTIL]: Likewise.
15459 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
15460 (pupa_cat_init) [PUPA_UTIL]: Likewise.
15461 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
15462 (pupa_boot_init) [PUPA_UTIL]: Likewise.
15463 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
15464 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
15465 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
15466 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
15467 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
15468 * kern/disk.c: Include <pupa/file.h>.
15469 (pupa_print_partinfo): New function.
15470 * kern/dl.c: Include <pupa/env.h>.
15471 (pupa_dl_dir): Variable removed.
15472 (pupa_dl_load): Use the environment variable `prefix' instead of
15473 the variable pupa_dl_dir.
15474 (pupa_dl_set_prefix): Function removed.
15475 (pupa_dl_get_prefix): Likewise.
15476 * kern/i386/pc/init.c: Include <pupa/env.h>.
15477 (pupa_machine_init): Use the environment variable `prefix' instead of
15478 using pupa_dl_set_prefix to set the prefix.
15479 * kern/main.c: Include <pupa/env.h>.
15480 (pupa_set_root_dev): Use the environment variable `prefix' instead of
15481 using pupa_dl_get_prefix to get the prefix.
15482 * kern/misc.c: Include <pupa/env.h>.
15483 (pupa_isdigit): New function.
15484 (pupa_isgraph): Likewise.
15485 (pupa_ftoa): Likewise.
15486 (pupa_vsprintf): Added support for printing values of the type
15487 `double'. Make it possible to format variable output when using
15488 formatting like `%1.2%f'.
15489 (pupa_split_cmdline): New function.
15490 * kern/rescue.c: Include <pupa/env.h>.
15491 (next_word): Removed function.
15492 (pupa_rescue_cmd_prefix): Likewise.
15493 (pupa_rescue_cmd_set): New function.
15494 (pupa_rescue_cmd_unset): New function.
15495 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
15496 split the command line instead of splitting it here. Added
15497 support for setting variables using the syntax `foo=bar'. Don't
15498 initialize the prefix command anymore. Initialized the set and
15499 unset commands.
15500 * normal/cmdline.c: Include <pupa/env.h>.
15501 (pupa_tab_complete): Added prototypes for print_simple_completion,
15502 print_partition_completion, add_completion, iterate_commands,
15503 iterate_dev, iterate_part and iterate_dir. Moved code to print
15504 partition information from here to kern/disk.c.
fe6b695a 15505 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 15506 * normal/main.c: Include <pupa/env.h>.
15507 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
15508 instead of using pupa_dl_get_prefix to get the prefix.
15509 * term/i386/pc/vga.c: Include <pupa/arg.h>.
15510 (check_vga_mem): Cast pointers to `void *' to silence a gcc
15511 warning.
15512 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
15513 (pupa_vga_setcolor): Declare unused variables with `__attribute__
15514 ((unused))' to silence a gcc warning.
15515 (pupa_vga_setcolor): Likewise.
15516 (debug_command): Changed to match argument parsing
15517 interface changes.
15518 * util/pupa-emu.c: Include <pupa/env.h>.
15519 (options): Added 0's for unused fields to silence a gcc warning.
15520 (argp): Likewise.
15521 (main): Use the environment variable `prefix' instead of using
15522 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
15523 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
15524 and terminal.
15525
15526 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
15527 * util/misc.c: Include <malloc.h>.
15528 (pupa_malloc): Rewritten so errors are correctly reported.
15529 (pupa_realloc): Likewise.
15530 (pupa_memalign): Likewise.
15531 (pupa_mm_init_region): Declare unused variables with
15532 `__attribute__ ((unused))' to silence a gcc warning.
15533 * normal/i386/setjmp.S: Remove tab at the end of the file to
15534 silence a gcc warning.
15535 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
15536 variables with `__attribute__ ((unused))' to silence a gcc
15537 warning.
15538 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
15539 local variable i unsigned to silence a gcc warning.
15540
15541 * kern/term.c: Include <pupa/misc.h>.
15542 (pupa_more_lines): New variable.
15543 (pupa_more): Likewise.
15544 (pupa_putcode): When the pager is active pause at the end of every
15545 screen.
15546 (pupa_set_more): New function.
15547 * include/pupa/term.h (pupa_set_more): New prototype.
15548
15549
3b1139cb 155502004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
15551
15552 Now this project is GRUB 2 rather than PUPA. The location of
15553 the CVS repository was moved to GRUB's.
f19dbdb7 15554
3b1139cb 15555 * configure.ac: Use bug-grub as the reporting address.
15556 Use GRUB instead of PUPA.
15557 Change the version number to 1.90.
15558
8367695c 155592004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
15560
15561 * genkernsyms.sh: Updated copyright information.
15562 * genmk.rb: Likewise.
15563 * genmodsrc.sh: Likewise.
15564 * gensymlist.sh: Likewise.
15565 * boot/i386/pc/boot.S: Likewise.
15566 * boot/i386/pc/diskboot.S: Likewise.
15567 * disk/i386/pc/biosdisk.c: Likewise.
15568 * disk/i386/pc/partition.c: Likewise.
15569 * font/manager.c: Likewise.
15570 * fs/ext2.c: Likewise.
15571 * fs/fat.c: Likewise.
15572 * include/pupa/boot.h: Likewise.
15573 * include/pupa/device.h: Likewise.
15574 * include/pupa/disk.h: Likewise.
15575 * include/pupa/dl.h: Likewise.
15576 * include/pupa/elf.h: Likewise.
15577 * include/pupa/err.h: Likewise.
15578 * include/pupa/file.h: Likewise.
15579 * include/pupa/font.h: Likewise.
15580 * include/pupa/fs.h: Likewise.
15581 * include/pupa/kernel.h: Likewise.
15582 * include/pupa/loader.h: Likewise.
15583 * include/pupa/misc.h: Likewise.
15584 * include/pupa/mm.h: Likewise.
15585 * include/pupa/net.h: Likewise.
15586 * include/pupa/normal.h: Likewise.
15587 * include/pupa/rescue.h: Likewise.
15588 * include/pupa/setjmp.h: Likewise.
15589 * include/pupa/symbol.h: Likewise.
15590 * include/pupa/term.h: Likewise.
15591 * include/pupa/types.h: Likewise.
15592 * include/pupa/i386/setjmp.h: Likewise.
15593 * include/pupa/i386/types.h: Likewise.
15594 * include/pupa/i386/pc/biosdisk.h: Likewise.
15595 * include/pupa/i386/pc/boot.h: Likewise.
15596 * include/pupa/i386/pc/console.h: Likewise.
15597 * include/pupa/i386/pc/init.h: Likewise.
15598 * include/pupa/i386/pc/kernel.h: Likewise.
15599 * include/pupa/i386/pc/linux.h: Likewise.
15600 * include/pupa/i386/pc/loader.h: Likewise.
15601 * include/pupa/i386/pc/memory.h: Likewise.
15602 * include/pupa/i386/pc/multiboot.h: Likewise.
15603 * include/pupa/i386/pc/partition.h: Likewise.
15604 * include/pupa/i386/pc/time.h: Likewise.
15605 * include/pupa/i386/pc/vga.h: Likewise.
15606 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
15607 * include/pupa/util/getroot.h: Likewise.
15608 * include/pupa/util/misc.h: Likewise.
15609 * include/pupa/util/resolve.h: Likewise.
15610 * kern/device.c: Likewise.
15611 * kern/disk.c: Likewise.
15612 * kern/dl.c: Likewise.
15613 * kern/err.c: Likewise.
15614 * kern/file.c: Likewise.
15615 * kern/fs.c: Likewise.
15616 * kern/loader.c: Likewise.
15617 * kern/main.c: Likewise.
15618 * kern/misc.c: Likewise.
15619 * kern/mm.c: Likewise.
15620 * kern/rescue.c: Likewise.
15621 * kern/term.c: Likewise.
15622 * kern/i386/dl.c: Likewise.
15623 * kern/i386/pc/init.c: Likewise.
15624 * kern/i386/pc/lzo1x.S: Likewise.
15625 * kern/i386/pc/startup.S: Likewise.
15626 * loader/i386/pc/chainloader.c: Likewise.
15627 * loader/i386/pc/linux.c: Likewise.
15628 * loader/i386/pc/multiboot.c: Likewise.
15629 * normal/cmdline.c: Likewise.
15630 * normal/command.c: Likewise.
15631 * normal/main.c: Likewise.
15632 * normal/menu.c: Likewise.
15633 * normal/i386/setjmp.S: Likewise.
15634 * term/i386/pc/console.c: Likewise.
15635 * term/i386/pc/vga.c: Likewise.
15636 * util/console.c: Likewise.
15637 * util/genmoddep.c: Likewise.
15638 * util/misc.c: Likewise.
15639 * util/pupa-emu.c: Likewise.
15640 * util/resolve.c: Likewise.
15641 * util/unifont2pff.rb: Likewise.
15642 * util/i386/pc/biosdisk.c: Likewise.
15643 * util/i386/pc/getroot.c: Likewise.
15644 * util/i386/pc/pupa-mkimage.c: Likewise.
15645 * util/i386/pc/pupa-setup.c: Likewise.
15646
e6eced71 156472004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
15648
15649 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
15650 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
15651 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
15652 reading and reset it after reading.
15653 (pupa_ext2_close): Return PUPA_ERR_NONE.
15654
15655 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
15656 Correct value.
15657 (struct linux_kernel_header): Add kernel_version and
15658 initrd_addr_max.
15659 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
15660 pupa_file_read succeeds.
15661 (pupa_rescue_cmd_initrd): Implement.
15662
5aded270 156632003-12-03 Marco Gerards <metgerards@student.han.nl>
15664
15665 * fs/ext2.c (pupa_ext2_label): New function.
15666 (pupa_ext2_fs): Added label.
15667 * fs/fat.c (pupa_fat_label): New function.
15668 (pupa_fat_fs): Added label.
15669 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
15670
15671 * kern/misc.c (pupa_strndup): New function.
15672 * include/pupa/misc.h (pupa_strndup): New prototype.
15673
15674 * include/pupa/normal.h: Include <pupa/err.h>.
15675 (pupa_set_history): New prototype.
15676 (pupa_iterate_commands): New prototype.
15677 * normal/cmdline.c: Include <pupa/machine/partition.h>,
15678 <pupa/disk.h>, <pupa/file.h>.
15679 (hist_size): New variable.
15680 (hist_lines): Likewise.
15681 (hist_end): Likewise.
15682 (hist_used): Likewise.
15683 (pupa_set_history): New function.
15684 (pupa_history_get): Likewise.
15685 (pupa_history_add): Likewise.
15686 (pupa_history_replace): Likewise.
15687 (pupa_tab_complete): Likewise.
15688 (pupa_cmdline_run): Added tab completion and history buffer. Tab
15689 completion shows partitionnames while completing partitions, this
15690 feature was suggested by Jeff Bailey.
15691 * normal/command.c (pupa_iterate_commands): New function.
15692 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
15693 (pupa_normal_init): Initialize history buffer.
15694 (PUPA_MOD_INIT): Likewise.
15695 (pupa_normal_fini): Free the history buffer.
15696 (PUPA_MOD_FINI): Likewise.
15697
15698 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
15699 key.
15700
15701 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
15702 * configure.ac [i386]: Check for regparam bug.
15703 (NESTED_FUNC_ATTR) [! i386]: Defined.
15704
1f7315a3 157052003-11-17 Marco Gerards <metgerards@student.han.nl>
15706
15707 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
15708 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
15709 (pupa_emu_SOURCES): New variable.
15710 (pupa_emu_LDFLAGS): Likewise.
15711 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
15712 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
15713 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
15714 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15715 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
15716 (pupa_jmp_buf): New typedef.
15717 (pupa_setjmp) [PUPA_UTIL]: New macro.
15718 (pupa_longjmp) [PUPA_UTIL]: Likewise.
15719 * include/pupa/term.h (struct pupa_term): New member `refresh'.
15720 (pupa_refresh): New prototype.
15721 * include/pupa/util/getroot.h: New file.
15722 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
15723 it.
15724 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
15725 (pupa_rescue_cmd_cat): Likewise.
15726 (pupa_rescue_cmd_ls): Likewise.
15727 (pupa_rescue_cmd_testload): Likewise.
15728 (pupa_rescue_cmd_lsmod): Likewise.
15729 * normal/cmdline.c (pupa_cmdline_get): Likewise.
15730 * normal/menu.c (run_menu): Likewise.
15731 * kern/term.c (pupa_cls): Likewise.
15732 (pupa_refresh): New function.
15733 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
15734 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15735 * util/console.c: New file.
f19dbdb7 15736
1f7315a3 15737 * util/i386/pc/getroot.c: New file.
15738 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
15739 (pupa_putchar): New function.
15740 (pupa_refresh): Likewise.
15741 (xgetcwd): Function moved to ...
15742 (strip_extra_slashes): Likewise.
15743 (get_prefix): Likewise.
f19dbdb7 15744 * util/i386/pc/getroot.c: ... here.
1f7315a3 15745 (find_root_device): Function moved and renamed to...
15746 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
15747 Changed all callers.
15748 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
15749 and renamed to...
15750 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
15751 Changed all callers.
15752 * util/misc.c (pupa_memalign): New function.
15753 (pupa_mm_init_region): Likewise.
15754 (pupa_register_exported_symbols): Likewise.
15755 (pupa_putchar): Function removed.
15756 * util/pupa-emu.c: New file.
15757
9a5c1ade 157582003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
15759
15760 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
15761 (_multiboot_mod_SOURCES): New variable.
15762 (_multiboot_mod_CFLAGS): Likewise.
15763 * loader/i386/pc/multiboot.c: New file.
15764 * include/pupa/i386/pc/multiboot.h: Likewise.
15765 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
15766 (pupa_multiboot_real_boot): New function.
15767 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
15768 (pupa_multiboot_real_boot): New prototype.
15769 (pupa_rescue_cmd_multiboot): Likewise
15770 (pupa_rescue_cmd_module): Likewise.
15771
15772 * kern/loader.c (pupa_loader_set): Continue when
15773 pupa_loader_unload_func() fails.
15774 (pupa_loader_unset): New function.
15775 * include/pupa/loader.h (pupa_loader_unset): New prototype.
15776
15777 * kern/misc.c (pupa_stpcpy): New function.
15778 * include/pupa/misc.h (pupa_stpcpy): New prototype.
15779
8e72a9c0 157802003-11-12 Marco Gerards <metgerards@student.han.nl>
15781
15782 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
15783 for available extensions.
15784
15785 * include/pupa/i386/pc/time.h: New file.
15786 * kern/disk.c: Include <pupa/machine/time.h>.
15787 (PUPA_CACHE_TIMEOUT): New macro.
15788 (pupa_last_time): New variable.
15789 (pupa_disk_open): Flush the cache when there was a timeout.
15790 (pupa_disk_close): Reset the timer.
15791 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
15792 pupa_currticks.
15793 * util/misc.c: Include <sys/times.h>
15794 (pupa_get_rtc): New function.
15795
c4adbd32 157962003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
15797
15798 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
15799 as blocks.
15800 (pupa_ext2_get_file_block): Use blocks member.
15801
15802 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
15803 first block. Return -1 instead of pupa_errno on error.
15804
bfd30f06 158052003-10-27 Marco Gerards <metgerards@student.han.nl>
15806
15807 * README: In the pupa-mkimage example use _chain instead of chain
15808 and ext2 instead of fat.
15809 * TODO: Replace ext2fs with jfs as an example. Add an item for
15810 adding journal playback for ext2fs.
15811 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
15812 (pkgdata_MODULES): Added ext2.mod.
15813 (ext2_mod_SOURCES): New variable.
15814 (ext2_mod_CFLAGS): Likewise.
15815 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
15816 * include/pupa/misc.h (pupa_strncpy): New prototype.
15817 (pupa_strcat): Likewise.
15818 (pupa_strncmp): Likewise.
15819 * kern/misc.c (pupa_strcat): Enable function.
15820 (pupa_strncpy): New function.
15821 (pupa_strncmp): Likewise.
15822 * fs/ext2.c: New file.
f19dbdb7 15823
bfd30f06 15824 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
15825 when the read failed before retrying.
15826 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
15827 (_FILE_OFFSET_BITS): Likewise.
15828 * configure.ac: Added AC_SYS_LARGEFILE.
15829
98d15063 158302003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
15831
15832 * genmk.rb (PModule#rule): Make sure to get only symbol names
15833 from the output of nm.
15834 Reported by Robert Millan <zeratul2@wanadoo.es>.
15835
18d9c7cd 158362003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
15837
15838 I forgot to check in these changes for a long time. This adds
15839 incomplete support for VGA console, and this is still very
15840 buggy. Also, a lot of consideration is required for I18N,
15841 UNICODE, and VGA font issues. Therefore, assume that this is
15842 such that "better than nothing".
f19dbdb7 15843
18d9c7cd 15844 * font/manager.c: New file.
15845 * include/pupa/font.h: Likewise.
15846 * include/pupa/i386/pc/vga.h: Likewise.
15847 * term/i386/pc/vga.c: Likewise.
15848 * util/unifont2pff.rb: Likewise.
15849
15850 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
15851 (pkgdata_MODULES): Added vga.mod and font.mod.
15852 (vga_mod_SOURCES): New variables.
15853 (vga_mod_CFLAGS): Likewise.
15854 (font_mod_SOURCES): Likewise.
15855 (font_mod_CFLAGS): Likewise.
15856
15857 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
15858
15859 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 15860 (struct pupa_term): Added init and fini.
18d9c7cd 15861 Changed the argument of putchar to pupa_uint32_t.
15862
15863 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
15864 (pupa_console_real_putchar): New prototype.
15865 (pupa_console_putchar): Removed.
15866 (pupa_console_checkkey): Exported.
15867 (pupa_console_getkey): Likewise.
15868
15869 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
15870 characters.
15871
15872 * kern/term.c (pupa_term_set_current): Rewritten.
15873 (pupa_putchar): Likewise.
15874 (pupa_putcode): New function.
15875
15876 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
15877 (pupa_console_real_putchar): ... this.
15878 (pupa_vga_set_mode): New function.
15879 (pupa_vga_get_font): Likewise.
15880
15881 * normal/command.c: Include pupa/term.h.
15882 (terminal_command): New function.
15883 (pupa_command_init): Register the command "terminal".
15884
15885 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
15886 (DISP_UP): Likewise.
15887 (DISP_RIGHT): Likewise.
15888 (DISP_DOWN): Likewise.
15889 (DISP_HLINE): Likewise.
15890 (DISP_VLINE): Likewise.
15891 (DISP_UL): Likewise.
15892 (DISP_UR): Likewise.
15893 (DISP_LL): Likewise.
15894 (DISP_LR): Likewise.
15895
15896 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 15897
977329f5 158982003-02-08 NIIBE Yutaka <gniibe@m17n.org>
15899
15900 * util/resolve.c (pupa_util_resolve_dependencies): BUG
15901 FIX. Reverse the path_list.
15902
15903 * include/pupa/normal.h: Export pupa_register_command and
15904 pupa_unregister_command.
15905
15906 * hello/hello.c (pupa_cmd_hello): New module.
15907 * conf/i386-pc.rmk: Added hello.mod.
15908
1f5ab428 159092003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
15910
15911 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 15912
1f5ab428 15913 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
15914 (compress_kernel): New variable.
15915 (generate_image): Heavily modified to support compressing a
15916 large part of the core image.
15917
15918 * util/misc.c (pupa_util_read_image): Fix a file descriptor
15919 leak.
15920 (pupa_util_load_image): New function.
15921
15922 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
15923 (pupa_compressed_size): New variable.
15924 (codestart): Enable Gate A20 here.
15925 Decompress the compressed part of the core image.
15926 Rearrange the code to put functions and variables which are
15927 required for initialization in the non-compressed part.
15928 Include lzo1x.S.
15929
15930 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
15931 here.
15932
15933 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
15934
f19dbdb7 15935 * include/pupa/i386/pc/kernel.h
1f5ab428 15936 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
15937 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
15938 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15939 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15940 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
15941
15942 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
15943
15944 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
15945 (Utility#rule): Likewise.
15946
15947 * configure.ac: Check if LZO is available.
15948
ce5bf700 159492003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
15950
15951 * include/pupa/normal.h: New file.
15952 * include/pupa/setjmp.h: Likewise.
15953 * include/pupa/i386/setjmp.h: Likewise.
15954 * normal/cmdline.c: Likewise.
15955 * normal/command.c: Likewise.
15956 * normal/main.c: Likewise.
15957 * normal/menu.c: Likewise.
15958 * normal/i386/setjmp.S: Likewise.
f19dbdb7 15959
ce5bf700 15960 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
15961 (pupa_rescue_cmd_initrd): Likewise.
15962
15963 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
15964 Likewise.
15965
15966 * kern/i386/pc/startup.S (translation_table): New variable.
15967 (translate_keycode): New function.
15968 (pupa_console_getkey): Call translate_keycode.
15969
15970 * kern/rescue.c (attempt_normal_mode): New function.
15971 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
15972 it failed, print a message.
15973
15974 * kern/mm.c (pupa_real_malloc): Print more information when a
15975 free magic is broken.
15976 (pupa_free): If the first free header is not free actually, set
15977 it to P.
15978
15979 * kern/main.c (pupa_load_normal_mode): Just load the module
15980 "normal".
15981 (pupa_main): Don't print the message
15982 "Entering into rescue mode..." here.
15983
15984 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
15985 Declared.
15986 (pupa_rescue_cmd_initrd): Likewise.
15987 (pupa_rescue_cmd_initrd): Likewise.
15988
15989 * include/pupa/symbol.h (FUNCTION): Specify the type.
15990 (VARIABLE): Likewise.
15991
15992 * include/pupa/err.h (pupa_err_t): Added
15993 PUPA_ERR_UNKNOWN_COMMAND.
15994
15995 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
15996 (pupa_dl_get_prefix): Likewise.
15997
15998 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
15999 Added _chain.mod and _linux.mod instead of chain.mod and
16000 linux.mod.
16001 (chain_mod_SOURCES): Renamed to ...
16002 (_chain_mod_SOURCES): ... this.
16003 (chain_mod_CFLAGS): Renamed to ...
16004 (_chain_mod_CFLAGS): ... this.
16005 (linux_mod_SOURCES): Renamed to ...
16006 (_linux_mod_SOURCES): ... this.
16007 (linux_mod_CFLAGS): Renamed to ...
16008 (_linux_mod_CFLAGS): ... this.
16009 (normal_mod_SOURCES): New variable.
16010 (normal_mod_CFLAGS): Likewise.
16011 (normal_mod_ASFLAGS): Likewise.
16012
160132003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
16014
16015 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
16016 possible.
16017
fe6b695a 16018 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 16019 recursively.
16020 (pupa_dl_unref): Unrefer depending modules recursively.
16021 Don't call pupa_dl_unload implicitly, because PUPA can crash if
16022 a module is unloaded before one depending on that module is
16023 unloaded.
16024 (pupa_dl_unload): Unload depending modules explicitly,
16025 if possible.
16026
c04da074 160272003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
16028
16029 * include/pupa/i386/pc/linux.h: New file.
16030 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 16031
c04da074 16032 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
16033 Removed.
16034 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
16035 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16036 of PUPA_CHAINLOADER_BOOT_SECTOR.
16037
16038 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16039 (pupa_linux_prot_size): New variable.
16040 (pupa_linux_tmp_addr): Likewise.
16041 (pupa_linux_real_addr): Likewise.
16042 (pupa_linux_boot_zimage): New function.
16043 (pupa_linux_boot_bzimage): Likewise.
16044
16045 * kern/i386/pc/init.c (struct mem_region): New structure.
16046 (MAX_REGIONS): New macro.
16047 (mem_regions): New variable.
16048 (num_regions): Likewise.
16049 (pupa_os_area_addr): Likewise.
16050 (pupa_os_area_size): Likewise.
16051 (pupa_lower_mem): Likewise.
16052 (pupa_upper_mem): Likewise.
16053 (add_mem_region): New function.
16054 (compact_mem_regions): Likewise.
16055 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16056 the size of the conventional memory and that of so-called upper
16057 memory (before the first memory hole).
16058 Instead of adding each found region to free memory, use
16059 add_mem_region and add them after removing overlaps.
16060 Also, add only 1/4 of the upper memory to free memory. The rest
16061 is used for loading OS images. Maybe this is ad hoc, but this
16062 makes it much easier to relocate OS images when booting.
16063
16064 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16065 (pupa_enter_rescue_mode): Don't register initrd and module.
16066
16067 * kern/mm.c: Include pupa/dl.h.
16068
16069 * kern/main.c: Include pupa/file.h and pupa/device.h.
16070
16071 * kern/loader.c (pupa_loader_load_module_func): Removed.
16072 (pupa_loader_load_module): Likewise.
16073
16074 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16075 ``.o''.
16076
16077 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16078 (pupa_linux_tmp_addr): Likewise.
16079 (pupa_linux_real_addr): Likewise.
16080 (pupa_linux_boot_zimage): Likewise.
16081 (pupa_linux_boot_bzimage): Likewise.
16082
16083 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16084 (pupa_upper_mem): Likewise.
16085 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16086 module is too dangerous.
16087
16088 * include/pupa/loader.h (pupa_os_area_addr): Declared.
16089 (pupa_os_area_size): Likewise.
16090 (pupa_loader_set): Remove the first argument. Loader doesn't
16091 manage modules or initrd any longer.
16092 (pupa_loader_load_module): Removed.
16093
16094 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16095 (linux_mod_SOURCES): New variable.
16096 (linux_mod_CFLAGS): Likewise.
16097
a13f9237 160982003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
16099
16100 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16101 the length of a blocklist correctly.
16102
16103 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16104 Use ioctl only if the OS file is a block device.
16105 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16106 not very useful for normal files.
16107
16108 * kern/main.c (pupa_set_root_dev): New function.
16109 (pupa_load_normal_mode): Likewise.
16110 (pupa_main): Call those above.
16111
16112 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16113 pupa_uint16_t.
16114
16115 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16116
a5ffe966 161172003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
16118
16119 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16120 (setup): Configure the installed partition information and the
16121 dl prefix.
16122
16123 * loader/i386/pc/chainloader.c (my_mod): New variable.
16124 (pupa_chainloader_unload): New function.
16125 (pupa_rescue_cmd_chainloader): Refer itself.
16126 (PUPA_MOD_INIT): Save its own module in MY_MOD.
16127
16128 * kern/i386/pc/startup.S (install_partition): Removed.
16129 (version_string): Likewise.
16130 (config_file): Likewise.
16131 (pupa_install_dos_part): New variable.
16132 (pupa_install_bsd_part): Likewise.
16133 (pupa_prefix): Likewise.
16134 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16135
16136 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16137 and pupa/misc.h.
16138 (make_install_device): New function.
16139 (pupa_machine_init): Set the dl prefix.
16140
16141 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16142 (buf): Renamed to ...
16143 (linebuf): ... this.
16144 (pupa_rescue_cmd_prefix): New function.
16145 (pupa_rescue_cmd_insmod): Likewise.
16146 (pupa_rescue_cmd_rmmod): Likewise.
16147 (pupa_rescue_cmd_lsmod): Likewise.
16148 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16149 rmmod and lsmod.
16150
16151 * kern/mm.c (pupa_memalign): If failed even after invalidating
16152 disk caches, unload unneeded modules and retry.
16153
16154 * kern/misc.c (pupa_memmove): New function.
16155 (pupa_memcpy): Removed.
16156 (pupa_strcpy): New function.
16157 (pupa_itoa): Made static.
16158
16159 * kern/dl.c (pupa_dl_iterate): New function.
16160 (pupa_dl_ref): Likewise.
16161 (pupa_dl_unref): Likewise.
16162 (pupa_dl_unload): Return if succeeded or not.
16163 (pupa_dl_unload_unneeded): New function.
16164 (pupa_dl_unload_all): Likewise.
16165 (pupa_dl_init): Renamed to ...
16166 (pupa_dl_set_prefix): ... this.
16167 (pupa_dl_get_prefix): New function.
16168
16169 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16170 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16171 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16172 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16173 (pupa_install_dos_part): Declared.
16174 (pupa_install_bsd_part): Likewise.
16175 (pupa_prefix): Likewise.
16176 (pupa_boot_drive): Likewise.
16177
16178 * include/pupa/types.h: Fix a typo.
16179
16180 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16181 pupa_memmove.
16182 (pupa_memmove): Declared.
16183 (pupa_strcpy): Likewise.
16184
16185 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16186 pupa_mod_init takes one argument, its own module.
16187 (pupa_dl_unload_unneeded): Declared.
16188 (pupa_dl_unload_all): Likewise.
16189 (pupa_dl_ref): Likewise.
16190 (pupa_dl_unref): Likewise.
16191 (pupa_dl_iterate): Likewise.
16192 (pupa_dl_init): Renamed to ...
16193 (pupa_dl_set_prefix): ... this.
16194 (pupa_dl_get_prefix): Declared.
16195
16196 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 16197 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 16198 unloaded.
16199 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16200 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16201
16202 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16203 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16204
012d7999 162052003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16206
16207 * util/i386/pc/pupa-setup.c (setup): Define the internal
16208 function find_first_partition_start at the top level, because GCC
16209 3.0.x cannot compile internal functions in deeper scopes
16210 correctly.
16211 (find_root_device): Use lstat instead of stat.
16212 Don't follow symbolic links.
16213 Fix the path-constructing code.
16214
16215 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16216 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16217 by a BLKGETSIZE ioctl first, because block devices don't fill
16218 the member st_mode of the structure stat on Linux.
16219 [__linux__] (linux_find_partition): Use a temporary buffer
16220 REAL_DEV for the working space. Copy it to DEV before returning.
16221 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16222 buffer cache consistent.
16223 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16224 strncmp. The previous value was merely wrong.
16225 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16226
16227 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16228 FAT size is 12. The previous value was merely wrong.
16229
16230 * kern/main.c (pupa_main): Don't split the starting message from
16231 newlines.
16232
16233 * kern/term.c (pupa_putchar): Put CR after LF instead of before
16234 LF, because BIOS goes crazy about character attributes in this
16235 case.
16236
1cc73a62 162372003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16238
16239 * include/i386/pc/util/biosdisk.h: New file.
16240 * util/i386/pc/biosdisk.c: Likewise.
16241 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 16242
1cc73a62 16243 * Makefile.in (INCLUDE_DISTFILES): Added
16244 include/pupa/i386/pc/util/biosdisk.h.
16245 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16246 directory util/i386/pc.
16247 (install-local): Added a rule for sbin_UTILITIES.
16248 (uninstall): Likewise.
16249
16250 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16251
16252 * util/misc.c (xrealloc): New function.
16253 (pupa_malloc): Likewise.
16254 (pupa_free): Likewise.
16255 (pupa_realloc): Likewise.
16256 (pupa_stop): Likewise.
16257 (pupa_putchar): Likewise.
16258
16259 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16260
16261 * include/pupa/util/misc.h (xrealloc): Declared.
16262
16263 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16264 macro.
16265 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16266 (PUPA_BOOT_MACHINE_BPB_END): ... this.
16267
16268 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16269 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16270
16271 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16272 way should be implemented.
16273 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16274
16275 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16276 the size of NAME for safety.
16277 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16278 0x88.
16279
16280 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16281 (pupa_setup_SOURCES): Likewise.
16282
16283 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16284
08b70fe8 162852002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16286
16287 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16288 bunch of pushl's from pusha, because this destroys the return
16289 value.
16290
62ddcc8f 162912002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16292
16293 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16294 This means that any missing prototypes could be fatal. Also, you
16295 must take care when writing assembly code. See the comments at
16296 the beginning of startup.S, for more details.
f19dbdb7 16297
62ddcc8f 16298 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16299 compilation mechanism.
16300 (pupa_chainloader_real_boot): Likewise.
16301 (pupa_biosdisk_rw_int13_extensions): Likewise.
16302 (pupa_biosdisk_rw_standard): Likewise.
16303 (pupa_biosdisk_check_int13_extensions): Likewise.
16304 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16305 (pupa_biosdisk_get_diskinfo_standard): Likewise.
16306 (pupa_get_memsize): Likewise.
16307 (pupa_get_mmap_entry): Likewise.
16308 (pupa_console_putchar): Likewise.
16309 (pupa_console_setcursor): Likewise.
16310 (pupa_getrtsecs): Use pushl instead of push.
16311
16312 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16313 memory instead of the stack for a mmap entry, because some
16314 BIOSes may ignore the maximum size and overflow.
16315
16316 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16317
16318 * genmk.rb (PModule#rule): Compile automatically generated
16319 sources with module-specific CFLAGS as well as other sources.
16320
9962ed99 163212002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16322
16323 * configure.ac: Check ld.
16324 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16325 respectively, before checking endianness and sizes.
16326
16327 * Makefile.in (LD): New variable.
f19dbdb7 16328
abdfc3c5 163292002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16330
16331 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16332
6a161fa9 163332002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16334
16335 * Changelog: New file.
16336