]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-05-03 Bean <bean123ch@gmail.com>
[grub2.git] / ChangeLog
CommitLineData
038c5720 12009-05-03 Bean <bean123ch@gmail.com>
2
3 * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
4 after we get the result of if statement.
5
fc45fb58 62009-05-03 Bean <bean123ch@gmail.com>
7
8 * Makefile.in (enable_efiemu): New variable.
9
10 * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
11 set.
12 (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
13 path.
14 (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
15 path, add -mno-red-zone option.
16 (efiemu64_s.o): Likewise.
17 (efiemu64.o): Use macro $^ for source file.
18
19 * configure.ac (--enable-efiemu): New option.
20
bbee0f2b 212009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
22
23 xnu support
24
25 * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
26 (pkglib_MODULES): add xnu.mod
27 (xnu_mod_SOURCES): new variable
28 (xnu_mod_CFLAGS): likewise
29 (xnu_mod_LDFLAGS): likewise
30 (xnu_mod_ASFLAGS): likewise
31 * conf/i386-pc.rmk: likewise
32 * conf/x86_64-efi.rmk: likewise
7dd4a573 33 * include/grub/efi/efi.h (grub_efi_finish_boot_services):
bbee0f2b 34 new declaration
35 * include/grub/i386/macho.h: new file
36 * include/grub/i386/xnu.h: likewise
37 * include/grub/macho.h: likewise
38 * include/grub/machoload.h: likewise
39 * include/grub/x86_64/macho.h: likewise
40 * include/grub/x86_64/xnu.h: likewise
41 * include/grub/xnu.h: likewise
42 * kern/efi/efi.c (grub_efi_finish_boot_services): new function
43 * kern/efi/mm.c (MAX_HEAP_SIZE): increase
44 * loader/i386/efi/xnu.c: new file
45 * loader/i386/pc/xnu.c: likewise
46 * loader/i386/xnu.c: likewise
47 * loader/i386/xnu_helper.S: likewise
48 * loader/macho.c: likewise
49 * loader/xnu.c: likewise
50 * loader/xnu_resume.c: likewise
51 * util/grub-dumpdevtree: likewise
52 * include/grub/i386/pit.h: include grub/err.h
53 (grub_pit_wait): export
54 * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
7dd4a573 55
5caf964d 562009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
57
58 Efiemu
7dd4a573 59
5caf964d 60 * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
7dd4a573 61 _linux_efi, linux_efi.
62 new files in grub-emu
5caf964d 63 new targets efiemu32.o and efiemu64.o
64 * loader/linux_normal_efiemu.c: likewise
65 * loader/i386/efi/linux.c: added preliminary efiemu support
7dd4a573 66 * util/i386/pc/grub-install.in: add efiemu??.o to the list of
5caf964d 67 files to copy
68 * include/grub/autoefi.h: new file
7dd4a573 69 * include/grub/i386/efiemu.h: likewise
5caf964d 70 * include/grub/i386/pc/efiemu.h: likewise
71 * include/grub/efi/api.h: add LL suffix when necessary
72 new definitions relating to tables
73 * include/grub/efiemu/efiemu.h: new file
74 * include/grub/efiemu/runtime.h: likewise
75 * efiemu/prepare.c: likewise
76 * efiemu/loadcore_common.c: likewise
77 * efiemu/loadcore64.c: likewise
78 * efiemu/runtime/efiemu.sh: likewise
79 * efiemu/runtime/efiemu.S: likewise
80 * efiemu/runtime/efiemu.c: likewise
81 * efiemu/runtime/config.h: likewise
82 * efiemu/prepare32.c: likewise
83 * efiemu/main.c: likewise
84 * efiemu/modules/pnvram.c: likewise
85 * efiemu/modules/i386: likewise
86 * efiemu/modules/i386/pc: likewise
87 * efiemu/modules/acpi.c: likewise
88 * efiemu/i386/pc/cfgtables.c: likewise
89 * efiemu/i386/loadcore64.c: likewise
90 * efiemu/i386/loadcore32.c: likewise
91 * efiemu/prepare64.c: likewise
92 * efiemu/loadcore.c: likewise
93 * efiemu/symbols.c: likewise
94 * efiemu/mm.c: likewise
95 * efiemu/loadcore32.c: likewise
7dd4a573 96
972009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
f8efe3ad 98
99 ACPI spoofing
100
101 * commands/acpi.c: new file
102 * commands/i386/pc/acpi.c: likewise
103 * commands/efi/acpi.c: likewise
104 * include/grub/acpi.h: likewise
105 * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
106 (acpi_mod_SOURCES): new variable
107 (acpi_mod_CFLAGS): likewise
108 (acpi_mod_LDFLAGS): likewise
109 * conf/i386-efi.rmk: likewise
110 * conf/x86_64-efi.rmk: likewise
111
7dd4a573 1122009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
28a85665 113
114 Missing part from mmap patch
115
116 * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
117 (grub_mmap_unregister)
118 (grub_mmap_free_and_unregister): use grub_mmap_register
119
7dd4a573 1202009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
09d842b9 121
122 Mmap services
123
124 * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
125 * loader/i386/linux.c (find_mmap_size): likewise
126 (allocate_pages): likewise
127 * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
128 (grub_fill_multiboot_mmap): likewise
129 (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
130 * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
131 * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
132 (OPENBSD_MMAP_RESERVED): likewise
133 * include/grub/i386/pc/memory.h: include grub/memory.h
134 (grub_lower_mem): removed
135 (grub_upper_mem): likewise
136 (GRUB_MACHINE_MEMORY_ACPI): new definition
137 (GRUB_MACHINE_MEMORY_NVS): likewise
138 (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
139 (GRUB_MACHINE_MEMORY_HOLE): likewise
140 (grub_machine_mmap_register): likewise
141 (grub_machine_mmap_unregister): likewise
142 (grub_machine_get_upper): likewise
143 (grub_machine_get_lower): likewise
144 (grub_machine_get_post64): likewise
145 * include/grub/i386/efi/memory.h: new file
146 * include/grub/x86_64/efi/memory.h: likewise
147 * include/grub/efi/memory.h: likewise
148 * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
149 (mmap_mod_SOURCES): new variable
150 (mmap_mod_LDFLAGS): likewise
151 (mmap_mod_ASFLAGS): likewise
152 * conf/i386-coreboot.rmk: likewise
153 * conf/i386-ieee1275.rmk: likewise
154 * conf/i386-efi.rmk: likewise
155 * conf/x86_64-efi.rmk: likewise
156 * include/grub/types.h (UINT_TO_PTR): new macro
157 (PTR_TO_UINT32): likewise
158 (PTR_TO_UINT64): likewise
159 * include/grub/memory.h: new file
160 * mmap/i386/pc/mmap.c: likewise
161 * mmap/i386/pc/mmap_helper.S: likewise
162 * mmap/i386/uppermem.c: likewise
163 * mmap/mmap.c: likewise
164 * mmap/efi/mmap.c: likewise
7dd4a573 165 * kern/i386/coreboot/init.c (grub_machine_init): don't use
09d842b9 166 grub_upper_mem
167 * kern/i386/pc/init.c (grub_lower_mem): removed variable
168 (grub_upper_mem): likewise
169 (grub_machine_init): don't use grub_upper_mem,
170 make grub_lower_mem local
171 * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
172 grub_mmap_iterate and grub_mmap_get_upper
173 (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
174
d558e6b5 1752009-05-02 Bean <bean123ch@gmail.com>
176
177 * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
178 script/sh/parser.y.
179 (pkglib_MODULES): Add normal.mod and sh.mod.
180 (normal_SOURCES): New variable.
181 (normal_mod_CFLAGS): Likewise.
182 (normal_mod_LDFLAGS): Likewise.
183 (sh_mod_SOURCES): Likewise.
184 (sh_mod_CFLAGS): Likewise.
185 (sh_mod_LDFLAGS): Likewise.
186
187 * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
188 script/sh/lexer.c_DEPENDENCIES.
189 (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
190 kern/rescue_reader.c and kern/rescue_parser.c.
191 (kernel_img_HEADERS): Remove rescue.h, add reader.h.
192 (grub_emu_SOURCES): Change source files.
193 (pkglib_MODULES): Remove normal.mod.
194 (normal_SOURCES): Removed.
195 (normal_mod_CFLAGS): Likewise.
196 (normal_mod_LDFLAGS): Likewise.
197 * conf/i386-coreboot.rmk: Likewise.
198 * conf/i386-efi.rmk: Likewise.
199 * conf/i386-ieee1276.rmk: Likewise.
200 * conf/powerpc-ieee1275.rmk: Likewise.
201 * conf/sparc64-ieee1275.rmk: Likewise.
202 * conf/x86_64-efi.rmk: Likewise.
203
204 * include/grub/command.h (grub_command_execute): New inline function.
205
206 * include/grub/menu.h (grub_menu_entry): Removed commands field.
207
208 * include/grub/normal.h: Remove <grub/setjmp.h>.
209 (grub_fs_module_list): Moved to normal/autofs.c.
210 (grub_exit_env): Removed.
211 (grub_command_execute): Likewise.
212 (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
213 parameter script.
214 (read_command_list): New function declaration.
215 (read_fs_list): Likewise.
216
217 * include/parser.h: Include <grub/reader.h>.
218 (grub_parser_split_cmdline): Change type of getline parameter.
219 (grub_parser): New structure.
220 (grub_parser_class): New variable.
221 (grub_parser_execute): New function declaration.
222 (grub_register_rescue_parser): Likewise.
223 (grub_parser_register): New inline function.
224 (grub_parser_unregister): Likewise.
225 (grub_parser_get_current): Likewise.
226 (grub_parser_set_current): Likewise.
227
228 * include/grub/reader.h: New file.
229 * kern/reader.c: Likewise.
230 * kern/rescue_parser.c: Likewise.
231 * kern/rescue_reader.c: Likewise.
232 * normal/autofs.c: Likewise.
233 * normal/dyncmd.c: Likewise.
234
235 * include/grub/rescue.h: Removed.
236 * normal/command.h: Likewise.
237
238 * include/grub/script.h: Moved to ...
239 * include/grub/script_sh.h: ... Moved here.
240 * normal/execute.c: Moved to ...
241 * script/sh/execute.c: ... Moved here.
242 * normal/function.c: Moved to ...
243 * script/sh/function.c: ... Moved here.
244 * normal/lexer.c: Moved to ...
245 * script/sh/lexer.c: ... Moved here.
246 * normal/parser.y: Moved to ...
247 * script/sh/parser.y: ... Moved here.
248 * normal/script.c: Moved to ...
249 * script/sh/script.c: ... Moved here.
250
251 * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
252 <grub/reader.h>.
253 (grub_exit_env): Removed.
254 (fs_module_list): Moved to normal/autofs.c.
255 (grub_file_getline): Don't handle comment here.
256 (free_menu): Skip removed field entry->commands.
257 (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
258 script parameter.
259 (read_config_file): Removed nested parameter, change getline function.
260 (grub_enter_normal_mode): Removed.
261 (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
262 (read_command_list): Likewise.
263 (autoload_fs_module): Moved to normal/autofs.c.
264 (read_fs_list): Likewise.
265 (reader_nested): New variable.
266 (grub_normal_execute): Run parser.sh to switch to sh parser.
267 (grub_cmd_rescue): Removed.
268 (cmd_normal): Removed.
269 (grub_cmd_normal): Unregister itself at the beginning. Don't register
270 rescue command.
271 (grub_cmdline_run): New function.
272 (grub_normal_reader_init): Likewise.
273 (grub_normal_read_line): Likewise.
274 (grub_env_write_pager): Likewise.
275 (cmdline): New variable.
276 (grub_normal_reader): Likewise.
277 (GRUB_MOD_INIT): Register normal reader and set as current, register
278 pager hook, register normal command with grub_register_command_prio,
279 so that it won't show up in command.lst.
280 (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
281 grub_fs_autoload_hook.
282
283 * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
284 (grub_menu_execute_entry): Replace grub_script_execute with
285 grub_parser_execute, change parameter to grub_command_execute.
286
287 * normal/menu_text.c: Remove <grub/script.h>.
288
289 * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
290 and <grub/parser.h>.
291 (run): Change editor_getline to use new parser interface. Change
292 parameter to grub_command_execute.
293
294 * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
295 <grub/reader.h> and <grub/parser.h>.
296 (grub_load_normal_mode): Execute normal command.
297 (grub_main): Call grub_register_core_commands,
298 grub_register_rescue_parser and grub_register_rescue_reader, use
299 grub_reader_loop to enter input loop.
300
7dd4a573 301 * kern/parser.c (grub_parser_split_cmdline): Change type of
302 getline parameter.
d558e6b5 303 (grub_parser_class): New variable.
304 (grub_parser_execute): New function.
305
306 * loader/i386/multiboot.c: Remove <grub/rescue.h>.
307 * loader/multiboot2.c: Likewise.
308 * loader/sparc64/ieee1275/linux.c: Likewise.
309
310 * util/grub-emu.c (read_command_list): New dummy function.
311
18db813d 3122009-05-02 Robert Millan <rmh.grub@aybabtu.com>
313
314 * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
315 count to 16 for CCISS and IDA.
316
6c67de15 3172009-05-02 Robert Millan <rmh.grub@aybabtu.com>
318
319 * normal/menu_text.c (grub_wait_after_message): Print a newline
320 after waiting for user input.
321
322 * loader/i386/linux.c: Include `<grub/normal.h>'.
323 (grub_cmd_linux): Improve the error message about `ask' mode, by
324 waiting for user input so it's not missed (we can do this, since
325 user requested interaction).
326
d9dc87b0 3272009-05-02 Vladimir Serbinenko <phcoder@gmail.com>
328
329 Added missing lst to grub-mkrescue
330
331 * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
332 and ${input_dir}/parttool.lst
333
ac8a2baa 3342009-04-30 David S. Miller <davem@davemloft.net>
335
ad22a610 336 * util/hostdisk.c (device_is_wholedisk): New function.
337 (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
338 zero only if device_is_wholedisk() returns true.
339
6966215d 340 * util/hostdisk.c (convert_system_partition_to_system_disk):
341 Handle virtual disk devices named /dev/vdiskX as found on sparc
342 and powerpc.
343
ac8a2baa 344 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
345 lettered partition specifier is found, convert to numbered.
346
979b4fb4 3472009-04-29 David S. Miller <davem@davemloft.net>
348
e2bf39b2 349 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
350 * include/grub/sparc64/ieee1275/memory.h: Likewise.
351
3c64e104 352 * normal/command.c: Add missing newline at end of file.
353
979b4fb4 354 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
355 warnings.
356 * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
357 * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
358 grub_ofdisk_read): Likewise, and deal similarly with the fact that
359 ihandles have a 32-bit type but need to be stored in a "void *".
360
136d9f82 3612009-04-28 Pavel Roskin <proski@gnu.org>
362
9459c306 363 * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
364 not disk. Adjust all dependencies.
2e08a26a 365 (grub_fs_uuid_close): Use grub_device_close(), not
9459c306 366 grub_disk_close().
367
136d9f82 368 * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
369 parent's partition, don't copy it by reference, as it gets freed
370 on close.
371
7dd4a573 3722009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
75a807cf 373
374 Preboot hooks support
375
376 * commands/boot.c (struct grub_preboot_t): new declaration
377 (preboots_head): new variable
378 (preboots_tail): likewise
379 (grub_loader_register_preboot_hook): new function
380 (grub_loader_unregister_preboot_hook): likewise
381 (grub_loader_set): launch preboot hooks
382 * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
383 (grub_loader_register_preboot_hook): new declaration
384 (grub_loader_unregister_preboot_hook): likewise
385
5af922b5 3862009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
387
388 Warning fix
389
7dd4a573 390 * disk/scsi.c (grub_scsi_open): added missing cast when
5af922b5 391 calling grub_dprintf
392
a5562c30 3932009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
394
395 Bug and warning fixes
396
7dd4a573 397 * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
a5562c30 398 declaration
399 * commands/test.c (test_parse): fixed bug with file tests and corrected
400 declaration of find_file
401
4006f85c 4022009-04-26 Pavel Roskin <proski@gnu.org>
403
404 * Makefile.in: Don't install empty manual pages if help2man is
405 missing. Use help2man option for output, not shell redirection.
406
5c77c3de 4072009-04-26 David S. Miller <davem@davemloft.net>
408
409 * util/grub-mkdevicemap.c (make_device_map): Add missing
410 NESTED_FUNC_ATTR to process_device().
411
033b10a8 4122009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
413
414 Test command
415
416 * commands/test.c: rewritten to use bash-like test
417
e4343593 4182009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
419
420 Parttool autoloading and improvements
421
7dd4a573 422 * Makefile.in (pkglib_DATA): add parttool.lst
e4343593 423 (parttool.lst): new target
424 * genmk.rb: generate parttool-*
425 (CLEANFILES): add #{parttool}
426 (PARTTOOLFILES): new variable
427 * genparttoollist.sh: new file
7dd4a573 428 * parttool/pcpart.c (grub_pcpart_boot): more feedback
e4343593 429 (grub_pcpart_type): likewise
430 * commands/parttool.c (helpmsg): new variable
431 (grub_cmd_parttool): output help if not enough arguments are supplied
432 autoload modules
433 (GRUB_MOD_INIT(parttool)): use helpmsg
434
0d312500 4352009-04-24 David S. Miller <davem@davemloft.net>
436
7dd4a573 437 Avoiding opening same device multiple times in device iterator.
0d312500 438
439 * kern/device.c: (grub_device_iterate): Define struct part_ent,
7dd4a573 440 and use it to build a list of partitions in iterate_disk() and
0d312500 441 iterate_partition().
442
ac20caff 443 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
444 on disk->data.
445
0dcf7495 446 * disk/ieee1275/nand.c (grub_nand_iterate): Return
447 grub_devalias_iterate() result instead of unconditional 0.
448 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
449 Also, capture hook return value, either directly or via
450 grub_children_iterate(), and propagate to caller.
451 * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
452 grub_children_iterate): Return value is now 'int' instead of
453 'grub_err_t'.
454 * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
455 like a proper iterator, stopping when hooks return non-zero.
456 (grub_devalias_iterate): Likewise.
457
c8c08833 4582009-04-23 David S. Miller <davem@davemloft.net>
459
460 * kern/sparc64/ieee1275/openfw.c: Unused, delete.
461
f01005a8 4622009-04-22 David S. Miller <davem@davemloft.net>
463
464 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
465 is larger than address_cells, use that value for address_cells too.
466
4e8269da 467 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
468 IEEE1275_MAX_PATH_LEN): Define.
469 * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
470 allocate 'childtype', 'childpath', 'childname', and 'fullname'.
471 (grub_devalias_iterate): Dynamically allocate 'aliasname' and
472 'devtype'. Explicitly NULL terminate devalias expansion.
473
a1447506 474 * util/sparc64/ieee1275/misc.c: New file.
475 * util/sparc64/ieee1275/grub-setup.c: New file.
476 * util/sparc64/ieee1275/grub-ofpathname.c: New file.
477 * util/sparc64/ieee1275/grub-mkimage.c: New file.
478 * util/sparc64/ieee1275/grub-install.in: New file.
479 * util/ieee1275/ofpath.c: New file.
480 * util/ieee1275/devicemap.c: New file.
481 * util/devicemap.c: New file.
482 * util/deviceiter.c: New file.
483 * kern/sparc64/ieee1275/init.c: New file.
484 * include/grub/util/ofpath.h: New file.
485 * include/grub/util/deviceiter.h: New file.
486 * util/grub-mkdevicemap.c: Include deviceiter.h.
487 Implement using grub_util_emit_devicemap_entry and
488 grub_util_iterate_devices.
489 * conf/i386-corebook.rmk: Build util/deviceiter.c and
490 util/devicemap.c into grub-mkdevicemap
491 * conf/i386-efi.rmk: Likewise.
492 * conf/i386-ieee1275.rmk: Likewise.
493 * conf/i386-pc.rmk: Likewise.
494 * conf/powerpc-ieee1275.rmk: Likewise.
495 * conf/sparc64-ieee1275.rmk: Add rules to build boot block
496 images and installation utilities. Build kernel as image
497 instead of as elf binary. Use common rules as much as possible.
498
7dd4a573 4992009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
0aefc632 500
501 Correct GPT definition
502
7dd4a573 503 * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
0aefc632 504 of "attrib" member
505
c6c5219f 5062009-04-19 Felix Zielcke <fzielcke@z-51.de>
507
508 * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
509
0552ff9f 5102009-04-19 David S. Miller <davem@davemloft.net>
511
512 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
513 (grub_rescue_cmd_linux): Rename to...
514 (grub_cmd_linux): and fix prototype.
515 (grub_rescue_cmd_initrd): Rename to...
516 (grub_cmd_initrd): and fix prototype.
517 (cmd_linux, cmd_initrd): New.
518 (GRUB_MOD_INIT(linux)): Use grub_register_command().
519 (GRUB_MOD_FINI(linux): Use grub_unregister_command().
520
d1a282fc 5212009-04-17 Pavel Roskin <proski@gnu.org>
522
07c5039f 523 * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
524 format.
525 (grub_ohci_transfer): Likewise.
526
b012002d 527 * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
528
1bc09c35 529 * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
530 return without a value. Fix inconsistent indentation.
531
e0ff9126 532 * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
533 match struct grub_fs.
534
d1a282fc 535 * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
536 * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
537 * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
538 * commands/lspci.c (grub_lspci_iter): Likewise.
539
a96df3f2 5402009-04-16 Bean <bean123ch@gmail.com>
541
542 * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
543 value.
544
41bb0fe9 5452009-04-15 Pavel Roskin <proski@gnu.org>
546
547 * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
548 LONG_MAX to GRUB_LONG_MAX. Introduce GRUB_LONG_MIN. Update all
549 users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
550 definitions.
551
596c6970 5522009-04-15 Felix Zielcke <fzielcke@z-51.de>
553
554 * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
7dd4a573 555 that no multiple data or metadata areas are supported and `Unknown
596c6970 556 metadata header'.
557
7dd4a573 5582009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
0d5d5653 559
560 Move loader out of the kernel
561
562 * kern/loader.c: moved to ...
563 * commands/boot.c: ... moved here
564 * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
565 * commands/boot.c (grub_cmd_boot): moved here. All users updated
566 * include/grub/kernel.h (grub_machine_fini): export
567 * include/grub/loader.h (grub_loader_is_loaded): update declaration
568 (grub_loader_set): likewise
569 (grub_loader_unset): likewise
570 (grub_loader_boot): likewise
571 * conf/common.rmk: new module boot.mod
572 (pkglib_MODULES): add boot.mod
573 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
574 (grub_emu_SOURCES): likewise
575 * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
576 (grub_emu_SOURCES): likewise
577 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
578 (grub_emu_SOURCES): likewise
579 * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
580 (grub_emu_SOURCES): likewise
581 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
582 (grub_emu_SOURCES): likewise
7dd4a573 583 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
584 (grub_emu_SOURCES): likewise
0d5d5653 585 * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
7dd4a573 586 (grub_emu_SOURCES): likewise
0d5d5653 587
7dd4a573 5882009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
5999d619 589
590 use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
7dd4a573 591
5999d619 592 * kern/misc.c (grub_itoa): Removed function
593 (grub_ltoa): likewise
594 (grub_vsprintf): use grub_lltoa
595
7dd4a573 5962009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
13c00781 597
598 Restore grub-emu
599
600 * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
601 * conf/i386-coreboot.rmk: likewise
602 * conf/i386-ieee1275.rmk: likewise
603 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 604
20318222 6052009-04-15 Felix Zielcke <fzielcke@z-51.de>
606
607 * INSTALL: Add that `./autogen.sh' needs to be run before
608 `./configure.'.
609
d05f0df3 6102009-04-14 Bean <bean123ch@gmail.com>
611
612 * Makefile.in (pkglib_DATA): Add handler.lst.
613 (handler.lst): New rule.
614
615 * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
616 * conf/i386-coreboot.rmk: Likewise.
617 * conf/i386-ieee1275.rmk: Likewise.
618 * conf/i386-efi.rmk: Likewise.
619 * conf/x86_64-efi.rmk: Likewise.
620 * conf/powerpc-ieee1275.rmk: Likewise.
621 * conf/sparc64-ieee1275.rmk: Likewise.
622
623 * genhandlerlist.sh: New file.
624
625 * genmk.rb: Add rules to generate handler.lst.
626
627 * include/grub/normal.h (grub_file_getline): New function definition.
628 (read_handler_list): Likewise.
629 (free_handler_list): Likewise.
630
631 * include/grub/term.h (grub_term_register_input): Add name parameter
632 for auto generation of handler.lst.
633 (grub_term_register_output): Likewise.
634
635 * normal/handler.c: New file.
636
637 * normal/main.c (get_line): Renamed to grub_file_getline.
638 (read_config_file): Use the newly renamed grub_file_getline.
639 (read_command_list): Likewise.
640 (read_fs_list): Likewise.
641 (grub_normal_execute): Call read_handler_list to parse handler.lst.
642 (GRUB_MOD_FINI): Call free_handler_list to free handler list.
643
644 * term/efi/console.c (grub_console_init): Add name parameter for auto
645 generation of handler.lst.
646 * term/gfxterm.c: Likewise.
647 * term/i386/pc/at_keyboard.c: Likewise.
648 * term/i386/pc/console.c: Likewise.
649 * term/i386/pc/serial.c: Likewise.
650 * term/i386/pc/vesafb.c: Likewise.
651 * term/i386/pc/vga.c: Likewise.
652 * term/i386/pc/vga_text.c: Likewise.
653 * term/ieee1275/ofconsole.c: Likewise.
654 * term/usb_keyboard.c: Likewise.
655
33c846be 6562009-04-14 Bean <bean123ch@gmail.com>
657
658 * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
659 properly with null character.
660
4484e01e 6612009-04-14 Felix Zielcke <fzielcke@z-51.de>
662
663 * configure: Remove.
664 * config.h.in: Likewise.
f93d668e 665 * stamp-h.in: Likewise.
4484e01e 666 * DISTLIST: Likewise.
667 * conf/common.mk: Likewise.
668 * conf/i386-coreboot.mk: Likewise.
669 * conf/i386-efi.mk: Likewise.
670 * conf/i386-ieee1275.mk: Likewise.
671 * conf/i386.mk: Likewise.
672 * conf/i386-pc.mk: Likewise.
673 * conf/powerpc-ieee1275.mk: Likewise.
674 * conf/sparc64-ieee1275.mk: Likewise.
675 * conf/x86_64-efi.mk: Likewise.
676
677 * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
678 develop on GRUB.
679
7dd4a573 6802009-04-14 John Stanley <jpsinthemix@verizon.net>
5c5bf96a 681 David S. Miller <davem@davemloft.net>
682
683 * util/hostdisk.c (make_device_name): Fix buffer length
684 calculations.
685
e25b5a8c 6862009-04-14 Felix Zielcke <fzielcke@z-51.de>
687
688 * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
689 <sys/param.h> and <sys/sysctl.h>.
690 (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
691 to add 0x10 to `kern.geom.debugflags' if it's not already set, before
692 opening the device and reset them afterwards.
693
1f1f580c 6942009-04-13 Pavel Roskin <proski@gnu.org>
695
696 * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
697 Reported by John Stanley <jpsinthemix@verizon.net>
698
7ebc2d6b 6992009-04-13 Robert Millan <rmh@aybabtu.com>
700
701 * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
7dd4a573 702 that name for menuentries when appropriate.
7ebc2d6b 703
d8ba3667 7042009-04-13 Felix Zielcke <fzielcke@z-51.de>
705
706 * util/grub.d/10_freebsd.in: Add a missing `fi'.
707
cba416eb 7082009-04-13 Robert Millan <rmh@aybabtu.com>
709
710 * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
711 to Linux, simply abort telling the user it's no longer supported.
712
a547a745 7132009-04-13 Felix Zielcke <fzielcke@z-51.de>
714
715 * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
7dd4a573 716 doesn't exist. Check also for /boot/kernel/kernel.gz. Print
a547a745 717 `freebsd_loadenv' only when devices.hints exist.
718
232a769c 7192009-04-13 Pavel Roskin <proski@gnu.org>
720
721 * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
722
c3012039 7232009-04-13 Felix Zielcke <fzielcke@z-51.de>
724
725 * util/i386/pc/grub-install.in (install_drive): Remove the BSD
726 partition number.
727 (grub_drive): Likewise.
728
234022fe 7292009-04-13 David S. Miller <davem@davemloft.net>
730
731 * kern/sparc64/ieee1275/ieee1275.c: New file.
732 * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
733 IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
734 IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
735 IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
736 (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
737 grub_ieee1275_alloc_physmem): Declare new exported functions.
738
d8e1836c 739 * include/grub/sparc64/ieee1275/loader.h: New file.
740 * include/grub/sparc64/ieee1275/memory.h: Likewise.
741 * include/grub/sparc64/kernel.h: Likewise.
742 * loader/sparc64/ieee1275/linux.c: Likewise.
743
96bd81ec 744 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
745 (grub_fstest_SOURCES): Likewise.
746
6a4737e5 747 * util/hostdisk.c (make_device_name): Do not make any assumptions
748 about the length of drive names.
749
1d7a72fd 750 * kern/dl.c (grub_dl_load_file): Close file immediately when
751 we are done using it.
752
56bc2471 7532009-04-12 David S. Miller <davem@davemloft.net>
754
755 * kern/misc.c (grub_ltoa): Fix cast when handling negative
756 values. Noticed by Pavel Roskin.
757
df38d0bb 758 * configure.ac: Check for __bswapsi2 and__bswapdi2 using
759 target compiler.
7dd4a573 760
e382e93a 761 * genmk.rb: Add more flexible image type specification, also
762 pass --strip-unneeded to objcopy.
763 * conf/i386-pc.rmk: Use *_FORMAT.
764 * conf/i386-pc.mk: Rebuilt.
765
f5dbbca9 766 * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
767 (OFDISK_HASH_SZ): Define.
768 (ofdisk_hash): New hash table.
769 (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
770 (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
771 instead of device phandle which is not unique.
772
91c88b12 773 * kern/sparc64/ieee1275/init.c: Delete, replace with...
774 * kern/sparc64/ieee1275/crt0.S: assembler implementation.
775 * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
776 (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
777 GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
778 GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
779 GRUB_KERNEL_MACHINE_DATA_END): Define.
780 (grub_kernel_image_size, grub_total_module_size): Declare.
781
5b5d4aa5 7822009-04-12 Pavel Roskin <proski@gnu.org>
783
7dd4a573 784 * configure.ac: Change the logic when we check for target tools.
785 Do it when the target is specified and it's different from the
786 specified value of the host.
5b5d4aa5 787
c91e1793 7882009-04-11 Felix Zielcke <fzielcke@z-51.de>
789
790 * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
791 (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
792 GNU/kFreeBSD. Check if a device is a character device. Use
793 DIOCGMEDIASIZE to get the size.
794 (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
795 support for GNU/kFreeBSD.
796 (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
797 is a character device instead of a block device. Add support for
798 FreeBSD device names.
799
800 * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
801 is a character device instead of a block device.
802
803 * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
804 is a character device instead of a block device.
805
b1ac8644 8062009-04-11 Andrey Shuvikov <mr_hyro@yahoo.com>
807
808 * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
809 (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
810 FreeBSD. Check if a device is a character device. Use
811 DIOCGMEDIASIZE to get the size.
812 (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
813 support for FreeBSD.
814 (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
815 is a character device instead of a block device. Add support for
816 FreeBSD device names.
817
818 * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
819 a character device instead of a block device.
820 (grub_util_check_char_device): New function.
821
822 * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
823 a character device instead of a block device.
824
825 * include/grub/util/getroot.h (grub_util_check_char_device): New
826 prototype.
827
a3f7515a 8282009-04-11 David S. Miller <davem@davemloft.net>
829
830 * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
831 static libgcc.
832 * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
833 * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
834 function, if present.
835 (__bswapdi2): Likewise.
836
0d44993d 837 * include/grub/sparc64/ieee1275/boot.h: New file.
838 * boot/sparc64/ieee1275/boot.S: Likewise.
839 * boot/sparc64/ieee1275/diskboot.S: Likewise.
840
ed3d2bc2 841 * kern/misc.c (grub_ltoa): New function.
842 (grub_vsprintf): Use it to format 'long' integers.
843
d3bfb59c 8442009-04-10 David S. Miller <davem@davemloft.net>
845
846 * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
847 slots are of type grub_ieee1275_cell_t.
848 (grub_nand_read): Likewise.
849 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
850 IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
851 macros are used to compare values in arg/ret block of the call.
852 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
853 grub_ieee1275_next_property, grub_ieee1275_get_property_length,
854 grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
855 grub_ieee1275_instance_to_path, grub_ieee1275_write,
856 grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
857 grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
858 grub_ieee1275_close, grub_ieee1275_set_property,
859 grub_ieee1275_set_color): All ieee1275 call arg slots are of type
860 grub_ieee1275_cell_t.
861 * kern/ieee1275/openfw.c (grub_map): Likewise.
862 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
863 grub_ieee1275_phandle_t): Define as grub_unit32_t type.
864
450e2238 865 * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
866 * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
867 (grub_devalias_iterate): Likewise.
868
7dd4a573 8692009-04-10 Vladimir Serbinenko <phcoder@gmail.com>
6df8cc76 870
871 UFS improvements
872
873 * fs/ufs.c (INODE_NBLOCKS): new definition
874 (struct grub_ufs_dirent): added fields for non-BSD dirents
875 (grub_ufs_get_file_block): fixed double indirect handling
876 (grub_ufs_lookup_symlink): use more robust way to determine whether
877 symlink is inline
878 (grub_ufs_find_file): support for non-BSD dirents
879 (grub_ufs_dir): support for non-BSD dirents
880
e7e6862a 8812009-04-10 Bean <bean123ch@gnail.com>
882
883 * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
884 attribute, otherwise the size would be wrong for i386 platform.
885
886 * include/grub/pci.h (grub_pci_read_word): New inline function.
887 (grub_pci_read_byte): Likewise.
888 (grub_pci_write): Likewise.
889 (grub_pci_write_word): Likewise.
890 (grub_pci_write_byte): Likewise.
891
892 * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
893
894 * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
895 (find_framebuf): Scan pci to locate the frame buffer address.
896
897 * commands/efi/fixvideo.c: New file.
898
899 * commands/efi/loadbios.c: Likewise.
900
901 * commands/memrw.c: Likewise.
902
903 * util/grub-dumpbios.in: Likewise.
904
905 * conf/common.rmk (grub-dumpbios): New utility.
906 (pkglib_MODULES): New module memrw.mod.
907 (memrw_mod_SOURCE): New macro.
908 (memrw_mod_CFLAGS): Likewise.
909 (memrw_mod_LDFLAGS): Likewise.
910
7dd4a573 911 * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 912 fixvideo.mod.
913 (loadbios_mod_SOURCE): New macro.
914 (loadbios_mod_CFLAGS): Likewise.
915 (loadbios_mod_LDFLAGS): Likewise.
916 (fixvideo_mod_SOURCE): Likewise.
917 (fixvideo_mod_CFLAGS): Likewise.
918 (fixvideo_mod_LDFLAGS): Likewise.
919
7dd4a573 920 * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
e7e6862a 921 fixvideo.mod.
922 (loadbios_mod_SOURCE): New macro.
923 (loadbios_mod_CFLAGS): Likewise.
924 (loadbios_mod_LDFLAGS): Likewise.
925 (fixvideo_mod_SOURCE): Likewise.
926 (fixvideo_mod_CFLAGS): Likewise.
927 (fixvideo_mod_LDFLAGS): Likewise.
928
af63ada2 9292009-04-08 Felix Zielcke <fzielcke@z-51.de>
930
931 * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
932
c2cdde70 9332009-04-07 David S. Miller <davem@davemloft.net>
934
935 * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
936 support for R_SPARC_OLO10 relocations. Fix compile warning for
937 R_SPARC_WDISP30 case.
ea3f72cf 938 * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
c2cdde70 939
761319cf 9402009-04-06 Pavel Roskin <proski@gnu.org>
941
1007d1f5 942 * include/grub/misc.h (ARRAY_SIZE): New macro.
943 * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
944 New macro.
945 * loader/i386/linux.c (allocate_pages): Use free_pages().
946 (grub_linux_unload): Don't use free_pages().
947 (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
948 wrong index. Treat all other modes as text modes.
949 (grub_cmd_linux): Initialize vid_mode unconditionally to
950 GRUB_LINUX_VID_MODE_NORMAL. Recognize and support "vga=ask".
951
761319cf 952 * commands/help.c (print_command_help): Use cmd->prio, not
953 cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
954
ea761d40 9552009-04-06 Vladimir Serbinenko <phcoder@gmail.com>
7dd4a573 956
ea761d40 957 Parttool
958
959 * parttool/pcpart.c: new file
960 * commands/parttool.c: likewise
961 * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
962 (parttool_mod_SOURCES): new variable
963 (parttool_mod_CFLAGS): likewise
964 (parttool_mod_LDFLAGS): likewise
965 (pcpart_mod_SOURCES): likewise
966 (pcpart_mod_CFLAGS): likewise
967 (pcpart_mod_LDFLAGS): likewise
7dd4a573 968 * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
ea761d40 969 and parttool/pcpart.c
970 * conf/i386-efi.rmk: likewise
971 * conf/i386-ieee1275.rmk: likewise
972 * conf/i386-pc.rmk: likewise
973 * conf/powerpc-ieee1275.rmk: likewise
974 * conf/sparc64-ieee1275.rmk: likewise
975 * conf/x86_64-ieee1275.rmk: likewise
976
05aaebfb 9772009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
978
979 Support for mtime and further expandability of dir command
980
981 * include/grub/lib/datetime.h: moved to ...
7dd4a573 982 * include/grub/datetime.h: ... moved here and added
05aaebfb 983 declaration of grub_unixtime2datetime. All users updated
7dd4a573 984 * include/grub/fs.h: new syntax for dir and mtime functions in
985 struct grub_fs
05aaebfb 986 * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
987 and GRUB_FSHELP_FLAGS_MASK
988 * commands/ls.c (grub_ls_list_files): Write mtime in long format
989 * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
990 (grub_ext2_mtime): new function
991 * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
992 (grub_hfsplus_mtime): new function
993 * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
994 (GRUB_UFS_ATTR_FILE): likewise
995 (GRUB_UFS_ATTR_LNK): likewise
996 (struct grub_ufs_sblock): new fields mtime
997 (grub_ufs_read_inode): new parameter to read inode to a separate buffer
998 all users updated
999 (grub_ufs_dir): mtime support
1000 (grub_ufs_mtime): new function
1001 * fs/affs.c (grub_affs_dir): use new dir syntax
1002 * fs/afs.c (grub_afs_dir): likewise
1003 * fs/cpio.c (grub_cpio_dir): likewise
1004 * fs/fat.c (grub_fat_find_dir): likewise
1005 * fs/hfs.c (grub_hfs_dir): likewise
1006 * fs/iso9660.c (grub_iso9660_dir): likewise
1007 * fs/jfs.c (grub_jfs_dir): likewise
1008 * fs/minix.c (grub_minix_dir): likewise
1009 * fs/ntfs.c (grub_ntfs_dir): likewise
1010 * fs/reiserfs.c (grub_reiserfs_dir): likewise
1011 * fs/sfs.c (grub_sfs_dir): likewise
1012 * fs/xfs.c (grub_xfs_dir): likewise
1013 * util/hostfs.c (grub_hostfs_dir): likewise
1014 * lib/datetime.c: moved to ...
1015 * normal/datetime.c: ... moved here
1016 (grub_unixtime2datetime): new function
1017 * kern/rescue.c (grub_rescue_print_files): use new dir syntax
7dd4a573 1018 * normal/completion.c (iterate_dir): use new dir syntax
1019 * normal/misc.c (grub_normal_print_device_info): tell the
05aaebfb 1020 last modification time of a volume
7dd4a573 1021 * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
05aaebfb 1022 * conf/common.rmk: added lib/datetime.c to ls.mod
7dd4a573 1023 * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
05aaebfb 1024 (normal_mod_SOURCES): likewise
1025 (datetime_mod_SOURCES): Removed lib/datetime.c
1026 * conf/i386-efi.rmk: likewise
7dd4a573 1027 * conf/i386-ieee1275.rmk: likewise
05aaebfb 1028 * conf/i386-pc.rmk: likewise
1029 * conf/powerpc-ieee1275.rmk: likewise
7dd4a573 1030 * conf/sparc64-ieee1275.rmk: likewise
1031 * conf/x86_64-efi.rmk: likewise
05aaebfb 1032
8a7e1a14 10332009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
1034
1035 Trim trailing spaces in FAT label and support mtools-like labels
7dd4a573 1036
1037 * fs/fat.c (grub_fat_iterate_dir): New function based
8a7e1a14 1038 on grub_fat_find_dir
1039 (grub_fat_find_dir): use grub_fat_iterate_dir
1040 (grub_fat_label): likewise
1041
04186a9c 10422009-04-04 Vladimir Serbinenko <phcoder@gmail.com>
1043
7dd4a573 1044 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
04186a9c 1045 and command.h
1046 remove extraneous kernel_elf_HEADERS
1047
da4c0bb6 10482009-04-04 Bean <bean123ch@gnail.com>
1049
1050 * include/grub/util/misc.h: Add dummy function fsync for mingw.
1051
1052 * util/misc.c: Likewise.
1053
54ad9555 10542009-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1055
1056 * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
1057 instead of grub_printf.
1058
7a6bf9f2 10592009-04-03 Robert Millan <rmh@aybabtu.com>
1060
1061 * loader/i386/linux.c (grub_linux_setup_video): Fill
1062 `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
1063 values from `mode info' structure instead of hardcoded
1064 values.
1065
3fcc2083 10662009-04-01 Pavel Roskin <proski@gnu.org>
1067
1068 * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
1069 unused now.
1070 * genmk.rb: Likewise.
1071 * configure.ac: Likewise.
1072
5ec9740b 10732009-04-01 Manoel Abranches <mrabran@linux.vnet.ibm.com>
1074
1075 * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
1076 TARGET_LDFLAGS. This corrects a problem with grub-mkelfimage.
1077
5270cec8 10782009-04-01 David S. Miller <davem@davemloft.net>
1079
1080 * normal/sparc64/setjmp.S: Fix setjmp implementation.
7dd4a573 1081 * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
5270cec8 1082 (grub_setjmp): Mark with 'returns_twice' attribute.
1083 * include/grub/i386/setjmp.h (grub_setjmp): Likewise
1084 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
1085 * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
1086
9c3dd854 10872009-04-01 Robert Millan <rmh@aybabtu.com>
1088
1089 Reapply fix from 2008-07-28 which was accidentally reverted; also
1090 perform the same fix to a similar check in same function.
1091
1092 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
1093 with the same number are found, just use issue a warning with
1094 grub_dprintf(), as this error has been reported to be non-fatal.
1095
0d818b7e 10962009-03-31 Pavel Roskin <proski@gnu.org>
1097
1098 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
1099 for cross-compilation.
1100
95646d92 11012009-03-30 Robert Millan <rmh@aybabtu.com>
1102
1103 Fix i386-ieee1275 build.
1104
1105 * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
1106 Remove declaration.
1107
6a003ed1 11082009-03-30 Pavel Roskin <proski@gnu.org>
1109
1110 * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
1111 (grub_hfs_cmp_catkeys): ... this. Don't assume strings to be
1112 zero-terminated, rely only on the strlen value. Fix comparison
1113 of strings differing in length.
1114
92f33540 11152009-03-30 Robert Millan <rmh@aybabtu.com>
1116
1117 * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
1118 checking for abi version. Improve error messages on BIOS to notify
1119 user about `linux16' command.
1120
a8c48fd5 11212009-03-29 Vladimir Serbinenko <phcoder@gmail.com>
1122
f968172e 1123 Leak fixes
a8c48fd5 1124
f968172e 1125 * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
1126 in case of collision
1127 * disk/scsi.c (grub_scsi_open): free scsi in case of error
a8c48fd5 1128
9c323f09 11292009-03-29 Robert Millan <rmh@aybabtu.com>
1130
1131 * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
1132 set `vid_mode' accordingly.
1133 (grub_linux_boot): Process `vid_mode' and set video mode.
1134
ae68f423 11352009-03-29 Robert Millan <rmh@aybabtu.com>
1136
1137 * util/grub.d/10_linux.in (linux_entry): New function.
1138 Factorize generation of Linux boot entries.
1139
5709cfc4 11402009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
1141
1142 Make the format of Environment Block plain text. The boot loader
1143 part is not tested well yet.
7dd4a573 1144
5709cfc4 1145 * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
1146 (buffer): Removed.
1147 (envblk): Likewise.
1148 (usage): Remove "info" and "clear". Add "unset". Update the
1149 description of "set", as this does not delete variables any
1150 longer.
1151 (create_envblk_file): Complete rewrite.
1152 (open_envblk_file): Likewise.
1153 (cmd_info): Removed.
1154 (cmd_list): Likewise.
1155 (cmd_set): Likewise.
1156 (cmd_clear): Likewise.
1157 (list_variables): New function.
1158 (write_envblk): Likewise.
1159 (set_variables): Likewise.
1160 (unset_variables): Likewise.
1161 (main): Complete rewrite.
1162
1163 * commands/loadenv.c (buffer): Removed.
1164 (envblk): Likewise.
1165 (open_envblk_file): New function.
1166 (read_envblk_file): Complete rewrite.
1167 (grub_cmd_load_env): Likewise.
1168 (grub_cmd_list_env): Likewise.
1169 (struct blocklist): New struct.
1170 (free_blocklists): New function.
1171 (check_blocklists): Likewise.
1172 (write_blocklists): Likewise.
1173 (grub_cmd_save_env): Complete rewrite.
1174
1175 * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
1176 a plain text signature.
1177 (GRUB_ENVBLK_MAXLEN): Removed.
1178 (struct grub_envblk): Complete rewrite.
1179 (grub_envblk_find): Removed.
1180 (grub_envblk_insert): Likewise.
1181 (grub_envblk_open): New prototype.
1182 (grub_envblk_set): Likewise.
1183 (grub_envblk_delete): Put const to VALUE.
1184 (grub_envblk_iterate): Put const to NAME and VALUE.
1185 (grub_envblk_close): New prototype.
1186 (grub_envblk_buffer): New inline function.
1187 (grub_envblk_size): Likewise.
1188
1189 * lib/envblk.c: Include grub/mm.h.
1190 (grub_env_find): Removed.
1191 (grub_envblk_open): New function.
1192 (grub_envblk_close): Likewise.
1193 (escaped_value_len): Likewise.
1194 (find_next_line): Likewise.
1195 (grub_envblk_insert): Removed.
1196 (grub_envblk_set): New function.
1197 (grub_envblk_delete): Complete rewrite.
1198 (grub_envblk_iterate): Likewise.
1199
a9368fd3 12002009-03-28 Robert Millan <rmh@aybabtu.com>
1201
1202 * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
1203 (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
1204 variables. Use 16-bit loader.
1205 (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
1206 loader.
1207 * kern/i386/loader.S (grub_linux_boot): Rename to ...
1208 (grub_linux16_boot): ... this. Update all users.
1209 * loader/i386/linux.c (grub_linux32_boot): Rename to ...
1210 (grub_linux_boot): ... this. Update all users.
1211
1212 * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
1213 (GRUB_MOD_INIT(linux16)): ... this. Rename `linux' and `initrd'
1214 commands to `linux16' and `initrd16'.
1215 (GRUB_MOD_FINI(linux)): Rename to ...
1216 (GRUB_MOD_FINI(linux16)): ... this.
1217
e4dd5a7e 12182009-03-24 Pavel Roskin <proski@gnu.org>
1219
1220 * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
1221 not just for compilation.
1222
c04d6e05 12232009-03-22 Vladimir Serbinenko <phcoder@gmail.com>
1224
1225 Move multiboot helper out of kernel
1226
1227 * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
1228 `loader/i386/multiboot_helper.S'.
1229 * conf/i386-coreboot.rmk: Likewise
1230 * conf/i386-ieee1275.rmk: Likewise
1231
1232 * kern/i386/loader.S: Move multiboot helpers from here...
1233 * loader/i386/multiboot_helper.S: ...moved here
1234 * include/grub/i386/loader.h: Move declarations of multiboot
1235 helpers from here...
1236 * include/grub/i386/multiboot.h: ...moved here
1237 * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
1238
42a5b3fc 12392009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1240
1241 * kern/env.c (grub_env_context_open): Added an argument to specify
1242 whether a new context inherits exported variables from current
1243 one. This is useful when making a sandbox to interpret a config
1244 file.
1245 All callers updated.
1246
1247 * include/grub/env.h (grub_env_context_open): Updated the prototype.
1248
b28bbc4e 12492009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1250
1251 * kern/env.c (grub_env_context_close): Fix memory leaks.
1252
f04f02e4 12532009-03-22 Yoshinori K. Okuji <okuji@enbug.org>
1254
1255 * normal/main.c (grub_normal_execute): Added an argument
1256 BATCH to specify if an interactive interface should be provided
1257 after reading a config file.
1258 All callers updated.
1259 (read_command_list): Prevent being executed twice.
1260 (read_fs_list): Likewise.
1261
42a5b3fc 1262 * include/grub/normal.h (grub_normal_execute): Updated the
1263 prototype.
f04f02e4 1264
41473ac2 12652009-03-22 Pavel Roskin <proski@gno.org>
1266
fbc00b0c 1267 * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
1268 _start.
1269 * kern/i386/pc/startup.S: Likewise.
1270 * kern/i386/efi/startup.S: Likewise.
1271 * kern/i386/ieee1275/startup.S: Likewise.
1272 * kern/i386/coreboot/startup.S: Likewise.
1273 * kern/x86_64/efi/startup.S: Likewise.
1274
41473ac2 1275 * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
1276 * configure.ac: Don't call grub_CHECK_START_SYMBOL.
1277 * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
1278
2274cc8f 12792009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
1280
1281 Bugfixes in multiboot for bugs uncovered by solaris kernel.
1282
1283 * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
1284 limit detection.
1285 Use vaddr of correct segment for entry_point.
1286
b1b797cb 12872009-03-21 Bean <bean123ch@gmail.com>
1288
1289 * commands/blocklist.c: Add include file <grub/command.h>, remove
1290 <grub/normal.h> and <grub/arg.h>.
1291 (grub_cmd_blocklist): Use the new command interface.
1292 (GRUB_MOD_INIT): Likewise.
1293 (GRUB_MOD_FINI): Likewise.
1294 * commands/boot.c: Likewise.
1295 * commands/cat.c: Likewise.
1296 * commands/cmp.c: Likewise.
1297 * commands/configfile.c: Likewise.
1298 * commands/crc.c: Likewise.
1299 * commands/echo.c: Likewise.
1300 * commands/halt.c: Likewise.
1301 * commands/handler.c: Likewise.
1302 * commands/hdparm.c: Likewise.
1303 * commands/help.c: Likewise.
1304 * commands/hexdump.c: Likewise.
1305 * commands/loadenv.c: Likewise.
1306 * commands/ls.c: Likewise.
1307 * commands/lsmmap.c: Likewise.
1308 * commands/lspci.c: Likewise.
1309 * commands/loadenv.c: Likewise.
1310 * commands/read.c: Likewise.
1311 * commands/reboot.c: Likewise.
1312 * commands/search.c: Likewise.
1313 * commands/sleep.c: Likewise.
1314 * commands/test.c: Likewise.
1315 * commands/usbtest.c: Likewise.
1316 * commands/videotest.c: Likewise.
1317 * commands/i386/cpuid.c: Likewise.
1318 * commands/i386/pc/halt.c: Likewise.
1319 * commands/i386/pc/play.c: Likewise.
1320 * commands/i386/pc/pxecmd.c: Likewise.
1321 * commands/i386/pc/vbeinfo.c: Likewise.
1322 * commands/i386/pc/vbetest.c: Likewise.
1323 * commands/ieee1275/suspend.c: Likewise.
1324 * disk/loopback.c: Likewise.
1325 * font/font_cmd.c: Likewise.
1326 * hello/hello.c: Likewise.
1327 * loader/efi/appleloader.c: Likewise.
1328 * loader/efi/chainloader.c: Likewise.
1329 * loader/i386/bsd.c: Likewise.
1330 * loader/i386/efi/linux.c: Likewise.
1331 * loader/i386/ieee1275/linux.c: Likewise.
1332 * loader/i386/linux.c: Likewise.
1333 * loader/i386/pc/chainloader.c: Likewise.
1334 * loader/i386/pc/linux.c: Likewise.
1335 * loader/powerpc/ieee1275/linux.c: Likewise.
1336 * loader/multiboot_loader.c: Likewise.
1337 * term/gfxterm.c: Likewise.
1338 * term/i386/pc/serial.c: Likewise.
1339 * term/terminfo.c: Likewise.
1340
1341 * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
1342 * term/i386/pc/vga.c: Likewise.
1343 * video/readers/jpeg.c: Likewise.
1344 * video/readers/png.c: Likewise.
1345 * video/readers/tga.c: Likewise.
1346
1347 * util/grub-fstest (cmd_loopback): Removed.
1348 (cmd_blocklist): Likewise.
1349 (cmd_ls): Likewise.
1350 (grub_register_command): Likewise.
1351 (grub_unregister_command): Likewise.
1352 (execute_command): Use grub_command_find to locate command and execute
1353 it.
1354
1355 * include/grub/efi/chainloader.h: Removed.
1356 * loader/efi/chainloader_normal.c: Likewise.
1357 * loader/i386/bsd_normal.c: Likewise.
1358 * loader/i386/pc/chainloader_normal.c: Likewise.
1359 * loader/i386/pc/multiboot_normal.c: Likewise.
1360 * loader/linux_normal.c: Likewise.
1361 * loader/multiboot_loader_normal.c: Likewise.
1362 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1363
1364 * gencmdlist.sh: Scan new registration command grub_register_extcmd
1365 and grub_register_command_p1.
1366
1367 * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
1368 kern/command.c, lib/arg.c and commands/extcmd.c.
1369 (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
1370 (minicmd_mod_SOURCES): New variable.
1371 (minicmd_mod_CFLAGS): Likewise.
1372 (minicmd_mod_LDFLAGS): Likewise.
1373 (extcmd_mod_SOURCES): Likewise.
1374 (extcmd_mod_CFLAGS): Likewise.
1375 (extcmd_mod_LDFLAGS): Likewise.
1376 (boot_mod_SOURCES): Removed.
1377 (boot_mod_CFLAGS): Likewise.
1378 (boot_mod_LDFLAGS): Likewise.
1379
1380 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
1381 kern/corecmd.c.
1382 (kernel_img_HEADERS): Add command.h.
1383 (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
1384 commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
1385 and lib/arg.c.
1386 (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
1387 _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
1388 remove the corresponding normal mode command.
1389 (normal_mod_SOURCES): Remove normal/arg.c.
1390 * conf/i386-coreboot.rmk: Likewise.
1391 * conf/i386-efi.rmk: Likewise.
1392 * conf/i386-ieee1275.rmk: Likewise.
1393 * conf/powerpc-ieee1275.rmk: Likewise.
1394 * conf/x86_64-efi.rmk: Likewise.
1395
1396 * include/grub/arg.h: Move from here ...
1397 * include/grub/lib/arg.h: ... to here.
1398
1399 * normal/arg.c: Move from here ...
1400 * lib/arg.c: ... to here.
1401
1402 * commands/extcmd.c: New file.
1403 * commands/minicmd.c: Likewise.
1404 * include/grub/command.h: Likewise.
1405 * include/grub/extcmd.h: Likewise.
1406 * kern/command.c: Likewise.
1407 * kern/corecmd.c: Likewise.
1408
1409 * kern/list.c (grub_list_iterate): Return int instead of void.
1410 (grub_list_insert): New function.
1411 (grub_prio_list_insert): Likewise.
1412
1413 * kern/rescue.c (grub_rescue_command): Removed.
1414 (grub_rescue_command_list): Likewise.
1415 (grub_rescue_register_command): Likewise.
1416 (grub_rescue_unregister_command): Likewise.
1417 (grub_rescue_cmd_boot): Move to minicmd.c
1418 (grub_rescue_cmd_help): Likewise.
1419 (grub_rescue_cmd_info): Likewise.
1420 (grub_rescue_cmd_boot): Likewise.
1421 (grub_rescue_cmd_testload): Likewise.
1422 (grub_rescue_cmd_dump): Likewise.
1423 (grub_rescue_cmd_rmmod): Likewise.
1424 (grub_rescue_cmd_lsmod): Likewise.
1425 (grub_rescue_cmd_exit): Likewise.
1426 (grub_rescue_print_devices): Moved to corecmd.c.
1427 (grub_rescue_print_files): Likewise.
1428 (grub_rescue_cmd_ls): Likewise.
1429 (grub_rescue_cmd_insmod): Likewise.
1430 (grub_rescue_cmd_set): Likewise.
1431 (grub_rescue_cmd_unset): Likewise.
7d074e3c 1432 (attempt_normal_mode): Use grub_command_find to get normal module.
b1b797cb 1433 (grub_enter_rescue_mode): Use grub_register_core_commands to register
7d074e3c 1434 commands, remove grub_rescue_register_command calls.
b1b797cb 1435
7d074e3c 1436 * normal/command.c (grub_register_command): Removed.
b1b797cb 1437 (grub_unregister_command): Likewise.
1438 (grub_command_find): Likewise.
1439 (grub_iterate_commands): Likewise.
1440 (rescue_command): Likewise.
1441 (export_command): Moved to corecmd.c.
1442 (set_command): Removed.
1443 (unset_command): Likewise.
1444 (insmod_command): Likewise.
1445 (rmmod_command): Likewise.
1446 (lsmod_command): Likewise.
1447 (grub_command_init): Likewise.
1448
1449 * normal/completion.c (iterate_command): Use cmd->prio to check for
1450 active command.
1451 (complete_arguments): Use grub_extcmd_t structure to find options.
1452 (grub_normal_do_completion): Change function grub_iterate_commands to
1453 grub_command_iterate.
1454
1455 * normal/execute.c (grub_script_execute_cmd): No need to parse
1456 argument here.
1457
1458 * normal/main.c (grub_dyncmd_dispatcher): New function.
1459 (read_command_list): Register unload commands as dyncmd.
1460 (grub_cmd_normal): Use new command interface, register rescue,
1461 unregister normal at entry, register normal, unregister rescue at exit.
1462
1463 * include/grub/list.h (grub_list_test_t): New type.
1464 (grub_list_iterate): Return int instead of void.
1465 (grub_list_insert): New function.
1466 (GRUB_AS_NAMED_LIST_P): New macro.
1467 (GRUB_AS_PRIO_LIST): Likewise.
1468 (GRUB_AS_PRIO_LIST_P): Likewise.
1469 (GRUB_PRIO_LIST_PRIO_MASK): New constant.
1470 (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
1471 (grub_prio_list): New structure.
1472 (grub_prio_list_insert): New function.
1473 (grub_prio_list_remove): New inline function.
1474
1475 * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
1476 (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
1477 (GRUB_COMMAND_FLAG_MENU): Likewise.
1478 (GRUB_COMMAND_FLAG_BOTH): Likewise.
1479 (GRUB_COMMAND_FLAG_TITLE): Likewise.
1480 (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
1481 (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
1482 (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
1483 (grub_command): Likewise.
1484 (grub_register_command): Likewise.
1485 (grub_command_find): Likewise.
1486 (grub_iterate_commands): Likewise.
1487 (grub_command_init): Likewise.
1488 (grub_arg_parse): Likewise.
1489 (grub_arg_show_help): Likewise.
1490
1491 * include/grub/rescue.h (grub_rescue_register_command): Removed.
1492 (grub_rescue_unregister_command): Likewise.
1493
1494 * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
1495 grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
1496 grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
1497
1498 * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
1499 grub_rescue_cmd_initrd.
1500 * include/grub/i386/loader.h: Likewise.
1501 * include/grub/x86_64/loader.h: Likewise.
1502
1503 * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
1504
1f4147aa 15052009-03-21 Bean <bean123ch@gmail.com>
1506
1507 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
1508 instead of stat in mingw environment.
1509
1510 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
1511
1512 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
1513
1514 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
1515 AC_CONFIG_LINKS.
1516
2156d5ba 15172009-03-21 Bean <bean123ch@gmail.com>
1518
1519 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
1520 out of range error.
1521
177b82ca 15222009-03-18 Michel Dänzer <michel@daenzer.net>
1523
1524 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
1525 checking inode flags for EXT4_EXTENTS_FLAG.
1526
14aad807 15272009-03-18 Robert Millan <rmh@aybabtu.com>
1528
1529 * loader/i386/linux.c: Include `<grub/video.h>' and
1530 `<grub/i386/pc/vbe.h>'..
1531 (grub_linux_setup_video): New function. Loosely based on the EFI one.
1532 (grub_linux32_boot): Attempt to configure video settings with
1533 grub_linux_setup_video().
1534 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
1535 to avoid grub_console_fini() which would step out of graphical mode
1536 unconditionally.
1537
8cf83a27 15382009-03-14 Robert Millan <rmh@aybabtu.com>
1539
1540 Fix build on powerpc.
1541 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
1542
40164e75 15432009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
1544
1545 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
1546 background image command.
1547
c58bc32a 15482009-03-12 Colin D Bennett <colin@gibibit.com>
1549
1550 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
1551 (grub_gfxterm_putchar): Extract pairs of identical calls to
1552 draw_cursor out of conditional blocks.
1553
5415144a 15542009-03-11 Pavel Roskin <proski@gnu.org>
1555
1556 * fs/hfs.c (grub_hfs_strncasecmp): New function.
1557 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
1558
6394042e 15592009-03-11 Robert Millan <rmh@aybabtu.com>
1560
1561 * loader/i386/multiboot_elfxx.c
1562 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
1563
b7b50e5f 15642009-03-11 Felix Zielcke <fzielcke@z-51.de>
1565
1566 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
1567 `kern/handler.c'.
1568
1ca7fc96 15692009-03-11 Robert Millan <rmh@aybabtu.com>
1570
1571 * loader/i386/multiboot.c (code_size): New variable.
1572 (grub_multiboot): Define offsets by adding to `code_size' rather
7d074e3c 1573 than subtracting from `grub_multiboot_payload_size'. Provide
1ca7fc96 1574 4-byte alignment to MBI and others by increasing
7d074e3c 1575 `boot_loader_name_length' appropriately.
1ca7fc96 1576
1577 * loader/i386/multiboot_elfxx.c
1578 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
1579
a83ea1d2 15802009-03-09 Felix Zielcke <fzielcke@z-51.de>
1581
1582 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
1583 `fs/ext2.c'.
1584
aa9f3bff 15852009-03-08 Robert Millan <rmh@aybabtu.com>
1586
1587 Make loader/i386/linux.c usable on i386-pc again.
1588
1589 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
1590 memory to heap.
1591 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
1592 `#error' stanza.
1593
d8b3b60e 15942009-03-07 Bean <bean123ch@gmail.com>
1595
1596 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
1597 allocation.
1598
b362c9e9 15992009-03-06 Robert Millan <rmh@aybabtu.com>
1600
1601 Fix display issue on terminals with screen size other than 80x25
1602 (e.g. gfxterm with resolution higher than 640x480).
1603
1604 * normal/main.c (grub_normal_init_page): Display title text in a
7d074e3c 1605 position relative to the center of the terminal instead of relying
b362c9e9 1606 on a hardcoded offset.
1607
9304eef1 16082009-03-04 Robert Millan <rmh@aybabtu.com>
1609
1610 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
1611 installed.
1612
1613 * Makefile.in (host_kernel): New variable.
1614 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
1615 scripts instead of just the windows one.
1616 * configure.ac: Initialize and AC_SUBST `host_kernel'.
1617
eabc95fb 16182009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 1619
1620 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
1621 `kern/handler.c'.
1622 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1623 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1624 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1625 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1626 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1627 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1628
ceb1223c 16292009-03-04 Felix Zielcke <fzielcke@z-51.de>
1630
1631 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
1632 or if there's no space for the disk label and print the partition number on a
1633 invalid magic.
1634
4910684a 16352009-03-04 Felix Zielcke <fzielcke@z-51.de>
1636
1637 * util/misc.c: Include <time.h>.
1638 (grub_millisleep): New function.
1639
7e9ca17a 16402009-03-04 Bean <bean123ch@gmail.com>
1641
1642 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
1643 another option -mno-red-zone.
1644
1645 * commands/handler.c: Change module description.
1646
1647 * kern/handler.c: Add missing space at the end of description line.
1648
1649 * kern/list.c: Likewise.
1650
f501677c 16512009-03-03 Robert Millan <rmh@aybabtu.com>
1652
1653 Move more components to the relocation area, and fix mbi pointer
1654 handling to use the destination rather than the origin (thanks to
1655 Vladimir Serbinenko for spotting).
1656
1657 * loader/i386/multiboot.c (mbi_dest): New variable.
1658 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
1659 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
1660 relocation area.
1661
9902d047 16622009-03-01 Bean <bean123ch@gmail.com>
1663
50fb7002 1664 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 1665 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
1666 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
1667 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
1668
1669 * loader/i386/efi/linux.c (acpi_guid): New variable.
1670 (acpi_guid): Likewise.
1671 (EBDA_SEG_ADDR): New constant.
1672 (LOW_MEM_ADDR): Likewise.
1673 (FAKE_EBDA_SEG): Likewise.
1674 (fake_bios_data): New function.
1675 (grub_linux_boot): Call fake_bios_data.
1676
71b9f361 16772009-03-01 Bean <bean123ch@gmail.com>
1678
1679 * commands/terminal.c: Removed.
1680
1681 * commands/handler.c: New file.
1682
1683 * include/grub/list.h: Likewise.
1684
1685 * include/grub/handler.h: Likewise.
1686
1687 * kern/list.c: Likewise.
1688
1689 * kern/handler.c: Likewise.
1690
1691 * kern/term.h: Include header file <grub/handler.h>.
1692 (grub_term_input): Move next field to the beginning.
1693 (grub_term_output): Likewise.
1694 (grub_term_input_class): New variable.
1695 (grub_term_output_class): Likewise.
1696 (grub_term_register_input): Changed to inline function.
1697 (grub_term_register_output): Likewise.
1698 (grub_term_unregister_input): Likewise.
1699 (grub_term_unregister_output): Likewise.
1700 (grub_term_set_current_input): Likewise.
1701 (grub_term_set_current_output): Likewise.
1702 (grub_term_get_current_input): Likewise.
1703 (grub_term_get_current_output): Likewise.
1704 (grub_term_iterate_input): Removed.
1705 (grub_term_iterate_output): Likewise.
1706
1707 * kern/term.c (grub_term_list_input): Removed.
1708 (grub_term_list_output): Likewise.
1709 (grub_term_input_class): New variable.
1710 (grub_term_output_class): Likewise.
50fb7002 1711 (grub_cur_term_input): Change variable as macro.
71b9f361 1712 (grub_cur_term_output): Likewise.
1713 (grub_term_register_input): Removed.
1714 (grub_term_register_output): Likewise.
1715 (grub_term_unregister_input): Likewise.
1716 (grub_term_unregister_output): Likewise.
1717 (grub_term_set_current_input): Likewise.
1718 (grub_term_set_current_output): Likewise.
1719 (grub_term_iterate_input): Likewise.
1720 (grub_term_iterate_output): Likewise.
1721 (grub_term_get_current_input): Likewise.
1722 (grub_term_get_current_output): Likewise.
1723
1724 * util/grub-editenv.c: Include header file <grub/handler.h>.
1725 (grub_term_get_current_input): Removed.
1726 (grub_term_get_current_output): Likewise.
1727 (grub_term_input_class): New variable.
50fb7002 1728 (grub_term_output_class): Likewise.
71b9f361 1729
1730 * util/grub-fstest.c (grub_term_get_current_input): Removed.
1731 (grub_term_get_current_output): Likewise.
1732 (grub_term_input_class): New variable.
50fb7002 1733 (grub_term_output_class): Likewise.
71b9f361 1734
1735 * util/grub-probe.c (grub_term_get_current_input): Removed.
1736 (grub_term_get_current_output): Likewise.
1737 (grub_term_input_class): New variable.
50fb7002 1738 (grub_term_output_class): Likewise.
71b9f361 1739
1740 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
1741 (grub_term_get_current_output): Likewise.
1742 (grub_term_input_class): New variable.
50fb7002 1743 (grub_term_output_class): Likewise.
71b9f361 1744
1745 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
1746 (terminal_mod_SOURCES): Likewise.
1747 (terminal_mod_CFLAGS): Likewise.
1748 (terminal_mod_LDFLAGS): Likewise.
1749
1750 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
1751 handler.c.
1752 (kernel_img_SOURCES): Add list.c and handler.c.
1753 (kernel_img_HEADERS): Add list.h and handler.h.
1754
1755 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1756 handler.c.
1757 (kernel_mod_SOURCES): Add list.c and handler.c.
1758 (kernel_mod_HEADERS): Add list.h and handler.h.
1759
1760 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
1761 handler.c.
1762 (kernel_elf_SOURCES): Add list.c and handler.c.
1763 (kernel_elf_HEADERS): Add list.h and handler.h.
1764
1765 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1766 handler.c.
1767 (kernel_elf_SOURCES): Add list.c and handler.c.
1768 (kernel_elf_HEADERS): Add list.h and handler.h.
1769
1770 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
1771 handler.c.
1772 (kernel_mod_SOURCES): Add list.c and handler.c.
1773 (kernel_mod_HEADERS): Add list.h and handler.h.
1774
1775 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
1776 handler.c.
1777 (kernel_elf_SOURCES): Add list.c and handler.c.
1778 (kernel_elf_HEADERS): Add list.h and handler.h.
1779
8a31787f 17802009-02-27 Robert Millan <rmh@aybabtu.com>
1781
1782 Factorize elf32 / elf64 code in Multiboot loader. This will
1783 prevent it from getting out of sync again.
1784
1785 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
1786 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
1787 grub_multiboot_load_elf64): Move from here ...
1788 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
1789 grub_multiboot_load_elf): ... to here (new file).
1790
51cd3dfc 17912009-02-27 Robert Millan <rmh@aybabtu.com>
1792
1793 * util/grub.d/10_linux.in: Rename "single-user mode" to
1794 "recovery mode".
1795
6e8c9c3a 17962009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
1797
1798 Don't leak in SCSI code.
1799 * disk/scsi.c (grub_scsi_close): free `scsi'.
1800
4b6bf4f9 18012009-02-27 Robert Millan <rmh@aybabtu.com>
1802
1803 * loader/i386/pc/multiboot.c: Move from here ...
1804 * loader/i386/multiboot.c: ... to here. Update all users.
1805
b9413424 18062009-02-27 Robert Millan <rmh@aybabtu.com>
1807
1808 Patch from Alexandre Bique <bique.alexandre@gmail.com>
1809 * util/i386/pc/grub-setup.c (setup): Fix directory path.
1810
50fb7002 18112009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 1812
1813 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
1814 b-tree.
1815
8cc50345 18162009-02-27 Robert Millan <rmh@aybabtu.com>
1817
1818 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
1819 `0x' qualifier as 0 when base is specified as parameter).
1820
6e09b8b7 18212009-02-24 Bean <bean123ch@gmail.com>
1822
1823 * configure.ac: Check for -mcmodel=large in x86_64 target.
1824
1825 * include/grub/efi/api.h (efi_call_10): New macro.
1826 (efi_wrap_10): New function.
1827
1828 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
1829 (GRUB_PE32_REL_BASED_HIGH): Likewise.
1830 (GRUB_PE32_REL_BASED_LOW): Likewise.
1831 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
1832 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
1833 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
1834 (GRUB_PE32_REL_BASED_SECTION): Likewise.
1835 (GRUB_PE32_REL_BASED_REL): Likewise.
1836 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
1837 (GRUB_PE32_REL_BASED_DIR64): Likewise.
1838 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
1839
1840 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
1841 issue.
1842
1843 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
1844 (efi_wrap_10): New function.
1845
1846 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
1847
1848 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
1849 MB/MBP model (NV chipset).
1850 (devdata_devs): Add devpath_5 to the list.
1851
1852 * load/i386/efi/linux.c (video_base): Remove variable.
1853 (RGB_MASK): New macro.
1854 (RGB_MAGIC): Likewise.
1855 (LINE_MIN): Likewise.
1856 (LINE_MAX): Likewise.
1857 (FBTEST_STEP): Likewise.
1858 (FBTEST_COUNT): Likewise.
1859 (fb_list): New variable.
1860 (grub_find_video_card): Remove function.
1861 (find_framebuf): New function.
1862 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
1863 line length.
1864
1865 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
1866 problem for x86_64.
1867
74b21bee 18682009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
1869
1870 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
1871
1872 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
1873 coding tool name.
1874
a455f472 18752009-02-22 Robert Millan <rmh@aybabtu.com>
1876
1877 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
1878 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
1879 in our relocation, instead of using it directly from heap. Also
1880 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
1881
6374daf3 18822009-02-21 Robert Millan <rmh@aybabtu.com>
1883
1884 Implement USB keyboard support (based on patch by Marco Gerards)
1885
1886 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
1887 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
1888 (usb_keyboard_mod_LDFLAGS): New variables.
1889
1890 * term/usb_keyboard.c: New file.
1891
8fa4ea70 18922009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
1893
1894 Corrected wrong declaration
1895
1896 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
1897
353976ac 18982009-02-14 Christian Franke <franke@computer.org>
1899
1900 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
1901 (grub_lspci_iter): Print class code and programming interface byte.
1902
6aa1169b 19032009-02-14 Christian Franke <franke@computer.org>
1904
1905 * gendistlist.sh: Ignore `.svn' directories.
1906
265372ca 19072009-02-14 Felix Zielcke <fzielcke@z-51.de>
1908
1909 * fs/fat.c: Add 2009 to Copyright line.
1910
9ff516f3 19112009-02-14 Christian Franke <franke@computer.org>
1912
1913 * commands/hdparm.c: New file. Provides `hdparm' command
1914 which sends ATA commands via grub_disk_ata_pass_through ().
1915
1916 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
1917
1918 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
1919 and <grub/cpu/io.h> to include/grub/ata.h.
1920 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
1921 (GRUB_CDROM_SECTOR_SIZE): Remove.
1922 (GRUB_ATA_*): Move to include/grub/ata.h.
1923 (GRUB_ATAPI_*): Likewise.
1924 (enum grub_ata_commands): Likewise.
1925 (enum grub_ata_timeout_milliseconds): Likewise.
1926 (struct grub_ata_device): Likewise.
1927 (grub_ata_regset): Likewise.
1928 (grub_ata_regget): Likewise.
1929 (grub_ata_regset2): Likewise.
1930 (grub_ata_regget2): Likewise.
1931 (grub_ata_check_ready): Likewise.
1932 (grub_ata_wait_not_busy): Remove static, exported in
1933 include/grub/ata.h.
1934 (grub_ata_wait_drq): Likewise.
1935 (grub_ata_pio_read): Likewise.
1936
1937 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
1938 function for hdparm.mod.
1939
1940 * include/grub/ata.h: New file, contains declarations from
1941 disk/ata.c.
1942 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
1943
1944 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
1945 (grub_disk_ata_pass_through): New exported variable.
1946
1947 * kern/disk.c (grub_disk_ata_pass_through): New variable.
1948
772e23da 19492009-02-13 Colin D Bennett <colin@gibibit.com>
1950
1951 Support multiple fallback entries, and provide an API to support
1952 executing default+fallback menu entries. Renamed the `terminal' menu
1953 viewer to `text'.
1954
1955 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
1956 variable declaration.
1957 (grub_menu_execute_callback): New structure declaration.
1958 (grub_menu_execute_callback_t): New typedef.
1959 (grub_menu_execute_with_fallback): New function declaration.
1960 (grub_menu_get_entry): Likewise.
1961 (grub_menu_get_timeout): Likewise.
1962 (grub_menu_set_timeout): Likewise.
1963
1964 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
1965
1966 * normal/menu.c (grub_wait_after_message): Moved to
1967 `normal/menu_text.c'.
1968 (draw_border): Likewise.
1969 (print_message): Likewise.
1970 (print_entry): Likewise.
1971 (print_entries): Likewise.
1972 (grub_menu_init_page): Likewise.
1973 (get_entry_number): Likewise.
1974 (print_timeout): Likewise.
1975 (run_menu): Likewise.
1976 (grub_menu_execute_entry): Likewise.
1977 (show_text_menu): Likewise.
1978 (get_and_remove_first_entry_number): New function.
1979 (grub_menu_execute_with_fallback): Likewise.
1980 (get_entry): Renamed to ...
1981 (grub_menu_get_entry): .. this and made it global.
1982 (get_timeout): Renamed to ...
1983 (grub_menu_get_timeout): ... this and made it global.
1984 (set_timeout): Renamed to ...
1985 (grub_menu_set_timeout): ... this and made it global.
1986 (grub_normal_terminal_menu_viewer): Renamed to ...
1987 (grub_normal_text_menu_viewer): ... this.
1988
1989 * normal/menu_text.c: New file. Extracted text-menu-specific code
1990 from normal/menu.c.
1991
1992 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
1993 (normal_mod_SOURCES): Likewise.
1994
1995 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1996 (normal_mod_SOURCES): Likewise.
1997
1998 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1999 (normal_mod_SOURCES): Likewise.
2000
2001 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
2002 (normal_mod_SOURCES): Likewise.
2003
2004 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2005 (normal_mod_SOURCES): Likewise.
2006
2007 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2008 (normal_mod_SOURCES): Likewise.
2009
2010 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2011 (normal_mod_SOURCES): Likewise.
2012
16ac430e 20132009-02-11 Robert Millan <rmh@aybabtu.com>
2014
2015 * util/grub.d/00_header.in: Update old reference to `font' command.
2016
06ff20fc 20172009-02-10 Felix Zielcke <fzielcke@z-51.de>
2018
2019 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
2020
2021 Based on patch from Javier Martín.
2022
96da9407 20232009-02-09 Felix Zielcke <fzielcke@z-51.de>
2024
2025 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 2026 to avoid false positives with FAT.
96da9407 2027 (grub_fstest_SOURCES): Likewise.
2028 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2029 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2030 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2031 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2032 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2033 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2034
6dca6fe4 20352009-02-09 Felix Zielcke <fzielcke@z-51.de>
2036
06ff20fc 2037 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 2038 bpb.version_specific.fat12_or_fat16.fstype and
2039 bpb.version_specific.fat32.fstype.
2040
2550c62f 20412009-02-08 Robert Millan <rmh@aybabtu.com>
2042
be110b30 2043 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 2044
56978920 20452009-02-08 Robert Millan <rmh@aybabtu.com>
2046
2047 * Makefile.in (host_os, host_cpu): New variables.
2048 (target_os): Remove. Update all users.
2049
d64399b5 20502009-02-08 Marco Gerards <marco@gnu.org>
2051
2052 * Makefile.in (enable_grub_emu_usb): New variable.
2053 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
2054 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
2055 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
2056 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
2057 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
2058 `usbtest.mod' and `usbms.mod'.
2059 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
2060 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
2061 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
2062 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
2063 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
2064 variables.
2065
2066 * disk/usbms.c: New file.
2067
2068 * include/grub/usb.h: Likewise.
2069
2070 * include/grub/usbtrans.h: Likewise.
2071
2072 * include/grub/usbdesc.h: Likewise.
2073
2074 * bus/usb/usbtrans.c: Likewise.
2075
2076 * bus/usb/ohci.c: Likewise.
2077
2078 * bus/usb/uhci.c: Likewise.
2079
2080 * bus/usb/usbhub.c: Likewise.
2081
2082 * bus/usb/usb.c: Likewise.
2083
2084 * commands/usbtest.c: Likewise.
2085
2086 * util/usb.c: Likewise.
50fb7002 2087
d64399b5 2088 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
2089
2090 * configure.ac: Test for libusb presence.
50fb7002 2091
d64399b5 2092 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
2093
2b40d6bb 20942009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
2095
2096 * kern/mm.c: Add more comments.
2097
73a4ce81 20982009-02-08 Robert Millan <rmh@aybabtu.com>
2099
2100 Patch from Javier Martín.
2101 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
2102 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
2103
f821ce59 21042009-02-08 Robert Millan <rmh@aybabtu.com>
2105
2106 * fs/cpio.c: Split tar functionality to ...
2107 * fs/tar.c: ... here (new file). Update all users.
2108
aebfc4b0 21092009-02-07 Robert Millan <rmh@aybabtu.com>
2110
2111 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
2112 backward-incompatible features.
2113
2114 Based on patch from Javier Martín, with some adjustments.
2115
50fb7002 21162009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 2117
2118 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
2119
0bb5115e 21202009-02-07 Robert Millan <rmh@aybabtu.com>
2121
2122 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
2123 position of `disk/lvm.c' to ensure grub_init_all() always picks it
2124 after the RAID stuff.
2125
38a0f8e7 21262009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
2127
50fb7002 2128 Fixes problem when running vbetest command as reported by
38a0f8e7 2129 Vladimir Serbinenko <phcoder@gmail.com>.
2130
2131 * (grub_vbe_set_video_mode): Fixed problem with text modes.
2132
3143cc1c 21332009-02-04 Felix Zielcke <fzielcke@z-51.de>
2134
2135 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
2136 /dev/md/NpN style mdraid devices.
2137
9cba6fce 21382009-02-03 Felix Zielcke <fzielcke@z-51.de>
2139
2140 * util/unifont2pff.rb: Remove.
2141
e507a2c1 21422009-02-03 Felix Zielcke <fzielcke@z-51.de>
2143
2144 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
2145 `#'.
2146
d2c2b4cd 21472009-02-03 Felix Zielcke <fzielcke@z-51.de>
2148
2149 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
2150 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2151 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2152 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2153 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2154 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2155 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2156
b4315fb0 21572009-02-02 Christian Franke <franke@computer.org>
2158
2159 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
2160
de3aa260 21612009-02-01 Felix Zielcke <fzielcke@z-51.de>
2162
7c3ff286 2163 * INSTALL: Note that we now require at least autoconf 2.59 and
2164 that LZO is optional.
de3aa260 2165
825a182b 21662009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2167
2168 Base on patch on bug #24154 created by Tomas Tintera
2169 <trosos@seznam.cz>.
2170
2171 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
2172
a69ef770 21732009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
2174
7c3ff286 2175 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 2176 <bero@arklinux.org>.
2177
2178 * normal/parser.y (script_init): Add missing semicolon.
2179
6fa42fa6 21802009-01-31 Colin D Bennett <colin@gibibit.com>
2181
7c3ff286 2182 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 2183 (free_menu_entry_classes): Added.
2184 (grub_normal_menu_addentry): Added class property handling.
2185 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
2186 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
2187
2188 * normal/menu_viewer.c: New file.
2189
2190 * normal/menu.c (run_menu_entry): Renamed to ...
2191 (grub_menu_execute_entry): ... this and made it as global.
2192 (grub_menu_run): Renamed to ...
2193 (show_text_menu): ... this and made it local.
2194 (show_text_menu): Adapt to new function names.
2195 (grub_normal_terminal_menu_viewer): New global variable.
2196
2197 * include/grub/menu.h: New file.
2198
2199 * include/grub/menu_viewer.h: New file.
2200
2201 * include/grub/normal.h: Added include to grub/menu.h.
2202 (grub_menu_entry): Moved to include/grub/menu.h.
2203 (grub_menu_entry_t): Likewise.
2204 (grub_menu): Likewise.
2205 (grub_menu_t): Likewise.
2206 (grub_normal_terminal_menu_viewer): Added.
2207 (grub_menu_execute_entry): Likewise.
2208 (grub_menu_run): Removed.
2209
2210 * DISTLIST: Added include/grub/menu.h.
2211 Added include/grub/menu_viewer.h.
2212 Added normal/menu_viewer.c.
2213
22142009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
2215
2216 * normal/execute.c (grub_script_execute_menuentry): Changed to use
2217 arglist for menutitle arguments.
2218
2219 * normal/main.c (grub_normal_menu_addentry): Likewise.
2220
2221 * normal/parser.y (menuentry): Likewise.
2222
2223 * normal/script.c (grub_script_create_cmdmenu): Likewise.
2224
2225 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
2226 (grub_script_create_cmdmenu): Likewise.
2227
2228 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
2229
2230 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
2231 changes.
2232
2233 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
2234
2235 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
2236
2237 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
2238
2239 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2240
2241 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2242
2243 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
2244
56192c23 22452009-01-30 Christian Franke <franke@computer.org>
2246
2247 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
2248 in option help text.
2249
d72521b3 22502009-01-27 Pavel Roskin <proski@gnu.org>
2251
2252 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
2253
994b5e84 22542009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2255
2256 * commands/lsmmap.c: Add include to grub/machine/memory.h.
2257
2258 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
2259
2260 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
2261 unregister function.
2262
6a7eab2c 22632009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
2264
2265 * disk/scsi.c (grub_scsi_read): Fix sign problem.
2266
2267 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
2268
2269 * util/grub-mkfont.c (usage): Fix typo.
2270
2271 * util/elf/grub-mkimage.c (load_modules): Fix warning.
2272
1806b56e 22732009-01-26 Daniel Mierswa <impulze@impulze.org>
2274
3fb18f09 2275 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
2276
336e1fb9 2277 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
2278
1806b56e 2279 * kern/misc.c (grub_strcasecmp): New function.
2280 (grub_strcasecmp): Use grub_size_t instead of int for length.
2281 Fix return value.
2282 * include/grub/misc.h: Update function prototypes.
2283
580b2a0f 22842009-01-26 Robert Millan <rmh@aybabtu.com>
2285
2286 * configure.ac: Fix cross-compilation check.
ef257b36 2287
d31c24f1 22882009-01-22 Christian Franke <franke@computer.org>
2289
2290 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
2291 (precision) digit string. Allow `.format2' without `format1' (width).
2292 Limit input chars for `%s' output to `format2' if specified. This is
2293 compatible with standard printf ().
2294
3138b44c 22952009-01-22 Christian Franke <franke@computer.org>
2296
2297 * disk/ata.c (grub_ata_wait_status): Replace by ...
2298 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
2299 other status bits may be invalid while BSY is asserted.
2300 (grub_ata_check_ready): New function.
2301 (grub_ata_cmd): Removed.
2302 (grub_ata_wait_drq): New function.
2303 (grub_ata_strncpy): Remove inline.
2304 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
2305 and error check now done by grub_ata_wait_drq ().
2306 (grub_ata_pio_write): Likewise.
2307 (grub_atapi_identify): Set DEV before check for !BSY. Use
2308 grub_ata_wait_drq () to wait for data.
2309 (grub_ata_device_initialize): Add status register check to
2310 detect missing SATA slave devices. Add debug messages.
2311 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
2312 (grub_atapi_packet): Set DEV before check for !BSY. Replace
2313 transfer loop by grub_ata_pio_write ().
2314 (grub_ata_identify): Set DEV before check for !BSY. Use
2315 grub_ata_wait_drq () to wait for data.
ef257b36 2316 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 2317 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
2318 read/write in one loop. Fix invalid command on write. Fix incomplete
2319 command on (size % batch) == 0. Add missing error check after write of
2320 last block. Add debug messages.
2321 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
2322
59a64ef6 23232009-01-19 Christian Franke <franke@computer.org>
2324
2325 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
2326 (GRUB_ATAPI_IREASON_*): Likewise.
2327 (grub_ata_pio_write): Fix timeout error return.
2328 (grub_atapi_identify): Add grub_ata_wait () after cmd.
2329 (grub_atapi_wait_drq): New function.
2330 (grub_atapi_packet): New parameter `size'.
2331 Use grub_atapi_wait_drq () and direct write instead of
2332 grub_ata_pio_write ().
2333 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
2334 reads the number of bytes requested by the device for each DRQ
2335 assertion.
2336 (grub_atapi_write): Remove old implementation, return not
2337 implemented instead.
2338
1cfe20b3 23392009-01-19 Christian Franke <franke@computer.org>
2340
2341 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
2342 of 512 to calculate data size.
2343 (grub_scsi_read12): Likewise.
2344 (grub_scsi_write10): Likewise.
2345 (grub_scsi_write12): Likewise.
2346 (grub_scsi_read): Adjust size according to blocksize.
2347 Add checks for invalid blocksize and unaligned transfer.
2348
bee5fe5d 23492009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
2350
2351 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
2352
ef257b36 2353 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 2354 width glyphs.
2355
3e643f8c 23562009-01-19 Robert Millan <rmh@aybabtu.com>
2357
2358 * config.guess: Update to latest version from config git.
2359 * config.sub: Likewise.
2360
4fa80998 23612009-01-17 Felix Zielcke <fzielcke@z-51.de>
2362
2363 * Makefile.in: Change font compilation to use new grub-mkfont instead
2364 of java version.
2365
2366 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
2367 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
2368 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2369 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
2370 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
2371 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
2372 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
2373 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
2374 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2375
7086085b 23762009-01-16 Christian Franke <franke@computer.org>
2377
2378 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
2379 (enum grub_ata_timeout_milliseconds): New enum.
2380 (grub_ata_wait_status): Add parameter milliseconds.
2381 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
2382 recovery from timed-out commands.
2383 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
2384 return grub_errno instead of REG_ERROR.
2385 (grub_ata_pio_write): Add parameter milliseconds.
2386 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
2387 Pass milliseconds to grub_ata_wait_status () and
2388 grub_ata_pio_read ().
2389 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
2390 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
2391 grub_ata_wait_status (). Fix IDENTIFY timeout check.
2392 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
2393 It is not suitable for device detection, because DEV bit is ignored,
2394 the command may run too long, and not all devices set the signature
2395 properly.
2396 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
2397 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
2398 Fix device selection, DEV bit must be set first to address the registers
2399 of the correct device.
2400 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
2401 grub_ata_pio_read/write ().
2402 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
2403 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
2404
4a412913 24052009-01-13 Carles Pina i Estany <carles@pina.cat>
2406
2407 * util/grub-editenv.c (main): Use fseeko(), not fseek().
2408
7795c55e 24092009-01-13 Bean <bean123ch@gmail.com>
d913988c 2410
2411 * util/grub-mkfont.c (write_font): forget to remove some debug code.
2412
7795c55e 24132009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 2414
2415 * Makefile.in: (enable_grub_mkfont): New variable.
2416 (freetype_cflags): Likewise.
2417 (freetype_libs): Likewise.
2418
2419 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
2420 (grub_mkfont_SOURCES): New variable.
2421 (grub_mkfont_CFLAGS): Likewise.
2422 (grub_mkfont_LDFLAGS): Likewise.
2423
2424 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
2425 library if `--enable-grub-mkfont' is requested.
2426 (enable_grub_mkfont): New variable.
2427 (freetype_cflags): Likewise.
2428 (freetype_libs): Likewise.
2429
2430 * util/grub-mkfont.c: New file.
2431
093af1fe 24322009-01-12 Christian Franke <franke@computer.org>
2433
2434 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
2435 mode check. Fix setting of compat_use[].
2436
f36cc108 24372009-01-10 Robert Millan <rmh@aybabtu.com>
2438
2439 Update a few copyright years which we forgot to do in 2008 (only for
2440 files whose changes made in 2008 were copyright-significant)
2441
2442 * Makefile.in: Add 2008 to Copyright line.
2443 * disk/ieee1275/ofdisk.c: Likewise.
2444 * disk/efi/efidisk.c: Likewise.
2445 * kern/dl.c: Likewise.
2446 * kern/sparc64/ieee1275/init.c: Likewise.
2447 * kern/mm.c: Likewise.
2448 * kern/efi/mm.c: Likewise.
2449 * boot/i386/pc/boot.S: Likewise.
2450 * genfslist.sh: Likewise.
2451 * fs/iso9660.c: Likewise.
2452 * fs/hfs.c: Likewise.
2453 * fs/jfs.c: Likewise.
2454 * fs/minix.c: Likewise.
2455 * fs/ufs.c: Likewise.
2456 * gensymlist.sh.in: Likewise.
2457 * genkernsyms.sh.in: Likewise.
2458 * include/grub/misc.h: Likewise.
2459 * include/grub/types.h: Likewise.
2460 * include/grub/symbol.h: Likewise.
2461 * include/grub/elf.h: Likewise.
2462 * include/grub/kernel.h: Likewise.
2463 * include/grub/disk.h: Likewise.
2464 * include/grub/dl.h: Likewise.
2465 * include/grub/i386/linux.h: Likewise.
2466 * include/grub/i386/pc/biosdisk.h: Likewise.
2467 * include/grub/efi/api.h: Likewise.
2468 * include/grub/efi/pe32.h: Likewise.
2469 * include/grub/util/misc.h: Likewise.
2470 * normal/execute.c: Likewise.
2471 * normal/arg.c: Likewise.
2472 * normal/completion.c: Likewise.
2473 * normal/lexer.c: Likewise.
2474 * normal/parser.y: Likewise.
2475 * normal/misc.c: Likewise.
2476 * commands/i386/pc/vbeinfo.c: Likewise.
2477 * commands/hexdump.c: Likewise.
2478 * commands/terminal.c: Likewise.
2479 * commands/ls.c: Likewise.
2480 * commands/help.c: Likewise.
2481 * partmap/pc.c: Likewise.
2482 * loader/efi/chainloader.c: Likewise.
2483 * loader/multiboot_loader.c: Likewise.
2484 * loader/i386/pc/multiboot2.c: Likewise.
2485 * term/efi/console.c: Likewise.
2486 * term/i386/pc/serial.c: Likewise.
2487 * util/lvm.c: Likewise.
2488 * util/console.c: Likewise.
2489 * util/i386/efi/grub-mkimage.c: Likewise.
2490 * util/raid.c: Likewise.
2491
7f02114b 24922009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
2493
2494 * commands/videotest.c: Removed include to grub/machine/memory.h.
2495
2496 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
2497 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
2498 (video_mod_SOURCES): Removed.
2499 (video_mod_CFLAGS): Likewise.
2500 (video_mod_LDFLAGS): Likewise.
2501 (gfxterm_mod_SOURCES): Likewise.
2502 (gfxterm_mod_CFLAGS): Likewise.
2503 (gfxterm_mod_LDFLAGS): Likewise.
2504 (videotest_mod_SOURCES): Likewise.
2505 (videotest_mod_CFLAGS): Likewise.
2506 (videotest_mod_LDFLAGS): Likewise.
2507 (bitmap_mod_SOURCES): Likewise.
2508 (bitmap_mod_CFLAGS): Likewise.
2509 (bitmap_mod_LDFLAGS): Likewise.
2510 (tga_mod_SOURCES): Likewise.
2511 (tga_mod_CFLAGS): Likewise.
2512 (tga_mod_LDFLAGS): Likewise.
2513 (jpeg_mod_SOURCES): Likewise.
2514 (jpeg_mod_CFLAGS): Likewise.
2515 (jpeg_mod_LDFLAGS): Likewise.
2516 (png_mod_SOURCES): Likewise.
2517 (png_mod_CFLAGS): Likewise.
2518 (png_mod_LDFLAGS): Likewise.
2519
2520 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
2521 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
2522 (video_mod_SOURCES): Added.
2523 (video_mod_CFLAGS): Likewise.
2524 (video_mod_LDFLAGS): Likewise.
2525 (videotest_mod_SOURCES): Likewise.
2526 (videotest_mod_CFLAGS): Likewise.
2527 (videotest_mod_LDFLAGS): Likewise.
2528 (bitmap_mod_SOURCES): Likewise.
2529 (bitmap_mod_CFLAGS): Likewise.
2530 (bitmap_mod_LDFLAGS): Likewise.
2531 (tga_mod_SOURCES): Likewise.
2532 (tga_mod_CFLAGS): Likewise.
2533 (tga_mod_LDFLAGS): Likewise.
2534 (jpeg_mod_SOURCES): Likewise.
2535 (jpeg_mod_CFLAGS): Likewise.
2536 (jpeg_mod_LDFLAGS): Likewise.
2537 (png_mod_SOURCES): Likewise.
2538 (png_mod_CFLAGS): Likewise.
2539 (png_mod_LDFLAGS): Likewise.
2540 (gfxterm_mod_SOURCES): Likewise.
2541 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 2542 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 2543
2544 * term/gfxterm.c: Removed include to grub/machine/memory.h,
2545 grub/machine/console.h.
2546
644fff97 25472009-01-04 Jerone Young <jerone@gmail.com>
2548
2549 Make on screen instructions clearer
2550
2551 Based on patch created by Jidanni <jidanni@jidanni.org>
2552
2553 * normal/menu.c: print clearer instructions on the screen
2554
1e901a75 25552009-01-02 Colin D Bennett <colin@gibibit.com>
2556
2557 New font engine.
34c44600 2558
1e901a75 2559 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
2560 build system and fixed gfxterm.c to work with different sized fonts.
2561
2562 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 2563
1e901a75 2564 * configure: Re-generated.
34c44600 2565
1e901a75 2566 * DISTLIST: Removed font/manager.c.
2567 Added font/font.c.
2568 Added font/font_cmd.c.
34c44600 2569
1e901a75 2570 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
2571 compilation.
34c44600 2572
1e901a75 2573 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 2574
2575 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 2576
2577 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 2578
1e901a75 2579 * normal/menu.c: Likewise.
34c44600 2580
1e901a75 2581 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
2582 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 2583
1e901a75 2584 * include/grub/font.h: Replaced with new file.
34c44600 2585
1e901a75 2586 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
2587 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
2588 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
2589 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
2590 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 2591 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 2592 fg_red, fg_green, fg_blue, fg_alpha.
2593 (grub_video_adapter): Removed blit_glyph.
34c44600 2594 (grub_video_blit_glyph): Removed.
2595
1e901a75 2596 * font/manager.c: Removed file.
34c44600 2597
2598 * font/font.c: New file.
2599
1e901a75 2600 * font/font_cmd.c: Likewise.
34c44600 2601
1e901a75 2602 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 2603
1e901a75 2604 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
2605 (grub_video_vbe_map_rgba): Likewise.
2606 (grub_video_vbe_unmap_color_int): Likewise.
2607 (grub_video_vbe_blit_glyph): Removed.
2608 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 2609
1e901a75 2610 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
2611 (get_pixel): Likewise.
34c44600 2612 (set_pixel): Likewise.
2613
1e901a75 2614 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 2615
1e901a75 2616 * term/gfxterm.c: Adapted to new font engine.
34c44600 2617
1e901a75 2618 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 2619
1e901a75 2620 * term/i386/pc/vga.c: Likewise.
34c44600 2621
1e901a75 2622 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 2623
1e901a75 2624 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 2625
1e901a75 2626 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 2627
1e901a75 2628 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 2629
1e901a75 2630 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 2631
1e901a75 2632 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 2633
1e901a75 2634 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 2635
1e901a75 2636 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 2637
1e901a75 2638 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
2639
2640 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 2641
1e901a75 2642 * util/grub-mkconfig_lib.in: Changed font extension.
2643
278922e8 26442008-12-28 Felix Zielcke <fzielcke@z-51.de>
2645
2646 * util/getroot.c (grub_util_get_grub_dev): Add support for
2647 /dev/md/dNNpNN style partitionable mdraid devices.
2648
3ced05cf 26492008-12-12 Alex Smith <alex@alex-smith.me.uk>
2650
2651 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
2652 at a time limit of the PXE TFTP API correctly.
2653 (grub_pxefs_close): Likewise.
2654
7fd0ee30 26552008-11-29 Robert Millan <rmh@aybabtu.com>
2656
34c44600 2657 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 2658 grub_ata_device_initialize() calls.
2659
34c44600 26602008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 2661
2662 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
2663 iteration failed.
2664 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
2665
89313780 26662008-11-28 Robert Millan <rmh@aybabtu.com>
2667
2668 Fix build on powerpc-ieee1275. Based on patch created by
2669 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
2670 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2671 `kern/ieee1275/mmap.c'.
2672 * include/grub/powerpc/ieee1275/memory.h: New file.
2673
15257703 2674 Provide grub-install on coreboot.
2675 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
2676 (grub_install_SOURCES): New variable.
2677 * util/i386/pc/grub-install.in: Add a few condition checks to make it
2678 usable on coreboot.
2679
9fc5388a 26802008-11-25 Felix Zielcke <fzielcke@z-51.de>
2681
2682 * util/grub-fstest.c (grub_term_get_current_input): Change return type
2683 to `grub_term_input_t'.
2684 (grub_term_get_current_output): Change return type to
2685 `grub_term_output_t'.
2686
bc3a2f31 26872008-11-22 Robert Millan <rmh@aybabtu.com>
2688
34c44600 2689 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 2690 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
2691 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
2692 grub_vga_text_cls().
2693
80fc88f2 2694 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 2695 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 2696
cbf36fd3 2697 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
2698 to 0x200000 (avoids trouble with some OFW implementations, and matches
2699 with the one in Yaboot).
2700 Reported by Manoel Abranches
2701
73e8e268 27022008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 2703
2704 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
2705 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
2706
73e8e268 2707 * util/grub-mkconfig_lib.in (grub_warn): New function.
2708 (convert_system_path_to_grub_path): Use grub_warn() when issuing
2709 warnings, to obtain consistent formatting.
2710 * util/grub.d/00_header.in: Likewise.
2711 * util/update-grub_lib.in: Likewise.
2712
e94045a1 2713 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 2714 Move comment text to `#error' stanza.
e94045a1 2715
79d29fd7 2716 Harmonize ieee1275's grub_available_iterate() with the generic
2717 grub_machine_mmap_iterate() interface (fixes a recently-introduced
2718 build problem on i386-ieee1275):
2719 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
2720 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
2721 parameter `type'. Update all users of this function.
2722 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
2723 `kern/ieee1275/mmap.c'.
2724 * kern/ieee1275/init.c
2725 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
2726 with ...
2727 (grub_machine_mmap_iterate): ... this.
2728 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
2729 return type to `grub_err_t'. Update all implementations of this
2730 function prototype.
2731 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
2732 Likewise.
2733
60d6b16e 2734 Add `lsmmap' command (lists firmware-provided memory map):
2735 * commands/lsmmap.c: New file.
2736 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
2737 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
2738 variables.
2739 * conf/powerpc-ieee1275.rmk: Likewise.
2740 * conf/i386-coreboot.rmk: Likewise.
2741 * conf/i386-ieee1275.rmk: Likewise.
2742
ebaaf49b 27432008-11-19 Robert Millan <rmh@aybabtu.com>
2744
2745 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 2746 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
2747 constraints to initrd allocation (based on code from
2748 loader/i386/pc/linux.c). Without them, initrd was allocated too high
2749 for Linux to find it.
ebaaf49b 2750
dfab719f 27512008-11-14 Robert Millan <rmh@aybabtu.com>
2752
2753 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
2754 order to cope with duplicate slashes.
2755
10fc3eb9 27562008-11-14 Robert Millan <rmh@aybabtu.com>
2757
2758 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
2759 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
2760 don't want to mess with lower memory, because it is used in the Linux
2761 loader.
2762
2763 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 2764 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 2765 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
2766 is in our heap (probably as a result of it being corrupted during
2f2a3442 2767 decompression). Add #error instance with comment to explain why this
2768 loader isn't currently usable on PC/BIOS.
10fc3eb9 2769
e2e07847 27702008-11-14 Robert Millan <rmh@aybabtu.com>
2771
2772 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 2773 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 2774
fe8e8d69 27752008-11-12 Robert Millan <rmh@aybabtu.com>
2776
2777 Make loader/i386/linux.c buildable on i386-pc (although disabled).
2778
2779 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
2780 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
2781 from here ...
2782 * include/grub/i386/pc/memory.h: ... to here.
2783
976b07d0 27842008-11-12 Robert Millan <rmh@aybabtu.com>
2785
2786 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
2787 split).
2788
2789 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
2790 (grub_console_cur_color, grub_console_real_putchar)
2791 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2792 (grub_console_setcolorstate, grub_console_setcolor)
2793 (grub_console_getcolor): Move from here ...
2794 * include/grub/i386/vga_common.h: ... to here (new file).
2795
2796 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
2797 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
2798 `<grub/i386/io.h>'.
2799 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
2800 `<grub/i386/vga_common.h>'.
2801
76679cd3 28022008-11-12 Robert Millan <rmh@aybabtu.com>
2803
2804 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
2805 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
2806 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
2807 variables.
2808 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2809 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
2810
2811 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
2812 grub_console_init() with call to grub_vga_text_init().
2813 (grub_machine_fini): Replace call to
2814 grub_console_fini() with call to grub_vga_text_fini() and
2815 grub_at_keyboard_fini().
2816
2817 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
2818 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
2819 (grub_console_setcolorstate, grub_console_setcolor)
2820 (grub_console_getcolor): New function prototypes.
2821
2822 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
2823 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
2824 (grub_vga_text_setcursor): Static-ize.
2825 (grub_vga_text_term): New structure.
2826 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
2827
2828 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
2829 (grub_console_cur_color, grub_console_standard_color)
2830 (grub_console_normal_color, grub_console_highlight_color)
2831 (map_char, grub_console_putchar, grub_console_getcharwidth)
2832 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
2833 (grub_console_getcolor): Move from here ...
2834 * term/i386/vga_common.c: ... to here (same function names).
2835
95b841d3 28362008-11-12 Robert Millan <rmh@aybabtu.com>
2837
2838 Use newly-added Multiboot support in coreboot.
2839
2840 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
2841 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
2842
2843 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
2844 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
2845 (codestart): Store the MBI in `startup_multiboot_info' when we're
2846 being loaded using Multiboot.
2847
2848 * kern/i386/coreboot/init.c (grub_machine_init): Move
2849 grub_at_keyboard_init() call to beginning of function (useful for
2850 debugging). Call grub_machine_mmap_init() before attempting to use
2851 grub_machine_mmap_iterate().
2852 (grub_lower_mem, grub_upper_mem): Move from here ...
2853 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
2854 here (new file).
2855
2856 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
2857 function prototype.
2858
761ca975 28592008-11-12 Robert Millan <rmh@aybabtu.com>
2860
2861 Fix a regression introduced by the at_keyboard.mod split. Because
2862 some terminals are default on some platforms and non-default on
2863 others, the first terminal being registered determines which is
2864 going to be default.
2865
2866 * kern/term.c (grub_term_register_input): If this is the first
2867 terminal being registered, set it as the current one.
2868 (grub_term_register_output): Likewise.
2869
2870 * term/efi/console.c (grub_console_init): Do not call
2871 grub_term_set_current_output() or grub_term_set_current_input().
2872 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
2873 * term/i386/pc/console.c (grub_console_init): Likewise.
2874 (grub_console_fini): Do not call grub_term_set_current_input()
2875 (but leave grub_term_set_current_output() to restore text mode).
2876
6c529df7 28772008-11-10 Robert Millan <rmh@aybabtu.com>
2878
2879 * util/grub.d/00_header.in: Add backward compatibility check for
2880 versions of terminal.mod that don't understand `terminal_input' or
2881 `terminal_output'.
2882
132e4113 28832008-11-09 Robert Millan <rmh@aybabtu.com>
2884
2885 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
2886 `terminal_input' / `terminal_output', not `terminal'.
2887
ac293d50 28882008-11-08 Robert Millan <rmh@aybabtu.com>
2889
2890 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 2891 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 2892
0025933a 28932008-11-08 Robert Millan <rmh@aybabtu.com>
2894
2895 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 2896 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 2897 members. Update all users.
2898 * util/console.c (grub_ncurses_term): Split in ...
2899 (grub_ncurses_term_input): ... this, and ...
2900 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 2901 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 2902
37c86336 29032008-11-08 Robert Millan <rmh@aybabtu.com>
2904
2905 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
2906 (PKGDATA): Add $(pkgdata_SRCDIR).
2907 (pkglib_BUILDDIR): New variable.
2908 (pkgdata_SRCDIR): New variable.
2909 (build_env.mk): New target.
2910 (include_DATA): New variable.
2911 (install-local): Install $(include_DATA) files in $(includedir).
2912
b6c15a2d 29132008-11-07 Pavel Roskin <proski@gnu.org>
2914
d99d46f1 2915 * gendistlist.sh: Use C locale for sorting to ensure consistent
2916 output on all systems.
2917
b6c15a2d 2918 * util/grub.d/00_header.in: Remove incorrect space before
2919 "serial".
2920
c32ee8c9 29212008-11-07 Robert Millan <rmh@aybabtu.com>
2922
2923 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
2924 per specification.
2925 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
2926 * loader/multiboot_loader.c (find_multi_boot2_header): New function
2927 (based on find_multi_boot1_header).
2928 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
2929 using find_multi_boot2_header(), and abort if neither Multiboot or
2930 Multiboot headers were found.
2931
651c29b7 29322008-11-07 Robert Millan <rmh@aybabtu.com>
2933
2934 Modularize at_keyboard.mod:
2935
2936 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
2937 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
2938 (at_keyboard_mod_LDFLAGS): New variables.
2939
2940 Actual terminal split:
2941
2942 * include/grub/term.h (struct grub_term): Split in ...
2943 (struct grub_term_input): ... this, and ...
2944 (struct grub_term_output): ... this. Update all users.
2945 (grub_term_set_current): Split in ...
2946 (grub_term_set_current_input): ... this, and ...
2947 (grub_term_set_current_output): ... this.
2948 (grub_term_get_current): Split in ...
2949 (grub_term_get_current_input): ... this, and ...
2950 (grub_term_get_current_output): ... this.
2951 (grub_term_register): Split in ...
2952 (grub_term_register_input): ... this, and ...
2953 (grub_term_register_output): ... this.
2954 (grub_term_unregister): Split in ...
2955 (grub_term_unregister_input): ... this, and ...
2956 (grub_term_unregister_output): ... this.
2957 (grub_term_iterate): Split in ...
2958 (grub_term_iterate_input): ... this, and ...
2959 (grub_term_iterate_output): ... this.
2960
2961 * kern/term.c (grub_term_list): Split in ...
2962 (grub_term_list_input): ... this, and ...
2963 (grub_term_list_output): ... this. Update all users.
2964 (grub_cur_term): Split in ...
2965 (grub_cur_term_input): ... this, and ...
2966 (grub_cur_term_output): ... this. Update all users.
2967 (grub_term_set_current): Split in ...
2968 (grub_term_set_current_input): ... this, and ...
2969 (grub_term_set_current_output): ... this.
2970 (grub_term_get_current): Split in ...
2971 (grub_term_get_current_input): ... this, and ...
2972 (grub_term_get_current_output): ... this.
2973 (grub_term_register): Split in ...
2974 (grub_term_register_input): ... this, and ...
2975 (grub_term_register_output): ... this.
2976 (grub_term_unregister): Split in ...
2977 (grub_term_unregister_input): ... this, and ...
2978 (grub_term_unregister_output): ... this.
2979 (grub_term_iterate): Split in ...
2980 (grub_term_iterate_input): ... this, and ...
2981 (grub_term_iterate_output): ... this.
2982
2983 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
2984 a check for input and one for output (and only attempt to get keys
2985 from user when input works).
2986
2987 * util/grub-probe.c (grub_term_get_current): Split in ...
2988 (grub_term_get_current_input): ... this, and ...
2989 (grub_term_get_current_output): ... this.
2990 * util/grub-fstest.c: Likewise.
2991 * util/i386/pc/grub-setup.c: Likewise.
2992 * util/grub-editenv.c: Likewise.
2993
2994 Portability adjustments:
2995
2996 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
2997 `term/i386/pc/at_keyboard.c'.
2998 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
2999 grub_keyboard_controller_init() (now handled by terminal .init).
3000 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
3001 grub_at_keyboard_init().
3002 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
3003 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
3004 at_keyboard.mod via input terminal interface).
3005 * include/grub/i386/coreboot/console.h: Convert into a stub for
3006 `<grub/i386/pc/console.h>'.
3007
3008 Migrate full terminals to new API:
3009
3010 * term/efi/console.c (grub_console_term): Split into ...
3011 (grub_console_term_input): ... this, and ...
3012 (grub_console_term_output): ... this. Update all users.
3013 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
3014 (grub_ofconsole_init): Split into ...
3015 (grub_ofconsole_init_input): ... this, and ...
3016 (grub_ofconsole_init_output): ... this.
3017 (grub_ofconsole_term): Split into ...
3018 (grub_ofconsole_term_input): ... this, and ...
3019 (grub_ofconsole_term_output): ... this. Update all users.
3020 * term/i386/pc/serial.c (grub_serial_term): Split into ...
3021 (grub_serial_term_input): ... this, and ...
3022 (grub_serial_term_output): ... this. Update all users.
3023 * term/i386/pc/console.c (grub_console_term): Split into ...
3024 (grub_console_term_input): ... this, and ...
3025 (grub_console_term_output): ... this. Update all users.
3026 (grub_console_term_input): Only enable it on PC/BIOS platform.
3027 (grub_console_init): Remove grub_keyboard_controller_init() call.
3028
3029 Migrate input terminals to new API:
3030
3031 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
3032 `i386' and `i386/pc' to enable build on x86_64 (this driver is
3033 i386-specific anyway).
3034 (grub_console_checkkey): Rename to ...
3035 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
3036 users.
3037 (grub_keyboard_controller_orig): New variable.
3038 (grub_console_getkey): Rename to ...
3039 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
3040 users.
3041 (grub_keyboard_controller_init): Static-ize. Save original
3042 controller value so that it can be restored ...
3043 (grub_keyboard_controller_fini): ... here (new function).
3044 (grub_at_keyboard_term): New structure.
3045 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
3046 functions.
3047
3048 Migrate output terminals to new API:
3049
3050 * term/i386/pc/vga.c (grub_vga_term): Change type to
3051 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3052 members. Update all users.
3053 * term/gfxterm.c (grub_video_term): Change type to
3054 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
3055 members. Update all users.
3056 * include/grub/i386/pc/console.h (grub_console_checkkey)
3057 (grub_console_getkey): Do not export (no longer needed by gfxterm,
3058 etc).
3059
3060 Migrate `terminal' command and userland tools to new API:
3061
3062 * commands/terminal.c (grub_cmd_terminal): Split into ...
3063 (grub_cmd_terminal_input): ... this, and ...
3064 (grub_cmd_terminal_output): ... this.
3065 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
3066 `terminal_input' and `terminal_output'.
3067 * util/grub.d/00_header.in: Adjust `terminal' calls to new
3068 `terminal_input' / `terminal_output' API.
3069 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
3070 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
3071 provided ${GRUB_TERMINAL}, convert it).
3072
96e5d876 30732008-11-04 Robert Millan <rmh@aybabtu.com>
3074
3075 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
3076 for FreeBSD.
3077 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
3078
556f3775 30792008-11-03 Bean <bean123ch@gmail.com>
3080
3081 * kern/elf.c (grub_elf32_load): Revert to previous code.
3082 (grub_elf64_load): Likewise.
3083
3084 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
3085
926b9823 30862008-11-01 Robert Millan <rmh@aybabtu.com>
3087
3088 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
3089 (TARGET_CPPFLAGS): Likewise.
3090 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
3091
1432e958 30922008-11-01 Carles Pina i Estany <carles@pina.cat>
3093
3094 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
3095
dba3f844 30962008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 3097
3098 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
3099 addition of objects until the code is not going to be able to fail.
3100
dba3f844 31012008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 3102
3103 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
3104 (add a missing NULL check, and correct them by moving the pointer
3105 operations after the actual check).
3106
7ab28c21 31072008-10-29 Robert Millan <rmh@aybabtu.com>
3108
3109 * util/i386/pc/grub-install.in: Handle empty string as output from
3110 make_system_path_relative_to_its_root().
3111
1b7748eb 31122008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
3113
3114 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
3115 circular metadata worst case scenario. If the metadata is circular
3116 then copy the wrap in place.
3117 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
3118 project lib/format_text/layout.h
3119 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
3120
c9618ab2 31212008-10-03 Felix Zielcke <fzielcke@z-51.de>
3122
7a36edca 3123 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 3124
bf981c62 31252008-10-03 Felix Zielcke <fzielcke@z-51.de>
3126
3127 * util/update-grub_lib.in: Mention filename in warning message.
3128
6d994591 31292008-09-29 Felix Zielcke <fzielcke@z-51.de>
3130
3131 * NEWS: Update for rename of update-grub to grub-mkconfig.
3132
18ade780 31332008-09-29 Felix Zielcke <fzielcke@z-51.de>
3134
3135 * util/update-grub_lib.in: Copy to ...
3136 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 3137 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 3138 * util/update-grub.in: Rename to ...
3139 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
3140 option. Add `--output' option to allow users to specify the generated
3141 configuration file. Default to stdout.
3142 (update_grub_dir): Rename to ...
3143 (grub_mkconfig_dir): ... this.
3144 (grub_cfg): Default to an empty string.
3145 * conf/common.rmk (update-grub): Rename to ...
3146 (grub-mkconfig): ... this.
3147 (update-grub_lib): Copy to ...
3148 (grub-mkconfig_lib): ... this.
3149 (update-grub_SCRIPTS): Copy to ...
3150 (grub-mkconfig_SCRIPTS): ... this. Update all users.
3151 (update-grub_DATA): Rename to ...
3152 (grub-mkconfig_DATA): ... this.
3153
556ce6ac 31542008-09-28 Robert Millan <rmh@aybabtu.com>
3155
3156 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
3157 to `modified'. Add the real `created' field.
3158 (grub_iso9660_uuid): Use `modified' rather than `created' for
3159 constructing the UUID.
3160
31612008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 3162
3163 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
3164 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
3165
92274e85 31662008-09-28 Bean <bean123ch@gmail.com>
3167
3168 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
3169 Thanks to Christian Franke for finding this bug.
3170
add6f17a 31712008-09-25 Robert Millan <rmh@aybabtu.com>
3172
3173 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
3174 instances of grub_util_get_disk_name() (see previous commit).
3175
d2a367b8 31762008-09-25 Robert Millan <rmh@aybabtu.com>
3177
3178 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
3179 `util/i386/get_disk_name.c'.
3180 * conf/i386-efi.rmk: Likewise.
3181 * conf/x86_64-efi.rmk: Likewise.
3182 * conf/i386-coreboot.rmk: Likewise.
3183 * conf/i386-ieee1275.rmk: Likewise.
3184 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
3185 `util/ieee1275/get_disk_name.c'.
3186 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
3187 * util/ieee1275/get_disk_name.c: Remove file.
3188 * util/i386/get_disk_name.c: Remove file.
3189 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
3190 "hd%d" for device.map entries, rather than using
3191 grub_util_get_disk_name().
3192
81a06771 31932008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 3194
3195 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
3196 warning.
3197 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
3198
5a004279 31992008-09-24 Carles Pina i Estany <carles@pina.cat>
3200
3201 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
3202 Changed to 0x5100.
3203 (GRUB_TERM_PPAGE): Changed to 0x4900.
3204
397093d3 32052008-09-24 Robert Millan <rmh@aybabtu.com>
3206
3207 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
3208 macros (they were i386-pc specific).
3209 * include/grub/sparc64/ieee1275/console.h: Likewise.
3210 * include/grub/efi/console.h: Likewise.
3211
a91b6c7c 32122008-09-22 Bean <bean123ch@gmail.com>
3213
3214 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
3215 resident and in attribute list.
3216
3217 * include/grub/ntfs.h (BMP_LEN): Removed.
3218
c40fd116 32192008-09-22 Bean <bean123ch@gmail.com>
3220
81a06771 3221 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 3222 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
3223
3224 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
3225 error occurs, as grub_disk_open will call grub_disk_close, which will
3226 call p->close (scsi).
3227
81a06771 32282008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 3229
3230 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
3231 (AC_PREREQ): Bumped to 2.59.
3232 (AC_TRY_COMPILE): Replace obsolete macro with ...
3233 (AC_COMPILE_IFELSE): ... this.
3234 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
3235 (AC_LINK_IFELSE): ... this.
3236
5dc43410 32372008-09-21 Felix Zielcke <fzielcke@z-51.de>
3238
3239 * autogen.sh: Add a call to `gendistlist.sh'.
3240
9035dce4 32412008-09-19 Christian Franke <franke@computer.org>
3242
3243 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
3244 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
3245 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
3246 Export __enable_execute_stack() to modules.
3247 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
3248 New function.
3249
7fd75377 32502008-09-09 Felix Zielcke <fzielcke@z-51.de>
3251
040030b3 3252 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
3253 Sort the list.
3254
32552008-09-09 Felix Zielcke <fzielcke@z-51.de>
3256
3257 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 3258 #include <grub/util/hostdisk.h>.
3259
89d5ffcf 32602008-09-08 Robert Millan <rmh@aybabtu.com>
3261
3262 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
3263 segments when their filesz is zero (grub_file_read() interprets
81a06771 3264 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 3265 Use `lowest_segment' rather than 0 for calculating the current
3266 segment load address.
3267
40da438f 32682008-09-08 Robert Millan <rmh@aybabtu.com>
3269
3270 * util/hostdisk.c (open_device): Replace a grub_util_info() call
3271 with grub_dprintf("hostdisk", ...), as it was so verbose that it
3272 clobbered useful information.
3273
ddbf5556 32742008-09-08 Robert Millan <rmh@aybabtu.com>
3275
3276 * include/grub/util/biosdisk.h: Move to ...
3277 * include/grub/util/hostdisk.h: ... here. Update all users.
3278 * util/biosdisk.c: Move to ...
3279 * util/hostdisk.c: ... here. Update all users.
3280
783d0f48 32812008-09-07 Robert Millan <rmh@aybabtu.com>
3282
3283 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
3284 variables.
3285 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
3286 and length can be stored directly in the `mbi->mmap_addr' and
3287 `mbi->mmap_length' struct fields.
3288
548e2ea5 32892008-09-07 Robert Millan <rmh@aybabtu.com>
3290
3291 * conf/i386.rmk: New file. Provides declaration for building
3292 `cpuid.mod'.
3293 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
3294 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
3295 variables.
3296 Include `conf/i386.mk'.
3297 * conf/i386-efi.rmk: Likewise.
3298 * conf/x86_64-efi.rmk: Likewise.
3299 * conf/i386-coreboot.rmk: Likewise.
3300 * conf/i386-ieee1275.rmk: Likewise.
3301
0ea85a37 33022008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
3303
3304 Based on patch created by Colin D Bennett <colin@gibibit.com>.
3305 Adds optimization support for BGR based modes.
3306
3307 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
3308 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3309 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3310 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3311 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3312 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3313 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3314 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3315 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3316 (grub_video_i386_vbeblit_index_index): Likewise.
3317 (grub_video_i386_vbeblit_replace_directN): Added.
3318 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3319 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3320 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3321 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3322 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3323 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 3324 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 3325 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3326 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3327 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3328 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3329 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3330 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
3331
3332 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
3333 (grub_video_i386_vbefill_R8G8B8): Likewise.
3334 (grub_video_i386_vbefill_index): Likewise.
3335 (grub_video_i386_vbefill_direct32): Added.
3336 (grub_video_i386_vbefill_direct24): Likewise.
3337 (grub_video_i386_vbefill_direct16): Likewise.
3338 (grub_video_i386_vbefill_direct8): Likewise.
3339
81a06771 3340 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 3341 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
3342 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
3343 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
3344 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
3345 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 3346
0ea85a37 3347 * video/video.c (grub_video_get_blit_format): Updated to use new
3348 blit formats. Added handling for 16 bit color modes.
81a06771 3349
3350 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 3351 fillers.
3352 (common_blitter): Updated to use new blitters.
3353
3354 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
3355 Removed.
3356 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
3357 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
3358 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
3359 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
3360 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
3361 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
3362 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
3363 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
3364 (grub_video_i386_vbeblit_index_index): Likewise.
3365 (grub_video_i386_vbeblit_replace_directN): Added.
3366 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
3367 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
3368 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
3369 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
3370 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
3371 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
3372 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
3373 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
3374 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
3375 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
3376 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
3377 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
3378 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 3379
0ea85a37 3380 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
3381 (grub_video_i386_vbefill_R8G8B8): Likewise.
3382 (grub_video_i386_vbefill_index): Likewise.
3383 (grub_video_i386_vbefill_direct32): Added.
3384 (grub_video_i386_vbefill_direct24): Likewise.
3385 (grub_video_i386_vbefill_direct16): Likewise.
3386 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 3387
0ea85a37 3388 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
3389 types.
81a06771 3390
0ea85a37 3391 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
3392 types.
81a06771 3393
0ea85a37 3394 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
3395 blitter types.
81a06771 3396
0ea85a37 3397 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
3398 types.
3399
e8a83df6 34002008-09-06 Felix Zielcke <fzielcke@z-51.de>
3401
3402 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
3403 RAID level 1.
3404
6bcd8ee5 34052008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 3406
6bcd8ee5 3407 * fs/iso9660.c (grub_iso9660_date): New structure.
3408 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
3409 (grub_iso9660_uuid): New function.
c375ae58 3410
59261157 34112008-09-05 Bean <bean123ch@gmail.com>
3412
3413 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
3414
3415 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
3416 insensitive bit for names in Win32 and Win32 & DOS namespace.
3417
3418 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
3419
3420 * include/grub/types.h (LONG_MAX): Likewise.
3421
58b6645a 34222008-09-04 Felix Zielcke <fzielcke@z-51.de>
3423
4ee55921 3424 * util/getroot.c: Include <config.h>.
3425 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
3426 add support for /dev/md/N devices and handle LVM double dash escaping.
3427
34282008-09-04 Felix Zielcke <fzielcke@z-51.de>
3429
3430 * config.guess: Update to latest version from config git.
3431 * config.sub: Likewise.
58b6645a 3432
9124f65d 34332008-09-03 Robert Millan <rmh@aybabtu.com>
3434
3435 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
3436 `disk->total_sectors'.
3437
81a06771 34382008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 3439
3440 * include/grub/normal.h: Fixed incorrect comment for
3441 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
3442
81a06771 34432008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 3444
3445 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
3446 values with defines.
3447
3448 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
3449 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
3450 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
3451 (GRUB_VBE_MODEATTR_COLOR): Likewise.
3452 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
3453 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
3454 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
3455 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
3456 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
3457 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
3458 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
3459 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
3460 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
3461 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
3462 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
3463 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
3464 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
3465 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
3466 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
3467
93d5cbf8 34682008-08-31 Robert Millan <rmh@aybabtu.com>
3469
3470 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
3471 declaration.
3472 (grub_multiboot): Fix a few warnings.
3473
21751d50 34742008-08-31 Robert Millan <rmh@aybabtu.com>
3475
3476 * loader/i386/pc/multiboot.c: Update comment not to say that
3477 boot_device support is unimplemented.
3478
e27a75c5 34792008-08-31 Robert Millan <rmh@aybabtu.com>
3480
3481 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
3482 or memory map support are unimplemented.
3483
81a06771 34842008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 3485
3486 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
3487
81a06771 34882008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 3489
3490 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
3491 total video memory in 'vbeinfo' output; show color format details for
3492 each video mode.
3493
7c5d8d95 34942008-08-30 Pavel Roskin <proski@gnu.org>
3495
3496 * util/genmoddep.c: Remove for real this time.
3497 * DISTLIST: Remove util/genmoddep.c.
3498
4cebd25a 34992008-08-30 Robert Millan <rmh@aybabtu.com>
3500
3501 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
3502 as required by Multiboot spec (it was already 4-byte aligned, but
3503 only by chance).
3504
b497a269 35052008-08-29 Pavel Roskin <proski@gnu.org>
3506
e3925185 3507 * kern/powerpc/ieee1275/crt0.S: Rename to ...
3508 * kern/powerpc/ieee1275/startup.S: ... this.
3509 * conf/powerpc-ieee1275.rmk: Adjust for the above.
3510 * DISTLIST: Likewise.
3511
b497a269 3512 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
3513 grub/cpu/kernel.h. Add start label for consistency with other
3514 platforms. Add grub_prefix immediately after start. Add jump
3515 to the code after grub_prefix.
3516 * include/grub/powerpc/kernel.h: Provide valid values for
3517 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
3518
6e5a42fe 35192008-08-29 Bean <bean123ch@gmail.com>
3520
3521 * configure.ac: Change host_os to cygwin for mingw.
3522 (asprintf): New check for function.
3523
3524 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
3525 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
3526
3527 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 3528 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 3529 sync, sleep and grub_util_get_disk_size for mingw.
3530
3531 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
3532 to get size in mingw.
3533 (open_device): Use flag O_BINARY if it's defined.
3534 (find_root_device): Add dummy code for mingw.
3535
3536 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
3537 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
3538 (get_scsi_disk_name): Return 0 for mingw.
3539
3540 * util/hostfs.c: #include <grub/util/misc.h>.
3541 (grub_hostfs_open): Use "rb" flag to open file, use
3542 grub_util_get_disk_size to get disk size for mingw.
3543
3544 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
3545 (asprintf): New function if HAVE_ASPRINTF is not set.
3546 (sync): New function for mingw.
3547 (sleep): Likewise.
3548 (grub_util_get_disk_size): Likewise.
3549
ab3f2673 35502008-08-28 Pavel Roskin <proski@gnu.org>
3551
3552 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3553 kern/time.c.
3554
1c282483 35552008-08-28 Robert Millan <rmh@aybabtu.com>
3556
3557 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
3558
678e849c 35592008-08-28 Robert Millan <rmh@aybabtu.com>
3560
3561 Change find_grub_drive() syntax so it doesn't prevent it from
3562 detecting NULL names as errors.
3563
3564 * util/biosdisk.c (find_grub_drive): Move free slot search code
3565 from here ...
3566 (find_free_slot): ... to here.
3567 (read_device_map): Use find_free_slot() to search for free slots.
3568
965c75ca 35692008-08-27 Marco Gerards <marco@gnu.org>
3570
3571 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
3572 (scsi_mod_SOURCES): New variable.
3573 (scsi_mod_CFLAGS): Likewise
3574 (scsi_mod_LDFLAGS): Likewise.
3575
3576 * disk/scsi.c: New file.
3577
3578 * include/grub/scsi.h: Likewise.
3579
3580 * include/grub/scsicmd.h: Likewise.
3581
3582 * disk/ata.c: Include <grub/scsi.h>.
3583 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
3584 instead.
3585 (grub_ata_iterate): Skip ATAPI devices.
3586 (grub_ata_open): Only handle ATAPI devices.
3587 (struct grub_atapi_read): Removed.
3588 (grub_atapi_readsector): Likewise.
3589 (grub_ata_read): No longer handle ATAPI devices.
3590 (grub_ata_write): Likewise.
3591 (grub_atapi_iterate): New function.
3592 (grub_atapi_read): Likewise.
3593 (grub_atapi_write): Likewise.
3594 (grub_atapi_open): Likewise.
3595 (grub_atapi_close): Likewise.
3596 (grub_atapi_dev): New variable.
3597 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
3598 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
3599
3600 * include/grub/disk.h (enum grub_disk_dev_id): Add
3601 `GRUB_DISK_DEVICE_SCSI_ID'.
3602
c07ae501 36032008-08-26 Robert Millan <rmh@aybabtu.com>
3604
3605 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
3606 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
3607 descriptive.
3608
5ed20adc 36092008-08-23 Bean <bean123ch@gmail.com>
3610
3611 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
3612 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3613 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
3614 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
3615 dm_nv.mod.
3616 (raid5rec_mod_SOURCES): New macro.
3617 (raid5rec_mod_CFLAGS): Likewise.
3618 (raid5rec_mod_LDFLAGS): Likewise.
3619 (raid6rec_mod_SOURCES): Likewise.
3620 (raid6rec_mod_CFLAGS): Likewise.
3621 (raid6rec_mod_LDFLAGS): Likewise.
3622 (mdraid_mod_SOURCES): Likewise.
3623 (mdraid_mod_CFLAGS): Likewise.
3624 (mdraid_mod_LDFLAGS): Likewise.
3625 (dm_nv_mod_SOURCES): Likewise.
3626 (dm_nv_mod_CFLAGS): Likewise.
3627 (dm_nv_mod_LDFLAGS): Likewise.
3628
3629 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
3630 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
3631 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3632
3633 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
3634 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
3635
3636 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3637
3638 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3639
3640 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3641
3642 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3643
3644 * disk/raid5_recover.c: New file.
3645
3646 * disk/raid6_recover.c: Likewise.
3647
3648 * disk/mdraid_linux.c: Likewise.
3649
3650 * disk/dmraid_nvidia.c: Likewise.
3651
3652 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
3653 ULONG_MAX.
3654
3655 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
3656 calculate the size of raid device.
3657 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
3658 different layout of raid5.
3659 (grub_raid_scan_device): Remove code specific to mdraid.
3660 (grub_raid_list): New variable.
3661 (free_array): New function.
3662 (grub_raid_register): Likewise.
3663 (grub_raid_unregister): Likewise.
3664 (grub_raid_rescan): Likewise.
3665 (GRUB_MOD_INIT): Don't iterate device here.
3666 (GRUB_MOD_FINI): Use free_array to release resource.
3667
3668 * include/grub/raid.h: Remove macro and structure specific to mdraid.
3669 (grub_raid5_recover_func_t): New function variable type.
3670 (grub_raid6_recover_func_t): Likewise.
3671 (grub_raid5_recover_func): New variable.
3672 (grub_raid6_recover_func): Likewise.
3673 (grub_raid_register): New function.
3674 (grub_raid_unregister): Likewise.
3675 (grub_raid_rescan): Likewise.
3676 (grub_raid_block_xor): Likewise.
3677
3678 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
3679 (CMD_CRC): New macro.
3680 (part): Removed.
3681 (read_file): Handle device as well as file.
3682 (cmd_crc): New function.
3683 (fstest): Handle multiple disks.
3684 (options): Remove part, raw and long, add root and diskcount.
3685 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 3686 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 3687 add handling for the new options, support multiple disks.
3688
3689 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
3690
29c18915 36912008-08-23 Bean <bean123ch@gmail.com>
3692
3693 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
3694
3695 * genfslist.sh: Ignore kernel.mod.
3696
3697 * genpartmaplist.sh: Likewise.
3698
8415f261 36992008-08-23 Robert Millan <rmh@aybabtu.com>
3700
3701 * util/getroot.c (find_root_device): Skip anything that starts with
3702 a dot, not just directories. This avoids things like /dev/.tmp.md0.
3703
d5a7dc5b 37042008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 3705
d5a7dc5b 3706 * util/update-grub.in (GRUB_GFXMODE): Export variable.
3707 * util/grub.d/00_header.in: Allow the administrator to change default
3708 gfxmode via ${GRUB_GFXMODE}.
3709
380cfbb4 37102008-08-21 Felix Zielcke <fzielcke@z-51.de>
3711
3712 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
3713
c9baafe7 37142008-08-21 Robert Millan <rmh@aybabtu.com>
3715
3716 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
3717 loader.
3718 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
3719 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
3720
e290bef2 37212008-08-20 Carles Pina i Estany <carles@pina.cat>
3722
3723 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
3724 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
3725
f9dbfc96 37262008-08-19 Robert Millan <rmh@aybabtu.com>
3727
3728 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
3729 (struct grub_virtual_screen): Remove `cursor_color'.
3730 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
3731 initialization.
3732 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
3733
dd6bd6ab 37342008-08-18 Robert Millan <rmh@aybabtu.com>
3735
3736 Unify (identical) linux_normal.c files.
3737 * loader/i386/efi/linux_normal.c: Move from here ...
3738 * loader/linux_normal.c: ... to here. Update all users.
3739 * loader/i386/pc/linux_normal.c: Delete. Update all users.
3740 * loader/i386/ieee1275/linux_normal.c: Likewise.
3741
7f42f83e 37422008-08-18 Robert Millan <rmh@aybabtu.com>
3743
3744 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
3745 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
3746 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
3747 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
3748 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
3749 New macros.
3750 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
3751 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
3752 (GRUB_LINUX_CL_END_OFFSET): ... to here.
3753 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
3754 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
3755 (GRUB_EFI_CL_END_OFFSET): Rename to ...
3756 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
3757 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
3758 Initialize `params->video_cursor_x' and `params->video_cursor_y'
3759 portably using grub_getxy().
3760 Replace `-EFI' with `-bzImage' in boot message.
3761
38487ddb 37622008-08-17 Robert Millan <rmh@aybabtu.com>
3763
3764 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
3765
deceb3ec 37662008-08-17 Robert Millan <rmh@aybabtu.com>
3767
3768 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
3769
3770 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
3771 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
3772 (grub_machine_mmap_iterate): New function declaration.
3773 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
3774 structure.
3775 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
3776 macros.
3777
3778 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
3779 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
3780 Move e820 parsing from here ...
3781 * kern/i386/pc/mmap.c: New file.
3782 (grub_machine_mmap_iterate): ... to here.
3783
3784 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
3785 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
3786 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
3787 (grub_available_iterate): Redeclare to return `void', and redeclare
3788 its hook to use grub_uint64_t as addr and size parameters, and rename
3789 to ...
3790 (grub_machine_mmap_iterate): ... this. Update all users.
3791
3792 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
3793 to make it more readable. Rename to ...
3794 (grub_machine_mmap_iterate): ... this.
3795
3796 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
3797 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
3798 (grub_multiboot): Allocate an extra region after the payload, and fill
3799 it with a Multiboot memory map. Adjust a.out loader to calculate size
3800 with the extra space.
3801 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
3802 with the extra space.
3803
f8aa0f43 38042008-08-17 Carles Pina i Estany <carles@pina.cat>
3805
9807deb9 3806 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 3807
605f5bb6 38082008-08-17 Felix Zielcke <fzielcke@z-51.de>
3809
3810 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
3811 mdate-sh to the list `find' searches for.
3812 * DISTLIST: Regenerated.
3813
210db6c6 38142008-08-16 Felix Zielcke <fzielcke@z-51.de>
3815
3816 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
3817 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 3818 genmoddep.awk, gensymlist.sh.in.
3819 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 3820 * DISTLIST: Regenerated.
48cdbfd4 3821 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 3822
1082b929 38232008-08-16 Robert Millan <rmh@aybabtu.com>
3824
3825 * disk/raid.c (grub_raid_init): Handle/report errors set by
3826 grub_device_iterate().
3827 * disk/lvm.c (grub_lvm_init): Likewise.
3828
42ce5170 38292008-08-15 Bean <bean123ch@gmail.com>
3830
3831 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3832 and datehook.mod.
3833 (datetime_mod_SOURCES): New macro.
3834 (datetime_mod_CFLAGS): Likewise.
3835 (datetime_mod_LDFLAGS): Likewise.
3836 (date_mod_SOURCES): Likewise.
3837 (date_mod_CFLAGS): Likewise.
3838 (date_mod_LDFLAGS): Likewise.
3839 (datehook_mod_SOURCES): Likewise.
3840 (datehook_mod_CFLAGS): Likewise.
3841 (datehook_mod_LDFLAGS): Likewise.
3842
3843 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3844 and datehook.mod.
3845 (datetime_mod_SOURCES): New macro.
3846 (datetime_mod_CFLAGS): Likewise.
3847 (datetime_mod_LDFLAGS): Likewise.
3848 (date_mod_SOURCES): Likewise.
3849 (date_mod_CFLAGS): Likewise.
3850 (date_mod_LDFLAGS): Likewise.
3851 (datehook_mod_SOURCES): Likewise.
3852 (datehook_mod_CFLAGS): Likewise.
3853 (datehook_mod_LDFLAGS): Likewise.
3854
3855 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
3856 and datehook.mod.
3857 (datetime_mod_SOURCES): New macro.
3858 (datetime_mod_CFLAGS): Likewise.
3859 (datetime_mod_LDFLAGS): Likewise.
3860 (date_mod_SOURCES): Likewise.
3861 (date_mod_CFLAGS): Likewise.
3862 (date_mod_LDFLAGS): Likewise.
3863 (datehook_mod_SOURCES): Likewise.
3864 (datehook_mod_CFLAGS): Likewise.
3865 (datehook_mod_LDFLAGS): Likewise.
3866
3867 * conf/i386-efi.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/x86_64-efi.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 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
3892
3893 * commands/date.c: New file.
3894
3895 * hook/datehook.c: Likewise.
3896
3897 * include/grub/lib/datetime.h: Likewise.
3898
3899 * include/grub/i386/cmos.h: Likewise.
3900
3901 * lib/datetime.c: Likewise.
3902
3903 * lib/i386/datetime.c: Likewise.
3904
3905 * lib/efi/datetime.c: Likewise.
3906
0e9242da 39072008-08-14 Robert Millan <rmh@aybabtu.com>
3908
3909 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
3910 (grub_mkelfimage_SOURCES): New variable.
3911 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
3912
3913 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
3914 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
3915 * conf/powerpc-ieee1275.rmk: Likewise.
3916 * conf/i386-ieee1275.rmk: Likewise.
3917
3918 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
3919 * kern/i386/coreboot/init.c: Likewise.
3920
3921 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
3922 with `<grub/cpu/kernel.h>'.
3923 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
3924 to ...
3925 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
3926 * kern/i386/coreboot/startup.S: Likewise.
3927
3928 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
3929 (GRUB_MOD_GAP): Remove.
3930 * include/grub/powerpc/kernel.h: New file.
3931 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
3932 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3933 * include/grub/i386/kernel.h: New file.
3934 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
3935 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
3936 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
3937
3938 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
3939 `grub-mkelfimage'.
3940 Use --directory when invoking grub_mkimage.
3941
3942 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
3943 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
3944 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
3945 and GRUB_KERNEL_CPU_PREFIX.
3946
b86408f8 39472008-08-14 Felix Zielcke <fzielcke@z-51.de>
3948
d5e619ca 3949 * include/grub/err.h (grub_err_printf): New function prototype.
3950 * util/misc.c (grub_err_printf): New function.
3951 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
3952 grub_printf.
3953 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 3954
7161f0e0 39552008-08-13 Robert Millan <rmh@aybabtu.com>
3956
3957 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
3958
a1967522 39592008-08-13 Robert Millan <rmh@aybabtu.com>
3960
3961 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
3962 boot entry.
3963
371458b5 39642008-08-12 Robert Millan <rmh@aybabtu.com>
3965
3966 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
3967 of the relocation code from here ...
3968 (grub_multiboot): ... to here.
3969 (forward_relocator, backward_relocator): Move from here ...
3970 * kern/i386/loader.S (grub_multiboot_forward_relocator)
3971 (grub_multiboot_backward_relocator): ... to here.
3972 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
3973 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
3974 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
3975 (grub_multiboot_forward_relocator_end)
3976 (grub_multiboot_backward_relocator)
3977 (grub_multiboot_backward_relocator_end): New variables.
3978
05f9452b 39792008-08-12 Bean <bean123ch@gmail.com>
3980
3981 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
3982
20024ab0 39832008-08-11 Robert Millan <rmh@aybabtu.com>
3984
3985 * kern/i386/linuxbios/startup.S: Move from here ...
3986 * kern/i386/coreboot/startup.S: ... to here.
3987
3988 * kern/i386/linuxbios/init.c: Move from here ...
3989 * kern/i386/coreboot/init.c: ... to here.
3990
3991 * kern/i386/linuxbios/table.c: Move from here ...
3992 * kern/i386/coreboot/mmap.c: ... to here.
3993
3994 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
3995
e352e9cd 39962008-08-11 Robert Millan <rmh@aybabtu.com>
3997
3998 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
3999 errors. Leave it to the upper layer to handle them.
4000
2d05bc6a 40012008-08-09 Christian Franke <franke@computer.org>
4002
4003 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
4004 * conf/common.rmk: Install `grub-pe2elf' only if requested.
4005 Install `grub.d/10_windows' only on Cygwin.
4006 * configure.ac: Add subst of `target_os'.
4007 Check `target_os' also before setting TARGET_OBJ2ELF.
4008 Add `--enable-grub-pe2elf'.
4009
042bd419 40102008-08-08 Robert Millan <rmh@aybabtu.com>
4011
4012 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4013 (grub_last_time): Change type to grub_uint64_t.
4014 (grub_disk_open): Migrate code from to using grub_get_time_ms().
4015 (grub_disk_close): Likewise.
4016
4017 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
4018 (run_menu): Migrate code from to using grub_get_time_ms().
4019
4020 * util/misc.c (grub_get_time_ms): New function.
4021
7f280db5 40222008-08-08 Marco Gerards <marco@gnu.org>
4023
4024 * disk/ata.c (grub_ata_regget): Change return type to
4025 `grub_uint8_t'.
4026 (grub_ata_regget2): Likewise.
4027 (grub_ata_wait_status): New function.
4028 (grub_ata_wait_busy): Removed function, updated all users to use
4029 `grub_ata_wait_status'.
4030 (grub_ata_wait_drq): Likewise.
4031 (grub_ata_cmd): New function.
4032 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
4033 error handling.
4034 (grub_ata_pio_write): Add error handling.
4035 (grub_atapi_identify): Likewise.
4036 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
4037 handling.
4038 (grub_ata_identify): Use `grub_ata_cmd' and improve error
4039 handling. Actually use the detected registers. Reorder the
4040 detection logic such that it is easier to read.
4041 (grub_ata_pciinit): Do not assign the same ID to each controller.
4042 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
4043 handling.
4044 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
4045
4046 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
4047
1fbc5e66 40482008-08-08 Marco Gerards <marco@gnu.org>
4049
4050 * NEWS: Update.
4051
819ce6c0 40522008-08-07 Bean <bean123ch@gmail.com>
4053
4054 * include/grub/x86_64/pci.h: New file.
4055
5c41d44d 40562008-08-07 Christian Franke <franke@computer.org>
4057
4058 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
4059 (TIMER2_GATE): Likewise.
4060 (grub_pit_wait): Add enable/disable of the timer2 gate
4061 bit of port 0x61. This fixes a possible infinite loop.
4062
5ebc275d 40632008-08-07 Bean <bean123ch@gmail.com>
4064
4065 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
4066 kern/i386/tsc.c and kern/i386/pit.c.
4067
4068 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
4069 x86_64 platform.
4070
4071 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
4072 <grub/i386/tsc.h>.
4073
4074 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
4075
e383b3d0 40762008-08-07 Bean <bean123ch@gmail.com>
4077
4078 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
4079
4080 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
4081
4082 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
4083 multiple inclusion. Add #include <grub/types.h>.
4084
1cbb58ac 40852008-08-06 Christian Franke <franke@computer.org>
4086
4087 * conf/common.rmk: Build and install `10_windows'.
4088 * util/grub.d/10_windows.in: New script.
4089
337f5a1e 40902008-08-06 Pavel Roskin <proski@gnu.org>
4091
4092 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
4093
057bc4ac 40942008-08-06 Robert Millan <rmh@aybabtu.com>
4095
4096 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
4097 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
4098
2b99f123 40992008-08-06 Bean <bean123ch@gmail.com>
4100
4101 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
4102 (grub_pxefs_fs_int): Remove dummy definition.
4103 (grub_pxefs_open): Use data->block_size to store the current block
4104 size setting.
4105 (grub_pxefs_read): Use block size stored in data->block_size. As the
4106 value of grub_pxe_blksize can be changed after the file is opened.
4107
9f0234cb 41082008-08-06 Bean <bean123ch@gmail.com>
4109
4110 * fs/i386/pc/pxe.c (curr_file): new variable.
4111 (grub_pxefs_open): Simply the handling of pxe file system. Don't
4112 require the dummy internal file system anymore.
4113 (grub_pxefs_read): Removed.
4114 (grub_pxefs_close): Likewise.
4115 (grub_pxefs_fs_int): Likewise.
4116 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
4117 connection when we switch file.
4118 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
4119
a55d42e0 41202008-08-06 Robert Millan <rmh@aybabtu.com>
4121
4122 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
4123 `halt.mod'.
4124 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
4125 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
4126
4127 * kern/i386/halt.c: New file.
4128 * kern/i386/reboot.c: Likewise.
4129 * include/grub/i386/reboot.h: Likewise.
4130 * include/grub/i386/halt.h: Likewise.
4131
4132 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
4133 Include `<grub/cpu/halt.h>'.
4134 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
4135 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
4136
4137 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
4138 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
4139 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
4140 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
4141 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
4142 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
4143 from here ...
4144 * include/grub/i386/at_keyboard.h: ... to here.
4145
24371d26 41462008-08-05 Robert Millan <rmh@aybabtu.com>
4147
4148 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
4149 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
4150 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
4151 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4152 `kern/generic/millisleep.c'.
4153
4154 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
4155 instead of grub_get_rtc().
4156 (grub_tsc_init): Initialize `tsc_boot_time'.
4157
4158 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
4159 (grub_machine_init): Use grub_tsc_init() rather than
4160 installing an RTC-based handler via grub_install_get_time_ms().
4161
4162 * kern/i386/pit.c: New file.
4163 * include/grub/i386/pit.h: Likewise.
4164
9e7007b3 41652008-08-05 Bean <bean123ch@gmail.com>
4166
4167 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
4168
4169 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
4170 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
4171 (pxe_mod_SOURCES): New macro.
4172 (pxe_mod_CFLAGS): Likewise.
4173 (pxe_mod_LDFLAGS): Likewise.
4174 (pxecmd_mod_SOURCES): Likewise.
4175 (pxecmd_mod_CFLAGS): Likewise.
4176 (pxecmd_mod_LDFLAGS): Likewise.
4177
4178 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
4179 (grub_pxe_call): Likewise.
4180
4181 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
4182
4183 * commands/i386/pc/pxecmd.c: New file.
4184
9f0234cb 4185 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 4186
4187 * include/grub/i386/pc/pxe.h: Likewise.
4188
6977d49f 41892008-08-05 Bean <bean123ch@gmail.com>
4190
4191 * util/console.c (grub_console_cur_color): New variable.
4192 (grub_console_standard_color): Likewise.
4193 (grub_console_normal_color): Likewise.
4194 (grub_console_highlight_color): Likewise.
4195 (color_map): Likewise.
4196 (use_color): Likewise.
4197 (NUM_COLORS): New macro.
4198 (grub_ncurses_setcolorstate): Handle color properly.
4199 (grub_ncurses_setcolor): Don't change color here, just remember the
4200 settings, color will be set in grub_ncurses_setcolorstate.
4201 (grub_ncurses_getcolor): New function.
4202 (grub_ncurses_init): Initialize color pairs.
4203 (grub_ncurses_term): New member grub_ncurses_getcolor.
4204
9c2ff3ee 42052008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 4206
9c2ff3ee 4207 High resolution timer support. Implemented for x86 CPUs using TSC.
4208 Extracted generic grub_millisleep() so it's linked in only as needed.
4209 This requires a Pentium compatible CPU; if the RDTSC instruction is
4210 not supported, then it falls back on the generic grub_get_time_ms()
4211 implementation that uses the machine's RTC.
4212
4213 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
4214 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
4215 `kern/generic/millisleep.c'.
4216
4217 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
4218 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
4219
4220 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
4221 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
4222
4223 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4224
4225 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4226 `kern/generic/millisleep.c'.
4227
4228 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
4229
4230 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
4231
4232 * kern/generic/rtc_get_time_ms.c: New file.
4233
4234 * kern/generic/millisleep.c: New file.
337f5a1e 4235
9c2ff3ee 4236 * kern/misc.c: Don't include
4237 <kern/time.h> anymore.
4238 (grub_millisleep_generic): Removed.
4239
4240 * commands/sleep.c (grub_interruptible_millisleep): Uses
4241 grub_get_time_ms() instead of grub_get_rtc().
4242
4243 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
4244 function.
4245 (grub_cpu_is_cpuid_supported): New inline function.
4246 (grub_cpu_is_tsc_supported): New inline function.
4247 (grub_tsc_init): New function prototype.
4248 (grub_tsc_get_time_ms): New function prototype.
4249
4250 * kern/i386/tsc.c (grub_get_time_ms): New file.
4251
4252 * include/grub/time.h: Include <grub/types.h.
4253 (grub_millisleep_generic): Removed.
4254 (grub_get_time_ms): New prototype.
4255 (grub_install_get_time_ms): New prototype.
4256 (grub_rtc_get_time_ms): New prototype.
4257
4258 * kern/time.c (grub_get_time_ms): New function.
4259 (grub_install_get_time_ms): New function.
4260
4261 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
4262 <grub/time.h> anymore.
4263 (grub_millisleep): Removed.
4264 (grub_machine_init): Call grub_tsc_init.
4265
4266 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
4267 get_time_ms() implementation.
4268
4269 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
4270 (ieee1275_get_time_ms): New function.
4271 (grub_machine_init): Install get_time_ms() implementation.
4272
4273 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
4274 (grub_machine_init): Call grub_tsc_init().
4275 (grub_millisleep): Removed.
bf06a93f 4276
9c2ff3ee 4277 * kern/ieee1275/init.c (grub_millisleep): Removed.
4278 (grub_machine_init): Install ieee1275_get_time_ms()
4279 implementation.
4280 (ieee1275_get_time_ms): New function.
4281 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
4282 real work.
4283
9ec92aaf 42842008-08-05 Marco Gerards <marco@gnu.org>
4285
4286 * disk/ata.c: Include <grub/pci.h>.
4287 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
4288 (grub_ata_initialize): Rewritten.
4289 (grub_ata_device_initialize): New function.
4290
8d23f507 42912008-08-04 Pavel Roskin <proski@gnu.org>
4292
4293 * kern/main.c: Include grub/mm.h.
4294
5e15ee3d 42952008-08-04 Robert Millan <rmh@aybabtu.com>
4296
4297 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
4298 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
4299 corruption problem).
4300
a9053f8f 43012008-08-04 Robert Millan <rmh@aybabtu.com>
4302
4303 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
4304 warnings introduced in my last commit.
4305
dd19c7d7 43062008-08-03 Robert Millan <rmh@aybabtu.com>
4307
4308 Make PCI available on all i386 architectures.
4309
4310 * include/grub/i386/pc/pci.h: Move from here ...
4311 * include/grub/i386/pci.h: ... to here.
4312
4313 * include/grub/i386/pc/pci.h: Remove.
4314 * include/grub/i386/efi/pci.h: Remove.
4315 * include/grub/x86_64/efi/pci.h: Remove.
4316
4317 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
4318 `<grub/cpu/pci.h>'.
4319
4320 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
4321 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
4322 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
4323
4324 * conf/i386-ieee1275.rmk: Likewise.
4325
e14a6184 43262008-08-03 Robert Millan <rmh@aybabtu.com>
4327
4328 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
4329 (grub_console_setcursor): Make it possible to set cursor off.
4330
52768e37 43312008-08-03 Robert Millan <rmh@aybabtu.com>
4332
4333 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
4334 of modules instead of assuming which platform provides what.
4335 * util/update-grub.in: Likewise.
4336
2d52f57f 43372008-08-03 Robert Millan <rmh@aybabtu.com>
4338
4339 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
4340 instead of `grub_install_dos_part' to determine whether a drive needs
4341 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 4342 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 4343
2a5cd121 43442008-08-02 Robert Millan <rmh@aybabtu.com>
4345
4346 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
4347
93808428 43482008-08-02 Robert Millan <rmh@aybabtu.com>
4349
4350 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
4351 of informational grub_dprintf() calls.
4352
3bd0a12a 43532008-08-02 Robert Millan <rmh@aybabtu.com>
4354
4355 * disk/memdisk.c (memdisk_size): Don't initialize.
4356 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
4357
4358 * include/grub/i386/pc/kernel.h
4359 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
4360 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
4361 (grub_memdisk_image_size, grub_arch_memdisk_addr)
4362 (grub_arch_memdisk_size): Remove.
4363
4364 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
4365 field (was only used to transfer a constant). Add `type' field to
4366 support multiple module types.
4367 (grub_module_iterate): New function.
4368
4369 * kern/device.c (grub_device_open): Do not hide error messages
4370 when grub_disk_open() fails. Use grub_print_error() instead.
4371
4372 * kern/i386/pc/init.c (grub_arch_modules_addr)
4373 (grub_arch_memdisk_size): Remove functions.
4374 (grub_arch_modules_addr): Return the module address in high memory
4375 (now that it isn't copied anymore).
4376
4377 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
4378 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
4379 decompression routine (grub_total_module_size already includes that
4380 now). Don't copy modules back to low memory.
4381
4382 * kern/main.c: Include `<grub/mm.h>'.
4383 (grub_load_modules): Split out (and use) ...
4384 (grub_module_iterate): ... this function, which iterates through
4385 module objects and runs a hook.
4386 Comment out grub_mm_init_region() call, as it would cause non-ELF
4387 modules to be overwritten.
4388
4389 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
4390 the memdisk image in its own region, make it part of the module list.
4391 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
4392 (main): Parse --memdisk|-m option, and pass user-provided path as
4393 parameter to generate_image().
4394 (add_segments): Pass `memdisk_path' down to load_modules().
4395 (load_modules): Embed memdisk image in module section when requested.
4396 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
4397 `header.type' instead of `header.offset'.
4398
4399 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
4400 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
4401 (memdisk_mod_LDFLAGS): New variables.
4402 * conf/i386-coreboot.rmk: Likewise.
4403 * conf/i386-ieee1275.rmk: Likewise.
4404
a927cc73 44052008-08-02 Robert Millan <rmh@aybabtu.com>
4406
4407 * loader/i386/pc/multiboot.c (playground, forward_relocator)
4408 (backward_relocator): New variables. Used to allocate and relocate
4409 the payload, respectively.
4410 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 4411 address, install the appropriate relocator code in each bound of
a927cc73 4412 the payload, and set the entry point such that
4413 grub_multiboot_real_boot() will jump to one of them.
4414
4415 * kern/i386/loader.S (grub_multiboot_payload_size)
4416 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4417 (grub_multiboot_payload_entry_offset): New variables.
4418 (grub_multiboot_real_boot): Set cpu context to what the relocator
4419 expects, and jump to the relocator instead of the payload.
4420
4421 * include/grub/i386/loader.h (grub_multiboot_payload_size)
4422 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
4423 (grub_multiboot_payload_entry_offset): Export.
4424
b15d8a0c 44252008-08-01 Bean <bean123ch@gmail.com>
4426
4427 * normal/menu_entry.c (editor_getline): Don't return the original
4428 string as result, as it will be released by lexer once it has done
4429 using it.
4430
cdfb3d22 44312008-08-01 Robert Millan <rmh@aybabtu.com>
4432
4433 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
4434 within menuentries, not before them.
4435 util/grub.d/10_hurd.in: Likewise.
4436
9175e93d 44372008-08-01 Bean <bean123ch@gmail.com>
4438
4439 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
4440 (bufio_mod_SOURCES): New macro.
4441 (bufio_mod_CFLAGS): Likewise.
4442 (bufio_mod_LDFLAGS): Likewise.
4443
4444 * include/grub/bufio.h: New file.
4445
4446 * io/bufio.c: Likewise.
4447
4448 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
4449 (grub_video_reader_png): Use grub_buffile_open to open file.
4450
4451 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
4452 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
4453
4454 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
4455 (grub_video_reader_tga): Use grub_buffile_open to open file.
4456
4457 * font/manager.c: Include <grub/bufio.h>.
4458 (add_font): Use grub_buffile_open to open file.
4459
3d8383e7 44602008-07-31 Robert Millan <rmh@aybabtu.com>
4461
4462 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
4463 ELF segments, use a macro for arbitrarily accessing any of them instead
4464 of preparing a pointer that allows access to one at a time.
4465 (grub_multiboot_load_elf64): Likewise.
4466
16e641b6 44672008-07-31 Bean <bean123ch@gmail.com>
4468
4469 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
4470 GRUB_KERNEL_MACHINE_DATA_END.
4471
59198b72 44722008-07-30 Robert Millan <rmh@aybabtu.com>
4473
4474 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
4475 Increase from 0x50 to 0x60.
4476 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
4477 use UUIDs to identify the root drive for them. If that's not
4478 possible, abort.
4479 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
4480 check, for cross-disk installs.
4481
ae88bca3 44822008-07-30 Robert Millan <rmh@aybabtu.com>
4483
4484 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
4485 is non-empty, use it to set the `prefix' environment variable instead
4486 of the usual approach.
4487 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
4488 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
4489 environment variable instead of dummy make_install_device().
4490
4491 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
4492 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 4493 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 4494
4495 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
4496 New variable reference.
4497 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
4498 New macro. Defines offset of `grub_prefix' within startup.S (relative
4499 to `start').
4500 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
4501 section within startup.S (relative to `start').
4502 * include/grub/i386/coreboot/kernel.h: Likewise.
4503
4504 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
4505 Overwrite grub_prefix with its contents, at the beginning of the
4506 first segment.
4507 (main): Understand -p|--prefix.
4508
14f41dd1 45092008-07-30 Robert Millan <rmh@aybabtu.com>
4510
4511 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
4512
4ca049a3 45132008-07-30 Robert Millan <rmh@aybabtu.com>
4514
4515 * term/i386/pc/vga_text.c (grub_console_cls): Use
4516 grub_console_gotoxy() to go back to beginning of the screen.
4517 Found by Patrick Georgi <patrick.georgi@coresystems.de>
4518
2921d337 45192008-07-29 Christian Franke <franke@computer.org>
4520
4521 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4522 Add conversion of emulated mount points on Cygwin.
4523
b609876d 45242008-07-29 Christian Franke <franke@computer.org>
4525
4526 * util/update-grub.in: Add a check for admin
4527 group on Cygwin.
4528 Remove old `grub.cfg.new' before creation.
4529 Add `-f' to `mv' to handle the different filesystem
4530 semantics of Windows.
4531
e93e4679 45322008-07-29 Bean <bean123ch@gmail.com>
4533
4534 * normal/main.c (get_line): Fix buffer overflow bug.
4535
41694fd0 45362008-07-28 Robert Millan <rmh@aybabtu.com>
4537
4538 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
4539 (struct grub_apple_header): New struct. Describes the layout of
4540 the partmap header.
4541 (apple_partition_map_iterate): Check the header magic as well as the
4542 partition magic (which was already being checked).
4543
cfd0b4e6 45442008-07-28 Pavel Roskin <proski@gnu.org>
4545
4546 * genmk.rb: Add a warning to the beginning of the output that
4547 it's a generated file and should not be edited.
4548
93cce016 45492008-07-28 Robert Millan <rmh@aybabtu.com>
4550
4551 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
4552 with the same number are found, just use issue a warning with
4553 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 4554
cd1df915 45552008-07-27 Robert Millan <rmh@aybabtu.com>
4556
4557 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
4558 information.
4559
b70a8427 45602008-07-27 Bean <bean123ch@gmail.com>
4561
4562 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
4563 (grub_fat_find_dir): Ignore case when comparing filename.
4564
8f5e379f 45652008-07-27 Bean <bean123ch@gmail.com>
4566
4567 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
4568 smallino, as it's more descriptive, and i8count can be confused with
4569 the other field count.
4570 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
4571 inode type.
4572
a85cd5a0 45732008-07-27 Bean <bean123ch@gmail.com>
4574
4575 * commands/crc.c: New file.
4576
4577 * lib/crc.c: Likewise.
4578
4579 * include/grub/lib/crc.h: Likewise.
4580
4581 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
4582
4583 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
4584 (hexdump): Move this function to ...
4585
4586 * lib/hexdump.c: ... here.
4587
4588 * include/grub/hexdump.h: Renamed to ...
4589
4590 * include/grub/lib/hexdump.h: ... this.
4591
4592 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
4593
4594 * util/grub-editenv.c: Likewise.
4595
4596 * include/envblk.h: Renamed to ...
4597
4598 * include/lib/envblk.h: ... this.
4599
4600 * util/envblk.c: Renamed to ...
4601
4602 * lib/envblk.c: ... this.
4603
4604 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
4605 lib/hexdump.c.
4606 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
4607 (pkglib_MODULES): Add crc.mod.
4608 (hexdump_mod_SOURCES): Add lib/hexdump.c.
4609 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
4610 (crc_mod_SOURCES): New macro.
4611 (crc_mod_CFLAGS): Likewise.
4612 (crc_mod_LDFLAGS): Likewise.
4613
4614 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
4615
4616 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4617
4618 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4619
4620 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4621
4622 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4623
c298def0 46242008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 4625
4626 * commands/help.c: Include <grub/term.h>.
4627 (TERM_WIDTH): Removed. Updated all users.
4628
cc349fb3 46292008-07-27 Pavel Roskin <proski@gnu.org>
4630
4631 * util/getroot.c (find_root_device): Rephrase a comment to avoid
4632 spurious warnings about a comment within a comment.
4633
9051607e 46342008-07-25 Robert Millan <rmh@aybabtu.com>
4635
4636 * util/getroot.c (find_root_device): Skip devices that match
4637 /dev/dm-[0-9]. This lets the real device be found for any type of
4638 abstraction (LVM, EVMS, RAID..).
4639 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
4640 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
4641 device is found first, find_root_device() will now skip it.
4642
01453bfc 46432008-07-24 Pavel Roskin <proski@gnu.org>
4644
4645 * include/grub/types.h: Use __builtin_bswap32() and
4646 __builtin_bswap64() with gcc 4.3 and newer.
4647
6af9849f 46482008-07-24 Christian Franke <franke@computer.org>
4649
3a0fa256 4650 * util/i386/pc/grub-install.in: If `--debug' is specified,
4651 pass `--verbose' to grub-setup.
4652 Abort script if make_system_path_relative_to_its_root() fails.
4653
7810e747 46542008-07-24 Bean <bean123ch@gmail.com>
4655
4656 * configure.ac: Fixed a bug caused by the previous cygwin patch,
4657 variable `target_platform' should be `platform'.
4658
42290e17 46592008-07-24 Bean <bean123ch@gmail.com>
4660
51cc5193 4661 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 4662 (grub_png_init_fixed_block): New function.
4663 (grub_png_decode_image_data): Handle fixed huffman code compression.
4664
2a8a80e4 46652008-07-24 Bean <bean123ch@gmail.com>
4666
4667 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
4668 (grub_pe2elf_SOURCES): New macro.
4669 (CLEANFILES): Add grub-pe2elf.
4670
4671 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
4672 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
4673 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
4674 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
4675 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
4676 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
4677 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
4678 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
4679 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
4680 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
4681 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
4682 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
4683 (GRUB_PE32_DT_FUNCTION): Likewise.
4684 (GRUB_PE32_REL_I386_DIR32): Likewise.
4685 (GRUB_PE32_REL_I386_REL32): Likewise.
4686 (grub_pe32_symbol): New structure.
4687 (grub_pe32_reloc): Likewise.
4688
4689 * util/grub-pe2elf.c: New file.
4690
4691 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
4692 start symbol in non pc platform.
4693
4694 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
4695
4696 The following patches are from Christian Franke.
4697
4698 * include/grub/dl.h: Remove .previous, gas supports this only
4699 for ELF format.
4700
4701 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
4702 Remove .type, gas supports this only for ELF format.
4703
4704 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
4705 nullbytes in symbol table. This fixes an infinite loop if table is
4706 zero filled.
4707
4708 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
4709 TARGET_IMG_LDFLAGS and EXEEXT.
4710
4711 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
4712 TARGET_IMG_LDFLAGS_AC.
4713 (grub_CHECK_STACK_ARG_PROBE): New function.
4714
4715 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
4716
4717 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
4718
4719 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
4720 to set TARGET_IMG_LD* accordingly.
4721 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
4722 Add call to grub_CHECK_STACK_ARG_PROBE.
4723 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
4724
4725 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
4726
4727 * genmk.rb: Add EXEEXT to CLEANFILES.
4728
12ccdb75 47292008-07-23 Robert Millan <rmh@aybabtu.com>
4730
4731 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
4732 define the codes for arrows and lines used for the menu).
4733 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
4734 as well.
4735
4736 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
4737 fonts, because the latter are too slow.
4738
18eeaf04 47392008-07-21 Bean <bean123ch@gmail.com>
4740
4741 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
4742 a20. Run keyboard test last, as it will cause macbook to halt.
4743
b095e2ad 47442008-07-18 Pavel Roskin <proski@gnu.org>
4745
4746 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
4747 load foreign architecture modules correctly anyway. Keep
4748 support for loading host architecture modules, whether we
4749 compile them or not.
4750
737feb35 47512008-07-17 Pavel Roskin <proski@gnu.org>
4752
3f4ce737 4753 * configure.ac: Use -m32 or -m64 regardless of whether we had to
4754 change target_cpu. The compiler default can mismatch target_cpu
4755 in any case.
4756
4ad2d049 4757 * disk/efi/efidisk.c: Fix format warnings on x86_64.
4758 * kern/efi/efi.c: Likewise.
4759
f6130a12 4760 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
4761 target compiler is functional.
4762 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
4763 are set up.
4764
58393a2d 4765 * configure.ac: Default to efi platform for x86_64-apple. Allow
4766 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
4767 adjustments from the rest, only do them if target is not
4768 explicitly given. Merge other adjustments with the final sanity
4769 check. Remove an extraneous check for supported CPU. Be
4770 specific which CPU and which platform is not supported.
4771
737feb35 4772 * configure.ac: Default to pc platform for x86_64.
4773
546f966a 47742008-07-17 Robert Millan <rmh@aybabtu.com>
4775
4776 Partial LinuxBIOS -> Coreboot rename.
4777
4778 * conf/i386-linuxbios.rmk: Renamed to ...
4779 * conf/i386-coreboot.rmk: ... this.
4780 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
4781 * configure.ac: Accept "coreboot" as input platform (but maintain
4782 compatibility with "linuxbios").
4783 * include/grub/i386/linuxbios: Renamed to ...
4784 * include/grub/i386/coreboot: ... this.
4785
20011694 47862008-07-17 Bean <bean123ch@gmail.com>
4787
4788 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 4789 (appleldr_mod_SOURCE): New variable.
20011694 4790 (appleldr_mod_CFLAGS): Likewise.
4791 (appleldr_mod_LDFLAGS): Likewise.
4792 (pci_mod_SOURCES): Likewise.
4793 (pci_mod_CFLAGS): Likewise.
4794 (pci_mod_LDFLAGS): Likewise.
4795 (lspci_mod_SOURCES): Likewise.
4796 (lspci_mod_CFLAGS): Likewise.
4797 (lspci_mod_LDFLAGS): Likewise.
4798
4799 * conf/x86_64-efi.rmk: New file.
4800
4801 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
4802 macro.
4803 (grub_efidisk_write): Likewise.
4804
4805 * include/efi/api.h (efi_call_0): New macro.
4806 (efi_call_1): Likewise.
4807 (efi_call_2): Likewise.
4808 (efi_call_3): Likewise.
4809 (efi_call_4): Likewise.
4810 (efi_call_5): Likewise.
4811 (efi_call_6): Likewise.
4812
4813 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
4814 grub_rescue_cmd_chainloader.
4815
4816 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
4817 (grub_pe32_optional_header): Change some fields based on i386 or
4818 x86_64 platform.
4819 (GRUB_PE32_PE32_MAGIC): Likewise.
4820
4821 * include/grub/efi/uga_draw.h: New file.
4822
4823 * include/grub/elf.h (STN_ABS): New constant.
4824 (R_X86_64_NONE): Relocation constant for x86_64.
4825 (R_X86_64_64): Likewise.
4826 (R_X86_64_PC32): Likewise.
4827 (R_X86_64_GOT32): Likewise.
4828 (R_X86_64_PLT32): Likewise.
4829 (R_X86_64_COPY): Likewise.
4830 (R_X86_64_GLOB_DAT): Likewise.
4831 (R_X86_64_JUMP_SLOT): Likewise.
4832 (R_X86_64_RELATIVE): Likewise.
4833 (R_X86_64_GOTPCREL): Likewise.
4834 (R_X86_64_32): Likewise.
4835 (R_X86_64_32S): Likewise.
4836 (R_X86_64_16): Likewise.
4837 (R_X86_64_PC16): Likewise.
4838 (R_X86_64_8): Likewise.
4839 (R_X86_64_PC8): Likewise.
4840
4841 * include/grub/i386/efi/pci.h: New file.
4842
4843 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
4844 Change it value based on platform.
4845 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
4846 (GRUB_E820_RAM): Likewise.
4847 (GRUB_E820_RESERVED): Likewise.
4848 (GRUB_E820_ACPI): Likewise.
4849 (GRUB_E820_NVS): Likewise.
4850 (GRUB_E820_EXEC_CODE): Likewise.
4851 (GRUB_E820_MAX_ENTRY): Likewise.
4852 (grub_e820_mmap): New structure.
4853 (linux_kernel_header): Change the efi field according to different
4854 kernel version, also field from linux_kernel_header.
4855
4856 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
4857
4858 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
4859 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
4860 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
4861 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
4862 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
4863 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
4864 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
4865 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
4866 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
4867 (GRUB_PCI_ADDR_IO_MASK): Likewise.
4868
4869 * include/grub/x86_64/efi/kernel.h: New file.
4870
4871 * include/grub/x86_64/efi/loader.h: Likewise.
4872
4873 * include/grub/x86_64/efi/machine.h: Likewise.
4874
4875 * include/grub/x86_64/efi/pci.h: Likewise.
4876
4877 * include/grub/x86_64/efi/time.h: Likewise.
4878
4879 * include/grub/x86_64/linux.h: Likewise.
4880
4881 * include/grub/x86_64/setjmp.h: Likewise.
4882
4883 * include/grub/x86_64/time.h: Likewise.
4884
4885 * include/grub/x86_64/types.h: Likewise.
4886
4887 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
4888 GRUB_TARGET_SIZEOF_VOID_P.
4889
4890 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
4891 (grub_efi_locate_handle): Likewise.
4892 (grub_efi_open_protocol): Likewise.
4893 (grub_efi_set_text_mode): Likewise.
4894 (grub_efi_stall): Likewise.
4895 (grub_exit): Likewise.
4896 (grub_reboot): Likewise.
4897 (grub_halt): Likewise.
4898 (grub_efi_exit_boot_services): Likewise.
4899 (grub_get_rtc): Likewise.
4900
4901 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
4902 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
4903 (grub_efi_allocate_pages): Wrap efi calls.
4904 (grub_efi_free_pages): Wrap efi calls.
4905 (grub_efi_get_memory_map): Wrap efi calls.
4906
4907 * kern/x86_64/dl.c: New file.
4908
4909 * kern/x86_64/efi/callwrap.S: Likewise.
4910
4911 * kern/x86_64/efi/startup.S: Likewise.
4912
4913 * loader/efi/appleloader.c: Likewise.
4914
4915 * loader/efi/chainloader.c (cmdline): New variable.
4916 (grub_chainloader_unload): Wrap efi calls.
4917 (grub_chainloader_boot): Likewise.
4918 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
4919 command line.
4920
4921 * loader/efi/chainloader_normal.c (chainloader_command):
4922 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
4923 command line.
4924
4925 * loader/i386/efi/linux.c (allocate_pages): Change allocation
4926 method.
4927 (grub_e820_add_region): New function.
4928 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
4929 booting.
4930 (grub_find_video_card): New function.
4931 (grub_linux_setup_video): New function.
4932 (grub_rescue_cmd_linux): Probe for video information.
4933
4934 * normal/x86_64/setjmp.S: New file.
4935
4936 * term/efi/console.c (map_char): New function.
4937 (grub_console_putchar): Map unicode char.
4938 (grub_console_checkkey): Wrap efi calls.
4939 (grub_console_getkey): Likewise.
4940 (grub_console_getwh): Likewise.
4941 (grub_console_gotoxy): Likewise.
4942 (grub_console_cls): Likewise.
4943 (grub_console_setcolorstate): Likewise.
4944 (grub_console_setcursor): Likewise.
4945
4946 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
4947
59652a20 49482008-07-16 Pavel Roskin <proski@gnu.org>
4949
ef294055 4950 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
4951 format strings.
4952
59652a20 4953 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
4954 pointer, not an integer. This fixes a warning and prevents
4955 precision loss on 64-bit systems.
4956 (relocate_addresses): Remove unneeded cast.
4957
afc3b5d7 49582008-07-15 Pavel Roskin <proski@gnu.org>
4959
506b2b3e 4960 * kern/i386/ieee1275/init.c: Include grub/cache.h.
4961
62ead89c 4962 * term/ieee1275/ofconsole.c: Disable code unused on i386.
4963
c4cd51d7 4964 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
4965 Fix comparison between signed and unsigned.
4966
0d3d8f28 4967 * include/grub/i386/ieee1275/console.h: Declare
4968 grub_console_init() and grub_console_fini().
4969
8804b286 4970 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
4971 It's empty and unused.
4972
ee01cf35 4973 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
4974 beginning to avoid warnings with some compilers.
4975
afc3b5d7 4976 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
4977 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
4978
e4e8eaa5 49792008-07-14 Pavel Roskin <proski@gnu.org>
4980
407aceb4 4981 * kern/env.c (grub_register_variable_hook): Don't copy empty
4982 string, it leaks memory. Pass "" to grub_env_set(), it should
4983 handle constant strings.
4984
e4e8eaa5 4985 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
4986 * commands/cmp.c (grub_cmd_cmp): Likewise.
4987 * kern/dl.c (grub_dl_flush_cache): Likewise.
4988 (grub_dl_load_core): Likewise.
4989 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
4990 (grub_elf64_load_phdrs): Likewise.
4991
d4e2dad3 49922008-07-13 Pavel Roskin <proski@gnu.org>
4993
4994 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
4995 between signed and unsigned.
4996 (LzmaEnc_Finish): Fix warning about an unused parameter.
4997
aa24b516 49982008-07-13 Bean <bean123ch@gmail.com>
4999
5000 * Makefile.in (enable_lzo): New rule.
5001
5002 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
5003
5004 * configure.ac (ENABLE_LZO): New option --enable-lzo.
5005
5006 * boot/i386/pc/lnxboot.S: #include <config.h>.
5007
5008 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 5009 its value according to the compression algorithm used, lzo or lzma.
aa24b516 5010
5011 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
5012 compression algorithm according to configure macro.
5013
5014 * kern/i386/pc/startup.S (codestart): Likewise.
5015
5016 * kern/i386/pc/lzma_decode.S: New file.
5017
5018 * include/grub/lib/LzFind.h: Likewise.
5019
5020 * include/grub/lib/LzHash.h: Likewise.
5021
5022 * include/grub/lib/LzmaDec.h: Likewise.
5023
5024 * include/grub/lib/LzmaEnc.h: Likewise.
5025
5026 * include/grub/lib/LzmaTypes.h: Likewise.
5027
5028 * lib/LzFind.c: Likewise.
5029
5030 * lib/LzmaDec.c: Likewise.
5031
5032 * lib/LzmaEnc.c: Likewise.
5033
4ae821ac 50342008-07-13 Bean <bean123ch@gmail.com>
5035
5036 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
5037 (grub_ext4_extent_header): New structure.
5038 (grub_ext4_extent): Likewise.
5039 (grub_ext4_extent_idx): Likewise.
5040 (grub_ext4_find_leaf): New function.
5041 (grub_ext2_read_block): Handle extents.
5042
9a745147 50432008-07-12 Robert Millan <rmh@aybabtu.com>
5044
5045 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
5046
d49a4cf6 50472008-07-11 Robert Millan <rmh@aybabtu.com>
5048
5049 * util/grub.d/40_custom.in: New file. Example on how to add custom
5050 entries to /etc/grub.d.
5051 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
5052 40_custom (implicitly, by merging all the grub.d rules).
5053
947414b4 50542008-07-11 Pavel Roskin <proski@gnu.org>
5055
0059cf6f 5056 * commands/read.c (grub_getline): Fix invalid memory access.
5057 Don't add newline to the variable value.
5058
947414b4 5059 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
5060 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
5061 (serial_hw_get_port): Check validity of the port number.
5062 (grub_cmd_serial): Check return value of serial_hw_get_port().
5063
62a02d00 50642008-07-07 Pavel Roskin <proski@gnu.org>
5065
5066 * boot/i386/pc/diskboot.S (notification_string): Replace
5067 "Loading kernel" with just "loading". This is shorter, less
5068 confusing and saves a few bytes for possible future changes.
5069
3e5581b0 50702008-07-05 Pavel Roskin <proski@gnu.org>
5071
ea387a48 5072 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
5073 size for ATAPI devices, they are undefined. Output sector
5074 number in decimal form.
5075
3e5581b0 5076 * disk/ata.c: Use named constants for status bits.
5077
fdecb8fd 50782008-07-04 Pavel Roskin <proski@gnu.org>
5079
bcd35b90 5080 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
5081 grub_addr_t before casting it to the void pointer to fix a
5082 warning. Non-addressable regions are discarded earlier.
5083 (grub_arch_modules_addr): Cast _end to grub_addr_t.
5084 * kern/i386/linuxbios/table.c: Include grub/misc.h.
5085 (check_signature): Don't shadow table_header.
5086 (grub_linuxbios_table_iterate): Cast numeric constants to
5087 grub_linuxbios_table_header_t.
5088 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
5089 grub_stop().
5090
af58ab3d 5091 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
5092 prevent warnings.
5093
1759aa57 5094 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
5095 pointer, which can cause warnings. Support 64-bit addresses.
5096
fdecb8fd 5097 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
5098 of sizeof(long). This fixes PowerPC image generation on x86_64.
5099
8516d2a8 51002008-07-04 Robert Millan <rmh@aybabtu.com>
5101
5102 This fixes a performance issue when pc & gpt partmap iterators
5103 didn't abort iteration even after our hook found what it was
fe987087 5104 looking for (often causing expensive probes of non-existent drives).
8516d2a8 5105
5106 Some callers relied on previous buggy behaviour, since they would
34c44600 5107 raise an error when their own hooks caused early abortion of its
8516d2a8 5108 iteration.
5109
5110 * kern/device.c (grub_device_open): Improve error message.
5111 * disk/lvm.c (grub_lvm_open): Likewise.
5112 * disk/raid.c (grub_raid_open): Likewise.
5113
5114 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
5115 when hook requests it, independently of grub_errno.
5116 (pc_partition_map_probe): Do not fail when find_func() caused
5117 early abortion of pc_partition_map_iterate().
5118
5119 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
5120 when hook requests it, independently of grub_errno.
5121 (gpt_partition_map_probe): Do not fail when find_func() caused
5122 early abortion of gpt_partition_map_iterate().
5123
5124 * kern/partition.c (grub_partition_iterate): Abort parent iteration
5125 when hook requests it, independently of grub_errno. Do not fail when
5126 part_map_iterate_hook() caused early abortion of p->iterate().
5127
5128 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
5129 when grub_partition_iterate() returned with non-zero.
5130
277d0de9 51312008-07-03 Pavel Roskin <proski@gnu.org>
5132
5133 * disk/ata.c (grub_ata_pio_write): Check status before writing,
5134 like we do in grub_ata_pio_read().
5135 (grub_ata_readwrite): Always write individual sectors. Fix the
5136 sector count for the remainder.
5137 (grub_ata_write): Enable writing to ATA devices. Correctly
5138 report error for ATAPI devices.
5139
d4c9b428 51402008-07-02 Pavel Roskin <proski@gnu.org>
5141
e43fc690 5142 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
5143 warning.
5144
f707af42 5145 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
5146 for every read sector, we already increment it for the whole
5147 batch. This fixes reading more than 256 sectors at once.
5148
11e16b15 5149 * util/grub-editenv.c (cmd_info): Cast argument to long
5150 explicitly. ptrdiff_t reduces to int on i386.
5151
cbabfdd4 5152 * util/grub-editenv.c (main): Be specific which parameter is
5153 missing.
5154
b8fbce0a 5155 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
5156 (memdisk): Make memdisk_orig_addr a pointer.
5157
c9c8e606 5158 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
5159 for file offsets, use grub_off_t instead. Fix printf format
5160 warnings.
5161
ca62e598 5162 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
5163 there. Real unexpected warnings should not drown in the noise
5164 about known problems.
5165
ce8d1766 5166 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
5167 grub_disk_addr_t for memory addresses.
5168
00c7a56a 5169 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
5170 explicitly to fix a warning.
5171
08d3ef09 5172 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
5173
cb71ba20 5174 * Makefile.in (MODULE_LDFLAGS): New variable.
5175 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
5176 the linker accepts --build-id=none.
5177 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
5178 MODULE_LDFLAGS.
5179 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
5180
d4c9b428 5181 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
5182 those in Linux XFS code. Provide a way to access 64-bit parent
5183 inode.
5184 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
5185 the end of struct grub_xfs_dir_header.
5186
d4156eee 51872008-07-02 Bean <bean123ch@gmail.com>
5188
5189 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
5190 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5191 and GRUB_IEEE1275_FLAG_NO_ANSI.
5192
5193 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
5194 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
5195 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
5196
5197 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
5198 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
5199
5200 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
5201 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
5202
5203 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
5204 esc sequence on non ANSI terminal.
5205 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
5206
5207 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
5208 beginning of file.
5209
2270f77b 52102008-07-02 Bean <bean123ch@gmail.com>
5211
5212 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
5213 (grub_editenv_SOURCES): New variable.
5214 (pkglib_MODULES): Add loadenv.mod.
5215 (loadenv_mod_SOURCES): New variable.
5216 (loadenv_mod_CFLAGS): Likewise.
5217 (loadenv_mod_LDFLAGS): Likewise.
5218
5219 * include/grub/envblk.h: New file.
5220
5221 * util/envblk.c: New file.
5222
5223 * util/grub-editenv.c: New file.
5224
5225 * commands/loadenv.c: New file.
5226
0e9e51ec 52272008-07-01 Pavel Roskin <proski@gnu.org>
5228
d89b7634 5229 * include/multiboot2.h (struct multiboot_tag_module): Use char,
5230 not unsigned char. This fixes warnings and is consistent with
5231 other tags.
5232
bf1835b1 5233 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
5234
8222a04b 5235 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
5236
6a42d99d 5237 * term/tparm.c (analyze): Always set *popcount.
5238
10b159d1 5239 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
5240 cast to fix a warning.
5241
b8789f6c 5242 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
5243 cast to suppress a warning.
5244
29d7e38a 5245 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
5246 grub_fshelp_read_file() expects.
5247
f341f669 5248 * fs/fat.c: Fix UUID calculation on big-endian systems. We
5249 write uuid as a 32-bit value in CPU byte order, so declare and
5250 use it as such.
5251
0e9e51ec 5252 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
5253 long if the format specifier expects it.
5254 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
5255 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5256 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
5257 long to fix a warning.
5258 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
5259 grub_dprintf() arguments to fix warnings.
5260
3aefa857 52612008-06-30 Pavel Roskin <proski@gnu.org>
5262
56c7668b 5263 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
5264 install_bsd_part immediately before core.img is embedded or
5265 modified on disk. This fixes core.img verification if core.img
5266 cannot be embedded.
5267
3aefa857 5268 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
5269 core_path to calculate the blocklist.
5270 Patch from Javier Martín <lordhabbit@gmail.com>
5271
5444088d 52722008-06-29 Robert Millan <rmh@aybabtu.com>
5273
5274 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
5275 block to disk block.
5276 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
5277 Patch from Niels Böhm <bitbucket@arcor.de>
5278
674835c8 52792008-06-29 Robert Millan <rmh@aybabtu.com>
5280
5281 * util/update-grub_lib.in (font_path): Search for fonts in
5282 /boot/grub first, which is more likely to be readable (we aren't
5283 deciding where fonts live, just looking for them).
5284
f527dbc8 52852008-06-26 Pavel Roskin <proski@gnu.org>
5286
6c2d8df6 5287 * util/biosdisk.c (read_device_map): Don't leave dead map
5288 entries for devices failing stat() check.
5289
f527dbc8 5290 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
5291 core_path_dev for the core.img path on the target device.
5292
aebe3d13 52932008-06-26 Robert Millan <rmh@aybabtu.com>
5294
5295 * disk/fs_uuid.c: New file.
5296 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
5297 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
5298 (fs_uuid_mod_LDFLAGS): New variables.
5299 * include/grub/disk.h (grub_disk_dev_id): Add
5300 `GRUB_DISK_DEVICE_UUID_ID'.
5301 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
5302 implement iterate().
5303
37aaf354 53042008-06-26 Robert Millan <rmh@aybabtu.com>
5305
5306 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
5307 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
5308 Linux image includes no initrd.
5309
25ff262a 53102008-06-21 Javier Martín <lordhabbit@gmail.com>
5311
5312 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
5313 call to resolve the core image location that effectively appended the
5314 name twice.
5315
76a2bd44 53162008-06-21 Robert Millan <rmh@aybabtu.com>
5317
5318 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
5319 call from here ...
5320
5321 * util/grub.d/10_hurd.in: ... to here ...
5322 * util/grub.d/10_linux.in: ... and here.
5323
650e1c79 53242008-06-19 Robert Millan <rmh@aybabtu.com>
5325
fe987087 5326 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 5327 after it has been set by grub_machine_set_prefix().
5328
6ce63911 53292008-06-19 Robert Millan <rmh@aybabtu.com>
5330
5331 * commands/search.c (search_label, search_fs_uuid, search_file): Print
5332 search result when not saving to variable, not the other way around.
5333 When saving to variable, abort iteration as soon as a match is found.
5334
73940cec 53352008-06-19 Robert Millan <rmh@aybabtu.com>
5336
5337 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
5338 check for partition that provides /boot/grub. Its logic is flawed,
5339 as it prevents prepare_grub_to_access_device() from being called
5340 multiple times.
5341
3c62a39d 53422008-06-19 Robert Millan <rmh@aybabtu.com>
5343
5344 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
5345 "insmod" command directly when abstraction modules are needed,
fe987087 5346 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 5347 since it had already been processed).
5348
47395a42 53492008-06-19 Pavel Roskin <proski@gnu.org>
5350
5351 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
5352 changed. This is needed in case GRUB_LIBDIR changes.
5353 * conf/i386-ieee1275.rmk: Likewise.
5354 * conf/i386-linuxbios.rmk: Likewise.
5355 * conf/i386-pc.rmk: Likewise.
5356 * conf/powerpc-ieee1275.rmk: Likewise.
5357
a145ac2d 53582008-06-18 Pavel Roskin <proski@gnu.org>
5359
5360 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
5361 kernel_elf_symlist.c to symlist.c for consistency with other
5362 architectures. Update all users.
5363 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5364
7847c51e 53652008-06-18 Robert Millan <rmh@aybabtu.com>
5366
5367 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
5368 it in prefix.
5369
5370 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
5371 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
5372 a RAID device, run setup() for all members independently on whether
5373 LVM abstraction is being used.
5374 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
5375 If grub-mkimage has set `*install_dos_part == -2', don't override this
5376 value.
5377 Perform *install_dos_part adjustments independently on whether
5378 we're embedding or not.
5379 Clarify error message when image is too big for embedding.
5380 Remove duplicate *install_dos_part stanza.
5381
b23e5644 53822008-06-17 Robert Millan <rmh@aybabtu.com>
5383
5384 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
5385 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
5386 variables.
5387 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
5388 values in grub_ofconsole_normal_color and
5389 grub_ofconsole_highlight_color (they're not directly related to
5390 background and foreground).
5391 (grub_ofconsole_setcolorstate): Extract background and foreground
5392 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
5393
0aac2f79 53942008-06-17 Robert Millan <rmh@aybabtu.com>
5395
5396 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
5397 /boot/grub for the check in last commit, not /boot (they could be
5398 different partitions).
5399
3cca7ef3 54002008-06-16 Robert Millan <rmh@aybabtu.com>
5401
5402 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
5403 asked to setup access for the same partition that provides /boot,
5404 don't bother using UUIDs since our root already has the value we
5405 want.
5406
347396d8 54072008-06-16 Robert Millan <rmh@aybabtu.com>
5408
5409 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
5410 I2O devices.
5411 Patch from Sven Mueller <sven@debian.org>.
5412
991477f8 54132008-06-16 Robert Millan <rmh@aybabtu.com>
5414
5415 * util/update-grub.in: Check for $EUID instead of $UID.
5416 Reported by Vincent Zweije.
5417
d31a32a1 54182008-06-16 Bean <bean123ch@gmail.com>
5419
fe987087 5420 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 5421 (grub_ext2_read_block): Likewise.
5422 (grub_ext2_read_inode): Likewise.
5423 (grub_ext2_mount): Likewise.
5424 (grub_ext2_close): Likewise.
5425 (grub_ext3_get_journal): Removed.
5426
fe987087 5427 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 5428 (grub_reiserfs_read_symlink): Likewise.
5429 (grub_reiserfs_mount): Likewise.
5430 (grub_reiserfs_open): Likewise.
5431 (grub_reiserfs_read): Likewise.
5432 (grub_reiserfs_close): Likewise.
5433 (grub_reiserfs_get_journal): Removed.
5434
5435 * fs/fshelp.c (grub_fshelp_read): Removed.
5436 (grub_fshelp_map_block): Likewise.
5437
5438 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
5439 (grub_fshelp_journal): Likewise.
5440 (grub_fshelp_read): Likewise.
5441 (grub_fshelp_map_block): Likewise.
5442
3540a760 54432008-06-16 Pavel Roskin <proski@gnu.org>
5444
5445 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
5446 floating point anymore.
5447 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
5448
95614c84 54492008-06-15 Pavel Roskin <proski@gnu.org>
5450
5451 * commands/ls.c (grub_ls_list_files): Use integer calculations
5452 for human readable format, avoid floating point use.
5453 * kern/misc.c (grub_ftoa): Remove.
5454 (grub_vsprintf): Remove floating point support.
5455
50465dd6 54562008-06-15 Robert Millan <rmh@aybabtu.com>
5457
fe6b695a 5458 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 5459 devices.
5460 Reported by Max Vozeler.
5461
a9207284 54622008-06-15 Robert Millan <rmh@aybabtu.com>
5463
5464 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
5465 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
5466 skipped later.
5467 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
5468 the beginning of the prefix.
5469
5470 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
5471 It is assumed that if we have a memdisk, grub-mkimage has set
5472 grub_prefix to include the "(memdisk)" drive in it.
5473
a7cbd45a 54742008-06-15 Robert Millan <rmh@aybabtu.com>
5475
5476 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
5477 Initialize keyboard controller after registering the terminal, so that
5478 grub_printf() can be called from grub_keyboard_controller_init().
5479
21cf716a 54802008-06-15 Robert Millan <rmh@aybabtu.com>
5481
5482 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
5483 extent-btree which is written as big endian on disk.
5484 Reported by Alain Greppin <al@chilibi.org>.
5485
23a64d8e 54862008-06-14 Robert Millan <rmh@aybabtu.com>
5487
5488 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
5489 * util/i386/pc/grub-install.in (modules): Likewise.
5490
d687651c 54912008-06-13 Pavel Roskin <proski@gnu.org>
5492
5493 * commands/ls.c (grub_ls_list_files): Fix format warnings.
5494
dfe9ddd4 54952008-06-13 Bean <bean123ch@gmail.com>
5496
5497 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
5498
5499 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
5500
5501 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
5502 to indicate sparse block.
5503
16ae7781 55042008-06-12 Pavel Roskin <proski@gnu.org>
5505
e6d1a308 5506 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
5507 number, grub_fshelp_read() does it for us.
5508
16ae7781 5509 * fs/fshelp.c (grub_fshelp_read): New function. Implement
5510 linear disk read with journal translation.
5511 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
5512 * include/grub/fshelp.h: Declare grub_fshelp_read().
5513
40fd3a2b 55142008-06-09 Pavel Roskin <proski@gnu.org>
5515
5516 * fs/minix.c (grub_minix_mount): Handle error reading
5517 superblock.
5518
f5679726 55192008-06-08 Robert Millan <rmh@aybabtu.com>
5520
5521 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
5522 don't append the RAID prefix afterwards.
5523 Reported by Clint Adams.
5524
ce525529 55252008-06-08 Robert Millan <rmh@aybabtu.com>
5526
5527 Based on description from Pavel:
5528 * kern/disk.c (grub_disk_check_range): Rename to ...
5529 (grub_disk_adjust_range): ... this. Add a comment explaining the
5530 tasks performed by this function.
5531
ad4936a0 55322008-06-08 Robert Millan <rmh@aybabtu.com>
5533
5534 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
5535 `num_serial' (for consistency with other variables).
5536 (struct grub_ntfs_data): Add `uuid' member.
5537 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
5538 (grub_ntfs_uuid): New function.
5539 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
5540
dc20b0f9 55412008-06-07 Pavel Roskin <proski@gnu.org>
5542
5543 * util/biosdisk.c (open_device): Revert last change to the
5544 function, it broke installation. The sector needs to be
5545 different dependent on which device is opened.
5546
c5e3cfba 55472008-06-06 Robert Millan <rmh@aybabtu.com>
5548
5549 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
5550 rest of GRUB, and breakage doesn't happen if its value were modified.
5551
5552 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5553 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
5554 a constant (same value).
5555 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
5556 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
5557
26a1f8c4 55582008-06-06 Robert Millan <rmh@aybabtu.com>
5559
5560 * util/biosdisk.c (open_device): Do not modify sector offset when
5561 accessing a partition. kern/disk.c already handles this for us.
5562
25d6b327 55632008-06-06 Robert Millan <rmh@aybabtu.com>
5564
5565 * util/grub-emu.c (grub_machine_init): Move code in this function from
5566 here ...
5567 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
5568 segfault in case grub_printf() is called).
5569
5570 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
5571 grub_probe. Update all users not to explicitly add it again.
5572 (grub_device): New variable; contains corresponding device for grubdir.
5573 (fs_module, partmap_module, devabstraction_module): Pass
5574 `--device ${grub_device}' to grub_probe to avoid traversing /dev
5575 every time.
5576
9ece62fb 55772008-06-05 Robert Millan <rmh@aybabtu.com>
5578
5579 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
5580 is found, print it (same layout as with labels).
5581
1ad36d37 55822008-06-04 Robert Millan <rmh@aybabtu.com>
5583
5584 * util/biosdisk.c (get_drive): Rename to ...
5585 (find_grub_drive): ... this. Update all users.
5586
5587 (get_os_disk): Rename to ...
5588 (convert_system_partition_to_system_disk): ... this. Update all users.
5589
5590 (find_drive): Rename to ...
5591 (find_system_device): ... this. Update all users.
5592
e6a30859 55932008-06-04 Robert Millan <rmh@aybabtu.com>
5594
5595 * util/biosdisk.c (get_os_disk): Handle IDA devices.
5596 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5597 (make_device_map): Likewise.
5598
00c108a4 55992008-06-01 Robert Millan <rmh@aybabtu.com>
5600
5601 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
5602 before dereferencing it.
5603
5604 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
5605 union with fat12/fat16-specific ones. Add some new fields, including
5606 `num_serial' for both versions.
5607 (struct grub_fat_data): Add `uuid' member.
5608 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
5609 names. Initialize `data->uuid' using `num_serial'.
5610 (grub_fat_uuid): New function.
5611 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
5612
5613 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
5614 (grub_reiserfs_uuid): New function.
5615 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
5616 member.
5617
5618 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
5619 (grub_xfs_uuid): New function.
5620 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
5621
1385c5bb 56222008-06-01 Robert Millan <rmh@aybabtu.com>
5623
5624 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
5625 code that is backward compatible with pre-uuid search command.
5626
c682dfd7 56272008-05-31 Robert Millan <rmh@aybabtu.com>
5628
5629 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
5630 floppies after everything else, to ensure floppy drive isn't accessed
5631 unnecessarily (patch from Bean).
5632
b7db5d47 56332008-05-31 Robert Millan <rmh@aybabtu.com>
5634
5635 * commands/search.c (search_label, search_fs_uuid, search_file): Do
5636 not print device names when we were asked to set a variable.
5637
6e037aa9 56382008-05-31 Robert Millan <rmh@aybabtu.com>
5639
5640 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
5641 using "cursor-on" and "cursor-off" commands (understood at least by
5642 the Open Firmware flavour on OLPC).
5643
41305bc8 56442008-05-31 Michael Gorven <michael@gorven.za.net>
5645
5646 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
5647 on and off sequences.
5648
69ba137e 56492008-05-31 Robert Millan <rmh@aybabtu.com>
5650
5651 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
5652 * util/update-grub.in: Likewise.
5653
520ae21b 56542008-05-30 Pavel Roskin <proski@gnu.org>
5655
5656 * util/biosdisk.c (linux_find_partition): Simplify logic and
5657 make the code more universal. Keep special processing for
5658 devfs, but use a simple rule for all other devices. If the
5659 device ends with a number, append 'p' and the partition number.
5660 Otherwise, append only the partition number.
5661
5786569b 56622008-05-30 Robert Millan <rmh@aybabtu.com>
5663
5664 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
5665 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
5666 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
5667 the `root' parameter to Linux.
5668
51500452 56692008-05-30 Robert Millan <rmh@aybabtu.com>
5670
5671 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
5672 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
5673 --fs_uuid with --fs-uuid.
5674 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
5675 all filesystems support them).
5676
811d3878 56772008-05-30 Robert Millan <rmh@aybabtu.com>
5678
5679 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 5680 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 5681
cab63c95 56822008-05-30 Robert Millan <rmh@aybabtu.com>
5683
5684 * util/grub.d/00_header.in: Remove obsolete comment referencing
5685 convert_system_path_to_grub_path().
5686 * util/update-grub.in: Likewise.
5687 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
5688 (convert_system_path_to_grub_path): Add a warning message explaining
5689 that this function is deprecated. Rely on is_path_readable_by_grub()
5690 for the readability checks.
5691 (font_path): Use is_path_readable_by_grub() for the readability
5692 check rather than convert_system_path_to_grub_path().
5693
972e2f7a 56942008-05-30 Robert Millan <rmh@aybabtu.com>
5695
5696 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
5697 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
5698 converting it first.
5699 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
5700 grub.cfg for access to font file, and afterwards call it again to set
5701 the root device.
5702
62191274 57032008-05-30 Robert Millan <rmh@aybabtu.com>
5704
5705 * commands/search.c (options): Add --fs_uuid option.
5706 (search_fs_uuid): New function.
5707 (grub_cmd_search): Fix --set argument passing.
5708 Use search_fs_uuid() when requested via --fs_uuid.
5709 (grub_search_init): Update help message.
5710 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
5711 and redeclare it as an array of 16-bit words.
5712 (grub_ext2_uuid): New function.
5713 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
5714 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
5715 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
5716 (GRUB_DEVICE_BOOT_UUID): New variables.
5717 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
5718 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
5719 whenever possible.
5720 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
5721 just assume `root' variable has the right value.
5722 * util/grub.d/10_linux.in: Likewise.
5723 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
5724 via PRINT_FS_UUID.
5725 (main): Recognise `-t fs_uuid' argument.
5726
01b73ec8 57272008-05-30 Robert Millan <rmh@aybabtu.com>
5728
5729 * util/biosdisk.c (map): Redefine structure to hold information
5730 about GRUB drive name.
fe6b695a 5731 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 5732 drive names.
5733 (call_hook): Remove.
5734 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
5735 member. Assume drive has partitions.
5736 (grub_util_biosdisk_open): Access device names via `.device' struct
5737 member.
5738 (open_device): Likewise.
5739 (find_drive): Likewise.
5740 (read_device_map): Adjust map[] usage to match the new struct
5741 definition. Don't check for duplicates (still possible, but not cheap
5742 anymore).
5743 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
5744 (make_device_name): Remove assumption of BIOS-like drive names.
5745
22f16596 57462008-05-30 Pavel Roskin <proski@gnu.org>
5747
5748 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
5749 compiling execute.c doesn't need grub_script.tab.h anymore.
5750 (normal/command.c_DEPENDENCIES): Likewise.
5751 (normal/function.c_DEPENDENCIES): Likewise.
5752 * conf/i386-ieee1275.rmk: Likewise.
5753 * conf/i386-linuxbios.rmk: Likewise.
5754 * conf/i386-pc.rmk: Likewise.
5755 * conf/powerpc-ieee1275.rmk: Likewise.
5756 * conf/sparc64-ieee1275.rmk: Likewise.
5757
528ad8f2 57582008-05-29 Pavel Roskin <proski@gnu.org>
5759
d1dff95d 5760 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
5761 when scanning metadata for volume group name.
5762
528ad8f2 5763 * include/grub/script.h: Don't include grub_script.tab.h. It's
5764 a generated file, which may only be included from the files with
5765 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
5766 use union YYSTYPE, as the later allows forward declaration.
5767 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
5768
47248e08 57692008-05-29 Robert Millan <rmh@aybabtu.com>
5770
5771 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
5772 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
5773 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
5774 (grub_console_checkkey): Add grub_dprintf() call to report unknown
5775 scan codes.
5776
ee632529 57772008-05-29 Robert Millan <rmh@aybabtu.com>
5778
5779 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
5780 control key combinations.
5781
eee96e08 57822008-05-29 Robert Millan <rmh@aybabtu.com>
5783
5784 * util/powerpc/ieee1275/grub-install.in: Move from here ...
5785 * util/ieee1275/grub-install.in: ... to here.
5786 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
5787 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
5788 (grub_install_SOURCES): Likewise.
5789
da9a6a94 57902008-05-29 Robert Millan <rmh@aybabtu.com>
5791
5792 * fs/affs.c: Update copyright year.
5793 * fs/ext2.c: Likewise.
5794 * fs/fshelp.c: Likewise.
5795 * fs/hfsplus.c: Likewise.
5796 * fs/ntfs.c: Likewise.
5797 * fs/xfs.c: Likewise.
5798 * include/grub/fshelp.h: Likewise.
5799 * util/grub-mkdevicemap.c: Likewise.
5800
12e65f3a 58012008-05-28 Robert Millan <rmh@aybabtu.com>
5802
5803 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
5804 might need to be fatfs to support some firmware implementations
5805 (e.g. OFW or EFI).
5806
23023641 58072008-05-28 Robert Millan <rmh@aybabtu.com>
5808
5809 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
5810 devices.
5811 * util/grub-mkdevicemap.c (get_mmc_disk_name)
5812 (make_device_map): Likewise.
5813
887d2619 58142008-05-20 Bean <bean123ch@gmail.com>
5815
5816 * fs/fshelp.c (grub_fshelp_map_block): New function.
5817 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
5818 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
5819
5820 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
5821 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
5822 (grub_fshelp_journal): New structure.
5823 (grub_fshelp_map_block): New function prototype.
5824 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
5825 (grub_fshelp_map_block): Likewise.
5826
5827 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
5828 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
5829 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
5830 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
5831 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
5832 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
5833 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
5834 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
5835 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
5836 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
5837 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
5838 (grub_ext2_sblock): New members for journal support.
5839 (grub_ext3_journal_header): New structure.
5840 (grub_ext3_journal_revoke_header): Likewise.
5841 (grub_ext3_journal_block_tag): Likewise.
5842 (grub_ext3_journal_sblock): Likewise.
5843 (grub_fshelp_node): New members logfile and journal.
5844 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
5845 grub_fshelp_map_block to get real block number.
5846 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
5847 number.
5848 (grub_ext2_read_inode): Likewise.
5849 (grub_ext3_get_journal): New function.
5850 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
5851 (grub_ext2_close): Release memory used by journal.
5852
5853 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
5854 (REISERFS_MAGIC_DESC_BLOCK): New macro.
5855 (grub_reiserfs_transaction_header): Renamed to
5856 grub_reiserfs_description_block, replace field data with real_blocks.
5857 (grub_reiserfs_commit_block): New structure.
5858 (grub_reiserfs_data): New member journal.
5859 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
5860 number.
5861 (grub_reiserfs_read_symlink): Likewise.
5862 (grub_reiserfs_iterate_dir): Likewise.
5863 (grub_reiserfs_open): Likewise.
5864 (grub_reiserfs_read): Likewise.
5865 (grub_reiserfs_get_journal): New function.
5866 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
5867 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
5868 using grub_reiserfs_get_journal.
5869 (grub_reiserfs_close): Release memory used by journal.
5870
5871 * fs/affs.c (grub_affs_read_block): Change block type to
5872 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
5873
5874 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
5875
5876 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
5877
5878 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
5879
5880 * fs/udf.c (grub_udf_read_block): Change block type to
5881 grub_disk_addr_t. Use type cast to avoid warning.
5882
5883 * fs/xfs.c (grub_xfs_read_block): Likewise.
5884
b7c6bed5 58852008-05-16 Christian Franke <franke@computer.org>
5886
5887 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
5888 to ensure that break with ESC will always work.
5889 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
5890 Remove ESC from keyboard queue.
5891
eedf167f 58922008-05-16 Christian Franke <franke@computer.org>
5893
5894 * util/biosdisk.c: [__CYGWIN__] Add includes.
5895 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
5896 (get_os_disk): Move variable declarations to OS specific
5897 parts to avoid warning.
5898 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
5899 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
5900 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
5901 Cygwin.
5902 * util/getroot.c: [__CYGWIN__] Add includes.
5903 (strip_extra_slashes): Fix "/" case.
5904 [__CYGWIN__] (get_win32_path): New function.
5905 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
5906 [__CYGWIN__] (find_root_device): Disable.
5907 [__CYGWIN__] (get_bootsec_serial): New function.
5908 [__CYGWIN__] (find_cygwin_root_device): Likewise.
5909 [__linux__] (grub_guess_root_device): Add early returns to simplify
5910 structure.
5911 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
5912 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
5913 check for Linux only.
5914
a079699e 59152008-05-15 Bean <bean123ch@gmail.com>
5916
5917 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
5918 keyboard hang problem in apple's intel mac.
5919
1cf4059a 59202008-05-09 Robert Millan <rmh@aybabtu.com>
5921
5922 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
5923 devices.
5924 * util/grub-mkdevicemap.c (get_virtio_disk_name)
5925 (make_device_map): Likewise.
5926 Reported by Aurelien Jarno <aurel32@debian.org>
5927
ed759390 59282008-05-07 Ian Campbell <ijc@hellion.org.uk>
5929
5930 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
5931 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
5932 (make_device_map): Output entries for xvd type disks.
5933
b56c4eaa 59342008-05-07 Robert Millan <rmh@aybabtu.com>
5935
5936 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
5937 devices.
5938 * util/grub-mkdevicemap.c (get_cciss_disk_name)
5939 (make_device_map): Likewise.
5940 Reported by Roland Dreier <rdreier@cisco.com>
5941
7f8866ed 59422008-05-07 Robert Millan <rmh@aybabtu.com>
5943
5944 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
5945 grub_strstr() call. Correct a few mistakes in failure path handling.
5946
b0346e0f 59472008-05-06 Robert Millan <rmh@aybabtu.com>
5948
5949 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5950 Do not print a trailing slash (therefore, the root directory is an
5951 empty string).
5952 (convert_system_path_to_grub_path): Do not remove trailing slash
5953 from make_system_path_relative_to_its_root() output.
5954
5955 * util/i386/pc/grub-install.in: Add trailing slash to output from
5956 make_system_path_relative_to_its_root().
5957
6cf12cbd 59582008-05-06 Robert Millan <rmh@aybabtu.com>
5959
5960 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
5961 ensures that output lines aren't intermangled with those sent to
5962 stderr (via grub_util_info()).
5963 * util/grub-probe.c (grub_refresh): Likewise.
5964 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
5965
0fbb3117 59662008-05-05 Christian Franke <franke@computer.org>
5967
5968 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
5969 Add Cygwin device names.
5970 (get_ide_disk_name) [__CYGWIN__]: Likewise.
5971 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
5972 (check_device): Return error instead of success on empty name.
5973 (make_device_map): Move label inside linux specific code to
5974 prevent compiler warning.
5975
8124cdb7 59762008-04-30 Robert Millan <rmh@aybabtu.com>
5977
5978 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
5979 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
5980 first boot option.
5981 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
5982
094c01d0 59832008-04-29 Robert Millan <rmh@aybabtu.com>
5984
5985 * docs/grub.cfg: New file (example GRUB configuration).
5986
f4b1fc02 59872008-04-26 Robert Millan <rmh@aybabtu.com>
5988
329ce2a5 5989 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
5990 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
5991 and `disk/ieee1275/nand.c'.
f4b1fc02 5992
25f16ec1 59932008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 5994
25f16ec1 5995 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
5996 i386-linuxbios.
5997
5998 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
5999 change the buffer size to 4096 for cdrom device.
6000
6001 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
6002 and nand.mod.
6003 (_linux_mod_SOURCES): New variable.
6004 (_linux_mod_CFLAGS): Likewise.
6005 (_linux_mod_LDFLAGS): Likewise.
6006 (linux_mod_SOURCES): Likewise.
6007 (linux_mod_CFLAGS): Likewise.
6008 (linux_mod_LDFLAGS): Likewise.
6009 (nand_mod_SOURCES): Likewise.
6010 (nand_mod_CFLAGS): Likewise.
6011 (nand_mod_LDFLAGS): Likewise.
6012
6013 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
6014 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
6015 type property. (nand device in olpc don't have this property)
6016
6017 * include/grub/disk.h (grub_disk_dev_id): New macro
6018 GRUB_DISK_DEVICE_NAND_ID.
6019
6020 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
6021 function prototype.
6022 (grub_rescue_cmd_initrd): Likewise.
6023
6024 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
6025 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
6026 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 6027
25f16ec1 6028 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
6029 GRUB_MACHINE_IEEE1275 is defined.
6030
6031 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
6032 Use NESTED_FUNC_ATTR attribute on the hook parameter.
6033
6034 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
6035 on nested function heap_init.
6036 (grub_upper_mem): New variable for i386-ieee1275.
6037 (grub_get_extended_memory): New function for i386-ieee1275.
6038 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
6039
6040 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
6041 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
6042 property.
f19dbdb7 6043
25f16ec1 6044 * loader/i386/ieee1275/linux.c: New file.
6045
6046 * loader/i386/ieee1275/linux_normal.c: New file.
6047
6048 * disk/ieee1275/nand.c: New file.
6049
e89d61e9 60502008-04-18 Thomas Schwinge <tschwinge@gnu.org>
6051
6052 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
6053 value.
6054 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
6055
602566f6 60562008-04-18 Robert Millan <rmh@aybabtu.com>
6057
6058 Restructures early code path on ieee1275 to unify grub_main() as
6059 the first C function that is executed in every platform.
6060
6061 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
6062 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
6063 cmain().
6064 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
6065 * kern/ieee1275/cmain.c (cmain): Rename to ...
6066 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
6067 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
6068 at the beginning.
6069
57490c2b 60702008-04-18 Robert Millan <rmh@aybabtu.com>
6071
6072 * util/update-grub.in: Fix syntax error when setting
6073 `GRUB_PRELOAD_MODULES'.
6074 Reported by Stephane Chazelas <stephane@artesyncp.com>
6075
1977517d 60762008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
6077
6078 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
6079 section into account, newer toolchains generate unique build ids
6080 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 6081 we want build ids to be preserved
1977517d 6082 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
6083 far from other sections don't cause the raw binary images grow
6084 size
6085
bfb1f1a2 60862008-04-15 Robert Millan <rmh@aybabtu.com>
6087
6088 * disk/lvm.c: Update copyright year.
6089 * kern/misc.c: Likewise.
6090
01979850 60912008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6092
6093 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 6094 there is no memory left for physical volume name.
01979850 6095
0a1150e2 60962008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
6097
6098 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
6099 volume name mapping to support bigger than 9 character names properly.
6100
82ead3fe 61012008-04-13 Robert Millan <rmh@aybabtu.com>
6102
6103 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
6104 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
6105
e54a72f5 61062008-04-13 Christian Franke <franke@computer.org>
6107
6108 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
6109 to create a floppy emulation boot CD when non emulation mode
6110 does not work.
6111 Enable Joliet CD filesystem extension.
6112
9fe86034 61132008-04-13 Robert Millan <rmh@aybabtu.com>
6114
6115 * kern/misc.c (grub_strncat): Fix off-by-one error.
6116 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
6117
6118 * kern/env.c (grub_env_context_close): Clear current context, not
6119 previous one.
6120 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
6121
6122 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
6123
7ceeee39 61242008-04-13 Robert Millan <rmh@aybabtu.com>
6125
6126 Improve robustness when handling LVM.
6127
6128 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 6129 (and leave `*p' unmodified).
7ceeee39 6130 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
6131 through it.
6132 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
6133 iterating through it.
6134 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
6135 through it.
fe6b695a 6136 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 6137 when due) on each grub_lvm_getvalue() or grub_strstr() call.
6138 Don't assume `vg->pvs != NULL' when iterating through it.
6139
58cd3d85 61402008-04-13 Robert Millan <rmh@aybabtu.com>
6141
6142 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
6143 * genmk.rb (partmap): New variable.
6144 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
6145 (#{partmap}): New target rule.
6146 * genpartmaplist.sh: New file.
6147 * Makefile.in (pkglib_DATA): Add partmap.lst.
6148 (partmap.lst): New target rule.
6149 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
6150 modules (including all partition maps), instead of preloading them.
6151
78b51059 61522007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
6153
6154 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
6155 `linux-boot-prober' (if installed) to detect other operating
6156 systems which are installed on the computer and add them to
6157 the boot menu.
6158 * conf/common.rmk: Build and install 30_os-prober.
6159
a91627b4 61602008-04-12 Robert Millan <rmh@aybabtu.com>
6161
6162 * kern/powerpc/ieee1275/init.c: Move from here ...
6163 * kern/ieee1275/init.c: ... to here. Update all users.
6164
6165 * kern/powerpc/ieee1275/cmain.c: Move from here ...
6166 * kern/ieee1275/cmain.c: ... to here. Update all users.
6167
6168 * kern/powerpc/ieee1275/openfw.c: Move from here ...
6169 * kern/ieee1275/openfw.c: ... to here. Update all users.
6170
6171 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
6172 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
6173
322562ea 61742008-04-10 Pavel Roskin <proski@gnu.org>
6175
6176 * configure.ac: Always use "_cv_" in cache variables for
6177 compatibility with Autoconf 2.62.
6178
a02a73c5 61792008-04-07 Robert Millan <rmh@aybabtu.com>
6180
6181 Revert grub/machine/init.h addition by Pavel (since it breaks on
6182 i386-ieee1275 and others):
6183 * util/i386/pc/misc.c: Remove grub/machine/init.h.
6184 * util/powerpc/ieee1275/misc.c: Likewise.
6185
25c024b1 61862008-04-07 Robert Millan <rmh@aybabtu.com>
6187
6188 * util/grub-probe.c (probe): Improve error message.
6189
3cbd2f98 61902008-04-07 Robert Millan <rmh@aybabtu.com>
6191
6192 * util/biosdisk.c (read_device_map): Skip devices that don't exist
6193 (this prevents the presence of a bogus entry from ruining the whole
6194 thing).
6195
87a297bf 61962008-04-06 Pavel Roskin <proski@gnu.org>
6197
36747a62 6198 * util/biosdisk.c: Include grub/util/biosdisk.h.
6199 * util/grub-fstest.c (execute_command): Make static.
6200 * util/grub-mkdevicemap.c (check_device): Likewise.
6201 * util/i386/pc/misc.c: Include grub/machine/init.h.
6202 * util/powerpc/ieee1275/misc.c: Likewise.
6203 * util/lvm.c: Include grub/util/lvm.h.
6204 * util/misc.c: Include grub/kernel.h, grub/misc.h and
6205 grub/cache.h.
6206 * util/raid.c: Include grub/util/raid.h.
6207 (grub_util_getdiskname): Make static.
6208
87a297bf 6209 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
6210 grub_hostfs_fini(), as they are called from grub_init_all() and
6211 grub_fini_all() respectively. This fixes an infinite loop in
6212 grub-fstest due to double registration of hostfs.
6213 Reported by Christian Franke <Christian.Franke@t-online.de>
6214
f6ce7629 62152008-04-05 Pavel Roskin <proski@gnu.org>
6216
6217 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
6218 all 8 functions. Otherwise, probe function 0 only.
6219
070e49e4 62202008-04-04 Pavel Roskin <proski@gnu.org>
6221
8b088a4c 6222 * commands/lspci.c (grub_lspci_iter): Print the bus number
6223 correctly.
6224
4f657021 6225 * commands/lspci.c (grub_pci_classes): Fix typos.
6226 (grub_lspci_iter): Don't print func twice. Print vendor ID
6227 before device ID, as it's normally done.
6228
070e49e4 6229 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
6230 Fix signedness warnings.
6231 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
6232 Likewise.
6233 * util/ieee1275/get_disk_name.c: Include config.h so that
6234 _GNU_SOURCE is defined and getline() is declared. Mark an
6235 unused argument as such. Fix a signedness warning.
6236
ba7328dc 62372008-04-02 Pavel Roskin <proski@gnu.org>
6238
26887f22 6239 * genkernsyms.sh.in: Use more robust assignments for CC and
6240 srcdir. Quote srcdir.
6241 * gensymlist.sh.in: Likewise. Assert at the compile time that
6242 the symbol table is not empty.
6243
ba7328dc 6244 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
6245 * fs/cpio.c (grub_cpio_read): Likewise.
6246
0f582c6b 62472008-04-01 Pavel Roskin <proski@gnu.org>
6248
4b6e1995 6249 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
6250 * disk/host.c (grub_host_open): Likewise.
6251 * disk/loopback.c (grub_loopback_open): Likewise.
6252 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
6253 disk->id as in disk/host.c, not a multi-character constant.
6254
828a2768 6255 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
6256 later is obsolete, potentially dangerous and sets a bad example.
6257 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
6258 * util/misc.c (grub_util_get_image_size): Likewise.
6259
2bb4fb47 6260 * disk/loopback.c (options): Improve help for "--partitions".
6261
0f582c6b 6262 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
6263 options to align them with the short options, e.g. "echo -e".
6264
a33224e0 62652008-03-31 Bean <bean123ch@gmail.com>
6266
6267 * video/reader/png.c (grub_png_data): New member is_16bit and
6268 image_data.
6269 (grub_png_decode_image_header): Detect 16 bit png image.
6270 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
6271 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
6272 (grub_video_reader_png): Release memory occupied by image_data.
6273
6274 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
6275 4096 bytes.
6276 (grub_nfs_mount): Skip the test for sector per cluster.
6277
6278 * include/grub/ntfs.h (MAX_SPC): Removed.
6279
86cb4f54 62802008-03-31 Bean <bean123ch@gmail.com>
6281
6282 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
6283 (grub_probe_SOURCES): Add fs/afs.c.
6284 (grub_fstest_SOURCES): Likewise.
6285 (afs_mod_SOURCES): New variable.
6286 (afs_mod_CFLAGS): Likewise.
6287 (afs_mod_LDFLAGS): Likewise.
6288
6289 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
6290 (grub_emu_SOURCES): Likewise.
6291
6292 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6293
6294 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6295
6296 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6297
6298 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6299
6300 * fs/afs.c: New file.
6301
17c74c21 63022008-03-30 Pavel Roskin <proski@gnu.org>
6303
4cb68e89 6304 * disk/host.c: Include grub/misc.h to fix a warning.
6305 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
6306 warnings about implicit declarations.
6307
8790bb04 6308 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
6309 variable.
6310 * include/grub/i386/loader.h: Change declaration of
6311 grub_linux_boot() to match what grub_loader_set() expects.
6312 * util/getroot.c (grub_guess_root_device): Return const char* to
6313 fix a warning.
6314 * util/grub-probe.c (probe): Fix a warning about uninitialized
6315 abstraction_name variable.
6316 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
6317 second argument as unused to fix a warning.
6318
9a3f3296 6319 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
6320 missing grub_error() call.
6321
0ecef90d 6322 * util/update-grub_lib.in: Define datarootdir, since Autoconf
6323 2.60 and newer uses it to define datadir.
6324
0bf6d401 6325 * commands/sleep.c: Fix warning about implicit declaration.
6326 * disk/memdisk.c: Likewise.
6327 * loader/aout.c: Likewise.
6328 * loader/i386/bsd_normal.c: Likewise.
6329 * util/grub-probe.c: Likewise.
6330
7cdacf97 6331 * commands/i386/cpuid.c (has_longmode): Make static.
6332 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
6333 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
6334
17c74c21 6335 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
6336 GDT. This is more robust, as %ds can change.
6337 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
6338 calling real_to_prot().
6339 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
6340
80a3e68b 63412008-03-28 Pavel Roskin <proski@gnu.org>
6342
6343 * kern/i386/pc/startup.S: Assert that uncompressed functions
6344 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
6345 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
6346 code, as they push parts of the code (error handlers) beyond
6347 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
6348 code as correctness and size.
6349
77bcd272 63502008-03-28 Pavel Roskin <proski@gnu.org>
6351
6352 * kern/i386/pc/startup.S
6353 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
6354 data block address to the real mode, keep offset minimal. This
6355 works around a bug in AWARD BIOS on old Athlon systems, which
6356 makes CD detection hang.
6357
c5dfd43b 63582008-03-26 Pavel Roskin <proski@gnu.org>
6359
6360 * normal/color.c (grub_parse_color_name_pair): Make `name' a
6361 const.
6362 * include/grub/normal.h: Add grub_parse_color_name_pair()
6363 declaration.
6364
bf962df2 63652008-03-24 Bean <bean123ch@gmail.com>
6366
6367 * disk/i386/pc/biosdisk.c (cd_start): Removed.
6368 (cd_count): Removed.
6369 (cd_drive): New variable.
6370 (grub_biosdisk_get_drive): Don't check for (cdN) device.
6371 (grub_biosdisk_call_hook): Likewise.
6372 (grub_biosdisk_iterate): Change cdrom detection method.
6373 (grub_biosdisk_open): Replace cd_start with cd_drive.
6374 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
6375 detect cdrom device.
6376
6377 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
6378 Removed.
6379 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
6380 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
6381 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
6382 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
6383 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
6384 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
6385 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
6386 (grub_biosdisk_cdrp): New structure.
6387 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
6388
6389 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
6390
6391 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
6392 device.
6393
6394 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
6395 New function.
6396
68e7fc7a 63972008-03-20 Robert Millan <rmh@aybabtu.com>
6398
6399 Remove 2 TiB limit in ata.mod.
6400 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
6401 (grub_ata_dumpinfo): Print sector count with 0x%llx.
6402 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
6403 grub_uint64_t instead of grub_uint32_t.
6404
38ad2cf5 64052008-03-05 Bean <bean123ch@gmail.com>
6406
6407 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
6408 (grub_multiboot): Set boot device.
6409
6410 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
6411
2b89344e 64122008-03-02 Bean <bean123ch@gmail.com>
6413
6414 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
6415 symlink_buffer.
6416
87a95d1f 64172008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
6418
6419 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
6420 texinfo.tex.
6421
6422 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
6423 modified.
6424
6425 * docs/fdl.texi: New file.
f19dbdb7 6426
87a95d1f 6427 * docs/mdate-sh: New file. Copied from gnulib.
6428 * docs/texinfo.tex: Likewise.
6429
6430 * config.guess: Updated from gnulib.
6431 * install-sh: Likewise.
6432
7dc15d8e 64332008-02-28 Robert Millan <rmh@aybabtu.com>
6434
6435 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
6436 (aout_mod_SOURCES): New variable.
6437 (aout_mod_CFLAGS): Likewise.
6438 (aout_mod_LDFLAGS): Likewise.
6439
6440 * conf/i386-ieee1275.rmk: Likewise.
6441
b00ab696 64422008-02-28 Robert Millan <rmh@aybabtu.com>
6443
6444 * util/update-grub.in: Reorganise terminal validity check. Accept
6445 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
6446 Based on suggestion by Franklin PIAT.
6447
79ca2d78 64482008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
6449
6450 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
6451 function.
6452 * util/getroot.c (grub_util_check_block_device): New function that
6453 returns the given argument if it is a block device and returns NULL else.
6454 * util/grub-probe.c (argument_is_device): New variable.
6455 (probe): Promote device_name from a variable to an argument. Receive
6456 device_name from grub_util_check_block_device() if path is NULL and from
6457 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 6458 (options): Introduce new parameter '-d, --device'.
79ca2d78 6459 (main): Add description of the new parameter to the help screen.
6460 Rename path variable to argument. Set argument_is_device if the '-d'
6461 option is given. Pass argument to probe() depending on
6462 argument_is_device.
6463
0d16e571 64642008-02-24 Bean <bean123ch@gmail.com>
6465
6466 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
6467 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
6468 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
6469 (GRUB_ISO9660_VOLDESC_PART): Likewise.
6470 (GRUB_ISO9660_VOLDESC_END): Likewise.
6471 (grub_iso9660_primary_voldesc): New member escape.
6472 (grub_iso9660_data): New member joliet.
6473 (grub_iso9660_convert_string): New function.
6474 (grub_iso9660_mount): Detect joliet extension.
6475 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
6476 (grub_iso9660_iso9660_label): Likewise.
6477
6478 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
6479 (grub_setup_SOURCES): Add fs/udf.c.
6480 (grub_fstest_SOURCES): Likewise.
6481 (udf_mod_SOURCES): New variable.
6482 (udf_mod_CFLAGS): Likewise.
6483 (udf_mod_LDFLAGS): Likewise.
6484
6485 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
6486 (grub_emu_SOURCES): Likewise.
6487
6488 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6489
6490 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6491
6492 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6493
6494 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6495
6496 * fs/udf.c: New file.
6497
8a594a17 64982008-02-24 Robert Millan <rmh@aybabtu.com>
6499
6500 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
6501 (normal/lexer.c_DEPENDENCIES): New variables.
6502 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6503 (normal/lexer.c_DEPENDENCIES): Likewise.
6504 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
6505 (normal/lexer.c_DEPENDENCIES): Likewise.
6506 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
6507 (normal/lexer.c_DEPENDENCIES): Likewise.
6508 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6509 (normal/lexer.c_DEPENDENCIES): Likewise.
6510 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
6511 (normal/lexer.c_DEPENDENCIES): Likewise.
6512
2dc33c03 65132008-02-23 Robert Millan <rmh@aybabtu.com>
6514
6515 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
6516 since they were intended to be in hex. This didn't break previously
6517 because of a bug in gpt_partition_map_iterate() (see below).
6518
6519 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
6520 when checking the validity of GPT header.
6521 Remove `partno', since it always provides the same information as `i'.
6522
f6f4cfb0 65232008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
6524
6525 * include/grub/efi/time.h: Fix a wrong comment.
6526
79ff665f 65272008-02-19 Pavel Roskin <proski@gnu.org>
6528
6529 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
6530 message.
6531
d38e24c2 65322008-02-19 Bean <bean123ch@gmail.com>
6533
6534 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
6535 (aout_mod_SOURCES): New variable.
6536 (aout_mod_CFLAGS): Likewise.
6537 (aout_mod_LDFLAGS): Likewise.
6538 (_bsd_mod_SOURCES): New variable.
6539 (_bsd_mod_CFLAGS): Likewise.
6540 (_bsd_mod_LDFLAGS): Likewise.
6541 (bsd_mod_SOURCES): New variable.
6542 (bsd_mod_CFLAGS): Likewise.
6543 (bsd_mod_LDFLAGS): Likewise.
6544
6545 * include/grub/aout.h: New file.
6546
6547 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
6548
6549 * include/grub/i386/bsd.h: New file.
6550
6551 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
6552 to make it public.
6553
6554 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
6555 function is called, so that it's possible to change it inside the hook.
6556 (grub_elf64_load): Likewise.
6557 (grub_elf_file): Don't close the file if elf header is not found.
6558 (grub_elf_close): Close the file if grub_elf_file fails (The new
6559 grub_elf_file won't close it).
6560 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
6561 (grub_elf64_size): Likewise.
6562
6563 * kern/i386/loader.S (grub_unix_real_boot): New function.
6564
6565 * loader/aout.c: New file.
6566
6567 * loader/i386/bsd.c: New file.
6568
6569 * loader/i386/bsd_normal.c: New file.
6570
6571 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
6572
6573 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 6574 can test other formats.
d38e24c2 6575
b93bdb0f 65762008-02-19 Robert Millan <rmh@aybabtu.com>
6577
6578 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
6579 (grub_gpt_partition_type_empty): Redefine with macro from
6580 `<grub/gpt_partition.h>'.
6581 (gpt_partition_map_iterate): Adjust partition type comparison.
6582
6583 Export `entry' as partmap-specific `part.data' struct.
6584 (grub_gpt_header, grub_gpt_partentry): Move from here ...
6585
6586 * include/grub/gpt_partition.h (grub_gpt_header)
6587 (grub_gpt_partentry): ... to here (new file).
6588
6589 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
6590
6591 (grub_gpt_partition_type_bios_boot): New const variable, defined
6592 with macro from `<grub/gpt_partition.h>'.
6593
6594 (setup): Replace `first_start' with `embed_region', which keeps
6595 track of the embed region (and is partmap-agnostic).
6596
6597 Replace find_first_partition_start() with find_usable_region(),
6598 which finds a usable region for embedding using partmap-specific
6599 knowledge (supports PC/MSDOS and GPT).
6600
6601 Fix all assumptions that the embed region start at sector 1, using
6602 `embed_region.start' from now on. Similarly, use `embed_region.end'
6603 rather than `first_start' to calculate available size.
6604
6605 In grub_util_info() message, replace "into after the MBR" with an
6606 indication of the specific sector our embed region starts at.
6607
66cb40f6 66082008-02-19 Robert Millan <rmh@aybabtu.com>
6609
6610 * DISTLIST: Replace `commands/ieee1275/halt.c' and
6611 `commands/ieee1275/reboot.c' with `commands/halt.c' and
6612 `commands/reboot.c'.
6613 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6614 (halt_mod_SOURCES): Likewise.
6615 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
6616 (halt_mod_SOURCES): Likewise.
6617
b7202015 66182008-02-17 Christian Franke <franke@computer.org>
6619
6620 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
6621
32b0fc49 66222008-02-17 Robert Millan <rmh@aybabtu.com>
6623
6624 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6625 set `first_start' to 0 for non-PC/MSDOS partition maps.
6626
aca63502 66272008-02-16 Robert Millan <rmh@aybabtu.com>
6628
6629 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
6630 do not assume partition map is PC/MSDOS before performing checks that
6631 are specific to that layout.
6632
0de8be86 66332008-02-13 Robert Millan <rmh@aybabtu.com>
6634
6635 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
6636 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
6637 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
6638
c3db8364 66392008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
6640
6641 * configure.ac: Only a cosmetic change on the handling of
6642 -fno-stack-protector.
6643
f714229e 66442008-02-12 Alexandre Boeglin <alex@boeglin.org>
6645
c3db8364 6646 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
6647 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
6648 reboot.c.
f714229e 6649 (grub_install_SOURCES): Add halt.mod and reboot.mod.
6650 (halt_mod_SOURCES): New variable.
6651 (halt_mod_CFLAGS): Likewise.
6652 (halt_mod_LDFLAGS): Likewise.
6653 (reboot_mod_SOURCES): Likewise.
6654 (reboot_mod_CFLAGS): Likewise.
6655 (reboot_mod_LDFLAGS): Likewise.
6656
c3db8364 6657 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
6658 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
6659 reboot.c.
f714229e 6660 (halt_mod_SOURCES): Likewise.
6661 (reboot_mod_SOURCES): Likewise.
6662
c3db8364 6663 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
6664 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 6665 (reboot_mod_SOURCES): Likewise.
6666
6667 * commands/i386/pc/reboot.c: merge this file ...
6668
6669 * commands/ieee1275/reboot.c: ... and this file ...
6670
6671 * commands/reboot.c: ... to this file.
c3db8364 6672 Add some precompiler directive to include the correct header for
6673 each machine.
f714229e 6674
6675 * commands/ieee1275/halt.c: move this file ...
6676
6677 * commands/halt.c: ... to here.
c3db8364 6678 Add some precompiler directive to include the correct header for
6679 each machine.
f714229e 6680
6681 * include/grub/efi/efi.h (grub_reboot): New function declaration.
6682 (grub_halt): Likewise.
6683
6684 * kern/efi/efi.c (grub_reboot): New function.
6685 (grub_halt): Likewise.
6686
c74493e0 66872008-02-12 Robert Millan <rmh@aybabtu.com>
6688
6689 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
6690 /dev (like it is done for /dev/mapper). This doesn't provide support
6691 for EVMS, but at least it is now easy to identify the problem when it
6692 arises.
6693
d0db4b04 66942008-02-11 Robert Millan <rmh@aybabtu.com>
6695
6696 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
6697 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
6698 comparing it with -1, not 0.
6699
bf748642 67002008-02-10 Robert Millan <rmh@aybabtu.com>
6701
6702 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
6703 `disk/lvm.c'.
6704 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6705 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
6706
6707 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
6708 `disk/lvm.c' to the end of the list.
6709 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6710 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6711
b5db202a 67122008-02-10 Robert Millan <rmh@aybabtu.com>
6713
6714 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
6715 grub_print_error() instead. This will let user know why we're entering
6716 rescue mode.
6717 Based on suggestions from Sam Morris.
6718
83abee31 67192008-02-10 Alexandre Boeglin <alex@boeglin.org>
6720
6721 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
6722 on remaining N args, instead of "--" arg N times.
6723
78d5a08b 67242008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
6725
6726 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
6727 (fill_with_default_glyph): Changed to use unknown_glyph for fill
6728 pattern for unknown glyphs.
6729
68807e5f 67302008-02-09 Robert Millan <rmh@aybabtu.com>
6731
6732 * configure.ac: Probe for `help2man'.
6733 * Makefile.in (builddir): New variable.
6734 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
6735 or otherwise add a few flags/options to it.
6736 (install-local): For every executable utility or script that is
6737 installed, invoke $(HELP2MAN) to install a manpage based on --help
6738 output.
6739
6740 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
6741 that it doesn't prevent --help from working in build tree.
6742
6743 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
6744 with `bug-grub@gnu.org'.
6745 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
6746 * util/update-grub.in (usage): New function.
6747 Implement proper argument check, with support for --help and --version
6748 (as well as existing -y).
6749
67502008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 6751
6752 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
6753 avoid overwriting previous output.
6754 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
6755
c1962162 67562008-02-09 Robert Millan <rmh@aybabtu.com>
6757
6758 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
6759 drawing the menu.
6760
3dac2e3f 67612008-02-09 Robert Millan <rmh@aybabtu.com>
6762
6763 * commands/sleep.c: New file.
6764 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
6765 (sleep_mod_SOURCES): New variable.
6766 (sleep_mod_CFLAGS): Likewise.
6767 (sleep_mod_LDFLAGS): Likewise.
6768
7a634e08 67692008-02-09 Robert Millan <rmh@aybabtu.com>
6770
6771 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
6772 situations in which we can deduce the RAID size and the superblock
6773 doesn't match it.
6774
b92f0c18 67752008-02-09 Robert Millan <rmh@aybabtu.com>
6776
6777 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
6778 and return a grub_diskmemberlist_t composed of LVM physical volumes.
6779 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
6780
6781 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
6782 and return a grub_diskmemberlist_t composed of physical array members.
6783 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
6784
6785 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
6786 prototype.
6787 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
6788 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
6789 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
6790
6791 * util/grub-probe.c (probe): Move partmap probing code from here ...
6792 (probe_partmap): ... to here.
6793 (probe): Use probe_partmap() once for the disk we're probing, and
6794 additionally, when such disk contains a memberlist() struct member,
6795 once for each disk that is contained in the structure returned by
6796 memberlist().
6797
91a4bf68 67982008-02-09 Robert Millan <rmh@aybabtu.com>
6799
6800 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
6801 environment variable to 'all' in order to obtain debug output from
6802 non-util/ code.
6803 * util/i386/pc/grub-setup.c (main): Likewise.
6804
a96f9caa 68052008-02-08 Robert Millan <rmh@aybabtu.com>
6806
6807 * disk/raid.c (grub_raid_scan_device): Check for
6808 `array->device[sb.this_disk.number]' rather than for
6809 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 6810 guaranteed to be accessible.
a96f9caa 6811
b37a9222 68122008-02-08 Robert Millan <rmh@aybabtu.com>
6813
6814 * disk/raid.c: Update copyright.
6815 * fs/cpio.c: Likewise.
6816 * include/grub/raid.h: Likewise.
6817 * loader/i386/pc/multiboot.c: Likewise.
6818 * util/hostfs.c: Likewise.
6819
5626aee1 68202008-02-08 Robert Millan <rmh@aybabtu.com>
6821
6822 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
6823 to a grub_disk_t array.
6824 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
6825 `device[x]'.
6826 (grub_raid_scan_device): Replace `device[x].name' accesses with
6827 `device[x]->name'. Simplify initialization of `array->device[x]'.
6828
554f0187 68292008-02-08 Robert Millan <rmh@aybabtu.com>
6830
6831 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
6832 grub_dprintf() calls.
6833 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
6834 error message.
6835
1ec8425d 68362008-02-07 Christian Franke <franke@computer.org>
6837
6838 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
6839 instead of fseek and ftell to support large files.
6840 (grub_hostfs_read): Likewise.
6841
f2156fda 68422008-02-07 Robert Millan <rmh@aybabtu.com>
6843
6844 Patch from Jeroen Dekkers.
6845 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 6846 failure, since successfully reading all array members might not be
f2156fda 6847 required.
6848
9216e0e7 68492008-02-06 Robert Millan <rmh@aybabtu.com>
6850
6851 * util/grub-probe.c (probe): Simplify partmap probing (with the
6852 assumption that the first word up to the underscore equals to
6853 the module name).
6854
b0dfd29a 68552008-02-06 Christian Franke <franke@computer.org>
6856
6857 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
6858 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
6859 last block of a cpio or tar stream.
6860 Check for "TRAILER!!!" instead of any empty data
6861 block to detect last block of a cpio stream.
6862 (grub_cpio_dir): Fix constness of variable np.
6863 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
6864 cpio or tar trailer is detected. This fixes a crash
6865 on open of a non existing file.
6866
c32865bf 68672008-02-05 Bean <bean123ch@gmail.com>
6868
6869 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
6870 address of entry.
6871 (grub_multiboot_load_elf64): Likewise.
6872 (grub_multiboot): Initialize mbi structure.
6873
6874 * util/grub-fstest.c: Don't include unused header file script.h.
6875
fe6b695a 6876 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 6877 of file.
6878 (grub_fstest_SOURCES): Likewise.
6879
409480b7 68802008-02-05 Robert Millan <rmh@aybabtu.com>
6881
6882 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
6883 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
6884 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
6885 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
6886
6887 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
6888 (translation_table): Replace hardcoded values with macros
6889 provided by `<grub/term.h>'.
6890
6891 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
6892 (keyboard_map): Correct/add a few values, with macros provided
6893 by `<grub/term.h>'.
6894 (keyboard_map_shift): Zero values that don't differ from their
6895 `keyboard_map' equivalents.
6896 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
6897 Discard the second scan code that is always sent by Caps lock.
6898 Only use `keyboard_map_shift' when it provides a non-zero value,
6899 otherwise fallback to `keyboard_map'.
6900
99fadbaa 69012008-02-04 Bean <bean123ch@gmail.com>
6902
6903 * Makefile.in (enable_grub_fstest): New variable.
6904
6905 * conf/common.rmk (grub_fstest_init.lst): New rule.
6906 (grub_fstest_init.h): Likewise.
6907 (grub_fstest_init.c): Likewise.
6908 (util/grub-fstest.c_DEPENDENCIES): New variable.
6909 (grub_fstest_SOURCES): Likewise.
6910
6911 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
6912
6913 * util/grub-fstest.c: New file.
6914
bf567c50 69152008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6916
6917 Make grub-setup handle a separate root device.
f19dbdb7 6918
bf567c50 6919 * util/i386/pc/grub-setup.c (setup): Always open the root device,
6920 so that the root device can be compared with the destination
6921 device.
6922 When embedding the core image, if the root and destination devices
6923 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
6924 0xFF.
6925 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 6926
9be6b98b 69272008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6928
6929 Add support for having a grub directory in a different drive. This
6930 is still only the data handling part.
f19dbdb7 6931
9be6b98b 6932 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
6933 (codestart): Save %dh in GRUB_ROOT_DRIVE.
6934 (grub_root_drive): New variable.
6935
6936 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
6937 instead of GRUB_BOOT_DRIVE to construct a device name. Set
6938 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
6939 as it was.
6940
6941 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
6942
6943 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
6944 macro.
6945 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
6946
6947 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
6948 is bogus, because PXE booting does not specify any drive
6949 correctly.
6950
6951 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
6952 am not sure if this is really correct.
6953
6954 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
6955 is always identical to the boot drive when booting from a CD.
6956
6957 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
6958 longer.
6959 (root_drive): New variable.
6960 (real_start): Unconditionally set %dh to ROOT_DRIVE.
6961 (setup_sectors): Push %dx right after popping it, because %dh will
6962 be modified later.
6963 (copy_buffer): Restore %dx.
6964
e0ca0677 69652008-02-03 Robert Millan <rmh@aybabtu.com>
6966
6967 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
6968 use `cdboot.img' for cdrom images.
6969
3b3f6629 69702008-02-03 Robert Millan <rmh@aybabtu.com>
6971
6972 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
6973 only setup gfxterm when `font' command has succeeded.
6974
d42b3672 69752008-02-03 Robert Millan <rmh@aybabtu.com>
6976
6977 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
6978 (grub_rescue_cmd_multiboot_loader)
6979 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
6980
fa370ea6 69812008-02-03 Pavel Roskin <proski@gnu.org>
6982
e0c5dacb 6983 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 6984 %edx and %esi from stack only after grub_gate_a20() is called.
6985 grub_gate_a20() clobbers %edx.
6986
f2a76e1d 69872008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
6988
6989 * configure.ac (AC_INIT): Bumped to 1.96.
6990
6991 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
6992 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
6993 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
6994 video/readers/png.c.
6995
90fd32d1 69962008-02-03 Bean <bean123ch@gmail.com>
9be665dd 6997
6998 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
6999 (cdboot_img_SOURCES): New variable.
7000 (cdboot_img_ASFLAGS): New variable.
7001 (cdboot_img_LDFLAGS): New variable.
7002
7003 * boot/i386/pc/cdboot.S: New file.
7004
7005 * disk/i386/pc/biosdisk.c (cd_start): New variable.
7006 (cd_count): Likewise.
7007 (grub_biosdisk_get_drive): Add support for cd device.
7008 (grub_biosdisk_call_hook): Likewise.
7009 (grub_biosdisk_iterate): Likewise.
7010 (grub_biosdisk_open): Likewise.
7011 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
7012 (grub_biosdisk_rw): Support reading from cd device.
7013 (GRUB_MOD_INIT): Iterate cd devices.
7014
7015 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
7016 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
7017 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
7018
7019 * kern/i386/pc/init.c (make_install_device): Check for cd device.
7020
4020aa53 70212008-02-02 Robert Millan <rmh@aybabtu.com>
7022
7023 * commands/read.c: New file.
7024 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
7025 (read_mod_SOURCES): New variable.
7026 (read_mod_CFLAGS): Likewise.
7027 (read_mod_LDFLAGS): Likewise.
7028
e03a1132 70292008-02-02 Robert Millan <rmh@aybabtu.com>
7030
7031 * normal/main.c (grub_normal_execute): Check for `menu->size' when
7032 determining whether menu has to be displayed.
7033
58c69220 70342008-02-02 Marco Gerards <marco@gnu.org>
7035
7036 * bus/pci.c: New file.
7037
7038 * include/grub/pci.h: Likewise.
7039
7040 * include/grub/i386/pc/pci.h: Likewise.
7041
7042 * commands/lspci.c: Likewise.
7043
7044 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
7045 `lspci.mod'.
7046 (pci_mod_SOURCES): New variable.
7047 (pci_mod_CFLAGS): Likewise.
7048 (pci_mod_LDFLAGS): Likewise.
7049 (lspci_mod_SOURCES): Likewise.
7050 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 7051 (lspci_mod_LDFLAGS): Likewise.
58c69220 7052
c004e1b4 70532008-02-02 Bean <bean123ch@gmail.com>
7054
7055 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
7056 (grub_ufs_get_file_block): Fix indirect block calculation problem.
7057
7058 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
7059 (grub_xfs_btree_node): New structure.
7060 (grub_xfs_btree_root): New structure.
7061 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
7062 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
7063 (GRUB_XFS_EXTENT_BLOCK): Likewise.
7064 (GRUB_XFS_EXTENT_SIZE): Likewise.
7065 (grub_xfs_read_block): Support btree format type.
7066 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
7067 Use directory block as basic unit.
7068
7069 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
7070
7071 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
7072 __attribute__ ((__regparm__ (1))).
7073
f95562bf 70742008-02-01 Robert Millan <rmh@aybabtu.com>
7075
7076 Correct a mistake in previous commit.
7077
7078 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
7079 top.
7080 (normal/command.c_DEPENDENCIES): New variable.
7081
7d31f41f 70822008-02-01 Robert Millan <rmh@aybabtu.com>
7083
7084 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
7085 top.
7086 (normal/command.c_DEPENDENCIES): New variable.
7087 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
7088 * conf/i386-ieee1275.rmk: Likewise.
7089 * conf/i386-linuxbios.rmk: Likewise.
7090 * conf/i386-pc.rmk: Likewise.
7091 * conf/sparc64-ieee1275.rmk: Likewise.
7092 * conf/powerpc-ieee1275.rmk: Likewise.
7093 (grub_emu_SOURCES): Add `fs/fshelp.c'.
7094
7095 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
7096
60b6be74 70972008-02-01 Robert Millan <rmh@aybabtu.com>
7098
7099 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
7100 call at beginning of function.
7101
078522ab 71022008-01-31 Pavel Roskin <proski@gnu.org>
7103
7104 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 7105 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
7106 (grub_mkrescue_SOURCES): Likewise.
078522ab 7107 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
7108
ccaa8a5f 71092008-01-30 Robert Millan <rmh@aybabtu.com>
7110
7111 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
7112 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
7113 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
7114 (grub_probe_SOURCES): ... to here.
7115
7116 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
7117 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
7118 * conf/i386-ieee1275.rmk: Likewise.
7119 * conf/i386-linuxbios.rmk: Likewise.
7120 * conf/powerpc-ieee1275.rmk: Likewise.
7121
ae5a9cd7 71222008-01-30 Tristan Gingold <gingold@free.fr>
7123
7124 * kern/rescue.c: Silently accept empty lines.
7125
70bc2ef2 71262008-01-29 Bean <bean123ch@gmail.com>
7127
7128 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
7129 (real_code_2): Code cleanup and change comment style.
7130 (move_memory): Avoid using 32-bit address mode.
7131
6a4d50ea 71322008-01-29 Bean <bean123ch@gmail.com>
7133
7134 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
7135 (png_mod_SOURCES): New variable.
7136 (png_mod_CFLAGS): Likewise.
7137 (png_mod_LDFLAGS): Likewise.
7138
7139 * video/readers/png.c: New file.
7140
11cc30ac 71412008-01-28 Robert Millan <rmh@aybabtu.com>
7142
7143 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
7144 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
7145 `ifndef GRUB_MOD_GAP' hack.
7146 * util/elf/grub-mkimage.c (add_segments): Likewise.
7147
3abc589f 71482008-01-27 Robert Millan <rmh@aybabtu.com>
7149
7150 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
7151 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 7152 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 7153
e1907778 71542008-01-27 Robert Millan <rmh@aybabtu.com>
7155
7156 Get grub-emu to build again (including parallel builds).
7157
7158 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
7159 Split into ...
7160 (util/grub-emu.c_DEPENDENCIES): ... this, ...
7161 (normal/execute.c_DEPENDENCIES): ... this, ...
7162 (grub-emu_DEPENDENCIES): ... and this.
7163
7164 * conf/i386-efi.rmk: Likewise.
7165 * conf/i386-linuxbios.rmk: Likewise.
7166 * conf/i386-ieee1275.rmk: Likewise.
7167 * conf/powerpc-ieee1275.rmk: Likewise.
7168 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
7169
2216b101 71702008-01-27 Robert Millan <rmh@aybabtu.com>
7171
7172 * NEWS: Add a few items.
7173
f75172d9 71742008-01-27 Robert Millan <rmh@aybabtu.com>
7175
7176 Fix parallel builds with grub-emu. Based on earlier commit for
7177 grub-probe and grub-setup.
7178
7179 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7180 (util/grub-emu.c_DEPENDENCIES): ... this.
7181 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7182 (util/grub-emu.c_DEPENDENCIES): ... this.
7183 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7184 (util/grub-emu.c_DEPENDENCIES): ... this.
7185 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7186 (util/grub-emu.c_DEPENDENCIES): ... this.
7187 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
7188 (util/grub-emu.c_DEPENDENCIES): ... this.
7189
3f51de77 71902008-01-27 Pavel Roskin <proski@gnu.org>
7191
7192 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
7193 to create a gap between _end and the modules added to the image
7194 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
7195 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
7196 * util/elf/grub-mkimage.c (add_segments): Likewise.
7197
2033f53e 71982008-01-26 Pavel Roskin <proski@gnu.org>
7199
7200 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
7201 just return an error.
7202
22da1f6f 72032008-01-26 Bean <bean123ch@gmail.com>
7204
7205 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
7206 (grub_reiserfs_get_item): Save offset of the next item.
7207 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
7208
2a9525e6 72092008-01-25 Robert Millan <rmh@aybabtu.com>
7210
7211 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
7212 make all filesystem sources appear together (possibly fixing omissions
7213 while at it).
7214 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7215 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7216 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7217 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7218
7219 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
7220 add `kern/file.c'.
7221 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
7222 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7223 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
7224 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
7225
7226 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
7227 (probe): Add a sanity check to make sure of our ability to read
7228 requested files when probing for filesystem type.
7229
7230 * genmk.rb: Update copyright year (2007).
7231
7232 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
7233 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
7234 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
7235 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
7236 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
7237 : Remove function prototypes.
7238
b95f71b5 72392008-01-25 Robert Millan <rmh@aybabtu.com>
7240
7241 Revert my previous commits (based on wrong assumption of how grub_errno
7242 works).
7243
fe6b695a 7244 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 7245 * kern/file.c (grub_file_open): Likewise.
7246
d08bbb49 72472008-01-24 Pavel Roskin <proski@gnu.org>
7248
7249 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
7250 that hang if GRUB tries to setup colors.
7251 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
7252 colors for firmwares that don't support it.
7253 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
7254 Recognize Open Hack'Ware, set flags to work around its
7255 limitations.
7256
605e36ed 72572008-01-24 Robert Millan <rmh@aybabtu.com>
7258
7259 * kern/file.c (grub_file_open): Do not account previous failures of
7260 unrelated functions when grub_errno is checked for.
7261 Reported by Oleg Strikov.
7262
bac332a1 72632008-01-24 Bean <bean123ch@gmail.com>
7264
7265 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
7266 (grub_ufs_sblock): New member volume name.
7267 (grub_ufs_find_file): Fix string copy bug.
7268 (grub_ufs_label): Implement this function properly.
7269
7270 * fs/hfs.c (grub_hfs_cnid_type): New enum.
7271 (grub_hfs_iterate_records): Use the correct file number for extents
7272 and catalog file. Fix problem in next index calculation.
7273 (grub_hfs_find_node): Replace recursive function call with loop.
7274 (grub_hfs_iterate_dir): Replace recursive function call with loop.
7275
15c80c09 72762008-01-23 Robert Millan <rmh@aybabtu.com>
7277
7278 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
7279 `<grub/symbol.h>' and `<grub/multiboot.h>'.
7280 (grub_multiboot2_real_boot): New function prototype.
7281
7282 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
7283 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
7284
7285 * kern/i386/ieee1275/init.c (grub_os_area_addr)
7286 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
7287
305338fd 72882008-01-23 Robert Millan <rmh@aybabtu.com>
7289
7290 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
7291 #ifdef'ed out grub_printf().
7292
3ea52685 72932008-01-23 Robert Millan <rmh@aybabtu.com>
7294
7295 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
7296 grub_dprintf calls, since they make "debug=all" mode unusable.
7297 (grub_console_checkkey): Likewise.
7298
5882ae4b 72992008-01-23 Robert Millan <rmh@aybabtu.com>
7300
7301 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
7302 `term/i386/pc/at_keyboard.c'.
7303 (pkglib_MODULES): Add `serial.mod'.
7304 (serial_mod_SOURCES): New variable.
7305 (serial_mod_CFLAGS): Likewise.
7306 (serial_mod_LDFLAGS): Likewise.
7307
7308 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
7309 `<grub/powerpc/ieee1275/console.h>'.
7310 (grub_keyboard_controller_init): New function prototype.
7311 (grub_console_checkkey): Likewise.
7312 (grub_console_getkey): Likewise.
7313
7314 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
7315 keyboard on i386.
7316
7317 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
7318 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
7319
06ab5303 73202008-01-23 Robert Millan <rmh@aybabtu.com>
7321
7322 * kern/i386/pc/init.c (make_install_device): When memdisk image is
7323 present, "(memdisk)/boot/grub" becomes the default prefix.
7324
7325 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
7326 a memdisk tarball with all the modules. Add --overlay=DIR option that
7327 allows users to overlay additional files into the image.
7328
dbb475a4 73292008-01-23 Robert Millan <rmh@aybabtu.com>
7330
7331 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
7332 and `machine/memory.h'.
7333 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
7334 (_multiboot_mod_SOURCES): New variable.
7335 (_multiboot_mod_CFLAGS): Likewise.
7336 (_multiboot_mod_LDFLAGS): Likewise.
7337 (multiboot_mod_SOURCES): Likewise.
7338 (multiboot_mod_CFLAGS): Likewise.
7339 (multiboot_mod_LDFLAGS): Likewise.
7340
7341 * include/grub/i386/ieee1275/loader.h: New file.
7342
7343 * include/grub/i386/ieee1275/machine.h: Likewise.
7344
7345 * include/grub/i386/ieee1275/memory.h: Likewise.
7346
7347 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
7348 variable declaration.
7349 (grub_os_area_size): Likewise.
7350
7351 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
7352 (grub_lower_mem, grub_upper_mem): New variables.
7353 (grub_stop_floppy): New function (just to make
7354 grub_multiboot2_real_boot() happy).
7355
7356 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
7357 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
7358 (grub_stop): New function.
7359 Include `"../realmode.S"' and `"../loader.S"'.
7360
7361 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
7362 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
7363
7364 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
7365 rely on grub_multiboot2_real_boot() for final boot.
7366
25638629 73672008-01-22 Robert Millan <rmh@aybabtu.com>
7368
7369 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
7370 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
7371 device that doesn't look like an SD card.
7372 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7373 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
7374 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
7375 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
7376 found.
7377
9dad816d 73782008-01-22 Robert Millan <rmh@aybabtu.com>
7379
7380 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
7381 avoid claiming over our own code.
7382
34842f2d 73832008-01-22 Bean <bean123ch@gmail.com>
7384
7385 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
7386 (jpeg_mod_SOURCES): New variable.
7387 (jpeg_mod_CFLAGS): Likewise.
7388 (jpeg_mod_LDFLAGS): Likewise.
7389
7390 * video/readers/jpeg.c : New file.
7391
44023a28 73922008-01-22 Bean <bean123ch@gmail.com>
7393
7394 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
7395 there are no more items.
7396
bc2d8ac6 73972008-01-21 Robert Millan <rmh@aybabtu.com>
7398
7399 * kern/mm.c (grub_mm_init_region): Improve debug message.
7400
261bd4bc 74012008-01-21 Robert Millan <rmh@aybabtu.com>
7402
7403 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
7404 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
7405 address.
7406 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
7407 a C macro.
7408 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
7409 Indicates start of upper memory.
7410 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
7411 (generate_image): Abort when image size is big enough to corrupt
7412 upper memory.
7413
7414 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
7415 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
7416 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7417 instead of hardcoding 0xA0000.
7418 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
7419 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
7420 instead of hardcoding 0xA0000.
7421
f970b55e 74222008-01-21 Robert Millan <rmh@aybabtu.com>
7423
7424 * disk/memdisk.c (memdisk_size): New variable.
7425 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
7426 `memdisk_size'.
7427 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
7428 image to dynamic memory.
7429 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
7430 `memdisk_size'. Free memdisk block.
7431
1a8b0526 74322008-01-21 Robert Millan <rmh@aybabtu.com>
7433
7434 Fix detection of very small filesystems (like tar).
7435
7436 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
7437 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
7438 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
7439 a problem with this disk).
7440
6e9b4aab 74412008-01-21 Robert Millan <rmh@aybabtu.com>
7442
7443 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
7444 on grub_biosdisk_rw_standard() error.
7445
0d8837b2 74462008-01-21 Robert Millan <rmh@aybabtu.com>
7447
7448 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
7449 recent changes.
7450 * kern/elf.c: Likewise.
7451 * kern/ieee1275/ieee1275.c: Likewise.
7452 * kern/powerpc/ieee1275/openfw.c: Likewise.
7453 * term/ieee1275/ofconsole.c: Likewise.
7454
ffd36e34 74552008-01-21 Robert Millan <rmh@aybabtu.com>
7456
7457 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
7458
3f0093d0 7459 * include/grub/kernel.h (grub_arch_memdisk_addr)
7460 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 7461
3f0093d0 7462 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
7463 (grub_arch_memdisk_size): ... to here.
ffd36e34 7464
6c391b21 74652008-01-21 Robert Millan <rmh@aybabtu.com>
7466
7467 Mostly based on bugfix from Bean.
7468
7469 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
7470 attribute with hook() parameter.
7471 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
7472 declaration.
7473 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
7474 attribute with hook() parameter.
7475 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
7476 declaration.
7477
55a581dc 74782008-01-21 Robert Millan <rmh@aybabtu.com>
7479
7480 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
7481 (pkglib_MODULES): Add `memdisk.mod'.
7482 (memdisk_mod_SOURCES): New variable.
7483 (memdisk_mod_CFLAGS): Likewise.
7484 (memdisk_mod_LDFLAGS): Likewise.
7485
7486 * disk/memdisk.c: New file.
7487
7488 * include/grub/disk.h (grub_disk_dev_id): Add
7489 `GRUB_DISK_DEVICE_MEMDISK_ID'.
7490
7491 * include/grub/i386/pc/kernel.h
7492 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
7493 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
7494 (grub_kernel_image_size): New variable declaration.
7495 (grub_total_module_size): Likewise.
7496 (grub_memdisk_image_size): Likewise.
7497
7498 * include/grub/i386/pc/memory.h
7499 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
7500
7501 * include/grub/kernel.h: Include `<grub/symbol.h>'.
7502 (grub_arch_memdisk_addr): New variable declaration.
7503 (grub_arch_memdisk_size): Likewise.
7504
7505 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
7506 (grub_arch_memdisk_size): Likewise.
7507
7508 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
7509 (codestart): Replace hardcoded `0x100000' with
7510 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
7511
7512 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
7513 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
7514 not NULL, append the contents of the file it refers to, at the end of
7515 the compressed kernel image. Initialize `grub_memdisk_image_size'
7516 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
7517 (options): Add "memdisk"|'m' option.
7518 (main): Parse --memdisk|-m option, and pass user-provided path as
7519 parameter to generate_image().
7520
3d7f54c9 75212008-01-20 Robert Millan <rmh@aybabtu.com>
7522
7523 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
7524 grub_dprintf() calls from here ...
7525 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
7526
0bf74728 75272008-01-20 Robert Millan <rmh@aybabtu.com>
7528
7529 Fix detection of "real mode" when /options/real-mode? doesn't exist.
7530
7531 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
7532 declaration.
7533 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
7534 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
7535 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 7536 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 7537 property).
7538 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
7539 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
7540
33bf70a7 75412008-01-19 Robert Millan <rmh@aybabtu.com>
7542
fe6b695a 7543 Get rid of confusing function (superseded by
33bf70a7 7544 `grub_ieee1275_get_integer_property')
7545 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
7546 prototype.
7547 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
7548 function.
7549 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
7550 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 7551 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 7552
e2da7d26 75532008-01-19 Robert Millan <rmh@aybabtu.com>
7554
7555 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
7556 command after "shut-down", since implementations differ on which
7557 the command for halt is.
7558
59f1fd8d 75592008-01-19 Robert Millan <rmh@aybabtu.com>
7560
7561 * include/grub/i386/linuxbios/console.h: Add header protection.
7562 (grub_keyboard_controller_init): New function prototype.
7563 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
7564 (KEYBOARD_COMMAND_READ): Likewise.
7565 (KEYBOARD_COMMAND_WRITE): Likewise.
7566 (KEYBOARD_SCANCODE_SET1): Likewise.
7567 (grub_keyboard_controller_write): New function.
7568 (grub_keyboard_controller_read): Likewise.
7569 (grub_keyboard_controller_init): Likewise.
7570
7571 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
7572 (grub_console_init): On coreboot/LinuxBIOS, call
7573 grub_keyboard_controller_init().
7574
5f5a7c15 75752008-01-19 Robert Millan <rmh@aybabtu.com>
7576
7577 PowerPC changes provided by Pavel Roskin.
7578
7579 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
7580 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
7581 don't rely on cmain() doing it.
7582 * kern/i386/ieee1275/startup.S (_start): Store %eax in
7583 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
7584
1210e168 75852008-01-16 Robert Millan <rmh@aybabtu.com>
7586
7587 * include/grub/i386/linuxbios/memory.h
7588 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
7589 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
7590 receive `table_header' as argument. Instead, probe for it in the
7591 known memory ranges where it can be present.
7592 (grub_available_iterate): Do not pass a fixed `table_header' address
7593 to grub_linuxbios_table_iterate().
7594
3d04eab8 75952008-01-15 Robert Millan <rmh@aybabtu.com>
7596
7597 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
7598 * conf/i386-ieee1275.rmk: New file.
7599 * include/grub/i386/ieee1275/console.h: Likewise.
7600 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
7601 * include/grub/i386/ieee1275/kernel.h: Likewise.
7602 * include/grub/i386/ieee1275/time.h: Likewise.
7603 * kern/i386/ieee1275/init.c: Likewise.
7604 * kern/i386/ieee1275/startup.S: Likewise.
7605
d1bc1b73 76062008-01-15 Robert Millan <rmh@aybabtu.com>
7607
7608 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
7609 when pointers are 32-bit (but still do set it to one when they are
7610 64-bit).
7611
66a65807 76122008-01-15 Robert Millan <rmh@aybabtu.com>
7613
7614 * include/grub/ieee1275/ieee1275.h
7615 (grub_ieee1275_get_integer_property): New function prototype.
7616
7617 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
7618 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 7619 grub_ieee1275_get_property() to handle endianness.
66a65807 7620
7621 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
7622 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 7623 where appropriate.
66a65807 7624 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
7625 (grub_map): Likewise.
7626 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
7627
a83ccafd 76282008-01-15 Bean <bean123ch@gmail.com>
7629
7630 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
7631 (grub_script_execute_cmdline): Reset grub_errno.
7632
7633 * normal/main.c (read_config_file): Reset grub_errno.
7634
7635 * normal/parse.y (script_init): New.
7636 (script): Move function and menuentry here.
7637 (delimiter): New.
7638 (command): Add delimiter at the end of command.
7639 (commands): Adjust to match the new command.
7640 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 7641 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 7642 (if): Use the new commands.
7643
7644 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
7645
df6ecfc6 76462008-01-15 Robert Millan <rmh@aybabtu.com>
7647
7648 * normal/menu.c (run_menu): Move timeout message from here ...
7649 (print_timeout): ... to here.
7650 (run_menu): Use print_timeout() once during initial draw to print
7651 the whole message, and again in every clock tick to update only
7652 the number of seconds.
7653
87ae25eb 76542008-01-15 Robert Millan <rmh@aybabtu.com>
7655
7656 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
7657 actual size of `available' from grub_ieee1275_get_property(), and
7658 restrict parsing to that bound.
7659
47bf09a4 76602008-01-15 Christian Franke <franke@computer.org>
7661
7662 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
7663 (argp_program_version): Remove variable.
7664 (argp_program_bug_address): Likewise.
7665 (options): Convert from struct argp_option to struct option.
7666 (struct arguments): Remove.
7667 (parse_opt): Remove.
7668 (usage): New function.
7669 (main): Replace struct args members by simple variables.
7670 Replace argp_parse() by getopt_long().
7671 Add switch to evaluate options.
7672 Add missing "(...)" around root_dev in prefix string.
7673
c86f1469 76742008-01-14 Robert Millan <rmh@aybabtu.com>
7675
7676 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
7677 for grub_ieee1275_exit(), in order to improve portability.
7678
e622c559 76792008-01-14 Robert Millan <rmh@aybabtu.com>
7680
7681 * util/grub.d/10_linux.in (prefix): Define.
7682 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
7683
44cb1ec8 76842008-01-13 Pavel Roskin <proski@gnu.org>
7685
7686 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
7687 grub_errno if no errors have been detected.
7688
1eb8c802 76892008-01-12 Robert Millan <rmh@aybabtu.com>
7690
7691 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
7692 (grub_util_get_dev_abstraction): New function prototype.
7693
7694 * util/getroot.c: Include `<grub/util/getroot.h>'
7695 (grub_util_get_grub_dev): Move detection of abstraction type to ...
7696 (grub_util_get_dev_abstraction): ... here (new function).
7697
7698 * util/grub-probe.c: Convert PRINT_* to an enum. Add
7699 `PRINT_ABSTRACTION'.
7700 (probe): Probe for abstraction type when requested.
7701 (main): Understand `--target=abstraction'.
7702
7703 * util/i386/efi/grub-install.in: Add abstraction module to core
7704 image when it is found to be necessary.
7705 * util/i386/pc/grub-install.in: Likewise.
7706 * util/powerpc/ieee1275/grub-install.in: Likewise.
7707
7708 * util/update-grub_lib.in (font_path): Return system path without
7709 converting to GRUB path.
7710 * util/update-grub.in: Convert system path returned by font_path()
7711 to a GRUB path. Use `grub-probe -t abstraction' to determine what
7712 abstraction module is needed for loading fonts (if any). Export
7713 that as `GRUB_PRELOAD_MODULES'.
7714 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
7715 insmod commands).
7716
52bd3de9 77172008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
7718
7719 Remove some unused code from reiserfs.
f19dbdb7 7720
52bd3de9 7721 * fs/reiserfs.c (struct grub_reiserfs_key)
7722 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
7723 (struct grub_reiserfs_node_body): Removed.
7724 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7725 Likewise.
7726 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7727 Likewise.
7728 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7729 Likewise.
7730 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
7731 Likewise.
7732 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
7733 Likewise.
7734 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
7735 Likewise.
7736 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7737 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7738 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
7739
2f80039d 77402008-01-10 Robert Millan <rmh@aybabtu.com>
7741
7742 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
7743 Determines if a file is garbage left by packaging systems, etc.
7744 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
7745 for processing /etc/grub.d scripts.
7746 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
7747 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
7748 as a condition for processing Linux images.
7749
87888032 77502008-01-10 Pavel Roskin <proski@gnu.org>
7751
7752 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
7753 to compile reiserfs.c on PowerPC.
7754
7e54fced 77552008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 7756
7757 * kern/device.c (grub_device_iterate): Do not abort device iteration
7758 when one of the devices cannot be opened.
7759 * kern/disk.c (grub_disk_open): Do not account previous failures of
7760 unrelated functions when grub_errno is checked for.
7761
5aa541e6 77622008-01-08 Robert Millan <rmh@aybabtu.com>
7763
7764 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
7765 `! grub_linux_is_bzimage', change order of address comparison to make
7766 it more intuitive, and improve "too big zImage" error message.
7767
7076340d 77682008-01-08 Robert Millan <rmh@aybabtu.com>
7769
7770 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
7771 `$(update-grub_DATA)'.
7772 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
7773 targets.
7774
9ca70333 77752008-01-07 Robert Millan <rmh@aybabtu.com>
7776
7777 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
7778 which instruction is modified by grub-setup during installation
7779 (since it wasn't obvious by only looking at this file).
7780
38ccf575 77812008-01-07 Robert Millan <rmh@aybabtu.com>
7782
7783 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
7784 listing actual TODO items.
7785
f5db4291 77862008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7787
868967cf 7788 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
7789 correctly.
7790 (grub_reiserfs_get_key_offset): Likewise.
7791 (grub_reiserfs_set_key_offset): Likewise.
7792 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 7793 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 7794
7795 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
7796 better to remove the bitfield version completely.
f19dbdb7 7797
868967cf 77982008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 7799
f5db4291 7800 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
7801 allocated from the heap, due to the fshelp implementation.
7802 (grub_reiserfs_dir): Free NODE, due to the same reason.
7803
492e6d9d 78042008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
7805
7806 Mostly from Vincent Pelletier:
f19dbdb7 7807
492e6d9d 7808 * fs/reiserfs.c: New file.
f19dbdb7 7809
492e6d9d 7810 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
7811 (reiserfs_mod_SOURCES): New variable.
7812 (reiserfs_mod_CFLAGS): Likewise.
7813 (reiserfs_mod_LDFLAGS): Likewise.
7814
7815 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
7816 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
7817 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
7818 normal/color.c.
7819
9ce3e7c1 78202008-01-06 Robert Millan <rmh@aybabtu.com>
7821
7822 * normal/color.c: Remove `<grub/env.h>'.
7823
f3b58148 78242008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
7825
7826 * include/grub/normal.h: Include <grub/env.h>.
7827
7ac3bcfa 78282008-01-05 Robert Millan <rmh@aybabtu.com>
7829
7830 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
7831 usage example with `(hd0,1)'.
fb358190 7832 Reported by Samuel Thibault.
7ac3bcfa 7833
c8ee99d7 78342008-01-05 Robert Millan <rmh@aybabtu.com>
7835
7836 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
7837 (grub_linux_boot_zimage): Rename to ...
7838 (grub_linux_boot): ... this.
7839 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
7840 (grub_linux_boot_zimage): Conditionalize zImage copy.
7841
7842 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
7843 (grub_linux_boot_bzimage): Remove prototype.
7844 (grub_linux_boot_zimage): Rename to ...
7845 (grub_linux_boot): ... this.
7846
7847 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
7848 (grub_linux_boot): Remove function.
7849
0ece25b1 78502008-01-05 Robert Millan <rmh@aybabtu.com>
7851
7852 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
7853 (grub_env_write_color_highlight): Likewise.
7854 (grub_wait_after_message): Likewise.
7855
7856 * normal/color.c: New file.
7857
7858 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7859 (normal_mod_DEPENDENCIES): Likewise.
7860
7861 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7862 (normal_mod_DEPENDENCIES): Likewise.
7863
7864 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7865 (normal_mod_DEPENDENCIES): Likewise.
7866
7867 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
7868 (normal_mod_DEPENDENCIES): Likewise.
7869
7870 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
7871 for waiting after a message is printed.
7872 * normal/main.c (read_config_file): Likewise.
7873 (grub_normal_init): Register grub_env_write_color_normal() and
7874 grub_env_write_color_highlight() hooks. Mark `color_normal' and
7875 `color_highlight' variables as global.
7876
7877 * normal/menu.c (grub_wait_after_message): New function.
7878 (grub_color_menu_normal): New variable. Replaces ...
7879 (GRUB_COLOR_MENU_NORMAL): ... this macro.
7880 (grub_color_menu_highlight): New variable. Replaces ...
7881 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
7882 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
7883 `GRUB_TERM_COLOR_STANDARD'.
7884 (print_message): Use `grub_setcolorstate' to reload colors. Rename
7885 `normal_code' and `highlight_code' to `old_color_normal' and
7886 `old_color_highlight', respectively.
7887 (grub_menu_init_page): Update colors when drawing the menu, based on
7888 `menu_color_normal' and `menu_color_highlight' variables.
7889 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
7890 a message is printed.
7891
182dd4e5 78922008-01-05 Robert Millan <rmh@aybabtu.com>
7893
7894 * kern/env.c (grub_env_context_open): Propagate hooks for global
7895 variables to new context.
7896
7897 * kern/main.c (grub_set_root_dev): Export `root' variable.
7898
ddf8f6ad 78992008-01-05 Robert Millan <rmh@aybabtu.com>
7900
7901 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 7902 discs unconditionally, since udev and others have options to provide
ddf8f6ad 7903 them.
7904
d8b43d9b 79052008-01-05 Robert Millan <rmh@aybabtu.com>
7906
7907 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
7908
2bff2de3 79092008-01-04 Christian Franke <franke@computer.org>
7910
7911 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
7912 of eisa_mmap.
7913
97eab917 79142008-01-03 Pavel Roskin <proski@gnu.org>
7915
7916 * kern/i386/linuxbios/init.c: Put "void" to all function
7917 declarations with no arguments.
7918 * kern/powerpc/ieee1275/init.c: Likewise.
7919 * term/i386/pc/at_keyboard.c: Likewise.
7920 * term/i386/pc/vga_text.c: Likewise.
7921 * util/grub-mkdevicemap.c: Likewise.
7922
b9416d00 79232008-01-02 Robert Millan <rmh@aybabtu.com>
7924
7925 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
7926 message when loaded image is out of bounds.
7927 (grub_multiboot_load_elf64): Likewise.
7928
92695df9 79292008-01-02 Pavel Roskin <proski@gnu.org>
7930
7931 * util/grub.d/10_linux.in: Try version without ".old" when
7932 looking for initrd. It's better to use initrd from the newer
7933 kernel of the same version than no initrd at all.
7934
d98d9cad 79352008-01-01 Robert Millan <rmh@aybabtu.com>
7936
7937 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
7938
dbfdce36 79392008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
7940
f19dbdb7 7941 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 7942 grub_video_get_active_render_target.
7943 (grub_video_adapter): Added unmap_color and get_active_render_target.
7944
f19dbdb7 7945 * video/video.c: Added grub_video_unmap_color and
dbfdce36 7946 grub_video_get_active_render_target.
7947 (grub_video_get_info): Changed method to accept NULL pointer as an
7948 argument to allow detection of active video adapter.
7949
7950 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
7951 grub_video_vbe_unmap_color_int.
7952 Added grub_video_vbe_unmap_color and
7953 grub_video_vbe_get_active_render_target.
7954 (grub_video_vbe_adapter): Added unmap_color and
7955 get_active_render_target.
7956
f19dbdb7 7957 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 7958 with grub_video_vbe_unmap_color_int.
7959
7960 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
7961 (DEFAULT_NORMAL_COLOR): Likewise.
7962 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
7963 (DEFAULT_FG_COLOR): Removed.
7964 (DEFAULT_BG_COLOR): Likewise.
7965 (DEFAULT_CURSOR_COLOR): Changed value.
7966 (grub_virtual_screen): Added standard_color_setting,
7967 normal_color_setting, highlight_color_setting and term_color.
7968 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
7969 (bitmap_width): Added.
7970 (bitmap_height): Likewise.
7971 (bitmap): Likewise.
7972 (set_term_color): Likewise.
7973 (grub_virtual_screen_setup): Changed to use new terminal coloring
7974 settings.
7975 (grub_gfxterm_init): Added init for bitmap.
7976 (grub_gfxterm_fini): Added destroy for bitmap.
7977 (redraw_screen_rect): Updated to use background bitmap and new
7978 terminal coloring.
7979 (scroll_up): Added optimization for case when there is no bitmap.
7980 (grub_gfxterm_cls): Fixed to use correct background color.
7981 (grub_virtual_screen_setcolorstate): Changed to use new terminal
7982 coloring.
7983 (grub_virtual_screen_setcolor): Likewise.
7984 (grub_virtual_screen_getcolor): Added.
7985 (grub_gfxterm_background_image_cmd): Likewise.
7986 (grub_video_term): Added setcolor and getcolor.
7987 (MOD_INIT): Added registration of background_image command.
7988 (MOD_TERM): Added unregistration for background_image command.
7989
c3c20931 79902007-12-30 Pavel Roskin <proski@gnu.org>
7991
7992 * loader/multiboot_loader.c: Fix multiboot command
7993 unregistration. Fix all typos in the word "multiboot".
7994
df266716 79952007-12-29 Pavel Roskin <proski@gnu.org>
94239199 7996
7997 * util/grub.d/10_linux.in: Refactor search for initrd. Add
7998 support for initrd names used in Fedora.
7999
fc6e896c 80002007-12-26 Bean <bean123ch@gmail.com>
8001
8002 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
8003 (cpio_mod_SOURCES): New variable.
8004 (cpio_mod_CFLAGS): Likewise.
8005 (cpio_mod_LDFLAGS): Likewise.
8006
8007 * fs/cpio.c: New file.
8008
8009 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
8010
8011 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8012
8013 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8014
8015 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8016
533110ad 80172007-12-25 Robert Millan <rmh@aybabtu.com>
8018
8019 * include/grub/term.h (struct grub_term): Add `getcolor' function.
8020 (grub_getcolor): New function.
8021
8022 * kern/term.c (grub_getcolor): New function.
8023 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
8024 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
8025 (print_entry): Set normal and highlight colors to
8026 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
8027 respectively, before printing and restore them to old
8028 values afterwards.
8029 (grub_menu_init_page): Likewise. Fill an additional colored space
8030 that would otherwise be left blank.
8031
8032 * term/efi/console.c (grub_console_getcolor): New function.
8033 (struct grub_console_term.getcolor): New variable.
8034 * term/i386/pc/console.c (grub_console_getcolor): New function.
8035 (struct grub_console_term.getcolor): New variable.
8036 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
8037 (struct grub_console_term.getcolor): New variable.
8038
8039 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
8040 (struct grub_console_term.setcolor): Remove variable.
8041 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
8042 (struct grub_console_term.setcolor): Remove variable.
8043 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
8044 (struct grub_console_term.setcolor): Remove variable.
8045 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
8046 (struct grub_console_term.setcolor): Remove variable.
8047
4931827f 80482007-12-25 Robert Millan <rmh@aybabtu.com>
8049
8050 * configure.ac: Search for possible unifont.hex locations, and
8051 define UNIFONT_HEX if found.
8052
8053 * Makefile.in (UNIFONT_HEX): Define variable.
8054 (DATA): Rename to ...
8055 (PKGLIB): ... this. Update all users.
8056 (PKGDATA): New variable.
8057 (pkgdata_IMAGES): Rename to ...
8058 (pkglib_IMAGES): ... this. Update all users.
8059 (pkgdata_MODULES): Rename to ...
8060 (pkglib_MODULES): ... this. Update all users.
8061 (pkgdata_PROGRAMS): Rename to ...
8062 (pkglib_PROGRAMS): ... this. Update all users.
8063 (pkgdata_DATA): Rename to ...
8064 (pkglib_DATA): ... this. Update all users.
8065 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
8066 (unicode.pff, ascii.pff): New rules.
8067 (all-local): Add `$(PKGDATA)' dependency.
8068 (install-local): Process `$(PKGDATA)'.
8069
8070 * util/update-grub_lib.in (font_path): Search for *.pff files in
8071 a few more locations, including `${pkgdata}'.
8072
57e57e31 80732007-12-23 Robert Millan <rmh@aybabtu.com>
8074
8075 Patch from Bean <bean123ch@gmail.com>:
8076 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
8077 `size'.
8078
4bc72aa9 80792007-12-21 Bean <bean123ch@gmail.com>
8080
8081 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
8082 (ntfscomp_mod_SOURCES): New variable.
8083 (ntfscomp_mod_CFLAGS): Likewise.
8084 (ntfscomp_mod_LDFLAGS): Likewise.
8085
8086 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
8087 (grub_probe_SOURCES): Likewise.
8088 (grub_emu_SOURCES): Likewise.
8089
8090 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8091 (grub_emu_SOURCES): Likewise.
8092
8093 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8094 (grub_emu_SOURCES): Likewise.
8095
8096 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
8097 (grub_emu_SOURCES): Likewise.
8098
8099 * fs/ntfs.c (grub_ntfscomp_func): New variable.
8100 (read_run_list): Renamed to grub_ntfs_read_run_list.
8101 (decomp_nextvcn): Moved to ntfscomp.c.
8102 (decomp_getch): Likewise.
8103 (decomp_get16): Likewise.
8104 (decomp_block): Likewise.
8105 (read_block): Likewise.
8106 (read_data): Partially moved to ntfscomp.c.
8107 (fixup): Change unsigned to grub_uint16_t.
8108 (read_mft): Change unsigned long to grub_uint32_t.
8109 (read_attr): Likewise.
8110 (read_data): Likewise.
8111 (read_run_data): Likewise.
8112 (read_run_list): Likewise.
8113 (read_mft): Likewise.
8114
8115 * fs/ntfscomp.c: New file.
8116
8117 * include/grub/ntfs.h: New file.
8118
af680a87 81192007-12-16 Robert Millan <rmh@aybabtu.com>
8120
8121 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
8122 IDE disk check, since Linux is known to support 20 IDE disks.
8123 Reported by Colin Watson.
8124
84be7599 81252007-12-15 Bean <bean123ch@gmail.com>
8126
8127 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
8128 (lnxboot_img_SOURCES): New variable.
8129 (lnxboot_img_ASFLAGS): Likewise.
8130 (lnxboot_img_LDFLAGS): Likewise.
8131
8132 * boot/i386/pc/lnxboot.S: New file.
8133
6af9db01 81342007-11-24 Pavel Roskin <proski@gnu.org>
8135
8136 * configure.ac: Test if '--build-id=none' is supported by the
8137 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
8138 objcopy to generate incorrect binary files (binutils
8139 2.17.50.0.18-1 as shipped by Fedora 8).
8140 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
8141 linking, so that build ID doesn't break the test.
8142
7361cfe6 81432007-11-24 Pavel Roskin <proski@gnu.org>
8144
8145 * include/grub/i386/time.h: use "void" in the argument list
8146 of grub_cpu_idle().
8147 * include/grub/powerpc/time.h: Likewise.
8148 * include/grub/sparc64/time.h: Likewise.
8149
1593e10c 81502007-11-18 Christian Franke <franke@computer.org>
8151
8152 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
8153 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
8154 This fixes the problem that function keys did not work in grub-emu.
8155
3b8db1a8 81562007-11-18 Christian Franke <franke@computer.org>
8157
8158 * disk/host.c (grub_host_open): Remove attribute unused from
8159 name parameter. Add check for "host". This fixes the problem
8160 that grub-emu does not find partitions.
8161
2e29408d 81622007-11-18 Christian Franke <franke@computer.org>
8163
8164 * util/hostfs.c (is_dir): New function.
8165 (grub_hostfs_dir): Handle missing dirent.d_type case.
8166 (grub_hostfs_read): Add missing fseek().
8167 (grub_hostfs_label): Clear label pointer. This fixes a crash
8168 of grub-emu on "ls (host)".
8169
398cd047 81702007-11-18 Christian Franke <franke@computer.org>
8171
8172 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
8173 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
8174 to 64 bit boundary by default.
8175
c405c391 81762007-11-18 Bean <bean123ch@gmail.com>
8177
8178 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
8179 (hexdump_mod_SOURCES): New variable.
8180 (hexdump_mod_CFLAGS): Likewise.
8181 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 8182
c405c391 8183 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8184
8185 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8186
8187 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8188
8189 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
8190
8191 * include/grub/hexdump.h: New file.
8192
8193 * commands/hexdump.c: New file.
8194
5cced7fd 81952007-11-10 Robert Millan <rmh@aybabtu.com>
8196
8197 * commands/i386/pc/play.c (beep_off): Switch order of arguments
8198 in grub_outb() calls.
8199 (beep_on): Likewise.
8200
8b714eb0 82012007-11-10 Christian Franke <franke@computer.org>
8202
8203 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
8204 (grub_menu_run): Likewise.
8205
ce0f1839 82062007-11-10 Robert Millan <rmh@aybabtu.com>
8207
8208 * include/grub/i386/efi/machine.h: New file.
8209 * include/grub/i386/linuxbios/machine.h: Likewise.
8210 * include/grub/i386/pc/machine.h: Likewise.
8211 * include/grub/powerpc/ieee1275/machine.h: Likewise.
8212 * include/grub/sparc64/ieee1275/machine.h: Likewise.
8213
8214 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
8215 (serial_hw_io_addr): New variable.
8216 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
8217 instead of `(unsigned short *) 0x400'.
8218
270c237d 82192007-11-10 Bean <bean123ch@gmail.com>
8220
8221 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
8222
a87783bf 82232007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8224
8225 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
8226 (vga_mod_SOURCES): Added.
8227 (vga_mod_CFLAGS): Likewise.
8228 (vga_mod_LDFLAGS): Likewise.
8229
8230 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
8231 grub_outb() calls.
8232 (set_map_mask): Likewise.
8233 (set_read_map): Likewise.
8234 (set_read_address): Likewise.
8235 (vga_font): Removed variable.
8236 (get_vga_glyph): Removed function.
8237 (invalidate_char): Likewise.
8238 (write_char): Changed to use grub_font_get_glyph() for font
8239 information.
8240 (grub_vga_putchar): Likewise.
8241 (grub_vga_getcharwidth): Likewise.
8242
6433b448 82432007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
8244
8245 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
8246 flags.
8247 (pxeboot_img_LDFLAGS): Likewise.
8248 (diskboot_img_LDFLAGS): Likewise.
8249 (kernel_img_LDFLAGS): Likewise.
8250
49178511 82512007-11-06 Robert Millan <rmh@aybabtu.com>
8252
8253 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
8254 in grub_outb() calls.
8255 (serial_hw_init): Likewise.
8256
53b052de 82572007-11-05 Robert Millan <rmh@aybabtu.com>
8258
8259 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
8260 spaces. Skip non-regular files.
8261
5ab33bba 82622007-11-05 Robert Millan <rmh@aybabtu.com>
8263
8264 * kern/disk.c (grub_disk_firmware_fini)
8265 (grub_disk_firmware_is_tainted): New variables.
8266
8267 * include/grub/disk.h (grub_disk_firmware_fini)
8268 (grub_disk_firmware_is_tainted): Likewise.
8269
8270 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
8271 (grub_disk_biosdisk_fini): ... to here.
8272 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
8273 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
8274 is set. Register grub_disk_biosdisk_fini() in
8275 `grub_disk_firmware_fini'.
8276
8277 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
8278 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
8279 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
8280 to finish existing firmware disk interface.
8281
8282 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
8283 (ata_mod_SOURCES): New variable.
8284 (ata_mod_CFLAGS): Likewise.
8285 (ata_mod_LDFLAGS): Likewise.
8286
0149ab7c 82872007-11-05 Robert Millan <rmh@aybabtu.com>
8288
8289 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
8290 (grub_ata_wait): Reimplement using grub_millisleep().
8291
8292 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
8293 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
8294
be7ac41e 82952007-11-03 Marco Gerards <marco@gnu.org>
8296
8297 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
8298 (CRTC_ADDR_PORT): New macro.
8299 (CRTC_DATA_PORT): Likewise.
8300 (CRTC_CURSOR): Likewise.
8301 (CRTC_CURSOR_ADDR_HIGH): Likewise.
8302 (CRTC_CURSOR_ADDR_LOW): Likewise.
8303 (update_cursor): New function.
8304 (grub_console_real_putchar): Call `update_cursor'.
8305 (grub_console_gotoxy): Likewise.
8306 (grub_console_cls): Set the default color when clearing the
8307 screen.
8308 (grub_console_setcursor): Implemented.
8309
bb06ab2e 83102007-11-03 Marco Gerards <marco@gnu.org>
8311
8312 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
8313 become activate.
8314 (grub_ata_pio_write): Likewise.
8315
8316 (grub_atapi_identify): Wait after issuing an ATA command.
8317 (grub_atapi_packet): Likewise.
8318 (grub_ata_identify): Likewise.
8319 (grub_ata_readwrite): Likewise.
8320
cf8f780b 83212007-11-03 Marco Gerards <marco@gnu.org>
8322
8323 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
8324 (grub_ata_pio_write): Likewise.
8325 (grub_ata_readwrite): Use `grub_error', instead of
8326 returning `grub_errno'.
8327
ed649e54 83282007-11-03 Marco Gerards <marco@gnu.org>
8329
8330 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
8331 grub_ata_pio_write once for every single sector, instead of for
8332 multiple sectors.
8333
ca25d8f0 83342007-10-31 Robert Millan <rmh@aybabtu.com>
8335
8336 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
8337
8338 * conf/i386-linuxbios.rmk: New file.
8339
8340 * kern/i386/pc/hardware.c: Likewise.
8341 * term/i386/pc/at_keyboard.c: Likewise.
8342 * term/i386/pc/vga_text.c: Likewise.
8343
8344 * include/grub/i386/linuxbios/boot.h: Likewise.
8345 * include/grub/i386/linuxbios/console.h: Likewise.
8346 * include/grub/i386/linuxbios/init.h: Likewise.
8347 * include/grub/i386/linuxbios/kernel.h: Likewise.
8348 * include/grub/i386/linuxbios/loader.h: Likewise.
8349 * include/grub/i386/linuxbios/memory.h: Likewise.
8350 * include/grub/i386/linuxbios/serial.h: Likewise.
8351 * include/grub/i386/linuxbios/time.h: Likewise.
8352
8353 * kern/i386/linuxbios/init.c: Likewise.
8354 * kern/i386/linuxbios/startup.S: Likewise.
8355 * kern/i386/linuxbios/table.c: Likewise.
8356
e911ecc1 83572007-10-31 Marco Gerards <marco@gnu.org>
8358
8359 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
8360 (ata_mod_SOURCES): New variable.
8361 (ata_mod_CFLAGS): Likewise.
8362 (ata_mod_LDFLAGS): Likewise.
8363
8364 * disk/ata.c: New file.
8365
8366 * include/grub/disk.h (grub_disk_dev_id): Add
8367 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 8368
7f66d0e0 83692007-10-31 Robert Millan <rmh@aybabtu.com>
8370
8371 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
8372 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
8373
8374 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
8375 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
8376
8377 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
8378 `<grub/types.h>'.
8379
8380 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
8381
5cd7dd46 83822007-10-27 Robert Millan <rmh@aybabtu.com>
8383
3236ca65 8384 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 8385
2ebfc90f 83862007-10-22 Robert Millan <rmh@aybabtu.com>
8387
8388 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
8389 `"../realmode.S"'.
8390 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
8391
73fcb0f3 83922007-10-22 Robert Millan <rmh@aybabtu.com>
8393
8394 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
8395 (pkgdata_MODULES): Add `biosdisk.mod'.
8396 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
8397 variables.
8398
8399 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
8400 (grub_biosdisk_init): Replace with ...
8401 (GRUB_MOD_INIT(biosdisk)): ... this.
8402 (grub_biosdisk_fini): Replace with ...
8403 (GRUB_MOD_FINI(biosdisk)): ... this.
8404
8405 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
8406 (grub_machine_init): Remove call to grub_biosdisk_init().
8407 (grub_machine_fini): Remove call to grub_machine_fini().
8408
8409 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
8410
3381d274 84112007-10-22 Robert Millan <rmh@aybabtu.com>
8412
8413 * include/grub/time.h: New file.
8414 * include/grub/i386/time.h: Likewise.
8415 * include/grub/powerpc/time.h: Likewise.
8416 * include/grub/sparc64/time.h: Likewise.
8417
8418 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
8419 instances to ...
8420 (KERNEL_MACHINE_TIME_HEADER): ... this.
8421 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8422 instances to ...
8423 (KERNEL_MACHINE_TIME_HEADER): ... this.
8424 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
8425 instances to ...
8426 (KERNEL_MACHINE_TIME_HEADER): ... this.
8427
8428 * kern/i386/efi/init.c: Include `<grub/time.h>'.
8429 (grub_millisleep): New function.
8430 * kern/i386/pc/init.c: Include `<grub/time.h>'.
8431 (grub_millisleep): New function.
8432 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
8433 Remove `grub/machine/time.h' include.
8434 (grub_millisleep): New function.
8435 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
8436 Remove `grub/machine/time.h' include.
8437 (grub_millisleep): New function.
8438
8439 * include/grub/misc.h (grub_div_roundup): New function.
8440
8441 * kern/misc.c: Include `<grub/time.h>'.
8442 (grub_millisleep_generic): New function.
8443
8444 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
8445 Add `time.h'.
8446 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
8447 Add `time.h'.
8448 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
8449 `machine/time.h'. Add `time.h'.
8450 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8451
a39a0312 84522007-10-21 Robert Millan <rmh@aybabtu.com>
8453
8454 * include/grub/misc.h (grub_max): New function.
8455
2aad70e2 84562007-10-21 Robert Millan <rmh@aybabtu.com>
8457
8458 * util/misc.c (grub_util_info): Call fflush() before returning.
8459
54b71c4b 84602007-10-20 Robert Millan <rmh@aybabtu.com>
8461
8462 * genmk.rb (Image): Copy `extra_flags' from here ...
8463 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
8464
8465 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
8466 to `argc' and `args' arguments.
8467
a979f513 84682007-10-17 Robert Millan <rmh@aybabtu.com>
8469
8470 * kern/i386/loader.S: New file.
8471
8472 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
8473 * kern/i386/loader.S (grub_linux_prot_size)... to here.
8474 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
8475 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
8476 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
8477 * kern/i386/loader.S (grub_linux_real_addr)... to here.
8478 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
8479 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
8480 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
8481 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
8482 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
8483 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
8484 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
8485 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
8486
8487 * kern/i386/realmode.S: New file.
8488
8489 * kern/i386/pc/startup.S (protstack): Moved from here ...
8490 * kern/i386/realmode.S (protstack)... to here.
8491 * kern/i386/pc/startup.S (gdt): Moved from here ...
8492 * kern/i386/realmode.S (gdt)... to here.
8493 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
8494 * kern/i386/realmode.S (prot_to_real)... to here.
8495
8496 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
8497 `kern/i386/realmode.S'.
8498
825fc8fd 84992007-10-17 Robert Millan <rmh@aybabtu.com>
8500
8501 * include/grub/i386/loader.h: New file.
8502
8503 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
8504 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8505 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8506 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8507 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
8508 * include/grub/i386/loader.h (grub_linux_prot_size)
8509 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
8510 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
8511 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
8512 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
8513
8514 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
8515
e179b2f4 85162007-10-15 Robert Millan <rmh@aybabtu.com>
8517
8518 * normal/misc.c (grub_normal_print_device_info): Do not probe for
8519 filesystem when dev->disk is unset.
8520 Do probe for filesystem even when dev->disk->has_partitions is set.
8521 In case a filesystem is found, always report it.
8522 In case it isn't, if dev->disk->has_partitions is set, report that
8523 a partition table was found instead of reporting that no filesystem
8524 could be identified.
8525
5db82af6 85262007-10-12 Robert Millan <rmh@aybabtu.com>
8527
8528 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
8529 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
8530
68f6ac74 8531 * include/grub/types.h (grub_host_to_target16): New macro.
8532 (grub_host_to_target32): Likewise.
8533 (grub_host_to_target64): Likewise.
8534 (grub_target_to_host16): Likewise.
8535 (grub_target_to_host32): Likewise.
8536 (grub_target_to_host64): Likewise.
5db82af6 8537
8538 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8539 Renamed from to ...
8540 (GRUB_MOD_ALIGN): ...this. Update all users.
8541
68f6ac74 8542 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
8543 grub_host_to_target32.
8544 Replace grub_be_to_cpu32 with grub_target_to_host32.
8545 (load_modules): Likewise.
8546 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
8547 Replace grub_be_to_cpu32 with grub_target_to_host32.
8548 Replace grub_cpu_to_be16 with grub_host_to_target16.
8549 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 8550
3cf497cc 85512007-10-12 Robert Millan <rmh@aybabtu.com>
8552
8553 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
8554 * util/elf/grub-mkimage.c: ... here.
8555
8556 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
8557 `util/powerpc/ieee1275/grub-mkimage.c'.
8558
c8cc3692 85592007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 8560
c8cc3692 8561 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
8562 and make it easier to figure out.
8563 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
8564 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
8565 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
8566 leave us with less than HEAP_MIN_SIZE total heap.
8567 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 8568
5c58b791 85692007-10-03 Robert Millan <rmh@aybabtu.com>
8570
8571 * include/grub/i386/io.h: New file.
8572 * commands/i386/pc/play.c (inb): Removed.
8573 (outb): Removed.
8574 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8575 with grub_outb().
afcd2ef8 8576 * term/i386/pc/serial.c (inb): Removed.
8577 (outb): Removed.
8578 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8579 with grub_outb().
8580 * term/i386/pc/vga.c (inb): Removed.
8581 (outb): Removed.
8582 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
8583 with grub_outb().
5c58b791 8584
1a477ed6 85852007-10-02 Robert Millan <rmh@aybabtu.com>
8586
8587 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
8588 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8589 Reported by Marcin Kurek.
8590
6b5d80fa 85912007-09-07 Robert Millan <rmh@aybabtu.com>
8592
8593 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
8594 SmartFirmware version updates (as released by Sven Luther), and avoid
8595 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
8596 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
8597 known broken.
8598
5618afbf 85992007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8600
8601 From Hitoshi Ozeki:
8602 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
8603 when merging two regions.
8604
6139dcd9 86052007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
8606
508e39ee 8607 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
8608 * normal/completion.c (grub_normal_do_completion): Likewise.
8609 Reported by Hitoshi Ozeki.
8610
86112007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 8612
6139dcd9 8613 Do not use devices at boot in chainloading.
f19dbdb7 8614
6139dcd9 8615 * loader/i386/pc/chainloader.c (boot_drive): New variable.
8616 (boot_part_addr): Likewise.
8617 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
8618 with BOOT_DRIVE and BOOT_PART_ADDR.
8619 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
8620 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
8621
38da6516 86222007-08-29 Robert Millan <rmh@aybabtu.com>
8623
8624 Patch from Simon Peter <dn.tlp@gmx.net>:
8625 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
8626 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
8627 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
8628 util/i386/pc/grub-setup.c_DEPENDENCIES.
8629 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
8630 util/grub-probe.c_DEPENDENCIES.
8631 * conf/powerpc-ieee1275.rmk: Likewise.
8632
29d0928c 86332007-08-28 Robert Millan <rmh@aybabtu.com>
8634
8635 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
8636 to tell grub-mkdevicemap how to name devices.
8637 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
8638 feature).
8639
8640 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
8641 util/i386/get_disk_name.c.
8642 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
8643 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
8644 util/ieee1275/get_disk_name.c.
8645
8646 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
8647
8648 * DISTLIST: Add util/i386/get_disk_name.c and
8649 util/ieee1275/get_disk_name.c.
8650
8651 * util/grub-mkdevicemap.c: Replace device naming logic with
8652 grub_util_get_disk_name() calls.
8653
5a0d3cca 86542007-08-20 Robert Millan <rmh@aybabtu.com>
8655
8656 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
8657 (so that it works for both plural and singular quantities).
8658
8b72db2f 86592007-08-05 Robert Millan <rmh@aybabtu.com>
8660
8661 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
8662 so that [xz] isn't taken into account when determining order.
8663
352466bf 86642007-08-02 Marco Gerards <marco@gnu.org>
8665
8666 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
8667 `include/multiboot2.h', `include/grub/elfload.h',
8668 `include/multiboot.h', `include/grub/multiboot.h',
8669 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
8670 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
8671 `kern/elf.c', `loader/multiboot_loader.c',
8672 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
8673 `loader/i386/pc/multiboot2.c',
8674 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
8675 `util/i386/pc/grub-mkrescue.in'. Remove
8676 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
8677 `include/grub/i386/pc/util/biosdisk.h' and
8678 `include/grub/powerpc/ieee1275/multiboot.h'.
8679
8f096014 86802007-08-02 Bean <bean123ch@gmail.com>
8681
8682 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
8683 (ntfs_mod_SOURCES): New variable.
8684 (ntfs_mod_CFLAGS): Likewise.
8685 (ntfs_mod_LDFLAGS): Likewise.
8686
8687 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
8688 (grub_probe_SOURCES): Likewise.
8689 (grub_emu_SOURCES): Likewise.
8690
8691 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8692 (grub_emu_SOURCES): Likewise.
8693
8694 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
8695 (grub_emu_SOURCES): Likewise.
f19dbdb7 8696
8f096014 8697 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
8698
8699 * fs/ntfs.c: New file.
8700
9959f7db 87012007-08-02 Bean <bean123ch@gmail.com>
8702
8703 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
8704
8705 * file.h (grub_file): Likewise.
8706
8707 * fshelp.h (grub_fshelp_read_file): Likewise.
8708
8709 * util/i386/pc/grub-setup.c (setup): Likewise.
8710 (save_first_sector): Likewise.
8711 (save_blocklists): Likewise.
f19dbdb7 8712
9959f7db 8713 * fs/affs.c (grub_affs_read_file): Likewise.
8714
8715 * fs/ext2.c (grub_ext2_read_file): Likewise.
8716
8717 * fs/fat.c (grub_fat_read_data): Likewise.
8718
8719 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
8720
8721 * fs/hfs.c (grub_hfs_read_file): Likewise.
8722
8723 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8724
8725 * fs/jfs.c (grub_jfs_read_file): Likewise.
8726
8727 * fs/minix.c (grub_minix_read_file): Likewise.
8728
8729 * fs/sfs.c (grub_sfs_read_file): Likewise.
8730
8731 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 8732
9959f7db 8733 * fs/xfs.c (grub_xfs_read_file): Likewise.
8734
8735 * command/blocklist.c (read_blocklist): Likewise.
8736 (print_blocklist): Likewise.
8737
0a203f83 87382007-08-02 Marco Gerards <marco@gnu.org>
8739
8740 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
8741 `util/hostfs.c'.
8742
8743 * disk/host.c: New file.
8744
8745 * util/hostfs.c: Likewise.
8746
8747 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
8748 return `GRUB_ERR_BAD_FS'.
8749 * fs/sfs.c (grub_sfs_mount): Likewise.
8750 * fs/xfs.c (grub_xfs_mount): Likewise.
8751
8752 * include/grub/disk.h (enum grub_disk_dev_id): Add
8753 `GRUB_DISK_DEVICE_HOST_ID'.
8754
8755 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
8756
e5dfe777 87572007-07-24 Jerone Young <jerone@gmail.com>
8758
f19dbdb7 8759 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 8760 modules for compilation.
8761 * conf/powerpc-ieee1275.rmk: Likewise.
8762
8763 * include/multiboot.h: Move multiboot definitions to one file. Rename
8764 many definitions to not get grub specific.
8765 * include/multiboot2.h: Create header with multiboot 2 definitions.
8766 * include/grub/multiboot.h: Header for grub specific function
8767 prototypes and definitions.
8768 * include/grub/multiboot2.h: Likewise.
8769 * include/grub/multiboot_loader.h: Likewise.
8770 * include/grub/i386/pc/multiboot.h: Removed.
8771 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
8772
8773 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
8774 and 2 to allow for one multiboot and module commands.
8775 * loader/multiboot2.c: Add multiboot2 functionality.
8776 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
8777 and definition names.
8778 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
8779 2 functions.
8780 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
8781 ieee1275 specific multiboot2 code.
8782
8783 * kern/i386/pc/startup.S: Change headers and definition names for
8784 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
8785
daf0f0ba 87862007-07-22 Robert Millan <rmh@aybabtu.com>
8787
8788 * geninitheader.sh: Process file specified in first parameter rather
8789 than hardcoding grub_modules_init.lst.
fe6b695a 8790 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 8791 than hardcoding grub_modules_init.h.
8792
8793 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
8794 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
8795 grub_probe_init.[ch] and grub_setup_init.[ch].
8796
8797 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
8798 grub_modules_init.h with grub_emu_init.h.
8799 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
8800 grub_probe_init.[ch] files.
8801 * conf/i386-efi.rmk: Likewise.
8802 * conf/i386-pc.rmk: Likewise.
8803 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
8804 grub_setup_init.[ch] files.
8805
8806 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
8807 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
8808 to initialize modules rather than a list of hardcoded functions.
8809 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
8810 grub_init_all() to initialize modules rather than a list of hardcoded
8811 functions.
8812
54cdc1cc 88132007-07-22 Robert Millan <rmh@aybabtu.com>
8814
8815 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
8816 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
8817
ad0686cc 88182007-07-22 Robert Millan <rmh@aybabtu.com>
8819
8820 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8821 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
8822 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
8823 flag when running on SmartFirmware.
8824 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
8825 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
8826 was set.
8827
8828 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8829 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
8830 rather than decreasing it.
8831
8832 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
8833 there's not enough space to do it, fail in the same way as when it
8834 can't be done because there are no partitions.
8835
8836 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
8837 when nvsetenv failed.
8838
969c02ec 88392007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8840
8841 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
8842 because this rule is automatically generated.
8843 (grub-mkrescue): Removed for the same reason as above.
8844
5a79f472 88452007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
8846
8847 Migrate to GNU General Public License Version 3.
f19dbdb7 8848
5a79f472 8849 * COPYING: Replaced with the plain text version of GPLv3.
8850
8851 * config.guess: Updated from gnulib.
8852 * config.sub: Likewise.
8853
8854 * geninit.sh: Output a GPLv3 copyright notice.
8855 * geninitheader.sh: Likewise.
8856 * genmodsrc.sh: Likewise.
8857 * gensymlist.sh.in: Likewise.
8858
8859 * boot/i386/pc/boot.S: Upgraded to GPLv3.
8860 * boot/i386/pc/diskboot.S: Likewise.
8861 * boot/i386/pc/pxeboot.S: Likewise.
8862 * commands/blocklist.c: Likewise.
8863 * commands/boot.c: Likewise.
8864 * commands/cat.c: Likewise.
8865 * commands/cmp.c: Likewise.
8866 * commands/configfile.c: Likewise.
8867 * commands/echo.c: Likewise.
8868 * commands/help.c: Likewise.
8869 * commands/ls.c: Likewise.
8870 * commands/search.c: Likewise.
8871 * commands/terminal.c: Likewise.
8872 * commands/test.c: Likewise.
8873 * commands/videotest.c: Likewise.
8874 * commands/i386/cpuid.c: Likewise.
8875 * commands/i386/pc/halt.c: Likewise.
8876 * commands/i386/pc/play.c: Likewise.
8877 * commands/i386/pc/reboot.c: Likewise.
8878 * commands/i386/pc/vbeinfo.c: Likewise.
8879 * commands/i386/pc/vbetest.c: Likewise.
8880 * commands/ieee1275/halt.c: Likewise.
8881 * commands/ieee1275/reboot.c: Likewise.
8882 * commands/ieee1275/suspend.c: Likewise.
8883 * disk/loopback.c: Likewise.
8884 * disk/lvm.c: Likewise.
8885 * disk/raid.c: Likewise.
8886 * disk/efi/efidisk.c: Likewise.
8887 * disk/i386/pc/biosdisk.c: Likewise.
8888 * disk/ieee1275/ofdisk.c: Likewise.
8889 * font/manager.c: Likewise.
8890 * fs/affs.c: Likewise.
8891 * fs/ext2.c: Likewise.
8892 * fs/fat.c: Likewise.
8893 * fs/fshelp.c: Likewise.
8894 * fs/hfs.c: Likewise.
8895 * fs/hfsplus.c: Likewise.
8896 * fs/iso9660.c: Likewise.
8897 * fs/jfs.c: Likewise.
8898 * fs/minix.c: Likewise.
8899 * fs/sfs.c: Likewise.
8900 * fs/ufs.c: Likewise.
8901 * fs/xfs.c: Likewise.
8902 * hello/hello.c: Likewise.
8903 * include/grub/acorn_filecore.h: Likewise.
8904 * include/grub/arg.h: Likewise.
8905 * include/grub/bitmap.h: Likewise.
8906 * include/grub/boot.h: Likewise.
8907 * include/grub/cache.h: Likewise.
8908 * include/grub/device.h: Likewise.
8909 * include/grub/disk.h: Likewise.
8910 * include/grub/dl.h: Likewise.
8911 * include/grub/elfload.h: Likewise.
8912 * include/grub/env.h: Likewise.
8913 * include/grub/err.h: Likewise.
8914 * include/grub/file.h: Likewise.
8915 * include/grub/font.h: Likewise.
8916 * include/grub/fs.h: Likewise.
8917 * include/grub/fshelp.h: Likewise.
8918 * include/grub/gzio.h: Likewise.
8919 * include/grub/hfs.h: Likewise.
8920 * include/grub/kernel.h: Likewise.
8921 * include/grub/loader.h: Likewise.
8922 * include/grub/lvm.h: Likewise.
8923 * include/grub/misc.h: Likewise.
8924 * include/grub/mm.h: Likewise.
8925 * include/grub/net.h: Likewise.
8926 * include/grub/normal.h: Likewise.
8927 * include/grub/parser.h: Likewise.
8928 * include/grub/partition.h: Likewise.
8929 * include/grub/pc_partition.h: Likewise.
8930 * include/grub/raid.h: Likewise.
8931 * include/grub/rescue.h: Likewise.
8932 * include/grub/script.h: Likewise.
8933 * include/grub/setjmp.h: Likewise.
8934 * include/grub/symbol.h: Likewise.
8935 * include/grub/term.h: Likewise.
8936 * include/grub/terminfo.h: Likewise.
8937 * include/grub/tparm.h: Likewise.
8938 * include/grub/types.h: Likewise.
8939 * include/grub/video.h: Likewise.
8940 * include/grub/efi/api.h: Likewise.
8941 * include/grub/efi/chainloader.h: Likewise.
8942 * include/grub/efi/console.h: Likewise.
8943 * include/grub/efi/console_control.h: Likewise.
8944 * include/grub/efi/disk.h: Likewise.
8945 * include/grub/efi/efi.h: Likewise.
8946 * include/grub/efi/pe32.h: Likewise.
8947 * include/grub/efi/time.h: Likewise.
8948 * include/grub/i386/linux.h: Likewise.
8949 * include/grub/i386/setjmp.h: Likewise.
8950 * include/grub/i386/types.h: Likewise.
8951 * include/grub/i386/efi/kernel.h: Likewise.
8952 * include/grub/i386/efi/loader.h: Likewise.
8953 * include/grub/i386/efi/time.h: Likewise.
8954 * include/grub/i386/pc/biosdisk.h: Likewise.
8955 * include/grub/i386/pc/boot.h: Likewise.
8956 * include/grub/i386/pc/chainloader.h: Likewise.
8957 * include/grub/i386/pc/console.h: Likewise.
8958 * include/grub/i386/pc/init.h: Likewise.
8959 * include/grub/i386/pc/kernel.h: Likewise.
8960 * include/grub/i386/pc/loader.h: Likewise.
8961 * include/grub/i386/pc/memory.h: Likewise.
8962 * include/grub/i386/pc/multiboot.h: Likewise.
8963 * include/grub/i386/pc/serial.h: Likewise.
8964 * include/grub/i386/pc/time.h: Likewise.
8965 * include/grub/i386/pc/vbe.h: Likewise.
8966 * include/grub/i386/pc/vbeblit.h: Likewise.
8967 * include/grub/i386/pc/vbefill.h: Likewise.
8968 * include/grub/i386/pc/vbeutil.h: Likewise.
8969 * include/grub/i386/pc/vga.h: Likewise.
8970 * include/grub/ieee1275/ieee1275.h: Likewise.
8971 * include/grub/ieee1275/ofdisk.h: Likewise.
8972 * include/grub/powerpc/libgcc.h: Likewise.
8973 * include/grub/powerpc/setjmp.h: Likewise.
8974 * include/grub/powerpc/types.h: Likewise.
8975 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
8976 * include/grub/powerpc/ieee1275/console.h: Likewise.
8977 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
8978 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
8979 * include/grub/powerpc/ieee1275/loader.h: Likewise.
8980 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
8981 * include/grub/powerpc/ieee1275/time.h: Likewise.
8982 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
8983 * include/grub/sparc64/libgcc.h: Likewise.
8984 * include/grub/sparc64/setjmp.h: Likewise.
8985 * include/grub/sparc64/types.h: Likewise.
8986 * include/grub/sparc64/ieee1275/console.h: Likewise.
8987 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
8988 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
8989 * include/grub/sparc64/ieee1275/time.h: Likewise.
8990 * include/grub/util/biosdisk.h: Likewise.
8991 * include/grub/util/getroot.h: Likewise.
8992 * include/grub/util/lvm.h: Likewise.
8993 * include/grub/util/misc.h: Likewise.
8994 * include/grub/util/raid.h: Likewise.
8995 * include/grub/util/resolve.h: Likewise.
8996 * io/gzio.c: Likewise.
8997 * kern/device.c: Likewise.
8998 * kern/disk.c: Likewise.
8999 * kern/dl.c: Likewise.
9000 * kern/elf.c: Likewise.
9001 * kern/env.c: Likewise.
9002 * kern/err.c: Likewise.
9003 * kern/file.c: Likewise.
9004 * kern/fs.c: Likewise.
9005 * kern/loader.c: Likewise.
9006 * kern/main.c: Likewise.
9007 * kern/misc.c: Likewise.
9008 * kern/mm.c: Likewise.
9009 * kern/parser.c: Likewise.
9010 * kern/partition.c: Likewise.
9011 * kern/rescue.c: Likewise.
9012 * kern/term.c: Likewise.
9013 * kern/efi/efi.c: Likewise.
9014 * kern/efi/init.c: Likewise.
9015 * kern/efi/mm.c: Likewise.
9016 * kern/i386/dl.c: Likewise.
9017 * kern/i386/efi/init.c: Likewise.
9018 * kern/i386/efi/startup.S: Likewise.
9019 * kern/i386/pc/init.c: Likewise.
9020 * kern/i386/pc/lzo1x.S: Likewise.
9021 * kern/i386/pc/startup.S: Likewise.
9022 * kern/ieee1275/ieee1275.c: Likewise.
9023 * kern/powerpc/cache.S: Likewise.
9024 * kern/powerpc/dl.c: Likewise.
9025 * kern/powerpc/ieee1275/cmain.c: Likewise.
9026 * kern/powerpc/ieee1275/crt0.S: Likewise.
9027 * kern/powerpc/ieee1275/init.c: Likewise.
9028 * kern/powerpc/ieee1275/openfw.c: Likewise.
9029 * kern/sparc64/cache.S: Likewise.
9030 * kern/sparc64/dl.c: Likewise.
9031 * kern/sparc64/ieee1275/init.c: Likewise.
9032 * kern/sparc64/ieee1275/openfw.c: Likewise.
9033 * loader/efi/chainloader.c: Likewise.
9034 * loader/efi/chainloader_normal.c: Likewise.
9035 * loader/i386/efi/linux.c: Likewise.
9036 * loader/i386/efi/linux_normal.c: Likewise.
9037 * loader/i386/pc/chainloader.c: Likewise.
9038 * loader/i386/pc/chainloader_normal.c: Likewise.
9039 * loader/i386/pc/linux.c: Likewise.
9040 * loader/i386/pc/linux_normal.c: Likewise.
9041 * loader/i386/pc/multiboot.c: Likewise.
9042 * loader/i386/pc/multiboot_normal.c: Likewise.
9043 * loader/powerpc/ieee1275/linux.c: Likewise.
9044 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
9045 * normal/arg.c: Likewise.
9046 * normal/cmdline.c: Likewise.
9047 * normal/command.c: Likewise.
9048 * normal/completion.c: Likewise.
9049 * normal/execute.c: Likewise.
9050 * normal/function.c: Likewise.
9051 * normal/lexer.c: Likewise.
9052 * normal/main.c: Likewise.
9053 * normal/menu.c: Likewise.
9054 * normal/menu_entry.c: Likewise.
9055 * normal/misc.c: Likewise.
9056 * normal/parser.y: Likewise.
9057 * normal/script.c: Likewise.
9058 * normal/i386/setjmp.S: Likewise.
9059 * normal/powerpc/setjmp.S: Likewise.
9060 * normal/sparc64/setjmp.S: Likewise.
9061 * partmap/acorn.c: Likewise.
9062 * partmap/amiga.c: Likewise.
9063 * partmap/apple.c: Likewise.
9064 * partmap/gpt.c: Likewise.
9065 * partmap/pc.c: Likewise.
9066 * partmap/sun.c: Likewise.
9067 * term/gfxterm.c: Likewise.
9068 * term/terminfo.c: Likewise.
9069 * term/efi/console.c: Likewise.
9070 * term/i386/pc/console.c: Likewise.
9071 * term/i386/pc/serial.c: Likewise.
9072 * term/i386/pc/vesafb.c: Likewise.
9073 * term/i386/pc/vga.c: Likewise.
9074 * term/ieee1275/ofconsole.c: Likewise.
9075 * util/biosdisk.c: Likewise.
9076 * util/console.c: Likewise.
9077 * util/genmoddep.c: Likewise.
9078 * util/getroot.c: Likewise.
9079 * util/grub-emu.c: Likewise.
9080 * util/grub-mkdevicemap.c: Likewise.
9081 * util/grub-probe.c: Likewise.
9082 * util/lvm.c: Likewise.
9083 * util/misc.c: Likewise.
9084 * util/raid.c: Likewise.
9085 * util/resolve.c: Likewise.
9086 * util/update-grub.in: Likewise.
9087 * util/update-grub_lib.in: Likewise.
9088 * util/grub.d/00_header.in: Likewise.
9089 * util/grub.d/10_hurd.in: Likewise.
9090 * util/grub.d/10_linux.in: Likewise.
9091 * util/i386/efi/grub-install.in: Likewise.
9092 * util/i386/efi/grub-mkimage.c: Likewise.
9093 * util/i386/pc/grub-install.in: Likewise.
9094 * util/i386/pc/grub-mkimage.c: Likewise.
9095 * util/i386/pc/grub-mkrescue.in: Likewise.
9096 * util/i386/pc/grub-setup.c: Likewise.
9097 * util/i386/pc/misc.c: Likewise.
9098 * util/powerpc/ieee1275/grub-install.in: Likewise.
9099 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
9100 * util/powerpc/ieee1275/misc.c: Likewise.
9101 * video/bitmap.c: Likewise.
9102 * video/video.c: Likewise.
9103 * video/i386/pc/vbe.c: Likewise.
9104 * video/i386/pc/vbeblit.c: Likewise.
9105 * video/i386/pc/vbefill.c: Likewise.
9106 * video/i386/pc/vbeutil.c: Likewise.
9107 * video/readers/tga.c: Likewise.
9108
3572d015 91092007-07-02 Robert Millan <rmh@aybabtu.com>
9110
9111 * conf/i386-efi.rmk: Replace obsolete reference to
9112 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
9113 with util/getroot.c.
9114 * conf/powerpc-ieee1275.rmk: Likewise.
9115 * conf/sparc64-ieee1275.rmk: Likewise.
9116
9117 * util/grub-emu.c (main): Fix unchecked pointer handling.
9118
2c2a681b 91192007-07-02 Robert Millan <rmh@aybabtu.com>
9120
9121 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
9122 invocation to fail, in order to support partition-less media.
9123
9124 * util/i386/pc/grub-install.in: Likewise.
9125
9126 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
9127 which fs or partmap modules are needed (akin to its sister scripts).
9128
9129 Also use grub-probe to get rid of unportable /proc/mounts check.
9130
9131 Print the same informational message that the other scripts do, before
fe6b695a 9132 exiting.
2c2a681b 9133
6193defe 91342007-06-23 Robert Millan <rmh@aybabtu.com>
9135
fe6b695a 9136 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 9137 a font file can be found and, if so, echo the GRUB path to it.
9138
9139 * util/update-grub.in: Handle multiple terminals depending on user
9140 input, platform availability and font file presence. Propagate
9141 variables of our findings to /etc/grub.d/ children.
9142
9143 * util/grub.d/00_header.in: Handle multiple terminals, based on
9144 environment setup by update-grub.
9145
eface1dc 91462007-06-23 Robert Millan <rmh@aybabtu.com>
9147
ba50d28f 9148 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 9149
bf697e28 91502007-06-21 Robert Millan <rmh@aybabtu.com>
9151
9152 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
9153 indicate end of data section in kernel image.
9154 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
9155 GRUB_KERNEL_MACHINE_DATA_END.
9156
9157 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
9158 space for it.
9159 * kern/i386/efi/startup.S: Likewise.
9160
9161 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
9162 during image generation. Implement --prefix option to override this
9163 patch.
9164 * util/i386/efi/grub-mkimage.c: Likewise.
9165
9166 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
9167 code to make path relative to its root into a separate function.
9168
9169 * util/i386/pc/grub-install.in: Use newly provided
9170 make_system_path_relative_to_its_root() to convert ${grubdir}, then
9171 pass the result to grub-install --prefix.
9172
baa574b4 91732007-06-13 Robert Millan <rmh@aybabtu.com>
9174
9175 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
9176 DEFAULT_DEVICE_MAP.
9177 * util/grub-emu.c: Use above definitions from misc.h instead of
9178 defining them.
9179 * util/grub-mkdevicemap.c: Likewise.
9180 * util/i386/pc/grub-setup.c: Likewise.
9181 * util/grub-probe.c: Likewise.
9182 (probe): Abort with grub_util_error() when either
9183 grub_guess_root_device or grub_util_get_grub_dev fails.
9184
0215dcbf 91852007-06-12 Robert Millan <rmh@aybabtu.com>
9186
9187 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
9188 "pager" assignment.
9189 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
9190 "pcdata".
9191 * util/grub-probe.c (probe): Likewise for "drive_name".
9192
8af2ab7b 91932007-06-11 Robert Millan <rmh@aybabtu.com>
9194
9195 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
9196 not just the cdrom one.
9197
59d31694 91982007-06-11 Robert Millan <rmh@aybabtu.com>
9199
9200 * util/i386/pc/grub-mkrescue.in: Add "set -e".
9201 Add --pkglibdir=DIR option to override pkglibdir.
9202 Mention --image-type=TYPE in help output.
9203 Fix --grub-mkimage (it was a no-op).
fe6b695a 9204 Abort gracefully when no parameter is given.
59d31694 9205
7ee367e4 92062007-06-11 Robert Millan <rmh@aybabtu.com>
9207
9208 * util/i386/pc/grub-mkrescue.in: New file.
9209 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
9210 * Makefile.in: Handle bin_SCRIPTS.
9211
29b0ed46 92122007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
9213
9214 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
9215 list of video modes.
9216
c0f90770 92172007-06-06 Robert Millan <rmh@aybabtu.com>
9218
9219 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
9220 file doesn't exist, or if it is in a filesystem grub can't read.
9221
9222 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
9223 not abort if GRUB_DRIVE could not be defined. Rearrange generated
9224 header comment to fit in 80 columns when the variables are resolved.
9225
9226 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
9227 could be identified by update-grub. Remove redundant check for
fe6b695a 9228 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 9229 handles that).
9230
fb36dc26 92312007-06-04 Robert Millan <rmh@aybabtu.com>
9232
9233 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
9234
9235 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
9236
9237 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
9238
0c68c93e 92392007-06-04 Robert Millan <rmh@aybabtu.com>
9240
9241 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
9242
9243 * include/grub/partition.h: Declare grub_apple_partition_map_init and
9244 grub_apple_partition_map_fini.
9245
9246 * util/biosdisk.c
9247 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
9248 to access >2 TiB disks).
9249
9250 Print disk->total_sectors with %llu instead of %lu, since this
9251 variable is always 64-bit (prevents wrong disk size from being displayed
9252 on either >2 TiB disk or big-endian CPU).
9253
9254 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
9255 into a generic case that supports all (sane) partition maps.
9256
9257 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
9258 breaks big-endian.
9259
9260 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
9261 and grub_apple_partition_map_fini() after that.
9262
0f23eb74 92632007-06-01 Robert Millan <rmh@aybabtu.com>
9264
9265 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
9266
9267 * util/grub.d/00_header.in: Only enable gfxterm when
9268 convert_system_path_to_grub_path() succeeds.
9269
42c71976 92702007-05-20 Robert Millan <rmh@aybabtu.com>
9271
9272 * util/update-grub_lib.in: New file.
9273 * DISTLIST: Add update-grub_lib.in.
9274 * conf/common.rmk: Generate update-grub_lib and install it in
9275 $(lib_DATA).
9276 * Makefile.in: Add install routine for $(lib_DATA).
9277
9278 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
9279 function provided by update-grub_lib to support arbitrary paths of
9280 unifont.pff.
9281 * util/update-grub.in: Use convert_system_path_to_grub_path() to
9282 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
9283
5beb2291 92842007-05-19 Robert Millan <rmh@aybabtu.com>
9285
9286 * commands/i386/cpuid.c: New module.
9287 * DISTLIST: Add it.
9288 * conf/i386-efi.rmk: Enable cpuid.mod.
9289 * conf/i386-pc.rmk: Likewise.
9290
7262eca1 92912007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9292
9293 * kern/disk.c (grub_disk_read): Check return value of
9294 grub_realloc().
9295
260ba823 92962007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
9297
9298 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
9299 arrays.
9300 * disk/raid.c (grub_raid_open): Likewise.
9301
1ecb6cf2 93022007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9303
9304 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
9305 stack instead of on the heap.
9306
9307 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
9308 before doing a read on it.
9309
9310 * configure.ac: Only use -fno-stack-protector for the target
9311 environment.
f19dbdb7 9312
21c8cbb1 93132007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
9314
9315 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
9316 __attribute_ ((unused)) to mode_type argument.
9317
9318 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 9319
21c8cbb1 9320 * kern/misc.c (memcmp): Fix prototype.
9321
9322 * include/grub/partition.h [GRUB_UTIL]
9323 (grub_gpt_partition_map_init): Add prototype.
9324 (grub_gpt_partition_map_fini): Likewise.
9325
9326 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
9327 at the right place.
9328
9329 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
9330 (grub_fat_read_data): Likewise.
9331 (grub_fat_find_dir): Likewise.
9332
9333 * font/manager.c (find_glyph): Make table a const.
9334 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 9335
849d55d3 93362007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
9337
9338 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
9339 code, first search for device in /dev/mapper, then in /dev.
9340 (grub_util_get_grub_dev): New function.
9341 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
9342 prototype.
9343 * util/grub-probe.c (probe): Remove check for RAID, call
9344 grub_util_get_grub_dev() instead of
9345 grub_util_biosdisk_get_grub_dev().
9346 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
9347 grub_util_biosdisk_get_grub_dev().
9348 * util/i386/pc/grub-setup.c (main): Likewise.
9349
8fff7c2f 93502007-05-16 Robert Millan <rmh@aybabtu.com>
9351
9352 * DISTLIST: Update for the latest changes.
9353 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
9354 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
9355 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
9356 grub/util/biosdisk.h.
9357 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
9358 grub/util/biosdisk.h.
9359
48e12b52 93602007-05-16 Robert Millan <rmh@aybabtu.com>
9361
9362 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
9363
46b9d128 93642007-05-16 Robert Millan <rmh@aybabtu.com>
9365
9366 * util/i386/efi/grub-install.in: New.
9367 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
9368 newly added grub-install.
9369 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
9370 include.
9371 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
9372 grub/util/biosdisk.h.
9373 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
9374 grub/util/biosdisk.h.
9375
2d1a40a9 93762007-05-16 Robert Millan <rmh@aybabtu.com>
9377
9378 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
9379 * include/grub/util/biosdisk.h: ... here.
9380 * util/i386/pc/biosdisk.c: Moved to ...
9381 * util/biosdisk.c: ... here.
9382 * util/i386/pc/getroot.c: Moved to ...
9383 * util/getroot.c: ... here.
9384 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
9385 * util/grub-mkdevicemap.c: ... here.
9386 * util/i386/pc/grub-probe.c: Moved to ...
9387 * util/grub-probe.c: ... here.
9388
9e26e3bc 93892007-05-15 Robert Millan <rmh@aybabtu.com>
9390
9391 * util/update-grub.in: Remove duplicated line in grub.cfg header
9392 message.
9393
57f96397 93942007-05-13 Robert Millan <rmh@aybabtu.com>
9395
9396 * util/update-grub.in: Fix a few assumptions about the devices holding
9397 /, /boot and /boot/grub being the same.
9398 * util/grub.d/00_header.in: Likewise.
9399 * util/grub.d/10_hurd.in: Likewise.
9400 * util/grub.d/10_linux.in: Likewise.
9401
9402 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
9403 patterns. Use that to define the `.old' suffix as older than `'.
9404
9405 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
9406
9407 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
9408 the grub.cfg header message.
9409
2e610d62 94102007-05-11 Robert Millan <rmh@aybabtu.com>
9411
9412 * util/update-grub.in: Create device.map if it doesn't already exist,
9413 before attempting to run grub-probe.
9414 Check for grub-probe and grub-mkdevicemap with the same code
9415 grub-install is using.
9416 Remove test mode.
9417
3f6a10ef 94182007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
9419
9420 * Makefile.in: Add the datarootdir autoconf variable.
9421
02e7b75e 94222007-05-09 Robert Millan <rmh@aybabtu.com>
9423
9424 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 9425 fail gracefully if dev->disk->partition == NULL.
02e7b75e 9426
75f396cc 94272007-05-07 Robert Millan <rmh@aybabtu.com>
9428
9429 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
9430 determine partition map module.
9431 * util/i386/pc/grub-install.in: Use this feature to decide which
9432 partition module to load, instead of hardcoding pc and gpt.
9433
da65cb36 94342007-05-07 Robert Millan <rmh@aybabtu.com>
9435
9436 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
9437 source directory differs from build directory.
9438
b57d6a91 94392007-05-05 Robert Millan <rmh@aybabtu.com>
9440
9441 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
9442 initialisation.
9443
509d00f1 94442007-05-05 Robert Millan <rmh@aybabtu.com>
9445
9446 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
9447
c48f23ef 94482007-05-05 Robert Millan <rmh@aybabtu.com>
9449
9450 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
9451 command-line arguments via ${GRUB_CMDLINE_LINUX}.
9452
20b97658 94532007-05-05 Robert Millan <rmh@aybabtu.com>
9454
9455 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
9456 (grub_probe_SOURCES): Likewise.
9457 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
9458 GPT and initialize dos_part and bsd_part accordingly.
9459 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
9460 install_bsd_part.
9461 (main): Activate gpt module for use during partition identification,
9462 and deactivate it afterwards.
9463 * util/i386/pc/grub-install.in: Add gpt module to core.img.
9464 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
9465 partition identification, and deactivate it afterwards.
9466
99123174 94672007-05-05 Robert Millan <rmh@aybabtu.com>
9468
9469 * term/i386/pc/console.c (grub_console_fini): Call
9470 grub_term_set_current() before grub_term_unregister().
9471
ebd97f6e 94722007-05-04 Robert Millan <rmh@aybabtu.com>
9473
9474 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
9475 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
9476 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
9477 and update-grub_DATA.
9478 * conf/common.rmk: Build and install update-grub components.
9479 * conf/common.mk: Regenerate.
9480 * util/update-grub.in: New. Core of update-grub.
9481 * util/grub.d/00_header.in: New. Generates grub.cfg header.
9482 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
9483 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
9484 * util/grub.d/README: New. Document grub.d directory layout.
9485
b06a264d 94862007-05-01 Robert Millan <rmh@aybabtu.com>
9487
9488 * util/grub-emu.c: Move initialization functions
9489 grub_util_biosdisk_init() and grub_init_all() before
9490 grub_util_biosdisk_get_grub_dev(), which relies on them.
9491
41f0050e 94922007-04-19 Robert Millan <rmh@aybabtu.com>
9493
9494 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
9495 it is used later.
9496
04582bb3 94972007-04-18 Jerone Young <jerone@gmail.com>
9498
f19dbdb7 9499 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 9500 stanza.
9501
08db4632 95022007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 9503
08db4632 9504 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
9505 continue on and look for device node with real device name.
9506
801b76be 95072007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 9508
fe6b695a 9509 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 9510 ability.
9511 * Makefile.in: Add autoconf package transformation code.
9512 * util/i386/pc/grub-install.in: Likewise.
9513 * util/powerpc/ieee1275/grub-install.in: Likewise.
9514
6795c4e1 95152007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
9516
9517 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
9518 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
9519 (EXT2_REVISION): Likewise.
9520 (EXT2_INODE_SIZE): Likewise.
9521 (struct grub_ext2_block_group): Added a missing member
9522 "used_dirs".
9523 (grub_ext2_read_inode): Divide by the inode size in a superblock
9524 instead of 128 to obtain INODES_PER_BLOCK.
9525 Use the macro EXT2_INODE_SIZE instead of directly using
9526 SBLOCK->INODE_SIZE.
9527
d70af616 95282007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
9529
9530 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
9531 superblock instead of the structure size to compute an
9532 offset. This fixes the problem that GRUB could not read a
9533 filesystem when inode size is different from 128-byte.
9534
3b801603 95352007-03-05 Marco Gerards <marco@gnu.org>
9536
9537 * normal/main.c (read_config_file): When "menu" is not set, create
9538 an initial context.
9539
4785bfe4 95402007-02-21 Hollis Blanchard <hollis@penguinppc.org>
9541
9542 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
9543 (HEAP_LIMIT): New macro.
9544 (grub_claim_heap): Claim memory up to `heaplimit'.
9545
a0cbb023 95462007-02-21 Hollis Blanchard <hollis@penguinppc.org>
9547
9548 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
9549 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
9550 (_start): Likewise.
9551 (grub_arch_modules_addr): Return address after `_end'.
9552 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
9553 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
9554 (add_segments): Calculate `_end' from phdr size and location.
9555 (ALIGN_UP): Moved to ...
9556 * include/grub/misc.h: here.
9557 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9558 New macro.
9559 (GRUB_IEEE1275_MODULE_BASE): Removed.
9560
fd7d8eba 95612007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9562
9563 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
9564 loop boundary.
9565
9b09e6fc 95662007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9567
9568 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
9569 All users updated.
9570 (grub_elf64_load_hook_t): Likewise.
9571 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
9572 debug output.
9573
3ce27299 95742007-02-20 Hollis Blanchard <hollis@penguinppc.org>
9575
9576 * kern/mm.c: Update copyright.
9577 (grub_mm_debug): Correct syntax error.
9578 (grub_mm_dump_free): New function.
9579 (grub_debug_free): Call `grub_free'.
9580 * include/grub/mm.h: Update copyright.
9581 (grub_mm_dump_free): Add declaration.
9582
077d5fee 95832007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9584
9585 * include/grub/ieee1275/ieee1275.h: Update copyright.
9586 * kern/powerpc/ieee1275/init.c: Likewise.
9587 * kern/powerpc/ieee1275/openfw.c: Likewise.
9588
9589 * loader/powerpc/ieee1275/linux.c: Likewise.
9590 * include/grub/elfload.h: Likewise.
9591 * kern/elf.c: Likewise.
9592 (grub_elf32_load): Pass `base' and `size' parameters. Update all
9593 callers.
9594 (grub_elf64_load): Likewise.
9595 (grub_elf32_load_segment): Move to a nested function.
9596 (grub_elf64_load_segment): Likewise.
9597
dc946850 95982007-02-12 Hollis Blanchard <hollis@penguinppc.org>
9599
9600 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
9601 prototype.
9602 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
9603 (grub_heap_len): Likewise.
9604 (HEAP_SIZE): New macro.
9605 (grub_claim_heap): New function.
9606 (grub_machine_init): Don't claim heap directly. Call
9607 `grub_claim_heap'.
9608 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
9609 (grub_available_iterate): New function.
9610
baa2a121 96112007-02-03 Thomas Schwinge <tschwinge@gnu.org>
9612
9613 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
9614 * configure.ac: Use it for testing the HOST and TARGET compilers.
9615
4fe9862e 96162006-12-13 Thomas Schwinge <tschwinge@gnu.org>
9617
9618 * Makefile.in (enable_grub_emu): New variable.
9619 * configure.ac (--enable-grub-emu): New option.
9620 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
9621 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
9622 * conf/i386-pc.rmk: Likewise.
9623 * conf/powerpc-ieee1275.rmk: Likewise.
9624 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
9625
a8aa5762 96262006-12-12 Marco Gerards <marco@gnu.org>
9627
9628 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
9629
9630 * kern/env.c (grub_env_unset): Don't free the member `value' when
9631 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
9632 pointer.
9633
9634 * normal/main.c (current_menu): Removed.
9635 (free_menu): Unset the `menu' environment variable.
9636 (grub_normal_menu_addentry): Make use of the environment variable
9637 `menu', instead of using the global `current_menu'. Allocate
9638 memory for the sourcecode of this entry.
9639 (read_config_file): New argument `nested', changed all callers.
9640 Only in the case of a new context, initialize a new menu. Set the
9641 `menu' environment variable.
9642 (grub_normal_execute): Don't set and unset the environment
9643 variable `menu' here anymore. Only free the menu when leaving the
9644 context.
9645
9646 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
9647 leak.
9648
957b3a3e 96492006-12-11 Marco Gerards <marco@gnu.org>
9650
9651 * normal/menu_entry.c (run): Fix off by one bug so the last line
9652 is executed. Move the loader check to outside the loop.
9653
ef875714 96542006-12-08 Hollis Blanchard <hollis@penguinppc.org>
9655
9656 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
9657
4e739985 96582006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
9659
9660 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
9661 the number of sectors. Reported by Andrey Shuvikov
9662 <mr_hyro@yahoo.com>.
f19dbdb7 9663
790707f2 96642006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
9665
9666 * kern/disk.c (grub_disk_read): When there is a read error, always
9667 try to read only the necessary data.
f19dbdb7 9668
790707f2 9669 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
9670 disk/raid.c.
9671 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
9672 prototype.
9673 [GRUB_UTIL] (grub_raid_fini): Likewise.
9674 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 9675 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 9676 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
9677 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
9678 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
9679 and grub_raid_fini().
f19dbdb7 9680
03e58196 96812006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
9682
9683 * include/grub/types.h (__unused): Rename to UNUSED.
9684 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
9685 (grub_elf64_size): Likewise.
f19dbdb7 9686
ae4f23bf 96872006-11-03 Hollis Blanchard <hollis@penguinppc.org>
9688
9689 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
9690 grub_error_push and grub_error_pop in the error-handling path.
9691 (grub_elf32_load_segment): Only call grub_file_read with non-zero
9692 length.
9693
2166cc83 96942006-11-03 Hollis Blanchard <hollis@penguinppc.org>
9695
9696 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
9697 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
9698 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9699 (kernel_elf_SOURCES): Likewise.
9700 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
9701 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
9702 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9703 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9704 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
9705 (elf_mod_SOURCES): New variable.
9706 (elf_mod_CFLAGS): Likewise.
9707 (elf_mod_LDFLAGS): Likewise.
9708 * include/grub/types.h (__unused): New macro.
9709 * include/grub/elfload.h: New file.
9710 * kern/elf.c: Likewise.
9711 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
9712 (ELF32_LOADMASK): New macro.
9713 (ELF64_LOADMASK): Likewise.
9714 (vmlinux): Removed.
9715 (grub_linux_load32): New function.
9716 (grub_linux_load64): Likewise.
9717 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
9718 Use grub_elf_t instead of grub_file_t.
9719
a09d5aa5 97202006-11-02 Hollis Blanchard <hollis@penguinppc.org>
9721
9722 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
9723 `catch_result' to struct set_color_args.
9724
d976fc51 97252006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
9726
9727 * normal/menu.c: Include grub/script.h.
9728 * normal/menu_entry.c: Likewise.
9729 * include/grub/normal.h: Do not include grub/script.h.
9730
67507549 97312006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9732
9733 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
9734
69203a99 97352006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9736
9737 * kern/disk.c (grub_disk_open): Print debug messages when opening a
9738 disk.
9739 (grub_disk_close): Print debug messages when closing a disk.
9740 (grub_disk_read): Print debug messages when disk read fails.
9741 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
9742 filesystem type.
9743 * kern/partition.c: Include misc.h.
9744 (grub_partition_iterate): Print debug messages when detecting
9745 partition type.
9746
e2b8278c 97472006-10-27 Hollis Blanchard <hollis@penguinppc.org>
9748
9749 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
9750 is negative.
9751 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
9752
97b2f2ff 97532006-10-26 Hollis Blanchard <hollis@penguinppc.org>
9754
9755 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9756 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
9757
6555d655 97582006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
9759
9760 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
9761 instead of sizeof(lv). Patch by Michael Guntsche.
9762
4d42b77f 97632006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
9764
9765 * disk/lvm.c: Rename VGS to VG_LIST.
9766 (grub_lvm_iterate): Change VGS->LV to VG-LV.
9767 (grub_lvm_open): Likewise.
9768 Thanks to Michael Guntsche for finding this bug.
9769
5d74d927 97702006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
9771
9772 * configure.ac (AC_INIT): Bumped to 1.95.
9773
a1bb27e4 97742006-10-14 Robert Millan <rmh@aybabtu.com>
9775
9776 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
9777 with "/dev/.static/dev/md".
9778
e0994b8b 97792006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
9780
9781 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
9782 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
9783 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
9784 DRIVE_NAME are always freed.
9785
9786 * util/i386/pc/biosdisk.c (make_device_name): Add one into
9787 DOS_PART, as a DOS partition is counted from one instead of zero
9788 now. Reported by Robert Millan.
9789
ddd5cee9 97902006-10-14 Robert Millan <rmh@aybabtu.com>
9791
9792 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
9793 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
9794 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
9795 string returned by grub_guess_root_device.
9796 * util/i386/pc/grub-setup.c: Likewise.
9797 * util/i386/pc/grub-probefs.c: Likewise.
9798
9799 * util/i386/pc/grub-probefs.c: Rename to ...
9800 * util/i386/pc/grub-probe.c: ... this.
9801 * DISTLIST: Remove grub-probefs, add grub-probe.
9802 * conf/i386-efi.rmk: Likewise.
9803 * conf/i386-pc.rmk: Likewise.
9804 * util/i386/pc/grub-install.in: Likewise.
9805
9806 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
9807 choose which information we want to print.
9808
2b002173 98092006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
9810
9811 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
9812 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
9813 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
9814 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
9815 video/readers/tga.c and video/i386/pc/vbeutil.c.
9816
98172006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
9818
9819 Added support for RAID and LVM.
f19dbdb7 9820
2b002173 9821 * disk/lvm.c: New file.
9822 * disk/raid.c: Likewise.
9823 * include/grub/lvm.h: Likewise.
f19dbdb7 9824 * include/grub/raid.h: Likewise.
2b002173 9825 * include/grub/util/lvm.h: Likewise.
9826 * include/grub/util/raid.h: Likewise.
9827 * util/lvm.c: Likewise.
9828 * util/raid.c: Likewise.
9829
9830 * include/grub/disk.h (grub_disk_dev_id): Add
9831 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
9832 (grub_disk_get_size): New prototype.
9833 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
9834 returns a partition.
9835 (grub_disk_get_size): New function.
f19dbdb7 9836
2b002173 9837 * kern/i386/pc/init.c (make_install_device): Copy the prefix
9838 verbatim if grub_install_dos_part is -2.
9839
9840 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
9841 and LVM devices.
9842
9843 * util/i386/pc/grub-setup.c (setup): New argument
9844 MUST_EMBED. Force embedding of GRUB when the argument is
9845 true. Close FILE before returning.
9846 (main): Add support for RAID and LVM.
f19dbdb7 9847
2b002173 9848 * conf/common.rmk: Add RAID and LVM modules.
9849 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
9850 util/lvm.c.
9851 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
9852
9853 * kern/misc.c (grub_strstr): New function.
9854 * include/grub/misc.h (grub_strstr): New prototype.
9855
050548d0 98562006-10-10 Tristan Gingold <tristan.gingold@bull.net>
9857
9858 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
9859
da849d2d 98602006-10-05 Tristan Gingold <tristan.gingold@bull.net>
9861
9862 * kern/misc.c (grub_strtoull): Guess the base only if not
9863 specified.
9864
97b2f2ff 98652006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 9866
9867 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
9868 PowerMac support.
9869
97b2f2ff 98702006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 9871
9872 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
9873
9874 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
9875 Remove `flags' argument. All callers changed.
9876 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
9877 (IEEE1275_IHANDLE_INVALID): New variable.
9878 (IEEE1275_CELL_INVALID): New variable.
9879 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
9880 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
9881 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
9882 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
9883 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
9884 codes from Open Firmware. All callers updated.
9885 (grub_ieee1275_next_property): Directly return Open Firmware return
9886 code.
9887 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
9888 Standardize error checking from `grub_ieee1275_get_property'.
9889 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
9890 `devalias' to `aliases'. Correct comments. Consolidate error paths.
9891
97b2f2ff 98922006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 9893
9894 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
9895 `instance_to_package_args' to `instance_to_path_args'.
9896
9897 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
9898 `grub_ieee1275_chosen'.
9899
9900 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
9901 `grub_ieee1275_interpret'.
9902
97b2f2ff 99032006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 9904
9905 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
9906
97b2f2ff 99072006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 9908
9909 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
9910 (__cmpdi): Likewise.
9911
9912 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
9913 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
9914 `grub_ssize_t'.
9915
02bb8acc 9916 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 9917
9918 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
9919 to type `grub_ssize_t'.
9920 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
9921
7f9a8531 99222006-09-22 Marco Gerards <marco@gnu.org>
9923
9924 * normal/script.c (grub_script_create_cmdmenu): Skip leading
9925 newlines.
9926
b5ef1102 99272006-09-22 Marco Gerards <marco@gnu.org>
9928
9929 * commands/echo.c: New file.
9930
9931 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
9932
9933 * conf/common.rmk (echo_mod_SOURCES): New variable.
9934 (echo_mod_CFLAGS): Likewise.
9935 (echo_mod_LDFLAGS): Likewise.
9936
2cff3677 99372006-09-22 Marco Gerards <marco@gnu.org>
9938
9939 * normal/main.c (get_line): Malloc memory instead of using
9940 preallocated memory. Removed the arguments `cmdline' and
9941 `max_len'. Updated all callers.
9942
6ba4688b 99432006-09-22 Marco Gerards <marco@gnu.org>
9944
9945 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
9946 (normal_mod_DEPENDENCIES): Likewise.
9947
9948 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
9949 (normal_mod_DEPENDENCIES): Likewise.
9950
9951 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
9952
e02ac02c 99532006-09-22 Johan Rydberg <jrydberg@gnu.org>
9954
9955 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
9956 programs.
9957 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
9958 (normal_mod_DEPENDENCIES): Likewise.
9959 * conf/i386-pc.mk: Regenerate.
9960 * conf/i386-efi.mk: Likewise
9961 * conf/common.mk: Likewise.
9962 * conf/powerpc-ieee1275.mk: Likewise.
9963 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 9964
8d252e44 99652006-09-22 Robert Millan <rmh@aybabtu.com>
9966
9967 Sync with i386 version.
9968 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
9969 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
9970
209bf7ac 99712006-09-21 Robert Millan <rmh@aybabtu.com>
9972
9973 Import from GRUB Legacy (lib/device.c):
9974 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
9975 (init_device_map) [__linux__]: Add support for I2O devices.
9976
6b146090 99772006-09-14 Marco Gerards <marco@gnu.org>
9978
9979 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
9980 `-melf_i386'.
9981
e38600a8 99822006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 9983
9984 * util/i386/pc/grub-install.in: Skip menu.lst when removing
9985 /boot/grub/*.lst.
78fa1790 9986
2952da5d 9987 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 9988
2952da5d 9989 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
9990 before adding it to device.map.
9991
01b82a64 99922006-08-15 Johan Rydberg <jrydberg@gnu.org>
9993
fe6b695a 9994 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 9995 compiles a file; using the -MD option.
9996 * conf/common.mk: Regenerate.
9997 * conf/i386-pc.mk: Likewise.
9998 * conf/i386-efi.mk: Likewise.
9999 * conf/powerpc-ieee1275.mk: Likewise.
10000 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 10001
1064790d 100022006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
10003
10004 Move the prototypes of grub_setjmp and grub_longjmp to
10005 cpu/setjmp.h, so that each architecture may specify different
10006 attributes.
f19dbdb7 10007
1064790d 10008 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
10009 (grub_longjmp): Likewise.
10010 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
10011 (grub_longjmp): Likewise.
10012 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
10013 (grub_longjmp): Likewise.
10014
10015 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
10016 [!GRUB_UTIL] (grub_longjmp): Removed.
10017
29dda3ed 100182006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
10019
10020 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
10021 "color!" method does not return any value.
10022
ad2a06ed 100232006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10024
10025 * include/grub/bitmap.h: New file.
10026
10027 * include/grub/i386/pc/vbeutil.h: Likewise.
10028
10029 * video/bitmap.c: Likewise.
10030
10031 * video/readers/tga.c: Likewise.
10032
10033 * video/i386/pc/vbeutil.c: Likewise.
10034
10035 * commands/videotest.c: Code cleanup and updated to reflect to new
10036 video API.
10037
10038 * term/gfxterm.c: Likewise.
10039
10040 * video/video.c: Likewise.
10041
10042 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
10043 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
10044 (bitmap_mod_SOURCES): New entry.
10045 (bitmap_mod_CFLAGS): Likewise.
10046 (bitmap_mod_LDFLAGS): Likewise.
10047 (tga_mod_SOURCES): Likewise.
10048 (tga_mod_CFLAGS): Likewise.
10049 (tga_mod_LDFLAGS): Likewise.
10050
10051 * include/grub/video.h (grub_video_blit_operators): New enum type.
10052 (grub_video_render_target): Changed as forward declaration and moved
10053 actual definition to be video driver specific.
10054 (grub_video_adapter.blit_bitmap): Added blitting operator.
10055 (grub_video_adapter.blit_render_target): Likewise.
10056 (grub_video_blit_bitmap): Likewise.
10057 (grub_video_blit_render_target): Likewise.
10058
10059 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
10060 driver specific render target definition.
10061 (grub_video_vbe_map_rgba): Added driver internal helper.
10062 (grub_video_vbe_unmap_color): Updated to use
10063 grub_video_i386_vbeblit_info.
10064 (grub_video_vbe_get_video_ptr): Likewise.
10065
10066 * include/grub/i386/pc/vbeblit.h
10067 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
10068 grub_video_i386_vbeblit_info.
10069 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
10070 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
10071 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
10072 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
10073 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
10074 (grub_video_i386_vbeblit_index_index): Likewise.
10075 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
10076 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
10077 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
10078 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
10079 operator.
10080 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
10081 operator.
10082
10083 * video/i386/pc/vbeblit.c: Updated to reflect changes on
10084 include/grub/i386/pc/vbeblit.h.
10085
10086 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
10087 Updated to use grub_video_i386_vbeblit_info.
10088 (grub_video_i386_vbefill_R8G8B8): Likewise.
10089 (grub_video_i386_vbefill_index): Likewise.
10090 (grub_video_i386_vbefill): Added generic filler.
10091
10092 * video/i386/pc/vbefill.c: Updated to reflect changes on
10093 include/grub/i386/pc/vbefill.h.
10094
10095 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
10096 grub_video_i386_vbeblit_info.
10097 (grub_video_vbe_unmap_color): Likewise.
10098 (grub_video_vbe_blit_glyph): Likewise.
10099 (grub_video_vbe_scroll): Likewise.
10100 (grub_video_vbe_draw_pixel): Removed function.
10101 (grub_video_vbe_get_pixel): Likewise.
10102 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
10103 updated code to use it.
10104 (common_blitter): Added common blitter for render target and bitmap.
10105 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
10106 (grub_video_vbe_blit_render_target): Likewise.
10107
bc8c036d 101082006-07-30 Johan Rydberg <jrydberg@gnu.org>
10109
10110 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
10111 is in text mode if there is no console control protocol instance
10112 available.
10113
684a8eff 101142006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10115
10116 * include/grub/video.h: Code cleanup.
10117
10118 * include/grub/i386/pc/vbe.h: Likewise.
10119
10120 * video/i386/pc/vbe.c: Likewise.
10121
10122 * video/i386/pc/vbeblit.c: Likewise.
10123
10124 * video/i386/pc/vbefill.c: Likewise.
10125
10126 * video/video.c: Likewise. Also added more comments.
10127
5915059b 101282006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
10129
10130 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
10131 (struct grub_biosdisk_dap): Likewise.
10132
10133 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
10134 linkage settings for all functions.
10135
90ce5d56 101362006-07-12 Marco Gerards <marco@gnu.org>
10137
10138 * configure.ac (--enable-mm-debug): Fix typo.
10139
10140 * genkernsyms.sh.in: Use proper quoting for `CC'.
10141
43e7f879 101422006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
10143
10144 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
10145 (normal_mod_ASFLAGS): Remove "-m32".
10146
4889bdec 101472006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
10148
10149 * util/misc.c: Include config.h.
10150 [!HAVE_MEMALIGN]: Do not include malloc.h.
10151 (grub_memalign): Use posix_memalign, if present. Then, use
10152 memalign, if present. Otherwise, emit an error.
10153
10154 * util/grub-emu.c: Do not include malloc.h.
10155
10156 * include/grub/util/misc.h: Include unistd.h. This is required for
10157 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
10158 D. Eades III <hde@foobar-qux.org>.
10159
10160 * configure.ac (AC_GNU_SOURCE): Added.
10161 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
10162 type.
10163
fd39d4da 101642006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
10165
10166 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
10167 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
10168
b786f3b5 101692006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
10170
10171 * include/grub/types.h (grub_host_addr_t): Rename to
10172 grub_target_addr_t.
10173 (grub_host_off_t): Rename to grub_target_off_t.
10174 (grub_host_size_t): Rename to grub_target_size_t.
10175 (grub_host_ssize_t): Rename to grub_target_ssize_t.
10176 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
10177
10178 * include/grub/kernel.h (struct grub_module_header): Change type
10179 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
10180 (grub_module_info): Likewise.
f19dbdb7 10181
051988bb 101822006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10183
10184 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
10185 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
10186 Velazquez <jesus.velazquez@gmail.com>.
10187
deae281b 101882006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
10189
10190 Count partitions from 1 instead of 0 in the string representation
10191 of partitions. Still use 0-based internally.
f19dbdb7 10192
deae281b 10193 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
10194 (sun_partition_map_iterate): Use grub_partition_t instead of
10195 struct grub_partition *. Cast DESC->START_CYLINDER to
10196 grub_uint64_t after converting the endian.
10197 (sun_partition_map_probe): Subtract 1 for PARTNUM.
10198 (sun_partition_map_get_name): Add 1 to P->INDEX.
10199
10200 * partmap/pc.c (grub_partition_parse): Subtract 1 for
10201 PCDATA->DOS_PART.
10202 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
10203
10204 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
10205 zero instead of one.
10206 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
10207 (gpt_partition_map_get_name): Add 1 into P->INDEX.
10208
10209 * partmap/apple.c (apple_partition_map_iterate): Change the type
10210 of POS to unsigned.
10211 (apple_partition_map_probe): Subtract 1 for PARTNUM.
10212 (apple_partition_map_get_name): Add 1 into P->INDEX.
10213
10214 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
10215 of POS to unsigned.
10216 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
10217 calculate the offset of a partition.
10218 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
10219 (amiga_partition_map_get_name): Add 1 into P->INDEX.
10220
10221 * partmap/acorn.c (acorn_partition_map_find): Change the type of
10222 SECTOR to grub_disk_addr_t.
10223 (acorn_partition_map_iterate): Likewise.
10224 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
10225 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
10226 top.
10227 (acorn_partition_map_get_name): Add 1 into P->INDEX.
10228
10229 * kern/i386/pc/init.c (make_install_device): Add 1 into
10230 GRUB_INSTALL_DOS_PART.
10231
10232 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
10233 conditional.
10234
524a1e6a 102352006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10236
10237 Clean up the code to support 64-bit addressing in disks and
10238 files. This change is not enough for filesystems yet.
f19dbdb7 10239
524a1e6a 10240 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
10241 type of "start" to grub_uint64_t.
10242 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
10243 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
10244 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
10245 convert addresses.
10246
10247 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
10248 to grub_disk_addr_t.
10249
10250 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
10251 string.
10252
10253 * partmap/pc.c (pc_partition_map_iterate): Likewise.
10254
10255 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
10256 to char *.
10257
10258 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
10259
10260 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
10261
10262 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
10263
10264 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
10265 to grub_off_t, to detect an error from grub_file_seek.
10266 (grub_multiboot_load_elf32): Likewise.
10267
10268 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
10269 maximum unsigned long value when an overflow is detected.
10270 (grub_strtoull): New function.
10271 (grub_divmod64): Likewise.
10272 (grub_lltoa): use grub_divmod64.
10273
10274 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
10275 grub_disk_addr_t.
10276 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
10277 the pointer to next character. Use grub_strtoull instead of
10278 grub_strtoul.
10279 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
10280 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
10281 respectively.
10282
fe6b695a 10283 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 10284 return value is signed.
10285 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
10286 test if OFFSET is less than zero, as OFFSET is unsigned now.
10287
10288 * kern/disk.c (struct grub_disk_cache): Change the type of
10289 "sector" to grub_disk_addr_t.
10290 (grub_disk_cache_get_index): Change the type of SECTOR to
10291 grub_disk_addr_t. Calculate the hash with SECTOR casted to
10292 unsigned after shifting.
10293 (grub_disk_cache_invalidate): Change the type of SECTOR to
10294 grub_disk_addr_t.
10295 (grub_disk_cache_unlock): Likewise.
10296 (grub_disk_cache_store): Likewise.
10297 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
10298 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
10299 grub_disk_addr_t and grub_uint64_t, respectively.
10300 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
10301 body, as the value of OFFSET is tweaked by
10302 grub_disk_check_range. Change the types of START_SECTOR, LEN and
10303 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
10304 respectively.
10305 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
10306 body, as the value of OFFSET is tweaked by
10307 grub_disk_check_range. Change the types of LEN and N to
10308 grub_size_t.
10309
10310 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
10311 and "saved_offset" to grub_off_t.
10312 (test_header): Cast BUF to char *.
10313 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
10314 to char *.
10315 (grub_gzio_read): Change the types of OFFSET and SIZE to
10316 grub_off_t and grub_size_t, respectively.
10317
10318 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
10319 Removed.
10320 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
10321 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
10322 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
10323 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
10324 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
10325
10326 * include/grub/types.h (grub_off_t): Unconditionally set to
10327 grub_uint64_t.
10328 (grub_disk_addr_t): Changed to grub_uint64_t.
10329
10330 * include/grub/partition.h (struct grub_partition): Change the
10331 types of "start", "len" and "offset" to grub_disk_addr_t,
10332 grub_uint64_t and grub_disk_addr_t, respectively.
10333 (grub_partition_get_start): Return grub_disk_addr_t.
10334 (grub_partition_get_len): Return grub_uint64_t.
10335
10336 * include/grub/misc.h (grub_strtoull): New prototype.
10337 (grub_divmod64): Likewise.
10338
10339 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
10340 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
10341 grub_off_t, respectively.
10342 All callers and references changed.
10343
10344 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
10345 grub_size_t in "read".
10346 All callers and references changed.
10347
10348 * include/grub/file.h (struct grub_file): Change the types of
10349 "offset" and "size" to grub_off_t and grub_off_t,
10350 respectively. Change the type of SECTOR to grub_disk_addr_t in
10351 "read_hook".
10352 (grub_file_read): Change the type of LEN to grub_size_t.
10353 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
10354 grub_off_t.
10355 (grub_file_size): Return grub_off_t.
10356 (grub_file_tell): Likewise.
10357 All callers and references changed.
10358
10359 * include/grub/disk.h (struct grub_disk_dev): Change the types of
10360 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
10361 "write".
10362 (struct grub_disk): Change the type of "total_sectors" to
10363 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 10364 "read_hook".
524a1e6a 10365 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
10366 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
10367 (grub_disk_write): Likewise.
10368 All callers and references changed.
10369
10370 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
10371 char * for grub_strncmp to silence gcc.
10372 (grub_iso9660_mount): Likewise.
10373 (grub_iso9660_mount): Likewise.
10374 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
10375 return statement.
10376 (grub_iso9660_iterate_dir): Likewise.
10377 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
10378
10379 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
10380 LEN to grub_disk_addr_t and grub_size_t, respectively.
10381
10382 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10383
10384 * fs/jfs.c (grub_jfs_read_file): Likewise.
10385
10386 * fs/minix.c (grub_jfs_read_file): Likewise.
10387
10388 * fs/sfs.c (grub_jfs_read_file): Likewise.
10389
10390 * fs/ufs.c (grub_jfs_read_file): Likewise.
10391
10392 * fs/xfs.c (grub_jfs_read_file): Likewise.
10393
10394 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
10395 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
10396 respectively.
10397
10398 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
10399 BLKNR to -1 instead of returning GRUB_ERRNO.
10400 (grub_ext2_read_file): Change the types of SECTOR and
10401 LEN to grub_disk_addr_t and grub_size_t, respectively.
10402
10403 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
10404 LEN to grub_disk_addr_t and grub_size_t, respectively.
10405
10406 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
10407 grub_file_read.
10408
10409 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
10410 string. Do not cast SECTOR explicitly.
10411
10412 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
10413 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
10414 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
10415 grub_disk_addr_t and grub_size_t, respectively. If the sector is
10416 over 2TB and LBA mode is not supported, raise an error.
10417 (get_safe_sectors): New function.
10418 (grub_biosdisk_read): Use get_safe_sectors.
10419 (grub_biosdisk_write): Likewise.
10420
10421 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
10422 (grub_efidisk_write): Likewise.
10423
10424 * disk/loopback.c (delete_loopback): Cosmetic changes.
10425 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
10426 correctly.
10427 (grub_loopback_open): Likewise.
10428 (grub_loopback_read): Likewise. Also, change the type of POS to
10429 grub_off_t, and fix the usage of grub_memset.
10430
10431 * commands/i386/pc/play.c: Include grub/machine/time.h.
10432
10433 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
10434 print FILE->SIZE.
10435
10436 * commands/configfile.c: Include grub/env.h.
10437
10438 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
10439 GRUB_ERRNO directly instead. Change the type of POS to
10440 grub_off_t. Follow the coding standard.
10441
10442 * commands/blocklist.c: Include grub/partition.h.
10443 (grub_cmd_blocklist): Return an error if the underlying device is
10444 not a disk. Take the starting sector of a partition into account,
10445 if a partition is used.
10446
10447 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
10448 a length field.
10449 (lba_mode): Support 64-bit addresses.
10450 (chs_mode): Likewise.
10451 (copy_buffer): Adapted to the new offsets of a length field and a
10452 segment field.
10453 (blocklist_default_start): Allocate 64-bit space.
10454
10455 * boot/i386/pc/boot.S (force_lba): Removed.
10456 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 10457 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 10458 space.
10459 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
10460 is useless.
10461 (lba_mode): Refactored to support a 64-bit address. More size
10462 optimization.
10463 (setup_sectors): Likewise.
10464
53af98ad 104652006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
10466
10467 * DISTLIST: Added include/grub/i386/linux.h. Removed
10468 include/grub/i386/pc/linux.h
10469
10470 * configure.ac (AC_INIT): Bumped to 1.94.
10471
10472 * config.guess: Updated from gnulib.
10473 * config.sub: Likewise.
10474 * install-sh: Likewise.
10475 * mkinstalldirs: Likewise.
10476
b4c1940a 104772006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
10478
10479 * conf/common.rmk (grub_modules_init.lst): Depended on
10480 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
10481 MODSRCFILES.
10482
10483 * genmk.rb (PModule::rule): Reverted the previous change.
10484
cfca1cfd 104852006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
10486
10487 * conf/common.rmk (grub_modules_init.lst): Depends on
10488 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
10489 that the target does not exist before producing.
10490 (grub_modules_init.h): Remove the target before generating.
10491 (grub_emu_init.c): Likewise.
10492
10493 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
10494
aa6d7826 104952006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
10496
10497 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
10498 for the target-specific tests. Make sure that we also have the
10499 up-to-date target variables for those tests.
10500
26c607b9 105012006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
10502
10503 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
10504 (PModule::rule): Likewise.
10505
0162321a 105062006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
10507
10508 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
10509 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
10510 target-specific flags should be prefixed.
10511 (PModule::rule): Likewise.
10512
6c826348 105132006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
10514
10515 * configure.ac (CMP): Check if cmp is available explicitly.
10516
b977bf01 105172006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
10518
10519 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
10520 (target_cpu): New variable.
10521 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 10522
b977bf01 10523 * util/i386/pc/grub-install.in (host_cpu): Removed.
10524 (target_cpu): New variable.
10525 (pkglibdir): Use target_cpu instead of host_cpu.
10526
10527 * util/genmoddep.c: Removed.
f19dbdb7 10528
b977bf01 10529 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
10530 instead of GRUB_HOST_SIZEOF_VOID_P.
10531 * kern/dl.c: Likewise.
10532
10533 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
10534 ...
10535 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10536 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10537 (GRUB_TARGET_SIZEOF_LONG): ... this.
10538 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10539 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10540 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10541 to ...
10542 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10543 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10544 (GRUB_TARGET_SIZEOF_LONG): ... this.
10545 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10546 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10547 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
10548 to ...
10549 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
10550 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
10551 (GRUB_TARGET_SIZEOF_LONG): ... this.
10552 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
10553 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
10554
10555 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
10556 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
10557 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
10558 instead of GRUB_HOST_SIZEOF_LONG.
10559 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
10560 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
10561 GRUB_CPU_WORDS_BIGENDIAN.
10562 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
10563 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
10564 grub_host_ssize_t.
10565
10566 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
10567 (genmoddep_SOURCES): Likewise.
10568 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
10569 (genmoddep_SOURCES): Likewise.
10570 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
10571 (genmoddep_SOURCES): Likewise.
10572 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
10573 Likewise.
10574 (genmoddep_SOURCES): Likewise.
10575
10576 * genmoddep.awk: New file.
10577
10578 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
10579 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
10580 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
10581 (PModule::rule): Likewise.
10582 (Program::rule): Likewise.
10583 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
10584 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
10585 respectively.
10586
10587 * configure.ac: Rewritten intensively to use host and target
10588 instead of build and host, respectively.
10589
10590 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
10591 (host_cpu): Removed.
10592 (target_cpu): New variable.
10593 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
10594 (BUILD_CC): Removed.
10595 (BUILD_CFLAGS): Likewise.
10596 (BUILD_CPPFLAGS): Likewise.
10597 (TARGET_CC): New variable.
10598 (TARGET_CFLAGS): Likewise.
10599 (TARGET_CPPFLAGS): Likewise.
10600 (TARGET_LDFLAGS): Likewise.
10601 (AWK): Likewise.
10602 (include): Use target_cpu instead of host_cpu.
10603 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 10604
b977bf01 10605 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
10606
f09771a1 106072006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
10608
10609 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
10610 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
10611 field 'false' to 'exec_on_false'.
10612 (grub_script_create_cmdif): Renamed argument names to reflect above
10613 changes.
10614
10615 * normal/execute.c (grub_script_execute_cmdif): Likewise.
10616
10617 * normal/script.c (grub_script_create_cmdif): Likewise.
10618
118f4fb3 106192006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
10620
10621 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
10622 top.
10623 (grub_hfsplus_btree_recptr): Likewise.
10624 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
10625 FILEBLOCK both to pass a block number and store next block
10626 number.
10627 (grub_hfsplus_read_block): Rewritten heavily to support an extent
10628 overflow file correctly. Specify errors appropriately, because
10629 fshelp expects that GRUB_ERRNO is set when fails. Reuse
10630 grub_hfsplus_btree_recptr to get the pointer to a found key.
10631 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
10632 is found.
10633
10634 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
10635 linux.mod.
10636 (_linux_mod_SOURCES): New variable.
10637 (_linux_mod_CFLAGS): Likewise.
10638 (_linux_mod_LDFLAGS): Likewise.
10639 (linux_mod_SOURCES): Likewise.
10640 (linux_mod_CFLAGS): Likewise.
10641 (linux_mod_LDFLAGS): Likewise.
10642
10643 * DISTLIST: Added loader/i386/efi/linux.c,
10644 loader/i386/efi/linux_normal.c and
10645 include/grub/i386/efi/loader.h.
10646
10647 * loader/i386/efi/linux.c: New file.
10648 * loader/i386/efi/linux_normal.c: Likewise.
10649 * include/grub/i386/efi/loader.h: Likewise.
10650
89a7d726 106512006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
10652
10653 * commands/blocklist.c: New file.
10654
10655 * DISTLIST: Added commands/blocklist.c.
10656
10657 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 10658 color for the background, and a darker color for the foreground.
89a7d726 10659 (grub_console_checkkey): Return READ_KEY.
10660 (grub_console_cls): Set the background to
10661 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
10662
10663 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
10664
10665 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
10666 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
10667
10668 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
10669 prototype.
10670
10671 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
10672 BG. The spec is wrong again.
10673
10674 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
10675 prototype.
10676 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
10677
10678 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
10679 commands/blocklist.c.
10680 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 10681
89a7d726 10682 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
10683 (blocklist_mod_SOURCES): New variable.
10684 (blocklist_mod_CFLAGS): Likewise.
10685 (blocklist_mod_LDFLAGS): Likewise.
10686
75c8f258 106872006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
10688
10689 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
10690 duplication.
10691 (lba_mode): Use %eax more intensively to reduce the code size.
10692
da2eb181 106932006-05-20 Marco Gerards <marco@gnu.org>
10694
10695 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
10696
10697 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
10698 for `menuentry'.
10699 (script): Accept leading newlines.
10700 (newlines): New rule to describe 0 or more newlines.
10701 (commands): Accept `command' with trailing newline. Fixed the
10702 order in which arguments were passed to `grub_script_add_cmd'.
10703 Accept commands separated by newlines.
10704 (function): Changed to accept newlines.
10705 (menuentry) Rewritten.
10706
10707 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
10708 front of the list, instead of to the end.
10709
577b4050 107102006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
10711
10712 * util/i386/pc/grub-install.in (bindir): New variable.
10713 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
10714 Shaver <lbgwjl@gmail.com>.
10715
0d6e1189 107162006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
10717
10718 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
10719 grub/machine/linux.h
10720 * loader/i386/pc/linux.c: Likewise.
10721
10722 * include/grub/i386/pc/linux.h: Moved to ...
10723 * include/grub/i386/linux.h: ... here.
10724
10725 * include/grub/i386/linux.h (struct linux_kernel_params): New
10726 struct.
f19dbdb7 10727
31b86e9f 107282006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
10729
10730 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
10731 checking.
10732 (grub_video_vbe_blit_glyph): Likewise.
10733 (grub_video_vbe_blit_bitmap): Likewise.
10734 (grub_video_vbe_blit_render_target): Likewise.
10735
83b984de 107362006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
10737
10738 * configure.ac (--with-platform): Properly quote the square
10739 brackets.
10740
5f0413bd 107412006-05-08 Marco Gerards <marco@gnu.org>
10742
10743 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
10744 this...
10745 (kernel_elf_HEADERS): ...to this. Updated all users.
10746 (grubof_symlist.c): Renamed from this...
10747 (kernel_elf_symlist.c): ...to this. Updated all users.
10748 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10749 (grubof_SOURCES): Renamed from this...
10750 (kernel_elf_SOURCES): ...to this.
10751 (grubof_HEADERS): Renamed from this...
10752 (kernel_elf_HEADERS): ...to this.
10753 (grubof_CFLAGS): Renamed from this...
10754 (kernel_elf_CFLAGS): ...to this.
10755 (grubof_ASFLAGS): Renamed from this...
10756 (kernel_elf_ASFLAGS): ...to this.
10757 (grubof_LDFLAGS): Renamed from this...
10758 (kernel_elf_LDFLAGS): ...to this.
10759
10760 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
10761 this...
10762 (kernel_elf_HEADERS): ...to this. Updated all users.
10763 (grubof_symlist.c): Renamed from this...
10764 (kernel_elf_symlist.c): ...to this. Updated all users.
10765 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
10766 (grubof_SOURCES): Renamed from this...
10767 (kernel_elf_SOURCES): ...to this.
10768 (grubof_HEADERS): Renamed from this...
10769 (kernel_elf_HEADERS): ...to this.
10770 (grubof_CFLAGS): Renamed from this...
10771 (kernel_elf_CFLAGS): ...to this.
10772 (grubof_ASFLAGS): Renamed from this...
10773 (kernel_elf_ASFLAGS): ...to this.
10774 (grubof_LDFLAGS): Renamed from this...
10775 (kernel_elf_LDFLAGS): ...to this.
10776
10777 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
10778 `kernel.elf' instead of `grubof'.
10779
05568c2e 107802006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
10781
10782 Add --with-platform to configure. Use pkglibdir instead of
10783 pkgdatadir. This is reported by Roger Leigh.
10784
10785 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
10786 (host_vendor): Likewise.
10787 (host_os): Likewise.
10788 (pkgdatadir): Likewise.
10789 (platform): New variable.
10790 (pkglibdir): Likewise.
10791 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 10792
05568c2e 10793 * util/i386/pc/grub-install.in (datadir): Removed.
10794 (host_vendor): Likewise.
10795 (host_os): Likewise.
10796 (pkgdatadir): Likewise.
10797 (platform): New variable.
10798 (pkglibdir): Likewise.
10799 Use PKGLIBDIR instead of PKGDATADIR.
10800
10801 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
10802 instead of GRUB_DATADIR.
10803 (main): Likewise.
10804 * util/i386/pc/grub-mkimage.c (usage): Likewise.
10805 (main): Likewise.
10806 * util/i386/efi/grub-mkimage.c (usage): Likewise.
10807 (main): Likewise.
10808
10809 * configure.ac (--with-platform): New option.
10810 Use PLATFORM instead of HOST_VENDOR to specify a platform.
10811
10812 * Makefile.in: Include a makefile based on PLATFORM instead of
10813 HOST_VENDOR.
10814 (pkgdatadir): Not appended by the machine type.
10815 (pkglibdir): Appended by the machine type.
10816 (host_vendor): Removed.
10817 (platform): New variable.
10818 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
10819 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
10820 (uninstall): Likewise.
10821
4e93851c 108222006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
10823
10824 Use the environment context in the menu. Remove the commands
10825 "default" and "timeout", and use variables instead.
f19dbdb7 10826
4e93851c 10827 * normal/menu.c: Include grub/env.h.
10828 (print_entry): Cast TITLE to silence gcc.
10829 (get_timeout): New function.
10830 (set_timeout): Likewise.
10831 (get_entry_number): Likewise.
10832 (run_menu): Use a default entry, a fallback entry and a timeout
10833 in the environment variables "default", "fallback" and
10834 "timeout". Also, tweak the default entry if it is not within the
10835 current menu entries.
10836 (grub_menu_run): Use a fallback entry in the environment variable
10837 "fallback".
10838
10839 * normal/main.c (read_config_file): Do not initialize
10840 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
10841 NEWMENU->TIMEOUT.
10842 (grub_normal_execute): Use a data slot to store the menu.
10843
10844 * include/grub/normal.h (struct grub_menu): Removed default_entry,
10845 fallback_entry and timeout.
10846 (struct grub_menu_list): Removed.
10847 (grub_menu_list_t): Likewise.
10848 (struct grub_context): Likewise.
10849 (grub_context_t): Likewise.
10850 (grub_context_get): Likewise.
10851 (grub_context_get_current_menu): Likewise.
10852 (grub_context_push_menu): Likewise.
10853 (grub_context_pop_menu): Likewise.
10854 (grub_default_init): Likewise.
10855 (grub_default_fini): Likewise.
10856 (grub_timeout_init): Likewise.
10857 (grub_timeout_fini): Likewise.
10858
10859 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
10860 and timeout.mod.
10861 (normal_mod_SOURCES): Removed normal/context.c.
10862
10863 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
10864 commands/default.c, commands/timeout.c and normal/context.c.
10865 (normal_mod_SOURCES): Removed normal/context.c.
10866
10867 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
10868 commands/timeout.c and normal/context.c.
10869 (normal_mod_SOURCES): Removed normal/context.c.
10870
10871 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
10872 commands/default.c, commands/timeout.c and normal/context.c.
10873 (normal_mod_SOURCES): Removed normal/context.c.
10874
10875 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
10876 timeout.mod.
10877 (default_mod_SOURCES): Removed.
10878 (default_mod_CFLAGS): Likewise.
10879 (default_mod_LDFLAGS): Likewise.
10880 (timeout_mod_SOURCES): Removed.
10881 (timeout_mod_CFLAGS): Likewise.
10882 (timeout_mod_LDFLAGS): Likewise.
10883
10884 * DISTLIST: Removed commands/default.c, commands/timeout.c and
10885 normal/context.c.
10886
10887 * commands/default.c: Removed.
10888 * commands/timeout.c: Likewise.
10889 * normal/context.c: Likewise.
10890
1eb9cc1d 108912006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
10892
10893 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
10894
385bd9c1 108952006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
10896
10897 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
10898 "next" to "prev" for readability.
10899 (struct grub_env_sorted_var): New struct.
10900 (grub_env_context): Renamed to ...
10901 (initial_context): ... this.
10902 (grub_env_var_context): Renamed to ...
10903 (current_context): ... this.
10904 (grub_env_find): Look only at CURRENT_CONTEXT.
10905 (grub_env_context_open): Rewritten to copy exported variables from
10906 previous context.
10907 (grub_env_context_close): Rewritten according to the new
10908 scheme. Also, add an assertion to prevent the initial context from
10909 removed.
10910 (grub_env_insert): Removed the code for the sorted list.
10911 (grub_env_remove): Likewise.
10912 (grub_env_export): Simply mark the variable with
10913 GRUB_ENV_VAR_GLOBAL.
10914 (grub_env_set): A cosmetic change for naming consistency.
10915 (grub_env_get): Likewise.
10916 (grub_env_unset): Likewise.
10917 (grub_env_iterate): Rewritten to sort variables within this
10918 function.
10919 (grub_register_variable_hook): Fixed for naming consistency. Call
10920 grub_env_find again, only if NAME is not found at the first time.
10921 (mangle_data_slot_name): New function.
10922 (grub_env_set_data_slot): Likewise.
10923 (grub_env_get_data_slot): Likewise.
10924 (grub_env_unset_data_slot): Likewise.
10925
10926 * include/grub/env.h (grub_env_var_type): New enum.
10927 (GRUB_ENV_VAR_LOCAL): New constant.
10928 (GRUB_ENV_VAR_GLOBAL): Likewise.
10929 (GRUB_ENV_VAR_DATA): Likewise.
10930 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
10931 "type".
10932 (grub_env_set): Replace VAR with NAME for consistency.
10933 (grub_register_variable_hook): Likewise.
10934 (grub_env_export): Specify the name of the argument.
10935 (grub_env_set_data_slot): New prototype.
10936 (grub_env_get_data_slot): Likewise.
10937 (grub_env_unset_data_slot): Likewise.
10938
7f362539 109392006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
10940
10941 Extend the loader so that GRUB can accept a loader which comes
10942 back to GRUB when a loaded image exits. Also, this change adds
10943 support for a chainloader on EFI.
f19dbdb7 10944
7f362539 10945 * term/efi/console.c: Include grub/misc.h.
10946 (grub_console_checkkey): Display a scan code on the top for
10947 debugging. This will be removed once the EFI port gets stable.
10948 Correct the scan code mapping.
10949
10950 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
10951 allocate memory from larger regions, in order to reduce the number
10952 of allocated regions. Otherwise, the MacOSX loader panics.
10953 (filter_memory_map): Avoid less than 1MB for compatibility with
10954 other loaders.
10955 (add_memory_regions): Allocate from the tail of a region, if
10956 possible, to avoid allocating a region near to 1MB, for the MacOSX
10957 loader.
10958
10959 * kern/efi/init.c (grub_efi_set_prefix): Specify
10960 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
10961
10962 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
10963 argument IMAGE_HANDLE and specify it to get a loaded image.
10964 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
10965 grub_efi_get_loaded_image.
fe6b695a 10966 (grub_efi_get_filename): Divide the length by the size of
7f362539 10967 grub_efi_char16_t.
10968 (grub_efi_get_device_path): New function.
10969 (grub_efi_print_device_path): Print End Device Path nodes. Divide
10970 the length by the size of grub_efi_char16_t for a file path device
10971 path node.
10972
10973 * kern/loader.c (grub_loader_noreturn): New variable.
10974 (grub_loader_set): Accept a new argument NORETURN. Set
10975 GRUB_LOADER_NORETURN to NORETURN.
10976 All callers changed.
10977 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
10978 grub_machine_fini.
10979
10980 * include/grub/efi/efi.h (grub_efi_get_device_path): New
10981 prototype.
10982 (grub_efi_get_loaded_image): Take an argument to specify an image
10983 handle.
10984
10985 * include/grub/loader.h (grub_loader_set): Added one more argument
10986 NORETURN.
10987
10988 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
10989 instead of grub_efi_open_protocol.
10990 (grub_efidisk_get_device_name): Likewise.
10991 (grub_efidisk_close): Print a newline.
10992 (grub_efidisk_get_device_handle): Fixed to use
10993 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
10994 GRUB_EFI_DEVICE_PATH_TYPE.
10995
10996 * disk/efi/efidisk.c (device_path_guid): Moved to ...
10997 * kern/efi/efi.c (device_path_guid): ... here.
10998
10999 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
11000 chain.mod.
11001 (kernel_mod_HEADERS): Added efi/disk.h.
11002 (_chain_mod_SOURCES): New variable.
11003 (_chain_mod_CFLAGS): Likewise.
11004 (_chain_mod_LDFLAGS): Likewise.
11005 (chain_mod_SOURCES): Likewise.
11006 (chain_mod_CFLAGS): Likewise.
11007 (chain_mod_LDFLAGS): Likewise.
11008
11009 * DISTLIST: Added include/grub/efi/chainloader.h,
11010 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
11011
11012 * include/grub/efi/chainloader.h: New file.
11013 * loader/efi/chainloader.c: Likewise.
11014 * loader/efi/chainloader_normal.c: Likewise.
11015
c0111d6e 110162006-04-30 Marco Gerards <marco@gnu.org>
11017
11018 * commands/configfile.c (grub_cmd_source): New function.
11019 (GRUB_MOD_INIT): Register the commands `source' and `.'.
11020 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
11021
df5341da 110222006-04-30 Marco Gerards <marco@gnu.org>
11023
11024 * normal/execute.c (grub_script_execute_cmd): Change the return
11025 type to `grub_err_t'. Correctly return the error.
11026 (grub_script_execute_cmdline): In case a command line is not a
11027 command or a function, try to interpret it as an assignment.
11028
f85934bd 110292006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
11030
11031 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
11032 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
11033 skip a node whose name is obviously invalid as UTF-16,
11034 i.e. contains a NUL character. Stop the iteration when the last
11035 directory entry is found. Instead of using the return value of
11036 grub_hfsplus_btree_iterate_node, store the value in RET and use
11037 it, because the iterator can be stopped by the last directory
11038 entry.
11039
8f8a2cf8 110402006-04-30 Marco Gerards <marco@gnu.org>
11041
11042 * include/grub/env.h (grub_env_export): New prototype. Reported
11043 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
11044
a27e84ce 110452006-04-30 Marco Gerards <marco@gnu.org>
11046
11047 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
11048 size of the extents in a catalog file record.
11049
eaef0553 110502006-04-29 Marco Gerards <marco@gnu.org>
11051
11052 * commands/configfile.c (grub_cmd_configfile): Execute the
11053 configfile within its own context.
11054
11055 * include/grub/env.h (grub_env_context_open): New prototype.
11056 (grub_env_context_close): Likewise.
11057
11058 * kern/env.c (grub_env): Removed.
11059 (grub_env_sorted): Likewise.
11060 (grub_env_context): New variable.
11061 (grub_env_var_context): Likewise.
11062 (grub_env_find): Search both the active context and the global
11063 context.
11064 (grub_env_context_open): New function.
11065 (grub_env_context_close): Likewise.
11066 (grub_env_insert): Likewise.
11067 (grub_env_remove): Likewise.
11068 (grub_env_export): Likewise.
11069 (grub_env_set): Changed to use helper functions to avoid code
11070 duplication.
11071 (grub_env_iterate): Rewritten so both the current context and the
11072 global context are being used.
11073
11074 * normal/command.c (export_command): New function.
11075 (grub_command_init): Register the `export' function.
11076
7b455f4d 110772006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
11078
11079 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
11080 explicitly to suppress gcc's warnings.
11081 * fs/fat.c (grub_fat_find_dir): Likewise.
11082 (grub_fat_label): Likewise.
11083 * fs/xfs.c (grub_xfs_read_inode): Likewise.
11084 (grub_xfs_mount): Likewise.
11085 (grub_xfs_label): Likewise.
11086 * fs/affs.c (grub_affs_mount): Likewise.
11087 (grub_affs_label): Likewise.
11088 (grub_affs_iterate_dir): Likewise.
11089 * fs/sfs.c (grub_sfs_mount): Likewise.
11090 (grub_sfs_iterate_dir): Likewise.
11091 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
11092 * fs/hfs.c (grub_hfs_mount): Likewise.
11093 (grub_hfs_cmp_catkeys): Likewise.
11094 (grub_hfs_find_dir): Likewise.
11095 (grub_hfs_dir): Likewise.
11096 (grub_hfs_label): Likewise.
11097 * fs/jfs.c (grub_jfs_mount): Likewise.
11098 (grub_jfs_opendir): Likewise.
11099 (grub_jfs_getent): Likewise.
11100 (grub_jfs_lookup_symlink): Likewise.
11101 (grub_jfs_label): Likewise.
11102 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
11103 (grub_hfsplus_iterate_dir): Likewise.
11104 (grub_hfsplus_btree_iterate_node): Made static.
11105
11106 * util/grub-emu.c (prefix): New variable.
11107 (grub_machine_set_prefix): New function.
11108 (main): Do not set the environment variable "prefix" here. Only
11109 set PREFIX, which is used later by grub_machine_set_prefix.
11110
11111 * include/grub/video.h: Do not include grub/symbol.h.
11112 (grub_video_register): Not exported. This symbol is not defined in
11113 the kernel.
11114 (grub_video_unregister): Likewise.
11115 (grub_video_iterate): Likewise.
11116 (grub_video_setup): Likewise.
11117 (grub_video_restore): Likewise.
11118 (grub_video_get_info): Likewise.
11119 (grub_video_get_blit_format): Likewise.
11120 (grub_video_set_palette): Likewise.
11121 (grub_video_get_palette): Likewise.
11122 (grub_video_set_viewport): Likewise.
11123 (grub_video_get_viewport): Likewise.
11124 (grub_video_map_color): Likewise.
11125 (grub_video_map_rgb): Likewise.
11126 (grub_video_map_rgba): Likewise.
11127 (grub_video_fill_rect): Likewise.
11128 (grub_video_blit_glyph): Likewise.
11129 (grub_video_blit_bitmap): Likewise.
11130 (grub_video_blit_render_target): Likewise.
11131 (grub_video_scroll): Likewise.
11132 (grub_video_swap_buffers): Likewise.
11133 (grub_video_create_render_target): Likewise.
11134 (grub_video_delete_render_target): Likewise.
11135 (grub_video_set_active_render_target): Likewise.
11136
11137 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
11138 Undefined.
11139 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
11140
11141 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
11142 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11143 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11144 instead of $(srcdir)/genkernsyms.sh.
11145
11146 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
11147 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11148 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11149 instead of $(srcdir)/genkernsyms.sh.
11150
11151 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
11152 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11153 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11154 instead of $(srcdir)/genkernsyms.sh.
11155
11156 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
11157 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
11158 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
11159 instead of $(srcdir)/genkernsyms.sh.
11160
11161 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
11162 genkernsyms.sh.
11163
11164 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
11165 genkernsyms.sh.
11166 (gensymlist.sh): New target.
11167 (genkernsyms.sh): Likewise.
11168
11169 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
11170 genkernsyms.sh.in and gensymlist.sh.in.
11171
11172 * genkernsyms.sh: Removed.
11173 * gensymlist.sh: Likewise.
f19dbdb7 11174
7b455f4d 11175 * genkernsyms.sh.in: New file.
11176 * gensymlist.sh.in: Likewise.
11177
1885bb27 111782006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11179
11180 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
11181 clobber "prefix", since we may have already set it manually.
11182
71538dff 111832006-04-25 Hollis Blanchard <hollis@penguinppc.org>
11184
11185 * kern/misc.c (abort): New alias for grub_abort.
11186
2965c7cc 111872006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
11188
11189 A new machine-specific function "grub_machine_set_prefix" is
11190 defined. This is called after loading modules, so that a prefix
11191 initialization can use modules. Also, this change adds an
11192 intensive debugging feature for the memory manager via the
11193 configure option "--enable-mm-debug".
f19dbdb7 11194
2965c7cc 11195 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
11196 PART.LEN.
11197
11198 * kern/sparc64/ieee1275/init.c (abort): Removed.
11199 (grub_stop): Likewise.
11200 (grub_exit): New function.
11201 (grub_set_prefix): Renamed to ...
11202 (grub_machine_set_prefix): ... this.
11203 (grub_machine_init): Do not call grub_set_prefix.
11204
11205 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
11206 (grub_machine_set_prefix): ... this.
11207 (grub_machine_init): Do not call grub_set_prefix.
11208
11209 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
11210 (grub_machine_init): Do not set the prefix here.
11211
11212 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
11213
11214 * kern/efi/init.c: Include grub/mm.h.
11215 (grub_efi_set_prefix): New function.
11216
11217 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
11218 (grub_efi_get_filename): New function.
11219 (grub_print_device_path): Renamed to ...
11220 (grub_efi_print_device_path): ... this.
11221
11222 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
11223 [MM_DEBUG] (grub_realloc): Likewise.
11224 [MM_DEBUG] (grub_free): Likewise.
11225 [MM_DEBUG] (grub_memalign): Likewise.
11226 [MM_DEBUG] (grub_mm_debug): New variable.
11227 [MM_DEBUG] (grub_debug_malloc): New function.
11228 [MM_DEBUG] (grub_debug_free): New function.
11229 [MM_DEBUG] (grub_debug_realloc): New function.
11230 [MM_DEBUG] (grub_debug_memalign): New function.
11231
11232 * kern/misc.c (grub_abort): Print a newline to distinguish
11233 the message.
11234
11235 * kern/main.c (grub_main): Call grub_machine_set_prefix and
11236 grub_set_root_dev after loading modules. This is necessary when
11237 setting a prefix depends on modules.
11238
11239 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
11240 (grub_efi_print_device_path): ... this.
11241 (grub_efi_get_filename): New prototype.
11242 (grub_efi_set_prefix): Likewise.
11243
11244 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
11245 and grub/disk.h.
11246 (grub_efidisk_get_device_handle): New prototype.
11247 (grub_efidisk_get_device_name): Likewise.
11248
11249 * include/grub/mm.h: Include config.h.
11250 (MM_DEBUG): Removed.
11251 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
11252 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
11253 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
11254 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
11255 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
11256 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
11257 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
11258 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
11259 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
11260
11261 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
11262
11263 * disk/efi/efidisk.c: Include grub/partition.h.
11264 (iterate_child_devices): New function.
11265 (add_device): First, compare only last device path nodes, so that
11266 devices are sorted by the types.
11267 (grub_efidisk_get_device_handle): New function.
11268 (grub_efidisk_get_device_name): Likewise.
11269
11270 * configure.ac (--enable-mm-debug): New option to enable the
11271 memory manager debugging feature. This makes the binary much
11272 bigger, so is disabled by default.
11273
9cacaa17 112742006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
11275
11276 Use grub_abort instead of grub_stop, and grub_exit must be
11277 define in each architecture now. Also, this change adds support
11278 for EFI disks.
f19dbdb7 11279
9cacaa17 11280 * util/i386/pc/grub-probefs.c: Include grub/term.h.
11281 (grub_getkey): New function.
11282 (grub_term_get_current): Likewise.
11283
11284 * util/i386/pc/grub-setup.c: Include grub/term.h.
11285 (grub_getkey): New function.
11286 (grub_term_get_current): Likewise.
11287
11288 * util/misc.c (grub_stop): Renamed to ...
11289 (grub_exit): ... this.
11290
11291 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
11292 (grub_exit): ... this.
11293 (grub_machine_init): Use grub_abort instead of abort.
11294 (grub_stop): Removed.
11295
11296 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
11297 abort.
11298
11299 * kern/i386/pc/startup.S (grub_exit): New function.
11300 (cold_reboot): New label.
11301
11302 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
11303 (grub_efi_init): Call grub_efidisk_init.
11304 (grub_efi_fini): Call grub_efidisk_fini.
11305
11306 * kern/efi/efi.c: Include grub/mm.h.
11307 (grub_efi_console_control_guid): Renamed to ...
11308 (console_control_guid): ... this.
11309 (grub_efi_loaded_image_guid): Renamed to ...
11310 (loaded_image_guid): ... this.
11311 (grub_efi_locate_handle): New function.
11312 (grub_efi_open_protocol): Likewise.
11313 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
11314 GRUB_EFI_CONSOLE_CONTROL_GUID.
11315 (grub_efi_exit): Removed.
11316 (grub_stop): Likewise.
11317 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
11318 (grub_exit): New function.
11319 (grub_print_device_path): Likewise.
11320
11321 * kern/rescue.c (grub_rescue_cmd_exit): New function.
11322 (grub_enter_rescue_mode): Register "exit".
11323
11324 * kern/misc.c (grub_real_dprintf): A cosmetic change.
11325 (grub_abort): New function.
11326
11327 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
11328
11329 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
11330
11331 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
11332
11333 * include/grub/efi/efi.h (grub_efi_exit): Removed.
11334 (grub_print_device_path): New prototype.
11335 (grub_efi_locate_handle): Likewise.
11336 (grub_efi_open_protocol): Likewise.
11337
11338 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
11339 * disk/efi/efidisk.c: Likewise.
11340
11341 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
11342
11343 * include/grub/efi/console_control.h
11344 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
11345
11346 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
11347 last 8 bytes as an array.
11348 (GRUB_EFI_DISK_IO_GUID): New macro.
11349 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
11350 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
11351 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
11352 grub_uint8_t.
11353 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
11354 (struct grub_efi_device_path): Rename the member "sub_type" to
11355 "subtype".
11356 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
11357 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
11358 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
11359 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
11360 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
11361 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
11362 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
11363 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
11364 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
11365 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
11366 (struct grub_efi_pci_device_path): New structure.
11367 (grub_efi_pci_device_path_t): New type.
11368 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
11369 (struct grub_efi_pccard_device_path): New structure.
11370 (grub_efi_pccard_device_path_t): New type.
11371 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
11372 (struct grub_efi_memory_mapped_device_path): New structure.
11373 (grub_efi_memory_mapped_device_path_t): New type.
11374 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
11375 (struct grub_efi_vendor_device_path): New structure.
11376 (grub_efi_vendor_device_path_t): New type.
11377 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
11378 (struct grub_efi_controller_device_path): New structure.
11379 (grub_efi_controller_device_path_t): New type.
11380 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
11381 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
11382 (struct grub_efi_acpi_device_path): New structure.
11383 (grub_efi_acpi_device_path_t): New type.
11384 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
11385 (struct grub_efi_expanded_acpi_device_path): New structure.
11386 (grub_efi_expanded_acpi_device_path_t): New type.
11387 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
11388 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
11389 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
11390 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
11391 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
11392 (struct grub_efi_atapi_device_path): New structure.
11393 (grub_efi_atapi_device_path_t): New type.
11394 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
11395 (struct grub_efi_fibre_channel_device_path): New structure.
11396 (grub_efi_fibre_channel_device_path_t): New type.
11397 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
11398 (struct grub_efi_1394_device_path): New structure.
11399 (grub_efi_1394_device_path_t): New type.
11400 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
11401 (struct grub_efi_usb_device_path): New structure.
11402 (grub_efi_usb_device_path_t): New type.
11403 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
11404 (struct grub_efi_usb_class_device_path): New structure.
11405 (grub_efi_usb_class_device_path_t): New type.
11406 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
11407 (struct grub_efi_i2o_device_path): New structure.
11408 (grub_efi_i2o_device_path_t): New type.
11409 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
11410 (struct grub_efi_mac_address_device_path): New structure.
11411 (grub_efi_mac_address_device_path_t): New type.
11412 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
11413 (struct grub_efi_ipv4_device_path): New structure.
11414 (grub_efi_ipv4_device_path_t): New type.
11415 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
11416 (struct grub_efi_ipv6_device_path): New structure.
11417 (grub_efi_ipv6_device_path_t): New type.
11418 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
11419 (struct grub_efi_infiniband_device_path): New structure.
11420 (grub_efi_infiniband_device_path_t): New type.
11421 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
11422 (struct grub_efi_uart_device_path): New structure.
11423 (grub_efi_uart_device_path_t): New type.
11424 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
11425 (struct grub_efi_vendor_messaging_device_path): New structure.
11426 (grub_efi_vendor_messaging_device_path_t): New type.
11427 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
11428 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
11429 (struct grub_efi_hard_drive_device_path): New structure.
11430 (grub_efi_hard_drive_device_path_t): New type.
11431 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
11432 (struct grub_efi_cdrom_device_path): New structure.
11433 (grub_efi_cdrom_device_path_t): New type.
11434 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
11435 (struct grub_efi_vendor_media_device_path): New structure.
11436 (grub_efi_vendor_media_device_path_t): New type.
11437 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
11438 (struct grub_efi_file_path_device_path): New structure.
11439 (grub_efi_file_path_device_path_t): New type.
11440 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
11441 (struct grub_efi_protocol_device_path): New structure.
11442 (grub_efi_protocol_device_path_t): New type.
11443 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
11444 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
11445 (struct grub_efi_bios_device_path): New structure.
11446 (grub_efi_bios_device_path_t): New type.
11447 (struct grub_efi_disk_io): New structure.
11448 (grub_efi_disk_io_t): New type.
11449 (struct grub_efi_block_io_media): New structure.
11450 (grub_efi_block_io_media_t): New type.
11451 (struct grub_efi_block_io): New structure.
11452 (grub_efi_block_io_t): New type.
11453
11454 * include/grub/misc.h (grub_stop): Removed.
11455 (grub_exit): New prototype.
11456 (grub_abort): Likewise.
11457
11458 * include/grub/disk.h (enum grub_disk_dev_id): Added
11459 GRUB_DISK_DEVICE_EFIDISK_ID.
11460
11461 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
11462 disk/efi/efidisk.c.
11463 (kernel_syms.lst): Remove the target if an error occurs.
11464
49986a9f 114652006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
11466
11467 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
11468 as it was simply too buggy.
11469
970d3b8a 114702006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
11471
11472 * kern/misc.c (grub_lltoa): New function.
11473 (grub_vsprintf): Added support for the long long suffix,
11474 i.e. "ll".
11475
ff04ec24 114762006-04-20 Hollis Blanchard <hollis@penguinppc.org>
11477
11478 * Makefile.in (LDFLAGS): Add variable.
11479 (LD): Remove variable.
11480 * configure.ac: Add -m32 to LDFLAGS.
11481 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
11482 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
11483 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
11484 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
11485 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
11486 variables.
11487 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
11488 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
11489 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
11490
37e5e1a4 114912006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
11492
11493 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
11494 length for unknown glyph.
11495
c352d8dd 114962006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
11497
2eab1c0d 11498 Add support for pre-loaded modules into the EFI port.
f19dbdb7 11499
2eab1c0d 11500 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
11501 completely. Accept one more argument DIR. The caller has changed.
11502
11503 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
11504
11505 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
11506 (grub_efi_loaded_image_guid): New variable.
11507 (grub_efi_get_loaded_image): New function.
11508 (grub_arch_modules_addr): Likewise.
11509
11510 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
11511 prototype.
11512
11513 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
11514 (struct grub_efi_loaded_image): New structure.
11515 (grub_efi_loaded_image_t): New type.
11516
115172006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 11518
c352d8dd 11519 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
11520 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
11521 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
11522
6d01d6b4 115232006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
11524
11525 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
11526
976a4ea0 115272006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
11528
11529 * DISTLIST: Added include/grub/efi/console.h,
11530 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
11531 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11532
11533 * include/grub/efi/console.h: New file.
11534 * include/grub/efi/time.h: Likewise.
11535 * include/grub/i386/efi/kernel.h: Likewise.
11536 * kern/efi/init.c: Likewise.
11537 * kern/efi/mm.c: Likewise.
11538 * term/efi/console.c: Likewise.
f19dbdb7 11539
976a4ea0 11540 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
11541 (grub_stop): Removed.
11542 (grub_get_rtc): Likewise.
11543 (grub_machine_init): Simply call grub_efi_init.
11544 (grub_machine_fini): Call grub_efi_fini.
11545
11546 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
11547 (grub_efi_output_string): Removed.
11548 (grub_efi_stall): New function.
11549 (grub_stop): Likewise.
11550 (grub_get_rtc): Likewise.
11551
11552 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
11553 (grub_efi_stall): New prototype.
11554 (grub_efi_allocate_pages): Likewise.
11555 (grub_efi_free_pages): Likewise.
11556 (grub_efi_get_memory_map): Likewise.
11557 (grub_efi_mm_init): Likewise.
11558 (grub_efi_mm_fini): Likewise.
11559 (grub_efi_init): Likewise.
11560 (grub_efi_fini): Likewise.
11561
11562 * include/grub/i386/efi/time.h: Do not include
11563 grub/symbol.h. Include grub/efi/time.h.
11564 (GRUB_TICKS_PER_SECOND): Removed.
11565 (grub_get_rtc): Likewise.
11566
11567 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
11568 Added padding. The EFI spec is buggy.
11569 (GRUB_EFI_BLACK): New macro.
11570 (GRUB_EFI_BLUE): Likewise.
11571 (GRUB_EFI_GREEN): Likewise.
11572 (GRUB_EFI_CYAN): Likewise.
11573 (GRUB_EFI_RED): Likewise.
11574 (GRUB_EFI_MAGENTA): Likewise.
11575 (GRUB_EFI_BROWN): Likewise.
11576 (GRUB_EFI_LIGHTGRAY): Likewise.
11577 (GRUB_EFI_BRIGHT): Likewise.
11578 (GRUB_EFI_DARKGRAY): Likewise.
11579 (GRUB_EFI_LIGHTBLUE): Likewise.
11580 (GRUB_EFI_LIGHTGREEN): Likewise.
11581 (GRUB_EFI_LIGHTCYAN): Likewise.
11582 (GRUB_EFI_LIGHTRED): Likewise.
11583 (GRUB_EFI_LIGHTMAGENTA): Likewise.
11584 (GRUB_EFI_YELLOW): Likewise.
11585 (GRUB_EFI_WHITE): Likewise.
11586 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
11587 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
11588 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
11589 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
11590 (GRUB_EFI_BACKGROUND_RED): Likewise.
11591 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
11592 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
11593 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
11594 (GRUB_EFI_TEXT_ATTR): Likewise.
11595
11596 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
11597 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
11598 (kernel_mod_HEADERS): Added efi/time.h.
11599
83709125 116002006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
11601
11602 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
11603 include/grub/efi/api.h, include/grub/efi/console_control.h,
11604 include/grub/efi/efi.h, include/grub/efi/pe32.h,
11605 include/grub/i386/efi/time.h, kern/efi/efi.c,
11606 kern/i386/efi/init.c, kern/i386/efi/startup.S,
11607 and util/i386/efi/grub-mkimage.c.
11608
11609 * Makefile.in (RMKFILES): Added i386-efi.rmk.
11610
11611 * genmk.rb (PModule#rule): Do not export symbols if
11612 #{prefix}_EXPORTS is set to "no".
11613
11614 * conf/i386-efi.mk: New file.
11615 * conf/i386-efi.rmk: Likewise.
11616 * include/grub/efi/api.h: Likewise.
11617 * include/grub/efi/console_control.h: Likewise.
11618 * include/grub/efi/efi.h: Likewise.
11619 * include/grub/efi/pe32.h: Likewise.
11620 * include/grub/i386/efi/time.h: Likewise.
11621 * kern/efi/efi.c: Likewise.
11622 * kern/i386/efi/init.c: Likewise.
11623 * kern/i386/efi/startup.S: Likewise.
11624 * util/i386/efi/grub-mkimage.c: Likewise.
11625
116262006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 11627
11628 * include/grub/script.h: Include <grub/parser.h> and
11629 "grub_script.tab.h".
11630 (struct grub_lexer_param): New struct.
11631 (struct grub_parser_param): Likewise.
11632 (grub_script_create_arglist): Pass the state in an argument.
11633 (grub_script_add_arglist): Likewise.
11634 (grub_script_create_cmdline): Likewise.
11635 (grub_script_create_cmdblock): Likewise.
11636 (grub_script_create_cmdif): Likewise.
11637 (grub_script_create_cmdmenu): Likewise.
11638 (grub_script_add_cmd): Likewise.
11639 (grub_script_arg_add): Likewise.
11640 (grub_script_lexer_ref): Likewise.
11641 (grub_script_lexer_deref): Likewise.
11642 (grub_script_lexer_record_start): Likewise.
11643 (grub_script_lexer_record_stop): Likewise.
11644 (grub_script_mem_record): Likewise.
11645 (grub_script_mem_record_stop): Likewise.
11646 (grub_script_malloc): Likewise.
11647 (grub_script_yylex): Likewise.
11648 (grub_script_yyparse): Likewise.
11649 (grub_script_yyerror): Likewise.
11650 (grub_script_yylex): Likewise.
11651 (grub_script_lexer_init): Return the state.
11652
11653 * normal/lexer.c (grub_script_lexer_state): Removed variable.
11654 (grub_script_lexer_done): Likewise.
11655 (grub_script_lexer_getline): Likewise.
11656 (grub_script_lexer_refs): Likewise.
11657 (script): Likewise.
11658 (newscript): Likewise.
11659 (record): Likewise.
11660 (recording): Likewise.
11661 (recordpos): Likewise.
11662 (recordlen): Likewise.
11663 (grub_script_lexer_init): Return the state instead of setting
11664 global variables.
11665 (grub_script_lexer_ref): Use the newly added argument for state
11666 instead of globals.
11667 (grub_script_lexer_deref): Likewise.
11668 (grub_script_lexer_record_start): Likewise.
11669 (grub_script_lexer_record_stop): Likewise.
11670 (recordchar): Likewise.
11671 (nextchar): Likewise.
11672 (grub_script_yylex2): Likewise.
11673 (grub_script_yylex): Likewise.
11674 (grub_script_yyerror): Likewise.
11675
11676 * normal/parser.y (func_mem): Removed variable.
11677 (menu_entry): Likewise.
11678 (err): Likewise.
11679 (%lex-param): New parser option.
11680 (%parse-param): Likewise.
11681 (script): Always return the AST.
11682 (argument): Pass the state around.
11683 (arguments): Likewise.
11684 (grubcmd): Likewise.
11685 (commands): Likewise.
11686 (function): Likewise.
11687 (menuentry): Likewise.
11688 (if_statement): Likewise.
11689 (if): Likewise.
11690
11691 * normal/script.c (grub_script_memused): Removed variable.
11692 (grub_script_parsed): Likewise.
11693 (grub_script_malloc): Added a state argument. Use that instead of
11694 global variables.
11695 (grub_script_mem_record): Likewise.
11696 (grub_script_mem_record_stop): Likewise.
11697 (grub_script_arg_add): Likewise.
11698 (grub_script_add_arglist): Likewise.
11699 (grub_script_create_cmdline): Likewise.
11700 (grub_script_create_cmdif): Likewise.
11701 (grub_script_create_cmdmenu): Likewise.
11702 (grub_script_add_cmd): Likewise.
11703 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 11704
e2a8c904 117052006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 11706
11707 * normal/command.c (grub_command_init): Remove the title command.
11708
11709 * normal/lexer.c (grub_script_yylex): Renamed from this...
11710 (grub_script_yylex2): ... to this.
11711 (grub_script_yylex): New function. Temporary
11712 introduced to filter some tokens.
11713 (grub_script_yyerror): Print a newline.
11714
11715 * normal/main.c (read_config_file): Output information about the
11716 lines that contain errors. Wait for a key after all lines have
11717 been processed. Don't return an empty menu.
11718
11719 * normal/parser.y (func_mem): Don't initialize.
11720 (menu_entry): Likewise.
11721 (err): New variable.
11722 (script): Don't return anything when an error was encountered.
11723 (ws, returns): Removed rules.
11724 (argument): Disabled concatenated variable support.
11725 (arguments): Remove explicit separators.
11726 (grubcmd): Likewise.
11727 (function): Likewise.
11728 (menuentry): Likewise.
11729 (if): Likewise.
11730 (commands): Likewise. Add error handling.
11731
11732 * normal/script.c (grub_script_create_cmdline): If
11733 `grub_script_parsed' is 0, assume the parser encountered an error.
11734
c9a86192 117352006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
11736
11737 * configure.ac: Add support for EFI. Fix the typo
11738 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
11739
70f3b243 117402006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11741
11742 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
11743 foreign multibyte characters should be shown correctly.
11744
65f201ad 117452006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
11746
11747 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
11748 calculation.
11749 (read_config_file): Made it to close file before returning.
11750
b4b93674 117512006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
11752
11753 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
11754 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
11755 video/i386/pc/vbefill.c.
11756
11757 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
11758 video/i386/pc/vbefill.c.
11759
11760 * include/grub/video.h (grub_video_blit_format): New enum.
11761 (grub_video_mode_info): Added new member blit_format.
11762 (grub_video_get_blit_format): New function prototype.
11763
11764 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
11765 function prototype.
11766 (grub_video_vbe_map_rgb): Likewise.
11767 (grub_video_vbe_unmap_color): Likewise.
11768
11769 * include/grub/i386/pc/vbeblit.h: New file.
11770
11771 * include/grub/i386/pc/vbefill.h: New file.
11772
11773 * video/video.c (grub_video_get_blit_format): New function.
11774 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
11775 (grub_video_vbe_map_rgb): Likewise.
11776 (grub_video_vbe_unmap_color): Likewise.
11777
11778 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
11779 optimized fills.
11780 (grub_video_vbe_blit_render_target): Changed to use more optimized
11781 blits.
11782 (grub_video_vbe_setup): Added detection for optimized settings.
11783 (grub_video_vbe_create_render_target): Likewise.
11784
11785 * video/i386/pc/vbeblit.c: New file.
11786
11787 * video/i386/pc/vbefill.c: New file.
11788
c2379b9c 117892006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
11790
11791 * font/manager.c (grub_font_get_glyph): Removed font fixup from
11792 here...
11793
11794 * util/unifont2pff.rb: ... and moved it to here. Improved argument
11795 parsing to support both hex and dec ranges. If filename was missing
11796 show usage information.
11797
bd0d7896 117982006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
11799
11800 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
11801 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
11802
11803 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
11804 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
11805 (video_mod_SOURCES): Added.
11806 (video_mod_CFLAGS): Likewise.
11807 (video_mod_LDFLAGS): Likewise.
11808 (gfxterm_mod_SOURCES): Likewise.
11809 (gfxterm_mod_CFLAGS): Likewise.
11810 (gfxterm_mod_LDFLAGS): Likewise.
11811 (videotest_mod_SOURCES): Likewise.
11812 (videotest_mod_CFLAGS): Likewise.
11813 (videotest_mod_LDFLAGS): Likewise.
11814 (vesafb_mod_SOURCES): Removed.
11815 (vesafb_mod_CFLAGS): Likewise.
11816 (vesafb_mod_LDFLAGS): Likewise.
11817 (vga_mod_SOURCES): Likewise.
11818 (vga_mod_CFLAGS): Likewise.
11819 (vga_mod_LDFLAGS): Likewise.
11820
11821 * commands/videotest.c: New file.
11822
11823 * font/manager.c (fill_with_default_glyph): Modified to use
11824 grub_font_glyph.
11825 (grub_font_get_glyph): Likewise.
11826 (fontmanager): Renamed from this...
11827 (font_manager): ... to this.
11828
11829 * include/grub/font.h (grub_font_glyph): Added new structure.
11830 (grub_font_get_glyph): Modified to use grub_font_glyph.
11831
11832 * include/grub/misc.h (grub_abs): Added as inline function.
11833
11834 * include/grub/video.h: New file.
11835
11836 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
11837 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
11838 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
11839 (grub_vbe_get_controller_info): Renamed from this...
11840 (grub_vbe_bios_get_controller_info): ... to this.
11841 (grub_vbe_get_mode_info): Renamed from this...
11842 (grub_vbe_bios_get_mode_info): ... to this.
11843 (grub_vbe_set_mode): Renamed from this...
11844 (grub_vbe_bios_set_mode): ... to this.
11845 (grub_vbe_get_mode): Renamed from this...
11846 (grub_vbe_bios_get_mode): ... to this.
11847 (grub_vbe_set_memory_window): Renamed from this...
11848 (grub_vbe_bios_set_memory_window): ... to this.
11849 (grub_vbe_get_memory_window): Renamed from this...
11850 (grub_vbe_bios_get_memory_window): ... to this.
11851 (grub_vbe_set_scanline_length): Renamed from this...
11852 (grub_vbe_set_scanline_length): ... to this.
11853 (grub_vbe_get_scanline_length): Renamed from this...
11854 (grub_vbe_bios_get_scanline_length): ... to this.
11855 (grub_vbe_set_display_start): Renamed from this...
11856 (grub_vbe_bios_set_display_start): ... to this.
11857 (grub_vbe_get_display_start): Renamed from this...
11858 (grub_vbe_bios_get_display_start): ... to this.
11859 (grub_vbe_set_palette_data): Renamed from this...
11860 (grub_vbe_bios_set_palette_data): ... to this.
11861 (grub_vbe_set_pixel_rgb): Removed.
11862 (grub_vbe_set_pixel_index): Likewise.
11863
11864 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
11865 from this...
11866 (grub_vbe_bios_get_controller_info): ... to this.
11867 (grub_vbe_get_mode_info): Renamed from this...
11868 (grub_vbe_bios_get_mode_info): ... to this.
11869 (grub_vbe_set_mode): Renamed from this...
11870 (grub_vbe_bios_set_mode): ... to this.
11871 (grub_vbe_get_mode): Renamed from this...
11872 (grub_vbe_bios_get_mode): ... to this.
11873 (grub_vbe_set_memory_window): Renamed from this...
11874 (grub_vbe_bios_set_memory_window): ... to this.
11875 (grub_vbe_get_memory_window): Renamed from this...
11876 (grub_vbe_bios_get_memory_window): ... to this.
11877 (grub_vbe_set_scanline_length): Renamed from this...
11878 (grub_vbe_set_scanline_length): ... to this.
11879 (grub_vbe_get_scanline_length): Renamed from this...
11880 (grub_vbe_bios_get_scanline_length): ... to this.
11881 (grub_vbe_set_display_start): Renamed from this...
11882 (grub_vbe_bios_set_display_start): ... to this.
11883 (grub_vbe_get_display_start): Renamed from this...
11884 (grub_vbe_bios_get_display_start): ... to this.
11885 (grub_vbe_set_palette_data): Renamed from this...
11886 (grub_vbe_bios_set_palette_data): ... to this.
11887 (grub_vbe_bios_get_controller_info): Fixed problem with registers
11888 getting corrupted after calling it. Added more pushes and pops.
11889 (grub_vbe_bios_set_mode): Likewise.
11890 (grub_vbe_bios_get_mode): Likewise.
11891 (grub_vbe_bios_get_memory_window): Likewise.
11892 (grub_vbe_bios_set_scanline_length): Likewise.
11893 (grub_vbe_bios_get_scanline_length): Likewise.
11894 (grub_vbe_bios_get_display_start): Likewise.
11895 (grub_vbe_bios_set_palette_data): Likewise.
11896
11897 * normal/cmdline.c (cl_set_pos): Refresh the screen.
11898 (cl_insert): Likewise.
11899 (cl_delete): Likewise.
11900
11901 * term/gfxterm.c: New file.
11902
11903 * term/i386/pc/vesafb.c: Removed file.
11904
11905 * video/video.c: New file.
11906
11907 * video/i386/pc/vbe.c (real2pm): Added new function.
11908 (grub_video_vbe_draw_pixel): Likewise.
11909 (grub_video_vbe_get_video_ptr): Likewise.
11910 (grub_video_vbe_get_pixel): Likewise
11911 (grub_video_vbe_init): Likewise.
11912 (grub_video_vbe_fini): Likewise.
11913 (grub_video_vbe_setup): Likewise.
11914 (grub_video_vbe_get_info): Likewise.
11915 (grub_video_vbe_set_palette): Likewise.
11916 (grub_video_vbe_get_palette): Likewise.
11917 (grub_video_vbe_set_viewport): Likewise.
11918 (grub_video_vbe_get_viewport): Likewise.
11919 (grub_video_vbe_map_color): Likewise.
11920 (grub_video_vbe_map_rgb): Likewise.
11921 (grub_video_vbe_map_rgba): Likewise.
11922 (grub_video_vbe_unmap_color): Likewise.
11923 (grub_video_vbe_fill_rect): Likewise.
11924 (grub_video_vbe_blit_glyph): Likewise.
11925 (grub_video_vbe_blit_bitmap): Likewise.
11926 (grub_video_vbe_blit_render_target): Likewise.
11927 (grub_video_vbe_scroll): Likewise.
11928 (grub_video_vbe_swap_buffers): Likewise.
11929 (grub_video_vbe_create_render_target): Likewise.
11930 (grub_video_vbe_delete_render_target): Likewise.
11931 (grub_video_vbe_set_active_render_target): Likewise.
11932 (grub_vbe_set_pixel_rgb): Remove function.
11933 (grub_vbe_set_pixel_index): Likewise.
11934 (index_color_mode): Remove static variable.
11935 (active_mode): Likewise.
11936 (framebuffer): Likewise.
11937 (bytes_per_scan_line): Likewise.
11938 (grub_video_vbe_adapter): Added new static variable.
11939 (framebuffer): Likewise.
11940 (render_target): Likewise.
11941 (initial_mode): Likewise.
11942 (mode_in_use): Likewise.
11943 (mode_list): Likewise.
11944
5f97350b 119452006-03-10 Marco Gerards <marco@gnu.org>
11946
11947 * configure.ac (AC_INIT): Bumped to 1.93.
11948
11949 * DISTLIST: Added `include/grub/hfs.h'.
11950
a3c5c6f8 119512006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
11952
11953 * boot/i386/pc/boot.S (general_error): Before looping, try INT
11954 18H, which might help the BIOS falling back to next boot media.
11955
6de53d26 119562006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
11957
11958 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
11959 Poe Chen <poe.poechen@gmail.com>.
11960
77c4a393 119612006-01-17 Marco Gerards <marco@gnu.org>
11962
11963 * include/grub/normal.h: Include <grub/script.h>.
11964 (grub_command_list): Removed struct.
11965 (grub_command_list_t): Removed type.
11966 (grub_menu_entry): Remove members `num' and `command_list'. Add
11967 members `commands' and `sourcecode'.
11968 * include/grub/script.h: Add inclusion guards.
11969 (grub_script_cmd_menuentry): New struct.
11970 (grub_script_execute_menuentry): New prototype.
11971 (grub_script_lexer_record_start): Likewise.
11972 (grub_script_lexer_record_stop): Likewise.
11973 * normal/execute.c (grub_script_execute_menuentry): New function.
11974 * normal/lexer.c (record, recording, recordpos, recordlen): New
11975 variables.
11976 (grub_script_lexer_record_start): New function.
11977 (grub_script_lexer_record_stop): Likewise.
11978 (recordchar): Likewise.
11979 (nextchar): Likewise.
11980 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
11981 2048 as the buffer size. Add the tokens `menuentry' and `@'.
11982 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
11983 (current_menu): New variable.
11984 (free_menu): Mainly rewritten.
11985 (grub_normal_menu_addentry): New function.
11986 (read_config_file): Rewritten.
11987 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 11988 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 11989 the menu entry.
11990 (run): Mainly rewritten.
11991 * normal/parser.y (menu_entry): New variable.
11992 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
11993 (menuentry): New rule.
11994 (command): Add `menuentry'.
11995 (if_statement): Allow additional returns before `fi'.
11996 * normal/script.c (grub_script_create_cmdmenu): New function.
11997
144f1f98 119982006-01-03 Marco Gerards <marco@gnu.org>
11999
12000 * INSTALL: GNU Bison is required.
12001 * configure.ac: Rewritten the test to detect Bison.
12002 * Makefile.in (YACC): New variable. Reported by Xun Sun
12003 <xun.sun.cn@gmail.com>.
12004
af4b2d89 120052006-01-03 Marco Gerards <marco@gnu.org>
12006
12007 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
12008 the HFS+ filesystem to filesystem blocks.
12009 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
12010 GCC warning is silenced.
12011
15643b71 120122006-01-03 Marco Gerards <marco@gnu.org>
12013
12014 * partmap/apple.c (apple_partition_map_iterate): Convert the data
12015 read from disk from big endian to host byte order.
12016
00905879 120172006-01-03 Hollis Blanchard <hollis@penguinppc.org>
12018
12019 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
12020 documentation.
12021 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
12022 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
12023 embedded HFS+ filesystem.
12024 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
12025 (grub_hfs_sblock): Move from here...
12026 * include/grub/hfs.h: To here... New file.
12027 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
12028 documentation.
12029 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
12030 New macros.
12031 (grub_hfsplus_volheader): Change type of member `magic' to
12032 `grub_uint16_t'.
12033 (grub_hfsplus_data): Add new member `embedded_offset'.
12034 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
12035 returned block.
12036 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
12037 Calculate the offset.
12038
8899bc3e 120392005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12040
12041 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
12042 Removed.
12043 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
12044
ae8c0277 120452005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12046
12047 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
12048 ENV->NAME is NULL after allocating ENV->VALUE.
12049
07084456 120502005-12-25 Marco Gerards <marco@gnu.org>
12051
12052 * kern/env.c (grub_env_set): Rewritten the error handling code.
12053
4750f5f1 120542005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12055
12056 * geninit.sh: Made more robust, and more portable.
12057
50214199 120582005-12-25 Marco Gerards <marco@gnu.org>
12059
12060 Add support for Apple HFS+ filesystems.
f19dbdb7 12061
50214199 12062 * fs/hfsplus.c: New file.
12063
12064 * DISTLIST: Added `fs/hfsplus.c'.
12065
12066 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
12067 (hfsplus_mod_SOURCES): New variable.
12068 (hfsplus_mod_CFLAGS): Likewise.
12069 (hfsplus_mod_LDFLAGS): Likewise.
12070 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
12071 (grub_setup_SOURCES): Likewise.
12072 (grub_mkdevicemap_SOURCES): Likewise.
12073 (grub_emu_SOURCES): Likewise.
12074 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12075
12076 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
12077
12078 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
12079
befaed6c 120802005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
12081
12082 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
12083 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
12084 include/grub/parser.h, include/grub/script.h, kern/parser.c,
12085 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
12086 normal/lexer.c, normal/parser.y, normal/script.c, and
12087 partmap/gpt.c.
12088 Removed kern/sparc64/cache.c.
12089
12090 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
12091 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
12092 grub_emu_init.c.
12093
12094 * configure.ac (AC_INIT): Bumped to 1.92.
12095
6a124103 120962005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
12097
12098 * kern/err.c (grub_error_push): Added new function to support error
12099 stacks.
12100 (grub_error_pop): Likewise.
12101 (grub_error_stack_items): New local variable to support error stacks.
12102 (grub_error_stack_pos): Likewise.
12103 (grub_error_stack_assert): Likewise.
12104 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
12105 stack depth.
12106 (grub_print_error): Added support to print errors from error stack.
12107
12108 * include/grub/err.h (grub_error_push): Added function prototype.
12109 (grub_error_pop): Likewise.
12110
be973c1b 121112005-12-09 Hollis Blanchard <hollis@penguinppc.org>
12112
12113 * configure.ac: Accept `powerpc64' as host_cpu.
12114 (amd64): Rename to `biarch32'.
12115
12116 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
12117 non-cacheline-aligned addresses.
12118
12119 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
12120 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
12121 if `size' is non-zero.
12122
b04216ab 121232005-12-03 Marco Gerards <mgerards@xs4all.nl>
12124
12125 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
12126 and `cd' to make sure the filename is not prefixed with a
12127 directory name.
12128 (pkgdata_MODULES): Add `gpt.mod'.
12129 (gpt_mod_SOURCES): New variable.
12130 (gpt_mod_CFLAGS): Likewise.
12131 (gpt_mod_LDFLAGS): Likewise.
12132
12133 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
12134
12135 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
12136 New macro.
12137
12138 * partmap/gpt.c: New file.
12139
12140 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
12141 GPT partition map is detected.
12142
41730ed9 121432005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
12144
12145 * commands/i386/pc/play.c: New file.
12146 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
12147 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
12148 macros.
f19dbdb7 12149
95dc3643 121502005-11-27 Marco Gerards <mgerards@xs4all.nl>
12151
12152 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
12153 ((unused))' to silence gcc warning.
12154
1569ec51 121552005-11-26 Hollis Blanchard <hollis@penguinppc.org>
12156
12157 * configure.ac: Correct `AC_PROG_YACC' test.
12158
9abde152 121592005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12160
12161 * util/powerpc/ieee1275/grub-install.in: Run the mount point
12162 check before installing files.
12163
44b83271 121642005-11-22 Mike Small <smallm@panix.com>
12165
12166 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
12167 number regex so multidigit numbers are recognized correctly.
12168
121692005-11-22 Mike Small <smallm@panix.com>
12170
12171 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
12172 debugging message before attempting to claim memory.
12173 (grub_rescue_cmd_initrd): Add a claim debugging message and try
12174 multiple addresses in case of failure.
12175
9c12956b 121762005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12177
12178 * term/tparm.c (get_space): Remove empty `if' statement.
12179
12180 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
12181
12182 * kern/parser.c (check_varstate): Rename `state' to 's'.
12183
aeaf81d9 121842005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12185
12186 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
12187 variable definitions to the beginning of each function. Sort stack
12188 variables by size.
12189 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
12190 `buf' argument to `char *'.
12191
79bbb63f 121922005-11-22 Hollis Blanchard <hollis@penguinppc.org>
12193
12194 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
12195 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 12196 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 12197 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12198 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12199 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12200 configfile.mod, search.mod, gzio.mod and test.mod.
12201 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12202 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12203 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12204 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12205 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12206 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12207 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12208 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12209 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12210 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12211 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12212 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12213 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12214 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12215 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12216 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12217 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12218 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12219 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12220 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12221 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12222 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12223 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
12224
12225 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
12226 `grep --include'.
12227 (pkgdata_MODULES): Add test.mod.
12228
233b1628 122292005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12230
12231 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
12232 appending to variables with "+=".
12233 (PModule): Use full pathname to generate *.lst filenames.
12234
12235 * Makefile.in: Fixed list rules moved from genmk.rb.
12236 (.DELETE_ON_ERROR): New special target.
12237 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
12238
12239 * conf/i386-pc.rmk: Include conf/common.mk.
12240 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 12241 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 12242 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
12243 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
12244 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
12245 configfile.mod, search.mod, gzio.mod and test.mod.
12246 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
12247 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
12248 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
12249 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
12250 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
12251 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
12252 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
12253 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
12254 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
12255 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
12256 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12257 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12258 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
12259 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
12260 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
12261 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
12262 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12263 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
12264 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
12265 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
12266 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
12267 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
12268 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
12269 here...
12270 * conf/common.rmk: ... to here. New file.
12271
12272 * conf/common.mk: New file.
12273
16f820c8 122742005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
12275
12276 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
12277 (grub_script.tab.c): ... here.
12278
12279 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
12280 (grub_script.tab.c): ... here.
12281
12282 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
12283 (grub_script.tab.c): ... here.
12284
12285 * normal/command.c (grub_command_find): Fixed a memory leak of
12286 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
12287
63ba1554 122882005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12289
12290 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
12291 "@" which marks the start of a comment on ARM.
12292 (VARIABLE): Likewise.
12293
7f67dc13 122942005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12295
79bbb63f 12296 Add support for Linux/ADFS partition tables.
7f67dc13 12297
12298 * partmap/acorn.c: New file.
12299
12300 * include/grub/acorn_filecore.h: Likewise.
12301
12302 * DISTLIST: Added `partmap/acorn.c' and
12303 `include/grub/acorn_filecore.h'.
f19dbdb7 12304
7f67dc13 12305 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12306 `partmap/acorn.c'.
12307 (pkgdata_MODULES): Add `acorn.mod'.
12308 (acorn_mod_SOURCES): New variable.
12309 (acorn_mod_CFLAGS): Likewise.
12310
12311 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12312 `partmap/acorn.c'.
12313 (pkgdata_MODULES): Add `acorn.mod'.
12314 (acorn_mod_SOURCES): New variable.
12315 (acorn_mod_CFLAGS): Likewise.
12316
12317 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
12318 (pkgdata_MODULES): Add `acorn.mod'.
12319 (acorn_mod_SOURCES): New variable.
12320 (acorn_mod_CFLAGS): Likewise.
12321 (acorn_mod_LDFLAGS): Likewise.
12322
12323 * include/types.h (grub_disk_addr_t): New typedef.
12324
6d099807 123252005-11-13 Marco Gerards <mgerards@xs4all.nl>
12326
12327 * geninit.sh: New file.
12328
12329 * geninitheader.sh: Likewise.
12330
12331 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
12332 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
12333 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
12334 * commands/configfile.c (grub_configfile_init)
12335 (grub_configfile_fini): Likewise.
12336 * commands/default.c (grub_default_init, grub_default_fini):
12337 Likewise.
12338 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
12339 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
12340 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
12341 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
12342 Likewise.
12343 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
12344 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
12345 Likewise.
12346 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 12347 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 12348 Likewise.
12349 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
12350 Likewise.
fe6b695a 12351 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 12352 Likewise.
12353 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
12354 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
12355 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
12356 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
12357 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
12358 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
12359 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
12360 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
12361 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
12362 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
12363 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
12364 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
12365 * partmap/amiga.c (grub_amiga_partition_map_init)
12366 (grub_amiga_partition_map_fini): Likewise.
12367 * partmap/apple.c (grub_apple_partition_map_init)
12368 (grub_apple_partition_map_fini): Likewise.
12369 * partmap/pc.c (grub_pc_partition_map_init)
12370 (grub_pc_partition_map_fini): Likewise.
12371 * partmap/sun.c (grub_sun_partition_map_init,
12372 grub_sun_partition_map_fini): Likewise.
12373 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
12374 Likewise.
12375
12376 * util/grub-emu.c: Include <grub_modules_init.h>.
12377 (main): Don't initialize and de-initialize any modules directly,
12378 use `grub_init_all' and `grub_fini_all' instead.
12379
12380 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
12381 `grub_vesafb_mod_init'.
12382 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
12383 all users.
12384 * term/i386/pc/vga.c (grub_vga_init): Renamed to
12385 `grub_vga_mod_init'. Updated all users.
12386 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 12387
6d099807 12388 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
12389 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
12390 rules.
12391
12392 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
12393 Generate a function to initialize the module in utilities.
12394 Updated all callers.
12395 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
12396 initialize the module in utilities. Updated all callers.
12397
9046bcf0 123982005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12399
12400 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
12401 escape sequence and a literal ^L to clear the screen.
12402
12403 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
12404 when returning from Open Firmware.
12405
d13ea639 124062005-11-09 Hollis Blanchard <hollis@penguinppc.org>
12407
12408 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
12409 (grub_ofconsole_height): Likewise.
12410 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
12411 manually insert a '\n'.
12412 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
12413 `grub_ofconsole_height'. Return early if these are already set.
12414
a8fcf206 124152005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
12416
12417 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
12418 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
12419 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
12420 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
12421 and `normal/script.c'.
12422 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12423 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12424 (test_mod_SOURCES): New variable.
12425 (test_mod_CFLAGS): Likewise.
12426 (test_mod_LDFLAGS): Likewise.
12427 (pkgdata_MODULES): Add `test.mod'.
12428 (grub_script.tab.c): New rule.
12429 (grub_script.tab.h): Likewise.
12430
b6b32745 124312005-11-07 Marco Gerards <mgerards@xs4all.nl>
12432
12433 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12434 `commands/test.c', `normal/execute.c', `normal/lexer.c',
12435 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12436 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12437 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
12438 (test_mod_SOURCES): New variable.
12439 (test_mod_CFLAGS): Likewise.
12440 (pkgdata_MODULES): Add `test.mod'.
12441 (grub_script.tab.c): New rule.
12442 (grub_script.tab.h): Likewise.
12443
daac212a 124442005-11-06 Marco Gerards <mgerards@xs4all.nl>
12445
12446 Add initial scripting support.
12447
12448 * commands/test.c: New file.
12449 * include/grub/script.h: Likewise.
12450 * normal/execute.c: Likewise.
12451 * normal/function.c: Likewise.
12452 * normal/lexer.c: Likewise.
12453 * normal/parser.y: Likewise.
12454 * normal/script.c: Likewise.
12455
12456 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 12457
daac212a 12458 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
12459 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
12460 `normal/function.c' and `normal/script.c'.
12461 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
12462 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 12463 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
12464 variables.
daac212a 12465 (pkgdata_MODULES): Add `test.mod'.
12466 (grub_script.tab.c): New rule.
12467 (grub_script.tab.h): Likewise.
12468
12469 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
12470
12471 * include/grub/normal.h (grub_test_init): New prototype.
12472 (grub_test_fini): Likewise.
f19dbdb7 12473
daac212a 12474 * normal/command.c: Include <grub/script.h>.
12475 (grub_command_execute): Rewritten.
f19dbdb7 12476
daac212a 12477 * util/grub-emu.c (main): Call `grub_test_init' and
12478 `grub_test_fini'.
12479
77500b2b 124802005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12481
12482 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
12483 to 0.
12484 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
12485 there are no pending characters.
12486
e45deb9e 124872005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12488
12489 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
12490 `grub_strndup' to drop device arguments. Replace unnecessary
12491 `grub_strndup' with `grub_strdup'.
12492
4ce32619 124932005-11-03 Hollis Blanchard <hollis@penguinppc.org>
12494
12495 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
12496 `debug' environment variable has been set.
12497
124982005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 12499
4ce32619 12500 * Makefile.in (install-local): Use $(DATA).
12501 (uninstall): Likewise.
12502 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
12503 (sbin_UTILITIES): ... to here.
12504 (sbin_SCRIPTS): New variable.
12505 (grub_install_SOURCES): New variable.
12506 * util/powerpc/ieee1275/grub-install.in: New file.
12507 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
12508 variable.
12509 (add_segments): Call `grub_util_get_path'.
12510
25fe6f03 125112005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
12512
12513 From Timothy Baldwin:
12514 * commands/ls.c (grub_ls_list_files): Close FILE with
12515 grub_file_close.
12516 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
12517
04ccf3ec 125182005-10-24 Marco Gerards <mgerards@xs4all.nl>
12519
12520 * include/grub/parser.h: New file.
12521
12522 * kern/parser.c: Likewise.
12523
12524 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
12525 (grub_setup_SOURCES): Likewise.
12526 (grub_probefs_SOURCES): Likewise.
12527 (grub_emu_SOURCES): Likewise.
12528 (kernel_img_HEADERS): Add `parser.h'.
12529
12530 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12531 (grub_emu_SOURCES): Add `kern/parser.c'.
12532 (grubof_SOURCES): Likewise.
12533
12534 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
12535 (grubof_SOURCES): Add `kern/parser.c'.
12536
12537 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
12538
12539 * kern/misc.c (grub_split_cmdline): Removed function.
12540
12541 * kern/rescue.c: Include <grub/parser.h>.
12542 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
12543 of `grub_split_cmdline'.
12544
12545 * normal/command.c: Include <grub/parser.h>.
12546 (grub_command_execute): Use `grub_parser_split_cmdline' instead
12547 of `grub_split_cmdline'.
12548
12549 * normal/completion.c: Include <grub/parser.h>.
12550 (cmdline_state): New variable.
12551 (iterate_dir): End the filename with a quote depending on the
12552 command line state.
12553 (get_state): new function.
12554 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
12555 split the arguments and determine the current argument. When the
12556 argument string is not quoted, escape all spaces.
12557
6d8f4b0e 125582005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12559
12560 * normal/sparc64/setjmp.S: New file.
12561
15cf03ed 125622005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12563
12564 * include/grub/sparc64/libgcc.h: New file.
12565 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
12566 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
12567 normal/sparc64/setjmp.c.
12568
03e8661a 125692005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
12570
12571 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
12572 * kern/sparc64/cache.S: New file.
12573 * kern/sparc64/cache.c: Removed.
12574 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
12575 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
12576 -mtune=ultrasparc.
12577 (COMMON_LDFLAGS): Add -melf64_sparc.
12578 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
12579 (grubof_SOURCES): Use cache.S instead of cache.c.
12580 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
12581 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
12582 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
12583 commented though.
12584 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
12585 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
12586 (linux_mod_CFLAGS): Commented out.
12587 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
12588 out because module isn't built.
12589 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
12590 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
12591 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
12592 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
12593 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
12594 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12595 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12596 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
12597 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
12598 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
12599 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
12600 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
12601 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
12602 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
12603
34eeec8a 126042005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
12605
12606 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
12607 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
12608 longer, because HFS should not be used on PC.
12609
708367a3 126102005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12611
12612 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
12613 consistently within the loop.
12614
6fa1251a 126152005-10-15 Marco Gerards <mgerards@xs4all.nl>
12616
12617 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
12618 directory can not be read.
12619
4801580b 126202005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12621
12622 * configure.ac (AC_INIT): Increase the version number to 1.91.
12623
12624 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
12625 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
12626 term/i386/pc/serial.c.
12627
219ad426 126282005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12629
12630 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
12631 file size must be permitted.
12632
12633 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
12634 between %ah and %al.
12635
688e5699 126362005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
12637
12638 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
12639 grub_uint64_t.
12640 Call the hook with a NUL-terminated filename.
12641 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
12642 grub_cpu_to_be32.
12643
12644 * kern/term.c (cursor_state): New variable.
12645 (grub_term_set_current): Reset the cursor state on a new
12646 terminal.
12647 (grub_setcursor): Rewritten to use CURSOR_STATE.
12648 (grub_getcursor): New function.
12649
12650 * include/grub/term.h (grub_getcursor): New prototype.
12651
12652 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
12653 integers on ARM. Reported by Timothy Baldwin
12654 <T.E.Baldwin99@members.leeds.ac.uk>.
12655
bb34586c 126562005-10-11 Marco Gerards <mgerards@xs4all.nl>
12657
12658 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
12659 allocated.
12660 (grub_sfs_dir): Likewise.
12661
9a909877 126622005-10-09 Marco Gerards <mgerards@xs4all.nl>
12663
12664 Add support for the SFS filesystem.
12665
12666 * fs/sfs.c: New file.
12667
12668 * DISTLIST: Added `fs/sfs.c'.
12669
12670 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
12671 (grub_probefs_SOURCES): Likewise.
12672 (grub_emu_SOURCES): Likewise.
12673 (pkgdata_MODULES): Add `sfs.mod'.
12674 (sfs_mod_SOURCES): New variable.
12675 (sfs_mod_CFLAGS): Likewise.
12676 (sfs_mod_LDFLAGS): Likewise.
12677
12678 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
12679 (pkgdata_MODULES): Add `sfs.mod'.
12680 (sfs_mod_SOURCES): New variable.
12681 (sfs_mod_CFLAGS): Likewise.
12682
12683 * util/grub-emu.c (main): Call `grub_sfs_init' and
12684 `grub_sfs_fini'.
12685
12686 * include/grub/fs.h (grub_sfs_init): New prototype.
12687 (grub_sfs_fini): Likewise.
12688
57bdbde3 126892005-10-07 Marco Gerards <mgerards@xs4all.nl>
12690
12691 Add support for the AFFS filesystem.
12692
12693 * fs/affs.c: New file.
12694
12695 * DISTLIST: Added `fs/affs.c'.
12696
12697 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
12698 (grub_probefs_SOURCES): Likewise.
12699 (grub_emu_SOURCES): Likewise.
12700 (pkgdata_MODULES): Add `affs.mod'.
12701 (affs_mod_SOURCES): New variable.
12702 (affs_mod_CFLAGS): Likewise.
12703 (affs_mod_LDFLAGS): Likewise.
12704
12705 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
12706 (pkgdata_MODULES): Add `affs.mod'.
12707 (affs_mod_SOURCES): New variable.
12708 (affs_mod_CFLAGS): Likewise.
12709
12710 * util/grub-emu.c (main): Call `grub_affs_init' and
12711 `grub_affs_fini'.
12712
12713 * include/grub/fs.h (grub_affs_init): New prototype.
12714 (grub_affs_fini): Likewise.
12715
047b67e0 127162005-10-01 Marco Gerards <mgerards@xs4all.nl>
12717
12718 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
12719
59b8208a 127202005-10-01 Marco Gerards <mgerards@xs4all.nl>
12721
12722 * configure.ac: Accept `x86_64' as host_cpu. In that case add
12723 `-m32' to CFLAGS.
12724
12725 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
12726 linking.
f19dbdb7 12727
59b8208a 12728 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
12729 (COMMON_LDFLAGS): New variable.
12730 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
12731 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
12732 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
12733 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
12734 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
12735 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
12736 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
12737 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
12738 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
12739 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
12740 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
12741 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
12742 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
12743 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
12744 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
12745 variables.
12746 (normal_mod_ASFLAGS): Add `-m32'.
12747
12748 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
12749 (grub_host_size_t, grub_host_ssize_t): New types.
12750 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 12751 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 12752 `GRUB_HOST_SIZEOF_VOID_P'.
12753
12754 * include/grub/kernel.h (struct grub_module_header): Type of
12755 member offset changed to `grub_host_off_t'. Type of member size
12756 changed to `grub_host_size_t'.
12757 (struct grub_module_info): Type of member offset changed to
12758 `grub_host_off_t'. Type of member size changed to
12759 `grub_host_size_t'.
12760
b4093103 127612005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
12762
12763 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 12764
b4093103 12765 * kern/i386/pc/startup.S (multiboot_header): New label.
12766 (multiboot_entry): Likewise.
12767 (multiboot_trampoline): Likewise.
12768
12769 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12770 Increased to 0x4A0.
12771
12772 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
12773 put parentheses after a question mark.
12774 [!GRUB_UTIL] (my_mod): New variable.
12775
12776 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
12777
b2499b29 127782005-09-28 Marco Gerards <mgerards@xs4all.nl>
12779
12780 Adds support for the XFS filesystem. Btrees are not supported
12781 yet.
12782
12783 * fs/xfs.c: New file.
12784
12785 * DISTLIST: Added `fs/xfs.c'.
12786
12787 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
12788 (grub_probefs_SOURCES): Likewise.
12789 (grub_emu_SOURCES): Likewise.
12790 (pkgdata_MODULES): Add `xfs.mod'.
12791 (xfs_mod_SOURCES): New variable.
12792 (xfs_mod_CFLAGS): Likewise.
12793
12794 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
12795 (pkgdata_MODULES): Add `xfs.mod'.
12796 (xfs_mod_SOURCES): New variable.
12797 (xfs_mod_CFLAGS): Likewise.
12798
12799 * util/grub-emu.c (main): Call `grub_xfs_init' and
12800 `grub_xfs_fini'.
12801
12802 * include/grub/fs.h (grub_xfs_init): New prototype.
12803 (grub_xfs_fini): Likewise.
12804
f19dbdb7 12805
83d37a62 128062005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
12807
12808 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
12809 color modes, allow greater than 16 colors to be configured as
12810 a default palette.
12811
47d2d65e 128122005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
12813
12814 * normal/completion.c (complete_arguments): Add the qualifier
12815 const into OPTIONS.
12816
12817 From Omniflux <omniflux+lists@omniflux.com>:
12818 * include/grub/terminfo.h: New file.
12819 * include/grub/tparm.h: Likewise.
12820 * include/grub/i386/pc/serial.h: Likewise.
12821 * term/terminfo.c: Likewise.
12822 * term/tparm.c: Likewise.
12823 * term/i386/pc/serial.c: Likewise.
12824 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
12825 serial.mod.
12826 (terminfo_mod_SOURCES): New variable.
12827 (terminfo_mod_CFLAGS): Likewise.
12828 (serial_mod_SOURCES): Likewise.
12829 (serial_mod_CFLAGS): Likewise.
12830
48b671ff 128312005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
12832
12833 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
12834 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
12835 and kern/powerpc/ieee1275/cmain.c, respectively.
12836
12837 * boot/powerpc/ieee1275/crt0.S: Moved to ...
12838 * kern/powerpc/ieee1275/crt0.S: ... here.
12839
12840 * boot/powerpc/ieee1275/cmain.c: Moved to ...
12841 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 12842
48b671ff 12843 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
12844 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
12845 instead of boot/powerpc/ieee1275/crt0.S and
12846 boot/powerpc/ieee1275/cmain.c, respectively.
12847
12848 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
12849 sectors. It was not used anyway.
12850
09fc77a7 128512005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12852
12853 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
12854 `unused parameter' warning.
12855
003789c7 128562005-08-30 Hollis Blanchard <hollis@penguinppc.org>
12857
12858 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
12859 function.
12860 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
12861 getcharwidth.
12862
67f44c86 128632005-08-28 Marco Gerards <metgerards@student.han.nl>
12864
12865 * include/grub/normal.h (enum grub_completion_type): Added
12866 `GRUB_COMPLETION_TYPE_ARGUMENT'.
12867
12868 * normal/cmdline.c (print_completion): Handle
12869 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
12870 * normal/menu_entry.c (store_completion): Likewise.
12871
12872 * normal/completion.c (complete_arguments): New function.
12873 (grub_normal_do_completion): Call `complete_arguments' when the
12874 current words start with a dash.
12875
0b5abe02 128762005-08-27 Marco Gerards <metgerards@student.han.nl>
12877
12878 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
12879 `gzio.mod' instead of `io.mod').
12880
d9864ee1 128812005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
12882
12883 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
12884 (DISTDIRS): Added io and video.
12885 Rewrite the search routine to make an output consistently.
12886
12887 * DISTLIST: Added conf/sparc64-ieee1275.mk,
12888 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
12889 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
12890 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
12891 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
12892 util/powerpc/ieee1275/misc.c.
f19dbdb7 12893
d9864ee1 12894 * include/grub/gzio.h: New file.
12895 * io/gzio.c: Likewise.
f19dbdb7 12896
d9864ee1 12897 * kern/file.c (grub_file_close): Call grub_device_close only if
12898 FILE->DEVICE is not NULL.
12899
12900 * include/grub/mm.h [!NULL] (NULL): New macro.
12901
12902 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
12903
12904 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
12905 (pkgdata_MODULES): Added gzio.mod.
12906 (gzio_mod_SOURCES): New variable.
12907 (gzio_mod_CFLAGS): Likewise.
12908
12909 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
12910 (pkgdata_MODULES): Added gzio.mod.
12911 (gzio_mod_SOURCES): New variable.
12912 (gzio_mod_CFLAGS): Likewise.
12913
12914 * commands/cat.c: Include grub/gzio.h.
12915 (grub_cmd_cat): Use grub_gzfile_open instead of
12916 grub_file_open.
f19dbdb7 12917
d9864ee1 12918 * commands/cmp.c: Include grub/gzio.h.
12919 (grub_cmd_cmp): Use grub_gzfile_open instead of
12920 grub_file_open.
12921
12922 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
12923 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
12924 grub_file_open.
12925 (grub_rescue_cmd_module): Likewise.
12926
fa46f4b5 129272005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12928
12929 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
12930 kern/sparc64/ieee1275/init.c because it contains _start.
12931 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
12932
e9211b5d 129332005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
12934
12935 * configure.ac: Add support for sparc64 host with ieee1275
12936 firmware.
12937 * configure: Generated from configure.ac.
12938 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
12939 instead of int.
12940 (grub_ofdisk_read): Likewise.
12941 (grub_ofdisk_open): Use %p to print pointer values, and cast the
12942 pointers as (void *) to remove a warning.
12943 (grub_ofdisk_close): Likewise.
12944 (grub_ofdisk_read): Likewise.
12945 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
12946 returns, so make it return void to remove a warning.
12947 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
12948 Corresponding prototype change.
12949 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
12950 values, and cast the pointers as (void *) to remove a warning.
12951 (grub_mm_dump): Likewise.
12952 * conf/sparc64-ieee1275.mk: New file.
12953 * conf/sparc64-ieee1275.rmk: Likewise.
12954 * include/grub/sparc64/setjmp.h: Likewise.
12955 * include/grub/sparc64/types.h: Likewise.
12956 * include/grub/sparc64/ieee1275/console.h: Likewise.
12957 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
12958 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
12959 * include/grub/sparc64/ieee1275/time.h: Likewise.
12960 * kern/sparc64/cache.c: Likewise.
12961 * kern/sparc64/dl.c: Likewise.
12962 * kern/sparc64/ieee1275/init.c: Likewise.
12963 * kern/sparc64/ieee1275/openfw.c: Likewise.
12964
385c6a92 129652005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
12966
12967 * util/console.c (grub_ncurses_putchar): If C is greater than
12968 0x7f, set C to a question mark.
12969 (grub_ncurses_getcharwidth): New function.
12970 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
12971 getcharwidth.
12972
12973 * normal/menu.c (print_entry): Made aware of Unicode. First,
12974 convert TITLE to UCS-4, and predict the cursor position by
12975 grub_getcharwidth.
12976
12977 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
12978 const to SRC.
12979 * kern/misc.c (grub_utf16_to_utf8): Likewise.
12980
16ccb8b1 129812005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12982
12983 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
12984 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12985 grub_strcat.
12986
12987 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
12988 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
12989 grub_strcpy and grub_strlen. Take it into account that a space
12990 character is inserted as a delimiter.
12991
6a85ce79 129922005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
12993
12994 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 12995 invalid magic in the error.
6a85ce79 12996
12997 * commands/search.c: New file.
f19dbdb7 12998
6a85ce79 12999 * util/grub-emu.c (main): Call grub_search_init and
13000 grub_search_fini.
13001
13002 * kern/rescue.c (grub_rescue_print_disks): Removed.
13003 (grub_rescue_print_devices): New function.
13004 (grub_rescue_cmd_ls): Use grub_device_iterate with
13005 grub_rescue_print_devices instead of grub_disk_dev_iterate with
13006 grub_rescue_print_disks.
13007
13008 * kern/partition.c (grub_partition_iterate): Return the result of
13009 PARTMAP->ITERATE instead of GRUB_ERRNO.
13010
13011 * kern/device.c: Include grub/partition.h.
13012 (grub_device_iterate): New function.
13013
13014 * include/grub/partition.h (grub_partition_iterate): Return int
13015 instead of grub_err_t.
13016
13017 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
13018 prototype.
13019 [GRUB_UTIL] (grub_search_fini): Likewise.
13020
13021 * include/grub/device.h (grub_device_iterate): New prototype.
13022
13023 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13024 commands/search.c.
13025 (pkgdata_MODULES): Added search.mod.
13026 (search_mod_SOURCES): New variable.
13027 (search_mod_CFLAGS): Likewise.
13028
13029 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
13030 (pkgdata_MODULES): Added search.mod.
13031 (search_mod_SOURCES): New variable.
13032 (search_mod_CFLAGS): Likewise.
13033
13034 * commands/ls.c (grub_ls_list_disks): Renamed to ...
13035 (grub_ls_list_devices): ... this, and use grub_device_iterate.
13036 All callers changed.
13037
13038 * DISTLIST: Added commands/search.c.
13039
ef095434 130402005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
13041
13042 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
13043 conversion.
13044 (grub_getcharwidth): New function.
13045
13046 * kern/misc.c (grub_utf8_to_ucs4): New function.
13047
13048 * include/grub/term.h (struct grub_term): Added a new member
13049 "getcharwidth".
13050 (grub_getcharwidth): New prototype.
13051
13052 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
13053
13054 * term/i386/pc/console.c (map_char): New function. Segregated from
13055 grub_console_putchar.
13056 (grub_console_putchar): Use map_char.
13057 (grub_console_getcharwidth): New function.
13058 (grub_console_term): Specified grub_console_getcharwidth as
13059 getcharwidth.
13060
13061 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
13062 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
13063
13064 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
13065 GRUB_ERRNO.
13066 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
13067 on grub_strtoul completely.
13068 (write_char): Declare local variables in the beginning of the
13069 function.
13070 (grub_vesafb_getcharwidth): New function.
13071 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
13072 getcharwidth.
13073
1f0a95e4 130742005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
13075
13076 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
13077 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
13078 commands/i386/pc/vbetest.c.
13079
13080 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
13081 call grub_vbe_get_controller_info again, because the returned
13082 information is volatile.
13083 (grub_vbe_set_video_mode): Mostly rewritten.
13084 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
13085 grub_vbe_status_t correctly.
13086 (grub_vbe_get_video_mode_info): Likewise.
13087 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
13088 several if statements.
13089
13090 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
13091 * commands/i386/pc/vbeinfo.c: ... this.
13092
13093 * commands/i386/pc/vbe_test.c: Renamed to ...
13094 * commands/i386/pc/vbetest.c: ... this.
13095
13096 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
13097 ...
13098 (grub_cmd_vbeinfo): ... this. Save video modes before
13099 iterating. Skip a video mode, if it is not available, not enough
13100 information is given or it is monochrome. Show the memory
13101 model. Leave the interpretation of MODEVAR to grub_strtoul
13102 completely.
13103 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
13104 (GRUB_MOD_FINI): Likewise.
13105
13106 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
13107 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
13108 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
13109 duplicated grub_env_get. Leave the interpretation of MODEVAR to
13110 grub_strtoul completely.
13111 (real2pm): Removed.
13112 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
13113 (GRUB_MOD_FINI): Likewise.
13114
13115 * normal/misc.c: Include grub/mm.h.
13116
13117 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
13118 vbe_list_modes with vbetest.mod and vbeinfo.mod.
13119 (vbe_list_modes_mod_SOURCES): Removed.
13120 (vbe_list_modes_mod_CFLAGS): Likewise.
13121 (vbe_test_mod_SOURCES): Likewise.
13122 (vbe_test_mod_CFLAGS): Likewise.
13123 (vbeinfo_mod_SOURCES): New variable.
13124 (vbeinfo_mod_CFLAGS): Likewise.
13125 (vbetest_mod_SOURCES): Likewise.
13126 (vbetest_mod_CFLAGS): Likewise.
13127
992ffbbe 131282005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
13129
13130 * normal/misc.c: New file.
13131
13132 * DISTLIST: Added normal/misc.c.
f19dbdb7 13133
992ffbbe 13134 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
13135 DISK to HOOK. Call HOOK with DISK.
13136 * partmap/apple.c (apple_partition_map_iterate): Likewise.
13137 * partmap/pc.c (pc_partition_map_iterate): Likewise.
13138 * partmap/sun.c (sun_partition_map_iterate): Likewise.
13139
13140 * normal/menu_entry.c (struct screen): Added a new member
13141 "completion_shown".
13142 (completion_buffer): New global variable.
13143 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
13144 (store_completion): New function.
13145 (complete): Likewise.
13146 (clear_completions): Likewise.
13147 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
13148 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
13149 a tab, call complete.
13150
13151 * normal/completion.c (disk_dev): Removed.
13152 (print_simple_completion): Likewise.
13153 (print_partition_completion): Likewise.
13154 (print_func): New global variable.
13155 (add_completion): Do not take the arguments WHAT or PRINT any
13156 longer. Added a new argument TYPE. Instead of printing directly,
13157 call PRINT_FUNC if not NULL.
13158 All callers changed.
13159 (complete_device): Use a local variable DEV instead of
13160 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
13161 (grub_normal_do_completion): Take a new argument HOOK. Do not
13162 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
13163 empty string, return NULL instead.
13164 All callers changed.
13165
13166 * normal/cmdline.c (print_completion): New function.
13167
13168 * kern/partition.c (grub_partition_iterate): Add an argument DISK
13169 to HOOK.
13170 All callers changed.
13171
13172 * kern/disk.c (grub_print_partinfo): Removed.
13173
13174 * include/grub/partition.h (struct grub_partition_map): Add a new
13175 argument DISK into HOOK of ITERATE.
13176 (grub_partition_iterate): Add a new argument DISK to HOOK.
13177
13178 * include/grub/normal.h (enum grub_completion_type): New enum.
13179 (grub_completion_type_t): New type.
13180 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
13181 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
13182 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
13183 (GRUB_COMPLETION_TYPE_FILE): Likewise.
13184 (grub_normal_do_completion): Added a new argument HOOK.
13185 (grub_normal_print_device_info): New prototype.
13186
13187 * include/grub/disk.h (grub_print_partinfo): Removed.
13188
13189 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
13190 (normal_mod_SOURCES): Likewise.
13191 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13192 (normal_mod_SOURCES): Likewise.
13193
13194 * commands/ls.c (grub_ls_list_disks): Use
13195 grub_normal_print_device_info instead of grub_print_partinfo. Free
13196 PNAME.
13197 (grub_ls_list_files): Use grub_normal_print_device_info instead of
13198 duplicating the code.
13199
0bd41162 132002005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13201
13202 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 13203 follow GCS more precisely.
13204 * commands/i386/pc/vbe_test.c: Likewise.
13205 * include/grub/i386/pc/vbe.h: Likewise.
13206 * term/i386/pc/vesafb.c: Likewise.
13207 * video/i386/pc/vbe.c: Likewise.
0bd41162 13208
6323696a 132092005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
13210
13211 * DISTLIST: Added term/i386/pc/vesafb.c
13212 DISTLIST: Added video/i386/pc/vbe.c
13213 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
13214 DISTLIST: Added commands/i386/pc/vbe_test.c.
13215 * commands/i386/pc/vbe_list_modes.c: New file.
13216 * commands/i386/pc/vbe_test.c: Likewise.
13217 * term/i386/pc/vesafb.c: Likewise.
13218 * video/i386/pc/vbe.c: Likewise.
13219 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
13220 (grub_vbe_probe) Added prototype.
13221 (grub_vbe_set_video_mode) Likewise.
13222 (grub_vbe_get_video_mode) Likewise.
13223 (grub_vbe_get_video_mode_info) Likewise.
13224 (grub_vbe_set_pixel_rgb) Likewise.
13225 (grub_vbe_set_pixel_index) Likewise.
13226 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
13227 (pkgdata_MODULES): Added vesafb.mod.
13228 (pkgdata_MODULES): Added vbe_list_modes.mod.
13229 (pkgdata_MODULES): Added vbe_test.mod.
13230 (vbe_mod_SOURCES): Added.
13231 (vbe_mod_CFLAGS): Likewise.
13232 (vesafb_mod_SOURCES): Likewise.
13233 (vesafb_mod_CFLAGS): Likewise.
13234 (vbe_list_modes_mod_SOURCES): Likewise.
13235 (vbe_list_modes_mod_CFLAGS): Likewise.
13236 (vbe_test_mod_SOURCES): Likewise.
13237 (vbe_test_mod_CFLAGS): Likewise.
13238
0a74e62f 132392005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
13240
0a74e62f 13241 * normal/command.c (grub_command_execute): If INTERACTIVE is
13242 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
13243 CMDLINE. Disable the pager if INTERACTIVE is true.
13244 All callers are changed.
13245
13246 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
13247 before reading a config file.
13248 * normal/main.c (read_config_file): Even if a command is not
13249 found, register it if it is within an entry.
13250
13251 * util/grub-emu.c: Include sys/types.h and unistd.h.
13252 (options): Added --hold.
13253 (struct arguments): Added a new member "hold".
13254 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
13255 missing.
13256 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
13257 cleared by a debugger, if it is not zero.
13258
13259 * include/grub/normal.h (grub_command_execute): Add an argument
13260 INTERACTIVE.
13261
e51f85ae 132622005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
13263
13264 * DISTLIST: Added include/grub/i386/pc/vbe.h.
13265
e9c6f39b 132662005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
13267
13268 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
13269 program with another one, because the old one didn't detect a bug
13270 in gcc-3.4. Always use regparm 2, because the new test is still
13271 not enough for gcc-4.0. Someone must investigate a simple test
13272 case which detects a bug in gcc-4.0.
13273
8de3495c 132742005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
13275
13276 * DISTLIST: Added normal/completion.c.
13277
13278 * normal/completion.c: New file.
f19dbdb7 13279
8de3495c 13280 * term/i386/pc/console.c (grub_console_getwh): New function.
13281 (grub_console_term): Assign grub_console_getwh to getwh.
13282
13283 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
13284 function is defined in normal/completion.c as
13285 grub_normal_do_completion.
13286 (grub_cmdline_get): Use grub_normal_do_completion instead of
13287 grub_tab_complete.
13288
13289 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
13290 returns non-zero, otherwise return 0.
13291 (grub_partition_iterate): First, probe the partition map. Then,
13292 call ITERATE only for this partition map.
13293
13294 * kern/misc.c (grub_strncmp): Rewritten.
13295
13296 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
13297 returns non-zero. Otherwise return 0.
13298
13299 * include/grub/partition.h (grub_partition_map_iterate): Return
13300 int instead of void.
13301
13302 * include/grub/normal.h (grub_normal_do_completion): New prototype.
13303
13304 * include/grub/misc.h (grub_strncmp): Change the type of N to
13305 grub_size_t.
13306
13307 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
13308 of void.
13309
13310 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 13311 unsigned explicitly before comparing it with I.
8de3495c 13312
13313 * kern/main.c (grub_env_write_root): Add the attribute unused into
13314 VAR.
13315
13316 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
13317 normal/completion.c.
13318 (normal_mod_SOURCES): Likewise.
13319 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
13320 (normal_mod_SOURCES): Likewise.
13321
13322 * normal/command.c (grub_iterate_commands): If ITERATE returns
13323 non-zero, return one immediately.
13324
e85e144b 133252005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
13326
13327 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
13328 * kern/i386/pc/startup.S: Updated Global Descriptor table's
13329 descriptions.
13330 (grub_vbe_get_controller_info): New function.
13331 (grub_vbe_get_mode_info): Likewise.
13332 (grub_vbe_set_mode): Likewise.
13333 (grub_vbe_get_mode): Likewise.
13334 (grub_vbe_set_memory_window): Likewise.
13335 (grub_vbe_get_memory_window): Likewise.
13336 (grub_vbe_set_scanline_length): Likewise.
13337 (grub_vbe_get_scanline_length): Likewise.
13338 (grub_vbe_set_display_start): Likewise.
13339 (grub_vbe_get_display_start): Likewise.
13340 (grub_vbe_set_palette_data): Likewise.
13341 * include/grub/i386/pc/vbe.h: New file.
13342
c46153d2 133432005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13344
13345 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13346 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
13347 * DISTLIST: Likewise.
13348 * kern/ieee1275/of.c: Moved to ...
13349 * kern/ieee1275/ieee1275.c: ... here.
13350
0cb90c45 133512005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13352
13353 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
13354 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
13355 Pass 0 as `end' parameter to grub_strtoul().
13356
a19fb360 133572005-08-08 Hollis Blanchard <hollis@penguinppc.org>
13358
13359 * include/grub/powerpc/ieee1275/console.h: Do not include
13360 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
13361 ifdef.
13362 (grub_console_cur_color): Remove i386-specific prototype.
13363 (grub_console_real_putchar): Likewise.
13364 (grub_console_checkkey): Likewise.
13365 (grub_console_getkey): Likewise.
13366 (grub_console_getxy): Likewise.
13367 (grub_console_gotoxy): Likewise.
13368 (grub_console_cls): Likewise.
13369 (grub_console_setcursor): Likewise.
13370 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
13371 Include <grub/machine/console.h>.
13372 * term/ieee1275/ofconsole.c: Likewise.
13373
4ac9bd04 133742005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
13375
13376 * Makefile.in (LIBLZO): New variable.
13377
13378 * configure.ac: Check for LZO version 2.
13379
13380 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
13381 lzo/lzo1x.h instead of lzo1x.h.
13382
13383 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
13384 of -llzo.
13385
13386 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
13387 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
13388
13389 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
13390 copying the data from PARTITION to P.
13391
f4917dfd 133922005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13393
13394 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
13395 negative, unload the module.
13396
13397 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
13398 map is "pc_partition_map" but not "pc".
13399 (usage): Fix the description. The options are --boot-image and
13400 --core-image but not --boot-file or --core-file.
13401 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
13402 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
13403 DEFAULT_DIRECTORY.
13404
13405 * util/i386/pc/grub-install.in: Do not specify --boot-file or
13406 --core-file. Specify INSTALL_DEVICE as an argument.
13407
13408 * util/console.c: Include config.h.
13409 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
13410 [HAVE_NCURSES_H]: Include ncurses.h.
13411 [HAVE_CURSES_H]: Include curses.h.
13412 [!A_NORMAL] (A_NORMAL): Defined as zero.
13413 [!A_STANDOUT] (A_STANDOUT): Likewise.
13414
13415 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
13416 -lncurses.
13417 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
13418
13419 * configure.ac: Check for curses libraries and headers.
13420
13421 * Makefile.in (LIBCURSES): New variable.
13422
13423 * genmk.rb (Script::rule): Set the executable bits.
13424
13425 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
13426 name of the PC partition map is "pc_partition_map" but not "pc".
13427
0e143073 134282005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13429
13430 * util/i386/pc/grub-install.in (grub_probefs): New variable.
13431 (modules): Likewise.
13432 (usage): Added descriptions for --modules and --grub-probefs.
13433 Handle --modules and --grub-probefs. Save the arguments in MODULES
13434 and GRUB_PROBEFS, respectively.
13435 Auto-detect a filesystem module against GRUBDIR. If the result is
13436 empty and modules are not specified explicitly, abort the
13437 installation. Add the result to MODULES.
13438
13439 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
13440 disk/powerpc/ieee1275/ofdisk.c,
13441 include/grub/powerpc/ieee1275/init.h and
13442 term/powerpc/ieee1275/ofconsole.c.
13443 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
13444 term/ieee1275/ofconsole.c.
13445
13446 * include/grub/powerpc/ieee1275/console.h: Resurrected.
13447
13448 * COPYING: Upgraded to the latest version. Only the address of the
13449 FSF office has changed.
f19dbdb7 13450
efd6e6d5 134512005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
13452
13453 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
13454 kern/ieee1275.c with kern/ieee1275/of.c.
13455
13456 * kern/ieee1275.c: Moved to ...
13457 * kern/ieee1275/of.c: ... here.
13458
8ceafda2 134592005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
13460
13461 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 13462 readability.
8ceafda2 13463
13464 * config.guess: Updated to the latest version from gnulib.
13465 * config.sub: Likewise.
13466 * install.sh: Likewise.
13467 * mkinstalldirs: Likewise.
13468
13469 * include/grub/console.h: Removed. This file is arch-specific. Do
13470 not put this in include/grub.
13471
13472 * include/grub/i386/pc/console.h: Resurrected.
13473
13474 * util/console.c: Include grub/machine/console.h instead of
13475 grub/console.h.
13476 * util/grub-emu.c: Likewise.
13477
267f6cd9 134782005-08-04 Marco Gerards <metgerards@student.han.nl>
13479
13480 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
13481 hardcoded value.
f19dbdb7 13482
267f6cd9 13483 From Vincent Pelletier <subdino2004@yahoo.fr>
13484 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
13485 Redefined to use grub_getwh.
13486 (grub_term): New member named getwh.
13487 (grub_getwh): New prototype.
13488 * kern/term.c (grub_getwh): New function.
13489 * term/i386/pc/console.c (grub_console_getwh): New function.
13490 (grub_console_term): New member `getwh'.
13491 * term/i386/pc/vga.c (grub_vga_getwh): New function.
13492 (grub_vga_term): New member `getwh'.
0b5abe02 13493 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 13494 grub_ssize_t.
13495 (grub_ofconsole_getw): New function.
13496 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
13497 (grub_ofconsole_term): New field named getwh and new initial
13498 value.
13499
3be7266d 135002005-08-03 Hollis Blanchard <hollis@penguinppc.org>
13501
13502 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
13503 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
13504 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
13505 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
13506 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
13507 of <grub/machine/ieee1275.h>.
13508 * commands/ieee1275/reboot.c: Likewise.
13509 * boot/powerpc/ieee1275/ieee1275.c: Move ...
13510 * kern/ieee1275.c: ... to here. All users updated. Change all
13511 parameter structs to use new type `grub_ieee1275_cell_t'.
13512 * term/powerpc/ieee1275/ofconsole.c: Move ...
13513 * term/ieee1275/ofconsole.c: ... to here. All users updated.
13514 * disk/powerpc/ieee1275/ofdisk.c: Move ...
13515 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
13516 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
13517 to return int.
13518 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
13519 Remove unused prototypes. All users updated.
13520 * include/grub/powerpc/ieee1275/console.h: Removed.
13521 * include/grub/powerpc/ieee1275/ieee1275.h: Define
13522 `grub_ieee1275_cell_t'.
13523 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
13524 Cast comparisons with -1 to the correct type.
13525 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
13526 type to match `grub_ieee1275_entry_fn'.
13527
8b5f3938 135282005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
13529
13530 * DISTLIST: Added util/i386/pc/grub-probefs.c.
13531
13532 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
13533 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
13534 partmap/sun.c.
13535 (grub_probefs_SOURCES): New variable.
13536
13537 * util/i386/pc/grub-probefs.c: New file.
13538
13539 * util/i386/pc/grub-setup.c (main): Call
13540 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
13541 grub_hfs_init and grub_jfs_init to initialize the system. Call
13542 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
13543 grub_pc_partition_map_fini to finish the system.
13544
ea409713 135452005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
13546
13547 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
13548 function.
13549 (grub_multiboot_load_elf32): Likewise.
13550 (grub_multiboot_is_elf64): Likewise.
13551 (grub_multiboot_load_elf64): Likewise.
13552 (grub_multiboot_load_elf): Likewise.
13553 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
13554 an ELF32 or ELF64 file.
13555 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
13556
13557 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
13558 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
13559 NULL before calling FS->LABEL.
13560 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
13561 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
13562 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
13563 before calling FS->LABEL.
13564
141a288b 135652005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
13566
13567 * util/i386/pc/grub-install.in (datadir): New variable.
13568 (libdir): Removed.
13569 (pkgdatadir): New variable.
13570 (pkglibdir): Removed.
13571
0d5f8a54 135722005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
13573
13574 * DISTLIST: Added util/i386/pc/grub-install.in.
13575
13576 * util/i386/pc/grub-install.in: New file.
13577
13578 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
13579 (grub_install_SOURCES): Likewise.
13580
13581 * genmk.rb: Added support for scripts.
13582 (Script): New class.
13583 (scripts): New variable.
13584
13585 * Makefile.in (install-local): Install sbin_SCRIPTS by
13586 INSTALL_SCRIPT.
13587 (uninstall): Remove sbin_SCRIPTS.
13588
13589 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
13590 device, try to get a GRUB device by
13591 grub_util_biosdisk_get_grub_dev.
13592 Free DEST_DEV.
13593
13594 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
13595 description for --device-map.
13596
5f968e1e 135972005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13598
13599 Change the semantics of variable hooks. They now return strings
13600 instead of error values.
f19dbdb7 13601
5f968e1e 13602 * util/i386/pc/grub-setup.c: Include grub/env.h.
13603 (setup): Use grub_device_set_root instead of grub_env_set.
13604
13605 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
13606 grub_env_get instead of grub_device_set_root and
13607 grub_device_get_root, respectively.
13608
13609 * kern/main.c (grub_env_write_root): New function.
13610 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
13611 grub_env_set instead of grub_device_set_root.
13612
13613 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
13614 many variables.
13615 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
13616 rather than calling ENV->WRITE_HOOK afterwards.
13617 (grub_env_get): Return the result of ENV->READ_HOOK rather than
13618 passing a pointer of a pointer.
13619 (grub_register_variable_hook): Change the types of "read_hook" and
13620 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
13621 respectively.
13622 Allocate the default empty string on the heap, because this string
13623 may be freed later.
13624
13625 * kern/device.c: Include grub/env.h.
13626 (grub_device_set_root): Removed.
13627 (grub_device_get_root): Likewise.
13628 (grub_device_open): Use grub_env_get instead of
13629 grub_device_get_root.
13630
13631 * include/grub/env.h (grub_env_read_hook_t): New type.
13632 (grub_env_write_hook_t): Likewise.
13633 (grub_env_var): Change the types of "read_hook" and "write_hook"
13634 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
13635 (grub_register_variable_hook): Likewise.
13636
13637 * include/grub/device.h (grub_device_set_root): Removed.
13638 (grub_device_set_root): Likewise.
13639
13640 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
13641 make sure that DIRNAME terminates with '/', so that
13642 grub_fat_find_dir will fail if PATH is not a directory.
13643
13644 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
13645 from DIRNAME.
13646 Use the qualifier auto for print_files and print_files_long.
13647 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
13648 as a regular file.
13649 Put a newline only if there is no error.
13650 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
13651 used.
13652
896f0afd 136532005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
13654
13655 * kern/partition.c (grub_partition_probe): Initialize PART to
13656 NULL. Otherwise, when no partition map is registered, this returns
13657 a garbage.
13658
b28b81b2 136592005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
13660
13661 * partmap/apple.c (apple_partition_map_iterate): Check if POS
13662 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
13663 valid.
13664
5f3607e0 136652005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
13666
13667 * commands/ls.c (grub_ls_list_disks): Print the filesystem
13668 information on each device, if it does not have partitions. Print
13669 "Device" instead of "Disk", because this function is not specific
13670 to disk devices.
13671
13672 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
13673 static to ensure that it is put on the memory rather than a
13674 register.
13675
502c87e8 136762005-07-17 Yoshinori Okuji <okuji@enbug.org>
13677
13678 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
13679 (grub_cat_init): Likewise.
13680 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
13681 (options): Likewise.
13682 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
13683 (grub_configfile_init): Likewise.
13684 * font/manager.c (GRUB_MOD_INIT): Likewise.
13685 * commands/help.c (GRUB_MOD_INIT): Likewise.
13686 (grub_help_init): Likewise.
13687 * normal/command.c (grub_command_init): Likewise.
13688 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
13689 * disk/loopback.c (grub_loop_init): Likewise.
13690 (GRUB_MOD_INIT): Likewise.
13691 * commands/ls.c (grub_ls_init): Likewise.
13692 (GRUB_MOD_INIT): Likewise.
13693 (options): Likewise.
13694 * commands/boot.c (grub_boot_init): Likewise.
13695 (GRUB_MOD_INIT): Likewise.
13696 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
13697 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
13698 (GRUB_MOD_INIT): Likewise.
13699 * commands/cmp.c (grub_cmp_init): Likewise.
13700 (GRUB_MOD_INIT): Likewise.
13701
13702 * normal/arg.c: Use <> instead of "" to include header files.
13703 (SHORT_ARG_HELP): New macro.
13704 (SHORT_ARG_USAGE): Likewise.
13705 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
13706 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
13707 descriptions.
13708 (find_short): Check if C is 'h' or 'u' explicitly.
13709 (grub_arg_show_help): Use space characters instead of tabs. Treat
13710 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
13711 are shown with --help and --usage only if they are not used for
13712 the command itself.
13713 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
13714 'h' and 'u'.
13715
13716 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
13717 const into "longarg". Change the type of "shortarg" to int.
13718
f806d18e 137192005-07-17 Yoshinori Okuji <okuji@enbug.org>
13720
13721 * boot/i386/pc/boot.S (boot_drive_check): New label.
13722
13723 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
13724 macro.
13725
13726 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
13727 which do not pass a boot drive correctly. Copied from GRUB Legacy.
13728
e293232b 137292005-07-17 Yoshinori Okuji <okuji@enbug.org>
13730
13731 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
13732 When turning off Gate A20, skip the check and return immediately,
13733 because this is not fatal usually.
13734
ebedfd00 137352005-07-17 Yoshinori Okuji <okuji@enbug.org>
13736
13737 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
13738 be 0x7C00 instead of 0x8000.
13739
13740 * boot/i386/pc/pxeboot.S: Rewritten.
13741
13742 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
13743 EXT_C.
13744 (gate_a20_check_state): Read a byte from 0x108000. Invert the
13745 result.
13746
654fc59f 137472005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
13748
13749 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
13750 robustness. This routine now supports a BIOS call and System
13751 Control Port A to modify the gate A20.
13752
13753 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13754 Increased to 0x440.
13755
09f9923f 137562005-07-12 Hollis Blanchard <hollis@penguinppc.org>
13757
13758 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
13759 device path and resulting ihandle.
13760 (grub_ofdisk_close): dprintf the ihandle being closed.
13761 (grub_ofdisk_read): dprintf function parameters.
13762 * kern/mm.c (grub_mm_init_region): Likewise.
13763 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
13764 (grub_linux_boot): dprintf the Linux entry point, initrd address and
13765 size, and boot arguments.
13766 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
13767 before loading into memory.
13768 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
13769 before loading into memory.
13770
7ef504d8 137712005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
13772
13773 * kern/mm.c: Added much documentation.
13774 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
13775 8, set to 5 instead of 8.
13776
e0f050c2 137772005-07-10 Yoshinori Okuji <okuji@enbug.org>
13778
13779 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
13780
13781 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
13782 (grub_mkdevicemap_SOURCES): New variable.
13783
13784 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
13785 lib/device.c of GRUB Legacy.
13786
7224189a 137872005-07-10 Yoshinori Okuji <okuji@enbug.org>
13788
13789 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
13790 instead of PATH is NULL.
13791
68c864eb 137922005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
13793
13794 * commands/cmp.c (BUFFER_SIZE): New macro.
13795 (grub_cmd_cmp): Close the right file at the right time. Compare
13796 only data just read. Don't report files of different size as
13797 identical. Dynamically allocate buffers. Move variable
13798 declarations at the beginning of function.
13799
e6f3e614 138002005-07-09 Yoshinori Okuji <okuji@enbug.org>
13801
13802 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
13803 reverse.
13804
f8f1559a 138052004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
13806
13807 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
13808 when backspace is pressed at beginning of line.
13809
39c9d41d 138102005-07-03 Yoshinori Okuji <okuji@enbug.org>
13811
13812 * DISTLIST: Added genfslist.sh.
13813
13814 * normal/main.c (fs_module_list): New variable.
13815 (autoload_fs_module): New function.
13816 (read_fs_list): Likewise.
13817 (grub_normal_execute): Call read_fs_list.
13818
13819 * kern/fs.c (grub_fs_autoload_hook): New variable.
13820 (grub_fs_probe): Added support for auto-loading.
13821
13822 * include/grub/normal.h (struct grub_fs_module_list): New struct.
13823 (grub_fs_module_list_t): New type.
13824
13825 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
13826 (grub_fs_autoload_hook): New prototype.
13827
13828 * genfslist.sh: New file.
f19dbdb7 13829
39c9d41d 13830 * genmk.rb: Added a rule to generate a filesystem list.
13831
121c1d83 138322005-06-30 Marco Gerards <metgerards@student.han.nl>
13833
13834 * configure.ac: Fix the test for cross-compiling.
13835
13836 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
13837 define GRUB_UTIL anymore.
13838
13839 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
13840 so this function works on other systems than just big endian.
13841 (load_modules): Likewise.
13842 (add_segments): Likewise.
13843
e75d76e1 138442005-06-23 Hollis Blanchard <hollis@penguinppc.org>
13845
13846 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
13847 contains `l' modifier, get a long from va_arg().
13848
50b5a0a7 138492005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
13850
13851 * kern/mm.c (grub_free): If the next free block which is being
13852 merged is the first free block, set the first block to the block
13853 being freed.
13854 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
13855
89371b20 138562005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13857
13858 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
13859 `grub_ieee1275_chosen'.
13860
168d6e58 138612005-05-08 Hollis Blanchard <hollis@penguinppc.org>
13862
13863 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
13864 (grub_ieee1275_chosen): New variable.
13865 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
13866 `chosen'.
13867 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
13868 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13869 Rename first argument to `phandle' for consistency.
13870 (grub_ieee1275_get_property_length): Likewise.
13871 (grub_ieee1275_next_property): Likewise. Change type of first argument
13872 to grub_ieee1275_phandle_t.
13873 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
13874 Move export next to declaration.
13875 (grub_ieee1275_chosen): New variable.
13876 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
13877 Correct cosmetic typo.
13878 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
13879 `grub_ieee1275_chosen'.
13880 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
13881 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
13882 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
13883 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
13884 `grub_ieee1275_chosen'.
13885
ca5baa3f 138862005-05-10 Hollis Blanchard <hollis@penguinppc.org>
13887
13888 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
13889 /chosen/bootargs.
13890 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
13891 /chosen/bootargs as "variable=value" pairs.
13892
708b345f 138932005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
13894
13895 * include/grub/misc.h (grub_dprintf): New macro.
13896 (grub_real_dprintf): New prototype.
13897 (grub_strword): Likewise.
13898 (grub_iswordseparator): Likewise.
13899 * kern/misc.c (grub_real_dprintf): New function.
13900 (grub_strword): Likewise.
13901 (grub_iswordseparator): Likewise.
13902
f4c5e67c 139032005-04-30 Hollis Blanchard <hollis@penguinppc.org>
13904
13905 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
13906 (roundup): Remove macro.
13907 (grub_ieee1275_flags): Make static.
13908 (grub_ieee1275_realmode): Remove.
13909 (grub_ieee1275_test_flag): New function.
13910 (grub_ieee1275_set_flag): Likewise.
13911 (find_options): Rename to `grub_ieee1275_find_options'; update
13912 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
13913 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
13914 (cmain): New prototype.
13915 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
13916 `grub_ieee1275_flags' directly.
13917 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
13918 machine/biosdisk.h.
13919 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
13920 Don't include grub/machine/init.h.
13921 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
13922 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13923 Remove prototype.
13924 (grub_ieee1275_realmode): Likewise.
13925 (grub_ieee1275_flag): New enum.
13926 (grub_ieee1275_test_flag): New prototype.
13927 (grub_ieee1275_set_flag): New prototype.
13928 * include/grub/powerpc/ieee1275/init.h: Remove file.
13929 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
13930 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
13931 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
13932 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
13933 comment.
13934 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
13935 `grub_ieee1275_test_flag'.
13936 (grub_ieee1275_encode_devname): Likewise.
13937
ed16607e 139382005-04-21 Hollis Blanchard <hollis@penguinppc.org>
13939
13940 * include/grub/powerpc/ieee1275/ieee1275.h
13941 (grub_ieee1275_encode_devname): New prototype.
13942 (grub_ieee1275_get_filename): Likewise.
13943 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
13944 function.
13945 (grub_set_prefix): Likewise.
13946 (grub_machine_init): Call grub_set_prefix.
13947 * kern/powerpc/ieee1275/openfw.c: Fix typos.
13948 (grub_parse_type): New enum.
13949 (grub_ieee1275_get_devargs): New function.
13950 (grub_ieee1275_get_devname): Likewise.
13951 (grub_ieee1275_parse_args): Likewise.
13952 (grub_ieee1275_get_filename): Likewise.
13953 (grub_ieee1275_encode_devname): Likewise.
13954
be369920 139552005-03-30 Marco Gerards <metgerards@student.han.nl>
13956
13957 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
13958 `grub_loader_unset'.
13959
a5ce3a4a 139602005-03-26 Hollis Blanchard <hollis@penguinppc.org>
13961
13962 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
13963 instead of grub_ieee1275_interpret.
13964 (grub_halt_init): New function.
13965 (grub_halt_fini): Likewise.
13966 (GRUB_MOD_INIT): Correct message grammar.
13967 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
13968 instead of grub_ieee1275_interpret.
13969 (grub_reboot_init): New function.
13970 (grub_reboot_fini): Likewise.
13971 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
13972 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
13973 util/i386/pc/misc.c with commands/ieee1275/halt.c,
13974 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
13975 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
13976 function.
13977 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
13978 Add prototype.
13979 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
13980 prototype.
13981 (grub_halt): Likewise.
13982 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
13983 (cmain): Remove __attribute__((unused)).
13984 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
13985 (grub_heap_len): Likewise.
13986 (grub_machine_fini): New function.
13987 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
13988 (grub_halt): Likewise.
13989 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
13990 function.
13991 * util/powerpc/ieee1275/misc.c: New file.
13992
0058f771 139932005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
13994
13995 * DISTLIST: New file.
13996 * gendistlist.sh: Likewise.
f19dbdb7 13997
0058f771 13998 * Makefile.in (COMMON_DISTFILES): Removed.
13999 (BOOT_DISTFILES): Likewise.
14000 (CONF_DISTFILES): Likewise.
14001 (DISK_DISTFILES): Likewise.
14002 (FS_DISTFILES): Likewise.
14003 (INCLUDE_DISTFILES): Likewise.
14004 (KERN_DISTFILES): Likewise.
14005 (LOADER_DISTFILES): Likewise.
14006 (TERM_DISTFILES): Likewise.
14007 (UTIL_DISTFILES): Likewise.
14008 (DISTFILES): Likewise.
14009 (uninstall): Uninstall files in $(pkgdata_DATA).
14010 (DISTLIST): New target.
14011 (distdir): Use the contents of the file DISTLIST to get a list of
14012 distributed files.
14013
46b3b8a5 140142005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
14015
14016 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
14017 descriptor. This is ported from GRUB Legacy.
14018
14019 * gencmdlist.sh: Added an extra semicolon to make it work with
14020 old sed versions. Reported by Robert Bihlmeyer
14021 <robbe@orcus.priv.at>.
14022
5822ff87 140232005-03-08 Yoshinori Okuji <okuji@enbug.org>
14024
14025 Automatic loading of commands is supported.
f19dbdb7 14026
5822ff87 14027 * normal/main.c (read_command_list): New function.
14028 (grub_normal_execute): Call read_command_list.
14029
14030 * normal/command.c (grub_register_command): Return zero or CMD.
14031 Allocate CMD->NAME from the heap.
14032 Initialize CMD->MODULE_NAME to zero.
14033 Find the same name as well. If the same command is found and it is
14034 a dummy command, overwrite members. If it is not a dummy command,
14035 return zero.
14036 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
14037 (grub_command_find): If a dummy command is found, load a module
14038 and retry to find a command only once.
14039
14040 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
14041 make sure that each command is loaded.
14042
14043 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
14044 macro.
14045 (struct grub_command): Remove const from the member `name'.
14046 Add a new member `module_name'.
14047 (grub_register_command): Return grub_command_t.
14048
14049 * commands/help.c (grub_cmd_help): Call grub_command_find to make
14050 sure that each command is loaded.
14051
14052 * genmk.rb (PModule::rule): Specify a module name without the
14053 suffix ".mod" to gencmdlist.sh.
14054
7b1f4b57 140552005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14056
14057 * gencmdlist.sh: New file.
f19dbdb7 14058
7b1f4b57 14059 * genmk.rb (PModule::rule): Generate a rule for a command list.
14060 Clean command.lst.
14061 Generate command.lst from $(COMMANDFILES).
14062
14063 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
14064 (DATA): Added $(pkgdata_DATA).
14065 (install-local): Install files in $(pkgdata_DATA).
14066
062aaf39 140672005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
14068
14069 * term/i386/pc/vga.c (debug_command): Removed.
14070 (GRUB_MOD_INIT): Do not register the command "debug".
14071
14072 From Hollis Blanchard:
14073 * commands/configfile.c: New file.
14074 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14075 commands/configfile.c.
14076 (pkgdata_MODULES): Added configfile.mod.
14077 (configfile_mod_SOURCES): New variable.
14078 (configfile_mod_CFLAGS): Likewise.
14079 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14080 commands/configfile.c.
14081 (pkgdata_MODULES): Added configfile.mod.
14082 (configfile_mod_SOURCES): New variable.
14083 (configfile_mod_CFLAGS): Likewise.
14084 * util/grub-emu.c (main): Call grub_configfile_init and
14085 grub_configfile_fini.
14086 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
14087 prototype.
14088 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 14089
cee01aa6 140902005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14091
14092 * normal/arg.c (grub_arg_show_help): Do not show the bug report
14093 address.
14094
14095 * commands/help.c (grub_cmd_help): Do not print newlines after
14096 the last command in print_command_help.
14097
93f3a1d8 140982005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
14099
14100 * commands/default.h: New file.
14101 * commands/timeout.h: Likewise.
14102 * normal/context.c: Likewise.
f19dbdb7 14103
93f3a1d8 14104 * util/misc.c: Do not include sys/times.h.
14105 Include sys/time.h and grub/machine/time.h.
14106 (grub_get_rtc): Rewritten with gettimeofday.
14107
14108 * util/grub-emu.c (main): Call grub_default_init and
14109 grub_timeout_init before grub_normal_init, and call
14110 grub_timeout_fini and grub_default_fini after grub_main.
14111
14112 * util/console.c (grub_ncurses_checkkey): Return the read
14113 character or -1.
14114
14115 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
14116 timeouts.
14117
14118 * normal/main.c (read_config_file): Push MENU. If this fails,
14119 print an error and wait for a user input.
14120 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
14121 If a menu is empty or an error occurs, pop MENU.
14122 (grub_normal_execute): Pop and free MENU after grub_menu_run
14123 returns.
14124
14125 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
14126
14127 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
14128 include time.h.
14129 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14130 without GRUB_UTIL.
14131 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
14132 time.h.
14133 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
14134 without GRUB_UTIL.
14135
14136 * include/grub/normal.h (struct grub_menu_list): New struct.
14137 (grub_menu_list_t): New type.
14138 (struct grub_context): New struct.
14139 (grub_context_t): New type.
14140 (grub_register_command): Got rid of EXPORT_FUNC.
14141 (grub_unregister_command): Likewise.
14142 (grub_context_get): New prototype.
14143 (grub_context_get_current_menu): Likewise.
14144 (grub_context_push_menu): Likewise.
14145 (grub_context_pop_menu): Likewise.
14146 [GRUB_UTIL] (grub_default_init): Likewise.
14147 [GRUB_UTIL] (grub_default_fini): Likewise.
14148 [GRUB_UTIL] (grub_timeout_init): Likewise.
14149 [GRUB_UTIL] (grub_timeout_fini): Likewise.
14150
14151 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
14152 commands/timeout.c and normal/context.c.
14153 (pkgdata_MODULES): Added default.mod and timeout.mod.
14154 (normal_mod_SOURCES): Added normal/context.c.
14155 (default_mod_SOURCES): New variable.
14156 (default_mod_CFLAGS): Likewise.
14157 (timeout_mod_SOURCES): Likewise.
14158 (timeout_mod_CFLAGS): Likewise.
14159 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
14160 conf/i386-pc.rmk.
14161 (pkgdata_MODULES): Added default.mod and timeout.mod.
14162 (normal_mod_SOURCES): Added normal/context.c.
14163 (default_mod_SOURCES): New variable.
14164 (default_mod_CFLAGS): Likewise.
14165 (timeout_mod_SOURCES): Likewise.
14166 (timeout_mod_CFLAGS): Likewise.
14167
14168 * Makefile.in (all-local): Added $(MKFILES).
14169
4ed2e1dd 141702005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
14171
14172 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
14173 (grub_emu_SOURCES): Likewise.
14174 (pkgdata_MODULES): Add `sun.mod'.
14175 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14176 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14177 `partmap/sun.c'.
14178 (pkgdata_MODULES): Add `sun.mod'.
14179 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
14180 * include/grub/partition.h (grub_sun_partition_map_init): New
14181 prototype.
14182 (grub_sun_partition_map_fini): Likewise.
14183 * partmap/sun.c: New file.
14184 * util/grub-emu.c (main): Initialize and de-initialize the sun
14185 partitionmap support.
14186
4d4e372e 141872005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
14188
14189 This implements an Emacs-like menu entry editor.
f19dbdb7 14190
4d4e372e 14191 * normal/menu_entry.c: New file.
f19dbdb7 14192
4d4e372e 14193 * util/console.c (grub_ncurses_putchar): Translate some Unicode
14194 characters to ASCII.
14195 (saved_char): New variable.
14196 (grub_ncurses_checkkey): Rewritten completely.
14197 (grub_ncurses_getkey): Likewise.
14198 (grub_ncurses_init): Call raw instead of cbreak.
14199
14200 * normal/menu.c (print_entry): Do not put a space.
14201 (init_page): Renamed to ...
14202 (grub_menu_init_page): ... this. All callers changed.
14203 (edit_menu_entry): Removed.
14204 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
14205
14206 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
14207
14208 * kern/misc.c (grub_vprintf): Call grub_refresh.
14209
14210 * normal/menu.c (DISP_LEFT): Renamed to ...
14211 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
14212 * normal/menu.c (DISP_UP): Renamed to ...
14213 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
14214 * normal/menu.c (DISP_RIGHT): Renamed to ...
14215 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
14216 * normal/menu.c (DISP_DOWN): Renamed to ...
14217 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
14218 * normal/menu.c (DISP_HLINE): Renamed to ...
14219 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
14220 * normal/menu.c (DISP_VLINE): Renamed to ...
14221 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
14222 * normal/menu.c (DISP_UL): Renamed to ...
14223 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
14224 * normal/menu.c (DISP_UR): Renamed to ...
14225 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
14226 * normal/menu.c (DISP_LL): Renamed to ...
14227 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
14228 * normal/menu.c (DISP_LR): Renamed to ...
14229 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
14230 * normal/menu.c (TERM_WIDTH): Renamed to ...
14231 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
14232 * normal/menu.c (TERM_HEIGHT): Renamed to ...
14233 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
14234 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
14235 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
14236 * normal/menu.c (TERM_MARGIN): Renamed to ...
14237 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
14238 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
14239 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
14240 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
14241 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
14242 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
14243 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
14244 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
14245 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
14246 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
14247 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
14248 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
14249 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
14250 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
14251 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
14252 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
14253 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
14254 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
14255 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
14256 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
14257 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
14258 All callers changed.
14259
14260 * include/grub/normal.h: New prototype.
14261
14262 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14263 normal/menu_entry.c.
14264 (normal_mod_SOURCES): Likewise.
14265 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14266 (normal_mod_SOURCES): Likewise.
14267
e6b92c8a 142682005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
14269
14270 * include/grub/normal.h (grub_halt_init): New prototype.
14271 (grub_halt_fini): Likewise.
14272 (grub_reboot_init): Likewise.
14273 (grub_reboot_fini): Likewise.
14274
14275 * util/grub-emu.c: Include signal.h.
14276 (main_env): New global variable.
14277 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
14278 catch C-c.
14279 (grub_machine_fini): New function.
14280 (main): Call grub_halt_init and grub_reboot_init before
14281 grub_main, and grub_reboot_fini and grub_halt_fini after it.
14282 Call setjmp with MAIN_ENV to go back afterwards.
14283 Call grub_machine_fini right before return.
14284
14285 * include/grub/util/misc.h: Include setjmp.h.
14286 (main_env): New prototype.
14287
14288 * include/grub/kernel.h (grub_machine_fini): New prototype.
14289 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
14290 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
14291
14292 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
14293 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
14294 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 14295
e6b92c8a 14296 * util/i386/pc/misc.c: New file.
f19dbdb7 14297
e6b92c8a 14298 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
14299 util/i386/pc/misc.c, commands/i386/pc/halt.c and
14300 commands/i386/pc/reboot.c.
14301
c642636f 143022005-02-14 Guillem Jover <guillem@hadrons.org>
14303
14304 * include/grub/dl.h (grub_dl_check_header): New prototype.
14305 (grub_arch_dl_check_header): Change return type to grub_err_t,
14306 remove size parameter and export function. Update all callers.
14307 * kern/dl.c (grub_dl_check_header): New function.
14308 (grub_dl_load_core): Use `grub_dl_check_header' instead of
14309 `grub_arch_dl_check_header'. Check ELF type. Check if sections
14310 are inside the core.
14311 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
14312 independent ELF header checks.
14313 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14314 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
14315 `grub_dl_check_header' instead of explicit checks. Check for the
14316 ELF type.
14317 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
14318 `grub_dl_check_header' instead of explicit checks. Remove arch
14319 specific ELF header checks.
14320
e6b92c8a 14321 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
14322 argument SIZE.
14323
5eabe94b 143242005-02-13 Hollis Blanchard <hollis@penguinppc.org>
14325
14326 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
14327 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
14328
1b14a681 143292005-02-12 Hollis Blanchard <hollis@penguinppc.org>
14330
14331 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 14332 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 14333 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 14334 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 14335 * partmap/amiga.c (amiga_partition_map_iterate): Return
14336 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
14337 * partmap/apple.c (apple_partition_map_iterate): Likewise.
14338
aca108aa 143392005-02-01 Guillem Jover <guillem@hadrons.org>
14340
14341 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
14342 help info.
14343
c9f9c556 143442005-01-31 Marco Gerards <metgerards@student.han.nl>
14345
14346 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
14347 Removed prototype.
14348 (grub_rescue_cmd_linux): New prototype.
14349 (grub_rescue_cmd_initrd): Likewise.
14350 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
14351 `bi_rec'.
14352 (grub_linux_release_mem): Release the memory for the initrd.
14353 (grub_load_linux): Renamed from this...
14354 (grub_rescue_cmd_linux): ...To this. Changed all callers.
14355 Changed `entry' not to be static. Loop over memory regions to
14356 find another one when the default fails.
14357 (grub_rescue_cmd_initrd): New function.
14358 (grub_linux_init): Remove function.
14359 (grub_linux_fini): Likewise.
14360 (GRUB_MOD_INIT): Register `initrd'.
14361 (GRUB_MOD_FINI): Unregister `initrd'.
14362 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
14363 Function removed.
14364 (grub_linux_normal_fini): Likewise.
14365 (GRUB_MOD_INIT): Register `initrd'.
14366 (GRUB_MOD_FINI): Unregister `initrd'.
14367
990cf3aa 143682005-01-31 Marco Gerards <metgerards@student.han.nl>
14369
14370 * commands/help.c: New file.
14371 * normal/arg.c (show_help): Renamed to...
14372 (grub_arg_show_help): ... this.
14373 * commands/i386/pc/halt.c: New file.
14374 * commands/i386/pc/reboot.c: Likewise.
14375 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
14376 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
14377 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
14378 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
14379 variables.
14380 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14381 `commands/help.c'.
14382 (pkgdata_MODULES): Add `help.mod'.
14383 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
14384 * grub/i386/pc/init.h (grub_reboot): New prototype.
14385 (grub_halt): Likewise.
14386 * include/grub/normal.h (grub_arg_show_help): New prototype.
14387 (grub_help_init): Likewise.
14388 (grub_help_fini): Likewise.
14389 * util/grub-emu.c (main): Initialize and deinitialize the help
14390 command.
14391
14392 * normal/cmdline.c (grub_cmdline_get): Doc fix.
14393
14394 * normal/command.c (grub_command_init): Fixed the description of
14395 the `set' and `unset' commands.
14396
143972005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 14398
14399 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
14400 function.
14401 * commands/ieee1275/halt.c: New file.
14402 * commands/ieee1275/reboot.c: Likewise.
14403 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
14404 `__attribute__ ((unused))'. Some GCS related fixed.
14405 (grub_suspend_init) [GRUB_UTIL]: Function removed.
14406 (grub_suspend_fini): Likewise.
14407 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
14408 and `halt.mod'.
14409 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
14410 (halt_mod_CFLAGS): New variables.
14411 * include/grub/powerpc/ieee1275/ieee1275.h
14412 (grub_ieee1275_interpret): New prototype.
14413
1ab09cc7 144142005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
14415
14416 * include/grub/misc.h (memmove): New prototype.
14417 (memcpy): Likewise.
14418
8b8cbdb2 144192005-01-22 Hollis Blanchard <hollis@penguinppc.org>
14420
14421 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
14422 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
14423
e3741a27 144242005-01-22 Marco Gerards <metgerards@student.han.nl>
14425
14426 * kern/misc.c (grub_strndup): Function rewritten.
14427
776bd780 144282005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
14429
14430 * normal/menu.c (TERM_WIDTH): Macro redefined.
14431 (TERM_TOP_BORDER_Y): Likewise.
14432 (draw_border): Replaced while-loop by a for-loop. Make the number
14433 of lines consistent with the number of lines displayed in
14434 print_entries. Added a margin below the rectangle.
14435 (print_entry): Make the entry fit in the rectangle.
14436 (print_entries): Display the scroll arrows next to the right
14437 border.
14438
78026bce 144392005-01-21 Marco Gerards <metgerards@student.han.nl>
14440
14441 * fs/minix.c (grub_minix_find_file): Reserve more space for
14442 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
14443 `grub_strncpy' to copy `path' into it.
14444
67bbaf0f 144452005-01-21 Marco Gerards <metgerards@student.han.nl>
14446
14447 Add the loopback device, a device via which files can be accessed
14448 as devices.
f19dbdb7 14449
67bbaf0f 14450 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
14451 (pkgdata_MODULES): Add loopback.mod.
14452 (loopback_mod_SOURCES): New variable.
14453 (loopback_mod_CFLAGS): Likewise.
14454 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14455 `disk/loopback.c'.
14456 (pkgdata_MODULES): Add loopback.mod.
14457 (loopback_mod_SOURCES): New variable.
14458 (loopback_mod_CFLAGS): Likewise.
14459 * disk/loopback.c: new file.
14460 * include/grub/normal.h (grub_loop_init): New prototype.
14461 (grub_loop_fini): New prototype.
14462 * util/grub-emu.c (main): Initialize and de-initialize loopback
14463 support.
14464 * include/grub/disk.h (grub_disk_dev_id): Add
14465 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
14466
6f1c18bd 144672005-01-20 Hollis Blanchard <hollis@penguinppc.org>
14468
14469 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
14470 function.
14471 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
14472 (suspend_mod_SOURCES): New variable.
14473 (suspend_mod_CFLAGS): Likewise.
14474 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
14475 New prototype.
14476 * commands/ieee1275/suspend.c: New file.
14477
b38551da 144782005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
14479
14480 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 14481 ((unused))' to `__attribute__ ((used))'.
b38551da 14482 (GRUB_MOD_FINI): Likewise.
14483 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
14484 * genmk.rb (PModule): Assign space to common symbols when linking
14485 modules.
14486
777aff39 144872005-01-20 Marco Gerards <metgerards@student.han.nl>
14488
14489 * include/grub/mm.h (grub_mm_init_region): Change the type of the
14490 `unsigned' arguments to `grub_size_t'.
14491 (grub_malloc): Likewise.
14492 (grub_realloc): Likewise.
14493 (grub_memalign): Likewise.
14494 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
14495 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
14496 * util/misc.c (grub_malloc): Likewise.
14497 (grub_realloc): Likewise.
14498 * kern/mm.c (get_header_from_pointer): Change the casts to
14499 `unsigned' into a cast to `grub_size_t'.
14500
14501 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
14502 point to `currnode' when `currnode' is changed.
14503
14504 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
14505 Schottelius <nico-linux@schottelius.org>.
14506
d0ff18e1 145072005-01-09 Hollis Blanchard <hollis@penguinppc.org>
14508
14509 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
14510 (note_path): Remove variable.
14511 (GRUB_IEEE1275_NOTE_NAME): New macro.
14512 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
14513 (grub_ieee1275_note_hdr): New structure.
14514 (grub_ieee1275_note_desc): Likewise.
14515 (grub_ieee1275_note): Likewise.
14516 (load_note): Remove `dir' argument. All callers updated. Remove
14517 `note_img' and `path'. Do not load a file from `note_path'.
14518 Initialize a struct grub_ieee1275_note and write that to `out'.
14519 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
14520
4ca7004c 145212005-01-05 Marco Gerards <metgerards@student.han.nl>
14522
14523 * util/misc.c (grub_util_read_image): Revert last change. It
14524 called `grub_util_read_at', which seeks from the beginning of the
14525 file.
14526
0b412211 145272005-01-04 Hollis Blanchard <hollis@penguinppc.org>
14528
14529 * TODO: Add note about endianness in grub-mkimage.
14530 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
14531 section.
14532 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
14533 (grub_mkimage_SOURCES): New target.
14534 * include/grub/kernel.h (grub_start_addr): Remove variable.
14535 (grub_end_addr): Likewise.
14536 (grub_total_module_size): Likewise.
14537 (grub_kernel_image_size): Likewise.
14538 (GRUB_MODULE_MAGIC): New constant.
14539 (grub_module_info): New structure.
14540 (grub_arch_modules_addr): New prototype.
14541 (grub_get_end_addr): Remove prototype.
14542 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
14543 * include/grub/powerpc/ieee1275/kernel.h: New file.
14544 * include/grub/util/misc.h (grub_util_get_fp_size): New
14545 prototype.
14546 (grub_util_read_at): Likewise.
14547 (grub_util_write_image_at): Likewise.
14548 * kern/main.c (grub_get_end_addr): Remove function.
14549 (grub_load_modules): Call grub_arch_modules_addr instead of using
14550 grub_end_addr. Look for a grub_module_info struct in memory. Use
14551 the grub_module_info fields instead of calling grub_get_end_addr
14552 as loop conditions. Move grub_add_unused_region code here.
14553 (grub_add_unused_region): Remove function.
14554 * kern/i386/pc/init.c: Include grub/cache.h.
14555 (grub_machine_init): Remove call to grub_get_end_addr. Remove
14556 one call to add_mem_region.
14557 (grub_arch_modules_addr): New function.
14558 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
14559 (grub_total_module_size): Likewise.
14560 Include grub/machine/kernel.h.
14561 (grub_arch_modules_addr): New function.
14562 * util/grub-emu.c (grub_end_addr): Remove variable.
14563 (grub_total_module_size): Likewise.
14564 (grub_arch_modules_addr): New function.
14565 * util/misc.c: Include unistd.h.
14566 (grub_util_get_fp_size): New function.
14567 (grub_util_read_at): Likewise.
14568 (grub_util_write_image_at): Likewise.
14569 (grub_util_read_image): Call grub_util_read_at.
14570 (grub_util_write_image): Call grub_util_write_image_at.
14571 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
14572 additional memory in kernel_img for a struct grub_module_info.
14573 Fill in that grub_module_info.
14574 * util/powerpc/ieee1275/grub-mkimage.c: New file.
14575
458786f8 145762005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14577
14578 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
14579 New function.
14580 * include/grub/powerpc/ieee1275/ieee1275.h
14581 (grub_ieee1275_milliseconds): New prototype.
14582 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
14583 Change to 1000.
14584 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
14585 grub_ieee1275_milliseconds.
14586
ac507d1b 145872005-01-03 Hollis Blanchard <hollis@penguinppc.org>
14588
14589 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
14590 variable.
14591 (find_options): New function.
14592 (cmain): Call find_options.
14593 * include/grub/powerpc/ieee1275/ieee1275.h
14594 (grub_ieee1275_realmode): New extern variable.
14595 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
14596 grub_map if grub_ieee1275_realmode is false.
14597
6b8fd1c4 145982004-12-29 Marco Gerards <metgerards@student.han.nl>
14599
14600 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
14601 lines are inserted and make it work like readline. Reported by
14602 Vincent Pelletier <subdino2004@yahoo.fr>.
14603
8514a1e0 146042004-12-28 Marco Gerards <metgerards@student.han.nl>
14605
14606 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
14607
14608 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
14609 `kern/powerpc/cache.S'.
14610
924b6140 146112004-12-27 Marco Gerards <metgerards@student.han.nl>
14612
14613 * genmk.rb: Handle the `Program' class in the main loop. Written
14614 by Johan Rydberg <jrydberg@gnu.org>.
14615 (Program): New class.
14616 (programs): New variable.
14617 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
14618 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
14619 instead of "grub/kernel.h". Include <grub/machine/init.h>.
14620 (help_arch): Function removed.
14621 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
14622 `powerpc/libgcc.h' and `loader.h'.
14623 (pkgdata_PROGRAMS): New variable.
14624 (sbin_UTILITIES): Variable removed.
14625 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
14626 (grubof_SOURCES): Variable re-defined so it only includes the
14627 core functionality.
14628 (grubof_CFLAGS): Remove `-DGRUBOF'.
14629 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
14630 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
14631 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
14632 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
14633 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
14634 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
14635 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
14636 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
14637 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
14638 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
14639 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14640 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
14641 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
14642 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
14643 (pc_mod_CFLAGS): New variables.
14644 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
14645 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
14646 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
14647 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
14648 Moved from here...
14649 * include/grub/i386/pc/init.h (grub_os_area_addr)
14650 (rub_os_area_size): ... to here.
14651 * include/grub/powerpc/ieee1275/ieee1275.h
14652 (grub_ieee1275_entry_fn): Export symbol.
14653 * include/grub/powerpc/ieee1275/init.h: New file.
14654 * include/grub/powerpc/libgcc.h: Likewise.
14655 * include/grub/cache.h: Likewise.
14656 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
14657 <hollis@penguinppc.org>.
14658 * kern/dl.c: Include <grub/cache.h>.
14659 (grub_dl_flush_cache): New function.
14660 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
14661 for this module.
14662 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
14663 (grub_console_init): Removed prototypes.
14664 (grub_machine_init): Don't initialize the modules anymore.
14665 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
14666 static.
14667 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
14668 Macro undef removed.
14669 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
14670 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
14671 relocation `R_PPC_REL32'. Return an error when the relocation is
14672 unknown.
14673 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
14674 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
14675 * util/misc.c (grub_arch_sync_caches): Likewise.
14676
e4b47e0c 146772004-12-19 Marco Gerards <metgerards@student.han.nl>
14678
14679 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
14680 `symlist.c', add `grubof_symlist.c'.
14681 (symlist.c): Variable removed.
14682 (grubof_HEADERS): Variable added.
14683 (grubof_symlist.c): New target.
14684 (kernel_syms.lst): Use `grubof_HEADERS' instead of
14685 `kernel_img_HEADERS'.
14686 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
14687 * kern/powerpc/dl.c: New file.
14688 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
14689 Function removed.
14690 (grub_arch_dl_relocate_symbols): Likewise.
14691 (grub_register_exported_symbols): Likewise.
14692
4ceb3636 146932004-12-13 Marco Gerards <metgerards@student.han.nl>
14694
14695 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
14696 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
14697 to fail instead. Reported by Vincent Pelletier
14698 <subdino2004@yahoo.fr>.
14699
14700 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
14701 it is not allocated. Reported by Vincent Pelletier
14702 <subdino2004@yahoo.fr>.
14703
14704 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
14705 output so the output looks better.
f19dbdb7 14706
3f1578fe 147072004-12-04 Marco Gerards <metgerards@student.han.nl>
14708
14709 Modulize the partition map support and add support for the amiga
14710 partition map.
f19dbdb7 14711
3f1578fe 14712 * commands/ls.c: Include <grub/partition.h> instead of
14713 <grub/machine/partition.h>.
14714 * kern/disk.c: Likewise.
14715 * kern/rescue.c: Likewise.
14716 * loader/i386/pc/chainloader.c: Likewise.
14717 * normal/cmdline.c: Likewise.
14718 * kern/powerpc/ieee1275/init.c: Likewise.
14719 (grub_machine_init): Call `grub_pc_partition_map_init',
14720 `grub_amiga_partition_map_init' and
14721 `grub_apple_partition_map_init'.
14722 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
14723 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
14724 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
14725 `partition.h' and `pc_partition.h'.
14726 (grub_setup_SOURCES): Remove
14727 `disk/i386/pc/partition.c'. Add `kern/partition.c',
14728 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14729 (grub_emu_SOURCES): Likewise.
14730 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
14731 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
14732 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
14733 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14734 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
14735 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
14736 (grubof_SOURCES): Likewise.
14737 * disk/i386/pc/partition.c: File removed.
14738 * disk/powerpc/ieee1275/partition.c: Likewise.
14739 * include/grub/powerpc/ieee1275/partition.h: Likewise.
14740 * include/grub/i386/pc/partition.h: Likewise.
14741 * kern/partition.c: New file.
14742 * partmap/amiga.c: Likewise.
14743 * partmap/apple.c: Likewise.
14744 * partmap/pc.c: Likewise.
14745 * include/grub/partition.h: Likewise..
14746 * include/grub/pc_partition.h: Likewise.
14747 * util/grub-emu.c: Include <grub/partition.h> instead of
14748 <grub/machine/partition.h>.
14749 (main): Call `grub_pc_partition_map_init',
14750 `grub_amiga_partition_map_init' and
14751 `grub_apple_partition_map_init' and deinitialize afterwards.
14752 * util/i386/pc/biosdisk.c: Include `#include
14753 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14754 `<grub/machine/partition.h>'.
14755 * util/i386/pc/grub-setup.c: Likewise.
14756 * util/i386/pc/biosdisk.c: Likewise.
14757 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
14758 partition information in case of a PC partition.
14759 * util/i386/pc/grub-setup.c: Include `#include
14760 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
14761 `<grub/machine/partition.h>'.
14762 (setup): Only access the PC specific partition information in case
14763 of a PC partition.
14764
0ef4ced9 147652004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 14766
0ef4ced9 14767 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
14768 (grub_longjmp): Likewise.
14769 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
14770 20.
14771 * normal/powerpc/setjmp.S: New file.
14772 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
14773 `normal/powerpc/setjmp.S'.
14774 (grubof_CFLAGS): Add `-DGRUBOF'.
14775 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
14776 [GRUB_UTIL && !GRUBOF].
f19dbdb7 14777
19950e29 147782004-11-16 Marco Gerards <metgerards@student.han.nl>
14779
14780 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
14781 property named `name'. Correctly handle the error returned by
14782 `grub_ieee1275_finddevice' if a device can not be opened.
14783
a2fea427 147842004-11-02 Hollis Blanchard <hollis@penguinppc.org>
14785
14786 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
14787 `actual' for negativity.
14788 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
14789 kern/fshelp.c.
14790
41ea0ea3 147912004-11-01 Marco Gerards <metgerards@student.han.nl>
14792
14793 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
14794 (PAGE_OFFSET): New macro.
14795 (CRTC_ADDR_PORT): Likewise.
14796 (CRTC_DATA_PORT): Likewise.
14797 (START_ADDR_HIGH_REGISTER): Likewise.
14798 (START_ADDR_LOW_REGISTER): Likewise.
14799 (GRAPHICS_ADDR_PORT): Likewise.
14800 (GRAPHICS_DATA_PORT): Likewise.
14801 (READ_MAP_REGISTER): Likewise.
14802 (INPUT_STATUS1_REGISTER): Likewise.
14803 (INPUT_STATUS1_VERTR_BIT): Likewise.
14804 (page): New variable.
14805 (wait_vretrace): New function.
14806 (set_read_map): Likewise.
14807 (set_start_address): Likewise.
14808 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
14809 the right page.
14810 (check_vga_mem): Take the page into account.
14811 (write_char): Likewise.
14812 (write_cursor): Likewise.
14813 (scroll_up): Likewise. Copy the page to the page that is not
14814 shown and switch between both pages.
14815 (grub_vga_putchar): Fix off by one error.
14816 (grub_vga_cls): Wait for the vertical retrace. Take the page into
14817 account.
14818
ad0bd20b 148192004-11-01 Marco Gerards <metgerards@student.han.nl>
14820
14821 Add support for iso9660 (including rockridge).
f19dbdb7 14822
ad0bd20b 14823 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14824 (iso9660_mod_SOURCES): New variable.
14825 (iso9660_mod_CFLAGS): Likewise.
14826 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
14827 * include/grub/fs.h (grub_iso9660_init): New prototype.
14828 * util/grub-emu.c (main): Call `grub_iso9660_init'.
14829 * fs/iso9660.c: New file.
14830
14831 * include/grub/misc.h (grub_strncat): New prototype.
14832 * kern/misc.c (grub_strncat): New function.
f19dbdb7 14833
ad0bd20b 14834 * fs/hfs.c (grub_hfs_mount): Translate the error
14835 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
14836 * fs/jfs.c (grub_jfs_mount): Likewise.
14837 * fs/ufs.c (grub_ufs_mount): Likewise.
14838
a5477a59 148392004-10-28 Hollis Blanchard <hollis@penguinppc.org>
14840
14841 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
14842 which initialized BAT registers.
14843 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
14844 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14845 Move from here...
14846 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
14847 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
14848 ... to here.
14849 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
14850 (grub_mapclaim): Likewise.
14851 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
14852 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
14853 hand.
14854
9304c1f8 148552004-10-19 Hollis Blanchard <hollis@penguinppc.org>
14856
14857 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
14858 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
14859 -ffreestanding and -msoft-float.
14860
86f4ae25 148612004-10-15 Hollis Blanchard <hollis@penguinppc.org>
14862
14863 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
14864 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
14865 set in grub_ieee1275_flags.
14866
38912228 148672004-10-14 Hollis Blanchard <hollis@penguinppc.org>
14868
14869 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
14870 prototype.
14871 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
14872 grub_console_init first.
14873 Change the memory range used for grub_ieee1275_claim and
14874 grub_mm_init_region.
14875 Print an error message if the claim fails.
14876 Include <grub/misc.h>.
14877
d1923dc8 148782004-10-13 Hollis Blanchard <hollis@penguinppc.org>
14879
14880 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
14881 Call grub_children_iterate for device nodes of type `scsi',
14882 `ide', or `ata'.
14883 (grub_ofdisk_open): Remove manual device alias resolution.
14884 Fix memory leak when device cannot be opened.
f19dbdb7 14885 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 14886 (grub_children_iterate): New prototype.
14887 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
14888 New function.
14889 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
14890 Return -1 if args.size was -1.
14891
4512e4f3 148922004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14893
14894 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
14895 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
14896 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
14897 Open Firmware's memory for it; claim memory from _start to _end.
14898 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
14899 (_end): New extern.
14900 (_start): Zero BSS from __bss_start to _end.
14901 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
14902 New extern.
14903 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
14904
4d61feb0 149052004-10-11 Hollis Blanchard <hollis@penguinppc.org>
14906
ad0bd20b 14907 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
14908 -1 if args.base was -1.
4d61feb0 14909
026fa2f9 149102004-10-08 Hollis Blanchard <hollis@penguinppc.org>
14911
14912 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
14913 escape sequence instead of a literal ^L. Also call
14914 grub_ofconsole_gotoxy.
14915
9f2220ef 149162004-10-03 Hollis Blanchard <hollis@penguinppc.org>
14917
14918 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
14919 void * arguments to grub_addr_t. All callers updated. Also make
14920 the `result' argument optional.
14921 (grub_ieee1275_release): change void * arguments to grub_addr_t.
14922 All callers updated.
14923
8a572cd7 149242004-09-22 Hollis Blanchard <hollis@penguinppc.org>
14925
14926 * commands/ls.c (grub_ls_list_files): Use the string following the
14927 initial ')', if present, as the filesystem path.
14928 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
14929
14930 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
14931
18aa81f2 149322004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
14933
14934 Make the source code of the menu interface more readable.
f19dbdb7 14935
18aa81f2 14936 * normal/menu.c: Include grub/mm.h.
14937 (TERM_WIDTH): New macro.
14938 (TERM_HEIGHT): Likewise.
14939 (TERM_INFO_HEIGHT): Likewise.
14940 (TERM_MARGIN): Likewise.
14941 (TERM_SCROLL_WIDTH): Likewise.
14942 (TERM_TOP_BORDER_Y): Likewise.
14943 (TERM_LEFT_BORDER_X): Likewise.
14944 (TERM_BORDER_WIDTH): Likewise.
14945 (TERM_MESSAGE_HEIGHT): Likewise.
14946 (TERM_BORDER_HEIGHT): Likewise.
14947 (TERM_NUM_ENTRIES): Likewise.
14948 (TERM_FIRST_ENTRY_Y): Likewise.
14949 (TERM_ENTRY_WIDTH): Likewise.
14950 (TERM_CURSOR_X): Likewise.
14951 (draw_border): Use macros instead of magic numbers.
14952 (print_entry): Likewise.
14953 (print_entries): Likewise.
14954 (run_menu): Likewise. Also, handle the key 'e'.
14955 (run_menu_entry): Ignore empty command lines.
14956 (print_message): Added a new argument EDIT. If EDIT is true,
14957 print a different message.
14958 (init_page): Likewise.
14959 (edit_menu_entry): New function. Not implemented yet.
14960
b47efe30 149612004-09-17 Marco Gerards <metgerards@student.han.nl>
14962
14963 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
14964 can be loaded from normal mode.
f19dbdb7 14965
b47efe30 14966 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
14967 `multiboot.mod'.
14968 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
14969 (multiboot_mod_CFLAGS): New variables.
14970 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 14971 * loader/i386/pc/multiboot_normal.c: Likewise.
14972
b47efe30 14973 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
14974 attribute `unused'.
f19dbdb7 14975
b47efe30 14976 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
14977 `fdiro' to read the mode information from instead of `diro'.
14978
14979 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
14980 looking up a symlink.
14981
14982 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
14983 macro.
14984 * normal/command.c (grub_command_execute): Don't parse the
14985 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
14986 flags of the command.
14987
14988 * normal/menu.c (grub_menu_run): Fix typo.
14989
da75ac71 149902004-09-14 Hollis Blanchard <hollis@penguinppc.org>
14991
14992 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
14993
14994 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
14995 `y + 1' instead of `y - 1'.
14996
14997 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 14998
062b24c2 149992004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
15000
15001 From Hollis Blanchard <hollis@penguinppc.org>:
15002 * kern/misc.c (memmove): New alias for grub_memmove.
15003 (memcmp): New alias for grub_memcmp.
15004 (memset): New alias for grub_memset.
f19dbdb7 15005 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 15006 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 15007 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 15008 (grub_ieee1275_get_property): Likewise.
f19dbdb7 15009
8ddad845 150102004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
15011
15012 Added normal mode command `chainloader' as module chain.mod, which
15013 depends on normal.mod and _chain.mod.
f19dbdb7 15014
8ddad845 15015 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
15016 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
15017 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
15018 Deleted prototype.
15019 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
15020 but arguments parsing moved to ...
15021 (grub_chainloader_cmd): ... here. New function.
15022 * include/grub/i386/pc/chainloader.h: New file.
15023 * loader/i386/pc/chainloader_normal.c: Likewise.
15024
2c1f4ce3 150252004-09-11 Marco Gerards <metgerards@student.han.nl>
15026
15027 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
15028 (grub_mkimage_LDFLAGS): Likewise.
15029 (grub_emu_SOURCES): Likewise.
15030 (kernel_img_HEADERS): Added fshelp.h.
15031 * fs/ext2.c: Include <grub/fshelp.h>.
15032 (FILETYPE_REG): New macro.
15033 (FILETYPE_INO_REG): Likewise.
15034 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
15035 Changed all users.
15036 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
15037 all users.
15038 (grub_fshelp_node): New struct.
15039 (grub_ext2_data): Added member `diropen'. Changed member `inode'
15040 to a pointer.
15041 (grub_ext2_get_file_block): Removed function.
15042 (grub_ext2_read_block): New function.
15043 (grub_ext2_read_file): Replaced parameter `data' by `node'.
15044 This function was written.
15045 (grub_ext2_mount): Read the root inode. Create a diropen struct.
15046 (grub_ext2_find_file): Removed function.
15047 (grub_ext2_read_symlink): New function.
15048 (grub_ext2_iterate_dir): Likewise.
15049 (grub_ext2_open): Rewritten.
15050 (grub_ext2_dir): Rewritten.
15051 * include/grub/fshelp.h: New file.
15052 * fs/fshelp.c: Likewise.
15053
3c52136a 150542004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
15055
15056 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
15057 (print_message): Add a missing newline.
15058 (run_menu): Added timeout support.
15059 (run_menu_entry): New local function.
15060 (grub_menu_run): Added support for booting.
15061
15062 * kern/loader.c (grub_loader_is_loaded): New function.
15063
15064 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
15065 (grub_get_rtc): Exported.
15066
15067 * include/grub/i386/pc/time.h: Include grub/symbol.h.
15068 (grub_get_rtc): Exported.
15069
15070 * include/grub/normal.h (struct grub_command_list): Remove
15071 constant from the member `command'.
15072
15073 * include/grub/loader.h (grub_loader_is_loaded): Declared.
15074
15075 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
15076
15077 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
15078
aa033560 150792004-08-28 Marco Gerards <metgerards@student.han.nl>
15080
15081 Add support for the JFS filesystem.
15082
15083 * fs/jfs.c: New file.
15084 * include/grub/fs.h (grub_jfs_init): New prototype.
15085 (grub_jfs_fini): New prototype.
15086 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
15087 (grub_emu_SOURCES): Likewise.
15088 (pkgdata_MODULES): Add jfs.mod.
15089 (jfs_mod_SOURCES): New variable.
15090 (jfs_mod_CFLAGS): Likewise.
15091 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
15092 (grubof_SOURCES): Likewise.
15093 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
15094
15095 * fs/fat.c (grub_fat_find_dir): Convert the filename little
15096 endian to the host endian.
15097 (grub_fat_utf16_to_utf8): Move function from there...
15098 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 15099 the endianness of the source string anymore.
aa033560 15100 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
15101
94bc45af 151022004-08-24 Marco Gerards <metgerards@student.han.nl>
15103
15104 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
15105 (grub_boot_fini) [GRUB_UTIL]: Likewise.
15106 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
15107 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 15108
94bc45af 15109 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
15110 (grub_hfs_iterate_dir): Make the function static. Add prototypes
15111 for `node_found' and `it_dir'.
15112 (grub_hfs_dir): Add prototype for `dir_hook'.
15113
15114 * fs/minix.c (grub_minix_get_file_block): Add prototype for
15115 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
15116 and `indir32' to silence a gcc warning.
15117
15118 * include/grub/fs.h (grub_hfs_init): New prototype.
15119 (grub_hfs_fini): Likewise.
f19dbdb7 15120
15121
97543f08 151222004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
15123
15124 Each disk device has its own id now. This is useful to make use
15125 of multiple disk devices.
f19dbdb7 15126
97543f08 15127 * include/grub/disk.h (grub_disk_dev_id): New enum.
15128 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
15129 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
15130
15131 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
15132 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15133
15134 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
15135 GRUB_DISK_DEVICE_OFDISK_ID as an id.
15136
15137 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
15138 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
15139
15140 * include/grub/disk.h (struct grub_disk_dev): Added a new member
15141 "id" which is used by the cache manager.
15142
15143 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
15144 of just "GRUB".
15145
64372eb4 151462004-08-18 Marco Gerards <metgerards@student.han.nl>
15147
15148 * fs/hfs.c: New file.
15149 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
15150 (grub_emu_SOURCES): Likewise.
15151 (pkgdata_MODULES): Add hfs.mod.
15152 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
15153 (grubof_SOURCES): Likewise.
15154 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
15155
15156 * include/grub/misc.h (grub_strncasecmp): Add prototype.
15157 * kern/misc.c (grub_strncasecmp): Add function.
15158
cc61b58f 151592004-08-14 Marco Gerards <metgerards@student.han.nl>
15160
15161 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
15162 with parentheses.
15163
15164 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
15165 (grub_ext2_dir): In case the directory entry type is unknown, read
15166 it from the inode.
15167
0ef123f6 151682004-08-02 Peter Bruin <pjbruin@dds.nl>
15169
15170 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
15171 grub_load_linux instead of grub_rescue_cmd_linux as second
15172 argument of grub_rescue_register_command.
15173
15174 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
15175
a447c5df 151762004-07-27 Marco Gerards <metgerards@student.han.nl>
15177
15178 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
15179 function.
15180 * commands/boot.c: Remove the check for `GRUB_UTIL'.
15181 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15182 `loader/powerpc/ieee1275/linux.c',
15183 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
15184 * include/grub/powerpc/ieee1275/ieee1275.h
15185 (grub_ieee1275_release): New prototype.
15186 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
15187 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
15188 normal, boot, linux and linux_normal.
15189 * loader/powerpc/ieee1275/linux.c: New file.
15190 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
15191
5a9e3546 151922004-07-12 Marco Gerards <metgerards@student.han.nl>
15193
15194 * normal/arg.c (grub_arg_parse): Correct error handling after
15195 reallocating the argumentlist (check if `argl' is not null instead
15196 of checking if `args' is not null).
15197 * kern/mm.c (grub_realloc): Return the same pointer when using the
15198 same region, instead of returning the header address.
15199
e15199cb 152002004-07-11 Marco Gerards <metgerards@student.han.nl>
15201
15202 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
15203 one block instead of two when looking for the initial partition.
15204 (grub_partition_probe): Initialize the local variable `p' with 0.
15205 Use base 10 for the grub_strtoul call.
15206 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
15207 need for one local variable.
15208 (grub_strtoul): Don't add the new value to `num', instead of that
15209 just assign it.
15210
020616c2 152112004-07-11 Marco Gerards <metgerards@student.han.nl>
15212
15213 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
15214 (pxeboot_img_SOURCES): New variable.
15215 (pxeboot_img_ASFLAGS): Likewise.
15216 (pxeboot_img_LDFLAGS): Likewise.
15217 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
15218 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
15219 <lode_leroy@hotmail.com>.
15220
6c51eb64 152212004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15222
15223 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
15224 there was no input.
15225
cfb12aff 152262004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15227
15228 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
15229 the history buffer logic.
15230
6eabba74 152312004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
15232
15233 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
15234 (FILETYPE_INO_SYMLINK): New macros.
15235 (grub_ext2_find_file): Check if the node is a directory using the
15236 inode stat information instead of using the filetype in the
15237 dirent. Exclude the first character of an absolute symlink.
15238 (grub_ext2_dir): Mask out the filetype part of the mode member of
15239 the inode.
15240
66e19ef8 152412004-05-24 Marco Gerards <metgerards@student.han.nl>
15242
15243 Add support for UFS version 1 and 2. Add support for the minix
15244 filesystem version 1 and 2, both the variants with 14 and 30 long
15245 filenames.
f19dbdb7 15246
66e19ef8 15247 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
15248 fs/minix.c.
15249 (grub_emu_SOURCES): Likewise.
15250 (pkgdata_MODULES): Add ufs.mod and minix.mod.
15251 (ufs_mod_SOURCES): New variable.
15252 (ufs_mod_CFLAGS): Likewise.
15253 (minix_mod_SOURCES): Likewise.
15254 (minix_mod_CFLAGS): Likewise.
15255 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
15256 fs/minix.c.
15257 (grubof_SOURCES): Likewise.
15258 * fs/ufs.c: New file.
15259 * fs/minix.c: New file.
15260 * include/grub/fs.h (grub_ufs_init): New prototype.
15261 (grub_ufs_fini): Likewise.
15262 (grub_minix_init): Likewise.
15263 (grub_minix_fini): Likewise.
15264 * util/grub-emu.c (main): Initialize and deinitialize UFS and
15265 minix fs.
15266
cc2e748a 152672004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
15268
15269 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
15270 commands/ls.c, commands/terminal.c, commands/boot.c,
15271 commands/cmp.c and commands/cat.c.
15272 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
15273
15274 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
15275 "env.h"
15276
4b13b216 152772004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15278
15279 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
15280 and grub_, respectively. Because the conversion is trivial and
15281 mechanical, I omit the details here. Please refer to the CVS
15282 if you need more information.
15283
6a142551 152842004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
15285
15286 * include/pupa: Renamed to ...
15287 * include/grub: ... this.
15288 * util/i386/pc/pupa-mkimage.c: Renamed to ...
15289 * util/i386/pc/grub-mkimage.c: ... this.
15290 * util/i386/pc/pupa-setup.c: Renamed to ...
15291 * util/i386/pc/grub-setup.c: ... this.
15292 * util/pupa-emu.c: Renamed to ...
15293 * util/grub-emu.c: ... this.
15294
e56cdf21 152952004-03-29 Marco Gerards <metgerards@student.han.nl>
15296
15297 Add support for the newworld apple macintosh (PPC). This has been
15298 tested on the powerbook 2000 only. It only adds support for
15299 generic ieee1275 functions, console and disk support. This should
15300 be easy to port to other architectures with support for Open
15301 Firmware.
f19dbdb7 15302
e56cdf21 15303 * configure.ac: Accept the powerpc as host_cpu. In the case of
15304 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
15305 specific tests are only executed while building for the i386.
15306 Inverse test for crosscompile.
15307 * genmk.rb (Utility): Allow assembler files.
15308 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
15309 * conf/powerpc-ieee1275.rmk: New file.
15310 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
15311 * disk/powerpc/ieee1275/partition.c: Likewise.
15312 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
15313 * include/pupa/powerpc/ieee1275/console.h: Likewise.
15314 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
15315 * include/pupa/powerpc/ieee1275/time.h: Likewise.
15316 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
15317 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
15318 * include/pupa/powerpc/ieee1275/loader.h
15319 * include/pupa/powerpc/setjmp.h: Likewise.
15320 * include/pupa/powerpc/types.h: Likewise.
15321 * kern/powerpc/ieee1275/init.c: Likewise.
15322 * kern/powerpc/ieee1275/openfw.c: Likewise.
15323 * term/powerpc/ieee1275/ofconsole.c: Likewise.
15324
15325 These files were written by Johan Rydberg
15326 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 15327
e56cdf21 15328 * boot/powerpc/ieee1275/cmain.c: New file.
15329 * boot/powerpc/ieee1275/crt0.S: Likewise.
15330 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
15331 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
15332
8c8cc205 153332004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
15334
15335 * Makefile.in: Update copyright.
15336 * genmodsrc.sh: Likewise.
15337 * gensymlist.sh: Likewise.
15338 * term/i386/pc/vga.c: Indent correctly.
15339
15340 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
15341 bugreporting address.
15342 * util/i386/pc/pupa-setup.c (usage): Likewise,
15343 (main): Call pupa_ext2_init and pupa_ext2_fini.
15344
f19dbdb7 15345 * fs/fat.c (log2): Renamed to ...
8c8cc205 15346 (fat_log2): ... this.
15347 All callers changed.
15348 * kern/misc.c (memcpy): Alias to pupa_memmove.
15349 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
15350 lvalue cast.
15351 * util/console.c (pupa_ncurses_fini): Return 0.
15352
15353 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
15354 Move fail label here.
15355 [__GNU__]: Don't warn when using stat.
15356 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
15357 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
15358 long int. Use strtol instead of strtoul.
f19dbdb7 15359
db1771cf 153602004-03-14 Marco Gerards <metgerards@student.han.nl>
15361
15362 * commands/boot.c: New file.
15363 * commands/cat.c: Likewise.
15364 * commands/cmp.c: Likewise.
15365 * commands/ls.c: Likewise.
15366 * commands/terminal.c: Likewise.
15367 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
15368 (pupa_register_command): Changed interface to match the new
15369 argument parser.
15370 (pupa_command_execute): Changed (almost rewritten) so it uses
15371 pupa_split_command. Added support for setting variables using the
15372 syntax `foo=bar'.
15373 (rescue_command): Changed to work with the new argument parser.
15374 (terminal_command): Moved from here to commands/terminal.c.
15375 (set_command): New function.
15376 (unset_command): New function.
15377 (insmod_command): New function.
15378 (rmmod_command): New function.
15379 (lsmod_command): New function.
15380 (pupa_command_init): Don't initialize the command terminal
15381 anymore. Initialize the commands set, unset, insmod, rmmod and
15382 lsmod.
15383 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
15384 (kernel_img_HEADERS): Add arg.h and env.h.
15385 (pupa_mkimage_LDFLAGS): Add kern/env.c.
15386 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
15387 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
15388 normal/arg.c.
15389 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
15390 terminal.mod.
15391 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
15392 (boot_mod_SOURCES): New variable.
15393 (terminal_mod_SOURCES): Likewise.
15394 (ls_mod_SOURCES): Likewise.
15395 (cmp_mod_SOURCES): Likewise.
15396 (cat_mod_SOURCES): Likewise.
15397
15398 * normal/arg.c: New file.
15399 * kern/env.c: Likewise.
15400 * include/pupa/arg.h: Likewise.
15401 * include/pupa/env.h: Likewise.
15402 * font/manager.c (font_command): Changed to match argument parsing
15403 interface changes.
15404 (PUPA_MOD_INIT): Likewise.
15405 * hello/hello.c (pupa_cmd_hello): Likewise.
15406 (PUPA_MOD_INIT): Likewise.
15407 * include/pupa/disk.h: Include <pupa/device.h>.
15408 (pupa_print_partinfo): New prototype.
15409 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
15410 (pupa_dl_get_prefix): Likewise.
15411 * include/pupa/misc.h: Include <pupa/err.h>.
15412 (pupa_isgraph): New prototype.
15413 (pupa_isdigit): Likewise.
15414 (pupa_split_cmdline): Likewise.
15415 * include/pupa/normal.h: Include <pupa/arg.h>.
15416 (pupa_command): Changed the prototype of the member `func' to
15417 match the argument parsing interface. Added member `options'.
15418 (pupa_register_command): Updated to match function.
15419 (pupa_arg_parse): New prototype.
15420 (pupa_hello_init) [PUPA_UTIL]: New prototype.
15421 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
15422 (pupa_ls_init) [PUPA_UTIL]: Likewise.
15423 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
15424 (pupa_cat_init) [PUPA_UTIL]: Likewise.
15425 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
15426 (pupa_boot_init) [PUPA_UTIL]: Likewise.
15427 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
15428 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
15429 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
15430 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
15431 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
15432 * kern/disk.c: Include <pupa/file.h>.
15433 (pupa_print_partinfo): New function.
15434 * kern/dl.c: Include <pupa/env.h>.
15435 (pupa_dl_dir): Variable removed.
15436 (pupa_dl_load): Use the environment variable `prefix' instead of
15437 the variable pupa_dl_dir.
15438 (pupa_dl_set_prefix): Function removed.
15439 (pupa_dl_get_prefix): Likewise.
15440 * kern/i386/pc/init.c: Include <pupa/env.h>.
15441 (pupa_machine_init): Use the environment variable `prefix' instead of
15442 using pupa_dl_set_prefix to set the prefix.
15443 * kern/main.c: Include <pupa/env.h>.
15444 (pupa_set_root_dev): Use the environment variable `prefix' instead of
15445 using pupa_dl_get_prefix to get the prefix.
15446 * kern/misc.c: Include <pupa/env.h>.
15447 (pupa_isdigit): New function.
15448 (pupa_isgraph): Likewise.
15449 (pupa_ftoa): Likewise.
15450 (pupa_vsprintf): Added support for printing values of the type
15451 `double'. Make it possible to format variable output when using
15452 formatting like `%1.2%f'.
15453 (pupa_split_cmdline): New function.
15454 * kern/rescue.c: Include <pupa/env.h>.
15455 (next_word): Removed function.
15456 (pupa_rescue_cmd_prefix): Likewise.
15457 (pupa_rescue_cmd_set): New function.
15458 (pupa_rescue_cmd_unset): New function.
15459 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
15460 split the command line instead of splitting it here. Added
15461 support for setting variables using the syntax `foo=bar'. Don't
15462 initialize the prefix command anymore. Initialized the set and
15463 unset commands.
15464 * normal/cmdline.c: Include <pupa/env.h>.
15465 (pupa_tab_complete): Added prototypes for print_simple_completion,
15466 print_partition_completion, add_completion, iterate_commands,
15467 iterate_dev, iterate_part and iterate_dir. Moved code to print
15468 partition information from here to kern/disk.c.
fe6b695a 15469 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 15470 * normal/main.c: Include <pupa/env.h>.
15471 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
15472 instead of using pupa_dl_get_prefix to get the prefix.
15473 * term/i386/pc/vga.c: Include <pupa/arg.h>.
15474 (check_vga_mem): Cast pointers to `void *' to silence a gcc
15475 warning.
15476 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
15477 (pupa_vga_setcolor): Declare unused variables with `__attribute__
15478 ((unused))' to silence a gcc warning.
15479 (pupa_vga_setcolor): Likewise.
15480 (debug_command): Changed to match argument parsing
15481 interface changes.
15482 * util/pupa-emu.c: Include <pupa/env.h>.
15483 (options): Added 0's for unused fields to silence a gcc warning.
15484 (argp): Likewise.
15485 (main): Use the environment variable `prefix' instead of using
15486 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
15487 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
15488 and terminal.
15489
15490 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
15491 * util/misc.c: Include <malloc.h>.
15492 (pupa_malloc): Rewritten so errors are correctly reported.
15493 (pupa_realloc): Likewise.
15494 (pupa_memalign): Likewise.
15495 (pupa_mm_init_region): Declare unused variables with
15496 `__attribute__ ((unused))' to silence a gcc warning.
15497 * normal/i386/setjmp.S: Remove tab at the end of the file to
15498 silence a gcc warning.
15499 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
15500 variables with `__attribute__ ((unused))' to silence a gcc
15501 warning.
15502 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
15503 local variable i unsigned to silence a gcc warning.
15504
15505 * kern/term.c: Include <pupa/misc.h>.
15506 (pupa_more_lines): New variable.
15507 (pupa_more): Likewise.
15508 (pupa_putcode): When the pager is active pause at the end of every
15509 screen.
15510 (pupa_set_more): New function.
15511 * include/pupa/term.h (pupa_set_more): New prototype.
15512
15513
3b1139cb 155142004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
15515
15516 Now this project is GRUB 2 rather than PUPA. The location of
15517 the CVS repository was moved to GRUB's.
f19dbdb7 15518
3b1139cb 15519 * configure.ac: Use bug-grub as the reporting address.
15520 Use GRUB instead of PUPA.
15521 Change the version number to 1.90.
15522
8367695c 155232004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
15524
15525 * genkernsyms.sh: Updated copyright information.
15526 * genmk.rb: Likewise.
15527 * genmodsrc.sh: Likewise.
15528 * gensymlist.sh: Likewise.
15529 * boot/i386/pc/boot.S: Likewise.
15530 * boot/i386/pc/diskboot.S: Likewise.
15531 * disk/i386/pc/biosdisk.c: Likewise.
15532 * disk/i386/pc/partition.c: Likewise.
15533 * font/manager.c: Likewise.
15534 * fs/ext2.c: Likewise.
15535 * fs/fat.c: Likewise.
15536 * include/pupa/boot.h: Likewise.
15537 * include/pupa/device.h: Likewise.
15538 * include/pupa/disk.h: Likewise.
15539 * include/pupa/dl.h: Likewise.
15540 * include/pupa/elf.h: Likewise.
15541 * include/pupa/err.h: Likewise.
15542 * include/pupa/file.h: Likewise.
15543 * include/pupa/font.h: Likewise.
15544 * include/pupa/fs.h: Likewise.
15545 * include/pupa/kernel.h: Likewise.
15546 * include/pupa/loader.h: Likewise.
15547 * include/pupa/misc.h: Likewise.
15548 * include/pupa/mm.h: Likewise.
15549 * include/pupa/net.h: Likewise.
15550 * include/pupa/normal.h: Likewise.
15551 * include/pupa/rescue.h: Likewise.
15552 * include/pupa/setjmp.h: Likewise.
15553 * include/pupa/symbol.h: Likewise.
15554 * include/pupa/term.h: Likewise.
15555 * include/pupa/types.h: Likewise.
15556 * include/pupa/i386/setjmp.h: Likewise.
15557 * include/pupa/i386/types.h: Likewise.
15558 * include/pupa/i386/pc/biosdisk.h: Likewise.
15559 * include/pupa/i386/pc/boot.h: Likewise.
15560 * include/pupa/i386/pc/console.h: Likewise.
15561 * include/pupa/i386/pc/init.h: Likewise.
15562 * include/pupa/i386/pc/kernel.h: Likewise.
15563 * include/pupa/i386/pc/linux.h: Likewise.
15564 * include/pupa/i386/pc/loader.h: Likewise.
15565 * include/pupa/i386/pc/memory.h: Likewise.
15566 * include/pupa/i386/pc/multiboot.h: Likewise.
15567 * include/pupa/i386/pc/partition.h: Likewise.
15568 * include/pupa/i386/pc/time.h: Likewise.
15569 * include/pupa/i386/pc/vga.h: Likewise.
15570 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
15571 * include/pupa/util/getroot.h: Likewise.
15572 * include/pupa/util/misc.h: Likewise.
15573 * include/pupa/util/resolve.h: Likewise.
15574 * kern/device.c: Likewise.
15575 * kern/disk.c: Likewise.
15576 * kern/dl.c: Likewise.
15577 * kern/err.c: Likewise.
15578 * kern/file.c: Likewise.
15579 * kern/fs.c: Likewise.
15580 * kern/loader.c: Likewise.
15581 * kern/main.c: Likewise.
15582 * kern/misc.c: Likewise.
15583 * kern/mm.c: Likewise.
15584 * kern/rescue.c: Likewise.
15585 * kern/term.c: Likewise.
15586 * kern/i386/dl.c: Likewise.
15587 * kern/i386/pc/init.c: Likewise.
15588 * kern/i386/pc/lzo1x.S: Likewise.
15589 * kern/i386/pc/startup.S: Likewise.
15590 * loader/i386/pc/chainloader.c: Likewise.
15591 * loader/i386/pc/linux.c: Likewise.
15592 * loader/i386/pc/multiboot.c: Likewise.
15593 * normal/cmdline.c: Likewise.
15594 * normal/command.c: Likewise.
15595 * normal/main.c: Likewise.
15596 * normal/menu.c: Likewise.
15597 * normal/i386/setjmp.S: Likewise.
15598 * term/i386/pc/console.c: Likewise.
15599 * term/i386/pc/vga.c: Likewise.
15600 * util/console.c: Likewise.
15601 * util/genmoddep.c: Likewise.
15602 * util/misc.c: Likewise.
15603 * util/pupa-emu.c: Likewise.
15604 * util/resolve.c: Likewise.
15605 * util/unifont2pff.rb: Likewise.
15606 * util/i386/pc/biosdisk.c: Likewise.
15607 * util/i386/pc/getroot.c: Likewise.
15608 * util/i386/pc/pupa-mkimage.c: Likewise.
15609 * util/i386/pc/pupa-setup.c: Likewise.
15610
e6eced71 156112004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
15612
15613 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
15614 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
15615 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
15616 reading and reset it after reading.
15617 (pupa_ext2_close): Return PUPA_ERR_NONE.
15618
15619 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
15620 Correct value.
15621 (struct linux_kernel_header): Add kernel_version and
15622 initrd_addr_max.
15623 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
15624 pupa_file_read succeeds.
15625 (pupa_rescue_cmd_initrd): Implement.
15626
5aded270 156272003-12-03 Marco Gerards <metgerards@student.han.nl>
15628
15629 * fs/ext2.c (pupa_ext2_label): New function.
15630 (pupa_ext2_fs): Added label.
15631 * fs/fat.c (pupa_fat_label): New function.
15632 (pupa_fat_fs): Added label.
15633 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
15634
15635 * kern/misc.c (pupa_strndup): New function.
15636 * include/pupa/misc.h (pupa_strndup): New prototype.
15637
15638 * include/pupa/normal.h: Include <pupa/err.h>.
15639 (pupa_set_history): New prototype.
15640 (pupa_iterate_commands): New prototype.
15641 * normal/cmdline.c: Include <pupa/machine/partition.h>,
15642 <pupa/disk.h>, <pupa/file.h>.
15643 (hist_size): New variable.
15644 (hist_lines): Likewise.
15645 (hist_end): Likewise.
15646 (hist_used): Likewise.
15647 (pupa_set_history): New function.
15648 (pupa_history_get): Likewise.
15649 (pupa_history_add): Likewise.
15650 (pupa_history_replace): Likewise.
15651 (pupa_tab_complete): Likewise.
15652 (pupa_cmdline_run): Added tab completion and history buffer. Tab
15653 completion shows partitionnames while completing partitions, this
15654 feature was suggested by Jeff Bailey.
15655 * normal/command.c (pupa_iterate_commands): New function.
15656 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
15657 (pupa_normal_init): Initialize history buffer.
15658 (PUPA_MOD_INIT): Likewise.
15659 (pupa_normal_fini): Free the history buffer.
15660 (PUPA_MOD_FINI): Likewise.
15661
15662 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
15663 key.
15664
15665 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
15666 * configure.ac [i386]: Check for regparam bug.
15667 (NESTED_FUNC_ATTR) [! i386]: Defined.
15668
1f7315a3 156692003-11-17 Marco Gerards <metgerards@student.han.nl>
15670
15671 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
15672 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
15673 (pupa_emu_SOURCES): New variable.
15674 (pupa_emu_LDFLAGS): Likewise.
15675 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
15676 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
15677 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
15678 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15679 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
15680 (pupa_jmp_buf): New typedef.
15681 (pupa_setjmp) [PUPA_UTIL]: New macro.
15682 (pupa_longjmp) [PUPA_UTIL]: Likewise.
15683 * include/pupa/term.h (struct pupa_term): New member `refresh'.
15684 (pupa_refresh): New prototype.
15685 * include/pupa/util/getroot.h: New file.
15686 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
15687 it.
15688 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
15689 (pupa_rescue_cmd_cat): Likewise.
15690 (pupa_rescue_cmd_ls): Likewise.
15691 (pupa_rescue_cmd_testload): Likewise.
15692 (pupa_rescue_cmd_lsmod): Likewise.
15693 * normal/cmdline.c (pupa_cmdline_get): Likewise.
15694 * normal/menu.c (run_menu): Likewise.
15695 * kern/term.c (pupa_cls): Likewise.
15696 (pupa_refresh): New function.
15697 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
15698 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
15699 * util/console.c: New file.
f19dbdb7 15700
1f7315a3 15701 * util/i386/pc/getroot.c: New file.
15702 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
15703 (pupa_putchar): New function.
15704 (pupa_refresh): Likewise.
15705 (xgetcwd): Function moved to ...
15706 (strip_extra_slashes): Likewise.
15707 (get_prefix): Likewise.
f19dbdb7 15708 * util/i386/pc/getroot.c: ... here.
1f7315a3 15709 (find_root_device): Function moved and renamed to...
15710 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
15711 Changed all callers.
15712 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
15713 and renamed to...
15714 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
15715 Changed all callers.
15716 * util/misc.c (pupa_memalign): New function.
15717 (pupa_mm_init_region): Likewise.
15718 (pupa_register_exported_symbols): Likewise.
15719 (pupa_putchar): Function removed.
15720 * util/pupa-emu.c: New file.
15721
9a5c1ade 157222003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
15723
15724 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
15725 (_multiboot_mod_SOURCES): New variable.
15726 (_multiboot_mod_CFLAGS): Likewise.
15727 * loader/i386/pc/multiboot.c: New file.
15728 * include/pupa/i386/pc/multiboot.h: Likewise.
15729 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
15730 (pupa_multiboot_real_boot): New function.
15731 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
15732 (pupa_multiboot_real_boot): New prototype.
15733 (pupa_rescue_cmd_multiboot): Likewise
15734 (pupa_rescue_cmd_module): Likewise.
15735
15736 * kern/loader.c (pupa_loader_set): Continue when
15737 pupa_loader_unload_func() fails.
15738 (pupa_loader_unset): New function.
15739 * include/pupa/loader.h (pupa_loader_unset): New prototype.
15740
15741 * kern/misc.c (pupa_stpcpy): New function.
15742 * include/pupa/misc.h (pupa_stpcpy): New prototype.
15743
8e72a9c0 157442003-11-12 Marco Gerards <metgerards@student.han.nl>
15745
15746 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
15747 for available extensions.
15748
15749 * include/pupa/i386/pc/time.h: New file.
15750 * kern/disk.c: Include <pupa/machine/time.h>.
15751 (PUPA_CACHE_TIMEOUT): New macro.
15752 (pupa_last_time): New variable.
15753 (pupa_disk_open): Flush the cache when there was a timeout.
15754 (pupa_disk_close): Reset the timer.
15755 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
15756 pupa_currticks.
15757 * util/misc.c: Include <sys/times.h>
15758 (pupa_get_rtc): New function.
15759
c4adbd32 157602003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
15761
15762 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
15763 as blocks.
15764 (pupa_ext2_get_file_block): Use blocks member.
15765
15766 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
15767 first block. Return -1 instead of pupa_errno on error.
15768
bfd30f06 157692003-10-27 Marco Gerards <metgerards@student.han.nl>
15770
15771 * README: In the pupa-mkimage example use _chain instead of chain
15772 and ext2 instead of fat.
15773 * TODO: Replace ext2fs with jfs as an example. Add an item for
15774 adding journal playback for ext2fs.
15775 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
15776 (pkgdata_MODULES): Added ext2.mod.
15777 (ext2_mod_SOURCES): New variable.
15778 (ext2_mod_CFLAGS): Likewise.
15779 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
15780 * include/pupa/misc.h (pupa_strncpy): New prototype.
15781 (pupa_strcat): Likewise.
15782 (pupa_strncmp): Likewise.
15783 * kern/misc.c (pupa_strcat): Enable function.
15784 (pupa_strncpy): New function.
15785 (pupa_strncmp): Likewise.
15786 * fs/ext2.c: New file.
f19dbdb7 15787
bfd30f06 15788 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
15789 when the read failed before retrying.
15790 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
15791 (_FILE_OFFSET_BITS): Likewise.
15792 * configure.ac: Added AC_SYS_LARGEFILE.
15793
98d15063 157942003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
15795
15796 * genmk.rb (PModule#rule): Make sure to get only symbol names
15797 from the output of nm.
15798 Reported by Robert Millan <zeratul2@wanadoo.es>.
15799
18d9c7cd 158002003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
15801
15802 I forgot to check in these changes for a long time. This adds
15803 incomplete support for VGA console, and this is still very
15804 buggy. Also, a lot of consideration is required for I18N,
15805 UNICODE, and VGA font issues. Therefore, assume that this is
15806 such that "better than nothing".
f19dbdb7 15807
18d9c7cd 15808 * font/manager.c: New file.
15809 * include/pupa/font.h: Likewise.
15810 * include/pupa/i386/pc/vga.h: Likewise.
15811 * term/i386/pc/vga.c: Likewise.
15812 * util/unifont2pff.rb: Likewise.
15813
15814 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
15815 (pkgdata_MODULES): Added vga.mod and font.mod.
15816 (vga_mod_SOURCES): New variables.
15817 (vga_mod_CFLAGS): Likewise.
15818 (font_mod_SOURCES): Likewise.
15819 (font_mod_CFLAGS): Likewise.
15820
15821 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
15822
15823 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 15824 (struct pupa_term): Added init and fini.
18d9c7cd 15825 Changed the argument of putchar to pupa_uint32_t.
15826
15827 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
15828 (pupa_console_real_putchar): New prototype.
15829 (pupa_console_putchar): Removed.
15830 (pupa_console_checkkey): Exported.
15831 (pupa_console_getkey): Likewise.
15832
15833 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
15834 characters.
15835
15836 * kern/term.c (pupa_term_set_current): Rewritten.
15837 (pupa_putchar): Likewise.
15838 (pupa_putcode): New function.
15839
15840 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
15841 (pupa_console_real_putchar): ... this.
15842 (pupa_vga_set_mode): New function.
15843 (pupa_vga_get_font): Likewise.
15844
15845 * normal/command.c: Include pupa/term.h.
15846 (terminal_command): New function.
15847 (pupa_command_init): Register the command "terminal".
15848
15849 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
15850 (DISP_UP): Likewise.
15851 (DISP_RIGHT): Likewise.
15852 (DISP_DOWN): Likewise.
15853 (DISP_HLINE): Likewise.
15854 (DISP_VLINE): Likewise.
15855 (DISP_UL): Likewise.
15856 (DISP_UR): Likewise.
15857 (DISP_LL): Likewise.
15858 (DISP_LR): Likewise.
15859
15860 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 15861
977329f5 158622003-02-08 NIIBE Yutaka <gniibe@m17n.org>
15863
15864 * util/resolve.c (pupa_util_resolve_dependencies): BUG
15865 FIX. Reverse the path_list.
15866
15867 * include/pupa/normal.h: Export pupa_register_command and
15868 pupa_unregister_command.
15869
15870 * hello/hello.c (pupa_cmd_hello): New module.
15871 * conf/i386-pc.rmk: Added hello.mod.
15872
1f5ab428 158732003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
15874
15875 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 15876
1f5ab428 15877 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
15878 (compress_kernel): New variable.
15879 (generate_image): Heavily modified to support compressing a
15880 large part of the core image.
15881
15882 * util/misc.c (pupa_util_read_image): Fix a file descriptor
15883 leak.
15884 (pupa_util_load_image): New function.
15885
15886 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
15887 (pupa_compressed_size): New variable.
15888 (codestart): Enable Gate A20 here.
15889 Decompress the compressed part of the core image.
15890 Rearrange the code to put functions and variables which are
15891 required for initialization in the non-compressed part.
15892 Include lzo1x.S.
15893
15894 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
15895 here.
15896
15897 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
15898
f19dbdb7 15899 * include/pupa/i386/pc/kernel.h
1f5ab428 15900 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
15901 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
15902 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
15903 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
15904 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
15905
15906 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
15907
15908 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
15909 (Utility#rule): Likewise.
15910
15911 * configure.ac: Check if LZO is available.
15912
ce5bf700 159132003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
15914
15915 * include/pupa/normal.h: New file.
15916 * include/pupa/setjmp.h: Likewise.
15917 * include/pupa/i386/setjmp.h: Likewise.
15918 * normal/cmdline.c: Likewise.
15919 * normal/command.c: Likewise.
15920 * normal/main.c: Likewise.
15921 * normal/menu.c: Likewise.
15922 * normal/i386/setjmp.S: Likewise.
f19dbdb7 15923
ce5bf700 15924 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
15925 (pupa_rescue_cmd_initrd): Likewise.
15926
15927 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
15928 Likewise.
15929
15930 * kern/i386/pc/startup.S (translation_table): New variable.
15931 (translate_keycode): New function.
15932 (pupa_console_getkey): Call translate_keycode.
15933
15934 * kern/rescue.c (attempt_normal_mode): New function.
15935 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
15936 it failed, print a message.
15937
15938 * kern/mm.c (pupa_real_malloc): Print more information when a
15939 free magic is broken.
15940 (pupa_free): If the first free header is not free actually, set
15941 it to P.
15942
15943 * kern/main.c (pupa_load_normal_mode): Just load the module
15944 "normal".
15945 (pupa_main): Don't print the message
15946 "Entering into rescue mode..." here.
15947
15948 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
15949 Declared.
15950 (pupa_rescue_cmd_initrd): Likewise.
15951 (pupa_rescue_cmd_initrd): Likewise.
15952
15953 * include/pupa/symbol.h (FUNCTION): Specify the type.
15954 (VARIABLE): Likewise.
15955
15956 * include/pupa/err.h (pupa_err_t): Added
15957 PUPA_ERR_UNKNOWN_COMMAND.
15958
15959 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
15960 (pupa_dl_get_prefix): Likewise.
15961
15962 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
15963 Added _chain.mod and _linux.mod instead of chain.mod and
15964 linux.mod.
15965 (chain_mod_SOURCES): Renamed to ...
15966 (_chain_mod_SOURCES): ... this.
15967 (chain_mod_CFLAGS): Renamed to ...
15968 (_chain_mod_CFLAGS): ... this.
15969 (linux_mod_SOURCES): Renamed to ...
15970 (_linux_mod_SOURCES): ... this.
15971 (linux_mod_CFLAGS): Renamed to ...
15972 (_linux_mod_CFLAGS): ... this.
15973 (normal_mod_SOURCES): New variable.
15974 (normal_mod_CFLAGS): Likewise.
15975 (normal_mod_ASFLAGS): Likewise.
15976
159772003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
15978
15979 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
15980 possible.
15981
fe6b695a 15982 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 15983 recursively.
15984 (pupa_dl_unref): Unrefer depending modules recursively.
15985 Don't call pupa_dl_unload implicitly, because PUPA can crash if
15986 a module is unloaded before one depending on that module is
15987 unloaded.
15988 (pupa_dl_unload): Unload depending modules explicitly,
15989 if possible.
15990
c04da074 159912003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
15992
15993 * include/pupa/i386/pc/linux.h: New file.
15994 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 15995
c04da074 15996 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
15997 Removed.
15998 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
15999 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
16000 of PUPA_CHAINLOADER_BOOT_SECTOR.
16001
16002 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
16003 (pupa_linux_prot_size): New variable.
16004 (pupa_linux_tmp_addr): Likewise.
16005 (pupa_linux_real_addr): Likewise.
16006 (pupa_linux_boot_zimage): New function.
16007 (pupa_linux_boot_bzimage): Likewise.
16008
16009 * kern/i386/pc/init.c (struct mem_region): New structure.
16010 (MAX_REGIONS): New macro.
16011 (mem_regions): New variable.
16012 (num_regions): Likewise.
16013 (pupa_os_area_addr): Likewise.
16014 (pupa_os_area_size): Likewise.
16015 (pupa_lower_mem): Likewise.
16016 (pupa_upper_mem): Likewise.
16017 (add_mem_region): New function.
16018 (compact_mem_regions): Likewise.
16019 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
16020 the size of the conventional memory and that of so-called upper
16021 memory (before the first memory hole).
16022 Instead of adding each found region to free memory, use
16023 add_mem_region and add them after removing overlaps.
16024 Also, add only 1/4 of the upper memory to free memory. The rest
16025 is used for loading OS images. Maybe this is ad hoc, but this
16026 makes it much easier to relocate OS images when booting.
16027
16028 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
16029 (pupa_enter_rescue_mode): Don't register initrd and module.
16030
16031 * kern/mm.c: Include pupa/dl.h.
16032
16033 * kern/main.c: Include pupa/file.h and pupa/device.h.
16034
16035 * kern/loader.c (pupa_loader_load_module_func): Removed.
16036 (pupa_loader_load_module): Likewise.
16037
16038 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
16039 ``.o''.
16040
16041 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
16042 (pupa_linux_tmp_addr): Likewise.
16043 (pupa_linux_real_addr): Likewise.
16044 (pupa_linux_boot_zimage): Likewise.
16045 (pupa_linux_boot_bzimage): Likewise.
16046
16047 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
16048 (pupa_upper_mem): Likewise.
16049 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
16050 module is too dangerous.
16051
16052 * include/pupa/loader.h (pupa_os_area_addr): Declared.
16053 (pupa_os_area_size): Likewise.
16054 (pupa_loader_set): Remove the first argument. Loader doesn't
16055 manage modules or initrd any longer.
16056 (pupa_loader_load_module): Removed.
16057
16058 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
16059 (linux_mod_SOURCES): New variable.
16060 (linux_mod_CFLAGS): Likewise.
16061
a13f9237 160622003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
16063
16064 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
16065 the length of a blocklist correctly.
16066
16067 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
16068 Use ioctl only if the OS file is a block device.
16069 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
16070 not very useful for normal files.
16071
16072 * kern/main.c (pupa_set_root_dev): New function.
16073 (pupa_load_normal_mode): Likewise.
16074 (pupa_main): Call those above.
16075
16076 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
16077 pupa_uint16_t.
16078
16079 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
16080
a5ffe966 160812003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
16082
16083 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
16084 (setup): Configure the installed partition information and the
16085 dl prefix.
16086
16087 * loader/i386/pc/chainloader.c (my_mod): New variable.
16088 (pupa_chainloader_unload): New function.
16089 (pupa_rescue_cmd_chainloader): Refer itself.
16090 (PUPA_MOD_INIT): Save its own module in MY_MOD.
16091
16092 * kern/i386/pc/startup.S (install_partition): Removed.
16093 (version_string): Likewise.
16094 (config_file): Likewise.
16095 (pupa_install_dos_part): New variable.
16096 (pupa_install_bsd_part): Likewise.
16097 (pupa_prefix): Likewise.
16098 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
16099
16100 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
16101 and pupa/misc.h.
16102 (make_install_device): New function.
16103 (pupa_machine_init): Set the dl prefix.
16104
16105 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
16106 (buf): Renamed to ...
16107 (linebuf): ... this.
16108 (pupa_rescue_cmd_prefix): New function.
16109 (pupa_rescue_cmd_insmod): Likewise.
16110 (pupa_rescue_cmd_rmmod): Likewise.
16111 (pupa_rescue_cmd_lsmod): Likewise.
16112 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
16113 rmmod and lsmod.
16114
16115 * kern/mm.c (pupa_memalign): If failed even after invalidating
16116 disk caches, unload unneeded modules and retry.
16117
16118 * kern/misc.c (pupa_memmove): New function.
16119 (pupa_memcpy): Removed.
16120 (pupa_strcpy): New function.
16121 (pupa_itoa): Made static.
16122
16123 * kern/dl.c (pupa_dl_iterate): New function.
16124 (pupa_dl_ref): Likewise.
16125 (pupa_dl_unref): Likewise.
16126 (pupa_dl_unload): Return if succeeded or not.
16127 (pupa_dl_unload_unneeded): New function.
16128 (pupa_dl_unload_all): Likewise.
16129 (pupa_dl_init): Renamed to ...
16130 (pupa_dl_set_prefix): ... this.
16131 (pupa_dl_get_prefix): New function.
16132
16133 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
16134 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
16135 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
16136 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
16137 (pupa_install_dos_part): Declared.
16138 (pupa_install_bsd_part): Likewise.
16139 (pupa_prefix): Likewise.
16140 (pupa_boot_drive): Likewise.
16141
16142 * include/pupa/types.h: Fix a typo.
16143
16144 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
16145 pupa_memmove.
16146 (pupa_memmove): Declared.
16147 (pupa_strcpy): Likewise.
16148
16149 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
16150 pupa_mod_init takes one argument, its own module.
16151 (pupa_dl_unload_unneeded): Declared.
16152 (pupa_dl_unload_all): Likewise.
16153 (pupa_dl_ref): Likewise.
16154 (pupa_dl_unref): Likewise.
16155 (pupa_dl_iterate): Likewise.
16156 (pupa_dl_init): Renamed to ...
16157 (pupa_dl_set_prefix): ... this.
16158 (pupa_dl_get_prefix): Declared.
16159
16160 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 16161 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 16162 unloaded.
16163 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
16164 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
16165
16166 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
16167 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
16168
012d7999 161692003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16170
16171 * util/i386/pc/pupa-setup.c (setup): Define the internal
16172 function find_first_partition_start at the top level, because GCC
16173 3.0.x cannot compile internal functions in deeper scopes
16174 correctly.
16175 (find_root_device): Use lstat instead of stat.
16176 Don't follow symbolic links.
16177 Fix the path-constructing code.
16178
16179 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
16180 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
16181 by a BLKGETSIZE ioctl first, because block devices don't fill
16182 the member st_mode of the structure stat on Linux.
16183 [__linux__] (linux_find_partition): Use a temporary buffer
16184 REAL_DEV for the working space. Copy it to DEV before returning.
16185 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
16186 buffer cache consistent.
16187 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
16188 strncmp. The previous value was merely wrong.
16189 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
16190
16191 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
16192 FAT size is 12. The previous value was merely wrong.
16193
16194 * kern/main.c (pupa_main): Don't split the starting message from
16195 newlines.
16196
16197 * kern/term.c (pupa_putchar): Put CR after LF instead of before
16198 LF, because BIOS goes crazy about character attributes in this
16199 case.
16200
1cc73a62 162012003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
16202
16203 * include/i386/pc/util/biosdisk.h: New file.
16204 * util/i386/pc/biosdisk.c: Likewise.
16205 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 16206
1cc73a62 16207 * Makefile.in (INCLUDE_DISTFILES): Added
16208 include/pupa/i386/pc/util/biosdisk.h.
16209 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
16210 directory util/i386/pc.
16211 (install-local): Added a rule for sbin_UTILITIES.
16212 (uninstall): Likewise.
16213
16214 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
16215
16216 * util/misc.c (xrealloc): New function.
16217 (pupa_malloc): Likewise.
16218 (pupa_free): Likewise.
16219 (pupa_realloc): Likewise.
16220 (pupa_stop): Likewise.
16221 (pupa_putchar): Likewise.
16222
16223 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
16224
16225 * include/pupa/util/misc.h (xrealloc): Declared.
16226
16227 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
16228 macro.
16229 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
16230 (PUPA_BOOT_MACHINE_BPB_END): ... this.
16231
16232 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
16233 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16234
16235 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
16236 way should be implemented.
16237 [PUPA_UTIL] (pupa_fat_fini): Likewise.
16238
16239 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
16240 the size of NAME for safety.
16241 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
16242 0x88.
16243
16244 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
16245 (pupa_setup_SOURCES): Likewise.
16246
16247 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
16248
08b70fe8 162492002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16250
16251 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
16252 bunch of pushl's from pusha, because this destroys the return
16253 value.
16254
62ddcc8f 162552002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
16256
16257 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
16258 This means that any missing prototypes could be fatal. Also, you
16259 must take care when writing assembly code. See the comments at
16260 the beginning of startup.S, for more details.
f19dbdb7 16261
62ddcc8f 16262 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
16263 compilation mechanism.
16264 (pupa_chainloader_real_boot): Likewise.
16265 (pupa_biosdisk_rw_int13_extensions): Likewise.
16266 (pupa_biosdisk_rw_standard): Likewise.
16267 (pupa_biosdisk_check_int13_extensions): Likewise.
16268 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
16269 (pupa_biosdisk_get_diskinfo_standard): Likewise.
16270 (pupa_get_memsize): Likewise.
16271 (pupa_get_mmap_entry): Likewise.
16272 (pupa_console_putchar): Likewise.
16273 (pupa_console_setcursor): Likewise.
16274 (pupa_getrtsecs): Use pushl instead of push.
16275
16276 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
16277 memory instead of the stack for a mmap entry, because some
16278 BIOSes may ignore the maximum size and overflow.
16279
16280 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
16281
16282 * genmk.rb (PModule#rule): Compile automatically generated
16283 sources with module-specific CFLAGS as well as other sources.
16284
9962ed99 162852002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16286
16287 * configure.ac: Check ld.
16288 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
16289 respectively, before checking endianness and sizes.
16290
16291 * Makefile.in (LD): New variable.
f19dbdb7 16292
abdfc3c5 162932002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16294
16295 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
16296
6a161fa9 162972002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
16298
16299 * Changelog: New file.
16300