]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-03-21 Bean <bean123ch@gmail.com>
[grub2.git] / ChangeLog
CommitLineData
1f4147aa 12009-03-21 Bean <bean123ch@gmail.com>
2
3 * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
4 instead of stat in mingw environment.
5
6 * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
7
8 * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
9
10 * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
11 AC_CONFIG_LINKS.
12
2156d5ba 132009-03-21 Bean <bean123ch@gmail.com>
14
15 * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
16 out of range error.
17
177b82ca 182009-03-18 Michel Dänzer <michel@daenzer.net>
19
20 * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
21 checking inode flags for EXT4_EXTENTS_FLAG.
22
14aad807 232009-03-18 Robert Millan <rmh@aybabtu.com>
24
25 * loader/i386/linux.c: Include `<grub/video.h>' and
26 `<grub/i386/pc/vbe.h>'..
27 (grub_linux_setup_video): New function. Loosely based on the EFI one.
28 (grub_linux32_boot): Attempt to configure video settings with
29 grub_linux_setup_video().
30 (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
31 to avoid grub_console_fini() which would step out of graphical mode
32 unconditionally.
33
8cf83a27 342009-03-14 Robert Millan <rmh@aybabtu.com>
35
36 Fix build on powerpc.
37 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
38
40164e75 392009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
40
41 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
42 background image command.
43
c58bc32a 442009-03-12 Colin D Bennett <colin@gibibit.com>
45
46 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
47 (grub_gfxterm_putchar): Extract pairs of identical calls to
48 draw_cursor out of conditional blocks.
49
5415144a 502009-03-11 Pavel Roskin <proski@gnu.org>
51
52 * fs/hfs.c (grub_hfs_strncasecmp): New function.
53 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
54
6394042e 552009-03-11 Robert Millan <rmh@aybabtu.com>
56
57 * loader/i386/multiboot_elfxx.c
58 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
59
b7b50e5f 602009-03-11 Felix Zielcke <fzielcke@z-51.de>
61
62 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
63 `kern/handler.c'.
64
1ca7fc96 652009-03-11 Robert Millan <rmh@aybabtu.com>
66
67 * loader/i386/multiboot.c (code_size): New variable.
68 (grub_multiboot): Define offsets by adding to `code_size' rather
69 than substracting from `grub_multiboot_payload_size'. Provide
70 4-byte alignment to MBI and others by increasing
71 `boot_loader_name_length' appropiately.
72
73 * loader/i386/multiboot_elfxx.c
74 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
75
a83ea1d2 762009-03-09 Felix Zielcke <fzielcke@z-51.de>
77
78 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
79 `fs/ext2.c'.
80
aa9f3bff 812009-03-08 Robert Millan <rmh@aybabtu.com>
82
83 Make loader/i386/linux.c usable on i386-pc again.
84
85 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
86 memory to heap.
87 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
88 `#error' stanza.
89
d8b3b60e 902009-03-07 Bean <bean123ch@gmail.com>
91
92 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
93 allocation.
94
b362c9e9 952009-03-06 Robert Millan <rmh@aybabtu.com>
96
97 Fix display issue on terminals with screen size other than 80x25
98 (e.g. gfxterm with resolution higher than 640x480).
99
100 * normal/main.c (grub_normal_init_page): Display title text in a
101 position relative to the center of the terminal instead of reliing
102 on a hardcoded offset.
103
9304eef1 1042009-03-04 Robert Millan <rmh@aybabtu.com>
105
106 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
107 installed.
108
109 * Makefile.in (host_kernel): New variable.
110 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
111 scripts instead of just the windows one.
112 * configure.ac: Initialize and AC_SUBST `host_kernel'.
113
eabc95fb 1142009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 115
116 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
117 `kern/handler.c'.
118 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
119 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
120 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
121 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
122 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
123 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
124
ceb1223c 1252009-03-04 Felix Zielcke <fzielcke@z-51.de>
126
127 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
128 or if there's no space for the disk label and print the partition number on a
129 invalid magic.
130
4910684a 1312009-03-04 Felix Zielcke <fzielcke@z-51.de>
132
133 * util/misc.c: Include <time.h>.
134 (grub_millisleep): New function.
135
7e9ca17a 1362009-03-04 Bean <bean123ch@gmail.com>
137
138 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
139 another option -mno-red-zone.
140
141 * commands/handler.c: Change module description.
142
143 * kern/handler.c: Add missing space at the end of description line.
144
145 * kern/list.c: Likewise.
146
f501677c 1472009-03-03 Robert Millan <rmh@aybabtu.com>
148
149 Move more components to the relocation area, and fix mbi pointer
150 handling to use the destination rather than the origin (thanks to
151 Vladimir Serbinenko for spotting).
152
153 * loader/i386/multiboot.c (mbi_dest): New variable.
154 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
155 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
156 relocation area.
157
9902d047 1582009-03-01 Bean <bean123ch@gmail.com>
159
50fb7002 160 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 161 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
162 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
163 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
164
165 * loader/i386/efi/linux.c (acpi_guid): New variable.
166 (acpi_guid): Likewise.
167 (EBDA_SEG_ADDR): New constant.
168 (LOW_MEM_ADDR): Likewise.
169 (FAKE_EBDA_SEG): Likewise.
170 (fake_bios_data): New function.
171 (grub_linux_boot): Call fake_bios_data.
172
71b9f361 1732009-03-01 Bean <bean123ch@gmail.com>
174
175 * commands/terminal.c: Removed.
176
177 * commands/handler.c: New file.
178
179 * include/grub/list.h: Likewise.
180
181 * include/grub/handler.h: Likewise.
182
183 * kern/list.c: Likewise.
184
185 * kern/handler.c: Likewise.
186
187 * kern/term.h: Include header file <grub/handler.h>.
188 (grub_term_input): Move next field to the beginning.
189 (grub_term_output): Likewise.
190 (grub_term_input_class): New variable.
191 (grub_term_output_class): Likewise.
192 (grub_term_register_input): Changed to inline function.
193 (grub_term_register_output): Likewise.
194 (grub_term_unregister_input): Likewise.
195 (grub_term_unregister_output): Likewise.
196 (grub_term_set_current_input): Likewise.
197 (grub_term_set_current_output): Likewise.
198 (grub_term_get_current_input): Likewise.
199 (grub_term_get_current_output): Likewise.
200 (grub_term_iterate_input): Removed.
201 (grub_term_iterate_output): Likewise.
202
203 * kern/term.c (grub_term_list_input): Removed.
204 (grub_term_list_output): Likewise.
205 (grub_term_input_class): New variable.
206 (grub_term_output_class): Likewise.
50fb7002 207 (grub_cur_term_input): Change variable as macro.
71b9f361 208 (grub_cur_term_output): Likewise.
209 (grub_term_register_input): Removed.
210 (grub_term_register_output): Likewise.
211 (grub_term_unregister_input): Likewise.
212 (grub_term_unregister_output): Likewise.
213 (grub_term_set_current_input): Likewise.
214 (grub_term_set_current_output): Likewise.
215 (grub_term_iterate_input): Likewise.
216 (grub_term_iterate_output): Likewise.
217 (grub_term_get_current_input): Likewise.
218 (grub_term_get_current_output): Likewise.
219
220 * util/grub-editenv.c: Include header file <grub/handler.h>.
221 (grub_term_get_current_input): Removed.
222 (grub_term_get_current_output): Likewise.
223 (grub_term_input_class): New variable.
50fb7002 224 (grub_term_output_class): Likewise.
71b9f361 225
226 * util/grub-fstest.c (grub_term_get_current_input): Removed.
227 (grub_term_get_current_output): Likewise.
228 (grub_term_input_class): New variable.
50fb7002 229 (grub_term_output_class): Likewise.
71b9f361 230
231 * util/grub-probe.c (grub_term_get_current_input): Removed.
232 (grub_term_get_current_output): Likewise.
233 (grub_term_input_class): New variable.
50fb7002 234 (grub_term_output_class): Likewise.
71b9f361 235
236 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
237 (grub_term_get_current_output): Likewise.
238 (grub_term_input_class): New variable.
50fb7002 239 (grub_term_output_class): Likewise.
71b9f361 240
241 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
242 (terminal_mod_SOURCES): Likewise.
243 (terminal_mod_CFLAGS): Likewise.
244 (terminal_mod_LDFLAGS): Likewise.
245
246 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
247 handler.c.
248 (kernel_img_SOURCES): Add list.c and handler.c.
249 (kernel_img_HEADERS): Add list.h and handler.h.
250
251 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
252 handler.c.
253 (kernel_mod_SOURCES): Add list.c and handler.c.
254 (kernel_mod_HEADERS): Add list.h and handler.h.
255
256 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
257 handler.c.
258 (kernel_elf_SOURCES): Add list.c and handler.c.
259 (kernel_elf_HEADERS): Add list.h and handler.h.
260
261 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
262 handler.c.
263 (kernel_elf_SOURCES): Add list.c and handler.c.
264 (kernel_elf_HEADERS): Add list.h and handler.h.
265
266 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
267 handler.c.
268 (kernel_mod_SOURCES): Add list.c and handler.c.
269 (kernel_mod_HEADERS): Add list.h and handler.h.
270
271 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
272 handler.c.
273 (kernel_elf_SOURCES): Add list.c and handler.c.
274 (kernel_elf_HEADERS): Add list.h and handler.h.
275
8a31787f 2762009-02-27 Robert Millan <rmh@aybabtu.com>
277
278 Factorize elf32 / elf64 code in Multiboot loader. This will
279 prevent it from getting out of sync again.
280
281 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
282 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
283 grub_multiboot_load_elf64): Move from here ...
284 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
285 grub_multiboot_load_elf): ... to here (new file).
286
51cd3dfc 2872009-02-27 Robert Millan <rmh@aybabtu.com>
288
289 * util/grub.d/10_linux.in: Rename "single-user mode" to
290 "recovery mode".
291
6e8c9c3a 2922009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
293
294 Don't leak in SCSI code.
295 * disk/scsi.c (grub_scsi_close): free `scsi'.
296
4b6bf4f9 2972009-02-27 Robert Millan <rmh@aybabtu.com>
298
299 * loader/i386/pc/multiboot.c: Move from here ...
300 * loader/i386/multiboot.c: ... to here. Update all users.
301
b9413424 3022009-02-27 Robert Millan <rmh@aybabtu.com>
303
304 Patch from Alexandre Bique <bique.alexandre@gmail.com>
305 * util/i386/pc/grub-setup.c (setup): Fix directory path.
306
50fb7002 3072009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 308
309 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
310 b-tree.
311
8cc50345 3122009-02-27 Robert Millan <rmh@aybabtu.com>
313
314 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
315 `0x' qualifier as 0 when base is specified as parameter).
316
6e09b8b7 3172009-02-24 Bean <bean123ch@gmail.com>
318
319 * configure.ac: Check for -mcmodel=large in x86_64 target.
320
321 * include/grub/efi/api.h (efi_call_10): New macro.
322 (efi_wrap_10): New function.
323
324 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
325 (GRUB_PE32_REL_BASED_HIGH): Likewise.
326 (GRUB_PE32_REL_BASED_LOW): Likewise.
327 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
328 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
329 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
330 (GRUB_PE32_REL_BASED_SECTION): Likewise.
331 (GRUB_PE32_REL_BASED_REL): Likewise.
332 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
333 (GRUB_PE32_REL_BASED_DIR64): Likewise.
334 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
335
336 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
337 issue.
338
339 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
340 (efi_wrap_10): New function.
341
342 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
343
344 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
345 MB/MBP model (NV chipset).
346 (devdata_devs): Add devpath_5 to the list.
347
348 * load/i386/efi/linux.c (video_base): Remove variable.
349 (RGB_MASK): New macro.
350 (RGB_MAGIC): Likewise.
351 (LINE_MIN): Likewise.
352 (LINE_MAX): Likewise.
353 (FBTEST_STEP): Likewise.
354 (FBTEST_COUNT): Likewise.
355 (fb_list): New variable.
356 (grub_find_video_card): Remove function.
357 (find_framebuf): New function.
358 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
359 line length.
360
361 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
362 problem for x86_64.
363
74b21bee 3642009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
365
366 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
367
368 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
369 coding tool name.
370
a455f472 3712009-02-22 Robert Millan <rmh@aybabtu.com>
372
373 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
374 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
375 in our relocation, instead of using it directly from heap. Also
376 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
377
6374daf3 3782009-02-21 Robert Millan <rmh@aybabtu.com>
379
380 Implement USB keyboard support (based on patch by Marco Gerards)
381
382 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
383 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
384 (usb_keyboard_mod_LDFLAGS): New variables.
385
386 * term/usb_keyboard.c: New file.
387
8fa4ea70 3882009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
389
390 Corrected wrong declaration
391
392 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
393
353976ac 3942009-02-14 Christian Franke <franke@computer.org>
395
396 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
397 (grub_lspci_iter): Print class code and programming interface byte.
398
6aa1169b 3992009-02-14 Christian Franke <franke@computer.org>
400
401 * gendistlist.sh: Ignore `.svn' directories.
402
265372ca 4032009-02-14 Felix Zielcke <fzielcke@z-51.de>
404
405 * fs/fat.c: Add 2009 to Copyright line.
406
9ff516f3 4072009-02-14 Christian Franke <franke@computer.org>
408
409 * commands/hdparm.c: New file. Provides `hdparm' command
410 which sends ATA commands via grub_disk_ata_pass_through ().
411
412 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
413
414 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
415 and <grub/cpu/io.h> to include/grub/ata.h.
416 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
417 (GRUB_CDROM_SECTOR_SIZE): Remove.
418 (GRUB_ATA_*): Move to include/grub/ata.h.
419 (GRUB_ATAPI_*): Likewise.
420 (enum grub_ata_commands): Likewise.
421 (enum grub_ata_timeout_milliseconds): Likewise.
422 (struct grub_ata_device): Likewise.
423 (grub_ata_regset): Likewise.
424 (grub_ata_regget): Likewise.
425 (grub_ata_regset2): Likewise.
426 (grub_ata_regget2): Likewise.
427 (grub_ata_check_ready): Likewise.
428 (grub_ata_wait_not_busy): Remove static, exported in
429 include/grub/ata.h.
430 (grub_ata_wait_drq): Likewise.
431 (grub_ata_pio_read): Likewise.
432
433 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
434 function for hdparm.mod.
435
436 * include/grub/ata.h: New file, contains declarations from
437 disk/ata.c.
438 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
439
440 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
441 (grub_disk_ata_pass_through): New exported variable.
442
443 * kern/disk.c (grub_disk_ata_pass_through): New variable.
444
772e23da 4452009-02-13 Colin D Bennett <colin@gibibit.com>
446
447 Support multiple fallback entries, and provide an API to support
448 executing default+fallback menu entries. Renamed the `terminal' menu
449 viewer to `text'.
450
451 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
452 variable declaration.
453 (grub_menu_execute_callback): New structure declaration.
454 (grub_menu_execute_callback_t): New typedef.
455 (grub_menu_execute_with_fallback): New function declaration.
456 (grub_menu_get_entry): Likewise.
457 (grub_menu_get_timeout): Likewise.
458 (grub_menu_set_timeout): Likewise.
459
460 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
461
462 * normal/menu.c (grub_wait_after_message): Moved to
463 `normal/menu_text.c'.
464 (draw_border): Likewise.
465 (print_message): Likewise.
466 (print_entry): Likewise.
467 (print_entries): Likewise.
468 (grub_menu_init_page): Likewise.
469 (get_entry_number): Likewise.
470 (print_timeout): Likewise.
471 (run_menu): Likewise.
472 (grub_menu_execute_entry): Likewise.
473 (show_text_menu): Likewise.
474 (get_and_remove_first_entry_number): New function.
475 (grub_menu_execute_with_fallback): Likewise.
476 (get_entry): Renamed to ...
477 (grub_menu_get_entry): .. this and made it global.
478 (get_timeout): Renamed to ...
479 (grub_menu_get_timeout): ... this and made it global.
480 (set_timeout): Renamed to ...
481 (grub_menu_set_timeout): ... this and made it global.
482 (grub_normal_terminal_menu_viewer): Renamed to ...
483 (grub_normal_text_menu_viewer): ... this.
484
485 * normal/menu_text.c: New file. Extracted text-menu-specific code
486 from normal/menu.c.
487
488 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
489 (normal_mod_SOURCES): Likewise.
490
491 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
492 (normal_mod_SOURCES): Likewise.
493
494 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
495 (normal_mod_SOURCES): Likewise.
496
497 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
498 (normal_mod_SOURCES): Likewise.
499
500 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
501 (normal_mod_SOURCES): Likewise.
502
503 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
504 (normal_mod_SOURCES): Likewise.
505
506 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
507 (normal_mod_SOURCES): Likewise.
508
16ac430e 5092009-02-11 Robert Millan <rmh@aybabtu.com>
510
511 * util/grub.d/00_header.in: Update old reference to `font' command.
512
06ff20fc 5132009-02-10 Felix Zielcke <fzielcke@z-51.de>
514
515 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
516
517 Based on patch from Javier Martín.
518
96da9407 5192009-02-09 Felix Zielcke <fzielcke@z-51.de>
520
521 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 522 to avoid false positives with FAT.
96da9407 523 (grub_fstest_SOURCES): Likewise.
524 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
525 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
526 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
527 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
528 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
529 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
530
6dca6fe4 5312009-02-09 Felix Zielcke <fzielcke@z-51.de>
532
06ff20fc 533 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 534 bpb.version_specific.fat12_or_fat16.fstype and
535 bpb.version_specific.fat32.fstype.
536
2550c62f 5372009-02-08 Robert Millan <rmh@aybabtu.com>
538
be110b30 539 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 540
56978920 5412009-02-08 Robert Millan <rmh@aybabtu.com>
542
543 * Makefile.in (host_os, host_cpu): New variables.
544 (target_os): Remove. Update all users.
545
d64399b5 5462009-02-08 Marco Gerards <marco@gnu.org>
547
548 * Makefile.in (enable_grub_emu_usb): New variable.
549 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
550 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
551 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
552 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
553 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
554 `usbtest.mod' and `usbms.mod'.
555 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
556 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
557 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
558 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
559 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
560 variables.
561
562 * disk/usbms.c: New file.
563
564 * include/grub/usb.h: Likewise.
565
566 * include/grub/usbtrans.h: Likewise.
567
568 * include/grub/usbdesc.h: Likewise.
569
570 * bus/usb/usbtrans.c: Likewise.
571
572 * bus/usb/ohci.c: Likewise.
573
574 * bus/usb/uhci.c: Likewise.
575
576 * bus/usb/usbhub.c: Likewise.
577
578 * bus/usb/usb.c: Likewise.
579
580 * commands/usbtest.c: Likewise.
581
582 * util/usb.c: Likewise.
50fb7002 583
d64399b5 584 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
585
586 * configure.ac: Test for libusb presence.
50fb7002 587
d64399b5 588 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
589
2b40d6bb 5902009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
591
592 * kern/mm.c: Add more comments.
593
73a4ce81 5942009-02-08 Robert Millan <rmh@aybabtu.com>
595
596 Patch from Javier Martín.
597 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
598 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
599
f821ce59 6002009-02-08 Robert Millan <rmh@aybabtu.com>
601
602 * fs/cpio.c: Split tar functionality to ...
603 * fs/tar.c: ... here (new file). Update all users.
604
aebfc4b0 6052009-02-07 Robert Millan <rmh@aybabtu.com>
606
607 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
608 backward-incompatible features.
609
610 Based on patch from Javier Martín, with some adjustments.
611
50fb7002 6122009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 613
614 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
615
0bb5115e 6162009-02-07 Robert Millan <rmh@aybabtu.com>
617
618 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
619 position of `disk/lvm.c' to ensure grub_init_all() always picks it
620 after the RAID stuff.
621
38a0f8e7 6222009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
623
50fb7002 624 Fixes problem when running vbetest command as reported by
38a0f8e7 625 Vladimir Serbinenko <phcoder@gmail.com>.
626
627 * (grub_vbe_set_video_mode): Fixed problem with text modes.
628
3143cc1c 6292009-02-04 Felix Zielcke <fzielcke@z-51.de>
630
631 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
632 /dev/md/NpN style mdraid devices.
633
9cba6fce 6342009-02-03 Felix Zielcke <fzielcke@z-51.de>
635
636 * util/unifont2pff.rb: Remove.
637
e507a2c1 6382009-02-03 Felix Zielcke <fzielcke@z-51.de>
639
640 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
641 `#'.
642
d2c2b4cd 6432009-02-03 Felix Zielcke <fzielcke@z-51.de>
644
645 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
646 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
647 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
648 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
649 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
650 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
651 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
652
b4315fb0 6532009-02-02 Christian Franke <franke@computer.org>
654
655 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
656
de3aa260 6572009-02-01 Felix Zielcke <fzielcke@z-51.de>
658
7c3ff286 659 * INSTALL: Note that we now require at least autoconf 2.59 and
660 that LZO is optional.
de3aa260 661
825a182b 6622009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
663
664 Base on patch on bug #24154 created by Tomas Tintera
665 <trosos@seznam.cz>.
666
667 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
668
a69ef770 6692009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
670
7c3ff286 671 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 672 <bero@arklinux.org>.
673
674 * normal/parser.y (script_init): Add missing semicolon.
675
6fa42fa6 6762009-01-31 Colin D Bennett <colin@gibibit.com>
677
7c3ff286 678 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 679 (free_menu_entry_classes): Added.
680 (grub_normal_menu_addentry): Added class property handling.
681 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
682 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
683
684 * normal/menu_viewer.c: New file.
685
686 * normal/menu.c (run_menu_entry): Renamed to ...
687 (grub_menu_execute_entry): ... this and made it as global.
688 (grub_menu_run): Renamed to ...
689 (show_text_menu): ... this and made it local.
690 (show_text_menu): Adapt to new function names.
691 (grub_normal_terminal_menu_viewer): New global variable.
692
693 * include/grub/menu.h: New file.
694
695 * include/grub/menu_viewer.h: New file.
696
697 * include/grub/normal.h: Added include to grub/menu.h.
698 (grub_menu_entry): Moved to include/grub/menu.h.
699 (grub_menu_entry_t): Likewise.
700 (grub_menu): Likewise.
701 (grub_menu_t): Likewise.
702 (grub_normal_terminal_menu_viewer): Added.
703 (grub_menu_execute_entry): Likewise.
704 (grub_menu_run): Removed.
705
706 * DISTLIST: Added include/grub/menu.h.
707 Added include/grub/menu_viewer.h.
708 Added normal/menu_viewer.c.
709
7102009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
711
712 * normal/execute.c (grub_script_execute_menuentry): Changed to use
713 arglist for menutitle arguments.
714
715 * normal/main.c (grub_normal_menu_addentry): Likewise.
716
717 * normal/parser.y (menuentry): Likewise.
718
719 * normal/script.c (grub_script_create_cmdmenu): Likewise.
720
721 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
722 (grub_script_create_cmdmenu): Likewise.
723
724 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
725
726 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
727 changes.
728
729 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
730
731 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
732
733 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
734
735 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
736
737 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
738
739 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
740
56192c23 7412009-01-30 Christian Franke <franke@computer.org>
742
743 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
744 in option help text.
745
d72521b3 7462009-01-27 Pavel Roskin <proski@gnu.org>
747
748 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
749
994b5e84 7502009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
751
752 * commands/lsmmap.c: Add include to grub/machine/memory.h.
753
754 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
755
756 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
757 unregister function.
758
6a7eab2c 7592009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
760
761 * disk/scsi.c (grub_scsi_read): Fix sign problem.
762
763 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
764
765 * util/grub-mkfont.c (usage): Fix typo.
766
767 * util/elf/grub-mkimage.c (load_modules): Fix warning.
768
1806b56e 7692009-01-26 Daniel Mierswa <impulze@impulze.org>
770
3fb18f09 771 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
772
336e1fb9 773 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
774
1806b56e 775 * kern/misc.c (grub_strcasecmp): New function.
776 (grub_strcasecmp): Use grub_size_t instead of int for length.
777 Fix return value.
778 * include/grub/misc.h: Update function prototypes.
779
580b2a0f 7802009-01-26 Robert Millan <rmh@aybabtu.com>
781
782 * configure.ac: Fix cross-compilation check.
ef257b36 783
d31c24f1 7842009-01-22 Christian Franke <franke@computer.org>
785
786 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
787 (precision) digit string. Allow `.format2' without `format1' (width).
788 Limit input chars for `%s' output to `format2' if specified. This is
789 compatible with standard printf ().
790
3138b44c 7912009-01-22 Christian Franke <franke@computer.org>
792
793 * disk/ata.c (grub_ata_wait_status): Replace by ...
794 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
795 other status bits may be invalid while BSY is asserted.
796 (grub_ata_check_ready): New function.
797 (grub_ata_cmd): Removed.
798 (grub_ata_wait_drq): New function.
799 (grub_ata_strncpy): Remove inline.
800 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
801 and error check now done by grub_ata_wait_drq ().
802 (grub_ata_pio_write): Likewise.
803 (grub_atapi_identify): Set DEV before check for !BSY. Use
804 grub_ata_wait_drq () to wait for data.
805 (grub_ata_device_initialize): Add status register check to
806 detect missing SATA slave devices. Add debug messages.
807 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
808 (grub_atapi_packet): Set DEV before check for !BSY. Replace
809 transfer loop by grub_ata_pio_write ().
810 (grub_ata_identify): Set DEV before check for !BSY. Use
811 grub_ata_wait_drq () to wait for data.
ef257b36 812 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 813 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
814 read/write in one loop. Fix invalid command on write. Fix incomplete
815 command on (size % batch) == 0. Add missing error check after write of
816 last block. Add debug messages.
817 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
818
59a64ef6 8192009-01-19 Christian Franke <franke@computer.org>
820
821 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
822 (GRUB_ATAPI_IREASON_*): Likewise.
823 (grub_ata_pio_write): Fix timeout error return.
824 (grub_atapi_identify): Add grub_ata_wait () after cmd.
825 (grub_atapi_wait_drq): New function.
826 (grub_atapi_packet): New parameter `size'.
827 Use grub_atapi_wait_drq () and direct write instead of
828 grub_ata_pio_write ().
829 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
830 reads the number of bytes requested by the device for each DRQ
831 assertion.
832 (grub_atapi_write): Remove old implementation, return not
833 implemented instead.
834
1cfe20b3 8352009-01-19 Christian Franke <franke@computer.org>
836
837 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
838 of 512 to calculate data size.
839 (grub_scsi_read12): Likewise.
840 (grub_scsi_write10): Likewise.
841 (grub_scsi_write12): Likewise.
842 (grub_scsi_read): Adjust size according to blocksize.
843 Add checks for invalid blocksize and unaligned transfer.
844
bee5fe5d 8452009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
846
847 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
848
ef257b36 849 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 850 width glyphs.
851
3e643f8c 8522009-01-19 Robert Millan <rmh@aybabtu.com>
853
854 * config.guess: Update to latest version from config git.
855 * config.sub: Likewise.
856
4fa80998 8572009-01-17 Felix Zielcke <fzielcke@z-51.de>
858
859 * Makefile.in: Change font compilation to use new grub-mkfont instead
860 of java version.
861
862 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
863 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
864 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
865 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
866 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
867 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
868 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
869 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
870 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
871
7086085b 8722009-01-16 Christian Franke <franke@computer.org>
873
874 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
875 (enum grub_ata_timeout_milliseconds): New enum.
876 (grub_ata_wait_status): Add parameter milliseconds.
877 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
878 recovery from timed-out commands.
879 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
880 return grub_errno instead of REG_ERROR.
881 (grub_ata_pio_write): Add parameter milliseconds.
882 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
883 Pass milliseconds to grub_ata_wait_status () and
884 grub_ata_pio_read ().
885 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
886 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
887 grub_ata_wait_status (). Fix IDENTIFY timeout check.
888 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
889 It is not suitable for device detection, because DEV bit is ignored,
890 the command may run too long, and not all devices set the signature
891 properly.
892 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
893 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
894 Fix device selection, DEV bit must be set first to address the registers
895 of the correct device.
896 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
897 grub_ata_pio_read/write ().
898 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
899 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
900
4a412913 9012009-01-13 Carles Pina i Estany <carles@pina.cat>
902
903 * util/grub-editenv.c (main): Use fseeko(), not fseek().
904
7795c55e 9052009-01-13 Bean <bean123ch@gmail.com>
d913988c 906
907 * util/grub-mkfont.c (write_font): forget to remove some debug code.
908
7795c55e 9092009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 910
911 * Makefile.in: (enable_grub_mkfont): New variable.
912 (freetype_cflags): Likewise.
913 (freetype_libs): Likewise.
914
915 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
916 (grub_mkfont_SOURCES): New variable.
917 (grub_mkfont_CFLAGS): Likewise.
918 (grub_mkfont_LDFLAGS): Likewise.
919
920 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
921 library if `--enable-grub-mkfont' is requested.
922 (enable_grub_mkfont): New variable.
923 (freetype_cflags): Likewise.
924 (freetype_libs): Likewise.
925
926 * util/grub-mkfont.c: New file.
927
093af1fe 9282009-01-12 Christian Franke <franke@computer.org>
929
930 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
931 mode check. Fix setting of compat_use[].
932
f36cc108 9332009-01-10 Robert Millan <rmh@aybabtu.com>
934
935 Update a few copyright years which we forgot to do in 2008 (only for
936 files whose changes made in 2008 were copyright-significant)
937
938 * Makefile.in: Add 2008 to Copyright line.
939 * disk/ieee1275/ofdisk.c: Likewise.
940 * disk/efi/efidisk.c: Likewise.
941 * kern/dl.c: Likewise.
942 * kern/sparc64/ieee1275/init.c: Likewise.
943 * kern/mm.c: Likewise.
944 * kern/efi/mm.c: Likewise.
945 * boot/i386/pc/boot.S: Likewise.
946 * genfslist.sh: Likewise.
947 * fs/iso9660.c: Likewise.
948 * fs/hfs.c: Likewise.
949 * fs/jfs.c: Likewise.
950 * fs/minix.c: Likewise.
951 * fs/ufs.c: Likewise.
952 * gensymlist.sh.in: Likewise.
953 * genkernsyms.sh.in: Likewise.
954 * include/grub/misc.h: Likewise.
955 * include/grub/types.h: Likewise.
956 * include/grub/symbol.h: Likewise.
957 * include/grub/elf.h: Likewise.
958 * include/grub/kernel.h: Likewise.
959 * include/grub/disk.h: Likewise.
960 * include/grub/dl.h: Likewise.
961 * include/grub/i386/linux.h: Likewise.
962 * include/grub/i386/pc/biosdisk.h: Likewise.
963 * include/grub/efi/api.h: Likewise.
964 * include/grub/efi/pe32.h: Likewise.
965 * include/grub/util/misc.h: Likewise.
966 * normal/execute.c: Likewise.
967 * normal/arg.c: Likewise.
968 * normal/completion.c: Likewise.
969 * normal/lexer.c: Likewise.
970 * normal/parser.y: Likewise.
971 * normal/misc.c: Likewise.
972 * commands/i386/pc/vbeinfo.c: Likewise.
973 * commands/hexdump.c: Likewise.
974 * commands/terminal.c: Likewise.
975 * commands/ls.c: Likewise.
976 * commands/help.c: Likewise.
977 * partmap/pc.c: Likewise.
978 * loader/efi/chainloader.c: Likewise.
979 * loader/multiboot_loader.c: Likewise.
980 * loader/i386/pc/multiboot2.c: Likewise.
981 * term/efi/console.c: Likewise.
982 * term/i386/pc/serial.c: Likewise.
983 * util/lvm.c: Likewise.
984 * util/console.c: Likewise.
985 * util/i386/efi/grub-mkimage.c: Likewise.
986 * util/raid.c: Likewise.
987
7f02114b 9882009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
989
990 * commands/videotest.c: Removed include to grub/machine/memory.h.
991
992 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
993 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
994 (video_mod_SOURCES): Removed.
995 (video_mod_CFLAGS): Likewise.
996 (video_mod_LDFLAGS): Likewise.
997 (gfxterm_mod_SOURCES): Likewise.
998 (gfxterm_mod_CFLAGS): Likewise.
999 (gfxterm_mod_LDFLAGS): Likewise.
1000 (videotest_mod_SOURCES): Likewise.
1001 (videotest_mod_CFLAGS): Likewise.
1002 (videotest_mod_LDFLAGS): Likewise.
1003 (bitmap_mod_SOURCES): Likewise.
1004 (bitmap_mod_CFLAGS): Likewise.
1005 (bitmap_mod_LDFLAGS): Likewise.
1006 (tga_mod_SOURCES): Likewise.
1007 (tga_mod_CFLAGS): Likewise.
1008 (tga_mod_LDFLAGS): Likewise.
1009 (jpeg_mod_SOURCES): Likewise.
1010 (jpeg_mod_CFLAGS): Likewise.
1011 (jpeg_mod_LDFLAGS): Likewise.
1012 (png_mod_SOURCES): Likewise.
1013 (png_mod_CFLAGS): Likewise.
1014 (png_mod_LDFLAGS): Likewise.
1015
1016 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
1017 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
1018 (video_mod_SOURCES): Added.
1019 (video_mod_CFLAGS): Likewise.
1020 (video_mod_LDFLAGS): Likewise.
1021 (videotest_mod_SOURCES): Likewise.
1022 (videotest_mod_CFLAGS): Likewise.
1023 (videotest_mod_LDFLAGS): Likewise.
1024 (bitmap_mod_SOURCES): Likewise.
1025 (bitmap_mod_CFLAGS): Likewise.
1026 (bitmap_mod_LDFLAGS): Likewise.
1027 (tga_mod_SOURCES): Likewise.
1028 (tga_mod_CFLAGS): Likewise.
1029 (tga_mod_LDFLAGS): Likewise.
1030 (jpeg_mod_SOURCES): Likewise.
1031 (jpeg_mod_CFLAGS): Likewise.
1032 (jpeg_mod_LDFLAGS): Likewise.
1033 (png_mod_SOURCES): Likewise.
1034 (png_mod_CFLAGS): Likewise.
1035 (png_mod_LDFLAGS): Likewise.
1036 (gfxterm_mod_SOURCES): Likewise.
1037 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 1038 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 1039
1040 * term/gfxterm.c: Removed include to grub/machine/memory.h,
1041 grub/machine/console.h.
1042
644fff97 10432009-01-04 Jerone Young <jerone@gmail.com>
1044
1045 Make on screen instructions clearer
1046
1047 Based on patch created by Jidanni <jidanni@jidanni.org>
1048
1049 * normal/menu.c: print clearer instructions on the screen
1050
1e901a75 10512009-01-02 Colin D Bennett <colin@gibibit.com>
1052
1053 New font engine.
34c44600 1054
1e901a75 1055 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
1056 build system and fixed gfxterm.c to work with different sized fonts.
1057
1058 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 1059
1e901a75 1060 * configure: Re-generated.
34c44600 1061
1e901a75 1062 * DISTLIST: Removed font/manager.c.
1063 Added font/font.c.
1064 Added font/font_cmd.c.
34c44600 1065
1e901a75 1066 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
1067 compilation.
34c44600 1068
1e901a75 1069 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 1070
1071 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 1072
1073 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 1074
1e901a75 1075 * normal/menu.c: Likewise.
34c44600 1076
1e901a75 1077 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
1078 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 1079
1e901a75 1080 * include/grub/font.h: Replaced with new file.
34c44600 1081
1e901a75 1082 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
1083 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
1084 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
1085 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
1086 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 1087 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 1088 fg_red, fg_green, fg_blue, fg_alpha.
1089 (grub_video_adapter): Removed blit_glyph.
34c44600 1090 (grub_video_blit_glyph): Removed.
1091
1e901a75 1092 * font/manager.c: Removed file.
34c44600 1093
1094 * font/font.c: New file.
1095
1e901a75 1096 * font/font_cmd.c: Likewise.
34c44600 1097
1e901a75 1098 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 1099
1e901a75 1100 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
1101 (grub_video_vbe_map_rgba): Likewise.
1102 (grub_video_vbe_unmap_color_int): Likewise.
1103 (grub_video_vbe_blit_glyph): Removed.
1104 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 1105
1e901a75 1106 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
1107 (get_pixel): Likewise.
34c44600 1108 (set_pixel): Likewise.
1109
1e901a75 1110 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 1111
1e901a75 1112 * term/gfxterm.c: Adapted to new font engine.
34c44600 1113
1e901a75 1114 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 1115
1e901a75 1116 * term/i386/pc/vga.c: Likewise.
34c44600 1117
1e901a75 1118 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 1119
1e901a75 1120 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 1121
1e901a75 1122 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 1123
1e901a75 1124 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 1125
1e901a75 1126 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 1127
1e901a75 1128 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 1129
1e901a75 1130 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 1131
1e901a75 1132 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 1133
1e901a75 1134 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1135
1136 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 1137
1e901a75 1138 * util/grub-mkconfig_lib.in: Changed font extension.
1139
278922e8 11402008-12-28 Felix Zielcke <fzielcke@z-51.de>
1141
1142 * util/getroot.c (grub_util_get_grub_dev): Add support for
1143 /dev/md/dNNpNN style partitionable mdraid devices.
1144
3ced05cf 11452008-12-12 Alex Smith <alex@alex-smith.me.uk>
1146
1147 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
1148 at a time limit of the PXE TFTP API correctly.
1149 (grub_pxefs_close): Likewise.
1150
7fd0ee30 11512008-11-29 Robert Millan <rmh@aybabtu.com>
1152
34c44600 1153 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 1154 grub_ata_device_initialize() calls.
1155
34c44600 11562008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 1157
1158 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
1159 iteration failed.
1160 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
1161
89313780 11622008-11-28 Robert Millan <rmh@aybabtu.com>
1163
1164 Fix build on powerpc-ieee1275. Based on patch created by
1165 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
1166 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1167 `kern/ieee1275/mmap.c'.
1168 * include/grub/powerpc/ieee1275/memory.h: New file.
1169
15257703 1170 Provide grub-install on coreboot.
1171 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
1172 (grub_install_SOURCES): New variable.
1173 * util/i386/pc/grub-install.in: Add a few condition checks to make it
1174 usable on coreboot.
1175
9fc5388a 11762008-11-25 Felix Zielcke <fzielcke@z-51.de>
1177
1178 * util/grub-fstest.c (grub_term_get_current_input): Change return type
1179 to `grub_term_input_t'.
1180 (grub_term_get_current_output): Change return type to
1181 `grub_term_output_t'.
1182
bc3a2f31 11832008-11-22 Robert Millan <rmh@aybabtu.com>
1184
34c44600 1185 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 1186 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
1187 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
1188 grub_vga_text_cls().
1189
80fc88f2 1190 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 1191 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 1192
cbf36fd3 1193 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
1194 to 0x200000 (avoids trouble with some OFW implementations, and matches
1195 with the one in Yaboot).
1196 Reported by Manoel Abranches
1197
73e8e268 11982008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 1199
1200 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
1201 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
1202
73e8e268 1203 * util/grub-mkconfig_lib.in (grub_warn): New function.
1204 (convert_system_path_to_grub_path): Use grub_warn() when issuing
1205 warnings, to obtain consistent formatting.
1206 * util/grub.d/00_header.in: Likewise.
1207 * util/update-grub_lib.in: Likewise.
1208
e94045a1 1209 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 1210 Move comment text to `#error' stanza.
e94045a1 1211
79d29fd7 1212 Harmonize ieee1275's grub_available_iterate() with the generic
1213 grub_machine_mmap_iterate() interface (fixes a recently-introduced
1214 build problem on i386-ieee1275):
1215 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
1216 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
1217 parameter `type'. Update all users of this function.
1218 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1219 `kern/ieee1275/mmap.c'.
1220 * kern/ieee1275/init.c
1221 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
1222 with ...
1223 (grub_machine_mmap_iterate): ... this.
1224 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
1225 return type to `grub_err_t'. Update all implementations of this
1226 function prototype.
1227 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
1228 Likewise.
1229
60d6b16e 1230 Add `lsmmap' command (lists firmware-provided memory map):
1231 * commands/lsmmap.c: New file.
1232 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
1233 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
1234 variables.
1235 * conf/powerpc-ieee1275.rmk: Likewise.
1236 * conf/i386-coreboot.rmk: Likewise.
1237 * conf/i386-ieee1275.rmk: Likewise.
1238
ebaaf49b 12392008-11-19 Robert Millan <rmh@aybabtu.com>
1240
1241 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 1242 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
1243 constraints to initrd allocation (based on code from
1244 loader/i386/pc/linux.c). Without them, initrd was allocated too high
1245 for Linux to find it.
ebaaf49b 1246
dfab719f 12472008-11-14 Robert Millan <rmh@aybabtu.com>
1248
1249 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
1250 order to cope with duplicate slashes.
1251
10fc3eb9 12522008-11-14 Robert Millan <rmh@aybabtu.com>
1253
1254 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
1255 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
1256 don't want to mess with lower memory, because it is used in the Linux
1257 loader.
1258
1259 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 1260 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 1261 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
1262 is in our heap (probably as a result of it being corrupted during
2f2a3442 1263 decompression). Add #error instance with comment to explain why this
1264 loader isn't currently usable on PC/BIOS.
10fc3eb9 1265
e2e07847 12662008-11-14 Robert Millan <rmh@aybabtu.com>
1267
1268 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 1269 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 1270
fe8e8d69 12712008-11-12 Robert Millan <rmh@aybabtu.com>
1272
1273 Make loader/i386/linux.c buildable on i386-pc (although disabled).
1274
1275 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
1276 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
1277 from here ...
1278 * include/grub/i386/pc/memory.h: ... to here.
1279
976b07d0 12802008-11-12 Robert Millan <rmh@aybabtu.com>
1281
1282 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
1283 split).
1284
1285 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
1286 (grub_console_cur_color, grub_console_real_putchar)
1287 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1288 (grub_console_setcolorstate, grub_console_setcolor)
1289 (grub_console_getcolor): Move from here ...
1290 * include/grub/i386/vga_common.h: ... to here (new file).
1291
1292 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
1293 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
1294 `<grub/i386/io.h>'.
1295 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
1296 `<grub/i386/vga_common.h>'.
1297
76679cd3 12982008-11-12 Robert Millan <rmh@aybabtu.com>
1299
1300 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
1301 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
1302 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
1303 variables.
1304 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1305 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
1306
1307 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
1308 grub_console_init() with call to grub_vga_text_init().
1309 (grub_machine_fini): Replace call to
1310 grub_console_fini() with call to grub_vga_text_fini() and
1311 grub_at_keyboard_fini().
1312
1313 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
1314 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1315 (grub_console_setcolorstate, grub_console_setcolor)
1316 (grub_console_getcolor): New function prototypes.
1317
1318 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
1319 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
1320 (grub_vga_text_setcursor): Static-ize.
1321 (grub_vga_text_term): New structure.
1322 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
1323
1324 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
1325 (grub_console_cur_color, grub_console_standard_color)
1326 (grub_console_normal_color, grub_console_highlight_color)
1327 (map_char, grub_console_putchar, grub_console_getcharwidth)
1328 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
1329 (grub_console_getcolor): Move from here ...
1330 * term/i386/vga_common.c: ... to here (same function names).
1331
95b841d3 13322008-11-12 Robert Millan <rmh@aybabtu.com>
1333
1334 Use newly-added Multiboot support in coreboot.
1335
1336 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1337 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
1338
1339 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
1340 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
1341 (codestart): Store the MBI in `startup_multiboot_info' when we're
1342 being loaded using Multiboot.
1343
1344 * kern/i386/coreboot/init.c (grub_machine_init): Move
1345 grub_at_keyboard_init() call to beginning of function (useful for
1346 debugging). Call grub_machine_mmap_init() before attempting to use
1347 grub_machine_mmap_iterate().
1348 (grub_lower_mem, grub_upper_mem): Move from here ...
1349 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
1350 here (new file).
1351
1352 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
1353 function prototype.
1354
761ca975 13552008-11-12 Robert Millan <rmh@aybabtu.com>
1356
1357 Fix a regression introduced by the at_keyboard.mod split. Because
1358 some terminals are default on some platforms and non-default on
1359 others, the first terminal being registered determines which is
1360 going to be default.
1361
1362 * kern/term.c (grub_term_register_input): If this is the first
1363 terminal being registered, set it as the current one.
1364 (grub_term_register_output): Likewise.
1365
1366 * term/efi/console.c (grub_console_init): Do not call
1367 grub_term_set_current_output() or grub_term_set_current_input().
1368 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
1369 * term/i386/pc/console.c (grub_console_init): Likewise.
1370 (grub_console_fini): Do not call grub_term_set_current_input()
1371 (but leave grub_term_set_current_output() to restore text mode).
1372
6c529df7 13732008-11-10 Robert Millan <rmh@aybabtu.com>
1374
1375 * util/grub.d/00_header.in: Add backward compatibility check for
1376 versions of terminal.mod that don't understand `terminal_input' or
1377 `terminal_output'.
1378
132e4113 13792008-11-09 Robert Millan <rmh@aybabtu.com>
1380
1381 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
1382 `terminal_input' / `terminal_output', not `terminal'.
1383
ac293d50 13842008-11-08 Robert Millan <rmh@aybabtu.com>
1385
1386 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 1387 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 1388
0025933a 13892008-11-08 Robert Millan <rmh@aybabtu.com>
1390
1391 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 1392 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 1393 members. Update all users.
1394 * util/console.c (grub_ncurses_term): Split in ...
1395 (grub_ncurses_term_input): ... this, and ...
1396 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 1397 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 1398
37c86336 13992008-11-08 Robert Millan <rmh@aybabtu.com>
1400
1401 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
1402 (PKGDATA): Add $(pkgdata_SRCDIR).
1403 (pkglib_BUILDDIR): New variable.
1404 (pkgdata_SRCDIR): New variable.
1405 (build_env.mk): New target.
1406 (include_DATA): New variable.
1407 (install-local): Install $(include_DATA) files in $(includedir).
1408
b6c15a2d 14092008-11-07 Pavel Roskin <proski@gnu.org>
1410
d99d46f1 1411 * gendistlist.sh: Use C locale for sorting to ensure consistent
1412 output on all systems.
1413
b6c15a2d 1414 * util/grub.d/00_header.in: Remove incorrect space before
1415 "serial".
1416
c32ee8c9 14172008-11-07 Robert Millan <rmh@aybabtu.com>
1418
1419 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
1420 per specification.
1421 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
1422 * loader/multiboot_loader.c (find_multi_boot2_header): New function
1423 (based on find_multi_boot1_header).
1424 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
1425 using find_multi_boot2_header(), and abort if neither Multiboot or
1426 Multiboot headers were found.
1427
651c29b7 14282008-11-07 Robert Millan <rmh@aybabtu.com>
1429
1430 Modularize at_keyboard.mod:
1431
1432 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
1433 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
1434 (at_keyboard_mod_LDFLAGS): New variables.
1435
1436 Actual terminal split:
1437
1438 * include/grub/term.h (struct grub_term): Split in ...
1439 (struct grub_term_input): ... this, and ...
1440 (struct grub_term_output): ... this. Update all users.
1441 (grub_term_set_current): Split in ...
1442 (grub_term_set_current_input): ... this, and ...
1443 (grub_term_set_current_output): ... this.
1444 (grub_term_get_current): Split in ...
1445 (grub_term_get_current_input): ... this, and ...
1446 (grub_term_get_current_output): ... this.
1447 (grub_term_register): Split in ...
1448 (grub_term_register_input): ... this, and ...
1449 (grub_term_register_output): ... this.
1450 (grub_term_unregister): Split in ...
1451 (grub_term_unregister_input): ... this, and ...
1452 (grub_term_unregister_output): ... this.
1453 (grub_term_iterate): Split in ...
1454 (grub_term_iterate_input): ... this, and ...
1455 (grub_term_iterate_output): ... this.
1456
1457 * kern/term.c (grub_term_list): Split in ...
1458 (grub_term_list_input): ... this, and ...
1459 (grub_term_list_output): ... this. Update all users.
1460 (grub_cur_term): Split in ...
1461 (grub_cur_term_input): ... this, and ...
1462 (grub_cur_term_output): ... this. Update all users.
1463 (grub_term_set_current): Split in ...
1464 (grub_term_set_current_input): ... this, and ...
1465 (grub_term_set_current_output): ... this.
1466 (grub_term_get_current): Split in ...
1467 (grub_term_get_current_input): ... this, and ...
1468 (grub_term_get_current_output): ... this.
1469 (grub_term_register): Split in ...
1470 (grub_term_register_input): ... this, and ...
1471 (grub_term_register_output): ... this.
1472 (grub_term_unregister): Split in ...
1473 (grub_term_unregister_input): ... this, and ...
1474 (grub_term_unregister_output): ... this.
1475 (grub_term_iterate): Split in ...
1476 (grub_term_iterate_input): ... this, and ...
1477 (grub_term_iterate_output): ... this.
1478
1479 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
1480 a check for input and one for output (and only attempt to get keys
1481 from user when input works).
1482
1483 * util/grub-probe.c (grub_term_get_current): Split in ...
1484 (grub_term_get_current_input): ... this, and ...
1485 (grub_term_get_current_output): ... this.
1486 * util/grub-fstest.c: Likewise.
1487 * util/i386/pc/grub-setup.c: Likewise.
1488 * util/grub-editenv.c: Likewise.
1489
1490 Portability adjustments:
1491
1492 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
1493 `term/i386/pc/at_keyboard.c'.
1494 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
1495 grub_keyboard_controller_init() (now handled by terminal .init).
1496 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
1497 grub_at_keyboard_init().
1498 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
1499 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
1500 at_keyboard.mod via input terminal interface).
1501 * include/grub/i386/coreboot/console.h: Convert into a stub for
1502 `<grub/i386/pc/console.h>'.
1503
1504 Migrate full terminals to new API:
1505
1506 * term/efi/console.c (grub_console_term): Split into ...
1507 (grub_console_term_input): ... this, and ...
1508 (grub_console_term_output): ... this. Update all users.
1509 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
1510 (grub_ofconsole_init): Split into ...
1511 (grub_ofconsole_init_input): ... this, and ...
1512 (grub_ofconsole_init_output): ... this.
1513 (grub_ofconsole_term): Split into ...
1514 (grub_ofconsole_term_input): ... this, and ...
1515 (grub_ofconsole_term_output): ... this. Update all users.
1516 * term/i386/pc/serial.c (grub_serial_term): Split into ...
1517 (grub_serial_term_input): ... this, and ...
1518 (grub_serial_term_output): ... this. Update all users.
1519 * term/i386/pc/console.c (grub_console_term): Split into ...
1520 (grub_console_term_input): ... this, and ...
1521 (grub_console_term_output): ... this. Update all users.
1522 (grub_console_term_input): Only enable it on PC/BIOS platform.
1523 (grub_console_init): Remove grub_keyboard_controller_init() call.
1524
1525 Migrate input terminals to new API:
1526
1527 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
1528 `i386' and `i386/pc' to enable build on x86_64 (this driver is
1529 i386-specific anyway).
1530 (grub_console_checkkey): Rename to ...
1531 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
1532 users.
1533 (grub_keyboard_controller_orig): New variable.
1534 (grub_console_getkey): Rename to ...
1535 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
1536 users.
1537 (grub_keyboard_controller_init): Static-ize. Save original
1538 controller value so that it can be restored ...
1539 (grub_keyboard_controller_fini): ... here (new function).
1540 (grub_at_keyboard_term): New structure.
1541 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
1542 functions.
1543
1544 Migrate output terminals to new API:
1545
1546 * term/i386/pc/vga.c (grub_vga_term): Change type to
1547 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1548 members. Update all users.
1549 * term/gfxterm.c (grub_video_term): Change type to
1550 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1551 members. Update all users.
1552 * include/grub/i386/pc/console.h (grub_console_checkkey)
1553 (grub_console_getkey): Do not export (no longer needed by gfxterm,
1554 etc).
1555
1556 Migrate `terminal' command and userland tools to new API:
1557
1558 * commands/terminal.c (grub_cmd_terminal): Split into ...
1559 (grub_cmd_terminal_input): ... this, and ...
1560 (grub_cmd_terminal_output): ... this.
1561 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
1562 `terminal_input' and `terminal_output'.
1563 * util/grub.d/00_header.in: Adjust `terminal' calls to new
1564 `terminal_input' / `terminal_output' API.
1565 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
1566 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
1567 provided ${GRUB_TERMINAL}, convert it).
1568
96e5d876 15692008-11-04 Robert Millan <rmh@aybabtu.com>
1570
1571 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
1572 for FreeBSD.
1573 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
1574
556f3775 15752008-11-03 Bean <bean123ch@gmail.com>
1576
1577 * kern/elf.c (grub_elf32_load): Revert to previous code.
1578 (grub_elf64_load): Likewise.
1579
1580 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
1581
926b9823 15822008-11-01 Robert Millan <rmh@aybabtu.com>
1583
1584 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
1585 (TARGET_CPPFLAGS): Likewise.
1586 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
1587
1432e958 15882008-11-01 Carles Pina i Estany <carles@pina.cat>
1589
1590 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
1591
dba3f844 15922008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 1593
1594 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
1595 addition of objects until the code is not going to be able to fail.
1596
dba3f844 15972008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 1598
1599 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
1600 (add a missing NULL check, and correct them by moving the pointer
1601 operations after the actual check).
1602
7ab28c21 16032008-10-29 Robert Millan <rmh@aybabtu.com>
1604
1605 * util/i386/pc/grub-install.in: Handle empty string as output from
1606 make_system_path_relative_to_its_root().
1607
1b7748eb 16082008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
1609
1610 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
1611 circular metadata worst case scenario. If the metadata is circular
1612 then copy the wrap in place.
1613 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
1614 project lib/format_text/layout.h
1615 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
1616
c9618ab2 16172008-10-03 Felix Zielcke <fzielcke@z-51.de>
1618
7a36edca 1619 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 1620
bf981c62 16212008-10-03 Felix Zielcke <fzielcke@z-51.de>
1622
1623 * util/update-grub_lib.in: Mention filename in warning message.
1624
6d994591 16252008-09-29 Felix Zielcke <fzielcke@z-51.de>
1626
1627 * NEWS: Update for rename of update-grub to grub-mkconfig.
1628
18ade780 16292008-09-29 Felix Zielcke <fzielcke@z-51.de>
1630
1631 * util/update-grub_lib.in: Copy to ...
1632 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 1633 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 1634 * util/update-grub.in: Rename to ...
1635 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
1636 option. Add `--output' option to allow users to specify the generated
1637 configuration file. Default to stdout.
1638 (update_grub_dir): Rename to ...
1639 (grub_mkconfig_dir): ... this.
1640 (grub_cfg): Default to an empty string.
1641 * conf/common.rmk (update-grub): Rename to ...
1642 (grub-mkconfig): ... this.
1643 (update-grub_lib): Copy to ...
1644 (grub-mkconfig_lib): ... this.
1645 (update-grub_SCRIPTS): Copy to ...
1646 (grub-mkconfig_SCRIPTS): ... this. Update all users.
1647 (update-grub_DATA): Rename to ...
1648 (grub-mkconfig_DATA): ... this.
1649
556ce6ac 16502008-09-28 Robert Millan <rmh@aybabtu.com>
1651
1652 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
1653 to `modified'. Add the real `created' field.
1654 (grub_iso9660_uuid): Use `modified' rather than `created' for
1655 constructing the UUID.
1656
16572008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 1658
1659 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
1660 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
1661
92274e85 16622008-09-28 Bean <bean123ch@gmail.com>
1663
1664 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
1665 Thanks to Christian Franke for finding this bug.
1666
add6f17a 16672008-09-25 Robert Millan <rmh@aybabtu.com>
1668
1669 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
1670 instances of grub_util_get_disk_name() (see previous commit).
1671
d2a367b8 16722008-09-25 Robert Millan <rmh@aybabtu.com>
1673
1674 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
1675 `util/i386/get_disk_name.c'.
1676 * conf/i386-efi.rmk: Likewise.
1677 * conf/x86_64-efi.rmk: Likewise.
1678 * conf/i386-coreboot.rmk: Likewise.
1679 * conf/i386-ieee1275.rmk: Likewise.
1680 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
1681 `util/ieee1275/get_disk_name.c'.
1682 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
1683 * util/ieee1275/get_disk_name.c: Remove file.
1684 * util/i386/get_disk_name.c: Remove file.
1685 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
1686 "hd%d" for device.map entries, rather than using
1687 grub_util_get_disk_name().
1688
81a06771 16892008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 1690
1691 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
1692 warning.
1693 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
1694
5a004279 16952008-09-24 Carles Pina i Estany <carles@pina.cat>
1696
1697 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
1698 Changed to 0x5100.
1699 (GRUB_TERM_PPAGE): Changed to 0x4900.
1700
397093d3 17012008-09-24 Robert Millan <rmh@aybabtu.com>
1702
1703 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
1704 macros (they were i386-pc specific).
1705 * include/grub/sparc64/ieee1275/console.h: Likewise.
1706 * include/grub/efi/console.h: Likewise.
1707
a91b6c7c 17082008-09-22 Bean <bean123ch@gmail.com>
1709
1710 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
1711 resident and in attribute list.
1712
1713 * include/grub/ntfs.h (BMP_LEN): Removed.
1714
c40fd116 17152008-09-22 Bean <bean123ch@gmail.com>
1716
81a06771 1717 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 1718 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
1719
1720 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
1721 error occurs, as grub_disk_open will call grub_disk_close, which will
1722 call p->close (scsi).
1723
81a06771 17242008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 1725
1726 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
1727 (AC_PREREQ): Bumped to 2.59.
1728 (AC_TRY_COMPILE): Replace obsolete macro with ...
1729 (AC_COMPILE_IFELSE): ... this.
1730 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
1731 (AC_LINK_IFELSE): ... this.
1732
5dc43410 17332008-09-21 Felix Zielcke <fzielcke@z-51.de>
1734
1735 * autogen.sh: Add a call to `gendistlist.sh'.
1736
9035dce4 17372008-09-19 Christian Franke <franke@computer.org>
1738
1739 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
1740 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
1741 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
1742 Export __enable_execute_stack() to modules.
1743 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
1744 New function.
1745
7fd75377 17462008-09-09 Felix Zielcke <fzielcke@z-51.de>
1747
040030b3 1748 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
1749 Sort the list.
1750
17512008-09-09 Felix Zielcke <fzielcke@z-51.de>
1752
1753 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 1754 #include <grub/util/hostdisk.h>.
1755
89d5ffcf 17562008-09-08 Robert Millan <rmh@aybabtu.com>
1757
1758 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
1759 segments when their filesz is zero (grub_file_read() interprets
81a06771 1760 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 1761 Use `lowest_segment' rather than 0 for calculating the current
1762 segment load address.
1763
40da438f 17642008-09-08 Robert Millan <rmh@aybabtu.com>
1765
1766 * util/hostdisk.c (open_device): Replace a grub_util_info() call
1767 with grub_dprintf("hostdisk", ...), as it was so verbose that it
1768 clobbered useful information.
1769
ddbf5556 17702008-09-08 Robert Millan <rmh@aybabtu.com>
1771
1772 * include/grub/util/biosdisk.h: Move to ...
1773 * include/grub/util/hostdisk.h: ... here. Update all users.
1774 * util/biosdisk.c: Move to ...
1775 * util/hostdisk.c: ... here. Update all users.
1776
783d0f48 17772008-09-07 Robert Millan <rmh@aybabtu.com>
1778
1779 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
1780 variables.
1781 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
1782 and length can be stored directly in the `mbi->mmap_addr' and
1783 `mbi->mmap_length' struct fields.
1784
548e2ea5 17852008-09-07 Robert Millan <rmh@aybabtu.com>
1786
1787 * conf/i386.rmk: New file. Provides declaration for building
1788 `cpuid.mod'.
1789 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
1790 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
1791 variables.
1792 Include `conf/i386.mk'.
1793 * conf/i386-efi.rmk: Likewise.
1794 * conf/x86_64-efi.rmk: Likewise.
1795 * conf/i386-coreboot.rmk: Likewise.
1796 * conf/i386-ieee1275.rmk: Likewise.
1797
0ea85a37 17982008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
1799
1800 Based on patch created by Colin D Bennett <colin@gibibit.com>.
1801 Adds optimization support for BGR based modes.
1802
1803 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
1804 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1805 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1806 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1807 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1808 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1809 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1810 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1811 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1812 (grub_video_i386_vbeblit_index_index): Likewise.
1813 (grub_video_i386_vbeblit_replace_directN): Added.
1814 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1815 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1816 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1817 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1818 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1819 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 1820 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 1821 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1822 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1823 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1824 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1825 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1826 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1827
1828 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
1829 (grub_video_i386_vbefill_R8G8B8): Likewise.
1830 (grub_video_i386_vbefill_index): Likewise.
1831 (grub_video_i386_vbefill_direct32): Added.
1832 (grub_video_i386_vbefill_direct24): Likewise.
1833 (grub_video_i386_vbefill_direct16): Likewise.
1834 (grub_video_i386_vbefill_direct8): Likewise.
1835
81a06771 1836 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 1837 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
1838 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
1839 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
1840 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
1841 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 1842
0ea85a37 1843 * video/video.c (grub_video_get_blit_format): Updated to use new
1844 blit formats. Added handling for 16 bit color modes.
81a06771 1845
1846 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 1847 fillers.
1848 (common_blitter): Updated to use new blitters.
1849
1850 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
1851 Removed.
1852 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1853 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1854 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1855 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1856 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1857 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1858 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1859 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1860 (grub_video_i386_vbeblit_index_index): Likewise.
1861 (grub_video_i386_vbeblit_replace_directN): Added.
1862 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1863 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1864 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1865 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1866 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1867 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1868 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1869 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1870 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1871 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1872 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1873 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1874 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 1875
0ea85a37 1876 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1877 (grub_video_i386_vbefill_R8G8B8): Likewise.
1878 (grub_video_i386_vbefill_index): Likewise.
1879 (grub_video_i386_vbefill_direct32): Added.
1880 (grub_video_i386_vbefill_direct24): Likewise.
1881 (grub_video_i386_vbefill_direct16): Likewise.
1882 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 1883
0ea85a37 1884 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1885 types.
81a06771 1886
0ea85a37 1887 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1888 types.
81a06771 1889
0ea85a37 1890 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1891 blitter types.
81a06771 1892
0ea85a37 1893 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1894 types.
1895
e8a83df6 18962008-09-06 Felix Zielcke <fzielcke@z-51.de>
1897
1898 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1899 RAID level 1.
1900
6bcd8ee5 19012008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 1902
6bcd8ee5 1903 * fs/iso9660.c (grub_iso9660_date): New structure.
1904 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1905 (grub_iso9660_uuid): New function.
c375ae58 1906
59261157 19072008-09-05 Bean <bean123ch@gmail.com>
1908
1909 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1910
1911 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1912 insensitive bit for names in Win32 and Win32 & DOS namespace.
1913
1914 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1915
1916 * include/grub/types.h (LONG_MAX): Likewise.
1917
58b6645a 19182008-09-04 Felix Zielcke <fzielcke@z-51.de>
1919
4ee55921 1920 * util/getroot.c: Include <config.h>.
1921 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1922 add support for /dev/md/N devices and handle LVM double dash escaping.
1923
19242008-09-04 Felix Zielcke <fzielcke@z-51.de>
1925
1926 * config.guess: Update to latest version from config git.
1927 * config.sub: Likewise.
58b6645a 1928
9124f65d 19292008-09-03 Robert Millan <rmh@aybabtu.com>
1930
1931 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1932 `disk->total_sectors'.
1933
81a06771 19342008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 1935
1936 * include/grub/normal.h: Fixed incorrect comment for
1937 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1938
81a06771 19392008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 1940
1941 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1942 values with defines.
1943
1944 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1945 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1946 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1947 (GRUB_VBE_MODEATTR_COLOR): Likewise.
1948 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1949 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1950 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1951 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1952 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1953 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1954 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1955 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1956 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1957 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1958 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1959 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1960 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1961 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1962 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1963
93d5cbf8 19642008-08-31 Robert Millan <rmh@aybabtu.com>
1965
1966 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1967 declaration.
1968 (grub_multiboot): Fix a few warnings.
1969
21751d50 19702008-08-31 Robert Millan <rmh@aybabtu.com>
1971
1972 * loader/i386/pc/multiboot.c: Update comment not to say that
1973 boot_device support is unimplemented.
1974
e27a75c5 19752008-08-31 Robert Millan <rmh@aybabtu.com>
1976
1977 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1978 or memory map support are unimplemented.
1979
81a06771 19802008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 1981
1982 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1983
81a06771 19842008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 1985
1986 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1987 total video memory in 'vbeinfo' output; show color format details for
1988 each video mode.
1989
7c5d8d95 19902008-08-30 Pavel Roskin <proski@gnu.org>
1991
1992 * util/genmoddep.c: Remove for real this time.
1993 * DISTLIST: Remove util/genmoddep.c.
1994
4cebd25a 19952008-08-30 Robert Millan <rmh@aybabtu.com>
1996
1997 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1998 as required by Multiboot spec (it was already 4-byte aligned, but
1999 only by chance).
2000
b497a269 20012008-08-29 Pavel Roskin <proski@gnu.org>
2002
e3925185 2003 * kern/powerpc/ieee1275/crt0.S: Rename to ...
2004 * kern/powerpc/ieee1275/startup.S: ... this.
2005 * conf/powerpc-ieee1275.rmk: Adjust for the above.
2006 * DISTLIST: Likewise.
2007
b497a269 2008 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
2009 grub/cpu/kernel.h. Add start label for consistency with other
2010 platforms. Add grub_prefix immediately after start. Add jump
2011 to the code after grub_prefix.
2012 * include/grub/powerpc/kernel.h: Provide valid values for
2013 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
2014
6e5a42fe 20152008-08-29 Bean <bean123ch@gmail.com>
2016
2017 * configure.ac: Change host_os to cygwin for mingw.
2018 (asprintf): New check for function.
2019
2020 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
2021 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
2022
2023 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 2024 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 2025 sync, sleep and grub_util_get_disk_size for mingw.
2026
2027 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
2028 to get size in mingw.
2029 (open_device): Use flag O_BINARY if it's defined.
2030 (find_root_device): Add dummy code for mingw.
2031
2032 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
2033 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
2034 (get_scsi_disk_name): Return 0 for mingw.
2035
2036 * util/hostfs.c: #include <grub/util/misc.h>.
2037 (grub_hostfs_open): Use "rb" flag to open file, use
2038 grub_util_get_disk_size to get disk size for mingw.
2039
2040 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
2041 (asprintf): New function if HAVE_ASPRINTF is not set.
2042 (sync): New function for mingw.
2043 (sleep): Likewise.
2044 (grub_util_get_disk_size): Likewise.
2045
ab3f2673 20462008-08-28 Pavel Roskin <proski@gnu.org>
2047
2048 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2049 kern/time.c.
2050
1c282483 20512008-08-28 Robert Millan <rmh@aybabtu.com>
2052
2053 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
2054
678e849c 20552008-08-28 Robert Millan <rmh@aybabtu.com>
2056
2057 Change find_grub_drive() syntax so it doesn't prevent it from
2058 detecting NULL names as errors.
2059
2060 * util/biosdisk.c (find_grub_drive): Move free slot search code
2061 from here ...
2062 (find_free_slot): ... to here.
2063 (read_device_map): Use find_free_slot() to search for free slots.
2064
965c75ca 20652008-08-27 Marco Gerards <marco@gnu.org>
2066
2067 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
2068 (scsi_mod_SOURCES): New variable.
2069 (scsi_mod_CFLAGS): Likewise
2070 (scsi_mod_LDFLAGS): Likewise.
2071
2072 * disk/scsi.c: New file.
2073
2074 * include/grub/scsi.h: Likewise.
2075
2076 * include/grub/scsicmd.h: Likewise.
2077
2078 * disk/ata.c: Include <grub/scsi.h>.
2079 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
2080 instead.
2081 (grub_ata_iterate): Skip ATAPI devices.
2082 (grub_ata_open): Only handle ATAPI devices.
2083 (struct grub_atapi_read): Removed.
2084 (grub_atapi_readsector): Likewise.
2085 (grub_ata_read): No longer handle ATAPI devices.
2086 (grub_ata_write): Likewise.
2087 (grub_atapi_iterate): New function.
2088 (grub_atapi_read): Likewise.
2089 (grub_atapi_write): Likewise.
2090 (grub_atapi_open): Likewise.
2091 (grub_atapi_close): Likewise.
2092 (grub_atapi_dev): New variable.
2093 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
2094 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
2095
2096 * include/grub/disk.h (enum grub_disk_dev_id): Add
2097 `GRUB_DISK_DEVICE_SCSI_ID'.
2098
c07ae501 20992008-08-26 Robert Millan <rmh@aybabtu.com>
2100
2101 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
2102 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
2103 descriptive.
2104
5ed20adc 21052008-08-23 Bean <bean123ch@gmail.com>
2106
2107 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
2108 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2109 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
2110 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
2111 dm_nv.mod.
2112 (raid5rec_mod_SOURCES): New macro.
2113 (raid5rec_mod_CFLAGS): Likewise.
2114 (raid5rec_mod_LDFLAGS): Likewise.
2115 (raid6rec_mod_SOURCES): Likewise.
2116 (raid6rec_mod_CFLAGS): Likewise.
2117 (raid6rec_mod_LDFLAGS): Likewise.
2118 (mdraid_mod_SOURCES): Likewise.
2119 (mdraid_mod_CFLAGS): Likewise.
2120 (mdraid_mod_LDFLAGS): Likewise.
2121 (dm_nv_mod_SOURCES): Likewise.
2122 (dm_nv_mod_CFLAGS): Likewise.
2123 (dm_nv_mod_LDFLAGS): Likewise.
2124
2125 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
2126 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2127 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2128
2129 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
2130 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2131
2132 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2133
2134 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2135
2136 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2137
2138 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2139
2140 * disk/raid5_recover.c: New file.
2141
2142 * disk/raid6_recover.c: Likewise.
2143
2144 * disk/mdraid_linux.c: Likewise.
2145
2146 * disk/dmraid_nvidia.c: Likewise.
2147
2148 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
2149 ULONG_MAX.
2150
2151 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
2152 calculate the size of raid device.
2153 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
2154 different layout of raid5.
2155 (grub_raid_scan_device): Remove code specific to mdraid.
2156 (grub_raid_list): New variable.
2157 (free_array): New function.
2158 (grub_raid_register): Likewise.
2159 (grub_raid_unregister): Likewise.
2160 (grub_raid_rescan): Likewise.
2161 (GRUB_MOD_INIT): Don't iterate device here.
2162 (GRUB_MOD_FINI): Use free_array to release resource.
2163
2164 * include/grub/raid.h: Remove macro and structure specific to mdraid.
2165 (grub_raid5_recover_func_t): New function variable type.
2166 (grub_raid6_recover_func_t): Likewise.
2167 (grub_raid5_recover_func): New variable.
2168 (grub_raid6_recover_func): Likewise.
2169 (grub_raid_register): New function.
2170 (grub_raid_unregister): Likewise.
2171 (grub_raid_rescan): Likewise.
2172 (grub_raid_block_xor): Likewise.
2173
2174 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
2175 (CMD_CRC): New macro.
2176 (part): Removed.
2177 (read_file): Handle device as well as file.
2178 (cmd_crc): New function.
2179 (fstest): Handle multiple disks.
2180 (options): Remove part, raw and long, add root and diskcount.
2181 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 2182 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 2183 add handling for the new options, support multiple disks.
2184
2185 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
2186
29c18915 21872008-08-23 Bean <bean123ch@gmail.com>
2188
2189 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
2190
2191 * genfslist.sh: Ignore kernel.mod.
2192
2193 * genpartmaplist.sh: Likewise.
2194
8415f261 21952008-08-23 Robert Millan <rmh@aybabtu.com>
2196
2197 * util/getroot.c (find_root_device): Skip anything that starts with
2198 a dot, not just directories. This avoids things like /dev/.tmp.md0.
2199
d5a7dc5b 22002008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 2201
d5a7dc5b 2202 * util/update-grub.in (GRUB_GFXMODE): Export variable.
2203 * util/grub.d/00_header.in: Allow the administrator to change default
2204 gfxmode via ${GRUB_GFXMODE}.
2205
380cfbb4 22062008-08-21 Felix Zielcke <fzielcke@z-51.de>
2207
2208 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
2209
c9baafe7 22102008-08-21 Robert Millan <rmh@aybabtu.com>
2211
2212 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
2213 loader.
2214 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
2215 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
2216
e290bef2 22172008-08-20 Carles Pina i Estany <carles@pina.cat>
2218
2219 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
2220 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
2221
f9dbfc96 22222008-08-19 Robert Millan <rmh@aybabtu.com>
2223
2224 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
2225 (struct grub_virtual_screen): Remove `cursor_color'.
2226 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
2227 initialization.
2228 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
2229
dd6bd6ab 22302008-08-18 Robert Millan <rmh@aybabtu.com>
2231
2232 Unify (identical) linux_normal.c files.
2233 * loader/i386/efi/linux_normal.c: Move from here ...
2234 * loader/linux_normal.c: ... to here. Update all users.
2235 * loader/i386/pc/linux_normal.c: Delete. Update all users.
2236 * loader/i386/ieee1275/linux_normal.c: Likewise.
2237
7f42f83e 22382008-08-18 Robert Millan <rmh@aybabtu.com>
2239
2240 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
2241 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
2242 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
2243 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
2244 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
2245 New macros.
2246 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
2247 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
2248 (GRUB_LINUX_CL_END_OFFSET): ... to here.
2249 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
2250 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
2251 (GRUB_EFI_CL_END_OFFSET): Rename to ...
2252 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
2253 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
2254 Initialize `params->video_cursor_x' and `params->video_cursor_y'
2255 portably using grub_getxy().
2256 Replace `-EFI' with `-bzImage' in boot message.
2257
38487ddb 22582008-08-17 Robert Millan <rmh@aybabtu.com>
2259
2260 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
2261
deceb3ec 22622008-08-17 Robert Millan <rmh@aybabtu.com>
2263
2264 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
2265
2266 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
2267 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
2268 (grub_machine_mmap_iterate): New function declaration.
2269 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
2270 structure.
2271 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
2272 macros.
2273
2274 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
2275 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
2276 Move e820 parsing from here ...
2277 * kern/i386/pc/mmap.c: New file.
2278 (grub_machine_mmap_iterate): ... to here.
2279
2280 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
2281 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
2282 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
2283 (grub_available_iterate): Redeclare to return `void', and redeclare
2284 its hook to use grub_uint64_t as addr and size parameters, and rename
2285 to ...
2286 (grub_machine_mmap_iterate): ... this. Update all users.
2287
2288 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
2289 to make it more readable. Rename to ...
2290 (grub_machine_mmap_iterate): ... this.
2291
2292 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
2293 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
2294 (grub_multiboot): Allocate an extra region after the payload, and fill
2295 it with a Multiboot memory map. Adjust a.out loader to calculate size
2296 with the extra space.
2297 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
2298 with the extra space.
2299
f8aa0f43 23002008-08-17 Carles Pina i Estany <carles@pina.cat>
2301
9807deb9 2302 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 2303
605f5bb6 23042008-08-17 Felix Zielcke <fzielcke@z-51.de>
2305
2306 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
2307 mdate-sh to the list `find' searches for.
2308 * DISTLIST: Regenerated.
2309
210db6c6 23102008-08-16 Felix Zielcke <fzielcke@z-51.de>
2311
2312 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
2313 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 2314 genmoddep.awk, gensymlist.sh.in.
2315 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 2316 * DISTLIST: Regenerated.
48cdbfd4 2317 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 2318
1082b929 23192008-08-16 Robert Millan <rmh@aybabtu.com>
2320
2321 * disk/raid.c (grub_raid_init): Handle/report errors set by
2322 grub_device_iterate().
2323 * disk/lvm.c (grub_lvm_init): Likewise.
2324
42ce5170 23252008-08-15 Bean <bean123ch@gmail.com>
2326
2327 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2328 and datehook.mod.
2329 (datetime_mod_SOURCES): New macro.
2330 (datetime_mod_CFLAGS): Likewise.
2331 (datetime_mod_LDFLAGS): Likewise.
2332 (date_mod_SOURCES): Likewise.
2333 (date_mod_CFLAGS): Likewise.
2334 (date_mod_LDFLAGS): Likewise.
2335 (datehook_mod_SOURCES): Likewise.
2336 (datehook_mod_CFLAGS): Likewise.
2337 (datehook_mod_LDFLAGS): Likewise.
2338
2339 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2340 and datehook.mod.
2341 (datetime_mod_SOURCES): New macro.
2342 (datetime_mod_CFLAGS): Likewise.
2343 (datetime_mod_LDFLAGS): Likewise.
2344 (date_mod_SOURCES): Likewise.
2345 (date_mod_CFLAGS): Likewise.
2346 (date_mod_LDFLAGS): Likewise.
2347 (datehook_mod_SOURCES): Likewise.
2348 (datehook_mod_CFLAGS): Likewise.
2349 (datehook_mod_LDFLAGS): Likewise.
2350
2351 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2352 and datehook.mod.
2353 (datetime_mod_SOURCES): New macro.
2354 (datetime_mod_CFLAGS): Likewise.
2355 (datetime_mod_LDFLAGS): Likewise.
2356 (date_mod_SOURCES): Likewise.
2357 (date_mod_CFLAGS): Likewise.
2358 (date_mod_LDFLAGS): Likewise.
2359 (datehook_mod_SOURCES): Likewise.
2360 (datehook_mod_CFLAGS): Likewise.
2361 (datehook_mod_LDFLAGS): Likewise.
2362
2363 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2364 and datehook.mod.
2365 (datetime_mod_SOURCES): New macro.
2366 (datetime_mod_CFLAGS): Likewise.
2367 (datetime_mod_LDFLAGS): Likewise.
2368 (date_mod_SOURCES): Likewise.
2369 (date_mod_CFLAGS): Likewise.
2370 (date_mod_LDFLAGS): Likewise.
2371 (datehook_mod_SOURCES): Likewise.
2372 (datehook_mod_CFLAGS): Likewise.
2373 (datehook_mod_LDFLAGS): Likewise.
2374
2375 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2376 and datehook.mod.
2377 (datetime_mod_SOURCES): New macro.
2378 (datetime_mod_CFLAGS): Likewise.
2379 (datetime_mod_LDFLAGS): Likewise.
2380 (date_mod_SOURCES): Likewise.
2381 (date_mod_CFLAGS): Likewise.
2382 (date_mod_LDFLAGS): Likewise.
2383 (datehook_mod_SOURCES): Likewise.
2384 (datehook_mod_CFLAGS): Likewise.
2385 (datehook_mod_LDFLAGS): Likewise.
2386
2387 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
2388
2389 * commands/date.c: New file.
2390
2391 * hook/datehook.c: Likewise.
2392
2393 * include/grub/lib/datetime.h: Likewise.
2394
2395 * include/grub/i386/cmos.h: Likewise.
2396
2397 * lib/datetime.c: Likewise.
2398
2399 * lib/i386/datetime.c: Likewise.
2400
2401 * lib/efi/datetime.c: Likewise.
2402
0e9242da 24032008-08-14 Robert Millan <rmh@aybabtu.com>
2404
2405 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
2406 (grub_mkelfimage_SOURCES): New variable.
2407 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
2408
2409 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
2410 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
2411 * conf/powerpc-ieee1275.rmk: Likewise.
2412 * conf/i386-ieee1275.rmk: Likewise.
2413
2414 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
2415 * kern/i386/coreboot/init.c: Likewise.
2416
2417 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
2418 with `<grub/cpu/kernel.h>'.
2419 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
2420 to ...
2421 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
2422 * kern/i386/coreboot/startup.S: Likewise.
2423
2424 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
2425 (GRUB_MOD_GAP): Remove.
2426 * include/grub/powerpc/kernel.h: New file.
2427 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
2428 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2429 * include/grub/i386/kernel.h: New file.
2430 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
2431 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
2432 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2433
2434 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
2435 `grub-mkelfimage'.
2436 Use --directory when invoking grub_mkimage.
2437
2438 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
2439 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
2440 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
2441 and GRUB_KERNEL_CPU_PREFIX.
2442
b86408f8 24432008-08-14 Felix Zielcke <fzielcke@z-51.de>
2444
d5e619ca 2445 * include/grub/err.h (grub_err_printf): New function prototype.
2446 * util/misc.c (grub_err_printf): New function.
2447 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
2448 grub_printf.
2449 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 2450
7161f0e0 24512008-08-13 Robert Millan <rmh@aybabtu.com>
2452
2453 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
2454
a1967522 24552008-08-13 Robert Millan <rmh@aybabtu.com>
2456
2457 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
2458 boot entry.
2459
371458b5 24602008-08-12 Robert Millan <rmh@aybabtu.com>
2461
2462 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
2463 of the relocation code from here ...
2464 (grub_multiboot): ... to here.
2465 (forward_relocator, backward_relocator): Move from here ...
2466 * kern/i386/loader.S (grub_multiboot_forward_relocator)
2467 (grub_multiboot_backward_relocator): ... to here.
2468 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
2469 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
2470 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
2471 (grub_multiboot_forward_relocator_end)
2472 (grub_multiboot_backward_relocator)
2473 (grub_multiboot_backward_relocator_end): New variables.
2474
05f9452b 24752008-08-12 Bean <bean123ch@gmail.com>
2476
2477 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
2478
20024ab0 24792008-08-11 Robert Millan <rmh@aybabtu.com>
2480
2481 * kern/i386/linuxbios/startup.S: Move from here ...
2482 * kern/i386/coreboot/startup.S: ... to here.
2483
2484 * kern/i386/linuxbios/init.c: Move from here ...
2485 * kern/i386/coreboot/init.c: ... to here.
2486
2487 * kern/i386/linuxbios/table.c: Move from here ...
2488 * kern/i386/coreboot/mmap.c: ... to here.
2489
2490 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
2491
e352e9cd 24922008-08-11 Robert Millan <rmh@aybabtu.com>
2493
2494 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
2495 errors. Leave it to the upper layer to handle them.
2496
2d05bc6a 24972008-08-09 Christian Franke <franke@computer.org>
2498
2499 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
2500 * conf/common.rmk: Install `grub-pe2elf' only if requested.
2501 Install `grub.d/10_windows' only on Cygwin.
2502 * configure.ac: Add subst of `target_os'.
2503 Check `target_os' also before setting TARGET_OBJ2ELF.
2504 Add `--enable-grub-pe2elf'.
2505
042bd419 25062008-08-08 Robert Millan <rmh@aybabtu.com>
2507
2508 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2509 (grub_last_time): Change type to grub_uint64_t.
2510 (grub_disk_open): Migrate code from to using grub_get_time_ms().
2511 (grub_disk_close): Likewise.
2512
2513 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2514 (run_menu): Migrate code from to using grub_get_time_ms().
2515
2516 * util/misc.c (grub_get_time_ms): New function.
2517
7f280db5 25182008-08-08 Marco Gerards <marco@gnu.org>
2519
2520 * disk/ata.c (grub_ata_regget): Change return type to
2521 `grub_uint8_t'.
2522 (grub_ata_regget2): Likewise.
2523 (grub_ata_wait_status): New function.
2524 (grub_ata_wait_busy): Removed function, updated all users to use
2525 `grub_ata_wait_status'.
2526 (grub_ata_wait_drq): Likewise.
2527 (grub_ata_cmd): New function.
2528 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
2529 error handling.
2530 (grub_ata_pio_write): Add error handling.
2531 (grub_atapi_identify): Likewise.
2532 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
2533 handling.
2534 (grub_ata_identify): Use `grub_ata_cmd' and improve error
2535 handling. Actually use the detected registers. Reorder the
2536 detection logic such that it is easier to read.
2537 (grub_ata_pciinit): Do not assign the same ID to each controller.
2538 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
2539 handling.
2540 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
2541
2542 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
2543
1fbc5e66 25442008-08-08 Marco Gerards <marco@gnu.org>
2545
2546 * NEWS: Update.
2547
819ce6c0 25482008-08-07 Bean <bean123ch@gmail.com>
2549
2550 * include/grub/x86_64/pci.h: New file.
2551
5c41d44d 25522008-08-07 Christian Franke <franke@computer.org>
2553
2554 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
2555 (TIMER2_GATE): Likewise.
2556 (grub_pit_wait): Add enable/disable of the timer2 gate
2557 bit of port 0x61. This fixes a possible infinite loop.
2558
5ebc275d 25592008-08-07 Bean <bean123ch@gmail.com>
2560
2561 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
2562 kern/i386/tsc.c and kern/i386/pit.c.
2563
2564 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
2565 x86_64 platform.
2566
2567 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
2568 <grub/i386/tsc.h>.
2569
2570 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
2571
e383b3d0 25722008-08-07 Bean <bean123ch@gmail.com>
2573
2574 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
2575
2576 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
2577
2578 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
2579 multiple inclusion. Add #include <grub/types.h>.
2580
1cbb58ac 25812008-08-06 Christian Franke <franke@computer.org>
2582
2583 * conf/common.rmk: Build and install `10_windows'.
2584 * util/grub.d/10_windows.in: New script.
2585
337f5a1e 25862008-08-06 Pavel Roskin <proski@gnu.org>
2587
2588 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
2589
057bc4ac 25902008-08-06 Robert Millan <rmh@aybabtu.com>
2591
2592 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
2593 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
2594
2b99f123 25952008-08-06 Bean <bean123ch@gmail.com>
2596
2597 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
2598 (grub_pxefs_fs_int): Remove dummy definition.
2599 (grub_pxefs_open): Use data->block_size to store the current block
2600 size setting.
2601 (grub_pxefs_read): Use block size stored in data->block_size. As the
2602 value of grub_pxe_blksize can be changed after the file is opened.
2603
9f0234cb 26042008-08-06 Bean <bean123ch@gmail.com>
2605
2606 * fs/i386/pc/pxe.c (curr_file): new variable.
2607 (grub_pxefs_open): Simply the handling of pxe file system. Don't
2608 require the dummy internal file system anymore.
2609 (grub_pxefs_read): Removed.
2610 (grub_pxefs_close): Likewise.
2611 (grub_pxefs_fs_int): Likewise.
2612 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
2613 connection when we switch file.
2614 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
2615
a55d42e0 26162008-08-06 Robert Millan <rmh@aybabtu.com>
2617
2618 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
2619 `halt.mod'.
2620 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
2621 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
2622
2623 * kern/i386/halt.c: New file.
2624 * kern/i386/reboot.c: Likewise.
2625 * include/grub/i386/reboot.h: Likewise.
2626 * include/grub/i386/halt.h: Likewise.
2627
2628 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
2629 Include `<grub/cpu/halt.h>'.
2630 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
2631 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
2632
2633 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
2634 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
2635 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
2636 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
2637 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
2638 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
2639 from here ...
2640 * include/grub/i386/at_keyboard.h: ... to here.
2641
24371d26 26422008-08-05 Robert Millan <rmh@aybabtu.com>
2643
2644 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
2645 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
2646 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
2647 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2648 `kern/generic/millisleep.c'.
2649
2650 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
2651 instead of grub_get_rtc().
2652 (grub_tsc_init): Initialize `tsc_boot_time'.
2653
2654 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
2655 (grub_machine_init): Use grub_tsc_init() rather than
2656 installing an RTC-based handler via grub_install_get_time_ms().
2657
2658 * kern/i386/pit.c: New file.
2659 * include/grub/i386/pit.h: Likewise.
2660
9e7007b3 26612008-08-05 Bean <bean123ch@gmail.com>
2662
2663 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
2664
2665 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
2666 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
2667 (pxe_mod_SOURCES): New macro.
2668 (pxe_mod_CFLAGS): Likewise.
2669 (pxe_mod_LDFLAGS): Likewise.
2670 (pxecmd_mod_SOURCES): Likewise.
2671 (pxecmd_mod_CFLAGS): Likewise.
2672 (pxecmd_mod_LDFLAGS): Likewise.
2673
2674 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
2675 (grub_pxe_call): Likewise.
2676
2677 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
2678
2679 * commands/i386/pc/pxecmd.c: New file.
2680
9f0234cb 2681 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 2682
2683 * include/grub/i386/pc/pxe.h: Likewise.
2684
6977d49f 26852008-08-05 Bean <bean123ch@gmail.com>
2686
2687 * util/console.c (grub_console_cur_color): New variable.
2688 (grub_console_standard_color): Likewise.
2689 (grub_console_normal_color): Likewise.
2690 (grub_console_highlight_color): Likewise.
2691 (color_map): Likewise.
2692 (use_color): Likewise.
2693 (NUM_COLORS): New macro.
2694 (grub_ncurses_setcolorstate): Handle color properly.
2695 (grub_ncurses_setcolor): Don't change color here, just remember the
2696 settings, color will be set in grub_ncurses_setcolorstate.
2697 (grub_ncurses_getcolor): New function.
2698 (grub_ncurses_init): Initialize color pairs.
2699 (grub_ncurses_term): New member grub_ncurses_getcolor.
2700
9c2ff3ee 27012008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 2702
9c2ff3ee 2703 High resolution timer support. Implemented for x86 CPUs using TSC.
2704 Extracted generic grub_millisleep() so it's linked in only as needed.
2705 This requires a Pentium compatible CPU; if the RDTSC instruction is
2706 not supported, then it falls back on the generic grub_get_time_ms()
2707 implementation that uses the machine's RTC.
2708
2709 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
2710 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2711 `kern/generic/millisleep.c'.
2712
2713 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
2714 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
2715
2716 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
2717 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
2718
2719 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2720
2721 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2722 `kern/generic/millisleep.c'.
2723
2724 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2725
2726 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
2727
2728 * kern/generic/rtc_get_time_ms.c: New file.
2729
2730 * kern/generic/millisleep.c: New file.
337f5a1e 2731
9c2ff3ee 2732 * kern/misc.c: Don't include
2733 <kern/time.h> anymore.
2734 (grub_millisleep_generic): Removed.
2735
2736 * commands/sleep.c (grub_interruptible_millisleep): Uses
2737 grub_get_time_ms() instead of grub_get_rtc().
2738
2739 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
2740 function.
2741 (grub_cpu_is_cpuid_supported): New inline function.
2742 (grub_cpu_is_tsc_supported): New inline function.
2743 (grub_tsc_init): New function prototype.
2744 (grub_tsc_get_time_ms): New function prototype.
2745
2746 * kern/i386/tsc.c (grub_get_time_ms): New file.
2747
2748 * include/grub/time.h: Include <grub/types.h.
2749 (grub_millisleep_generic): Removed.
2750 (grub_get_time_ms): New prototype.
2751 (grub_install_get_time_ms): New prototype.
2752 (grub_rtc_get_time_ms): New prototype.
2753
2754 * kern/time.c (grub_get_time_ms): New function.
2755 (grub_install_get_time_ms): New function.
2756
2757 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
2758 <grub/time.h> anymore.
2759 (grub_millisleep): Removed.
2760 (grub_machine_init): Call grub_tsc_init.
2761
2762 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
2763 get_time_ms() implementation.
2764
2765 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
2766 (ieee1275_get_time_ms): New function.
2767 (grub_machine_init): Install get_time_ms() implementation.
2768
2769 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
2770 (grub_machine_init): Call grub_tsc_init().
2771 (grub_millisleep): Removed.
bf06a93f 2772
9c2ff3ee 2773 * kern/ieee1275/init.c (grub_millisleep): Removed.
2774 (grub_machine_init): Install ieee1275_get_time_ms()
2775 implementation.
2776 (ieee1275_get_time_ms): New function.
2777 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
2778 real work.
2779
9ec92aaf 27802008-08-05 Marco Gerards <marco@gnu.org>
2781
2782 * disk/ata.c: Include <grub/pci.h>.
2783 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
2784 (grub_ata_initialize): Rewritten.
2785 (grub_ata_device_initialize): New function.
2786
8d23f507 27872008-08-04 Pavel Roskin <proski@gnu.org>
2788
2789 * kern/main.c: Include grub/mm.h.
2790
5e15ee3d 27912008-08-04 Robert Millan <rmh@aybabtu.com>
2792
2793 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
2794 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
2795 corruption problem).
2796
a9053f8f 27972008-08-04 Robert Millan <rmh@aybabtu.com>
2798
2799 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
2800 warnings introduced in my last commit.
2801
dd19c7d7 28022008-08-03 Robert Millan <rmh@aybabtu.com>
2803
2804 Make PCI available on all i386 architectures.
2805
2806 * include/grub/i386/pc/pci.h: Move from here ...
2807 * include/grub/i386/pci.h: ... to here.
2808
2809 * include/grub/i386/pc/pci.h: Remove.
2810 * include/grub/i386/efi/pci.h: Remove.
2811 * include/grub/x86_64/efi/pci.h: Remove.
2812
2813 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
2814 `<grub/cpu/pci.h>'.
2815
2816 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
2817 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
2818 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
2819
2820 * conf/i386-ieee1275.rmk: Likewise.
2821
e14a6184 28222008-08-03 Robert Millan <rmh@aybabtu.com>
2823
2824 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
2825 (grub_console_setcursor): Make it possible to set cursor off.
2826
52768e37 28272008-08-03 Robert Millan <rmh@aybabtu.com>
2828
2829 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
2830 of modules instead of assuming which platform provides what.
2831 * util/update-grub.in: Likewise.
2832
2d52f57f 28332008-08-03 Robert Millan <rmh@aybabtu.com>
2834
2835 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
2836 instead of `grub_install_dos_part' to determine whether a drive needs
2837 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 2838 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 2839
2a5cd121 28402008-08-02 Robert Millan <rmh@aybabtu.com>
2841
2842 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
2843
93808428 28442008-08-02 Robert Millan <rmh@aybabtu.com>
2845
2846 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
2847 of informational grub_dprintf() calls.
2848
3bd0a12a 28492008-08-02 Robert Millan <rmh@aybabtu.com>
2850
2851 * disk/memdisk.c (memdisk_size): Don't initialize.
2852 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
2853
2854 * include/grub/i386/pc/kernel.h
2855 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2856 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2857 (grub_memdisk_image_size, grub_arch_memdisk_addr)
2858 (grub_arch_memdisk_size): Remove.
2859
2860 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2861 field (was only used to transfer a constant). Add `type' field to
2862 support multiple module types.
2863 (grub_module_iterate): New function.
2864
2865 * kern/device.c (grub_device_open): Do not hide error messages
2866 when grub_disk_open() fails. Use grub_print_error() instead.
2867
2868 * kern/i386/pc/init.c (grub_arch_modules_addr)
2869 (grub_arch_memdisk_size): Remove functions.
2870 (grub_arch_modules_addr): Return the module address in high memory
2871 (now that it isn't copied anymore).
2872
2873 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2874 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2875 decompression routine (grub_total_module_size already includes that
2876 now). Don't copy modules back to low memory.
2877
2878 * kern/main.c: Include `<grub/mm.h>'.
2879 (grub_load_modules): Split out (and use) ...
2880 (grub_module_iterate): ... this function, which iterates through
2881 module objects and runs a hook.
2882 Comment out grub_mm_init_region() call, as it would cause non-ELF
2883 modules to be overwritten.
2884
2885 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2886 the memdisk image in its own region, make it part of the module list.
2887 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2888 (main): Parse --memdisk|-m option, and pass user-provided path as
2889 parameter to generate_image().
2890 (add_segments): Pass `memdisk_path' down to load_modules().
2891 (load_modules): Embed memdisk image in module section when requested.
2892 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2893 `header.type' instead of `header.offset'.
2894
2895 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2896 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2897 (memdisk_mod_LDFLAGS): New variables.
2898 * conf/i386-coreboot.rmk: Likewise.
2899 * conf/i386-ieee1275.rmk: Likewise.
2900
a927cc73 29012008-08-02 Robert Millan <rmh@aybabtu.com>
2902
2903 * loader/i386/pc/multiboot.c (playground, forward_relocator)
2904 (backward_relocator): New variables. Used to allocate and relocate
2905 the payload, respectively.
2906 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 2907 address, install the appropriate relocator code in each bound of
a927cc73 2908 the payload, and set the entry point such that
2909 grub_multiboot_real_boot() will jump to one of them.
2910
2911 * kern/i386/loader.S (grub_multiboot_payload_size)
2912 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2913 (grub_multiboot_payload_entry_offset): New variables.
2914 (grub_multiboot_real_boot): Set cpu context to what the relocator
2915 expects, and jump to the relocator instead of the payload.
2916
2917 * include/grub/i386/loader.h (grub_multiboot_payload_size)
2918 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2919 (grub_multiboot_payload_entry_offset): Export.
2920
b15d8a0c 29212008-08-01 Bean <bean123ch@gmail.com>
2922
2923 * normal/menu_entry.c (editor_getline): Don't return the original
2924 string as result, as it will be released by lexer once it has done
2925 using it.
2926
cdfb3d22 29272008-08-01 Robert Millan <rmh@aybabtu.com>
2928
2929 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2930 within menuentries, not before them.
2931 util/grub.d/10_hurd.in: Likewise.
2932
9175e93d 29332008-08-01 Bean <bean123ch@gmail.com>
2934
2935 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2936 (bufio_mod_SOURCES): New macro.
2937 (bufio_mod_CFLAGS): Likewise.
2938 (bufio_mod_LDFLAGS): Likewise.
2939
2940 * include/grub/bufio.h: New file.
2941
2942 * io/bufio.c: Likewise.
2943
2944 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2945 (grub_video_reader_png): Use grub_buffile_open to open file.
2946
2947 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2948 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2949
2950 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2951 (grub_video_reader_tga): Use grub_buffile_open to open file.
2952
2953 * font/manager.c: Include <grub/bufio.h>.
2954 (add_font): Use grub_buffile_open to open file.
2955
3d8383e7 29562008-07-31 Robert Millan <rmh@aybabtu.com>
2957
2958 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2959 ELF segments, use a macro for arbitrarily accessing any of them instead
2960 of preparing a pointer that allows access to one at a time.
2961 (grub_multiboot_load_elf64): Likewise.
2962
16e641b6 29632008-07-31 Bean <bean123ch@gmail.com>
2964
2965 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2966 GRUB_KERNEL_MACHINE_DATA_END.
2967
59198b72 29682008-07-30 Robert Millan <rmh@aybabtu.com>
2969
2970 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2971 Increase from 0x50 to 0x60.
2972 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2973 use UUIDs to identify the root drive for them. If that's not
2974 possible, abort.
2975 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2976 check, for cross-disk installs.
2977
ae88bca3 29782008-07-30 Robert Millan <rmh@aybabtu.com>
2979
2980 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2981 is non-empty, use it to set the `prefix' environment variable instead
2982 of the usual approach.
2983 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2984 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2985 environment variable instead of dummy make_install_device().
2986
2987 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2988 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 2989 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 2990
2991 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2992 New variable reference.
2993 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2994 New macro. Defines offset of `grub_prefix' within startup.S (relative
2995 to `start').
2996 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
2997 section within startup.S (relative to `start').
2998 * include/grub/i386/coreboot/kernel.h: Likewise.
2999
3000 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
3001 Overwrite grub_prefix with its contents, at the beginning of the
3002 first segment.
3003 (main): Understand -p|--prefix.
3004
14f41dd1 30052008-07-30 Robert Millan <rmh@aybabtu.com>
3006
3007 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
3008
4ca049a3 30092008-07-30 Robert Millan <rmh@aybabtu.com>
3010
3011 * term/i386/pc/vga_text.c (grub_console_cls): Use
3012 grub_console_gotoxy() to go back to beginning of the screen.
3013 Found by Patrick Georgi <patrick.georgi@coresystems.de>
3014
2921d337 30152008-07-29 Christian Franke <franke@computer.org>
3016
3017 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
3018 Add conversion of emulated mount points on Cygwin.
3019
b609876d 30202008-07-29 Christian Franke <franke@computer.org>
3021
3022 * util/update-grub.in: Add a check for admin
3023 group on Cygwin.
3024 Remove old `grub.cfg.new' before creation.
3025 Add `-f' to `mv' to handle the different filesystem
3026 semantics of Windows.
3027
e93e4679 30282008-07-29 Bean <bean123ch@gmail.com>
3029
3030 * normal/main.c (get_line): Fix buffer overflow bug.
3031
41694fd0 30322008-07-28 Robert Millan <rmh@aybabtu.com>
3033
3034 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
3035 (struct grub_apple_header): New struct. Describes the layout of
3036 the partmap header.
3037 (apple_partition_map_iterate): Check the header magic as well as the
3038 partition magic (which was already being checked).
3039
cfd0b4e6 30402008-07-28 Pavel Roskin <proski@gnu.org>
3041
3042 * genmk.rb: Add a warning to the beginning of the output that
3043 it's a generated file and should not be edited.
3044
93cce016 30452008-07-28 Robert Millan <rmh@aybabtu.com>
3046
3047 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3048 with the same number are found, just use issue a warning with
3049 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 3050
cd1df915 30512008-07-27 Robert Millan <rmh@aybabtu.com>
3052
3053 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
3054 information.
3055
b70a8427 30562008-07-27 Bean <bean123ch@gmail.com>
3057
3058 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
3059 (grub_fat_find_dir): Ignore case when comparing filename.
3060
8f5e379f 30612008-07-27 Bean <bean123ch@gmail.com>
3062
3063 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
3064 smallino, as it's more descriptive, and i8count can be confused with
3065 the other field count.
3066 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
3067 inode type.
3068
a85cd5a0 30692008-07-27 Bean <bean123ch@gmail.com>
3070
3071 * commands/crc.c: New file.
3072
3073 * lib/crc.c: Likewise.
3074
3075 * include/grub/lib/crc.h: Likewise.
3076
3077 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
3078
3079 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
3080 (hexdump): Move this function to ...
3081
3082 * lib/hexdump.c: ... here.
3083
3084 * include/grub/hexdump.h: Renamed to ...
3085
3086 * include/grub/lib/hexdump.h: ... this.
3087
3088 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
3089
3090 * util/grub-editenv.c: Likewise.
3091
3092 * include/envblk.h: Renamed to ...
3093
3094 * include/lib/envblk.h: ... this.
3095
3096 * util/envblk.c: Renamed to ...
3097
3098 * lib/envblk.c: ... this.
3099
3100 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
3101 lib/hexdump.c.
3102 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
3103 (pkglib_MODULES): Add crc.mod.
3104 (hexdump_mod_SOURCES): Add lib/hexdump.c.
3105 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
3106 (crc_mod_SOURCES): New macro.
3107 (crc_mod_CFLAGS): Likewise.
3108 (crc_mod_LDFLAGS): Likewise.
3109
3110 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
3111
3112 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3113
3114 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3115
3116 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3117
3118 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3119
c298def0 31202008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 3121
3122 * commands/help.c: Include <grub/term.h>.
3123 (TERM_WIDTH): Removed. Updated all users.
3124
cc349fb3 31252008-07-27 Pavel Roskin <proski@gnu.org>
3126
3127 * util/getroot.c (find_root_device): Rephrase a comment to avoid
3128 spurious warnings about a comment within a comment.
3129
9051607e 31302008-07-25 Robert Millan <rmh@aybabtu.com>
3131
3132 * util/getroot.c (find_root_device): Skip devices that match
3133 /dev/dm-[0-9]. This lets the real device be found for any type of
3134 abstraction (LVM, EVMS, RAID..).
3135 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
3136 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
3137 device is found first, find_root_device() will now skip it.
3138
01453bfc 31392008-07-24 Pavel Roskin <proski@gnu.org>
3140
3141 * include/grub/types.h: Use __builtin_bswap32() and
3142 __builtin_bswap64() with gcc 4.3 and newer.
3143
6af9849f 31442008-07-24 Christian Franke <franke@computer.org>
3145
3a0fa256 3146 * util/i386/pc/grub-install.in: If `--debug' is specified,
3147 pass `--verbose' to grub-setup.
3148 Abort script if make_system_path_relative_to_its_root() fails.
3149
7810e747 31502008-07-24 Bean <bean123ch@gmail.com>
3151
3152 * configure.ac: Fixed a bug caused by the previous cygwin patch,
3153 variable `target_platform' should be `platform'.
3154
42290e17 31552008-07-24 Bean <bean123ch@gmail.com>
3156
51cc5193 3157 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 3158 (grub_png_init_fixed_block): New function.
3159 (grub_png_decode_image_data): Handle fixed huffman code compression.
3160
2a8a80e4 31612008-07-24 Bean <bean123ch@gmail.com>
3162
3163 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
3164 (grub_pe2elf_SOURCES): New macro.
3165 (CLEANFILES): Add grub-pe2elf.
3166
3167 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
3168 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
3169 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
3170 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
3171 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
3172 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
3173 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
3174 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
3175 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
3176 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
3177 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
3178 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
3179 (GRUB_PE32_DT_FUNCTION): Likewise.
3180 (GRUB_PE32_REL_I386_DIR32): Likewise.
3181 (GRUB_PE32_REL_I386_REL32): Likewise.
3182 (grub_pe32_symbol): New structure.
3183 (grub_pe32_reloc): Likewise.
3184
3185 * util/grub-pe2elf.c: New file.
3186
3187 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
3188 start symbol in non pc platform.
3189
3190 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
3191
3192 The following patches are from Christian Franke.
3193
3194 * include/grub/dl.h: Remove .previous, gas supports this only
3195 for ELF format.
3196
3197 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
3198 Remove .type, gas supports this only for ELF format.
3199
3200 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
3201 nullbytes in symbol table. This fixes an infinite loop if table is
3202 zero filled.
3203
3204 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
3205 TARGET_IMG_LDFLAGS and EXEEXT.
3206
3207 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
3208 TARGET_IMG_LDFLAGS_AC.
3209 (grub_CHECK_STACK_ARG_PROBE): New function.
3210
3211 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
3212
3213 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
3214
3215 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
3216 to set TARGET_IMG_LD* accordingly.
3217 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
3218 Add call to grub_CHECK_STACK_ARG_PROBE.
3219 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
3220
3221 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
3222
3223 * genmk.rb: Add EXEEXT to CLEANFILES.
3224
12ccdb75 32252008-07-23 Robert Millan <rmh@aybabtu.com>
3226
3227 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
3228 define the codes for arrows and lines used for the menu).
3229 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
3230 as well.
3231
3232 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
3233 fonts, because the latter are too slow.
3234
18eeaf04 32352008-07-21 Bean <bean123ch@gmail.com>
3236
3237 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
3238 a20. Run keyboard test last, as it will cause macbook to halt.
3239
b095e2ad 32402008-07-18 Pavel Roskin <proski@gnu.org>
3241
3242 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
3243 load foreign architecture modules correctly anyway. Keep
3244 support for loading host architecture modules, whether we
3245 compile them or not.
3246
737feb35 32472008-07-17 Pavel Roskin <proski@gnu.org>
3248
3f4ce737 3249 * configure.ac: Use -m32 or -m64 regardless of whether we had to
3250 change target_cpu. The compiler default can mismatch target_cpu
3251 in any case.
3252
4ad2d049 3253 * disk/efi/efidisk.c: Fix format warnings on x86_64.
3254 * kern/efi/efi.c: Likewise.
3255
f6130a12 3256 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
3257 target compiler is functional.
3258 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
3259 are set up.
3260
58393a2d 3261 * configure.ac: Default to efi platform for x86_64-apple. Allow
3262 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
3263 adjustments from the rest, only do them if target is not
3264 explicitly given. Merge other adjustments with the final sanity
3265 check. Remove an extraneous check for supported CPU. Be
3266 specific which CPU and which platform is not supported.
3267
737feb35 3268 * configure.ac: Default to pc platform for x86_64.
3269
546f966a 32702008-07-17 Robert Millan <rmh@aybabtu.com>
3271
3272 Partial LinuxBIOS -> Coreboot rename.
3273
3274 * conf/i386-linuxbios.rmk: Renamed to ...
3275 * conf/i386-coreboot.rmk: ... this.
3276 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
3277 * configure.ac: Accept "coreboot" as input platform (but maintain
3278 compatibility with "linuxbios").
3279 * include/grub/i386/linuxbios: Renamed to ...
3280 * include/grub/i386/coreboot: ... this.
3281
20011694 32822008-07-17 Bean <bean123ch@gmail.com>
3283
3284 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 3285 (appleldr_mod_SOURCE): New variable.
20011694 3286 (appleldr_mod_CFLAGS): Likewise.
3287 (appleldr_mod_LDFLAGS): Likewise.
3288 (pci_mod_SOURCES): Likewise.
3289 (pci_mod_CFLAGS): Likewise.
3290 (pci_mod_LDFLAGS): Likewise.
3291 (lspci_mod_SOURCES): Likewise.
3292 (lspci_mod_CFLAGS): Likewise.
3293 (lspci_mod_LDFLAGS): Likewise.
3294
3295 * conf/x86_64-efi.rmk: New file.
3296
3297 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
3298 macro.
3299 (grub_efidisk_write): Likewise.
3300
3301 * include/efi/api.h (efi_call_0): New macro.
3302 (efi_call_1): Likewise.
3303 (efi_call_2): Likewise.
3304 (efi_call_3): Likewise.
3305 (efi_call_4): Likewise.
3306 (efi_call_5): Likewise.
3307 (efi_call_6): Likewise.
3308
3309 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
3310 grub_rescue_cmd_chainloader.
3311
3312 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
3313 (grub_pe32_optional_header): Change some fields based on i386 or
3314 x86_64 platform.
3315 (GRUB_PE32_PE32_MAGIC): Likewise.
3316
3317 * include/grub/efi/uga_draw.h: New file.
3318
3319 * include/grub/elf.h (STN_ABS): New constant.
3320 (R_X86_64_NONE): Relocation constant for x86_64.
3321 (R_X86_64_64): Likewise.
3322 (R_X86_64_PC32): Likewise.
3323 (R_X86_64_GOT32): Likewise.
3324 (R_X86_64_PLT32): Likewise.
3325 (R_X86_64_COPY): Likewise.
3326 (R_X86_64_GLOB_DAT): Likewise.
3327 (R_X86_64_JUMP_SLOT): Likewise.
3328 (R_X86_64_RELATIVE): Likewise.
3329 (R_X86_64_GOTPCREL): Likewise.
3330 (R_X86_64_32): Likewise.
3331 (R_X86_64_32S): Likewise.
3332 (R_X86_64_16): Likewise.
3333 (R_X86_64_PC16): Likewise.
3334 (R_X86_64_8): Likewise.
3335 (R_X86_64_PC8): Likewise.
3336
3337 * include/grub/i386/efi/pci.h: New file.
3338
3339 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
3340 Change it value based on platform.
3341 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
3342 (GRUB_E820_RAM): Likewise.
3343 (GRUB_E820_RESERVED): Likewise.
3344 (GRUB_E820_ACPI): Likewise.
3345 (GRUB_E820_NVS): Likewise.
3346 (GRUB_E820_EXEC_CODE): Likewise.
3347 (GRUB_E820_MAX_ENTRY): Likewise.
3348 (grub_e820_mmap): New structure.
3349 (linux_kernel_header): Change the efi field according to different
3350 kernel version, also field from linux_kernel_header.
3351
3352 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
3353
3354 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
3355 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
3356 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
3357 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
3358 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
3359 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
3360 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
3361 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
3362 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
3363 (GRUB_PCI_ADDR_IO_MASK): Likewise.
3364
3365 * include/grub/x86_64/efi/kernel.h: New file.
3366
3367 * include/grub/x86_64/efi/loader.h: Likewise.
3368
3369 * include/grub/x86_64/efi/machine.h: Likewise.
3370
3371 * include/grub/x86_64/efi/pci.h: Likewise.
3372
3373 * include/grub/x86_64/efi/time.h: Likewise.
3374
3375 * include/grub/x86_64/linux.h: Likewise.
3376
3377 * include/grub/x86_64/setjmp.h: Likewise.
3378
3379 * include/grub/x86_64/time.h: Likewise.
3380
3381 * include/grub/x86_64/types.h: Likewise.
3382
3383 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
3384 GRUB_TARGET_SIZEOF_VOID_P.
3385
3386 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
3387 (grub_efi_locate_handle): Likewise.
3388 (grub_efi_open_protocol): Likewise.
3389 (grub_efi_set_text_mode): Likewise.
3390 (grub_efi_stall): Likewise.
3391 (grub_exit): Likewise.
3392 (grub_reboot): Likewise.
3393 (grub_halt): Likewise.
3394 (grub_efi_exit_boot_services): Likewise.
3395 (grub_get_rtc): Likewise.
3396
3397 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
3398 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
3399 (grub_efi_allocate_pages): Wrap efi calls.
3400 (grub_efi_free_pages): Wrap efi calls.
3401 (grub_efi_get_memory_map): Wrap efi calls.
3402
3403 * kern/x86_64/dl.c: New file.
3404
3405 * kern/x86_64/efi/callwrap.S: Likewise.
3406
3407 * kern/x86_64/efi/startup.S: Likewise.
3408
3409 * loader/efi/appleloader.c: Likewise.
3410
3411 * loader/efi/chainloader.c (cmdline): New variable.
3412 (grub_chainloader_unload): Wrap efi calls.
3413 (grub_chainloader_boot): Likewise.
3414 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
3415 command line.
3416
3417 * loader/efi/chainloader_normal.c (chainloader_command):
3418 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
3419 command line.
3420
3421 * loader/i386/efi/linux.c (allocate_pages): Change allocation
3422 method.
3423 (grub_e820_add_region): New function.
3424 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
3425 booting.
3426 (grub_find_video_card): New function.
3427 (grub_linux_setup_video): New function.
3428 (grub_rescue_cmd_linux): Probe for video information.
3429
3430 * normal/x86_64/setjmp.S: New file.
3431
3432 * term/efi/console.c (map_char): New function.
3433 (grub_console_putchar): Map unicode char.
3434 (grub_console_checkkey): Wrap efi calls.
3435 (grub_console_getkey): Likewise.
3436 (grub_console_getwh): Likewise.
3437 (grub_console_gotoxy): Likewise.
3438 (grub_console_cls): Likewise.
3439 (grub_console_setcolorstate): Likewise.
3440 (grub_console_setcursor): Likewise.
3441
3442 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
3443
59652a20 34442008-07-16 Pavel Roskin <proski@gnu.org>
3445
ef294055 3446 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
3447 format strings.
3448
59652a20 3449 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
3450 pointer, not an integer. This fixes a warning and prevents
3451 precision loss on 64-bit systems.
3452 (relocate_addresses): Remove unneeded cast.
3453
afc3b5d7 34542008-07-15 Pavel Roskin <proski@gnu.org>
3455
506b2b3e 3456 * kern/i386/ieee1275/init.c: Include grub/cache.h.
3457
62ead89c 3458 * term/ieee1275/ofconsole.c: Disable code unused on i386.
3459
c4cd51d7 3460 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
3461 Fix comparison between signed and unsigned.
3462
0d3d8f28 3463 * include/grub/i386/ieee1275/console.h: Declare
3464 grub_console_init() and grub_console_fini().
3465
8804b286 3466 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
3467 It's empty and unused.
3468
ee01cf35 3469 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
3470 beginning to avoid warnings with some compilers.
3471
afc3b5d7 3472 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
3473 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
3474
e4e8eaa5 34752008-07-14 Pavel Roskin <proski@gnu.org>
3476
407aceb4 3477 * kern/env.c (grub_register_variable_hook): Don't copy empty
3478 string, it leaks memory. Pass "" to grub_env_set(), it should
3479 handle constant strings.
3480
e4e8eaa5 3481 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
3482 * commands/cmp.c (grub_cmd_cmp): Likewise.
3483 * kern/dl.c (grub_dl_flush_cache): Likewise.
3484 (grub_dl_load_core): Likewise.
3485 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
3486 (grub_elf64_load_phdrs): Likewise.
3487
d4e2dad3 34882008-07-13 Pavel Roskin <proski@gnu.org>
3489
3490 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
3491 between signed and unsigned.
3492 (LzmaEnc_Finish): Fix warning about an unused parameter.
3493
aa24b516 34942008-07-13 Bean <bean123ch@gmail.com>
3495
3496 * Makefile.in (enable_lzo): New rule.
3497
3498 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
3499
3500 * configure.ac (ENABLE_LZO): New option --enable-lzo.
3501
3502 * boot/i386/pc/lnxboot.S: #include <config.h>.
3503
3504 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 3505 its value according to the compression algorithm used, lzo or lzma.
aa24b516 3506
3507 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
3508 compression algorithm according to configure macro.
3509
3510 * kern/i386/pc/startup.S (codestart): Likewise.
3511
3512 * kern/i386/pc/lzma_decode.S: New file.
3513
3514 * include/grub/lib/LzFind.h: Likewise.
3515
3516 * include/grub/lib/LzHash.h: Likewise.
3517
3518 * include/grub/lib/LzmaDec.h: Likewise.
3519
3520 * include/grub/lib/LzmaEnc.h: Likewise.
3521
3522 * include/grub/lib/LzmaTypes.h: Likewise.
3523
3524 * lib/LzFind.c: Likewise.
3525
3526 * lib/LzmaDec.c: Likewise.
3527
3528 * lib/LzmaEnc.c: Likewise.
3529
4ae821ac 35302008-07-13 Bean <bean123ch@gmail.com>
3531
3532 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
3533 (grub_ext4_extent_header): New structure.
3534 (grub_ext4_extent): Likewise.
3535 (grub_ext4_extent_idx): Likewise.
3536 (grub_ext4_find_leaf): New function.
3537 (grub_ext2_read_block): Handle extents.
3538
9a745147 35392008-07-12 Robert Millan <rmh@aybabtu.com>
3540
3541 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
3542
d49a4cf6 35432008-07-11 Robert Millan <rmh@aybabtu.com>
3544
3545 * util/grub.d/40_custom.in: New file. Example on how to add custom
3546 entries to /etc/grub.d.
3547 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
3548 40_custom (implicitly, by merging all the grub.d rules).
3549
947414b4 35502008-07-11 Pavel Roskin <proski@gnu.org>
3551
0059cf6f 3552 * commands/read.c (grub_getline): Fix invalid memory access.
3553 Don't add newline to the variable value.
3554
947414b4 3555 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
3556 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
3557 (serial_hw_get_port): Check validity of the port number.
3558 (grub_cmd_serial): Check return value of serial_hw_get_port().
3559
62a02d00 35602008-07-07 Pavel Roskin <proski@gnu.org>
3561
3562 * boot/i386/pc/diskboot.S (notification_string): Replace
3563 "Loading kernel" with just "loading". This is shorter, less
3564 confusing and saves a few bytes for possible future changes.
3565
3e5581b0 35662008-07-05 Pavel Roskin <proski@gnu.org>
3567
ea387a48 3568 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
3569 size for ATAPI devices, they are undefined. Output sector
3570 number in decimal form.
3571
3e5581b0 3572 * disk/ata.c: Use named constants for status bits.
3573
fdecb8fd 35742008-07-04 Pavel Roskin <proski@gnu.org>
3575
bcd35b90 3576 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
3577 grub_addr_t before casting it to the void pointer to fix a
3578 warning. Non-addressable regions are discarded earlier.
3579 (grub_arch_modules_addr): Cast _end to grub_addr_t.
3580 * kern/i386/linuxbios/table.c: Include grub/misc.h.
3581 (check_signature): Don't shadow table_header.
3582 (grub_linuxbios_table_iterate): Cast numeric constants to
3583 grub_linuxbios_table_header_t.
3584 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
3585 grub_stop().
3586
af58ab3d 3587 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
3588 prevent warnings.
3589
1759aa57 3590 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
3591 pointer, which can cause warnings. Support 64-bit addresses.
3592
fdecb8fd 3593 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
3594 of sizeof(long). This fixes PowerPC image generation on x86_64.
3595
8516d2a8 35962008-07-04 Robert Millan <rmh@aybabtu.com>
3597
3598 This fixes a performance issue when pc & gpt partmap iterators
3599 didn't abort iteration even after our hook found what it was
fe987087 3600 looking for (often causing expensive probes of non-existent drives).
8516d2a8 3601
3602 Some callers relied on previous buggy behaviour, since they would
34c44600 3603 raise an error when their own hooks caused early abortion of its
8516d2a8 3604 iteration.
3605
3606 * kern/device.c (grub_device_open): Improve error message.
3607 * disk/lvm.c (grub_lvm_open): Likewise.
3608 * disk/raid.c (grub_raid_open): Likewise.
3609
3610 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
3611 when hook requests it, independently of grub_errno.
3612 (pc_partition_map_probe): Do not fail when find_func() caused
3613 early abortion of pc_partition_map_iterate().
3614
3615 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
3616 when hook requests it, independently of grub_errno.
3617 (gpt_partition_map_probe): Do not fail when find_func() caused
3618 early abortion of gpt_partition_map_iterate().
3619
3620 * kern/partition.c (grub_partition_iterate): Abort parent iteration
3621 when hook requests it, independently of grub_errno. Do not fail when
3622 part_map_iterate_hook() caused early abortion of p->iterate().
3623
3624 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
3625 when grub_partition_iterate() returned with non-zero.
3626
277d0de9 36272008-07-03 Pavel Roskin <proski@gnu.org>
3628
3629 * disk/ata.c (grub_ata_pio_write): Check status before writing,
3630 like we do in grub_ata_pio_read().
3631 (grub_ata_readwrite): Always write individual sectors. Fix the
3632 sector count for the remainder.
3633 (grub_ata_write): Enable writing to ATA devices. Correctly
3634 report error for ATAPI devices.
3635
d4c9b428 36362008-07-02 Pavel Roskin <proski@gnu.org>
3637
e43fc690 3638 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
3639 warning.
3640
f707af42 3641 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
3642 for every read sector, we already increment it for the whole
3643 batch. This fixes reading more than 256 sectors at once.
3644
11e16b15 3645 * util/grub-editenv.c (cmd_info): Cast argument to long
3646 explicitly. ptrdiff_t reduces to int on i386.
3647
cbabfdd4 3648 * util/grub-editenv.c (main): Be specific which parameter is
3649 missing.
3650
b8fbce0a 3651 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
3652 (memdisk): Make memdisk_orig_addr a pointer.
3653
c9c8e606 3654 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
3655 for file offsets, use grub_off_t instead. Fix printf format
3656 warnings.
3657
ca62e598 3658 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
3659 there. Real unexpected warnings should not drown in the noise
3660 about known problems.
3661
ce8d1766 3662 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
3663 grub_disk_addr_t for memory addresses.
3664
00c7a56a 3665 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
3666 explicitly to fix a warning.
3667
08d3ef09 3668 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
3669
cb71ba20 3670 * Makefile.in (MODULE_LDFLAGS): New variable.
3671 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
3672 the linker accepts --build-id=none.
3673 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
3674 MODULE_LDFLAGS.
3675 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
3676
d4c9b428 3677 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
3678 those in Linux XFS code. Provide a way to access 64-bit parent
3679 inode.
3680 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
3681 the end of struct grub_xfs_dir_header.
3682
d4156eee 36832008-07-02 Bean <bean123ch@gmail.com>
3684
3685 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
3686 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3687 and GRUB_IEEE1275_FLAG_NO_ANSI.
3688
3689 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
3690 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3691 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
3692
3693 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
3694 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
3695
3696 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
3697 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
3698
3699 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
3700 esc sequence on non ANSI terminal.
3701 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
3702
3703 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
3704 beginning of file.
3705
2270f77b 37062008-07-02 Bean <bean123ch@gmail.com>
3707
3708 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
3709 (grub_editenv_SOURCES): New variable.
3710 (pkglib_MODULES): Add loadenv.mod.
3711 (loadenv_mod_SOURCES): New variable.
3712 (loadenv_mod_CFLAGS): Likewise.
3713 (loadenv_mod_LDFLAGS): Likewise.
3714
3715 * include/grub/envblk.h: New file.
3716
3717 * util/envblk.c: New file.
3718
3719 * util/grub-editenv.c: New file.
3720
3721 * commands/loadenv.c: New file.
3722
0e9e51ec 37232008-07-01 Pavel Roskin <proski@gnu.org>
3724
d89b7634 3725 * include/multiboot2.h (struct multiboot_tag_module): Use char,
3726 not unsigned char. This fixes warnings and is consistent with
3727 other tags.
3728
bf1835b1 3729 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
3730
8222a04b 3731 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
3732
6a42d99d 3733 * term/tparm.c (analyze): Always set *popcount.
3734
10b159d1 3735 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
3736 cast to fix a warning.
3737
b8789f6c 3738 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
3739 cast to suppress a warning.
3740
29d7e38a 3741 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
3742 grub_fshelp_read_file() expects.
3743
f341f669 3744 * fs/fat.c: Fix UUID calculation on big-endian systems. We
3745 write uuid as a 32-bit value in CPU byte order, so declare and
3746 use it as such.
3747
0e9e51ec 3748 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
3749 long if the format specifier expects it.
3750 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
3751 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3752 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
3753 long to fix a warning.
3754 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
3755 grub_dprintf() arguments to fix warnings.
3756
3aefa857 37572008-06-30 Pavel Roskin <proski@gnu.org>
3758
56c7668b 3759 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
3760 install_bsd_part immediately before core.img is embedded or
3761 modified on disk. This fixes core.img verification if core.img
3762 cannot be embedded.
3763
3aefa857 3764 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
3765 core_path to calculate the blocklist.
3766 Patch from Javier Martín <lordhabbit@gmail.com>
3767
5444088d 37682008-06-29 Robert Millan <rmh@aybabtu.com>
3769
3770 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
3771 block to disk block.
3772 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
3773 Patch from Niels Böhm <bitbucket@arcor.de>
3774
674835c8 37752008-06-29 Robert Millan <rmh@aybabtu.com>
3776
3777 * util/update-grub_lib.in (font_path): Search for fonts in
3778 /boot/grub first, which is more likely to be readable (we aren't
3779 deciding where fonts live, just looking for them).
3780
f527dbc8 37812008-06-26 Pavel Roskin <proski@gnu.org>
3782
6c2d8df6 3783 * util/biosdisk.c (read_device_map): Don't leave dead map
3784 entries for devices failing stat() check.
3785
f527dbc8 3786 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
3787 core_path_dev for the core.img path on the target device.
3788
aebe3d13 37892008-06-26 Robert Millan <rmh@aybabtu.com>
3790
3791 * disk/fs_uuid.c: New file.
3792 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
3793 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
3794 (fs_uuid_mod_LDFLAGS): New variables.
3795 * include/grub/disk.h (grub_disk_dev_id): Add
3796 `GRUB_DISK_DEVICE_UUID_ID'.
3797 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
3798 implement iterate().
3799
37aaf354 38002008-06-26 Robert Millan <rmh@aybabtu.com>
3801
3802 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
3803 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
3804 Linux image includes no initrd.
3805
25ff262a 38062008-06-21 Javier Martín <lordhabbit@gmail.com>
3807
3808 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
3809 call to resolve the core image location that effectively appended the
3810 name twice.
3811
76a2bd44 38122008-06-21 Robert Millan <rmh@aybabtu.com>
3813
3814 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
3815 call from here ...
3816
3817 * util/grub.d/10_hurd.in: ... to here ...
3818 * util/grub.d/10_linux.in: ... and here.
3819
650e1c79 38202008-06-19 Robert Millan <rmh@aybabtu.com>
3821
fe987087 3822 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 3823 after it has been set by grub_machine_set_prefix().
3824
6ce63911 38252008-06-19 Robert Millan <rmh@aybabtu.com>
3826
3827 * commands/search.c (search_label, search_fs_uuid, search_file): Print
3828 search result when not saving to variable, not the other way around.
3829 When saving to variable, abort iteration as soon as a match is found.
3830
73940cec 38312008-06-19 Robert Millan <rmh@aybabtu.com>
3832
3833 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
3834 check for partition that provides /boot/grub. Its logic is flawed,
3835 as it prevents prepare_grub_to_access_device() from being called
3836 multiple times.
3837
3c62a39d 38382008-06-19 Robert Millan <rmh@aybabtu.com>
3839
3840 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
3841 "insmod" command directly when abstraction modules are needed,
fe987087 3842 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 3843 since it had already been processed).
3844
47395a42 38452008-06-19 Pavel Roskin <proski@gnu.org>
3846
3847 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
3848 changed. This is needed in case GRUB_LIBDIR changes.
3849 * conf/i386-ieee1275.rmk: Likewise.
3850 * conf/i386-linuxbios.rmk: Likewise.
3851 * conf/i386-pc.rmk: Likewise.
3852 * conf/powerpc-ieee1275.rmk: Likewise.
3853
a145ac2d 38542008-06-18 Pavel Roskin <proski@gnu.org>
3855
3856 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3857 kernel_elf_symlist.c to symlist.c for consistency with other
3858 architectures. Update all users.
3859 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3860
7847c51e 38612008-06-18 Robert Millan <rmh@aybabtu.com>
3862
3863 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3864 it in prefix.
3865
3866 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
3867 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
3868 a RAID device, run setup() for all members independently on whether
3869 LVM abstraction is being used.
3870 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3871 If grub-mkimage has set `*install_dos_part == -2', don't override this
3872 value.
3873 Perform *install_dos_part adjustments independently on whether
3874 we're embedding or not.
3875 Clarify error message when image is too big for embedding.
3876 Remove duplicate *install_dos_part stanza.
3877
b23e5644 38782008-06-17 Robert Millan <rmh@aybabtu.com>
3879
3880 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3881 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3882 variables.
3883 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3884 values in grub_ofconsole_normal_color and
3885 grub_ofconsole_highlight_color (they're not directly related to
3886 background and foreground).
3887 (grub_ofconsole_setcolorstate): Extract background and foreground
3888 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3889
0aac2f79 38902008-06-17 Robert Millan <rmh@aybabtu.com>
3891
3892 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3893 /boot/grub for the check in last commit, not /boot (they could be
3894 different partitions).
3895
3cca7ef3 38962008-06-16 Robert Millan <rmh@aybabtu.com>
3897
3898 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3899 asked to setup access for the same partition that provides /boot,
3900 don't bother using UUIDs since our root already has the value we
3901 want.
3902
347396d8 39032008-06-16 Robert Millan <rmh@aybabtu.com>
3904
3905 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3906 I2O devices.
3907 Patch from Sven Mueller <sven@debian.org>.
3908
991477f8 39092008-06-16 Robert Millan <rmh@aybabtu.com>
3910
3911 * util/update-grub.in: Check for $EUID instead of $UID.
3912 Reported by Vincent Zweije.
3913
d31a32a1 39142008-06-16 Bean <bean123ch@gmail.com>
3915
fe987087 3916 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 3917 (grub_ext2_read_block): Likewise.
3918 (grub_ext2_read_inode): Likewise.
3919 (grub_ext2_mount): Likewise.
3920 (grub_ext2_close): Likewise.
3921 (grub_ext3_get_journal): Removed.
3922
fe987087 3923 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 3924 (grub_reiserfs_read_symlink): Likewise.
3925 (grub_reiserfs_mount): Likewise.
3926 (grub_reiserfs_open): Likewise.
3927 (grub_reiserfs_read): Likewise.
3928 (grub_reiserfs_close): Likewise.
3929 (grub_reiserfs_get_journal): Removed.
3930
3931 * fs/fshelp.c (grub_fshelp_read): Removed.
3932 (grub_fshelp_map_block): Likewise.
3933
3934 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3935 (grub_fshelp_journal): Likewise.
3936 (grub_fshelp_read): Likewise.
3937 (grub_fshelp_map_block): Likewise.
3938
3540a760 39392008-06-16 Pavel Roskin <proski@gnu.org>
3940
3941 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3942 floating point anymore.
3943 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3944
95614c84 39452008-06-15 Pavel Roskin <proski@gnu.org>
3946
3947 * commands/ls.c (grub_ls_list_files): Use integer calculations
3948 for human readable format, avoid floating point use.
3949 * kern/misc.c (grub_ftoa): Remove.
3950 (grub_vsprintf): Remove floating point support.
3951
50465dd6 39522008-06-15 Robert Millan <rmh@aybabtu.com>
3953
fe6b695a 3954 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 3955 devices.
3956 Reported by Max Vozeler.
3957
a9207284 39582008-06-15 Robert Millan <rmh@aybabtu.com>
3959
3960 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3961 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3962 skipped later.
3963 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3964 the beginning of the prefix.
3965
3966 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3967 It is assumed that if we have a memdisk, grub-mkimage has set
3968 grub_prefix to include the "(memdisk)" drive in it.
3969
a7cbd45a 39702008-06-15 Robert Millan <rmh@aybabtu.com>
3971
3972 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3973 Initialize keyboard controller after registering the terminal, so that
3974 grub_printf() can be called from grub_keyboard_controller_init().
3975
21cf716a 39762008-06-15 Robert Millan <rmh@aybabtu.com>
3977
3978 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3979 extent-btree which is written as big endian on disk.
3980 Reported by Alain Greppin <al@chilibi.org>.
3981
23a64d8e 39822008-06-14 Robert Millan <rmh@aybabtu.com>
3983
3984 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3985 * util/i386/pc/grub-install.in (modules): Likewise.
3986
d687651c 39872008-06-13 Pavel Roskin <proski@gnu.org>
3988
3989 * commands/ls.c (grub_ls_list_files): Fix format warnings.
3990
dfe9ddd4 39912008-06-13 Bean <bean123ch@gmail.com>
3992
3993 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3994
3995 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3996
3997 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3998 to indicate sparse block.
3999
16ae7781 40002008-06-12 Pavel Roskin <proski@gnu.org>
4001
e6d1a308 4002 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
4003 number, grub_fshelp_read() does it for us.
4004
16ae7781 4005 * fs/fshelp.c (grub_fshelp_read): New function. Implement
4006 linear disk read with journal translation.
4007 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
4008 * include/grub/fshelp.h: Declare grub_fshelp_read().
4009
40fd3a2b 40102008-06-09 Pavel Roskin <proski@gnu.org>
4011
4012 * fs/minix.c (grub_minix_mount): Handle error reading
4013 superblock.
4014
f5679726 40152008-06-08 Robert Millan <rmh@aybabtu.com>
4016
4017 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
4018 don't append the RAID prefix afterwards.
4019 Reported by Clint Adams.
4020
ce525529 40212008-06-08 Robert Millan <rmh@aybabtu.com>
4022
4023 Based on description from Pavel:
4024 * kern/disk.c (grub_disk_check_range): Rename to ...
4025 (grub_disk_adjust_range): ... this. Add a comment explaining the
4026 tasks performed by this function.
4027
ad4936a0 40282008-06-08 Robert Millan <rmh@aybabtu.com>
4029
4030 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
4031 `num_serial' (for consistency with other variables).
4032 (struct grub_ntfs_data): Add `uuid' member.
4033 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
4034 (grub_ntfs_uuid): New function.
4035 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
4036
dc20b0f9 40372008-06-07 Pavel Roskin <proski@gnu.org>
4038
4039 * util/biosdisk.c (open_device): Revert last change to the
4040 function, it broke installation. The sector needs to be
4041 different dependent on which device is opened.
4042
c5e3cfba 40432008-06-06 Robert Millan <rmh@aybabtu.com>
4044
4045 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
4046 rest of GRUB, and breakage doesn't happen if its value were modified.
4047
4048 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
4049 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
4050 a constant (same value).
4051 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
4052 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
4053
26a1f8c4 40542008-06-06 Robert Millan <rmh@aybabtu.com>
4055
4056 * util/biosdisk.c (open_device): Do not modify sector offset when
4057 accessing a partition. kern/disk.c already handles this for us.
4058
25d6b327 40592008-06-06 Robert Millan <rmh@aybabtu.com>
4060
4061 * util/grub-emu.c (grub_machine_init): Move code in this function from
4062 here ...
4063 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
4064 segfault in case grub_printf() is called).
4065
4066 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
4067 grub_probe. Update all users not to explicitly add it again.
4068 (grub_device): New variable; contains corresponding device for grubdir.
4069 (fs_module, partmap_module, devabstraction_module): Pass
4070 `--device ${grub_device}' to grub_probe to avoid traversing /dev
4071 every time.
4072
9ece62fb 40732008-06-05 Robert Millan <rmh@aybabtu.com>
4074
4075 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
4076 is found, print it (same layout as with labels).
4077
1ad36d37 40782008-06-04 Robert Millan <rmh@aybabtu.com>
4079
4080 * util/biosdisk.c (get_drive): Rename to ...
4081 (find_grub_drive): ... this. Update all users.
4082
4083 (get_os_disk): Rename to ...
4084 (convert_system_partition_to_system_disk): ... this. Update all users.
4085
4086 (find_drive): Rename to ...
4087 (find_system_device): ... this. Update all users.
4088
e6a30859 40892008-06-04 Robert Millan <rmh@aybabtu.com>
4090
4091 * util/biosdisk.c (get_os_disk): Handle IDA devices.
4092 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4093 (make_device_map): Likewise.
4094
00c108a4 40952008-06-01 Robert Millan <rmh@aybabtu.com>
4096
4097 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
4098 before dereferencing it.
4099
4100 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
4101 union with fat12/fat16-specific ones. Add some new fields, including
4102 `num_serial' for both versions.
4103 (struct grub_fat_data): Add `uuid' member.
4104 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
4105 names. Initialize `data->uuid' using `num_serial'.
4106 (grub_fat_uuid): New function.
4107 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
4108
4109 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
4110 (grub_reiserfs_uuid): New function.
4111 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
4112 member.
4113
4114 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
4115 (grub_xfs_uuid): New function.
4116 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
4117
1385c5bb 41182008-06-01 Robert Millan <rmh@aybabtu.com>
4119
4120 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
4121 code that is backward compatible with pre-uuid search command.
4122
c682dfd7 41232008-05-31 Robert Millan <rmh@aybabtu.com>
4124
4125 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
4126 floppies after everything else, to ensure floppy drive isn't accessed
4127 unnecessarily (patch from Bean).
4128
b7db5d47 41292008-05-31 Robert Millan <rmh@aybabtu.com>
4130
4131 * commands/search.c (search_label, search_fs_uuid, search_file): Do
4132 not print device names when we were asked to set a variable.
4133
6e037aa9 41342008-05-31 Robert Millan <rmh@aybabtu.com>
4135
4136 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
4137 using "cursor-on" and "cursor-off" commands (understood at least by
4138 the Open Firmware flavour on OLPC).
4139
41305bc8 41402008-05-31 Michael Gorven <michael@gorven.za.net>
4141
4142 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
4143 on and off sequences.
4144
69ba137e 41452008-05-31 Robert Millan <rmh@aybabtu.com>
4146
4147 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
4148 * util/update-grub.in: Likewise.
4149
520ae21b 41502008-05-30 Pavel Roskin <proski@gnu.org>
4151
4152 * util/biosdisk.c (linux_find_partition): Simplify logic and
4153 make the code more universal. Keep special processing for
4154 devfs, but use a simple rule for all other devices. If the
4155 device ends with a number, append 'p' and the partition number.
4156 Otherwise, append only the partition number.
4157
5786569b 41582008-05-30 Robert Millan <rmh@aybabtu.com>
4159
4160 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
4161 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
4162 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
4163 the `root' parameter to Linux.
4164
51500452 41652008-05-30 Robert Millan <rmh@aybabtu.com>
4166
4167 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
4168 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
4169 --fs_uuid with --fs-uuid.
4170 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
4171 all filesystems support them).
4172
811d3878 41732008-05-30 Robert Millan <rmh@aybabtu.com>
4174
4175 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 4176 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 4177
cab63c95 41782008-05-30 Robert Millan <rmh@aybabtu.com>
4179
4180 * util/grub.d/00_header.in: Remove obsolete comment referencing
4181 convert_system_path_to_grub_path().
4182 * util/update-grub.in: Likewise.
4183 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
4184 (convert_system_path_to_grub_path): Add a warning message explaining
4185 that this function is deprecated. Rely on is_path_readable_by_grub()
4186 for the readability checks.
4187 (font_path): Use is_path_readable_by_grub() for the readability
4188 check rather than convert_system_path_to_grub_path().
4189
972e2f7a 41902008-05-30 Robert Millan <rmh@aybabtu.com>
4191
4192 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
4193 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
4194 converting it first.
4195 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
4196 grub.cfg for access to font file, and afterwards call it again to set
4197 the root device.
4198
62191274 41992008-05-30 Robert Millan <rmh@aybabtu.com>
4200
4201 * commands/search.c (options): Add --fs_uuid option.
4202 (search_fs_uuid): New function.
4203 (grub_cmd_search): Fix --set argument passing.
4204 Use search_fs_uuid() when requested via --fs_uuid.
4205 (grub_search_init): Update help message.
4206 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
4207 and redeclare it as an array of 16-bit words.
4208 (grub_ext2_uuid): New function.
4209 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
4210 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
4211 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
4212 (GRUB_DEVICE_BOOT_UUID): New variables.
4213 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
4214 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
4215 whenever possible.
4216 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
4217 just assume `root' variable has the right value.
4218 * util/grub.d/10_linux.in: Likewise.
4219 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
4220 via PRINT_FS_UUID.
4221 (main): Recognise `-t fs_uuid' argument.
4222
01b73ec8 42232008-05-30 Robert Millan <rmh@aybabtu.com>
4224
4225 * util/biosdisk.c (map): Redefine structure to hold information
4226 about GRUB drive name.
fe6b695a 4227 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 4228 drive names.
4229 (call_hook): Remove.
4230 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
4231 member. Assume drive has partitions.
4232 (grub_util_biosdisk_open): Access device names via `.device' struct
4233 member.
4234 (open_device): Likewise.
4235 (find_drive): Likewise.
4236 (read_device_map): Adjust map[] usage to match the new struct
4237 definition. Don't check for duplicates (still possible, but not cheap
4238 anymore).
4239 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
4240 (make_device_name): Remove assumption of BIOS-like drive names.
4241
22f16596 42422008-05-30 Pavel Roskin <proski@gnu.org>
4243
4244 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
4245 compiling execute.c doesn't need grub_script.tab.h anymore.
4246 (normal/command.c_DEPENDENCIES): Likewise.
4247 (normal/function.c_DEPENDENCIES): Likewise.
4248 * conf/i386-ieee1275.rmk: Likewise.
4249 * conf/i386-linuxbios.rmk: Likewise.
4250 * conf/i386-pc.rmk: Likewise.
4251 * conf/powerpc-ieee1275.rmk: Likewise.
4252 * conf/sparc64-ieee1275.rmk: Likewise.
4253
528ad8f2 42542008-05-29 Pavel Roskin <proski@gnu.org>
4255
d1dff95d 4256 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
4257 when scanning metadata for volume group name.
4258
528ad8f2 4259 * include/grub/script.h: Don't include grub_script.tab.h. It's
4260 a generated file, which may only be included from the files with
4261 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
4262 use union YYSTYPE, as the later allows forward declaration.
4263 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
4264
47248e08 42652008-05-29 Robert Millan <rmh@aybabtu.com>
4266
4267 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
4268 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
4269 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
4270 (grub_console_checkkey): Add grub_dprintf() call to report unknown
4271 scan codes.
4272
ee632529 42732008-05-29 Robert Millan <rmh@aybabtu.com>
4274
4275 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
4276 control key combinations.
4277
eee96e08 42782008-05-29 Robert Millan <rmh@aybabtu.com>
4279
4280 * util/powerpc/ieee1275/grub-install.in: Move from here ...
4281 * util/ieee1275/grub-install.in: ... to here.
4282 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
4283 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
4284 (grub_install_SOURCES): Likewise.
4285
da9a6a94 42862008-05-29 Robert Millan <rmh@aybabtu.com>
4287
4288 * fs/affs.c: Update copyright year.
4289 * fs/ext2.c: Likewise.
4290 * fs/fshelp.c: Likewise.
4291 * fs/hfsplus.c: Likewise.
4292 * fs/ntfs.c: Likewise.
4293 * fs/xfs.c: Likewise.
4294 * include/grub/fshelp.h: Likewise.
4295 * util/grub-mkdevicemap.c: Likewise.
4296
12e65f3a 42972008-05-28 Robert Millan <rmh@aybabtu.com>
4298
4299 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
4300 might need to be fatfs to support some firmware implementations
4301 (e.g. OFW or EFI).
4302
23023641 43032008-05-28 Robert Millan <rmh@aybabtu.com>
4304
4305 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
4306 devices.
4307 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4308 (make_device_map): Likewise.
4309
887d2619 43102008-05-20 Bean <bean123ch@gmail.com>
4311
4312 * fs/fshelp.c (grub_fshelp_map_block): New function.
4313 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
4314 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
4315
4316 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
4317 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
4318 (grub_fshelp_journal): New structure.
4319 (grub_fshelp_map_block): New function prototype.
4320 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
4321 (grub_fshelp_map_block): Likewise.
4322
4323 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
4324 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
4325 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
4326 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
4327 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
4328 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
4329 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
4330 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
4331 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
4332 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
4333 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
4334 (grub_ext2_sblock): New members for journal support.
4335 (grub_ext3_journal_header): New structure.
4336 (grub_ext3_journal_revoke_header): Likewise.
4337 (grub_ext3_journal_block_tag): Likewise.
4338 (grub_ext3_journal_sblock): Likewise.
4339 (grub_fshelp_node): New members logfile and journal.
4340 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
4341 grub_fshelp_map_block to get real block number.
4342 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
4343 number.
4344 (grub_ext2_read_inode): Likewise.
4345 (grub_ext3_get_journal): New function.
4346 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
4347 (grub_ext2_close): Release memory used by journal.
4348
4349 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
4350 (REISERFS_MAGIC_DESC_BLOCK): New macro.
4351 (grub_reiserfs_transaction_header): Renamed to
4352 grub_reiserfs_description_block, replace field data with real_blocks.
4353 (grub_reiserfs_commit_block): New structure.
4354 (grub_reiserfs_data): New member journal.
4355 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
4356 number.
4357 (grub_reiserfs_read_symlink): Likewise.
4358 (grub_reiserfs_iterate_dir): Likewise.
4359 (grub_reiserfs_open): Likewise.
4360 (grub_reiserfs_read): Likewise.
4361 (grub_reiserfs_get_journal): New function.
4362 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
4363 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
4364 using grub_reiserfs_get_journal.
4365 (grub_reiserfs_close): Release memory used by journal.
4366
4367 * fs/affs.c (grub_affs_read_block): Change block type to
4368 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
4369
4370 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
4371
4372 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
4373
4374 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
4375
4376 * fs/udf.c (grub_udf_read_block): Change block type to
4377 grub_disk_addr_t. Use type cast to avoid warning.
4378
4379 * fs/xfs.c (grub_xfs_read_block): Likewise.
4380
b7c6bed5 43812008-05-16 Christian Franke <franke@computer.org>
4382
4383 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
4384 to ensure that break with ESC will always work.
4385 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
4386 Remove ESC from keyboard queue.
4387
eedf167f 43882008-05-16 Christian Franke <franke@computer.org>
4389
4390 * util/biosdisk.c: [__CYGWIN__] Add includes.
4391 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
4392 (get_os_disk): Move variable declarations to OS specific
4393 parts to avoid warning.
4394 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
4395 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
4396 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
4397 Cygwin.
4398 * util/getroot.c: [__CYGWIN__] Add includes.
4399 (strip_extra_slashes): Fix "/" case.
4400 [__CYGWIN__] (get_win32_path): New function.
4401 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
4402 [__CYGWIN__] (find_root_device): Disable.
4403 [__CYGWIN__] (get_bootsec_serial): New function.
4404 [__CYGWIN__] (find_cygwin_root_device): Likewise.
4405 [__linux__] (grub_guess_root_device): Add early returns to simplify
4406 structure.
4407 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
4408 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
4409 check for Linux only.
4410
a079699e 44112008-05-15 Bean <bean123ch@gmail.com>
4412
4413 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
4414 keyboard hang problem in apple's intel mac.
4415
1cf4059a 44162008-05-09 Robert Millan <rmh@aybabtu.com>
4417
4418 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
4419 devices.
4420 * util/grub-mkdevicemap.c (get_virtio_disk_name)
4421 (make_device_map): Likewise.
4422 Reported by Aurelien Jarno <aurel32@debian.org>
4423
ed759390 44242008-05-07 Ian Campbell <ijc@hellion.org.uk>
4425
4426 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
4427 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
4428 (make_device_map): Output entries for xvd type disks.
4429
b56c4eaa 44302008-05-07 Robert Millan <rmh@aybabtu.com>
4431
4432 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
4433 devices.
4434 * util/grub-mkdevicemap.c (get_cciss_disk_name)
4435 (make_device_map): Likewise.
4436 Reported by Roland Dreier <rdreier@cisco.com>
4437
7f8866ed 44382008-05-07 Robert Millan <rmh@aybabtu.com>
4439
4440 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
4441 grub_strstr() call. Correct a few mistakes in failure path handling.
4442
b0346e0f 44432008-05-06 Robert Millan <rmh@aybabtu.com>
4444
4445 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4446 Do not print a trailing slash (therefore, the root directory is an
4447 empty string).
4448 (convert_system_path_to_grub_path): Do not remove trailing slash
4449 from make_system_path_relative_to_its_root() output.
4450
4451 * util/i386/pc/grub-install.in: Add trailing slash to output from
4452 make_system_path_relative_to_its_root().
4453
6cf12cbd 44542008-05-06 Robert Millan <rmh@aybabtu.com>
4455
4456 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
4457 ensures that output lines aren't intermangled with those sent to
4458 stderr (via grub_util_info()).
4459 * util/grub-probe.c (grub_refresh): Likewise.
4460 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
4461
0fbb3117 44622008-05-05 Christian Franke <franke@computer.org>
4463
4464 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
4465 Add Cygwin device names.
4466 (get_ide_disk_name) [__CYGWIN__]: Likewise.
4467 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
4468 (check_device): Return error instead of success on empty name.
4469 (make_device_map): Move label inside linux specific code to
4470 prevent compiler warning.
4471
8124cdb7 44722008-04-30 Robert Millan <rmh@aybabtu.com>
4473
4474 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
4475 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
4476 first boot option.
4477 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
4478
094c01d0 44792008-04-29 Robert Millan <rmh@aybabtu.com>
4480
4481 * docs/grub.cfg: New file (example GRUB configuration).
4482
f4b1fc02 44832008-04-26 Robert Millan <rmh@aybabtu.com>
4484
329ce2a5 4485 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
4486 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
4487 and `disk/ieee1275/nand.c'.
f4b1fc02 4488
25f16ec1 44892008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 4490
25f16ec1 4491 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
4492 i386-linuxbios.
4493
4494 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
4495 change the buffer size to 4096 for cdrom device.
4496
4497 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
4498 and nand.mod.
4499 (_linux_mod_SOURCES): New variable.
4500 (_linux_mod_CFLAGS): Likewise.
4501 (_linux_mod_LDFLAGS): Likewise.
4502 (linux_mod_SOURCES): Likewise.
4503 (linux_mod_CFLAGS): Likewise.
4504 (linux_mod_LDFLAGS): Likewise.
4505 (nand_mod_SOURCES): Likewise.
4506 (nand_mod_CFLAGS): Likewise.
4507 (nand_mod_LDFLAGS): Likewise.
4508
4509 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
4510 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
4511 type property. (nand device in olpc don't have this property)
4512
4513 * include/grub/disk.h (grub_disk_dev_id): New macro
4514 GRUB_DISK_DEVICE_NAND_ID.
4515
4516 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
4517 function prototype.
4518 (grub_rescue_cmd_initrd): Likewise.
4519
4520 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
4521 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
4522 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 4523
25f16ec1 4524 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
4525 GRUB_MACHINE_IEEE1275 is defined.
4526
4527 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
4528 Use NESTED_FUNC_ATTR attribute on the hook parameter.
4529
4530 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
4531 on nested function heap_init.
4532 (grub_upper_mem): New variable for i386-ieee1275.
4533 (grub_get_extended_memory): New function for i386-ieee1275.
4534 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
4535
4536 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
4537 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
4538 property.
f19dbdb7 4539
25f16ec1 4540 * loader/i386/ieee1275/linux.c: New file.
4541
4542 * loader/i386/ieee1275/linux_normal.c: New file.
4543
4544 * disk/ieee1275/nand.c: New file.
4545
e89d61e9 45462008-04-18 Thomas Schwinge <tschwinge@gnu.org>
4547
4548 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
4549 value.
4550 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
4551
602566f6 45522008-04-18 Robert Millan <rmh@aybabtu.com>
4553
4554 Restructures early code path on ieee1275 to unify grub_main() as
4555 the first C function that is executed in every platform.
4556
4557 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
4558 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
4559 cmain().
4560 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
4561 * kern/ieee1275/cmain.c (cmain): Rename to ...
4562 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
4563 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
4564 at the beginning.
4565
57490c2b 45662008-04-18 Robert Millan <rmh@aybabtu.com>
4567
4568 * util/update-grub.in: Fix syntax error when setting
4569 `GRUB_PRELOAD_MODULES'.
4570 Reported by Stephane Chazelas <stephane@artesyncp.com>
4571
1977517d 45722008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
4573
4574 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
4575 section into account, newer toolchains generate unique build ids
4576 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 4577 we want build ids to be preserved
1977517d 4578 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
4579 far from other sections don't cause the raw binary images grow
4580 size
4581
bfb1f1a2 45822008-04-15 Robert Millan <rmh@aybabtu.com>
4583
4584 * disk/lvm.c: Update copyright year.
4585 * kern/misc.c: Likewise.
4586
01979850 45872008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4588
4589 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 4590 there is no memory left for physical volume name.
01979850 4591
0a1150e2 45922008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4593
4594 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
4595 volume name mapping to support bigger than 9 character names properly.
4596
82ead3fe 45972008-04-13 Robert Millan <rmh@aybabtu.com>
4598
4599 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
4600 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
4601
e54a72f5 46022008-04-13 Christian Franke <franke@computer.org>
4603
4604 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
4605 to create a floppy emulation boot CD when non emulation mode
4606 does not work.
4607 Enable Joliet CD filesystem extension.
4608
9fe86034 46092008-04-13 Robert Millan <rmh@aybabtu.com>
4610
4611 * kern/misc.c (grub_strncat): Fix off-by-one error.
4612 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
4613
4614 * kern/env.c (grub_env_context_close): Clear current context, not
4615 previous one.
4616 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
4617
4618 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
4619
7ceeee39 46202008-04-13 Robert Millan <rmh@aybabtu.com>
4621
4622 Improve robustness when handling LVM.
4623
4624 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 4625 (and leave `*p' unmodified).
7ceeee39 4626 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
4627 through it.
4628 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
4629 iterating through it.
4630 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
4631 through it.
fe6b695a 4632 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 4633 when due) on each grub_lvm_getvalue() or grub_strstr() call.
4634 Don't assume `vg->pvs != NULL' when iterating through it.
4635
58cd3d85 46362008-04-13 Robert Millan <rmh@aybabtu.com>
4637
4638 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
4639 * genmk.rb (partmap): New variable.
4640 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
4641 (#{partmap}): New target rule.
4642 * genpartmaplist.sh: New file.
4643 * Makefile.in (pkglib_DATA): Add partmap.lst.
4644 (partmap.lst): New target rule.
4645 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
4646 modules (including all partition maps), instead of preloading them.
4647
78b51059 46482007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
4649
4650 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
4651 `linux-boot-prober' (if installed) to detect other operating
4652 systems which are installed on the computer and add them to
4653 the boot menu.
4654 * conf/common.rmk: Build and install 30_os-prober.
4655
a91627b4 46562008-04-12 Robert Millan <rmh@aybabtu.com>
4657
4658 * kern/powerpc/ieee1275/init.c: Move from here ...
4659 * kern/ieee1275/init.c: ... to here. Update all users.
4660
4661 * kern/powerpc/ieee1275/cmain.c: Move from here ...
4662 * kern/ieee1275/cmain.c: ... to here. Update all users.
4663
4664 * kern/powerpc/ieee1275/openfw.c: Move from here ...
4665 * kern/ieee1275/openfw.c: ... to here. Update all users.
4666
4667 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
4668 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
4669
322562ea 46702008-04-10 Pavel Roskin <proski@gnu.org>
4671
4672 * configure.ac: Always use "_cv_" in cache variables for
4673 compatibility with Autoconf 2.62.
4674
a02a73c5 46752008-04-07 Robert Millan <rmh@aybabtu.com>
4676
4677 Revert grub/machine/init.h addition by Pavel (since it breaks on
4678 i386-ieee1275 and others):
4679 * util/i386/pc/misc.c: Remove grub/machine/init.h.
4680 * util/powerpc/ieee1275/misc.c: Likewise.
4681
25c024b1 46822008-04-07 Robert Millan <rmh@aybabtu.com>
4683
4684 * util/grub-probe.c (probe): Improve error message.
4685
3cbd2f98 46862008-04-07 Robert Millan <rmh@aybabtu.com>
4687
4688 * util/biosdisk.c (read_device_map): Skip devices that don't exist
4689 (this prevents the presence of a bogus entry from ruining the whole
4690 thing).
4691
87a297bf 46922008-04-06 Pavel Roskin <proski@gnu.org>
4693
36747a62 4694 * util/biosdisk.c: Include grub/util/biosdisk.h.
4695 * util/grub-fstest.c (execute_command): Make static.
4696 * util/grub-mkdevicemap.c (check_device): Likewise.
4697 * util/i386/pc/misc.c: Include grub/machine/init.h.
4698 * util/powerpc/ieee1275/misc.c: Likewise.
4699 * util/lvm.c: Include grub/util/lvm.h.
4700 * util/misc.c: Include grub/kernel.h, grub/misc.h and
4701 grub/cache.h.
4702 * util/raid.c: Include grub/util/raid.h.
4703 (grub_util_getdiskname): Make static.
4704
87a297bf 4705 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
4706 grub_hostfs_fini(), as they are called from grub_init_all() and
4707 grub_fini_all() respectively. This fixes an infinite loop in
4708 grub-fstest due to double registration of hostfs.
4709 Reported by Christian Franke <Christian.Franke@t-online.de>
4710
f6ce7629 47112008-04-05 Pavel Roskin <proski@gnu.org>
4712
4713 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
4714 all 8 functions. Otherwise, probe function 0 only.
4715
070e49e4 47162008-04-04 Pavel Roskin <proski@gnu.org>
4717
8b088a4c 4718 * commands/lspci.c (grub_lspci_iter): Print the bus number
4719 correctly.
4720
4f657021 4721 * commands/lspci.c (grub_pci_classes): Fix typos.
4722 (grub_lspci_iter): Don't print func twice. Print vendor ID
4723 before device ID, as it's normally done.
4724
070e49e4 4725 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4726 Fix signedness warnings.
4727 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
4728 Likewise.
4729 * util/ieee1275/get_disk_name.c: Include config.h so that
4730 _GNU_SOURCE is defined and getline() is declared. Mark an
4731 unused argument as such. Fix a signedness warning.
4732
ba7328dc 47332008-04-02 Pavel Roskin <proski@gnu.org>
4734
26887f22 4735 * genkernsyms.sh.in: Use more robust assignments for CC and
4736 srcdir. Quote srcdir.
4737 * gensymlist.sh.in: Likewise. Assert at the compile time that
4738 the symbol table is not empty.
4739
ba7328dc 4740 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
4741 * fs/cpio.c (grub_cpio_read): Likewise.
4742
0f582c6b 47432008-04-01 Pavel Roskin <proski@gnu.org>
4744
4b6e1995 4745 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
4746 * disk/host.c (grub_host_open): Likewise.
4747 * disk/loopback.c (grub_loopback_open): Likewise.
4748 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
4749 disk->id as in disk/host.c, not a multi-character constant.
4750
828a2768 4751 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
4752 later is obsolete, potentially dangerous and sets a bad example.
4753 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
4754 * util/misc.c (grub_util_get_image_size): Likewise.
4755
2bb4fb47 4756 * disk/loopback.c (options): Improve help for "--partitions".
4757
0f582c6b 4758 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
4759 options to align them with the short options, e.g. "echo -e".
4760
a33224e0 47612008-03-31 Bean <bean123ch@gmail.com>
4762
4763 * video/reader/png.c (grub_png_data): New member is_16bit and
4764 image_data.
4765 (grub_png_decode_image_header): Detect 16 bit png image.
4766 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
4767 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
4768 (grub_video_reader_png): Release memory occupied by image_data.
4769
4770 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
4771 4096 bytes.
4772 (grub_nfs_mount): Skip the test for sector per cluster.
4773
4774 * include/grub/ntfs.h (MAX_SPC): Removed.
4775
86cb4f54 47762008-03-31 Bean <bean123ch@gmail.com>
4777
4778 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
4779 (grub_probe_SOURCES): Add fs/afs.c.
4780 (grub_fstest_SOURCES): Likewise.
4781 (afs_mod_SOURCES): New variable.
4782 (afs_mod_CFLAGS): Likewise.
4783 (afs_mod_LDFLAGS): Likewise.
4784
4785 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
4786 (grub_emu_SOURCES): Likewise.
4787
4788 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4789
4790 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4791
4792 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4793
4794 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4795
4796 * fs/afs.c: New file.
4797
17c74c21 47982008-03-30 Pavel Roskin <proski@gnu.org>
4799
4cb68e89 4800 * disk/host.c: Include grub/misc.h to fix a warning.
4801 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
4802 warnings about implicit declarations.
4803
8790bb04 4804 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
4805 variable.
4806 * include/grub/i386/loader.h: Change declaration of
4807 grub_linux_boot() to match what grub_loader_set() expects.
4808 * util/getroot.c (grub_guess_root_device): Return const char* to
4809 fix a warning.
4810 * util/grub-probe.c (probe): Fix a warning about uninitialized
4811 abstraction_name variable.
4812 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
4813 second argument as unused to fix a warning.
4814
9a3f3296 4815 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
4816 missing grub_error() call.
4817
0ecef90d 4818 * util/update-grub_lib.in: Define datarootdir, since Autoconf
4819 2.60 and newer uses it to define datadir.
4820
0bf6d401 4821 * commands/sleep.c: Fix warning about implicit declaration.
4822 * disk/memdisk.c: Likewise.
4823 * loader/aout.c: Likewise.
4824 * loader/i386/bsd_normal.c: Likewise.
4825 * util/grub-probe.c: Likewise.
4826
7cdacf97 4827 * commands/i386/cpuid.c (has_longmode): Make static.
4828 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
4829 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
4830
17c74c21 4831 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
4832 GDT. This is more robust, as %ds can change.
4833 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
4834 calling real_to_prot().
4835 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
4836
80a3e68b 48372008-03-28 Pavel Roskin <proski@gnu.org>
4838
4839 * kern/i386/pc/startup.S: Assert that uncompressed functions
4840 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
4841 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
4842 code, as they push parts of the code (error handlers) beyond
4843 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
4844 code as correctness and size.
4845
77bcd272 48462008-03-28 Pavel Roskin <proski@gnu.org>
4847
4848 * kern/i386/pc/startup.S
4849 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
4850 data block address to the real mode, keep offset minimal. This
4851 works around a bug in AWARD BIOS on old Athlon systems, which
4852 makes CD detection hang.
4853
c5dfd43b 48542008-03-26 Pavel Roskin <proski@gnu.org>
4855
4856 * normal/color.c (grub_parse_color_name_pair): Make `name' a
4857 const.
4858 * include/grub/normal.h: Add grub_parse_color_name_pair()
4859 declaration.
4860
bf962df2 48612008-03-24 Bean <bean123ch@gmail.com>
4862
4863 * disk/i386/pc/biosdisk.c (cd_start): Removed.
4864 (cd_count): Removed.
4865 (cd_drive): New variable.
4866 (grub_biosdisk_get_drive): Don't check for (cdN) device.
4867 (grub_biosdisk_call_hook): Likewise.
4868 (grub_biosdisk_iterate): Change cdrom detection method.
4869 (grub_biosdisk_open): Replace cd_start with cd_drive.
4870 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4871 detect cdrom device.
4872
4873 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4874 Removed.
4875 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4876 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4877 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4878 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4879 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4880 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4881 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4882 (grub_biosdisk_cdrp): New structure.
4883 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4884
4885 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4886
4887 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4888 device.
4889
4890 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4891 New function.
4892
68e7fc7a 48932008-03-20 Robert Millan <rmh@aybabtu.com>
4894
4895 Remove 2 TiB limit in ata.mod.
4896 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4897 (grub_ata_dumpinfo): Print sector count with 0x%llx.
4898 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4899 grub_uint64_t instead of grub_uint32_t.
4900
38ad2cf5 49012008-03-05 Bean <bean123ch@gmail.com>
4902
4903 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4904 (grub_multiboot): Set boot device.
4905
4906 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4907
2b89344e 49082008-03-02 Bean <bean123ch@gmail.com>
4909
4910 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4911 symlink_buffer.
4912
87a95d1f 49132008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
4914
4915 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4916 texinfo.tex.
4917
4918 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4919 modified.
4920
4921 * docs/fdl.texi: New file.
f19dbdb7 4922
87a95d1f 4923 * docs/mdate-sh: New file. Copied from gnulib.
4924 * docs/texinfo.tex: Likewise.
4925
4926 * config.guess: Updated from gnulib.
4927 * install-sh: Likewise.
4928
7dc15d8e 49292008-02-28 Robert Millan <rmh@aybabtu.com>
4930
4931 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4932 (aout_mod_SOURCES): New variable.
4933 (aout_mod_CFLAGS): Likewise.
4934 (aout_mod_LDFLAGS): Likewise.
4935
4936 * conf/i386-ieee1275.rmk: Likewise.
4937
b00ab696 49382008-02-28 Robert Millan <rmh@aybabtu.com>
4939
4940 * util/update-grub.in: Reorganise terminal validity check. Accept
4941 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4942 Based on suggestion by Franklin PIAT.
4943
79ca2d78 49442008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
4945
4946 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4947 function.
4948 * util/getroot.c (grub_util_check_block_device): New function that
4949 returns the given argument if it is a block device and returns NULL else.
4950 * util/grub-probe.c (argument_is_device): New variable.
4951 (probe): Promote device_name from a variable to an argument. Receive
4952 device_name from grub_util_check_block_device() if path is NULL and from
4953 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 4954 (options): Introduce new parameter '-d, --device'.
79ca2d78 4955 (main): Add description of the new parameter to the help screen.
4956 Rename path variable to argument. Set argument_is_device if the '-d'
4957 option is given. Pass argument to probe() depending on
4958 argument_is_device.
4959
0d16e571 49602008-02-24 Bean <bean123ch@gmail.com>
4961
4962 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4963 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4964 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4965 (GRUB_ISO9660_VOLDESC_PART): Likewise.
4966 (GRUB_ISO9660_VOLDESC_END): Likewise.
4967 (grub_iso9660_primary_voldesc): New member escape.
4968 (grub_iso9660_data): New member joliet.
4969 (grub_iso9660_convert_string): New function.
4970 (grub_iso9660_mount): Detect joliet extension.
4971 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4972 (grub_iso9660_iso9660_label): Likewise.
4973
4974 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4975 (grub_setup_SOURCES): Add fs/udf.c.
4976 (grub_fstest_SOURCES): Likewise.
4977 (udf_mod_SOURCES): New variable.
4978 (udf_mod_CFLAGS): Likewise.
4979 (udf_mod_LDFLAGS): Likewise.
4980
4981 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4982 (grub_emu_SOURCES): Likewise.
4983
4984 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4985
4986 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4987
4988 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4989
4990 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4991
4992 * fs/udf.c: New file.
4993
8a594a17 49942008-02-24 Robert Millan <rmh@aybabtu.com>
4995
4996 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4997 (normal/lexer.c_DEPENDENCIES): New variables.
4998 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4999 (normal/lexer.c_DEPENDENCIES): Likewise.
5000 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
5001 (normal/lexer.c_DEPENDENCIES): Likewise.
5002 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
5003 (normal/lexer.c_DEPENDENCIES): Likewise.
5004 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5005 (normal/lexer.c_DEPENDENCIES): Likewise.
5006 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
5007 (normal/lexer.c_DEPENDENCIES): Likewise.
5008
2dc33c03 50092008-02-23 Robert Millan <rmh@aybabtu.com>
5010
5011 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
5012 since they were intended to be in hex. This didn't break previously
5013 because of a bug in gpt_partition_map_iterate() (see below).
5014
5015 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
5016 when checking the validity of GPT header.
5017 Remove `partno', since it always provides the same information as `i'.
5018
f6f4cfb0 50192008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
5020
5021 * include/grub/efi/time.h: Fix a wrong comment.
5022
79ff665f 50232008-02-19 Pavel Roskin <proski@gnu.org>
5024
5025 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
5026 message.
5027
d38e24c2 50282008-02-19 Bean <bean123ch@gmail.com>
5029
5030 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
5031 (aout_mod_SOURCES): New variable.
5032 (aout_mod_CFLAGS): Likewise.
5033 (aout_mod_LDFLAGS): Likewise.
5034 (_bsd_mod_SOURCES): New variable.
5035 (_bsd_mod_CFLAGS): Likewise.
5036 (_bsd_mod_LDFLAGS): Likewise.
5037 (bsd_mod_SOURCES): New variable.
5038 (bsd_mod_CFLAGS): Likewise.
5039 (bsd_mod_LDFLAGS): Likewise.
5040
5041 * include/grub/aout.h: New file.
5042
5043 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
5044
5045 * include/grub/i386/bsd.h: New file.
5046
5047 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
5048 to make it public.
5049
5050 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
5051 function is called, so that it's possible to change it inside the hook.
5052 (grub_elf64_load): Likewise.
5053 (grub_elf_file): Don't close the file if elf header is not found.
5054 (grub_elf_close): Close the file if grub_elf_file fails (The new
5055 grub_elf_file won't close it).
5056 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
5057 (grub_elf64_size): Likewise.
5058
5059 * kern/i386/loader.S (grub_unix_real_boot): New function.
5060
5061 * loader/aout.c: New file.
5062
5063 * loader/i386/bsd.c: New file.
5064
5065 * loader/i386/bsd_normal.c: New file.
5066
5067 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
5068
5069 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 5070 can test other formats.
d38e24c2 5071
b93bdb0f 50722008-02-19 Robert Millan <rmh@aybabtu.com>
5073
5074 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
5075 (grub_gpt_partition_type_empty): Redefine with macro from
5076 `<grub/gpt_partition.h>'.
5077 (gpt_partition_map_iterate): Adjust partition type comparison.
5078
5079 Export `entry' as partmap-specific `part.data' struct.
5080 (grub_gpt_header, grub_gpt_partentry): Move from here ...
5081
5082 * include/grub/gpt_partition.h (grub_gpt_header)
5083 (grub_gpt_partentry): ... to here (new file).
5084
5085 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
5086
5087 (grub_gpt_partition_type_bios_boot): New const variable, defined
5088 with macro from `<grub/gpt_partition.h>'.
5089
5090 (setup): Replace `first_start' with `embed_region', which keeps
5091 track of the embed region (and is partmap-agnostic).
5092
5093 Replace find_first_partition_start() with find_usable_region(),
5094 which finds a usable region for embedding using partmap-specific
5095 knowledge (supports PC/MSDOS and GPT).
5096
5097 Fix all assumptions that the embed region start at sector 1, using
5098 `embed_region.start' from now on. Similarly, use `embed_region.end'
5099 rather than `first_start' to calculate available size.
5100
5101 In grub_util_info() message, replace "into after the MBR" with an
5102 indication of the specific sector our embed region starts at.
5103
66cb40f6 51042008-02-19 Robert Millan <rmh@aybabtu.com>
5105
5106 * DISTLIST: Replace `commands/ieee1275/halt.c' and
5107 `commands/ieee1275/reboot.c' with `commands/halt.c' and
5108 `commands/reboot.c'.
5109 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5110 (halt_mod_SOURCES): Likewise.
5111 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5112 (halt_mod_SOURCES): Likewise.
5113
b7202015 51142008-02-17 Christian Franke <franke@computer.org>
5115
5116 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
5117
32b0fc49 51182008-02-17 Robert Millan <rmh@aybabtu.com>
5119
5120 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5121 set `first_start' to 0 for non-PC/MSDOS partition maps.
5122
aca63502 51232008-02-16 Robert Millan <rmh@aybabtu.com>
5124
5125 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5126 do not assume partition map is PC/MSDOS before performing checks that
5127 are specific to that layout.
5128
0de8be86 51292008-02-13 Robert Millan <rmh@aybabtu.com>
5130
5131 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
5132 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
5133 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
5134
c3db8364 51352008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
5136
5137 * configure.ac: Only a cosmetic change on the handling of
5138 -fno-stack-protector.
5139
f714229e 51402008-02-12 Alexandre Boeglin <alex@boeglin.org>
5141
c3db8364 5142 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
5143 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
5144 reboot.c.
f714229e 5145 (grub_install_SOURCES): Add halt.mod and reboot.mod.
5146 (halt_mod_SOURCES): New variable.
5147 (halt_mod_CFLAGS): Likewise.
5148 (halt_mod_LDFLAGS): Likewise.
5149 (reboot_mod_SOURCES): Likewise.
5150 (reboot_mod_CFLAGS): Likewise.
5151 (reboot_mod_LDFLAGS): Likewise.
5152
c3db8364 5153 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
5154 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
5155 reboot.c.
f714229e 5156 (halt_mod_SOURCES): Likewise.
5157 (reboot_mod_SOURCES): Likewise.
5158
c3db8364 5159 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
5160 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 5161 (reboot_mod_SOURCES): Likewise.
5162
5163 * commands/i386/pc/reboot.c: merge this file ...
5164
5165 * commands/ieee1275/reboot.c: ... and this file ...
5166
5167 * commands/reboot.c: ... to this file.
c3db8364 5168 Add some precompiler directive to include the correct header for
5169 each machine.
f714229e 5170
5171 * commands/ieee1275/halt.c: move this file ...
5172
5173 * commands/halt.c: ... to here.
c3db8364 5174 Add some precompiler directive to include the correct header for
5175 each machine.
f714229e 5176
5177 * include/grub/efi/efi.h (grub_reboot): New function declaration.
5178 (grub_halt): Likewise.
5179
5180 * kern/efi/efi.c (grub_reboot): New function.
5181 (grub_halt): Likewise.
5182
c74493e0 51832008-02-12 Robert Millan <rmh@aybabtu.com>
5184
5185 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
5186 /dev (like it is done for /dev/mapper). This doesn't provide support
5187 for EVMS, but at least it is now easy to identify the problem when it
5188 arises.
5189
d0db4b04 51902008-02-11 Robert Millan <rmh@aybabtu.com>
5191
5192 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
5193 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
5194 comparing it with -1, not 0.
5195
bf748642 51962008-02-10 Robert Millan <rmh@aybabtu.com>
5197
5198 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
5199 `disk/lvm.c'.
5200 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5201 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
5202
5203 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
5204 `disk/lvm.c' to the end of the list.
5205 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5206 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5207
b5db202a 52082008-02-10 Robert Millan <rmh@aybabtu.com>
5209
5210 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
5211 grub_print_error() instead. This will let user know why we're entering
5212 rescue mode.
5213 Based on suggestions from Sam Morris.
5214
83abee31 52152008-02-10 Alexandre Boeglin <alex@boeglin.org>
5216
5217 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
5218 on remaining N args, instead of "--" arg N times.
5219
78d5a08b 52202008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
5221
5222 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
5223 (fill_with_default_glyph): Changed to use unknown_glyph for fill
5224 pattern for unknown glyphs.
5225
68807e5f 52262008-02-09 Robert Millan <rmh@aybabtu.com>
5227
5228 * configure.ac: Probe for `help2man'.
5229 * Makefile.in (builddir): New variable.
5230 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
5231 or otherwise add a few flags/options to it.
5232 (install-local): For every executable utility or script that is
5233 installed, invoke $(HELP2MAN) to install a manpage based on --help
5234 output.
5235
5236 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
5237 that it doesn't prevent --help from working in build tree.
5238
5239 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
5240 with `bug-grub@gnu.org'.
5241 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
5242 * util/update-grub.in (usage): New function.
5243 Implement proper argument check, with support for --help and --version
5244 (as well as existing -y).
5245
52462008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 5247
5248 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
5249 avoid overwriting previous output.
5250 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
5251
c1962162 52522008-02-09 Robert Millan <rmh@aybabtu.com>
5253
5254 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
5255 drawing the menu.
5256
3dac2e3f 52572008-02-09 Robert Millan <rmh@aybabtu.com>
5258
5259 * commands/sleep.c: New file.
5260 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
5261 (sleep_mod_SOURCES): New variable.
5262 (sleep_mod_CFLAGS): Likewise.
5263 (sleep_mod_LDFLAGS): Likewise.
5264
7a634e08 52652008-02-09 Robert Millan <rmh@aybabtu.com>
5266
5267 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
5268 situations in which we can deduce the RAID size and the superblock
5269 doesn't match it.
5270
b92f0c18 52712008-02-09 Robert Millan <rmh@aybabtu.com>
5272
5273 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
5274 and return a grub_diskmemberlist_t composed of LVM physical volumes.
5275 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
5276
5277 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
5278 and return a grub_diskmemberlist_t composed of physical array members.
5279 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
5280
5281 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
5282 prototype.
5283 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
5284 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
5285 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
5286
5287 * util/grub-probe.c (probe): Move partmap probing code from here ...
5288 (probe_partmap): ... to here.
5289 (probe): Use probe_partmap() once for the disk we're probing, and
5290 additionally, when such disk contains a memberlist() struct member,
5291 once for each disk that is contained in the structure returned by
5292 memberlist().
5293
91a4bf68 52942008-02-09 Robert Millan <rmh@aybabtu.com>
5295
5296 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
5297 environment variable to 'all' in order to obtain debug output from
5298 non-util/ code.
5299 * util/i386/pc/grub-setup.c (main): Likewise.
5300
a96f9caa 53012008-02-08 Robert Millan <rmh@aybabtu.com>
5302
5303 * disk/raid.c (grub_raid_scan_device): Check for
5304 `array->device[sb.this_disk.number]' rather than for
5305 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 5306 guaranteed to be accessible.
a96f9caa 5307
b37a9222 53082008-02-08 Robert Millan <rmh@aybabtu.com>
5309
5310 * disk/raid.c: Update copyright.
5311 * fs/cpio.c: Likewise.
5312 * include/grub/raid.h: Likewise.
5313 * loader/i386/pc/multiboot.c: Likewise.
5314 * util/hostfs.c: Likewise.
5315
5626aee1 53162008-02-08 Robert Millan <rmh@aybabtu.com>
5317
5318 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
5319 to a grub_disk_t array.
5320 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
5321 `device[x]'.
5322 (grub_raid_scan_device): Replace `device[x].name' accesses with
5323 `device[x]->name'. Simplify initialization of `array->device[x]'.
5324
554f0187 53252008-02-08 Robert Millan <rmh@aybabtu.com>
5326
5327 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
5328 grub_dprintf() calls.
5329 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
5330 error message.
5331
1ec8425d 53322008-02-07 Christian Franke <franke@computer.org>
5333
5334 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
5335 instead of fseek and ftell to support large files.
5336 (grub_hostfs_read): Likewise.
5337
f2156fda 53382008-02-07 Robert Millan <rmh@aybabtu.com>
5339
5340 Patch from Jeroen Dekkers.
5341 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 5342 failure, since successfully reading all array members might not be
f2156fda 5343 required.
5344
9216e0e7 53452008-02-06 Robert Millan <rmh@aybabtu.com>
5346
5347 * util/grub-probe.c (probe): Simplify partmap probing (with the
5348 assumption that the first word up to the underscore equals to
5349 the module name).
5350
b0dfd29a 53512008-02-06 Christian Franke <franke@computer.org>
5352
5353 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
5354 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
5355 last block of a cpio or tar stream.
5356 Check for "TRAILER!!!" instead of any empty data
5357 block to detect last block of a cpio stream.
5358 (grub_cpio_dir): Fix constness of variable np.
5359 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
5360 cpio or tar trailer is detected. This fixes a crash
5361 on open of a non existing file.
5362
c32865bf 53632008-02-05 Bean <bean123ch@gmail.com>
5364
5365 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
5366 address of entry.
5367 (grub_multiboot_load_elf64): Likewise.
5368 (grub_multiboot): Initialize mbi structure.
5369
5370 * util/grub-fstest.c: Don't include unused header file script.h.
5371
fe6b695a 5372 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 5373 of file.
5374 (grub_fstest_SOURCES): Likewise.
5375
409480b7 53762008-02-05 Robert Millan <rmh@aybabtu.com>
5377
5378 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
5379 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
5380 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
5381 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
5382
5383 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
5384 (translation_table): Replace hardcoded values with macros
5385 provided by `<grub/term.h>'.
5386
5387 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
5388 (keyboard_map): Correct/add a few values, with macros provided
5389 by `<grub/term.h>'.
5390 (keyboard_map_shift): Zero values that don't differ from their
5391 `keyboard_map' equivalents.
5392 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
5393 Discard the second scan code that is always sent by Caps lock.
5394 Only use `keyboard_map_shift' when it provides a non-zero value,
5395 otherwise fallback to `keyboard_map'.
5396
99fadbaa 53972008-02-04 Bean <bean123ch@gmail.com>
5398
5399 * Makefile.in (enable_grub_fstest): New variable.
5400
5401 * conf/common.rmk (grub_fstest_init.lst): New rule.
5402 (grub_fstest_init.h): Likewise.
5403 (grub_fstest_init.c): Likewise.
5404 (util/grub-fstest.c_DEPENDENCIES): New variable.
5405 (grub_fstest_SOURCES): Likewise.
5406
5407 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
5408
5409 * util/grub-fstest.c: New file.
5410
bf567c50 54112008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5412
5413 Make grub-setup handle a separate root device.
f19dbdb7 5414
bf567c50 5415 * util/i386/pc/grub-setup.c (setup): Always open the root device,
5416 so that the root device can be compared with the destination
5417 device.
5418 When embedding the core image, if the root and destination devices
5419 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
5420 0xFF.
5421 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 5422
9be6b98b 54232008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5424
5425 Add support for having a grub directory in a different drive. This
5426 is still only the data handling part.
f19dbdb7 5427
9be6b98b 5428 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
5429 (codestart): Save %dh in GRUB_ROOT_DRIVE.
5430 (grub_root_drive): New variable.
5431
5432 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
5433 instead of GRUB_BOOT_DRIVE to construct a device name. Set
5434 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
5435 as it was.
5436
5437 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
5438
5439 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
5440 macro.
5441 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
5442
5443 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
5444 is bogus, because PXE booting does not specify any drive
5445 correctly.
5446
5447 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
5448 am not sure if this is really correct.
5449
5450 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
5451 is always identical to the boot drive when booting from a CD.
5452
5453 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
5454 longer.
5455 (root_drive): New variable.
5456 (real_start): Unconditionally set %dh to ROOT_DRIVE.
5457 (setup_sectors): Push %dx right after popping it, because %dh will
5458 be modified later.
5459 (copy_buffer): Restore %dx.
5460
e0ca0677 54612008-02-03 Robert Millan <rmh@aybabtu.com>
5462
5463 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
5464 use `cdboot.img' for cdrom images.
5465
3b3f6629 54662008-02-03 Robert Millan <rmh@aybabtu.com>
5467
5468 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
5469 only setup gfxterm when `font' command has succeeded.
5470
d42b3672 54712008-02-03 Robert Millan <rmh@aybabtu.com>
5472
5473 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
5474 (grub_rescue_cmd_multiboot_loader)
5475 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
5476
fa370ea6 54772008-02-03 Pavel Roskin <proski@gnu.org>
5478
e0c5dacb 5479 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 5480 %edx and %esi from stack only after grub_gate_a20() is called.
5481 grub_gate_a20() clobbers %edx.
5482
f2a76e1d 54832008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5484
5485 * configure.ac (AC_INIT): Bumped to 1.96.
5486
5487 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
5488 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
5489 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
5490 video/readers/png.c.
5491
90fd32d1 54922008-02-03 Bean <bean123ch@gmail.com>
9be665dd 5493
5494 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
5495 (cdboot_img_SOURCES): New variable.
5496 (cdboot_img_ASFLAGS): New variable.
5497 (cdboot_img_LDFLAGS): New variable.
5498
5499 * boot/i386/pc/cdboot.S: New file.
5500
5501 * disk/i386/pc/biosdisk.c (cd_start): New variable.
5502 (cd_count): Likewise.
5503 (grub_biosdisk_get_drive): Add support for cd device.
5504 (grub_biosdisk_call_hook): Likewise.
5505 (grub_biosdisk_iterate): Likewise.
5506 (grub_biosdisk_open): Likewise.
5507 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
5508 (grub_biosdisk_rw): Support reading from cd device.
5509 (GRUB_MOD_INIT): Iterate cd devices.
5510
5511 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
5512 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
5513 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
5514
5515 * kern/i386/pc/init.c (make_install_device): Check for cd device.
5516
4020aa53 55172008-02-02 Robert Millan <rmh@aybabtu.com>
5518
5519 * commands/read.c: New file.
5520 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
5521 (read_mod_SOURCES): New variable.
5522 (read_mod_CFLAGS): Likewise.
5523 (read_mod_LDFLAGS): Likewise.
5524
e03a1132 55252008-02-02 Robert Millan <rmh@aybabtu.com>
5526
5527 * normal/main.c (grub_normal_execute): Check for `menu->size' when
5528 determining whether menu has to be displayed.
5529
58c69220 55302008-02-02 Marco Gerards <marco@gnu.org>
5531
5532 * bus/pci.c: New file.
5533
5534 * include/grub/pci.h: Likewise.
5535
5536 * include/grub/i386/pc/pci.h: Likewise.
5537
5538 * commands/lspci.c: Likewise.
5539
5540 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
5541 `lspci.mod'.
5542 (pci_mod_SOURCES): New variable.
5543 (pci_mod_CFLAGS): Likewise.
5544 (pci_mod_LDFLAGS): Likewise.
5545 (lspci_mod_SOURCES): Likewise.
5546 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 5547 (lspci_mod_LDFLAGS): Likewise.
58c69220 5548
c004e1b4 55492008-02-02 Bean <bean123ch@gmail.com>
5550
5551 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
5552 (grub_ufs_get_file_block): Fix indirect block calculation problem.
5553
5554 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
5555 (grub_xfs_btree_node): New structure.
5556 (grub_xfs_btree_root): New structure.
5557 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
5558 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
5559 (GRUB_XFS_EXTENT_BLOCK): Likewise.
5560 (GRUB_XFS_EXTENT_SIZE): Likewise.
5561 (grub_xfs_read_block): Support btree format type.
5562 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
5563 Use directory block as basic unit.
5564
5565 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
5566
5567 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
5568 __attribute__ ((__regparm__ (1))).
5569
f95562bf 55702008-02-01 Robert Millan <rmh@aybabtu.com>
5571
5572 Correct a mistake in previous commit.
5573
5574 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
5575 top.
5576 (normal/command.c_DEPENDENCIES): New variable.
5577
7d31f41f 55782008-02-01 Robert Millan <rmh@aybabtu.com>
5579
5580 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
5581 top.
5582 (normal/command.c_DEPENDENCIES): New variable.
5583 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
5584 * conf/i386-ieee1275.rmk: Likewise.
5585 * conf/i386-linuxbios.rmk: Likewise.
5586 * conf/i386-pc.rmk: Likewise.
5587 * conf/sparc64-ieee1275.rmk: Likewise.
5588 * conf/powerpc-ieee1275.rmk: Likewise.
5589 (grub_emu_SOURCES): Add `fs/fshelp.c'.
5590
5591 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
5592
60b6be74 55932008-02-01 Robert Millan <rmh@aybabtu.com>
5594
5595 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
5596 call at beginning of function.
5597
078522ab 55982008-01-31 Pavel Roskin <proski@gnu.org>
5599
5600 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 5601 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
5602 (grub_mkrescue_SOURCES): Likewise.
078522ab 5603 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
5604
ccaa8a5f 56052008-01-30 Robert Millan <rmh@aybabtu.com>
5606
5607 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
5608 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
5609 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
5610 (grub_probe_SOURCES): ... to here.
5611
5612 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
5613 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
5614 * conf/i386-ieee1275.rmk: Likewise.
5615 * conf/i386-linuxbios.rmk: Likewise.
5616 * conf/powerpc-ieee1275.rmk: Likewise.
5617
ae5a9cd7 56182008-01-30 Tristan Gingold <gingold@free.fr>
5619
5620 * kern/rescue.c: Silently accept empty lines.
5621
70bc2ef2 56222008-01-29 Bean <bean123ch@gmail.com>
5623
5624 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
5625 (real_code_2): Code cleanup and change comment style.
5626 (move_memory): Avoid using 32-bit address mode.
5627
6a4d50ea 56282008-01-29 Bean <bean123ch@gmail.com>
5629
5630 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
5631 (png_mod_SOURCES): New variable.
5632 (png_mod_CFLAGS): Likewise.
5633 (png_mod_LDFLAGS): Likewise.
5634
5635 * video/readers/png.c: New file.
5636
11cc30ac 56372008-01-28 Robert Millan <rmh@aybabtu.com>
5638
5639 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
5640 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
5641 `ifndef GRUB_MOD_GAP' hack.
5642 * util/elf/grub-mkimage.c (add_segments): Likewise.
5643
3abc589f 56442008-01-27 Robert Millan <rmh@aybabtu.com>
5645
5646 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
5647 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 5648 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 5649
e1907778 56502008-01-27 Robert Millan <rmh@aybabtu.com>
5651
5652 Get grub-emu to build again (including parallel builds).
5653
5654 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
5655 Split into ...
5656 (util/grub-emu.c_DEPENDENCIES): ... this, ...
5657 (normal/execute.c_DEPENDENCIES): ... this, ...
5658 (grub-emu_DEPENDENCIES): ... and this.
5659
5660 * conf/i386-efi.rmk: Likewise.
5661 * conf/i386-linuxbios.rmk: Likewise.
5662 * conf/i386-ieee1275.rmk: Likewise.
5663 * conf/powerpc-ieee1275.rmk: Likewise.
5664 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
5665
2216b101 56662008-01-27 Robert Millan <rmh@aybabtu.com>
5667
5668 * NEWS: Add a few items.
5669
f75172d9 56702008-01-27 Robert Millan <rmh@aybabtu.com>
5671
5672 Fix parallel builds with grub-emu. Based on earlier commit for
5673 grub-probe and grub-setup.
5674
5675 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5676 (util/grub-emu.c_DEPENDENCIES): ... this.
5677 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5678 (util/grub-emu.c_DEPENDENCIES): ... this.
5679 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5680 (util/grub-emu.c_DEPENDENCIES): ... this.
5681 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5682 (util/grub-emu.c_DEPENDENCIES): ... this.
5683 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5684 (util/grub-emu.c_DEPENDENCIES): ... this.
5685
3f51de77 56862008-01-27 Pavel Roskin <proski@gnu.org>
5687
5688 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
5689 to create a gap between _end and the modules added to the image
5690 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
5691 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
5692 * util/elf/grub-mkimage.c (add_segments): Likewise.
5693
2033f53e 56942008-01-26 Pavel Roskin <proski@gnu.org>
5695
5696 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
5697 just return an error.
5698
22da1f6f 56992008-01-26 Bean <bean123ch@gmail.com>
5700
5701 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
5702 (grub_reiserfs_get_item): Save offset of the next item.
5703 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
5704
2a9525e6 57052008-01-25 Robert Millan <rmh@aybabtu.com>
5706
5707 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
5708 make all filesystem sources appear together (possibly fixing omissions
5709 while at it).
5710 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5711 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5712 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5713 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5714
5715 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
5716 add `kern/file.c'.
5717 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
5718 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5719 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
5720 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5721
5722 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
5723 (probe): Add a sanity check to make sure of our ability to read
5724 requested files when probing for filesystem type.
5725
5726 * genmk.rb: Update copyright year (2007).
5727
5728 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
5729 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
5730 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
5731 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
5732 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
5733 : Remove function prototypes.
5734
b95f71b5 57352008-01-25 Robert Millan <rmh@aybabtu.com>
5736
5737 Revert my previous commits (based on wrong assumption of how grub_errno
5738 works).
5739
fe6b695a 5740 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 5741 * kern/file.c (grub_file_open): Likewise.
5742
d08bbb49 57432008-01-24 Pavel Roskin <proski@gnu.org>
5744
5745 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
5746 that hang if GRUB tries to setup colors.
5747 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
5748 colors for firmwares that don't support it.
5749 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
5750 Recognize Open Hack'Ware, set flags to work around its
5751 limitations.
5752
605e36ed 57532008-01-24 Robert Millan <rmh@aybabtu.com>
5754
5755 * kern/file.c (grub_file_open): Do not account previous failures of
5756 unrelated functions when grub_errno is checked for.
5757 Reported by Oleg Strikov.
5758
bac332a1 57592008-01-24 Bean <bean123ch@gmail.com>
5760
5761 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
5762 (grub_ufs_sblock): New member volume name.
5763 (grub_ufs_find_file): Fix string copy bug.
5764 (grub_ufs_label): Implement this function properly.
5765
5766 * fs/hfs.c (grub_hfs_cnid_type): New enum.
5767 (grub_hfs_iterate_records): Use the correct file number for extents
5768 and catalog file. Fix problem in next index calculation.
5769 (grub_hfs_find_node): Replace recursive function call with loop.
5770 (grub_hfs_iterate_dir): Replace recursive function call with loop.
5771
15c80c09 57722008-01-23 Robert Millan <rmh@aybabtu.com>
5773
5774 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
5775 `<grub/symbol.h>' and `<grub/multiboot.h>'.
5776 (grub_multiboot2_real_boot): New function prototype.
5777
5778 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
5779 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
5780
5781 * kern/i386/ieee1275/init.c (grub_os_area_addr)
5782 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
5783
305338fd 57842008-01-23 Robert Millan <rmh@aybabtu.com>
5785
5786 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
5787 #ifdef'ed out grub_printf().
5788
3ea52685 57892008-01-23 Robert Millan <rmh@aybabtu.com>
5790
5791 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
5792 grub_dprintf calls, since they make "debug=all" mode unusable.
5793 (grub_console_checkkey): Likewise.
5794
5882ae4b 57952008-01-23 Robert Millan <rmh@aybabtu.com>
5796
5797 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5798 `term/i386/pc/at_keyboard.c'.
5799 (pkglib_MODULES): Add `serial.mod'.
5800 (serial_mod_SOURCES): New variable.
5801 (serial_mod_CFLAGS): Likewise.
5802 (serial_mod_LDFLAGS): Likewise.
5803
5804 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
5805 `<grub/powerpc/ieee1275/console.h>'.
5806 (grub_keyboard_controller_init): New function prototype.
5807 (grub_console_checkkey): Likewise.
5808 (grub_console_getkey): Likewise.
5809
5810 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
5811 keyboard on i386.
5812
5813 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
5814 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
5815
06ab5303 58162008-01-23 Robert Millan <rmh@aybabtu.com>
5817
5818 * kern/i386/pc/init.c (make_install_device): When memdisk image is
5819 present, "(memdisk)/boot/grub" becomes the default prefix.
5820
5821 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
5822 a memdisk tarball with all the modules. Add --overlay=DIR option that
5823 allows users to overlay additional files into the image.
5824
dbb475a4 58252008-01-23 Robert Millan <rmh@aybabtu.com>
5826
5827 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
5828 and `machine/memory.h'.
5829 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
5830 (_multiboot_mod_SOURCES): New variable.
5831 (_multiboot_mod_CFLAGS): Likewise.
5832 (_multiboot_mod_LDFLAGS): Likewise.
5833 (multiboot_mod_SOURCES): Likewise.
5834 (multiboot_mod_CFLAGS): Likewise.
5835 (multiboot_mod_LDFLAGS): Likewise.
5836
5837 * include/grub/i386/ieee1275/loader.h: New file.
5838
5839 * include/grub/i386/ieee1275/machine.h: Likewise.
5840
5841 * include/grub/i386/ieee1275/memory.h: Likewise.
5842
5843 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
5844 variable declaration.
5845 (grub_os_area_size): Likewise.
5846
5847 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
5848 (grub_lower_mem, grub_upper_mem): New variables.
5849 (grub_stop_floppy): New function (just to make
5850 grub_multiboot2_real_boot() happy).
5851
5852 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
5853 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
5854 (grub_stop): New function.
5855 Include `"../realmode.S"' and `"../loader.S"'.
5856
5857 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5858 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5859
5860 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5861 rely on grub_multiboot2_real_boot() for final boot.
5862
25638629 58632008-01-22 Robert Millan <rmh@aybabtu.com>
5864
5865 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5866 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5867 device that doesn't look like an SD card.
5868 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5869 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5870 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5871 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5872 found.
5873
9dad816d 58742008-01-22 Robert Millan <rmh@aybabtu.com>
5875
5876 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5877 avoid claiming over our own code.
5878
34842f2d 58792008-01-22 Bean <bean123ch@gmail.com>
5880
5881 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5882 (jpeg_mod_SOURCES): New variable.
5883 (jpeg_mod_CFLAGS): Likewise.
5884 (jpeg_mod_LDFLAGS): Likewise.
5885
5886 * video/readers/jpeg.c : New file.
5887
44023a28 58882008-01-22 Bean <bean123ch@gmail.com>
5889
5890 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5891 there are no more items.
5892
bc2d8ac6 58932008-01-21 Robert Millan <rmh@aybabtu.com>
5894
5895 * kern/mm.c (grub_mm_init_region): Improve debug message.
5896
261bd4bc 58972008-01-21 Robert Millan <rmh@aybabtu.com>
5898
5899 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5900 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5901 address.
5902 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5903 a C macro.
5904 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5905 Indicates start of upper memory.
5906 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5907 (generate_image): Abort when image size is big enough to corrupt
5908 upper memory.
5909
5910 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5911 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5912 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5913 instead of hardcoding 0xA0000.
5914 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5915 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5916 instead of hardcoding 0xA0000.
5917
f970b55e 59182008-01-21 Robert Millan <rmh@aybabtu.com>
5919
5920 * disk/memdisk.c (memdisk_size): New variable.
5921 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5922 `memdisk_size'.
5923 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
5924 image to dynamic memory.
5925 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5926 `memdisk_size'. Free memdisk block.
5927
1a8b0526 59282008-01-21 Robert Millan <rmh@aybabtu.com>
5929
5930 Fix detection of very small filesystems (like tar).
5931
5932 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5933 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5934 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5935 a problem with this disk).
5936
6e9b4aab 59372008-01-21 Robert Millan <rmh@aybabtu.com>
5938
5939 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5940 on grub_biosdisk_rw_standard() error.
5941
0d8837b2 59422008-01-21 Robert Millan <rmh@aybabtu.com>
5943
5944 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5945 recent changes.
5946 * kern/elf.c: Likewise.
5947 * kern/ieee1275/ieee1275.c: Likewise.
5948 * kern/powerpc/ieee1275/openfw.c: Likewise.
5949 * term/ieee1275/ofconsole.c: Likewise.
5950
ffd36e34 59512008-01-21 Robert Millan <rmh@aybabtu.com>
5952
5953 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5954
3f0093d0 5955 * include/grub/kernel.h (grub_arch_memdisk_addr)
5956 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 5957
3f0093d0 5958 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5959 (grub_arch_memdisk_size): ... to here.
ffd36e34 5960
6c391b21 59612008-01-21 Robert Millan <rmh@aybabtu.com>
5962
5963 Mostly based on bugfix from Bean.
5964
5965 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5966 attribute with hook() parameter.
5967 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5968 declaration.
5969 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5970 attribute with hook() parameter.
5971 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5972 declaration.
5973
55a581dc 59742008-01-21 Robert Millan <rmh@aybabtu.com>
5975
5976 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5977 (pkglib_MODULES): Add `memdisk.mod'.
5978 (memdisk_mod_SOURCES): New variable.
5979 (memdisk_mod_CFLAGS): Likewise.
5980 (memdisk_mod_LDFLAGS): Likewise.
5981
5982 * disk/memdisk.c: New file.
5983
5984 * include/grub/disk.h (grub_disk_dev_id): Add
5985 `GRUB_DISK_DEVICE_MEMDISK_ID'.
5986
5987 * include/grub/i386/pc/kernel.h
5988 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5989 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5990 (grub_kernel_image_size): New variable declaration.
5991 (grub_total_module_size): Likewise.
5992 (grub_memdisk_image_size): Likewise.
5993
5994 * include/grub/i386/pc/memory.h
5995 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5996
5997 * include/grub/kernel.h: Include `<grub/symbol.h>'.
5998 (grub_arch_memdisk_addr): New variable declaration.
5999 (grub_arch_memdisk_size): Likewise.
6000
6001 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
6002 (grub_arch_memdisk_size): Likewise.
6003
6004 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
6005 (codestart): Replace hardcoded `0x100000' with
6006 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
6007
6008 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
6009 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
6010 not NULL, append the contents of the file it refers to, at the end of
6011 the compressed kernel image. Initialize `grub_memdisk_image_size'
6012 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
6013 (options): Add "memdisk"|'m' option.
6014 (main): Parse --memdisk|-m option, and pass user-provided path as
6015 parameter to generate_image().
6016
3d7f54c9 60172008-01-20 Robert Millan <rmh@aybabtu.com>
6018
6019 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
6020 grub_dprintf() calls from here ...
6021 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
6022
0bf74728 60232008-01-20 Robert Millan <rmh@aybabtu.com>
6024
6025 Fix detection of "real mode" when /options/real-mode? doesn't exist.
6026
6027 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
6028 declaration.
6029 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
6030 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
6031 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 6032 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 6033 property).
6034 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
6035 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
6036
33bf70a7 60372008-01-19 Robert Millan <rmh@aybabtu.com>
6038
fe6b695a 6039 Get rid of confusing function (superseded by
33bf70a7 6040 `grub_ieee1275_get_integer_property')
6041 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
6042 prototype.
6043 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
6044 function.
6045 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
6046 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 6047 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 6048
e2da7d26 60492008-01-19 Robert Millan <rmh@aybabtu.com>
6050
6051 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
6052 command after "shut-down", since implementations differ on which
6053 the command for halt is.
6054
59f1fd8d 60552008-01-19 Robert Millan <rmh@aybabtu.com>
6056
6057 * include/grub/i386/linuxbios/console.h: Add header protection.
6058 (grub_keyboard_controller_init): New function prototype.
6059 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
6060 (KEYBOARD_COMMAND_READ): Likewise.
6061 (KEYBOARD_COMMAND_WRITE): Likewise.
6062 (KEYBOARD_SCANCODE_SET1): Likewise.
6063 (grub_keyboard_controller_write): New function.
6064 (grub_keyboard_controller_read): Likewise.
6065 (grub_keyboard_controller_init): Likewise.
6066
6067 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
6068 (grub_console_init): On coreboot/LinuxBIOS, call
6069 grub_keyboard_controller_init().
6070
5f5a7c15 60712008-01-19 Robert Millan <rmh@aybabtu.com>
6072
6073 PowerPC changes provided by Pavel Roskin.
6074
6075 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
6076 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
6077 don't rely on cmain() doing it.
6078 * kern/i386/ieee1275/startup.S (_start): Store %eax in
6079 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
6080
1210e168 60812008-01-16 Robert Millan <rmh@aybabtu.com>
6082
6083 * include/grub/i386/linuxbios/memory.h
6084 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
6085 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
6086 receive `table_header' as argument. Instead, probe for it in the
6087 known memory ranges where it can be present.
6088 (grub_available_iterate): Do not pass a fixed `table_header' address
6089 to grub_linuxbios_table_iterate().
6090
3d04eab8 60912008-01-15 Robert Millan <rmh@aybabtu.com>
6092
6093 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
6094 * conf/i386-ieee1275.rmk: New file.
6095 * include/grub/i386/ieee1275/console.h: Likewise.
6096 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
6097 * include/grub/i386/ieee1275/kernel.h: Likewise.
6098 * include/grub/i386/ieee1275/time.h: Likewise.
6099 * kern/i386/ieee1275/init.c: Likewise.
6100 * kern/i386/ieee1275/startup.S: Likewise.
6101
d1bc1b73 61022008-01-15 Robert Millan <rmh@aybabtu.com>
6103
6104 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
6105 when pointers are 32-bit (but still do set it to one when they are
6106 64-bit).
6107
66a65807 61082008-01-15 Robert Millan <rmh@aybabtu.com>
6109
6110 * include/grub/ieee1275/ieee1275.h
6111 (grub_ieee1275_get_integer_property): New function prototype.
6112
6113 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
6114 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 6115 grub_ieee1275_get_property() to handle endianness.
66a65807 6116
6117 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
6118 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 6119 where appropriate.
66a65807 6120 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
6121 (grub_map): Likewise.
6122 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
6123
a83ccafd 61242008-01-15 Bean <bean123ch@gmail.com>
6125
6126 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
6127 (grub_script_execute_cmdline): Reset grub_errno.
6128
6129 * normal/main.c (read_config_file): Reset grub_errno.
6130
6131 * normal/parse.y (script_init): New.
6132 (script): Move function and menuentry here.
6133 (delimiter): New.
6134 (command): Add delimiter at the end of command.
6135 (commands): Adjust to match the new command.
6136 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 6137 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 6138 (if): Use the new commands.
6139
6140 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
6141
df6ecfc6 61422008-01-15 Robert Millan <rmh@aybabtu.com>
6143
6144 * normal/menu.c (run_menu): Move timeout message from here ...
6145 (print_timeout): ... to here.
6146 (run_menu): Use print_timeout() once during initial draw to print
6147 the whole message, and again in every clock tick to update only
6148 the number of seconds.
6149
87ae25eb 61502008-01-15 Robert Millan <rmh@aybabtu.com>
6151
6152 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
6153 actual size of `available' from grub_ieee1275_get_property(), and
6154 restrict parsing to that bound.
6155
47bf09a4 61562008-01-15 Christian Franke <franke@computer.org>
6157
6158 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
6159 (argp_program_version): Remove variable.
6160 (argp_program_bug_address): Likewise.
6161 (options): Convert from struct argp_option to struct option.
6162 (struct arguments): Remove.
6163 (parse_opt): Remove.
6164 (usage): New function.
6165 (main): Replace struct args members by simple variables.
6166 Replace argp_parse() by getopt_long().
6167 Add switch to evaluate options.
6168 Add missing "(...)" around root_dev in prefix string.
6169
c86f1469 61702008-01-14 Robert Millan <rmh@aybabtu.com>
6171
6172 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
6173 for grub_ieee1275_exit(), in order to improve portability.
6174
e622c559 61752008-01-14 Robert Millan <rmh@aybabtu.com>
6176
6177 * util/grub.d/10_linux.in (prefix): Define.
6178 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
6179
44cb1ec8 61802008-01-13 Pavel Roskin <proski@gnu.org>
6181
6182 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
6183 grub_errno if no errors have been detected.
6184
1eb8c802 61852008-01-12 Robert Millan <rmh@aybabtu.com>
6186
6187 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
6188 (grub_util_get_dev_abstraction): New function prototype.
6189
6190 * util/getroot.c: Include `<grub/util/getroot.h>'
6191 (grub_util_get_grub_dev): Move detection of abstraction type to ...
6192 (grub_util_get_dev_abstraction): ... here (new function).
6193
6194 * util/grub-probe.c: Convert PRINT_* to an enum. Add
6195 `PRINT_ABSTRACTION'.
6196 (probe): Probe for abstraction type when requested.
6197 (main): Understand `--target=abstraction'.
6198
6199 * util/i386/efi/grub-install.in: Add abstraction module to core
6200 image when it is found to be necessary.
6201 * util/i386/pc/grub-install.in: Likewise.
6202 * util/powerpc/ieee1275/grub-install.in: Likewise.
6203
6204 * util/update-grub_lib.in (font_path): Return system path without
6205 converting to GRUB path.
6206 * util/update-grub.in: Convert system path returned by font_path()
6207 to a GRUB path. Use `grub-probe -t abstraction' to determine what
6208 abstraction module is needed for loading fonts (if any). Export
6209 that as `GRUB_PRELOAD_MODULES'.
6210 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
6211 insmod commands).
6212
52bd3de9 62132008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
6214
6215 Remove some unused code from reiserfs.
f19dbdb7 6216
52bd3de9 6217 * fs/reiserfs.c (struct grub_reiserfs_key)
6218 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
6219 (struct grub_reiserfs_node_body): Removed.
6220 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6221 Likewise.
6222 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6223 Likewise.
6224 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6225 Likewise.
6226 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6227 Likewise.
6228 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6229 Likewise.
6230 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
6231 Likewise.
6232 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6233 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6234 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6235
2f80039d 62362008-01-10 Robert Millan <rmh@aybabtu.com>
6237
6238 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
6239 Determines if a file is garbage left by packaging systems, etc.
6240 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
6241 for processing /etc/grub.d scripts.
6242 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
6243 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
6244 as a condition for processing Linux images.
6245
87888032 62462008-01-10 Pavel Roskin <proski@gnu.org>
6247
6248 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
6249 to compile reiserfs.c on PowerPC.
6250
7e54fced 62512008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 6252
6253 * kern/device.c (grub_device_iterate): Do not abort device iteration
6254 when one of the devices cannot be opened.
6255 * kern/disk.c (grub_disk_open): Do not account previous failures of
6256 unrelated functions when grub_errno is checked for.
6257
5aa541e6 62582008-01-08 Robert Millan <rmh@aybabtu.com>
6259
6260 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
6261 `! grub_linux_is_bzimage', change order of address comparison to make
6262 it more intuitive, and improve "too big zImage" error message.
6263
7076340d 62642008-01-08 Robert Millan <rmh@aybabtu.com>
6265
6266 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
6267 `$(update-grub_DATA)'.
6268 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
6269 targets.
6270
9ca70333 62712008-01-07 Robert Millan <rmh@aybabtu.com>
6272
6273 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
6274 which instruction is modified by grub-setup during installation
6275 (since it wasn't obvious by only looking at this file).
6276
38ccf575 62772008-01-07 Robert Millan <rmh@aybabtu.com>
6278
6279 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
6280 listing actual TODO items.
6281
f5db4291 62822008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6283
868967cf 6284 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
6285 correctly.
6286 (grub_reiserfs_get_key_offset): Likewise.
6287 (grub_reiserfs_set_key_offset): Likewise.
6288 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 6289 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 6290
6291 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
6292 better to remove the bitfield version completely.
f19dbdb7 6293
868967cf 62942008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 6295
f5db4291 6296 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
6297 allocated from the heap, due to the fshelp implementation.
6298 (grub_reiserfs_dir): Free NODE, due to the same reason.
6299
492e6d9d 63002008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6301
6302 Mostly from Vincent Pelletier:
f19dbdb7 6303
492e6d9d 6304 * fs/reiserfs.c: New file.
f19dbdb7 6305
492e6d9d 6306 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
6307 (reiserfs_mod_SOURCES): New variable.
6308 (reiserfs_mod_CFLAGS): Likewise.
6309 (reiserfs_mod_LDFLAGS): Likewise.
6310
6311 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
6312 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
6313 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
6314 normal/color.c.
6315
9ce3e7c1 63162008-01-06 Robert Millan <rmh@aybabtu.com>
6317
6318 * normal/color.c: Remove `<grub/env.h>'.
6319
f3b58148 63202008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
6321
6322 * include/grub/normal.h: Include <grub/env.h>.
6323
7ac3bcfa 63242008-01-05 Robert Millan <rmh@aybabtu.com>
6325
6326 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
6327 usage example with `(hd0,1)'.
fb358190 6328 Reported by Samuel Thibault.
7ac3bcfa 6329
c8ee99d7 63302008-01-05 Robert Millan <rmh@aybabtu.com>
6331
6332 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
6333 (grub_linux_boot_zimage): Rename to ...
6334 (grub_linux_boot): ... this.
6335 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
6336 (grub_linux_boot_zimage): Conditionalize zImage copy.
6337
6338 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
6339 (grub_linux_boot_bzimage): Remove prototype.
6340 (grub_linux_boot_zimage): Rename to ...
6341 (grub_linux_boot): ... this.
6342
6343 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
6344 (grub_linux_boot): Remove function.
6345
0ece25b1 63462008-01-05 Robert Millan <rmh@aybabtu.com>
6347
6348 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
6349 (grub_env_write_color_highlight): Likewise.
6350 (grub_wait_after_message): Likewise.
6351
6352 * normal/color.c: New file.
6353
6354 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6355 (normal_mod_DEPENDENCIES): Likewise.
6356
6357 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6358 (normal_mod_DEPENDENCIES): Likewise.
6359
6360 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6361 (normal_mod_DEPENDENCIES): Likewise.
6362
6363 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6364 (normal_mod_DEPENDENCIES): Likewise.
6365
6366 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
6367 for waiting after a message is printed.
6368 * normal/main.c (read_config_file): Likewise.
6369 (grub_normal_init): Register grub_env_write_color_normal() and
6370 grub_env_write_color_highlight() hooks. Mark `color_normal' and
6371 `color_highlight' variables as global.
6372
6373 * normal/menu.c (grub_wait_after_message): New function.
6374 (grub_color_menu_normal): New variable. Replaces ...
6375 (GRUB_COLOR_MENU_NORMAL): ... this macro.
6376 (grub_color_menu_highlight): New variable. Replaces ...
6377 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
6378 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
6379 `GRUB_TERM_COLOR_STANDARD'.
6380 (print_message): Use `grub_setcolorstate' to reload colors. Rename
6381 `normal_code' and `highlight_code' to `old_color_normal' and
6382 `old_color_highlight', respectively.
6383 (grub_menu_init_page): Update colors when drawing the menu, based on
6384 `menu_color_normal' and `menu_color_highlight' variables.
6385 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
6386 a message is printed.
6387
182dd4e5 63882008-01-05 Robert Millan <rmh@aybabtu.com>
6389
6390 * kern/env.c (grub_env_context_open): Propagate hooks for global
6391 variables to new context.
6392
6393 * kern/main.c (grub_set_root_dev): Export `root' variable.
6394
ddf8f6ad 63952008-01-05 Robert Millan <rmh@aybabtu.com>
6396
6397 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 6398 discs unconditionally, since udev and others have options to provide
ddf8f6ad 6399 them.
6400
d8b43d9b 64012008-01-05 Robert Millan <rmh@aybabtu.com>
6402
6403 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
6404
2bff2de3 64052008-01-04 Christian Franke <franke@computer.org>
6406
6407 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
6408 of eisa_mmap.
6409
97eab917 64102008-01-03 Pavel Roskin <proski@gnu.org>
6411
6412 * kern/i386/linuxbios/init.c: Put "void" to all function
6413 declarations with no arguments.
6414 * kern/powerpc/ieee1275/init.c: Likewise.
6415 * term/i386/pc/at_keyboard.c: Likewise.
6416 * term/i386/pc/vga_text.c: Likewise.
6417 * util/grub-mkdevicemap.c: Likewise.
6418
b9416d00 64192008-01-02 Robert Millan <rmh@aybabtu.com>
6420
6421 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
6422 message when loaded image is out of bounds.
6423 (grub_multiboot_load_elf64): Likewise.
6424
92695df9 64252008-01-02 Pavel Roskin <proski@gnu.org>
6426
6427 * util/grub.d/10_linux.in: Try version without ".old" when
6428 looking for initrd. It's better to use initrd from the newer
6429 kernel of the same version than no initrd at all.
6430
d98d9cad 64312008-01-01 Robert Millan <rmh@aybabtu.com>
6432
6433 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
6434
dbfdce36 64352008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
6436
f19dbdb7 6437 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 6438 grub_video_get_active_render_target.
6439 (grub_video_adapter): Added unmap_color and get_active_render_target.
6440
f19dbdb7 6441 * video/video.c: Added grub_video_unmap_color and
dbfdce36 6442 grub_video_get_active_render_target.
6443 (grub_video_get_info): Changed method to accept NULL pointer as an
6444 argument to allow detection of active video adapter.
6445
6446 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
6447 grub_video_vbe_unmap_color_int.
6448 Added grub_video_vbe_unmap_color and
6449 grub_video_vbe_get_active_render_target.
6450 (grub_video_vbe_adapter): Added unmap_color and
6451 get_active_render_target.
6452
f19dbdb7 6453 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 6454 with grub_video_vbe_unmap_color_int.
6455
6456 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
6457 (DEFAULT_NORMAL_COLOR): Likewise.
6458 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
6459 (DEFAULT_FG_COLOR): Removed.
6460 (DEFAULT_BG_COLOR): Likewise.
6461 (DEFAULT_CURSOR_COLOR): Changed value.
6462 (grub_virtual_screen): Added standard_color_setting,
6463 normal_color_setting, highlight_color_setting and term_color.
6464 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
6465 (bitmap_width): Added.
6466 (bitmap_height): Likewise.
6467 (bitmap): Likewise.
6468 (set_term_color): Likewise.
6469 (grub_virtual_screen_setup): Changed to use new terminal coloring
6470 settings.
6471 (grub_gfxterm_init): Added init for bitmap.
6472 (grub_gfxterm_fini): Added destroy for bitmap.
6473 (redraw_screen_rect): Updated to use background bitmap and new
6474 terminal coloring.
6475 (scroll_up): Added optimization for case when there is no bitmap.
6476 (grub_gfxterm_cls): Fixed to use correct background color.
6477 (grub_virtual_screen_setcolorstate): Changed to use new terminal
6478 coloring.
6479 (grub_virtual_screen_setcolor): Likewise.
6480 (grub_virtual_screen_getcolor): Added.
6481 (grub_gfxterm_background_image_cmd): Likewise.
6482 (grub_video_term): Added setcolor and getcolor.
6483 (MOD_INIT): Added registration of background_image command.
6484 (MOD_TERM): Added unregistration for background_image command.
6485
c3c20931 64862007-12-30 Pavel Roskin <proski@gnu.org>
6487
6488 * loader/multiboot_loader.c: Fix multiboot command
6489 unregistration. Fix all typos in the word "multiboot".
6490
df266716 64912007-12-29 Pavel Roskin <proski@gnu.org>
94239199 6492
6493 * util/grub.d/10_linux.in: Refactor search for initrd. Add
6494 support for initrd names used in Fedora.
6495
fc6e896c 64962007-12-26 Bean <bean123ch@gmail.com>
6497
6498 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
6499 (cpio_mod_SOURCES): New variable.
6500 (cpio_mod_CFLAGS): Likewise.
6501 (cpio_mod_LDFLAGS): Likewise.
6502
6503 * fs/cpio.c: New file.
6504
6505 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
6506
6507 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6508
6509 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6510
6511 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6512
533110ad 65132007-12-25 Robert Millan <rmh@aybabtu.com>
6514
6515 * include/grub/term.h (struct grub_term): Add `getcolor' function.
6516 (grub_getcolor): New function.
6517
6518 * kern/term.c (grub_getcolor): New function.
6519 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
6520 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
6521 (print_entry): Set normal and highlight colors to
6522 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
6523 respectively, before printing and restore them to old
6524 values afterwards.
6525 (grub_menu_init_page): Likewise. Fill an additional colored space
6526 that would otherwise be left blank.
6527
6528 * term/efi/console.c (grub_console_getcolor): New function.
6529 (struct grub_console_term.getcolor): New variable.
6530 * term/i386/pc/console.c (grub_console_getcolor): New function.
6531 (struct grub_console_term.getcolor): New variable.
6532 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
6533 (struct grub_console_term.getcolor): New variable.
6534
6535 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
6536 (struct grub_console_term.setcolor): Remove variable.
6537 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
6538 (struct grub_console_term.setcolor): Remove variable.
6539 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
6540 (struct grub_console_term.setcolor): Remove variable.
6541 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
6542 (struct grub_console_term.setcolor): Remove variable.
6543
4931827f 65442007-12-25 Robert Millan <rmh@aybabtu.com>
6545
6546 * configure.ac: Search for possible unifont.hex locations, and
6547 define UNIFONT_HEX if found.
6548
6549 * Makefile.in (UNIFONT_HEX): Define variable.
6550 (DATA): Rename to ...
6551 (PKGLIB): ... this. Update all users.
6552 (PKGDATA): New variable.
6553 (pkgdata_IMAGES): Rename to ...
6554 (pkglib_IMAGES): ... this. Update all users.
6555 (pkgdata_MODULES): Rename to ...
6556 (pkglib_MODULES): ... this. Update all users.
6557 (pkgdata_PROGRAMS): Rename to ...
6558 (pkglib_PROGRAMS): ... this. Update all users.
6559 (pkgdata_DATA): Rename to ...
6560 (pkglib_DATA): ... this. Update all users.
6561 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
6562 (unicode.pff, ascii.pff): New rules.
6563 (all-local): Add `$(PKGDATA)' dependency.
6564 (install-local): Process `$(PKGDATA)'.
6565
6566 * util/update-grub_lib.in (font_path): Search for *.pff files in
6567 a few more locations, including `${pkgdata}'.
6568
57e57e31 65692007-12-23 Robert Millan <rmh@aybabtu.com>
6570
6571 Patch from Bean <bean123ch@gmail.com>:
6572 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
6573 `size'.
6574
4bc72aa9 65752007-12-21 Bean <bean123ch@gmail.com>
6576
6577 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
6578 (ntfscomp_mod_SOURCES): New variable.
6579 (ntfscomp_mod_CFLAGS): Likewise.
6580 (ntfscomp_mod_LDFLAGS): Likewise.
6581
6582 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
6583 (grub_probe_SOURCES): Likewise.
6584 (grub_emu_SOURCES): Likewise.
6585
6586 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6587 (grub_emu_SOURCES): Likewise.
6588
6589 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6590 (grub_emu_SOURCES): Likewise.
6591
6592 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6593 (grub_emu_SOURCES): Likewise.
6594
6595 * fs/ntfs.c (grub_ntfscomp_func): New variable.
6596 (read_run_list): Renamed to grub_ntfs_read_run_list.
6597 (decomp_nextvcn): Moved to ntfscomp.c.
6598 (decomp_getch): Likewise.
6599 (decomp_get16): Likewise.
6600 (decomp_block): Likewise.
6601 (read_block): Likewise.
6602 (read_data): Partially moved to ntfscomp.c.
6603 (fixup): Change unsigned to grub_uint16_t.
6604 (read_mft): Change unsigned long to grub_uint32_t.
6605 (read_attr): Likewise.
6606 (read_data): Likewise.
6607 (read_run_data): Likewise.
6608 (read_run_list): Likewise.
6609 (read_mft): Likewise.
6610
6611 * fs/ntfscomp.c: New file.
6612
6613 * include/grub/ntfs.h: New file.
6614
af680a87 66152007-12-16 Robert Millan <rmh@aybabtu.com>
6616
6617 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
6618 IDE disk check, since Linux is known to support 20 IDE disks.
6619 Reported by Colin Watson.
6620
84be7599 66212007-12-15 Bean <bean123ch@gmail.com>
6622
6623 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
6624 (lnxboot_img_SOURCES): New variable.
6625 (lnxboot_img_ASFLAGS): Likewise.
6626 (lnxboot_img_LDFLAGS): Likewise.
6627
6628 * boot/i386/pc/lnxboot.S: New file.
6629
6af9db01 66302007-11-24 Pavel Roskin <proski@gnu.org>
6631
6632 * configure.ac: Test if '--build-id=none' is supported by the
6633 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
6634 objcopy to generate incorrect binary files (binutils
6635 2.17.50.0.18-1 as shipped by Fedora 8).
6636 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
6637 linking, so that build ID doesn't break the test.
6638
7361cfe6 66392007-11-24 Pavel Roskin <proski@gnu.org>
6640
6641 * include/grub/i386/time.h: use "void" in the argument list
6642 of grub_cpu_idle().
6643 * include/grub/powerpc/time.h: Likewise.
6644 * include/grub/sparc64/time.h: Likewise.
6645
1593e10c 66462007-11-18 Christian Franke <franke@computer.org>
6647
6648 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
6649 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
6650 This fixes the problem that function keys did not work in grub-emu.
6651
3b8db1a8 66522007-11-18 Christian Franke <franke@computer.org>
6653
6654 * disk/host.c (grub_host_open): Remove attribute unused from
6655 name parameter. Add check for "host". This fixes the problem
6656 that grub-emu does not find partitions.
6657
2e29408d 66582007-11-18 Christian Franke <franke@computer.org>
6659
6660 * util/hostfs.c (is_dir): New function.
6661 (grub_hostfs_dir): Handle missing dirent.d_type case.
6662 (grub_hostfs_read): Add missing fseek().
6663 (grub_hostfs_label): Clear label pointer. This fixes a crash
6664 of grub-emu on "ls (host)".
6665
398cd047 66662007-11-18 Christian Franke <franke@computer.org>
6667
6668 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
6669 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
6670 to 64 bit boundary by default.
6671
c405c391 66722007-11-18 Bean <bean123ch@gmail.com>
6673
6674 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
6675 (hexdump_mod_SOURCES): New variable.
6676 (hexdump_mod_CFLAGS): Likewise.
6677 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 6678
c405c391 6679 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6680
6681 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6682
6683 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6684
6685 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6686
6687 * include/grub/hexdump.h: New file.
6688
6689 * commands/hexdump.c: New file.
6690
5cced7fd 66912007-11-10 Robert Millan <rmh@aybabtu.com>
6692
6693 * commands/i386/pc/play.c (beep_off): Switch order of arguments
6694 in grub_outb() calls.
6695 (beep_on): Likewise.
6696
8b714eb0 66972007-11-10 Christian Franke <franke@computer.org>
6698
6699 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
6700 (grub_menu_run): Likewise.
6701
ce0f1839 67022007-11-10 Robert Millan <rmh@aybabtu.com>
6703
6704 * include/grub/i386/efi/machine.h: New file.
6705 * include/grub/i386/linuxbios/machine.h: Likewise.
6706 * include/grub/i386/pc/machine.h: Likewise.
6707 * include/grub/powerpc/ieee1275/machine.h: Likewise.
6708 * include/grub/sparc64/ieee1275/machine.h: Likewise.
6709
6710 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
6711 (serial_hw_io_addr): New variable.
6712 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
6713 instead of `(unsigned short *) 0x400'.
6714
270c237d 67152007-11-10 Bean <bean123ch@gmail.com>
6716
6717 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
6718
a87783bf 67192007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6720
6721 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
6722 (vga_mod_SOURCES): Added.
6723 (vga_mod_CFLAGS): Likewise.
6724 (vga_mod_LDFLAGS): Likewise.
6725
6726 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
6727 grub_outb() calls.
6728 (set_map_mask): Likewise.
6729 (set_read_map): Likewise.
6730 (set_read_address): Likewise.
6731 (vga_font): Removed variable.
6732 (get_vga_glyph): Removed function.
6733 (invalidate_char): Likewise.
6734 (write_char): Changed to use grub_font_get_glyph() for font
6735 information.
6736 (grub_vga_putchar): Likewise.
6737 (grub_vga_getcharwidth): Likewise.
6738
6433b448 67392007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6740
6741 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
6742 flags.
6743 (pxeboot_img_LDFLAGS): Likewise.
6744 (diskboot_img_LDFLAGS): Likewise.
6745 (kernel_img_LDFLAGS): Likewise.
6746
49178511 67472007-11-06 Robert Millan <rmh@aybabtu.com>
6748
6749 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
6750 in grub_outb() calls.
6751 (serial_hw_init): Likewise.
6752
53b052de 67532007-11-05 Robert Millan <rmh@aybabtu.com>
6754
6755 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
6756 spaces. Skip non-regular files.
6757
5ab33bba 67582007-11-05 Robert Millan <rmh@aybabtu.com>
6759
6760 * kern/disk.c (grub_disk_firmware_fini)
6761 (grub_disk_firmware_is_tainted): New variables.
6762
6763 * include/grub/disk.h (grub_disk_firmware_fini)
6764 (grub_disk_firmware_is_tainted): Likewise.
6765
6766 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
6767 (grub_disk_biosdisk_fini): ... to here.
6768 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
6769 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
6770 is set. Register grub_disk_biosdisk_fini() in
6771 `grub_disk_firmware_fini'.
6772
6773 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
6774 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
6775 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
6776 to finish existing firmware disk interface.
6777
6778 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
6779 (ata_mod_SOURCES): New variable.
6780 (ata_mod_CFLAGS): Likewise.
6781 (ata_mod_LDFLAGS): Likewise.
6782
0149ab7c 67832007-11-05 Robert Millan <rmh@aybabtu.com>
6784
6785 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
6786 (grub_ata_wait): Reimplement using grub_millisleep().
6787
6788 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
6789 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
6790
be7ac41e 67912007-11-03 Marco Gerards <marco@gnu.org>
6792
6793 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
6794 (CRTC_ADDR_PORT): New macro.
6795 (CRTC_DATA_PORT): Likewise.
6796 (CRTC_CURSOR): Likewise.
6797 (CRTC_CURSOR_ADDR_HIGH): Likewise.
6798 (CRTC_CURSOR_ADDR_LOW): Likewise.
6799 (update_cursor): New function.
6800 (grub_console_real_putchar): Call `update_cursor'.
6801 (grub_console_gotoxy): Likewise.
6802 (grub_console_cls): Set the default color when clearing the
6803 screen.
6804 (grub_console_setcursor): Implemented.
6805
bb06ab2e 68062007-11-03 Marco Gerards <marco@gnu.org>
6807
6808 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
6809 become activate.
6810 (grub_ata_pio_write): Likewise.
6811
6812 (grub_atapi_identify): Wait after issuing an ATA command.
6813 (grub_atapi_packet): Likewise.
6814 (grub_ata_identify): Likewise.
6815 (grub_ata_readwrite): Likewise.
6816
cf8f780b 68172007-11-03 Marco Gerards <marco@gnu.org>
6818
6819 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
6820 (grub_ata_pio_write): Likewise.
6821 (grub_ata_readwrite): Use `grub_error', instead of
6822 returning `grub_errno'.
6823
ed649e54 68242007-11-03 Marco Gerards <marco@gnu.org>
6825
6826 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
6827 grub_ata_pio_write once for every single sector, instead of for
6828 multiple sectors.
6829
ca25d8f0 68302007-10-31 Robert Millan <rmh@aybabtu.com>
6831
6832 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
6833
6834 * conf/i386-linuxbios.rmk: New file.
6835
6836 * kern/i386/pc/hardware.c: Likewise.
6837 * term/i386/pc/at_keyboard.c: Likewise.
6838 * term/i386/pc/vga_text.c: Likewise.
6839
6840 * include/grub/i386/linuxbios/boot.h: Likewise.
6841 * include/grub/i386/linuxbios/console.h: Likewise.
6842 * include/grub/i386/linuxbios/init.h: Likewise.
6843 * include/grub/i386/linuxbios/kernel.h: Likewise.
6844 * include/grub/i386/linuxbios/loader.h: Likewise.
6845 * include/grub/i386/linuxbios/memory.h: Likewise.
6846 * include/grub/i386/linuxbios/serial.h: Likewise.
6847 * include/grub/i386/linuxbios/time.h: Likewise.
6848
6849 * kern/i386/linuxbios/init.c: Likewise.
6850 * kern/i386/linuxbios/startup.S: Likewise.
6851 * kern/i386/linuxbios/table.c: Likewise.
6852
e911ecc1 68532007-10-31 Marco Gerards <marco@gnu.org>
6854
6855 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6856 (ata_mod_SOURCES): New variable.
6857 (ata_mod_CFLAGS): Likewise.
6858 (ata_mod_LDFLAGS): Likewise.
6859
6860 * disk/ata.c: New file.
6861
6862 * include/grub/disk.h (grub_disk_dev_id): Add
6863 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 6864
7f66d0e0 68652007-10-31 Robert Millan <rmh@aybabtu.com>
6866
6867 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6868 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6869
6870 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6871 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6872
6873 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6874 `<grub/types.h>'.
6875
6876 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6877
5cd7dd46 68782007-10-27 Robert Millan <rmh@aybabtu.com>
6879
3236ca65 6880 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 6881
2ebfc90f 68822007-10-22 Robert Millan <rmh@aybabtu.com>
6883
6884 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
6885 `"../realmode.S"'.
6886 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
6887
73fcb0f3 68882007-10-22 Robert Millan <rmh@aybabtu.com>
6889
6890 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6891 (pkgdata_MODULES): Add `biosdisk.mod'.
6892 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6893 variables.
6894
6895 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6896 (grub_biosdisk_init): Replace with ...
6897 (GRUB_MOD_INIT(biosdisk)): ... this.
6898 (grub_biosdisk_fini): Replace with ...
6899 (GRUB_MOD_FINI(biosdisk)): ... this.
6900
6901 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6902 (grub_machine_init): Remove call to grub_biosdisk_init().
6903 (grub_machine_fini): Remove call to grub_machine_fini().
6904
6905 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6906
3381d274 69072007-10-22 Robert Millan <rmh@aybabtu.com>
6908
6909 * include/grub/time.h: New file.
6910 * include/grub/i386/time.h: Likewise.
6911 * include/grub/powerpc/time.h: Likewise.
6912 * include/grub/sparc64/time.h: Likewise.
6913
6914 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6915 instances to ...
6916 (KERNEL_MACHINE_TIME_HEADER): ... this.
6917 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6918 instances to ...
6919 (KERNEL_MACHINE_TIME_HEADER): ... this.
6920 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6921 instances to ...
6922 (KERNEL_MACHINE_TIME_HEADER): ... this.
6923
6924 * kern/i386/efi/init.c: Include `<grub/time.h>'.
6925 (grub_millisleep): New function.
6926 * kern/i386/pc/init.c: Include `<grub/time.h>'.
6927 (grub_millisleep): New function.
6928 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6929 Remove `grub/machine/time.h' include.
6930 (grub_millisleep): New function.
6931 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6932 Remove `grub/machine/time.h' include.
6933 (grub_millisleep): New function.
6934
6935 * include/grub/misc.h (grub_div_roundup): New function.
6936
6937 * kern/misc.c: Include `<grub/time.h>'.
6938 (grub_millisleep_generic): New function.
6939
6940 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6941 Add `time.h'.
6942 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6943 Add `time.h'.
6944 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6945 `machine/time.h'. Add `time.h'.
6946 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6947
a39a0312 69482007-10-21 Robert Millan <rmh@aybabtu.com>
6949
6950 * include/grub/misc.h (grub_max): New function.
6951
2aad70e2 69522007-10-21 Robert Millan <rmh@aybabtu.com>
6953
6954 * util/misc.c (grub_util_info): Call fflush() before returning.
6955
54b71c4b 69562007-10-20 Robert Millan <rmh@aybabtu.com>
6957
6958 * genmk.rb (Image): Copy `extra_flags' from here ...
6959 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
6960
6961 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6962 to `argc' and `args' arguments.
6963
a979f513 69642007-10-17 Robert Millan <rmh@aybabtu.com>
6965
6966 * kern/i386/loader.S: New file.
6967
6968 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6969 * kern/i386/loader.S (grub_linux_prot_size)... to here.
6970 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6971 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6972 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6973 * kern/i386/loader.S (grub_linux_real_addr)... to here.
6974 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6975 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6976 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6977 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6978 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6979 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6980 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6981 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6982
6983 * kern/i386/realmode.S: New file.
6984
6985 * kern/i386/pc/startup.S (protstack): Moved from here ...
6986 * kern/i386/realmode.S (protstack)... to here.
6987 * kern/i386/pc/startup.S (gdt): Moved from here ...
6988 * kern/i386/realmode.S (gdt)... to here.
6989 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6990 * kern/i386/realmode.S (prot_to_real)... to here.
6991
6992 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6993 `kern/i386/realmode.S'.
6994
825fc8fd 69952007-10-17 Robert Millan <rmh@aybabtu.com>
6996
6997 * include/grub/i386/loader.h: New file.
6998
6999 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
7000 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7001 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7002 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7003 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
7004 * include/grub/i386/loader.h (grub_linux_prot_size)
7005 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
7006 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
7007 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
7008 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
7009
7010 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
7011
e179b2f4 70122007-10-15 Robert Millan <rmh@aybabtu.com>
7013
7014 * normal/misc.c (grub_normal_print_device_info): Do not probe for
7015 filesystem when dev->disk is unset.
7016 Do probe for filesystem even when dev->disk->has_partitions is set.
7017 In case a filesystem is found, always report it.
7018 In case it isn't, if dev->disk->has_partitions is set, report that
7019 a partition table was found instead of reporting that no filesystem
7020 could be identified.
7021
5db82af6 70222007-10-12 Robert Millan <rmh@aybabtu.com>
7023
7024 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
7025 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
7026
68f6ac74 7027 * include/grub/types.h (grub_host_to_target16): New macro.
7028 (grub_host_to_target32): Likewise.
7029 (grub_host_to_target64): Likewise.
7030 (grub_target_to_host16): Likewise.
7031 (grub_target_to_host32): Likewise.
7032 (grub_target_to_host64): Likewise.
5db82af6 7033
7034 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7035 Renamed from to ...
7036 (GRUB_MOD_ALIGN): ...this. Update all users.
7037
68f6ac74 7038 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
7039 grub_host_to_target32.
7040 Replace grub_be_to_cpu32 with grub_target_to_host32.
7041 (load_modules): Likewise.
7042 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
7043 Replace grub_be_to_cpu32 with grub_target_to_host32.
7044 Replace grub_cpu_to_be16 with grub_host_to_target16.
7045 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 7046
3cf497cc 70472007-10-12 Robert Millan <rmh@aybabtu.com>
7048
7049 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
7050 * util/elf/grub-mkimage.c: ... here.
7051
7052 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
7053 `util/powerpc/ieee1275/grub-mkimage.c'.
7054
c8cc3692 70552007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 7056
c8cc3692 7057 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
7058 and make it easier to figure out.
7059 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
7060 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
7061 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
7062 leave us with less than HEAP_MIN_SIZE total heap.
7063 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 7064
5c58b791 70652007-10-03 Robert Millan <rmh@aybabtu.com>
7066
7067 * include/grub/i386/io.h: New file.
7068 * commands/i386/pc/play.c (inb): Removed.
7069 (outb): Removed.
7070 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7071 with grub_outb().
afcd2ef8 7072 * term/i386/pc/serial.c (inb): Removed.
7073 (outb): Removed.
7074 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7075 with grub_outb().
7076 * term/i386/pc/vga.c (inb): Removed.
7077 (outb): Removed.
7078 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7079 with grub_outb().
5c58b791 7080
1a477ed6 70812007-10-02 Robert Millan <rmh@aybabtu.com>
7082
7083 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
7084 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7085 Reported by Marcin Kurek.
7086
6b5d80fa 70872007-09-07 Robert Millan <rmh@aybabtu.com>
7088
7089 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
7090 SmartFirmware version updates (as released by Sven Luther), and avoid
7091 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
7092 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
7093 known broken.
7094
5618afbf 70952007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7096
7097 From Hitoshi Ozeki:
7098 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
7099 when merging two regions.
7100
6139dcd9 71012007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7102
508e39ee 7103 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
7104 * normal/completion.c (grub_normal_do_completion): Likewise.
7105 Reported by Hitoshi Ozeki.
7106
71072007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 7108
6139dcd9 7109 Do not use devices at boot in chainloading.
f19dbdb7 7110
6139dcd9 7111 * loader/i386/pc/chainloader.c (boot_drive): New variable.
7112 (boot_part_addr): Likewise.
7113 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
7114 with BOOT_DRIVE and BOOT_PART_ADDR.
7115 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
7116 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
7117
38da6516 71182007-08-29 Robert Millan <rmh@aybabtu.com>
7119
7120 Patch from Simon Peter <dn.tlp@gmx.net>:
7121 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
7122 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
7123 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
7124 util/i386/pc/grub-setup.c_DEPENDENCIES.
7125 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
7126 util/grub-probe.c_DEPENDENCIES.
7127 * conf/powerpc-ieee1275.rmk: Likewise.
7128
29d0928c 71292007-08-28 Robert Millan <rmh@aybabtu.com>
7130
7131 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
7132 to tell grub-mkdevicemap how to name devices.
7133 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
7134 feature).
7135
7136 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
7137 util/i386/get_disk_name.c.
7138 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
7139 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
7140 util/ieee1275/get_disk_name.c.
7141
7142 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
7143
7144 * DISTLIST: Add util/i386/get_disk_name.c and
7145 util/ieee1275/get_disk_name.c.
7146
7147 * util/grub-mkdevicemap.c: Replace device naming logic with
7148 grub_util_get_disk_name() calls.
7149
5a0d3cca 71502007-08-20 Robert Millan <rmh@aybabtu.com>
7151
7152 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
7153 (so that it works for both plural and singular quantities).
7154
8b72db2f 71552007-08-05 Robert Millan <rmh@aybabtu.com>
7156
7157 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
7158 so that [xz] isn't taken into account when determining order.
7159
352466bf 71602007-08-02 Marco Gerards <marco@gnu.org>
7161
7162 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
7163 `include/multiboot2.h', `include/grub/elfload.h',
7164 `include/multiboot.h', `include/grub/multiboot.h',
7165 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
7166 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
7167 `kern/elf.c', `loader/multiboot_loader.c',
7168 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
7169 `loader/i386/pc/multiboot2.c',
7170 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
7171 `util/i386/pc/grub-mkrescue.in'. Remove
7172 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
7173 `include/grub/i386/pc/util/biosdisk.h' and
7174 `include/grub/powerpc/ieee1275/multiboot.h'.
7175
8f096014 71762007-08-02 Bean <bean123ch@gmail.com>
7177
7178 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
7179 (ntfs_mod_SOURCES): New variable.
7180 (ntfs_mod_CFLAGS): Likewise.
7181 (ntfs_mod_LDFLAGS): Likewise.
7182
7183 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
7184 (grub_probe_SOURCES): Likewise.
7185 (grub_emu_SOURCES): Likewise.
7186
7187 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7188 (grub_emu_SOURCES): Likewise.
7189
7190 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7191 (grub_emu_SOURCES): Likewise.
f19dbdb7 7192
8f096014 7193 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
7194
7195 * fs/ntfs.c: New file.
7196
9959f7db 71972007-08-02 Bean <bean123ch@gmail.com>
7198
7199 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
7200
7201 * file.h (grub_file): Likewise.
7202
7203 * fshelp.h (grub_fshelp_read_file): Likewise.
7204
7205 * util/i386/pc/grub-setup.c (setup): Likewise.
7206 (save_first_sector): Likewise.
7207 (save_blocklists): Likewise.
f19dbdb7 7208
9959f7db 7209 * fs/affs.c (grub_affs_read_file): Likewise.
7210
7211 * fs/ext2.c (grub_ext2_read_file): Likewise.
7212
7213 * fs/fat.c (grub_fat_read_data): Likewise.
7214
7215 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
7216
7217 * fs/hfs.c (grub_hfs_read_file): Likewise.
7218
7219 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7220
7221 * fs/jfs.c (grub_jfs_read_file): Likewise.
7222
7223 * fs/minix.c (grub_minix_read_file): Likewise.
7224
7225 * fs/sfs.c (grub_sfs_read_file): Likewise.
7226
7227 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 7228
9959f7db 7229 * fs/xfs.c (grub_xfs_read_file): Likewise.
7230
7231 * command/blocklist.c (read_blocklist): Likewise.
7232 (print_blocklist): Likewise.
7233
0a203f83 72342007-08-02 Marco Gerards <marco@gnu.org>
7235
7236 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
7237 `util/hostfs.c'.
7238
7239 * disk/host.c: New file.
7240
7241 * util/hostfs.c: Likewise.
7242
7243 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
7244 return `GRUB_ERR_BAD_FS'.
7245 * fs/sfs.c (grub_sfs_mount): Likewise.
7246 * fs/xfs.c (grub_xfs_mount): Likewise.
7247
7248 * include/grub/disk.h (enum grub_disk_dev_id): Add
7249 `GRUB_DISK_DEVICE_HOST_ID'.
7250
7251 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
7252
e5dfe777 72532007-07-24 Jerone Young <jerone@gmail.com>
7254
f19dbdb7 7255 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 7256 modules for compilation.
7257 * conf/powerpc-ieee1275.rmk: Likewise.
7258
7259 * include/multiboot.h: Move multiboot definitions to one file. Rename
7260 many definitions to not get grub specific.
7261 * include/multiboot2.h: Create header with multiboot 2 definitions.
7262 * include/grub/multiboot.h: Header for grub specific function
7263 prototypes and definitions.
7264 * include/grub/multiboot2.h: Likewise.
7265 * include/grub/multiboot_loader.h: Likewise.
7266 * include/grub/i386/pc/multiboot.h: Removed.
7267 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
7268
7269 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
7270 and 2 to allow for one multiboot and module commands.
7271 * loader/multiboot2.c: Add multiboot2 functionality.
7272 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
7273 and definition names.
7274 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
7275 2 functions.
7276 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
7277 ieee1275 specific multiboot2 code.
7278
7279 * kern/i386/pc/startup.S: Change headers and definition names for
7280 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
7281
daf0f0ba 72822007-07-22 Robert Millan <rmh@aybabtu.com>
7283
7284 * geninitheader.sh: Process file specified in first parameter rather
7285 than hardcoding grub_modules_init.lst.
fe6b695a 7286 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 7287 than hardcoding grub_modules_init.h.
7288
7289 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
7290 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
7291 grub_probe_init.[ch] and grub_setup_init.[ch].
7292
7293 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
7294 grub_modules_init.h with grub_emu_init.h.
7295 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
7296 grub_probe_init.[ch] files.
7297 * conf/i386-efi.rmk: Likewise.
7298 * conf/i386-pc.rmk: Likewise.
7299 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
7300 grub_setup_init.[ch] files.
7301
7302 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
7303 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
7304 to initialize modules rather than a list of hardcoded functions.
7305 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
7306 grub_init_all() to initialize modules rather than a list of hardcoded
7307 functions.
7308
54cdc1cc 73092007-07-22 Robert Millan <rmh@aybabtu.com>
7310
7311 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
7312 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
7313
ad0686cc 73142007-07-22 Robert Millan <rmh@aybabtu.com>
7315
7316 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7317 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
7318 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
7319 flag when running on SmartFirmware.
7320 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
7321 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
7322 was set.
7323
7324 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7325 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
7326 rather than decreasing it.
7327
7328 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
7329 there's not enough space to do it, fail in the same way as when it
7330 can't be done because there are no partitions.
7331
7332 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
7333 when nvsetenv failed.
7334
969c02ec 73352007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
7336
7337 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
7338 because this rule is automatically generated.
7339 (grub-mkrescue): Removed for the same reason as above.
7340
5a79f472 73412007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
7342
7343 Migrate to GNU General Public License Version 3.
f19dbdb7 7344
5a79f472 7345 * COPYING: Replaced with the plain text version of GPLv3.
7346
7347 * config.guess: Updated from gnulib.
7348 * config.sub: Likewise.
7349
7350 * geninit.sh: Output a GPLv3 copyright notice.
7351 * geninitheader.sh: Likewise.
7352 * genmodsrc.sh: Likewise.
7353 * gensymlist.sh.in: Likewise.
7354
7355 * boot/i386/pc/boot.S: Upgraded to GPLv3.
7356 * boot/i386/pc/diskboot.S: Likewise.
7357 * boot/i386/pc/pxeboot.S: Likewise.
7358 * commands/blocklist.c: Likewise.
7359 * commands/boot.c: Likewise.
7360 * commands/cat.c: Likewise.
7361 * commands/cmp.c: Likewise.
7362 * commands/configfile.c: Likewise.
7363 * commands/echo.c: Likewise.
7364 * commands/help.c: Likewise.
7365 * commands/ls.c: Likewise.
7366 * commands/search.c: Likewise.
7367 * commands/terminal.c: Likewise.
7368 * commands/test.c: Likewise.
7369 * commands/videotest.c: Likewise.
7370 * commands/i386/cpuid.c: Likewise.
7371 * commands/i386/pc/halt.c: Likewise.
7372 * commands/i386/pc/play.c: Likewise.
7373 * commands/i386/pc/reboot.c: Likewise.
7374 * commands/i386/pc/vbeinfo.c: Likewise.
7375 * commands/i386/pc/vbetest.c: Likewise.
7376 * commands/ieee1275/halt.c: Likewise.
7377 * commands/ieee1275/reboot.c: Likewise.
7378 * commands/ieee1275/suspend.c: Likewise.
7379 * disk/loopback.c: Likewise.
7380 * disk/lvm.c: Likewise.
7381 * disk/raid.c: Likewise.
7382 * disk/efi/efidisk.c: Likewise.
7383 * disk/i386/pc/biosdisk.c: Likewise.
7384 * disk/ieee1275/ofdisk.c: Likewise.
7385 * font/manager.c: Likewise.
7386 * fs/affs.c: Likewise.
7387 * fs/ext2.c: Likewise.
7388 * fs/fat.c: Likewise.
7389 * fs/fshelp.c: Likewise.
7390 * fs/hfs.c: Likewise.
7391 * fs/hfsplus.c: Likewise.
7392 * fs/iso9660.c: Likewise.
7393 * fs/jfs.c: Likewise.
7394 * fs/minix.c: Likewise.
7395 * fs/sfs.c: Likewise.
7396 * fs/ufs.c: Likewise.
7397 * fs/xfs.c: Likewise.
7398 * hello/hello.c: Likewise.
7399 * include/grub/acorn_filecore.h: Likewise.
7400 * include/grub/arg.h: Likewise.
7401 * include/grub/bitmap.h: Likewise.
7402 * include/grub/boot.h: Likewise.
7403 * include/grub/cache.h: Likewise.
7404 * include/grub/device.h: Likewise.
7405 * include/grub/disk.h: Likewise.
7406 * include/grub/dl.h: Likewise.
7407 * include/grub/elfload.h: Likewise.
7408 * include/grub/env.h: Likewise.
7409 * include/grub/err.h: Likewise.
7410 * include/grub/file.h: Likewise.
7411 * include/grub/font.h: Likewise.
7412 * include/grub/fs.h: Likewise.
7413 * include/grub/fshelp.h: Likewise.
7414 * include/grub/gzio.h: Likewise.
7415 * include/grub/hfs.h: Likewise.
7416 * include/grub/kernel.h: Likewise.
7417 * include/grub/loader.h: Likewise.
7418 * include/grub/lvm.h: Likewise.
7419 * include/grub/misc.h: Likewise.
7420 * include/grub/mm.h: Likewise.
7421 * include/grub/net.h: Likewise.
7422 * include/grub/normal.h: Likewise.
7423 * include/grub/parser.h: Likewise.
7424 * include/grub/partition.h: Likewise.
7425 * include/grub/pc_partition.h: Likewise.
7426 * include/grub/raid.h: Likewise.
7427 * include/grub/rescue.h: Likewise.
7428 * include/grub/script.h: Likewise.
7429 * include/grub/setjmp.h: Likewise.
7430 * include/grub/symbol.h: Likewise.
7431 * include/grub/term.h: Likewise.
7432 * include/grub/terminfo.h: Likewise.
7433 * include/grub/tparm.h: Likewise.
7434 * include/grub/types.h: Likewise.
7435 * include/grub/video.h: Likewise.
7436 * include/grub/efi/api.h: Likewise.
7437 * include/grub/efi/chainloader.h: Likewise.
7438 * include/grub/efi/console.h: Likewise.
7439 * include/grub/efi/console_control.h: Likewise.
7440 * include/grub/efi/disk.h: Likewise.
7441 * include/grub/efi/efi.h: Likewise.
7442 * include/grub/efi/pe32.h: Likewise.
7443 * include/grub/efi/time.h: Likewise.
7444 * include/grub/i386/linux.h: Likewise.
7445 * include/grub/i386/setjmp.h: Likewise.
7446 * include/grub/i386/types.h: Likewise.
7447 * include/grub/i386/efi/kernel.h: Likewise.
7448 * include/grub/i386/efi/loader.h: Likewise.
7449 * include/grub/i386/efi/time.h: Likewise.
7450 * include/grub/i386/pc/biosdisk.h: Likewise.
7451 * include/grub/i386/pc/boot.h: Likewise.
7452 * include/grub/i386/pc/chainloader.h: Likewise.
7453 * include/grub/i386/pc/console.h: Likewise.
7454 * include/grub/i386/pc/init.h: Likewise.
7455 * include/grub/i386/pc/kernel.h: Likewise.
7456 * include/grub/i386/pc/loader.h: Likewise.
7457 * include/grub/i386/pc/memory.h: Likewise.
7458 * include/grub/i386/pc/multiboot.h: Likewise.
7459 * include/grub/i386/pc/serial.h: Likewise.
7460 * include/grub/i386/pc/time.h: Likewise.
7461 * include/grub/i386/pc/vbe.h: Likewise.
7462 * include/grub/i386/pc/vbeblit.h: Likewise.
7463 * include/grub/i386/pc/vbefill.h: Likewise.
7464 * include/grub/i386/pc/vbeutil.h: Likewise.
7465 * include/grub/i386/pc/vga.h: Likewise.
7466 * include/grub/ieee1275/ieee1275.h: Likewise.
7467 * include/grub/ieee1275/ofdisk.h: Likewise.
7468 * include/grub/powerpc/libgcc.h: Likewise.
7469 * include/grub/powerpc/setjmp.h: Likewise.
7470 * include/grub/powerpc/types.h: Likewise.
7471 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
7472 * include/grub/powerpc/ieee1275/console.h: Likewise.
7473 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
7474 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
7475 * include/grub/powerpc/ieee1275/loader.h: Likewise.
7476 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
7477 * include/grub/powerpc/ieee1275/time.h: Likewise.
7478 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
7479 * include/grub/sparc64/libgcc.h: Likewise.
7480 * include/grub/sparc64/setjmp.h: Likewise.
7481 * include/grub/sparc64/types.h: Likewise.
7482 * include/grub/sparc64/ieee1275/console.h: Likewise.
7483 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
7484 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
7485 * include/grub/sparc64/ieee1275/time.h: Likewise.
7486 * include/grub/util/biosdisk.h: Likewise.
7487 * include/grub/util/getroot.h: Likewise.
7488 * include/grub/util/lvm.h: Likewise.
7489 * include/grub/util/misc.h: Likewise.
7490 * include/grub/util/raid.h: Likewise.
7491 * include/grub/util/resolve.h: Likewise.
7492 * io/gzio.c: Likewise.
7493 * kern/device.c: Likewise.
7494 * kern/disk.c: Likewise.
7495 * kern/dl.c: Likewise.
7496 * kern/elf.c: Likewise.
7497 * kern/env.c: Likewise.
7498 * kern/err.c: Likewise.
7499 * kern/file.c: Likewise.
7500 * kern/fs.c: Likewise.
7501 * kern/loader.c: Likewise.
7502 * kern/main.c: Likewise.
7503 * kern/misc.c: Likewise.
7504 * kern/mm.c: Likewise.
7505 * kern/parser.c: Likewise.
7506 * kern/partition.c: Likewise.
7507 * kern/rescue.c: Likewise.
7508 * kern/term.c: Likewise.
7509 * kern/efi/efi.c: Likewise.
7510 * kern/efi/init.c: Likewise.
7511 * kern/efi/mm.c: Likewise.
7512 * kern/i386/dl.c: Likewise.
7513 * kern/i386/efi/init.c: Likewise.
7514 * kern/i386/efi/startup.S: Likewise.
7515 * kern/i386/pc/init.c: Likewise.
7516 * kern/i386/pc/lzo1x.S: Likewise.
7517 * kern/i386/pc/startup.S: Likewise.
7518 * kern/ieee1275/ieee1275.c: Likewise.
7519 * kern/powerpc/cache.S: Likewise.
7520 * kern/powerpc/dl.c: Likewise.
7521 * kern/powerpc/ieee1275/cmain.c: Likewise.
7522 * kern/powerpc/ieee1275/crt0.S: Likewise.
7523 * kern/powerpc/ieee1275/init.c: Likewise.
7524 * kern/powerpc/ieee1275/openfw.c: Likewise.
7525 * kern/sparc64/cache.S: Likewise.
7526 * kern/sparc64/dl.c: Likewise.
7527 * kern/sparc64/ieee1275/init.c: Likewise.
7528 * kern/sparc64/ieee1275/openfw.c: Likewise.
7529 * loader/efi/chainloader.c: Likewise.
7530 * loader/efi/chainloader_normal.c: Likewise.
7531 * loader/i386/efi/linux.c: Likewise.
7532 * loader/i386/efi/linux_normal.c: Likewise.
7533 * loader/i386/pc/chainloader.c: Likewise.
7534 * loader/i386/pc/chainloader_normal.c: Likewise.
7535 * loader/i386/pc/linux.c: Likewise.
7536 * loader/i386/pc/linux_normal.c: Likewise.
7537 * loader/i386/pc/multiboot.c: Likewise.
7538 * loader/i386/pc/multiboot_normal.c: Likewise.
7539 * loader/powerpc/ieee1275/linux.c: Likewise.
7540 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
7541 * normal/arg.c: Likewise.
7542 * normal/cmdline.c: Likewise.
7543 * normal/command.c: Likewise.
7544 * normal/completion.c: Likewise.
7545 * normal/execute.c: Likewise.
7546 * normal/function.c: Likewise.
7547 * normal/lexer.c: Likewise.
7548 * normal/main.c: Likewise.
7549 * normal/menu.c: Likewise.
7550 * normal/menu_entry.c: Likewise.
7551 * normal/misc.c: Likewise.
7552 * normal/parser.y: Likewise.
7553 * normal/script.c: Likewise.
7554 * normal/i386/setjmp.S: Likewise.
7555 * normal/powerpc/setjmp.S: Likewise.
7556 * normal/sparc64/setjmp.S: Likewise.
7557 * partmap/acorn.c: Likewise.
7558 * partmap/amiga.c: Likewise.
7559 * partmap/apple.c: Likewise.
7560 * partmap/gpt.c: Likewise.
7561 * partmap/pc.c: Likewise.
7562 * partmap/sun.c: Likewise.
7563 * term/gfxterm.c: Likewise.
7564 * term/terminfo.c: Likewise.
7565 * term/efi/console.c: Likewise.
7566 * term/i386/pc/console.c: Likewise.
7567 * term/i386/pc/serial.c: Likewise.
7568 * term/i386/pc/vesafb.c: Likewise.
7569 * term/i386/pc/vga.c: Likewise.
7570 * term/ieee1275/ofconsole.c: Likewise.
7571 * util/biosdisk.c: Likewise.
7572 * util/console.c: Likewise.
7573 * util/genmoddep.c: Likewise.
7574 * util/getroot.c: Likewise.
7575 * util/grub-emu.c: Likewise.
7576 * util/grub-mkdevicemap.c: Likewise.
7577 * util/grub-probe.c: Likewise.
7578 * util/lvm.c: Likewise.
7579 * util/misc.c: Likewise.
7580 * util/raid.c: Likewise.
7581 * util/resolve.c: Likewise.
7582 * util/update-grub.in: Likewise.
7583 * util/update-grub_lib.in: Likewise.
7584 * util/grub.d/00_header.in: Likewise.
7585 * util/grub.d/10_hurd.in: Likewise.
7586 * util/grub.d/10_linux.in: Likewise.
7587 * util/i386/efi/grub-install.in: Likewise.
7588 * util/i386/efi/grub-mkimage.c: Likewise.
7589 * util/i386/pc/grub-install.in: Likewise.
7590 * util/i386/pc/grub-mkimage.c: Likewise.
7591 * util/i386/pc/grub-mkrescue.in: Likewise.
7592 * util/i386/pc/grub-setup.c: Likewise.
7593 * util/i386/pc/misc.c: Likewise.
7594 * util/powerpc/ieee1275/grub-install.in: Likewise.
7595 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
7596 * util/powerpc/ieee1275/misc.c: Likewise.
7597 * video/bitmap.c: Likewise.
7598 * video/video.c: Likewise.
7599 * video/i386/pc/vbe.c: Likewise.
7600 * video/i386/pc/vbeblit.c: Likewise.
7601 * video/i386/pc/vbefill.c: Likewise.
7602 * video/i386/pc/vbeutil.c: Likewise.
7603 * video/readers/tga.c: Likewise.
7604
3572d015 76052007-07-02 Robert Millan <rmh@aybabtu.com>
7606
7607 * conf/i386-efi.rmk: Replace obsolete reference to
7608 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
7609 with util/getroot.c.
7610 * conf/powerpc-ieee1275.rmk: Likewise.
7611 * conf/sparc64-ieee1275.rmk: Likewise.
7612
7613 * util/grub-emu.c (main): Fix unchecked pointer handling.
7614
2c2a681b 76152007-07-02 Robert Millan <rmh@aybabtu.com>
7616
7617 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
7618 invocation to fail, in order to support partition-less media.
7619
7620 * util/i386/pc/grub-install.in: Likewise.
7621
7622 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
7623 which fs or partmap modules are needed (akin to its sister scripts).
7624
7625 Also use grub-probe to get rid of unportable /proc/mounts check.
7626
7627 Print the same informational message that the other scripts do, before
fe6b695a 7628 exiting.
2c2a681b 7629
6193defe 76302007-06-23 Robert Millan <rmh@aybabtu.com>
7631
fe6b695a 7632 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 7633 a font file can be found and, if so, echo the GRUB path to it.
7634
7635 * util/update-grub.in: Handle multiple terminals depending on user
7636 input, platform availability and font file presence. Propagate
7637 variables of our findings to /etc/grub.d/ children.
7638
7639 * util/grub.d/00_header.in: Handle multiple terminals, based on
7640 environment setup by update-grub.
7641
eface1dc 76422007-06-23 Robert Millan <rmh@aybabtu.com>
7643
ba50d28f 7644 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 7645
bf697e28 76462007-06-21 Robert Millan <rmh@aybabtu.com>
7647
7648 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
7649 indicate end of data section in kernel image.
7650 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
7651 GRUB_KERNEL_MACHINE_DATA_END.
7652
7653 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
7654 space for it.
7655 * kern/i386/efi/startup.S: Likewise.
7656
7657 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
7658 during image generation. Implement --prefix option to override this
7659 patch.
7660 * util/i386/efi/grub-mkimage.c: Likewise.
7661
7662 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
7663 code to make path relative to its root into a separate function.
7664
7665 * util/i386/pc/grub-install.in: Use newly provided
7666 make_system_path_relative_to_its_root() to convert ${grubdir}, then
7667 pass the result to grub-install --prefix.
7668
baa574b4 76692007-06-13 Robert Millan <rmh@aybabtu.com>
7670
7671 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
7672 DEFAULT_DEVICE_MAP.
7673 * util/grub-emu.c: Use above definitions from misc.h instead of
7674 defining them.
7675 * util/grub-mkdevicemap.c: Likewise.
7676 * util/i386/pc/grub-setup.c: Likewise.
7677 * util/grub-probe.c: Likewise.
7678 (probe): Abort with grub_util_error() when either
7679 grub_guess_root_device or grub_util_get_grub_dev fails.
7680
0215dcbf 76812007-06-12 Robert Millan <rmh@aybabtu.com>
7682
7683 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
7684 "pager" assignment.
7685 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
7686 "pcdata".
7687 * util/grub-probe.c (probe): Likewise for "drive_name".
7688
8af2ab7b 76892007-06-11 Robert Millan <rmh@aybabtu.com>
7690
7691 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
7692 not just the cdrom one.
7693
59d31694 76942007-06-11 Robert Millan <rmh@aybabtu.com>
7695
7696 * util/i386/pc/grub-mkrescue.in: Add "set -e".
7697 Add --pkglibdir=DIR option to override pkglibdir.
7698 Mention --image-type=TYPE in help output.
7699 Fix --grub-mkimage (it was a no-op).
fe6b695a 7700 Abort gracefully when no parameter is given.
59d31694 7701
7ee367e4 77022007-06-11 Robert Millan <rmh@aybabtu.com>
7703
7704 * util/i386/pc/grub-mkrescue.in: New file.
7705 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
7706 * Makefile.in: Handle bin_SCRIPTS.
7707
29b0ed46 77082007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
7709
7710 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
7711 list of video modes.
7712
c0f90770 77132007-06-06 Robert Millan <rmh@aybabtu.com>
7714
7715 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
7716 file doesn't exist, or if it is in a filesystem grub can't read.
7717
7718 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
7719 not abort if GRUB_DRIVE could not be defined. Rearrange generated
7720 header comment to fit in 80 columns when the variables are resolved.
7721
7722 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
7723 could be identified by update-grub. Remove redundant check for
fe6b695a 7724 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 7725 handles that).
7726
fb36dc26 77272007-06-04 Robert Millan <rmh@aybabtu.com>
7728
7729 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
7730
7731 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
7732
7733 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
7734
0c68c93e 77352007-06-04 Robert Millan <rmh@aybabtu.com>
7736
7737 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
7738
7739 * include/grub/partition.h: Declare grub_apple_partition_map_init and
7740 grub_apple_partition_map_fini.
7741
7742 * util/biosdisk.c
7743 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
7744 to access >2 TiB disks).
7745
7746 Print disk->total_sectors with %llu instead of %lu, since this
7747 variable is always 64-bit (prevents wrong disk size from being displayed
7748 on either >2 TiB disk or big-endian CPU).
7749
7750 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
7751 into a generic case that supports all (sane) partition maps.
7752
7753 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
7754 breaks big-endian.
7755
7756 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
7757 and grub_apple_partition_map_fini() after that.
7758
0f23eb74 77592007-06-01 Robert Millan <rmh@aybabtu.com>
7760
7761 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
7762
7763 * util/grub.d/00_header.in: Only enable gfxterm when
7764 convert_system_path_to_grub_path() succeeds.
7765
42c71976 77662007-05-20 Robert Millan <rmh@aybabtu.com>
7767
7768 * util/update-grub_lib.in: New file.
7769 * DISTLIST: Add update-grub_lib.in.
7770 * conf/common.rmk: Generate update-grub_lib and install it in
7771 $(lib_DATA).
7772 * Makefile.in: Add install routine for $(lib_DATA).
7773
7774 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
7775 function provided by update-grub_lib to support arbitrary paths of
7776 unifont.pff.
7777 * util/update-grub.in: Use convert_system_path_to_grub_path() to
7778 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
7779
5beb2291 77802007-05-19 Robert Millan <rmh@aybabtu.com>
7781
7782 * commands/i386/cpuid.c: New module.
7783 * DISTLIST: Add it.
7784 * conf/i386-efi.rmk: Enable cpuid.mod.
7785 * conf/i386-pc.rmk: Likewise.
7786
7262eca1 77872007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7788
7789 * kern/disk.c (grub_disk_read): Check return value of
7790 grub_realloc().
7791
260ba823 77922007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7793
7794 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
7795 arrays.
7796 * disk/raid.c (grub_raid_open): Likewise.
7797
1ecb6cf2 77982007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7799
7800 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
7801 stack instead of on the heap.
7802
7803 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
7804 before doing a read on it.
7805
7806 * configure.ac: Only use -fno-stack-protector for the target
7807 environment.
f19dbdb7 7808
21c8cbb1 78092007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7810
7811 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
7812 __attribute_ ((unused)) to mode_type argument.
7813
7814 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 7815
21c8cbb1 7816 * kern/misc.c (memcmp): Fix prototype.
7817
7818 * include/grub/partition.h [GRUB_UTIL]
7819 (grub_gpt_partition_map_init): Add prototype.
7820 (grub_gpt_partition_map_fini): Likewise.
7821
7822 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
7823 at the right place.
7824
7825 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
7826 (grub_fat_read_data): Likewise.
7827 (grub_fat_find_dir): Likewise.
7828
7829 * font/manager.c (find_glyph): Make table a const.
7830 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 7831
849d55d3 78322007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
7833
7834 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
7835 code, first search for device in /dev/mapper, then in /dev.
7836 (grub_util_get_grub_dev): New function.
7837 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
7838 prototype.
7839 * util/grub-probe.c (probe): Remove check for RAID, call
7840 grub_util_get_grub_dev() instead of
7841 grub_util_biosdisk_get_grub_dev().
7842 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
7843 grub_util_biosdisk_get_grub_dev().
7844 * util/i386/pc/grub-setup.c (main): Likewise.
7845
8fff7c2f 78462007-05-16 Robert Millan <rmh@aybabtu.com>
7847
7848 * DISTLIST: Update for the latest changes.
7849 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
7850 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
7851 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
7852 grub/util/biosdisk.h.
7853 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
7854 grub/util/biosdisk.h.
7855
48e12b52 78562007-05-16 Robert Millan <rmh@aybabtu.com>
7857
7858 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7859
46b9d128 78602007-05-16 Robert Millan <rmh@aybabtu.com>
7861
7862 * util/i386/efi/grub-install.in: New.
7863 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7864 newly added grub-install.
7865 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7866 include.
7867 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7868 grub/util/biosdisk.h.
7869 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7870 grub/util/biosdisk.h.
7871
2d1a40a9 78722007-05-16 Robert Millan <rmh@aybabtu.com>
7873
7874 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7875 * include/grub/util/biosdisk.h: ... here.
7876 * util/i386/pc/biosdisk.c: Moved to ...
7877 * util/biosdisk.c: ... here.
7878 * util/i386/pc/getroot.c: Moved to ...
7879 * util/getroot.c: ... here.
7880 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7881 * util/grub-mkdevicemap.c: ... here.
7882 * util/i386/pc/grub-probe.c: Moved to ...
7883 * util/grub-probe.c: ... here.
7884
9e26e3bc 78852007-05-15 Robert Millan <rmh@aybabtu.com>
7886
7887 * util/update-grub.in: Remove duplicated line in grub.cfg header
7888 message.
7889
57f96397 78902007-05-13 Robert Millan <rmh@aybabtu.com>
7891
7892 * util/update-grub.in: Fix a few assumptions about the devices holding
7893 /, /boot and /boot/grub being the same.
7894 * util/grub.d/00_header.in: Likewise.
7895 * util/grub.d/10_hurd.in: Likewise.
7896 * util/grub.d/10_linux.in: Likewise.
7897
7898 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7899 patterns. Use that to define the `.old' suffix as older than `'.
7900
7901 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7902
7903 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7904 the grub.cfg header message.
7905
2e610d62 79062007-05-11 Robert Millan <rmh@aybabtu.com>
7907
7908 * util/update-grub.in: Create device.map if it doesn't already exist,
7909 before attempting to run grub-probe.
7910 Check for grub-probe and grub-mkdevicemap with the same code
7911 grub-install is using.
7912 Remove test mode.
7913
3f6a10ef 79142007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
7915
7916 * Makefile.in: Add the datarootdir autoconf variable.
7917
02e7b75e 79182007-05-09 Robert Millan <rmh@aybabtu.com>
7919
7920 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 7921 fail gracefully if dev->disk->partition == NULL.
02e7b75e 7922
75f396cc 79232007-05-07 Robert Millan <rmh@aybabtu.com>
7924
7925 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7926 determine partition map module.
7927 * util/i386/pc/grub-install.in: Use this feature to decide which
7928 partition module to load, instead of hardcoding pc and gpt.
7929
da65cb36 79302007-05-07 Robert Millan <rmh@aybabtu.com>
7931
7932 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7933 source directory differs from build directory.
7934
b57d6a91 79352007-05-05 Robert Millan <rmh@aybabtu.com>
7936
7937 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7938 initialisation.
7939
509d00f1 79402007-05-05 Robert Millan <rmh@aybabtu.com>
7941
7942 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7943
c48f23ef 79442007-05-05 Robert Millan <rmh@aybabtu.com>
7945
7946 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7947 command-line arguments via ${GRUB_CMDLINE_LINUX}.
7948
20b97658 79492007-05-05 Robert Millan <rmh@aybabtu.com>
7950
7951 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7952 (grub_probe_SOURCES): Likewise.
7953 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7954 GPT and initialize dos_part and bsd_part accordingly.
7955 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7956 install_bsd_part.
7957 (main): Activate gpt module for use during partition identification,
7958 and deactivate it afterwards.
7959 * util/i386/pc/grub-install.in: Add gpt module to core.img.
7960 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7961 partition identification, and deactivate it afterwards.
7962
99123174 79632007-05-05 Robert Millan <rmh@aybabtu.com>
7964
7965 * term/i386/pc/console.c (grub_console_fini): Call
7966 grub_term_set_current() before grub_term_unregister().
7967
ebd97f6e 79682007-05-04 Robert Millan <rmh@aybabtu.com>
7969
7970 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7971 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7972 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
7973 and update-grub_DATA.
7974 * conf/common.rmk: Build and install update-grub components.
7975 * conf/common.mk: Regenerate.
7976 * util/update-grub.in: New. Core of update-grub.
7977 * util/grub.d/00_header.in: New. Generates grub.cfg header.
7978 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
7979 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
7980 * util/grub.d/README: New. Document grub.d directory layout.
7981
b06a264d 79822007-05-01 Robert Millan <rmh@aybabtu.com>
7983
7984 * util/grub-emu.c: Move initialization functions
7985 grub_util_biosdisk_init() and grub_init_all() before
7986 grub_util_biosdisk_get_grub_dev(), which relies on them.
7987
41f0050e 79882007-04-19 Robert Millan <rmh@aybabtu.com>
7989
7990 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7991 it is used later.
7992
04582bb3 79932007-04-18 Jerone Young <jerone@gmail.com>
7994
f19dbdb7 7995 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 7996 stanza.
7997
08db4632 79982007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 7999
08db4632 8000 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
8001 continue on and look for device node with real device name.
8002
801b76be 80032007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 8004
fe6b695a 8005 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 8006 ability.
8007 * Makefile.in: Add autoconf package transformation code.
8008 * util/i386/pc/grub-install.in: Likewise.
8009 * util/powerpc/ieee1275/grub-install.in: Likewise.
8010
6795c4e1 80112007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
8012
8013 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
8014 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
8015 (EXT2_REVISION): Likewise.
8016 (EXT2_INODE_SIZE): Likewise.
8017 (struct grub_ext2_block_group): Added a missing member
8018 "used_dirs".
8019 (grub_ext2_read_inode): Divide by the inode size in a superblock
8020 instead of 128 to obtain INODES_PER_BLOCK.
8021 Use the macro EXT2_INODE_SIZE instead of directly using
8022 SBLOCK->INODE_SIZE.
8023
d70af616 80242007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
8025
8026 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
8027 superblock instead of the structure size to compute an
8028 offset. This fixes the problem that GRUB could not read a
8029 filesystem when inode size is different from 128-byte.
8030
3b801603 80312007-03-05 Marco Gerards <marco@gnu.org>
8032
8033 * normal/main.c (read_config_file): When "menu" is not set, create
8034 an initial context.
8035
4785bfe4 80362007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8037
8038 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
8039 (HEAP_LIMIT): New macro.
8040 (grub_claim_heap): Claim memory up to `heaplimit'.
8041
a0cbb023 80422007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8043
8044 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
8045 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
8046 (_start): Likewise.
8047 (grub_arch_modules_addr): Return address after `_end'.
8048 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
8049 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
8050 (add_segments): Calculate `_end' from phdr size and location.
8051 (ALIGN_UP): Moved to ...
8052 * include/grub/misc.h: here.
8053 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8054 New macro.
8055 (GRUB_IEEE1275_MODULE_BASE): Removed.
8056
fd7d8eba 80572007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8058
8059 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
8060 loop boundary.
8061
9b09e6fc 80622007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8063
8064 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
8065 All users updated.
8066 (grub_elf64_load_hook_t): Likewise.
8067 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
8068 debug output.
8069
3ce27299 80702007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8071
8072 * kern/mm.c: Update copyright.
8073 (grub_mm_debug): Correct syntax error.
8074 (grub_mm_dump_free): New function.
8075 (grub_debug_free): Call `grub_free'.
8076 * include/grub/mm.h: Update copyright.
8077 (grub_mm_dump_free): Add declaration.
8078
077d5fee 80792007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8080
8081 * include/grub/ieee1275/ieee1275.h: Update copyright.
8082 * kern/powerpc/ieee1275/init.c: Likewise.
8083 * kern/powerpc/ieee1275/openfw.c: Likewise.
8084
8085 * loader/powerpc/ieee1275/linux.c: Likewise.
8086 * include/grub/elfload.h: Likewise.
8087 * kern/elf.c: Likewise.
8088 (grub_elf32_load): Pass `base' and `size' parameters. Update all
8089 callers.
8090 (grub_elf64_load): Likewise.
8091 (grub_elf32_load_segment): Move to a nested function.
8092 (grub_elf64_load_segment): Likewise.
8093
dc946850 80942007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8095
8096 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
8097 prototype.
8098 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
8099 (grub_heap_len): Likewise.
8100 (HEAP_SIZE): New macro.
8101 (grub_claim_heap): New function.
8102 (grub_machine_init): Don't claim heap directly. Call
8103 `grub_claim_heap'.
8104 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
8105 (grub_available_iterate): New function.
8106
baa2a121 81072007-02-03 Thomas Schwinge <tschwinge@gnu.org>
8108
8109 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
8110 * configure.ac: Use it for testing the HOST and TARGET compilers.
8111
4fe9862e 81122006-12-13 Thomas Schwinge <tschwinge@gnu.org>
8113
8114 * Makefile.in (enable_grub_emu): New variable.
8115 * configure.ac (--enable-grub-emu): New option.
8116 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
8117 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
8118 * conf/i386-pc.rmk: Likewise.
8119 * conf/powerpc-ieee1275.rmk: Likewise.
8120 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
8121
a8aa5762 81222006-12-12 Marco Gerards <marco@gnu.org>
8123
8124 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
8125
8126 * kern/env.c (grub_env_unset): Don't free the member `value' when
8127 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
8128 pointer.
8129
8130 * normal/main.c (current_menu): Removed.
8131 (free_menu): Unset the `menu' environment variable.
8132 (grub_normal_menu_addentry): Make use of the environment variable
8133 `menu', instead of using the global `current_menu'. Allocate
8134 memory for the sourcecode of this entry.
8135 (read_config_file): New argument `nested', changed all callers.
8136 Only in the case of a new context, initialize a new menu. Set the
8137 `menu' environment variable.
8138 (grub_normal_execute): Don't set and unset the environment
8139 variable `menu' here anymore. Only free the menu when leaving the
8140 context.
8141
8142 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
8143 leak.
8144
957b3a3e 81452006-12-11 Marco Gerards <marco@gnu.org>
8146
8147 * normal/menu_entry.c (run): Fix off by one bug so the last line
8148 is executed. Move the loader check to outside the loop.
8149
ef875714 81502006-12-08 Hollis Blanchard <hollis@penguinppc.org>
8151
8152 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
8153
4e739985 81542006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
8155
8156 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
8157 the number of sectors. Reported by Andrey Shuvikov
8158 <mr_hyro@yahoo.com>.
f19dbdb7 8159
790707f2 81602006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
8161
8162 * kern/disk.c (grub_disk_read): When there is a read error, always
8163 try to read only the necessary data.
f19dbdb7 8164
790707f2 8165 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
8166 disk/raid.c.
8167 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
8168 prototype.
8169 [GRUB_UTIL] (grub_raid_fini): Likewise.
8170 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 8171 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 8172 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
8173 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
8174 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
8175 and grub_raid_fini().
f19dbdb7 8176
03e58196 81772006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
8178
8179 * include/grub/types.h (__unused): Rename to UNUSED.
8180 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
8181 (grub_elf64_size): Likewise.
f19dbdb7 8182
ae4f23bf 81832006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8184
8185 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
8186 grub_error_push and grub_error_pop in the error-handling path.
8187 (grub_elf32_load_segment): Only call grub_file_read with non-zero
8188 length.
8189
2166cc83 81902006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8191
8192 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
8193 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8194 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8195 (kernel_elf_SOURCES): Likewise.
8196 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
8197 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
8198 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8199 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8200 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
8201 (elf_mod_SOURCES): New variable.
8202 (elf_mod_CFLAGS): Likewise.
8203 (elf_mod_LDFLAGS): Likewise.
8204 * include/grub/types.h (__unused): New macro.
8205 * include/grub/elfload.h: New file.
8206 * kern/elf.c: Likewise.
8207 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
8208 (ELF32_LOADMASK): New macro.
8209 (ELF64_LOADMASK): Likewise.
8210 (vmlinux): Removed.
8211 (grub_linux_load32): New function.
8212 (grub_linux_load64): Likewise.
8213 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
8214 Use grub_elf_t instead of grub_file_t.
8215
a09d5aa5 82162006-11-02 Hollis Blanchard <hollis@penguinppc.org>
8217
8218 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
8219 `catch_result' to struct set_color_args.
8220
d976fc51 82212006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
8222
8223 * normal/menu.c: Include grub/script.h.
8224 * normal/menu_entry.c: Likewise.
8225 * include/grub/normal.h: Do not include grub/script.h.
8226
67507549 82272006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8228
8229 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
8230
69203a99 82312006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8232
8233 * kern/disk.c (grub_disk_open): Print debug messages when opening a
8234 disk.
8235 (grub_disk_close): Print debug messages when closing a disk.
8236 (grub_disk_read): Print debug messages when disk read fails.
8237 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
8238 filesystem type.
8239 * kern/partition.c: Include misc.h.
8240 (grub_partition_iterate): Print debug messages when detecting
8241 partition type.
8242
e2b8278c 82432006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8244
8245 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
8246 is negative.
8247 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
8248
97b2f2ff 82492006-10-26 Hollis Blanchard <hollis@penguinppc.org>
8250
8251 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8252 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
8253
6555d655 82542006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
8255
8256 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
8257 instead of sizeof(lv). Patch by Michael Guntsche.
8258
4d42b77f 82592006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
8260
8261 * disk/lvm.c: Rename VGS to VG_LIST.
8262 (grub_lvm_iterate): Change VGS->LV to VG-LV.
8263 (grub_lvm_open): Likewise.
8264 Thanks to Michael Guntsche for finding this bug.
8265
5d74d927 82662006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8267
8268 * configure.ac (AC_INIT): Bumped to 1.95.
8269
a1bb27e4 82702006-10-14 Robert Millan <rmh@aybabtu.com>
8271
8272 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
8273 with "/dev/.static/dev/md".
8274
e0994b8b 82752006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
8276
8277 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
8278 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
8279 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
8280 DRIVE_NAME are always freed.
8281
8282 * util/i386/pc/biosdisk.c (make_device_name): Add one into
8283 DOS_PART, as a DOS partition is counted from one instead of zero
8284 now. Reported by Robert Millan.
8285
ddd5cee9 82862006-10-14 Robert Millan <rmh@aybabtu.com>
8287
8288 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
8289 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
8290 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
8291 string returned by grub_guess_root_device.
8292 * util/i386/pc/grub-setup.c: Likewise.
8293 * util/i386/pc/grub-probefs.c: Likewise.
8294
8295 * util/i386/pc/grub-probefs.c: Rename to ...
8296 * util/i386/pc/grub-probe.c: ... this.
8297 * DISTLIST: Remove grub-probefs, add grub-probe.
8298 * conf/i386-efi.rmk: Likewise.
8299 * conf/i386-pc.rmk: Likewise.
8300 * util/i386/pc/grub-install.in: Likewise.
8301
8302 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
8303 choose which information we want to print.
8304
2b002173 83052006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
8306
8307 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
8308 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
8309 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
8310 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
8311 video/readers/tga.c and video/i386/pc/vbeutil.c.
8312
83132006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
8314
8315 Added support for RAID and LVM.
f19dbdb7 8316
2b002173 8317 * disk/lvm.c: New file.
8318 * disk/raid.c: Likewise.
8319 * include/grub/lvm.h: Likewise.
f19dbdb7 8320 * include/grub/raid.h: Likewise.
2b002173 8321 * include/grub/util/lvm.h: Likewise.
8322 * include/grub/util/raid.h: Likewise.
8323 * util/lvm.c: Likewise.
8324 * util/raid.c: Likewise.
8325
8326 * include/grub/disk.h (grub_disk_dev_id): Add
8327 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
8328 (grub_disk_get_size): New prototype.
8329 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
8330 returns a partition.
8331 (grub_disk_get_size): New function.
f19dbdb7 8332
2b002173 8333 * kern/i386/pc/init.c (make_install_device): Copy the prefix
8334 verbatim if grub_install_dos_part is -2.
8335
8336 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
8337 and LVM devices.
8338
8339 * util/i386/pc/grub-setup.c (setup): New argument
8340 MUST_EMBED. Force embedding of GRUB when the argument is
8341 true. Close FILE before returning.
8342 (main): Add support for RAID and LVM.
f19dbdb7 8343
2b002173 8344 * conf/common.rmk: Add RAID and LVM modules.
8345 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
8346 util/lvm.c.
8347 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
8348
8349 * kern/misc.c (grub_strstr): New function.
8350 * include/grub/misc.h (grub_strstr): New prototype.
8351
050548d0 83522006-10-10 Tristan Gingold <tristan.gingold@bull.net>
8353
8354 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
8355
da849d2d 83562006-10-05 Tristan Gingold <tristan.gingold@bull.net>
8357
8358 * kern/misc.c (grub_strtoull): Guess the base only if not
8359 specified.
8360
97b2f2ff 83612006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 8362
8363 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
8364 PowerMac support.
8365
97b2f2ff 83662006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 8367
8368 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
8369
8370 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
8371 Remove `flags' argument. All callers changed.
8372 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
8373 (IEEE1275_IHANDLE_INVALID): New variable.
8374 (IEEE1275_CELL_INVALID): New variable.
8375 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
8376 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
8377 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
8378 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
8379 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
8380 codes from Open Firmware. All callers updated.
8381 (grub_ieee1275_next_property): Directly return Open Firmware return
8382 code.
8383 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8384 Standardize error checking from `grub_ieee1275_get_property'.
8385 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
8386 `devalias' to `aliases'. Correct comments. Consolidate error paths.
8387
97b2f2ff 83882006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 8389
8390 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
8391 `instance_to_package_args' to `instance_to_path_args'.
8392
8393 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
8394 `grub_ieee1275_chosen'.
8395
8396 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
8397 `grub_ieee1275_interpret'.
8398
97b2f2ff 83992006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 8400
8401 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
8402
97b2f2ff 84032006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 8404
8405 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
8406 (__cmpdi): Likewise.
8407
8408 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
8409 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
8410 `grub_ssize_t'.
8411
02bb8acc 8412 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 8413
8414 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
8415 to type `grub_ssize_t'.
8416 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
8417
7f9a8531 84182006-09-22 Marco Gerards <marco@gnu.org>
8419
8420 * normal/script.c (grub_script_create_cmdmenu): Skip leading
8421 newlines.
8422
b5ef1102 84232006-09-22 Marco Gerards <marco@gnu.org>
8424
8425 * commands/echo.c: New file.
8426
8427 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
8428
8429 * conf/common.rmk (echo_mod_SOURCES): New variable.
8430 (echo_mod_CFLAGS): Likewise.
8431 (echo_mod_LDFLAGS): Likewise.
8432
2cff3677 84332006-09-22 Marco Gerards <marco@gnu.org>
8434
8435 * normal/main.c (get_line): Malloc memory instead of using
8436 preallocated memory. Removed the arguments `cmdline' and
8437 `max_len'. Updated all callers.
8438
6ba4688b 84392006-09-22 Marco Gerards <marco@gnu.org>
8440
8441 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
8442 (normal_mod_DEPENDENCIES): Likewise.
8443
8444 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
8445 (normal_mod_DEPENDENCIES): Likewise.
8446
8447 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
8448
e02ac02c 84492006-09-22 Johan Rydberg <jrydberg@gnu.org>
8450
8451 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
8452 programs.
8453 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
8454 (normal_mod_DEPENDENCIES): Likewise.
8455 * conf/i386-pc.mk: Regenerate.
8456 * conf/i386-efi.mk: Likewise
8457 * conf/common.mk: Likewise.
8458 * conf/powerpc-ieee1275.mk: Likewise.
8459 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 8460
8d252e44 84612006-09-22 Robert Millan <rmh@aybabtu.com>
8462
8463 Sync with i386 version.
8464 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
8465 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
8466
209bf7ac 84672006-09-21 Robert Millan <rmh@aybabtu.com>
8468
8469 Import from GRUB Legacy (lib/device.c):
8470 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
8471 (init_device_map) [__linux__]: Add support for I2O devices.
8472
6b146090 84732006-09-14 Marco Gerards <marco@gnu.org>
8474
8475 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
8476 `-melf_i386'.
8477
e38600a8 84782006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 8479
8480 * util/i386/pc/grub-install.in: Skip menu.lst when removing
8481 /boot/grub/*.lst.
78fa1790 8482
2952da5d 8483 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 8484
2952da5d 8485 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
8486 before adding it to device.map.
8487
01b82a64 84882006-08-15 Johan Rydberg <jrydberg@gnu.org>
8489
fe6b695a 8490 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 8491 compiles a file; using the -MD option.
8492 * conf/common.mk: Regenerate.
8493 * conf/i386-pc.mk: Likewise.
8494 * conf/i386-efi.mk: Likewise.
8495 * conf/powerpc-ieee1275.mk: Likewise.
8496 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 8497
1064790d 84982006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
8499
8500 Move the prototypes of grub_setjmp and grub_longjmp to
8501 cpu/setjmp.h, so that each architecture may specify different
8502 attributes.
f19dbdb7 8503
1064790d 8504 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
8505 (grub_longjmp): Likewise.
8506 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
8507 (grub_longjmp): Likewise.
8508 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
8509 (grub_longjmp): Likewise.
8510
8511 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
8512 [!GRUB_UTIL] (grub_longjmp): Removed.
8513
29dda3ed 85142006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
8515
8516 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
8517 "color!" method does not return any value.
8518
ad2a06ed 85192006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8520
8521 * include/grub/bitmap.h: New file.
8522
8523 * include/grub/i386/pc/vbeutil.h: Likewise.
8524
8525 * video/bitmap.c: Likewise.
8526
8527 * video/readers/tga.c: Likewise.
8528
8529 * video/i386/pc/vbeutil.c: Likewise.
8530
8531 * commands/videotest.c: Code cleanup and updated to reflect to new
8532 video API.
8533
8534 * term/gfxterm.c: Likewise.
8535
8536 * video/video.c: Likewise.
8537
8538 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
8539 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
8540 (bitmap_mod_SOURCES): New entry.
8541 (bitmap_mod_CFLAGS): Likewise.
8542 (bitmap_mod_LDFLAGS): Likewise.
8543 (tga_mod_SOURCES): Likewise.
8544 (tga_mod_CFLAGS): Likewise.
8545 (tga_mod_LDFLAGS): Likewise.
8546
8547 * include/grub/video.h (grub_video_blit_operators): New enum type.
8548 (grub_video_render_target): Changed as forward declaration and moved
8549 actual definition to be video driver specific.
8550 (grub_video_adapter.blit_bitmap): Added blitting operator.
8551 (grub_video_adapter.blit_render_target): Likewise.
8552 (grub_video_blit_bitmap): Likewise.
8553 (grub_video_blit_render_target): Likewise.
8554
8555 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
8556 driver specific render target definition.
8557 (grub_video_vbe_map_rgba): Added driver internal helper.
8558 (grub_video_vbe_unmap_color): Updated to use
8559 grub_video_i386_vbeblit_info.
8560 (grub_video_vbe_get_video_ptr): Likewise.
8561
8562 * include/grub/i386/pc/vbeblit.h
8563 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
8564 grub_video_i386_vbeblit_info.
8565 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8566 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8567 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8568 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8569 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8570 (grub_video_i386_vbeblit_index_index): Likewise.
8571 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
8572 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8573 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8574 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
8575 operator.
8576 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
8577 operator.
8578
8579 * video/i386/pc/vbeblit.c: Updated to reflect changes on
8580 include/grub/i386/pc/vbeblit.h.
8581
8582 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
8583 Updated to use grub_video_i386_vbeblit_info.
8584 (grub_video_i386_vbefill_R8G8B8): Likewise.
8585 (grub_video_i386_vbefill_index): Likewise.
8586 (grub_video_i386_vbefill): Added generic filler.
8587
8588 * video/i386/pc/vbefill.c: Updated to reflect changes on
8589 include/grub/i386/pc/vbefill.h.
8590
8591 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
8592 grub_video_i386_vbeblit_info.
8593 (grub_video_vbe_unmap_color): Likewise.
8594 (grub_video_vbe_blit_glyph): Likewise.
8595 (grub_video_vbe_scroll): Likewise.
8596 (grub_video_vbe_draw_pixel): Removed function.
8597 (grub_video_vbe_get_pixel): Likewise.
8598 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
8599 updated code to use it.
8600 (common_blitter): Added common blitter for render target and bitmap.
8601 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
8602 (grub_video_vbe_blit_render_target): Likewise.
8603
bc8c036d 86042006-07-30 Johan Rydberg <jrydberg@gnu.org>
8605
8606 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
8607 is in text mode if there is no console control protocol instance
8608 available.
8609
684a8eff 86102006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8611
8612 * include/grub/video.h: Code cleanup.
8613
8614 * include/grub/i386/pc/vbe.h: Likewise.
8615
8616 * video/i386/pc/vbe.c: Likewise.
8617
8618 * video/i386/pc/vbeblit.c: Likewise.
8619
8620 * video/i386/pc/vbefill.c: Likewise.
8621
8622 * video/video.c: Likewise. Also added more comments.
8623
5915059b 86242006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8625
8626 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
8627 (struct grub_biosdisk_dap): Likewise.
8628
8629 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
8630 linkage settings for all functions.
8631
90ce5d56 86322006-07-12 Marco Gerards <marco@gnu.org>
8633
8634 * configure.ac (--enable-mm-debug): Fix typo.
8635
8636 * genkernsyms.sh.in: Use proper quoting for `CC'.
8637
43e7f879 86382006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
8639
8640 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
8641 (normal_mod_ASFLAGS): Remove "-m32".
8642
4889bdec 86432006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
8644
8645 * util/misc.c: Include config.h.
8646 [!HAVE_MEMALIGN]: Do not include malloc.h.
8647 (grub_memalign): Use posix_memalign, if present. Then, use
8648 memalign, if present. Otherwise, emit an error.
8649
8650 * util/grub-emu.c: Do not include malloc.h.
8651
8652 * include/grub/util/misc.h: Include unistd.h. This is required for
8653 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
8654 D. Eades III <hde@foobar-qux.org>.
8655
8656 * configure.ac (AC_GNU_SOURCE): Added.
8657 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
8658 type.
8659
fd39d4da 86602006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
8661
8662 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
8663 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
8664
b786f3b5 86652006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
8666
8667 * include/grub/types.h (grub_host_addr_t): Rename to
8668 grub_target_addr_t.
8669 (grub_host_off_t): Rename to grub_target_off_t.
8670 (grub_host_size_t): Rename to grub_target_size_t.
8671 (grub_host_ssize_t): Rename to grub_target_ssize_t.
8672 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
8673
8674 * include/grub/kernel.h (struct grub_module_header): Change type
8675 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
8676 (grub_module_info): Likewise.
f19dbdb7 8677
051988bb 86782006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8679
8680 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
8681 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
8682 Velazquez <jesus.velazquez@gmail.com>.
8683
deae281b 86842006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8685
8686 Count partitions from 1 instead of 0 in the string representation
8687 of partitions. Still use 0-based internally.
f19dbdb7 8688
deae281b 8689 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
8690 (sun_partition_map_iterate): Use grub_partition_t instead of
8691 struct grub_partition *. Cast DESC->START_CYLINDER to
8692 grub_uint64_t after converting the endian.
8693 (sun_partition_map_probe): Subtract 1 for PARTNUM.
8694 (sun_partition_map_get_name): Add 1 to P->INDEX.
8695
8696 * partmap/pc.c (grub_partition_parse): Subtract 1 for
8697 PCDATA->DOS_PART.
8698 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
8699
8700 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
8701 zero instead of one.
8702 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
8703 (gpt_partition_map_get_name): Add 1 into P->INDEX.
8704
8705 * partmap/apple.c (apple_partition_map_iterate): Change the type
8706 of POS to unsigned.
8707 (apple_partition_map_probe): Subtract 1 for PARTNUM.
8708 (apple_partition_map_get_name): Add 1 into P->INDEX.
8709
8710 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
8711 of POS to unsigned.
8712 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
8713 calculate the offset of a partition.
8714 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
8715 (amiga_partition_map_get_name): Add 1 into P->INDEX.
8716
8717 * partmap/acorn.c (acorn_partition_map_find): Change the type of
8718 SECTOR to grub_disk_addr_t.
8719 (acorn_partition_map_iterate): Likewise.
8720 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
8721 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
8722 top.
8723 (acorn_partition_map_get_name): Add 1 into P->INDEX.
8724
8725 * kern/i386/pc/init.c (make_install_device): Add 1 into
8726 GRUB_INSTALL_DOS_PART.
8727
8728 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
8729 conditional.
8730
524a1e6a 87312006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8732
8733 Clean up the code to support 64-bit addressing in disks and
8734 files. This change is not enough for filesystems yet.
f19dbdb7 8735
524a1e6a 8736 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
8737 type of "start" to grub_uint64_t.
8738 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
8739 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
8740 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
8741 convert addresses.
8742
8743 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
8744 to grub_disk_addr_t.
8745
8746 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
8747 string.
8748
8749 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8750
8751 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
8752 to char *.
8753
8754 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
8755
8756 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
8757
8758 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
8759
8760 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
8761 to grub_off_t, to detect an error from grub_file_seek.
8762 (grub_multiboot_load_elf32): Likewise.
8763
8764 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
8765 maximum unsigned long value when an overflow is detected.
8766 (grub_strtoull): New function.
8767 (grub_divmod64): Likewise.
8768 (grub_lltoa): use grub_divmod64.
8769
8770 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
8771 grub_disk_addr_t.
8772 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
8773 the pointer to next character. Use grub_strtoull instead of
8774 grub_strtoul.
8775 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
8776 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
8777 respectively.
8778
fe6b695a 8779 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 8780 return value is signed.
8781 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
8782 test if OFFSET is less than zero, as OFFSET is unsigned now.
8783
8784 * kern/disk.c (struct grub_disk_cache): Change the type of
8785 "sector" to grub_disk_addr_t.
8786 (grub_disk_cache_get_index): Change the type of SECTOR to
8787 grub_disk_addr_t. Calculate the hash with SECTOR casted to
8788 unsigned after shifting.
8789 (grub_disk_cache_invalidate): Change the type of SECTOR to
8790 grub_disk_addr_t.
8791 (grub_disk_cache_unlock): Likewise.
8792 (grub_disk_cache_store): Likewise.
8793 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
8794 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
8795 grub_disk_addr_t and grub_uint64_t, respectively.
8796 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
8797 body, as the value of OFFSET is tweaked by
8798 grub_disk_check_range. Change the types of START_SECTOR, LEN and
8799 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
8800 respectively.
8801 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
8802 body, as the value of OFFSET is tweaked by
8803 grub_disk_check_range. Change the types of LEN and N to
8804 grub_size_t.
8805
8806 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
8807 and "saved_offset" to grub_off_t.
8808 (test_header): Cast BUF to char *.
8809 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
8810 to char *.
8811 (grub_gzio_read): Change the types of OFFSET and SIZE to
8812 grub_off_t and grub_size_t, respectively.
8813
8814 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
8815 Removed.
8816 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
8817 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
8818 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
8819 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
8820 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
8821
8822 * include/grub/types.h (grub_off_t): Unconditionally set to
8823 grub_uint64_t.
8824 (grub_disk_addr_t): Changed to grub_uint64_t.
8825
8826 * include/grub/partition.h (struct grub_partition): Change the
8827 types of "start", "len" and "offset" to grub_disk_addr_t,
8828 grub_uint64_t and grub_disk_addr_t, respectively.
8829 (grub_partition_get_start): Return grub_disk_addr_t.
8830 (grub_partition_get_len): Return grub_uint64_t.
8831
8832 * include/grub/misc.h (grub_strtoull): New prototype.
8833 (grub_divmod64): Likewise.
8834
8835 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
8836 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
8837 grub_off_t, respectively.
8838 All callers and references changed.
8839
8840 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
8841 grub_size_t in "read".
8842 All callers and references changed.
8843
8844 * include/grub/file.h (struct grub_file): Change the types of
8845 "offset" and "size" to grub_off_t and grub_off_t,
8846 respectively. Change the type of SECTOR to grub_disk_addr_t in
8847 "read_hook".
8848 (grub_file_read): Change the type of LEN to grub_size_t.
8849 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
8850 grub_off_t.
8851 (grub_file_size): Return grub_off_t.
8852 (grub_file_tell): Likewise.
8853 All callers and references changed.
8854
8855 * include/grub/disk.h (struct grub_disk_dev): Change the types of
8856 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8857 "write".
8858 (struct grub_disk): Change the type of "total_sectors" to
8859 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 8860 "read_hook".
524a1e6a 8861 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8862 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8863 (grub_disk_write): Likewise.
8864 All callers and references changed.
8865
8866 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8867 char * for grub_strncmp to silence gcc.
8868 (grub_iso9660_mount): Likewise.
8869 (grub_iso9660_mount): Likewise.
8870 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8871 return statement.
8872 (grub_iso9660_iterate_dir): Likewise.
8873 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8874
8875 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8876 LEN to grub_disk_addr_t and grub_size_t, respectively.
8877
8878 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8879
8880 * fs/jfs.c (grub_jfs_read_file): Likewise.
8881
8882 * fs/minix.c (grub_jfs_read_file): Likewise.
8883
8884 * fs/sfs.c (grub_jfs_read_file): Likewise.
8885
8886 * fs/ufs.c (grub_jfs_read_file): Likewise.
8887
8888 * fs/xfs.c (grub_jfs_read_file): Likewise.
8889
8890 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8891 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8892 respectively.
8893
8894 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8895 BLKNR to -1 instead of returning GRUB_ERRNO.
8896 (grub_ext2_read_file): Change the types of SECTOR and
8897 LEN to grub_disk_addr_t and grub_size_t, respectively.
8898
8899 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8900 LEN to grub_disk_addr_t and grub_size_t, respectively.
8901
8902 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8903 grub_file_read.
8904
8905 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8906 string. Do not cast SECTOR explicitly.
8907
8908 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8909 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8910 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8911 grub_disk_addr_t and grub_size_t, respectively. If the sector is
8912 over 2TB and LBA mode is not supported, raise an error.
8913 (get_safe_sectors): New function.
8914 (grub_biosdisk_read): Use get_safe_sectors.
8915 (grub_biosdisk_write): Likewise.
8916
8917 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8918 (grub_efidisk_write): Likewise.
8919
8920 * disk/loopback.c (delete_loopback): Cosmetic changes.
8921 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8922 correctly.
8923 (grub_loopback_open): Likewise.
8924 (grub_loopback_read): Likewise. Also, change the type of POS to
8925 grub_off_t, and fix the usage of grub_memset.
8926
8927 * commands/i386/pc/play.c: Include grub/machine/time.h.
8928
8929 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8930 print FILE->SIZE.
8931
8932 * commands/configfile.c: Include grub/env.h.
8933
8934 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8935 GRUB_ERRNO directly instead. Change the type of POS to
8936 grub_off_t. Follow the coding standard.
8937
8938 * commands/blocklist.c: Include grub/partition.h.
8939 (grub_cmd_blocklist): Return an error if the underlying device is
8940 not a disk. Take the starting sector of a partition into account,
8941 if a partition is used.
8942
8943 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8944 a length field.
8945 (lba_mode): Support 64-bit addresses.
8946 (chs_mode): Likewise.
8947 (copy_buffer): Adapted to the new offsets of a length field and a
8948 segment field.
8949 (blocklist_default_start): Allocate 64-bit space.
8950
8951 * boot/i386/pc/boot.S (force_lba): Removed.
8952 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 8953 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 8954 space.
8955 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8956 is useless.
8957 (lba_mode): Refactored to support a 64-bit address. More size
8958 optimization.
8959 (setup_sectors): Likewise.
8960
53af98ad 89612006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8962
8963 * DISTLIST: Added include/grub/i386/linux.h. Removed
8964 include/grub/i386/pc/linux.h
8965
8966 * configure.ac (AC_INIT): Bumped to 1.94.
8967
8968 * config.guess: Updated from gnulib.
8969 * config.sub: Likewise.
8970 * install-sh: Likewise.
8971 * mkinstalldirs: Likewise.
8972
b4c1940a 89732006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8974
8975 * conf/common.rmk (grub_modules_init.lst): Depended on
8976 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8977 MODSRCFILES.
8978
8979 * genmk.rb (PModule::rule): Reverted the previous change.
8980
cfca1cfd 89812006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8982
8983 * conf/common.rmk (grub_modules_init.lst): Depends on
8984 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8985 that the target does not exist before producing.
8986 (grub_modules_init.h): Remove the target before generating.
8987 (grub_emu_init.c): Likewise.
8988
8989 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8990
aa6d7826 89912006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
8992
8993 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8994 for the target-specific tests. Make sure that we also have the
8995 up-to-date target variables for those tests.
8996
26c607b9 89972006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8998
8999 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
9000 (PModule::rule): Likewise.
9001
0162321a 90022006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
9003
9004 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
9005 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
9006 target-specific flags should be prefixed.
9007 (PModule::rule): Likewise.
9008
6c826348 90092006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
9010
9011 * configure.ac (CMP): Check if cmp is available explicitly.
9012
b977bf01 90132006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
9014
9015 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
9016 (target_cpu): New variable.
9017 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 9018
b977bf01 9019 * util/i386/pc/grub-install.in (host_cpu): Removed.
9020 (target_cpu): New variable.
9021 (pkglibdir): Use target_cpu instead of host_cpu.
9022
9023 * util/genmoddep.c: Removed.
f19dbdb7 9024
b977bf01 9025 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
9026 instead of GRUB_HOST_SIZEOF_VOID_P.
9027 * kern/dl.c: Likewise.
9028
9029 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
9030 ...
9031 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9032 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9033 (GRUB_TARGET_SIZEOF_LONG): ... this.
9034 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9035 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9036 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9037 to ...
9038 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9039 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9040 (GRUB_TARGET_SIZEOF_LONG): ... this.
9041 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9042 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9043 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9044 to ...
9045 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9046 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9047 (GRUB_TARGET_SIZEOF_LONG): ... this.
9048 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9049 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9050
9051 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
9052 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
9053 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
9054 instead of GRUB_HOST_SIZEOF_LONG.
9055 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
9056 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
9057 GRUB_CPU_WORDS_BIGENDIAN.
9058 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
9059 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
9060 grub_host_ssize_t.
9061
9062 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
9063 (genmoddep_SOURCES): Likewise.
9064 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
9065 (genmoddep_SOURCES): Likewise.
9066 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
9067 (genmoddep_SOURCES): Likewise.
9068 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
9069 Likewise.
9070 (genmoddep_SOURCES): Likewise.
9071
9072 * genmoddep.awk: New file.
9073
9074 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
9075 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
9076 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
9077 (PModule::rule): Likewise.
9078 (Program::rule): Likewise.
9079 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
9080 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
9081 respectively.
9082
9083 * configure.ac: Rewritten intensively to use host and target
9084 instead of build and host, respectively.
9085
9086 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
9087 (host_cpu): Removed.
9088 (target_cpu): New variable.
9089 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
9090 (BUILD_CC): Removed.
9091 (BUILD_CFLAGS): Likewise.
9092 (BUILD_CPPFLAGS): Likewise.
9093 (TARGET_CC): New variable.
9094 (TARGET_CFLAGS): Likewise.
9095 (TARGET_CPPFLAGS): Likewise.
9096 (TARGET_LDFLAGS): Likewise.
9097 (AWK): Likewise.
9098 (include): Use target_cpu instead of host_cpu.
9099 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 9100
b977bf01 9101 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
9102
f09771a1 91032006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
9104
9105 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
9106 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
9107 field 'false' to 'exec_on_false'.
9108 (grub_script_create_cmdif): Renamed argument names to reflect above
9109 changes.
9110
9111 * normal/execute.c (grub_script_execute_cmdif): Likewise.
9112
9113 * normal/script.c (grub_script_create_cmdif): Likewise.
9114
118f4fb3 91152006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
9116
9117 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
9118 top.
9119 (grub_hfsplus_btree_recptr): Likewise.
9120 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
9121 FILEBLOCK both to pass a block number and store next block
9122 number.
9123 (grub_hfsplus_read_block): Rewritten heavily to support an extent
9124 overflow file correctly. Specify errors appropriately, because
9125 fshelp expects that GRUB_ERRNO is set when fails. Reuse
9126 grub_hfsplus_btree_recptr to get the pointer to a found key.
9127 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
9128 is found.
9129
9130 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
9131 linux.mod.
9132 (_linux_mod_SOURCES): New variable.
9133 (_linux_mod_CFLAGS): Likewise.
9134 (_linux_mod_LDFLAGS): Likewise.
9135 (linux_mod_SOURCES): Likewise.
9136 (linux_mod_CFLAGS): Likewise.
9137 (linux_mod_LDFLAGS): Likewise.
9138
9139 * DISTLIST: Added loader/i386/efi/linux.c,
9140 loader/i386/efi/linux_normal.c and
9141 include/grub/i386/efi/loader.h.
9142
9143 * loader/i386/efi/linux.c: New file.
9144 * loader/i386/efi/linux_normal.c: Likewise.
9145 * include/grub/i386/efi/loader.h: Likewise.
9146
89a7d726 91472006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
9148
9149 * commands/blocklist.c: New file.
9150
9151 * DISTLIST: Added commands/blocklist.c.
9152
9153 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 9154 color for the background, and a darker color for the foreground.
89a7d726 9155 (grub_console_checkkey): Return READ_KEY.
9156 (grub_console_cls): Set the background to
9157 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
9158
9159 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
9160
9161 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
9162 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
9163
9164 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
9165 prototype.
9166
9167 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
9168 BG. The spec is wrong again.
9169
9170 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
9171 prototype.
9172 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
9173
9174 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9175 commands/blocklist.c.
9176 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 9177
89a7d726 9178 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
9179 (blocklist_mod_SOURCES): New variable.
9180 (blocklist_mod_CFLAGS): Likewise.
9181 (blocklist_mod_LDFLAGS): Likewise.
9182
75c8f258 91832006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
9184
9185 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
9186 duplication.
9187 (lba_mode): Use %eax more intensively to reduce the code size.
9188
da2eb181 91892006-05-20 Marco Gerards <marco@gnu.org>
9190
9191 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
9192
9193 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
9194 for `menuentry'.
9195 (script): Accept leading newlines.
9196 (newlines): New rule to describe 0 or more newlines.
9197 (commands): Accept `command' with trailing newline. Fixed the
9198 order in which arguments were passed to `grub_script_add_cmd'.
9199 Accept commands separated by newlines.
9200 (function): Changed to accept newlines.
9201 (menuentry) Rewritten.
9202
9203 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
9204 front of the list, instead of to the end.
9205
577b4050 92062006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
9207
9208 * util/i386/pc/grub-install.in (bindir): New variable.
9209 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
9210 Shaver <lbgwjl@gmail.com>.
9211
0d6e1189 92122006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
9213
9214 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
9215 grub/machine/linux.h
9216 * loader/i386/pc/linux.c: Likewise.
9217
9218 * include/grub/i386/pc/linux.h: Moved to ...
9219 * include/grub/i386/linux.h: ... here.
9220
9221 * include/grub/i386/linux.h (struct linux_kernel_params): New
9222 struct.
f19dbdb7 9223
31b86e9f 92242006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
9225
9226 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
9227 checking.
9228 (grub_video_vbe_blit_glyph): Likewise.
9229 (grub_video_vbe_blit_bitmap): Likewise.
9230 (grub_video_vbe_blit_render_target): Likewise.
9231
83b984de 92322006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
9233
9234 * configure.ac (--with-platform): Properly quote the square
9235 brackets.
9236
5f0413bd 92372006-05-08 Marco Gerards <marco@gnu.org>
9238
9239 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
9240 this...
9241 (kernel_elf_HEADERS): ...to this. Updated all users.
9242 (grubof_symlist.c): Renamed from this...
9243 (kernel_elf_symlist.c): ...to this. Updated all users.
9244 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9245 (grubof_SOURCES): Renamed from this...
9246 (kernel_elf_SOURCES): ...to this.
9247 (grubof_HEADERS): Renamed from this...
9248 (kernel_elf_HEADERS): ...to this.
9249 (grubof_CFLAGS): Renamed from this...
9250 (kernel_elf_CFLAGS): ...to this.
9251 (grubof_ASFLAGS): Renamed from this...
9252 (kernel_elf_ASFLAGS): ...to this.
9253 (grubof_LDFLAGS): Renamed from this...
9254 (kernel_elf_LDFLAGS): ...to this.
9255
9256 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
9257 this...
9258 (kernel_elf_HEADERS): ...to this. Updated all users.
9259 (grubof_symlist.c): Renamed from this...
9260 (kernel_elf_symlist.c): ...to this. Updated all users.
9261 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9262 (grubof_SOURCES): Renamed from this...
9263 (kernel_elf_SOURCES): ...to this.
9264 (grubof_HEADERS): Renamed from this...
9265 (kernel_elf_HEADERS): ...to this.
9266 (grubof_CFLAGS): Renamed from this...
9267 (kernel_elf_CFLAGS): ...to this.
9268 (grubof_ASFLAGS): Renamed from this...
9269 (kernel_elf_ASFLAGS): ...to this.
9270 (grubof_LDFLAGS): Renamed from this...
9271 (kernel_elf_LDFLAGS): ...to this.
9272
9273 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
9274 `kernel.elf' instead of `grubof'.
9275
05568c2e 92762006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
9277
9278 Add --with-platform to configure. Use pkglibdir instead of
9279 pkgdatadir. This is reported by Roger Leigh.
9280
9281 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
9282 (host_vendor): Likewise.
9283 (host_os): Likewise.
9284 (pkgdatadir): Likewise.
9285 (platform): New variable.
9286 (pkglibdir): Likewise.
9287 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 9288
05568c2e 9289 * util/i386/pc/grub-install.in (datadir): Removed.
9290 (host_vendor): Likewise.
9291 (host_os): Likewise.
9292 (pkgdatadir): Likewise.
9293 (platform): New variable.
9294 (pkglibdir): Likewise.
9295 Use PKGLIBDIR instead of PKGDATADIR.
9296
9297 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
9298 instead of GRUB_DATADIR.
9299 (main): Likewise.
9300 * util/i386/pc/grub-mkimage.c (usage): Likewise.
9301 (main): Likewise.
9302 * util/i386/efi/grub-mkimage.c (usage): Likewise.
9303 (main): Likewise.
9304
9305 * configure.ac (--with-platform): New option.
9306 Use PLATFORM instead of HOST_VENDOR to specify a platform.
9307
9308 * Makefile.in: Include a makefile based on PLATFORM instead of
9309 HOST_VENDOR.
9310 (pkgdatadir): Not appended by the machine type.
9311 (pkglibdir): Appended by the machine type.
9312 (host_vendor): Removed.
9313 (platform): New variable.
9314 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
9315 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
9316 (uninstall): Likewise.
9317
4e93851c 93182006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
9319
9320 Use the environment context in the menu. Remove the commands
9321 "default" and "timeout", and use variables instead.
f19dbdb7 9322
4e93851c 9323 * normal/menu.c: Include grub/env.h.
9324 (print_entry): Cast TITLE to silence gcc.
9325 (get_timeout): New function.
9326 (set_timeout): Likewise.
9327 (get_entry_number): Likewise.
9328 (run_menu): Use a default entry, a fallback entry and a timeout
9329 in the environment variables "default", "fallback" and
9330 "timeout". Also, tweak the default entry if it is not within the
9331 current menu entries.
9332 (grub_menu_run): Use a fallback entry in the environment variable
9333 "fallback".
9334
9335 * normal/main.c (read_config_file): Do not initialize
9336 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
9337 NEWMENU->TIMEOUT.
9338 (grub_normal_execute): Use a data slot to store the menu.
9339
9340 * include/grub/normal.h (struct grub_menu): Removed default_entry,
9341 fallback_entry and timeout.
9342 (struct grub_menu_list): Removed.
9343 (grub_menu_list_t): Likewise.
9344 (struct grub_context): Likewise.
9345 (grub_context_t): Likewise.
9346 (grub_context_get): Likewise.
9347 (grub_context_get_current_menu): Likewise.
9348 (grub_context_push_menu): Likewise.
9349 (grub_context_pop_menu): Likewise.
9350 (grub_default_init): Likewise.
9351 (grub_default_fini): Likewise.
9352 (grub_timeout_init): Likewise.
9353 (grub_timeout_fini): Likewise.
9354
9355 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
9356 and timeout.mod.
9357 (normal_mod_SOURCES): Removed normal/context.c.
9358
9359 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
9360 commands/default.c, commands/timeout.c and normal/context.c.
9361 (normal_mod_SOURCES): Removed normal/context.c.
9362
9363 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
9364 commands/timeout.c and normal/context.c.
9365 (normal_mod_SOURCES): Removed normal/context.c.
9366
9367 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
9368 commands/default.c, commands/timeout.c and normal/context.c.
9369 (normal_mod_SOURCES): Removed normal/context.c.
9370
9371 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
9372 timeout.mod.
9373 (default_mod_SOURCES): Removed.
9374 (default_mod_CFLAGS): Likewise.
9375 (default_mod_LDFLAGS): Likewise.
9376 (timeout_mod_SOURCES): Removed.
9377 (timeout_mod_CFLAGS): Likewise.
9378 (timeout_mod_LDFLAGS): Likewise.
9379
9380 * DISTLIST: Removed commands/default.c, commands/timeout.c and
9381 normal/context.c.
9382
9383 * commands/default.c: Removed.
9384 * commands/timeout.c: Likewise.
9385 * normal/context.c: Likewise.
9386
1eb9cc1d 93872006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
9388
9389 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
9390
385bd9c1 93912006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
9392
9393 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
9394 "next" to "prev" for readability.
9395 (struct grub_env_sorted_var): New struct.
9396 (grub_env_context): Renamed to ...
9397 (initial_context): ... this.
9398 (grub_env_var_context): Renamed to ...
9399 (current_context): ... this.
9400 (grub_env_find): Look only at CURRENT_CONTEXT.
9401 (grub_env_context_open): Rewritten to copy exported variables from
9402 previous context.
9403 (grub_env_context_close): Rewritten according to the new
9404 scheme. Also, add an assertion to prevent the initial context from
9405 removed.
9406 (grub_env_insert): Removed the code for the sorted list.
9407 (grub_env_remove): Likewise.
9408 (grub_env_export): Simply mark the variable with
9409 GRUB_ENV_VAR_GLOBAL.
9410 (grub_env_set): A cosmetic change for naming consistency.
9411 (grub_env_get): Likewise.
9412 (grub_env_unset): Likewise.
9413 (grub_env_iterate): Rewritten to sort variables within this
9414 function.
9415 (grub_register_variable_hook): Fixed for naming consistency. Call
9416 grub_env_find again, only if NAME is not found at the first time.
9417 (mangle_data_slot_name): New function.
9418 (grub_env_set_data_slot): Likewise.
9419 (grub_env_get_data_slot): Likewise.
9420 (grub_env_unset_data_slot): Likewise.
9421
9422 * include/grub/env.h (grub_env_var_type): New enum.
9423 (GRUB_ENV_VAR_LOCAL): New constant.
9424 (GRUB_ENV_VAR_GLOBAL): Likewise.
9425 (GRUB_ENV_VAR_DATA): Likewise.
9426 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
9427 "type".
9428 (grub_env_set): Replace VAR with NAME for consistency.
9429 (grub_register_variable_hook): Likewise.
9430 (grub_env_export): Specify the name of the argument.
9431 (grub_env_set_data_slot): New prototype.
9432 (grub_env_get_data_slot): Likewise.
9433 (grub_env_unset_data_slot): Likewise.
9434
7f362539 94352006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
9436
9437 Extend the loader so that GRUB can accept a loader which comes
9438 back to GRUB when a loaded image exits. Also, this change adds
9439 support for a chainloader on EFI.
f19dbdb7 9440
7f362539 9441 * term/efi/console.c: Include grub/misc.h.
9442 (grub_console_checkkey): Display a scan code on the top for
9443 debugging. This will be removed once the EFI port gets stable.
9444 Correct the scan code mapping.
9445
9446 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
9447 allocate memory from larger regions, in order to reduce the number
9448 of allocated regions. Otherwise, the MacOSX loader panics.
9449 (filter_memory_map): Avoid less than 1MB for compatibility with
9450 other loaders.
9451 (add_memory_regions): Allocate from the tail of a region, if
9452 possible, to avoid allocating a region near to 1MB, for the MacOSX
9453 loader.
9454
9455 * kern/efi/init.c (grub_efi_set_prefix): Specify
9456 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
9457
9458 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
9459 argument IMAGE_HANDLE and specify it to get a loaded image.
9460 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
9461 grub_efi_get_loaded_image.
fe6b695a 9462 (grub_efi_get_filename): Divide the length by the size of
7f362539 9463 grub_efi_char16_t.
9464 (grub_efi_get_device_path): New function.
9465 (grub_efi_print_device_path): Print End Device Path nodes. Divide
9466 the length by the size of grub_efi_char16_t for a file path device
9467 path node.
9468
9469 * kern/loader.c (grub_loader_noreturn): New variable.
9470 (grub_loader_set): Accept a new argument NORETURN. Set
9471 GRUB_LOADER_NORETURN to NORETURN.
9472 All callers changed.
9473 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
9474 grub_machine_fini.
9475
9476 * include/grub/efi/efi.h (grub_efi_get_device_path): New
9477 prototype.
9478 (grub_efi_get_loaded_image): Take an argument to specify an image
9479 handle.
9480
9481 * include/grub/loader.h (grub_loader_set): Added one more argument
9482 NORETURN.
9483
9484 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
9485 instead of grub_efi_open_protocol.
9486 (grub_efidisk_get_device_name): Likewise.
9487 (grub_efidisk_close): Print a newline.
9488 (grub_efidisk_get_device_handle): Fixed to use
9489 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
9490 GRUB_EFI_DEVICE_PATH_TYPE.
9491
9492 * disk/efi/efidisk.c (device_path_guid): Moved to ...
9493 * kern/efi/efi.c (device_path_guid): ... here.
9494
9495 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
9496 chain.mod.
9497 (kernel_mod_HEADERS): Added efi/disk.h.
9498 (_chain_mod_SOURCES): New variable.
9499 (_chain_mod_CFLAGS): Likewise.
9500 (_chain_mod_LDFLAGS): Likewise.
9501 (chain_mod_SOURCES): Likewise.
9502 (chain_mod_CFLAGS): Likewise.
9503 (chain_mod_LDFLAGS): Likewise.
9504
9505 * DISTLIST: Added include/grub/efi/chainloader.h,
9506 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
9507
9508 * include/grub/efi/chainloader.h: New file.
9509 * loader/efi/chainloader.c: Likewise.
9510 * loader/efi/chainloader_normal.c: Likewise.
9511
c0111d6e 95122006-04-30 Marco Gerards <marco@gnu.org>
9513
9514 * commands/configfile.c (grub_cmd_source): New function.
9515 (GRUB_MOD_INIT): Register the commands `source' and `.'.
9516 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
9517
df5341da 95182006-04-30 Marco Gerards <marco@gnu.org>
9519
9520 * normal/execute.c (grub_script_execute_cmd): Change the return
9521 type to `grub_err_t'. Correctly return the error.
9522 (grub_script_execute_cmdline): In case a command line is not a
9523 command or a function, try to interpret it as an assignment.
9524
f85934bd 95252006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
9526
9527 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
9528 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
9529 skip a node whose name is obviously invalid as UTF-16,
9530 i.e. contains a NUL character. Stop the iteration when the last
9531 directory entry is found. Instead of using the return value of
9532 grub_hfsplus_btree_iterate_node, store the value in RET and use
9533 it, because the iterator can be stopped by the last directory
9534 entry.
9535
8f8a2cf8 95362006-04-30 Marco Gerards <marco@gnu.org>
9537
9538 * include/grub/env.h (grub_env_export): New prototype. Reported
9539 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
9540
a27e84ce 95412006-04-30 Marco Gerards <marco@gnu.org>
9542
9543 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
9544 size of the extents in a catalog file record.
9545
eaef0553 95462006-04-29 Marco Gerards <marco@gnu.org>
9547
9548 * commands/configfile.c (grub_cmd_configfile): Execute the
9549 configfile within its own context.
9550
9551 * include/grub/env.h (grub_env_context_open): New prototype.
9552 (grub_env_context_close): Likewise.
9553
9554 * kern/env.c (grub_env): Removed.
9555 (grub_env_sorted): Likewise.
9556 (grub_env_context): New variable.
9557 (grub_env_var_context): Likewise.
9558 (grub_env_find): Search both the active context and the global
9559 context.
9560 (grub_env_context_open): New function.
9561 (grub_env_context_close): Likewise.
9562 (grub_env_insert): Likewise.
9563 (grub_env_remove): Likewise.
9564 (grub_env_export): Likewise.
9565 (grub_env_set): Changed to use helper functions to avoid code
9566 duplication.
9567 (grub_env_iterate): Rewritten so both the current context and the
9568 global context are being used.
9569
9570 * normal/command.c (export_command): New function.
9571 (grub_command_init): Register the `export' function.
9572
7b455f4d 95732006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
9574
9575 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
9576 explicitly to suppress gcc's warnings.
9577 * fs/fat.c (grub_fat_find_dir): Likewise.
9578 (grub_fat_label): Likewise.
9579 * fs/xfs.c (grub_xfs_read_inode): Likewise.
9580 (grub_xfs_mount): Likewise.
9581 (grub_xfs_label): Likewise.
9582 * fs/affs.c (grub_affs_mount): Likewise.
9583 (grub_affs_label): Likewise.
9584 (grub_affs_iterate_dir): Likewise.
9585 * fs/sfs.c (grub_sfs_mount): Likewise.
9586 (grub_sfs_iterate_dir): Likewise.
9587 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
9588 * fs/hfs.c (grub_hfs_mount): Likewise.
9589 (grub_hfs_cmp_catkeys): Likewise.
9590 (grub_hfs_find_dir): Likewise.
9591 (grub_hfs_dir): Likewise.
9592 (grub_hfs_label): Likewise.
9593 * fs/jfs.c (grub_jfs_mount): Likewise.
9594 (grub_jfs_opendir): Likewise.
9595 (grub_jfs_getent): Likewise.
9596 (grub_jfs_lookup_symlink): Likewise.
9597 (grub_jfs_label): Likewise.
9598 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
9599 (grub_hfsplus_iterate_dir): Likewise.
9600 (grub_hfsplus_btree_iterate_node): Made static.
9601
9602 * util/grub-emu.c (prefix): New variable.
9603 (grub_machine_set_prefix): New function.
9604 (main): Do not set the environment variable "prefix" here. Only
9605 set PREFIX, which is used later by grub_machine_set_prefix.
9606
9607 * include/grub/video.h: Do not include grub/symbol.h.
9608 (grub_video_register): Not exported. This symbol is not defined in
9609 the kernel.
9610 (grub_video_unregister): Likewise.
9611 (grub_video_iterate): Likewise.
9612 (grub_video_setup): Likewise.
9613 (grub_video_restore): Likewise.
9614 (grub_video_get_info): Likewise.
9615 (grub_video_get_blit_format): Likewise.
9616 (grub_video_set_palette): Likewise.
9617 (grub_video_get_palette): Likewise.
9618 (grub_video_set_viewport): Likewise.
9619 (grub_video_get_viewport): Likewise.
9620 (grub_video_map_color): Likewise.
9621 (grub_video_map_rgb): Likewise.
9622 (grub_video_map_rgba): Likewise.
9623 (grub_video_fill_rect): Likewise.
9624 (grub_video_blit_glyph): Likewise.
9625 (grub_video_blit_bitmap): Likewise.
9626 (grub_video_blit_render_target): Likewise.
9627 (grub_video_scroll): Likewise.
9628 (grub_video_swap_buffers): Likewise.
9629 (grub_video_create_render_target): Likewise.
9630 (grub_video_delete_render_target): Likewise.
9631 (grub_video_set_active_render_target): Likewise.
9632
9633 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
9634 Undefined.
9635 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
9636
9637 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
9638 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9639 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9640 instead of $(srcdir)/genkernsyms.sh.
9641
9642 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
9643 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9644 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9645 instead of $(srcdir)/genkernsyms.sh.
9646
9647 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
9648 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9649 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9650 instead of $(srcdir)/genkernsyms.sh.
9651
9652 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
9653 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9654 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9655 instead of $(srcdir)/genkernsyms.sh.
9656
9657 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
9658 genkernsyms.sh.
9659
9660 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
9661 genkernsyms.sh.
9662 (gensymlist.sh): New target.
9663 (genkernsyms.sh): Likewise.
9664
9665 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
9666 genkernsyms.sh.in and gensymlist.sh.in.
9667
9668 * genkernsyms.sh: Removed.
9669 * gensymlist.sh: Likewise.
f19dbdb7 9670
7b455f4d 9671 * genkernsyms.sh.in: New file.
9672 * gensymlist.sh.in: Likewise.
9673
1885bb27 96742006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9675
9676 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
9677 clobber "prefix", since we may have already set it manually.
9678
71538dff 96792006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9680
9681 * kern/misc.c (abort): New alias for grub_abort.
9682
2965c7cc 96832006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
9684
9685 A new machine-specific function "grub_machine_set_prefix" is
9686 defined. This is called after loading modules, so that a prefix
9687 initialization can use modules. Also, this change adds an
9688 intensive debugging feature for the memory manager via the
9689 configure option "--enable-mm-debug".
f19dbdb7 9690
2965c7cc 9691 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
9692 PART.LEN.
9693
9694 * kern/sparc64/ieee1275/init.c (abort): Removed.
9695 (grub_stop): Likewise.
9696 (grub_exit): New function.
9697 (grub_set_prefix): Renamed to ...
9698 (grub_machine_set_prefix): ... this.
9699 (grub_machine_init): Do not call grub_set_prefix.
9700
9701 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
9702 (grub_machine_set_prefix): ... this.
9703 (grub_machine_init): Do not call grub_set_prefix.
9704
9705 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
9706 (grub_machine_init): Do not set the prefix here.
9707
9708 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
9709
9710 * kern/efi/init.c: Include grub/mm.h.
9711 (grub_efi_set_prefix): New function.
9712
9713 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
9714 (grub_efi_get_filename): New function.
9715 (grub_print_device_path): Renamed to ...
9716 (grub_efi_print_device_path): ... this.
9717
9718 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
9719 [MM_DEBUG] (grub_realloc): Likewise.
9720 [MM_DEBUG] (grub_free): Likewise.
9721 [MM_DEBUG] (grub_memalign): Likewise.
9722 [MM_DEBUG] (grub_mm_debug): New variable.
9723 [MM_DEBUG] (grub_debug_malloc): New function.
9724 [MM_DEBUG] (grub_debug_free): New function.
9725 [MM_DEBUG] (grub_debug_realloc): New function.
9726 [MM_DEBUG] (grub_debug_memalign): New function.
9727
9728 * kern/misc.c (grub_abort): Print a newline to distinguish
9729 the message.
9730
9731 * kern/main.c (grub_main): Call grub_machine_set_prefix and
9732 grub_set_root_dev after loading modules. This is necessary when
9733 setting a prefix depends on modules.
9734
9735 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
9736 (grub_efi_print_device_path): ... this.
9737 (grub_efi_get_filename): New prototype.
9738 (grub_efi_set_prefix): Likewise.
9739
9740 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
9741 and grub/disk.h.
9742 (grub_efidisk_get_device_handle): New prototype.
9743 (grub_efidisk_get_device_name): Likewise.
9744
9745 * include/grub/mm.h: Include config.h.
9746 (MM_DEBUG): Removed.
9747 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
9748 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
9749 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
9750 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
9751 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
9752 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
9753 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
9754 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
9755 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
9756
9757 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
9758
9759 * disk/efi/efidisk.c: Include grub/partition.h.
9760 (iterate_child_devices): New function.
9761 (add_device): First, compare only last device path nodes, so that
9762 devices are sorted by the types.
9763 (grub_efidisk_get_device_handle): New function.
9764 (grub_efidisk_get_device_name): Likewise.
9765
9766 * configure.ac (--enable-mm-debug): New option to enable the
9767 memory manager debugging feature. This makes the binary much
9768 bigger, so is disabled by default.
9769
9cacaa17 97702006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
9771
9772 Use grub_abort instead of grub_stop, and grub_exit must be
9773 define in each architecture now. Also, this change adds support
9774 for EFI disks.
f19dbdb7 9775
9cacaa17 9776 * util/i386/pc/grub-probefs.c: Include grub/term.h.
9777 (grub_getkey): New function.
9778 (grub_term_get_current): Likewise.
9779
9780 * util/i386/pc/grub-setup.c: Include grub/term.h.
9781 (grub_getkey): New function.
9782 (grub_term_get_current): Likewise.
9783
9784 * util/misc.c (grub_stop): Renamed to ...
9785 (grub_exit): ... this.
9786
9787 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
9788 (grub_exit): ... this.
9789 (grub_machine_init): Use grub_abort instead of abort.
9790 (grub_stop): Removed.
9791
9792 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
9793 abort.
9794
9795 * kern/i386/pc/startup.S (grub_exit): New function.
9796 (cold_reboot): New label.
9797
9798 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
9799 (grub_efi_init): Call grub_efidisk_init.
9800 (grub_efi_fini): Call grub_efidisk_fini.
9801
9802 * kern/efi/efi.c: Include grub/mm.h.
9803 (grub_efi_console_control_guid): Renamed to ...
9804 (console_control_guid): ... this.
9805 (grub_efi_loaded_image_guid): Renamed to ...
9806 (loaded_image_guid): ... this.
9807 (grub_efi_locate_handle): New function.
9808 (grub_efi_open_protocol): Likewise.
9809 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
9810 GRUB_EFI_CONSOLE_CONTROL_GUID.
9811 (grub_efi_exit): Removed.
9812 (grub_stop): Likewise.
9813 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
9814 (grub_exit): New function.
9815 (grub_print_device_path): Likewise.
9816
9817 * kern/rescue.c (grub_rescue_cmd_exit): New function.
9818 (grub_enter_rescue_mode): Register "exit".
9819
9820 * kern/misc.c (grub_real_dprintf): A cosmetic change.
9821 (grub_abort): New function.
9822
9823 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
9824
9825 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
9826
9827 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
9828
9829 * include/grub/efi/efi.h (grub_efi_exit): Removed.
9830 (grub_print_device_path): New prototype.
9831 (grub_efi_locate_handle): Likewise.
9832 (grub_efi_open_protocol): Likewise.
9833
9834 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
9835 * disk/efi/efidisk.c: Likewise.
9836
9837 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
9838
9839 * include/grub/efi/console_control.h
9840 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
9841
9842 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
9843 last 8 bytes as an array.
9844 (GRUB_EFI_DISK_IO_GUID): New macro.
9845 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
9846 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
9847 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
9848 grub_uint8_t.
9849 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
9850 (struct grub_efi_device_path): Rename the member "sub_type" to
9851 "subtype".
9852 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
9853 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
9854 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
9855 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9856 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9857 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9858 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9859 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9860 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9861 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9862 (struct grub_efi_pci_device_path): New structure.
9863 (grub_efi_pci_device_path_t): New type.
9864 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9865 (struct grub_efi_pccard_device_path): New structure.
9866 (grub_efi_pccard_device_path_t): New type.
9867 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9868 (struct grub_efi_memory_mapped_device_path): New structure.
9869 (grub_efi_memory_mapped_device_path_t): New type.
9870 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9871 (struct grub_efi_vendor_device_path): New structure.
9872 (grub_efi_vendor_device_path_t): New type.
9873 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9874 (struct grub_efi_controller_device_path): New structure.
9875 (grub_efi_controller_device_path_t): New type.
9876 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9877 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9878 (struct grub_efi_acpi_device_path): New structure.
9879 (grub_efi_acpi_device_path_t): New type.
9880 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9881 (struct grub_efi_expanded_acpi_device_path): New structure.
9882 (grub_efi_expanded_acpi_device_path_t): New type.
9883 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9884 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9885 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9886 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9887 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9888 (struct grub_efi_atapi_device_path): New structure.
9889 (grub_efi_atapi_device_path_t): New type.
9890 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9891 (struct grub_efi_fibre_channel_device_path): New structure.
9892 (grub_efi_fibre_channel_device_path_t): New type.
9893 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9894 (struct grub_efi_1394_device_path): New structure.
9895 (grub_efi_1394_device_path_t): New type.
9896 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9897 (struct grub_efi_usb_device_path): New structure.
9898 (grub_efi_usb_device_path_t): New type.
9899 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9900 (struct grub_efi_usb_class_device_path): New structure.
9901 (grub_efi_usb_class_device_path_t): New type.
9902 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9903 (struct grub_efi_i2o_device_path): New structure.
9904 (grub_efi_i2o_device_path_t): New type.
9905 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9906 (struct grub_efi_mac_address_device_path): New structure.
9907 (grub_efi_mac_address_device_path_t): New type.
9908 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9909 (struct grub_efi_ipv4_device_path): New structure.
9910 (grub_efi_ipv4_device_path_t): New type.
9911 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9912 (struct grub_efi_ipv6_device_path): New structure.
9913 (grub_efi_ipv6_device_path_t): New type.
9914 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9915 (struct grub_efi_infiniband_device_path): New structure.
9916 (grub_efi_infiniband_device_path_t): New type.
9917 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9918 (struct grub_efi_uart_device_path): New structure.
9919 (grub_efi_uart_device_path_t): New type.
9920 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9921 (struct grub_efi_vendor_messaging_device_path): New structure.
9922 (grub_efi_vendor_messaging_device_path_t): New type.
9923 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9924 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9925 (struct grub_efi_hard_drive_device_path): New structure.
9926 (grub_efi_hard_drive_device_path_t): New type.
9927 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9928 (struct grub_efi_cdrom_device_path): New structure.
9929 (grub_efi_cdrom_device_path_t): New type.
9930 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9931 (struct grub_efi_vendor_media_device_path): New structure.
9932 (grub_efi_vendor_media_device_path_t): New type.
9933 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9934 (struct grub_efi_file_path_device_path): New structure.
9935 (grub_efi_file_path_device_path_t): New type.
9936 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9937 (struct grub_efi_protocol_device_path): New structure.
9938 (grub_efi_protocol_device_path_t): New type.
9939 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9940 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9941 (struct grub_efi_bios_device_path): New structure.
9942 (grub_efi_bios_device_path_t): New type.
9943 (struct grub_efi_disk_io): New structure.
9944 (grub_efi_disk_io_t): New type.
9945 (struct grub_efi_block_io_media): New structure.
9946 (grub_efi_block_io_media_t): New type.
9947 (struct grub_efi_block_io): New structure.
9948 (grub_efi_block_io_t): New type.
9949
9950 * include/grub/misc.h (grub_stop): Removed.
9951 (grub_exit): New prototype.
9952 (grub_abort): Likewise.
9953
9954 * include/grub/disk.h (enum grub_disk_dev_id): Added
9955 GRUB_DISK_DEVICE_EFIDISK_ID.
9956
9957 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9958 disk/efi/efidisk.c.
9959 (kernel_syms.lst): Remove the target if an error occurs.
9960
49986a9f 99612006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
9962
9963 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9964 as it was simply too buggy.
9965
970d3b8a 99662006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
9967
9968 * kern/misc.c (grub_lltoa): New function.
9969 (grub_vsprintf): Added support for the long long suffix,
9970 i.e. "ll".
9971
ff04ec24 99722006-04-20 Hollis Blanchard <hollis@penguinppc.org>
9973
9974 * Makefile.in (LDFLAGS): Add variable.
9975 (LD): Remove variable.
9976 * configure.ac: Add -m32 to LDFLAGS.
9977 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9978 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9979 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9980 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9981 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9982 variables.
9983 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9984 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9985 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9986
37e5e1a4 99872006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
9988
9989 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9990 length for unknown glyph.
9991
c352d8dd 99922006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9993
2eab1c0d 9994 Add support for pre-loaded modules into the EFI port.
f19dbdb7 9995
2eab1c0d 9996 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9997 completely. Accept one more argument DIR. The caller has changed.
9998
9999 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
10000
10001 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
10002 (grub_efi_loaded_image_guid): New variable.
10003 (grub_efi_get_loaded_image): New function.
10004 (grub_arch_modules_addr): Likewise.
10005
10006 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
10007 prototype.
10008
10009 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
10010 (struct grub_efi_loaded_image): New structure.
10011 (grub_efi_loaded_image_t): New type.
10012
100132006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 10014
c352d8dd 10015 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
10016 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
10017 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
10018
6d01d6b4 100192006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
10020
10021 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
10022
976a4ea0 100232006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
10024
10025 * DISTLIST: Added include/grub/efi/console.h,
10026 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
10027 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10028
10029 * include/grub/efi/console.h: New file.
10030 * include/grub/efi/time.h: Likewise.
10031 * include/grub/i386/efi/kernel.h: Likewise.
10032 * kern/efi/init.c: Likewise.
10033 * kern/efi/mm.c: Likewise.
10034 * term/efi/console.c: Likewise.
f19dbdb7 10035
976a4ea0 10036 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
10037 (grub_stop): Removed.
10038 (grub_get_rtc): Likewise.
10039 (grub_machine_init): Simply call grub_efi_init.
10040 (grub_machine_fini): Call grub_efi_fini.
10041
10042 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
10043 (grub_efi_output_string): Removed.
10044 (grub_efi_stall): New function.
10045 (grub_stop): Likewise.
10046 (grub_get_rtc): Likewise.
10047
10048 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
10049 (grub_efi_stall): New prototype.
10050 (grub_efi_allocate_pages): Likewise.
10051 (grub_efi_free_pages): Likewise.
10052 (grub_efi_get_memory_map): Likewise.
10053 (grub_efi_mm_init): Likewise.
10054 (grub_efi_mm_fini): Likewise.
10055 (grub_efi_init): Likewise.
10056 (grub_efi_fini): Likewise.
10057
10058 * include/grub/i386/efi/time.h: Do not include
10059 grub/symbol.h. Include grub/efi/time.h.
10060 (GRUB_TICKS_PER_SECOND): Removed.
10061 (grub_get_rtc): Likewise.
10062
10063 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
10064 Added padding. The EFI spec is buggy.
10065 (GRUB_EFI_BLACK): New macro.
10066 (GRUB_EFI_BLUE): Likewise.
10067 (GRUB_EFI_GREEN): Likewise.
10068 (GRUB_EFI_CYAN): Likewise.
10069 (GRUB_EFI_RED): Likewise.
10070 (GRUB_EFI_MAGENTA): Likewise.
10071 (GRUB_EFI_BROWN): Likewise.
10072 (GRUB_EFI_LIGHTGRAY): Likewise.
10073 (GRUB_EFI_BRIGHT): Likewise.
10074 (GRUB_EFI_DARKGRAY): Likewise.
10075 (GRUB_EFI_LIGHTBLUE): Likewise.
10076 (GRUB_EFI_LIGHTGREEN): Likewise.
10077 (GRUB_EFI_LIGHTCYAN): Likewise.
10078 (GRUB_EFI_LIGHTRED): Likewise.
10079 (GRUB_EFI_LIGHTMAGENTA): Likewise.
10080 (GRUB_EFI_YELLOW): Likewise.
10081 (GRUB_EFI_WHITE): Likewise.
10082 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
10083 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
10084 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
10085 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
10086 (GRUB_EFI_BACKGROUND_RED): Likewise.
10087 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
10088 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
10089 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
10090 (GRUB_EFI_TEXT_ATTR): Likewise.
10091
10092 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
10093 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10094 (kernel_mod_HEADERS): Added efi/time.h.
10095
83709125 100962006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
10097
10098 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
10099 include/grub/efi/api.h, include/grub/efi/console_control.h,
10100 include/grub/efi/efi.h, include/grub/efi/pe32.h,
10101 include/grub/i386/efi/time.h, kern/efi/efi.c,
10102 kern/i386/efi/init.c, kern/i386/efi/startup.S,
10103 and util/i386/efi/grub-mkimage.c.
10104
10105 * Makefile.in (RMKFILES): Added i386-efi.rmk.
10106
10107 * genmk.rb (PModule#rule): Do not export symbols if
10108 #{prefix}_EXPORTS is set to "no".
10109
10110 * conf/i386-efi.mk: New file.
10111 * conf/i386-efi.rmk: Likewise.
10112 * include/grub/efi/api.h: Likewise.
10113 * include/grub/efi/console_control.h: Likewise.
10114 * include/grub/efi/efi.h: Likewise.
10115 * include/grub/efi/pe32.h: Likewise.
10116 * include/grub/i386/efi/time.h: Likewise.
10117 * kern/efi/efi.c: Likewise.
10118 * kern/i386/efi/init.c: Likewise.
10119 * kern/i386/efi/startup.S: Likewise.
10120 * util/i386/efi/grub-mkimage.c: Likewise.
10121
101222006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 10123
10124 * include/grub/script.h: Include <grub/parser.h> and
10125 "grub_script.tab.h".
10126 (struct grub_lexer_param): New struct.
10127 (struct grub_parser_param): Likewise.
10128 (grub_script_create_arglist): Pass the state in an argument.
10129 (grub_script_add_arglist): Likewise.
10130 (grub_script_create_cmdline): Likewise.
10131 (grub_script_create_cmdblock): Likewise.
10132 (grub_script_create_cmdif): Likewise.
10133 (grub_script_create_cmdmenu): Likewise.
10134 (grub_script_add_cmd): Likewise.
10135 (grub_script_arg_add): Likewise.
10136 (grub_script_lexer_ref): Likewise.
10137 (grub_script_lexer_deref): Likewise.
10138 (grub_script_lexer_record_start): Likewise.
10139 (grub_script_lexer_record_stop): Likewise.
10140 (grub_script_mem_record): Likewise.
10141 (grub_script_mem_record_stop): Likewise.
10142 (grub_script_malloc): Likewise.
10143 (grub_script_yylex): Likewise.
10144 (grub_script_yyparse): Likewise.
10145 (grub_script_yyerror): Likewise.
10146 (grub_script_yylex): Likewise.
10147 (grub_script_lexer_init): Return the state.
10148
10149 * normal/lexer.c (grub_script_lexer_state): Removed variable.
10150 (grub_script_lexer_done): Likewise.
10151 (grub_script_lexer_getline): Likewise.
10152 (grub_script_lexer_refs): Likewise.
10153 (script): Likewise.
10154 (newscript): Likewise.
10155 (record): Likewise.
10156 (recording): Likewise.
10157 (recordpos): Likewise.
10158 (recordlen): Likewise.
10159 (grub_script_lexer_init): Return the state instead of setting
10160 global variables.
10161 (grub_script_lexer_ref): Use the newly added argument for state
10162 instead of globals.
10163 (grub_script_lexer_deref): Likewise.
10164 (grub_script_lexer_record_start): Likewise.
10165 (grub_script_lexer_record_stop): Likewise.
10166 (recordchar): Likewise.
10167 (nextchar): Likewise.
10168 (grub_script_yylex2): Likewise.
10169 (grub_script_yylex): Likewise.
10170 (grub_script_yyerror): Likewise.
10171
10172 * normal/parser.y (func_mem): Removed variable.
10173 (menu_entry): Likewise.
10174 (err): Likewise.
10175 (%lex-param): New parser option.
10176 (%parse-param): Likewise.
10177 (script): Always return the AST.
10178 (argument): Pass the state around.
10179 (arguments): Likewise.
10180 (grubcmd): Likewise.
10181 (commands): Likewise.
10182 (function): Likewise.
10183 (menuentry): Likewise.
10184 (if_statement): Likewise.
10185 (if): Likewise.
10186
10187 * normal/script.c (grub_script_memused): Removed variable.
10188 (grub_script_parsed): Likewise.
10189 (grub_script_malloc): Added a state argument. Use that instead of
10190 global variables.
10191 (grub_script_mem_record): Likewise.
10192 (grub_script_mem_record_stop): Likewise.
10193 (grub_script_arg_add): Likewise.
10194 (grub_script_add_arglist): Likewise.
10195 (grub_script_create_cmdline): Likewise.
10196 (grub_script_create_cmdif): Likewise.
10197 (grub_script_create_cmdmenu): Likewise.
10198 (grub_script_add_cmd): Likewise.
10199 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 10200
e2a8c904 102012006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 10202
10203 * normal/command.c (grub_command_init): Remove the title command.
10204
10205 * normal/lexer.c (grub_script_yylex): Renamed from this...
10206 (grub_script_yylex2): ... to this.
10207 (grub_script_yylex): New function. Temporary
10208 introduced to filter some tokens.
10209 (grub_script_yyerror): Print a newline.
10210
10211 * normal/main.c (read_config_file): Output information about the
10212 lines that contain errors. Wait for a key after all lines have
10213 been processed. Don't return an empty menu.
10214
10215 * normal/parser.y (func_mem): Don't initialize.
10216 (menu_entry): Likewise.
10217 (err): New variable.
10218 (script): Don't return anything when an error was encountered.
10219 (ws, returns): Removed rules.
10220 (argument): Disabled concatenated variable support.
10221 (arguments): Remove explicit separators.
10222 (grubcmd): Likewise.
10223 (function): Likewise.
10224 (menuentry): Likewise.
10225 (if): Likewise.
10226 (commands): Likewise. Add error handling.
10227
10228 * normal/script.c (grub_script_create_cmdline): If
10229 `grub_script_parsed' is 0, assume the parser encountered an error.
10230
c9a86192 102312006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
10232
10233 * configure.ac: Add support for EFI. Fix the typo
10234 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
10235
70f3b243 102362006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10237
10238 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
10239 foreign multibyte characters should be shown correctly.
10240
65f201ad 102412006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10242
10243 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
10244 calculation.
10245 (read_config_file): Made it to close file before returning.
10246
b4b93674 102472006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
10248
10249 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
10250 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
10251 video/i386/pc/vbefill.c.
10252
10253 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
10254 video/i386/pc/vbefill.c.
10255
10256 * include/grub/video.h (grub_video_blit_format): New enum.
10257 (grub_video_mode_info): Added new member blit_format.
10258 (grub_video_get_blit_format): New function prototype.
10259
10260 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
10261 function prototype.
10262 (grub_video_vbe_map_rgb): Likewise.
10263 (grub_video_vbe_unmap_color): Likewise.
10264
10265 * include/grub/i386/pc/vbeblit.h: New file.
10266
10267 * include/grub/i386/pc/vbefill.h: New file.
10268
10269 * video/video.c (grub_video_get_blit_format): New function.
10270 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
10271 (grub_video_vbe_map_rgb): Likewise.
10272 (grub_video_vbe_unmap_color): Likewise.
10273
10274 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
10275 optimized fills.
10276 (grub_video_vbe_blit_render_target): Changed to use more optimized
10277 blits.
10278 (grub_video_vbe_setup): Added detection for optimized settings.
10279 (grub_video_vbe_create_render_target): Likewise.
10280
10281 * video/i386/pc/vbeblit.c: New file.
10282
10283 * video/i386/pc/vbefill.c: New file.
10284
c2379b9c 102852006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
10286
10287 * font/manager.c (grub_font_get_glyph): Removed font fixup from
10288 here...
10289
10290 * util/unifont2pff.rb: ... and moved it to here. Improved argument
10291 parsing to support both hex and dec ranges. If filename was missing
10292 show usage information.
10293
bd0d7896 102942006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
10295
10296 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
10297 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
10298
10299 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
10300 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
10301 (video_mod_SOURCES): Added.
10302 (video_mod_CFLAGS): Likewise.
10303 (video_mod_LDFLAGS): Likewise.
10304 (gfxterm_mod_SOURCES): Likewise.
10305 (gfxterm_mod_CFLAGS): Likewise.
10306 (gfxterm_mod_LDFLAGS): Likewise.
10307 (videotest_mod_SOURCES): Likewise.
10308 (videotest_mod_CFLAGS): Likewise.
10309 (videotest_mod_LDFLAGS): Likewise.
10310 (vesafb_mod_SOURCES): Removed.
10311 (vesafb_mod_CFLAGS): Likewise.
10312 (vesafb_mod_LDFLAGS): Likewise.
10313 (vga_mod_SOURCES): Likewise.
10314 (vga_mod_CFLAGS): Likewise.
10315 (vga_mod_LDFLAGS): Likewise.
10316
10317 * commands/videotest.c: New file.
10318
10319 * font/manager.c (fill_with_default_glyph): Modified to use
10320 grub_font_glyph.
10321 (grub_font_get_glyph): Likewise.
10322 (fontmanager): Renamed from this...
10323 (font_manager): ... to this.
10324
10325 * include/grub/font.h (grub_font_glyph): Added new structure.
10326 (grub_font_get_glyph): Modified to use grub_font_glyph.
10327
10328 * include/grub/misc.h (grub_abs): Added as inline function.
10329
10330 * include/grub/video.h: New file.
10331
10332 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
10333 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
10334 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
10335 (grub_vbe_get_controller_info): Renamed from this...
10336 (grub_vbe_bios_get_controller_info): ... to this.
10337 (grub_vbe_get_mode_info): Renamed from this...
10338 (grub_vbe_bios_get_mode_info): ... to this.
10339 (grub_vbe_set_mode): Renamed from this...
10340 (grub_vbe_bios_set_mode): ... to this.
10341 (grub_vbe_get_mode): Renamed from this...
10342 (grub_vbe_bios_get_mode): ... to this.
10343 (grub_vbe_set_memory_window): Renamed from this...
10344 (grub_vbe_bios_set_memory_window): ... to this.
10345 (grub_vbe_get_memory_window): Renamed from this...
10346 (grub_vbe_bios_get_memory_window): ... to this.
10347 (grub_vbe_set_scanline_length): Renamed from this...
10348 (grub_vbe_set_scanline_length): ... to this.
10349 (grub_vbe_get_scanline_length): Renamed from this...
10350 (grub_vbe_bios_get_scanline_length): ... to this.
10351 (grub_vbe_set_display_start): Renamed from this...
10352 (grub_vbe_bios_set_display_start): ... to this.
10353 (grub_vbe_get_display_start): Renamed from this...
10354 (grub_vbe_bios_get_display_start): ... to this.
10355 (grub_vbe_set_palette_data): Renamed from this...
10356 (grub_vbe_bios_set_palette_data): ... to this.
10357 (grub_vbe_set_pixel_rgb): Removed.
10358 (grub_vbe_set_pixel_index): Likewise.
10359
10360 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
10361 from this...
10362 (grub_vbe_bios_get_controller_info): ... to this.
10363 (grub_vbe_get_mode_info): Renamed from this...
10364 (grub_vbe_bios_get_mode_info): ... to this.
10365 (grub_vbe_set_mode): Renamed from this...
10366 (grub_vbe_bios_set_mode): ... to this.
10367 (grub_vbe_get_mode): Renamed from this...
10368 (grub_vbe_bios_get_mode): ... to this.
10369 (grub_vbe_set_memory_window): Renamed from this...
10370 (grub_vbe_bios_set_memory_window): ... to this.
10371 (grub_vbe_get_memory_window): Renamed from this...
10372 (grub_vbe_bios_get_memory_window): ... to this.
10373 (grub_vbe_set_scanline_length): Renamed from this...
10374 (grub_vbe_set_scanline_length): ... to this.
10375 (grub_vbe_get_scanline_length): Renamed from this...
10376 (grub_vbe_bios_get_scanline_length): ... to this.
10377 (grub_vbe_set_display_start): Renamed from this...
10378 (grub_vbe_bios_set_display_start): ... to this.
10379 (grub_vbe_get_display_start): Renamed from this...
10380 (grub_vbe_bios_get_display_start): ... to this.
10381 (grub_vbe_set_palette_data): Renamed from this...
10382 (grub_vbe_bios_set_palette_data): ... to this.
10383 (grub_vbe_bios_get_controller_info): Fixed problem with registers
10384 getting corrupted after calling it. Added more pushes and pops.
10385 (grub_vbe_bios_set_mode): Likewise.
10386 (grub_vbe_bios_get_mode): Likewise.
10387 (grub_vbe_bios_get_memory_window): Likewise.
10388 (grub_vbe_bios_set_scanline_length): Likewise.
10389 (grub_vbe_bios_get_scanline_length): Likewise.
10390 (grub_vbe_bios_get_display_start): Likewise.
10391 (grub_vbe_bios_set_palette_data): Likewise.
10392
10393 * normal/cmdline.c (cl_set_pos): Refresh the screen.
10394 (cl_insert): Likewise.
10395 (cl_delete): Likewise.
10396
10397 * term/gfxterm.c: New file.
10398
10399 * term/i386/pc/vesafb.c: Removed file.
10400
10401 * video/video.c: New file.
10402
10403 * video/i386/pc/vbe.c (real2pm): Added new function.
10404 (grub_video_vbe_draw_pixel): Likewise.
10405 (grub_video_vbe_get_video_ptr): Likewise.
10406 (grub_video_vbe_get_pixel): Likewise
10407 (grub_video_vbe_init): Likewise.
10408 (grub_video_vbe_fini): Likewise.
10409 (grub_video_vbe_setup): Likewise.
10410 (grub_video_vbe_get_info): Likewise.
10411 (grub_video_vbe_set_palette): Likewise.
10412 (grub_video_vbe_get_palette): Likewise.
10413 (grub_video_vbe_set_viewport): Likewise.
10414 (grub_video_vbe_get_viewport): Likewise.
10415 (grub_video_vbe_map_color): Likewise.
10416 (grub_video_vbe_map_rgb): Likewise.
10417 (grub_video_vbe_map_rgba): Likewise.
10418 (grub_video_vbe_unmap_color): Likewise.
10419 (grub_video_vbe_fill_rect): Likewise.
10420 (grub_video_vbe_blit_glyph): Likewise.
10421 (grub_video_vbe_blit_bitmap): Likewise.
10422 (grub_video_vbe_blit_render_target): Likewise.
10423 (grub_video_vbe_scroll): Likewise.
10424 (grub_video_vbe_swap_buffers): Likewise.
10425 (grub_video_vbe_create_render_target): Likewise.
10426 (grub_video_vbe_delete_render_target): Likewise.
10427 (grub_video_vbe_set_active_render_target): Likewise.
10428 (grub_vbe_set_pixel_rgb): Remove function.
10429 (grub_vbe_set_pixel_index): Likewise.
10430 (index_color_mode): Remove static variable.
10431 (active_mode): Likewise.
10432 (framebuffer): Likewise.
10433 (bytes_per_scan_line): Likewise.
10434 (grub_video_vbe_adapter): Added new static variable.
10435 (framebuffer): Likewise.
10436 (render_target): Likewise.
10437 (initial_mode): Likewise.
10438 (mode_in_use): Likewise.
10439 (mode_list): Likewise.
10440
5f97350b 104412006-03-10 Marco Gerards <marco@gnu.org>
10442
10443 * configure.ac (AC_INIT): Bumped to 1.93.
10444
10445 * DISTLIST: Added `include/grub/hfs.h'.
10446
a3c5c6f8 104472006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
10448
10449 * boot/i386/pc/boot.S (general_error): Before looping, try INT
10450 18H, which might help the BIOS falling back to next boot media.
10451
6de53d26 104522006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
10453
10454 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
10455 Poe Chen <poe.poechen@gmail.com>.
10456
77c4a393 104572006-01-17 Marco Gerards <marco@gnu.org>
10458
10459 * include/grub/normal.h: Include <grub/script.h>.
10460 (grub_command_list): Removed struct.
10461 (grub_command_list_t): Removed type.
10462 (grub_menu_entry): Remove members `num' and `command_list'. Add
10463 members `commands' and `sourcecode'.
10464 * include/grub/script.h: Add inclusion guards.
10465 (grub_script_cmd_menuentry): New struct.
10466 (grub_script_execute_menuentry): New prototype.
10467 (grub_script_lexer_record_start): Likewise.
10468 (grub_script_lexer_record_stop): Likewise.
10469 * normal/execute.c (grub_script_execute_menuentry): New function.
10470 * normal/lexer.c (record, recording, recordpos, recordlen): New
10471 variables.
10472 (grub_script_lexer_record_start): New function.
10473 (grub_script_lexer_record_stop): Likewise.
10474 (recordchar): Likewise.
10475 (nextchar): Likewise.
10476 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
10477 2048 as the buffer size. Add the tokens `menuentry' and `@'.
10478 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
10479 (current_menu): New variable.
10480 (free_menu): Mainly rewritten.
10481 (grub_normal_menu_addentry): New function.
10482 (read_config_file): Rewritten.
10483 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 10484 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 10485 the menu entry.
10486 (run): Mainly rewritten.
10487 * normal/parser.y (menu_entry): New variable.
10488 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
10489 (menuentry): New rule.
10490 (command): Add `menuentry'.
10491 (if_statement): Allow additional returns before `fi'.
10492 * normal/script.c (grub_script_create_cmdmenu): New function.
10493
144f1f98 104942006-01-03 Marco Gerards <marco@gnu.org>
10495
10496 * INSTALL: GNU Bison is required.
10497 * configure.ac: Rewritten the test to detect Bison.
10498 * Makefile.in (YACC): New variable. Reported by Xun Sun
10499 <xun.sun.cn@gmail.com>.
10500
af4b2d89 105012006-01-03 Marco Gerards <marco@gnu.org>
10502
10503 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
10504 the HFS+ filesystem to filesystem blocks.
10505 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
10506 GCC warning is silenced.
10507
15643b71 105082006-01-03 Marco Gerards <marco@gnu.org>
10509
10510 * partmap/apple.c (apple_partition_map_iterate): Convert the data
10511 read from disk from big endian to host byte order.
10512
00905879 105132006-01-03 Hollis Blanchard <hollis@penguinppc.org>
10514
10515 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
10516 documentation.
10517 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
10518 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
10519 embedded HFS+ filesystem.
10520 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
10521 (grub_hfs_sblock): Move from here...
10522 * include/grub/hfs.h: To here... New file.
10523 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
10524 documentation.
10525 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
10526 New macros.
10527 (grub_hfsplus_volheader): Change type of member `magic' to
10528 `grub_uint16_t'.
10529 (grub_hfsplus_data): Add new member `embedded_offset'.
10530 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
10531 returned block.
10532 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
10533 Calculate the offset.
10534
8899bc3e 105352005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10536
10537 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
10538 Removed.
10539 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
10540
ae8c0277 105412005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10542
10543 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
10544 ENV->NAME is NULL after allocating ENV->VALUE.
10545
07084456 105462005-12-25 Marco Gerards <marco@gnu.org>
10547
10548 * kern/env.c (grub_env_set): Rewritten the error handling code.
10549
4750f5f1 105502005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10551
10552 * geninit.sh: Made more robust, and more portable.
10553
50214199 105542005-12-25 Marco Gerards <marco@gnu.org>
10555
10556 Add support for Apple HFS+ filesystems.
f19dbdb7 10557
50214199 10558 * fs/hfsplus.c: New file.
10559
10560 * DISTLIST: Added `fs/hfsplus.c'.
10561
10562 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
10563 (hfsplus_mod_SOURCES): New variable.
10564 (hfsplus_mod_CFLAGS): Likewise.
10565 (hfsplus_mod_LDFLAGS): Likewise.
10566 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
10567 (grub_setup_SOURCES): Likewise.
10568 (grub_mkdevicemap_SOURCES): Likewise.
10569 (grub_emu_SOURCES): Likewise.
10570 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10571
10572 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
10573
10574 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
10575
befaed6c 105762005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10577
10578 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
10579 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
10580 include/grub/parser.h, include/grub/script.h, kern/parser.c,
10581 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
10582 normal/lexer.c, normal/parser.y, normal/script.c, and
10583 partmap/gpt.c.
10584 Removed kern/sparc64/cache.c.
10585
10586 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
10587 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
10588 grub_emu_init.c.
10589
10590 * configure.ac (AC_INIT): Bumped to 1.92.
10591
6a124103 105922005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
10593
10594 * kern/err.c (grub_error_push): Added new function to support error
10595 stacks.
10596 (grub_error_pop): Likewise.
10597 (grub_error_stack_items): New local variable to support error stacks.
10598 (grub_error_stack_pos): Likewise.
10599 (grub_error_stack_assert): Likewise.
10600 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
10601 stack depth.
10602 (grub_print_error): Added support to print errors from error stack.
10603
10604 * include/grub/err.h (grub_error_push): Added function prototype.
10605 (grub_error_pop): Likewise.
10606
be973c1b 106072005-12-09 Hollis Blanchard <hollis@penguinppc.org>
10608
10609 * configure.ac: Accept `powerpc64' as host_cpu.
10610 (amd64): Rename to `biarch32'.
10611
10612 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
10613 non-cacheline-aligned addresses.
10614
10615 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
10616 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
10617 if `size' is non-zero.
10618
b04216ab 106192005-12-03 Marco Gerards <mgerards@xs4all.nl>
10620
10621 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
10622 and `cd' to make sure the filename is not prefixed with a
10623 directory name.
10624 (pkgdata_MODULES): Add `gpt.mod'.
10625 (gpt_mod_SOURCES): New variable.
10626 (gpt_mod_CFLAGS): Likewise.
10627 (gpt_mod_LDFLAGS): Likewise.
10628
10629 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
10630
10631 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
10632 New macro.
10633
10634 * partmap/gpt.c: New file.
10635
10636 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
10637 GPT partition map is detected.
10638
41730ed9 106392005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
10640
10641 * commands/i386/pc/play.c: New file.
10642 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
10643 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
10644 macros.
f19dbdb7 10645
95dc3643 106462005-11-27 Marco Gerards <mgerards@xs4all.nl>
10647
10648 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
10649 ((unused))' to silence gcc warning.
10650
1569ec51 106512005-11-26 Hollis Blanchard <hollis@penguinppc.org>
10652
10653 * configure.ac: Correct `AC_PROG_YACC' test.
10654
9abde152 106552005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10656
10657 * util/powerpc/ieee1275/grub-install.in: Run the mount point
10658 check before installing files.
10659
44b83271 106602005-11-22 Mike Small <smallm@panix.com>
10661
10662 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
10663 number regex so multidigit numbers are recognized correctly.
10664
106652005-11-22 Mike Small <smallm@panix.com>
10666
10667 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
10668 debugging message before attempting to claim memory.
10669 (grub_rescue_cmd_initrd): Add a claim debugging message and try
10670 multiple addresses in case of failure.
10671
9c12956b 106722005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10673
10674 * term/tparm.c (get_space): Remove empty `if' statement.
10675
10676 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
10677
10678 * kern/parser.c (check_varstate): Rename `state' to 's'.
10679
aeaf81d9 106802005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10681
10682 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
10683 variable definitions to the beginning of each function. Sort stack
10684 variables by size.
10685 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
10686 `buf' argument to `char *'.
10687
79bbb63f 106882005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10689
10690 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
10691 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 10692 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 10693 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10694 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10695 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10696 configfile.mod, search.mod, gzio.mod and test.mod.
10697 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10698 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10699 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10700 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10701 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10702 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10703 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10704 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10705 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10706 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10707 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10708 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10709 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10710 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10711 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10712 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10713 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10714 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10715 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10716 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10717 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10718 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10719 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
10720
10721 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
10722 `grep --include'.
10723 (pkgdata_MODULES): Add test.mod.
10724
233b1628 107252005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10726
10727 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
10728 appending to variables with "+=".
10729 (PModule): Use full pathname to generate *.lst filenames.
10730
10731 * Makefile.in: Fixed list rules moved from genmk.rb.
10732 (.DELETE_ON_ERROR): New special target.
10733 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
10734
10735 * conf/i386-pc.rmk: Include conf/common.mk.
10736 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 10737 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 10738 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10739 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10740 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10741 configfile.mod, search.mod, gzio.mod and test.mod.
10742 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10743 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10744 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10745 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10746 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10747 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10748 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10749 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10750 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10751 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10752 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10753 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10754 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10755 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10756 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10757 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10758 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10759 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10760 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10761 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10762 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10763 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10764 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
10765 here...
10766 * conf/common.rmk: ... to here. New file.
10767
10768 * conf/common.mk: New file.
10769
16f820c8 107702005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
10771
10772 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
10773 (grub_script.tab.c): ... here.
10774
10775 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
10776 (grub_script.tab.c): ... here.
10777
10778 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
10779 (grub_script.tab.c): ... here.
10780
10781 * normal/command.c (grub_command_find): Fixed a memory leak of
10782 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
10783
63ba1554 107842005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10785
10786 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
10787 "@" which marks the start of a comment on ARM.
10788 (VARIABLE): Likewise.
10789
7f67dc13 107902005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10791
79bbb63f 10792 Add support for Linux/ADFS partition tables.
7f67dc13 10793
10794 * partmap/acorn.c: New file.
10795
10796 * include/grub/acorn_filecore.h: Likewise.
10797
10798 * DISTLIST: Added `partmap/acorn.c' and
10799 `include/grub/acorn_filecore.h'.
f19dbdb7 10800
7f67dc13 10801 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10802 `partmap/acorn.c'.
10803 (pkgdata_MODULES): Add `acorn.mod'.
10804 (acorn_mod_SOURCES): New variable.
10805 (acorn_mod_CFLAGS): Likewise.
10806
10807 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10808 `partmap/acorn.c'.
10809 (pkgdata_MODULES): Add `acorn.mod'.
10810 (acorn_mod_SOURCES): New variable.
10811 (acorn_mod_CFLAGS): Likewise.
10812
10813 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
10814 (pkgdata_MODULES): Add `acorn.mod'.
10815 (acorn_mod_SOURCES): New variable.
10816 (acorn_mod_CFLAGS): Likewise.
10817 (acorn_mod_LDFLAGS): Likewise.
10818
10819 * include/types.h (grub_disk_addr_t): New typedef.
10820
6d099807 108212005-11-13 Marco Gerards <mgerards@xs4all.nl>
10822
10823 * geninit.sh: New file.
10824
10825 * geninitheader.sh: Likewise.
10826
10827 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
10828 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
10829 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
10830 * commands/configfile.c (grub_configfile_init)
10831 (grub_configfile_fini): Likewise.
10832 * commands/default.c (grub_default_init, grub_default_fini):
10833 Likewise.
10834 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
10835 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
10836 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
10837 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
10838 Likewise.
10839 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
10840 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
10841 Likewise.
10842 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 10843 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 10844 Likewise.
10845 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
10846 Likewise.
fe6b695a 10847 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 10848 Likewise.
10849 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
10850 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
10851 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
10852 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
10853 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
10854 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
10855 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10856 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10857 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10858 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10859 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10860 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10861 * partmap/amiga.c (grub_amiga_partition_map_init)
10862 (grub_amiga_partition_map_fini): Likewise.
10863 * partmap/apple.c (grub_apple_partition_map_init)
10864 (grub_apple_partition_map_fini): Likewise.
10865 * partmap/pc.c (grub_pc_partition_map_init)
10866 (grub_pc_partition_map_fini): Likewise.
10867 * partmap/sun.c (grub_sun_partition_map_init,
10868 grub_sun_partition_map_fini): Likewise.
10869 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10870 Likewise.
10871
10872 * util/grub-emu.c: Include <grub_modules_init.h>.
10873 (main): Don't initialize and de-initialize any modules directly,
10874 use `grub_init_all' and `grub_fini_all' instead.
10875
10876 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10877 `grub_vesafb_mod_init'.
10878 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
10879 all users.
10880 * term/i386/pc/vga.c (grub_vga_init): Renamed to
10881 `grub_vga_mod_init'. Updated all users.
10882 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 10883
6d099807 10884 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10885 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10886 rules.
10887
10888 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10889 Generate a function to initialize the module in utilities.
10890 Updated all callers.
10891 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
10892 initialize the module in utilities. Updated all callers.
10893
9046bcf0 108942005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10895
10896 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10897 escape sequence and a literal ^L to clear the screen.
10898
10899 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10900 when returning from Open Firmware.
10901
d13ea639 109022005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10903
10904 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10905 (grub_ofconsole_height): Likewise.
10906 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10907 manually insert a '\n'.
10908 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10909 `grub_ofconsole_height'. Return early if these are already set.
10910
a8fcf206 109112005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
10912
10913 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10914 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10915 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10916 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10917 and `normal/script.c'.
10918 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10919 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10920 (test_mod_SOURCES): New variable.
10921 (test_mod_CFLAGS): Likewise.
10922 (test_mod_LDFLAGS): Likewise.
10923 (pkgdata_MODULES): Add `test.mod'.
10924 (grub_script.tab.c): New rule.
10925 (grub_script.tab.h): Likewise.
10926
b6b32745 109272005-11-07 Marco Gerards <mgerards@xs4all.nl>
10928
10929 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10930 `commands/test.c', `normal/execute.c', `normal/lexer.c',
10931 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10932 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10933 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10934 (test_mod_SOURCES): New variable.
10935 (test_mod_CFLAGS): Likewise.
10936 (pkgdata_MODULES): Add `test.mod'.
10937 (grub_script.tab.c): New rule.
10938 (grub_script.tab.h): Likewise.
10939
daac212a 109402005-11-06 Marco Gerards <mgerards@xs4all.nl>
10941
10942 Add initial scripting support.
10943
10944 * commands/test.c: New file.
10945 * include/grub/script.h: Likewise.
10946 * normal/execute.c: Likewise.
10947 * normal/function.c: Likewise.
10948 * normal/lexer.c: Likewise.
10949 * normal/parser.y: Likewise.
10950 * normal/script.c: Likewise.
10951
10952 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 10953
daac212a 10954 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10955 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10956 `normal/function.c' and `normal/script.c'.
10957 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10958 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 10959 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10960 variables.
daac212a 10961 (pkgdata_MODULES): Add `test.mod'.
10962 (grub_script.tab.c): New rule.
10963 (grub_script.tab.h): Likewise.
10964
10965 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10966
10967 * include/grub/normal.h (grub_test_init): New prototype.
10968 (grub_test_fini): Likewise.
f19dbdb7 10969
daac212a 10970 * normal/command.c: Include <grub/script.h>.
10971 (grub_command_execute): Rewritten.
f19dbdb7 10972
daac212a 10973 * util/grub-emu.c (main): Call `grub_test_init' and
10974 `grub_test_fini'.
10975
77500b2b 109762005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10977
10978 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10979 to 0.
10980 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10981 there are no pending characters.
10982
e45deb9e 109832005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10984
10985 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10986 `grub_strndup' to drop device arguments. Replace unnecessary
10987 `grub_strndup' with `grub_strdup'.
10988
4ce32619 109892005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10990
10991 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10992 `debug' environment variable has been set.
10993
109942005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 10995
4ce32619 10996 * Makefile.in (install-local): Use $(DATA).
10997 (uninstall): Likewise.
10998 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10999 (sbin_UTILITIES): ... to here.
11000 (sbin_SCRIPTS): New variable.
11001 (grub_install_SOURCES): New variable.
11002 * util/powerpc/ieee1275/grub-install.in: New file.
11003 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
11004 variable.
11005 (add_segments): Call `grub_util_get_path'.
11006
25fe6f03 110072005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
11008
11009 From Timothy Baldwin:
11010 * commands/ls.c (grub_ls_list_files): Close FILE with
11011 grub_file_close.
11012 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
11013
04ccf3ec 110142005-10-24 Marco Gerards <mgerards@xs4all.nl>
11015
11016 * include/grub/parser.h: New file.
11017
11018 * kern/parser.c: Likewise.
11019
11020 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
11021 (grub_setup_SOURCES): Likewise.
11022 (grub_probefs_SOURCES): Likewise.
11023 (grub_emu_SOURCES): Likewise.
11024 (kernel_img_HEADERS): Add `parser.h'.
11025
11026 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11027 (grub_emu_SOURCES): Add `kern/parser.c'.
11028 (grubof_SOURCES): Likewise.
11029
11030 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
11031 (grubof_SOURCES): Add `kern/parser.c'.
11032
11033 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
11034
11035 * kern/misc.c (grub_split_cmdline): Removed function.
11036
11037 * kern/rescue.c: Include <grub/parser.h>.
11038 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
11039 of `grub_split_cmdline'.
11040
11041 * normal/command.c: Include <grub/parser.h>.
11042 (grub_command_execute): Use `grub_parser_split_cmdline' instead
11043 of `grub_split_cmdline'.
11044
11045 * normal/completion.c: Include <grub/parser.h>.
11046 (cmdline_state): New variable.
11047 (iterate_dir): End the filename with a quote depending on the
11048 command line state.
11049 (get_state): new function.
11050 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
11051 split the arguments and determine the current argument. When the
11052 argument string is not quoted, escape all spaces.
11053
6d8f4b0e 110542005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11055
11056 * normal/sparc64/setjmp.S: New file.
11057
15cf03ed 110582005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11059
11060 * include/grub/sparc64/libgcc.h: New file.
11061 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
11062 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
11063 normal/sparc64/setjmp.c.
11064
03e8661a 110652005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11066
11067 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
11068 * kern/sparc64/cache.S: New file.
11069 * kern/sparc64/cache.c: Removed.
11070 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
11071 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
11072 -mtune=ultrasparc.
11073 (COMMON_LDFLAGS): Add -melf64_sparc.
11074 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
11075 (grubof_SOURCES): Use cache.S instead of cache.c.
11076 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
11077 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
11078 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
11079 commented though.
11080 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
11081 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
11082 (linux_mod_CFLAGS): Commented out.
11083 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
11084 out because module isn't built.
11085 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
11086 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
11087 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
11088 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
11089 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
11090 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11091 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11092 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
11093 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
11094 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
11095 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11096 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11097 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
11098 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
11099
34eeec8a 111002005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
11101
11102 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
11103 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
11104 longer, because HFS should not be used on PC.
11105
708367a3 111062005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11107
11108 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
11109 consistently within the loop.
11110
6fa1251a 111112005-10-15 Marco Gerards <mgerards@xs4all.nl>
11112
11113 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
11114 directory can not be read.
11115
4801580b 111162005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11117
11118 * configure.ac (AC_INIT): Increase the version number to 1.91.
11119
11120 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
11121 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
11122 term/i386/pc/serial.c.
11123
219ad426 111242005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11125
11126 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
11127 file size must be permitted.
11128
11129 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
11130 between %ah and %al.
11131
688e5699 111322005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11133
11134 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
11135 grub_uint64_t.
11136 Call the hook with a NUL-terminated filename.
11137 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
11138 grub_cpu_to_be32.
11139
11140 * kern/term.c (cursor_state): New variable.
11141 (grub_term_set_current): Reset the cursor state on a new
11142 terminal.
11143 (grub_setcursor): Rewritten to use CURSOR_STATE.
11144 (grub_getcursor): New function.
11145
11146 * include/grub/term.h (grub_getcursor): New prototype.
11147
11148 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
11149 integers on ARM. Reported by Timothy Baldwin
11150 <T.E.Baldwin99@members.leeds.ac.uk>.
11151
bb34586c 111522005-10-11 Marco Gerards <mgerards@xs4all.nl>
11153
11154 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
11155 allocated.
11156 (grub_sfs_dir): Likewise.
11157
9a909877 111582005-10-09 Marco Gerards <mgerards@xs4all.nl>
11159
11160 Add support for the SFS filesystem.
11161
11162 * fs/sfs.c: New file.
11163
11164 * DISTLIST: Added `fs/sfs.c'.
11165
11166 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
11167 (grub_probefs_SOURCES): Likewise.
11168 (grub_emu_SOURCES): Likewise.
11169 (pkgdata_MODULES): Add `sfs.mod'.
11170 (sfs_mod_SOURCES): New variable.
11171 (sfs_mod_CFLAGS): Likewise.
11172 (sfs_mod_LDFLAGS): Likewise.
11173
11174 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
11175 (pkgdata_MODULES): Add `sfs.mod'.
11176 (sfs_mod_SOURCES): New variable.
11177 (sfs_mod_CFLAGS): Likewise.
11178
11179 * util/grub-emu.c (main): Call `grub_sfs_init' and
11180 `grub_sfs_fini'.
11181
11182 * include/grub/fs.h (grub_sfs_init): New prototype.
11183 (grub_sfs_fini): Likewise.
11184
57bdbde3 111852005-10-07 Marco Gerards <mgerards@xs4all.nl>
11186
11187 Add support for the AFFS filesystem.
11188
11189 * fs/affs.c: New file.
11190
11191 * DISTLIST: Added `fs/affs.c'.
11192
11193 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
11194 (grub_probefs_SOURCES): Likewise.
11195 (grub_emu_SOURCES): Likewise.
11196 (pkgdata_MODULES): Add `affs.mod'.
11197 (affs_mod_SOURCES): New variable.
11198 (affs_mod_CFLAGS): Likewise.
11199 (affs_mod_LDFLAGS): Likewise.
11200
11201 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
11202 (pkgdata_MODULES): Add `affs.mod'.
11203 (affs_mod_SOURCES): New variable.
11204 (affs_mod_CFLAGS): Likewise.
11205
11206 * util/grub-emu.c (main): Call `grub_affs_init' and
11207 `grub_affs_fini'.
11208
11209 * include/grub/fs.h (grub_affs_init): New prototype.
11210 (grub_affs_fini): Likewise.
11211
047b67e0 112122005-10-01 Marco Gerards <mgerards@xs4all.nl>
11213
11214 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
11215
59b8208a 112162005-10-01 Marco Gerards <mgerards@xs4all.nl>
11217
11218 * configure.ac: Accept `x86_64' as host_cpu. In that case add
11219 `-m32' to CFLAGS.
11220
11221 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
11222 linking.
f19dbdb7 11223
59b8208a 11224 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
11225 (COMMON_LDFLAGS): New variable.
11226 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
11227 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
11228 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
11229 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
11230 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
11231 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
11232 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
11233 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
11234 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
11235 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
11236 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11237 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11238 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
11239 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
11240 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
11241 variables.
11242 (normal_mod_ASFLAGS): Add `-m32'.
11243
11244 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
11245 (grub_host_size_t, grub_host_ssize_t): New types.
11246 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 11247 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 11248 `GRUB_HOST_SIZEOF_VOID_P'.
11249
11250 * include/grub/kernel.h (struct grub_module_header): Type of
11251 member offset changed to `grub_host_off_t'. Type of member size
11252 changed to `grub_host_size_t'.
11253 (struct grub_module_info): Type of member offset changed to
11254 `grub_host_off_t'. Type of member size changed to
11255 `grub_host_size_t'.
11256
b4093103 112572005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
11258
11259 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 11260
b4093103 11261 * kern/i386/pc/startup.S (multiboot_header): New label.
11262 (multiboot_entry): Likewise.
11263 (multiboot_trampoline): Likewise.
11264
11265 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11266 Increased to 0x4A0.
11267
11268 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
11269 put parentheses after a question mark.
11270 [!GRUB_UTIL] (my_mod): New variable.
11271
11272 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
11273
b2499b29 112742005-09-28 Marco Gerards <mgerards@xs4all.nl>
11275
11276 Adds support for the XFS filesystem. Btrees are not supported
11277 yet.
11278
11279 * fs/xfs.c: New file.
11280
11281 * DISTLIST: Added `fs/xfs.c'.
11282
11283 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
11284 (grub_probefs_SOURCES): Likewise.
11285 (grub_emu_SOURCES): Likewise.
11286 (pkgdata_MODULES): Add `xfs.mod'.
11287 (xfs_mod_SOURCES): New variable.
11288 (xfs_mod_CFLAGS): Likewise.
11289
11290 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
11291 (pkgdata_MODULES): Add `xfs.mod'.
11292 (xfs_mod_SOURCES): New variable.
11293 (xfs_mod_CFLAGS): Likewise.
11294
11295 * util/grub-emu.c (main): Call `grub_xfs_init' and
11296 `grub_xfs_fini'.
11297
11298 * include/grub/fs.h (grub_xfs_init): New prototype.
11299 (grub_xfs_fini): Likewise.
11300
f19dbdb7 11301
83d37a62 113022005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
11303
11304 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
11305 color modes, allow greater than 16 colors to be configured as
11306 a default palette.
11307
47d2d65e 113082005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11309
11310 * normal/completion.c (complete_arguments): Add the qualifier
11311 const into OPTIONS.
11312
11313 From Omniflux <omniflux+lists@omniflux.com>:
11314 * include/grub/terminfo.h: New file.
11315 * include/grub/tparm.h: Likewise.
11316 * include/grub/i386/pc/serial.h: Likewise.
11317 * term/terminfo.c: Likewise.
11318 * term/tparm.c: Likewise.
11319 * term/i386/pc/serial.c: Likewise.
11320 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
11321 serial.mod.
11322 (terminfo_mod_SOURCES): New variable.
11323 (terminfo_mod_CFLAGS): Likewise.
11324 (serial_mod_SOURCES): Likewise.
11325 (serial_mod_CFLAGS): Likewise.
11326
48b671ff 113272005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
11328
11329 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
11330 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
11331 and kern/powerpc/ieee1275/cmain.c, respectively.
11332
11333 * boot/powerpc/ieee1275/crt0.S: Moved to ...
11334 * kern/powerpc/ieee1275/crt0.S: ... here.
11335
11336 * boot/powerpc/ieee1275/cmain.c: Moved to ...
11337 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 11338
48b671ff 11339 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
11340 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
11341 instead of boot/powerpc/ieee1275/crt0.S and
11342 boot/powerpc/ieee1275/cmain.c, respectively.
11343
11344 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
11345 sectors. It was not used anyway.
11346
09fc77a7 113472005-08-30 Hollis Blanchard <hollis@penguinppc.org>
11348
11349 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
11350 `unused parameter' warning.
11351
003789c7 113522005-08-30 Hollis Blanchard <hollis@penguinppc.org>
11353
11354 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
11355 function.
11356 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
11357 getcharwidth.
11358
67f44c86 113592005-08-28 Marco Gerards <metgerards@student.han.nl>
11360
11361 * include/grub/normal.h (enum grub_completion_type): Added
11362 `GRUB_COMPLETION_TYPE_ARGUMENT'.
11363
11364 * normal/cmdline.c (print_completion): Handle
11365 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
11366 * normal/menu_entry.c (store_completion): Likewise.
11367
11368 * normal/completion.c (complete_arguments): New function.
11369 (grub_normal_do_completion): Call `complete_arguments' when the
11370 current words start with a dash.
11371
0b5abe02 113722005-08-27 Marco Gerards <metgerards@student.han.nl>
11373
11374 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
11375 `gzio.mod' instead of `io.mod').
11376
d9864ee1 113772005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
11378
11379 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
11380 (DISTDIRS): Added io and video.
11381 Rewrite the search routine to make an output consistently.
11382
11383 * DISTLIST: Added conf/sparc64-ieee1275.mk,
11384 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
11385 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
11386 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
11387 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
11388 util/powerpc/ieee1275/misc.c.
f19dbdb7 11389
d9864ee1 11390 * include/grub/gzio.h: New file.
11391 * io/gzio.c: Likewise.
f19dbdb7 11392
d9864ee1 11393 * kern/file.c (grub_file_close): Call grub_device_close only if
11394 FILE->DEVICE is not NULL.
11395
11396 * include/grub/mm.h [!NULL] (NULL): New macro.
11397
11398 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
11399
11400 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
11401 (pkgdata_MODULES): Added gzio.mod.
11402 (gzio_mod_SOURCES): New variable.
11403 (gzio_mod_CFLAGS): Likewise.
11404
11405 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
11406 (pkgdata_MODULES): Added gzio.mod.
11407 (gzio_mod_SOURCES): New variable.
11408 (gzio_mod_CFLAGS): Likewise.
11409
11410 * commands/cat.c: Include grub/gzio.h.
11411 (grub_cmd_cat): Use grub_gzfile_open instead of
11412 grub_file_open.
f19dbdb7 11413
d9864ee1 11414 * commands/cmp.c: Include grub/gzio.h.
11415 (grub_cmd_cmp): Use grub_gzfile_open instead of
11416 grub_file_open.
11417
11418 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
11419 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
11420 grub_file_open.
11421 (grub_rescue_cmd_module): Likewise.
11422
fa46f4b5 114232005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
11424
11425 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
11426 kern/sparc64/ieee1275/init.c because it contains _start.
11427 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
11428
e9211b5d 114292005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
11430
11431 * configure.ac: Add support for sparc64 host with ieee1275
11432 firmware.
11433 * configure: Generated from configure.ac.
11434 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
11435 instead of int.
11436 (grub_ofdisk_read): Likewise.
11437 (grub_ofdisk_open): Use %p to print pointer values, and cast the
11438 pointers as (void *) to remove a warning.
11439 (grub_ofdisk_close): Likewise.
11440 (grub_ofdisk_read): Likewise.
11441 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
11442 returns, so make it return void to remove a warning.
11443 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
11444 Corresponding prototype change.
11445 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
11446 values, and cast the pointers as (void *) to remove a warning.
11447 (grub_mm_dump): Likewise.
11448 * conf/sparc64-ieee1275.mk: New file.
11449 * conf/sparc64-ieee1275.rmk: Likewise.
11450 * include/grub/sparc64/setjmp.h: Likewise.
11451 * include/grub/sparc64/types.h: Likewise.
11452 * include/grub/sparc64/ieee1275/console.h: Likewise.
11453 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11454 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11455 * include/grub/sparc64/ieee1275/time.h: Likewise.
11456 * kern/sparc64/cache.c: Likewise.
11457 * kern/sparc64/dl.c: Likewise.
11458 * kern/sparc64/ieee1275/init.c: Likewise.
11459 * kern/sparc64/ieee1275/openfw.c: Likewise.
11460
385c6a92 114612005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
11462
11463 * util/console.c (grub_ncurses_putchar): If C is greater than
11464 0x7f, set C to a question mark.
11465 (grub_ncurses_getcharwidth): New function.
11466 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
11467 getcharwidth.
11468
11469 * normal/menu.c (print_entry): Made aware of Unicode. First,
11470 convert TITLE to UCS-4, and predict the cursor position by
11471 grub_getcharwidth.
11472
11473 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
11474 const to SRC.
11475 * kern/misc.c (grub_utf16_to_utf8): Likewise.
11476
16ccb8b1 114772005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11478
11479 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
11480 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11481 grub_strcat.
11482
11483 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
11484 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11485 grub_strcpy and grub_strlen. Take it into account that a space
11486 character is inserted as a delimiter.
11487
6a85ce79 114882005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11489
11490 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 11491 invalid magic in the error.
6a85ce79 11492
11493 * commands/search.c: New file.
f19dbdb7 11494
6a85ce79 11495 * util/grub-emu.c (main): Call grub_search_init and
11496 grub_search_fini.
11497
11498 * kern/rescue.c (grub_rescue_print_disks): Removed.
11499 (grub_rescue_print_devices): New function.
11500 (grub_rescue_cmd_ls): Use grub_device_iterate with
11501 grub_rescue_print_devices instead of grub_disk_dev_iterate with
11502 grub_rescue_print_disks.
11503
11504 * kern/partition.c (grub_partition_iterate): Return the result of
11505 PARTMAP->ITERATE instead of GRUB_ERRNO.
11506
11507 * kern/device.c: Include grub/partition.h.
11508 (grub_device_iterate): New function.
11509
11510 * include/grub/partition.h (grub_partition_iterate): Return int
11511 instead of grub_err_t.
11512
11513 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
11514 prototype.
11515 [GRUB_UTIL] (grub_search_fini): Likewise.
11516
11517 * include/grub/device.h (grub_device_iterate): New prototype.
11518
11519 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11520 commands/search.c.
11521 (pkgdata_MODULES): Added search.mod.
11522 (search_mod_SOURCES): New variable.
11523 (search_mod_CFLAGS): Likewise.
11524
11525 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
11526 (pkgdata_MODULES): Added search.mod.
11527 (search_mod_SOURCES): New variable.
11528 (search_mod_CFLAGS): Likewise.
11529
11530 * commands/ls.c (grub_ls_list_disks): Renamed to ...
11531 (grub_ls_list_devices): ... this, and use grub_device_iterate.
11532 All callers changed.
11533
11534 * DISTLIST: Added commands/search.c.
11535
ef095434 115362005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11537
11538 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
11539 conversion.
11540 (grub_getcharwidth): New function.
11541
11542 * kern/misc.c (grub_utf8_to_ucs4): New function.
11543
11544 * include/grub/term.h (struct grub_term): Added a new member
11545 "getcharwidth".
11546 (grub_getcharwidth): New prototype.
11547
11548 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
11549
11550 * term/i386/pc/console.c (map_char): New function. Segregated from
11551 grub_console_putchar.
11552 (grub_console_putchar): Use map_char.
11553 (grub_console_getcharwidth): New function.
11554 (grub_console_term): Specified grub_console_getcharwidth as
11555 getcharwidth.
11556
11557 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
11558 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
11559
11560 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
11561 GRUB_ERRNO.
11562 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
11563 on grub_strtoul completely.
11564 (write_char): Declare local variables in the beginning of the
11565 function.
11566 (grub_vesafb_getcharwidth): New function.
11567 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
11568 getcharwidth.
11569
1f0a95e4 115702005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
11571
11572 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
11573 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
11574 commands/i386/pc/vbetest.c.
11575
11576 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
11577 call grub_vbe_get_controller_info again, because the returned
11578 information is volatile.
11579 (grub_vbe_set_video_mode): Mostly rewritten.
11580 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
11581 grub_vbe_status_t correctly.
11582 (grub_vbe_get_video_mode_info): Likewise.
11583 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
11584 several if statements.
11585
11586 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
11587 * commands/i386/pc/vbeinfo.c: ... this.
11588
11589 * commands/i386/pc/vbe_test.c: Renamed to ...
11590 * commands/i386/pc/vbetest.c: ... this.
11591
11592 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
11593 ...
11594 (grub_cmd_vbeinfo): ... this. Save video modes before
11595 iterating. Skip a video mode, if it is not available, not enough
11596 information is given or it is monochrome. Show the memory
11597 model. Leave the interpretation of MODEVAR to grub_strtoul
11598 completely.
11599 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
11600 (GRUB_MOD_FINI): Likewise.
11601
11602 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
11603 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
11604 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
11605 duplicated grub_env_get. Leave the interpretation of MODEVAR to
11606 grub_strtoul completely.
11607 (real2pm): Removed.
11608 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
11609 (GRUB_MOD_FINI): Likewise.
11610
11611 * normal/misc.c: Include grub/mm.h.
11612
11613 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
11614 vbe_list_modes with vbetest.mod and vbeinfo.mod.
11615 (vbe_list_modes_mod_SOURCES): Removed.
11616 (vbe_list_modes_mod_CFLAGS): Likewise.
11617 (vbe_test_mod_SOURCES): Likewise.
11618 (vbe_test_mod_CFLAGS): Likewise.
11619 (vbeinfo_mod_SOURCES): New variable.
11620 (vbeinfo_mod_CFLAGS): Likewise.
11621 (vbetest_mod_SOURCES): Likewise.
11622 (vbetest_mod_CFLAGS): Likewise.
11623
992ffbbe 116242005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
11625
11626 * normal/misc.c: New file.
11627
11628 * DISTLIST: Added normal/misc.c.
f19dbdb7 11629
992ffbbe 11630 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
11631 DISK to HOOK. Call HOOK with DISK.
11632 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11633 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11634 * partmap/sun.c (sun_partition_map_iterate): Likewise.
11635
11636 * normal/menu_entry.c (struct screen): Added a new member
11637 "completion_shown".
11638 (completion_buffer): New global variable.
11639 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
11640 (store_completion): New function.
11641 (complete): Likewise.
11642 (clear_completions): Likewise.
11643 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
11644 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
11645 a tab, call complete.
11646
11647 * normal/completion.c (disk_dev): Removed.
11648 (print_simple_completion): Likewise.
11649 (print_partition_completion): Likewise.
11650 (print_func): New global variable.
11651 (add_completion): Do not take the arguments WHAT or PRINT any
11652 longer. Added a new argument TYPE. Instead of printing directly,
11653 call PRINT_FUNC if not NULL.
11654 All callers changed.
11655 (complete_device): Use a local variable DEV instead of
11656 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
11657 (grub_normal_do_completion): Take a new argument HOOK. Do not
11658 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
11659 empty string, return NULL instead.
11660 All callers changed.
11661
11662 * normal/cmdline.c (print_completion): New function.
11663
11664 * kern/partition.c (grub_partition_iterate): Add an argument DISK
11665 to HOOK.
11666 All callers changed.
11667
11668 * kern/disk.c (grub_print_partinfo): Removed.
11669
11670 * include/grub/partition.h (struct grub_partition_map): Add a new
11671 argument DISK into HOOK of ITERATE.
11672 (grub_partition_iterate): Add a new argument DISK to HOOK.
11673
11674 * include/grub/normal.h (enum grub_completion_type): New enum.
11675 (grub_completion_type_t): New type.
11676 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
11677 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
11678 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
11679 (GRUB_COMPLETION_TYPE_FILE): Likewise.
11680 (grub_normal_do_completion): Added a new argument HOOK.
11681 (grub_normal_print_device_info): New prototype.
11682
11683 * include/grub/disk.h (grub_print_partinfo): Removed.
11684
11685 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
11686 (normal_mod_SOURCES): Likewise.
11687 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11688 (normal_mod_SOURCES): Likewise.
11689
11690 * commands/ls.c (grub_ls_list_disks): Use
11691 grub_normal_print_device_info instead of grub_print_partinfo. Free
11692 PNAME.
11693 (grub_ls_list_files): Use grub_normal_print_device_info instead of
11694 duplicating the code.
11695
0bd41162 116962005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11697
11698 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 11699 follow GCS more precisely.
11700 * commands/i386/pc/vbe_test.c: Likewise.
11701 * include/grub/i386/pc/vbe.h: Likewise.
11702 * term/i386/pc/vesafb.c: Likewise.
11703 * video/i386/pc/vbe.c: Likewise.
0bd41162 11704
6323696a 117052005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11706
11707 * DISTLIST: Added term/i386/pc/vesafb.c
11708 DISTLIST: Added video/i386/pc/vbe.c
11709 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
11710 DISTLIST: Added commands/i386/pc/vbe_test.c.
11711 * commands/i386/pc/vbe_list_modes.c: New file.
11712 * commands/i386/pc/vbe_test.c: Likewise.
11713 * term/i386/pc/vesafb.c: Likewise.
11714 * video/i386/pc/vbe.c: Likewise.
11715 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
11716 (grub_vbe_probe) Added prototype.
11717 (grub_vbe_set_video_mode) Likewise.
11718 (grub_vbe_get_video_mode) Likewise.
11719 (grub_vbe_get_video_mode_info) Likewise.
11720 (grub_vbe_set_pixel_rgb) Likewise.
11721 (grub_vbe_set_pixel_index) Likewise.
11722 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
11723 (pkgdata_MODULES): Added vesafb.mod.
11724 (pkgdata_MODULES): Added vbe_list_modes.mod.
11725 (pkgdata_MODULES): Added vbe_test.mod.
11726 (vbe_mod_SOURCES): Added.
11727 (vbe_mod_CFLAGS): Likewise.
11728 (vesafb_mod_SOURCES): Likewise.
11729 (vesafb_mod_CFLAGS): Likewise.
11730 (vbe_list_modes_mod_SOURCES): Likewise.
11731 (vbe_list_modes_mod_CFLAGS): Likewise.
11732 (vbe_test_mod_SOURCES): Likewise.
11733 (vbe_test_mod_CFLAGS): Likewise.
11734
0a74e62f 117352005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
11736
0a74e62f 11737 * normal/command.c (grub_command_execute): If INTERACTIVE is
11738 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
11739 CMDLINE. Disable the pager if INTERACTIVE is true.
11740 All callers are changed.
11741
11742 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
11743 before reading a config file.
11744 * normal/main.c (read_config_file): Even if a command is not
11745 found, register it if it is within an entry.
11746
11747 * util/grub-emu.c: Include sys/types.h and unistd.h.
11748 (options): Added --hold.
11749 (struct arguments): Added a new member "hold".
11750 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
11751 missing.
11752 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
11753 cleared by a debugger, if it is not zero.
11754
11755 * include/grub/normal.h (grub_command_execute): Add an argument
11756 INTERACTIVE.
11757
e51f85ae 117582005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
11759
11760 * DISTLIST: Added include/grub/i386/pc/vbe.h.
11761
e9c6f39b 117622005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
11763
11764 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
11765 program with another one, because the old one didn't detect a bug
11766 in gcc-3.4. Always use regparm 2, because the new test is still
11767 not enough for gcc-4.0. Someone must investigate a simple test
11768 case which detects a bug in gcc-4.0.
11769
8de3495c 117702005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
11771
11772 * DISTLIST: Added normal/completion.c.
11773
11774 * normal/completion.c: New file.
f19dbdb7 11775
8de3495c 11776 * term/i386/pc/console.c (grub_console_getwh): New function.
11777 (grub_console_term): Assign grub_console_getwh to getwh.
11778
11779 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
11780 function is defined in normal/completion.c as
11781 grub_normal_do_completion.
11782 (grub_cmdline_get): Use grub_normal_do_completion instead of
11783 grub_tab_complete.
11784
11785 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
11786 returns non-zero, otherwise return 0.
11787 (grub_partition_iterate): First, probe the partition map. Then,
11788 call ITERATE only for this partition map.
11789
11790 * kern/misc.c (grub_strncmp): Rewritten.
11791
11792 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
11793 returns non-zero. Otherwise return 0.
11794
11795 * include/grub/partition.h (grub_partition_map_iterate): Return
11796 int instead of void.
11797
11798 * include/grub/normal.h (grub_normal_do_completion): New prototype.
11799
11800 * include/grub/misc.h (grub_strncmp): Change the type of N to
11801 grub_size_t.
11802
11803 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
11804 of void.
11805
11806 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 11807 unsigned explicitly before comparing it with I.
8de3495c 11808
11809 * kern/main.c (grub_env_write_root): Add the attribute unused into
11810 VAR.
11811
11812 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11813 normal/completion.c.
11814 (normal_mod_SOURCES): Likewise.
11815 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11816 (normal_mod_SOURCES): Likewise.
11817
11818 * normal/command.c (grub_iterate_commands): If ITERATE returns
11819 non-zero, return one immediately.
11820
e85e144b 118212005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
11822
11823 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
11824 * kern/i386/pc/startup.S: Updated Global Descriptor table's
11825 descriptions.
11826 (grub_vbe_get_controller_info): New function.
11827 (grub_vbe_get_mode_info): Likewise.
11828 (grub_vbe_set_mode): Likewise.
11829 (grub_vbe_get_mode): Likewise.
11830 (grub_vbe_set_memory_window): Likewise.
11831 (grub_vbe_get_memory_window): Likewise.
11832 (grub_vbe_set_scanline_length): Likewise.
11833 (grub_vbe_get_scanline_length): Likewise.
11834 (grub_vbe_set_display_start): Likewise.
11835 (grub_vbe_get_display_start): Likewise.
11836 (grub_vbe_set_palette_data): Likewise.
11837 * include/grub/i386/pc/vbe.h: New file.
11838
c46153d2 118392005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11840
11841 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11842 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
11843 * DISTLIST: Likewise.
11844 * kern/ieee1275/of.c: Moved to ...
11845 * kern/ieee1275/ieee1275.c: ... here.
11846
0cb90c45 118472005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11848
11849 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
11850 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
11851 Pass 0 as `end' parameter to grub_strtoul().
11852
a19fb360 118532005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11854
11855 * include/grub/powerpc/ieee1275/console.h: Do not include
11856 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
11857 ifdef.
11858 (grub_console_cur_color): Remove i386-specific prototype.
11859 (grub_console_real_putchar): Likewise.
11860 (grub_console_checkkey): Likewise.
11861 (grub_console_getkey): Likewise.
11862 (grub_console_getxy): Likewise.
11863 (grub_console_gotoxy): Likewise.
11864 (grub_console_cls): Likewise.
11865 (grub_console_setcursor): Likewise.
11866 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11867 Include <grub/machine/console.h>.
11868 * term/ieee1275/ofconsole.c: Likewise.
11869
4ac9bd04 118702005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
11871
11872 * Makefile.in (LIBLZO): New variable.
11873
11874 * configure.ac: Check for LZO version 2.
11875
11876 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11877 lzo/lzo1x.h instead of lzo1x.h.
11878
11879 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11880 of -llzo.
11881
11882 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11883 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11884
11885 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11886 copying the data from PARTITION to P.
11887
f4917dfd 118882005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11889
11890 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11891 negative, unload the module.
11892
11893 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11894 map is "pc_partition_map" but not "pc".
11895 (usage): Fix the description. The options are --boot-image and
11896 --core-image but not --boot-file or --core-file.
11897 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11898 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11899 DEFAULT_DIRECTORY.
11900
11901 * util/i386/pc/grub-install.in: Do not specify --boot-file or
11902 --core-file. Specify INSTALL_DEVICE as an argument.
11903
11904 * util/console.c: Include config.h.
11905 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11906 [HAVE_NCURSES_H]: Include ncurses.h.
11907 [HAVE_CURSES_H]: Include curses.h.
11908 [!A_NORMAL] (A_NORMAL): Defined as zero.
11909 [!A_STANDOUT] (A_STANDOUT): Likewise.
11910
11911 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11912 -lncurses.
11913 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11914
11915 * configure.ac: Check for curses libraries and headers.
11916
11917 * Makefile.in (LIBCURSES): New variable.
11918
11919 * genmk.rb (Script::rule): Set the executable bits.
11920
11921 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11922 name of the PC partition map is "pc_partition_map" but not "pc".
11923
0e143073 119242005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11925
11926 * util/i386/pc/grub-install.in (grub_probefs): New variable.
11927 (modules): Likewise.
11928 (usage): Added descriptions for --modules and --grub-probefs.
11929 Handle --modules and --grub-probefs. Save the arguments in MODULES
11930 and GRUB_PROBEFS, respectively.
11931 Auto-detect a filesystem module against GRUBDIR. If the result is
11932 empty and modules are not specified explicitly, abort the
11933 installation. Add the result to MODULES.
11934
11935 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11936 disk/powerpc/ieee1275/ofdisk.c,
11937 include/grub/powerpc/ieee1275/init.h and
11938 term/powerpc/ieee1275/ofconsole.c.
11939 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11940 term/ieee1275/ofconsole.c.
11941
11942 * include/grub/powerpc/ieee1275/console.h: Resurrected.
11943
11944 * COPYING: Upgraded to the latest version. Only the address of the
11945 FSF office has changed.
f19dbdb7 11946
efd6e6d5 119472005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11948
11949 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11950 kern/ieee1275.c with kern/ieee1275/of.c.
11951
11952 * kern/ieee1275.c: Moved to ...
11953 * kern/ieee1275/of.c: ... here.
11954
8ceafda2 119552005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
11956
11957 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 11958 readability.
8ceafda2 11959
11960 * config.guess: Updated to the latest version from gnulib.
11961 * config.sub: Likewise.
11962 * install.sh: Likewise.
11963 * mkinstalldirs: Likewise.
11964
11965 * include/grub/console.h: Removed. This file is arch-specific. Do
11966 not put this in include/grub.
11967
11968 * include/grub/i386/pc/console.h: Resurrected.
11969
11970 * util/console.c: Include grub/machine/console.h instead of
11971 grub/console.h.
11972 * util/grub-emu.c: Likewise.
11973
267f6cd9 119742005-08-04 Marco Gerards <metgerards@student.han.nl>
11975
11976 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11977 hardcoded value.
f19dbdb7 11978
267f6cd9 11979 From Vincent Pelletier <subdino2004@yahoo.fr>
11980 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11981 Redefined to use grub_getwh.
11982 (grub_term): New member named getwh.
11983 (grub_getwh): New prototype.
11984 * kern/term.c (grub_getwh): New function.
11985 * term/i386/pc/console.c (grub_console_getwh): New function.
11986 (grub_console_term): New member `getwh'.
11987 * term/i386/pc/vga.c (grub_vga_getwh): New function.
11988 (grub_vga_term): New member `getwh'.
0b5abe02 11989 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 11990 grub_ssize_t.
11991 (grub_ofconsole_getw): New function.
11992 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11993 (grub_ofconsole_term): New field named getwh and new initial
11994 value.
11995
3be7266d 119962005-08-03 Hollis Blanchard <hollis@penguinppc.org>
11997
11998 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11999 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
12000 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
12001 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
12002 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
12003 of <grub/machine/ieee1275.h>.
12004 * commands/ieee1275/reboot.c: Likewise.
12005 * boot/powerpc/ieee1275/ieee1275.c: Move ...
12006 * kern/ieee1275.c: ... to here. All users updated. Change all
12007 parameter structs to use new type `grub_ieee1275_cell_t'.
12008 * term/powerpc/ieee1275/ofconsole.c: Move ...
12009 * term/ieee1275/ofconsole.c: ... to here. All users updated.
12010 * disk/powerpc/ieee1275/ofdisk.c: Move ...
12011 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
12012 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
12013 to return int.
12014 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
12015 Remove unused prototypes. All users updated.
12016 * include/grub/powerpc/ieee1275/console.h: Removed.
12017 * include/grub/powerpc/ieee1275/ieee1275.h: Define
12018 `grub_ieee1275_cell_t'.
12019 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
12020 Cast comparisons with -1 to the correct type.
12021 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
12022 type to match `grub_ieee1275_entry_fn'.
12023
8b5f3938 120242005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
12025
12026 * DISTLIST: Added util/i386/pc/grub-probefs.c.
12027
12028 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
12029 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
12030 partmap/sun.c.
12031 (grub_probefs_SOURCES): New variable.
12032
12033 * util/i386/pc/grub-probefs.c: New file.
12034
12035 * util/i386/pc/grub-setup.c (main): Call
12036 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
12037 grub_hfs_init and grub_jfs_init to initialize the system. Call
12038 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
12039 grub_pc_partition_map_fini to finish the system.
12040
ea409713 120412005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
12042
12043 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
12044 function.
12045 (grub_multiboot_load_elf32): Likewise.
12046 (grub_multiboot_is_elf64): Likewise.
12047 (grub_multiboot_load_elf64): Likewise.
12048 (grub_multiboot_load_elf): Likewise.
12049 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
12050 an ELF32 or ELF64 file.
12051 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
12052
12053 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
12054 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
12055 NULL before calling FS->LABEL.
12056 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
12057 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
12058 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
12059 before calling FS->LABEL.
12060
141a288b 120612005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
12062
12063 * util/i386/pc/grub-install.in (datadir): New variable.
12064 (libdir): Removed.
12065 (pkgdatadir): New variable.
12066 (pkglibdir): Removed.
12067
0d5f8a54 120682005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
12069
12070 * DISTLIST: Added util/i386/pc/grub-install.in.
12071
12072 * util/i386/pc/grub-install.in: New file.
12073
12074 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
12075 (grub_install_SOURCES): Likewise.
12076
12077 * genmk.rb: Added support for scripts.
12078 (Script): New class.
12079 (scripts): New variable.
12080
12081 * Makefile.in (install-local): Install sbin_SCRIPTS by
12082 INSTALL_SCRIPT.
12083 (uninstall): Remove sbin_SCRIPTS.
12084
12085 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
12086 device, try to get a GRUB device by
12087 grub_util_biosdisk_get_grub_dev.
12088 Free DEST_DEV.
12089
12090 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
12091 description for --device-map.
12092
5f968e1e 120932005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12094
12095 Change the semantics of variable hooks. They now return strings
12096 instead of error values.
f19dbdb7 12097
5f968e1e 12098 * util/i386/pc/grub-setup.c: Include grub/env.h.
12099 (setup): Use grub_device_set_root instead of grub_env_set.
12100
12101 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
12102 grub_env_get instead of grub_device_set_root and
12103 grub_device_get_root, respectively.
12104
12105 * kern/main.c (grub_env_write_root): New function.
12106 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
12107 grub_env_set instead of grub_device_set_root.
12108
12109 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
12110 many variables.
12111 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
12112 rather than calling ENV->WRITE_HOOK afterwards.
12113 (grub_env_get): Return the result of ENV->READ_HOOK rather than
12114 passing a pointer of a pointer.
12115 (grub_register_variable_hook): Change the types of "read_hook" and
12116 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
12117 respectively.
12118 Allocate the default empty string on the heap, because this string
12119 may be freed later.
12120
12121 * kern/device.c: Include grub/env.h.
12122 (grub_device_set_root): Removed.
12123 (grub_device_get_root): Likewise.
12124 (grub_device_open): Use grub_env_get instead of
12125 grub_device_get_root.
12126
12127 * include/grub/env.h (grub_env_read_hook_t): New type.
12128 (grub_env_write_hook_t): Likewise.
12129 (grub_env_var): Change the types of "read_hook" and "write_hook"
12130 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
12131 (grub_register_variable_hook): Likewise.
12132
12133 * include/grub/device.h (grub_device_set_root): Removed.
12134 (grub_device_set_root): Likewise.
12135
12136 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
12137 make sure that DIRNAME terminates with '/', so that
12138 grub_fat_find_dir will fail if PATH is not a directory.
12139
12140 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
12141 from DIRNAME.
12142 Use the qualifier auto for print_files and print_files_long.
12143 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
12144 as a regular file.
12145 Put a newline only if there is no error.
12146 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
12147 used.
12148
896f0afd 121492005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12150
12151 * kern/partition.c (grub_partition_probe): Initialize PART to
12152 NULL. Otherwise, when no partition map is registered, this returns
12153 a garbage.
12154
b28b81b2 121552005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
12156
12157 * partmap/apple.c (apple_partition_map_iterate): Check if POS
12158 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
12159 valid.
12160
5f3607e0 121612005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
12162
12163 * commands/ls.c (grub_ls_list_disks): Print the filesystem
12164 information on each device, if it does not have partitions. Print
12165 "Device" instead of "Disk", because this function is not specific
12166 to disk devices.
12167
12168 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
12169 static to ensure that it is put on the memory rather than a
12170 register.
12171
502c87e8 121722005-07-17 Yoshinori Okuji <okuji@enbug.org>
12173
12174 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
12175 (grub_cat_init): Likewise.
12176 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
12177 (options): Likewise.
12178 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
12179 (grub_configfile_init): Likewise.
12180 * font/manager.c (GRUB_MOD_INIT): Likewise.
12181 * commands/help.c (GRUB_MOD_INIT): Likewise.
12182 (grub_help_init): Likewise.
12183 * normal/command.c (grub_command_init): Likewise.
12184 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
12185 * disk/loopback.c (grub_loop_init): Likewise.
12186 (GRUB_MOD_INIT): Likewise.
12187 * commands/ls.c (grub_ls_init): Likewise.
12188 (GRUB_MOD_INIT): Likewise.
12189 (options): Likewise.
12190 * commands/boot.c (grub_boot_init): Likewise.
12191 (GRUB_MOD_INIT): Likewise.
12192 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
12193 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
12194 (GRUB_MOD_INIT): Likewise.
12195 * commands/cmp.c (grub_cmp_init): Likewise.
12196 (GRUB_MOD_INIT): Likewise.
12197
12198 * normal/arg.c: Use <> instead of "" to include header files.
12199 (SHORT_ARG_HELP): New macro.
12200 (SHORT_ARG_USAGE): Likewise.
12201 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
12202 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
12203 descriptions.
12204 (find_short): Check if C is 'h' or 'u' explicitly.
12205 (grub_arg_show_help): Use space characters instead of tabs. Treat
12206 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
12207 are shown with --help and --usage only if they are not used for
12208 the command itself.
12209 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
12210 'h' and 'u'.
12211
12212 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
12213 const into "longarg". Change the type of "shortarg" to int.
12214
f806d18e 122152005-07-17 Yoshinori Okuji <okuji@enbug.org>
12216
12217 * boot/i386/pc/boot.S (boot_drive_check): New label.
12218
12219 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
12220 macro.
12221
12222 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
12223 which do not pass a boot drive correctly. Copied from GRUB Legacy.
12224
e293232b 122252005-07-17 Yoshinori Okuji <okuji@enbug.org>
12226
12227 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
12228 When turning off Gate A20, skip the check and return immediately,
12229 because this is not fatal usually.
12230
ebedfd00 122312005-07-17 Yoshinori Okuji <okuji@enbug.org>
12232
12233 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
12234 be 0x7C00 instead of 0x8000.
12235
12236 * boot/i386/pc/pxeboot.S: Rewritten.
12237
12238 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
12239 EXT_C.
12240 (gate_a20_check_state): Read a byte from 0x108000. Invert the
12241 result.
12242
654fc59f 122432005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
12244
12245 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
12246 robustness. This routine now supports a BIOS call and System
12247 Control Port A to modify the gate A20.
12248
12249 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12250 Increased to 0x440.
12251
09f9923f 122522005-07-12 Hollis Blanchard <hollis@penguinppc.org>
12253
12254 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
12255 device path and resulting ihandle.
12256 (grub_ofdisk_close): dprintf the ihandle being closed.
12257 (grub_ofdisk_read): dprintf function parameters.
12258 * kern/mm.c (grub_mm_init_region): Likewise.
12259 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
12260 (grub_linux_boot): dprintf the Linux entry point, initrd address and
12261 size, and boot arguments.
12262 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
12263 before loading into memory.
12264 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
12265 before loading into memory.
12266
7ef504d8 122672005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
12268
12269 * kern/mm.c: Added much documentation.
12270 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
12271 8, set to 5 instead of 8.
12272
e0f050c2 122732005-07-10 Yoshinori Okuji <okuji@enbug.org>
12274
12275 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
12276
12277 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
12278 (grub_mkdevicemap_SOURCES): New variable.
12279
12280 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
12281 lib/device.c of GRUB Legacy.
12282
7224189a 122832005-07-10 Yoshinori Okuji <okuji@enbug.org>
12284
12285 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
12286 instead of PATH is NULL.
12287
68c864eb 122882005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
12289
12290 * commands/cmp.c (BUFFER_SIZE): New macro.
12291 (grub_cmd_cmp): Close the right file at the right time. Compare
12292 only data just read. Don't report files of different size as
12293 identical. Dynamically allocate buffers. Move variable
12294 declarations at the beginning of function.
12295
e6f3e614 122962005-07-09 Yoshinori Okuji <okuji@enbug.org>
12297
12298 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
12299 reverse.
12300
f8f1559a 123012004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
12302
12303 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
12304 when backspace is pressed at beginning of line.
12305
39c9d41d 123062005-07-03 Yoshinori Okuji <okuji@enbug.org>
12307
12308 * DISTLIST: Added genfslist.sh.
12309
12310 * normal/main.c (fs_module_list): New variable.
12311 (autoload_fs_module): New function.
12312 (read_fs_list): Likewise.
12313 (grub_normal_execute): Call read_fs_list.
12314
12315 * kern/fs.c (grub_fs_autoload_hook): New variable.
12316 (grub_fs_probe): Added support for auto-loading.
12317
12318 * include/grub/normal.h (struct grub_fs_module_list): New struct.
12319 (grub_fs_module_list_t): New type.
12320
12321 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
12322 (grub_fs_autoload_hook): New prototype.
12323
12324 * genfslist.sh: New file.
f19dbdb7 12325
39c9d41d 12326 * genmk.rb: Added a rule to generate a filesystem list.
12327
121c1d83 123282005-06-30 Marco Gerards <metgerards@student.han.nl>
12329
12330 * configure.ac: Fix the test for cross-compiling.
12331
12332 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
12333 define GRUB_UTIL anymore.
12334
12335 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
12336 so this function works on other systems than just big endian.
12337 (load_modules): Likewise.
12338 (add_segments): Likewise.
12339
e75d76e1 123402005-06-23 Hollis Blanchard <hollis@penguinppc.org>
12341
12342 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
12343 contains `l' modifier, get a long from va_arg().
12344
50b5a0a7 123452005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
12346
12347 * kern/mm.c (grub_free): If the next free block which is being
12348 merged is the first free block, set the first block to the block
12349 being freed.
12350 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
12351
89371b20 123522005-05-08 Hollis Blanchard <hollis@penguinppc.org>
12353
12354 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
12355 `grub_ieee1275_chosen'.
12356
168d6e58 123572005-05-08 Hollis Blanchard <hollis@penguinppc.org>
12358
12359 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
12360 (grub_ieee1275_chosen): New variable.
12361 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
12362 `chosen'.
12363 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
12364 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12365 Rename first argument to `phandle' for consistency.
12366 (grub_ieee1275_get_property_length): Likewise.
12367 (grub_ieee1275_next_property): Likewise. Change type of first argument
12368 to grub_ieee1275_phandle_t.
12369 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
12370 Move export next to declaration.
12371 (grub_ieee1275_chosen): New variable.
12372 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
12373 Correct cosmetic typo.
12374 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
12375 `grub_ieee1275_chosen'.
12376 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
12377 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
12378 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
12379 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
12380 `grub_ieee1275_chosen'.
12381
ca5baa3f 123822005-05-10 Hollis Blanchard <hollis@penguinppc.org>
12383
12384 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
12385 /chosen/bootargs.
12386 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
12387 /chosen/bootargs as "variable=value" pairs.
12388
708b345f 123892005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
12390
12391 * include/grub/misc.h (grub_dprintf): New macro.
12392 (grub_real_dprintf): New prototype.
12393 (grub_strword): Likewise.
12394 (grub_iswordseparator): Likewise.
12395 * kern/misc.c (grub_real_dprintf): New function.
12396 (grub_strword): Likewise.
12397 (grub_iswordseparator): Likewise.
12398
f4c5e67c 123992005-04-30 Hollis Blanchard <hollis@penguinppc.org>
12400
12401 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
12402 (roundup): Remove macro.
12403 (grub_ieee1275_flags): Make static.
12404 (grub_ieee1275_realmode): Remove.
12405 (grub_ieee1275_test_flag): New function.
12406 (grub_ieee1275_set_flag): Likewise.
12407 (find_options): Rename to `grub_ieee1275_find_options'; update
12408 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
12409 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
12410 (cmain): New prototype.
12411 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
12412 `grub_ieee1275_flags' directly.
12413 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
12414 machine/biosdisk.h.
12415 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
12416 Don't include grub/machine/init.h.
12417 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
12418 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12419 Remove prototype.
12420 (grub_ieee1275_realmode): Likewise.
12421 (grub_ieee1275_flag): New enum.
12422 (grub_ieee1275_test_flag): New prototype.
12423 (grub_ieee1275_set_flag): New prototype.
12424 * include/grub/powerpc/ieee1275/init.h: Remove file.
12425 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
12426 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
12427 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
12428 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
12429 comment.
12430 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
12431 `grub_ieee1275_test_flag'.
12432 (grub_ieee1275_encode_devname): Likewise.
12433
ed16607e 124342005-04-21 Hollis Blanchard <hollis@penguinppc.org>
12435
12436 * include/grub/powerpc/ieee1275/ieee1275.h
12437 (grub_ieee1275_encode_devname): New prototype.
12438 (grub_ieee1275_get_filename): Likewise.
12439 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
12440 function.
12441 (grub_set_prefix): Likewise.
12442 (grub_machine_init): Call grub_set_prefix.
12443 * kern/powerpc/ieee1275/openfw.c: Fix typos.
12444 (grub_parse_type): New enum.
12445 (grub_ieee1275_get_devargs): New function.
12446 (grub_ieee1275_get_devname): Likewise.
12447 (grub_ieee1275_parse_args): Likewise.
12448 (grub_ieee1275_get_filename): Likewise.
12449 (grub_ieee1275_encode_devname): Likewise.
12450
be369920 124512005-03-30 Marco Gerards <metgerards@student.han.nl>
12452
12453 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
12454 `grub_loader_unset'.
12455
a5ce3a4a 124562005-03-26 Hollis Blanchard <hollis@penguinppc.org>
12457
12458 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
12459 instead of grub_ieee1275_interpret.
12460 (grub_halt_init): New function.
12461 (grub_halt_fini): Likewise.
12462 (GRUB_MOD_INIT): Correct message grammar.
12463 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
12464 instead of grub_ieee1275_interpret.
12465 (grub_reboot_init): New function.
12466 (grub_reboot_fini): Likewise.
12467 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
12468 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
12469 util/i386/pc/misc.c with commands/ieee1275/halt.c,
12470 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
12471 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
12472 function.
12473 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
12474 Add prototype.
12475 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
12476 prototype.
12477 (grub_halt): Likewise.
12478 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
12479 (cmain): Remove __attribute__((unused)).
12480 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
12481 (grub_heap_len): Likewise.
12482 (grub_machine_fini): New function.
12483 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
12484 (grub_halt): Likewise.
12485 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
12486 function.
12487 * util/powerpc/ieee1275/misc.c: New file.
12488
0058f771 124892005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
12490
12491 * DISTLIST: New file.
12492 * gendistlist.sh: Likewise.
f19dbdb7 12493
0058f771 12494 * Makefile.in (COMMON_DISTFILES): Removed.
12495 (BOOT_DISTFILES): Likewise.
12496 (CONF_DISTFILES): Likewise.
12497 (DISK_DISTFILES): Likewise.
12498 (FS_DISTFILES): Likewise.
12499 (INCLUDE_DISTFILES): Likewise.
12500 (KERN_DISTFILES): Likewise.
12501 (LOADER_DISTFILES): Likewise.
12502 (TERM_DISTFILES): Likewise.
12503 (UTIL_DISTFILES): Likewise.
12504 (DISTFILES): Likewise.
12505 (uninstall): Uninstall files in $(pkgdata_DATA).
12506 (DISTLIST): New target.
12507 (distdir): Use the contents of the file DISTLIST to get a list of
12508 distributed files.
12509
46b3b8a5 125102005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
12511
12512 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
12513 descriptor. This is ported from GRUB Legacy.
12514
12515 * gencmdlist.sh: Added an extra semicolon to make it work with
12516 old sed versions. Reported by Robert Bihlmeyer
12517 <robbe@orcus.priv.at>.
12518
5822ff87 125192005-03-08 Yoshinori Okuji <okuji@enbug.org>
12520
12521 Automatic loading of commands is supported.
f19dbdb7 12522
5822ff87 12523 * normal/main.c (read_command_list): New function.
12524 (grub_normal_execute): Call read_command_list.
12525
12526 * normal/command.c (grub_register_command): Return zero or CMD.
12527 Allocate CMD->NAME from the heap.
12528 Initialize CMD->MODULE_NAME to zero.
12529 Find the same name as well. If the same command is found and it is
12530 a dummy command, overwrite members. If it is not a dummy command,
12531 return zero.
12532 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
12533 (grub_command_find): If a dummy command is found, load a module
12534 and retry to find a command only once.
12535
12536 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
12537 make sure that each command is loaded.
12538
12539 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
12540 macro.
12541 (struct grub_command): Remove const from the member `name'.
12542 Add a new member `module_name'.
12543 (grub_register_command): Return grub_command_t.
12544
12545 * commands/help.c (grub_cmd_help): Call grub_command_find to make
12546 sure that each command is loaded.
12547
12548 * genmk.rb (PModule::rule): Specify a module name without the
12549 suffix ".mod" to gencmdlist.sh.
12550
7b1f4b57 125512005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12552
12553 * gencmdlist.sh: New file.
f19dbdb7 12554
7b1f4b57 12555 * genmk.rb (PModule::rule): Generate a rule for a command list.
12556 Clean command.lst.
12557 Generate command.lst from $(COMMANDFILES).
12558
12559 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
12560 (DATA): Added $(pkgdata_DATA).
12561 (install-local): Install files in $(pkgdata_DATA).
12562
062aaf39 125632005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12564
12565 * term/i386/pc/vga.c (debug_command): Removed.
12566 (GRUB_MOD_INIT): Do not register the command "debug".
12567
12568 From Hollis Blanchard:
12569 * commands/configfile.c: New file.
12570 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12571 commands/configfile.c.
12572 (pkgdata_MODULES): Added configfile.mod.
12573 (configfile_mod_SOURCES): New variable.
12574 (configfile_mod_CFLAGS): Likewise.
12575 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12576 commands/configfile.c.
12577 (pkgdata_MODULES): Added configfile.mod.
12578 (configfile_mod_SOURCES): New variable.
12579 (configfile_mod_CFLAGS): Likewise.
12580 * util/grub-emu.c (main): Call grub_configfile_init and
12581 grub_configfile_fini.
12582 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
12583 prototype.
12584 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 12585
cee01aa6 125862005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12587
12588 * normal/arg.c (grub_arg_show_help): Do not show the bug report
12589 address.
12590
12591 * commands/help.c (grub_cmd_help): Do not print newlines after
12592 the last command in print_command_help.
12593
93f3a1d8 125942005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12595
12596 * commands/default.h: New file.
12597 * commands/timeout.h: Likewise.
12598 * normal/context.c: Likewise.
f19dbdb7 12599
93f3a1d8 12600 * util/misc.c: Do not include sys/times.h.
12601 Include sys/time.h and grub/machine/time.h.
12602 (grub_get_rtc): Rewritten with gettimeofday.
12603
12604 * util/grub-emu.c (main): Call grub_default_init and
12605 grub_timeout_init before grub_normal_init, and call
12606 grub_timeout_fini and grub_default_fini after grub_main.
12607
12608 * util/console.c (grub_ncurses_checkkey): Return the read
12609 character or -1.
12610
12611 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
12612 timeouts.
12613
12614 * normal/main.c (read_config_file): Push MENU. If this fails,
12615 print an error and wait for a user input.
12616 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
12617 If a menu is empty or an error occurs, pop MENU.
12618 (grub_normal_execute): Pop and free MENU after grub_menu_run
12619 returns.
12620
12621 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
12622
12623 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
12624 include time.h.
12625 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12626 without GRUB_UTIL.
12627 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
12628 time.h.
12629 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12630 without GRUB_UTIL.
12631
12632 * include/grub/normal.h (struct grub_menu_list): New struct.
12633 (grub_menu_list_t): New type.
12634 (struct grub_context): New struct.
12635 (grub_context_t): New type.
12636 (grub_register_command): Got rid of EXPORT_FUNC.
12637 (grub_unregister_command): Likewise.
12638 (grub_context_get): New prototype.
12639 (grub_context_get_current_menu): Likewise.
12640 (grub_context_push_menu): Likewise.
12641 (grub_context_pop_menu): Likewise.
12642 [GRUB_UTIL] (grub_default_init): Likewise.
12643 [GRUB_UTIL] (grub_default_fini): Likewise.
12644 [GRUB_UTIL] (grub_timeout_init): Likewise.
12645 [GRUB_UTIL] (grub_timeout_fini): Likewise.
12646
12647 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
12648 commands/timeout.c and normal/context.c.
12649 (pkgdata_MODULES): Added default.mod and timeout.mod.
12650 (normal_mod_SOURCES): Added normal/context.c.
12651 (default_mod_SOURCES): New variable.
12652 (default_mod_CFLAGS): Likewise.
12653 (timeout_mod_SOURCES): Likewise.
12654 (timeout_mod_CFLAGS): Likewise.
12655 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
12656 conf/i386-pc.rmk.
12657 (pkgdata_MODULES): Added default.mod and timeout.mod.
12658 (normal_mod_SOURCES): Added normal/context.c.
12659 (default_mod_SOURCES): New variable.
12660 (default_mod_CFLAGS): Likewise.
12661 (timeout_mod_SOURCES): Likewise.
12662 (timeout_mod_CFLAGS): Likewise.
12663
12664 * Makefile.in (all-local): Added $(MKFILES).
12665
4ed2e1dd 126662005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
12667
12668 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
12669 (grub_emu_SOURCES): Likewise.
12670 (pkgdata_MODULES): Add `sun.mod'.
12671 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12672 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12673 `partmap/sun.c'.
12674 (pkgdata_MODULES): Add `sun.mod'.
12675 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12676 * include/grub/partition.h (grub_sun_partition_map_init): New
12677 prototype.
12678 (grub_sun_partition_map_fini): Likewise.
12679 * partmap/sun.c: New file.
12680 * util/grub-emu.c (main): Initialize and de-initialize the sun
12681 partitionmap support.
12682
4d4e372e 126832005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
12684
12685 This implements an Emacs-like menu entry editor.
f19dbdb7 12686
4d4e372e 12687 * normal/menu_entry.c: New file.
f19dbdb7 12688
4d4e372e 12689 * util/console.c (grub_ncurses_putchar): Translate some Unicode
12690 characters to ASCII.
12691 (saved_char): New variable.
12692 (grub_ncurses_checkkey): Rewritten completely.
12693 (grub_ncurses_getkey): Likewise.
12694 (grub_ncurses_init): Call raw instead of cbreak.
12695
12696 * normal/menu.c (print_entry): Do not put a space.
12697 (init_page): Renamed to ...
12698 (grub_menu_init_page): ... this. All callers changed.
12699 (edit_menu_entry): Removed.
12700 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
12701
12702 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
12703
12704 * kern/misc.c (grub_vprintf): Call grub_refresh.
12705
12706 * normal/menu.c (DISP_LEFT): Renamed to ...
12707 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
12708 * normal/menu.c (DISP_UP): Renamed to ...
12709 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
12710 * normal/menu.c (DISP_RIGHT): Renamed to ...
12711 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
12712 * normal/menu.c (DISP_DOWN): Renamed to ...
12713 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
12714 * normal/menu.c (DISP_HLINE): Renamed to ...
12715 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
12716 * normal/menu.c (DISP_VLINE): Renamed to ...
12717 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
12718 * normal/menu.c (DISP_UL): Renamed to ...
12719 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
12720 * normal/menu.c (DISP_UR): Renamed to ...
12721 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
12722 * normal/menu.c (DISP_LL): Renamed to ...
12723 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
12724 * normal/menu.c (DISP_LR): Renamed to ...
12725 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
12726 * normal/menu.c (TERM_WIDTH): Renamed to ...
12727 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
12728 * normal/menu.c (TERM_HEIGHT): Renamed to ...
12729 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
12730 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
12731 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
12732 * normal/menu.c (TERM_MARGIN): Renamed to ...
12733 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
12734 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
12735 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
12736 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
12737 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
12738 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
12739 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
12740 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
12741 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
12742 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
12743 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
12744 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
12745 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
12746 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
12747 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
12748 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
12749 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
12750 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
12751 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
12752 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
12753 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
12754 All callers changed.
12755
12756 * include/grub/normal.h: New prototype.
12757
12758 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12759 normal/menu_entry.c.
12760 (normal_mod_SOURCES): Likewise.
12761 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12762 (normal_mod_SOURCES): Likewise.
12763
e6b92c8a 127642005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
12765
12766 * include/grub/normal.h (grub_halt_init): New prototype.
12767 (grub_halt_fini): Likewise.
12768 (grub_reboot_init): Likewise.
12769 (grub_reboot_fini): Likewise.
12770
12771 * util/grub-emu.c: Include signal.h.
12772 (main_env): New global variable.
12773 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
12774 catch C-c.
12775 (grub_machine_fini): New function.
12776 (main): Call grub_halt_init and grub_reboot_init before
12777 grub_main, and grub_reboot_fini and grub_halt_fini after it.
12778 Call setjmp with MAIN_ENV to go back afterwards.
12779 Call grub_machine_fini right before return.
12780
12781 * include/grub/util/misc.h: Include setjmp.h.
12782 (main_env): New prototype.
12783
12784 * include/grub/kernel.h (grub_machine_fini): New prototype.
12785 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
12786 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
12787
12788 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
12789 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
12790 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 12791
e6b92c8a 12792 * util/i386/pc/misc.c: New file.
f19dbdb7 12793
e6b92c8a 12794 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12795 util/i386/pc/misc.c, commands/i386/pc/halt.c and
12796 commands/i386/pc/reboot.c.
12797
c642636f 127982005-02-14 Guillem Jover <guillem@hadrons.org>
12799
12800 * include/grub/dl.h (grub_dl_check_header): New prototype.
12801 (grub_arch_dl_check_header): Change return type to grub_err_t,
12802 remove size parameter and export function. Update all callers.
12803 * kern/dl.c (grub_dl_check_header): New function.
12804 (grub_dl_load_core): Use `grub_dl_check_header' instead of
12805 `grub_arch_dl_check_header'. Check ELF type. Check if sections
12806 are inside the core.
12807 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
12808 independent ELF header checks.
12809 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12810 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
12811 `grub_dl_check_header' instead of explicit checks. Check for the
12812 ELF type.
12813 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
12814 `grub_dl_check_header' instead of explicit checks. Remove arch
12815 specific ELF header checks.
12816
e6b92c8a 12817 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
12818 argument SIZE.
12819
5eabe94b 128202005-02-13 Hollis Blanchard <hollis@penguinppc.org>
12821
12822 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
12823 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
12824
1b14a681 128252005-02-12 Hollis Blanchard <hollis@penguinppc.org>
12826
12827 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 12828 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 12829 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 12830 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 12831 * partmap/amiga.c (amiga_partition_map_iterate): Return
12832 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
12833 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12834
aca108aa 128352005-02-01 Guillem Jover <guillem@hadrons.org>
12836
12837 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
12838 help info.
12839
c9f9c556 128402005-01-31 Marco Gerards <metgerards@student.han.nl>
12841
12842 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
12843 Removed prototype.
12844 (grub_rescue_cmd_linux): New prototype.
12845 (grub_rescue_cmd_initrd): Likewise.
12846 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
12847 `bi_rec'.
12848 (grub_linux_release_mem): Release the memory for the initrd.
12849 (grub_load_linux): Renamed from this...
12850 (grub_rescue_cmd_linux): ...To this. Changed all callers.
12851 Changed `entry' not to be static. Loop over memory regions to
12852 find another one when the default fails.
12853 (grub_rescue_cmd_initrd): New function.
12854 (grub_linux_init): Remove function.
12855 (grub_linux_fini): Likewise.
12856 (GRUB_MOD_INIT): Register `initrd'.
12857 (GRUB_MOD_FINI): Unregister `initrd'.
12858 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12859 Function removed.
12860 (grub_linux_normal_fini): Likewise.
12861 (GRUB_MOD_INIT): Register `initrd'.
12862 (GRUB_MOD_FINI): Unregister `initrd'.
12863
990cf3aa 128642005-01-31 Marco Gerards <metgerards@student.han.nl>
12865
12866 * commands/help.c: New file.
12867 * normal/arg.c (show_help): Renamed to...
12868 (grub_arg_show_help): ... this.
12869 * commands/i386/pc/halt.c: New file.
12870 * commands/i386/pc/reboot.c: Likewise.
12871 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12872 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12873 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12874 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12875 variables.
12876 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12877 `commands/help.c'.
12878 (pkgdata_MODULES): Add `help.mod'.
12879 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12880 * grub/i386/pc/init.h (grub_reboot): New prototype.
12881 (grub_halt): Likewise.
12882 * include/grub/normal.h (grub_arg_show_help): New prototype.
12883 (grub_help_init): Likewise.
12884 (grub_help_fini): Likewise.
12885 * util/grub-emu.c (main): Initialize and deinitialize the help
12886 command.
12887
12888 * normal/cmdline.c (grub_cmdline_get): Doc fix.
12889
12890 * normal/command.c (grub_command_init): Fixed the description of
12891 the `set' and `unset' commands.
12892
128932005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 12894
12895 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12896 function.
12897 * commands/ieee1275/halt.c: New file.
12898 * commands/ieee1275/reboot.c: Likewise.
12899 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12900 `__attribute__ ((unused))'. Some GCS related fixed.
12901 (grub_suspend_init) [GRUB_UTIL]: Function removed.
12902 (grub_suspend_fini): Likewise.
12903 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12904 and `halt.mod'.
12905 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12906 (halt_mod_CFLAGS): New variables.
12907 * include/grub/powerpc/ieee1275/ieee1275.h
12908 (grub_ieee1275_interpret): New prototype.
12909
1ab09cc7 129102005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
12911
12912 * include/grub/misc.h (memmove): New prototype.
12913 (memcpy): Likewise.
12914
8b8cbdb2 129152005-01-22 Hollis Blanchard <hollis@penguinppc.org>
12916
12917 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12918 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
12919
e3741a27 129202005-01-22 Marco Gerards <metgerards@student.han.nl>
12921
12922 * kern/misc.c (grub_strndup): Function rewritten.
12923
776bd780 129242005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
12925
12926 * normal/menu.c (TERM_WIDTH): Macro redefined.
12927 (TERM_TOP_BORDER_Y): Likewise.
12928 (draw_border): Replaced while-loop by a for-loop. Make the number
12929 of lines consistent with the number of lines displayed in
12930 print_entries. Added a margin below the rectangle.
12931 (print_entry): Make the entry fit in the rectangle.
12932 (print_entries): Display the scroll arrows next to the right
12933 border.
12934
78026bce 129352005-01-21 Marco Gerards <metgerards@student.han.nl>
12936
12937 * fs/minix.c (grub_minix_find_file): Reserve more space for
12938 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
12939 `grub_strncpy' to copy `path' into it.
12940
67bbaf0f 129412005-01-21 Marco Gerards <metgerards@student.han.nl>
12942
12943 Add the loopback device, a device via which files can be accessed
12944 as devices.
f19dbdb7 12945
67bbaf0f 12946 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12947 (pkgdata_MODULES): Add loopback.mod.
12948 (loopback_mod_SOURCES): New variable.
12949 (loopback_mod_CFLAGS): Likewise.
12950 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12951 `disk/loopback.c'.
12952 (pkgdata_MODULES): Add loopback.mod.
12953 (loopback_mod_SOURCES): New variable.
12954 (loopback_mod_CFLAGS): Likewise.
12955 * disk/loopback.c: new file.
12956 * include/grub/normal.h (grub_loop_init): New prototype.
12957 (grub_loop_fini): New prototype.
12958 * util/grub-emu.c (main): Initialize and de-initialize loopback
12959 support.
12960 * include/grub/disk.h (grub_disk_dev_id): Add
12961 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12962
6f1c18bd 129632005-01-20 Hollis Blanchard <hollis@penguinppc.org>
12964
12965 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12966 function.
12967 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12968 (suspend_mod_SOURCES): New variable.
12969 (suspend_mod_CFLAGS): Likewise.
12970 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12971 New prototype.
12972 * commands/ieee1275/suspend.c: New file.
12973
b38551da 129742005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12975
12976 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 12977 ((unused))' to `__attribute__ ((used))'.
b38551da 12978 (GRUB_MOD_FINI): Likewise.
12979 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12980 * genmk.rb (PModule): Assign space to common symbols when linking
12981 modules.
12982
777aff39 129832005-01-20 Marco Gerards <metgerards@student.han.nl>
12984
12985 * include/grub/mm.h (grub_mm_init_region): Change the type of the
12986 `unsigned' arguments to `grub_size_t'.
12987 (grub_malloc): Likewise.
12988 (grub_realloc): Likewise.
12989 (grub_memalign): Likewise.
12990 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12991 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12992 * util/misc.c (grub_malloc): Likewise.
12993 (grub_realloc): Likewise.
12994 * kern/mm.c (get_header_from_pointer): Change the casts to
12995 `unsigned' into a cast to `grub_size_t'.
12996
12997 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12998 point to `currnode' when `currnode' is changed.
12999
13000 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
13001 Schottelius <nico-linux@schottelius.org>.
13002
d0ff18e1 130032005-01-09 Hollis Blanchard <hollis@penguinppc.org>
13004
13005 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
13006 (note_path): Remove variable.
13007 (GRUB_IEEE1275_NOTE_NAME): New macro.
13008 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
13009 (grub_ieee1275_note_hdr): New structure.
13010 (grub_ieee1275_note_desc): Likewise.
13011 (grub_ieee1275_note): Likewise.
13012 (load_note): Remove `dir' argument. All callers updated. Remove
13013 `note_img' and `path'. Do not load a file from `note_path'.
13014 Initialize a struct grub_ieee1275_note and write that to `out'.
13015 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
13016
4ca7004c 130172005-01-05 Marco Gerards <metgerards@student.han.nl>
13018
13019 * util/misc.c (grub_util_read_image): Revert last change. It
13020 called `grub_util_read_at', which seeks from the beginning of the
13021 file.
13022
0b412211 130232005-01-04 Hollis Blanchard <hollis@penguinppc.org>
13024
13025 * TODO: Add note about endianness in grub-mkimage.
13026 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
13027 section.
13028 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
13029 (grub_mkimage_SOURCES): New target.
13030 * include/grub/kernel.h (grub_start_addr): Remove variable.
13031 (grub_end_addr): Likewise.
13032 (grub_total_module_size): Likewise.
13033 (grub_kernel_image_size): Likewise.
13034 (GRUB_MODULE_MAGIC): New constant.
13035 (grub_module_info): New structure.
13036 (grub_arch_modules_addr): New prototype.
13037 (grub_get_end_addr): Remove prototype.
13038 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
13039 * include/grub/powerpc/ieee1275/kernel.h: New file.
13040 * include/grub/util/misc.h (grub_util_get_fp_size): New
13041 prototype.
13042 (grub_util_read_at): Likewise.
13043 (grub_util_write_image_at): Likewise.
13044 * kern/main.c (grub_get_end_addr): Remove function.
13045 (grub_load_modules): Call grub_arch_modules_addr instead of using
13046 grub_end_addr. Look for a grub_module_info struct in memory. Use
13047 the grub_module_info fields instead of calling grub_get_end_addr
13048 as loop conditions. Move grub_add_unused_region code here.
13049 (grub_add_unused_region): Remove function.
13050 * kern/i386/pc/init.c: Include grub/cache.h.
13051 (grub_machine_init): Remove call to grub_get_end_addr. Remove
13052 one call to add_mem_region.
13053 (grub_arch_modules_addr): New function.
13054 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
13055 (grub_total_module_size): Likewise.
13056 Include grub/machine/kernel.h.
13057 (grub_arch_modules_addr): New function.
13058 * util/grub-emu.c (grub_end_addr): Remove variable.
13059 (grub_total_module_size): Likewise.
13060 (grub_arch_modules_addr): New function.
13061 * util/misc.c: Include unistd.h.
13062 (grub_util_get_fp_size): New function.
13063 (grub_util_read_at): Likewise.
13064 (grub_util_write_image_at): Likewise.
13065 (grub_util_read_image): Call grub_util_read_at.
13066 (grub_util_write_image): Call grub_util_write_image_at.
13067 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
13068 additional memory in kernel_img for a struct grub_module_info.
13069 Fill in that grub_module_info.
13070 * util/powerpc/ieee1275/grub-mkimage.c: New file.
13071
458786f8 130722005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13073
13074 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
13075 New function.
13076 * include/grub/powerpc/ieee1275/ieee1275.h
13077 (grub_ieee1275_milliseconds): New prototype.
13078 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
13079 Change to 1000.
13080 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
13081 grub_ieee1275_milliseconds.
13082
ac507d1b 130832005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13084
13085 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
13086 variable.
13087 (find_options): New function.
13088 (cmain): Call find_options.
13089 * include/grub/powerpc/ieee1275/ieee1275.h
13090 (grub_ieee1275_realmode): New extern variable.
13091 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
13092 grub_map if grub_ieee1275_realmode is false.
13093
6b8fd1c4 130942004-12-29 Marco Gerards <metgerards@student.han.nl>
13095
13096 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
13097 lines are inserted and make it work like readline. Reported by
13098 Vincent Pelletier <subdino2004@yahoo.fr>.
13099
8514a1e0 131002004-12-28 Marco Gerards <metgerards@student.han.nl>
13101
13102 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
13103
13104 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
13105 `kern/powerpc/cache.S'.
13106
924b6140 131072004-12-27 Marco Gerards <metgerards@student.han.nl>
13108
13109 * genmk.rb: Handle the `Program' class in the main loop. Written
13110 by Johan Rydberg <jrydberg@gnu.org>.
13111 (Program): New class.
13112 (programs): New variable.
13113 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
13114 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
13115 instead of "grub/kernel.h". Include <grub/machine/init.h>.
13116 (help_arch): Function removed.
13117 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
13118 `powerpc/libgcc.h' and `loader.h'.
13119 (pkgdata_PROGRAMS): New variable.
13120 (sbin_UTILITIES): Variable removed.
13121 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
13122 (grubof_SOURCES): Variable re-defined so it only includes the
13123 core functionality.
13124 (grubof_CFLAGS): Remove `-DGRUBOF'.
13125 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
13126 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
13127 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
13128 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
13129 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
13130 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
13131 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
13132 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
13133 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
13134 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
13135 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13136 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
13137 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
13138 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
13139 (pc_mod_CFLAGS): New variables.
13140 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
13141 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
13142 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
13143 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
13144 Moved from here...
13145 * include/grub/i386/pc/init.h (grub_os_area_addr)
13146 (rub_os_area_size): ... to here.
13147 * include/grub/powerpc/ieee1275/ieee1275.h
13148 (grub_ieee1275_entry_fn): Export symbol.
13149 * include/grub/powerpc/ieee1275/init.h: New file.
13150 * include/grub/powerpc/libgcc.h: Likewise.
13151 * include/grub/cache.h: Likewise.
13152 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
13153 <hollis@penguinppc.org>.
13154 * kern/dl.c: Include <grub/cache.h>.
13155 (grub_dl_flush_cache): New function.
13156 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
13157 for this module.
13158 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
13159 (grub_console_init): Removed prototypes.
13160 (grub_machine_init): Don't initialize the modules anymore.
13161 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
13162 static.
13163 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
13164 Macro undef removed.
13165 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
13166 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
13167 relocation `R_PPC_REL32'. Return an error when the relocation is
13168 unknown.
13169 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
13170 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
13171 * util/misc.c (grub_arch_sync_caches): Likewise.
13172
e4b47e0c 131732004-12-19 Marco Gerards <metgerards@student.han.nl>
13174
13175 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
13176 `symlist.c', add `grubof_symlist.c'.
13177 (symlist.c): Variable removed.
13178 (grubof_HEADERS): Variable added.
13179 (grubof_symlist.c): New target.
13180 (kernel_syms.lst): Use `grubof_HEADERS' instead of
13181 `kernel_img_HEADERS'.
13182 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
13183 * kern/powerpc/dl.c: New file.
13184 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
13185 Function removed.
13186 (grub_arch_dl_relocate_symbols): Likewise.
13187 (grub_register_exported_symbols): Likewise.
13188
4ceb3636 131892004-12-13 Marco Gerards <metgerards@student.han.nl>
13190
13191 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
13192 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
13193 to fail instead. Reported by Vincent Pelletier
13194 <subdino2004@yahoo.fr>.
13195
13196 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
13197 it is not allocated. Reported by Vincent Pelletier
13198 <subdino2004@yahoo.fr>.
13199
13200 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
13201 output so the output looks better.
f19dbdb7 13202
3f1578fe 132032004-12-04 Marco Gerards <metgerards@student.han.nl>
13204
13205 Modulize the partition map support and add support for the amiga
13206 partition map.
f19dbdb7 13207
3f1578fe 13208 * commands/ls.c: Include <grub/partition.h> instead of
13209 <grub/machine/partition.h>.
13210 * kern/disk.c: Likewise.
13211 * kern/rescue.c: Likewise.
13212 * loader/i386/pc/chainloader.c: Likewise.
13213 * normal/cmdline.c: Likewise.
13214 * kern/powerpc/ieee1275/init.c: Likewise.
13215 (grub_machine_init): Call `grub_pc_partition_map_init',
13216 `grub_amiga_partition_map_init' and
13217 `grub_apple_partition_map_init'.
13218 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
13219 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
13220 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
13221 `partition.h' and `pc_partition.h'.
13222 (grub_setup_SOURCES): Remove
13223 `disk/i386/pc/partition.c'. Add `kern/partition.c',
13224 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13225 (grub_emu_SOURCES): Likewise.
13226 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
13227 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
13228 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
13229 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13230 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
13231 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13232 (grubof_SOURCES): Likewise.
13233 * disk/i386/pc/partition.c: File removed.
13234 * disk/powerpc/ieee1275/partition.c: Likewise.
13235 * include/grub/powerpc/ieee1275/partition.h: Likewise.
13236 * include/grub/i386/pc/partition.h: Likewise.
13237 * kern/partition.c: New file.
13238 * partmap/amiga.c: Likewise.
13239 * partmap/apple.c: Likewise.
13240 * partmap/pc.c: Likewise.
13241 * include/grub/partition.h: Likewise..
13242 * include/grub/pc_partition.h: Likewise.
13243 * util/grub-emu.c: Include <grub/partition.h> instead of
13244 <grub/machine/partition.h>.
13245 (main): Call `grub_pc_partition_map_init',
13246 `grub_amiga_partition_map_init' and
13247 `grub_apple_partition_map_init' and deinitialize afterwards.
13248 * util/i386/pc/biosdisk.c: Include `#include
13249 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13250 `<grub/machine/partition.h>'.
13251 * util/i386/pc/grub-setup.c: Likewise.
13252 * util/i386/pc/biosdisk.c: Likewise.
13253 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
13254 partition information in case of a PC partition.
13255 * util/i386/pc/grub-setup.c: Include `#include
13256 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13257 `<grub/machine/partition.h>'.
13258 (setup): Only access the PC specific partition information in case
13259 of a PC partition.
13260
0ef4ced9 132612004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 13262
0ef4ced9 13263 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
13264 (grub_longjmp): Likewise.
13265 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
13266 20.
13267 * normal/powerpc/setjmp.S: New file.
13268 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13269 `normal/powerpc/setjmp.S'.
13270 (grubof_CFLAGS): Add `-DGRUBOF'.
13271 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
13272 [GRUB_UTIL && !GRUBOF].
f19dbdb7 13273
19950e29 132742004-11-16 Marco Gerards <metgerards@student.han.nl>
13275
13276 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
13277 property named `name'. Correctly handle the error returned by
13278 `grub_ieee1275_finddevice' if a device can not be opened.
13279
a2fea427 132802004-11-02 Hollis Blanchard <hollis@penguinppc.org>
13281
13282 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
13283 `actual' for negativity.
13284 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13285 kern/fshelp.c.
13286
41ea0ea3 132872004-11-01 Marco Gerards <metgerards@student.han.nl>
13288
13289 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
13290 (PAGE_OFFSET): New macro.
13291 (CRTC_ADDR_PORT): Likewise.
13292 (CRTC_DATA_PORT): Likewise.
13293 (START_ADDR_HIGH_REGISTER): Likewise.
13294 (START_ADDR_LOW_REGISTER): Likewise.
13295 (GRAPHICS_ADDR_PORT): Likewise.
13296 (GRAPHICS_DATA_PORT): Likewise.
13297 (READ_MAP_REGISTER): Likewise.
13298 (INPUT_STATUS1_REGISTER): Likewise.
13299 (INPUT_STATUS1_VERTR_BIT): Likewise.
13300 (page): New variable.
13301 (wait_vretrace): New function.
13302 (set_read_map): Likewise.
13303 (set_start_address): Likewise.
13304 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
13305 the right page.
13306 (check_vga_mem): Take the page into account.
13307 (write_char): Likewise.
13308 (write_cursor): Likewise.
13309 (scroll_up): Likewise. Copy the page to the page that is not
13310 shown and switch between both pages.
13311 (grub_vga_putchar): Fix off by one error.
13312 (grub_vga_cls): Wait for the vertical retrace. Take the page into
13313 account.
13314
ad0bd20b 133152004-11-01 Marco Gerards <metgerards@student.han.nl>
13316
13317 Add support for iso9660 (including rockridge).
f19dbdb7 13318
ad0bd20b 13319 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13320 (iso9660_mod_SOURCES): New variable.
13321 (iso9660_mod_CFLAGS): Likewise.
13322 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13323 * include/grub/fs.h (grub_iso9660_init): New prototype.
13324 * util/grub-emu.c (main): Call `grub_iso9660_init'.
13325 * fs/iso9660.c: New file.
13326
13327 * include/grub/misc.h (grub_strncat): New prototype.
13328 * kern/misc.c (grub_strncat): New function.
f19dbdb7 13329
ad0bd20b 13330 * fs/hfs.c (grub_hfs_mount): Translate the error
13331 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
13332 * fs/jfs.c (grub_jfs_mount): Likewise.
13333 * fs/ufs.c (grub_ufs_mount): Likewise.
13334
a5477a59 133352004-10-28 Hollis Blanchard <hollis@penguinppc.org>
13336
13337 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
13338 which initialized BAT registers.
13339 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
13340 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13341 Move from here...
13342 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
13343 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13344 ... to here.
13345 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
13346 (grub_mapclaim): Likewise.
13347 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
13348 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
13349 hand.
13350
9304c1f8 133512004-10-19 Hollis Blanchard <hollis@penguinppc.org>
13352
13353 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
13354 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
13355 -ffreestanding and -msoft-float.
13356
86f4ae25 133572004-10-15 Hollis Blanchard <hollis@penguinppc.org>
13358
13359 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
13360 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
13361 set in grub_ieee1275_flags.
13362
38912228 133632004-10-14 Hollis Blanchard <hollis@penguinppc.org>
13364
13365 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
13366 prototype.
13367 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
13368 grub_console_init first.
13369 Change the memory range used for grub_ieee1275_claim and
13370 grub_mm_init_region.
13371 Print an error message if the claim fails.
13372 Include <grub/misc.h>.
13373
d1923dc8 133742004-10-13 Hollis Blanchard <hollis@penguinppc.org>
13375
13376 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
13377 Call grub_children_iterate for device nodes of type `scsi',
13378 `ide', or `ata'.
13379 (grub_ofdisk_open): Remove manual device alias resolution.
13380 Fix memory leak when device cannot be opened.
f19dbdb7 13381 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 13382 (grub_children_iterate): New prototype.
13383 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
13384 New function.
13385 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13386 Return -1 if args.size was -1.
13387
4512e4f3 133882004-10-11 Hollis Blanchard <hollis@penguinppc.org>
13389
13390 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
13391 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
13392 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
13393 Open Firmware's memory for it; claim memory from _start to _end.
13394 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
13395 (_end): New extern.
13396 (_start): Zero BSS from __bss_start to _end.
13397 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13398 New extern.
13399 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
13400
4d61feb0 134012004-10-11 Hollis Blanchard <hollis@penguinppc.org>
13402
ad0bd20b 13403 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
13404 -1 if args.base was -1.
4d61feb0 13405
026fa2f9 134062004-10-08 Hollis Blanchard <hollis@penguinppc.org>
13407
13408 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
13409 escape sequence instead of a literal ^L. Also call
13410 grub_ofconsole_gotoxy.
13411
9f2220ef 134122004-10-03 Hollis Blanchard <hollis@penguinppc.org>
13413
13414 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
13415 void * arguments to grub_addr_t. All callers updated. Also make
13416 the `result' argument optional.
13417 (grub_ieee1275_release): change void * arguments to grub_addr_t.
13418 All callers updated.
13419
8a572cd7 134202004-09-22 Hollis Blanchard <hollis@penguinppc.org>
13421
13422 * commands/ls.c (grub_ls_list_files): Use the string following the
13423 initial ')', if present, as the filesystem path.
13424 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
13425
13426 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
13427
18aa81f2 134282004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
13429
13430 Make the source code of the menu interface more readable.
f19dbdb7 13431
18aa81f2 13432 * normal/menu.c: Include grub/mm.h.
13433 (TERM_WIDTH): New macro.
13434 (TERM_HEIGHT): Likewise.
13435 (TERM_INFO_HEIGHT): Likewise.
13436 (TERM_MARGIN): Likewise.
13437 (TERM_SCROLL_WIDTH): Likewise.
13438 (TERM_TOP_BORDER_Y): Likewise.
13439 (TERM_LEFT_BORDER_X): Likewise.
13440 (TERM_BORDER_WIDTH): Likewise.
13441 (TERM_MESSAGE_HEIGHT): Likewise.
13442 (TERM_BORDER_HEIGHT): Likewise.
13443 (TERM_NUM_ENTRIES): Likewise.
13444 (TERM_FIRST_ENTRY_Y): Likewise.
13445 (TERM_ENTRY_WIDTH): Likewise.
13446 (TERM_CURSOR_X): Likewise.
13447 (draw_border): Use macros instead of magic numbers.
13448 (print_entry): Likewise.
13449 (print_entries): Likewise.
13450 (run_menu): Likewise. Also, handle the key 'e'.
13451 (run_menu_entry): Ignore empty command lines.
13452 (print_message): Added a new argument EDIT. If EDIT is true,
13453 print a different message.
13454 (init_page): Likewise.
13455 (edit_menu_entry): New function. Not implemented yet.
13456
b47efe30 134572004-09-17 Marco Gerards <metgerards@student.han.nl>
13458
13459 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
13460 can be loaded from normal mode.
f19dbdb7 13461
b47efe30 13462 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
13463 `multiboot.mod'.
13464 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
13465 (multiboot_mod_CFLAGS): New variables.
13466 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 13467 * loader/i386/pc/multiboot_normal.c: Likewise.
13468
b47efe30 13469 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
13470 attribute `unused'.
f19dbdb7 13471
b47efe30 13472 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
13473 `fdiro' to read the mode information from instead of `diro'.
13474
13475 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
13476 looking up a symlink.
13477
13478 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
13479 macro.
13480 * normal/command.c (grub_command_execute): Don't parse the
13481 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
13482 flags of the command.
13483
13484 * normal/menu.c (grub_menu_run): Fix typo.
13485
da75ac71 134862004-09-14 Hollis Blanchard <hollis@penguinppc.org>
13487
13488 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
13489
13490 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
13491 `y + 1' instead of `y - 1'.
13492
13493 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 13494
062b24c2 134952004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
13496
13497 From Hollis Blanchard <hollis@penguinppc.org>:
13498 * kern/misc.c (memmove): New alias for grub_memmove.
13499 (memcmp): New alias for grub_memcmp.
13500 (memset): New alias for grub_memset.
f19dbdb7 13501 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 13502 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 13503 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 13504 (grub_ieee1275_get_property): Likewise.
f19dbdb7 13505
8ddad845 135062004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
13507
13508 Added normal mode command `chainloader' as module chain.mod, which
13509 depends on normal.mod and _chain.mod.
f19dbdb7 13510
8ddad845 13511 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
13512 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
13513 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
13514 Deleted prototype.
13515 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
13516 but arguments parsing moved to ...
13517 (grub_chainloader_cmd): ... here. New function.
13518 * include/grub/i386/pc/chainloader.h: New file.
13519 * loader/i386/pc/chainloader_normal.c: Likewise.
13520
2c1f4ce3 135212004-09-11 Marco Gerards <metgerards@student.han.nl>
13522
13523 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
13524 (grub_mkimage_LDFLAGS): Likewise.
13525 (grub_emu_SOURCES): Likewise.
13526 (kernel_img_HEADERS): Added fshelp.h.
13527 * fs/ext2.c: Include <grub/fshelp.h>.
13528 (FILETYPE_REG): New macro.
13529 (FILETYPE_INO_REG): Likewise.
13530 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
13531 Changed all users.
13532 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
13533 all users.
13534 (grub_fshelp_node): New struct.
13535 (grub_ext2_data): Added member `diropen'. Changed member `inode'
13536 to a pointer.
13537 (grub_ext2_get_file_block): Removed function.
13538 (grub_ext2_read_block): New function.
13539 (grub_ext2_read_file): Replaced parameter `data' by `node'.
13540 This function was written.
13541 (grub_ext2_mount): Read the root inode. Create a diropen struct.
13542 (grub_ext2_find_file): Removed function.
13543 (grub_ext2_read_symlink): New function.
13544 (grub_ext2_iterate_dir): Likewise.
13545 (grub_ext2_open): Rewritten.
13546 (grub_ext2_dir): Rewritten.
13547 * include/grub/fshelp.h: New file.
13548 * fs/fshelp.c: Likewise.
13549
3c52136a 135502004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
13551
13552 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
13553 (print_message): Add a missing newline.
13554 (run_menu): Added timeout support.
13555 (run_menu_entry): New local function.
13556 (grub_menu_run): Added support for booting.
13557
13558 * kern/loader.c (grub_loader_is_loaded): New function.
13559
13560 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
13561 (grub_get_rtc): Exported.
13562
13563 * include/grub/i386/pc/time.h: Include grub/symbol.h.
13564 (grub_get_rtc): Exported.
13565
13566 * include/grub/normal.h (struct grub_command_list): Remove
13567 constant from the member `command'.
13568
13569 * include/grub/loader.h (grub_loader_is_loaded): Declared.
13570
13571 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
13572
13573 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
13574
aa033560 135752004-08-28 Marco Gerards <metgerards@student.han.nl>
13576
13577 Add support for the JFS filesystem.
13578
13579 * fs/jfs.c: New file.
13580 * include/grub/fs.h (grub_jfs_init): New prototype.
13581 (grub_jfs_fini): New prototype.
13582 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
13583 (grub_emu_SOURCES): Likewise.
13584 (pkgdata_MODULES): Add jfs.mod.
13585 (jfs_mod_SOURCES): New variable.
13586 (jfs_mod_CFLAGS): Likewise.
13587 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
13588 (grubof_SOURCES): Likewise.
13589 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
13590
13591 * fs/fat.c (grub_fat_find_dir): Convert the filename little
13592 endian to the host endian.
13593 (grub_fat_utf16_to_utf8): Move function from there...
13594 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 13595 the endianness of the source string anymore.
aa033560 13596 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
13597
94bc45af 135982004-08-24 Marco Gerards <metgerards@student.han.nl>
13599
13600 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
13601 (grub_boot_fini) [GRUB_UTIL]: Likewise.
13602 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
13603 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 13604
94bc45af 13605 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
13606 (grub_hfs_iterate_dir): Make the function static. Add prototypes
13607 for `node_found' and `it_dir'.
13608 (grub_hfs_dir): Add prototype for `dir_hook'.
13609
13610 * fs/minix.c (grub_minix_get_file_block): Add prototype for
13611 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
13612 and `indir32' to silence a gcc warning.
13613
13614 * include/grub/fs.h (grub_hfs_init): New prototype.
13615 (grub_hfs_fini): Likewise.
f19dbdb7 13616
13617
97543f08 136182004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13619
13620 Each disk device has its own id now. This is useful to make use
13621 of multiple disk devices.
f19dbdb7 13622
97543f08 13623 * include/grub/disk.h (grub_disk_dev_id): New enum.
13624 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
13625 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
13626
13627 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
13628 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13629
13630 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
13631 GRUB_DISK_DEVICE_OFDISK_ID as an id.
13632
13633 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
13634 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13635
13636 * include/grub/disk.h (struct grub_disk_dev): Added a new member
13637 "id" which is used by the cache manager.
13638
13639 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
13640 of just "GRUB".
13641
64372eb4 136422004-08-18 Marco Gerards <metgerards@student.han.nl>
13643
13644 * fs/hfs.c: New file.
13645 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
13646 (grub_emu_SOURCES): Likewise.
13647 (pkgdata_MODULES): Add hfs.mod.
13648 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
13649 (grubof_SOURCES): Likewise.
13650 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
13651
13652 * include/grub/misc.h (grub_strncasecmp): Add prototype.
13653 * kern/misc.c (grub_strncasecmp): Add function.
13654
cc61b58f 136552004-08-14 Marco Gerards <metgerards@student.han.nl>
13656
13657 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
13658 with parentheses.
13659
13660 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
13661 (grub_ext2_dir): In case the directory entry type is unknown, read
13662 it from the inode.
13663
0ef123f6 136642004-08-02 Peter Bruin <pjbruin@dds.nl>
13665
13666 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
13667 grub_load_linux instead of grub_rescue_cmd_linux as second
13668 argument of grub_rescue_register_command.
13669
13670 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
13671
a447c5df 136722004-07-27 Marco Gerards <metgerards@student.han.nl>
13673
13674 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
13675 function.
13676 * commands/boot.c: Remove the check for `GRUB_UTIL'.
13677 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13678 `loader/powerpc/ieee1275/linux.c',
13679 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
13680 * include/grub/powerpc/ieee1275/ieee1275.h
13681 (grub_ieee1275_release): New prototype.
13682 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
13683 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
13684 normal, boot, linux and linux_normal.
13685 * loader/powerpc/ieee1275/linux.c: New file.
13686 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13687
5a9e3546 136882004-07-12 Marco Gerards <metgerards@student.han.nl>
13689
13690 * normal/arg.c (grub_arg_parse): Correct error handling after
13691 reallocating the argumentlist (check if `argl' is not null instead
13692 of checking if `args' is not null).
13693 * kern/mm.c (grub_realloc): Return the same pointer when using the
13694 same region, instead of returning the header address.
13695
e15199cb 136962004-07-11 Marco Gerards <metgerards@student.han.nl>
13697
13698 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
13699 one block instead of two when looking for the initial partition.
13700 (grub_partition_probe): Initialize the local variable `p' with 0.
13701 Use base 10 for the grub_strtoul call.
13702 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
13703 need for one local variable.
13704 (grub_strtoul): Don't add the new value to `num', instead of that
13705 just assign it.
13706
020616c2 137072004-07-11 Marco Gerards <metgerards@student.han.nl>
13708
13709 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
13710 (pxeboot_img_SOURCES): New variable.
13711 (pxeboot_img_ASFLAGS): Likewise.
13712 (pxeboot_img_LDFLAGS): Likewise.
13713 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
13714 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
13715 <lode_leroy@hotmail.com>.
13716
6c51eb64 137172004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13718
13719 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
13720 there was no input.
13721
cfb12aff 137222004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13723
13724 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
13725 the history buffer logic.
13726
6eabba74 137272004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13728
13729 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
13730 (FILETYPE_INO_SYMLINK): New macros.
13731 (grub_ext2_find_file): Check if the node is a directory using the
13732 inode stat information instead of using the filetype in the
13733 dirent. Exclude the first character of an absolute symlink.
13734 (grub_ext2_dir): Mask out the filetype part of the mode member of
13735 the inode.
13736
66e19ef8 137372004-05-24 Marco Gerards <metgerards@student.han.nl>
13738
13739 Add support for UFS version 1 and 2. Add support for the minix
13740 filesystem version 1 and 2, both the variants with 14 and 30 long
13741 filenames.
f19dbdb7 13742
66e19ef8 13743 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
13744 fs/minix.c.
13745 (grub_emu_SOURCES): Likewise.
13746 (pkgdata_MODULES): Add ufs.mod and minix.mod.
13747 (ufs_mod_SOURCES): New variable.
13748 (ufs_mod_CFLAGS): Likewise.
13749 (minix_mod_SOURCES): Likewise.
13750 (minix_mod_CFLAGS): Likewise.
13751 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
13752 fs/minix.c.
13753 (grubof_SOURCES): Likewise.
13754 * fs/ufs.c: New file.
13755 * fs/minix.c: New file.
13756 * include/grub/fs.h (grub_ufs_init): New prototype.
13757 (grub_ufs_fini): Likewise.
13758 (grub_minix_init): Likewise.
13759 (grub_minix_fini): Likewise.
13760 * util/grub-emu.c (main): Initialize and deinitialize UFS and
13761 minix fs.
13762
cc2e748a 137632004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
13764
13765 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
13766 commands/ls.c, commands/terminal.c, commands/boot.c,
13767 commands/cmp.c and commands/cat.c.
13768 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
13769
13770 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
13771 "env.h"
13772
4b13b216 137732004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13774
13775 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
13776 and grub_, respectively. Because the conversion is trivial and
13777 mechanical, I omit the details here. Please refer to the CVS
13778 if you need more information.
13779
6a142551 137802004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13781
13782 * include/pupa: Renamed to ...
13783 * include/grub: ... this.
13784 * util/i386/pc/pupa-mkimage.c: Renamed to ...
13785 * util/i386/pc/grub-mkimage.c: ... this.
13786 * util/i386/pc/pupa-setup.c: Renamed to ...
13787 * util/i386/pc/grub-setup.c: ... this.
13788 * util/pupa-emu.c: Renamed to ...
13789 * util/grub-emu.c: ... this.
13790
e56cdf21 137912004-03-29 Marco Gerards <metgerards@student.han.nl>
13792
13793 Add support for the newworld apple macintosh (PPC). This has been
13794 tested on the powerbook 2000 only. It only adds support for
13795 generic ieee1275 functions, console and disk support. This should
13796 be easy to port to other architectures with support for Open
13797 Firmware.
f19dbdb7 13798
e56cdf21 13799 * configure.ac: Accept the powerpc as host_cpu. In the case of
13800 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
13801 specific tests are only executed while building for the i386.
13802 Inverse test for crosscompile.
13803 * genmk.rb (Utility): Allow assembler files.
13804 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
13805 * conf/powerpc-ieee1275.rmk: New file.
13806 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
13807 * disk/powerpc/ieee1275/partition.c: Likewise.
13808 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
13809 * include/pupa/powerpc/ieee1275/console.h: Likewise.
13810 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
13811 * include/pupa/powerpc/ieee1275/time.h: Likewise.
13812 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
13813 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
13814 * include/pupa/powerpc/ieee1275/loader.h
13815 * include/pupa/powerpc/setjmp.h: Likewise.
13816 * include/pupa/powerpc/types.h: Likewise.
13817 * kern/powerpc/ieee1275/init.c: Likewise.
13818 * kern/powerpc/ieee1275/openfw.c: Likewise.
13819 * term/powerpc/ieee1275/ofconsole.c: Likewise.
13820
13821 These files were written by Johan Rydberg
13822 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 13823
e56cdf21 13824 * boot/powerpc/ieee1275/cmain.c: New file.
13825 * boot/powerpc/ieee1275/crt0.S: Likewise.
13826 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
13827 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
13828
8c8cc205 138292004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
13830
13831 * Makefile.in: Update copyright.
13832 * genmodsrc.sh: Likewise.
13833 * gensymlist.sh: Likewise.
13834 * term/i386/pc/vga.c: Indent correctly.
13835
13836 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
13837 bugreporting address.
13838 * util/i386/pc/pupa-setup.c (usage): Likewise,
13839 (main): Call pupa_ext2_init and pupa_ext2_fini.
13840
f19dbdb7 13841 * fs/fat.c (log2): Renamed to ...
8c8cc205 13842 (fat_log2): ... this.
13843 All callers changed.
13844 * kern/misc.c (memcpy): Alias to pupa_memmove.
13845 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
13846 lvalue cast.
13847 * util/console.c (pupa_ncurses_fini): Return 0.
13848
13849 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
13850 Move fail label here.
13851 [__GNU__]: Don't warn when using stat.
13852 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
13853 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
13854 long int. Use strtol instead of strtoul.
f19dbdb7 13855
db1771cf 138562004-03-14 Marco Gerards <metgerards@student.han.nl>
13857
13858 * commands/boot.c: New file.
13859 * commands/cat.c: Likewise.
13860 * commands/cmp.c: Likewise.
13861 * commands/ls.c: Likewise.
13862 * commands/terminal.c: Likewise.
13863 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13864 (pupa_register_command): Changed interface to match the new
13865 argument parser.
13866 (pupa_command_execute): Changed (almost rewritten) so it uses
13867 pupa_split_command. Added support for setting variables using the
13868 syntax `foo=bar'.
13869 (rescue_command): Changed to work with the new argument parser.
13870 (terminal_command): Moved from here to commands/terminal.c.
13871 (set_command): New function.
13872 (unset_command): New function.
13873 (insmod_command): New function.
13874 (rmmod_command): New function.
13875 (lsmod_command): New function.
13876 (pupa_command_init): Don't initialize the command terminal
13877 anymore. Initialize the commands set, unset, insmod, rmmod and
13878 lsmod.
13879 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13880 (kernel_img_HEADERS): Add arg.h and env.h.
13881 (pupa_mkimage_LDFLAGS): Add kern/env.c.
13882 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13883 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13884 normal/arg.c.
13885 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13886 terminal.mod.
13887 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13888 (boot_mod_SOURCES): New variable.
13889 (terminal_mod_SOURCES): Likewise.
13890 (ls_mod_SOURCES): Likewise.
13891 (cmp_mod_SOURCES): Likewise.
13892 (cat_mod_SOURCES): Likewise.
13893
13894 * normal/arg.c: New file.
13895 * kern/env.c: Likewise.
13896 * include/pupa/arg.h: Likewise.
13897 * include/pupa/env.h: Likewise.
13898 * font/manager.c (font_command): Changed to match argument parsing
13899 interface changes.
13900 (PUPA_MOD_INIT): Likewise.
13901 * hello/hello.c (pupa_cmd_hello): Likewise.
13902 (PUPA_MOD_INIT): Likewise.
13903 * include/pupa/disk.h: Include <pupa/device.h>.
13904 (pupa_print_partinfo): New prototype.
13905 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13906 (pupa_dl_get_prefix): Likewise.
13907 * include/pupa/misc.h: Include <pupa/err.h>.
13908 (pupa_isgraph): New prototype.
13909 (pupa_isdigit): Likewise.
13910 (pupa_split_cmdline): Likewise.
13911 * include/pupa/normal.h: Include <pupa/arg.h>.
13912 (pupa_command): Changed the prototype of the member `func' to
13913 match the argument parsing interface. Added member `options'.
13914 (pupa_register_command): Updated to match function.
13915 (pupa_arg_parse): New prototype.
13916 (pupa_hello_init) [PUPA_UTIL]: New prototype.
13917 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13918 (pupa_ls_init) [PUPA_UTIL]: Likewise.
13919 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13920 (pupa_cat_init) [PUPA_UTIL]: Likewise.
13921 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13922 (pupa_boot_init) [PUPA_UTIL]: Likewise.
13923 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13924 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13925 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13926 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13927 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13928 * kern/disk.c: Include <pupa/file.h>.
13929 (pupa_print_partinfo): New function.
13930 * kern/dl.c: Include <pupa/env.h>.
13931 (pupa_dl_dir): Variable removed.
13932 (pupa_dl_load): Use the environment variable `prefix' instead of
13933 the variable pupa_dl_dir.
13934 (pupa_dl_set_prefix): Function removed.
13935 (pupa_dl_get_prefix): Likewise.
13936 * kern/i386/pc/init.c: Include <pupa/env.h>.
13937 (pupa_machine_init): Use the environment variable `prefix' instead of
13938 using pupa_dl_set_prefix to set the prefix.
13939 * kern/main.c: Include <pupa/env.h>.
13940 (pupa_set_root_dev): Use the environment variable `prefix' instead of
13941 using pupa_dl_get_prefix to get the prefix.
13942 * kern/misc.c: Include <pupa/env.h>.
13943 (pupa_isdigit): New function.
13944 (pupa_isgraph): Likewise.
13945 (pupa_ftoa): Likewise.
13946 (pupa_vsprintf): Added support for printing values of the type
13947 `double'. Make it possible to format variable output when using
13948 formatting like `%1.2%f'.
13949 (pupa_split_cmdline): New function.
13950 * kern/rescue.c: Include <pupa/env.h>.
13951 (next_word): Removed function.
13952 (pupa_rescue_cmd_prefix): Likewise.
13953 (pupa_rescue_cmd_set): New function.
13954 (pupa_rescue_cmd_unset): New function.
13955 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13956 split the command line instead of splitting it here. Added
13957 support for setting variables using the syntax `foo=bar'. Don't
13958 initialize the prefix command anymore. Initialized the set and
13959 unset commands.
13960 * normal/cmdline.c: Include <pupa/env.h>.
13961 (pupa_tab_complete): Added prototypes for print_simple_completion,
13962 print_partition_completion, add_completion, iterate_commands,
13963 iterate_dev, iterate_part and iterate_dir. Moved code to print
13964 partition information from here to kern/disk.c.
fe6b695a 13965 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 13966 * normal/main.c: Include <pupa/env.h>.
13967 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13968 instead of using pupa_dl_get_prefix to get the prefix.
13969 * term/i386/pc/vga.c: Include <pupa/arg.h>.
13970 (check_vga_mem): Cast pointers to `void *' to silence a gcc
13971 warning.
13972 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13973 (pupa_vga_setcolor): Declare unused variables with `__attribute__
13974 ((unused))' to silence a gcc warning.
13975 (pupa_vga_setcolor): Likewise.
13976 (debug_command): Changed to match argument parsing
13977 interface changes.
13978 * util/pupa-emu.c: Include <pupa/env.h>.
13979 (options): Added 0's for unused fields to silence a gcc warning.
13980 (argp): Likewise.
13981 (main): Use the environment variable `prefix' instead of using
13982 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
13983 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
13984 and terminal.
13985
13986 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13987 * util/misc.c: Include <malloc.h>.
13988 (pupa_malloc): Rewritten so errors are correctly reported.
13989 (pupa_realloc): Likewise.
13990 (pupa_memalign): Likewise.
13991 (pupa_mm_init_region): Declare unused variables with
13992 `__attribute__ ((unused))' to silence a gcc warning.
13993 * normal/i386/setjmp.S: Remove tab at the end of the file to
13994 silence a gcc warning.
13995 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13996 variables with `__attribute__ ((unused))' to silence a gcc
13997 warning.
13998 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13999 local variable i unsigned to silence a gcc warning.
14000
14001 * kern/term.c: Include <pupa/misc.h>.
14002 (pupa_more_lines): New variable.
14003 (pupa_more): Likewise.
14004 (pupa_putcode): When the pager is active pause at the end of every
14005 screen.
14006 (pupa_set_more): New function.
14007 * include/pupa/term.h (pupa_set_more): New prototype.
14008
14009
3b1139cb 140102004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
14011
14012 Now this project is GRUB 2 rather than PUPA. The location of
14013 the CVS repository was moved to GRUB's.
f19dbdb7 14014
3b1139cb 14015 * configure.ac: Use bug-grub as the reporting address.
14016 Use GRUB instead of PUPA.
14017 Change the version number to 1.90.
14018
8367695c 140192004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
14020
14021 * genkernsyms.sh: Updated copyright information.
14022 * genmk.rb: Likewise.
14023 * genmodsrc.sh: Likewise.
14024 * gensymlist.sh: Likewise.
14025 * boot/i386/pc/boot.S: Likewise.
14026 * boot/i386/pc/diskboot.S: Likewise.
14027 * disk/i386/pc/biosdisk.c: Likewise.
14028 * disk/i386/pc/partition.c: Likewise.
14029 * font/manager.c: Likewise.
14030 * fs/ext2.c: Likewise.
14031 * fs/fat.c: Likewise.
14032 * include/pupa/boot.h: Likewise.
14033 * include/pupa/device.h: Likewise.
14034 * include/pupa/disk.h: Likewise.
14035 * include/pupa/dl.h: Likewise.
14036 * include/pupa/elf.h: Likewise.
14037 * include/pupa/err.h: Likewise.
14038 * include/pupa/file.h: Likewise.
14039 * include/pupa/font.h: Likewise.
14040 * include/pupa/fs.h: Likewise.
14041 * include/pupa/kernel.h: Likewise.
14042 * include/pupa/loader.h: Likewise.
14043 * include/pupa/misc.h: Likewise.
14044 * include/pupa/mm.h: Likewise.
14045 * include/pupa/net.h: Likewise.
14046 * include/pupa/normal.h: Likewise.
14047 * include/pupa/rescue.h: Likewise.
14048 * include/pupa/setjmp.h: Likewise.
14049 * include/pupa/symbol.h: Likewise.
14050 * include/pupa/term.h: Likewise.
14051 * include/pupa/types.h: Likewise.
14052 * include/pupa/i386/setjmp.h: Likewise.
14053 * include/pupa/i386/types.h: Likewise.
14054 * include/pupa/i386/pc/biosdisk.h: Likewise.
14055 * include/pupa/i386/pc/boot.h: Likewise.
14056 * include/pupa/i386/pc/console.h: Likewise.
14057 * include/pupa/i386/pc/init.h: Likewise.
14058 * include/pupa/i386/pc/kernel.h: Likewise.
14059 * include/pupa/i386/pc/linux.h: Likewise.
14060 * include/pupa/i386/pc/loader.h: Likewise.
14061 * include/pupa/i386/pc/memory.h: Likewise.
14062 * include/pupa/i386/pc/multiboot.h: Likewise.
14063 * include/pupa/i386/pc/partition.h: Likewise.
14064 * include/pupa/i386/pc/time.h: Likewise.
14065 * include/pupa/i386/pc/vga.h: Likewise.
14066 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
14067 * include/pupa/util/getroot.h: Likewise.
14068 * include/pupa/util/misc.h: Likewise.
14069 * include/pupa/util/resolve.h: Likewise.
14070 * kern/device.c: Likewise.
14071 * kern/disk.c: Likewise.
14072 * kern/dl.c: Likewise.
14073 * kern/err.c: Likewise.
14074 * kern/file.c: Likewise.
14075 * kern/fs.c: Likewise.
14076 * kern/loader.c: Likewise.
14077 * kern/main.c: Likewise.
14078 * kern/misc.c: Likewise.
14079 * kern/mm.c: Likewise.
14080 * kern/rescue.c: Likewise.
14081 * kern/term.c: Likewise.
14082 * kern/i386/dl.c: Likewise.
14083 * kern/i386/pc/init.c: Likewise.
14084 * kern/i386/pc/lzo1x.S: Likewise.
14085 * kern/i386/pc/startup.S: Likewise.
14086 * loader/i386/pc/chainloader.c: Likewise.
14087 * loader/i386/pc/linux.c: Likewise.
14088 * loader/i386/pc/multiboot.c: Likewise.
14089 * normal/cmdline.c: Likewise.
14090 * normal/command.c: Likewise.
14091 * normal/main.c: Likewise.
14092 * normal/menu.c: Likewise.
14093 * normal/i386/setjmp.S: Likewise.
14094 * term/i386/pc/console.c: Likewise.
14095 * term/i386/pc/vga.c: Likewise.
14096 * util/console.c: Likewise.
14097 * util/genmoddep.c: Likewise.
14098 * util/misc.c: Likewise.
14099 * util/pupa-emu.c: Likewise.
14100 * util/resolve.c: Likewise.
14101 * util/unifont2pff.rb: Likewise.
14102 * util/i386/pc/biosdisk.c: Likewise.
14103 * util/i386/pc/getroot.c: Likewise.
14104 * util/i386/pc/pupa-mkimage.c: Likewise.
14105 * util/i386/pc/pupa-setup.c: Likewise.
14106
e6eced71 141072004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
14108
14109 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
14110 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
14111 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
14112 reading and reset it after reading.
14113 (pupa_ext2_close): Return PUPA_ERR_NONE.
14114
14115 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
14116 Correct value.
14117 (struct linux_kernel_header): Add kernel_version and
14118 initrd_addr_max.
14119 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
14120 pupa_file_read succeeds.
14121 (pupa_rescue_cmd_initrd): Implement.
14122
5aded270 141232003-12-03 Marco Gerards <metgerards@student.han.nl>
14124
14125 * fs/ext2.c (pupa_ext2_label): New function.
14126 (pupa_ext2_fs): Added label.
14127 * fs/fat.c (pupa_fat_label): New function.
14128 (pupa_fat_fs): Added label.
14129 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
14130
14131 * kern/misc.c (pupa_strndup): New function.
14132 * include/pupa/misc.h (pupa_strndup): New prototype.
14133
14134 * include/pupa/normal.h: Include <pupa/err.h>.
14135 (pupa_set_history): New prototype.
14136 (pupa_iterate_commands): New prototype.
14137 * normal/cmdline.c: Include <pupa/machine/partition.h>,
14138 <pupa/disk.h>, <pupa/file.h>.
14139 (hist_size): New variable.
14140 (hist_lines): Likewise.
14141 (hist_end): Likewise.
14142 (hist_used): Likewise.
14143 (pupa_set_history): New function.
14144 (pupa_history_get): Likewise.
14145 (pupa_history_add): Likewise.
14146 (pupa_history_replace): Likewise.
14147 (pupa_tab_complete): Likewise.
14148 (pupa_cmdline_run): Added tab completion and history buffer. Tab
14149 completion shows partitionnames while completing partitions, this
14150 feature was suggested by Jeff Bailey.
14151 * normal/command.c (pupa_iterate_commands): New function.
14152 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
14153 (pupa_normal_init): Initialize history buffer.
14154 (PUPA_MOD_INIT): Likewise.
14155 (pupa_normal_fini): Free the history buffer.
14156 (PUPA_MOD_FINI): Likewise.
14157
14158 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
14159 key.
14160
14161 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
14162 * configure.ac [i386]: Check for regparam bug.
14163 (NESTED_FUNC_ATTR) [! i386]: Defined.
14164
1f7315a3 141652003-11-17 Marco Gerards <metgerards@student.han.nl>
14166
14167 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
14168 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
14169 (pupa_emu_SOURCES): New variable.
14170 (pupa_emu_LDFLAGS): Likewise.
14171 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
14172 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
14173 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
14174 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14175 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
14176 (pupa_jmp_buf): New typedef.
14177 (pupa_setjmp) [PUPA_UTIL]: New macro.
14178 (pupa_longjmp) [PUPA_UTIL]: Likewise.
14179 * include/pupa/term.h (struct pupa_term): New member `refresh'.
14180 (pupa_refresh): New prototype.
14181 * include/pupa/util/getroot.h: New file.
14182 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
14183 it.
14184 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
14185 (pupa_rescue_cmd_cat): Likewise.
14186 (pupa_rescue_cmd_ls): Likewise.
14187 (pupa_rescue_cmd_testload): Likewise.
14188 (pupa_rescue_cmd_lsmod): Likewise.
14189 * normal/cmdline.c (pupa_cmdline_get): Likewise.
14190 * normal/menu.c (run_menu): Likewise.
14191 * kern/term.c (pupa_cls): Likewise.
14192 (pupa_refresh): New function.
14193 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
14194 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14195 * util/console.c: New file.
f19dbdb7 14196
1f7315a3 14197 * util/i386/pc/getroot.c: New file.
14198 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
14199 (pupa_putchar): New function.
14200 (pupa_refresh): Likewise.
14201 (xgetcwd): Function moved to ...
14202 (strip_extra_slashes): Likewise.
14203 (get_prefix): Likewise.
f19dbdb7 14204 * util/i386/pc/getroot.c: ... here.
1f7315a3 14205 (find_root_device): Function moved and renamed to...
14206 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
14207 Changed all callers.
14208 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
14209 and renamed to...
14210 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
14211 Changed all callers.
14212 * util/misc.c (pupa_memalign): New function.
14213 (pupa_mm_init_region): Likewise.
14214 (pupa_register_exported_symbols): Likewise.
14215 (pupa_putchar): Function removed.
14216 * util/pupa-emu.c: New file.
14217
9a5c1ade 142182003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
14219
14220 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
14221 (_multiboot_mod_SOURCES): New variable.
14222 (_multiboot_mod_CFLAGS): Likewise.
14223 * loader/i386/pc/multiboot.c: New file.
14224 * include/pupa/i386/pc/multiboot.h: Likewise.
14225 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
14226 (pupa_multiboot_real_boot): New function.
14227 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
14228 (pupa_multiboot_real_boot): New prototype.
14229 (pupa_rescue_cmd_multiboot): Likewise
14230 (pupa_rescue_cmd_module): Likewise.
14231
14232 * kern/loader.c (pupa_loader_set): Continue when
14233 pupa_loader_unload_func() fails.
14234 (pupa_loader_unset): New function.
14235 * include/pupa/loader.h (pupa_loader_unset): New prototype.
14236
14237 * kern/misc.c (pupa_stpcpy): New function.
14238 * include/pupa/misc.h (pupa_stpcpy): New prototype.
14239
8e72a9c0 142402003-11-12 Marco Gerards <metgerards@student.han.nl>
14241
14242 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
14243 for available extensions.
14244
14245 * include/pupa/i386/pc/time.h: New file.
14246 * kern/disk.c: Include <pupa/machine/time.h>.
14247 (PUPA_CACHE_TIMEOUT): New macro.
14248 (pupa_last_time): New variable.
14249 (pupa_disk_open): Flush the cache when there was a timeout.
14250 (pupa_disk_close): Reset the timer.
14251 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
14252 pupa_currticks.
14253 * util/misc.c: Include <sys/times.h>
14254 (pupa_get_rtc): New function.
14255
c4adbd32 142562003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
14257
14258 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
14259 as blocks.
14260 (pupa_ext2_get_file_block): Use blocks member.
14261
14262 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
14263 first block. Return -1 instead of pupa_errno on error.
14264
bfd30f06 142652003-10-27 Marco Gerards <metgerards@student.han.nl>
14266
14267 * README: In the pupa-mkimage example use _chain instead of chain
14268 and ext2 instead of fat.
14269 * TODO: Replace ext2fs with jfs as an example. Add an item for
14270 adding journal playback for ext2fs.
14271 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
14272 (pkgdata_MODULES): Added ext2.mod.
14273 (ext2_mod_SOURCES): New variable.
14274 (ext2_mod_CFLAGS): Likewise.
14275 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
14276 * include/pupa/misc.h (pupa_strncpy): New prototype.
14277 (pupa_strcat): Likewise.
14278 (pupa_strncmp): Likewise.
14279 * kern/misc.c (pupa_strcat): Enable function.
14280 (pupa_strncpy): New function.
14281 (pupa_strncmp): Likewise.
14282 * fs/ext2.c: New file.
f19dbdb7 14283
bfd30f06 14284 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
14285 when the read failed before retrying.
14286 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
14287 (_FILE_OFFSET_BITS): Likewise.
14288 * configure.ac: Added AC_SYS_LARGEFILE.
14289
98d15063 142902003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14291
14292 * genmk.rb (PModule#rule): Make sure to get only symbol names
14293 from the output of nm.
14294 Reported by Robert Millan <zeratul2@wanadoo.es>.
14295
18d9c7cd 142962003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14297
14298 I forgot to check in these changes for a long time. This adds
14299 incomplete support for VGA console, and this is still very
14300 buggy. Also, a lot of consideration is required for I18N,
14301 UNICODE, and VGA font issues. Therefore, assume that this is
14302 such that "better than nothing".
f19dbdb7 14303
18d9c7cd 14304 * font/manager.c: New file.
14305 * include/pupa/font.h: Likewise.
14306 * include/pupa/i386/pc/vga.h: Likewise.
14307 * term/i386/pc/vga.c: Likewise.
14308 * util/unifont2pff.rb: Likewise.
14309
14310 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
14311 (pkgdata_MODULES): Added vga.mod and font.mod.
14312 (vga_mod_SOURCES): New variables.
14313 (vga_mod_CFLAGS): Likewise.
14314 (font_mod_SOURCES): Likewise.
14315 (font_mod_CFLAGS): Likewise.
14316
14317 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
14318
14319 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 14320 (struct pupa_term): Added init and fini.
18d9c7cd 14321 Changed the argument of putchar to pupa_uint32_t.
14322
14323 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
14324 (pupa_console_real_putchar): New prototype.
14325 (pupa_console_putchar): Removed.
14326 (pupa_console_checkkey): Exported.
14327 (pupa_console_getkey): Likewise.
14328
14329 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
14330 characters.
14331
14332 * kern/term.c (pupa_term_set_current): Rewritten.
14333 (pupa_putchar): Likewise.
14334 (pupa_putcode): New function.
14335
14336 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
14337 (pupa_console_real_putchar): ... this.
14338 (pupa_vga_set_mode): New function.
14339 (pupa_vga_get_font): Likewise.
14340
14341 * normal/command.c: Include pupa/term.h.
14342 (terminal_command): New function.
14343 (pupa_command_init): Register the command "terminal".
14344
14345 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
14346 (DISP_UP): Likewise.
14347 (DISP_RIGHT): Likewise.
14348 (DISP_DOWN): Likewise.
14349 (DISP_HLINE): Likewise.
14350 (DISP_VLINE): Likewise.
14351 (DISP_UL): Likewise.
14352 (DISP_UR): Likewise.
14353 (DISP_LL): Likewise.
14354 (DISP_LR): Likewise.
14355
14356 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 14357
977329f5 143582003-02-08 NIIBE Yutaka <gniibe@m17n.org>
14359
14360 * util/resolve.c (pupa_util_resolve_dependencies): BUG
14361 FIX. Reverse the path_list.
14362
14363 * include/pupa/normal.h: Export pupa_register_command and
14364 pupa_unregister_command.
14365
14366 * hello/hello.c (pupa_cmd_hello): New module.
14367 * conf/i386-pc.rmk: Added hello.mod.
14368
1f5ab428 143692003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
14370
14371 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 14372
1f5ab428 14373 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
14374 (compress_kernel): New variable.
14375 (generate_image): Heavily modified to support compressing a
14376 large part of the core image.
14377
14378 * util/misc.c (pupa_util_read_image): Fix a file descriptor
14379 leak.
14380 (pupa_util_load_image): New function.
14381
14382 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
14383 (pupa_compressed_size): New variable.
14384 (codestart): Enable Gate A20 here.
14385 Decompress the compressed part of the core image.
14386 Rearrange the code to put functions and variables which are
14387 required for initialization in the non-compressed part.
14388 Include lzo1x.S.
14389
14390 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
14391 here.
14392
14393 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
14394
f19dbdb7 14395 * include/pupa/i386/pc/kernel.h
1f5ab428 14396 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
14397 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
14398 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14399 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14400 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
14401
14402 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
14403
14404 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
14405 (Utility#rule): Likewise.
14406
14407 * configure.ac: Check if LZO is available.
14408
ce5bf700 144092003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
14410
14411 * include/pupa/normal.h: New file.
14412 * include/pupa/setjmp.h: Likewise.
14413 * include/pupa/i386/setjmp.h: Likewise.
14414 * normal/cmdline.c: Likewise.
14415 * normal/command.c: Likewise.
14416 * normal/main.c: Likewise.
14417 * normal/menu.c: Likewise.
14418 * normal/i386/setjmp.S: Likewise.
f19dbdb7 14419
ce5bf700 14420 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
14421 (pupa_rescue_cmd_initrd): Likewise.
14422
14423 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
14424 Likewise.
14425
14426 * kern/i386/pc/startup.S (translation_table): New variable.
14427 (translate_keycode): New function.
14428 (pupa_console_getkey): Call translate_keycode.
14429
14430 * kern/rescue.c (attempt_normal_mode): New function.
14431 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
14432 it failed, print a message.
14433
14434 * kern/mm.c (pupa_real_malloc): Print more information when a
14435 free magic is broken.
14436 (pupa_free): If the first free header is not free actually, set
14437 it to P.
14438
14439 * kern/main.c (pupa_load_normal_mode): Just load the module
14440 "normal".
14441 (pupa_main): Don't print the message
14442 "Entering into rescue mode..." here.
14443
14444 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
14445 Declared.
14446 (pupa_rescue_cmd_initrd): Likewise.
14447 (pupa_rescue_cmd_initrd): Likewise.
14448
14449 * include/pupa/symbol.h (FUNCTION): Specify the type.
14450 (VARIABLE): Likewise.
14451
14452 * include/pupa/err.h (pupa_err_t): Added
14453 PUPA_ERR_UNKNOWN_COMMAND.
14454
14455 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
14456 (pupa_dl_get_prefix): Likewise.
14457
14458 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
14459 Added _chain.mod and _linux.mod instead of chain.mod and
14460 linux.mod.
14461 (chain_mod_SOURCES): Renamed to ...
14462 (_chain_mod_SOURCES): ... this.
14463 (chain_mod_CFLAGS): Renamed to ...
14464 (_chain_mod_CFLAGS): ... this.
14465 (linux_mod_SOURCES): Renamed to ...
14466 (_linux_mod_SOURCES): ... this.
14467 (linux_mod_CFLAGS): Renamed to ...
14468 (_linux_mod_CFLAGS): ... this.
14469 (normal_mod_SOURCES): New variable.
14470 (normal_mod_CFLAGS): Likewise.
14471 (normal_mod_ASFLAGS): Likewise.
14472
144732003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
14474
14475 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
14476 possible.
14477
fe6b695a 14478 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 14479 recursively.
14480 (pupa_dl_unref): Unrefer depending modules recursively.
14481 Don't call pupa_dl_unload implicitly, because PUPA can crash if
14482 a module is unloaded before one depending on that module is
14483 unloaded.
14484 (pupa_dl_unload): Unload depending modules explicitly,
14485 if possible.
14486
c04da074 144872003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
14488
14489 * include/pupa/i386/pc/linux.h: New file.
14490 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 14491
c04da074 14492 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
14493 Removed.
14494 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
14495 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
14496 of PUPA_CHAINLOADER_BOOT_SECTOR.
14497
14498 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
14499 (pupa_linux_prot_size): New variable.
14500 (pupa_linux_tmp_addr): Likewise.
14501 (pupa_linux_real_addr): Likewise.
14502 (pupa_linux_boot_zimage): New function.
14503 (pupa_linux_boot_bzimage): Likewise.
14504
14505 * kern/i386/pc/init.c (struct mem_region): New structure.
14506 (MAX_REGIONS): New macro.
14507 (mem_regions): New variable.
14508 (num_regions): Likewise.
14509 (pupa_os_area_addr): Likewise.
14510 (pupa_os_area_size): Likewise.
14511 (pupa_lower_mem): Likewise.
14512 (pupa_upper_mem): Likewise.
14513 (add_mem_region): New function.
14514 (compact_mem_regions): Likewise.
14515 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
14516 the size of the conventional memory and that of so-called upper
14517 memory (before the first memory hole).
14518 Instead of adding each found region to free memory, use
14519 add_mem_region and add them after removing overlaps.
14520 Also, add only 1/4 of the upper memory to free memory. The rest
14521 is used for loading OS images. Maybe this is ad hoc, but this
14522 makes it much easier to relocate OS images when booting.
14523
14524 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
14525 (pupa_enter_rescue_mode): Don't register initrd and module.
14526
14527 * kern/mm.c: Include pupa/dl.h.
14528
14529 * kern/main.c: Include pupa/file.h and pupa/device.h.
14530
14531 * kern/loader.c (pupa_loader_load_module_func): Removed.
14532 (pupa_loader_load_module): Likewise.
14533
14534 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
14535 ``.o''.
14536
14537 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
14538 (pupa_linux_tmp_addr): Likewise.
14539 (pupa_linux_real_addr): Likewise.
14540 (pupa_linux_boot_zimage): Likewise.
14541 (pupa_linux_boot_bzimage): Likewise.
14542
14543 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
14544 (pupa_upper_mem): Likewise.
14545 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
14546 module is too dangerous.
14547
14548 * include/pupa/loader.h (pupa_os_area_addr): Declared.
14549 (pupa_os_area_size): Likewise.
14550 (pupa_loader_set): Remove the first argument. Loader doesn't
14551 manage modules or initrd any longer.
14552 (pupa_loader_load_module): Removed.
14553
14554 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
14555 (linux_mod_SOURCES): New variable.
14556 (linux_mod_CFLAGS): Likewise.
14557
a13f9237 145582003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
14559
14560 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
14561 the length of a blocklist correctly.
14562
14563 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
14564 Use ioctl only if the OS file is a block device.
14565 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
14566 not very useful for normal files.
14567
14568 * kern/main.c (pupa_set_root_dev): New function.
14569 (pupa_load_normal_mode): Likewise.
14570 (pupa_main): Call those above.
14571
14572 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
14573 pupa_uint16_t.
14574
14575 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
14576
a5ffe966 145772003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
14578
14579 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
14580 (setup): Configure the installed partition information and the
14581 dl prefix.
14582
14583 * loader/i386/pc/chainloader.c (my_mod): New variable.
14584 (pupa_chainloader_unload): New function.
14585 (pupa_rescue_cmd_chainloader): Refer itself.
14586 (PUPA_MOD_INIT): Save its own module in MY_MOD.
14587
14588 * kern/i386/pc/startup.S (install_partition): Removed.
14589 (version_string): Likewise.
14590 (config_file): Likewise.
14591 (pupa_install_dos_part): New variable.
14592 (pupa_install_bsd_part): Likewise.
14593 (pupa_prefix): Likewise.
14594 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
14595
14596 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
14597 and pupa/misc.h.
14598 (make_install_device): New function.
14599 (pupa_machine_init): Set the dl prefix.
14600
14601 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
14602 (buf): Renamed to ...
14603 (linebuf): ... this.
14604 (pupa_rescue_cmd_prefix): New function.
14605 (pupa_rescue_cmd_insmod): Likewise.
14606 (pupa_rescue_cmd_rmmod): Likewise.
14607 (pupa_rescue_cmd_lsmod): Likewise.
14608 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
14609 rmmod and lsmod.
14610
14611 * kern/mm.c (pupa_memalign): If failed even after invalidating
14612 disk caches, unload unneeded modules and retry.
14613
14614 * kern/misc.c (pupa_memmove): New function.
14615 (pupa_memcpy): Removed.
14616 (pupa_strcpy): New function.
14617 (pupa_itoa): Made static.
14618
14619 * kern/dl.c (pupa_dl_iterate): New function.
14620 (pupa_dl_ref): Likewise.
14621 (pupa_dl_unref): Likewise.
14622 (pupa_dl_unload): Return if succeeded or not.
14623 (pupa_dl_unload_unneeded): New function.
14624 (pupa_dl_unload_all): Likewise.
14625 (pupa_dl_init): Renamed to ...
14626 (pupa_dl_set_prefix): ... this.
14627 (pupa_dl_get_prefix): New function.
14628
14629 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
14630 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
14631 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14632 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14633 (pupa_install_dos_part): Declared.
14634 (pupa_install_bsd_part): Likewise.
14635 (pupa_prefix): Likewise.
14636 (pupa_boot_drive): Likewise.
14637
14638 * include/pupa/types.h: Fix a typo.
14639
14640 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
14641 pupa_memmove.
14642 (pupa_memmove): Declared.
14643 (pupa_strcpy): Likewise.
14644
14645 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
14646 pupa_mod_init takes one argument, its own module.
14647 (pupa_dl_unload_unneeded): Declared.
14648 (pupa_dl_unload_all): Likewise.
14649 (pupa_dl_ref): Likewise.
14650 (pupa_dl_unref): Likewise.
14651 (pupa_dl_iterate): Likewise.
14652 (pupa_dl_init): Renamed to ...
14653 (pupa_dl_set_prefix): ... this.
14654 (pupa_dl_get_prefix): Declared.
14655
14656 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 14657 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 14658 unloaded.
14659 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
14660 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
14661
14662 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
14663 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
14664
012d7999 146652003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14666
14667 * util/i386/pc/pupa-setup.c (setup): Define the internal
14668 function find_first_partition_start at the top level, because GCC
14669 3.0.x cannot compile internal functions in deeper scopes
14670 correctly.
14671 (find_root_device): Use lstat instead of stat.
14672 Don't follow symbolic links.
14673 Fix the path-constructing code.
14674
14675 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
14676 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
14677 by a BLKGETSIZE ioctl first, because block devices don't fill
14678 the member st_mode of the structure stat on Linux.
14679 [__linux__] (linux_find_partition): Use a temporary buffer
14680 REAL_DEV for the working space. Copy it to DEV before returning.
14681 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
14682 buffer cache consistent.
14683 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
14684 strncmp. The previous value was merely wrong.
14685 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
14686
14687 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
14688 FAT size is 12. The previous value was merely wrong.
14689
14690 * kern/main.c (pupa_main): Don't split the starting message from
14691 newlines.
14692
14693 * kern/term.c (pupa_putchar): Put CR after LF instead of before
14694 LF, because BIOS goes crazy about character attributes in this
14695 case.
14696
1cc73a62 146972003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14698
14699 * include/i386/pc/util/biosdisk.h: New file.
14700 * util/i386/pc/biosdisk.c: Likewise.
14701 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 14702
1cc73a62 14703 * Makefile.in (INCLUDE_DISTFILES): Added
14704 include/pupa/i386/pc/util/biosdisk.h.
14705 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
14706 directory util/i386/pc.
14707 (install-local): Added a rule for sbin_UTILITIES.
14708 (uninstall): Likewise.
14709
14710 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
14711
14712 * util/misc.c (xrealloc): New function.
14713 (pupa_malloc): Likewise.
14714 (pupa_free): Likewise.
14715 (pupa_realloc): Likewise.
14716 (pupa_stop): Likewise.
14717 (pupa_putchar): Likewise.
14718
14719 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
14720
14721 * include/pupa/util/misc.h (xrealloc): Declared.
14722
14723 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
14724 macro.
14725 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
14726 (PUPA_BOOT_MACHINE_BPB_END): ... this.
14727
14728 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
14729 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14730
14731 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
14732 way should be implemented.
14733 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14734
14735 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
14736 the size of NAME for safety.
14737 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
14738 0x88.
14739
14740 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
14741 (pupa_setup_SOURCES): Likewise.
14742
14743 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
14744
08b70fe8 147452002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14746
14747 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
14748 bunch of pushl's from pusha, because this destroys the return
14749 value.
14750
62ddcc8f 147512002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14752
14753 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
14754 This means that any missing prototypes could be fatal. Also, you
14755 must take care when writing assembly code. See the comments at
14756 the beginning of startup.S, for more details.
f19dbdb7 14757
62ddcc8f 14758 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
14759 compilation mechanism.
14760 (pupa_chainloader_real_boot): Likewise.
14761 (pupa_biosdisk_rw_int13_extensions): Likewise.
14762 (pupa_biosdisk_rw_standard): Likewise.
14763 (pupa_biosdisk_check_int13_extensions): Likewise.
14764 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
14765 (pupa_biosdisk_get_diskinfo_standard): Likewise.
14766 (pupa_get_memsize): Likewise.
14767 (pupa_get_mmap_entry): Likewise.
14768 (pupa_console_putchar): Likewise.
14769 (pupa_console_setcursor): Likewise.
14770 (pupa_getrtsecs): Use pushl instead of push.
14771
14772 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
14773 memory instead of the stack for a mmap entry, because some
14774 BIOSes may ignore the maximum size and overflow.
14775
14776 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
14777
14778 * genmk.rb (PModule#rule): Compile automatically generated
14779 sources with module-specific CFLAGS as well as other sources.
14780
9962ed99 147812002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14782
14783 * configure.ac: Check ld.
14784 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
14785 respectively, before checking endianness and sizes.
14786
14787 * Makefile.in (LD): New variable.
f19dbdb7 14788
abdfc3c5 147892002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14790
14791 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
14792
6a161fa9 147932002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14794
14795 * Changelog: New file.
14796