]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
[grub2.git] / ChangeLog
CommitLineData
40164e75 12009-03-12 Vladimir Serbinenko <phcoder@gmail.com>
2
3 * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
4 background image command.
5
c58bc32a 62009-03-12 Colin D Bennett <colin@gibibit.com>
7
8 * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
9 (grub_gfxterm_putchar): Extract pairs of identical calls to
10 draw_cursor out of conditional blocks.
11
5415144a 122009-03-11 Pavel Roskin <proski@gnu.org>
13
14 * fs/hfs.c (grub_hfs_strncasecmp): New function.
15 (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
16
6394042e 172009-03-11 Robert Millan <rmh@aybabtu.com>
18
19 * loader/i386/multiboot_elfxx.c
20 (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
21
b7b50e5f 222009-03-11 Felix Zielcke <fzielcke@z-51.de>
23
24 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
25 `kern/handler.c'.
26
1ca7fc96 272009-03-11 Robert Millan <rmh@aybabtu.com>
28
29 * loader/i386/multiboot.c (code_size): New variable.
30 (grub_multiboot): Define offsets by adding to `code_size' rather
31 than substracting from `grub_multiboot_payload_size'. Provide
32 4-byte alignment to MBI and others by increasing
33 `boot_loader_name_length' appropiately.
34
35 * loader/i386/multiboot_elfxx.c
36 (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
37
a83ea1d2 382009-03-09 Felix Zielcke <fzielcke@z-51.de>
39
40 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
41 `fs/ext2.c'.
42
aa9f3bff 432009-03-08 Robert Millan <rmh@aybabtu.com>
44
45 Make loader/i386/linux.c usable on i386-pc again.
46
47 * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
48 memory to heap.
49 * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
50 `#error' stanza.
51
d8b3b60e 522009-03-07 Bean <bean123ch@gmail.com>
53
54 * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
55 allocation.
56
b362c9e9 572009-03-06 Robert Millan <rmh@aybabtu.com>
58
59 Fix display issue on terminals with screen size other than 80x25
60 (e.g. gfxterm with resolution higher than 640x480).
61
62 * normal/main.c (grub_normal_init_page): Display title text in a
63 position relative to the center of the terminal instead of reliing
64 on a hardcoded offset.
65
9304eef1 662009-03-04 Robert Millan <rmh@aybabtu.com>
67
68 Filter /etc/grub.d/10_* so that only add-ons for native kernels are
69 installed.
70
71 * Makefile.in (host_kernel): New variable.
72 * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
73 scripts instead of just the windows one.
74 * configure.ac: Initialize and AC_SUBST `host_kernel'.
75
eabc95fb 762009-03-04 Felix Zielcke <fzielcke@z-51.de>
2ba60b62 77
78 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
79 `kern/handler.c'.
80 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
81 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
82 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
83 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
84 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
85 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
86
ceb1223c 872009-03-04 Felix Zielcke <fzielcke@z-51.de>
88
89 * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
90 or if there's no space for the disk label and print the partition number on a
91 invalid magic.
92
4910684a 932009-03-04 Felix Zielcke <fzielcke@z-51.de>
94
95 * util/misc.c: Include <time.h>.
96 (grub_millisleep): New function.
97
7e9ca17a 982009-03-04 Bean <bean123ch@gmail.com>
99
100 * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
101 another option -mno-red-zone.
102
103 * commands/handler.c: Change module description.
104
105 * kern/handler.c: Add missing space at the end of description line.
106
107 * kern/list.c: Likewise.
108
f501677c 1092009-03-03 Robert Millan <rmh@aybabtu.com>
110
111 Move more components to the relocation area, and fix mbi pointer
112 handling to use the destination rather than the origin (thanks to
113 Vladimir Serbinenko for spotting).
114
115 * loader/i386/multiboot.c (mbi_dest): New variable.
116 (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
117 (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
118 relocation area.
119
9902d047 1202009-03-01 Bean <bean123ch@gmail.com>
121
50fb7002 122 * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
9902d047 123 (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
124 (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
125 (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
126
127 * loader/i386/efi/linux.c (acpi_guid): New variable.
128 (acpi_guid): Likewise.
129 (EBDA_SEG_ADDR): New constant.
130 (LOW_MEM_ADDR): Likewise.
131 (FAKE_EBDA_SEG): Likewise.
132 (fake_bios_data): New function.
133 (grub_linux_boot): Call fake_bios_data.
134
71b9f361 1352009-03-01 Bean <bean123ch@gmail.com>
136
137 * commands/terminal.c: Removed.
138
139 * commands/handler.c: New file.
140
141 * include/grub/list.h: Likewise.
142
143 * include/grub/handler.h: Likewise.
144
145 * kern/list.c: Likewise.
146
147 * kern/handler.c: Likewise.
148
149 * kern/term.h: Include header file <grub/handler.h>.
150 (grub_term_input): Move next field to the beginning.
151 (grub_term_output): Likewise.
152 (grub_term_input_class): New variable.
153 (grub_term_output_class): Likewise.
154 (grub_term_register_input): Changed to inline function.
155 (grub_term_register_output): Likewise.
156 (grub_term_unregister_input): Likewise.
157 (grub_term_unregister_output): Likewise.
158 (grub_term_set_current_input): Likewise.
159 (grub_term_set_current_output): Likewise.
160 (grub_term_get_current_input): Likewise.
161 (grub_term_get_current_output): Likewise.
162 (grub_term_iterate_input): Removed.
163 (grub_term_iterate_output): Likewise.
164
165 * kern/term.c (grub_term_list_input): Removed.
166 (grub_term_list_output): Likewise.
167 (grub_term_input_class): New variable.
168 (grub_term_output_class): Likewise.
50fb7002 169 (grub_cur_term_input): Change variable as macro.
71b9f361 170 (grub_cur_term_output): Likewise.
171 (grub_term_register_input): Removed.
172 (grub_term_register_output): Likewise.
173 (grub_term_unregister_input): Likewise.
174 (grub_term_unregister_output): Likewise.
175 (grub_term_set_current_input): Likewise.
176 (grub_term_set_current_output): Likewise.
177 (grub_term_iterate_input): Likewise.
178 (grub_term_iterate_output): Likewise.
179 (grub_term_get_current_input): Likewise.
180 (grub_term_get_current_output): Likewise.
181
182 * util/grub-editenv.c: Include header file <grub/handler.h>.
183 (grub_term_get_current_input): Removed.
184 (grub_term_get_current_output): Likewise.
185 (grub_term_input_class): New variable.
50fb7002 186 (grub_term_output_class): Likewise.
71b9f361 187
188 * util/grub-fstest.c (grub_term_get_current_input): Removed.
189 (grub_term_get_current_output): Likewise.
190 (grub_term_input_class): New variable.
50fb7002 191 (grub_term_output_class): Likewise.
71b9f361 192
193 * util/grub-probe.c (grub_term_get_current_input): Removed.
194 (grub_term_get_current_output): Likewise.
195 (grub_term_input_class): New variable.
50fb7002 196 (grub_term_output_class): Likewise.
71b9f361 197
198 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
199 (grub_term_get_current_output): Likewise.
200 (grub_term_input_class): New variable.
50fb7002 201 (grub_term_output_class): Likewise.
71b9f361 202
203 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
204 (terminal_mod_SOURCES): Likewise.
205 (terminal_mod_CFLAGS): Likewise.
206 (terminal_mod_LDFLAGS): Likewise.
207
208 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
209 handler.c.
210 (kernel_img_SOURCES): Add list.c and handler.c.
211 (kernel_img_HEADERS): Add list.h and handler.h.
212
213 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
214 handler.c.
215 (kernel_mod_SOURCES): Add list.c and handler.c.
216 (kernel_mod_HEADERS): Add list.h and handler.h.
217
218 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
219 handler.c.
220 (kernel_elf_SOURCES): Add list.c and handler.c.
221 (kernel_elf_HEADERS): Add list.h and handler.h.
222
223 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
224 handler.c.
225 (kernel_elf_SOURCES): Add list.c and handler.c.
226 (kernel_elf_HEADERS): Add list.h and handler.h.
227
228 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
229 handler.c.
230 (kernel_mod_SOURCES): Add list.c and handler.c.
231 (kernel_mod_HEADERS): Add list.h and handler.h.
232
233 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
234 handler.c.
235 (kernel_elf_SOURCES): Add list.c and handler.c.
236 (kernel_elf_HEADERS): Add list.h and handler.h.
237
8a31787f 2382009-02-27 Robert Millan <rmh@aybabtu.com>
239
240 Factorize elf32 / elf64 code in Multiboot loader. This will
241 prevent it from getting out of sync again.
242
243 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
244 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
245 grub_multiboot_load_elf64): Move from here ...
246 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
247 grub_multiboot_load_elf): ... to here (new file).
248
51cd3dfc 2492009-02-27 Robert Millan <rmh@aybabtu.com>
250
251 * util/grub.d/10_linux.in: Rename "single-user mode" to
252 "recovery mode".
253
6e8c9c3a 2542009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
255
256 Don't leak in SCSI code.
257 * disk/scsi.c (grub_scsi_close): free `scsi'.
258
4b6bf4f9 2592009-02-27 Robert Millan <rmh@aybabtu.com>
260
261 * loader/i386/pc/multiboot.c: Move from here ...
262 * loader/i386/multiboot.c: ... to here. Update all users.
263
b9413424 2642009-02-27 Robert Millan <rmh@aybabtu.com>
265
266 Patch from Alexandre Bique <bique.alexandre@gmail.com>
267 * util/i386/pc/grub-setup.c (setup): Fix directory path.
268
50fb7002 2692009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
34519c3f 270
271 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
272 b-tree.
273
8cc50345 2742009-02-27 Robert Millan <rmh@aybabtu.com>
275
276 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
277 `0x' qualifier as 0 when base is specified as parameter).
278
6e09b8b7 2792009-02-24 Bean <bean123ch@gmail.com>
280
281 * configure.ac: Check for -mcmodel=large in x86_64 target.
282
283 * include/grub/efi/api.h (efi_call_10): New macro.
284 (efi_wrap_10): New function.
285
286 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
287 (GRUB_PE32_REL_BASED_HIGH): Likewise.
288 (GRUB_PE32_REL_BASED_LOW): Likewise.
289 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
290 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
291 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
292 (GRUB_PE32_REL_BASED_SECTION): Likewise.
293 (GRUB_PE32_REL_BASED_REL): Likewise.
294 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
295 (GRUB_PE32_REL_BASED_DIR64): Likewise.
296 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
297
298 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
299 issue.
300
301 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
302 (efi_wrap_10): New function.
303
304 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
305
306 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
307 MB/MBP model (NV chipset).
308 (devdata_devs): Add devpath_5 to the list.
309
310 * load/i386/efi/linux.c (video_base): Remove variable.
311 (RGB_MASK): New macro.
312 (RGB_MAGIC): Likewise.
313 (LINE_MIN): Likewise.
314 (LINE_MAX): Likewise.
315 (FBTEST_STEP): Likewise.
316 (FBTEST_COUNT): Likewise.
317 (fb_list): New variable.
318 (grub_find_video_card): Remove function.
319 (find_framebuf): New function.
320 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
321 line length.
322
323 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
324 problem for x86_64.
325
74b21bee 3262009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
327
328 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
329
330 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
331 coding tool name.
332
a455f472 3332009-02-22 Robert Millan <rmh@aybabtu.com>
334
335 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
336 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
337 in our relocation, instead of using it directly from heap. Also
338 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
339
6374daf3 3402009-02-21 Robert Millan <rmh@aybabtu.com>
341
342 Implement USB keyboard support (based on patch by Marco Gerards)
343
344 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
345 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
346 (usb_keyboard_mod_LDFLAGS): New variables.
347
348 * term/usb_keyboard.c: New file.
349
8fa4ea70 3502009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
351
352 Corrected wrong declaration
353
354 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
355
353976ac 3562009-02-14 Christian Franke <franke@computer.org>
357
358 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
359 (grub_lspci_iter): Print class code and programming interface byte.
360
6aa1169b 3612009-02-14 Christian Franke <franke@computer.org>
362
363 * gendistlist.sh: Ignore `.svn' directories.
364
265372ca 3652009-02-14 Felix Zielcke <fzielcke@z-51.de>
366
367 * fs/fat.c: Add 2009 to Copyright line.
368
9ff516f3 3692009-02-14 Christian Franke <franke@computer.org>
370
371 * commands/hdparm.c: New file. Provides `hdparm' command
372 which sends ATA commands via grub_disk_ata_pass_through ().
373
374 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
375
376 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
377 and <grub/cpu/io.h> to include/grub/ata.h.
378 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
379 (GRUB_CDROM_SECTOR_SIZE): Remove.
380 (GRUB_ATA_*): Move to include/grub/ata.h.
381 (GRUB_ATAPI_*): Likewise.
382 (enum grub_ata_commands): Likewise.
383 (enum grub_ata_timeout_milliseconds): Likewise.
384 (struct grub_ata_device): Likewise.
385 (grub_ata_regset): Likewise.
386 (grub_ata_regget): Likewise.
387 (grub_ata_regset2): Likewise.
388 (grub_ata_regget2): Likewise.
389 (grub_ata_check_ready): Likewise.
390 (grub_ata_wait_not_busy): Remove static, exported in
391 include/grub/ata.h.
392 (grub_ata_wait_drq): Likewise.
393 (grub_ata_pio_read): Likewise.
394
395 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
396 function for hdparm.mod.
397
398 * include/grub/ata.h: New file, contains declarations from
399 disk/ata.c.
400 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
401
402 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
403 (grub_disk_ata_pass_through): New exported variable.
404
405 * kern/disk.c (grub_disk_ata_pass_through): New variable.
406
772e23da 4072009-02-13 Colin D Bennett <colin@gibibit.com>
408
409 Support multiple fallback entries, and provide an API to support
410 executing default+fallback menu entries. Renamed the `terminal' menu
411 viewer to `text'.
412
413 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
414 variable declaration.
415 (grub_menu_execute_callback): New structure declaration.
416 (grub_menu_execute_callback_t): New typedef.
417 (grub_menu_execute_with_fallback): New function declaration.
418 (grub_menu_get_entry): Likewise.
419 (grub_menu_get_timeout): Likewise.
420 (grub_menu_set_timeout): Likewise.
421
422 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
423
424 * normal/menu.c (grub_wait_after_message): Moved to
425 `normal/menu_text.c'.
426 (draw_border): Likewise.
427 (print_message): Likewise.
428 (print_entry): Likewise.
429 (print_entries): Likewise.
430 (grub_menu_init_page): Likewise.
431 (get_entry_number): Likewise.
432 (print_timeout): Likewise.
433 (run_menu): Likewise.
434 (grub_menu_execute_entry): Likewise.
435 (show_text_menu): Likewise.
436 (get_and_remove_first_entry_number): New function.
437 (grub_menu_execute_with_fallback): Likewise.
438 (get_entry): Renamed to ...
439 (grub_menu_get_entry): .. this and made it global.
440 (get_timeout): Renamed to ...
441 (grub_menu_get_timeout): ... this and made it global.
442 (set_timeout): Renamed to ...
443 (grub_menu_set_timeout): ... this and made it global.
444 (grub_normal_terminal_menu_viewer): Renamed to ...
445 (grub_normal_text_menu_viewer): ... this.
446
447 * normal/menu_text.c: New file. Extracted text-menu-specific code
448 from normal/menu.c.
449
450 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
451 (normal_mod_SOURCES): Likewise.
452
453 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
454 (normal_mod_SOURCES): Likewise.
455
456 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
457 (normal_mod_SOURCES): Likewise.
458
459 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
460 (normal_mod_SOURCES): Likewise.
461
462 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
463 (normal_mod_SOURCES): Likewise.
464
465 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
466 (normal_mod_SOURCES): Likewise.
467
468 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
469 (normal_mod_SOURCES): Likewise.
470
16ac430e 4712009-02-11 Robert Millan <rmh@aybabtu.com>
472
473 * util/grub.d/00_header.in: Update old reference to `font' command.
474
06ff20fc 4752009-02-10 Felix Zielcke <fzielcke@z-51.de>
476
477 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
478
479 Based on patch from Javier Martín.
480
96da9407 4812009-02-09 Felix Zielcke <fzielcke@z-51.de>
482
483 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
50fb7002 484 to avoid false positives with FAT.
96da9407 485 (grub_fstest_SOURCES): Likewise.
486 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
487 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
488 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
489 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
490 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
491 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
492
6dca6fe4 4932009-02-09 Felix Zielcke <fzielcke@z-51.de>
494
06ff20fc 495 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 496 bpb.version_specific.fat12_or_fat16.fstype and
497 bpb.version_specific.fat32.fstype.
498
2550c62f 4992009-02-08 Robert Millan <rmh@aybabtu.com>
500
be110b30 501 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 502
56978920 5032009-02-08 Robert Millan <rmh@aybabtu.com>
504
505 * Makefile.in (host_os, host_cpu): New variables.
506 (target_os): Remove. Update all users.
507
d64399b5 5082009-02-08 Marco Gerards <marco@gnu.org>
509
510 * Makefile.in (enable_grub_emu_usb): New variable.
511 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
512 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
513 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
514 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
515 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
516 `usbtest.mod' and `usbms.mod'.
517 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
518 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
519 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
520 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
521 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
522 variables.
523
524 * disk/usbms.c: New file.
525
526 * include/grub/usb.h: Likewise.
527
528 * include/grub/usbtrans.h: Likewise.
529
530 * include/grub/usbdesc.h: Likewise.
531
532 * bus/usb/usbtrans.c: Likewise.
533
534 * bus/usb/ohci.c: Likewise.
535
536 * bus/usb/uhci.c: Likewise.
537
538 * bus/usb/usbhub.c: Likewise.
539
540 * bus/usb/usb.c: Likewise.
541
542 * commands/usbtest.c: Likewise.
543
544 * util/usb.c: Likewise.
50fb7002 545
d64399b5 546 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
547
548 * configure.ac: Test for libusb presence.
50fb7002 549
d64399b5 550 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
551
2b40d6bb 5522009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
553
554 * kern/mm.c: Add more comments.
555
73a4ce81 5562009-02-08 Robert Millan <rmh@aybabtu.com>
557
558 Patch from Javier Martín.
559 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
560 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
561
f821ce59 5622009-02-08 Robert Millan <rmh@aybabtu.com>
563
564 * fs/cpio.c: Split tar functionality to ...
565 * fs/tar.c: ... here (new file). Update all users.
566
aebfc4b0 5672009-02-07 Robert Millan <rmh@aybabtu.com>
568
569 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
570 backward-incompatible features.
571
572 Based on patch from Javier Martín, with some adjustments.
573
50fb7002 5742009-02-07 Michael Scherer <misc@mandriva.org>
cea15bca 575
576 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
577
0bb5115e 5782009-02-07 Robert Millan <rmh@aybabtu.com>
579
580 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
581 position of `disk/lvm.c' to ensure grub_init_all() always picks it
582 after the RAID stuff.
583
38a0f8e7 5842009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
585
50fb7002 586 Fixes problem when running vbetest command as reported by
38a0f8e7 587 Vladimir Serbinenko <phcoder@gmail.com>.
588
589 * (grub_vbe_set_video_mode): Fixed problem with text modes.
590
3143cc1c 5912009-02-04 Felix Zielcke <fzielcke@z-51.de>
592
593 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
594 /dev/md/NpN style mdraid devices.
595
9cba6fce 5962009-02-03 Felix Zielcke <fzielcke@z-51.de>
597
598 * util/unifont2pff.rb: Remove.
599
e507a2c1 6002009-02-03 Felix Zielcke <fzielcke@z-51.de>
601
602 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
603 `#'.
604
d2c2b4cd 6052009-02-03 Felix Zielcke <fzielcke@z-51.de>
606
607 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
608 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
609 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
610 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
611 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
612 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
613 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
614
b4315fb0 6152009-02-02 Christian Franke <franke@computer.org>
616
617 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
618
de3aa260 6192009-02-01 Felix Zielcke <fzielcke@z-51.de>
620
7c3ff286 621 * INSTALL: Note that we now require at least autoconf 2.59 and
622 that LZO is optional.
de3aa260 623
825a182b 6242009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
625
626 Base on patch on bug #24154 created by Tomas Tintera
627 <trosos@seznam.cz>.
628
629 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
630
a69ef770 6312009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
632
7c3ff286 633 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 634 <bero@arklinux.org>.
635
636 * normal/parser.y (script_init): Add missing semicolon.
637
6fa42fa6 6382009-01-31 Colin D Bennett <colin@gibibit.com>
639
7c3ff286 640 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 641 (free_menu_entry_classes): Added.
642 (grub_normal_menu_addentry): Added class property handling.
643 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
644 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
645
646 * normal/menu_viewer.c: New file.
647
648 * normal/menu.c (run_menu_entry): Renamed to ...
649 (grub_menu_execute_entry): ... this and made it as global.
650 (grub_menu_run): Renamed to ...
651 (show_text_menu): ... this and made it local.
652 (show_text_menu): Adapt to new function names.
653 (grub_normal_terminal_menu_viewer): New global variable.
654
655 * include/grub/menu.h: New file.
656
657 * include/grub/menu_viewer.h: New file.
658
659 * include/grub/normal.h: Added include to grub/menu.h.
660 (grub_menu_entry): Moved to include/grub/menu.h.
661 (grub_menu_entry_t): Likewise.
662 (grub_menu): Likewise.
663 (grub_menu_t): Likewise.
664 (grub_normal_terminal_menu_viewer): Added.
665 (grub_menu_execute_entry): Likewise.
666 (grub_menu_run): Removed.
667
668 * DISTLIST: Added include/grub/menu.h.
669 Added include/grub/menu_viewer.h.
670 Added normal/menu_viewer.c.
671
6722009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
673
674 * normal/execute.c (grub_script_execute_menuentry): Changed to use
675 arglist for menutitle arguments.
676
677 * normal/main.c (grub_normal_menu_addentry): Likewise.
678
679 * normal/parser.y (menuentry): Likewise.
680
681 * normal/script.c (grub_script_create_cmdmenu): Likewise.
682
683 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
684 (grub_script_create_cmdmenu): Likewise.
685
686 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
687
688 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
689 changes.
690
691 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
692
693 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
694
695 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
696
697 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
698
699 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
700
701 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
702
56192c23 7032009-01-30 Christian Franke <franke@computer.org>
704
705 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
706 in option help text.
707
d72521b3 7082009-01-27 Pavel Roskin <proski@gnu.org>
709
710 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
711
994b5e84 7122009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
713
714 * commands/lsmmap.c: Add include to grub/machine/memory.h.
715
716 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
717
718 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
719 unregister function.
720
6a7eab2c 7212009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
722
723 * disk/scsi.c (grub_scsi_read): Fix sign problem.
724
725 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
726
727 * util/grub-mkfont.c (usage): Fix typo.
728
729 * util/elf/grub-mkimage.c (load_modules): Fix warning.
730
1806b56e 7312009-01-26 Daniel Mierswa <impulze@impulze.org>
732
3fb18f09 733 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
734
336e1fb9 735 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
736
1806b56e 737 * kern/misc.c (grub_strcasecmp): New function.
738 (grub_strcasecmp): Use grub_size_t instead of int for length.
739 Fix return value.
740 * include/grub/misc.h: Update function prototypes.
741
580b2a0f 7422009-01-26 Robert Millan <rmh@aybabtu.com>
743
744 * configure.ac: Fix cross-compilation check.
ef257b36 745
d31c24f1 7462009-01-22 Christian Franke <franke@computer.org>
747
748 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
749 (precision) digit string. Allow `.format2' without `format1' (width).
750 Limit input chars for `%s' output to `format2' if specified. This is
751 compatible with standard printf ().
752
3138b44c 7532009-01-22 Christian Franke <franke@computer.org>
754
755 * disk/ata.c (grub_ata_wait_status): Replace by ...
756 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
757 other status bits may be invalid while BSY is asserted.
758 (grub_ata_check_ready): New function.
759 (grub_ata_cmd): Removed.
760 (grub_ata_wait_drq): New function.
761 (grub_ata_strncpy): Remove inline.
762 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
763 and error check now done by grub_ata_wait_drq ().
764 (grub_ata_pio_write): Likewise.
765 (grub_atapi_identify): Set DEV before check for !BSY. Use
766 grub_ata_wait_drq () to wait for data.
767 (grub_ata_device_initialize): Add status register check to
768 detect missing SATA slave devices. Add debug messages.
769 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
770 (grub_atapi_packet): Set DEV before check for !BSY. Replace
771 transfer loop by grub_ata_pio_write ().
772 (grub_ata_identify): Set DEV before check for !BSY. Use
773 grub_ata_wait_drq () to wait for data.
ef257b36 774 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 775 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
776 read/write in one loop. Fix invalid command on write. Fix incomplete
777 command on (size % batch) == 0. Add missing error check after write of
778 last block. Add debug messages.
779 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
780
59a64ef6 7812009-01-19 Christian Franke <franke@computer.org>
782
783 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
784 (GRUB_ATAPI_IREASON_*): Likewise.
785 (grub_ata_pio_write): Fix timeout error return.
786 (grub_atapi_identify): Add grub_ata_wait () after cmd.
787 (grub_atapi_wait_drq): New function.
788 (grub_atapi_packet): New parameter `size'.
789 Use grub_atapi_wait_drq () and direct write instead of
790 grub_ata_pio_write ().
791 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
792 reads the number of bytes requested by the device for each DRQ
793 assertion.
794 (grub_atapi_write): Remove old implementation, return not
795 implemented instead.
796
1cfe20b3 7972009-01-19 Christian Franke <franke@computer.org>
798
799 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
800 of 512 to calculate data size.
801 (grub_scsi_read12): Likewise.
802 (grub_scsi_write10): Likewise.
803 (grub_scsi_write12): Likewise.
804 (grub_scsi_read): Adjust size according to blocksize.
805 Add checks for invalid blocksize and unaligned transfer.
806
bee5fe5d 8072009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
808
809 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
810
ef257b36 811 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 812 width glyphs.
813
3e643f8c 8142009-01-19 Robert Millan <rmh@aybabtu.com>
815
816 * config.guess: Update to latest version from config git.
817 * config.sub: Likewise.
818
4fa80998 8192009-01-17 Felix Zielcke <fzielcke@z-51.de>
820
821 * Makefile.in: Change font compilation to use new grub-mkfont instead
822 of java version.
823
824 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
825 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
826 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
827 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
828 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
829 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
830 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
831 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
832 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
833
7086085b 8342009-01-16 Christian Franke <franke@computer.org>
835
836 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
837 (enum grub_ata_timeout_milliseconds): New enum.
838 (grub_ata_wait_status): Add parameter milliseconds.
839 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
840 recovery from timed-out commands.
841 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
842 return grub_errno instead of REG_ERROR.
843 (grub_ata_pio_write): Add parameter milliseconds.
844 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
845 Pass milliseconds to grub_ata_wait_status () and
846 grub_ata_pio_read ().
847 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
848 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
849 grub_ata_wait_status (). Fix IDENTIFY timeout check.
850 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
851 It is not suitable for device detection, because DEV bit is ignored,
852 the command may run too long, and not all devices set the signature
853 properly.
854 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
855 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
856 Fix device selection, DEV bit must be set first to address the registers
857 of the correct device.
858 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
859 grub_ata_pio_read/write ().
860 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
861 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
862
4a412913 8632009-01-13 Carles Pina i Estany <carles@pina.cat>
864
865 * util/grub-editenv.c (main): Use fseeko(), not fseek().
866
7795c55e 8672009-01-13 Bean <bean123ch@gmail.com>
d913988c 868
869 * util/grub-mkfont.c (write_font): forget to remove some debug code.
870
7795c55e 8712009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 872
873 * Makefile.in: (enable_grub_mkfont): New variable.
874 (freetype_cflags): Likewise.
875 (freetype_libs): Likewise.
876
877 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
878 (grub_mkfont_SOURCES): New variable.
879 (grub_mkfont_CFLAGS): Likewise.
880 (grub_mkfont_LDFLAGS): Likewise.
881
882 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
883 library if `--enable-grub-mkfont' is requested.
884 (enable_grub_mkfont): New variable.
885 (freetype_cflags): Likewise.
886 (freetype_libs): Likewise.
887
888 * util/grub-mkfont.c: New file.
889
093af1fe 8902009-01-12 Christian Franke <franke@computer.org>
891
892 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
893 mode check. Fix setting of compat_use[].
894
f36cc108 8952009-01-10 Robert Millan <rmh@aybabtu.com>
896
897 Update a few copyright years which we forgot to do in 2008 (only for
898 files whose changes made in 2008 were copyright-significant)
899
900 * Makefile.in: Add 2008 to Copyright line.
901 * disk/ieee1275/ofdisk.c: Likewise.
902 * disk/efi/efidisk.c: Likewise.
903 * kern/dl.c: Likewise.
904 * kern/sparc64/ieee1275/init.c: Likewise.
905 * kern/mm.c: Likewise.
906 * kern/efi/mm.c: Likewise.
907 * boot/i386/pc/boot.S: Likewise.
908 * genfslist.sh: Likewise.
909 * fs/iso9660.c: Likewise.
910 * fs/hfs.c: Likewise.
911 * fs/jfs.c: Likewise.
912 * fs/minix.c: Likewise.
913 * fs/ufs.c: Likewise.
914 * gensymlist.sh.in: Likewise.
915 * genkernsyms.sh.in: Likewise.
916 * include/grub/misc.h: Likewise.
917 * include/grub/types.h: Likewise.
918 * include/grub/symbol.h: Likewise.
919 * include/grub/elf.h: Likewise.
920 * include/grub/kernel.h: Likewise.
921 * include/grub/disk.h: Likewise.
922 * include/grub/dl.h: Likewise.
923 * include/grub/i386/linux.h: Likewise.
924 * include/grub/i386/pc/biosdisk.h: Likewise.
925 * include/grub/efi/api.h: Likewise.
926 * include/grub/efi/pe32.h: Likewise.
927 * include/grub/util/misc.h: Likewise.
928 * normal/execute.c: Likewise.
929 * normal/arg.c: Likewise.
930 * normal/completion.c: Likewise.
931 * normal/lexer.c: Likewise.
932 * normal/parser.y: Likewise.
933 * normal/misc.c: Likewise.
934 * commands/i386/pc/vbeinfo.c: Likewise.
935 * commands/hexdump.c: Likewise.
936 * commands/terminal.c: Likewise.
937 * commands/ls.c: Likewise.
938 * commands/help.c: Likewise.
939 * partmap/pc.c: Likewise.
940 * loader/efi/chainloader.c: Likewise.
941 * loader/multiboot_loader.c: Likewise.
942 * loader/i386/pc/multiboot2.c: Likewise.
943 * term/efi/console.c: Likewise.
944 * term/i386/pc/serial.c: Likewise.
945 * util/lvm.c: Likewise.
946 * util/console.c: Likewise.
947 * util/i386/efi/grub-mkimage.c: Likewise.
948 * util/raid.c: Likewise.
949
7f02114b 9502009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
951
952 * commands/videotest.c: Removed include to grub/machine/memory.h.
953
954 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
955 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
956 (video_mod_SOURCES): Removed.
957 (video_mod_CFLAGS): Likewise.
958 (video_mod_LDFLAGS): Likewise.
959 (gfxterm_mod_SOURCES): Likewise.
960 (gfxterm_mod_CFLAGS): Likewise.
961 (gfxterm_mod_LDFLAGS): Likewise.
962 (videotest_mod_SOURCES): Likewise.
963 (videotest_mod_CFLAGS): Likewise.
964 (videotest_mod_LDFLAGS): Likewise.
965 (bitmap_mod_SOURCES): Likewise.
966 (bitmap_mod_CFLAGS): Likewise.
967 (bitmap_mod_LDFLAGS): Likewise.
968 (tga_mod_SOURCES): Likewise.
969 (tga_mod_CFLAGS): Likewise.
970 (tga_mod_LDFLAGS): Likewise.
971 (jpeg_mod_SOURCES): Likewise.
972 (jpeg_mod_CFLAGS): Likewise.
973 (jpeg_mod_LDFLAGS): Likewise.
974 (png_mod_SOURCES): Likewise.
975 (png_mod_CFLAGS): Likewise.
976 (png_mod_LDFLAGS): Likewise.
977
978 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
979 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
980 (video_mod_SOURCES): Added.
981 (video_mod_CFLAGS): Likewise.
982 (video_mod_LDFLAGS): Likewise.
983 (videotest_mod_SOURCES): Likewise.
984 (videotest_mod_CFLAGS): Likewise.
985 (videotest_mod_LDFLAGS): Likewise.
986 (bitmap_mod_SOURCES): Likewise.
987 (bitmap_mod_CFLAGS): Likewise.
988 (bitmap_mod_LDFLAGS): Likewise.
989 (tga_mod_SOURCES): Likewise.
990 (tga_mod_CFLAGS): Likewise.
991 (tga_mod_LDFLAGS): Likewise.
992 (jpeg_mod_SOURCES): Likewise.
993 (jpeg_mod_CFLAGS): Likewise.
994 (jpeg_mod_LDFLAGS): Likewise.
995 (png_mod_SOURCES): Likewise.
996 (png_mod_CFLAGS): Likewise.
997 (png_mod_LDFLAGS): Likewise.
998 (gfxterm_mod_SOURCES): Likewise.
999 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 1000 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 1001
1002 * term/gfxterm.c: Removed include to grub/machine/memory.h,
1003 grub/machine/console.h.
1004
644fff97 10052009-01-04 Jerone Young <jerone@gmail.com>
1006
1007 Make on screen instructions clearer
1008
1009 Based on patch created by Jidanni <jidanni@jidanni.org>
1010
1011 * normal/menu.c: print clearer instructions on the screen
1012
1e901a75 10132009-01-02 Colin D Bennett <colin@gibibit.com>
1014
1015 New font engine.
34c44600 1016
1e901a75 1017 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
1018 build system and fixed gfxterm.c to work with different sized fonts.
1019
1020 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 1021
1e901a75 1022 * configure: Re-generated.
34c44600 1023
1e901a75 1024 * DISTLIST: Removed font/manager.c.
1025 Added font/font.c.
1026 Added font/font_cmd.c.
34c44600 1027
1e901a75 1028 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
1029 compilation.
34c44600 1030
1e901a75 1031 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 1032
1033 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 1034
1035 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 1036
1e901a75 1037 * normal/menu.c: Likewise.
34c44600 1038
1e901a75 1039 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
1040 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 1041
1e901a75 1042 * include/grub/font.h: Replaced with new file.
34c44600 1043
1e901a75 1044 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
1045 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
1046 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
1047 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
1048 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 1049 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 1050 fg_red, fg_green, fg_blue, fg_alpha.
1051 (grub_video_adapter): Removed blit_glyph.
34c44600 1052 (grub_video_blit_glyph): Removed.
1053
1e901a75 1054 * font/manager.c: Removed file.
34c44600 1055
1056 * font/font.c: New file.
1057
1e901a75 1058 * font/font_cmd.c: Likewise.
34c44600 1059
1e901a75 1060 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 1061
1e901a75 1062 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
1063 (grub_video_vbe_map_rgba): Likewise.
1064 (grub_video_vbe_unmap_color_int): Likewise.
1065 (grub_video_vbe_blit_glyph): Removed.
1066 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 1067
1e901a75 1068 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
1069 (get_pixel): Likewise.
34c44600 1070 (set_pixel): Likewise.
1071
1e901a75 1072 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 1073
1e901a75 1074 * term/gfxterm.c: Adapted to new font engine.
34c44600 1075
1e901a75 1076 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 1077
1e901a75 1078 * term/i386/pc/vga.c: Likewise.
34c44600 1079
1e901a75 1080 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 1081
1e901a75 1082 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 1083
1e901a75 1084 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 1085
1e901a75 1086 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 1087
1e901a75 1088 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 1089
1e901a75 1090 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 1091
1e901a75 1092 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 1093
1e901a75 1094 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 1095
1e901a75 1096 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
1097
1098 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 1099
1e901a75 1100 * util/grub-mkconfig_lib.in: Changed font extension.
1101
278922e8 11022008-12-28 Felix Zielcke <fzielcke@z-51.de>
1103
1104 * util/getroot.c (grub_util_get_grub_dev): Add support for
1105 /dev/md/dNNpNN style partitionable mdraid devices.
1106
3ced05cf 11072008-12-12 Alex Smith <alex@alex-smith.me.uk>
1108
1109 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
1110 at a time limit of the PXE TFTP API correctly.
1111 (grub_pxefs_close): Likewise.
1112
7fd0ee30 11132008-11-29 Robert Millan <rmh@aybabtu.com>
1114
34c44600 1115 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 1116 grub_ata_device_initialize() calls.
1117
34c44600 11182008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 1119
1120 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
1121 iteration failed.
1122 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
1123
89313780 11242008-11-28 Robert Millan <rmh@aybabtu.com>
1125
1126 Fix build on powerpc-ieee1275. Based on patch created by
1127 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
1128 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1129 `kern/ieee1275/mmap.c'.
1130 * include/grub/powerpc/ieee1275/memory.h: New file.
1131
15257703 1132 Provide grub-install on coreboot.
1133 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
1134 (grub_install_SOURCES): New variable.
1135 * util/i386/pc/grub-install.in: Add a few condition checks to make it
1136 usable on coreboot.
1137
9fc5388a 11382008-11-25 Felix Zielcke <fzielcke@z-51.de>
1139
1140 * util/grub-fstest.c (grub_term_get_current_input): Change return type
1141 to `grub_term_input_t'.
1142 (grub_term_get_current_output): Change return type to
1143 `grub_term_output_t'.
1144
bc3a2f31 11452008-11-22 Robert Millan <rmh@aybabtu.com>
1146
34c44600 1147 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 1148 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
1149 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
1150 grub_vga_text_cls().
1151
80fc88f2 1152 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 1153 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 1154
cbf36fd3 1155 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
1156 to 0x200000 (avoids trouble with some OFW implementations, and matches
1157 with the one in Yaboot).
1158 Reported by Manoel Abranches
1159
73e8e268 11602008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 1161
1162 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
1163 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
1164
73e8e268 1165 * util/grub-mkconfig_lib.in (grub_warn): New function.
1166 (convert_system_path_to_grub_path): Use grub_warn() when issuing
1167 warnings, to obtain consistent formatting.
1168 * util/grub.d/00_header.in: Likewise.
1169 * util/update-grub_lib.in: Likewise.
1170
e94045a1 1171 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 1172 Move comment text to `#error' stanza.
e94045a1 1173
79d29fd7 1174 Harmonize ieee1275's grub_available_iterate() with the generic
1175 grub_machine_mmap_iterate() interface (fixes a recently-introduced
1176 build problem on i386-ieee1275):
1177 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
1178 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
1179 parameter `type'. Update all users of this function.
1180 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1181 `kern/ieee1275/mmap.c'.
1182 * kern/ieee1275/init.c
1183 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
1184 with ...
1185 (grub_machine_mmap_iterate): ... this.
1186 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
1187 return type to `grub_err_t'. Update all implementations of this
1188 function prototype.
1189 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
1190 Likewise.
1191
60d6b16e 1192 Add `lsmmap' command (lists firmware-provided memory map):
1193 * commands/lsmmap.c: New file.
1194 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
1195 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
1196 variables.
1197 * conf/powerpc-ieee1275.rmk: Likewise.
1198 * conf/i386-coreboot.rmk: Likewise.
1199 * conf/i386-ieee1275.rmk: Likewise.
1200
ebaaf49b 12012008-11-19 Robert Millan <rmh@aybabtu.com>
1202
1203 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 1204 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
1205 constraints to initrd allocation (based on code from
1206 loader/i386/pc/linux.c). Without them, initrd was allocated too high
1207 for Linux to find it.
ebaaf49b 1208
dfab719f 12092008-11-14 Robert Millan <rmh@aybabtu.com>
1210
1211 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
1212 order to cope with duplicate slashes.
1213
10fc3eb9 12142008-11-14 Robert Millan <rmh@aybabtu.com>
1215
1216 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
1217 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
1218 don't want to mess with lower memory, because it is used in the Linux
1219 loader.
1220
1221 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 1222 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 1223 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
1224 is in our heap (probably as a result of it being corrupted during
2f2a3442 1225 decompression). Add #error instance with comment to explain why this
1226 loader isn't currently usable on PC/BIOS.
10fc3eb9 1227
e2e07847 12282008-11-14 Robert Millan <rmh@aybabtu.com>
1229
1230 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 1231 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 1232
fe8e8d69 12332008-11-12 Robert Millan <rmh@aybabtu.com>
1234
1235 Make loader/i386/linux.c buildable on i386-pc (although disabled).
1236
1237 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
1238 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
1239 from here ...
1240 * include/grub/i386/pc/memory.h: ... to here.
1241
976b07d0 12422008-11-12 Robert Millan <rmh@aybabtu.com>
1243
1244 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
1245 split).
1246
1247 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
1248 (grub_console_cur_color, grub_console_real_putchar)
1249 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1250 (grub_console_setcolorstate, grub_console_setcolor)
1251 (grub_console_getcolor): Move from here ...
1252 * include/grub/i386/vga_common.h: ... to here (new file).
1253
1254 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
1255 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
1256 `<grub/i386/io.h>'.
1257 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
1258 `<grub/i386/vga_common.h>'.
1259
76679cd3 12602008-11-12 Robert Millan <rmh@aybabtu.com>
1261
1262 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
1263 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
1264 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
1265 variables.
1266 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1267 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
1268
1269 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
1270 grub_console_init() with call to grub_vga_text_init().
1271 (grub_machine_fini): Replace call to
1272 grub_console_fini() with call to grub_vga_text_fini() and
1273 grub_at_keyboard_fini().
1274
1275 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
1276 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1277 (grub_console_setcolorstate, grub_console_setcolor)
1278 (grub_console_getcolor): New function prototypes.
1279
1280 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
1281 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
1282 (grub_vga_text_setcursor): Static-ize.
1283 (grub_vga_text_term): New structure.
1284 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
1285
1286 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
1287 (grub_console_cur_color, grub_console_standard_color)
1288 (grub_console_normal_color, grub_console_highlight_color)
1289 (map_char, grub_console_putchar, grub_console_getcharwidth)
1290 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
1291 (grub_console_getcolor): Move from here ...
1292 * term/i386/vga_common.c: ... to here (same function names).
1293
95b841d3 12942008-11-12 Robert Millan <rmh@aybabtu.com>
1295
1296 Use newly-added Multiboot support in coreboot.
1297
1298 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1299 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
1300
1301 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
1302 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
1303 (codestart): Store the MBI in `startup_multiboot_info' when we're
1304 being loaded using Multiboot.
1305
1306 * kern/i386/coreboot/init.c (grub_machine_init): Move
1307 grub_at_keyboard_init() call to beginning of function (useful for
1308 debugging). Call grub_machine_mmap_init() before attempting to use
1309 grub_machine_mmap_iterate().
1310 (grub_lower_mem, grub_upper_mem): Move from here ...
1311 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
1312 here (new file).
1313
1314 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
1315 function prototype.
1316
761ca975 13172008-11-12 Robert Millan <rmh@aybabtu.com>
1318
1319 Fix a regression introduced by the at_keyboard.mod split. Because
1320 some terminals are default on some platforms and non-default on
1321 others, the first terminal being registered determines which is
1322 going to be default.
1323
1324 * kern/term.c (grub_term_register_input): If this is the first
1325 terminal being registered, set it as the current one.
1326 (grub_term_register_output): Likewise.
1327
1328 * term/efi/console.c (grub_console_init): Do not call
1329 grub_term_set_current_output() or grub_term_set_current_input().
1330 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
1331 * term/i386/pc/console.c (grub_console_init): Likewise.
1332 (grub_console_fini): Do not call grub_term_set_current_input()
1333 (but leave grub_term_set_current_output() to restore text mode).
1334
6c529df7 13352008-11-10 Robert Millan <rmh@aybabtu.com>
1336
1337 * util/grub.d/00_header.in: Add backward compatibility check for
1338 versions of terminal.mod that don't understand `terminal_input' or
1339 `terminal_output'.
1340
132e4113 13412008-11-09 Robert Millan <rmh@aybabtu.com>
1342
1343 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
1344 `terminal_input' / `terminal_output', not `terminal'.
1345
ac293d50 13462008-11-08 Robert Millan <rmh@aybabtu.com>
1347
1348 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 1349 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 1350
0025933a 13512008-11-08 Robert Millan <rmh@aybabtu.com>
1352
1353 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 1354 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 1355 members. Update all users.
1356 * util/console.c (grub_ncurses_term): Split in ...
1357 (grub_ncurses_term_input): ... this, and ...
1358 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 1359 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 1360
37c86336 13612008-11-08 Robert Millan <rmh@aybabtu.com>
1362
1363 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
1364 (PKGDATA): Add $(pkgdata_SRCDIR).
1365 (pkglib_BUILDDIR): New variable.
1366 (pkgdata_SRCDIR): New variable.
1367 (build_env.mk): New target.
1368 (include_DATA): New variable.
1369 (install-local): Install $(include_DATA) files in $(includedir).
1370
b6c15a2d 13712008-11-07 Pavel Roskin <proski@gnu.org>
1372
d99d46f1 1373 * gendistlist.sh: Use C locale for sorting to ensure consistent
1374 output on all systems.
1375
b6c15a2d 1376 * util/grub.d/00_header.in: Remove incorrect space before
1377 "serial".
1378
c32ee8c9 13792008-11-07 Robert Millan <rmh@aybabtu.com>
1380
1381 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
1382 per specification.
1383 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
1384 * loader/multiboot_loader.c (find_multi_boot2_header): New function
1385 (based on find_multi_boot1_header).
1386 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
1387 using find_multi_boot2_header(), and abort if neither Multiboot or
1388 Multiboot headers were found.
1389
651c29b7 13902008-11-07 Robert Millan <rmh@aybabtu.com>
1391
1392 Modularize at_keyboard.mod:
1393
1394 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
1395 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
1396 (at_keyboard_mod_LDFLAGS): New variables.
1397
1398 Actual terminal split:
1399
1400 * include/grub/term.h (struct grub_term): Split in ...
1401 (struct grub_term_input): ... this, and ...
1402 (struct grub_term_output): ... this. Update all users.
1403 (grub_term_set_current): Split in ...
1404 (grub_term_set_current_input): ... this, and ...
1405 (grub_term_set_current_output): ... this.
1406 (grub_term_get_current): Split in ...
1407 (grub_term_get_current_input): ... this, and ...
1408 (grub_term_get_current_output): ... this.
1409 (grub_term_register): Split in ...
1410 (grub_term_register_input): ... this, and ...
1411 (grub_term_register_output): ... this.
1412 (grub_term_unregister): Split in ...
1413 (grub_term_unregister_input): ... this, and ...
1414 (grub_term_unregister_output): ... this.
1415 (grub_term_iterate): Split in ...
1416 (grub_term_iterate_input): ... this, and ...
1417 (grub_term_iterate_output): ... this.
1418
1419 * kern/term.c (grub_term_list): Split in ...
1420 (grub_term_list_input): ... this, and ...
1421 (grub_term_list_output): ... this. Update all users.
1422 (grub_cur_term): Split in ...
1423 (grub_cur_term_input): ... this, and ...
1424 (grub_cur_term_output): ... this. Update all users.
1425 (grub_term_set_current): Split in ...
1426 (grub_term_set_current_input): ... this, and ...
1427 (grub_term_set_current_output): ... this.
1428 (grub_term_get_current): Split in ...
1429 (grub_term_get_current_input): ... this, and ...
1430 (grub_term_get_current_output): ... this.
1431 (grub_term_register): Split in ...
1432 (grub_term_register_input): ... this, and ...
1433 (grub_term_register_output): ... this.
1434 (grub_term_unregister): Split in ...
1435 (grub_term_unregister_input): ... this, and ...
1436 (grub_term_unregister_output): ... this.
1437 (grub_term_iterate): Split in ...
1438 (grub_term_iterate_input): ... this, and ...
1439 (grub_term_iterate_output): ... this.
1440
1441 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
1442 a check for input and one for output (and only attempt to get keys
1443 from user when input works).
1444
1445 * util/grub-probe.c (grub_term_get_current): Split in ...
1446 (grub_term_get_current_input): ... this, and ...
1447 (grub_term_get_current_output): ... this.
1448 * util/grub-fstest.c: Likewise.
1449 * util/i386/pc/grub-setup.c: Likewise.
1450 * util/grub-editenv.c: Likewise.
1451
1452 Portability adjustments:
1453
1454 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
1455 `term/i386/pc/at_keyboard.c'.
1456 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
1457 grub_keyboard_controller_init() (now handled by terminal .init).
1458 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
1459 grub_at_keyboard_init().
1460 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
1461 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
1462 at_keyboard.mod via input terminal interface).
1463 * include/grub/i386/coreboot/console.h: Convert into a stub for
1464 `<grub/i386/pc/console.h>'.
1465
1466 Migrate full terminals to new API:
1467
1468 * term/efi/console.c (grub_console_term): Split into ...
1469 (grub_console_term_input): ... this, and ...
1470 (grub_console_term_output): ... this. Update all users.
1471 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
1472 (grub_ofconsole_init): Split into ...
1473 (grub_ofconsole_init_input): ... this, and ...
1474 (grub_ofconsole_init_output): ... this.
1475 (grub_ofconsole_term): Split into ...
1476 (grub_ofconsole_term_input): ... this, and ...
1477 (grub_ofconsole_term_output): ... this. Update all users.
1478 * term/i386/pc/serial.c (grub_serial_term): Split into ...
1479 (grub_serial_term_input): ... this, and ...
1480 (grub_serial_term_output): ... this. Update all users.
1481 * term/i386/pc/console.c (grub_console_term): Split into ...
1482 (grub_console_term_input): ... this, and ...
1483 (grub_console_term_output): ... this. Update all users.
1484 (grub_console_term_input): Only enable it on PC/BIOS platform.
1485 (grub_console_init): Remove grub_keyboard_controller_init() call.
1486
1487 Migrate input terminals to new API:
1488
1489 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
1490 `i386' and `i386/pc' to enable build on x86_64 (this driver is
1491 i386-specific anyway).
1492 (grub_console_checkkey): Rename to ...
1493 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
1494 users.
1495 (grub_keyboard_controller_orig): New variable.
1496 (grub_console_getkey): Rename to ...
1497 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
1498 users.
1499 (grub_keyboard_controller_init): Static-ize. Save original
1500 controller value so that it can be restored ...
1501 (grub_keyboard_controller_fini): ... here (new function).
1502 (grub_at_keyboard_term): New structure.
1503 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
1504 functions.
1505
1506 Migrate output terminals to new API:
1507
1508 * term/i386/pc/vga.c (grub_vga_term): Change type to
1509 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1510 members. Update all users.
1511 * term/gfxterm.c (grub_video_term): Change type to
1512 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1513 members. Update all users.
1514 * include/grub/i386/pc/console.h (grub_console_checkkey)
1515 (grub_console_getkey): Do not export (no longer needed by gfxterm,
1516 etc).
1517
1518 Migrate `terminal' command and userland tools to new API:
1519
1520 * commands/terminal.c (grub_cmd_terminal): Split into ...
1521 (grub_cmd_terminal_input): ... this, and ...
1522 (grub_cmd_terminal_output): ... this.
1523 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
1524 `terminal_input' and `terminal_output'.
1525 * util/grub.d/00_header.in: Adjust `terminal' calls to new
1526 `terminal_input' / `terminal_output' API.
1527 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
1528 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
1529 provided ${GRUB_TERMINAL}, convert it).
1530
96e5d876 15312008-11-04 Robert Millan <rmh@aybabtu.com>
1532
1533 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
1534 for FreeBSD.
1535 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
1536
556f3775 15372008-11-03 Bean <bean123ch@gmail.com>
1538
1539 * kern/elf.c (grub_elf32_load): Revert to previous code.
1540 (grub_elf64_load): Likewise.
1541
1542 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
1543
926b9823 15442008-11-01 Robert Millan <rmh@aybabtu.com>
1545
1546 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
1547 (TARGET_CPPFLAGS): Likewise.
1548 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
1549
1432e958 15502008-11-01 Carles Pina i Estany <carles@pina.cat>
1551
1552 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
1553
dba3f844 15542008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 1555
1556 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
1557 addition of objects until the code is not going to be able to fail.
1558
dba3f844 15592008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 1560
1561 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
1562 (add a missing NULL check, and correct them by moving the pointer
1563 operations after the actual check).
1564
7ab28c21 15652008-10-29 Robert Millan <rmh@aybabtu.com>
1566
1567 * util/i386/pc/grub-install.in: Handle empty string as output from
1568 make_system_path_relative_to_its_root().
1569
1b7748eb 15702008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
1571
1572 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
1573 circular metadata worst case scenario. If the metadata is circular
1574 then copy the wrap in place.
1575 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
1576 project lib/format_text/layout.h
1577 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
1578
c9618ab2 15792008-10-03 Felix Zielcke <fzielcke@z-51.de>
1580
7a36edca 1581 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 1582
bf981c62 15832008-10-03 Felix Zielcke <fzielcke@z-51.de>
1584
1585 * util/update-grub_lib.in: Mention filename in warning message.
1586
6d994591 15872008-09-29 Felix Zielcke <fzielcke@z-51.de>
1588
1589 * NEWS: Update for rename of update-grub to grub-mkconfig.
1590
18ade780 15912008-09-29 Felix Zielcke <fzielcke@z-51.de>
1592
1593 * util/update-grub_lib.in: Copy to ...
1594 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 1595 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 1596 * util/update-grub.in: Rename to ...
1597 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
1598 option. Add `--output' option to allow users to specify the generated
1599 configuration file. Default to stdout.
1600 (update_grub_dir): Rename to ...
1601 (grub_mkconfig_dir): ... this.
1602 (grub_cfg): Default to an empty string.
1603 * conf/common.rmk (update-grub): Rename to ...
1604 (grub-mkconfig): ... this.
1605 (update-grub_lib): Copy to ...
1606 (grub-mkconfig_lib): ... this.
1607 (update-grub_SCRIPTS): Copy to ...
1608 (grub-mkconfig_SCRIPTS): ... this. Update all users.
1609 (update-grub_DATA): Rename to ...
1610 (grub-mkconfig_DATA): ... this.
1611
556ce6ac 16122008-09-28 Robert Millan <rmh@aybabtu.com>
1613
1614 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
1615 to `modified'. Add the real `created' field.
1616 (grub_iso9660_uuid): Use `modified' rather than `created' for
1617 constructing the UUID.
1618
16192008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 1620
1621 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
1622 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
1623
92274e85 16242008-09-28 Bean <bean123ch@gmail.com>
1625
1626 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
1627 Thanks to Christian Franke for finding this bug.
1628
add6f17a 16292008-09-25 Robert Millan <rmh@aybabtu.com>
1630
1631 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
1632 instances of grub_util_get_disk_name() (see previous commit).
1633
d2a367b8 16342008-09-25 Robert Millan <rmh@aybabtu.com>
1635
1636 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
1637 `util/i386/get_disk_name.c'.
1638 * conf/i386-efi.rmk: Likewise.
1639 * conf/x86_64-efi.rmk: Likewise.
1640 * conf/i386-coreboot.rmk: Likewise.
1641 * conf/i386-ieee1275.rmk: Likewise.
1642 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
1643 `util/ieee1275/get_disk_name.c'.
1644 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
1645 * util/ieee1275/get_disk_name.c: Remove file.
1646 * util/i386/get_disk_name.c: Remove file.
1647 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
1648 "hd%d" for device.map entries, rather than using
1649 grub_util_get_disk_name().
1650
81a06771 16512008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 1652
1653 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
1654 warning.
1655 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
1656
5a004279 16572008-09-24 Carles Pina i Estany <carles@pina.cat>
1658
1659 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
1660 Changed to 0x5100.
1661 (GRUB_TERM_PPAGE): Changed to 0x4900.
1662
397093d3 16632008-09-24 Robert Millan <rmh@aybabtu.com>
1664
1665 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
1666 macros (they were i386-pc specific).
1667 * include/grub/sparc64/ieee1275/console.h: Likewise.
1668 * include/grub/efi/console.h: Likewise.
1669
a91b6c7c 16702008-09-22 Bean <bean123ch@gmail.com>
1671
1672 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
1673 resident and in attribute list.
1674
1675 * include/grub/ntfs.h (BMP_LEN): Removed.
1676
c40fd116 16772008-09-22 Bean <bean123ch@gmail.com>
1678
81a06771 1679 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 1680 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
1681
1682 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
1683 error occurs, as grub_disk_open will call grub_disk_close, which will
1684 call p->close (scsi).
1685
81a06771 16862008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 1687
1688 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
1689 (AC_PREREQ): Bumped to 2.59.
1690 (AC_TRY_COMPILE): Replace obsolete macro with ...
1691 (AC_COMPILE_IFELSE): ... this.
1692 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
1693 (AC_LINK_IFELSE): ... this.
1694
5dc43410 16952008-09-21 Felix Zielcke <fzielcke@z-51.de>
1696
1697 * autogen.sh: Add a call to `gendistlist.sh'.
1698
9035dce4 16992008-09-19 Christian Franke <franke@computer.org>
1700
1701 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
1702 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
1703 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
1704 Export __enable_execute_stack() to modules.
1705 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
1706 New function.
1707
7fd75377 17082008-09-09 Felix Zielcke <fzielcke@z-51.de>
1709
040030b3 1710 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
1711 Sort the list.
1712
17132008-09-09 Felix Zielcke <fzielcke@z-51.de>
1714
1715 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 1716 #include <grub/util/hostdisk.h>.
1717
89d5ffcf 17182008-09-08 Robert Millan <rmh@aybabtu.com>
1719
1720 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
1721 segments when their filesz is zero (grub_file_read() interprets
81a06771 1722 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 1723 Use `lowest_segment' rather than 0 for calculating the current
1724 segment load address.
1725
40da438f 17262008-09-08 Robert Millan <rmh@aybabtu.com>
1727
1728 * util/hostdisk.c (open_device): Replace a grub_util_info() call
1729 with grub_dprintf("hostdisk", ...), as it was so verbose that it
1730 clobbered useful information.
1731
ddbf5556 17322008-09-08 Robert Millan <rmh@aybabtu.com>
1733
1734 * include/grub/util/biosdisk.h: Move to ...
1735 * include/grub/util/hostdisk.h: ... here. Update all users.
1736 * util/biosdisk.c: Move to ...
1737 * util/hostdisk.c: ... here. Update all users.
1738
783d0f48 17392008-09-07 Robert Millan <rmh@aybabtu.com>
1740
1741 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
1742 variables.
1743 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
1744 and length can be stored directly in the `mbi->mmap_addr' and
1745 `mbi->mmap_length' struct fields.
1746
548e2ea5 17472008-09-07 Robert Millan <rmh@aybabtu.com>
1748
1749 * conf/i386.rmk: New file. Provides declaration for building
1750 `cpuid.mod'.
1751 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
1752 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
1753 variables.
1754 Include `conf/i386.mk'.
1755 * conf/i386-efi.rmk: Likewise.
1756 * conf/x86_64-efi.rmk: Likewise.
1757 * conf/i386-coreboot.rmk: Likewise.
1758 * conf/i386-ieee1275.rmk: Likewise.
1759
0ea85a37 17602008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
1761
1762 Based on patch created by Colin D Bennett <colin@gibibit.com>.
1763 Adds optimization support for BGR based modes.
1764
1765 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
1766 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1767 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1768 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1769 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1770 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1771 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1772 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1773 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1774 (grub_video_i386_vbeblit_index_index): Likewise.
1775 (grub_video_i386_vbeblit_replace_directN): Added.
1776 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1777 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1778 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1779 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1780 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1781 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 1782 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 1783 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1784 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1785 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1786 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1787 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1788 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1789
1790 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
1791 (grub_video_i386_vbefill_R8G8B8): Likewise.
1792 (grub_video_i386_vbefill_index): Likewise.
1793 (grub_video_i386_vbefill_direct32): Added.
1794 (grub_video_i386_vbefill_direct24): Likewise.
1795 (grub_video_i386_vbefill_direct16): Likewise.
1796 (grub_video_i386_vbefill_direct8): Likewise.
1797
81a06771 1798 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 1799 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
1800 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
1801 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
1802 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
1803 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 1804
0ea85a37 1805 * video/video.c (grub_video_get_blit_format): Updated to use new
1806 blit formats. Added handling for 16 bit color modes.
81a06771 1807
1808 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 1809 fillers.
1810 (common_blitter): Updated to use new blitters.
1811
1812 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
1813 Removed.
1814 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1815 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1816 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1817 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1818 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1819 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1820 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1821 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1822 (grub_video_i386_vbeblit_index_index): Likewise.
1823 (grub_video_i386_vbeblit_replace_directN): Added.
1824 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1825 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1826 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1827 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1828 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1829 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1830 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1831 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1832 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1833 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1834 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1835 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1836 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 1837
0ea85a37 1838 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1839 (grub_video_i386_vbefill_R8G8B8): Likewise.
1840 (grub_video_i386_vbefill_index): Likewise.
1841 (grub_video_i386_vbefill_direct32): Added.
1842 (grub_video_i386_vbefill_direct24): Likewise.
1843 (grub_video_i386_vbefill_direct16): Likewise.
1844 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 1845
0ea85a37 1846 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1847 types.
81a06771 1848
0ea85a37 1849 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1850 types.
81a06771 1851
0ea85a37 1852 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1853 blitter types.
81a06771 1854
0ea85a37 1855 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1856 types.
1857
e8a83df6 18582008-09-06 Felix Zielcke <fzielcke@z-51.de>
1859
1860 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1861 RAID level 1.
1862
6bcd8ee5 18632008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 1864
6bcd8ee5 1865 * fs/iso9660.c (grub_iso9660_date): New structure.
1866 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1867 (grub_iso9660_uuid): New function.
c375ae58 1868
59261157 18692008-09-05 Bean <bean123ch@gmail.com>
1870
1871 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1872
1873 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1874 insensitive bit for names in Win32 and Win32 & DOS namespace.
1875
1876 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1877
1878 * include/grub/types.h (LONG_MAX): Likewise.
1879
58b6645a 18802008-09-04 Felix Zielcke <fzielcke@z-51.de>
1881
4ee55921 1882 * util/getroot.c: Include <config.h>.
1883 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1884 add support for /dev/md/N devices and handle LVM double dash escaping.
1885
18862008-09-04 Felix Zielcke <fzielcke@z-51.de>
1887
1888 * config.guess: Update to latest version from config git.
1889 * config.sub: Likewise.
58b6645a 1890
9124f65d 18912008-09-03 Robert Millan <rmh@aybabtu.com>
1892
1893 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1894 `disk->total_sectors'.
1895
81a06771 18962008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 1897
1898 * include/grub/normal.h: Fixed incorrect comment for
1899 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1900
81a06771 19012008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 1902
1903 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1904 values with defines.
1905
1906 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1907 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1908 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1909 (GRUB_VBE_MODEATTR_COLOR): Likewise.
1910 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1911 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1912 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1913 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1914 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1915 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1916 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1917 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1918 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1919 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1920 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1921 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1922 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1923 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1924 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1925
93d5cbf8 19262008-08-31 Robert Millan <rmh@aybabtu.com>
1927
1928 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1929 declaration.
1930 (grub_multiboot): Fix a few warnings.
1931
21751d50 19322008-08-31 Robert Millan <rmh@aybabtu.com>
1933
1934 * loader/i386/pc/multiboot.c: Update comment not to say that
1935 boot_device support is unimplemented.
1936
e27a75c5 19372008-08-31 Robert Millan <rmh@aybabtu.com>
1938
1939 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1940 or memory map support are unimplemented.
1941
81a06771 19422008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 1943
1944 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1945
81a06771 19462008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 1947
1948 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1949 total video memory in 'vbeinfo' output; show color format details for
1950 each video mode.
1951
7c5d8d95 19522008-08-30 Pavel Roskin <proski@gnu.org>
1953
1954 * util/genmoddep.c: Remove for real this time.
1955 * DISTLIST: Remove util/genmoddep.c.
1956
4cebd25a 19572008-08-30 Robert Millan <rmh@aybabtu.com>
1958
1959 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1960 as required by Multiboot spec (it was already 4-byte aligned, but
1961 only by chance).
1962
b497a269 19632008-08-29 Pavel Roskin <proski@gnu.org>
1964
e3925185 1965 * kern/powerpc/ieee1275/crt0.S: Rename to ...
1966 * kern/powerpc/ieee1275/startup.S: ... this.
1967 * conf/powerpc-ieee1275.rmk: Adjust for the above.
1968 * DISTLIST: Likewise.
1969
b497a269 1970 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
1971 grub/cpu/kernel.h. Add start label for consistency with other
1972 platforms. Add grub_prefix immediately after start. Add jump
1973 to the code after grub_prefix.
1974 * include/grub/powerpc/kernel.h: Provide valid values for
1975 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
1976
6e5a42fe 19772008-08-29 Bean <bean123ch@gmail.com>
1978
1979 * configure.ac: Change host_os to cygwin for mingw.
1980 (asprintf): New check for function.
1981
1982 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
1983 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
1984
1985 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 1986 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 1987 sync, sleep and grub_util_get_disk_size for mingw.
1988
1989 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
1990 to get size in mingw.
1991 (open_device): Use flag O_BINARY if it's defined.
1992 (find_root_device): Add dummy code for mingw.
1993
1994 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
1995 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
1996 (get_scsi_disk_name): Return 0 for mingw.
1997
1998 * util/hostfs.c: #include <grub/util/misc.h>.
1999 (grub_hostfs_open): Use "rb" flag to open file, use
2000 grub_util_get_disk_size to get disk size for mingw.
2001
2002 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
2003 (asprintf): New function if HAVE_ASPRINTF is not set.
2004 (sync): New function for mingw.
2005 (sleep): Likewise.
2006 (grub_util_get_disk_size): Likewise.
2007
ab3f2673 20082008-08-28 Pavel Roskin <proski@gnu.org>
2009
2010 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2011 kern/time.c.
2012
1c282483 20132008-08-28 Robert Millan <rmh@aybabtu.com>
2014
2015 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
2016
678e849c 20172008-08-28 Robert Millan <rmh@aybabtu.com>
2018
2019 Change find_grub_drive() syntax so it doesn't prevent it from
2020 detecting NULL names as errors.
2021
2022 * util/biosdisk.c (find_grub_drive): Move free slot search code
2023 from here ...
2024 (find_free_slot): ... to here.
2025 (read_device_map): Use find_free_slot() to search for free slots.
2026
965c75ca 20272008-08-27 Marco Gerards <marco@gnu.org>
2028
2029 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
2030 (scsi_mod_SOURCES): New variable.
2031 (scsi_mod_CFLAGS): Likewise
2032 (scsi_mod_LDFLAGS): Likewise.
2033
2034 * disk/scsi.c: New file.
2035
2036 * include/grub/scsi.h: Likewise.
2037
2038 * include/grub/scsicmd.h: Likewise.
2039
2040 * disk/ata.c: Include <grub/scsi.h>.
2041 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
2042 instead.
2043 (grub_ata_iterate): Skip ATAPI devices.
2044 (grub_ata_open): Only handle ATAPI devices.
2045 (struct grub_atapi_read): Removed.
2046 (grub_atapi_readsector): Likewise.
2047 (grub_ata_read): No longer handle ATAPI devices.
2048 (grub_ata_write): Likewise.
2049 (grub_atapi_iterate): New function.
2050 (grub_atapi_read): Likewise.
2051 (grub_atapi_write): Likewise.
2052 (grub_atapi_open): Likewise.
2053 (grub_atapi_close): Likewise.
2054 (grub_atapi_dev): New variable.
2055 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
2056 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
2057
2058 * include/grub/disk.h (enum grub_disk_dev_id): Add
2059 `GRUB_DISK_DEVICE_SCSI_ID'.
2060
c07ae501 20612008-08-26 Robert Millan <rmh@aybabtu.com>
2062
2063 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
2064 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
2065 descriptive.
2066
5ed20adc 20672008-08-23 Bean <bean123ch@gmail.com>
2068
2069 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
2070 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2071 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
2072 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
2073 dm_nv.mod.
2074 (raid5rec_mod_SOURCES): New macro.
2075 (raid5rec_mod_CFLAGS): Likewise.
2076 (raid5rec_mod_LDFLAGS): Likewise.
2077 (raid6rec_mod_SOURCES): Likewise.
2078 (raid6rec_mod_CFLAGS): Likewise.
2079 (raid6rec_mod_LDFLAGS): Likewise.
2080 (mdraid_mod_SOURCES): Likewise.
2081 (mdraid_mod_CFLAGS): Likewise.
2082 (mdraid_mod_LDFLAGS): Likewise.
2083 (dm_nv_mod_SOURCES): Likewise.
2084 (dm_nv_mod_CFLAGS): Likewise.
2085 (dm_nv_mod_LDFLAGS): Likewise.
2086
2087 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
2088 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
2089 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2090
2091 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
2092 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
2093
2094 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2095
2096 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2097
2098 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2099
2100 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2101
2102 * disk/raid5_recover.c: New file.
2103
2104 * disk/raid6_recover.c: Likewise.
2105
2106 * disk/mdraid_linux.c: Likewise.
2107
2108 * disk/dmraid_nvidia.c: Likewise.
2109
2110 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
2111 ULONG_MAX.
2112
2113 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
2114 calculate the size of raid device.
2115 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
2116 different layout of raid5.
2117 (grub_raid_scan_device): Remove code specific to mdraid.
2118 (grub_raid_list): New variable.
2119 (free_array): New function.
2120 (grub_raid_register): Likewise.
2121 (grub_raid_unregister): Likewise.
2122 (grub_raid_rescan): Likewise.
2123 (GRUB_MOD_INIT): Don't iterate device here.
2124 (GRUB_MOD_FINI): Use free_array to release resource.
2125
2126 * include/grub/raid.h: Remove macro and structure specific to mdraid.
2127 (grub_raid5_recover_func_t): New function variable type.
2128 (grub_raid6_recover_func_t): Likewise.
2129 (grub_raid5_recover_func): New variable.
2130 (grub_raid6_recover_func): Likewise.
2131 (grub_raid_register): New function.
2132 (grub_raid_unregister): Likewise.
2133 (grub_raid_rescan): Likewise.
2134 (grub_raid_block_xor): Likewise.
2135
2136 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
2137 (CMD_CRC): New macro.
2138 (part): Removed.
2139 (read_file): Handle device as well as file.
2140 (cmd_crc): New function.
2141 (fstest): Handle multiple disks.
2142 (options): Remove part, raw and long, add root and diskcount.
2143 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 2144 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 2145 add handling for the new options, support multiple disks.
2146
2147 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
2148
29c18915 21492008-08-23 Bean <bean123ch@gmail.com>
2150
2151 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
2152
2153 * genfslist.sh: Ignore kernel.mod.
2154
2155 * genpartmaplist.sh: Likewise.
2156
8415f261 21572008-08-23 Robert Millan <rmh@aybabtu.com>
2158
2159 * util/getroot.c (find_root_device): Skip anything that starts with
2160 a dot, not just directories. This avoids things like /dev/.tmp.md0.
2161
d5a7dc5b 21622008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 2163
d5a7dc5b 2164 * util/update-grub.in (GRUB_GFXMODE): Export variable.
2165 * util/grub.d/00_header.in: Allow the administrator to change default
2166 gfxmode via ${GRUB_GFXMODE}.
2167
380cfbb4 21682008-08-21 Felix Zielcke <fzielcke@z-51.de>
2169
2170 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
2171
c9baafe7 21722008-08-21 Robert Millan <rmh@aybabtu.com>
2173
2174 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
2175 loader.
2176 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
2177 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
2178
e290bef2 21792008-08-20 Carles Pina i Estany <carles@pina.cat>
2180
2181 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
2182 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
2183
f9dbfc96 21842008-08-19 Robert Millan <rmh@aybabtu.com>
2185
2186 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
2187 (struct grub_virtual_screen): Remove `cursor_color'.
2188 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
2189 initialization.
2190 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
2191
dd6bd6ab 21922008-08-18 Robert Millan <rmh@aybabtu.com>
2193
2194 Unify (identical) linux_normal.c files.
2195 * loader/i386/efi/linux_normal.c: Move from here ...
2196 * loader/linux_normal.c: ... to here. Update all users.
2197 * loader/i386/pc/linux_normal.c: Delete. Update all users.
2198 * loader/i386/ieee1275/linux_normal.c: Likewise.
2199
7f42f83e 22002008-08-18 Robert Millan <rmh@aybabtu.com>
2201
2202 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
2203 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
2204 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
2205 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
2206 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
2207 New macros.
2208 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
2209 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
2210 (GRUB_LINUX_CL_END_OFFSET): ... to here.
2211 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
2212 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
2213 (GRUB_EFI_CL_END_OFFSET): Rename to ...
2214 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
2215 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
2216 Initialize `params->video_cursor_x' and `params->video_cursor_y'
2217 portably using grub_getxy().
2218 Replace `-EFI' with `-bzImage' in boot message.
2219
38487ddb 22202008-08-17 Robert Millan <rmh@aybabtu.com>
2221
2222 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
2223
deceb3ec 22242008-08-17 Robert Millan <rmh@aybabtu.com>
2225
2226 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
2227
2228 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
2229 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
2230 (grub_machine_mmap_iterate): New function declaration.
2231 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
2232 structure.
2233 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
2234 macros.
2235
2236 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
2237 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
2238 Move e820 parsing from here ...
2239 * kern/i386/pc/mmap.c: New file.
2240 (grub_machine_mmap_iterate): ... to here.
2241
2242 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
2243 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
2244 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
2245 (grub_available_iterate): Redeclare to return `void', and redeclare
2246 its hook to use grub_uint64_t as addr and size parameters, and rename
2247 to ...
2248 (grub_machine_mmap_iterate): ... this. Update all users.
2249
2250 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
2251 to make it more readable. Rename to ...
2252 (grub_machine_mmap_iterate): ... this.
2253
2254 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
2255 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
2256 (grub_multiboot): Allocate an extra region after the payload, and fill
2257 it with a Multiboot memory map. Adjust a.out loader to calculate size
2258 with the extra space.
2259 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
2260 with the extra space.
2261
f8aa0f43 22622008-08-17 Carles Pina i Estany <carles@pina.cat>
2263
9807deb9 2264 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 2265
605f5bb6 22662008-08-17 Felix Zielcke <fzielcke@z-51.de>
2267
2268 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
2269 mdate-sh to the list `find' searches for.
2270 * DISTLIST: Regenerated.
2271
210db6c6 22722008-08-16 Felix Zielcke <fzielcke@z-51.de>
2273
2274 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
2275 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 2276 genmoddep.awk, gensymlist.sh.in.
2277 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 2278 * DISTLIST: Regenerated.
48cdbfd4 2279 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 2280
1082b929 22812008-08-16 Robert Millan <rmh@aybabtu.com>
2282
2283 * disk/raid.c (grub_raid_init): Handle/report errors set by
2284 grub_device_iterate().
2285 * disk/lvm.c (grub_lvm_init): Likewise.
2286
42ce5170 22872008-08-15 Bean <bean123ch@gmail.com>
2288
2289 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2290 and datehook.mod.
2291 (datetime_mod_SOURCES): New macro.
2292 (datetime_mod_CFLAGS): Likewise.
2293 (datetime_mod_LDFLAGS): Likewise.
2294 (date_mod_SOURCES): Likewise.
2295 (date_mod_CFLAGS): Likewise.
2296 (date_mod_LDFLAGS): Likewise.
2297 (datehook_mod_SOURCES): Likewise.
2298 (datehook_mod_CFLAGS): Likewise.
2299 (datehook_mod_LDFLAGS): Likewise.
2300
2301 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2302 and datehook.mod.
2303 (datetime_mod_SOURCES): New macro.
2304 (datetime_mod_CFLAGS): Likewise.
2305 (datetime_mod_LDFLAGS): Likewise.
2306 (date_mod_SOURCES): Likewise.
2307 (date_mod_CFLAGS): Likewise.
2308 (date_mod_LDFLAGS): Likewise.
2309 (datehook_mod_SOURCES): Likewise.
2310 (datehook_mod_CFLAGS): Likewise.
2311 (datehook_mod_LDFLAGS): Likewise.
2312
2313 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2314 and datehook.mod.
2315 (datetime_mod_SOURCES): New macro.
2316 (datetime_mod_CFLAGS): Likewise.
2317 (datetime_mod_LDFLAGS): Likewise.
2318 (date_mod_SOURCES): Likewise.
2319 (date_mod_CFLAGS): Likewise.
2320 (date_mod_LDFLAGS): Likewise.
2321 (datehook_mod_SOURCES): Likewise.
2322 (datehook_mod_CFLAGS): Likewise.
2323 (datehook_mod_LDFLAGS): Likewise.
2324
2325 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2326 and datehook.mod.
2327 (datetime_mod_SOURCES): New macro.
2328 (datetime_mod_CFLAGS): Likewise.
2329 (datetime_mod_LDFLAGS): Likewise.
2330 (date_mod_SOURCES): Likewise.
2331 (date_mod_CFLAGS): Likewise.
2332 (date_mod_LDFLAGS): Likewise.
2333 (datehook_mod_SOURCES): Likewise.
2334 (datehook_mod_CFLAGS): Likewise.
2335 (datehook_mod_LDFLAGS): Likewise.
2336
2337 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2338 and datehook.mod.
2339 (datetime_mod_SOURCES): New macro.
2340 (datetime_mod_CFLAGS): Likewise.
2341 (datetime_mod_LDFLAGS): Likewise.
2342 (date_mod_SOURCES): Likewise.
2343 (date_mod_CFLAGS): Likewise.
2344 (date_mod_LDFLAGS): Likewise.
2345 (datehook_mod_SOURCES): Likewise.
2346 (datehook_mod_CFLAGS): Likewise.
2347 (datehook_mod_LDFLAGS): Likewise.
2348
2349 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
2350
2351 * commands/date.c: New file.
2352
2353 * hook/datehook.c: Likewise.
2354
2355 * include/grub/lib/datetime.h: Likewise.
2356
2357 * include/grub/i386/cmos.h: Likewise.
2358
2359 * lib/datetime.c: Likewise.
2360
2361 * lib/i386/datetime.c: Likewise.
2362
2363 * lib/efi/datetime.c: Likewise.
2364
0e9242da 23652008-08-14 Robert Millan <rmh@aybabtu.com>
2366
2367 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
2368 (grub_mkelfimage_SOURCES): New variable.
2369 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
2370
2371 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
2372 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
2373 * conf/powerpc-ieee1275.rmk: Likewise.
2374 * conf/i386-ieee1275.rmk: Likewise.
2375
2376 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
2377 * kern/i386/coreboot/init.c: Likewise.
2378
2379 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
2380 with `<grub/cpu/kernel.h>'.
2381 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
2382 to ...
2383 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
2384 * kern/i386/coreboot/startup.S: Likewise.
2385
2386 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
2387 (GRUB_MOD_GAP): Remove.
2388 * include/grub/powerpc/kernel.h: New file.
2389 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
2390 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2391 * include/grub/i386/kernel.h: New file.
2392 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
2393 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
2394 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2395
2396 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
2397 `grub-mkelfimage'.
2398 Use --directory when invoking grub_mkimage.
2399
2400 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
2401 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
2402 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
2403 and GRUB_KERNEL_CPU_PREFIX.
2404
b86408f8 24052008-08-14 Felix Zielcke <fzielcke@z-51.de>
2406
d5e619ca 2407 * include/grub/err.h (grub_err_printf): New function prototype.
2408 * util/misc.c (grub_err_printf): New function.
2409 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
2410 grub_printf.
2411 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 2412
7161f0e0 24132008-08-13 Robert Millan <rmh@aybabtu.com>
2414
2415 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
2416
a1967522 24172008-08-13 Robert Millan <rmh@aybabtu.com>
2418
2419 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
2420 boot entry.
2421
371458b5 24222008-08-12 Robert Millan <rmh@aybabtu.com>
2423
2424 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
2425 of the relocation code from here ...
2426 (grub_multiboot): ... to here.
2427 (forward_relocator, backward_relocator): Move from here ...
2428 * kern/i386/loader.S (grub_multiboot_forward_relocator)
2429 (grub_multiboot_backward_relocator): ... to here.
2430 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
2431 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
2432 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
2433 (grub_multiboot_forward_relocator_end)
2434 (grub_multiboot_backward_relocator)
2435 (grub_multiboot_backward_relocator_end): New variables.
2436
05f9452b 24372008-08-12 Bean <bean123ch@gmail.com>
2438
2439 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
2440
20024ab0 24412008-08-11 Robert Millan <rmh@aybabtu.com>
2442
2443 * kern/i386/linuxbios/startup.S: Move from here ...
2444 * kern/i386/coreboot/startup.S: ... to here.
2445
2446 * kern/i386/linuxbios/init.c: Move from here ...
2447 * kern/i386/coreboot/init.c: ... to here.
2448
2449 * kern/i386/linuxbios/table.c: Move from here ...
2450 * kern/i386/coreboot/mmap.c: ... to here.
2451
2452 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
2453
e352e9cd 24542008-08-11 Robert Millan <rmh@aybabtu.com>
2455
2456 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
2457 errors. Leave it to the upper layer to handle them.
2458
2d05bc6a 24592008-08-09 Christian Franke <franke@computer.org>
2460
2461 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
2462 * conf/common.rmk: Install `grub-pe2elf' only if requested.
2463 Install `grub.d/10_windows' only on Cygwin.
2464 * configure.ac: Add subst of `target_os'.
2465 Check `target_os' also before setting TARGET_OBJ2ELF.
2466 Add `--enable-grub-pe2elf'.
2467
042bd419 24682008-08-08 Robert Millan <rmh@aybabtu.com>
2469
2470 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2471 (grub_last_time): Change type to grub_uint64_t.
2472 (grub_disk_open): Migrate code from to using grub_get_time_ms().
2473 (grub_disk_close): Likewise.
2474
2475 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2476 (run_menu): Migrate code from to using grub_get_time_ms().
2477
2478 * util/misc.c (grub_get_time_ms): New function.
2479
7f280db5 24802008-08-08 Marco Gerards <marco@gnu.org>
2481
2482 * disk/ata.c (grub_ata_regget): Change return type to
2483 `grub_uint8_t'.
2484 (grub_ata_regget2): Likewise.
2485 (grub_ata_wait_status): New function.
2486 (grub_ata_wait_busy): Removed function, updated all users to use
2487 `grub_ata_wait_status'.
2488 (grub_ata_wait_drq): Likewise.
2489 (grub_ata_cmd): New function.
2490 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
2491 error handling.
2492 (grub_ata_pio_write): Add error handling.
2493 (grub_atapi_identify): Likewise.
2494 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
2495 handling.
2496 (grub_ata_identify): Use `grub_ata_cmd' and improve error
2497 handling. Actually use the detected registers. Reorder the
2498 detection logic such that it is easier to read.
2499 (grub_ata_pciinit): Do not assign the same ID to each controller.
2500 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
2501 handling.
2502 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
2503
2504 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
2505
1fbc5e66 25062008-08-08 Marco Gerards <marco@gnu.org>
2507
2508 * NEWS: Update.
2509
819ce6c0 25102008-08-07 Bean <bean123ch@gmail.com>
2511
2512 * include/grub/x86_64/pci.h: New file.
2513
5c41d44d 25142008-08-07 Christian Franke <franke@computer.org>
2515
2516 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
2517 (TIMER2_GATE): Likewise.
2518 (grub_pit_wait): Add enable/disable of the timer2 gate
2519 bit of port 0x61. This fixes a possible infinite loop.
2520
5ebc275d 25212008-08-07 Bean <bean123ch@gmail.com>
2522
2523 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
2524 kern/i386/tsc.c and kern/i386/pit.c.
2525
2526 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
2527 x86_64 platform.
2528
2529 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
2530 <grub/i386/tsc.h>.
2531
2532 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
2533
e383b3d0 25342008-08-07 Bean <bean123ch@gmail.com>
2535
2536 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
2537
2538 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
2539
2540 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
2541 multiple inclusion. Add #include <grub/types.h>.
2542
1cbb58ac 25432008-08-06 Christian Franke <franke@computer.org>
2544
2545 * conf/common.rmk: Build and install `10_windows'.
2546 * util/grub.d/10_windows.in: New script.
2547
337f5a1e 25482008-08-06 Pavel Roskin <proski@gnu.org>
2549
2550 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
2551
057bc4ac 25522008-08-06 Robert Millan <rmh@aybabtu.com>
2553
2554 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
2555 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
2556
2b99f123 25572008-08-06 Bean <bean123ch@gmail.com>
2558
2559 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
2560 (grub_pxefs_fs_int): Remove dummy definition.
2561 (grub_pxefs_open): Use data->block_size to store the current block
2562 size setting.
2563 (grub_pxefs_read): Use block size stored in data->block_size. As the
2564 value of grub_pxe_blksize can be changed after the file is opened.
2565
9f0234cb 25662008-08-06 Bean <bean123ch@gmail.com>
2567
2568 * fs/i386/pc/pxe.c (curr_file): new variable.
2569 (grub_pxefs_open): Simply the handling of pxe file system. Don't
2570 require the dummy internal file system anymore.
2571 (grub_pxefs_read): Removed.
2572 (grub_pxefs_close): Likewise.
2573 (grub_pxefs_fs_int): Likewise.
2574 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
2575 connection when we switch file.
2576 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
2577
a55d42e0 25782008-08-06 Robert Millan <rmh@aybabtu.com>
2579
2580 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
2581 `halt.mod'.
2582 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
2583 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
2584
2585 * kern/i386/halt.c: New file.
2586 * kern/i386/reboot.c: Likewise.
2587 * include/grub/i386/reboot.h: Likewise.
2588 * include/grub/i386/halt.h: Likewise.
2589
2590 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
2591 Include `<grub/cpu/halt.h>'.
2592 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
2593 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
2594
2595 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
2596 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
2597 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
2598 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
2599 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
2600 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
2601 from here ...
2602 * include/grub/i386/at_keyboard.h: ... to here.
2603
24371d26 26042008-08-05 Robert Millan <rmh@aybabtu.com>
2605
2606 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
2607 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
2608 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
2609 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2610 `kern/generic/millisleep.c'.
2611
2612 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
2613 instead of grub_get_rtc().
2614 (grub_tsc_init): Initialize `tsc_boot_time'.
2615
2616 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
2617 (grub_machine_init): Use grub_tsc_init() rather than
2618 installing an RTC-based handler via grub_install_get_time_ms().
2619
2620 * kern/i386/pit.c: New file.
2621 * include/grub/i386/pit.h: Likewise.
2622
9e7007b3 26232008-08-05 Bean <bean123ch@gmail.com>
2624
2625 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
2626
2627 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
2628 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
2629 (pxe_mod_SOURCES): New macro.
2630 (pxe_mod_CFLAGS): Likewise.
2631 (pxe_mod_LDFLAGS): Likewise.
2632 (pxecmd_mod_SOURCES): Likewise.
2633 (pxecmd_mod_CFLAGS): Likewise.
2634 (pxecmd_mod_LDFLAGS): Likewise.
2635
2636 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
2637 (grub_pxe_call): Likewise.
2638
2639 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
2640
2641 * commands/i386/pc/pxecmd.c: New file.
2642
9f0234cb 2643 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 2644
2645 * include/grub/i386/pc/pxe.h: Likewise.
2646
6977d49f 26472008-08-05 Bean <bean123ch@gmail.com>
2648
2649 * util/console.c (grub_console_cur_color): New variable.
2650 (grub_console_standard_color): Likewise.
2651 (grub_console_normal_color): Likewise.
2652 (grub_console_highlight_color): Likewise.
2653 (color_map): Likewise.
2654 (use_color): Likewise.
2655 (NUM_COLORS): New macro.
2656 (grub_ncurses_setcolorstate): Handle color properly.
2657 (grub_ncurses_setcolor): Don't change color here, just remember the
2658 settings, color will be set in grub_ncurses_setcolorstate.
2659 (grub_ncurses_getcolor): New function.
2660 (grub_ncurses_init): Initialize color pairs.
2661 (grub_ncurses_term): New member grub_ncurses_getcolor.
2662
9c2ff3ee 26632008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 2664
9c2ff3ee 2665 High resolution timer support. Implemented for x86 CPUs using TSC.
2666 Extracted generic grub_millisleep() so it's linked in only as needed.
2667 This requires a Pentium compatible CPU; if the RDTSC instruction is
2668 not supported, then it falls back on the generic grub_get_time_ms()
2669 implementation that uses the machine's RTC.
2670
2671 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
2672 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2673 `kern/generic/millisleep.c'.
2674
2675 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
2676 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
2677
2678 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
2679 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
2680
2681 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2682
2683 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2684 `kern/generic/millisleep.c'.
2685
2686 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2687
2688 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
2689
2690 * kern/generic/rtc_get_time_ms.c: New file.
2691
2692 * kern/generic/millisleep.c: New file.
337f5a1e 2693
9c2ff3ee 2694 * kern/misc.c: Don't include
2695 <kern/time.h> anymore.
2696 (grub_millisleep_generic): Removed.
2697
2698 * commands/sleep.c (grub_interruptible_millisleep): Uses
2699 grub_get_time_ms() instead of grub_get_rtc().
2700
2701 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
2702 function.
2703 (grub_cpu_is_cpuid_supported): New inline function.
2704 (grub_cpu_is_tsc_supported): New inline function.
2705 (grub_tsc_init): New function prototype.
2706 (grub_tsc_get_time_ms): New function prototype.
2707
2708 * kern/i386/tsc.c (grub_get_time_ms): New file.
2709
2710 * include/grub/time.h: Include <grub/types.h.
2711 (grub_millisleep_generic): Removed.
2712 (grub_get_time_ms): New prototype.
2713 (grub_install_get_time_ms): New prototype.
2714 (grub_rtc_get_time_ms): New prototype.
2715
2716 * kern/time.c (grub_get_time_ms): New function.
2717 (grub_install_get_time_ms): New function.
2718
2719 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
2720 <grub/time.h> anymore.
2721 (grub_millisleep): Removed.
2722 (grub_machine_init): Call grub_tsc_init.
2723
2724 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
2725 get_time_ms() implementation.
2726
2727 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
2728 (ieee1275_get_time_ms): New function.
2729 (grub_machine_init): Install get_time_ms() implementation.
2730
2731 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
2732 (grub_machine_init): Call grub_tsc_init().
2733 (grub_millisleep): Removed.
bf06a93f 2734
9c2ff3ee 2735 * kern/ieee1275/init.c (grub_millisleep): Removed.
2736 (grub_machine_init): Install ieee1275_get_time_ms()
2737 implementation.
2738 (ieee1275_get_time_ms): New function.
2739 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
2740 real work.
2741
9ec92aaf 27422008-08-05 Marco Gerards <marco@gnu.org>
2743
2744 * disk/ata.c: Include <grub/pci.h>.
2745 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
2746 (grub_ata_initialize): Rewritten.
2747 (grub_ata_device_initialize): New function.
2748
8d23f507 27492008-08-04 Pavel Roskin <proski@gnu.org>
2750
2751 * kern/main.c: Include grub/mm.h.
2752
5e15ee3d 27532008-08-04 Robert Millan <rmh@aybabtu.com>
2754
2755 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
2756 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
2757 corruption problem).
2758
a9053f8f 27592008-08-04 Robert Millan <rmh@aybabtu.com>
2760
2761 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
2762 warnings introduced in my last commit.
2763
dd19c7d7 27642008-08-03 Robert Millan <rmh@aybabtu.com>
2765
2766 Make PCI available on all i386 architectures.
2767
2768 * include/grub/i386/pc/pci.h: Move from here ...
2769 * include/grub/i386/pci.h: ... to here.
2770
2771 * include/grub/i386/pc/pci.h: Remove.
2772 * include/grub/i386/efi/pci.h: Remove.
2773 * include/grub/x86_64/efi/pci.h: Remove.
2774
2775 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
2776 `<grub/cpu/pci.h>'.
2777
2778 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
2779 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
2780 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
2781
2782 * conf/i386-ieee1275.rmk: Likewise.
2783
e14a6184 27842008-08-03 Robert Millan <rmh@aybabtu.com>
2785
2786 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
2787 (grub_console_setcursor): Make it possible to set cursor off.
2788
52768e37 27892008-08-03 Robert Millan <rmh@aybabtu.com>
2790
2791 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
2792 of modules instead of assuming which platform provides what.
2793 * util/update-grub.in: Likewise.
2794
2d52f57f 27952008-08-03 Robert Millan <rmh@aybabtu.com>
2796
2797 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
2798 instead of `grub_install_dos_part' to determine whether a drive needs
2799 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 2800 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 2801
2a5cd121 28022008-08-02 Robert Millan <rmh@aybabtu.com>
2803
2804 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
2805
93808428 28062008-08-02 Robert Millan <rmh@aybabtu.com>
2807
2808 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
2809 of informational grub_dprintf() calls.
2810
3bd0a12a 28112008-08-02 Robert Millan <rmh@aybabtu.com>
2812
2813 * disk/memdisk.c (memdisk_size): Don't initialize.
2814 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
2815
2816 * include/grub/i386/pc/kernel.h
2817 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2818 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2819 (grub_memdisk_image_size, grub_arch_memdisk_addr)
2820 (grub_arch_memdisk_size): Remove.
2821
2822 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2823 field (was only used to transfer a constant). Add `type' field to
2824 support multiple module types.
2825 (grub_module_iterate): New function.
2826
2827 * kern/device.c (grub_device_open): Do not hide error messages
2828 when grub_disk_open() fails. Use grub_print_error() instead.
2829
2830 * kern/i386/pc/init.c (grub_arch_modules_addr)
2831 (grub_arch_memdisk_size): Remove functions.
2832 (grub_arch_modules_addr): Return the module address in high memory
2833 (now that it isn't copied anymore).
2834
2835 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2836 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2837 decompression routine (grub_total_module_size already includes that
2838 now). Don't copy modules back to low memory.
2839
2840 * kern/main.c: Include `<grub/mm.h>'.
2841 (grub_load_modules): Split out (and use) ...
2842 (grub_module_iterate): ... this function, which iterates through
2843 module objects and runs a hook.
2844 Comment out grub_mm_init_region() call, as it would cause non-ELF
2845 modules to be overwritten.
2846
2847 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2848 the memdisk image in its own region, make it part of the module list.
2849 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2850 (main): Parse --memdisk|-m option, and pass user-provided path as
2851 parameter to generate_image().
2852 (add_segments): Pass `memdisk_path' down to load_modules().
2853 (load_modules): Embed memdisk image in module section when requested.
2854 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2855 `header.type' instead of `header.offset'.
2856
2857 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2858 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2859 (memdisk_mod_LDFLAGS): New variables.
2860 * conf/i386-coreboot.rmk: Likewise.
2861 * conf/i386-ieee1275.rmk: Likewise.
2862
a927cc73 28632008-08-02 Robert Millan <rmh@aybabtu.com>
2864
2865 * loader/i386/pc/multiboot.c (playground, forward_relocator)
2866 (backward_relocator): New variables. Used to allocate and relocate
2867 the payload, respectively.
2868 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 2869 address, install the appropriate relocator code in each bound of
a927cc73 2870 the payload, and set the entry point such that
2871 grub_multiboot_real_boot() will jump to one of them.
2872
2873 * kern/i386/loader.S (grub_multiboot_payload_size)
2874 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2875 (grub_multiboot_payload_entry_offset): New variables.
2876 (grub_multiboot_real_boot): Set cpu context to what the relocator
2877 expects, and jump to the relocator instead of the payload.
2878
2879 * include/grub/i386/loader.h (grub_multiboot_payload_size)
2880 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2881 (grub_multiboot_payload_entry_offset): Export.
2882
b15d8a0c 28832008-08-01 Bean <bean123ch@gmail.com>
2884
2885 * normal/menu_entry.c (editor_getline): Don't return the original
2886 string as result, as it will be released by lexer once it has done
2887 using it.
2888
cdfb3d22 28892008-08-01 Robert Millan <rmh@aybabtu.com>
2890
2891 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2892 within menuentries, not before them.
2893 util/grub.d/10_hurd.in: Likewise.
2894
9175e93d 28952008-08-01 Bean <bean123ch@gmail.com>
2896
2897 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2898 (bufio_mod_SOURCES): New macro.
2899 (bufio_mod_CFLAGS): Likewise.
2900 (bufio_mod_LDFLAGS): Likewise.
2901
2902 * include/grub/bufio.h: New file.
2903
2904 * io/bufio.c: Likewise.
2905
2906 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2907 (grub_video_reader_png): Use grub_buffile_open to open file.
2908
2909 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2910 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2911
2912 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2913 (grub_video_reader_tga): Use grub_buffile_open to open file.
2914
2915 * font/manager.c: Include <grub/bufio.h>.
2916 (add_font): Use grub_buffile_open to open file.
2917
3d8383e7 29182008-07-31 Robert Millan <rmh@aybabtu.com>
2919
2920 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2921 ELF segments, use a macro for arbitrarily accessing any of them instead
2922 of preparing a pointer that allows access to one at a time.
2923 (grub_multiboot_load_elf64): Likewise.
2924
16e641b6 29252008-07-31 Bean <bean123ch@gmail.com>
2926
2927 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2928 GRUB_KERNEL_MACHINE_DATA_END.
2929
59198b72 29302008-07-30 Robert Millan <rmh@aybabtu.com>
2931
2932 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2933 Increase from 0x50 to 0x60.
2934 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2935 use UUIDs to identify the root drive for them. If that's not
2936 possible, abort.
2937 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2938 check, for cross-disk installs.
2939
ae88bca3 29402008-07-30 Robert Millan <rmh@aybabtu.com>
2941
2942 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2943 is non-empty, use it to set the `prefix' environment variable instead
2944 of the usual approach.
2945 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2946 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2947 environment variable instead of dummy make_install_device().
2948
2949 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2950 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 2951 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 2952
2953 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2954 New variable reference.
2955 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2956 New macro. Defines offset of `grub_prefix' within startup.S (relative
2957 to `start').
2958 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
2959 section within startup.S (relative to `start').
2960 * include/grub/i386/coreboot/kernel.h: Likewise.
2961
2962 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
2963 Overwrite grub_prefix with its contents, at the beginning of the
2964 first segment.
2965 (main): Understand -p|--prefix.
2966
14f41dd1 29672008-07-30 Robert Millan <rmh@aybabtu.com>
2968
2969 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
2970
4ca049a3 29712008-07-30 Robert Millan <rmh@aybabtu.com>
2972
2973 * term/i386/pc/vga_text.c (grub_console_cls): Use
2974 grub_console_gotoxy() to go back to beginning of the screen.
2975 Found by Patrick Georgi <patrick.georgi@coresystems.de>
2976
2921d337 29772008-07-29 Christian Franke <franke@computer.org>
2978
2979 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2980 Add conversion of emulated mount points on Cygwin.
2981
b609876d 29822008-07-29 Christian Franke <franke@computer.org>
2983
2984 * util/update-grub.in: Add a check for admin
2985 group on Cygwin.
2986 Remove old `grub.cfg.new' before creation.
2987 Add `-f' to `mv' to handle the different filesystem
2988 semantics of Windows.
2989
e93e4679 29902008-07-29 Bean <bean123ch@gmail.com>
2991
2992 * normal/main.c (get_line): Fix buffer overflow bug.
2993
41694fd0 29942008-07-28 Robert Millan <rmh@aybabtu.com>
2995
2996 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
2997 (struct grub_apple_header): New struct. Describes the layout of
2998 the partmap header.
2999 (apple_partition_map_iterate): Check the header magic as well as the
3000 partition magic (which was already being checked).
3001
cfd0b4e6 30022008-07-28 Pavel Roskin <proski@gnu.org>
3003
3004 * genmk.rb: Add a warning to the beginning of the output that
3005 it's a generated file and should not be edited.
3006
93cce016 30072008-07-28 Robert Millan <rmh@aybabtu.com>
3008
3009 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3010 with the same number are found, just use issue a warning with
3011 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 3012
cd1df915 30132008-07-27 Robert Millan <rmh@aybabtu.com>
3014
3015 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
3016 information.
3017
b70a8427 30182008-07-27 Bean <bean123ch@gmail.com>
3019
3020 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
3021 (grub_fat_find_dir): Ignore case when comparing filename.
3022
8f5e379f 30232008-07-27 Bean <bean123ch@gmail.com>
3024
3025 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
3026 smallino, as it's more descriptive, and i8count can be confused with
3027 the other field count.
3028 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
3029 inode type.
3030
a85cd5a0 30312008-07-27 Bean <bean123ch@gmail.com>
3032
3033 * commands/crc.c: New file.
3034
3035 * lib/crc.c: Likewise.
3036
3037 * include/grub/lib/crc.h: Likewise.
3038
3039 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
3040
3041 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
3042 (hexdump): Move this function to ...
3043
3044 * lib/hexdump.c: ... here.
3045
3046 * include/grub/hexdump.h: Renamed to ...
3047
3048 * include/grub/lib/hexdump.h: ... this.
3049
3050 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
3051
3052 * util/grub-editenv.c: Likewise.
3053
3054 * include/envblk.h: Renamed to ...
3055
3056 * include/lib/envblk.h: ... this.
3057
3058 * util/envblk.c: Renamed to ...
3059
3060 * lib/envblk.c: ... this.
3061
3062 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
3063 lib/hexdump.c.
3064 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
3065 (pkglib_MODULES): Add crc.mod.
3066 (hexdump_mod_SOURCES): Add lib/hexdump.c.
3067 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
3068 (crc_mod_SOURCES): New macro.
3069 (crc_mod_CFLAGS): Likewise.
3070 (crc_mod_LDFLAGS): Likewise.
3071
3072 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
3073
3074 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3075
3076 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3077
3078 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3079
3080 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3081
c298def0 30822008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 3083
3084 * commands/help.c: Include <grub/term.h>.
3085 (TERM_WIDTH): Removed. Updated all users.
3086
cc349fb3 30872008-07-27 Pavel Roskin <proski@gnu.org>
3088
3089 * util/getroot.c (find_root_device): Rephrase a comment to avoid
3090 spurious warnings about a comment within a comment.
3091
9051607e 30922008-07-25 Robert Millan <rmh@aybabtu.com>
3093
3094 * util/getroot.c (find_root_device): Skip devices that match
3095 /dev/dm-[0-9]. This lets the real device be found for any type of
3096 abstraction (LVM, EVMS, RAID..).
3097 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
3098 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
3099 device is found first, find_root_device() will now skip it.
3100
01453bfc 31012008-07-24 Pavel Roskin <proski@gnu.org>
3102
3103 * include/grub/types.h: Use __builtin_bswap32() and
3104 __builtin_bswap64() with gcc 4.3 and newer.
3105
6af9849f 31062008-07-24 Christian Franke <franke@computer.org>
3107
3a0fa256 3108 * util/i386/pc/grub-install.in: If `--debug' is specified,
3109 pass `--verbose' to grub-setup.
3110 Abort script if make_system_path_relative_to_its_root() fails.
3111
7810e747 31122008-07-24 Bean <bean123ch@gmail.com>
3113
3114 * configure.ac: Fixed a bug caused by the previous cygwin patch,
3115 variable `target_platform' should be `platform'.
3116
42290e17 31172008-07-24 Bean <bean123ch@gmail.com>
3118
51cc5193 3119 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 3120 (grub_png_init_fixed_block): New function.
3121 (grub_png_decode_image_data): Handle fixed huffman code compression.
3122
2a8a80e4 31232008-07-24 Bean <bean123ch@gmail.com>
3124
3125 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
3126 (grub_pe2elf_SOURCES): New macro.
3127 (CLEANFILES): Add grub-pe2elf.
3128
3129 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
3130 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
3131 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
3132 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
3133 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
3134 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
3135 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
3136 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
3137 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
3138 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
3139 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
3140 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
3141 (GRUB_PE32_DT_FUNCTION): Likewise.
3142 (GRUB_PE32_REL_I386_DIR32): Likewise.
3143 (GRUB_PE32_REL_I386_REL32): Likewise.
3144 (grub_pe32_symbol): New structure.
3145 (grub_pe32_reloc): Likewise.
3146
3147 * util/grub-pe2elf.c: New file.
3148
3149 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
3150 start symbol in non pc platform.
3151
3152 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
3153
3154 The following patches are from Christian Franke.
3155
3156 * include/grub/dl.h: Remove .previous, gas supports this only
3157 for ELF format.
3158
3159 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
3160 Remove .type, gas supports this only for ELF format.
3161
3162 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
3163 nullbytes in symbol table. This fixes an infinite loop if table is
3164 zero filled.
3165
3166 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
3167 TARGET_IMG_LDFLAGS and EXEEXT.
3168
3169 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
3170 TARGET_IMG_LDFLAGS_AC.
3171 (grub_CHECK_STACK_ARG_PROBE): New function.
3172
3173 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
3174
3175 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
3176
3177 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
3178 to set TARGET_IMG_LD* accordingly.
3179 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
3180 Add call to grub_CHECK_STACK_ARG_PROBE.
3181 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
3182
3183 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
3184
3185 * genmk.rb: Add EXEEXT to CLEANFILES.
3186
12ccdb75 31872008-07-23 Robert Millan <rmh@aybabtu.com>
3188
3189 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
3190 define the codes for arrows and lines used for the menu).
3191 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
3192 as well.
3193
3194 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
3195 fonts, because the latter are too slow.
3196
18eeaf04 31972008-07-21 Bean <bean123ch@gmail.com>
3198
3199 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
3200 a20. Run keyboard test last, as it will cause macbook to halt.
3201
b095e2ad 32022008-07-18 Pavel Roskin <proski@gnu.org>
3203
3204 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
3205 load foreign architecture modules correctly anyway. Keep
3206 support for loading host architecture modules, whether we
3207 compile them or not.
3208
737feb35 32092008-07-17 Pavel Roskin <proski@gnu.org>
3210
3f4ce737 3211 * configure.ac: Use -m32 or -m64 regardless of whether we had to
3212 change target_cpu. The compiler default can mismatch target_cpu
3213 in any case.
3214
4ad2d049 3215 * disk/efi/efidisk.c: Fix format warnings on x86_64.
3216 * kern/efi/efi.c: Likewise.
3217
f6130a12 3218 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
3219 target compiler is functional.
3220 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
3221 are set up.
3222
58393a2d 3223 * configure.ac: Default to efi platform for x86_64-apple. Allow
3224 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
3225 adjustments from the rest, only do them if target is not
3226 explicitly given. Merge other adjustments with the final sanity
3227 check. Remove an extraneous check for supported CPU. Be
3228 specific which CPU and which platform is not supported.
3229
737feb35 3230 * configure.ac: Default to pc platform for x86_64.
3231
546f966a 32322008-07-17 Robert Millan <rmh@aybabtu.com>
3233
3234 Partial LinuxBIOS -> Coreboot rename.
3235
3236 * conf/i386-linuxbios.rmk: Renamed to ...
3237 * conf/i386-coreboot.rmk: ... this.
3238 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
3239 * configure.ac: Accept "coreboot" as input platform (but maintain
3240 compatibility with "linuxbios").
3241 * include/grub/i386/linuxbios: Renamed to ...
3242 * include/grub/i386/coreboot: ... this.
3243
20011694 32442008-07-17 Bean <bean123ch@gmail.com>
3245
3246 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 3247 (appleldr_mod_SOURCE): New variable.
20011694 3248 (appleldr_mod_CFLAGS): Likewise.
3249 (appleldr_mod_LDFLAGS): Likewise.
3250 (pci_mod_SOURCES): Likewise.
3251 (pci_mod_CFLAGS): Likewise.
3252 (pci_mod_LDFLAGS): Likewise.
3253 (lspci_mod_SOURCES): Likewise.
3254 (lspci_mod_CFLAGS): Likewise.
3255 (lspci_mod_LDFLAGS): Likewise.
3256
3257 * conf/x86_64-efi.rmk: New file.
3258
3259 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
3260 macro.
3261 (grub_efidisk_write): Likewise.
3262
3263 * include/efi/api.h (efi_call_0): New macro.
3264 (efi_call_1): Likewise.
3265 (efi_call_2): Likewise.
3266 (efi_call_3): Likewise.
3267 (efi_call_4): Likewise.
3268 (efi_call_5): Likewise.
3269 (efi_call_6): Likewise.
3270
3271 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
3272 grub_rescue_cmd_chainloader.
3273
3274 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
3275 (grub_pe32_optional_header): Change some fields based on i386 or
3276 x86_64 platform.
3277 (GRUB_PE32_PE32_MAGIC): Likewise.
3278
3279 * include/grub/efi/uga_draw.h: New file.
3280
3281 * include/grub/elf.h (STN_ABS): New constant.
3282 (R_X86_64_NONE): Relocation constant for x86_64.
3283 (R_X86_64_64): Likewise.
3284 (R_X86_64_PC32): Likewise.
3285 (R_X86_64_GOT32): Likewise.
3286 (R_X86_64_PLT32): Likewise.
3287 (R_X86_64_COPY): Likewise.
3288 (R_X86_64_GLOB_DAT): Likewise.
3289 (R_X86_64_JUMP_SLOT): Likewise.
3290 (R_X86_64_RELATIVE): Likewise.
3291 (R_X86_64_GOTPCREL): Likewise.
3292 (R_X86_64_32): Likewise.
3293 (R_X86_64_32S): Likewise.
3294 (R_X86_64_16): Likewise.
3295 (R_X86_64_PC16): Likewise.
3296 (R_X86_64_8): Likewise.
3297 (R_X86_64_PC8): Likewise.
3298
3299 * include/grub/i386/efi/pci.h: New file.
3300
3301 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
3302 Change it value based on platform.
3303 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
3304 (GRUB_E820_RAM): Likewise.
3305 (GRUB_E820_RESERVED): Likewise.
3306 (GRUB_E820_ACPI): Likewise.
3307 (GRUB_E820_NVS): Likewise.
3308 (GRUB_E820_EXEC_CODE): Likewise.
3309 (GRUB_E820_MAX_ENTRY): Likewise.
3310 (grub_e820_mmap): New structure.
3311 (linux_kernel_header): Change the efi field according to different
3312 kernel version, also field from linux_kernel_header.
3313
3314 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
3315
3316 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
3317 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
3318 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
3319 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
3320 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
3321 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
3322 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
3323 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
3324 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
3325 (GRUB_PCI_ADDR_IO_MASK): Likewise.
3326
3327 * include/grub/x86_64/efi/kernel.h: New file.
3328
3329 * include/grub/x86_64/efi/loader.h: Likewise.
3330
3331 * include/grub/x86_64/efi/machine.h: Likewise.
3332
3333 * include/grub/x86_64/efi/pci.h: Likewise.
3334
3335 * include/grub/x86_64/efi/time.h: Likewise.
3336
3337 * include/grub/x86_64/linux.h: Likewise.
3338
3339 * include/grub/x86_64/setjmp.h: Likewise.
3340
3341 * include/grub/x86_64/time.h: Likewise.
3342
3343 * include/grub/x86_64/types.h: Likewise.
3344
3345 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
3346 GRUB_TARGET_SIZEOF_VOID_P.
3347
3348 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
3349 (grub_efi_locate_handle): Likewise.
3350 (grub_efi_open_protocol): Likewise.
3351 (grub_efi_set_text_mode): Likewise.
3352 (grub_efi_stall): Likewise.
3353 (grub_exit): Likewise.
3354 (grub_reboot): Likewise.
3355 (grub_halt): Likewise.
3356 (grub_efi_exit_boot_services): Likewise.
3357 (grub_get_rtc): Likewise.
3358
3359 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
3360 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
3361 (grub_efi_allocate_pages): Wrap efi calls.
3362 (grub_efi_free_pages): Wrap efi calls.
3363 (grub_efi_get_memory_map): Wrap efi calls.
3364
3365 * kern/x86_64/dl.c: New file.
3366
3367 * kern/x86_64/efi/callwrap.S: Likewise.
3368
3369 * kern/x86_64/efi/startup.S: Likewise.
3370
3371 * loader/efi/appleloader.c: Likewise.
3372
3373 * loader/efi/chainloader.c (cmdline): New variable.
3374 (grub_chainloader_unload): Wrap efi calls.
3375 (grub_chainloader_boot): Likewise.
3376 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
3377 command line.
3378
3379 * loader/efi/chainloader_normal.c (chainloader_command):
3380 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
3381 command line.
3382
3383 * loader/i386/efi/linux.c (allocate_pages): Change allocation
3384 method.
3385 (grub_e820_add_region): New function.
3386 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
3387 booting.
3388 (grub_find_video_card): New function.
3389 (grub_linux_setup_video): New function.
3390 (grub_rescue_cmd_linux): Probe for video information.
3391
3392 * normal/x86_64/setjmp.S: New file.
3393
3394 * term/efi/console.c (map_char): New function.
3395 (grub_console_putchar): Map unicode char.
3396 (grub_console_checkkey): Wrap efi calls.
3397 (grub_console_getkey): Likewise.
3398 (grub_console_getwh): Likewise.
3399 (grub_console_gotoxy): Likewise.
3400 (grub_console_cls): Likewise.
3401 (grub_console_setcolorstate): Likewise.
3402 (grub_console_setcursor): Likewise.
3403
3404 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
3405
59652a20 34062008-07-16 Pavel Roskin <proski@gnu.org>
3407
ef294055 3408 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
3409 format strings.
3410
59652a20 3411 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
3412 pointer, not an integer. This fixes a warning and prevents
3413 precision loss on 64-bit systems.
3414 (relocate_addresses): Remove unneeded cast.
3415
afc3b5d7 34162008-07-15 Pavel Roskin <proski@gnu.org>
3417
506b2b3e 3418 * kern/i386/ieee1275/init.c: Include grub/cache.h.
3419
62ead89c 3420 * term/ieee1275/ofconsole.c: Disable code unused on i386.
3421
c4cd51d7 3422 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
3423 Fix comparison between signed and unsigned.
3424
0d3d8f28 3425 * include/grub/i386/ieee1275/console.h: Declare
3426 grub_console_init() and grub_console_fini().
3427
8804b286 3428 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
3429 It's empty and unused.
3430
ee01cf35 3431 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
3432 beginning to avoid warnings with some compilers.
3433
afc3b5d7 3434 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
3435 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
3436
e4e8eaa5 34372008-07-14 Pavel Roskin <proski@gnu.org>
3438
407aceb4 3439 * kern/env.c (grub_register_variable_hook): Don't copy empty
3440 string, it leaks memory. Pass "" to grub_env_set(), it should
3441 handle constant strings.
3442
e4e8eaa5 3443 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
3444 * commands/cmp.c (grub_cmd_cmp): Likewise.
3445 * kern/dl.c (grub_dl_flush_cache): Likewise.
3446 (grub_dl_load_core): Likewise.
3447 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
3448 (grub_elf64_load_phdrs): Likewise.
3449
d4e2dad3 34502008-07-13 Pavel Roskin <proski@gnu.org>
3451
3452 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
3453 between signed and unsigned.
3454 (LzmaEnc_Finish): Fix warning about an unused parameter.
3455
aa24b516 34562008-07-13 Bean <bean123ch@gmail.com>
3457
3458 * Makefile.in (enable_lzo): New rule.
3459
3460 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
3461
3462 * configure.ac (ENABLE_LZO): New option --enable-lzo.
3463
3464 * boot/i386/pc/lnxboot.S: #include <config.h>.
3465
3466 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 3467 its value according to the compression algorithm used, lzo or lzma.
aa24b516 3468
3469 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
3470 compression algorithm according to configure macro.
3471
3472 * kern/i386/pc/startup.S (codestart): Likewise.
3473
3474 * kern/i386/pc/lzma_decode.S: New file.
3475
3476 * include/grub/lib/LzFind.h: Likewise.
3477
3478 * include/grub/lib/LzHash.h: Likewise.
3479
3480 * include/grub/lib/LzmaDec.h: Likewise.
3481
3482 * include/grub/lib/LzmaEnc.h: Likewise.
3483
3484 * include/grub/lib/LzmaTypes.h: Likewise.
3485
3486 * lib/LzFind.c: Likewise.
3487
3488 * lib/LzmaDec.c: Likewise.
3489
3490 * lib/LzmaEnc.c: Likewise.
3491
4ae821ac 34922008-07-13 Bean <bean123ch@gmail.com>
3493
3494 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
3495 (grub_ext4_extent_header): New structure.
3496 (grub_ext4_extent): Likewise.
3497 (grub_ext4_extent_idx): Likewise.
3498 (grub_ext4_find_leaf): New function.
3499 (grub_ext2_read_block): Handle extents.
3500
9a745147 35012008-07-12 Robert Millan <rmh@aybabtu.com>
3502
3503 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
3504
d49a4cf6 35052008-07-11 Robert Millan <rmh@aybabtu.com>
3506
3507 * util/grub.d/40_custom.in: New file. Example on how to add custom
3508 entries to /etc/grub.d.
3509 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
3510 40_custom (implicitly, by merging all the grub.d rules).
3511
947414b4 35122008-07-11 Pavel Roskin <proski@gnu.org>
3513
0059cf6f 3514 * commands/read.c (grub_getline): Fix invalid memory access.
3515 Don't add newline to the variable value.
3516
947414b4 3517 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
3518 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
3519 (serial_hw_get_port): Check validity of the port number.
3520 (grub_cmd_serial): Check return value of serial_hw_get_port().
3521
62a02d00 35222008-07-07 Pavel Roskin <proski@gnu.org>
3523
3524 * boot/i386/pc/diskboot.S (notification_string): Replace
3525 "Loading kernel" with just "loading". This is shorter, less
3526 confusing and saves a few bytes for possible future changes.
3527
3e5581b0 35282008-07-05 Pavel Roskin <proski@gnu.org>
3529
ea387a48 3530 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
3531 size for ATAPI devices, they are undefined. Output sector
3532 number in decimal form.
3533
3e5581b0 3534 * disk/ata.c: Use named constants for status bits.
3535
fdecb8fd 35362008-07-04 Pavel Roskin <proski@gnu.org>
3537
bcd35b90 3538 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
3539 grub_addr_t before casting it to the void pointer to fix a
3540 warning. Non-addressable regions are discarded earlier.
3541 (grub_arch_modules_addr): Cast _end to grub_addr_t.
3542 * kern/i386/linuxbios/table.c: Include grub/misc.h.
3543 (check_signature): Don't shadow table_header.
3544 (grub_linuxbios_table_iterate): Cast numeric constants to
3545 grub_linuxbios_table_header_t.
3546 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
3547 grub_stop().
3548
af58ab3d 3549 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
3550 prevent warnings.
3551
1759aa57 3552 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
3553 pointer, which can cause warnings. Support 64-bit addresses.
3554
fdecb8fd 3555 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
3556 of sizeof(long). This fixes PowerPC image generation on x86_64.
3557
8516d2a8 35582008-07-04 Robert Millan <rmh@aybabtu.com>
3559
3560 This fixes a performance issue when pc & gpt partmap iterators
3561 didn't abort iteration even after our hook found what it was
fe987087 3562 looking for (often causing expensive probes of non-existent drives).
8516d2a8 3563
3564 Some callers relied on previous buggy behaviour, since they would
34c44600 3565 raise an error when their own hooks caused early abortion of its
8516d2a8 3566 iteration.
3567
3568 * kern/device.c (grub_device_open): Improve error message.
3569 * disk/lvm.c (grub_lvm_open): Likewise.
3570 * disk/raid.c (grub_raid_open): Likewise.
3571
3572 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
3573 when hook requests it, independently of grub_errno.
3574 (pc_partition_map_probe): Do not fail when find_func() caused
3575 early abortion of pc_partition_map_iterate().
3576
3577 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
3578 when hook requests it, independently of grub_errno.
3579 (gpt_partition_map_probe): Do not fail when find_func() caused
3580 early abortion of gpt_partition_map_iterate().
3581
3582 * kern/partition.c (grub_partition_iterate): Abort parent iteration
3583 when hook requests it, independently of grub_errno. Do not fail when
3584 part_map_iterate_hook() caused early abortion of p->iterate().
3585
3586 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
3587 when grub_partition_iterate() returned with non-zero.
3588
277d0de9 35892008-07-03 Pavel Roskin <proski@gnu.org>
3590
3591 * disk/ata.c (grub_ata_pio_write): Check status before writing,
3592 like we do in grub_ata_pio_read().
3593 (grub_ata_readwrite): Always write individual sectors. Fix the
3594 sector count for the remainder.
3595 (grub_ata_write): Enable writing to ATA devices. Correctly
3596 report error for ATAPI devices.
3597
d4c9b428 35982008-07-02 Pavel Roskin <proski@gnu.org>
3599
e43fc690 3600 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
3601 warning.
3602
f707af42 3603 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
3604 for every read sector, we already increment it for the whole
3605 batch. This fixes reading more than 256 sectors at once.
3606
11e16b15 3607 * util/grub-editenv.c (cmd_info): Cast argument to long
3608 explicitly. ptrdiff_t reduces to int on i386.
3609
cbabfdd4 3610 * util/grub-editenv.c (main): Be specific which parameter is
3611 missing.
3612
b8fbce0a 3613 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
3614 (memdisk): Make memdisk_orig_addr a pointer.
3615
c9c8e606 3616 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
3617 for file offsets, use grub_off_t instead. Fix printf format
3618 warnings.
3619
ca62e598 3620 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
3621 there. Real unexpected warnings should not drown in the noise
3622 about known problems.
3623
ce8d1766 3624 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
3625 grub_disk_addr_t for memory addresses.
3626
00c7a56a 3627 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
3628 explicitly to fix a warning.
3629
08d3ef09 3630 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
3631
cb71ba20 3632 * Makefile.in (MODULE_LDFLAGS): New variable.
3633 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
3634 the linker accepts --build-id=none.
3635 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
3636 MODULE_LDFLAGS.
3637 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
3638
d4c9b428 3639 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
3640 those in Linux XFS code. Provide a way to access 64-bit parent
3641 inode.
3642 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
3643 the end of struct grub_xfs_dir_header.
3644
d4156eee 36452008-07-02 Bean <bean123ch@gmail.com>
3646
3647 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
3648 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3649 and GRUB_IEEE1275_FLAG_NO_ANSI.
3650
3651 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
3652 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3653 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
3654
3655 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
3656 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
3657
3658 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
3659 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
3660
3661 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
3662 esc sequence on non ANSI terminal.
3663 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
3664
3665 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
3666 beginning of file.
3667
2270f77b 36682008-07-02 Bean <bean123ch@gmail.com>
3669
3670 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
3671 (grub_editenv_SOURCES): New variable.
3672 (pkglib_MODULES): Add loadenv.mod.
3673 (loadenv_mod_SOURCES): New variable.
3674 (loadenv_mod_CFLAGS): Likewise.
3675 (loadenv_mod_LDFLAGS): Likewise.
3676
3677 * include/grub/envblk.h: New file.
3678
3679 * util/envblk.c: New file.
3680
3681 * util/grub-editenv.c: New file.
3682
3683 * commands/loadenv.c: New file.
3684
0e9e51ec 36852008-07-01 Pavel Roskin <proski@gnu.org>
3686
d89b7634 3687 * include/multiboot2.h (struct multiboot_tag_module): Use char,
3688 not unsigned char. This fixes warnings and is consistent with
3689 other tags.
3690
bf1835b1 3691 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
3692
8222a04b 3693 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
3694
6a42d99d 3695 * term/tparm.c (analyze): Always set *popcount.
3696
10b159d1 3697 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
3698 cast to fix a warning.
3699
b8789f6c 3700 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
3701 cast to suppress a warning.
3702
29d7e38a 3703 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
3704 grub_fshelp_read_file() expects.
3705
f341f669 3706 * fs/fat.c: Fix UUID calculation on big-endian systems. We
3707 write uuid as a 32-bit value in CPU byte order, so declare and
3708 use it as such.
3709
0e9e51ec 3710 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
3711 long if the format specifier expects it.
3712 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
3713 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3714 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
3715 long to fix a warning.
3716 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
3717 grub_dprintf() arguments to fix warnings.
3718
3aefa857 37192008-06-30 Pavel Roskin <proski@gnu.org>
3720
56c7668b 3721 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
3722 install_bsd_part immediately before core.img is embedded or
3723 modified on disk. This fixes core.img verification if core.img
3724 cannot be embedded.
3725
3aefa857 3726 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
3727 core_path to calculate the blocklist.
3728 Patch from Javier Martín <lordhabbit@gmail.com>
3729
5444088d 37302008-06-29 Robert Millan <rmh@aybabtu.com>
3731
3732 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
3733 block to disk block.
3734 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
3735 Patch from Niels Böhm <bitbucket@arcor.de>
3736
674835c8 37372008-06-29 Robert Millan <rmh@aybabtu.com>
3738
3739 * util/update-grub_lib.in (font_path): Search for fonts in
3740 /boot/grub first, which is more likely to be readable (we aren't
3741 deciding where fonts live, just looking for them).
3742
f527dbc8 37432008-06-26 Pavel Roskin <proski@gnu.org>
3744
6c2d8df6 3745 * util/biosdisk.c (read_device_map): Don't leave dead map
3746 entries for devices failing stat() check.
3747
f527dbc8 3748 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
3749 core_path_dev for the core.img path on the target device.
3750
aebe3d13 37512008-06-26 Robert Millan <rmh@aybabtu.com>
3752
3753 * disk/fs_uuid.c: New file.
3754 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
3755 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
3756 (fs_uuid_mod_LDFLAGS): New variables.
3757 * include/grub/disk.h (grub_disk_dev_id): Add
3758 `GRUB_DISK_DEVICE_UUID_ID'.
3759 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
3760 implement iterate().
3761
37aaf354 37622008-06-26 Robert Millan <rmh@aybabtu.com>
3763
3764 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
3765 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
3766 Linux image includes no initrd.
3767
25ff262a 37682008-06-21 Javier Martín <lordhabbit@gmail.com>
3769
3770 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
3771 call to resolve the core image location that effectively appended the
3772 name twice.
3773
76a2bd44 37742008-06-21 Robert Millan <rmh@aybabtu.com>
3775
3776 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
3777 call from here ...
3778
3779 * util/grub.d/10_hurd.in: ... to here ...
3780 * util/grub.d/10_linux.in: ... and here.
3781
650e1c79 37822008-06-19 Robert Millan <rmh@aybabtu.com>
3783
fe987087 3784 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 3785 after it has been set by grub_machine_set_prefix().
3786
6ce63911 37872008-06-19 Robert Millan <rmh@aybabtu.com>
3788
3789 * commands/search.c (search_label, search_fs_uuid, search_file): Print
3790 search result when not saving to variable, not the other way around.
3791 When saving to variable, abort iteration as soon as a match is found.
3792
73940cec 37932008-06-19 Robert Millan <rmh@aybabtu.com>
3794
3795 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
3796 check for partition that provides /boot/grub. Its logic is flawed,
3797 as it prevents prepare_grub_to_access_device() from being called
3798 multiple times.
3799
3c62a39d 38002008-06-19 Robert Millan <rmh@aybabtu.com>
3801
3802 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
3803 "insmod" command directly when abstraction modules are needed,
fe987087 3804 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 3805 since it had already been processed).
3806
47395a42 38072008-06-19 Pavel Roskin <proski@gnu.org>
3808
3809 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
3810 changed. This is needed in case GRUB_LIBDIR changes.
3811 * conf/i386-ieee1275.rmk: Likewise.
3812 * conf/i386-linuxbios.rmk: Likewise.
3813 * conf/i386-pc.rmk: Likewise.
3814 * conf/powerpc-ieee1275.rmk: Likewise.
3815
a145ac2d 38162008-06-18 Pavel Roskin <proski@gnu.org>
3817
3818 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3819 kernel_elf_symlist.c to symlist.c for consistency with other
3820 architectures. Update all users.
3821 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3822
7847c51e 38232008-06-18 Robert Millan <rmh@aybabtu.com>
3824
3825 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3826 it in prefix.
3827
3828 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
3829 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
3830 a RAID device, run setup() for all members independently on whether
3831 LVM abstraction is being used.
3832 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3833 If grub-mkimage has set `*install_dos_part == -2', don't override this
3834 value.
3835 Perform *install_dos_part adjustments independently on whether
3836 we're embedding or not.
3837 Clarify error message when image is too big for embedding.
3838 Remove duplicate *install_dos_part stanza.
3839
b23e5644 38402008-06-17 Robert Millan <rmh@aybabtu.com>
3841
3842 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3843 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3844 variables.
3845 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3846 values in grub_ofconsole_normal_color and
3847 grub_ofconsole_highlight_color (they're not directly related to
3848 background and foreground).
3849 (grub_ofconsole_setcolorstate): Extract background and foreground
3850 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3851
0aac2f79 38522008-06-17 Robert Millan <rmh@aybabtu.com>
3853
3854 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3855 /boot/grub for the check in last commit, not /boot (they could be
3856 different partitions).
3857
3cca7ef3 38582008-06-16 Robert Millan <rmh@aybabtu.com>
3859
3860 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3861 asked to setup access for the same partition that provides /boot,
3862 don't bother using UUIDs since our root already has the value we
3863 want.
3864
347396d8 38652008-06-16 Robert Millan <rmh@aybabtu.com>
3866
3867 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3868 I2O devices.
3869 Patch from Sven Mueller <sven@debian.org>.
3870
991477f8 38712008-06-16 Robert Millan <rmh@aybabtu.com>
3872
3873 * util/update-grub.in: Check for $EUID instead of $UID.
3874 Reported by Vincent Zweije.
3875
d31a32a1 38762008-06-16 Bean <bean123ch@gmail.com>
3877
fe987087 3878 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 3879 (grub_ext2_read_block): Likewise.
3880 (grub_ext2_read_inode): Likewise.
3881 (grub_ext2_mount): Likewise.
3882 (grub_ext2_close): Likewise.
3883 (grub_ext3_get_journal): Removed.
3884
fe987087 3885 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 3886 (grub_reiserfs_read_symlink): Likewise.
3887 (grub_reiserfs_mount): Likewise.
3888 (grub_reiserfs_open): Likewise.
3889 (grub_reiserfs_read): Likewise.
3890 (grub_reiserfs_close): Likewise.
3891 (grub_reiserfs_get_journal): Removed.
3892
3893 * fs/fshelp.c (grub_fshelp_read): Removed.
3894 (grub_fshelp_map_block): Likewise.
3895
3896 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3897 (grub_fshelp_journal): Likewise.
3898 (grub_fshelp_read): Likewise.
3899 (grub_fshelp_map_block): Likewise.
3900
3540a760 39012008-06-16 Pavel Roskin <proski@gnu.org>
3902
3903 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3904 floating point anymore.
3905 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3906
95614c84 39072008-06-15 Pavel Roskin <proski@gnu.org>
3908
3909 * commands/ls.c (grub_ls_list_files): Use integer calculations
3910 for human readable format, avoid floating point use.
3911 * kern/misc.c (grub_ftoa): Remove.
3912 (grub_vsprintf): Remove floating point support.
3913
50465dd6 39142008-06-15 Robert Millan <rmh@aybabtu.com>
3915
fe6b695a 3916 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 3917 devices.
3918 Reported by Max Vozeler.
3919
a9207284 39202008-06-15 Robert Millan <rmh@aybabtu.com>
3921
3922 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3923 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3924 skipped later.
3925 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3926 the beginning of the prefix.
3927
3928 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3929 It is assumed that if we have a memdisk, grub-mkimage has set
3930 grub_prefix to include the "(memdisk)" drive in it.
3931
a7cbd45a 39322008-06-15 Robert Millan <rmh@aybabtu.com>
3933
3934 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3935 Initialize keyboard controller after registering the terminal, so that
3936 grub_printf() can be called from grub_keyboard_controller_init().
3937
21cf716a 39382008-06-15 Robert Millan <rmh@aybabtu.com>
3939
3940 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3941 extent-btree which is written as big endian on disk.
3942 Reported by Alain Greppin <al@chilibi.org>.
3943
23a64d8e 39442008-06-14 Robert Millan <rmh@aybabtu.com>
3945
3946 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3947 * util/i386/pc/grub-install.in (modules): Likewise.
3948
d687651c 39492008-06-13 Pavel Roskin <proski@gnu.org>
3950
3951 * commands/ls.c (grub_ls_list_files): Fix format warnings.
3952
dfe9ddd4 39532008-06-13 Bean <bean123ch@gmail.com>
3954
3955 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3956
3957 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3958
3959 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3960 to indicate sparse block.
3961
16ae7781 39622008-06-12 Pavel Roskin <proski@gnu.org>
3963
e6d1a308 3964 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
3965 number, grub_fshelp_read() does it for us.
3966
16ae7781 3967 * fs/fshelp.c (grub_fshelp_read): New function. Implement
3968 linear disk read with journal translation.
3969 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
3970 * include/grub/fshelp.h: Declare grub_fshelp_read().
3971
40fd3a2b 39722008-06-09 Pavel Roskin <proski@gnu.org>
3973
3974 * fs/minix.c (grub_minix_mount): Handle error reading
3975 superblock.
3976
f5679726 39772008-06-08 Robert Millan <rmh@aybabtu.com>
3978
3979 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
3980 don't append the RAID prefix afterwards.
3981 Reported by Clint Adams.
3982
ce525529 39832008-06-08 Robert Millan <rmh@aybabtu.com>
3984
3985 Based on description from Pavel:
3986 * kern/disk.c (grub_disk_check_range): Rename to ...
3987 (grub_disk_adjust_range): ... this. Add a comment explaining the
3988 tasks performed by this function.
3989
ad4936a0 39902008-06-08 Robert Millan <rmh@aybabtu.com>
3991
3992 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
3993 `num_serial' (for consistency with other variables).
3994 (struct grub_ntfs_data): Add `uuid' member.
3995 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
3996 (grub_ntfs_uuid): New function.
3997 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
3998
dc20b0f9 39992008-06-07 Pavel Roskin <proski@gnu.org>
4000
4001 * util/biosdisk.c (open_device): Revert last change to the
4002 function, it broke installation. The sector needs to be
4003 different dependent on which device is opened.
4004
c5e3cfba 40052008-06-06 Robert Millan <rmh@aybabtu.com>
4006
4007 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
4008 rest of GRUB, and breakage doesn't happen if its value were modified.
4009
4010 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
4011 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
4012 a constant (same value).
4013 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
4014 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
4015
26a1f8c4 40162008-06-06 Robert Millan <rmh@aybabtu.com>
4017
4018 * util/biosdisk.c (open_device): Do not modify sector offset when
4019 accessing a partition. kern/disk.c already handles this for us.
4020
25d6b327 40212008-06-06 Robert Millan <rmh@aybabtu.com>
4022
4023 * util/grub-emu.c (grub_machine_init): Move code in this function from
4024 here ...
4025 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
4026 segfault in case grub_printf() is called).
4027
4028 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
4029 grub_probe. Update all users not to explicitly add it again.
4030 (grub_device): New variable; contains corresponding device for grubdir.
4031 (fs_module, partmap_module, devabstraction_module): Pass
4032 `--device ${grub_device}' to grub_probe to avoid traversing /dev
4033 every time.
4034
9ece62fb 40352008-06-05 Robert Millan <rmh@aybabtu.com>
4036
4037 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
4038 is found, print it (same layout as with labels).
4039
1ad36d37 40402008-06-04 Robert Millan <rmh@aybabtu.com>
4041
4042 * util/biosdisk.c (get_drive): Rename to ...
4043 (find_grub_drive): ... this. Update all users.
4044
4045 (get_os_disk): Rename to ...
4046 (convert_system_partition_to_system_disk): ... this. Update all users.
4047
4048 (find_drive): Rename to ...
4049 (find_system_device): ... this. Update all users.
4050
e6a30859 40512008-06-04 Robert Millan <rmh@aybabtu.com>
4052
4053 * util/biosdisk.c (get_os_disk): Handle IDA devices.
4054 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4055 (make_device_map): Likewise.
4056
00c108a4 40572008-06-01 Robert Millan <rmh@aybabtu.com>
4058
4059 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
4060 before dereferencing it.
4061
4062 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
4063 union with fat12/fat16-specific ones. Add some new fields, including
4064 `num_serial' for both versions.
4065 (struct grub_fat_data): Add `uuid' member.
4066 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
4067 names. Initialize `data->uuid' using `num_serial'.
4068 (grub_fat_uuid): New function.
4069 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
4070
4071 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
4072 (grub_reiserfs_uuid): New function.
4073 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
4074 member.
4075
4076 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
4077 (grub_xfs_uuid): New function.
4078 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
4079
1385c5bb 40802008-06-01 Robert Millan <rmh@aybabtu.com>
4081
4082 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
4083 code that is backward compatible with pre-uuid search command.
4084
c682dfd7 40852008-05-31 Robert Millan <rmh@aybabtu.com>
4086
4087 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
4088 floppies after everything else, to ensure floppy drive isn't accessed
4089 unnecessarily (patch from Bean).
4090
b7db5d47 40912008-05-31 Robert Millan <rmh@aybabtu.com>
4092
4093 * commands/search.c (search_label, search_fs_uuid, search_file): Do
4094 not print device names when we were asked to set a variable.
4095
6e037aa9 40962008-05-31 Robert Millan <rmh@aybabtu.com>
4097
4098 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
4099 using "cursor-on" and "cursor-off" commands (understood at least by
4100 the Open Firmware flavour on OLPC).
4101
41305bc8 41022008-05-31 Michael Gorven <michael@gorven.za.net>
4103
4104 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
4105 on and off sequences.
4106
69ba137e 41072008-05-31 Robert Millan <rmh@aybabtu.com>
4108
4109 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
4110 * util/update-grub.in: Likewise.
4111
520ae21b 41122008-05-30 Pavel Roskin <proski@gnu.org>
4113
4114 * util/biosdisk.c (linux_find_partition): Simplify logic and
4115 make the code more universal. Keep special processing for
4116 devfs, but use a simple rule for all other devices. If the
4117 device ends with a number, append 'p' and the partition number.
4118 Otherwise, append only the partition number.
4119
5786569b 41202008-05-30 Robert Millan <rmh@aybabtu.com>
4121
4122 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
4123 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
4124 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
4125 the `root' parameter to Linux.
4126
51500452 41272008-05-30 Robert Millan <rmh@aybabtu.com>
4128
4129 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
4130 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
4131 --fs_uuid with --fs-uuid.
4132 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
4133 all filesystems support them).
4134
811d3878 41352008-05-30 Robert Millan <rmh@aybabtu.com>
4136
4137 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 4138 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 4139
cab63c95 41402008-05-30 Robert Millan <rmh@aybabtu.com>
4141
4142 * util/grub.d/00_header.in: Remove obsolete comment referencing
4143 convert_system_path_to_grub_path().
4144 * util/update-grub.in: Likewise.
4145 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
4146 (convert_system_path_to_grub_path): Add a warning message explaining
4147 that this function is deprecated. Rely on is_path_readable_by_grub()
4148 for the readability checks.
4149 (font_path): Use is_path_readable_by_grub() for the readability
4150 check rather than convert_system_path_to_grub_path().
4151
972e2f7a 41522008-05-30 Robert Millan <rmh@aybabtu.com>
4153
4154 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
4155 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
4156 converting it first.
4157 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
4158 grub.cfg for access to font file, and afterwards call it again to set
4159 the root device.
4160
62191274 41612008-05-30 Robert Millan <rmh@aybabtu.com>
4162
4163 * commands/search.c (options): Add --fs_uuid option.
4164 (search_fs_uuid): New function.
4165 (grub_cmd_search): Fix --set argument passing.
4166 Use search_fs_uuid() when requested via --fs_uuid.
4167 (grub_search_init): Update help message.
4168 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
4169 and redeclare it as an array of 16-bit words.
4170 (grub_ext2_uuid): New function.
4171 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
4172 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
4173 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
4174 (GRUB_DEVICE_BOOT_UUID): New variables.
4175 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
4176 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
4177 whenever possible.
4178 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
4179 just assume `root' variable has the right value.
4180 * util/grub.d/10_linux.in: Likewise.
4181 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
4182 via PRINT_FS_UUID.
4183 (main): Recognise `-t fs_uuid' argument.
4184
01b73ec8 41852008-05-30 Robert Millan <rmh@aybabtu.com>
4186
4187 * util/biosdisk.c (map): Redefine structure to hold information
4188 about GRUB drive name.
fe6b695a 4189 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 4190 drive names.
4191 (call_hook): Remove.
4192 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
4193 member. Assume drive has partitions.
4194 (grub_util_biosdisk_open): Access device names via `.device' struct
4195 member.
4196 (open_device): Likewise.
4197 (find_drive): Likewise.
4198 (read_device_map): Adjust map[] usage to match the new struct
4199 definition. Don't check for duplicates (still possible, but not cheap
4200 anymore).
4201 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
4202 (make_device_name): Remove assumption of BIOS-like drive names.
4203
22f16596 42042008-05-30 Pavel Roskin <proski@gnu.org>
4205
4206 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
4207 compiling execute.c doesn't need grub_script.tab.h anymore.
4208 (normal/command.c_DEPENDENCIES): Likewise.
4209 (normal/function.c_DEPENDENCIES): Likewise.
4210 * conf/i386-ieee1275.rmk: Likewise.
4211 * conf/i386-linuxbios.rmk: Likewise.
4212 * conf/i386-pc.rmk: Likewise.
4213 * conf/powerpc-ieee1275.rmk: Likewise.
4214 * conf/sparc64-ieee1275.rmk: Likewise.
4215
528ad8f2 42162008-05-29 Pavel Roskin <proski@gnu.org>
4217
d1dff95d 4218 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
4219 when scanning metadata for volume group name.
4220
528ad8f2 4221 * include/grub/script.h: Don't include grub_script.tab.h. It's
4222 a generated file, which may only be included from the files with
4223 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
4224 use union YYSTYPE, as the later allows forward declaration.
4225 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
4226
47248e08 42272008-05-29 Robert Millan <rmh@aybabtu.com>
4228
4229 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
4230 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
4231 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
4232 (grub_console_checkkey): Add grub_dprintf() call to report unknown
4233 scan codes.
4234
ee632529 42352008-05-29 Robert Millan <rmh@aybabtu.com>
4236
4237 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
4238 control key combinations.
4239
eee96e08 42402008-05-29 Robert Millan <rmh@aybabtu.com>
4241
4242 * util/powerpc/ieee1275/grub-install.in: Move from here ...
4243 * util/ieee1275/grub-install.in: ... to here.
4244 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
4245 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
4246 (grub_install_SOURCES): Likewise.
4247
da9a6a94 42482008-05-29 Robert Millan <rmh@aybabtu.com>
4249
4250 * fs/affs.c: Update copyright year.
4251 * fs/ext2.c: Likewise.
4252 * fs/fshelp.c: Likewise.
4253 * fs/hfsplus.c: Likewise.
4254 * fs/ntfs.c: Likewise.
4255 * fs/xfs.c: Likewise.
4256 * include/grub/fshelp.h: Likewise.
4257 * util/grub-mkdevicemap.c: Likewise.
4258
12e65f3a 42592008-05-28 Robert Millan <rmh@aybabtu.com>
4260
4261 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
4262 might need to be fatfs to support some firmware implementations
4263 (e.g. OFW or EFI).
4264
23023641 42652008-05-28 Robert Millan <rmh@aybabtu.com>
4266
4267 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
4268 devices.
4269 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4270 (make_device_map): Likewise.
4271
887d2619 42722008-05-20 Bean <bean123ch@gmail.com>
4273
4274 * fs/fshelp.c (grub_fshelp_map_block): New function.
4275 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
4276 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
4277
4278 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
4279 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
4280 (grub_fshelp_journal): New structure.
4281 (grub_fshelp_map_block): New function prototype.
4282 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
4283 (grub_fshelp_map_block): Likewise.
4284
4285 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
4286 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
4287 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
4288 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
4289 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
4290 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
4291 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
4292 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
4293 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
4294 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
4295 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
4296 (grub_ext2_sblock): New members for journal support.
4297 (grub_ext3_journal_header): New structure.
4298 (grub_ext3_journal_revoke_header): Likewise.
4299 (grub_ext3_journal_block_tag): Likewise.
4300 (grub_ext3_journal_sblock): Likewise.
4301 (grub_fshelp_node): New members logfile and journal.
4302 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
4303 grub_fshelp_map_block to get real block number.
4304 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
4305 number.
4306 (grub_ext2_read_inode): Likewise.
4307 (grub_ext3_get_journal): New function.
4308 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
4309 (grub_ext2_close): Release memory used by journal.
4310
4311 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
4312 (REISERFS_MAGIC_DESC_BLOCK): New macro.
4313 (grub_reiserfs_transaction_header): Renamed to
4314 grub_reiserfs_description_block, replace field data with real_blocks.
4315 (grub_reiserfs_commit_block): New structure.
4316 (grub_reiserfs_data): New member journal.
4317 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
4318 number.
4319 (grub_reiserfs_read_symlink): Likewise.
4320 (grub_reiserfs_iterate_dir): Likewise.
4321 (grub_reiserfs_open): Likewise.
4322 (grub_reiserfs_read): Likewise.
4323 (grub_reiserfs_get_journal): New function.
4324 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
4325 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
4326 using grub_reiserfs_get_journal.
4327 (grub_reiserfs_close): Release memory used by journal.
4328
4329 * fs/affs.c (grub_affs_read_block): Change block type to
4330 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
4331
4332 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
4333
4334 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
4335
4336 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
4337
4338 * fs/udf.c (grub_udf_read_block): Change block type to
4339 grub_disk_addr_t. Use type cast to avoid warning.
4340
4341 * fs/xfs.c (grub_xfs_read_block): Likewise.
4342
b7c6bed5 43432008-05-16 Christian Franke <franke@computer.org>
4344
4345 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
4346 to ensure that break with ESC will always work.
4347 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
4348 Remove ESC from keyboard queue.
4349
eedf167f 43502008-05-16 Christian Franke <franke@computer.org>
4351
4352 * util/biosdisk.c: [__CYGWIN__] Add includes.
4353 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
4354 (get_os_disk): Move variable declarations to OS specific
4355 parts to avoid warning.
4356 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
4357 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
4358 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
4359 Cygwin.
4360 * util/getroot.c: [__CYGWIN__] Add includes.
4361 (strip_extra_slashes): Fix "/" case.
4362 [__CYGWIN__] (get_win32_path): New function.
4363 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
4364 [__CYGWIN__] (find_root_device): Disable.
4365 [__CYGWIN__] (get_bootsec_serial): New function.
4366 [__CYGWIN__] (find_cygwin_root_device): Likewise.
4367 [__linux__] (grub_guess_root_device): Add early returns to simplify
4368 structure.
4369 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
4370 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
4371 check for Linux only.
4372
a079699e 43732008-05-15 Bean <bean123ch@gmail.com>
4374
4375 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
4376 keyboard hang problem in apple's intel mac.
4377
1cf4059a 43782008-05-09 Robert Millan <rmh@aybabtu.com>
4379
4380 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
4381 devices.
4382 * util/grub-mkdevicemap.c (get_virtio_disk_name)
4383 (make_device_map): Likewise.
4384 Reported by Aurelien Jarno <aurel32@debian.org>
4385
ed759390 43862008-05-07 Ian Campbell <ijc@hellion.org.uk>
4387
4388 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
4389 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
4390 (make_device_map): Output entries for xvd type disks.
4391
b56c4eaa 43922008-05-07 Robert Millan <rmh@aybabtu.com>
4393
4394 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
4395 devices.
4396 * util/grub-mkdevicemap.c (get_cciss_disk_name)
4397 (make_device_map): Likewise.
4398 Reported by Roland Dreier <rdreier@cisco.com>
4399
7f8866ed 44002008-05-07 Robert Millan <rmh@aybabtu.com>
4401
4402 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
4403 grub_strstr() call. Correct a few mistakes in failure path handling.
4404
b0346e0f 44052008-05-06 Robert Millan <rmh@aybabtu.com>
4406
4407 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4408 Do not print a trailing slash (therefore, the root directory is an
4409 empty string).
4410 (convert_system_path_to_grub_path): Do not remove trailing slash
4411 from make_system_path_relative_to_its_root() output.
4412
4413 * util/i386/pc/grub-install.in: Add trailing slash to output from
4414 make_system_path_relative_to_its_root().
4415
6cf12cbd 44162008-05-06 Robert Millan <rmh@aybabtu.com>
4417
4418 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
4419 ensures that output lines aren't intermangled with those sent to
4420 stderr (via grub_util_info()).
4421 * util/grub-probe.c (grub_refresh): Likewise.
4422 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
4423
0fbb3117 44242008-05-05 Christian Franke <franke@computer.org>
4425
4426 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
4427 Add Cygwin device names.
4428 (get_ide_disk_name) [__CYGWIN__]: Likewise.
4429 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
4430 (check_device): Return error instead of success on empty name.
4431 (make_device_map): Move label inside linux specific code to
4432 prevent compiler warning.
4433
8124cdb7 44342008-04-30 Robert Millan <rmh@aybabtu.com>
4435
4436 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
4437 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
4438 first boot option.
4439 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
4440
094c01d0 44412008-04-29 Robert Millan <rmh@aybabtu.com>
4442
4443 * docs/grub.cfg: New file (example GRUB configuration).
4444
f4b1fc02 44452008-04-26 Robert Millan <rmh@aybabtu.com>
4446
329ce2a5 4447 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
4448 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
4449 and `disk/ieee1275/nand.c'.
f4b1fc02 4450
25f16ec1 44512008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 4452
25f16ec1 4453 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
4454 i386-linuxbios.
4455
4456 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
4457 change the buffer size to 4096 for cdrom device.
4458
4459 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
4460 and nand.mod.
4461 (_linux_mod_SOURCES): New variable.
4462 (_linux_mod_CFLAGS): Likewise.
4463 (_linux_mod_LDFLAGS): Likewise.
4464 (linux_mod_SOURCES): Likewise.
4465 (linux_mod_CFLAGS): Likewise.
4466 (linux_mod_LDFLAGS): Likewise.
4467 (nand_mod_SOURCES): Likewise.
4468 (nand_mod_CFLAGS): Likewise.
4469 (nand_mod_LDFLAGS): Likewise.
4470
4471 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
4472 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
4473 type property. (nand device in olpc don't have this property)
4474
4475 * include/grub/disk.h (grub_disk_dev_id): New macro
4476 GRUB_DISK_DEVICE_NAND_ID.
4477
4478 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
4479 function prototype.
4480 (grub_rescue_cmd_initrd): Likewise.
4481
4482 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
4483 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
4484 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 4485
25f16ec1 4486 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
4487 GRUB_MACHINE_IEEE1275 is defined.
4488
4489 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
4490 Use NESTED_FUNC_ATTR attribute on the hook parameter.
4491
4492 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
4493 on nested function heap_init.
4494 (grub_upper_mem): New variable for i386-ieee1275.
4495 (grub_get_extended_memory): New function for i386-ieee1275.
4496 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
4497
4498 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
4499 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
4500 property.
f19dbdb7 4501
25f16ec1 4502 * loader/i386/ieee1275/linux.c: New file.
4503
4504 * loader/i386/ieee1275/linux_normal.c: New file.
4505
4506 * disk/ieee1275/nand.c: New file.
4507
e89d61e9 45082008-04-18 Thomas Schwinge <tschwinge@gnu.org>
4509
4510 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
4511 value.
4512 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
4513
602566f6 45142008-04-18 Robert Millan <rmh@aybabtu.com>
4515
4516 Restructures early code path on ieee1275 to unify grub_main() as
4517 the first C function that is executed in every platform.
4518
4519 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
4520 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
4521 cmain().
4522 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
4523 * kern/ieee1275/cmain.c (cmain): Rename to ...
4524 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
4525 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
4526 at the beginning.
4527
57490c2b 45282008-04-18 Robert Millan <rmh@aybabtu.com>
4529
4530 * util/update-grub.in: Fix syntax error when setting
4531 `GRUB_PRELOAD_MODULES'.
4532 Reported by Stephane Chazelas <stephane@artesyncp.com>
4533
1977517d 45342008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
4535
4536 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
4537 section into account, newer toolchains generate unique build ids
4538 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 4539 we want build ids to be preserved
1977517d 4540 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
4541 far from other sections don't cause the raw binary images grow
4542 size
4543
bfb1f1a2 45442008-04-15 Robert Millan <rmh@aybabtu.com>
4545
4546 * disk/lvm.c: Update copyright year.
4547 * kern/misc.c: Likewise.
4548
01979850 45492008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4550
4551 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 4552 there is no memory left for physical volume name.
01979850 4553
0a1150e2 45542008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4555
4556 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
4557 volume name mapping to support bigger than 9 character names properly.
4558
82ead3fe 45592008-04-13 Robert Millan <rmh@aybabtu.com>
4560
4561 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
4562 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
4563
e54a72f5 45642008-04-13 Christian Franke <franke@computer.org>
4565
4566 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
4567 to create a floppy emulation boot CD when non emulation mode
4568 does not work.
4569 Enable Joliet CD filesystem extension.
4570
9fe86034 45712008-04-13 Robert Millan <rmh@aybabtu.com>
4572
4573 * kern/misc.c (grub_strncat): Fix off-by-one error.
4574 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
4575
4576 * kern/env.c (grub_env_context_close): Clear current context, not
4577 previous one.
4578 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
4579
4580 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
4581
7ceeee39 45822008-04-13 Robert Millan <rmh@aybabtu.com>
4583
4584 Improve robustness when handling LVM.
4585
4586 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 4587 (and leave `*p' unmodified).
7ceeee39 4588 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
4589 through it.
4590 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
4591 iterating through it.
4592 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
4593 through it.
fe6b695a 4594 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 4595 when due) on each grub_lvm_getvalue() or grub_strstr() call.
4596 Don't assume `vg->pvs != NULL' when iterating through it.
4597
58cd3d85 45982008-04-13 Robert Millan <rmh@aybabtu.com>
4599
4600 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
4601 * genmk.rb (partmap): New variable.
4602 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
4603 (#{partmap}): New target rule.
4604 * genpartmaplist.sh: New file.
4605 * Makefile.in (pkglib_DATA): Add partmap.lst.
4606 (partmap.lst): New target rule.
4607 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
4608 modules (including all partition maps), instead of preloading them.
4609
78b51059 46102007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
4611
4612 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
4613 `linux-boot-prober' (if installed) to detect other operating
4614 systems which are installed on the computer and add them to
4615 the boot menu.
4616 * conf/common.rmk: Build and install 30_os-prober.
4617
a91627b4 46182008-04-12 Robert Millan <rmh@aybabtu.com>
4619
4620 * kern/powerpc/ieee1275/init.c: Move from here ...
4621 * kern/ieee1275/init.c: ... to here. Update all users.
4622
4623 * kern/powerpc/ieee1275/cmain.c: Move from here ...
4624 * kern/ieee1275/cmain.c: ... to here. Update all users.
4625
4626 * kern/powerpc/ieee1275/openfw.c: Move from here ...
4627 * kern/ieee1275/openfw.c: ... to here. Update all users.
4628
4629 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
4630 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
4631
322562ea 46322008-04-10 Pavel Roskin <proski@gnu.org>
4633
4634 * configure.ac: Always use "_cv_" in cache variables for
4635 compatibility with Autoconf 2.62.
4636
a02a73c5 46372008-04-07 Robert Millan <rmh@aybabtu.com>
4638
4639 Revert grub/machine/init.h addition by Pavel (since it breaks on
4640 i386-ieee1275 and others):
4641 * util/i386/pc/misc.c: Remove grub/machine/init.h.
4642 * util/powerpc/ieee1275/misc.c: Likewise.
4643
25c024b1 46442008-04-07 Robert Millan <rmh@aybabtu.com>
4645
4646 * util/grub-probe.c (probe): Improve error message.
4647
3cbd2f98 46482008-04-07 Robert Millan <rmh@aybabtu.com>
4649
4650 * util/biosdisk.c (read_device_map): Skip devices that don't exist
4651 (this prevents the presence of a bogus entry from ruining the whole
4652 thing).
4653
87a297bf 46542008-04-06 Pavel Roskin <proski@gnu.org>
4655
36747a62 4656 * util/biosdisk.c: Include grub/util/biosdisk.h.
4657 * util/grub-fstest.c (execute_command): Make static.
4658 * util/grub-mkdevicemap.c (check_device): Likewise.
4659 * util/i386/pc/misc.c: Include grub/machine/init.h.
4660 * util/powerpc/ieee1275/misc.c: Likewise.
4661 * util/lvm.c: Include grub/util/lvm.h.
4662 * util/misc.c: Include grub/kernel.h, grub/misc.h and
4663 grub/cache.h.
4664 * util/raid.c: Include grub/util/raid.h.
4665 (grub_util_getdiskname): Make static.
4666
87a297bf 4667 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
4668 grub_hostfs_fini(), as they are called from grub_init_all() and
4669 grub_fini_all() respectively. This fixes an infinite loop in
4670 grub-fstest due to double registration of hostfs.
4671 Reported by Christian Franke <Christian.Franke@t-online.de>
4672
f6ce7629 46732008-04-05 Pavel Roskin <proski@gnu.org>
4674
4675 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
4676 all 8 functions. Otherwise, probe function 0 only.
4677
070e49e4 46782008-04-04 Pavel Roskin <proski@gnu.org>
4679
8b088a4c 4680 * commands/lspci.c (grub_lspci_iter): Print the bus number
4681 correctly.
4682
4f657021 4683 * commands/lspci.c (grub_pci_classes): Fix typos.
4684 (grub_lspci_iter): Don't print func twice. Print vendor ID
4685 before device ID, as it's normally done.
4686
070e49e4 4687 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4688 Fix signedness warnings.
4689 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
4690 Likewise.
4691 * util/ieee1275/get_disk_name.c: Include config.h so that
4692 _GNU_SOURCE is defined and getline() is declared. Mark an
4693 unused argument as such. Fix a signedness warning.
4694
ba7328dc 46952008-04-02 Pavel Roskin <proski@gnu.org>
4696
26887f22 4697 * genkernsyms.sh.in: Use more robust assignments for CC and
4698 srcdir. Quote srcdir.
4699 * gensymlist.sh.in: Likewise. Assert at the compile time that
4700 the symbol table is not empty.
4701
ba7328dc 4702 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
4703 * fs/cpio.c (grub_cpio_read): Likewise.
4704
0f582c6b 47052008-04-01 Pavel Roskin <proski@gnu.org>
4706
4b6e1995 4707 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
4708 * disk/host.c (grub_host_open): Likewise.
4709 * disk/loopback.c (grub_loopback_open): Likewise.
4710 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
4711 disk->id as in disk/host.c, not a multi-character constant.
4712
828a2768 4713 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
4714 later is obsolete, potentially dangerous and sets a bad example.
4715 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
4716 * util/misc.c (grub_util_get_image_size): Likewise.
4717
2bb4fb47 4718 * disk/loopback.c (options): Improve help for "--partitions".
4719
0f582c6b 4720 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
4721 options to align them with the short options, e.g. "echo -e".
4722
a33224e0 47232008-03-31 Bean <bean123ch@gmail.com>
4724
4725 * video/reader/png.c (grub_png_data): New member is_16bit and
4726 image_data.
4727 (grub_png_decode_image_header): Detect 16 bit png image.
4728 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
4729 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
4730 (grub_video_reader_png): Release memory occupied by image_data.
4731
4732 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
4733 4096 bytes.
4734 (grub_nfs_mount): Skip the test for sector per cluster.
4735
4736 * include/grub/ntfs.h (MAX_SPC): Removed.
4737
86cb4f54 47382008-03-31 Bean <bean123ch@gmail.com>
4739
4740 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
4741 (grub_probe_SOURCES): Add fs/afs.c.
4742 (grub_fstest_SOURCES): Likewise.
4743 (afs_mod_SOURCES): New variable.
4744 (afs_mod_CFLAGS): Likewise.
4745 (afs_mod_LDFLAGS): Likewise.
4746
4747 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
4748 (grub_emu_SOURCES): Likewise.
4749
4750 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4751
4752 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4753
4754 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4755
4756 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4757
4758 * fs/afs.c: New file.
4759
17c74c21 47602008-03-30 Pavel Roskin <proski@gnu.org>
4761
4cb68e89 4762 * disk/host.c: Include grub/misc.h to fix a warning.
4763 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
4764 warnings about implicit declarations.
4765
8790bb04 4766 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
4767 variable.
4768 * include/grub/i386/loader.h: Change declaration of
4769 grub_linux_boot() to match what grub_loader_set() expects.
4770 * util/getroot.c (grub_guess_root_device): Return const char* to
4771 fix a warning.
4772 * util/grub-probe.c (probe): Fix a warning about uninitialized
4773 abstraction_name variable.
4774 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
4775 second argument as unused to fix a warning.
4776
9a3f3296 4777 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
4778 missing grub_error() call.
4779
0ecef90d 4780 * util/update-grub_lib.in: Define datarootdir, since Autoconf
4781 2.60 and newer uses it to define datadir.
4782
0bf6d401 4783 * commands/sleep.c: Fix warning about implicit declaration.
4784 * disk/memdisk.c: Likewise.
4785 * loader/aout.c: Likewise.
4786 * loader/i386/bsd_normal.c: Likewise.
4787 * util/grub-probe.c: Likewise.
4788
7cdacf97 4789 * commands/i386/cpuid.c (has_longmode): Make static.
4790 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
4791 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
4792
17c74c21 4793 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
4794 GDT. This is more robust, as %ds can change.
4795 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
4796 calling real_to_prot().
4797 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
4798
80a3e68b 47992008-03-28 Pavel Roskin <proski@gnu.org>
4800
4801 * kern/i386/pc/startup.S: Assert that uncompressed functions
4802 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
4803 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
4804 code, as they push parts of the code (error handlers) beyond
4805 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
4806 code as correctness and size.
4807
77bcd272 48082008-03-28 Pavel Roskin <proski@gnu.org>
4809
4810 * kern/i386/pc/startup.S
4811 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
4812 data block address to the real mode, keep offset minimal. This
4813 works around a bug in AWARD BIOS on old Athlon systems, which
4814 makes CD detection hang.
4815
c5dfd43b 48162008-03-26 Pavel Roskin <proski@gnu.org>
4817
4818 * normal/color.c (grub_parse_color_name_pair): Make `name' a
4819 const.
4820 * include/grub/normal.h: Add grub_parse_color_name_pair()
4821 declaration.
4822
bf962df2 48232008-03-24 Bean <bean123ch@gmail.com>
4824
4825 * disk/i386/pc/biosdisk.c (cd_start): Removed.
4826 (cd_count): Removed.
4827 (cd_drive): New variable.
4828 (grub_biosdisk_get_drive): Don't check for (cdN) device.
4829 (grub_biosdisk_call_hook): Likewise.
4830 (grub_biosdisk_iterate): Change cdrom detection method.
4831 (grub_biosdisk_open): Replace cd_start with cd_drive.
4832 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4833 detect cdrom device.
4834
4835 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4836 Removed.
4837 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4838 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4839 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4840 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4841 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4842 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4843 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4844 (grub_biosdisk_cdrp): New structure.
4845 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4846
4847 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4848
4849 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4850 device.
4851
4852 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4853 New function.
4854
68e7fc7a 48552008-03-20 Robert Millan <rmh@aybabtu.com>
4856
4857 Remove 2 TiB limit in ata.mod.
4858 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4859 (grub_ata_dumpinfo): Print sector count with 0x%llx.
4860 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4861 grub_uint64_t instead of grub_uint32_t.
4862
38ad2cf5 48632008-03-05 Bean <bean123ch@gmail.com>
4864
4865 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4866 (grub_multiboot): Set boot device.
4867
4868 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4869
2b89344e 48702008-03-02 Bean <bean123ch@gmail.com>
4871
4872 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4873 symlink_buffer.
4874
87a95d1f 48752008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
4876
4877 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4878 texinfo.tex.
4879
4880 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4881 modified.
4882
4883 * docs/fdl.texi: New file.
f19dbdb7 4884
87a95d1f 4885 * docs/mdate-sh: New file. Copied from gnulib.
4886 * docs/texinfo.tex: Likewise.
4887
4888 * config.guess: Updated from gnulib.
4889 * install-sh: Likewise.
4890
7dc15d8e 48912008-02-28 Robert Millan <rmh@aybabtu.com>
4892
4893 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4894 (aout_mod_SOURCES): New variable.
4895 (aout_mod_CFLAGS): Likewise.
4896 (aout_mod_LDFLAGS): Likewise.
4897
4898 * conf/i386-ieee1275.rmk: Likewise.
4899
b00ab696 49002008-02-28 Robert Millan <rmh@aybabtu.com>
4901
4902 * util/update-grub.in: Reorganise terminal validity check. Accept
4903 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4904 Based on suggestion by Franklin PIAT.
4905
79ca2d78 49062008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
4907
4908 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4909 function.
4910 * util/getroot.c (grub_util_check_block_device): New function that
4911 returns the given argument if it is a block device and returns NULL else.
4912 * util/grub-probe.c (argument_is_device): New variable.
4913 (probe): Promote device_name from a variable to an argument. Receive
4914 device_name from grub_util_check_block_device() if path is NULL and from
4915 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 4916 (options): Introduce new parameter '-d, --device'.
79ca2d78 4917 (main): Add description of the new parameter to the help screen.
4918 Rename path variable to argument. Set argument_is_device if the '-d'
4919 option is given. Pass argument to probe() depending on
4920 argument_is_device.
4921
0d16e571 49222008-02-24 Bean <bean123ch@gmail.com>
4923
4924 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4925 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4926 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4927 (GRUB_ISO9660_VOLDESC_PART): Likewise.
4928 (GRUB_ISO9660_VOLDESC_END): Likewise.
4929 (grub_iso9660_primary_voldesc): New member escape.
4930 (grub_iso9660_data): New member joliet.
4931 (grub_iso9660_convert_string): New function.
4932 (grub_iso9660_mount): Detect joliet extension.
4933 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4934 (grub_iso9660_iso9660_label): Likewise.
4935
4936 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4937 (grub_setup_SOURCES): Add fs/udf.c.
4938 (grub_fstest_SOURCES): Likewise.
4939 (udf_mod_SOURCES): New variable.
4940 (udf_mod_CFLAGS): Likewise.
4941 (udf_mod_LDFLAGS): Likewise.
4942
4943 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4944 (grub_emu_SOURCES): Likewise.
4945
4946 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4947
4948 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4949
4950 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4951
4952 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4953
4954 * fs/udf.c: New file.
4955
8a594a17 49562008-02-24 Robert Millan <rmh@aybabtu.com>
4957
4958 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4959 (normal/lexer.c_DEPENDENCIES): New variables.
4960 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4961 (normal/lexer.c_DEPENDENCIES): Likewise.
4962 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
4963 (normal/lexer.c_DEPENDENCIES): Likewise.
4964 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
4965 (normal/lexer.c_DEPENDENCIES): Likewise.
4966 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4967 (normal/lexer.c_DEPENDENCIES): Likewise.
4968 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4969 (normal/lexer.c_DEPENDENCIES): Likewise.
4970
2dc33c03 49712008-02-23 Robert Millan <rmh@aybabtu.com>
4972
4973 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
4974 since they were intended to be in hex. This didn't break previously
4975 because of a bug in gpt_partition_map_iterate() (see below).
4976
4977 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
4978 when checking the validity of GPT header.
4979 Remove `partno', since it always provides the same information as `i'.
4980
f6f4cfb0 49812008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
4982
4983 * include/grub/efi/time.h: Fix a wrong comment.
4984
79ff665f 49852008-02-19 Pavel Roskin <proski@gnu.org>
4986
4987 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
4988 message.
4989
d38e24c2 49902008-02-19 Bean <bean123ch@gmail.com>
4991
4992 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
4993 (aout_mod_SOURCES): New variable.
4994 (aout_mod_CFLAGS): Likewise.
4995 (aout_mod_LDFLAGS): Likewise.
4996 (_bsd_mod_SOURCES): New variable.
4997 (_bsd_mod_CFLAGS): Likewise.
4998 (_bsd_mod_LDFLAGS): Likewise.
4999 (bsd_mod_SOURCES): New variable.
5000 (bsd_mod_CFLAGS): Likewise.
5001 (bsd_mod_LDFLAGS): Likewise.
5002
5003 * include/grub/aout.h: New file.
5004
5005 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
5006
5007 * include/grub/i386/bsd.h: New file.
5008
5009 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
5010 to make it public.
5011
5012 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
5013 function is called, so that it's possible to change it inside the hook.
5014 (grub_elf64_load): Likewise.
5015 (grub_elf_file): Don't close the file if elf header is not found.
5016 (grub_elf_close): Close the file if grub_elf_file fails (The new
5017 grub_elf_file won't close it).
5018 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
5019 (grub_elf64_size): Likewise.
5020
5021 * kern/i386/loader.S (grub_unix_real_boot): New function.
5022
5023 * loader/aout.c: New file.
5024
5025 * loader/i386/bsd.c: New file.
5026
5027 * loader/i386/bsd_normal.c: New file.
5028
5029 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
5030
5031 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 5032 can test other formats.
d38e24c2 5033
b93bdb0f 50342008-02-19 Robert Millan <rmh@aybabtu.com>
5035
5036 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
5037 (grub_gpt_partition_type_empty): Redefine with macro from
5038 `<grub/gpt_partition.h>'.
5039 (gpt_partition_map_iterate): Adjust partition type comparison.
5040
5041 Export `entry' as partmap-specific `part.data' struct.
5042 (grub_gpt_header, grub_gpt_partentry): Move from here ...
5043
5044 * include/grub/gpt_partition.h (grub_gpt_header)
5045 (grub_gpt_partentry): ... to here (new file).
5046
5047 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
5048
5049 (grub_gpt_partition_type_bios_boot): New const variable, defined
5050 with macro from `<grub/gpt_partition.h>'.
5051
5052 (setup): Replace `first_start' with `embed_region', which keeps
5053 track of the embed region (and is partmap-agnostic).
5054
5055 Replace find_first_partition_start() with find_usable_region(),
5056 which finds a usable region for embedding using partmap-specific
5057 knowledge (supports PC/MSDOS and GPT).
5058
5059 Fix all assumptions that the embed region start at sector 1, using
5060 `embed_region.start' from now on. Similarly, use `embed_region.end'
5061 rather than `first_start' to calculate available size.
5062
5063 In grub_util_info() message, replace "into after the MBR" with an
5064 indication of the specific sector our embed region starts at.
5065
66cb40f6 50662008-02-19 Robert Millan <rmh@aybabtu.com>
5067
5068 * DISTLIST: Replace `commands/ieee1275/halt.c' and
5069 `commands/ieee1275/reboot.c' with `commands/halt.c' and
5070 `commands/reboot.c'.
5071 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5072 (halt_mod_SOURCES): Likewise.
5073 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
5074 (halt_mod_SOURCES): Likewise.
5075
b7202015 50762008-02-17 Christian Franke <franke@computer.org>
5077
5078 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
5079
32b0fc49 50802008-02-17 Robert Millan <rmh@aybabtu.com>
5081
5082 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5083 set `first_start' to 0 for non-PC/MSDOS partition maps.
5084
aca63502 50852008-02-16 Robert Millan <rmh@aybabtu.com>
5086
5087 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
5088 do not assume partition map is PC/MSDOS before performing checks that
5089 are specific to that layout.
5090
0de8be86 50912008-02-13 Robert Millan <rmh@aybabtu.com>
5092
5093 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
5094 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
5095 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
5096
c3db8364 50972008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
5098
5099 * configure.ac: Only a cosmetic change on the handling of
5100 -fno-stack-protector.
5101
f714229e 51022008-02-12 Alexandre Boeglin <alex@boeglin.org>
5103
c3db8364 5104 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
5105 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
5106 reboot.c.
f714229e 5107 (grub_install_SOURCES): Add halt.mod and reboot.mod.
5108 (halt_mod_SOURCES): New variable.
5109 (halt_mod_CFLAGS): Likewise.
5110 (halt_mod_LDFLAGS): Likewise.
5111 (reboot_mod_SOURCES): Likewise.
5112 (reboot_mod_CFLAGS): Likewise.
5113 (reboot_mod_LDFLAGS): Likewise.
5114
c3db8364 5115 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
5116 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
5117 reboot.c.
f714229e 5118 (halt_mod_SOURCES): Likewise.
5119 (reboot_mod_SOURCES): Likewise.
5120
c3db8364 5121 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
5122 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 5123 (reboot_mod_SOURCES): Likewise.
5124
5125 * commands/i386/pc/reboot.c: merge this file ...
5126
5127 * commands/ieee1275/reboot.c: ... and this file ...
5128
5129 * commands/reboot.c: ... to this file.
c3db8364 5130 Add some precompiler directive to include the correct header for
5131 each machine.
f714229e 5132
5133 * commands/ieee1275/halt.c: move this file ...
5134
5135 * commands/halt.c: ... to here.
c3db8364 5136 Add some precompiler directive to include the correct header for
5137 each machine.
f714229e 5138
5139 * include/grub/efi/efi.h (grub_reboot): New function declaration.
5140 (grub_halt): Likewise.
5141
5142 * kern/efi/efi.c (grub_reboot): New function.
5143 (grub_halt): Likewise.
5144
c74493e0 51452008-02-12 Robert Millan <rmh@aybabtu.com>
5146
5147 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
5148 /dev (like it is done for /dev/mapper). This doesn't provide support
5149 for EVMS, but at least it is now easy to identify the problem when it
5150 arises.
5151
d0db4b04 51522008-02-11 Robert Millan <rmh@aybabtu.com>
5153
5154 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
5155 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
5156 comparing it with -1, not 0.
5157
bf748642 51582008-02-10 Robert Millan <rmh@aybabtu.com>
5159
5160 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
5161 `disk/lvm.c'.
5162 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5163 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
5164
5165 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
5166 `disk/lvm.c' to the end of the list.
5167 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5168 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5169
b5db202a 51702008-02-10 Robert Millan <rmh@aybabtu.com>
5171
5172 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
5173 grub_print_error() instead. This will let user know why we're entering
5174 rescue mode.
5175 Based on suggestions from Sam Morris.
5176
83abee31 51772008-02-10 Alexandre Boeglin <alex@boeglin.org>
5178
5179 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
5180 on remaining N args, instead of "--" arg N times.
5181
78d5a08b 51822008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
5183
5184 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
5185 (fill_with_default_glyph): Changed to use unknown_glyph for fill
5186 pattern for unknown glyphs.
5187
68807e5f 51882008-02-09 Robert Millan <rmh@aybabtu.com>
5189
5190 * configure.ac: Probe for `help2man'.
5191 * Makefile.in (builddir): New variable.
5192 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
5193 or otherwise add a few flags/options to it.
5194 (install-local): For every executable utility or script that is
5195 installed, invoke $(HELP2MAN) to install a manpage based on --help
5196 output.
5197
5198 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
5199 that it doesn't prevent --help from working in build tree.
5200
5201 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
5202 with `bug-grub@gnu.org'.
5203 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
5204 * util/update-grub.in (usage): New function.
5205 Implement proper argument check, with support for --help and --version
5206 (as well as existing -y).
5207
52082008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 5209
5210 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
5211 avoid overwriting previous output.
5212 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
5213
c1962162 52142008-02-09 Robert Millan <rmh@aybabtu.com>
5215
5216 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
5217 drawing the menu.
5218
3dac2e3f 52192008-02-09 Robert Millan <rmh@aybabtu.com>
5220
5221 * commands/sleep.c: New file.
5222 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
5223 (sleep_mod_SOURCES): New variable.
5224 (sleep_mod_CFLAGS): Likewise.
5225 (sleep_mod_LDFLAGS): Likewise.
5226
7a634e08 52272008-02-09 Robert Millan <rmh@aybabtu.com>
5228
5229 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
5230 situations in which we can deduce the RAID size and the superblock
5231 doesn't match it.
5232
b92f0c18 52332008-02-09 Robert Millan <rmh@aybabtu.com>
5234
5235 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
5236 and return a grub_diskmemberlist_t composed of LVM physical volumes.
5237 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
5238
5239 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
5240 and return a grub_diskmemberlist_t composed of physical array members.
5241 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
5242
5243 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
5244 prototype.
5245 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
5246 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
5247 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
5248
5249 * util/grub-probe.c (probe): Move partmap probing code from here ...
5250 (probe_partmap): ... to here.
5251 (probe): Use probe_partmap() once for the disk we're probing, and
5252 additionally, when such disk contains a memberlist() struct member,
5253 once for each disk that is contained in the structure returned by
5254 memberlist().
5255
91a4bf68 52562008-02-09 Robert Millan <rmh@aybabtu.com>
5257
5258 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
5259 environment variable to 'all' in order to obtain debug output from
5260 non-util/ code.
5261 * util/i386/pc/grub-setup.c (main): Likewise.
5262
a96f9caa 52632008-02-08 Robert Millan <rmh@aybabtu.com>
5264
5265 * disk/raid.c (grub_raid_scan_device): Check for
5266 `array->device[sb.this_disk.number]' rather than for
5267 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 5268 guaranteed to be accessible.
a96f9caa 5269
b37a9222 52702008-02-08 Robert Millan <rmh@aybabtu.com>
5271
5272 * disk/raid.c: Update copyright.
5273 * fs/cpio.c: Likewise.
5274 * include/grub/raid.h: Likewise.
5275 * loader/i386/pc/multiboot.c: Likewise.
5276 * util/hostfs.c: Likewise.
5277
5626aee1 52782008-02-08 Robert Millan <rmh@aybabtu.com>
5279
5280 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
5281 to a grub_disk_t array.
5282 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
5283 `device[x]'.
5284 (grub_raid_scan_device): Replace `device[x].name' accesses with
5285 `device[x]->name'. Simplify initialization of `array->device[x]'.
5286
554f0187 52872008-02-08 Robert Millan <rmh@aybabtu.com>
5288
5289 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
5290 grub_dprintf() calls.
5291 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
5292 error message.
5293
1ec8425d 52942008-02-07 Christian Franke <franke@computer.org>
5295
5296 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
5297 instead of fseek and ftell to support large files.
5298 (grub_hostfs_read): Likewise.
5299
f2156fda 53002008-02-07 Robert Millan <rmh@aybabtu.com>
5301
5302 Patch from Jeroen Dekkers.
5303 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 5304 failure, since successfully reading all array members might not be
f2156fda 5305 required.
5306
9216e0e7 53072008-02-06 Robert Millan <rmh@aybabtu.com>
5308
5309 * util/grub-probe.c (probe): Simplify partmap probing (with the
5310 assumption that the first word up to the underscore equals to
5311 the module name).
5312
b0dfd29a 53132008-02-06 Christian Franke <franke@computer.org>
5314
5315 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
5316 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
5317 last block of a cpio or tar stream.
5318 Check for "TRAILER!!!" instead of any empty data
5319 block to detect last block of a cpio stream.
5320 (grub_cpio_dir): Fix constness of variable np.
5321 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
5322 cpio or tar trailer is detected. This fixes a crash
5323 on open of a non existing file.
5324
c32865bf 53252008-02-05 Bean <bean123ch@gmail.com>
5326
5327 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
5328 address of entry.
5329 (grub_multiboot_load_elf64): Likewise.
5330 (grub_multiboot): Initialize mbi structure.
5331
5332 * util/grub-fstest.c: Don't include unused header file script.h.
5333
fe6b695a 5334 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 5335 of file.
5336 (grub_fstest_SOURCES): Likewise.
5337
409480b7 53382008-02-05 Robert Millan <rmh@aybabtu.com>
5339
5340 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
5341 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
5342 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
5343 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
5344
5345 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
5346 (translation_table): Replace hardcoded values with macros
5347 provided by `<grub/term.h>'.
5348
5349 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
5350 (keyboard_map): Correct/add a few values, with macros provided
5351 by `<grub/term.h>'.
5352 (keyboard_map_shift): Zero values that don't differ from their
5353 `keyboard_map' equivalents.
5354 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
5355 Discard the second scan code that is always sent by Caps lock.
5356 Only use `keyboard_map_shift' when it provides a non-zero value,
5357 otherwise fallback to `keyboard_map'.
5358
99fadbaa 53592008-02-04 Bean <bean123ch@gmail.com>
5360
5361 * Makefile.in (enable_grub_fstest): New variable.
5362
5363 * conf/common.rmk (grub_fstest_init.lst): New rule.
5364 (grub_fstest_init.h): Likewise.
5365 (grub_fstest_init.c): Likewise.
5366 (util/grub-fstest.c_DEPENDENCIES): New variable.
5367 (grub_fstest_SOURCES): Likewise.
5368
5369 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
5370
5371 * util/grub-fstest.c: New file.
5372
bf567c50 53732008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5374
5375 Make grub-setup handle a separate root device.
f19dbdb7 5376
bf567c50 5377 * util/i386/pc/grub-setup.c (setup): Always open the root device,
5378 so that the root device can be compared with the destination
5379 device.
5380 When embedding the core image, if the root and destination devices
5381 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
5382 0xFF.
5383 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 5384
9be6b98b 53852008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5386
5387 Add support for having a grub directory in a different drive. This
5388 is still only the data handling part.
f19dbdb7 5389
9be6b98b 5390 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
5391 (codestart): Save %dh in GRUB_ROOT_DRIVE.
5392 (grub_root_drive): New variable.
5393
5394 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
5395 instead of GRUB_BOOT_DRIVE to construct a device name. Set
5396 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
5397 as it was.
5398
5399 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
5400
5401 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
5402 macro.
5403 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
5404
5405 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
5406 is bogus, because PXE booting does not specify any drive
5407 correctly.
5408
5409 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
5410 am not sure if this is really correct.
5411
5412 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
5413 is always identical to the boot drive when booting from a CD.
5414
5415 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
5416 longer.
5417 (root_drive): New variable.
5418 (real_start): Unconditionally set %dh to ROOT_DRIVE.
5419 (setup_sectors): Push %dx right after popping it, because %dh will
5420 be modified later.
5421 (copy_buffer): Restore %dx.
5422
e0ca0677 54232008-02-03 Robert Millan <rmh@aybabtu.com>
5424
5425 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
5426 use `cdboot.img' for cdrom images.
5427
3b3f6629 54282008-02-03 Robert Millan <rmh@aybabtu.com>
5429
5430 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
5431 only setup gfxterm when `font' command has succeeded.
5432
d42b3672 54332008-02-03 Robert Millan <rmh@aybabtu.com>
5434
5435 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
5436 (grub_rescue_cmd_multiboot_loader)
5437 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
5438
fa370ea6 54392008-02-03 Pavel Roskin <proski@gnu.org>
5440
e0c5dacb 5441 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 5442 %edx and %esi from stack only after grub_gate_a20() is called.
5443 grub_gate_a20() clobbers %edx.
5444
f2a76e1d 54452008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5446
5447 * configure.ac (AC_INIT): Bumped to 1.96.
5448
5449 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
5450 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
5451 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
5452 video/readers/png.c.
5453
90fd32d1 54542008-02-03 Bean <bean123ch@gmail.com>
9be665dd 5455
5456 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
5457 (cdboot_img_SOURCES): New variable.
5458 (cdboot_img_ASFLAGS): New variable.
5459 (cdboot_img_LDFLAGS): New variable.
5460
5461 * boot/i386/pc/cdboot.S: New file.
5462
5463 * disk/i386/pc/biosdisk.c (cd_start): New variable.
5464 (cd_count): Likewise.
5465 (grub_biosdisk_get_drive): Add support for cd device.
5466 (grub_biosdisk_call_hook): Likewise.
5467 (grub_biosdisk_iterate): Likewise.
5468 (grub_biosdisk_open): Likewise.
5469 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
5470 (grub_biosdisk_rw): Support reading from cd device.
5471 (GRUB_MOD_INIT): Iterate cd devices.
5472
5473 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
5474 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
5475 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
5476
5477 * kern/i386/pc/init.c (make_install_device): Check for cd device.
5478
4020aa53 54792008-02-02 Robert Millan <rmh@aybabtu.com>
5480
5481 * commands/read.c: New file.
5482 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
5483 (read_mod_SOURCES): New variable.
5484 (read_mod_CFLAGS): Likewise.
5485 (read_mod_LDFLAGS): Likewise.
5486
e03a1132 54872008-02-02 Robert Millan <rmh@aybabtu.com>
5488
5489 * normal/main.c (grub_normal_execute): Check for `menu->size' when
5490 determining whether menu has to be displayed.
5491
58c69220 54922008-02-02 Marco Gerards <marco@gnu.org>
5493
5494 * bus/pci.c: New file.
5495
5496 * include/grub/pci.h: Likewise.
5497
5498 * include/grub/i386/pc/pci.h: Likewise.
5499
5500 * commands/lspci.c: Likewise.
5501
5502 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
5503 `lspci.mod'.
5504 (pci_mod_SOURCES): New variable.
5505 (pci_mod_CFLAGS): Likewise.
5506 (pci_mod_LDFLAGS): Likewise.
5507 (lspci_mod_SOURCES): Likewise.
5508 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 5509 (lspci_mod_LDFLAGS): Likewise.
58c69220 5510
c004e1b4 55112008-02-02 Bean <bean123ch@gmail.com>
5512
5513 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
5514 (grub_ufs_get_file_block): Fix indirect block calculation problem.
5515
5516 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
5517 (grub_xfs_btree_node): New structure.
5518 (grub_xfs_btree_root): New structure.
5519 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
5520 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
5521 (GRUB_XFS_EXTENT_BLOCK): Likewise.
5522 (GRUB_XFS_EXTENT_SIZE): Likewise.
5523 (grub_xfs_read_block): Support btree format type.
5524 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
5525 Use directory block as basic unit.
5526
5527 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
5528
5529 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
5530 __attribute__ ((__regparm__ (1))).
5531
f95562bf 55322008-02-01 Robert Millan <rmh@aybabtu.com>
5533
5534 Correct a mistake in previous commit.
5535
5536 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
5537 top.
5538 (normal/command.c_DEPENDENCIES): New variable.
5539
7d31f41f 55402008-02-01 Robert Millan <rmh@aybabtu.com>
5541
5542 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
5543 top.
5544 (normal/command.c_DEPENDENCIES): New variable.
5545 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
5546 * conf/i386-ieee1275.rmk: Likewise.
5547 * conf/i386-linuxbios.rmk: Likewise.
5548 * conf/i386-pc.rmk: Likewise.
5549 * conf/sparc64-ieee1275.rmk: Likewise.
5550 * conf/powerpc-ieee1275.rmk: Likewise.
5551 (grub_emu_SOURCES): Add `fs/fshelp.c'.
5552
5553 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
5554
60b6be74 55552008-02-01 Robert Millan <rmh@aybabtu.com>
5556
5557 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
5558 call at beginning of function.
5559
078522ab 55602008-01-31 Pavel Roskin <proski@gnu.org>
5561
5562 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 5563 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
5564 (grub_mkrescue_SOURCES): Likewise.
078522ab 5565 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
5566
ccaa8a5f 55672008-01-30 Robert Millan <rmh@aybabtu.com>
5568
5569 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
5570 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
5571 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
5572 (grub_probe_SOURCES): ... to here.
5573
5574 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
5575 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
5576 * conf/i386-ieee1275.rmk: Likewise.
5577 * conf/i386-linuxbios.rmk: Likewise.
5578 * conf/powerpc-ieee1275.rmk: Likewise.
5579
ae5a9cd7 55802008-01-30 Tristan Gingold <gingold@free.fr>
5581
5582 * kern/rescue.c: Silently accept empty lines.
5583
70bc2ef2 55842008-01-29 Bean <bean123ch@gmail.com>
5585
5586 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
5587 (real_code_2): Code cleanup and change comment style.
5588 (move_memory): Avoid using 32-bit address mode.
5589
6a4d50ea 55902008-01-29 Bean <bean123ch@gmail.com>
5591
5592 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
5593 (png_mod_SOURCES): New variable.
5594 (png_mod_CFLAGS): Likewise.
5595 (png_mod_LDFLAGS): Likewise.
5596
5597 * video/readers/png.c: New file.
5598
11cc30ac 55992008-01-28 Robert Millan <rmh@aybabtu.com>
5600
5601 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
5602 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
5603 `ifndef GRUB_MOD_GAP' hack.
5604 * util/elf/grub-mkimage.c (add_segments): Likewise.
5605
3abc589f 56062008-01-27 Robert Millan <rmh@aybabtu.com>
5607
5608 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
5609 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 5610 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 5611
e1907778 56122008-01-27 Robert Millan <rmh@aybabtu.com>
5613
5614 Get grub-emu to build again (including parallel builds).
5615
5616 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
5617 Split into ...
5618 (util/grub-emu.c_DEPENDENCIES): ... this, ...
5619 (normal/execute.c_DEPENDENCIES): ... this, ...
5620 (grub-emu_DEPENDENCIES): ... and this.
5621
5622 * conf/i386-efi.rmk: Likewise.
5623 * conf/i386-linuxbios.rmk: Likewise.
5624 * conf/i386-ieee1275.rmk: Likewise.
5625 * conf/powerpc-ieee1275.rmk: Likewise.
5626 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
5627
2216b101 56282008-01-27 Robert Millan <rmh@aybabtu.com>
5629
5630 * NEWS: Add a few items.
5631
f75172d9 56322008-01-27 Robert Millan <rmh@aybabtu.com>
5633
5634 Fix parallel builds with grub-emu. Based on earlier commit for
5635 grub-probe and grub-setup.
5636
5637 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5638 (util/grub-emu.c_DEPENDENCIES): ... this.
5639 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5640 (util/grub-emu.c_DEPENDENCIES): ... this.
5641 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5642 (util/grub-emu.c_DEPENDENCIES): ... this.
5643 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5644 (util/grub-emu.c_DEPENDENCIES): ... this.
5645 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5646 (util/grub-emu.c_DEPENDENCIES): ... this.
5647
3f51de77 56482008-01-27 Pavel Roskin <proski@gnu.org>
5649
5650 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
5651 to create a gap between _end and the modules added to the image
5652 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
5653 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
5654 * util/elf/grub-mkimage.c (add_segments): Likewise.
5655
2033f53e 56562008-01-26 Pavel Roskin <proski@gnu.org>
5657
5658 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
5659 just return an error.
5660
22da1f6f 56612008-01-26 Bean <bean123ch@gmail.com>
5662
5663 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
5664 (grub_reiserfs_get_item): Save offset of the next item.
5665 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
5666
2a9525e6 56672008-01-25 Robert Millan <rmh@aybabtu.com>
5668
5669 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
5670 make all filesystem sources appear together (possibly fixing omissions
5671 while at it).
5672 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5673 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5674 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5675 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5676
5677 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
5678 add `kern/file.c'.
5679 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
5680 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5681 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
5682 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5683
5684 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
5685 (probe): Add a sanity check to make sure of our ability to read
5686 requested files when probing for filesystem type.
5687
5688 * genmk.rb: Update copyright year (2007).
5689
5690 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
5691 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
5692 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
5693 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
5694 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
5695 : Remove function prototypes.
5696
b95f71b5 56972008-01-25 Robert Millan <rmh@aybabtu.com>
5698
5699 Revert my previous commits (based on wrong assumption of how grub_errno
5700 works).
5701
fe6b695a 5702 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 5703 * kern/file.c (grub_file_open): Likewise.
5704
d08bbb49 57052008-01-24 Pavel Roskin <proski@gnu.org>
5706
5707 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
5708 that hang if GRUB tries to setup colors.
5709 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
5710 colors for firmwares that don't support it.
5711 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
5712 Recognize Open Hack'Ware, set flags to work around its
5713 limitations.
5714
605e36ed 57152008-01-24 Robert Millan <rmh@aybabtu.com>
5716
5717 * kern/file.c (grub_file_open): Do not account previous failures of
5718 unrelated functions when grub_errno is checked for.
5719 Reported by Oleg Strikov.
5720
bac332a1 57212008-01-24 Bean <bean123ch@gmail.com>
5722
5723 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
5724 (grub_ufs_sblock): New member volume name.
5725 (grub_ufs_find_file): Fix string copy bug.
5726 (grub_ufs_label): Implement this function properly.
5727
5728 * fs/hfs.c (grub_hfs_cnid_type): New enum.
5729 (grub_hfs_iterate_records): Use the correct file number for extents
5730 and catalog file. Fix problem in next index calculation.
5731 (grub_hfs_find_node): Replace recursive function call with loop.
5732 (grub_hfs_iterate_dir): Replace recursive function call with loop.
5733
15c80c09 57342008-01-23 Robert Millan <rmh@aybabtu.com>
5735
5736 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
5737 `<grub/symbol.h>' and `<grub/multiboot.h>'.
5738 (grub_multiboot2_real_boot): New function prototype.
5739
5740 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
5741 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
5742
5743 * kern/i386/ieee1275/init.c (grub_os_area_addr)
5744 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
5745
305338fd 57462008-01-23 Robert Millan <rmh@aybabtu.com>
5747
5748 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
5749 #ifdef'ed out grub_printf().
5750
3ea52685 57512008-01-23 Robert Millan <rmh@aybabtu.com>
5752
5753 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
5754 grub_dprintf calls, since they make "debug=all" mode unusable.
5755 (grub_console_checkkey): Likewise.
5756
5882ae4b 57572008-01-23 Robert Millan <rmh@aybabtu.com>
5758
5759 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5760 `term/i386/pc/at_keyboard.c'.
5761 (pkglib_MODULES): Add `serial.mod'.
5762 (serial_mod_SOURCES): New variable.
5763 (serial_mod_CFLAGS): Likewise.
5764 (serial_mod_LDFLAGS): Likewise.
5765
5766 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
5767 `<grub/powerpc/ieee1275/console.h>'.
5768 (grub_keyboard_controller_init): New function prototype.
5769 (grub_console_checkkey): Likewise.
5770 (grub_console_getkey): Likewise.
5771
5772 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
5773 keyboard on i386.
5774
5775 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
5776 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
5777
06ab5303 57782008-01-23 Robert Millan <rmh@aybabtu.com>
5779
5780 * kern/i386/pc/init.c (make_install_device): When memdisk image is
5781 present, "(memdisk)/boot/grub" becomes the default prefix.
5782
5783 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
5784 a memdisk tarball with all the modules. Add --overlay=DIR option that
5785 allows users to overlay additional files into the image.
5786
dbb475a4 57872008-01-23 Robert Millan <rmh@aybabtu.com>
5788
5789 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
5790 and `machine/memory.h'.
5791 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
5792 (_multiboot_mod_SOURCES): New variable.
5793 (_multiboot_mod_CFLAGS): Likewise.
5794 (_multiboot_mod_LDFLAGS): Likewise.
5795 (multiboot_mod_SOURCES): Likewise.
5796 (multiboot_mod_CFLAGS): Likewise.
5797 (multiboot_mod_LDFLAGS): Likewise.
5798
5799 * include/grub/i386/ieee1275/loader.h: New file.
5800
5801 * include/grub/i386/ieee1275/machine.h: Likewise.
5802
5803 * include/grub/i386/ieee1275/memory.h: Likewise.
5804
5805 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
5806 variable declaration.
5807 (grub_os_area_size): Likewise.
5808
5809 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
5810 (grub_lower_mem, grub_upper_mem): New variables.
5811 (grub_stop_floppy): New function (just to make
5812 grub_multiboot2_real_boot() happy).
5813
5814 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
5815 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
5816 (grub_stop): New function.
5817 Include `"../realmode.S"' and `"../loader.S"'.
5818
5819 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5820 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5821
5822 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5823 rely on grub_multiboot2_real_boot() for final boot.
5824
25638629 58252008-01-22 Robert Millan <rmh@aybabtu.com>
5826
5827 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5828 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5829 device that doesn't look like an SD card.
5830 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5831 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5832 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5833 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5834 found.
5835
9dad816d 58362008-01-22 Robert Millan <rmh@aybabtu.com>
5837
5838 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5839 avoid claiming over our own code.
5840
34842f2d 58412008-01-22 Bean <bean123ch@gmail.com>
5842
5843 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5844 (jpeg_mod_SOURCES): New variable.
5845 (jpeg_mod_CFLAGS): Likewise.
5846 (jpeg_mod_LDFLAGS): Likewise.
5847
5848 * video/readers/jpeg.c : New file.
5849
44023a28 58502008-01-22 Bean <bean123ch@gmail.com>
5851
5852 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5853 there are no more items.
5854
bc2d8ac6 58552008-01-21 Robert Millan <rmh@aybabtu.com>
5856
5857 * kern/mm.c (grub_mm_init_region): Improve debug message.
5858
261bd4bc 58592008-01-21 Robert Millan <rmh@aybabtu.com>
5860
5861 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5862 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5863 address.
5864 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5865 a C macro.
5866 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5867 Indicates start of upper memory.
5868 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5869 (generate_image): Abort when image size is big enough to corrupt
5870 upper memory.
5871
5872 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5873 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5874 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5875 instead of hardcoding 0xA0000.
5876 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5877 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5878 instead of hardcoding 0xA0000.
5879
f970b55e 58802008-01-21 Robert Millan <rmh@aybabtu.com>
5881
5882 * disk/memdisk.c (memdisk_size): New variable.
5883 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5884 `memdisk_size'.
5885 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
5886 image to dynamic memory.
5887 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5888 `memdisk_size'. Free memdisk block.
5889
1a8b0526 58902008-01-21 Robert Millan <rmh@aybabtu.com>
5891
5892 Fix detection of very small filesystems (like tar).
5893
5894 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5895 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5896 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5897 a problem with this disk).
5898
6e9b4aab 58992008-01-21 Robert Millan <rmh@aybabtu.com>
5900
5901 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5902 on grub_biosdisk_rw_standard() error.
5903
0d8837b2 59042008-01-21 Robert Millan <rmh@aybabtu.com>
5905
5906 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5907 recent changes.
5908 * kern/elf.c: Likewise.
5909 * kern/ieee1275/ieee1275.c: Likewise.
5910 * kern/powerpc/ieee1275/openfw.c: Likewise.
5911 * term/ieee1275/ofconsole.c: Likewise.
5912
ffd36e34 59132008-01-21 Robert Millan <rmh@aybabtu.com>
5914
5915 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5916
3f0093d0 5917 * include/grub/kernel.h (grub_arch_memdisk_addr)
5918 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 5919
3f0093d0 5920 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5921 (grub_arch_memdisk_size): ... to here.
ffd36e34 5922
6c391b21 59232008-01-21 Robert Millan <rmh@aybabtu.com>
5924
5925 Mostly based on bugfix from Bean.
5926
5927 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5928 attribute with hook() parameter.
5929 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5930 declaration.
5931 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5932 attribute with hook() parameter.
5933 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5934 declaration.
5935
55a581dc 59362008-01-21 Robert Millan <rmh@aybabtu.com>
5937
5938 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5939 (pkglib_MODULES): Add `memdisk.mod'.
5940 (memdisk_mod_SOURCES): New variable.
5941 (memdisk_mod_CFLAGS): Likewise.
5942 (memdisk_mod_LDFLAGS): Likewise.
5943
5944 * disk/memdisk.c: New file.
5945
5946 * include/grub/disk.h (grub_disk_dev_id): Add
5947 `GRUB_DISK_DEVICE_MEMDISK_ID'.
5948
5949 * include/grub/i386/pc/kernel.h
5950 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5951 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5952 (grub_kernel_image_size): New variable declaration.
5953 (grub_total_module_size): Likewise.
5954 (grub_memdisk_image_size): Likewise.
5955
5956 * include/grub/i386/pc/memory.h
5957 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5958
5959 * include/grub/kernel.h: Include `<grub/symbol.h>'.
5960 (grub_arch_memdisk_addr): New variable declaration.
5961 (grub_arch_memdisk_size): Likewise.
5962
5963 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
5964 (grub_arch_memdisk_size): Likewise.
5965
5966 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
5967 (codestart): Replace hardcoded `0x100000' with
5968 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
5969
5970 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
5971 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
5972 not NULL, append the contents of the file it refers to, at the end of
5973 the compressed kernel image. Initialize `grub_memdisk_image_size'
5974 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
5975 (options): Add "memdisk"|'m' option.
5976 (main): Parse --memdisk|-m option, and pass user-provided path as
5977 parameter to generate_image().
5978
3d7f54c9 59792008-01-20 Robert Millan <rmh@aybabtu.com>
5980
5981 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
5982 grub_dprintf() calls from here ...
5983 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
5984
0bf74728 59852008-01-20 Robert Millan <rmh@aybabtu.com>
5986
5987 Fix detection of "real mode" when /options/real-mode? doesn't exist.
5988
5989 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
5990 declaration.
5991 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
5992 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
5993 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 5994 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 5995 property).
5996 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
5997 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
5998
33bf70a7 59992008-01-19 Robert Millan <rmh@aybabtu.com>
6000
fe6b695a 6001 Get rid of confusing function (superseded by
33bf70a7 6002 `grub_ieee1275_get_integer_property')
6003 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
6004 prototype.
6005 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
6006 function.
6007 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
6008 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 6009 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 6010
e2da7d26 60112008-01-19 Robert Millan <rmh@aybabtu.com>
6012
6013 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
6014 command after "shut-down", since implementations differ on which
6015 the command for halt is.
6016
59f1fd8d 60172008-01-19 Robert Millan <rmh@aybabtu.com>
6018
6019 * include/grub/i386/linuxbios/console.h: Add header protection.
6020 (grub_keyboard_controller_init): New function prototype.
6021 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
6022 (KEYBOARD_COMMAND_READ): Likewise.
6023 (KEYBOARD_COMMAND_WRITE): Likewise.
6024 (KEYBOARD_SCANCODE_SET1): Likewise.
6025 (grub_keyboard_controller_write): New function.
6026 (grub_keyboard_controller_read): Likewise.
6027 (grub_keyboard_controller_init): Likewise.
6028
6029 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
6030 (grub_console_init): On coreboot/LinuxBIOS, call
6031 grub_keyboard_controller_init().
6032
5f5a7c15 60332008-01-19 Robert Millan <rmh@aybabtu.com>
6034
6035 PowerPC changes provided by Pavel Roskin.
6036
6037 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
6038 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
6039 don't rely on cmain() doing it.
6040 * kern/i386/ieee1275/startup.S (_start): Store %eax in
6041 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
6042
1210e168 60432008-01-16 Robert Millan <rmh@aybabtu.com>
6044
6045 * include/grub/i386/linuxbios/memory.h
6046 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
6047 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
6048 receive `table_header' as argument. Instead, probe for it in the
6049 known memory ranges where it can be present.
6050 (grub_available_iterate): Do not pass a fixed `table_header' address
6051 to grub_linuxbios_table_iterate().
6052
3d04eab8 60532008-01-15 Robert Millan <rmh@aybabtu.com>
6054
6055 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
6056 * conf/i386-ieee1275.rmk: New file.
6057 * include/grub/i386/ieee1275/console.h: Likewise.
6058 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
6059 * include/grub/i386/ieee1275/kernel.h: Likewise.
6060 * include/grub/i386/ieee1275/time.h: Likewise.
6061 * kern/i386/ieee1275/init.c: Likewise.
6062 * kern/i386/ieee1275/startup.S: Likewise.
6063
d1bc1b73 60642008-01-15 Robert Millan <rmh@aybabtu.com>
6065
6066 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
6067 when pointers are 32-bit (but still do set it to one when they are
6068 64-bit).
6069
66a65807 60702008-01-15 Robert Millan <rmh@aybabtu.com>
6071
6072 * include/grub/ieee1275/ieee1275.h
6073 (grub_ieee1275_get_integer_property): New function prototype.
6074
6075 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
6076 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 6077 grub_ieee1275_get_property() to handle endianness.
66a65807 6078
6079 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
6080 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 6081 where appropriate.
66a65807 6082 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
6083 (grub_map): Likewise.
6084 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
6085
a83ccafd 60862008-01-15 Bean <bean123ch@gmail.com>
6087
6088 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
6089 (grub_script_execute_cmdline): Reset grub_errno.
6090
6091 * normal/main.c (read_config_file): Reset grub_errno.
6092
6093 * normal/parse.y (script_init): New.
6094 (script): Move function and menuentry here.
6095 (delimiter): New.
6096 (command): Add delimiter at the end of command.
6097 (commands): Adjust to match the new command.
6098 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 6099 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 6100 (if): Use the new commands.
6101
6102 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
6103
df6ecfc6 61042008-01-15 Robert Millan <rmh@aybabtu.com>
6105
6106 * normal/menu.c (run_menu): Move timeout message from here ...
6107 (print_timeout): ... to here.
6108 (run_menu): Use print_timeout() once during initial draw to print
6109 the whole message, and again in every clock tick to update only
6110 the number of seconds.
6111
87ae25eb 61122008-01-15 Robert Millan <rmh@aybabtu.com>
6113
6114 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
6115 actual size of `available' from grub_ieee1275_get_property(), and
6116 restrict parsing to that bound.
6117
47bf09a4 61182008-01-15 Christian Franke <franke@computer.org>
6119
6120 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
6121 (argp_program_version): Remove variable.
6122 (argp_program_bug_address): Likewise.
6123 (options): Convert from struct argp_option to struct option.
6124 (struct arguments): Remove.
6125 (parse_opt): Remove.
6126 (usage): New function.
6127 (main): Replace struct args members by simple variables.
6128 Replace argp_parse() by getopt_long().
6129 Add switch to evaluate options.
6130 Add missing "(...)" around root_dev in prefix string.
6131
c86f1469 61322008-01-14 Robert Millan <rmh@aybabtu.com>
6133
6134 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
6135 for grub_ieee1275_exit(), in order to improve portability.
6136
e622c559 61372008-01-14 Robert Millan <rmh@aybabtu.com>
6138
6139 * util/grub.d/10_linux.in (prefix): Define.
6140 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
6141
44cb1ec8 61422008-01-13 Pavel Roskin <proski@gnu.org>
6143
6144 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
6145 grub_errno if no errors have been detected.
6146
1eb8c802 61472008-01-12 Robert Millan <rmh@aybabtu.com>
6148
6149 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
6150 (grub_util_get_dev_abstraction): New function prototype.
6151
6152 * util/getroot.c: Include `<grub/util/getroot.h>'
6153 (grub_util_get_grub_dev): Move detection of abstraction type to ...
6154 (grub_util_get_dev_abstraction): ... here (new function).
6155
6156 * util/grub-probe.c: Convert PRINT_* to an enum. Add
6157 `PRINT_ABSTRACTION'.
6158 (probe): Probe for abstraction type when requested.
6159 (main): Understand `--target=abstraction'.
6160
6161 * util/i386/efi/grub-install.in: Add abstraction module to core
6162 image when it is found to be necessary.
6163 * util/i386/pc/grub-install.in: Likewise.
6164 * util/powerpc/ieee1275/grub-install.in: Likewise.
6165
6166 * util/update-grub_lib.in (font_path): Return system path without
6167 converting to GRUB path.
6168 * util/update-grub.in: Convert system path returned by font_path()
6169 to a GRUB path. Use `grub-probe -t abstraction' to determine what
6170 abstraction module is needed for loading fonts (if any). Export
6171 that as `GRUB_PRELOAD_MODULES'.
6172 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
6173 insmod commands).
6174
52bd3de9 61752008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
6176
6177 Remove some unused code from reiserfs.
f19dbdb7 6178
52bd3de9 6179 * fs/reiserfs.c (struct grub_reiserfs_key)
6180 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
6181 (struct grub_reiserfs_node_body): Removed.
6182 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6183 Likewise.
6184 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6185 Likewise.
6186 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6187 Likewise.
6188 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6189 Likewise.
6190 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6191 Likewise.
6192 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
6193 Likewise.
6194 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6195 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6196 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6197
2f80039d 61982008-01-10 Robert Millan <rmh@aybabtu.com>
6199
6200 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
6201 Determines if a file is garbage left by packaging systems, etc.
6202 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
6203 for processing /etc/grub.d scripts.
6204 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
6205 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
6206 as a condition for processing Linux images.
6207
87888032 62082008-01-10 Pavel Roskin <proski@gnu.org>
6209
6210 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
6211 to compile reiserfs.c on PowerPC.
6212
7e54fced 62132008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 6214
6215 * kern/device.c (grub_device_iterate): Do not abort device iteration
6216 when one of the devices cannot be opened.
6217 * kern/disk.c (grub_disk_open): Do not account previous failures of
6218 unrelated functions when grub_errno is checked for.
6219
5aa541e6 62202008-01-08 Robert Millan <rmh@aybabtu.com>
6221
6222 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
6223 `! grub_linux_is_bzimage', change order of address comparison to make
6224 it more intuitive, and improve "too big zImage" error message.
6225
7076340d 62262008-01-08 Robert Millan <rmh@aybabtu.com>
6227
6228 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
6229 `$(update-grub_DATA)'.
6230 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
6231 targets.
6232
9ca70333 62332008-01-07 Robert Millan <rmh@aybabtu.com>
6234
6235 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
6236 which instruction is modified by grub-setup during installation
6237 (since it wasn't obvious by only looking at this file).
6238
38ccf575 62392008-01-07 Robert Millan <rmh@aybabtu.com>
6240
6241 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
6242 listing actual TODO items.
6243
f5db4291 62442008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6245
868967cf 6246 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
6247 correctly.
6248 (grub_reiserfs_get_key_offset): Likewise.
6249 (grub_reiserfs_set_key_offset): Likewise.
6250 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 6251 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 6252
6253 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
6254 better to remove the bitfield version completely.
f19dbdb7 6255
868967cf 62562008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 6257
f5db4291 6258 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
6259 allocated from the heap, due to the fshelp implementation.
6260 (grub_reiserfs_dir): Free NODE, due to the same reason.
6261
492e6d9d 62622008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6263
6264 Mostly from Vincent Pelletier:
f19dbdb7 6265
492e6d9d 6266 * fs/reiserfs.c: New file.
f19dbdb7 6267
492e6d9d 6268 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
6269 (reiserfs_mod_SOURCES): New variable.
6270 (reiserfs_mod_CFLAGS): Likewise.
6271 (reiserfs_mod_LDFLAGS): Likewise.
6272
6273 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
6274 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
6275 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
6276 normal/color.c.
6277
9ce3e7c1 62782008-01-06 Robert Millan <rmh@aybabtu.com>
6279
6280 * normal/color.c: Remove `<grub/env.h>'.
6281
f3b58148 62822008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
6283
6284 * include/grub/normal.h: Include <grub/env.h>.
6285
7ac3bcfa 62862008-01-05 Robert Millan <rmh@aybabtu.com>
6287
6288 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
6289 usage example with `(hd0,1)'.
fb358190 6290 Reported by Samuel Thibault.
7ac3bcfa 6291
c8ee99d7 62922008-01-05 Robert Millan <rmh@aybabtu.com>
6293
6294 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
6295 (grub_linux_boot_zimage): Rename to ...
6296 (grub_linux_boot): ... this.
6297 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
6298 (grub_linux_boot_zimage): Conditionalize zImage copy.
6299
6300 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
6301 (grub_linux_boot_bzimage): Remove prototype.
6302 (grub_linux_boot_zimage): Rename to ...
6303 (grub_linux_boot): ... this.
6304
6305 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
6306 (grub_linux_boot): Remove function.
6307
0ece25b1 63082008-01-05 Robert Millan <rmh@aybabtu.com>
6309
6310 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
6311 (grub_env_write_color_highlight): Likewise.
6312 (grub_wait_after_message): Likewise.
6313
6314 * normal/color.c: New file.
6315
6316 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6317 (normal_mod_DEPENDENCIES): Likewise.
6318
6319 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6320 (normal_mod_DEPENDENCIES): Likewise.
6321
6322 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6323 (normal_mod_DEPENDENCIES): Likewise.
6324
6325 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6326 (normal_mod_DEPENDENCIES): Likewise.
6327
6328 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
6329 for waiting after a message is printed.
6330 * normal/main.c (read_config_file): Likewise.
6331 (grub_normal_init): Register grub_env_write_color_normal() and
6332 grub_env_write_color_highlight() hooks. Mark `color_normal' and
6333 `color_highlight' variables as global.
6334
6335 * normal/menu.c (grub_wait_after_message): New function.
6336 (grub_color_menu_normal): New variable. Replaces ...
6337 (GRUB_COLOR_MENU_NORMAL): ... this macro.
6338 (grub_color_menu_highlight): New variable. Replaces ...
6339 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
6340 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
6341 `GRUB_TERM_COLOR_STANDARD'.
6342 (print_message): Use `grub_setcolorstate' to reload colors. Rename
6343 `normal_code' and `highlight_code' to `old_color_normal' and
6344 `old_color_highlight', respectively.
6345 (grub_menu_init_page): Update colors when drawing the menu, based on
6346 `menu_color_normal' and `menu_color_highlight' variables.
6347 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
6348 a message is printed.
6349
182dd4e5 63502008-01-05 Robert Millan <rmh@aybabtu.com>
6351
6352 * kern/env.c (grub_env_context_open): Propagate hooks for global
6353 variables to new context.
6354
6355 * kern/main.c (grub_set_root_dev): Export `root' variable.
6356
ddf8f6ad 63572008-01-05 Robert Millan <rmh@aybabtu.com>
6358
6359 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 6360 discs unconditionally, since udev and others have options to provide
ddf8f6ad 6361 them.
6362
d8b43d9b 63632008-01-05 Robert Millan <rmh@aybabtu.com>
6364
6365 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
6366
2bff2de3 63672008-01-04 Christian Franke <franke@computer.org>
6368
6369 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
6370 of eisa_mmap.
6371
97eab917 63722008-01-03 Pavel Roskin <proski@gnu.org>
6373
6374 * kern/i386/linuxbios/init.c: Put "void" to all function
6375 declarations with no arguments.
6376 * kern/powerpc/ieee1275/init.c: Likewise.
6377 * term/i386/pc/at_keyboard.c: Likewise.
6378 * term/i386/pc/vga_text.c: Likewise.
6379 * util/grub-mkdevicemap.c: Likewise.
6380
b9416d00 63812008-01-02 Robert Millan <rmh@aybabtu.com>
6382
6383 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
6384 message when loaded image is out of bounds.
6385 (grub_multiboot_load_elf64): Likewise.
6386
92695df9 63872008-01-02 Pavel Roskin <proski@gnu.org>
6388
6389 * util/grub.d/10_linux.in: Try version without ".old" when
6390 looking for initrd. It's better to use initrd from the newer
6391 kernel of the same version than no initrd at all.
6392
d98d9cad 63932008-01-01 Robert Millan <rmh@aybabtu.com>
6394
6395 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
6396
dbfdce36 63972008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
6398
f19dbdb7 6399 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 6400 grub_video_get_active_render_target.
6401 (grub_video_adapter): Added unmap_color and get_active_render_target.
6402
f19dbdb7 6403 * video/video.c: Added grub_video_unmap_color and
dbfdce36 6404 grub_video_get_active_render_target.
6405 (grub_video_get_info): Changed method to accept NULL pointer as an
6406 argument to allow detection of active video adapter.
6407
6408 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
6409 grub_video_vbe_unmap_color_int.
6410 Added grub_video_vbe_unmap_color and
6411 grub_video_vbe_get_active_render_target.
6412 (grub_video_vbe_adapter): Added unmap_color and
6413 get_active_render_target.
6414
f19dbdb7 6415 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 6416 with grub_video_vbe_unmap_color_int.
6417
6418 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
6419 (DEFAULT_NORMAL_COLOR): Likewise.
6420 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
6421 (DEFAULT_FG_COLOR): Removed.
6422 (DEFAULT_BG_COLOR): Likewise.
6423 (DEFAULT_CURSOR_COLOR): Changed value.
6424 (grub_virtual_screen): Added standard_color_setting,
6425 normal_color_setting, highlight_color_setting and term_color.
6426 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
6427 (bitmap_width): Added.
6428 (bitmap_height): Likewise.
6429 (bitmap): Likewise.
6430 (set_term_color): Likewise.
6431 (grub_virtual_screen_setup): Changed to use new terminal coloring
6432 settings.
6433 (grub_gfxterm_init): Added init for bitmap.
6434 (grub_gfxterm_fini): Added destroy for bitmap.
6435 (redraw_screen_rect): Updated to use background bitmap and new
6436 terminal coloring.
6437 (scroll_up): Added optimization for case when there is no bitmap.
6438 (grub_gfxterm_cls): Fixed to use correct background color.
6439 (grub_virtual_screen_setcolorstate): Changed to use new terminal
6440 coloring.
6441 (grub_virtual_screen_setcolor): Likewise.
6442 (grub_virtual_screen_getcolor): Added.
6443 (grub_gfxterm_background_image_cmd): Likewise.
6444 (grub_video_term): Added setcolor and getcolor.
6445 (MOD_INIT): Added registration of background_image command.
6446 (MOD_TERM): Added unregistration for background_image command.
6447
c3c20931 64482007-12-30 Pavel Roskin <proski@gnu.org>
6449
6450 * loader/multiboot_loader.c: Fix multiboot command
6451 unregistration. Fix all typos in the word "multiboot".
6452
df266716 64532007-12-29 Pavel Roskin <proski@gnu.org>
94239199 6454
6455 * util/grub.d/10_linux.in: Refactor search for initrd. Add
6456 support for initrd names used in Fedora.
6457
fc6e896c 64582007-12-26 Bean <bean123ch@gmail.com>
6459
6460 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
6461 (cpio_mod_SOURCES): New variable.
6462 (cpio_mod_CFLAGS): Likewise.
6463 (cpio_mod_LDFLAGS): Likewise.
6464
6465 * fs/cpio.c: New file.
6466
6467 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
6468
6469 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6470
6471 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6472
6473 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6474
533110ad 64752007-12-25 Robert Millan <rmh@aybabtu.com>
6476
6477 * include/grub/term.h (struct grub_term): Add `getcolor' function.
6478 (grub_getcolor): New function.
6479
6480 * kern/term.c (grub_getcolor): New function.
6481 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
6482 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
6483 (print_entry): Set normal and highlight colors to
6484 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
6485 respectively, before printing and restore them to old
6486 values afterwards.
6487 (grub_menu_init_page): Likewise. Fill an additional colored space
6488 that would otherwise be left blank.
6489
6490 * term/efi/console.c (grub_console_getcolor): New function.
6491 (struct grub_console_term.getcolor): New variable.
6492 * term/i386/pc/console.c (grub_console_getcolor): New function.
6493 (struct grub_console_term.getcolor): New variable.
6494 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
6495 (struct grub_console_term.getcolor): New variable.
6496
6497 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
6498 (struct grub_console_term.setcolor): Remove variable.
6499 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
6500 (struct grub_console_term.setcolor): Remove variable.
6501 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
6502 (struct grub_console_term.setcolor): Remove variable.
6503 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
6504 (struct grub_console_term.setcolor): Remove variable.
6505
4931827f 65062007-12-25 Robert Millan <rmh@aybabtu.com>
6507
6508 * configure.ac: Search for possible unifont.hex locations, and
6509 define UNIFONT_HEX if found.
6510
6511 * Makefile.in (UNIFONT_HEX): Define variable.
6512 (DATA): Rename to ...
6513 (PKGLIB): ... this. Update all users.
6514 (PKGDATA): New variable.
6515 (pkgdata_IMAGES): Rename to ...
6516 (pkglib_IMAGES): ... this. Update all users.
6517 (pkgdata_MODULES): Rename to ...
6518 (pkglib_MODULES): ... this. Update all users.
6519 (pkgdata_PROGRAMS): Rename to ...
6520 (pkglib_PROGRAMS): ... this. Update all users.
6521 (pkgdata_DATA): Rename to ...
6522 (pkglib_DATA): ... this. Update all users.
6523 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
6524 (unicode.pff, ascii.pff): New rules.
6525 (all-local): Add `$(PKGDATA)' dependency.
6526 (install-local): Process `$(PKGDATA)'.
6527
6528 * util/update-grub_lib.in (font_path): Search for *.pff files in
6529 a few more locations, including `${pkgdata}'.
6530
57e57e31 65312007-12-23 Robert Millan <rmh@aybabtu.com>
6532
6533 Patch from Bean <bean123ch@gmail.com>:
6534 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
6535 `size'.
6536
4bc72aa9 65372007-12-21 Bean <bean123ch@gmail.com>
6538
6539 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
6540 (ntfscomp_mod_SOURCES): New variable.
6541 (ntfscomp_mod_CFLAGS): Likewise.
6542 (ntfscomp_mod_LDFLAGS): Likewise.
6543
6544 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
6545 (grub_probe_SOURCES): Likewise.
6546 (grub_emu_SOURCES): Likewise.
6547
6548 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6549 (grub_emu_SOURCES): Likewise.
6550
6551 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6552 (grub_emu_SOURCES): Likewise.
6553
6554 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6555 (grub_emu_SOURCES): Likewise.
6556
6557 * fs/ntfs.c (grub_ntfscomp_func): New variable.
6558 (read_run_list): Renamed to grub_ntfs_read_run_list.
6559 (decomp_nextvcn): Moved to ntfscomp.c.
6560 (decomp_getch): Likewise.
6561 (decomp_get16): Likewise.
6562 (decomp_block): Likewise.
6563 (read_block): Likewise.
6564 (read_data): Partially moved to ntfscomp.c.
6565 (fixup): Change unsigned to grub_uint16_t.
6566 (read_mft): Change unsigned long to grub_uint32_t.
6567 (read_attr): Likewise.
6568 (read_data): Likewise.
6569 (read_run_data): Likewise.
6570 (read_run_list): Likewise.
6571 (read_mft): Likewise.
6572
6573 * fs/ntfscomp.c: New file.
6574
6575 * include/grub/ntfs.h: New file.
6576
af680a87 65772007-12-16 Robert Millan <rmh@aybabtu.com>
6578
6579 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
6580 IDE disk check, since Linux is known to support 20 IDE disks.
6581 Reported by Colin Watson.
6582
84be7599 65832007-12-15 Bean <bean123ch@gmail.com>
6584
6585 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
6586 (lnxboot_img_SOURCES): New variable.
6587 (lnxboot_img_ASFLAGS): Likewise.
6588 (lnxboot_img_LDFLAGS): Likewise.
6589
6590 * boot/i386/pc/lnxboot.S: New file.
6591
6af9db01 65922007-11-24 Pavel Roskin <proski@gnu.org>
6593
6594 * configure.ac: Test if '--build-id=none' is supported by the
6595 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
6596 objcopy to generate incorrect binary files (binutils
6597 2.17.50.0.18-1 as shipped by Fedora 8).
6598 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
6599 linking, so that build ID doesn't break the test.
6600
7361cfe6 66012007-11-24 Pavel Roskin <proski@gnu.org>
6602
6603 * include/grub/i386/time.h: use "void" in the argument list
6604 of grub_cpu_idle().
6605 * include/grub/powerpc/time.h: Likewise.
6606 * include/grub/sparc64/time.h: Likewise.
6607
1593e10c 66082007-11-18 Christian Franke <franke@computer.org>
6609
6610 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
6611 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
6612 This fixes the problem that function keys did not work in grub-emu.
6613
3b8db1a8 66142007-11-18 Christian Franke <franke@computer.org>
6615
6616 * disk/host.c (grub_host_open): Remove attribute unused from
6617 name parameter. Add check for "host". This fixes the problem
6618 that grub-emu does not find partitions.
6619
2e29408d 66202007-11-18 Christian Franke <franke@computer.org>
6621
6622 * util/hostfs.c (is_dir): New function.
6623 (grub_hostfs_dir): Handle missing dirent.d_type case.
6624 (grub_hostfs_read): Add missing fseek().
6625 (grub_hostfs_label): Clear label pointer. This fixes a crash
6626 of grub-emu on "ls (host)".
6627
398cd047 66282007-11-18 Christian Franke <franke@computer.org>
6629
6630 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
6631 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
6632 to 64 bit boundary by default.
6633
c405c391 66342007-11-18 Bean <bean123ch@gmail.com>
6635
6636 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
6637 (hexdump_mod_SOURCES): New variable.
6638 (hexdump_mod_CFLAGS): Likewise.
6639 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 6640
c405c391 6641 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6642
6643 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6644
6645 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6646
6647 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6648
6649 * include/grub/hexdump.h: New file.
6650
6651 * commands/hexdump.c: New file.
6652
5cced7fd 66532007-11-10 Robert Millan <rmh@aybabtu.com>
6654
6655 * commands/i386/pc/play.c (beep_off): Switch order of arguments
6656 in grub_outb() calls.
6657 (beep_on): Likewise.
6658
8b714eb0 66592007-11-10 Christian Franke <franke@computer.org>
6660
6661 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
6662 (grub_menu_run): Likewise.
6663
ce0f1839 66642007-11-10 Robert Millan <rmh@aybabtu.com>
6665
6666 * include/grub/i386/efi/machine.h: New file.
6667 * include/grub/i386/linuxbios/machine.h: Likewise.
6668 * include/grub/i386/pc/machine.h: Likewise.
6669 * include/grub/powerpc/ieee1275/machine.h: Likewise.
6670 * include/grub/sparc64/ieee1275/machine.h: Likewise.
6671
6672 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
6673 (serial_hw_io_addr): New variable.
6674 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
6675 instead of `(unsigned short *) 0x400'.
6676
270c237d 66772007-11-10 Bean <bean123ch@gmail.com>
6678
6679 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
6680
a87783bf 66812007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6682
6683 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
6684 (vga_mod_SOURCES): Added.
6685 (vga_mod_CFLAGS): Likewise.
6686 (vga_mod_LDFLAGS): Likewise.
6687
6688 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
6689 grub_outb() calls.
6690 (set_map_mask): Likewise.
6691 (set_read_map): Likewise.
6692 (set_read_address): Likewise.
6693 (vga_font): Removed variable.
6694 (get_vga_glyph): Removed function.
6695 (invalidate_char): Likewise.
6696 (write_char): Changed to use grub_font_get_glyph() for font
6697 information.
6698 (grub_vga_putchar): Likewise.
6699 (grub_vga_getcharwidth): Likewise.
6700
6433b448 67012007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6702
6703 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
6704 flags.
6705 (pxeboot_img_LDFLAGS): Likewise.
6706 (diskboot_img_LDFLAGS): Likewise.
6707 (kernel_img_LDFLAGS): Likewise.
6708
49178511 67092007-11-06 Robert Millan <rmh@aybabtu.com>
6710
6711 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
6712 in grub_outb() calls.
6713 (serial_hw_init): Likewise.
6714
53b052de 67152007-11-05 Robert Millan <rmh@aybabtu.com>
6716
6717 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
6718 spaces. Skip non-regular files.
6719
5ab33bba 67202007-11-05 Robert Millan <rmh@aybabtu.com>
6721
6722 * kern/disk.c (grub_disk_firmware_fini)
6723 (grub_disk_firmware_is_tainted): New variables.
6724
6725 * include/grub/disk.h (grub_disk_firmware_fini)
6726 (grub_disk_firmware_is_tainted): Likewise.
6727
6728 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
6729 (grub_disk_biosdisk_fini): ... to here.
6730 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
6731 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
6732 is set. Register grub_disk_biosdisk_fini() in
6733 `grub_disk_firmware_fini'.
6734
6735 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
6736 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
6737 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
6738 to finish existing firmware disk interface.
6739
6740 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
6741 (ata_mod_SOURCES): New variable.
6742 (ata_mod_CFLAGS): Likewise.
6743 (ata_mod_LDFLAGS): Likewise.
6744
0149ab7c 67452007-11-05 Robert Millan <rmh@aybabtu.com>
6746
6747 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
6748 (grub_ata_wait): Reimplement using grub_millisleep().
6749
6750 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
6751 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
6752
be7ac41e 67532007-11-03 Marco Gerards <marco@gnu.org>
6754
6755 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
6756 (CRTC_ADDR_PORT): New macro.
6757 (CRTC_DATA_PORT): Likewise.
6758 (CRTC_CURSOR): Likewise.
6759 (CRTC_CURSOR_ADDR_HIGH): Likewise.
6760 (CRTC_CURSOR_ADDR_LOW): Likewise.
6761 (update_cursor): New function.
6762 (grub_console_real_putchar): Call `update_cursor'.
6763 (grub_console_gotoxy): Likewise.
6764 (grub_console_cls): Set the default color when clearing the
6765 screen.
6766 (grub_console_setcursor): Implemented.
6767
bb06ab2e 67682007-11-03 Marco Gerards <marco@gnu.org>
6769
6770 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
6771 become activate.
6772 (grub_ata_pio_write): Likewise.
6773
6774 (grub_atapi_identify): Wait after issuing an ATA command.
6775 (grub_atapi_packet): Likewise.
6776 (grub_ata_identify): Likewise.
6777 (grub_ata_readwrite): Likewise.
6778
cf8f780b 67792007-11-03 Marco Gerards <marco@gnu.org>
6780
6781 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
6782 (grub_ata_pio_write): Likewise.
6783 (grub_ata_readwrite): Use `grub_error', instead of
6784 returning `grub_errno'.
6785
ed649e54 67862007-11-03 Marco Gerards <marco@gnu.org>
6787
6788 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
6789 grub_ata_pio_write once for every single sector, instead of for
6790 multiple sectors.
6791
ca25d8f0 67922007-10-31 Robert Millan <rmh@aybabtu.com>
6793
6794 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
6795
6796 * conf/i386-linuxbios.rmk: New file.
6797
6798 * kern/i386/pc/hardware.c: Likewise.
6799 * term/i386/pc/at_keyboard.c: Likewise.
6800 * term/i386/pc/vga_text.c: Likewise.
6801
6802 * include/grub/i386/linuxbios/boot.h: Likewise.
6803 * include/grub/i386/linuxbios/console.h: Likewise.
6804 * include/grub/i386/linuxbios/init.h: Likewise.
6805 * include/grub/i386/linuxbios/kernel.h: Likewise.
6806 * include/grub/i386/linuxbios/loader.h: Likewise.
6807 * include/grub/i386/linuxbios/memory.h: Likewise.
6808 * include/grub/i386/linuxbios/serial.h: Likewise.
6809 * include/grub/i386/linuxbios/time.h: Likewise.
6810
6811 * kern/i386/linuxbios/init.c: Likewise.
6812 * kern/i386/linuxbios/startup.S: Likewise.
6813 * kern/i386/linuxbios/table.c: Likewise.
6814
e911ecc1 68152007-10-31 Marco Gerards <marco@gnu.org>
6816
6817 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6818 (ata_mod_SOURCES): New variable.
6819 (ata_mod_CFLAGS): Likewise.
6820 (ata_mod_LDFLAGS): Likewise.
6821
6822 * disk/ata.c: New file.
6823
6824 * include/grub/disk.h (grub_disk_dev_id): Add
6825 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 6826
7f66d0e0 68272007-10-31 Robert Millan <rmh@aybabtu.com>
6828
6829 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6830 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6831
6832 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6833 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6834
6835 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6836 `<grub/types.h>'.
6837
6838 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6839
5cd7dd46 68402007-10-27 Robert Millan <rmh@aybabtu.com>
6841
3236ca65 6842 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 6843
2ebfc90f 68442007-10-22 Robert Millan <rmh@aybabtu.com>
6845
6846 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
6847 `"../realmode.S"'.
6848 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
6849
73fcb0f3 68502007-10-22 Robert Millan <rmh@aybabtu.com>
6851
6852 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6853 (pkgdata_MODULES): Add `biosdisk.mod'.
6854 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6855 variables.
6856
6857 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6858 (grub_biosdisk_init): Replace with ...
6859 (GRUB_MOD_INIT(biosdisk)): ... this.
6860 (grub_biosdisk_fini): Replace with ...
6861 (GRUB_MOD_FINI(biosdisk)): ... this.
6862
6863 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6864 (grub_machine_init): Remove call to grub_biosdisk_init().
6865 (grub_machine_fini): Remove call to grub_machine_fini().
6866
6867 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6868
3381d274 68692007-10-22 Robert Millan <rmh@aybabtu.com>
6870
6871 * include/grub/time.h: New file.
6872 * include/grub/i386/time.h: Likewise.
6873 * include/grub/powerpc/time.h: Likewise.
6874 * include/grub/sparc64/time.h: Likewise.
6875
6876 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6877 instances to ...
6878 (KERNEL_MACHINE_TIME_HEADER): ... this.
6879 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6880 instances to ...
6881 (KERNEL_MACHINE_TIME_HEADER): ... this.
6882 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6883 instances to ...
6884 (KERNEL_MACHINE_TIME_HEADER): ... this.
6885
6886 * kern/i386/efi/init.c: Include `<grub/time.h>'.
6887 (grub_millisleep): New function.
6888 * kern/i386/pc/init.c: Include `<grub/time.h>'.
6889 (grub_millisleep): New function.
6890 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6891 Remove `grub/machine/time.h' include.
6892 (grub_millisleep): New function.
6893 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6894 Remove `grub/machine/time.h' include.
6895 (grub_millisleep): New function.
6896
6897 * include/grub/misc.h (grub_div_roundup): New function.
6898
6899 * kern/misc.c: Include `<grub/time.h>'.
6900 (grub_millisleep_generic): New function.
6901
6902 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6903 Add `time.h'.
6904 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6905 Add `time.h'.
6906 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6907 `machine/time.h'. Add `time.h'.
6908 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6909
a39a0312 69102007-10-21 Robert Millan <rmh@aybabtu.com>
6911
6912 * include/grub/misc.h (grub_max): New function.
6913
2aad70e2 69142007-10-21 Robert Millan <rmh@aybabtu.com>
6915
6916 * util/misc.c (grub_util_info): Call fflush() before returning.
6917
54b71c4b 69182007-10-20 Robert Millan <rmh@aybabtu.com>
6919
6920 * genmk.rb (Image): Copy `extra_flags' from here ...
6921 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
6922
6923 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6924 to `argc' and `args' arguments.
6925
a979f513 69262007-10-17 Robert Millan <rmh@aybabtu.com>
6927
6928 * kern/i386/loader.S: New file.
6929
6930 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6931 * kern/i386/loader.S (grub_linux_prot_size)... to here.
6932 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6933 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6934 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6935 * kern/i386/loader.S (grub_linux_real_addr)... to here.
6936 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6937 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6938 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6939 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6940 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6941 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6942 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6943 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6944
6945 * kern/i386/realmode.S: New file.
6946
6947 * kern/i386/pc/startup.S (protstack): Moved from here ...
6948 * kern/i386/realmode.S (protstack)... to here.
6949 * kern/i386/pc/startup.S (gdt): Moved from here ...
6950 * kern/i386/realmode.S (gdt)... to here.
6951 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6952 * kern/i386/realmode.S (prot_to_real)... to here.
6953
6954 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6955 `kern/i386/realmode.S'.
6956
825fc8fd 69572007-10-17 Robert Millan <rmh@aybabtu.com>
6958
6959 * include/grub/i386/loader.h: New file.
6960
6961 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
6962 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6963 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6964 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6965 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
6966 * include/grub/i386/loader.h (grub_linux_prot_size)
6967 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6968 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6969 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6970 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
6971
6972 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
6973
e179b2f4 69742007-10-15 Robert Millan <rmh@aybabtu.com>
6975
6976 * normal/misc.c (grub_normal_print_device_info): Do not probe for
6977 filesystem when dev->disk is unset.
6978 Do probe for filesystem even when dev->disk->has_partitions is set.
6979 In case a filesystem is found, always report it.
6980 In case it isn't, if dev->disk->has_partitions is set, report that
6981 a partition table was found instead of reporting that no filesystem
6982 could be identified.
6983
5db82af6 69842007-10-12 Robert Millan <rmh@aybabtu.com>
6985
6986 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
6987 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
6988
68f6ac74 6989 * include/grub/types.h (grub_host_to_target16): New macro.
6990 (grub_host_to_target32): Likewise.
6991 (grub_host_to_target64): Likewise.
6992 (grub_target_to_host16): Likewise.
6993 (grub_target_to_host32): Likewise.
6994 (grub_target_to_host64): Likewise.
5db82af6 6995
6996 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6997 Renamed from to ...
6998 (GRUB_MOD_ALIGN): ...this. Update all users.
6999
68f6ac74 7000 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
7001 grub_host_to_target32.
7002 Replace grub_be_to_cpu32 with grub_target_to_host32.
7003 (load_modules): Likewise.
7004 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
7005 Replace grub_be_to_cpu32 with grub_target_to_host32.
7006 Replace grub_cpu_to_be16 with grub_host_to_target16.
7007 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 7008
3cf497cc 70092007-10-12 Robert Millan <rmh@aybabtu.com>
7010
7011 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
7012 * util/elf/grub-mkimage.c: ... here.
7013
7014 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
7015 `util/powerpc/ieee1275/grub-mkimage.c'.
7016
c8cc3692 70172007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 7018
c8cc3692 7019 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
7020 and make it easier to figure out.
7021 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
7022 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
7023 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
7024 leave us with less than HEAP_MIN_SIZE total heap.
7025 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 7026
5c58b791 70272007-10-03 Robert Millan <rmh@aybabtu.com>
7028
7029 * include/grub/i386/io.h: New file.
7030 * commands/i386/pc/play.c (inb): Removed.
7031 (outb): Removed.
7032 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7033 with grub_outb().
afcd2ef8 7034 * term/i386/pc/serial.c (inb): Removed.
7035 (outb): Removed.
7036 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7037 with grub_outb().
7038 * term/i386/pc/vga.c (inb): Removed.
7039 (outb): Removed.
7040 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
7041 with grub_outb().
5c58b791 7042
1a477ed6 70432007-10-02 Robert Millan <rmh@aybabtu.com>
7044
7045 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
7046 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7047 Reported by Marcin Kurek.
7048
6b5d80fa 70492007-09-07 Robert Millan <rmh@aybabtu.com>
7050
7051 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
7052 SmartFirmware version updates (as released by Sven Luther), and avoid
7053 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
7054 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
7055 known broken.
7056
5618afbf 70572007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7058
7059 From Hitoshi Ozeki:
7060 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
7061 when merging two regions.
7062
6139dcd9 70632007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
7064
508e39ee 7065 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
7066 * normal/completion.c (grub_normal_do_completion): Likewise.
7067 Reported by Hitoshi Ozeki.
7068
70692007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 7070
6139dcd9 7071 Do not use devices at boot in chainloading.
f19dbdb7 7072
6139dcd9 7073 * loader/i386/pc/chainloader.c (boot_drive): New variable.
7074 (boot_part_addr): Likewise.
7075 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
7076 with BOOT_DRIVE and BOOT_PART_ADDR.
7077 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
7078 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
7079
38da6516 70802007-08-29 Robert Millan <rmh@aybabtu.com>
7081
7082 Patch from Simon Peter <dn.tlp@gmx.net>:
7083 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
7084 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
7085 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
7086 util/i386/pc/grub-setup.c_DEPENDENCIES.
7087 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
7088 util/grub-probe.c_DEPENDENCIES.
7089 * conf/powerpc-ieee1275.rmk: Likewise.
7090
29d0928c 70912007-08-28 Robert Millan <rmh@aybabtu.com>
7092
7093 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
7094 to tell grub-mkdevicemap how to name devices.
7095 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
7096 feature).
7097
7098 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
7099 util/i386/get_disk_name.c.
7100 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
7101 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
7102 util/ieee1275/get_disk_name.c.
7103
7104 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
7105
7106 * DISTLIST: Add util/i386/get_disk_name.c and
7107 util/ieee1275/get_disk_name.c.
7108
7109 * util/grub-mkdevicemap.c: Replace device naming logic with
7110 grub_util_get_disk_name() calls.
7111
5a0d3cca 71122007-08-20 Robert Millan <rmh@aybabtu.com>
7113
7114 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
7115 (so that it works for both plural and singular quantities).
7116
8b72db2f 71172007-08-05 Robert Millan <rmh@aybabtu.com>
7118
7119 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
7120 so that [xz] isn't taken into account when determining order.
7121
352466bf 71222007-08-02 Marco Gerards <marco@gnu.org>
7123
7124 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
7125 `include/multiboot2.h', `include/grub/elfload.h',
7126 `include/multiboot.h', `include/grub/multiboot.h',
7127 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
7128 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
7129 `kern/elf.c', `loader/multiboot_loader.c',
7130 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
7131 `loader/i386/pc/multiboot2.c',
7132 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
7133 `util/i386/pc/grub-mkrescue.in'. Remove
7134 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
7135 `include/grub/i386/pc/util/biosdisk.h' and
7136 `include/grub/powerpc/ieee1275/multiboot.h'.
7137
8f096014 71382007-08-02 Bean <bean123ch@gmail.com>
7139
7140 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
7141 (ntfs_mod_SOURCES): New variable.
7142 (ntfs_mod_CFLAGS): Likewise.
7143 (ntfs_mod_LDFLAGS): Likewise.
7144
7145 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
7146 (grub_probe_SOURCES): Likewise.
7147 (grub_emu_SOURCES): Likewise.
7148
7149 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7150 (grub_emu_SOURCES): Likewise.
7151
7152 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7153 (grub_emu_SOURCES): Likewise.
f19dbdb7 7154
8f096014 7155 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
7156
7157 * fs/ntfs.c: New file.
7158
9959f7db 71592007-08-02 Bean <bean123ch@gmail.com>
7160
7161 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
7162
7163 * file.h (grub_file): Likewise.
7164
7165 * fshelp.h (grub_fshelp_read_file): Likewise.
7166
7167 * util/i386/pc/grub-setup.c (setup): Likewise.
7168 (save_first_sector): Likewise.
7169 (save_blocklists): Likewise.
f19dbdb7 7170
9959f7db 7171 * fs/affs.c (grub_affs_read_file): Likewise.
7172
7173 * fs/ext2.c (grub_ext2_read_file): Likewise.
7174
7175 * fs/fat.c (grub_fat_read_data): Likewise.
7176
7177 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
7178
7179 * fs/hfs.c (grub_hfs_read_file): Likewise.
7180
7181 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7182
7183 * fs/jfs.c (grub_jfs_read_file): Likewise.
7184
7185 * fs/minix.c (grub_minix_read_file): Likewise.
7186
7187 * fs/sfs.c (grub_sfs_read_file): Likewise.
7188
7189 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 7190
9959f7db 7191 * fs/xfs.c (grub_xfs_read_file): Likewise.
7192
7193 * command/blocklist.c (read_blocklist): Likewise.
7194 (print_blocklist): Likewise.
7195
0a203f83 71962007-08-02 Marco Gerards <marco@gnu.org>
7197
7198 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
7199 `util/hostfs.c'.
7200
7201 * disk/host.c: New file.
7202
7203 * util/hostfs.c: Likewise.
7204
7205 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
7206 return `GRUB_ERR_BAD_FS'.
7207 * fs/sfs.c (grub_sfs_mount): Likewise.
7208 * fs/xfs.c (grub_xfs_mount): Likewise.
7209
7210 * include/grub/disk.h (enum grub_disk_dev_id): Add
7211 `GRUB_DISK_DEVICE_HOST_ID'.
7212
7213 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
7214
e5dfe777 72152007-07-24 Jerone Young <jerone@gmail.com>
7216
f19dbdb7 7217 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 7218 modules for compilation.
7219 * conf/powerpc-ieee1275.rmk: Likewise.
7220
7221 * include/multiboot.h: Move multiboot definitions to one file. Rename
7222 many definitions to not get grub specific.
7223 * include/multiboot2.h: Create header with multiboot 2 definitions.
7224 * include/grub/multiboot.h: Header for grub specific function
7225 prototypes and definitions.
7226 * include/grub/multiboot2.h: Likewise.
7227 * include/grub/multiboot_loader.h: Likewise.
7228 * include/grub/i386/pc/multiboot.h: Removed.
7229 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
7230
7231 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
7232 and 2 to allow for one multiboot and module commands.
7233 * loader/multiboot2.c: Add multiboot2 functionality.
7234 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
7235 and definition names.
7236 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
7237 2 functions.
7238 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
7239 ieee1275 specific multiboot2 code.
7240
7241 * kern/i386/pc/startup.S: Change headers and definition names for
7242 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
7243
daf0f0ba 72442007-07-22 Robert Millan <rmh@aybabtu.com>
7245
7246 * geninitheader.sh: Process file specified in first parameter rather
7247 than hardcoding grub_modules_init.lst.
fe6b695a 7248 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 7249 than hardcoding grub_modules_init.h.
7250
7251 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
7252 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
7253 grub_probe_init.[ch] and grub_setup_init.[ch].
7254
7255 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
7256 grub_modules_init.h with grub_emu_init.h.
7257 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
7258 grub_probe_init.[ch] files.
7259 * conf/i386-efi.rmk: Likewise.
7260 * conf/i386-pc.rmk: Likewise.
7261 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
7262 grub_setup_init.[ch] files.
7263
7264 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
7265 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
7266 to initialize modules rather than a list of hardcoded functions.
7267 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
7268 grub_init_all() to initialize modules rather than a list of hardcoded
7269 functions.
7270
54cdc1cc 72712007-07-22 Robert Millan <rmh@aybabtu.com>
7272
7273 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
7274 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
7275
ad0686cc 72762007-07-22 Robert Millan <rmh@aybabtu.com>
7277
7278 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7279 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
7280 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
7281 flag when running on SmartFirmware.
7282 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
7283 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
7284 was set.
7285
7286 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7287 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
7288 rather than decreasing it.
7289
7290 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
7291 there's not enough space to do it, fail in the same way as when it
7292 can't be done because there are no partitions.
7293
7294 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
7295 when nvsetenv failed.
7296
969c02ec 72972007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
7298
7299 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
7300 because this rule is automatically generated.
7301 (grub-mkrescue): Removed for the same reason as above.
7302
5a79f472 73032007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
7304
7305 Migrate to GNU General Public License Version 3.
f19dbdb7 7306
5a79f472 7307 * COPYING: Replaced with the plain text version of GPLv3.
7308
7309 * config.guess: Updated from gnulib.
7310 * config.sub: Likewise.
7311
7312 * geninit.sh: Output a GPLv3 copyright notice.
7313 * geninitheader.sh: Likewise.
7314 * genmodsrc.sh: Likewise.
7315 * gensymlist.sh.in: Likewise.
7316
7317 * boot/i386/pc/boot.S: Upgraded to GPLv3.
7318 * boot/i386/pc/diskboot.S: Likewise.
7319 * boot/i386/pc/pxeboot.S: Likewise.
7320 * commands/blocklist.c: Likewise.
7321 * commands/boot.c: Likewise.
7322 * commands/cat.c: Likewise.
7323 * commands/cmp.c: Likewise.
7324 * commands/configfile.c: Likewise.
7325 * commands/echo.c: Likewise.
7326 * commands/help.c: Likewise.
7327 * commands/ls.c: Likewise.
7328 * commands/search.c: Likewise.
7329 * commands/terminal.c: Likewise.
7330 * commands/test.c: Likewise.
7331 * commands/videotest.c: Likewise.
7332 * commands/i386/cpuid.c: Likewise.
7333 * commands/i386/pc/halt.c: Likewise.
7334 * commands/i386/pc/play.c: Likewise.
7335 * commands/i386/pc/reboot.c: Likewise.
7336 * commands/i386/pc/vbeinfo.c: Likewise.
7337 * commands/i386/pc/vbetest.c: Likewise.
7338 * commands/ieee1275/halt.c: Likewise.
7339 * commands/ieee1275/reboot.c: Likewise.
7340 * commands/ieee1275/suspend.c: Likewise.
7341 * disk/loopback.c: Likewise.
7342 * disk/lvm.c: Likewise.
7343 * disk/raid.c: Likewise.
7344 * disk/efi/efidisk.c: Likewise.
7345 * disk/i386/pc/biosdisk.c: Likewise.
7346 * disk/ieee1275/ofdisk.c: Likewise.
7347 * font/manager.c: Likewise.
7348 * fs/affs.c: Likewise.
7349 * fs/ext2.c: Likewise.
7350 * fs/fat.c: Likewise.
7351 * fs/fshelp.c: Likewise.
7352 * fs/hfs.c: Likewise.
7353 * fs/hfsplus.c: Likewise.
7354 * fs/iso9660.c: Likewise.
7355 * fs/jfs.c: Likewise.
7356 * fs/minix.c: Likewise.
7357 * fs/sfs.c: Likewise.
7358 * fs/ufs.c: Likewise.
7359 * fs/xfs.c: Likewise.
7360 * hello/hello.c: Likewise.
7361 * include/grub/acorn_filecore.h: Likewise.
7362 * include/grub/arg.h: Likewise.
7363 * include/grub/bitmap.h: Likewise.
7364 * include/grub/boot.h: Likewise.
7365 * include/grub/cache.h: Likewise.
7366 * include/grub/device.h: Likewise.
7367 * include/grub/disk.h: Likewise.
7368 * include/grub/dl.h: Likewise.
7369 * include/grub/elfload.h: Likewise.
7370 * include/grub/env.h: Likewise.
7371 * include/grub/err.h: Likewise.
7372 * include/grub/file.h: Likewise.
7373 * include/grub/font.h: Likewise.
7374 * include/grub/fs.h: Likewise.
7375 * include/grub/fshelp.h: Likewise.
7376 * include/grub/gzio.h: Likewise.
7377 * include/grub/hfs.h: Likewise.
7378 * include/grub/kernel.h: Likewise.
7379 * include/grub/loader.h: Likewise.
7380 * include/grub/lvm.h: Likewise.
7381 * include/grub/misc.h: Likewise.
7382 * include/grub/mm.h: Likewise.
7383 * include/grub/net.h: Likewise.
7384 * include/grub/normal.h: Likewise.
7385 * include/grub/parser.h: Likewise.
7386 * include/grub/partition.h: Likewise.
7387 * include/grub/pc_partition.h: Likewise.
7388 * include/grub/raid.h: Likewise.
7389 * include/grub/rescue.h: Likewise.
7390 * include/grub/script.h: Likewise.
7391 * include/grub/setjmp.h: Likewise.
7392 * include/grub/symbol.h: Likewise.
7393 * include/grub/term.h: Likewise.
7394 * include/grub/terminfo.h: Likewise.
7395 * include/grub/tparm.h: Likewise.
7396 * include/grub/types.h: Likewise.
7397 * include/grub/video.h: Likewise.
7398 * include/grub/efi/api.h: Likewise.
7399 * include/grub/efi/chainloader.h: Likewise.
7400 * include/grub/efi/console.h: Likewise.
7401 * include/grub/efi/console_control.h: Likewise.
7402 * include/grub/efi/disk.h: Likewise.
7403 * include/grub/efi/efi.h: Likewise.
7404 * include/grub/efi/pe32.h: Likewise.
7405 * include/grub/efi/time.h: Likewise.
7406 * include/grub/i386/linux.h: Likewise.
7407 * include/grub/i386/setjmp.h: Likewise.
7408 * include/grub/i386/types.h: Likewise.
7409 * include/grub/i386/efi/kernel.h: Likewise.
7410 * include/grub/i386/efi/loader.h: Likewise.
7411 * include/grub/i386/efi/time.h: Likewise.
7412 * include/grub/i386/pc/biosdisk.h: Likewise.
7413 * include/grub/i386/pc/boot.h: Likewise.
7414 * include/grub/i386/pc/chainloader.h: Likewise.
7415 * include/grub/i386/pc/console.h: Likewise.
7416 * include/grub/i386/pc/init.h: Likewise.
7417 * include/grub/i386/pc/kernel.h: Likewise.
7418 * include/grub/i386/pc/loader.h: Likewise.
7419 * include/grub/i386/pc/memory.h: Likewise.
7420 * include/grub/i386/pc/multiboot.h: Likewise.
7421 * include/grub/i386/pc/serial.h: Likewise.
7422 * include/grub/i386/pc/time.h: Likewise.
7423 * include/grub/i386/pc/vbe.h: Likewise.
7424 * include/grub/i386/pc/vbeblit.h: Likewise.
7425 * include/grub/i386/pc/vbefill.h: Likewise.
7426 * include/grub/i386/pc/vbeutil.h: Likewise.
7427 * include/grub/i386/pc/vga.h: Likewise.
7428 * include/grub/ieee1275/ieee1275.h: Likewise.
7429 * include/grub/ieee1275/ofdisk.h: Likewise.
7430 * include/grub/powerpc/libgcc.h: Likewise.
7431 * include/grub/powerpc/setjmp.h: Likewise.
7432 * include/grub/powerpc/types.h: Likewise.
7433 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
7434 * include/grub/powerpc/ieee1275/console.h: Likewise.
7435 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
7436 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
7437 * include/grub/powerpc/ieee1275/loader.h: Likewise.
7438 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
7439 * include/grub/powerpc/ieee1275/time.h: Likewise.
7440 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
7441 * include/grub/sparc64/libgcc.h: Likewise.
7442 * include/grub/sparc64/setjmp.h: Likewise.
7443 * include/grub/sparc64/types.h: Likewise.
7444 * include/grub/sparc64/ieee1275/console.h: Likewise.
7445 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
7446 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
7447 * include/grub/sparc64/ieee1275/time.h: Likewise.
7448 * include/grub/util/biosdisk.h: Likewise.
7449 * include/grub/util/getroot.h: Likewise.
7450 * include/grub/util/lvm.h: Likewise.
7451 * include/grub/util/misc.h: Likewise.
7452 * include/grub/util/raid.h: Likewise.
7453 * include/grub/util/resolve.h: Likewise.
7454 * io/gzio.c: Likewise.
7455 * kern/device.c: Likewise.
7456 * kern/disk.c: Likewise.
7457 * kern/dl.c: Likewise.
7458 * kern/elf.c: Likewise.
7459 * kern/env.c: Likewise.
7460 * kern/err.c: Likewise.
7461 * kern/file.c: Likewise.
7462 * kern/fs.c: Likewise.
7463 * kern/loader.c: Likewise.
7464 * kern/main.c: Likewise.
7465 * kern/misc.c: Likewise.
7466 * kern/mm.c: Likewise.
7467 * kern/parser.c: Likewise.
7468 * kern/partition.c: Likewise.
7469 * kern/rescue.c: Likewise.
7470 * kern/term.c: Likewise.
7471 * kern/efi/efi.c: Likewise.
7472 * kern/efi/init.c: Likewise.
7473 * kern/efi/mm.c: Likewise.
7474 * kern/i386/dl.c: Likewise.
7475 * kern/i386/efi/init.c: Likewise.
7476 * kern/i386/efi/startup.S: Likewise.
7477 * kern/i386/pc/init.c: Likewise.
7478 * kern/i386/pc/lzo1x.S: Likewise.
7479 * kern/i386/pc/startup.S: Likewise.
7480 * kern/ieee1275/ieee1275.c: Likewise.
7481 * kern/powerpc/cache.S: Likewise.
7482 * kern/powerpc/dl.c: Likewise.
7483 * kern/powerpc/ieee1275/cmain.c: Likewise.
7484 * kern/powerpc/ieee1275/crt0.S: Likewise.
7485 * kern/powerpc/ieee1275/init.c: Likewise.
7486 * kern/powerpc/ieee1275/openfw.c: Likewise.
7487 * kern/sparc64/cache.S: Likewise.
7488 * kern/sparc64/dl.c: Likewise.
7489 * kern/sparc64/ieee1275/init.c: Likewise.
7490 * kern/sparc64/ieee1275/openfw.c: Likewise.
7491 * loader/efi/chainloader.c: Likewise.
7492 * loader/efi/chainloader_normal.c: Likewise.
7493 * loader/i386/efi/linux.c: Likewise.
7494 * loader/i386/efi/linux_normal.c: Likewise.
7495 * loader/i386/pc/chainloader.c: Likewise.
7496 * loader/i386/pc/chainloader_normal.c: Likewise.
7497 * loader/i386/pc/linux.c: Likewise.
7498 * loader/i386/pc/linux_normal.c: Likewise.
7499 * loader/i386/pc/multiboot.c: Likewise.
7500 * loader/i386/pc/multiboot_normal.c: Likewise.
7501 * loader/powerpc/ieee1275/linux.c: Likewise.
7502 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
7503 * normal/arg.c: Likewise.
7504 * normal/cmdline.c: Likewise.
7505 * normal/command.c: Likewise.
7506 * normal/completion.c: Likewise.
7507 * normal/execute.c: Likewise.
7508 * normal/function.c: Likewise.
7509 * normal/lexer.c: Likewise.
7510 * normal/main.c: Likewise.
7511 * normal/menu.c: Likewise.
7512 * normal/menu_entry.c: Likewise.
7513 * normal/misc.c: Likewise.
7514 * normal/parser.y: Likewise.
7515 * normal/script.c: Likewise.
7516 * normal/i386/setjmp.S: Likewise.
7517 * normal/powerpc/setjmp.S: Likewise.
7518 * normal/sparc64/setjmp.S: Likewise.
7519 * partmap/acorn.c: Likewise.
7520 * partmap/amiga.c: Likewise.
7521 * partmap/apple.c: Likewise.
7522 * partmap/gpt.c: Likewise.
7523 * partmap/pc.c: Likewise.
7524 * partmap/sun.c: Likewise.
7525 * term/gfxterm.c: Likewise.
7526 * term/terminfo.c: Likewise.
7527 * term/efi/console.c: Likewise.
7528 * term/i386/pc/console.c: Likewise.
7529 * term/i386/pc/serial.c: Likewise.
7530 * term/i386/pc/vesafb.c: Likewise.
7531 * term/i386/pc/vga.c: Likewise.
7532 * term/ieee1275/ofconsole.c: Likewise.
7533 * util/biosdisk.c: Likewise.
7534 * util/console.c: Likewise.
7535 * util/genmoddep.c: Likewise.
7536 * util/getroot.c: Likewise.
7537 * util/grub-emu.c: Likewise.
7538 * util/grub-mkdevicemap.c: Likewise.
7539 * util/grub-probe.c: Likewise.
7540 * util/lvm.c: Likewise.
7541 * util/misc.c: Likewise.
7542 * util/raid.c: Likewise.
7543 * util/resolve.c: Likewise.
7544 * util/update-grub.in: Likewise.
7545 * util/update-grub_lib.in: Likewise.
7546 * util/grub.d/00_header.in: Likewise.
7547 * util/grub.d/10_hurd.in: Likewise.
7548 * util/grub.d/10_linux.in: Likewise.
7549 * util/i386/efi/grub-install.in: Likewise.
7550 * util/i386/efi/grub-mkimage.c: Likewise.
7551 * util/i386/pc/grub-install.in: Likewise.
7552 * util/i386/pc/grub-mkimage.c: Likewise.
7553 * util/i386/pc/grub-mkrescue.in: Likewise.
7554 * util/i386/pc/grub-setup.c: Likewise.
7555 * util/i386/pc/misc.c: Likewise.
7556 * util/powerpc/ieee1275/grub-install.in: Likewise.
7557 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
7558 * util/powerpc/ieee1275/misc.c: Likewise.
7559 * video/bitmap.c: Likewise.
7560 * video/video.c: Likewise.
7561 * video/i386/pc/vbe.c: Likewise.
7562 * video/i386/pc/vbeblit.c: Likewise.
7563 * video/i386/pc/vbefill.c: Likewise.
7564 * video/i386/pc/vbeutil.c: Likewise.
7565 * video/readers/tga.c: Likewise.
7566
3572d015 75672007-07-02 Robert Millan <rmh@aybabtu.com>
7568
7569 * conf/i386-efi.rmk: Replace obsolete reference to
7570 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
7571 with util/getroot.c.
7572 * conf/powerpc-ieee1275.rmk: Likewise.
7573 * conf/sparc64-ieee1275.rmk: Likewise.
7574
7575 * util/grub-emu.c (main): Fix unchecked pointer handling.
7576
2c2a681b 75772007-07-02 Robert Millan <rmh@aybabtu.com>
7578
7579 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
7580 invocation to fail, in order to support partition-less media.
7581
7582 * util/i386/pc/grub-install.in: Likewise.
7583
7584 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
7585 which fs or partmap modules are needed (akin to its sister scripts).
7586
7587 Also use grub-probe to get rid of unportable /proc/mounts check.
7588
7589 Print the same informational message that the other scripts do, before
fe6b695a 7590 exiting.
2c2a681b 7591
6193defe 75922007-06-23 Robert Millan <rmh@aybabtu.com>
7593
fe6b695a 7594 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 7595 a font file can be found and, if so, echo the GRUB path to it.
7596
7597 * util/update-grub.in: Handle multiple terminals depending on user
7598 input, platform availability and font file presence. Propagate
7599 variables of our findings to /etc/grub.d/ children.
7600
7601 * util/grub.d/00_header.in: Handle multiple terminals, based on
7602 environment setup by update-grub.
7603
eface1dc 76042007-06-23 Robert Millan <rmh@aybabtu.com>
7605
ba50d28f 7606 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 7607
bf697e28 76082007-06-21 Robert Millan <rmh@aybabtu.com>
7609
7610 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
7611 indicate end of data section in kernel image.
7612 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
7613 GRUB_KERNEL_MACHINE_DATA_END.
7614
7615 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
7616 space for it.
7617 * kern/i386/efi/startup.S: Likewise.
7618
7619 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
7620 during image generation. Implement --prefix option to override this
7621 patch.
7622 * util/i386/efi/grub-mkimage.c: Likewise.
7623
7624 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
7625 code to make path relative to its root into a separate function.
7626
7627 * util/i386/pc/grub-install.in: Use newly provided
7628 make_system_path_relative_to_its_root() to convert ${grubdir}, then
7629 pass the result to grub-install --prefix.
7630
baa574b4 76312007-06-13 Robert Millan <rmh@aybabtu.com>
7632
7633 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
7634 DEFAULT_DEVICE_MAP.
7635 * util/grub-emu.c: Use above definitions from misc.h instead of
7636 defining them.
7637 * util/grub-mkdevicemap.c: Likewise.
7638 * util/i386/pc/grub-setup.c: Likewise.
7639 * util/grub-probe.c: Likewise.
7640 (probe): Abort with grub_util_error() when either
7641 grub_guess_root_device or grub_util_get_grub_dev fails.
7642
0215dcbf 76432007-06-12 Robert Millan <rmh@aybabtu.com>
7644
7645 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
7646 "pager" assignment.
7647 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
7648 "pcdata".
7649 * util/grub-probe.c (probe): Likewise for "drive_name".
7650
8af2ab7b 76512007-06-11 Robert Millan <rmh@aybabtu.com>
7652
7653 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
7654 not just the cdrom one.
7655
59d31694 76562007-06-11 Robert Millan <rmh@aybabtu.com>
7657
7658 * util/i386/pc/grub-mkrescue.in: Add "set -e".
7659 Add --pkglibdir=DIR option to override pkglibdir.
7660 Mention --image-type=TYPE in help output.
7661 Fix --grub-mkimage (it was a no-op).
fe6b695a 7662 Abort gracefully when no parameter is given.
59d31694 7663
7ee367e4 76642007-06-11 Robert Millan <rmh@aybabtu.com>
7665
7666 * util/i386/pc/grub-mkrescue.in: New file.
7667 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
7668 * Makefile.in: Handle bin_SCRIPTS.
7669
29b0ed46 76702007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
7671
7672 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
7673 list of video modes.
7674
c0f90770 76752007-06-06 Robert Millan <rmh@aybabtu.com>
7676
7677 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
7678 file doesn't exist, or if it is in a filesystem grub can't read.
7679
7680 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
7681 not abort if GRUB_DRIVE could not be defined. Rearrange generated
7682 header comment to fit in 80 columns when the variables are resolved.
7683
7684 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
7685 could be identified by update-grub. Remove redundant check for
fe6b695a 7686 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 7687 handles that).
7688
fb36dc26 76892007-06-04 Robert Millan <rmh@aybabtu.com>
7690
7691 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
7692
7693 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
7694
7695 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
7696
0c68c93e 76972007-06-04 Robert Millan <rmh@aybabtu.com>
7698
7699 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
7700
7701 * include/grub/partition.h: Declare grub_apple_partition_map_init and
7702 grub_apple_partition_map_fini.
7703
7704 * util/biosdisk.c
7705 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
7706 to access >2 TiB disks).
7707
7708 Print disk->total_sectors with %llu instead of %lu, since this
7709 variable is always 64-bit (prevents wrong disk size from being displayed
7710 on either >2 TiB disk or big-endian CPU).
7711
7712 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
7713 into a generic case that supports all (sane) partition maps.
7714
7715 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
7716 breaks big-endian.
7717
7718 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
7719 and grub_apple_partition_map_fini() after that.
7720
0f23eb74 77212007-06-01 Robert Millan <rmh@aybabtu.com>
7722
7723 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
7724
7725 * util/grub.d/00_header.in: Only enable gfxterm when
7726 convert_system_path_to_grub_path() succeeds.
7727
42c71976 77282007-05-20 Robert Millan <rmh@aybabtu.com>
7729
7730 * util/update-grub_lib.in: New file.
7731 * DISTLIST: Add update-grub_lib.in.
7732 * conf/common.rmk: Generate update-grub_lib and install it in
7733 $(lib_DATA).
7734 * Makefile.in: Add install routine for $(lib_DATA).
7735
7736 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
7737 function provided by update-grub_lib to support arbitrary paths of
7738 unifont.pff.
7739 * util/update-grub.in: Use convert_system_path_to_grub_path() to
7740 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
7741
5beb2291 77422007-05-19 Robert Millan <rmh@aybabtu.com>
7743
7744 * commands/i386/cpuid.c: New module.
7745 * DISTLIST: Add it.
7746 * conf/i386-efi.rmk: Enable cpuid.mod.
7747 * conf/i386-pc.rmk: Likewise.
7748
7262eca1 77492007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7750
7751 * kern/disk.c (grub_disk_read): Check return value of
7752 grub_realloc().
7753
260ba823 77542007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7755
7756 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
7757 arrays.
7758 * disk/raid.c (grub_raid_open): Likewise.
7759
1ecb6cf2 77602007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7761
7762 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
7763 stack instead of on the heap.
7764
7765 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
7766 before doing a read on it.
7767
7768 * configure.ac: Only use -fno-stack-protector for the target
7769 environment.
f19dbdb7 7770
21c8cbb1 77712007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7772
7773 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
7774 __attribute_ ((unused)) to mode_type argument.
7775
7776 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 7777
21c8cbb1 7778 * kern/misc.c (memcmp): Fix prototype.
7779
7780 * include/grub/partition.h [GRUB_UTIL]
7781 (grub_gpt_partition_map_init): Add prototype.
7782 (grub_gpt_partition_map_fini): Likewise.
7783
7784 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
7785 at the right place.
7786
7787 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
7788 (grub_fat_read_data): Likewise.
7789 (grub_fat_find_dir): Likewise.
7790
7791 * font/manager.c (find_glyph): Make table a const.
7792 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 7793
849d55d3 77942007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
7795
7796 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
7797 code, first search for device in /dev/mapper, then in /dev.
7798 (grub_util_get_grub_dev): New function.
7799 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
7800 prototype.
7801 * util/grub-probe.c (probe): Remove check for RAID, call
7802 grub_util_get_grub_dev() instead of
7803 grub_util_biosdisk_get_grub_dev().
7804 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
7805 grub_util_biosdisk_get_grub_dev().
7806 * util/i386/pc/grub-setup.c (main): Likewise.
7807
8fff7c2f 78082007-05-16 Robert Millan <rmh@aybabtu.com>
7809
7810 * DISTLIST: Update for the latest changes.
7811 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
7812 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
7813 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
7814 grub/util/biosdisk.h.
7815 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
7816 grub/util/biosdisk.h.
7817
48e12b52 78182007-05-16 Robert Millan <rmh@aybabtu.com>
7819
7820 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7821
46b9d128 78222007-05-16 Robert Millan <rmh@aybabtu.com>
7823
7824 * util/i386/efi/grub-install.in: New.
7825 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7826 newly added grub-install.
7827 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7828 include.
7829 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7830 grub/util/biosdisk.h.
7831 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7832 grub/util/biosdisk.h.
7833
2d1a40a9 78342007-05-16 Robert Millan <rmh@aybabtu.com>
7835
7836 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7837 * include/grub/util/biosdisk.h: ... here.
7838 * util/i386/pc/biosdisk.c: Moved to ...
7839 * util/biosdisk.c: ... here.
7840 * util/i386/pc/getroot.c: Moved to ...
7841 * util/getroot.c: ... here.
7842 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7843 * util/grub-mkdevicemap.c: ... here.
7844 * util/i386/pc/grub-probe.c: Moved to ...
7845 * util/grub-probe.c: ... here.
7846
9e26e3bc 78472007-05-15 Robert Millan <rmh@aybabtu.com>
7848
7849 * util/update-grub.in: Remove duplicated line in grub.cfg header
7850 message.
7851
57f96397 78522007-05-13 Robert Millan <rmh@aybabtu.com>
7853
7854 * util/update-grub.in: Fix a few assumptions about the devices holding
7855 /, /boot and /boot/grub being the same.
7856 * util/grub.d/00_header.in: Likewise.
7857 * util/grub.d/10_hurd.in: Likewise.
7858 * util/grub.d/10_linux.in: Likewise.
7859
7860 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7861 patterns. Use that to define the `.old' suffix as older than `'.
7862
7863 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7864
7865 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7866 the grub.cfg header message.
7867
2e610d62 78682007-05-11 Robert Millan <rmh@aybabtu.com>
7869
7870 * util/update-grub.in: Create device.map if it doesn't already exist,
7871 before attempting to run grub-probe.
7872 Check for grub-probe and grub-mkdevicemap with the same code
7873 grub-install is using.
7874 Remove test mode.
7875
3f6a10ef 78762007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
7877
7878 * Makefile.in: Add the datarootdir autoconf variable.
7879
02e7b75e 78802007-05-09 Robert Millan <rmh@aybabtu.com>
7881
7882 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 7883 fail gracefully if dev->disk->partition == NULL.
02e7b75e 7884
75f396cc 78852007-05-07 Robert Millan <rmh@aybabtu.com>
7886
7887 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7888 determine partition map module.
7889 * util/i386/pc/grub-install.in: Use this feature to decide which
7890 partition module to load, instead of hardcoding pc and gpt.
7891
da65cb36 78922007-05-07 Robert Millan <rmh@aybabtu.com>
7893
7894 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7895 source directory differs from build directory.
7896
b57d6a91 78972007-05-05 Robert Millan <rmh@aybabtu.com>
7898
7899 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7900 initialisation.
7901
509d00f1 79022007-05-05 Robert Millan <rmh@aybabtu.com>
7903
7904 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7905
c48f23ef 79062007-05-05 Robert Millan <rmh@aybabtu.com>
7907
7908 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7909 command-line arguments via ${GRUB_CMDLINE_LINUX}.
7910
20b97658 79112007-05-05 Robert Millan <rmh@aybabtu.com>
7912
7913 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7914 (grub_probe_SOURCES): Likewise.
7915 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7916 GPT and initialize dos_part and bsd_part accordingly.
7917 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7918 install_bsd_part.
7919 (main): Activate gpt module for use during partition identification,
7920 and deactivate it afterwards.
7921 * util/i386/pc/grub-install.in: Add gpt module to core.img.
7922 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7923 partition identification, and deactivate it afterwards.
7924
99123174 79252007-05-05 Robert Millan <rmh@aybabtu.com>
7926
7927 * term/i386/pc/console.c (grub_console_fini): Call
7928 grub_term_set_current() before grub_term_unregister().
7929
ebd97f6e 79302007-05-04 Robert Millan <rmh@aybabtu.com>
7931
7932 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7933 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7934 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
7935 and update-grub_DATA.
7936 * conf/common.rmk: Build and install update-grub components.
7937 * conf/common.mk: Regenerate.
7938 * util/update-grub.in: New. Core of update-grub.
7939 * util/grub.d/00_header.in: New. Generates grub.cfg header.
7940 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
7941 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
7942 * util/grub.d/README: New. Document grub.d directory layout.
7943
b06a264d 79442007-05-01 Robert Millan <rmh@aybabtu.com>
7945
7946 * util/grub-emu.c: Move initialization functions
7947 grub_util_biosdisk_init() and grub_init_all() before
7948 grub_util_biosdisk_get_grub_dev(), which relies on them.
7949
41f0050e 79502007-04-19 Robert Millan <rmh@aybabtu.com>
7951
7952 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7953 it is used later.
7954
04582bb3 79552007-04-18 Jerone Young <jerone@gmail.com>
7956
f19dbdb7 7957 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 7958 stanza.
7959
08db4632 79602007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 7961
08db4632 7962 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
7963 continue on and look for device node with real device name.
7964
801b76be 79652007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 7966
fe6b695a 7967 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 7968 ability.
7969 * Makefile.in: Add autoconf package transformation code.
7970 * util/i386/pc/grub-install.in: Likewise.
7971 * util/powerpc/ieee1275/grub-install.in: Likewise.
7972
6795c4e1 79732007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7974
7975 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
7976 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
7977 (EXT2_REVISION): Likewise.
7978 (EXT2_INODE_SIZE): Likewise.
7979 (struct grub_ext2_block_group): Added a missing member
7980 "used_dirs".
7981 (grub_ext2_read_inode): Divide by the inode size in a superblock
7982 instead of 128 to obtain INODES_PER_BLOCK.
7983 Use the macro EXT2_INODE_SIZE instead of directly using
7984 SBLOCK->INODE_SIZE.
7985
d70af616 79862007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7987
7988 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
7989 superblock instead of the structure size to compute an
7990 offset. This fixes the problem that GRUB could not read a
7991 filesystem when inode size is different from 128-byte.
7992
3b801603 79932007-03-05 Marco Gerards <marco@gnu.org>
7994
7995 * normal/main.c (read_config_file): When "menu" is not set, create
7996 an initial context.
7997
4785bfe4 79982007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7999
8000 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
8001 (HEAP_LIMIT): New macro.
8002 (grub_claim_heap): Claim memory up to `heaplimit'.
8003
a0cbb023 80042007-02-21 Hollis Blanchard <hollis@penguinppc.org>
8005
8006 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
8007 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
8008 (_start): Likewise.
8009 (grub_arch_modules_addr): Return address after `_end'.
8010 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
8011 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
8012 (add_segments): Calculate `_end' from phdr size and location.
8013 (ALIGN_UP): Moved to ...
8014 * include/grub/misc.h: here.
8015 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
8016 New macro.
8017 (GRUB_IEEE1275_MODULE_BASE): Removed.
8018
fd7d8eba 80192007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8020
8021 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
8022 loop boundary.
8023
9b09e6fc 80242007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8025
8026 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
8027 All users updated.
8028 (grub_elf64_load_hook_t): Likewise.
8029 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
8030 debug output.
8031
3ce27299 80322007-02-20 Hollis Blanchard <hollis@penguinppc.org>
8033
8034 * kern/mm.c: Update copyright.
8035 (grub_mm_debug): Correct syntax error.
8036 (grub_mm_dump_free): New function.
8037 (grub_debug_free): Call `grub_free'.
8038 * include/grub/mm.h: Update copyright.
8039 (grub_mm_dump_free): Add declaration.
8040
077d5fee 80412007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8042
8043 * include/grub/ieee1275/ieee1275.h: Update copyright.
8044 * kern/powerpc/ieee1275/init.c: Likewise.
8045 * kern/powerpc/ieee1275/openfw.c: Likewise.
8046
8047 * loader/powerpc/ieee1275/linux.c: Likewise.
8048 * include/grub/elfload.h: Likewise.
8049 * kern/elf.c: Likewise.
8050 (grub_elf32_load): Pass `base' and `size' parameters. Update all
8051 callers.
8052 (grub_elf64_load): Likewise.
8053 (grub_elf32_load_segment): Move to a nested function.
8054 (grub_elf64_load_segment): Likewise.
8055
dc946850 80562007-02-12 Hollis Blanchard <hollis@penguinppc.org>
8057
8058 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
8059 prototype.
8060 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
8061 (grub_heap_len): Likewise.
8062 (HEAP_SIZE): New macro.
8063 (grub_claim_heap): New function.
8064 (grub_machine_init): Don't claim heap directly. Call
8065 `grub_claim_heap'.
8066 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
8067 (grub_available_iterate): New function.
8068
baa2a121 80692007-02-03 Thomas Schwinge <tschwinge@gnu.org>
8070
8071 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
8072 * configure.ac: Use it for testing the HOST and TARGET compilers.
8073
4fe9862e 80742006-12-13 Thomas Schwinge <tschwinge@gnu.org>
8075
8076 * Makefile.in (enable_grub_emu): New variable.
8077 * configure.ac (--enable-grub-emu): New option.
8078 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
8079 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
8080 * conf/i386-pc.rmk: Likewise.
8081 * conf/powerpc-ieee1275.rmk: Likewise.
8082 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
8083
a8aa5762 80842006-12-12 Marco Gerards <marco@gnu.org>
8085
8086 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
8087
8088 * kern/env.c (grub_env_unset): Don't free the member `value' when
8089 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
8090 pointer.
8091
8092 * normal/main.c (current_menu): Removed.
8093 (free_menu): Unset the `menu' environment variable.
8094 (grub_normal_menu_addentry): Make use of the environment variable
8095 `menu', instead of using the global `current_menu'. Allocate
8096 memory for the sourcecode of this entry.
8097 (read_config_file): New argument `nested', changed all callers.
8098 Only in the case of a new context, initialize a new menu. Set the
8099 `menu' environment variable.
8100 (grub_normal_execute): Don't set and unset the environment
8101 variable `menu' here anymore. Only free the menu when leaving the
8102 context.
8103
8104 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
8105 leak.
8106
957b3a3e 81072006-12-11 Marco Gerards <marco@gnu.org>
8108
8109 * normal/menu_entry.c (run): Fix off by one bug so the last line
8110 is executed. Move the loader check to outside the loop.
8111
ef875714 81122006-12-08 Hollis Blanchard <hollis@penguinppc.org>
8113
8114 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
8115
4e739985 81162006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
8117
8118 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
8119 the number of sectors. Reported by Andrey Shuvikov
8120 <mr_hyro@yahoo.com>.
f19dbdb7 8121
790707f2 81222006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
8123
8124 * kern/disk.c (grub_disk_read): When there is a read error, always
8125 try to read only the necessary data.
f19dbdb7 8126
790707f2 8127 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
8128 disk/raid.c.
8129 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
8130 prototype.
8131 [GRUB_UTIL] (grub_raid_fini): Likewise.
8132 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 8133 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 8134 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
8135 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
8136 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
8137 and grub_raid_fini().
f19dbdb7 8138
03e58196 81392006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
8140
8141 * include/grub/types.h (__unused): Rename to UNUSED.
8142 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
8143 (grub_elf64_size): Likewise.
f19dbdb7 8144
ae4f23bf 81452006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8146
8147 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
8148 grub_error_push and grub_error_pop in the error-handling path.
8149 (grub_elf32_load_segment): Only call grub_file_read with non-zero
8150 length.
8151
2166cc83 81522006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8153
8154 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
8155 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8156 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8157 (kernel_elf_SOURCES): Likewise.
8158 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
8159 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
8160 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8161 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8162 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
8163 (elf_mod_SOURCES): New variable.
8164 (elf_mod_CFLAGS): Likewise.
8165 (elf_mod_LDFLAGS): Likewise.
8166 * include/grub/types.h (__unused): New macro.
8167 * include/grub/elfload.h: New file.
8168 * kern/elf.c: Likewise.
8169 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
8170 (ELF32_LOADMASK): New macro.
8171 (ELF64_LOADMASK): Likewise.
8172 (vmlinux): Removed.
8173 (grub_linux_load32): New function.
8174 (grub_linux_load64): Likewise.
8175 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
8176 Use grub_elf_t instead of grub_file_t.
8177
a09d5aa5 81782006-11-02 Hollis Blanchard <hollis@penguinppc.org>
8179
8180 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
8181 `catch_result' to struct set_color_args.
8182
d976fc51 81832006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
8184
8185 * normal/menu.c: Include grub/script.h.
8186 * normal/menu_entry.c: Likewise.
8187 * include/grub/normal.h: Do not include grub/script.h.
8188
67507549 81892006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8190
8191 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
8192
69203a99 81932006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8194
8195 * kern/disk.c (grub_disk_open): Print debug messages when opening a
8196 disk.
8197 (grub_disk_close): Print debug messages when closing a disk.
8198 (grub_disk_read): Print debug messages when disk read fails.
8199 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
8200 filesystem type.
8201 * kern/partition.c: Include misc.h.
8202 (grub_partition_iterate): Print debug messages when detecting
8203 partition type.
8204
e2b8278c 82052006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8206
8207 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
8208 is negative.
8209 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
8210
97b2f2ff 82112006-10-26 Hollis Blanchard <hollis@penguinppc.org>
8212
8213 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8214 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
8215
6555d655 82162006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
8217
8218 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
8219 instead of sizeof(lv). Patch by Michael Guntsche.
8220
4d42b77f 82212006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
8222
8223 * disk/lvm.c: Rename VGS to VG_LIST.
8224 (grub_lvm_iterate): Change VGS->LV to VG-LV.
8225 (grub_lvm_open): Likewise.
8226 Thanks to Michael Guntsche for finding this bug.
8227
5d74d927 82282006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8229
8230 * configure.ac (AC_INIT): Bumped to 1.95.
8231
a1bb27e4 82322006-10-14 Robert Millan <rmh@aybabtu.com>
8233
8234 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
8235 with "/dev/.static/dev/md".
8236
e0994b8b 82372006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
8238
8239 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
8240 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
8241 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
8242 DRIVE_NAME are always freed.
8243
8244 * util/i386/pc/biosdisk.c (make_device_name): Add one into
8245 DOS_PART, as a DOS partition is counted from one instead of zero
8246 now. Reported by Robert Millan.
8247
ddd5cee9 82482006-10-14 Robert Millan <rmh@aybabtu.com>
8249
8250 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
8251 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
8252 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
8253 string returned by grub_guess_root_device.
8254 * util/i386/pc/grub-setup.c: Likewise.
8255 * util/i386/pc/grub-probefs.c: Likewise.
8256
8257 * util/i386/pc/grub-probefs.c: Rename to ...
8258 * util/i386/pc/grub-probe.c: ... this.
8259 * DISTLIST: Remove grub-probefs, add grub-probe.
8260 * conf/i386-efi.rmk: Likewise.
8261 * conf/i386-pc.rmk: Likewise.
8262 * util/i386/pc/grub-install.in: Likewise.
8263
8264 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
8265 choose which information we want to print.
8266
2b002173 82672006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
8268
8269 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
8270 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
8271 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
8272 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
8273 video/readers/tga.c and video/i386/pc/vbeutil.c.
8274
82752006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
8276
8277 Added support for RAID and LVM.
f19dbdb7 8278
2b002173 8279 * disk/lvm.c: New file.
8280 * disk/raid.c: Likewise.
8281 * include/grub/lvm.h: Likewise.
f19dbdb7 8282 * include/grub/raid.h: Likewise.
2b002173 8283 * include/grub/util/lvm.h: Likewise.
8284 * include/grub/util/raid.h: Likewise.
8285 * util/lvm.c: Likewise.
8286 * util/raid.c: Likewise.
8287
8288 * include/grub/disk.h (grub_disk_dev_id): Add
8289 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
8290 (grub_disk_get_size): New prototype.
8291 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
8292 returns a partition.
8293 (grub_disk_get_size): New function.
f19dbdb7 8294
2b002173 8295 * kern/i386/pc/init.c (make_install_device): Copy the prefix
8296 verbatim if grub_install_dos_part is -2.
8297
8298 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
8299 and LVM devices.
8300
8301 * util/i386/pc/grub-setup.c (setup): New argument
8302 MUST_EMBED. Force embedding of GRUB when the argument is
8303 true. Close FILE before returning.
8304 (main): Add support for RAID and LVM.
f19dbdb7 8305
2b002173 8306 * conf/common.rmk: Add RAID and LVM modules.
8307 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
8308 util/lvm.c.
8309 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
8310
8311 * kern/misc.c (grub_strstr): New function.
8312 * include/grub/misc.h (grub_strstr): New prototype.
8313
050548d0 83142006-10-10 Tristan Gingold <tristan.gingold@bull.net>
8315
8316 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
8317
da849d2d 83182006-10-05 Tristan Gingold <tristan.gingold@bull.net>
8319
8320 * kern/misc.c (grub_strtoull): Guess the base only if not
8321 specified.
8322
97b2f2ff 83232006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 8324
8325 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
8326 PowerMac support.
8327
97b2f2ff 83282006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 8329
8330 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
8331
8332 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
8333 Remove `flags' argument. All callers changed.
8334 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
8335 (IEEE1275_IHANDLE_INVALID): New variable.
8336 (IEEE1275_CELL_INVALID): New variable.
8337 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
8338 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
8339 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
8340 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
8341 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
8342 codes from Open Firmware. All callers updated.
8343 (grub_ieee1275_next_property): Directly return Open Firmware return
8344 code.
8345 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8346 Standardize error checking from `grub_ieee1275_get_property'.
8347 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
8348 `devalias' to `aliases'. Correct comments. Consolidate error paths.
8349
97b2f2ff 83502006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 8351
8352 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
8353 `instance_to_package_args' to `instance_to_path_args'.
8354
8355 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
8356 `grub_ieee1275_chosen'.
8357
8358 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
8359 `grub_ieee1275_interpret'.
8360
97b2f2ff 83612006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 8362
8363 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
8364
97b2f2ff 83652006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 8366
8367 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
8368 (__cmpdi): Likewise.
8369
8370 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
8371 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
8372 `grub_ssize_t'.
8373
02bb8acc 8374 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 8375
8376 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
8377 to type `grub_ssize_t'.
8378 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
8379
7f9a8531 83802006-09-22 Marco Gerards <marco@gnu.org>
8381
8382 * normal/script.c (grub_script_create_cmdmenu): Skip leading
8383 newlines.
8384
b5ef1102 83852006-09-22 Marco Gerards <marco@gnu.org>
8386
8387 * commands/echo.c: New file.
8388
8389 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
8390
8391 * conf/common.rmk (echo_mod_SOURCES): New variable.
8392 (echo_mod_CFLAGS): Likewise.
8393 (echo_mod_LDFLAGS): Likewise.
8394
2cff3677 83952006-09-22 Marco Gerards <marco@gnu.org>
8396
8397 * normal/main.c (get_line): Malloc memory instead of using
8398 preallocated memory. Removed the arguments `cmdline' and
8399 `max_len'. Updated all callers.
8400
6ba4688b 84012006-09-22 Marco Gerards <marco@gnu.org>
8402
8403 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
8404 (normal_mod_DEPENDENCIES): Likewise.
8405
8406 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
8407 (normal_mod_DEPENDENCIES): Likewise.
8408
8409 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
8410
e02ac02c 84112006-09-22 Johan Rydberg <jrydberg@gnu.org>
8412
8413 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
8414 programs.
8415 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
8416 (normal_mod_DEPENDENCIES): Likewise.
8417 * conf/i386-pc.mk: Regenerate.
8418 * conf/i386-efi.mk: Likewise
8419 * conf/common.mk: Likewise.
8420 * conf/powerpc-ieee1275.mk: Likewise.
8421 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 8422
8d252e44 84232006-09-22 Robert Millan <rmh@aybabtu.com>
8424
8425 Sync with i386 version.
8426 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
8427 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
8428
209bf7ac 84292006-09-21 Robert Millan <rmh@aybabtu.com>
8430
8431 Import from GRUB Legacy (lib/device.c):
8432 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
8433 (init_device_map) [__linux__]: Add support for I2O devices.
8434
6b146090 84352006-09-14 Marco Gerards <marco@gnu.org>
8436
8437 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
8438 `-melf_i386'.
8439
e38600a8 84402006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 8441
8442 * util/i386/pc/grub-install.in: Skip menu.lst when removing
8443 /boot/grub/*.lst.
78fa1790 8444
2952da5d 8445 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 8446
2952da5d 8447 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
8448 before adding it to device.map.
8449
01b82a64 84502006-08-15 Johan Rydberg <jrydberg@gnu.org>
8451
fe6b695a 8452 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 8453 compiles a file; using the -MD option.
8454 * conf/common.mk: Regenerate.
8455 * conf/i386-pc.mk: Likewise.
8456 * conf/i386-efi.mk: Likewise.
8457 * conf/powerpc-ieee1275.mk: Likewise.
8458 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 8459
1064790d 84602006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
8461
8462 Move the prototypes of grub_setjmp and grub_longjmp to
8463 cpu/setjmp.h, so that each architecture may specify different
8464 attributes.
f19dbdb7 8465
1064790d 8466 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
8467 (grub_longjmp): Likewise.
8468 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
8469 (grub_longjmp): Likewise.
8470 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
8471 (grub_longjmp): Likewise.
8472
8473 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
8474 [!GRUB_UTIL] (grub_longjmp): Removed.
8475
29dda3ed 84762006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
8477
8478 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
8479 "color!" method does not return any value.
8480
ad2a06ed 84812006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8482
8483 * include/grub/bitmap.h: New file.
8484
8485 * include/grub/i386/pc/vbeutil.h: Likewise.
8486
8487 * video/bitmap.c: Likewise.
8488
8489 * video/readers/tga.c: Likewise.
8490
8491 * video/i386/pc/vbeutil.c: Likewise.
8492
8493 * commands/videotest.c: Code cleanup and updated to reflect to new
8494 video API.
8495
8496 * term/gfxterm.c: Likewise.
8497
8498 * video/video.c: Likewise.
8499
8500 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
8501 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
8502 (bitmap_mod_SOURCES): New entry.
8503 (bitmap_mod_CFLAGS): Likewise.
8504 (bitmap_mod_LDFLAGS): Likewise.
8505 (tga_mod_SOURCES): Likewise.
8506 (tga_mod_CFLAGS): Likewise.
8507 (tga_mod_LDFLAGS): Likewise.
8508
8509 * include/grub/video.h (grub_video_blit_operators): New enum type.
8510 (grub_video_render_target): Changed as forward declaration and moved
8511 actual definition to be video driver specific.
8512 (grub_video_adapter.blit_bitmap): Added blitting operator.
8513 (grub_video_adapter.blit_render_target): Likewise.
8514 (grub_video_blit_bitmap): Likewise.
8515 (grub_video_blit_render_target): Likewise.
8516
8517 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
8518 driver specific render target definition.
8519 (grub_video_vbe_map_rgba): Added driver internal helper.
8520 (grub_video_vbe_unmap_color): Updated to use
8521 grub_video_i386_vbeblit_info.
8522 (grub_video_vbe_get_video_ptr): Likewise.
8523
8524 * include/grub/i386/pc/vbeblit.h
8525 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
8526 grub_video_i386_vbeblit_info.
8527 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8528 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8529 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8530 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8531 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8532 (grub_video_i386_vbeblit_index_index): Likewise.
8533 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
8534 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8535 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8536 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
8537 operator.
8538 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
8539 operator.
8540
8541 * video/i386/pc/vbeblit.c: Updated to reflect changes on
8542 include/grub/i386/pc/vbeblit.h.
8543
8544 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
8545 Updated to use grub_video_i386_vbeblit_info.
8546 (grub_video_i386_vbefill_R8G8B8): Likewise.
8547 (grub_video_i386_vbefill_index): Likewise.
8548 (grub_video_i386_vbefill): Added generic filler.
8549
8550 * video/i386/pc/vbefill.c: Updated to reflect changes on
8551 include/grub/i386/pc/vbefill.h.
8552
8553 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
8554 grub_video_i386_vbeblit_info.
8555 (grub_video_vbe_unmap_color): Likewise.
8556 (grub_video_vbe_blit_glyph): Likewise.
8557 (grub_video_vbe_scroll): Likewise.
8558 (grub_video_vbe_draw_pixel): Removed function.
8559 (grub_video_vbe_get_pixel): Likewise.
8560 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
8561 updated code to use it.
8562 (common_blitter): Added common blitter for render target and bitmap.
8563 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
8564 (grub_video_vbe_blit_render_target): Likewise.
8565
bc8c036d 85662006-07-30 Johan Rydberg <jrydberg@gnu.org>
8567
8568 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
8569 is in text mode if there is no console control protocol instance
8570 available.
8571
684a8eff 85722006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8573
8574 * include/grub/video.h: Code cleanup.
8575
8576 * include/grub/i386/pc/vbe.h: Likewise.
8577
8578 * video/i386/pc/vbe.c: Likewise.
8579
8580 * video/i386/pc/vbeblit.c: Likewise.
8581
8582 * video/i386/pc/vbefill.c: Likewise.
8583
8584 * video/video.c: Likewise. Also added more comments.
8585
5915059b 85862006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8587
8588 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
8589 (struct grub_biosdisk_dap): Likewise.
8590
8591 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
8592 linkage settings for all functions.
8593
90ce5d56 85942006-07-12 Marco Gerards <marco@gnu.org>
8595
8596 * configure.ac (--enable-mm-debug): Fix typo.
8597
8598 * genkernsyms.sh.in: Use proper quoting for `CC'.
8599
43e7f879 86002006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
8601
8602 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
8603 (normal_mod_ASFLAGS): Remove "-m32".
8604
4889bdec 86052006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
8606
8607 * util/misc.c: Include config.h.
8608 [!HAVE_MEMALIGN]: Do not include malloc.h.
8609 (grub_memalign): Use posix_memalign, if present. Then, use
8610 memalign, if present. Otherwise, emit an error.
8611
8612 * util/grub-emu.c: Do not include malloc.h.
8613
8614 * include/grub/util/misc.h: Include unistd.h. This is required for
8615 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
8616 D. Eades III <hde@foobar-qux.org>.
8617
8618 * configure.ac (AC_GNU_SOURCE): Added.
8619 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
8620 type.
8621
fd39d4da 86222006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
8623
8624 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
8625 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
8626
b786f3b5 86272006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
8628
8629 * include/grub/types.h (grub_host_addr_t): Rename to
8630 grub_target_addr_t.
8631 (grub_host_off_t): Rename to grub_target_off_t.
8632 (grub_host_size_t): Rename to grub_target_size_t.
8633 (grub_host_ssize_t): Rename to grub_target_ssize_t.
8634 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
8635
8636 * include/grub/kernel.h (struct grub_module_header): Change type
8637 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
8638 (grub_module_info): Likewise.
f19dbdb7 8639
051988bb 86402006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8641
8642 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
8643 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
8644 Velazquez <jesus.velazquez@gmail.com>.
8645
deae281b 86462006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8647
8648 Count partitions from 1 instead of 0 in the string representation
8649 of partitions. Still use 0-based internally.
f19dbdb7 8650
deae281b 8651 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
8652 (sun_partition_map_iterate): Use grub_partition_t instead of
8653 struct grub_partition *. Cast DESC->START_CYLINDER to
8654 grub_uint64_t after converting the endian.
8655 (sun_partition_map_probe): Subtract 1 for PARTNUM.
8656 (sun_partition_map_get_name): Add 1 to P->INDEX.
8657
8658 * partmap/pc.c (grub_partition_parse): Subtract 1 for
8659 PCDATA->DOS_PART.
8660 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
8661
8662 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
8663 zero instead of one.
8664 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
8665 (gpt_partition_map_get_name): Add 1 into P->INDEX.
8666
8667 * partmap/apple.c (apple_partition_map_iterate): Change the type
8668 of POS to unsigned.
8669 (apple_partition_map_probe): Subtract 1 for PARTNUM.
8670 (apple_partition_map_get_name): Add 1 into P->INDEX.
8671
8672 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
8673 of POS to unsigned.
8674 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
8675 calculate the offset of a partition.
8676 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
8677 (amiga_partition_map_get_name): Add 1 into P->INDEX.
8678
8679 * partmap/acorn.c (acorn_partition_map_find): Change the type of
8680 SECTOR to grub_disk_addr_t.
8681 (acorn_partition_map_iterate): Likewise.
8682 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
8683 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
8684 top.
8685 (acorn_partition_map_get_name): Add 1 into P->INDEX.
8686
8687 * kern/i386/pc/init.c (make_install_device): Add 1 into
8688 GRUB_INSTALL_DOS_PART.
8689
8690 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
8691 conditional.
8692
524a1e6a 86932006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8694
8695 Clean up the code to support 64-bit addressing in disks and
8696 files. This change is not enough for filesystems yet.
f19dbdb7 8697
524a1e6a 8698 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
8699 type of "start" to grub_uint64_t.
8700 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
8701 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
8702 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
8703 convert addresses.
8704
8705 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
8706 to grub_disk_addr_t.
8707
8708 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
8709 string.
8710
8711 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8712
8713 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
8714 to char *.
8715
8716 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
8717
8718 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
8719
8720 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
8721
8722 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
8723 to grub_off_t, to detect an error from grub_file_seek.
8724 (grub_multiboot_load_elf32): Likewise.
8725
8726 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
8727 maximum unsigned long value when an overflow is detected.
8728 (grub_strtoull): New function.
8729 (grub_divmod64): Likewise.
8730 (grub_lltoa): use grub_divmod64.
8731
8732 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
8733 grub_disk_addr_t.
8734 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
8735 the pointer to next character. Use grub_strtoull instead of
8736 grub_strtoul.
8737 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
8738 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
8739 respectively.
8740
fe6b695a 8741 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 8742 return value is signed.
8743 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
8744 test if OFFSET is less than zero, as OFFSET is unsigned now.
8745
8746 * kern/disk.c (struct grub_disk_cache): Change the type of
8747 "sector" to grub_disk_addr_t.
8748 (grub_disk_cache_get_index): Change the type of SECTOR to
8749 grub_disk_addr_t. Calculate the hash with SECTOR casted to
8750 unsigned after shifting.
8751 (grub_disk_cache_invalidate): Change the type of SECTOR to
8752 grub_disk_addr_t.
8753 (grub_disk_cache_unlock): Likewise.
8754 (grub_disk_cache_store): Likewise.
8755 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
8756 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
8757 grub_disk_addr_t and grub_uint64_t, respectively.
8758 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
8759 body, as the value of OFFSET is tweaked by
8760 grub_disk_check_range. Change the types of START_SECTOR, LEN and
8761 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
8762 respectively.
8763 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
8764 body, as the value of OFFSET is tweaked by
8765 grub_disk_check_range. Change the types of LEN and N to
8766 grub_size_t.
8767
8768 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
8769 and "saved_offset" to grub_off_t.
8770 (test_header): Cast BUF to char *.
8771 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
8772 to char *.
8773 (grub_gzio_read): Change the types of OFFSET and SIZE to
8774 grub_off_t and grub_size_t, respectively.
8775
8776 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
8777 Removed.
8778 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
8779 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
8780 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
8781 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
8782 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
8783
8784 * include/grub/types.h (grub_off_t): Unconditionally set to
8785 grub_uint64_t.
8786 (grub_disk_addr_t): Changed to grub_uint64_t.
8787
8788 * include/grub/partition.h (struct grub_partition): Change the
8789 types of "start", "len" and "offset" to grub_disk_addr_t,
8790 grub_uint64_t and grub_disk_addr_t, respectively.
8791 (grub_partition_get_start): Return grub_disk_addr_t.
8792 (grub_partition_get_len): Return grub_uint64_t.
8793
8794 * include/grub/misc.h (grub_strtoull): New prototype.
8795 (grub_divmod64): Likewise.
8796
8797 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
8798 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
8799 grub_off_t, respectively.
8800 All callers and references changed.
8801
8802 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
8803 grub_size_t in "read".
8804 All callers and references changed.
8805
8806 * include/grub/file.h (struct grub_file): Change the types of
8807 "offset" and "size" to grub_off_t and grub_off_t,
8808 respectively. Change the type of SECTOR to grub_disk_addr_t in
8809 "read_hook".
8810 (grub_file_read): Change the type of LEN to grub_size_t.
8811 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
8812 grub_off_t.
8813 (grub_file_size): Return grub_off_t.
8814 (grub_file_tell): Likewise.
8815 All callers and references changed.
8816
8817 * include/grub/disk.h (struct grub_disk_dev): Change the types of
8818 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8819 "write".
8820 (struct grub_disk): Change the type of "total_sectors" to
8821 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 8822 "read_hook".
524a1e6a 8823 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8824 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8825 (grub_disk_write): Likewise.
8826 All callers and references changed.
8827
8828 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8829 char * for grub_strncmp to silence gcc.
8830 (grub_iso9660_mount): Likewise.
8831 (grub_iso9660_mount): Likewise.
8832 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8833 return statement.
8834 (grub_iso9660_iterate_dir): Likewise.
8835 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8836
8837 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8838 LEN to grub_disk_addr_t and grub_size_t, respectively.
8839
8840 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8841
8842 * fs/jfs.c (grub_jfs_read_file): Likewise.
8843
8844 * fs/minix.c (grub_jfs_read_file): Likewise.
8845
8846 * fs/sfs.c (grub_jfs_read_file): Likewise.
8847
8848 * fs/ufs.c (grub_jfs_read_file): Likewise.
8849
8850 * fs/xfs.c (grub_jfs_read_file): Likewise.
8851
8852 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8853 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8854 respectively.
8855
8856 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8857 BLKNR to -1 instead of returning GRUB_ERRNO.
8858 (grub_ext2_read_file): Change the types of SECTOR and
8859 LEN to grub_disk_addr_t and grub_size_t, respectively.
8860
8861 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8862 LEN to grub_disk_addr_t and grub_size_t, respectively.
8863
8864 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8865 grub_file_read.
8866
8867 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8868 string. Do not cast SECTOR explicitly.
8869
8870 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8871 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8872 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8873 grub_disk_addr_t and grub_size_t, respectively. If the sector is
8874 over 2TB and LBA mode is not supported, raise an error.
8875 (get_safe_sectors): New function.
8876 (grub_biosdisk_read): Use get_safe_sectors.
8877 (grub_biosdisk_write): Likewise.
8878
8879 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8880 (grub_efidisk_write): Likewise.
8881
8882 * disk/loopback.c (delete_loopback): Cosmetic changes.
8883 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8884 correctly.
8885 (grub_loopback_open): Likewise.
8886 (grub_loopback_read): Likewise. Also, change the type of POS to
8887 grub_off_t, and fix the usage of grub_memset.
8888
8889 * commands/i386/pc/play.c: Include grub/machine/time.h.
8890
8891 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8892 print FILE->SIZE.
8893
8894 * commands/configfile.c: Include grub/env.h.
8895
8896 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8897 GRUB_ERRNO directly instead. Change the type of POS to
8898 grub_off_t. Follow the coding standard.
8899
8900 * commands/blocklist.c: Include grub/partition.h.
8901 (grub_cmd_blocklist): Return an error if the underlying device is
8902 not a disk. Take the starting sector of a partition into account,
8903 if a partition is used.
8904
8905 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8906 a length field.
8907 (lba_mode): Support 64-bit addresses.
8908 (chs_mode): Likewise.
8909 (copy_buffer): Adapted to the new offsets of a length field and a
8910 segment field.
8911 (blocklist_default_start): Allocate 64-bit space.
8912
8913 * boot/i386/pc/boot.S (force_lba): Removed.
8914 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 8915 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 8916 space.
8917 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8918 is useless.
8919 (lba_mode): Refactored to support a 64-bit address. More size
8920 optimization.
8921 (setup_sectors): Likewise.
8922
53af98ad 89232006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8924
8925 * DISTLIST: Added include/grub/i386/linux.h. Removed
8926 include/grub/i386/pc/linux.h
8927
8928 * configure.ac (AC_INIT): Bumped to 1.94.
8929
8930 * config.guess: Updated from gnulib.
8931 * config.sub: Likewise.
8932 * install-sh: Likewise.
8933 * mkinstalldirs: Likewise.
8934
b4c1940a 89352006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8936
8937 * conf/common.rmk (grub_modules_init.lst): Depended on
8938 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8939 MODSRCFILES.
8940
8941 * genmk.rb (PModule::rule): Reverted the previous change.
8942
cfca1cfd 89432006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8944
8945 * conf/common.rmk (grub_modules_init.lst): Depends on
8946 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8947 that the target does not exist before producing.
8948 (grub_modules_init.h): Remove the target before generating.
8949 (grub_emu_init.c): Likewise.
8950
8951 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8952
aa6d7826 89532006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
8954
8955 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8956 for the target-specific tests. Make sure that we also have the
8957 up-to-date target variables for those tests.
8958
26c607b9 89592006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8960
8961 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
8962 (PModule::rule): Likewise.
8963
0162321a 89642006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8965
8966 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
8967 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
8968 target-specific flags should be prefixed.
8969 (PModule::rule): Likewise.
8970
6c826348 89712006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
8972
8973 * configure.ac (CMP): Check if cmp is available explicitly.
8974
b977bf01 89752006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
8976
8977 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
8978 (target_cpu): New variable.
8979 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 8980
b977bf01 8981 * util/i386/pc/grub-install.in (host_cpu): Removed.
8982 (target_cpu): New variable.
8983 (pkglibdir): Use target_cpu instead of host_cpu.
8984
8985 * util/genmoddep.c: Removed.
f19dbdb7 8986
b977bf01 8987 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
8988 instead of GRUB_HOST_SIZEOF_VOID_P.
8989 * kern/dl.c: Likewise.
8990
8991 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
8992 ...
8993 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8994 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8995 (GRUB_TARGET_SIZEOF_LONG): ... this.
8996 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8997 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8998 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8999 to ...
9000 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9001 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9002 (GRUB_TARGET_SIZEOF_LONG): ... this.
9003 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9004 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9005 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
9006 to ...
9007 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
9008 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
9009 (GRUB_TARGET_SIZEOF_LONG): ... this.
9010 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
9011 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
9012
9013 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
9014 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
9015 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
9016 instead of GRUB_HOST_SIZEOF_LONG.
9017 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
9018 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
9019 GRUB_CPU_WORDS_BIGENDIAN.
9020 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
9021 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
9022 grub_host_ssize_t.
9023
9024 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
9025 (genmoddep_SOURCES): Likewise.
9026 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
9027 (genmoddep_SOURCES): Likewise.
9028 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
9029 (genmoddep_SOURCES): Likewise.
9030 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
9031 Likewise.
9032 (genmoddep_SOURCES): Likewise.
9033
9034 * genmoddep.awk: New file.
9035
9036 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
9037 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
9038 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
9039 (PModule::rule): Likewise.
9040 (Program::rule): Likewise.
9041 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
9042 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
9043 respectively.
9044
9045 * configure.ac: Rewritten intensively to use host and target
9046 instead of build and host, respectively.
9047
9048 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
9049 (host_cpu): Removed.
9050 (target_cpu): New variable.
9051 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
9052 (BUILD_CC): Removed.
9053 (BUILD_CFLAGS): Likewise.
9054 (BUILD_CPPFLAGS): Likewise.
9055 (TARGET_CC): New variable.
9056 (TARGET_CFLAGS): Likewise.
9057 (TARGET_CPPFLAGS): Likewise.
9058 (TARGET_LDFLAGS): Likewise.
9059 (AWK): Likewise.
9060 (include): Use target_cpu instead of host_cpu.
9061 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 9062
b977bf01 9063 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
9064
f09771a1 90652006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
9066
9067 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
9068 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
9069 field 'false' to 'exec_on_false'.
9070 (grub_script_create_cmdif): Renamed argument names to reflect above
9071 changes.
9072
9073 * normal/execute.c (grub_script_execute_cmdif): Likewise.
9074
9075 * normal/script.c (grub_script_create_cmdif): Likewise.
9076
118f4fb3 90772006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
9078
9079 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
9080 top.
9081 (grub_hfsplus_btree_recptr): Likewise.
9082 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
9083 FILEBLOCK both to pass a block number and store next block
9084 number.
9085 (grub_hfsplus_read_block): Rewritten heavily to support an extent
9086 overflow file correctly. Specify errors appropriately, because
9087 fshelp expects that GRUB_ERRNO is set when fails. Reuse
9088 grub_hfsplus_btree_recptr to get the pointer to a found key.
9089 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
9090 is found.
9091
9092 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
9093 linux.mod.
9094 (_linux_mod_SOURCES): New variable.
9095 (_linux_mod_CFLAGS): Likewise.
9096 (_linux_mod_LDFLAGS): Likewise.
9097 (linux_mod_SOURCES): Likewise.
9098 (linux_mod_CFLAGS): Likewise.
9099 (linux_mod_LDFLAGS): Likewise.
9100
9101 * DISTLIST: Added loader/i386/efi/linux.c,
9102 loader/i386/efi/linux_normal.c and
9103 include/grub/i386/efi/loader.h.
9104
9105 * loader/i386/efi/linux.c: New file.
9106 * loader/i386/efi/linux_normal.c: Likewise.
9107 * include/grub/i386/efi/loader.h: Likewise.
9108
89a7d726 91092006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
9110
9111 * commands/blocklist.c: New file.
9112
9113 * DISTLIST: Added commands/blocklist.c.
9114
9115 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 9116 color for the background, and a darker color for the foreground.
89a7d726 9117 (grub_console_checkkey): Return READ_KEY.
9118 (grub_console_cls): Set the background to
9119 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
9120
9121 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
9122
9123 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
9124 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
9125
9126 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
9127 prototype.
9128
9129 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
9130 BG. The spec is wrong again.
9131
9132 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
9133 prototype.
9134 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
9135
9136 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9137 commands/blocklist.c.
9138 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 9139
89a7d726 9140 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
9141 (blocklist_mod_SOURCES): New variable.
9142 (blocklist_mod_CFLAGS): Likewise.
9143 (blocklist_mod_LDFLAGS): Likewise.
9144
75c8f258 91452006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
9146
9147 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
9148 duplication.
9149 (lba_mode): Use %eax more intensively to reduce the code size.
9150
da2eb181 91512006-05-20 Marco Gerards <marco@gnu.org>
9152
9153 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
9154
9155 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
9156 for `menuentry'.
9157 (script): Accept leading newlines.
9158 (newlines): New rule to describe 0 or more newlines.
9159 (commands): Accept `command' with trailing newline. Fixed the
9160 order in which arguments were passed to `grub_script_add_cmd'.
9161 Accept commands separated by newlines.
9162 (function): Changed to accept newlines.
9163 (menuentry) Rewritten.
9164
9165 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
9166 front of the list, instead of to the end.
9167
577b4050 91682006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
9169
9170 * util/i386/pc/grub-install.in (bindir): New variable.
9171 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
9172 Shaver <lbgwjl@gmail.com>.
9173
0d6e1189 91742006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
9175
9176 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
9177 grub/machine/linux.h
9178 * loader/i386/pc/linux.c: Likewise.
9179
9180 * include/grub/i386/pc/linux.h: Moved to ...
9181 * include/grub/i386/linux.h: ... here.
9182
9183 * include/grub/i386/linux.h (struct linux_kernel_params): New
9184 struct.
f19dbdb7 9185
31b86e9f 91862006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
9187
9188 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
9189 checking.
9190 (grub_video_vbe_blit_glyph): Likewise.
9191 (grub_video_vbe_blit_bitmap): Likewise.
9192 (grub_video_vbe_blit_render_target): Likewise.
9193
83b984de 91942006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
9195
9196 * configure.ac (--with-platform): Properly quote the square
9197 brackets.
9198
5f0413bd 91992006-05-08 Marco Gerards <marco@gnu.org>
9200
9201 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
9202 this...
9203 (kernel_elf_HEADERS): ...to this. Updated all users.
9204 (grubof_symlist.c): Renamed from this...
9205 (kernel_elf_symlist.c): ...to this. Updated all users.
9206 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9207 (grubof_SOURCES): Renamed from this...
9208 (kernel_elf_SOURCES): ...to this.
9209 (grubof_HEADERS): Renamed from this...
9210 (kernel_elf_HEADERS): ...to this.
9211 (grubof_CFLAGS): Renamed from this...
9212 (kernel_elf_CFLAGS): ...to this.
9213 (grubof_ASFLAGS): Renamed from this...
9214 (kernel_elf_ASFLAGS): ...to this.
9215 (grubof_LDFLAGS): Renamed from this...
9216 (kernel_elf_LDFLAGS): ...to this.
9217
9218 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
9219 this...
9220 (kernel_elf_HEADERS): ...to this. Updated all users.
9221 (grubof_symlist.c): Renamed from this...
9222 (kernel_elf_symlist.c): ...to this. Updated all users.
9223 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9224 (grubof_SOURCES): Renamed from this...
9225 (kernel_elf_SOURCES): ...to this.
9226 (grubof_HEADERS): Renamed from this...
9227 (kernel_elf_HEADERS): ...to this.
9228 (grubof_CFLAGS): Renamed from this...
9229 (kernel_elf_CFLAGS): ...to this.
9230 (grubof_ASFLAGS): Renamed from this...
9231 (kernel_elf_ASFLAGS): ...to this.
9232 (grubof_LDFLAGS): Renamed from this...
9233 (kernel_elf_LDFLAGS): ...to this.
9234
9235 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
9236 `kernel.elf' instead of `grubof'.
9237
05568c2e 92382006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
9239
9240 Add --with-platform to configure. Use pkglibdir instead of
9241 pkgdatadir. This is reported by Roger Leigh.
9242
9243 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
9244 (host_vendor): Likewise.
9245 (host_os): Likewise.
9246 (pkgdatadir): Likewise.
9247 (platform): New variable.
9248 (pkglibdir): Likewise.
9249 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 9250
05568c2e 9251 * util/i386/pc/grub-install.in (datadir): Removed.
9252 (host_vendor): Likewise.
9253 (host_os): Likewise.
9254 (pkgdatadir): Likewise.
9255 (platform): New variable.
9256 (pkglibdir): Likewise.
9257 Use PKGLIBDIR instead of PKGDATADIR.
9258
9259 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
9260 instead of GRUB_DATADIR.
9261 (main): Likewise.
9262 * util/i386/pc/grub-mkimage.c (usage): Likewise.
9263 (main): Likewise.
9264 * util/i386/efi/grub-mkimage.c (usage): Likewise.
9265 (main): Likewise.
9266
9267 * configure.ac (--with-platform): New option.
9268 Use PLATFORM instead of HOST_VENDOR to specify a platform.
9269
9270 * Makefile.in: Include a makefile based on PLATFORM instead of
9271 HOST_VENDOR.
9272 (pkgdatadir): Not appended by the machine type.
9273 (pkglibdir): Appended by the machine type.
9274 (host_vendor): Removed.
9275 (platform): New variable.
9276 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
9277 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
9278 (uninstall): Likewise.
9279
4e93851c 92802006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
9281
9282 Use the environment context in the menu. Remove the commands
9283 "default" and "timeout", and use variables instead.
f19dbdb7 9284
4e93851c 9285 * normal/menu.c: Include grub/env.h.
9286 (print_entry): Cast TITLE to silence gcc.
9287 (get_timeout): New function.
9288 (set_timeout): Likewise.
9289 (get_entry_number): Likewise.
9290 (run_menu): Use a default entry, a fallback entry and a timeout
9291 in the environment variables "default", "fallback" and
9292 "timeout". Also, tweak the default entry if it is not within the
9293 current menu entries.
9294 (grub_menu_run): Use a fallback entry in the environment variable
9295 "fallback".
9296
9297 * normal/main.c (read_config_file): Do not initialize
9298 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
9299 NEWMENU->TIMEOUT.
9300 (grub_normal_execute): Use a data slot to store the menu.
9301
9302 * include/grub/normal.h (struct grub_menu): Removed default_entry,
9303 fallback_entry and timeout.
9304 (struct grub_menu_list): Removed.
9305 (grub_menu_list_t): Likewise.
9306 (struct grub_context): Likewise.
9307 (grub_context_t): Likewise.
9308 (grub_context_get): Likewise.
9309 (grub_context_get_current_menu): Likewise.
9310 (grub_context_push_menu): Likewise.
9311 (grub_context_pop_menu): Likewise.
9312 (grub_default_init): Likewise.
9313 (grub_default_fini): Likewise.
9314 (grub_timeout_init): Likewise.
9315 (grub_timeout_fini): Likewise.
9316
9317 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
9318 and timeout.mod.
9319 (normal_mod_SOURCES): Removed normal/context.c.
9320
9321 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
9322 commands/default.c, commands/timeout.c and normal/context.c.
9323 (normal_mod_SOURCES): Removed normal/context.c.
9324
9325 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
9326 commands/timeout.c and normal/context.c.
9327 (normal_mod_SOURCES): Removed normal/context.c.
9328
9329 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
9330 commands/default.c, commands/timeout.c and normal/context.c.
9331 (normal_mod_SOURCES): Removed normal/context.c.
9332
9333 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
9334 timeout.mod.
9335 (default_mod_SOURCES): Removed.
9336 (default_mod_CFLAGS): Likewise.
9337 (default_mod_LDFLAGS): Likewise.
9338 (timeout_mod_SOURCES): Removed.
9339 (timeout_mod_CFLAGS): Likewise.
9340 (timeout_mod_LDFLAGS): Likewise.
9341
9342 * DISTLIST: Removed commands/default.c, commands/timeout.c and
9343 normal/context.c.
9344
9345 * commands/default.c: Removed.
9346 * commands/timeout.c: Likewise.
9347 * normal/context.c: Likewise.
9348
1eb9cc1d 93492006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
9350
9351 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
9352
385bd9c1 93532006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
9354
9355 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
9356 "next" to "prev" for readability.
9357 (struct grub_env_sorted_var): New struct.
9358 (grub_env_context): Renamed to ...
9359 (initial_context): ... this.
9360 (grub_env_var_context): Renamed to ...
9361 (current_context): ... this.
9362 (grub_env_find): Look only at CURRENT_CONTEXT.
9363 (grub_env_context_open): Rewritten to copy exported variables from
9364 previous context.
9365 (grub_env_context_close): Rewritten according to the new
9366 scheme. Also, add an assertion to prevent the initial context from
9367 removed.
9368 (grub_env_insert): Removed the code for the sorted list.
9369 (grub_env_remove): Likewise.
9370 (grub_env_export): Simply mark the variable with
9371 GRUB_ENV_VAR_GLOBAL.
9372 (grub_env_set): A cosmetic change for naming consistency.
9373 (grub_env_get): Likewise.
9374 (grub_env_unset): Likewise.
9375 (grub_env_iterate): Rewritten to sort variables within this
9376 function.
9377 (grub_register_variable_hook): Fixed for naming consistency. Call
9378 grub_env_find again, only if NAME is not found at the first time.
9379 (mangle_data_slot_name): New function.
9380 (grub_env_set_data_slot): Likewise.
9381 (grub_env_get_data_slot): Likewise.
9382 (grub_env_unset_data_slot): Likewise.
9383
9384 * include/grub/env.h (grub_env_var_type): New enum.
9385 (GRUB_ENV_VAR_LOCAL): New constant.
9386 (GRUB_ENV_VAR_GLOBAL): Likewise.
9387 (GRUB_ENV_VAR_DATA): Likewise.
9388 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
9389 "type".
9390 (grub_env_set): Replace VAR with NAME for consistency.
9391 (grub_register_variable_hook): Likewise.
9392 (grub_env_export): Specify the name of the argument.
9393 (grub_env_set_data_slot): New prototype.
9394 (grub_env_get_data_slot): Likewise.
9395 (grub_env_unset_data_slot): Likewise.
9396
7f362539 93972006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
9398
9399 Extend the loader so that GRUB can accept a loader which comes
9400 back to GRUB when a loaded image exits. Also, this change adds
9401 support for a chainloader on EFI.
f19dbdb7 9402
7f362539 9403 * term/efi/console.c: Include grub/misc.h.
9404 (grub_console_checkkey): Display a scan code on the top for
9405 debugging. This will be removed once the EFI port gets stable.
9406 Correct the scan code mapping.
9407
9408 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
9409 allocate memory from larger regions, in order to reduce the number
9410 of allocated regions. Otherwise, the MacOSX loader panics.
9411 (filter_memory_map): Avoid less than 1MB for compatibility with
9412 other loaders.
9413 (add_memory_regions): Allocate from the tail of a region, if
9414 possible, to avoid allocating a region near to 1MB, for the MacOSX
9415 loader.
9416
9417 * kern/efi/init.c (grub_efi_set_prefix): Specify
9418 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
9419
9420 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
9421 argument IMAGE_HANDLE and specify it to get a loaded image.
9422 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
9423 grub_efi_get_loaded_image.
fe6b695a 9424 (grub_efi_get_filename): Divide the length by the size of
7f362539 9425 grub_efi_char16_t.
9426 (grub_efi_get_device_path): New function.
9427 (grub_efi_print_device_path): Print End Device Path nodes. Divide
9428 the length by the size of grub_efi_char16_t for a file path device
9429 path node.
9430
9431 * kern/loader.c (grub_loader_noreturn): New variable.
9432 (grub_loader_set): Accept a new argument NORETURN. Set
9433 GRUB_LOADER_NORETURN to NORETURN.
9434 All callers changed.
9435 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
9436 grub_machine_fini.
9437
9438 * include/grub/efi/efi.h (grub_efi_get_device_path): New
9439 prototype.
9440 (grub_efi_get_loaded_image): Take an argument to specify an image
9441 handle.
9442
9443 * include/grub/loader.h (grub_loader_set): Added one more argument
9444 NORETURN.
9445
9446 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
9447 instead of grub_efi_open_protocol.
9448 (grub_efidisk_get_device_name): Likewise.
9449 (grub_efidisk_close): Print a newline.
9450 (grub_efidisk_get_device_handle): Fixed to use
9451 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
9452 GRUB_EFI_DEVICE_PATH_TYPE.
9453
9454 * disk/efi/efidisk.c (device_path_guid): Moved to ...
9455 * kern/efi/efi.c (device_path_guid): ... here.
9456
9457 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
9458 chain.mod.
9459 (kernel_mod_HEADERS): Added efi/disk.h.
9460 (_chain_mod_SOURCES): New variable.
9461 (_chain_mod_CFLAGS): Likewise.
9462 (_chain_mod_LDFLAGS): Likewise.
9463 (chain_mod_SOURCES): Likewise.
9464 (chain_mod_CFLAGS): Likewise.
9465 (chain_mod_LDFLAGS): Likewise.
9466
9467 * DISTLIST: Added include/grub/efi/chainloader.h,
9468 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
9469
9470 * include/grub/efi/chainloader.h: New file.
9471 * loader/efi/chainloader.c: Likewise.
9472 * loader/efi/chainloader_normal.c: Likewise.
9473
c0111d6e 94742006-04-30 Marco Gerards <marco@gnu.org>
9475
9476 * commands/configfile.c (grub_cmd_source): New function.
9477 (GRUB_MOD_INIT): Register the commands `source' and `.'.
9478 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
9479
df5341da 94802006-04-30 Marco Gerards <marco@gnu.org>
9481
9482 * normal/execute.c (grub_script_execute_cmd): Change the return
9483 type to `grub_err_t'. Correctly return the error.
9484 (grub_script_execute_cmdline): In case a command line is not a
9485 command or a function, try to interpret it as an assignment.
9486
f85934bd 94872006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
9488
9489 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
9490 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
9491 skip a node whose name is obviously invalid as UTF-16,
9492 i.e. contains a NUL character. Stop the iteration when the last
9493 directory entry is found. Instead of using the return value of
9494 grub_hfsplus_btree_iterate_node, store the value in RET and use
9495 it, because the iterator can be stopped by the last directory
9496 entry.
9497
8f8a2cf8 94982006-04-30 Marco Gerards <marco@gnu.org>
9499
9500 * include/grub/env.h (grub_env_export): New prototype. Reported
9501 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
9502
a27e84ce 95032006-04-30 Marco Gerards <marco@gnu.org>
9504
9505 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
9506 size of the extents in a catalog file record.
9507
eaef0553 95082006-04-29 Marco Gerards <marco@gnu.org>
9509
9510 * commands/configfile.c (grub_cmd_configfile): Execute the
9511 configfile within its own context.
9512
9513 * include/grub/env.h (grub_env_context_open): New prototype.
9514 (grub_env_context_close): Likewise.
9515
9516 * kern/env.c (grub_env): Removed.
9517 (grub_env_sorted): Likewise.
9518 (grub_env_context): New variable.
9519 (grub_env_var_context): Likewise.
9520 (grub_env_find): Search both the active context and the global
9521 context.
9522 (grub_env_context_open): New function.
9523 (grub_env_context_close): Likewise.
9524 (grub_env_insert): Likewise.
9525 (grub_env_remove): Likewise.
9526 (grub_env_export): Likewise.
9527 (grub_env_set): Changed to use helper functions to avoid code
9528 duplication.
9529 (grub_env_iterate): Rewritten so both the current context and the
9530 global context are being used.
9531
9532 * normal/command.c (export_command): New function.
9533 (grub_command_init): Register the `export' function.
9534
7b455f4d 95352006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
9536
9537 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
9538 explicitly to suppress gcc's warnings.
9539 * fs/fat.c (grub_fat_find_dir): Likewise.
9540 (grub_fat_label): Likewise.
9541 * fs/xfs.c (grub_xfs_read_inode): Likewise.
9542 (grub_xfs_mount): Likewise.
9543 (grub_xfs_label): Likewise.
9544 * fs/affs.c (grub_affs_mount): Likewise.
9545 (grub_affs_label): Likewise.
9546 (grub_affs_iterate_dir): Likewise.
9547 * fs/sfs.c (grub_sfs_mount): Likewise.
9548 (grub_sfs_iterate_dir): Likewise.
9549 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
9550 * fs/hfs.c (grub_hfs_mount): Likewise.
9551 (grub_hfs_cmp_catkeys): Likewise.
9552 (grub_hfs_find_dir): Likewise.
9553 (grub_hfs_dir): Likewise.
9554 (grub_hfs_label): Likewise.
9555 * fs/jfs.c (grub_jfs_mount): Likewise.
9556 (grub_jfs_opendir): Likewise.
9557 (grub_jfs_getent): Likewise.
9558 (grub_jfs_lookup_symlink): Likewise.
9559 (grub_jfs_label): Likewise.
9560 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
9561 (grub_hfsplus_iterate_dir): Likewise.
9562 (grub_hfsplus_btree_iterate_node): Made static.
9563
9564 * util/grub-emu.c (prefix): New variable.
9565 (grub_machine_set_prefix): New function.
9566 (main): Do not set the environment variable "prefix" here. Only
9567 set PREFIX, which is used later by grub_machine_set_prefix.
9568
9569 * include/grub/video.h: Do not include grub/symbol.h.
9570 (grub_video_register): Not exported. This symbol is not defined in
9571 the kernel.
9572 (grub_video_unregister): Likewise.
9573 (grub_video_iterate): Likewise.
9574 (grub_video_setup): Likewise.
9575 (grub_video_restore): Likewise.
9576 (grub_video_get_info): Likewise.
9577 (grub_video_get_blit_format): Likewise.
9578 (grub_video_set_palette): Likewise.
9579 (grub_video_get_palette): Likewise.
9580 (grub_video_set_viewport): Likewise.
9581 (grub_video_get_viewport): Likewise.
9582 (grub_video_map_color): Likewise.
9583 (grub_video_map_rgb): Likewise.
9584 (grub_video_map_rgba): Likewise.
9585 (grub_video_fill_rect): Likewise.
9586 (grub_video_blit_glyph): Likewise.
9587 (grub_video_blit_bitmap): Likewise.
9588 (grub_video_blit_render_target): Likewise.
9589 (grub_video_scroll): Likewise.
9590 (grub_video_swap_buffers): Likewise.
9591 (grub_video_create_render_target): Likewise.
9592 (grub_video_delete_render_target): Likewise.
9593 (grub_video_set_active_render_target): Likewise.
9594
9595 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
9596 Undefined.
9597 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
9598
9599 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
9600 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9601 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9602 instead of $(srcdir)/genkernsyms.sh.
9603
9604 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
9605 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9606 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9607 instead of $(srcdir)/genkernsyms.sh.
9608
9609 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
9610 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9611 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9612 instead of $(srcdir)/genkernsyms.sh.
9613
9614 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
9615 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9616 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9617 instead of $(srcdir)/genkernsyms.sh.
9618
9619 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
9620 genkernsyms.sh.
9621
9622 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
9623 genkernsyms.sh.
9624 (gensymlist.sh): New target.
9625 (genkernsyms.sh): Likewise.
9626
9627 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
9628 genkernsyms.sh.in and gensymlist.sh.in.
9629
9630 * genkernsyms.sh: Removed.
9631 * gensymlist.sh: Likewise.
f19dbdb7 9632
7b455f4d 9633 * genkernsyms.sh.in: New file.
9634 * gensymlist.sh.in: Likewise.
9635
1885bb27 96362006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9637
9638 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
9639 clobber "prefix", since we may have already set it manually.
9640
71538dff 96412006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9642
9643 * kern/misc.c (abort): New alias for grub_abort.
9644
2965c7cc 96452006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
9646
9647 A new machine-specific function "grub_machine_set_prefix" is
9648 defined. This is called after loading modules, so that a prefix
9649 initialization can use modules. Also, this change adds an
9650 intensive debugging feature for the memory manager via the
9651 configure option "--enable-mm-debug".
f19dbdb7 9652
2965c7cc 9653 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
9654 PART.LEN.
9655
9656 * kern/sparc64/ieee1275/init.c (abort): Removed.
9657 (grub_stop): Likewise.
9658 (grub_exit): New function.
9659 (grub_set_prefix): Renamed to ...
9660 (grub_machine_set_prefix): ... this.
9661 (grub_machine_init): Do not call grub_set_prefix.
9662
9663 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
9664 (grub_machine_set_prefix): ... this.
9665 (grub_machine_init): Do not call grub_set_prefix.
9666
9667 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
9668 (grub_machine_init): Do not set the prefix here.
9669
9670 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
9671
9672 * kern/efi/init.c: Include grub/mm.h.
9673 (grub_efi_set_prefix): New function.
9674
9675 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
9676 (grub_efi_get_filename): New function.
9677 (grub_print_device_path): Renamed to ...
9678 (grub_efi_print_device_path): ... this.
9679
9680 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
9681 [MM_DEBUG] (grub_realloc): Likewise.
9682 [MM_DEBUG] (grub_free): Likewise.
9683 [MM_DEBUG] (grub_memalign): Likewise.
9684 [MM_DEBUG] (grub_mm_debug): New variable.
9685 [MM_DEBUG] (grub_debug_malloc): New function.
9686 [MM_DEBUG] (grub_debug_free): New function.
9687 [MM_DEBUG] (grub_debug_realloc): New function.
9688 [MM_DEBUG] (grub_debug_memalign): New function.
9689
9690 * kern/misc.c (grub_abort): Print a newline to distinguish
9691 the message.
9692
9693 * kern/main.c (grub_main): Call grub_machine_set_prefix and
9694 grub_set_root_dev after loading modules. This is necessary when
9695 setting a prefix depends on modules.
9696
9697 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
9698 (grub_efi_print_device_path): ... this.
9699 (grub_efi_get_filename): New prototype.
9700 (grub_efi_set_prefix): Likewise.
9701
9702 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
9703 and grub/disk.h.
9704 (grub_efidisk_get_device_handle): New prototype.
9705 (grub_efidisk_get_device_name): Likewise.
9706
9707 * include/grub/mm.h: Include config.h.
9708 (MM_DEBUG): Removed.
9709 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
9710 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
9711 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
9712 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
9713 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
9714 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
9715 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
9716 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
9717 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
9718
9719 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
9720
9721 * disk/efi/efidisk.c: Include grub/partition.h.
9722 (iterate_child_devices): New function.
9723 (add_device): First, compare only last device path nodes, so that
9724 devices are sorted by the types.
9725 (grub_efidisk_get_device_handle): New function.
9726 (grub_efidisk_get_device_name): Likewise.
9727
9728 * configure.ac (--enable-mm-debug): New option to enable the
9729 memory manager debugging feature. This makes the binary much
9730 bigger, so is disabled by default.
9731
9cacaa17 97322006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
9733
9734 Use grub_abort instead of grub_stop, and grub_exit must be
9735 define in each architecture now. Also, this change adds support
9736 for EFI disks.
f19dbdb7 9737
9cacaa17 9738 * util/i386/pc/grub-probefs.c: Include grub/term.h.
9739 (grub_getkey): New function.
9740 (grub_term_get_current): Likewise.
9741
9742 * util/i386/pc/grub-setup.c: Include grub/term.h.
9743 (grub_getkey): New function.
9744 (grub_term_get_current): Likewise.
9745
9746 * util/misc.c (grub_stop): Renamed to ...
9747 (grub_exit): ... this.
9748
9749 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
9750 (grub_exit): ... this.
9751 (grub_machine_init): Use grub_abort instead of abort.
9752 (grub_stop): Removed.
9753
9754 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
9755 abort.
9756
9757 * kern/i386/pc/startup.S (grub_exit): New function.
9758 (cold_reboot): New label.
9759
9760 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
9761 (grub_efi_init): Call grub_efidisk_init.
9762 (grub_efi_fini): Call grub_efidisk_fini.
9763
9764 * kern/efi/efi.c: Include grub/mm.h.
9765 (grub_efi_console_control_guid): Renamed to ...
9766 (console_control_guid): ... this.
9767 (grub_efi_loaded_image_guid): Renamed to ...
9768 (loaded_image_guid): ... this.
9769 (grub_efi_locate_handle): New function.
9770 (grub_efi_open_protocol): Likewise.
9771 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
9772 GRUB_EFI_CONSOLE_CONTROL_GUID.
9773 (grub_efi_exit): Removed.
9774 (grub_stop): Likewise.
9775 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
9776 (grub_exit): New function.
9777 (grub_print_device_path): Likewise.
9778
9779 * kern/rescue.c (grub_rescue_cmd_exit): New function.
9780 (grub_enter_rescue_mode): Register "exit".
9781
9782 * kern/misc.c (grub_real_dprintf): A cosmetic change.
9783 (grub_abort): New function.
9784
9785 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
9786
9787 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
9788
9789 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
9790
9791 * include/grub/efi/efi.h (grub_efi_exit): Removed.
9792 (grub_print_device_path): New prototype.
9793 (grub_efi_locate_handle): Likewise.
9794 (grub_efi_open_protocol): Likewise.
9795
9796 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
9797 * disk/efi/efidisk.c: Likewise.
9798
9799 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
9800
9801 * include/grub/efi/console_control.h
9802 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
9803
9804 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
9805 last 8 bytes as an array.
9806 (GRUB_EFI_DISK_IO_GUID): New macro.
9807 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
9808 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
9809 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
9810 grub_uint8_t.
9811 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
9812 (struct grub_efi_device_path): Rename the member "sub_type" to
9813 "subtype".
9814 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
9815 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
9816 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
9817 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9818 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9819 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9820 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9821 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9822 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9823 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9824 (struct grub_efi_pci_device_path): New structure.
9825 (grub_efi_pci_device_path_t): New type.
9826 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9827 (struct grub_efi_pccard_device_path): New structure.
9828 (grub_efi_pccard_device_path_t): New type.
9829 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9830 (struct grub_efi_memory_mapped_device_path): New structure.
9831 (grub_efi_memory_mapped_device_path_t): New type.
9832 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9833 (struct grub_efi_vendor_device_path): New structure.
9834 (grub_efi_vendor_device_path_t): New type.
9835 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9836 (struct grub_efi_controller_device_path): New structure.
9837 (grub_efi_controller_device_path_t): New type.
9838 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9839 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9840 (struct grub_efi_acpi_device_path): New structure.
9841 (grub_efi_acpi_device_path_t): New type.
9842 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9843 (struct grub_efi_expanded_acpi_device_path): New structure.
9844 (grub_efi_expanded_acpi_device_path_t): New type.
9845 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9846 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9847 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9848 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9849 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9850 (struct grub_efi_atapi_device_path): New structure.
9851 (grub_efi_atapi_device_path_t): New type.
9852 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9853 (struct grub_efi_fibre_channel_device_path): New structure.
9854 (grub_efi_fibre_channel_device_path_t): New type.
9855 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9856 (struct grub_efi_1394_device_path): New structure.
9857 (grub_efi_1394_device_path_t): New type.
9858 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9859 (struct grub_efi_usb_device_path): New structure.
9860 (grub_efi_usb_device_path_t): New type.
9861 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9862 (struct grub_efi_usb_class_device_path): New structure.
9863 (grub_efi_usb_class_device_path_t): New type.
9864 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9865 (struct grub_efi_i2o_device_path): New structure.
9866 (grub_efi_i2o_device_path_t): New type.
9867 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9868 (struct grub_efi_mac_address_device_path): New structure.
9869 (grub_efi_mac_address_device_path_t): New type.
9870 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9871 (struct grub_efi_ipv4_device_path): New structure.
9872 (grub_efi_ipv4_device_path_t): New type.
9873 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9874 (struct grub_efi_ipv6_device_path): New structure.
9875 (grub_efi_ipv6_device_path_t): New type.
9876 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9877 (struct grub_efi_infiniband_device_path): New structure.
9878 (grub_efi_infiniband_device_path_t): New type.
9879 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9880 (struct grub_efi_uart_device_path): New structure.
9881 (grub_efi_uart_device_path_t): New type.
9882 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9883 (struct grub_efi_vendor_messaging_device_path): New structure.
9884 (grub_efi_vendor_messaging_device_path_t): New type.
9885 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9886 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9887 (struct grub_efi_hard_drive_device_path): New structure.
9888 (grub_efi_hard_drive_device_path_t): New type.
9889 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9890 (struct grub_efi_cdrom_device_path): New structure.
9891 (grub_efi_cdrom_device_path_t): New type.
9892 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9893 (struct grub_efi_vendor_media_device_path): New structure.
9894 (grub_efi_vendor_media_device_path_t): New type.
9895 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9896 (struct grub_efi_file_path_device_path): New structure.
9897 (grub_efi_file_path_device_path_t): New type.
9898 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9899 (struct grub_efi_protocol_device_path): New structure.
9900 (grub_efi_protocol_device_path_t): New type.
9901 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9902 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9903 (struct grub_efi_bios_device_path): New structure.
9904 (grub_efi_bios_device_path_t): New type.
9905 (struct grub_efi_disk_io): New structure.
9906 (grub_efi_disk_io_t): New type.
9907 (struct grub_efi_block_io_media): New structure.
9908 (grub_efi_block_io_media_t): New type.
9909 (struct grub_efi_block_io): New structure.
9910 (grub_efi_block_io_t): New type.
9911
9912 * include/grub/misc.h (grub_stop): Removed.
9913 (grub_exit): New prototype.
9914 (grub_abort): Likewise.
9915
9916 * include/grub/disk.h (enum grub_disk_dev_id): Added
9917 GRUB_DISK_DEVICE_EFIDISK_ID.
9918
9919 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9920 disk/efi/efidisk.c.
9921 (kernel_syms.lst): Remove the target if an error occurs.
9922
49986a9f 99232006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
9924
9925 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9926 as it was simply too buggy.
9927
970d3b8a 99282006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
9929
9930 * kern/misc.c (grub_lltoa): New function.
9931 (grub_vsprintf): Added support for the long long suffix,
9932 i.e. "ll".
9933
ff04ec24 99342006-04-20 Hollis Blanchard <hollis@penguinppc.org>
9935
9936 * Makefile.in (LDFLAGS): Add variable.
9937 (LD): Remove variable.
9938 * configure.ac: Add -m32 to LDFLAGS.
9939 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9940 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9941 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9942 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9943 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9944 variables.
9945 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9946 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9947 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9948
37e5e1a4 99492006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
9950
9951 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9952 length for unknown glyph.
9953
c352d8dd 99542006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9955
2eab1c0d 9956 Add support for pre-loaded modules into the EFI port.
f19dbdb7 9957
2eab1c0d 9958 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9959 completely. Accept one more argument DIR. The caller has changed.
9960
9961 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
9962
9963 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
9964 (grub_efi_loaded_image_guid): New variable.
9965 (grub_efi_get_loaded_image): New function.
9966 (grub_arch_modules_addr): Likewise.
9967
9968 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
9969 prototype.
9970
9971 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
9972 (struct grub_efi_loaded_image): New structure.
9973 (grub_efi_loaded_image_t): New type.
9974
99752006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9976
c352d8dd 9977 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
9978 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
9979 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
9980
6d01d6b4 99812006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
9982
9983 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
9984
976a4ea0 99852006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
9986
9987 * DISTLIST: Added include/grub/efi/console.h,
9988 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
9989 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9990
9991 * include/grub/efi/console.h: New file.
9992 * include/grub/efi/time.h: Likewise.
9993 * include/grub/i386/efi/kernel.h: Likewise.
9994 * kern/efi/init.c: Likewise.
9995 * kern/efi/mm.c: Likewise.
9996 * term/efi/console.c: Likewise.
f19dbdb7 9997
976a4ea0 9998 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
9999 (grub_stop): Removed.
10000 (grub_get_rtc): Likewise.
10001 (grub_machine_init): Simply call grub_efi_init.
10002 (grub_machine_fini): Call grub_efi_fini.
10003
10004 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
10005 (grub_efi_output_string): Removed.
10006 (grub_efi_stall): New function.
10007 (grub_stop): Likewise.
10008 (grub_get_rtc): Likewise.
10009
10010 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
10011 (grub_efi_stall): New prototype.
10012 (grub_efi_allocate_pages): Likewise.
10013 (grub_efi_free_pages): Likewise.
10014 (grub_efi_get_memory_map): Likewise.
10015 (grub_efi_mm_init): Likewise.
10016 (grub_efi_mm_fini): Likewise.
10017 (grub_efi_init): Likewise.
10018 (grub_efi_fini): Likewise.
10019
10020 * include/grub/i386/efi/time.h: Do not include
10021 grub/symbol.h. Include grub/efi/time.h.
10022 (GRUB_TICKS_PER_SECOND): Removed.
10023 (grub_get_rtc): Likewise.
10024
10025 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
10026 Added padding. The EFI spec is buggy.
10027 (GRUB_EFI_BLACK): New macro.
10028 (GRUB_EFI_BLUE): Likewise.
10029 (GRUB_EFI_GREEN): Likewise.
10030 (GRUB_EFI_CYAN): Likewise.
10031 (GRUB_EFI_RED): Likewise.
10032 (GRUB_EFI_MAGENTA): Likewise.
10033 (GRUB_EFI_BROWN): Likewise.
10034 (GRUB_EFI_LIGHTGRAY): Likewise.
10035 (GRUB_EFI_BRIGHT): Likewise.
10036 (GRUB_EFI_DARKGRAY): Likewise.
10037 (GRUB_EFI_LIGHTBLUE): Likewise.
10038 (GRUB_EFI_LIGHTGREEN): Likewise.
10039 (GRUB_EFI_LIGHTCYAN): Likewise.
10040 (GRUB_EFI_LIGHTRED): Likewise.
10041 (GRUB_EFI_LIGHTMAGENTA): Likewise.
10042 (GRUB_EFI_YELLOW): Likewise.
10043 (GRUB_EFI_WHITE): Likewise.
10044 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
10045 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
10046 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
10047 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
10048 (GRUB_EFI_BACKGROUND_RED): Likewise.
10049 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
10050 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
10051 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
10052 (GRUB_EFI_TEXT_ATTR): Likewise.
10053
10054 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
10055 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
10056 (kernel_mod_HEADERS): Added efi/time.h.
10057
83709125 100582006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
10059
10060 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
10061 include/grub/efi/api.h, include/grub/efi/console_control.h,
10062 include/grub/efi/efi.h, include/grub/efi/pe32.h,
10063 include/grub/i386/efi/time.h, kern/efi/efi.c,
10064 kern/i386/efi/init.c, kern/i386/efi/startup.S,
10065 and util/i386/efi/grub-mkimage.c.
10066
10067 * Makefile.in (RMKFILES): Added i386-efi.rmk.
10068
10069 * genmk.rb (PModule#rule): Do not export symbols if
10070 #{prefix}_EXPORTS is set to "no".
10071
10072 * conf/i386-efi.mk: New file.
10073 * conf/i386-efi.rmk: Likewise.
10074 * include/grub/efi/api.h: Likewise.
10075 * include/grub/efi/console_control.h: Likewise.
10076 * include/grub/efi/efi.h: Likewise.
10077 * include/grub/efi/pe32.h: Likewise.
10078 * include/grub/i386/efi/time.h: Likewise.
10079 * kern/efi/efi.c: Likewise.
10080 * kern/i386/efi/init.c: Likewise.
10081 * kern/i386/efi/startup.S: Likewise.
10082 * util/i386/efi/grub-mkimage.c: Likewise.
10083
100842006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 10085
10086 * include/grub/script.h: Include <grub/parser.h> and
10087 "grub_script.tab.h".
10088 (struct grub_lexer_param): New struct.
10089 (struct grub_parser_param): Likewise.
10090 (grub_script_create_arglist): Pass the state in an argument.
10091 (grub_script_add_arglist): Likewise.
10092 (grub_script_create_cmdline): Likewise.
10093 (grub_script_create_cmdblock): Likewise.
10094 (grub_script_create_cmdif): Likewise.
10095 (grub_script_create_cmdmenu): Likewise.
10096 (grub_script_add_cmd): Likewise.
10097 (grub_script_arg_add): Likewise.
10098 (grub_script_lexer_ref): Likewise.
10099 (grub_script_lexer_deref): Likewise.
10100 (grub_script_lexer_record_start): Likewise.
10101 (grub_script_lexer_record_stop): Likewise.
10102 (grub_script_mem_record): Likewise.
10103 (grub_script_mem_record_stop): Likewise.
10104 (grub_script_malloc): Likewise.
10105 (grub_script_yylex): Likewise.
10106 (grub_script_yyparse): Likewise.
10107 (grub_script_yyerror): Likewise.
10108 (grub_script_yylex): Likewise.
10109 (grub_script_lexer_init): Return the state.
10110
10111 * normal/lexer.c (grub_script_lexer_state): Removed variable.
10112 (grub_script_lexer_done): Likewise.
10113 (grub_script_lexer_getline): Likewise.
10114 (grub_script_lexer_refs): Likewise.
10115 (script): Likewise.
10116 (newscript): Likewise.
10117 (record): Likewise.
10118 (recording): Likewise.
10119 (recordpos): Likewise.
10120 (recordlen): Likewise.
10121 (grub_script_lexer_init): Return the state instead of setting
10122 global variables.
10123 (grub_script_lexer_ref): Use the newly added argument for state
10124 instead of globals.
10125 (grub_script_lexer_deref): Likewise.
10126 (grub_script_lexer_record_start): Likewise.
10127 (grub_script_lexer_record_stop): Likewise.
10128 (recordchar): Likewise.
10129 (nextchar): Likewise.
10130 (grub_script_yylex2): Likewise.
10131 (grub_script_yylex): Likewise.
10132 (grub_script_yyerror): Likewise.
10133
10134 * normal/parser.y (func_mem): Removed variable.
10135 (menu_entry): Likewise.
10136 (err): Likewise.
10137 (%lex-param): New parser option.
10138 (%parse-param): Likewise.
10139 (script): Always return the AST.
10140 (argument): Pass the state around.
10141 (arguments): Likewise.
10142 (grubcmd): Likewise.
10143 (commands): Likewise.
10144 (function): Likewise.
10145 (menuentry): Likewise.
10146 (if_statement): Likewise.
10147 (if): Likewise.
10148
10149 * normal/script.c (grub_script_memused): Removed variable.
10150 (grub_script_parsed): Likewise.
10151 (grub_script_malloc): Added a state argument. Use that instead of
10152 global variables.
10153 (grub_script_mem_record): Likewise.
10154 (grub_script_mem_record_stop): Likewise.
10155 (grub_script_arg_add): Likewise.
10156 (grub_script_add_arglist): Likewise.
10157 (grub_script_create_cmdline): Likewise.
10158 (grub_script_create_cmdif): Likewise.
10159 (grub_script_create_cmdmenu): Likewise.
10160 (grub_script_add_cmd): Likewise.
10161 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 10162
e2a8c904 101632006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 10164
10165 * normal/command.c (grub_command_init): Remove the title command.
10166
10167 * normal/lexer.c (grub_script_yylex): Renamed from this...
10168 (grub_script_yylex2): ... to this.
10169 (grub_script_yylex): New function. Temporary
10170 introduced to filter some tokens.
10171 (grub_script_yyerror): Print a newline.
10172
10173 * normal/main.c (read_config_file): Output information about the
10174 lines that contain errors. Wait for a key after all lines have
10175 been processed. Don't return an empty menu.
10176
10177 * normal/parser.y (func_mem): Don't initialize.
10178 (menu_entry): Likewise.
10179 (err): New variable.
10180 (script): Don't return anything when an error was encountered.
10181 (ws, returns): Removed rules.
10182 (argument): Disabled concatenated variable support.
10183 (arguments): Remove explicit separators.
10184 (grubcmd): Likewise.
10185 (function): Likewise.
10186 (menuentry): Likewise.
10187 (if): Likewise.
10188 (commands): Likewise. Add error handling.
10189
10190 * normal/script.c (grub_script_create_cmdline): If
10191 `grub_script_parsed' is 0, assume the parser encountered an error.
10192
c9a86192 101932006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
10194
10195 * configure.ac: Add support for EFI. Fix the typo
10196 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
10197
70f3b243 101982006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10199
10200 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
10201 foreign multibyte characters should be shown correctly.
10202
65f201ad 102032006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10204
10205 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
10206 calculation.
10207 (read_config_file): Made it to close file before returning.
10208
b4b93674 102092006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
10210
10211 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
10212 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
10213 video/i386/pc/vbefill.c.
10214
10215 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
10216 video/i386/pc/vbefill.c.
10217
10218 * include/grub/video.h (grub_video_blit_format): New enum.
10219 (grub_video_mode_info): Added new member blit_format.
10220 (grub_video_get_blit_format): New function prototype.
10221
10222 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
10223 function prototype.
10224 (grub_video_vbe_map_rgb): Likewise.
10225 (grub_video_vbe_unmap_color): Likewise.
10226
10227 * include/grub/i386/pc/vbeblit.h: New file.
10228
10229 * include/grub/i386/pc/vbefill.h: New file.
10230
10231 * video/video.c (grub_video_get_blit_format): New function.
10232 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
10233 (grub_video_vbe_map_rgb): Likewise.
10234 (grub_video_vbe_unmap_color): Likewise.
10235
10236 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
10237 optimized fills.
10238 (grub_video_vbe_blit_render_target): Changed to use more optimized
10239 blits.
10240 (grub_video_vbe_setup): Added detection for optimized settings.
10241 (grub_video_vbe_create_render_target): Likewise.
10242
10243 * video/i386/pc/vbeblit.c: New file.
10244
10245 * video/i386/pc/vbefill.c: New file.
10246
c2379b9c 102472006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
10248
10249 * font/manager.c (grub_font_get_glyph): Removed font fixup from
10250 here...
10251
10252 * util/unifont2pff.rb: ... and moved it to here. Improved argument
10253 parsing to support both hex and dec ranges. If filename was missing
10254 show usage information.
10255
bd0d7896 102562006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
10257
10258 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
10259 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
10260
10261 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
10262 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
10263 (video_mod_SOURCES): Added.
10264 (video_mod_CFLAGS): Likewise.
10265 (video_mod_LDFLAGS): Likewise.
10266 (gfxterm_mod_SOURCES): Likewise.
10267 (gfxterm_mod_CFLAGS): Likewise.
10268 (gfxterm_mod_LDFLAGS): Likewise.
10269 (videotest_mod_SOURCES): Likewise.
10270 (videotest_mod_CFLAGS): Likewise.
10271 (videotest_mod_LDFLAGS): Likewise.
10272 (vesafb_mod_SOURCES): Removed.
10273 (vesafb_mod_CFLAGS): Likewise.
10274 (vesafb_mod_LDFLAGS): Likewise.
10275 (vga_mod_SOURCES): Likewise.
10276 (vga_mod_CFLAGS): Likewise.
10277 (vga_mod_LDFLAGS): Likewise.
10278
10279 * commands/videotest.c: New file.
10280
10281 * font/manager.c (fill_with_default_glyph): Modified to use
10282 grub_font_glyph.
10283 (grub_font_get_glyph): Likewise.
10284 (fontmanager): Renamed from this...
10285 (font_manager): ... to this.
10286
10287 * include/grub/font.h (grub_font_glyph): Added new structure.
10288 (grub_font_get_glyph): Modified to use grub_font_glyph.
10289
10290 * include/grub/misc.h (grub_abs): Added as inline function.
10291
10292 * include/grub/video.h: New file.
10293
10294 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
10295 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
10296 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
10297 (grub_vbe_get_controller_info): Renamed from this...
10298 (grub_vbe_bios_get_controller_info): ... to this.
10299 (grub_vbe_get_mode_info): Renamed from this...
10300 (grub_vbe_bios_get_mode_info): ... to this.
10301 (grub_vbe_set_mode): Renamed from this...
10302 (grub_vbe_bios_set_mode): ... to this.
10303 (grub_vbe_get_mode): Renamed from this...
10304 (grub_vbe_bios_get_mode): ... to this.
10305 (grub_vbe_set_memory_window): Renamed from this...
10306 (grub_vbe_bios_set_memory_window): ... to this.
10307 (grub_vbe_get_memory_window): Renamed from this...
10308 (grub_vbe_bios_get_memory_window): ... to this.
10309 (grub_vbe_set_scanline_length): Renamed from this...
10310 (grub_vbe_set_scanline_length): ... to this.
10311 (grub_vbe_get_scanline_length): Renamed from this...
10312 (grub_vbe_bios_get_scanline_length): ... to this.
10313 (grub_vbe_set_display_start): Renamed from this...
10314 (grub_vbe_bios_set_display_start): ... to this.
10315 (grub_vbe_get_display_start): Renamed from this...
10316 (grub_vbe_bios_get_display_start): ... to this.
10317 (grub_vbe_set_palette_data): Renamed from this...
10318 (grub_vbe_bios_set_palette_data): ... to this.
10319 (grub_vbe_set_pixel_rgb): Removed.
10320 (grub_vbe_set_pixel_index): Likewise.
10321
10322 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
10323 from this...
10324 (grub_vbe_bios_get_controller_info): ... to this.
10325 (grub_vbe_get_mode_info): Renamed from this...
10326 (grub_vbe_bios_get_mode_info): ... to this.
10327 (grub_vbe_set_mode): Renamed from this...
10328 (grub_vbe_bios_set_mode): ... to this.
10329 (grub_vbe_get_mode): Renamed from this...
10330 (grub_vbe_bios_get_mode): ... to this.
10331 (grub_vbe_set_memory_window): Renamed from this...
10332 (grub_vbe_bios_set_memory_window): ... to this.
10333 (grub_vbe_get_memory_window): Renamed from this...
10334 (grub_vbe_bios_get_memory_window): ... to this.
10335 (grub_vbe_set_scanline_length): Renamed from this...
10336 (grub_vbe_set_scanline_length): ... to this.
10337 (grub_vbe_get_scanline_length): Renamed from this...
10338 (grub_vbe_bios_get_scanline_length): ... to this.
10339 (grub_vbe_set_display_start): Renamed from this...
10340 (grub_vbe_bios_set_display_start): ... to this.
10341 (grub_vbe_get_display_start): Renamed from this...
10342 (grub_vbe_bios_get_display_start): ... to this.
10343 (grub_vbe_set_palette_data): Renamed from this...
10344 (grub_vbe_bios_set_palette_data): ... to this.
10345 (grub_vbe_bios_get_controller_info): Fixed problem with registers
10346 getting corrupted after calling it. Added more pushes and pops.
10347 (grub_vbe_bios_set_mode): Likewise.
10348 (grub_vbe_bios_get_mode): Likewise.
10349 (grub_vbe_bios_get_memory_window): Likewise.
10350 (grub_vbe_bios_set_scanline_length): Likewise.
10351 (grub_vbe_bios_get_scanline_length): Likewise.
10352 (grub_vbe_bios_get_display_start): Likewise.
10353 (grub_vbe_bios_set_palette_data): Likewise.
10354
10355 * normal/cmdline.c (cl_set_pos): Refresh the screen.
10356 (cl_insert): Likewise.
10357 (cl_delete): Likewise.
10358
10359 * term/gfxterm.c: New file.
10360
10361 * term/i386/pc/vesafb.c: Removed file.
10362
10363 * video/video.c: New file.
10364
10365 * video/i386/pc/vbe.c (real2pm): Added new function.
10366 (grub_video_vbe_draw_pixel): Likewise.
10367 (grub_video_vbe_get_video_ptr): Likewise.
10368 (grub_video_vbe_get_pixel): Likewise
10369 (grub_video_vbe_init): Likewise.
10370 (grub_video_vbe_fini): Likewise.
10371 (grub_video_vbe_setup): Likewise.
10372 (grub_video_vbe_get_info): Likewise.
10373 (grub_video_vbe_set_palette): Likewise.
10374 (grub_video_vbe_get_palette): Likewise.
10375 (grub_video_vbe_set_viewport): Likewise.
10376 (grub_video_vbe_get_viewport): Likewise.
10377 (grub_video_vbe_map_color): Likewise.
10378 (grub_video_vbe_map_rgb): Likewise.
10379 (grub_video_vbe_map_rgba): Likewise.
10380 (grub_video_vbe_unmap_color): Likewise.
10381 (grub_video_vbe_fill_rect): Likewise.
10382 (grub_video_vbe_blit_glyph): Likewise.
10383 (grub_video_vbe_blit_bitmap): Likewise.
10384 (grub_video_vbe_blit_render_target): Likewise.
10385 (grub_video_vbe_scroll): Likewise.
10386 (grub_video_vbe_swap_buffers): Likewise.
10387 (grub_video_vbe_create_render_target): Likewise.
10388 (grub_video_vbe_delete_render_target): Likewise.
10389 (grub_video_vbe_set_active_render_target): Likewise.
10390 (grub_vbe_set_pixel_rgb): Remove function.
10391 (grub_vbe_set_pixel_index): Likewise.
10392 (index_color_mode): Remove static variable.
10393 (active_mode): Likewise.
10394 (framebuffer): Likewise.
10395 (bytes_per_scan_line): Likewise.
10396 (grub_video_vbe_adapter): Added new static variable.
10397 (framebuffer): Likewise.
10398 (render_target): Likewise.
10399 (initial_mode): Likewise.
10400 (mode_in_use): Likewise.
10401 (mode_list): Likewise.
10402
5f97350b 104032006-03-10 Marco Gerards <marco@gnu.org>
10404
10405 * configure.ac (AC_INIT): Bumped to 1.93.
10406
10407 * DISTLIST: Added `include/grub/hfs.h'.
10408
a3c5c6f8 104092006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
10410
10411 * boot/i386/pc/boot.S (general_error): Before looping, try INT
10412 18H, which might help the BIOS falling back to next boot media.
10413
6de53d26 104142006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
10415
10416 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
10417 Poe Chen <poe.poechen@gmail.com>.
10418
77c4a393 104192006-01-17 Marco Gerards <marco@gnu.org>
10420
10421 * include/grub/normal.h: Include <grub/script.h>.
10422 (grub_command_list): Removed struct.
10423 (grub_command_list_t): Removed type.
10424 (grub_menu_entry): Remove members `num' and `command_list'. Add
10425 members `commands' and `sourcecode'.
10426 * include/grub/script.h: Add inclusion guards.
10427 (grub_script_cmd_menuentry): New struct.
10428 (grub_script_execute_menuentry): New prototype.
10429 (grub_script_lexer_record_start): Likewise.
10430 (grub_script_lexer_record_stop): Likewise.
10431 * normal/execute.c (grub_script_execute_menuentry): New function.
10432 * normal/lexer.c (record, recording, recordpos, recordlen): New
10433 variables.
10434 (grub_script_lexer_record_start): New function.
10435 (grub_script_lexer_record_stop): Likewise.
10436 (recordchar): Likewise.
10437 (nextchar): Likewise.
10438 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
10439 2048 as the buffer size. Add the tokens `menuentry' and `@'.
10440 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
10441 (current_menu): New variable.
10442 (free_menu): Mainly rewritten.
10443 (grub_normal_menu_addentry): New function.
10444 (read_config_file): Rewritten.
10445 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 10446 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 10447 the menu entry.
10448 (run): Mainly rewritten.
10449 * normal/parser.y (menu_entry): New variable.
10450 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
10451 (menuentry): New rule.
10452 (command): Add `menuentry'.
10453 (if_statement): Allow additional returns before `fi'.
10454 * normal/script.c (grub_script_create_cmdmenu): New function.
10455
144f1f98 104562006-01-03 Marco Gerards <marco@gnu.org>
10457
10458 * INSTALL: GNU Bison is required.
10459 * configure.ac: Rewritten the test to detect Bison.
10460 * Makefile.in (YACC): New variable. Reported by Xun Sun
10461 <xun.sun.cn@gmail.com>.
10462
af4b2d89 104632006-01-03 Marco Gerards <marco@gnu.org>
10464
10465 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
10466 the HFS+ filesystem to filesystem blocks.
10467 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
10468 GCC warning is silenced.
10469
15643b71 104702006-01-03 Marco Gerards <marco@gnu.org>
10471
10472 * partmap/apple.c (apple_partition_map_iterate): Convert the data
10473 read from disk from big endian to host byte order.
10474
00905879 104752006-01-03 Hollis Blanchard <hollis@penguinppc.org>
10476
10477 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
10478 documentation.
10479 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
10480 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
10481 embedded HFS+ filesystem.
10482 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
10483 (grub_hfs_sblock): Move from here...
10484 * include/grub/hfs.h: To here... New file.
10485 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
10486 documentation.
10487 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
10488 New macros.
10489 (grub_hfsplus_volheader): Change type of member `magic' to
10490 `grub_uint16_t'.
10491 (grub_hfsplus_data): Add new member `embedded_offset'.
10492 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
10493 returned block.
10494 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
10495 Calculate the offset.
10496
8899bc3e 104972005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10498
10499 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
10500 Removed.
10501 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
10502
ae8c0277 105032005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10504
10505 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
10506 ENV->NAME is NULL after allocating ENV->VALUE.
10507
07084456 105082005-12-25 Marco Gerards <marco@gnu.org>
10509
10510 * kern/env.c (grub_env_set): Rewritten the error handling code.
10511
4750f5f1 105122005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10513
10514 * geninit.sh: Made more robust, and more portable.
10515
50214199 105162005-12-25 Marco Gerards <marco@gnu.org>
10517
10518 Add support for Apple HFS+ filesystems.
f19dbdb7 10519
50214199 10520 * fs/hfsplus.c: New file.
10521
10522 * DISTLIST: Added `fs/hfsplus.c'.
10523
10524 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
10525 (hfsplus_mod_SOURCES): New variable.
10526 (hfsplus_mod_CFLAGS): Likewise.
10527 (hfsplus_mod_LDFLAGS): Likewise.
10528 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
10529 (grub_setup_SOURCES): Likewise.
10530 (grub_mkdevicemap_SOURCES): Likewise.
10531 (grub_emu_SOURCES): Likewise.
10532 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10533
10534 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
10535
10536 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
10537
befaed6c 105382005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10539
10540 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
10541 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
10542 include/grub/parser.h, include/grub/script.h, kern/parser.c,
10543 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
10544 normal/lexer.c, normal/parser.y, normal/script.c, and
10545 partmap/gpt.c.
10546 Removed kern/sparc64/cache.c.
10547
10548 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
10549 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
10550 grub_emu_init.c.
10551
10552 * configure.ac (AC_INIT): Bumped to 1.92.
10553
6a124103 105542005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
10555
10556 * kern/err.c (grub_error_push): Added new function to support error
10557 stacks.
10558 (grub_error_pop): Likewise.
10559 (grub_error_stack_items): New local variable to support error stacks.
10560 (grub_error_stack_pos): Likewise.
10561 (grub_error_stack_assert): Likewise.
10562 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
10563 stack depth.
10564 (grub_print_error): Added support to print errors from error stack.
10565
10566 * include/grub/err.h (grub_error_push): Added function prototype.
10567 (grub_error_pop): Likewise.
10568
be973c1b 105692005-12-09 Hollis Blanchard <hollis@penguinppc.org>
10570
10571 * configure.ac: Accept `powerpc64' as host_cpu.
10572 (amd64): Rename to `biarch32'.
10573
10574 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
10575 non-cacheline-aligned addresses.
10576
10577 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
10578 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
10579 if `size' is non-zero.
10580
b04216ab 105812005-12-03 Marco Gerards <mgerards@xs4all.nl>
10582
10583 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
10584 and `cd' to make sure the filename is not prefixed with a
10585 directory name.
10586 (pkgdata_MODULES): Add `gpt.mod'.
10587 (gpt_mod_SOURCES): New variable.
10588 (gpt_mod_CFLAGS): Likewise.
10589 (gpt_mod_LDFLAGS): Likewise.
10590
10591 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
10592
10593 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
10594 New macro.
10595
10596 * partmap/gpt.c: New file.
10597
10598 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
10599 GPT partition map is detected.
10600
41730ed9 106012005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
10602
10603 * commands/i386/pc/play.c: New file.
10604 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
10605 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
10606 macros.
f19dbdb7 10607
95dc3643 106082005-11-27 Marco Gerards <mgerards@xs4all.nl>
10609
10610 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
10611 ((unused))' to silence gcc warning.
10612
1569ec51 106132005-11-26 Hollis Blanchard <hollis@penguinppc.org>
10614
10615 * configure.ac: Correct `AC_PROG_YACC' test.
10616
9abde152 106172005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10618
10619 * util/powerpc/ieee1275/grub-install.in: Run the mount point
10620 check before installing files.
10621
44b83271 106222005-11-22 Mike Small <smallm@panix.com>
10623
10624 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
10625 number regex so multidigit numbers are recognized correctly.
10626
106272005-11-22 Mike Small <smallm@panix.com>
10628
10629 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
10630 debugging message before attempting to claim memory.
10631 (grub_rescue_cmd_initrd): Add a claim debugging message and try
10632 multiple addresses in case of failure.
10633
9c12956b 106342005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10635
10636 * term/tparm.c (get_space): Remove empty `if' statement.
10637
10638 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
10639
10640 * kern/parser.c (check_varstate): Rename `state' to 's'.
10641
aeaf81d9 106422005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10643
10644 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
10645 variable definitions to the beginning of each function. Sort stack
10646 variables by size.
10647 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
10648 `buf' argument to `char *'.
10649
79bbb63f 106502005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10651
10652 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
10653 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 10654 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 10655 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10656 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10657 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10658 configfile.mod, search.mod, gzio.mod and test.mod.
10659 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10660 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10661 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10662 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10663 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10664 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10665 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10666 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10667 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10668 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10669 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10670 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10671 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10672 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10673 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10674 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10675 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10676 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10677 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10678 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10679 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10680 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10681 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
10682
10683 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
10684 `grep --include'.
10685 (pkgdata_MODULES): Add test.mod.
10686
233b1628 106872005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10688
10689 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
10690 appending to variables with "+=".
10691 (PModule): Use full pathname to generate *.lst filenames.
10692
10693 * Makefile.in: Fixed list rules moved from genmk.rb.
10694 (.DELETE_ON_ERROR): New special target.
10695 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
10696
10697 * conf/i386-pc.rmk: Include conf/common.mk.
10698 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 10699 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 10700 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10701 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10702 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10703 configfile.mod, search.mod, gzio.mod and test.mod.
10704 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10705 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10706 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10707 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10708 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10709 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10710 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10711 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10712 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10713 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10714 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10715 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10716 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10717 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10718 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10719 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10720 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10721 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10722 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10723 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10724 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10725 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10726 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
10727 here...
10728 * conf/common.rmk: ... to here. New file.
10729
10730 * conf/common.mk: New file.
10731
16f820c8 107322005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
10733
10734 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
10735 (grub_script.tab.c): ... here.
10736
10737 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
10738 (grub_script.tab.c): ... here.
10739
10740 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
10741 (grub_script.tab.c): ... here.
10742
10743 * normal/command.c (grub_command_find): Fixed a memory leak of
10744 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
10745
63ba1554 107462005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10747
10748 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
10749 "@" which marks the start of a comment on ARM.
10750 (VARIABLE): Likewise.
10751
7f67dc13 107522005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10753
79bbb63f 10754 Add support for Linux/ADFS partition tables.
7f67dc13 10755
10756 * partmap/acorn.c: New file.
10757
10758 * include/grub/acorn_filecore.h: Likewise.
10759
10760 * DISTLIST: Added `partmap/acorn.c' and
10761 `include/grub/acorn_filecore.h'.
f19dbdb7 10762
7f67dc13 10763 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10764 `partmap/acorn.c'.
10765 (pkgdata_MODULES): Add `acorn.mod'.
10766 (acorn_mod_SOURCES): New variable.
10767 (acorn_mod_CFLAGS): Likewise.
10768
10769 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10770 `partmap/acorn.c'.
10771 (pkgdata_MODULES): Add `acorn.mod'.
10772 (acorn_mod_SOURCES): New variable.
10773 (acorn_mod_CFLAGS): Likewise.
10774
10775 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
10776 (pkgdata_MODULES): Add `acorn.mod'.
10777 (acorn_mod_SOURCES): New variable.
10778 (acorn_mod_CFLAGS): Likewise.
10779 (acorn_mod_LDFLAGS): Likewise.
10780
10781 * include/types.h (grub_disk_addr_t): New typedef.
10782
6d099807 107832005-11-13 Marco Gerards <mgerards@xs4all.nl>
10784
10785 * geninit.sh: New file.
10786
10787 * geninitheader.sh: Likewise.
10788
10789 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
10790 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
10791 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
10792 * commands/configfile.c (grub_configfile_init)
10793 (grub_configfile_fini): Likewise.
10794 * commands/default.c (grub_default_init, grub_default_fini):
10795 Likewise.
10796 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
10797 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
10798 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
10799 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
10800 Likewise.
10801 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
10802 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
10803 Likewise.
10804 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 10805 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 10806 Likewise.
10807 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
10808 Likewise.
fe6b695a 10809 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 10810 Likewise.
10811 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
10812 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
10813 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
10814 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
10815 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
10816 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
10817 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10818 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10819 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10820 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10821 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10822 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10823 * partmap/amiga.c (grub_amiga_partition_map_init)
10824 (grub_amiga_partition_map_fini): Likewise.
10825 * partmap/apple.c (grub_apple_partition_map_init)
10826 (grub_apple_partition_map_fini): Likewise.
10827 * partmap/pc.c (grub_pc_partition_map_init)
10828 (grub_pc_partition_map_fini): Likewise.
10829 * partmap/sun.c (grub_sun_partition_map_init,
10830 grub_sun_partition_map_fini): Likewise.
10831 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10832 Likewise.
10833
10834 * util/grub-emu.c: Include <grub_modules_init.h>.
10835 (main): Don't initialize and de-initialize any modules directly,
10836 use `grub_init_all' and `grub_fini_all' instead.
10837
10838 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10839 `grub_vesafb_mod_init'.
10840 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
10841 all users.
10842 * term/i386/pc/vga.c (grub_vga_init): Renamed to
10843 `grub_vga_mod_init'. Updated all users.
10844 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 10845
6d099807 10846 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10847 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10848 rules.
10849
10850 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10851 Generate a function to initialize the module in utilities.
10852 Updated all callers.
10853 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
10854 initialize the module in utilities. Updated all callers.
10855
9046bcf0 108562005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10857
10858 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10859 escape sequence and a literal ^L to clear the screen.
10860
10861 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10862 when returning from Open Firmware.
10863
d13ea639 108642005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10865
10866 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10867 (grub_ofconsole_height): Likewise.
10868 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10869 manually insert a '\n'.
10870 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10871 `grub_ofconsole_height'. Return early if these are already set.
10872
a8fcf206 108732005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
10874
10875 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10876 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10877 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10878 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10879 and `normal/script.c'.
10880 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10881 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10882 (test_mod_SOURCES): New variable.
10883 (test_mod_CFLAGS): Likewise.
10884 (test_mod_LDFLAGS): Likewise.
10885 (pkgdata_MODULES): Add `test.mod'.
10886 (grub_script.tab.c): New rule.
10887 (grub_script.tab.h): Likewise.
10888
b6b32745 108892005-11-07 Marco Gerards <mgerards@xs4all.nl>
10890
10891 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10892 `commands/test.c', `normal/execute.c', `normal/lexer.c',
10893 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10894 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10895 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10896 (test_mod_SOURCES): New variable.
10897 (test_mod_CFLAGS): Likewise.
10898 (pkgdata_MODULES): Add `test.mod'.
10899 (grub_script.tab.c): New rule.
10900 (grub_script.tab.h): Likewise.
10901
daac212a 109022005-11-06 Marco Gerards <mgerards@xs4all.nl>
10903
10904 Add initial scripting support.
10905
10906 * commands/test.c: New file.
10907 * include/grub/script.h: Likewise.
10908 * normal/execute.c: Likewise.
10909 * normal/function.c: Likewise.
10910 * normal/lexer.c: Likewise.
10911 * normal/parser.y: Likewise.
10912 * normal/script.c: Likewise.
10913
10914 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 10915
daac212a 10916 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10917 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10918 `normal/function.c' and `normal/script.c'.
10919 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10920 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 10921 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10922 variables.
daac212a 10923 (pkgdata_MODULES): Add `test.mod'.
10924 (grub_script.tab.c): New rule.
10925 (grub_script.tab.h): Likewise.
10926
10927 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10928
10929 * include/grub/normal.h (grub_test_init): New prototype.
10930 (grub_test_fini): Likewise.
f19dbdb7 10931
daac212a 10932 * normal/command.c: Include <grub/script.h>.
10933 (grub_command_execute): Rewritten.
f19dbdb7 10934
daac212a 10935 * util/grub-emu.c (main): Call `grub_test_init' and
10936 `grub_test_fini'.
10937
77500b2b 109382005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10939
10940 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10941 to 0.
10942 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10943 there are no pending characters.
10944
e45deb9e 109452005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10946
10947 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10948 `grub_strndup' to drop device arguments. Replace unnecessary
10949 `grub_strndup' with `grub_strdup'.
10950
4ce32619 109512005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10952
10953 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10954 `debug' environment variable has been set.
10955
109562005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 10957
4ce32619 10958 * Makefile.in (install-local): Use $(DATA).
10959 (uninstall): Likewise.
10960 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10961 (sbin_UTILITIES): ... to here.
10962 (sbin_SCRIPTS): New variable.
10963 (grub_install_SOURCES): New variable.
10964 * util/powerpc/ieee1275/grub-install.in: New file.
10965 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
10966 variable.
10967 (add_segments): Call `grub_util_get_path'.
10968
25fe6f03 109692005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10970
10971 From Timothy Baldwin:
10972 * commands/ls.c (grub_ls_list_files): Close FILE with
10973 grub_file_close.
10974 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
10975
04ccf3ec 109762005-10-24 Marco Gerards <mgerards@xs4all.nl>
10977
10978 * include/grub/parser.h: New file.
10979
10980 * kern/parser.c: Likewise.
10981
10982 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
10983 (grub_setup_SOURCES): Likewise.
10984 (grub_probefs_SOURCES): Likewise.
10985 (grub_emu_SOURCES): Likewise.
10986 (kernel_img_HEADERS): Add `parser.h'.
10987
10988 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10989 (grub_emu_SOURCES): Add `kern/parser.c'.
10990 (grubof_SOURCES): Likewise.
10991
10992 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10993 (grubof_SOURCES): Add `kern/parser.c'.
10994
10995 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
10996
10997 * kern/misc.c (grub_split_cmdline): Removed function.
10998
10999 * kern/rescue.c: Include <grub/parser.h>.
11000 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
11001 of `grub_split_cmdline'.
11002
11003 * normal/command.c: Include <grub/parser.h>.
11004 (grub_command_execute): Use `grub_parser_split_cmdline' instead
11005 of `grub_split_cmdline'.
11006
11007 * normal/completion.c: Include <grub/parser.h>.
11008 (cmdline_state): New variable.
11009 (iterate_dir): End the filename with a quote depending on the
11010 command line state.
11011 (get_state): new function.
11012 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
11013 split the arguments and determine the current argument. When the
11014 argument string is not quoted, escape all spaces.
11015
6d8f4b0e 110162005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11017
11018 * normal/sparc64/setjmp.S: New file.
11019
15cf03ed 110202005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11021
11022 * include/grub/sparc64/libgcc.h: New file.
11023 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
11024 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
11025 normal/sparc64/setjmp.c.
11026
03e8661a 110272005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
11028
11029 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
11030 * kern/sparc64/cache.S: New file.
11031 * kern/sparc64/cache.c: Removed.
11032 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
11033 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
11034 -mtune=ultrasparc.
11035 (COMMON_LDFLAGS): Add -melf64_sparc.
11036 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
11037 (grubof_SOURCES): Use cache.S instead of cache.c.
11038 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
11039 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
11040 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
11041 commented though.
11042 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
11043 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
11044 (linux_mod_CFLAGS): Commented out.
11045 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
11046 out because module isn't built.
11047 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
11048 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
11049 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
11050 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
11051 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
11052 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11053 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11054 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
11055 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
11056 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
11057 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
11058 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
11059 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
11060 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
11061
34eeec8a 110622005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
11063
11064 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
11065 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
11066 longer, because HFS should not be used on PC.
11067
708367a3 110682005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
11069
11070 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
11071 consistently within the loop.
11072
6fa1251a 110732005-10-15 Marco Gerards <mgerards@xs4all.nl>
11074
11075 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
11076 directory can not be read.
11077
4801580b 110782005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11079
11080 * configure.ac (AC_INIT): Increase the version number to 1.91.
11081
11082 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
11083 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
11084 term/i386/pc/serial.c.
11085
219ad426 110862005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11087
11088 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
11089 file size must be permitted.
11090
11091 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
11092 between %ah and %al.
11093
688e5699 110942005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
11095
11096 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
11097 grub_uint64_t.
11098 Call the hook with a NUL-terminated filename.
11099 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
11100 grub_cpu_to_be32.
11101
11102 * kern/term.c (cursor_state): New variable.
11103 (grub_term_set_current): Reset the cursor state on a new
11104 terminal.
11105 (grub_setcursor): Rewritten to use CURSOR_STATE.
11106 (grub_getcursor): New function.
11107
11108 * include/grub/term.h (grub_getcursor): New prototype.
11109
11110 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
11111 integers on ARM. Reported by Timothy Baldwin
11112 <T.E.Baldwin99@members.leeds.ac.uk>.
11113
bb34586c 111142005-10-11 Marco Gerards <mgerards@xs4all.nl>
11115
11116 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
11117 allocated.
11118 (grub_sfs_dir): Likewise.
11119
9a909877 111202005-10-09 Marco Gerards <mgerards@xs4all.nl>
11121
11122 Add support for the SFS filesystem.
11123
11124 * fs/sfs.c: New file.
11125
11126 * DISTLIST: Added `fs/sfs.c'.
11127
11128 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
11129 (grub_probefs_SOURCES): Likewise.
11130 (grub_emu_SOURCES): Likewise.
11131 (pkgdata_MODULES): Add `sfs.mod'.
11132 (sfs_mod_SOURCES): New variable.
11133 (sfs_mod_CFLAGS): Likewise.
11134 (sfs_mod_LDFLAGS): Likewise.
11135
11136 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
11137 (pkgdata_MODULES): Add `sfs.mod'.
11138 (sfs_mod_SOURCES): New variable.
11139 (sfs_mod_CFLAGS): Likewise.
11140
11141 * util/grub-emu.c (main): Call `grub_sfs_init' and
11142 `grub_sfs_fini'.
11143
11144 * include/grub/fs.h (grub_sfs_init): New prototype.
11145 (grub_sfs_fini): Likewise.
11146
57bdbde3 111472005-10-07 Marco Gerards <mgerards@xs4all.nl>
11148
11149 Add support for the AFFS filesystem.
11150
11151 * fs/affs.c: New file.
11152
11153 * DISTLIST: Added `fs/affs.c'.
11154
11155 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
11156 (grub_probefs_SOURCES): Likewise.
11157 (grub_emu_SOURCES): Likewise.
11158 (pkgdata_MODULES): Add `affs.mod'.
11159 (affs_mod_SOURCES): New variable.
11160 (affs_mod_CFLAGS): Likewise.
11161 (affs_mod_LDFLAGS): Likewise.
11162
11163 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
11164 (pkgdata_MODULES): Add `affs.mod'.
11165 (affs_mod_SOURCES): New variable.
11166 (affs_mod_CFLAGS): Likewise.
11167
11168 * util/grub-emu.c (main): Call `grub_affs_init' and
11169 `grub_affs_fini'.
11170
11171 * include/grub/fs.h (grub_affs_init): New prototype.
11172 (grub_affs_fini): Likewise.
11173
047b67e0 111742005-10-01 Marco Gerards <mgerards@xs4all.nl>
11175
11176 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
11177
59b8208a 111782005-10-01 Marco Gerards <mgerards@xs4all.nl>
11179
11180 * configure.ac: Accept `x86_64' as host_cpu. In that case add
11181 `-m32' to CFLAGS.
11182
11183 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
11184 linking.
f19dbdb7 11185
59b8208a 11186 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
11187 (COMMON_LDFLAGS): New variable.
11188 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
11189 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
11190 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
11191 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
11192 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
11193 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
11194 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
11195 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
11196 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
11197 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
11198 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11199 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11200 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
11201 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
11202 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
11203 variables.
11204 (normal_mod_ASFLAGS): Add `-m32'.
11205
11206 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
11207 (grub_host_size_t, grub_host_ssize_t): New types.
11208 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 11209 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 11210 `GRUB_HOST_SIZEOF_VOID_P'.
11211
11212 * include/grub/kernel.h (struct grub_module_header): Type of
11213 member offset changed to `grub_host_off_t'. Type of member size
11214 changed to `grub_host_size_t'.
11215 (struct grub_module_info): Type of member offset changed to
11216 `grub_host_off_t'. Type of member size changed to
11217 `grub_host_size_t'.
11218
b4093103 112192005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
11220
11221 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 11222
b4093103 11223 * kern/i386/pc/startup.S (multiboot_header): New label.
11224 (multiboot_entry): Likewise.
11225 (multiboot_trampoline): Likewise.
11226
11227 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11228 Increased to 0x4A0.
11229
11230 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
11231 put parentheses after a question mark.
11232 [!GRUB_UTIL] (my_mod): New variable.
11233
11234 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
11235
b2499b29 112362005-09-28 Marco Gerards <mgerards@xs4all.nl>
11237
11238 Adds support for the XFS filesystem. Btrees are not supported
11239 yet.
11240
11241 * fs/xfs.c: New file.
11242
11243 * DISTLIST: Added `fs/xfs.c'.
11244
11245 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
11246 (grub_probefs_SOURCES): Likewise.
11247 (grub_emu_SOURCES): Likewise.
11248 (pkgdata_MODULES): Add `xfs.mod'.
11249 (xfs_mod_SOURCES): New variable.
11250 (xfs_mod_CFLAGS): Likewise.
11251
11252 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
11253 (pkgdata_MODULES): Add `xfs.mod'.
11254 (xfs_mod_SOURCES): New variable.
11255 (xfs_mod_CFLAGS): Likewise.
11256
11257 * util/grub-emu.c (main): Call `grub_xfs_init' and
11258 `grub_xfs_fini'.
11259
11260 * include/grub/fs.h (grub_xfs_init): New prototype.
11261 (grub_xfs_fini): Likewise.
11262
f19dbdb7 11263
83d37a62 112642005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
11265
11266 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
11267 color modes, allow greater than 16 colors to be configured as
11268 a default palette.
11269
47d2d65e 112702005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11271
11272 * normal/completion.c (complete_arguments): Add the qualifier
11273 const into OPTIONS.
11274
11275 From Omniflux <omniflux+lists@omniflux.com>:
11276 * include/grub/terminfo.h: New file.
11277 * include/grub/tparm.h: Likewise.
11278 * include/grub/i386/pc/serial.h: Likewise.
11279 * term/terminfo.c: Likewise.
11280 * term/tparm.c: Likewise.
11281 * term/i386/pc/serial.c: Likewise.
11282 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
11283 serial.mod.
11284 (terminfo_mod_SOURCES): New variable.
11285 (terminfo_mod_CFLAGS): Likewise.
11286 (serial_mod_SOURCES): Likewise.
11287 (serial_mod_CFLAGS): Likewise.
11288
48b671ff 112892005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
11290
11291 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
11292 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
11293 and kern/powerpc/ieee1275/cmain.c, respectively.
11294
11295 * boot/powerpc/ieee1275/crt0.S: Moved to ...
11296 * kern/powerpc/ieee1275/crt0.S: ... here.
11297
11298 * boot/powerpc/ieee1275/cmain.c: Moved to ...
11299 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 11300
48b671ff 11301 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
11302 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
11303 instead of boot/powerpc/ieee1275/crt0.S and
11304 boot/powerpc/ieee1275/cmain.c, respectively.
11305
11306 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
11307 sectors. It was not used anyway.
11308
09fc77a7 113092005-08-30 Hollis Blanchard <hollis@penguinppc.org>
11310
11311 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
11312 `unused parameter' warning.
11313
003789c7 113142005-08-30 Hollis Blanchard <hollis@penguinppc.org>
11315
11316 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
11317 function.
11318 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
11319 getcharwidth.
11320
67f44c86 113212005-08-28 Marco Gerards <metgerards@student.han.nl>
11322
11323 * include/grub/normal.h (enum grub_completion_type): Added
11324 `GRUB_COMPLETION_TYPE_ARGUMENT'.
11325
11326 * normal/cmdline.c (print_completion): Handle
11327 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
11328 * normal/menu_entry.c (store_completion): Likewise.
11329
11330 * normal/completion.c (complete_arguments): New function.
11331 (grub_normal_do_completion): Call `complete_arguments' when the
11332 current words start with a dash.
11333
0b5abe02 113342005-08-27 Marco Gerards <metgerards@student.han.nl>
11335
11336 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
11337 `gzio.mod' instead of `io.mod').
11338
d9864ee1 113392005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
11340
11341 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
11342 (DISTDIRS): Added io and video.
11343 Rewrite the search routine to make an output consistently.
11344
11345 * DISTLIST: Added conf/sparc64-ieee1275.mk,
11346 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
11347 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
11348 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
11349 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
11350 util/powerpc/ieee1275/misc.c.
f19dbdb7 11351
d9864ee1 11352 * include/grub/gzio.h: New file.
11353 * io/gzio.c: Likewise.
f19dbdb7 11354
d9864ee1 11355 * kern/file.c (grub_file_close): Call grub_device_close only if
11356 FILE->DEVICE is not NULL.
11357
11358 * include/grub/mm.h [!NULL] (NULL): New macro.
11359
11360 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
11361
11362 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
11363 (pkgdata_MODULES): Added gzio.mod.
11364 (gzio_mod_SOURCES): New variable.
11365 (gzio_mod_CFLAGS): Likewise.
11366
11367 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
11368 (pkgdata_MODULES): Added gzio.mod.
11369 (gzio_mod_SOURCES): New variable.
11370 (gzio_mod_CFLAGS): Likewise.
11371
11372 * commands/cat.c: Include grub/gzio.h.
11373 (grub_cmd_cat): Use grub_gzfile_open instead of
11374 grub_file_open.
f19dbdb7 11375
d9864ee1 11376 * commands/cmp.c: Include grub/gzio.h.
11377 (grub_cmd_cmp): Use grub_gzfile_open instead of
11378 grub_file_open.
11379
11380 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
11381 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
11382 grub_file_open.
11383 (grub_rescue_cmd_module): Likewise.
11384
fa46f4b5 113852005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
11386
11387 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
11388 kern/sparc64/ieee1275/init.c because it contains _start.
11389 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
11390
e9211b5d 113912005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
11392
11393 * configure.ac: Add support for sparc64 host with ieee1275
11394 firmware.
11395 * configure: Generated from configure.ac.
11396 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
11397 instead of int.
11398 (grub_ofdisk_read): Likewise.
11399 (grub_ofdisk_open): Use %p to print pointer values, and cast the
11400 pointers as (void *) to remove a warning.
11401 (grub_ofdisk_close): Likewise.
11402 (grub_ofdisk_read): Likewise.
11403 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
11404 returns, so make it return void to remove a warning.
11405 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
11406 Corresponding prototype change.
11407 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
11408 values, and cast the pointers as (void *) to remove a warning.
11409 (grub_mm_dump): Likewise.
11410 * conf/sparc64-ieee1275.mk: New file.
11411 * conf/sparc64-ieee1275.rmk: Likewise.
11412 * include/grub/sparc64/setjmp.h: Likewise.
11413 * include/grub/sparc64/types.h: Likewise.
11414 * include/grub/sparc64/ieee1275/console.h: Likewise.
11415 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11416 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11417 * include/grub/sparc64/ieee1275/time.h: Likewise.
11418 * kern/sparc64/cache.c: Likewise.
11419 * kern/sparc64/dl.c: Likewise.
11420 * kern/sparc64/ieee1275/init.c: Likewise.
11421 * kern/sparc64/ieee1275/openfw.c: Likewise.
11422
385c6a92 114232005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
11424
11425 * util/console.c (grub_ncurses_putchar): If C is greater than
11426 0x7f, set C to a question mark.
11427 (grub_ncurses_getcharwidth): New function.
11428 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
11429 getcharwidth.
11430
11431 * normal/menu.c (print_entry): Made aware of Unicode. First,
11432 convert TITLE to UCS-4, and predict the cursor position by
11433 grub_getcharwidth.
11434
11435 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
11436 const to SRC.
11437 * kern/misc.c (grub_utf16_to_utf8): Likewise.
11438
16ccb8b1 114392005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11440
11441 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
11442 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11443 grub_strcat.
11444
11445 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
11446 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11447 grub_strcpy and grub_strlen. Take it into account that a space
11448 character is inserted as a delimiter.
11449
6a85ce79 114502005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11451
11452 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 11453 invalid magic in the error.
6a85ce79 11454
11455 * commands/search.c: New file.
f19dbdb7 11456
6a85ce79 11457 * util/grub-emu.c (main): Call grub_search_init and
11458 grub_search_fini.
11459
11460 * kern/rescue.c (grub_rescue_print_disks): Removed.
11461 (grub_rescue_print_devices): New function.
11462 (grub_rescue_cmd_ls): Use grub_device_iterate with
11463 grub_rescue_print_devices instead of grub_disk_dev_iterate with
11464 grub_rescue_print_disks.
11465
11466 * kern/partition.c (grub_partition_iterate): Return the result of
11467 PARTMAP->ITERATE instead of GRUB_ERRNO.
11468
11469 * kern/device.c: Include grub/partition.h.
11470 (grub_device_iterate): New function.
11471
11472 * include/grub/partition.h (grub_partition_iterate): Return int
11473 instead of grub_err_t.
11474
11475 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
11476 prototype.
11477 [GRUB_UTIL] (grub_search_fini): Likewise.
11478
11479 * include/grub/device.h (grub_device_iterate): New prototype.
11480
11481 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11482 commands/search.c.
11483 (pkgdata_MODULES): Added search.mod.
11484 (search_mod_SOURCES): New variable.
11485 (search_mod_CFLAGS): Likewise.
11486
11487 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
11488 (pkgdata_MODULES): Added search.mod.
11489 (search_mod_SOURCES): New variable.
11490 (search_mod_CFLAGS): Likewise.
11491
11492 * commands/ls.c (grub_ls_list_disks): Renamed to ...
11493 (grub_ls_list_devices): ... this, and use grub_device_iterate.
11494 All callers changed.
11495
11496 * DISTLIST: Added commands/search.c.
11497
ef095434 114982005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11499
11500 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
11501 conversion.
11502 (grub_getcharwidth): New function.
11503
11504 * kern/misc.c (grub_utf8_to_ucs4): New function.
11505
11506 * include/grub/term.h (struct grub_term): Added a new member
11507 "getcharwidth".
11508 (grub_getcharwidth): New prototype.
11509
11510 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
11511
11512 * term/i386/pc/console.c (map_char): New function. Segregated from
11513 grub_console_putchar.
11514 (grub_console_putchar): Use map_char.
11515 (grub_console_getcharwidth): New function.
11516 (grub_console_term): Specified grub_console_getcharwidth as
11517 getcharwidth.
11518
11519 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
11520 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
11521
11522 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
11523 GRUB_ERRNO.
11524 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
11525 on grub_strtoul completely.
11526 (write_char): Declare local variables in the beginning of the
11527 function.
11528 (grub_vesafb_getcharwidth): New function.
11529 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
11530 getcharwidth.
11531
1f0a95e4 115322005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
11533
11534 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
11535 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
11536 commands/i386/pc/vbetest.c.
11537
11538 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
11539 call grub_vbe_get_controller_info again, because the returned
11540 information is volatile.
11541 (grub_vbe_set_video_mode): Mostly rewritten.
11542 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
11543 grub_vbe_status_t correctly.
11544 (grub_vbe_get_video_mode_info): Likewise.
11545 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
11546 several if statements.
11547
11548 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
11549 * commands/i386/pc/vbeinfo.c: ... this.
11550
11551 * commands/i386/pc/vbe_test.c: Renamed to ...
11552 * commands/i386/pc/vbetest.c: ... this.
11553
11554 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
11555 ...
11556 (grub_cmd_vbeinfo): ... this. Save video modes before
11557 iterating. Skip a video mode, if it is not available, not enough
11558 information is given or it is monochrome. Show the memory
11559 model. Leave the interpretation of MODEVAR to grub_strtoul
11560 completely.
11561 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
11562 (GRUB_MOD_FINI): Likewise.
11563
11564 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
11565 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
11566 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
11567 duplicated grub_env_get. Leave the interpretation of MODEVAR to
11568 grub_strtoul completely.
11569 (real2pm): Removed.
11570 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
11571 (GRUB_MOD_FINI): Likewise.
11572
11573 * normal/misc.c: Include grub/mm.h.
11574
11575 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
11576 vbe_list_modes with vbetest.mod and vbeinfo.mod.
11577 (vbe_list_modes_mod_SOURCES): Removed.
11578 (vbe_list_modes_mod_CFLAGS): Likewise.
11579 (vbe_test_mod_SOURCES): Likewise.
11580 (vbe_test_mod_CFLAGS): Likewise.
11581 (vbeinfo_mod_SOURCES): New variable.
11582 (vbeinfo_mod_CFLAGS): Likewise.
11583 (vbetest_mod_SOURCES): Likewise.
11584 (vbetest_mod_CFLAGS): Likewise.
11585
992ffbbe 115862005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
11587
11588 * normal/misc.c: New file.
11589
11590 * DISTLIST: Added normal/misc.c.
f19dbdb7 11591
992ffbbe 11592 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
11593 DISK to HOOK. Call HOOK with DISK.
11594 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11595 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11596 * partmap/sun.c (sun_partition_map_iterate): Likewise.
11597
11598 * normal/menu_entry.c (struct screen): Added a new member
11599 "completion_shown".
11600 (completion_buffer): New global variable.
11601 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
11602 (store_completion): New function.
11603 (complete): Likewise.
11604 (clear_completions): Likewise.
11605 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
11606 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
11607 a tab, call complete.
11608
11609 * normal/completion.c (disk_dev): Removed.
11610 (print_simple_completion): Likewise.
11611 (print_partition_completion): Likewise.
11612 (print_func): New global variable.
11613 (add_completion): Do not take the arguments WHAT or PRINT any
11614 longer. Added a new argument TYPE. Instead of printing directly,
11615 call PRINT_FUNC if not NULL.
11616 All callers changed.
11617 (complete_device): Use a local variable DEV instead of
11618 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
11619 (grub_normal_do_completion): Take a new argument HOOK. Do not
11620 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
11621 empty string, return NULL instead.
11622 All callers changed.
11623
11624 * normal/cmdline.c (print_completion): New function.
11625
11626 * kern/partition.c (grub_partition_iterate): Add an argument DISK
11627 to HOOK.
11628 All callers changed.
11629
11630 * kern/disk.c (grub_print_partinfo): Removed.
11631
11632 * include/grub/partition.h (struct grub_partition_map): Add a new
11633 argument DISK into HOOK of ITERATE.
11634 (grub_partition_iterate): Add a new argument DISK to HOOK.
11635
11636 * include/grub/normal.h (enum grub_completion_type): New enum.
11637 (grub_completion_type_t): New type.
11638 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
11639 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
11640 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
11641 (GRUB_COMPLETION_TYPE_FILE): Likewise.
11642 (grub_normal_do_completion): Added a new argument HOOK.
11643 (grub_normal_print_device_info): New prototype.
11644
11645 * include/grub/disk.h (grub_print_partinfo): Removed.
11646
11647 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
11648 (normal_mod_SOURCES): Likewise.
11649 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11650 (normal_mod_SOURCES): Likewise.
11651
11652 * commands/ls.c (grub_ls_list_disks): Use
11653 grub_normal_print_device_info instead of grub_print_partinfo. Free
11654 PNAME.
11655 (grub_ls_list_files): Use grub_normal_print_device_info instead of
11656 duplicating the code.
11657
0bd41162 116582005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11659
11660 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 11661 follow GCS more precisely.
11662 * commands/i386/pc/vbe_test.c: Likewise.
11663 * include/grub/i386/pc/vbe.h: Likewise.
11664 * term/i386/pc/vesafb.c: Likewise.
11665 * video/i386/pc/vbe.c: Likewise.
0bd41162 11666
6323696a 116672005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11668
11669 * DISTLIST: Added term/i386/pc/vesafb.c
11670 DISTLIST: Added video/i386/pc/vbe.c
11671 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
11672 DISTLIST: Added commands/i386/pc/vbe_test.c.
11673 * commands/i386/pc/vbe_list_modes.c: New file.
11674 * commands/i386/pc/vbe_test.c: Likewise.
11675 * term/i386/pc/vesafb.c: Likewise.
11676 * video/i386/pc/vbe.c: Likewise.
11677 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
11678 (grub_vbe_probe) Added prototype.
11679 (grub_vbe_set_video_mode) Likewise.
11680 (grub_vbe_get_video_mode) Likewise.
11681 (grub_vbe_get_video_mode_info) Likewise.
11682 (grub_vbe_set_pixel_rgb) Likewise.
11683 (grub_vbe_set_pixel_index) Likewise.
11684 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
11685 (pkgdata_MODULES): Added vesafb.mod.
11686 (pkgdata_MODULES): Added vbe_list_modes.mod.
11687 (pkgdata_MODULES): Added vbe_test.mod.
11688 (vbe_mod_SOURCES): Added.
11689 (vbe_mod_CFLAGS): Likewise.
11690 (vesafb_mod_SOURCES): Likewise.
11691 (vesafb_mod_CFLAGS): Likewise.
11692 (vbe_list_modes_mod_SOURCES): Likewise.
11693 (vbe_list_modes_mod_CFLAGS): Likewise.
11694 (vbe_test_mod_SOURCES): Likewise.
11695 (vbe_test_mod_CFLAGS): Likewise.
11696
0a74e62f 116972005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
11698
0a74e62f 11699 * normal/command.c (grub_command_execute): If INTERACTIVE is
11700 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
11701 CMDLINE. Disable the pager if INTERACTIVE is true.
11702 All callers are changed.
11703
11704 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
11705 before reading a config file.
11706 * normal/main.c (read_config_file): Even if a command is not
11707 found, register it if it is within an entry.
11708
11709 * util/grub-emu.c: Include sys/types.h and unistd.h.
11710 (options): Added --hold.
11711 (struct arguments): Added a new member "hold".
11712 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
11713 missing.
11714 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
11715 cleared by a debugger, if it is not zero.
11716
11717 * include/grub/normal.h (grub_command_execute): Add an argument
11718 INTERACTIVE.
11719
e51f85ae 117202005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
11721
11722 * DISTLIST: Added include/grub/i386/pc/vbe.h.
11723
e9c6f39b 117242005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
11725
11726 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
11727 program with another one, because the old one didn't detect a bug
11728 in gcc-3.4. Always use regparm 2, because the new test is still
11729 not enough for gcc-4.0. Someone must investigate a simple test
11730 case which detects a bug in gcc-4.0.
11731
8de3495c 117322005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
11733
11734 * DISTLIST: Added normal/completion.c.
11735
11736 * normal/completion.c: New file.
f19dbdb7 11737
8de3495c 11738 * term/i386/pc/console.c (grub_console_getwh): New function.
11739 (grub_console_term): Assign grub_console_getwh to getwh.
11740
11741 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
11742 function is defined in normal/completion.c as
11743 grub_normal_do_completion.
11744 (grub_cmdline_get): Use grub_normal_do_completion instead of
11745 grub_tab_complete.
11746
11747 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
11748 returns non-zero, otherwise return 0.
11749 (grub_partition_iterate): First, probe the partition map. Then,
11750 call ITERATE only for this partition map.
11751
11752 * kern/misc.c (grub_strncmp): Rewritten.
11753
11754 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
11755 returns non-zero. Otherwise return 0.
11756
11757 * include/grub/partition.h (grub_partition_map_iterate): Return
11758 int instead of void.
11759
11760 * include/grub/normal.h (grub_normal_do_completion): New prototype.
11761
11762 * include/grub/misc.h (grub_strncmp): Change the type of N to
11763 grub_size_t.
11764
11765 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
11766 of void.
11767
11768 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 11769 unsigned explicitly before comparing it with I.
8de3495c 11770
11771 * kern/main.c (grub_env_write_root): Add the attribute unused into
11772 VAR.
11773
11774 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11775 normal/completion.c.
11776 (normal_mod_SOURCES): Likewise.
11777 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11778 (normal_mod_SOURCES): Likewise.
11779
11780 * normal/command.c (grub_iterate_commands): If ITERATE returns
11781 non-zero, return one immediately.
11782
e85e144b 117832005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
11784
11785 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
11786 * kern/i386/pc/startup.S: Updated Global Descriptor table's
11787 descriptions.
11788 (grub_vbe_get_controller_info): New function.
11789 (grub_vbe_get_mode_info): Likewise.
11790 (grub_vbe_set_mode): Likewise.
11791 (grub_vbe_get_mode): Likewise.
11792 (grub_vbe_set_memory_window): Likewise.
11793 (grub_vbe_get_memory_window): Likewise.
11794 (grub_vbe_set_scanline_length): Likewise.
11795 (grub_vbe_get_scanline_length): Likewise.
11796 (grub_vbe_set_display_start): Likewise.
11797 (grub_vbe_get_display_start): Likewise.
11798 (grub_vbe_set_palette_data): Likewise.
11799 * include/grub/i386/pc/vbe.h: New file.
11800
c46153d2 118012005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11802
11803 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11804 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
11805 * DISTLIST: Likewise.
11806 * kern/ieee1275/of.c: Moved to ...
11807 * kern/ieee1275/ieee1275.c: ... here.
11808
0cb90c45 118092005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11810
11811 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
11812 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
11813 Pass 0 as `end' parameter to grub_strtoul().
11814
a19fb360 118152005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11816
11817 * include/grub/powerpc/ieee1275/console.h: Do not include
11818 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
11819 ifdef.
11820 (grub_console_cur_color): Remove i386-specific prototype.
11821 (grub_console_real_putchar): Likewise.
11822 (grub_console_checkkey): Likewise.
11823 (grub_console_getkey): Likewise.
11824 (grub_console_getxy): Likewise.
11825 (grub_console_gotoxy): Likewise.
11826 (grub_console_cls): Likewise.
11827 (grub_console_setcursor): Likewise.
11828 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11829 Include <grub/machine/console.h>.
11830 * term/ieee1275/ofconsole.c: Likewise.
11831
4ac9bd04 118322005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
11833
11834 * Makefile.in (LIBLZO): New variable.
11835
11836 * configure.ac: Check for LZO version 2.
11837
11838 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11839 lzo/lzo1x.h instead of lzo1x.h.
11840
11841 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11842 of -llzo.
11843
11844 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11845 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11846
11847 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11848 copying the data from PARTITION to P.
11849
f4917dfd 118502005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11851
11852 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11853 negative, unload the module.
11854
11855 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11856 map is "pc_partition_map" but not "pc".
11857 (usage): Fix the description. The options are --boot-image and
11858 --core-image but not --boot-file or --core-file.
11859 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11860 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11861 DEFAULT_DIRECTORY.
11862
11863 * util/i386/pc/grub-install.in: Do not specify --boot-file or
11864 --core-file. Specify INSTALL_DEVICE as an argument.
11865
11866 * util/console.c: Include config.h.
11867 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11868 [HAVE_NCURSES_H]: Include ncurses.h.
11869 [HAVE_CURSES_H]: Include curses.h.
11870 [!A_NORMAL] (A_NORMAL): Defined as zero.
11871 [!A_STANDOUT] (A_STANDOUT): Likewise.
11872
11873 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11874 -lncurses.
11875 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11876
11877 * configure.ac: Check for curses libraries and headers.
11878
11879 * Makefile.in (LIBCURSES): New variable.
11880
11881 * genmk.rb (Script::rule): Set the executable bits.
11882
11883 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11884 name of the PC partition map is "pc_partition_map" but not "pc".
11885
0e143073 118862005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11887
11888 * util/i386/pc/grub-install.in (grub_probefs): New variable.
11889 (modules): Likewise.
11890 (usage): Added descriptions for --modules and --grub-probefs.
11891 Handle --modules and --grub-probefs. Save the arguments in MODULES
11892 and GRUB_PROBEFS, respectively.
11893 Auto-detect a filesystem module against GRUBDIR. If the result is
11894 empty and modules are not specified explicitly, abort the
11895 installation. Add the result to MODULES.
11896
11897 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11898 disk/powerpc/ieee1275/ofdisk.c,
11899 include/grub/powerpc/ieee1275/init.h and
11900 term/powerpc/ieee1275/ofconsole.c.
11901 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11902 term/ieee1275/ofconsole.c.
11903
11904 * include/grub/powerpc/ieee1275/console.h: Resurrected.
11905
11906 * COPYING: Upgraded to the latest version. Only the address of the
11907 FSF office has changed.
f19dbdb7 11908
efd6e6d5 119092005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11910
11911 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11912 kern/ieee1275.c with kern/ieee1275/of.c.
11913
11914 * kern/ieee1275.c: Moved to ...
11915 * kern/ieee1275/of.c: ... here.
11916
8ceafda2 119172005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
11918
11919 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 11920 readability.
8ceafda2 11921
11922 * config.guess: Updated to the latest version from gnulib.
11923 * config.sub: Likewise.
11924 * install.sh: Likewise.
11925 * mkinstalldirs: Likewise.
11926
11927 * include/grub/console.h: Removed. This file is arch-specific. Do
11928 not put this in include/grub.
11929
11930 * include/grub/i386/pc/console.h: Resurrected.
11931
11932 * util/console.c: Include grub/machine/console.h instead of
11933 grub/console.h.
11934 * util/grub-emu.c: Likewise.
11935
267f6cd9 119362005-08-04 Marco Gerards <metgerards@student.han.nl>
11937
11938 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11939 hardcoded value.
f19dbdb7 11940
267f6cd9 11941 From Vincent Pelletier <subdino2004@yahoo.fr>
11942 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11943 Redefined to use grub_getwh.
11944 (grub_term): New member named getwh.
11945 (grub_getwh): New prototype.
11946 * kern/term.c (grub_getwh): New function.
11947 * term/i386/pc/console.c (grub_console_getwh): New function.
11948 (grub_console_term): New member `getwh'.
11949 * term/i386/pc/vga.c (grub_vga_getwh): New function.
11950 (grub_vga_term): New member `getwh'.
0b5abe02 11951 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 11952 grub_ssize_t.
11953 (grub_ofconsole_getw): New function.
11954 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11955 (grub_ofconsole_term): New field named getwh and new initial
11956 value.
11957
3be7266d 119582005-08-03 Hollis Blanchard <hollis@penguinppc.org>
11959
11960 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11961 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
11962 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
11963 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
11964 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
11965 of <grub/machine/ieee1275.h>.
11966 * commands/ieee1275/reboot.c: Likewise.
11967 * boot/powerpc/ieee1275/ieee1275.c: Move ...
11968 * kern/ieee1275.c: ... to here. All users updated. Change all
11969 parameter structs to use new type `grub_ieee1275_cell_t'.
11970 * term/powerpc/ieee1275/ofconsole.c: Move ...
11971 * term/ieee1275/ofconsole.c: ... to here. All users updated.
11972 * disk/powerpc/ieee1275/ofdisk.c: Move ...
11973 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
11974 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
11975 to return int.
11976 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
11977 Remove unused prototypes. All users updated.
11978 * include/grub/powerpc/ieee1275/console.h: Removed.
11979 * include/grub/powerpc/ieee1275/ieee1275.h: Define
11980 `grub_ieee1275_cell_t'.
11981 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
11982 Cast comparisons with -1 to the correct type.
11983 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
11984 type to match `grub_ieee1275_entry_fn'.
11985
8b5f3938 119862005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
11987
11988 * DISTLIST: Added util/i386/pc/grub-probefs.c.
11989
11990 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
11991 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
11992 partmap/sun.c.
11993 (grub_probefs_SOURCES): New variable.
11994
11995 * util/i386/pc/grub-probefs.c: New file.
11996
11997 * util/i386/pc/grub-setup.c (main): Call
11998 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
11999 grub_hfs_init and grub_jfs_init to initialize the system. Call
12000 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
12001 grub_pc_partition_map_fini to finish the system.
12002
ea409713 120032005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
12004
12005 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
12006 function.
12007 (grub_multiboot_load_elf32): Likewise.
12008 (grub_multiboot_is_elf64): Likewise.
12009 (grub_multiboot_load_elf64): Likewise.
12010 (grub_multiboot_load_elf): Likewise.
12011 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
12012 an ELF32 or ELF64 file.
12013 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
12014
12015 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
12016 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
12017 NULL before calling FS->LABEL.
12018 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
12019 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
12020 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
12021 before calling FS->LABEL.
12022
141a288b 120232005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
12024
12025 * util/i386/pc/grub-install.in (datadir): New variable.
12026 (libdir): Removed.
12027 (pkgdatadir): New variable.
12028 (pkglibdir): Removed.
12029
0d5f8a54 120302005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
12031
12032 * DISTLIST: Added util/i386/pc/grub-install.in.
12033
12034 * util/i386/pc/grub-install.in: New file.
12035
12036 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
12037 (grub_install_SOURCES): Likewise.
12038
12039 * genmk.rb: Added support for scripts.
12040 (Script): New class.
12041 (scripts): New variable.
12042
12043 * Makefile.in (install-local): Install sbin_SCRIPTS by
12044 INSTALL_SCRIPT.
12045 (uninstall): Remove sbin_SCRIPTS.
12046
12047 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
12048 device, try to get a GRUB device by
12049 grub_util_biosdisk_get_grub_dev.
12050 Free DEST_DEV.
12051
12052 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
12053 description for --device-map.
12054
5f968e1e 120552005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12056
12057 Change the semantics of variable hooks. They now return strings
12058 instead of error values.
f19dbdb7 12059
5f968e1e 12060 * util/i386/pc/grub-setup.c: Include grub/env.h.
12061 (setup): Use grub_device_set_root instead of grub_env_set.
12062
12063 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
12064 grub_env_get instead of grub_device_set_root and
12065 grub_device_get_root, respectively.
12066
12067 * kern/main.c (grub_env_write_root): New function.
12068 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
12069 grub_env_set instead of grub_device_set_root.
12070
12071 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
12072 many variables.
12073 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
12074 rather than calling ENV->WRITE_HOOK afterwards.
12075 (grub_env_get): Return the result of ENV->READ_HOOK rather than
12076 passing a pointer of a pointer.
12077 (grub_register_variable_hook): Change the types of "read_hook" and
12078 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
12079 respectively.
12080 Allocate the default empty string on the heap, because this string
12081 may be freed later.
12082
12083 * kern/device.c: Include grub/env.h.
12084 (grub_device_set_root): Removed.
12085 (grub_device_get_root): Likewise.
12086 (grub_device_open): Use grub_env_get instead of
12087 grub_device_get_root.
12088
12089 * include/grub/env.h (grub_env_read_hook_t): New type.
12090 (grub_env_write_hook_t): Likewise.
12091 (grub_env_var): Change the types of "read_hook" and "write_hook"
12092 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
12093 (grub_register_variable_hook): Likewise.
12094
12095 * include/grub/device.h (grub_device_set_root): Removed.
12096 (grub_device_set_root): Likewise.
12097
12098 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
12099 make sure that DIRNAME terminates with '/', so that
12100 grub_fat_find_dir will fail if PATH is not a directory.
12101
12102 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
12103 from DIRNAME.
12104 Use the qualifier auto for print_files and print_files_long.
12105 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
12106 as a regular file.
12107 Put a newline only if there is no error.
12108 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
12109 used.
12110
896f0afd 121112005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
12112
12113 * kern/partition.c (grub_partition_probe): Initialize PART to
12114 NULL. Otherwise, when no partition map is registered, this returns
12115 a garbage.
12116
b28b81b2 121172005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
12118
12119 * partmap/apple.c (apple_partition_map_iterate): Check if POS
12120 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
12121 valid.
12122
5f3607e0 121232005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
12124
12125 * commands/ls.c (grub_ls_list_disks): Print the filesystem
12126 information on each device, if it does not have partitions. Print
12127 "Device" instead of "Disk", because this function is not specific
12128 to disk devices.
12129
12130 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
12131 static to ensure that it is put on the memory rather than a
12132 register.
12133
502c87e8 121342005-07-17 Yoshinori Okuji <okuji@enbug.org>
12135
12136 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
12137 (grub_cat_init): Likewise.
12138 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
12139 (options): Likewise.
12140 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
12141 (grub_configfile_init): Likewise.
12142 * font/manager.c (GRUB_MOD_INIT): Likewise.
12143 * commands/help.c (GRUB_MOD_INIT): Likewise.
12144 (grub_help_init): Likewise.
12145 * normal/command.c (grub_command_init): Likewise.
12146 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
12147 * disk/loopback.c (grub_loop_init): Likewise.
12148 (GRUB_MOD_INIT): Likewise.
12149 * commands/ls.c (grub_ls_init): Likewise.
12150 (GRUB_MOD_INIT): Likewise.
12151 (options): Likewise.
12152 * commands/boot.c (grub_boot_init): Likewise.
12153 (GRUB_MOD_INIT): Likewise.
12154 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
12155 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
12156 (GRUB_MOD_INIT): Likewise.
12157 * commands/cmp.c (grub_cmp_init): Likewise.
12158 (GRUB_MOD_INIT): Likewise.
12159
12160 * normal/arg.c: Use <> instead of "" to include header files.
12161 (SHORT_ARG_HELP): New macro.
12162 (SHORT_ARG_USAGE): Likewise.
12163 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
12164 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
12165 descriptions.
12166 (find_short): Check if C is 'h' or 'u' explicitly.
12167 (grub_arg_show_help): Use space characters instead of tabs. Treat
12168 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
12169 are shown with --help and --usage only if they are not used for
12170 the command itself.
12171 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
12172 'h' and 'u'.
12173
12174 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
12175 const into "longarg". Change the type of "shortarg" to int.
12176
f806d18e 121772005-07-17 Yoshinori Okuji <okuji@enbug.org>
12178
12179 * boot/i386/pc/boot.S (boot_drive_check): New label.
12180
12181 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
12182 macro.
12183
12184 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
12185 which do not pass a boot drive correctly. Copied from GRUB Legacy.
12186
e293232b 121872005-07-17 Yoshinori Okuji <okuji@enbug.org>
12188
12189 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
12190 When turning off Gate A20, skip the check and return immediately,
12191 because this is not fatal usually.
12192
ebedfd00 121932005-07-17 Yoshinori Okuji <okuji@enbug.org>
12194
12195 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
12196 be 0x7C00 instead of 0x8000.
12197
12198 * boot/i386/pc/pxeboot.S: Rewritten.
12199
12200 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
12201 EXT_C.
12202 (gate_a20_check_state): Read a byte from 0x108000. Invert the
12203 result.
12204
654fc59f 122052005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
12206
12207 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
12208 robustness. This routine now supports a BIOS call and System
12209 Control Port A to modify the gate A20.
12210
12211 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12212 Increased to 0x440.
12213
09f9923f 122142005-07-12 Hollis Blanchard <hollis@penguinppc.org>
12215
12216 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
12217 device path and resulting ihandle.
12218 (grub_ofdisk_close): dprintf the ihandle being closed.
12219 (grub_ofdisk_read): dprintf function parameters.
12220 * kern/mm.c (grub_mm_init_region): Likewise.
12221 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
12222 (grub_linux_boot): dprintf the Linux entry point, initrd address and
12223 size, and boot arguments.
12224 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
12225 before loading into memory.
12226 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
12227 before loading into memory.
12228
7ef504d8 122292005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
12230
12231 * kern/mm.c: Added much documentation.
12232 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
12233 8, set to 5 instead of 8.
12234
e0f050c2 122352005-07-10 Yoshinori Okuji <okuji@enbug.org>
12236
12237 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
12238
12239 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
12240 (grub_mkdevicemap_SOURCES): New variable.
12241
12242 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
12243 lib/device.c of GRUB Legacy.
12244
7224189a 122452005-07-10 Yoshinori Okuji <okuji@enbug.org>
12246
12247 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
12248 instead of PATH is NULL.
12249
68c864eb 122502005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
12251
12252 * commands/cmp.c (BUFFER_SIZE): New macro.
12253 (grub_cmd_cmp): Close the right file at the right time. Compare
12254 only data just read. Don't report files of different size as
12255 identical. Dynamically allocate buffers. Move variable
12256 declarations at the beginning of function.
12257
e6f3e614 122582005-07-09 Yoshinori Okuji <okuji@enbug.org>
12259
12260 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
12261 reverse.
12262
f8f1559a 122632004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
12264
12265 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
12266 when backspace is pressed at beginning of line.
12267
39c9d41d 122682005-07-03 Yoshinori Okuji <okuji@enbug.org>
12269
12270 * DISTLIST: Added genfslist.sh.
12271
12272 * normal/main.c (fs_module_list): New variable.
12273 (autoload_fs_module): New function.
12274 (read_fs_list): Likewise.
12275 (grub_normal_execute): Call read_fs_list.
12276
12277 * kern/fs.c (grub_fs_autoload_hook): New variable.
12278 (grub_fs_probe): Added support for auto-loading.
12279
12280 * include/grub/normal.h (struct grub_fs_module_list): New struct.
12281 (grub_fs_module_list_t): New type.
12282
12283 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
12284 (grub_fs_autoload_hook): New prototype.
12285
12286 * genfslist.sh: New file.
f19dbdb7 12287
39c9d41d 12288 * genmk.rb: Added a rule to generate a filesystem list.
12289
121c1d83 122902005-06-30 Marco Gerards <metgerards@student.han.nl>
12291
12292 * configure.ac: Fix the test for cross-compiling.
12293
12294 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
12295 define GRUB_UTIL anymore.
12296
12297 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
12298 so this function works on other systems than just big endian.
12299 (load_modules): Likewise.
12300 (add_segments): Likewise.
12301
e75d76e1 123022005-06-23 Hollis Blanchard <hollis@penguinppc.org>
12303
12304 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
12305 contains `l' modifier, get a long from va_arg().
12306
50b5a0a7 123072005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
12308
12309 * kern/mm.c (grub_free): If the next free block which is being
12310 merged is the first free block, set the first block to the block
12311 being freed.
12312 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
12313
89371b20 123142005-05-08 Hollis Blanchard <hollis@penguinppc.org>
12315
12316 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
12317 `grub_ieee1275_chosen'.
12318
168d6e58 123192005-05-08 Hollis Blanchard <hollis@penguinppc.org>
12320
12321 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
12322 (grub_ieee1275_chosen): New variable.
12323 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
12324 `chosen'.
12325 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
12326 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12327 Rename first argument to `phandle' for consistency.
12328 (grub_ieee1275_get_property_length): Likewise.
12329 (grub_ieee1275_next_property): Likewise. Change type of first argument
12330 to grub_ieee1275_phandle_t.
12331 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
12332 Move export next to declaration.
12333 (grub_ieee1275_chosen): New variable.
12334 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
12335 Correct cosmetic typo.
12336 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
12337 `grub_ieee1275_chosen'.
12338 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
12339 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
12340 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
12341 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
12342 `grub_ieee1275_chosen'.
12343
ca5baa3f 123442005-05-10 Hollis Blanchard <hollis@penguinppc.org>
12345
12346 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
12347 /chosen/bootargs.
12348 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
12349 /chosen/bootargs as "variable=value" pairs.
12350
708b345f 123512005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
12352
12353 * include/grub/misc.h (grub_dprintf): New macro.
12354 (grub_real_dprintf): New prototype.
12355 (grub_strword): Likewise.
12356 (grub_iswordseparator): Likewise.
12357 * kern/misc.c (grub_real_dprintf): New function.
12358 (grub_strword): Likewise.
12359 (grub_iswordseparator): Likewise.
12360
f4c5e67c 123612005-04-30 Hollis Blanchard <hollis@penguinppc.org>
12362
12363 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
12364 (roundup): Remove macro.
12365 (grub_ieee1275_flags): Make static.
12366 (grub_ieee1275_realmode): Remove.
12367 (grub_ieee1275_test_flag): New function.
12368 (grub_ieee1275_set_flag): Likewise.
12369 (find_options): Rename to `grub_ieee1275_find_options'; update
12370 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
12371 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
12372 (cmain): New prototype.
12373 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
12374 `grub_ieee1275_flags' directly.
12375 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
12376 machine/biosdisk.h.
12377 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
12378 Don't include grub/machine/init.h.
12379 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
12380 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12381 Remove prototype.
12382 (grub_ieee1275_realmode): Likewise.
12383 (grub_ieee1275_flag): New enum.
12384 (grub_ieee1275_test_flag): New prototype.
12385 (grub_ieee1275_set_flag): New prototype.
12386 * include/grub/powerpc/ieee1275/init.h: Remove file.
12387 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
12388 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
12389 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
12390 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
12391 comment.
12392 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
12393 `grub_ieee1275_test_flag'.
12394 (grub_ieee1275_encode_devname): Likewise.
12395
ed16607e 123962005-04-21 Hollis Blanchard <hollis@penguinppc.org>
12397
12398 * include/grub/powerpc/ieee1275/ieee1275.h
12399 (grub_ieee1275_encode_devname): New prototype.
12400 (grub_ieee1275_get_filename): Likewise.
12401 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
12402 function.
12403 (grub_set_prefix): Likewise.
12404 (grub_machine_init): Call grub_set_prefix.
12405 * kern/powerpc/ieee1275/openfw.c: Fix typos.
12406 (grub_parse_type): New enum.
12407 (grub_ieee1275_get_devargs): New function.
12408 (grub_ieee1275_get_devname): Likewise.
12409 (grub_ieee1275_parse_args): Likewise.
12410 (grub_ieee1275_get_filename): Likewise.
12411 (grub_ieee1275_encode_devname): Likewise.
12412
be369920 124132005-03-30 Marco Gerards <metgerards@student.han.nl>
12414
12415 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
12416 `grub_loader_unset'.
12417
a5ce3a4a 124182005-03-26 Hollis Blanchard <hollis@penguinppc.org>
12419
12420 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
12421 instead of grub_ieee1275_interpret.
12422 (grub_halt_init): New function.
12423 (grub_halt_fini): Likewise.
12424 (GRUB_MOD_INIT): Correct message grammar.
12425 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
12426 instead of grub_ieee1275_interpret.
12427 (grub_reboot_init): New function.
12428 (grub_reboot_fini): Likewise.
12429 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
12430 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
12431 util/i386/pc/misc.c with commands/ieee1275/halt.c,
12432 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
12433 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
12434 function.
12435 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
12436 Add prototype.
12437 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
12438 prototype.
12439 (grub_halt): Likewise.
12440 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
12441 (cmain): Remove __attribute__((unused)).
12442 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
12443 (grub_heap_len): Likewise.
12444 (grub_machine_fini): New function.
12445 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
12446 (grub_halt): Likewise.
12447 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
12448 function.
12449 * util/powerpc/ieee1275/misc.c: New file.
12450
0058f771 124512005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
12452
12453 * DISTLIST: New file.
12454 * gendistlist.sh: Likewise.
f19dbdb7 12455
0058f771 12456 * Makefile.in (COMMON_DISTFILES): Removed.
12457 (BOOT_DISTFILES): Likewise.
12458 (CONF_DISTFILES): Likewise.
12459 (DISK_DISTFILES): Likewise.
12460 (FS_DISTFILES): Likewise.
12461 (INCLUDE_DISTFILES): Likewise.
12462 (KERN_DISTFILES): Likewise.
12463 (LOADER_DISTFILES): Likewise.
12464 (TERM_DISTFILES): Likewise.
12465 (UTIL_DISTFILES): Likewise.
12466 (DISTFILES): Likewise.
12467 (uninstall): Uninstall files in $(pkgdata_DATA).
12468 (DISTLIST): New target.
12469 (distdir): Use the contents of the file DISTLIST to get a list of
12470 distributed files.
12471
46b3b8a5 124722005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
12473
12474 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
12475 descriptor. This is ported from GRUB Legacy.
12476
12477 * gencmdlist.sh: Added an extra semicolon to make it work with
12478 old sed versions. Reported by Robert Bihlmeyer
12479 <robbe@orcus.priv.at>.
12480
5822ff87 124812005-03-08 Yoshinori Okuji <okuji@enbug.org>
12482
12483 Automatic loading of commands is supported.
f19dbdb7 12484
5822ff87 12485 * normal/main.c (read_command_list): New function.
12486 (grub_normal_execute): Call read_command_list.
12487
12488 * normal/command.c (grub_register_command): Return zero or CMD.
12489 Allocate CMD->NAME from the heap.
12490 Initialize CMD->MODULE_NAME to zero.
12491 Find the same name as well. If the same command is found and it is
12492 a dummy command, overwrite members. If it is not a dummy command,
12493 return zero.
12494 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
12495 (grub_command_find): If a dummy command is found, load a module
12496 and retry to find a command only once.
12497
12498 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
12499 make sure that each command is loaded.
12500
12501 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
12502 macro.
12503 (struct grub_command): Remove const from the member `name'.
12504 Add a new member `module_name'.
12505 (grub_register_command): Return grub_command_t.
12506
12507 * commands/help.c (grub_cmd_help): Call grub_command_find to make
12508 sure that each command is loaded.
12509
12510 * genmk.rb (PModule::rule): Specify a module name without the
12511 suffix ".mod" to gencmdlist.sh.
12512
7b1f4b57 125132005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12514
12515 * gencmdlist.sh: New file.
f19dbdb7 12516
7b1f4b57 12517 * genmk.rb (PModule::rule): Generate a rule for a command list.
12518 Clean command.lst.
12519 Generate command.lst from $(COMMANDFILES).
12520
12521 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
12522 (DATA): Added $(pkgdata_DATA).
12523 (install-local): Install files in $(pkgdata_DATA).
12524
062aaf39 125252005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12526
12527 * term/i386/pc/vga.c (debug_command): Removed.
12528 (GRUB_MOD_INIT): Do not register the command "debug".
12529
12530 From Hollis Blanchard:
12531 * commands/configfile.c: New file.
12532 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12533 commands/configfile.c.
12534 (pkgdata_MODULES): Added configfile.mod.
12535 (configfile_mod_SOURCES): New variable.
12536 (configfile_mod_CFLAGS): Likewise.
12537 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12538 commands/configfile.c.
12539 (pkgdata_MODULES): Added configfile.mod.
12540 (configfile_mod_SOURCES): New variable.
12541 (configfile_mod_CFLAGS): Likewise.
12542 * util/grub-emu.c (main): Call grub_configfile_init and
12543 grub_configfile_fini.
12544 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
12545 prototype.
12546 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 12547
cee01aa6 125482005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12549
12550 * normal/arg.c (grub_arg_show_help): Do not show the bug report
12551 address.
12552
12553 * commands/help.c (grub_cmd_help): Do not print newlines after
12554 the last command in print_command_help.
12555
93f3a1d8 125562005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12557
12558 * commands/default.h: New file.
12559 * commands/timeout.h: Likewise.
12560 * normal/context.c: Likewise.
f19dbdb7 12561
93f3a1d8 12562 * util/misc.c: Do not include sys/times.h.
12563 Include sys/time.h and grub/machine/time.h.
12564 (grub_get_rtc): Rewritten with gettimeofday.
12565
12566 * util/grub-emu.c (main): Call grub_default_init and
12567 grub_timeout_init before grub_normal_init, and call
12568 grub_timeout_fini and grub_default_fini after grub_main.
12569
12570 * util/console.c (grub_ncurses_checkkey): Return the read
12571 character or -1.
12572
12573 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
12574 timeouts.
12575
12576 * normal/main.c (read_config_file): Push MENU. If this fails,
12577 print an error and wait for a user input.
12578 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
12579 If a menu is empty or an error occurs, pop MENU.
12580 (grub_normal_execute): Pop and free MENU after grub_menu_run
12581 returns.
12582
12583 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
12584
12585 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
12586 include time.h.
12587 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12588 without GRUB_UTIL.
12589 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
12590 time.h.
12591 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12592 without GRUB_UTIL.
12593
12594 * include/grub/normal.h (struct grub_menu_list): New struct.
12595 (grub_menu_list_t): New type.
12596 (struct grub_context): New struct.
12597 (grub_context_t): New type.
12598 (grub_register_command): Got rid of EXPORT_FUNC.
12599 (grub_unregister_command): Likewise.
12600 (grub_context_get): New prototype.
12601 (grub_context_get_current_menu): Likewise.
12602 (grub_context_push_menu): Likewise.
12603 (grub_context_pop_menu): Likewise.
12604 [GRUB_UTIL] (grub_default_init): Likewise.
12605 [GRUB_UTIL] (grub_default_fini): Likewise.
12606 [GRUB_UTIL] (grub_timeout_init): Likewise.
12607 [GRUB_UTIL] (grub_timeout_fini): Likewise.
12608
12609 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
12610 commands/timeout.c and normal/context.c.
12611 (pkgdata_MODULES): Added default.mod and timeout.mod.
12612 (normal_mod_SOURCES): Added normal/context.c.
12613 (default_mod_SOURCES): New variable.
12614 (default_mod_CFLAGS): Likewise.
12615 (timeout_mod_SOURCES): Likewise.
12616 (timeout_mod_CFLAGS): Likewise.
12617 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
12618 conf/i386-pc.rmk.
12619 (pkgdata_MODULES): Added default.mod and timeout.mod.
12620 (normal_mod_SOURCES): Added normal/context.c.
12621 (default_mod_SOURCES): New variable.
12622 (default_mod_CFLAGS): Likewise.
12623 (timeout_mod_SOURCES): Likewise.
12624 (timeout_mod_CFLAGS): Likewise.
12625
12626 * Makefile.in (all-local): Added $(MKFILES).
12627
4ed2e1dd 126282005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
12629
12630 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
12631 (grub_emu_SOURCES): Likewise.
12632 (pkgdata_MODULES): Add `sun.mod'.
12633 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12634 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12635 `partmap/sun.c'.
12636 (pkgdata_MODULES): Add `sun.mod'.
12637 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12638 * include/grub/partition.h (grub_sun_partition_map_init): New
12639 prototype.
12640 (grub_sun_partition_map_fini): Likewise.
12641 * partmap/sun.c: New file.
12642 * util/grub-emu.c (main): Initialize and de-initialize the sun
12643 partitionmap support.
12644
4d4e372e 126452005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
12646
12647 This implements an Emacs-like menu entry editor.
f19dbdb7 12648
4d4e372e 12649 * normal/menu_entry.c: New file.
f19dbdb7 12650
4d4e372e 12651 * util/console.c (grub_ncurses_putchar): Translate some Unicode
12652 characters to ASCII.
12653 (saved_char): New variable.
12654 (grub_ncurses_checkkey): Rewritten completely.
12655 (grub_ncurses_getkey): Likewise.
12656 (grub_ncurses_init): Call raw instead of cbreak.
12657
12658 * normal/menu.c (print_entry): Do not put a space.
12659 (init_page): Renamed to ...
12660 (grub_menu_init_page): ... this. All callers changed.
12661 (edit_menu_entry): Removed.
12662 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
12663
12664 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
12665
12666 * kern/misc.c (grub_vprintf): Call grub_refresh.
12667
12668 * normal/menu.c (DISP_LEFT): Renamed to ...
12669 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
12670 * normal/menu.c (DISP_UP): Renamed to ...
12671 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
12672 * normal/menu.c (DISP_RIGHT): Renamed to ...
12673 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
12674 * normal/menu.c (DISP_DOWN): Renamed to ...
12675 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
12676 * normal/menu.c (DISP_HLINE): Renamed to ...
12677 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
12678 * normal/menu.c (DISP_VLINE): Renamed to ...
12679 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
12680 * normal/menu.c (DISP_UL): Renamed to ...
12681 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
12682 * normal/menu.c (DISP_UR): Renamed to ...
12683 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
12684 * normal/menu.c (DISP_LL): Renamed to ...
12685 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
12686 * normal/menu.c (DISP_LR): Renamed to ...
12687 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
12688 * normal/menu.c (TERM_WIDTH): Renamed to ...
12689 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
12690 * normal/menu.c (TERM_HEIGHT): Renamed to ...
12691 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
12692 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
12693 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
12694 * normal/menu.c (TERM_MARGIN): Renamed to ...
12695 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
12696 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
12697 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
12698 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
12699 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
12700 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
12701 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
12702 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
12703 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
12704 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
12705 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
12706 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
12707 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
12708 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
12709 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
12710 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
12711 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
12712 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
12713 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
12714 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
12715 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
12716 All callers changed.
12717
12718 * include/grub/normal.h: New prototype.
12719
12720 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12721 normal/menu_entry.c.
12722 (normal_mod_SOURCES): Likewise.
12723 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12724 (normal_mod_SOURCES): Likewise.
12725
e6b92c8a 127262005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
12727
12728 * include/grub/normal.h (grub_halt_init): New prototype.
12729 (grub_halt_fini): Likewise.
12730 (grub_reboot_init): Likewise.
12731 (grub_reboot_fini): Likewise.
12732
12733 * util/grub-emu.c: Include signal.h.
12734 (main_env): New global variable.
12735 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
12736 catch C-c.
12737 (grub_machine_fini): New function.
12738 (main): Call grub_halt_init and grub_reboot_init before
12739 grub_main, and grub_reboot_fini and grub_halt_fini after it.
12740 Call setjmp with MAIN_ENV to go back afterwards.
12741 Call grub_machine_fini right before return.
12742
12743 * include/grub/util/misc.h: Include setjmp.h.
12744 (main_env): New prototype.
12745
12746 * include/grub/kernel.h (grub_machine_fini): New prototype.
12747 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
12748 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
12749
12750 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
12751 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
12752 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 12753
e6b92c8a 12754 * util/i386/pc/misc.c: New file.
f19dbdb7 12755
e6b92c8a 12756 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12757 util/i386/pc/misc.c, commands/i386/pc/halt.c and
12758 commands/i386/pc/reboot.c.
12759
c642636f 127602005-02-14 Guillem Jover <guillem@hadrons.org>
12761
12762 * include/grub/dl.h (grub_dl_check_header): New prototype.
12763 (grub_arch_dl_check_header): Change return type to grub_err_t,
12764 remove size parameter and export function. Update all callers.
12765 * kern/dl.c (grub_dl_check_header): New function.
12766 (grub_dl_load_core): Use `grub_dl_check_header' instead of
12767 `grub_arch_dl_check_header'. Check ELF type. Check if sections
12768 are inside the core.
12769 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
12770 independent ELF header checks.
12771 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12772 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
12773 `grub_dl_check_header' instead of explicit checks. Check for the
12774 ELF type.
12775 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
12776 `grub_dl_check_header' instead of explicit checks. Remove arch
12777 specific ELF header checks.
12778
e6b92c8a 12779 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
12780 argument SIZE.
12781
5eabe94b 127822005-02-13 Hollis Blanchard <hollis@penguinppc.org>
12783
12784 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
12785 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
12786
1b14a681 127872005-02-12 Hollis Blanchard <hollis@penguinppc.org>
12788
12789 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 12790 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 12791 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 12792 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 12793 * partmap/amiga.c (amiga_partition_map_iterate): Return
12794 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
12795 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12796
aca108aa 127972005-02-01 Guillem Jover <guillem@hadrons.org>
12798
12799 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
12800 help info.
12801
c9f9c556 128022005-01-31 Marco Gerards <metgerards@student.han.nl>
12803
12804 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
12805 Removed prototype.
12806 (grub_rescue_cmd_linux): New prototype.
12807 (grub_rescue_cmd_initrd): Likewise.
12808 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
12809 `bi_rec'.
12810 (grub_linux_release_mem): Release the memory for the initrd.
12811 (grub_load_linux): Renamed from this...
12812 (grub_rescue_cmd_linux): ...To this. Changed all callers.
12813 Changed `entry' not to be static. Loop over memory regions to
12814 find another one when the default fails.
12815 (grub_rescue_cmd_initrd): New function.
12816 (grub_linux_init): Remove function.
12817 (grub_linux_fini): Likewise.
12818 (GRUB_MOD_INIT): Register `initrd'.
12819 (GRUB_MOD_FINI): Unregister `initrd'.
12820 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12821 Function removed.
12822 (grub_linux_normal_fini): Likewise.
12823 (GRUB_MOD_INIT): Register `initrd'.
12824 (GRUB_MOD_FINI): Unregister `initrd'.
12825
990cf3aa 128262005-01-31 Marco Gerards <metgerards@student.han.nl>
12827
12828 * commands/help.c: New file.
12829 * normal/arg.c (show_help): Renamed to...
12830 (grub_arg_show_help): ... this.
12831 * commands/i386/pc/halt.c: New file.
12832 * commands/i386/pc/reboot.c: Likewise.
12833 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12834 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12835 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12836 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12837 variables.
12838 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12839 `commands/help.c'.
12840 (pkgdata_MODULES): Add `help.mod'.
12841 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12842 * grub/i386/pc/init.h (grub_reboot): New prototype.
12843 (grub_halt): Likewise.
12844 * include/grub/normal.h (grub_arg_show_help): New prototype.
12845 (grub_help_init): Likewise.
12846 (grub_help_fini): Likewise.
12847 * util/grub-emu.c (main): Initialize and deinitialize the help
12848 command.
12849
12850 * normal/cmdline.c (grub_cmdline_get): Doc fix.
12851
12852 * normal/command.c (grub_command_init): Fixed the description of
12853 the `set' and `unset' commands.
12854
128552005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 12856
12857 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12858 function.
12859 * commands/ieee1275/halt.c: New file.
12860 * commands/ieee1275/reboot.c: Likewise.
12861 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12862 `__attribute__ ((unused))'. Some GCS related fixed.
12863 (grub_suspend_init) [GRUB_UTIL]: Function removed.
12864 (grub_suspend_fini): Likewise.
12865 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12866 and `halt.mod'.
12867 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12868 (halt_mod_CFLAGS): New variables.
12869 * include/grub/powerpc/ieee1275/ieee1275.h
12870 (grub_ieee1275_interpret): New prototype.
12871
1ab09cc7 128722005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
12873
12874 * include/grub/misc.h (memmove): New prototype.
12875 (memcpy): Likewise.
12876
8b8cbdb2 128772005-01-22 Hollis Blanchard <hollis@penguinppc.org>
12878
12879 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12880 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
12881
e3741a27 128822005-01-22 Marco Gerards <metgerards@student.han.nl>
12883
12884 * kern/misc.c (grub_strndup): Function rewritten.
12885
776bd780 128862005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
12887
12888 * normal/menu.c (TERM_WIDTH): Macro redefined.
12889 (TERM_TOP_BORDER_Y): Likewise.
12890 (draw_border): Replaced while-loop by a for-loop. Make the number
12891 of lines consistent with the number of lines displayed in
12892 print_entries. Added a margin below the rectangle.
12893 (print_entry): Make the entry fit in the rectangle.
12894 (print_entries): Display the scroll arrows next to the right
12895 border.
12896
78026bce 128972005-01-21 Marco Gerards <metgerards@student.han.nl>
12898
12899 * fs/minix.c (grub_minix_find_file): Reserve more space for
12900 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
12901 `grub_strncpy' to copy `path' into it.
12902
67bbaf0f 129032005-01-21 Marco Gerards <metgerards@student.han.nl>
12904
12905 Add the loopback device, a device via which files can be accessed
12906 as devices.
f19dbdb7 12907
67bbaf0f 12908 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12909 (pkgdata_MODULES): Add loopback.mod.
12910 (loopback_mod_SOURCES): New variable.
12911 (loopback_mod_CFLAGS): Likewise.
12912 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12913 `disk/loopback.c'.
12914 (pkgdata_MODULES): Add loopback.mod.
12915 (loopback_mod_SOURCES): New variable.
12916 (loopback_mod_CFLAGS): Likewise.
12917 * disk/loopback.c: new file.
12918 * include/grub/normal.h (grub_loop_init): New prototype.
12919 (grub_loop_fini): New prototype.
12920 * util/grub-emu.c (main): Initialize and de-initialize loopback
12921 support.
12922 * include/grub/disk.h (grub_disk_dev_id): Add
12923 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12924
6f1c18bd 129252005-01-20 Hollis Blanchard <hollis@penguinppc.org>
12926
12927 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12928 function.
12929 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12930 (suspend_mod_SOURCES): New variable.
12931 (suspend_mod_CFLAGS): Likewise.
12932 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12933 New prototype.
12934 * commands/ieee1275/suspend.c: New file.
12935
b38551da 129362005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12937
12938 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 12939 ((unused))' to `__attribute__ ((used))'.
b38551da 12940 (GRUB_MOD_FINI): Likewise.
12941 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12942 * genmk.rb (PModule): Assign space to common symbols when linking
12943 modules.
12944
777aff39 129452005-01-20 Marco Gerards <metgerards@student.han.nl>
12946
12947 * include/grub/mm.h (grub_mm_init_region): Change the type of the
12948 `unsigned' arguments to `grub_size_t'.
12949 (grub_malloc): Likewise.
12950 (grub_realloc): Likewise.
12951 (grub_memalign): Likewise.
12952 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12953 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12954 * util/misc.c (grub_malloc): Likewise.
12955 (grub_realloc): Likewise.
12956 * kern/mm.c (get_header_from_pointer): Change the casts to
12957 `unsigned' into a cast to `grub_size_t'.
12958
12959 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12960 point to `currnode' when `currnode' is changed.
12961
12962 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
12963 Schottelius <nico-linux@schottelius.org>.
12964
d0ff18e1 129652005-01-09 Hollis Blanchard <hollis@penguinppc.org>
12966
12967 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
12968 (note_path): Remove variable.
12969 (GRUB_IEEE1275_NOTE_NAME): New macro.
12970 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
12971 (grub_ieee1275_note_hdr): New structure.
12972 (grub_ieee1275_note_desc): Likewise.
12973 (grub_ieee1275_note): Likewise.
12974 (load_note): Remove `dir' argument. All callers updated. Remove
12975 `note_img' and `path'. Do not load a file from `note_path'.
12976 Initialize a struct grub_ieee1275_note and write that to `out'.
12977 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
12978
4ca7004c 129792005-01-05 Marco Gerards <metgerards@student.han.nl>
12980
12981 * util/misc.c (grub_util_read_image): Revert last change. It
12982 called `grub_util_read_at', which seeks from the beginning of the
12983 file.
12984
0b412211 129852005-01-04 Hollis Blanchard <hollis@penguinppc.org>
12986
12987 * TODO: Add note about endianness in grub-mkimage.
12988 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
12989 section.
12990 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
12991 (grub_mkimage_SOURCES): New target.
12992 * include/grub/kernel.h (grub_start_addr): Remove variable.
12993 (grub_end_addr): Likewise.
12994 (grub_total_module_size): Likewise.
12995 (grub_kernel_image_size): Likewise.
12996 (GRUB_MODULE_MAGIC): New constant.
12997 (grub_module_info): New structure.
12998 (grub_arch_modules_addr): New prototype.
12999 (grub_get_end_addr): Remove prototype.
13000 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
13001 * include/grub/powerpc/ieee1275/kernel.h: New file.
13002 * include/grub/util/misc.h (grub_util_get_fp_size): New
13003 prototype.
13004 (grub_util_read_at): Likewise.
13005 (grub_util_write_image_at): Likewise.
13006 * kern/main.c (grub_get_end_addr): Remove function.
13007 (grub_load_modules): Call grub_arch_modules_addr instead of using
13008 grub_end_addr. Look for a grub_module_info struct in memory. Use
13009 the grub_module_info fields instead of calling grub_get_end_addr
13010 as loop conditions. Move grub_add_unused_region code here.
13011 (grub_add_unused_region): Remove function.
13012 * kern/i386/pc/init.c: Include grub/cache.h.
13013 (grub_machine_init): Remove call to grub_get_end_addr. Remove
13014 one call to add_mem_region.
13015 (grub_arch_modules_addr): New function.
13016 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
13017 (grub_total_module_size): Likewise.
13018 Include grub/machine/kernel.h.
13019 (grub_arch_modules_addr): New function.
13020 * util/grub-emu.c (grub_end_addr): Remove variable.
13021 (grub_total_module_size): Likewise.
13022 (grub_arch_modules_addr): New function.
13023 * util/misc.c: Include unistd.h.
13024 (grub_util_get_fp_size): New function.
13025 (grub_util_read_at): Likewise.
13026 (grub_util_write_image_at): Likewise.
13027 (grub_util_read_image): Call grub_util_read_at.
13028 (grub_util_write_image): Call grub_util_write_image_at.
13029 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
13030 additional memory in kernel_img for a struct grub_module_info.
13031 Fill in that grub_module_info.
13032 * util/powerpc/ieee1275/grub-mkimage.c: New file.
13033
458786f8 130342005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13035
13036 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
13037 New function.
13038 * include/grub/powerpc/ieee1275/ieee1275.h
13039 (grub_ieee1275_milliseconds): New prototype.
13040 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
13041 Change to 1000.
13042 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
13043 grub_ieee1275_milliseconds.
13044
ac507d1b 130452005-01-03 Hollis Blanchard <hollis@penguinppc.org>
13046
13047 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
13048 variable.
13049 (find_options): New function.
13050 (cmain): Call find_options.
13051 * include/grub/powerpc/ieee1275/ieee1275.h
13052 (grub_ieee1275_realmode): New extern variable.
13053 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
13054 grub_map if grub_ieee1275_realmode is false.
13055
6b8fd1c4 130562004-12-29 Marco Gerards <metgerards@student.han.nl>
13057
13058 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
13059 lines are inserted and make it work like readline. Reported by
13060 Vincent Pelletier <subdino2004@yahoo.fr>.
13061
8514a1e0 130622004-12-28 Marco Gerards <metgerards@student.han.nl>
13063
13064 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
13065
13066 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
13067 `kern/powerpc/cache.S'.
13068
924b6140 130692004-12-27 Marco Gerards <metgerards@student.han.nl>
13070
13071 * genmk.rb: Handle the `Program' class in the main loop. Written
13072 by Johan Rydberg <jrydberg@gnu.org>.
13073 (Program): New class.
13074 (programs): New variable.
13075 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
13076 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
13077 instead of "grub/kernel.h". Include <grub/machine/init.h>.
13078 (help_arch): Function removed.
13079 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
13080 `powerpc/libgcc.h' and `loader.h'.
13081 (pkgdata_PROGRAMS): New variable.
13082 (sbin_UTILITIES): Variable removed.
13083 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
13084 (grubof_SOURCES): Variable re-defined so it only includes the
13085 core functionality.
13086 (grubof_CFLAGS): Remove `-DGRUBOF'.
13087 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
13088 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
13089 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
13090 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
13091 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
13092 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
13093 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
13094 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
13095 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
13096 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
13097 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13098 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
13099 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
13100 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
13101 (pc_mod_CFLAGS): New variables.
13102 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
13103 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
13104 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
13105 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
13106 Moved from here...
13107 * include/grub/i386/pc/init.h (grub_os_area_addr)
13108 (rub_os_area_size): ... to here.
13109 * include/grub/powerpc/ieee1275/ieee1275.h
13110 (grub_ieee1275_entry_fn): Export symbol.
13111 * include/grub/powerpc/ieee1275/init.h: New file.
13112 * include/grub/powerpc/libgcc.h: Likewise.
13113 * include/grub/cache.h: Likewise.
13114 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
13115 <hollis@penguinppc.org>.
13116 * kern/dl.c: Include <grub/cache.h>.
13117 (grub_dl_flush_cache): New function.
13118 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
13119 for this module.
13120 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
13121 (grub_console_init): Removed prototypes.
13122 (grub_machine_init): Don't initialize the modules anymore.
13123 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
13124 static.
13125 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
13126 Macro undef removed.
13127 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
13128 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
13129 relocation `R_PPC_REL32'. Return an error when the relocation is
13130 unknown.
13131 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
13132 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
13133 * util/misc.c (grub_arch_sync_caches): Likewise.
13134
e4b47e0c 131352004-12-19 Marco Gerards <metgerards@student.han.nl>
13136
13137 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
13138 `symlist.c', add `grubof_symlist.c'.
13139 (symlist.c): Variable removed.
13140 (grubof_HEADERS): Variable added.
13141 (grubof_symlist.c): New target.
13142 (kernel_syms.lst): Use `grubof_HEADERS' instead of
13143 `kernel_img_HEADERS'.
13144 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
13145 * kern/powerpc/dl.c: New file.
13146 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
13147 Function removed.
13148 (grub_arch_dl_relocate_symbols): Likewise.
13149 (grub_register_exported_symbols): Likewise.
13150
4ceb3636 131512004-12-13 Marco Gerards <metgerards@student.han.nl>
13152
13153 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
13154 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
13155 to fail instead. Reported by Vincent Pelletier
13156 <subdino2004@yahoo.fr>.
13157
13158 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
13159 it is not allocated. Reported by Vincent Pelletier
13160 <subdino2004@yahoo.fr>.
13161
13162 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
13163 output so the output looks better.
f19dbdb7 13164
3f1578fe 131652004-12-04 Marco Gerards <metgerards@student.han.nl>
13166
13167 Modulize the partition map support and add support for the amiga
13168 partition map.
f19dbdb7 13169
3f1578fe 13170 * commands/ls.c: Include <grub/partition.h> instead of
13171 <grub/machine/partition.h>.
13172 * kern/disk.c: Likewise.
13173 * kern/rescue.c: Likewise.
13174 * loader/i386/pc/chainloader.c: Likewise.
13175 * normal/cmdline.c: Likewise.
13176 * kern/powerpc/ieee1275/init.c: Likewise.
13177 (grub_machine_init): Call `grub_pc_partition_map_init',
13178 `grub_amiga_partition_map_init' and
13179 `grub_apple_partition_map_init'.
13180 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
13181 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
13182 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
13183 `partition.h' and `pc_partition.h'.
13184 (grub_setup_SOURCES): Remove
13185 `disk/i386/pc/partition.c'. Add `kern/partition.c',
13186 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13187 (grub_emu_SOURCES): Likewise.
13188 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
13189 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
13190 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
13191 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13192 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
13193 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13194 (grubof_SOURCES): Likewise.
13195 * disk/i386/pc/partition.c: File removed.
13196 * disk/powerpc/ieee1275/partition.c: Likewise.
13197 * include/grub/powerpc/ieee1275/partition.h: Likewise.
13198 * include/grub/i386/pc/partition.h: Likewise.
13199 * kern/partition.c: New file.
13200 * partmap/amiga.c: Likewise.
13201 * partmap/apple.c: Likewise.
13202 * partmap/pc.c: Likewise.
13203 * include/grub/partition.h: Likewise..
13204 * include/grub/pc_partition.h: Likewise.
13205 * util/grub-emu.c: Include <grub/partition.h> instead of
13206 <grub/machine/partition.h>.
13207 (main): Call `grub_pc_partition_map_init',
13208 `grub_amiga_partition_map_init' and
13209 `grub_apple_partition_map_init' and deinitialize afterwards.
13210 * util/i386/pc/biosdisk.c: Include `#include
13211 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13212 `<grub/machine/partition.h>'.
13213 * util/i386/pc/grub-setup.c: Likewise.
13214 * util/i386/pc/biosdisk.c: Likewise.
13215 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
13216 partition information in case of a PC partition.
13217 * util/i386/pc/grub-setup.c: Include `#include
13218 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13219 `<grub/machine/partition.h>'.
13220 (setup): Only access the PC specific partition information in case
13221 of a PC partition.
13222
0ef4ced9 132232004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 13224
0ef4ced9 13225 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
13226 (grub_longjmp): Likewise.
13227 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
13228 20.
13229 * normal/powerpc/setjmp.S: New file.
13230 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13231 `normal/powerpc/setjmp.S'.
13232 (grubof_CFLAGS): Add `-DGRUBOF'.
13233 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
13234 [GRUB_UTIL && !GRUBOF].
f19dbdb7 13235
19950e29 132362004-11-16 Marco Gerards <metgerards@student.han.nl>
13237
13238 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
13239 property named `name'. Correctly handle the error returned by
13240 `grub_ieee1275_finddevice' if a device can not be opened.
13241
a2fea427 132422004-11-02 Hollis Blanchard <hollis@penguinppc.org>
13243
13244 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
13245 `actual' for negativity.
13246 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13247 kern/fshelp.c.
13248
41ea0ea3 132492004-11-01 Marco Gerards <metgerards@student.han.nl>
13250
13251 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
13252 (PAGE_OFFSET): New macro.
13253 (CRTC_ADDR_PORT): Likewise.
13254 (CRTC_DATA_PORT): Likewise.
13255 (START_ADDR_HIGH_REGISTER): Likewise.
13256 (START_ADDR_LOW_REGISTER): Likewise.
13257 (GRAPHICS_ADDR_PORT): Likewise.
13258 (GRAPHICS_DATA_PORT): Likewise.
13259 (READ_MAP_REGISTER): Likewise.
13260 (INPUT_STATUS1_REGISTER): Likewise.
13261 (INPUT_STATUS1_VERTR_BIT): Likewise.
13262 (page): New variable.
13263 (wait_vretrace): New function.
13264 (set_read_map): Likewise.
13265 (set_start_address): Likewise.
13266 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
13267 the right page.
13268 (check_vga_mem): Take the page into account.
13269 (write_char): Likewise.
13270 (write_cursor): Likewise.
13271 (scroll_up): Likewise. Copy the page to the page that is not
13272 shown and switch between both pages.
13273 (grub_vga_putchar): Fix off by one error.
13274 (grub_vga_cls): Wait for the vertical retrace. Take the page into
13275 account.
13276
ad0bd20b 132772004-11-01 Marco Gerards <metgerards@student.han.nl>
13278
13279 Add support for iso9660 (including rockridge).
f19dbdb7 13280
ad0bd20b 13281 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13282 (iso9660_mod_SOURCES): New variable.
13283 (iso9660_mod_CFLAGS): Likewise.
13284 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13285 * include/grub/fs.h (grub_iso9660_init): New prototype.
13286 * util/grub-emu.c (main): Call `grub_iso9660_init'.
13287 * fs/iso9660.c: New file.
13288
13289 * include/grub/misc.h (grub_strncat): New prototype.
13290 * kern/misc.c (grub_strncat): New function.
f19dbdb7 13291
ad0bd20b 13292 * fs/hfs.c (grub_hfs_mount): Translate the error
13293 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
13294 * fs/jfs.c (grub_jfs_mount): Likewise.
13295 * fs/ufs.c (grub_ufs_mount): Likewise.
13296
a5477a59 132972004-10-28 Hollis Blanchard <hollis@penguinppc.org>
13298
13299 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
13300 which initialized BAT registers.
13301 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
13302 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13303 Move from here...
13304 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
13305 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13306 ... to here.
13307 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
13308 (grub_mapclaim): Likewise.
13309 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
13310 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
13311 hand.
13312
9304c1f8 133132004-10-19 Hollis Blanchard <hollis@penguinppc.org>
13314
13315 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
13316 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
13317 -ffreestanding and -msoft-float.
13318
86f4ae25 133192004-10-15 Hollis Blanchard <hollis@penguinppc.org>
13320
13321 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
13322 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
13323 set in grub_ieee1275_flags.
13324
38912228 133252004-10-14 Hollis Blanchard <hollis@penguinppc.org>
13326
13327 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
13328 prototype.
13329 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
13330 grub_console_init first.
13331 Change the memory range used for grub_ieee1275_claim and
13332 grub_mm_init_region.
13333 Print an error message if the claim fails.
13334 Include <grub/misc.h>.
13335
d1923dc8 133362004-10-13 Hollis Blanchard <hollis@penguinppc.org>
13337
13338 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
13339 Call grub_children_iterate for device nodes of type `scsi',
13340 `ide', or `ata'.
13341 (grub_ofdisk_open): Remove manual device alias resolution.
13342 Fix memory leak when device cannot be opened.
f19dbdb7 13343 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 13344 (grub_children_iterate): New prototype.
13345 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
13346 New function.
13347 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13348 Return -1 if args.size was -1.
13349
4512e4f3 133502004-10-11 Hollis Blanchard <hollis@penguinppc.org>
13351
13352 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
13353 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
13354 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
13355 Open Firmware's memory for it; claim memory from _start to _end.
13356 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
13357 (_end): New extern.
13358 (_start): Zero BSS from __bss_start to _end.
13359 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13360 New extern.
13361 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
13362
4d61feb0 133632004-10-11 Hollis Blanchard <hollis@penguinppc.org>
13364
ad0bd20b 13365 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
13366 -1 if args.base was -1.
4d61feb0 13367
026fa2f9 133682004-10-08 Hollis Blanchard <hollis@penguinppc.org>
13369
13370 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
13371 escape sequence instead of a literal ^L. Also call
13372 grub_ofconsole_gotoxy.
13373
9f2220ef 133742004-10-03 Hollis Blanchard <hollis@penguinppc.org>
13375
13376 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
13377 void * arguments to grub_addr_t. All callers updated. Also make
13378 the `result' argument optional.
13379 (grub_ieee1275_release): change void * arguments to grub_addr_t.
13380 All callers updated.
13381
8a572cd7 133822004-09-22 Hollis Blanchard <hollis@penguinppc.org>
13383
13384 * commands/ls.c (grub_ls_list_files): Use the string following the
13385 initial ')', if present, as the filesystem path.
13386 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
13387
13388 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
13389
18aa81f2 133902004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
13391
13392 Make the source code of the menu interface more readable.
f19dbdb7 13393
18aa81f2 13394 * normal/menu.c: Include grub/mm.h.
13395 (TERM_WIDTH): New macro.
13396 (TERM_HEIGHT): Likewise.
13397 (TERM_INFO_HEIGHT): Likewise.
13398 (TERM_MARGIN): Likewise.
13399 (TERM_SCROLL_WIDTH): Likewise.
13400 (TERM_TOP_BORDER_Y): Likewise.
13401 (TERM_LEFT_BORDER_X): Likewise.
13402 (TERM_BORDER_WIDTH): Likewise.
13403 (TERM_MESSAGE_HEIGHT): Likewise.
13404 (TERM_BORDER_HEIGHT): Likewise.
13405 (TERM_NUM_ENTRIES): Likewise.
13406 (TERM_FIRST_ENTRY_Y): Likewise.
13407 (TERM_ENTRY_WIDTH): Likewise.
13408 (TERM_CURSOR_X): Likewise.
13409 (draw_border): Use macros instead of magic numbers.
13410 (print_entry): Likewise.
13411 (print_entries): Likewise.
13412 (run_menu): Likewise. Also, handle the key 'e'.
13413 (run_menu_entry): Ignore empty command lines.
13414 (print_message): Added a new argument EDIT. If EDIT is true,
13415 print a different message.
13416 (init_page): Likewise.
13417 (edit_menu_entry): New function. Not implemented yet.
13418
b47efe30 134192004-09-17 Marco Gerards <metgerards@student.han.nl>
13420
13421 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
13422 can be loaded from normal mode.
f19dbdb7 13423
b47efe30 13424 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
13425 `multiboot.mod'.
13426 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
13427 (multiboot_mod_CFLAGS): New variables.
13428 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 13429 * loader/i386/pc/multiboot_normal.c: Likewise.
13430
b47efe30 13431 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
13432 attribute `unused'.
f19dbdb7 13433
b47efe30 13434 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
13435 `fdiro' to read the mode information from instead of `diro'.
13436
13437 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
13438 looking up a symlink.
13439
13440 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
13441 macro.
13442 * normal/command.c (grub_command_execute): Don't parse the
13443 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
13444 flags of the command.
13445
13446 * normal/menu.c (grub_menu_run): Fix typo.
13447
da75ac71 134482004-09-14 Hollis Blanchard <hollis@penguinppc.org>
13449
13450 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
13451
13452 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
13453 `y + 1' instead of `y - 1'.
13454
13455 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 13456
062b24c2 134572004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
13458
13459 From Hollis Blanchard <hollis@penguinppc.org>:
13460 * kern/misc.c (memmove): New alias for grub_memmove.
13461 (memcmp): New alias for grub_memcmp.
13462 (memset): New alias for grub_memset.
f19dbdb7 13463 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 13464 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 13465 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 13466 (grub_ieee1275_get_property): Likewise.
f19dbdb7 13467
8ddad845 134682004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
13469
13470 Added normal mode command `chainloader' as module chain.mod, which
13471 depends on normal.mod and _chain.mod.
f19dbdb7 13472
8ddad845 13473 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
13474 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
13475 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
13476 Deleted prototype.
13477 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
13478 but arguments parsing moved to ...
13479 (grub_chainloader_cmd): ... here. New function.
13480 * include/grub/i386/pc/chainloader.h: New file.
13481 * loader/i386/pc/chainloader_normal.c: Likewise.
13482
2c1f4ce3 134832004-09-11 Marco Gerards <metgerards@student.han.nl>
13484
13485 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
13486 (grub_mkimage_LDFLAGS): Likewise.
13487 (grub_emu_SOURCES): Likewise.
13488 (kernel_img_HEADERS): Added fshelp.h.
13489 * fs/ext2.c: Include <grub/fshelp.h>.
13490 (FILETYPE_REG): New macro.
13491 (FILETYPE_INO_REG): Likewise.
13492 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
13493 Changed all users.
13494 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
13495 all users.
13496 (grub_fshelp_node): New struct.
13497 (grub_ext2_data): Added member `diropen'. Changed member `inode'
13498 to a pointer.
13499 (grub_ext2_get_file_block): Removed function.
13500 (grub_ext2_read_block): New function.
13501 (grub_ext2_read_file): Replaced parameter `data' by `node'.
13502 This function was written.
13503 (grub_ext2_mount): Read the root inode. Create a diropen struct.
13504 (grub_ext2_find_file): Removed function.
13505 (grub_ext2_read_symlink): New function.
13506 (grub_ext2_iterate_dir): Likewise.
13507 (grub_ext2_open): Rewritten.
13508 (grub_ext2_dir): Rewritten.
13509 * include/grub/fshelp.h: New file.
13510 * fs/fshelp.c: Likewise.
13511
3c52136a 135122004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
13513
13514 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
13515 (print_message): Add a missing newline.
13516 (run_menu): Added timeout support.
13517 (run_menu_entry): New local function.
13518 (grub_menu_run): Added support for booting.
13519
13520 * kern/loader.c (grub_loader_is_loaded): New function.
13521
13522 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
13523 (grub_get_rtc): Exported.
13524
13525 * include/grub/i386/pc/time.h: Include grub/symbol.h.
13526 (grub_get_rtc): Exported.
13527
13528 * include/grub/normal.h (struct grub_command_list): Remove
13529 constant from the member `command'.
13530
13531 * include/grub/loader.h (grub_loader_is_loaded): Declared.
13532
13533 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
13534
13535 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
13536
aa033560 135372004-08-28 Marco Gerards <metgerards@student.han.nl>
13538
13539 Add support for the JFS filesystem.
13540
13541 * fs/jfs.c: New file.
13542 * include/grub/fs.h (grub_jfs_init): New prototype.
13543 (grub_jfs_fini): New prototype.
13544 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
13545 (grub_emu_SOURCES): Likewise.
13546 (pkgdata_MODULES): Add jfs.mod.
13547 (jfs_mod_SOURCES): New variable.
13548 (jfs_mod_CFLAGS): Likewise.
13549 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
13550 (grubof_SOURCES): Likewise.
13551 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
13552
13553 * fs/fat.c (grub_fat_find_dir): Convert the filename little
13554 endian to the host endian.
13555 (grub_fat_utf16_to_utf8): Move function from there...
13556 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 13557 the endianness of the source string anymore.
aa033560 13558 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
13559
94bc45af 135602004-08-24 Marco Gerards <metgerards@student.han.nl>
13561
13562 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
13563 (grub_boot_fini) [GRUB_UTIL]: Likewise.
13564 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
13565 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 13566
94bc45af 13567 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
13568 (grub_hfs_iterate_dir): Make the function static. Add prototypes
13569 for `node_found' and `it_dir'.
13570 (grub_hfs_dir): Add prototype for `dir_hook'.
13571
13572 * fs/minix.c (grub_minix_get_file_block): Add prototype for
13573 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
13574 and `indir32' to silence a gcc warning.
13575
13576 * include/grub/fs.h (grub_hfs_init): New prototype.
13577 (grub_hfs_fini): Likewise.
f19dbdb7 13578
13579
97543f08 135802004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13581
13582 Each disk device has its own id now. This is useful to make use
13583 of multiple disk devices.
f19dbdb7 13584
97543f08 13585 * include/grub/disk.h (grub_disk_dev_id): New enum.
13586 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
13587 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
13588
13589 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
13590 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13591
13592 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
13593 GRUB_DISK_DEVICE_OFDISK_ID as an id.
13594
13595 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
13596 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13597
13598 * include/grub/disk.h (struct grub_disk_dev): Added a new member
13599 "id" which is used by the cache manager.
13600
13601 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
13602 of just "GRUB".
13603
64372eb4 136042004-08-18 Marco Gerards <metgerards@student.han.nl>
13605
13606 * fs/hfs.c: New file.
13607 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
13608 (grub_emu_SOURCES): Likewise.
13609 (pkgdata_MODULES): Add hfs.mod.
13610 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
13611 (grubof_SOURCES): Likewise.
13612 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
13613
13614 * include/grub/misc.h (grub_strncasecmp): Add prototype.
13615 * kern/misc.c (grub_strncasecmp): Add function.
13616
cc61b58f 136172004-08-14 Marco Gerards <metgerards@student.han.nl>
13618
13619 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
13620 with parentheses.
13621
13622 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
13623 (grub_ext2_dir): In case the directory entry type is unknown, read
13624 it from the inode.
13625
0ef123f6 136262004-08-02 Peter Bruin <pjbruin@dds.nl>
13627
13628 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
13629 grub_load_linux instead of grub_rescue_cmd_linux as second
13630 argument of grub_rescue_register_command.
13631
13632 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
13633
a447c5df 136342004-07-27 Marco Gerards <metgerards@student.han.nl>
13635
13636 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
13637 function.
13638 * commands/boot.c: Remove the check for `GRUB_UTIL'.
13639 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13640 `loader/powerpc/ieee1275/linux.c',
13641 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
13642 * include/grub/powerpc/ieee1275/ieee1275.h
13643 (grub_ieee1275_release): New prototype.
13644 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
13645 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
13646 normal, boot, linux and linux_normal.
13647 * loader/powerpc/ieee1275/linux.c: New file.
13648 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13649
5a9e3546 136502004-07-12 Marco Gerards <metgerards@student.han.nl>
13651
13652 * normal/arg.c (grub_arg_parse): Correct error handling after
13653 reallocating the argumentlist (check if `argl' is not null instead
13654 of checking if `args' is not null).
13655 * kern/mm.c (grub_realloc): Return the same pointer when using the
13656 same region, instead of returning the header address.
13657
e15199cb 136582004-07-11 Marco Gerards <metgerards@student.han.nl>
13659
13660 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
13661 one block instead of two when looking for the initial partition.
13662 (grub_partition_probe): Initialize the local variable `p' with 0.
13663 Use base 10 for the grub_strtoul call.
13664 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
13665 need for one local variable.
13666 (grub_strtoul): Don't add the new value to `num', instead of that
13667 just assign it.
13668
020616c2 136692004-07-11 Marco Gerards <metgerards@student.han.nl>
13670
13671 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
13672 (pxeboot_img_SOURCES): New variable.
13673 (pxeboot_img_ASFLAGS): Likewise.
13674 (pxeboot_img_LDFLAGS): Likewise.
13675 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
13676 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
13677 <lode_leroy@hotmail.com>.
13678
6c51eb64 136792004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13680
13681 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
13682 there was no input.
13683
cfb12aff 136842004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13685
13686 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
13687 the history buffer logic.
13688
6eabba74 136892004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13690
13691 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
13692 (FILETYPE_INO_SYMLINK): New macros.
13693 (grub_ext2_find_file): Check if the node is a directory using the
13694 inode stat information instead of using the filetype in the
13695 dirent. Exclude the first character of an absolute symlink.
13696 (grub_ext2_dir): Mask out the filetype part of the mode member of
13697 the inode.
13698
66e19ef8 136992004-05-24 Marco Gerards <metgerards@student.han.nl>
13700
13701 Add support for UFS version 1 and 2. Add support for the minix
13702 filesystem version 1 and 2, both the variants with 14 and 30 long
13703 filenames.
f19dbdb7 13704
66e19ef8 13705 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
13706 fs/minix.c.
13707 (grub_emu_SOURCES): Likewise.
13708 (pkgdata_MODULES): Add ufs.mod and minix.mod.
13709 (ufs_mod_SOURCES): New variable.
13710 (ufs_mod_CFLAGS): Likewise.
13711 (minix_mod_SOURCES): Likewise.
13712 (minix_mod_CFLAGS): Likewise.
13713 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
13714 fs/minix.c.
13715 (grubof_SOURCES): Likewise.
13716 * fs/ufs.c: New file.
13717 * fs/minix.c: New file.
13718 * include/grub/fs.h (grub_ufs_init): New prototype.
13719 (grub_ufs_fini): Likewise.
13720 (grub_minix_init): Likewise.
13721 (grub_minix_fini): Likewise.
13722 * util/grub-emu.c (main): Initialize and deinitialize UFS and
13723 minix fs.
13724
cc2e748a 137252004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
13726
13727 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
13728 commands/ls.c, commands/terminal.c, commands/boot.c,
13729 commands/cmp.c and commands/cat.c.
13730 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
13731
13732 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
13733 "env.h"
13734
4b13b216 137352004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13736
13737 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
13738 and grub_, respectively. Because the conversion is trivial and
13739 mechanical, I omit the details here. Please refer to the CVS
13740 if you need more information.
13741
6a142551 137422004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13743
13744 * include/pupa: Renamed to ...
13745 * include/grub: ... this.
13746 * util/i386/pc/pupa-mkimage.c: Renamed to ...
13747 * util/i386/pc/grub-mkimage.c: ... this.
13748 * util/i386/pc/pupa-setup.c: Renamed to ...
13749 * util/i386/pc/grub-setup.c: ... this.
13750 * util/pupa-emu.c: Renamed to ...
13751 * util/grub-emu.c: ... this.
13752
e56cdf21 137532004-03-29 Marco Gerards <metgerards@student.han.nl>
13754
13755 Add support for the newworld apple macintosh (PPC). This has been
13756 tested on the powerbook 2000 only. It only adds support for
13757 generic ieee1275 functions, console and disk support. This should
13758 be easy to port to other architectures with support for Open
13759 Firmware.
f19dbdb7 13760
e56cdf21 13761 * configure.ac: Accept the powerpc as host_cpu. In the case of
13762 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
13763 specific tests are only executed while building for the i386.
13764 Inverse test for crosscompile.
13765 * genmk.rb (Utility): Allow assembler files.
13766 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
13767 * conf/powerpc-ieee1275.rmk: New file.
13768 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
13769 * disk/powerpc/ieee1275/partition.c: Likewise.
13770 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
13771 * include/pupa/powerpc/ieee1275/console.h: Likewise.
13772 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
13773 * include/pupa/powerpc/ieee1275/time.h: Likewise.
13774 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
13775 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
13776 * include/pupa/powerpc/ieee1275/loader.h
13777 * include/pupa/powerpc/setjmp.h: Likewise.
13778 * include/pupa/powerpc/types.h: Likewise.
13779 * kern/powerpc/ieee1275/init.c: Likewise.
13780 * kern/powerpc/ieee1275/openfw.c: Likewise.
13781 * term/powerpc/ieee1275/ofconsole.c: Likewise.
13782
13783 These files were written by Johan Rydberg
13784 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 13785
e56cdf21 13786 * boot/powerpc/ieee1275/cmain.c: New file.
13787 * boot/powerpc/ieee1275/crt0.S: Likewise.
13788 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
13789 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
13790
8c8cc205 137912004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
13792
13793 * Makefile.in: Update copyright.
13794 * genmodsrc.sh: Likewise.
13795 * gensymlist.sh: Likewise.
13796 * term/i386/pc/vga.c: Indent correctly.
13797
13798 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
13799 bugreporting address.
13800 * util/i386/pc/pupa-setup.c (usage): Likewise,
13801 (main): Call pupa_ext2_init and pupa_ext2_fini.
13802
f19dbdb7 13803 * fs/fat.c (log2): Renamed to ...
8c8cc205 13804 (fat_log2): ... this.
13805 All callers changed.
13806 * kern/misc.c (memcpy): Alias to pupa_memmove.
13807 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
13808 lvalue cast.
13809 * util/console.c (pupa_ncurses_fini): Return 0.
13810
13811 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
13812 Move fail label here.
13813 [__GNU__]: Don't warn when using stat.
13814 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
13815 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
13816 long int. Use strtol instead of strtoul.
f19dbdb7 13817
db1771cf 138182004-03-14 Marco Gerards <metgerards@student.han.nl>
13819
13820 * commands/boot.c: New file.
13821 * commands/cat.c: Likewise.
13822 * commands/cmp.c: Likewise.
13823 * commands/ls.c: Likewise.
13824 * commands/terminal.c: Likewise.
13825 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13826 (pupa_register_command): Changed interface to match the new
13827 argument parser.
13828 (pupa_command_execute): Changed (almost rewritten) so it uses
13829 pupa_split_command. Added support for setting variables using the
13830 syntax `foo=bar'.
13831 (rescue_command): Changed to work with the new argument parser.
13832 (terminal_command): Moved from here to commands/terminal.c.
13833 (set_command): New function.
13834 (unset_command): New function.
13835 (insmod_command): New function.
13836 (rmmod_command): New function.
13837 (lsmod_command): New function.
13838 (pupa_command_init): Don't initialize the command terminal
13839 anymore. Initialize the commands set, unset, insmod, rmmod and
13840 lsmod.
13841 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13842 (kernel_img_HEADERS): Add arg.h and env.h.
13843 (pupa_mkimage_LDFLAGS): Add kern/env.c.
13844 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13845 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13846 normal/arg.c.
13847 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13848 terminal.mod.
13849 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13850 (boot_mod_SOURCES): New variable.
13851 (terminal_mod_SOURCES): Likewise.
13852 (ls_mod_SOURCES): Likewise.
13853 (cmp_mod_SOURCES): Likewise.
13854 (cat_mod_SOURCES): Likewise.
13855
13856 * normal/arg.c: New file.
13857 * kern/env.c: Likewise.
13858 * include/pupa/arg.h: Likewise.
13859 * include/pupa/env.h: Likewise.
13860 * font/manager.c (font_command): Changed to match argument parsing
13861 interface changes.
13862 (PUPA_MOD_INIT): Likewise.
13863 * hello/hello.c (pupa_cmd_hello): Likewise.
13864 (PUPA_MOD_INIT): Likewise.
13865 * include/pupa/disk.h: Include <pupa/device.h>.
13866 (pupa_print_partinfo): New prototype.
13867 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13868 (pupa_dl_get_prefix): Likewise.
13869 * include/pupa/misc.h: Include <pupa/err.h>.
13870 (pupa_isgraph): New prototype.
13871 (pupa_isdigit): Likewise.
13872 (pupa_split_cmdline): Likewise.
13873 * include/pupa/normal.h: Include <pupa/arg.h>.
13874 (pupa_command): Changed the prototype of the member `func' to
13875 match the argument parsing interface. Added member `options'.
13876 (pupa_register_command): Updated to match function.
13877 (pupa_arg_parse): New prototype.
13878 (pupa_hello_init) [PUPA_UTIL]: New prototype.
13879 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13880 (pupa_ls_init) [PUPA_UTIL]: Likewise.
13881 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13882 (pupa_cat_init) [PUPA_UTIL]: Likewise.
13883 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13884 (pupa_boot_init) [PUPA_UTIL]: Likewise.
13885 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13886 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13887 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13888 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13889 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13890 * kern/disk.c: Include <pupa/file.h>.
13891 (pupa_print_partinfo): New function.
13892 * kern/dl.c: Include <pupa/env.h>.
13893 (pupa_dl_dir): Variable removed.
13894 (pupa_dl_load): Use the environment variable `prefix' instead of
13895 the variable pupa_dl_dir.
13896 (pupa_dl_set_prefix): Function removed.
13897 (pupa_dl_get_prefix): Likewise.
13898 * kern/i386/pc/init.c: Include <pupa/env.h>.
13899 (pupa_machine_init): Use the environment variable `prefix' instead of
13900 using pupa_dl_set_prefix to set the prefix.
13901 * kern/main.c: Include <pupa/env.h>.
13902 (pupa_set_root_dev): Use the environment variable `prefix' instead of
13903 using pupa_dl_get_prefix to get the prefix.
13904 * kern/misc.c: Include <pupa/env.h>.
13905 (pupa_isdigit): New function.
13906 (pupa_isgraph): Likewise.
13907 (pupa_ftoa): Likewise.
13908 (pupa_vsprintf): Added support for printing values of the type
13909 `double'. Make it possible to format variable output when using
13910 formatting like `%1.2%f'.
13911 (pupa_split_cmdline): New function.
13912 * kern/rescue.c: Include <pupa/env.h>.
13913 (next_word): Removed function.
13914 (pupa_rescue_cmd_prefix): Likewise.
13915 (pupa_rescue_cmd_set): New function.
13916 (pupa_rescue_cmd_unset): New function.
13917 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13918 split the command line instead of splitting it here. Added
13919 support for setting variables using the syntax `foo=bar'. Don't
13920 initialize the prefix command anymore. Initialized the set and
13921 unset commands.
13922 * normal/cmdline.c: Include <pupa/env.h>.
13923 (pupa_tab_complete): Added prototypes for print_simple_completion,
13924 print_partition_completion, add_completion, iterate_commands,
13925 iterate_dev, iterate_part and iterate_dir. Moved code to print
13926 partition information from here to kern/disk.c.
fe6b695a 13927 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 13928 * normal/main.c: Include <pupa/env.h>.
13929 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13930 instead of using pupa_dl_get_prefix to get the prefix.
13931 * term/i386/pc/vga.c: Include <pupa/arg.h>.
13932 (check_vga_mem): Cast pointers to `void *' to silence a gcc
13933 warning.
13934 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13935 (pupa_vga_setcolor): Declare unused variables with `__attribute__
13936 ((unused))' to silence a gcc warning.
13937 (pupa_vga_setcolor): Likewise.
13938 (debug_command): Changed to match argument parsing
13939 interface changes.
13940 * util/pupa-emu.c: Include <pupa/env.h>.
13941 (options): Added 0's for unused fields to silence a gcc warning.
13942 (argp): Likewise.
13943 (main): Use the environment variable `prefix' instead of using
13944 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
13945 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
13946 and terminal.
13947
13948 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13949 * util/misc.c: Include <malloc.h>.
13950 (pupa_malloc): Rewritten so errors are correctly reported.
13951 (pupa_realloc): Likewise.
13952 (pupa_memalign): Likewise.
13953 (pupa_mm_init_region): Declare unused variables with
13954 `__attribute__ ((unused))' to silence a gcc warning.
13955 * normal/i386/setjmp.S: Remove tab at the end of the file to
13956 silence a gcc warning.
13957 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13958 variables with `__attribute__ ((unused))' to silence a gcc
13959 warning.
13960 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13961 local variable i unsigned to silence a gcc warning.
13962
13963 * kern/term.c: Include <pupa/misc.h>.
13964 (pupa_more_lines): New variable.
13965 (pupa_more): Likewise.
13966 (pupa_putcode): When the pager is active pause at the end of every
13967 screen.
13968 (pupa_set_more): New function.
13969 * include/pupa/term.h (pupa_set_more): New prototype.
13970
13971
3b1139cb 139722004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
13973
13974 Now this project is GRUB 2 rather than PUPA. The location of
13975 the CVS repository was moved to GRUB's.
f19dbdb7 13976
3b1139cb 13977 * configure.ac: Use bug-grub as the reporting address.
13978 Use GRUB instead of PUPA.
13979 Change the version number to 1.90.
13980
8367695c 139812004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
13982
13983 * genkernsyms.sh: Updated copyright information.
13984 * genmk.rb: Likewise.
13985 * genmodsrc.sh: Likewise.
13986 * gensymlist.sh: Likewise.
13987 * boot/i386/pc/boot.S: Likewise.
13988 * boot/i386/pc/diskboot.S: Likewise.
13989 * disk/i386/pc/biosdisk.c: Likewise.
13990 * disk/i386/pc/partition.c: Likewise.
13991 * font/manager.c: Likewise.
13992 * fs/ext2.c: Likewise.
13993 * fs/fat.c: Likewise.
13994 * include/pupa/boot.h: Likewise.
13995 * include/pupa/device.h: Likewise.
13996 * include/pupa/disk.h: Likewise.
13997 * include/pupa/dl.h: Likewise.
13998 * include/pupa/elf.h: Likewise.
13999 * include/pupa/err.h: Likewise.
14000 * include/pupa/file.h: Likewise.
14001 * include/pupa/font.h: Likewise.
14002 * include/pupa/fs.h: Likewise.
14003 * include/pupa/kernel.h: Likewise.
14004 * include/pupa/loader.h: Likewise.
14005 * include/pupa/misc.h: Likewise.
14006 * include/pupa/mm.h: Likewise.
14007 * include/pupa/net.h: Likewise.
14008 * include/pupa/normal.h: Likewise.
14009 * include/pupa/rescue.h: Likewise.
14010 * include/pupa/setjmp.h: Likewise.
14011 * include/pupa/symbol.h: Likewise.
14012 * include/pupa/term.h: Likewise.
14013 * include/pupa/types.h: Likewise.
14014 * include/pupa/i386/setjmp.h: Likewise.
14015 * include/pupa/i386/types.h: Likewise.
14016 * include/pupa/i386/pc/biosdisk.h: Likewise.
14017 * include/pupa/i386/pc/boot.h: Likewise.
14018 * include/pupa/i386/pc/console.h: Likewise.
14019 * include/pupa/i386/pc/init.h: Likewise.
14020 * include/pupa/i386/pc/kernel.h: Likewise.
14021 * include/pupa/i386/pc/linux.h: Likewise.
14022 * include/pupa/i386/pc/loader.h: Likewise.
14023 * include/pupa/i386/pc/memory.h: Likewise.
14024 * include/pupa/i386/pc/multiboot.h: Likewise.
14025 * include/pupa/i386/pc/partition.h: Likewise.
14026 * include/pupa/i386/pc/time.h: Likewise.
14027 * include/pupa/i386/pc/vga.h: Likewise.
14028 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
14029 * include/pupa/util/getroot.h: Likewise.
14030 * include/pupa/util/misc.h: Likewise.
14031 * include/pupa/util/resolve.h: Likewise.
14032 * kern/device.c: Likewise.
14033 * kern/disk.c: Likewise.
14034 * kern/dl.c: Likewise.
14035 * kern/err.c: Likewise.
14036 * kern/file.c: Likewise.
14037 * kern/fs.c: Likewise.
14038 * kern/loader.c: Likewise.
14039 * kern/main.c: Likewise.
14040 * kern/misc.c: Likewise.
14041 * kern/mm.c: Likewise.
14042 * kern/rescue.c: Likewise.
14043 * kern/term.c: Likewise.
14044 * kern/i386/dl.c: Likewise.
14045 * kern/i386/pc/init.c: Likewise.
14046 * kern/i386/pc/lzo1x.S: Likewise.
14047 * kern/i386/pc/startup.S: Likewise.
14048 * loader/i386/pc/chainloader.c: Likewise.
14049 * loader/i386/pc/linux.c: Likewise.
14050 * loader/i386/pc/multiboot.c: Likewise.
14051 * normal/cmdline.c: Likewise.
14052 * normal/command.c: Likewise.
14053 * normal/main.c: Likewise.
14054 * normal/menu.c: Likewise.
14055 * normal/i386/setjmp.S: Likewise.
14056 * term/i386/pc/console.c: Likewise.
14057 * term/i386/pc/vga.c: Likewise.
14058 * util/console.c: Likewise.
14059 * util/genmoddep.c: Likewise.
14060 * util/misc.c: Likewise.
14061 * util/pupa-emu.c: Likewise.
14062 * util/resolve.c: Likewise.
14063 * util/unifont2pff.rb: Likewise.
14064 * util/i386/pc/biosdisk.c: Likewise.
14065 * util/i386/pc/getroot.c: Likewise.
14066 * util/i386/pc/pupa-mkimage.c: Likewise.
14067 * util/i386/pc/pupa-setup.c: Likewise.
14068
e6eced71 140692004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
14070
14071 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
14072 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
14073 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
14074 reading and reset it after reading.
14075 (pupa_ext2_close): Return PUPA_ERR_NONE.
14076
14077 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
14078 Correct value.
14079 (struct linux_kernel_header): Add kernel_version and
14080 initrd_addr_max.
14081 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
14082 pupa_file_read succeeds.
14083 (pupa_rescue_cmd_initrd): Implement.
14084
5aded270 140852003-12-03 Marco Gerards <metgerards@student.han.nl>
14086
14087 * fs/ext2.c (pupa_ext2_label): New function.
14088 (pupa_ext2_fs): Added label.
14089 * fs/fat.c (pupa_fat_label): New function.
14090 (pupa_fat_fs): Added label.
14091 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
14092
14093 * kern/misc.c (pupa_strndup): New function.
14094 * include/pupa/misc.h (pupa_strndup): New prototype.
14095
14096 * include/pupa/normal.h: Include <pupa/err.h>.
14097 (pupa_set_history): New prototype.
14098 (pupa_iterate_commands): New prototype.
14099 * normal/cmdline.c: Include <pupa/machine/partition.h>,
14100 <pupa/disk.h>, <pupa/file.h>.
14101 (hist_size): New variable.
14102 (hist_lines): Likewise.
14103 (hist_end): Likewise.
14104 (hist_used): Likewise.
14105 (pupa_set_history): New function.
14106 (pupa_history_get): Likewise.
14107 (pupa_history_add): Likewise.
14108 (pupa_history_replace): Likewise.
14109 (pupa_tab_complete): Likewise.
14110 (pupa_cmdline_run): Added tab completion and history buffer. Tab
14111 completion shows partitionnames while completing partitions, this
14112 feature was suggested by Jeff Bailey.
14113 * normal/command.c (pupa_iterate_commands): New function.
14114 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
14115 (pupa_normal_init): Initialize history buffer.
14116 (PUPA_MOD_INIT): Likewise.
14117 (pupa_normal_fini): Free the history buffer.
14118 (PUPA_MOD_FINI): Likewise.
14119
14120 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
14121 key.
14122
14123 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
14124 * configure.ac [i386]: Check for regparam bug.
14125 (NESTED_FUNC_ATTR) [! i386]: Defined.
14126
1f7315a3 141272003-11-17 Marco Gerards <metgerards@student.han.nl>
14128
14129 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
14130 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
14131 (pupa_emu_SOURCES): New variable.
14132 (pupa_emu_LDFLAGS): Likewise.
14133 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
14134 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
14135 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
14136 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14137 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
14138 (pupa_jmp_buf): New typedef.
14139 (pupa_setjmp) [PUPA_UTIL]: New macro.
14140 (pupa_longjmp) [PUPA_UTIL]: Likewise.
14141 * include/pupa/term.h (struct pupa_term): New member `refresh'.
14142 (pupa_refresh): New prototype.
14143 * include/pupa/util/getroot.h: New file.
14144 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
14145 it.
14146 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
14147 (pupa_rescue_cmd_cat): Likewise.
14148 (pupa_rescue_cmd_ls): Likewise.
14149 (pupa_rescue_cmd_testload): Likewise.
14150 (pupa_rescue_cmd_lsmod): Likewise.
14151 * normal/cmdline.c (pupa_cmdline_get): Likewise.
14152 * normal/menu.c (run_menu): Likewise.
14153 * kern/term.c (pupa_cls): Likewise.
14154 (pupa_refresh): New function.
14155 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
14156 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14157 * util/console.c: New file.
f19dbdb7 14158
1f7315a3 14159 * util/i386/pc/getroot.c: New file.
14160 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
14161 (pupa_putchar): New function.
14162 (pupa_refresh): Likewise.
14163 (xgetcwd): Function moved to ...
14164 (strip_extra_slashes): Likewise.
14165 (get_prefix): Likewise.
f19dbdb7 14166 * util/i386/pc/getroot.c: ... here.
1f7315a3 14167 (find_root_device): Function moved and renamed to...
14168 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
14169 Changed all callers.
14170 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
14171 and renamed to...
14172 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
14173 Changed all callers.
14174 * util/misc.c (pupa_memalign): New function.
14175 (pupa_mm_init_region): Likewise.
14176 (pupa_register_exported_symbols): Likewise.
14177 (pupa_putchar): Function removed.
14178 * util/pupa-emu.c: New file.
14179
9a5c1ade 141802003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
14181
14182 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
14183 (_multiboot_mod_SOURCES): New variable.
14184 (_multiboot_mod_CFLAGS): Likewise.
14185 * loader/i386/pc/multiboot.c: New file.
14186 * include/pupa/i386/pc/multiboot.h: Likewise.
14187 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
14188 (pupa_multiboot_real_boot): New function.
14189 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
14190 (pupa_multiboot_real_boot): New prototype.
14191 (pupa_rescue_cmd_multiboot): Likewise
14192 (pupa_rescue_cmd_module): Likewise.
14193
14194 * kern/loader.c (pupa_loader_set): Continue when
14195 pupa_loader_unload_func() fails.
14196 (pupa_loader_unset): New function.
14197 * include/pupa/loader.h (pupa_loader_unset): New prototype.
14198
14199 * kern/misc.c (pupa_stpcpy): New function.
14200 * include/pupa/misc.h (pupa_stpcpy): New prototype.
14201
8e72a9c0 142022003-11-12 Marco Gerards <metgerards@student.han.nl>
14203
14204 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
14205 for available extensions.
14206
14207 * include/pupa/i386/pc/time.h: New file.
14208 * kern/disk.c: Include <pupa/machine/time.h>.
14209 (PUPA_CACHE_TIMEOUT): New macro.
14210 (pupa_last_time): New variable.
14211 (pupa_disk_open): Flush the cache when there was a timeout.
14212 (pupa_disk_close): Reset the timer.
14213 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
14214 pupa_currticks.
14215 * util/misc.c: Include <sys/times.h>
14216 (pupa_get_rtc): New function.
14217
c4adbd32 142182003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
14219
14220 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
14221 as blocks.
14222 (pupa_ext2_get_file_block): Use blocks member.
14223
14224 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
14225 first block. Return -1 instead of pupa_errno on error.
14226
bfd30f06 142272003-10-27 Marco Gerards <metgerards@student.han.nl>
14228
14229 * README: In the pupa-mkimage example use _chain instead of chain
14230 and ext2 instead of fat.
14231 * TODO: Replace ext2fs with jfs as an example. Add an item for
14232 adding journal playback for ext2fs.
14233 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
14234 (pkgdata_MODULES): Added ext2.mod.
14235 (ext2_mod_SOURCES): New variable.
14236 (ext2_mod_CFLAGS): Likewise.
14237 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
14238 * include/pupa/misc.h (pupa_strncpy): New prototype.
14239 (pupa_strcat): Likewise.
14240 (pupa_strncmp): Likewise.
14241 * kern/misc.c (pupa_strcat): Enable function.
14242 (pupa_strncpy): New function.
14243 (pupa_strncmp): Likewise.
14244 * fs/ext2.c: New file.
f19dbdb7 14245
bfd30f06 14246 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
14247 when the read failed before retrying.
14248 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
14249 (_FILE_OFFSET_BITS): Likewise.
14250 * configure.ac: Added AC_SYS_LARGEFILE.
14251
98d15063 142522003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14253
14254 * genmk.rb (PModule#rule): Make sure to get only symbol names
14255 from the output of nm.
14256 Reported by Robert Millan <zeratul2@wanadoo.es>.
14257
18d9c7cd 142582003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14259
14260 I forgot to check in these changes for a long time. This adds
14261 incomplete support for VGA console, and this is still very
14262 buggy. Also, a lot of consideration is required for I18N,
14263 UNICODE, and VGA font issues. Therefore, assume that this is
14264 such that "better than nothing".
f19dbdb7 14265
18d9c7cd 14266 * font/manager.c: New file.
14267 * include/pupa/font.h: Likewise.
14268 * include/pupa/i386/pc/vga.h: Likewise.
14269 * term/i386/pc/vga.c: Likewise.
14270 * util/unifont2pff.rb: Likewise.
14271
14272 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
14273 (pkgdata_MODULES): Added vga.mod and font.mod.
14274 (vga_mod_SOURCES): New variables.
14275 (vga_mod_CFLAGS): Likewise.
14276 (font_mod_SOURCES): Likewise.
14277 (font_mod_CFLAGS): Likewise.
14278
14279 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
14280
14281 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 14282 (struct pupa_term): Added init and fini.
18d9c7cd 14283 Changed the argument of putchar to pupa_uint32_t.
14284
14285 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
14286 (pupa_console_real_putchar): New prototype.
14287 (pupa_console_putchar): Removed.
14288 (pupa_console_checkkey): Exported.
14289 (pupa_console_getkey): Likewise.
14290
14291 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
14292 characters.
14293
14294 * kern/term.c (pupa_term_set_current): Rewritten.
14295 (pupa_putchar): Likewise.
14296 (pupa_putcode): New function.
14297
14298 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
14299 (pupa_console_real_putchar): ... this.
14300 (pupa_vga_set_mode): New function.
14301 (pupa_vga_get_font): Likewise.
14302
14303 * normal/command.c: Include pupa/term.h.
14304 (terminal_command): New function.
14305 (pupa_command_init): Register the command "terminal".
14306
14307 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
14308 (DISP_UP): Likewise.
14309 (DISP_RIGHT): Likewise.
14310 (DISP_DOWN): Likewise.
14311 (DISP_HLINE): Likewise.
14312 (DISP_VLINE): Likewise.
14313 (DISP_UL): Likewise.
14314 (DISP_UR): Likewise.
14315 (DISP_LL): Likewise.
14316 (DISP_LR): Likewise.
14317
14318 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 14319
977329f5 143202003-02-08 NIIBE Yutaka <gniibe@m17n.org>
14321
14322 * util/resolve.c (pupa_util_resolve_dependencies): BUG
14323 FIX. Reverse the path_list.
14324
14325 * include/pupa/normal.h: Export pupa_register_command and
14326 pupa_unregister_command.
14327
14328 * hello/hello.c (pupa_cmd_hello): New module.
14329 * conf/i386-pc.rmk: Added hello.mod.
14330
1f5ab428 143312003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
14332
14333 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 14334
1f5ab428 14335 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
14336 (compress_kernel): New variable.
14337 (generate_image): Heavily modified to support compressing a
14338 large part of the core image.
14339
14340 * util/misc.c (pupa_util_read_image): Fix a file descriptor
14341 leak.
14342 (pupa_util_load_image): New function.
14343
14344 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
14345 (pupa_compressed_size): New variable.
14346 (codestart): Enable Gate A20 here.
14347 Decompress the compressed part of the core image.
14348 Rearrange the code to put functions and variables which are
14349 required for initialization in the non-compressed part.
14350 Include lzo1x.S.
14351
14352 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
14353 here.
14354
14355 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
14356
f19dbdb7 14357 * include/pupa/i386/pc/kernel.h
1f5ab428 14358 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
14359 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
14360 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14361 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14362 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
14363
14364 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
14365
14366 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
14367 (Utility#rule): Likewise.
14368
14369 * configure.ac: Check if LZO is available.
14370
ce5bf700 143712003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
14372
14373 * include/pupa/normal.h: New file.
14374 * include/pupa/setjmp.h: Likewise.
14375 * include/pupa/i386/setjmp.h: Likewise.
14376 * normal/cmdline.c: Likewise.
14377 * normal/command.c: Likewise.
14378 * normal/main.c: Likewise.
14379 * normal/menu.c: Likewise.
14380 * normal/i386/setjmp.S: Likewise.
f19dbdb7 14381
ce5bf700 14382 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
14383 (pupa_rescue_cmd_initrd): Likewise.
14384
14385 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
14386 Likewise.
14387
14388 * kern/i386/pc/startup.S (translation_table): New variable.
14389 (translate_keycode): New function.
14390 (pupa_console_getkey): Call translate_keycode.
14391
14392 * kern/rescue.c (attempt_normal_mode): New function.
14393 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
14394 it failed, print a message.
14395
14396 * kern/mm.c (pupa_real_malloc): Print more information when a
14397 free magic is broken.
14398 (pupa_free): If the first free header is not free actually, set
14399 it to P.
14400
14401 * kern/main.c (pupa_load_normal_mode): Just load the module
14402 "normal".
14403 (pupa_main): Don't print the message
14404 "Entering into rescue mode..." here.
14405
14406 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
14407 Declared.
14408 (pupa_rescue_cmd_initrd): Likewise.
14409 (pupa_rescue_cmd_initrd): Likewise.
14410
14411 * include/pupa/symbol.h (FUNCTION): Specify the type.
14412 (VARIABLE): Likewise.
14413
14414 * include/pupa/err.h (pupa_err_t): Added
14415 PUPA_ERR_UNKNOWN_COMMAND.
14416
14417 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
14418 (pupa_dl_get_prefix): Likewise.
14419
14420 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
14421 Added _chain.mod and _linux.mod instead of chain.mod and
14422 linux.mod.
14423 (chain_mod_SOURCES): Renamed to ...
14424 (_chain_mod_SOURCES): ... this.
14425 (chain_mod_CFLAGS): Renamed to ...
14426 (_chain_mod_CFLAGS): ... this.
14427 (linux_mod_SOURCES): Renamed to ...
14428 (_linux_mod_SOURCES): ... this.
14429 (linux_mod_CFLAGS): Renamed to ...
14430 (_linux_mod_CFLAGS): ... this.
14431 (normal_mod_SOURCES): New variable.
14432 (normal_mod_CFLAGS): Likewise.
14433 (normal_mod_ASFLAGS): Likewise.
14434
144352003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
14436
14437 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
14438 possible.
14439
fe6b695a 14440 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 14441 recursively.
14442 (pupa_dl_unref): Unrefer depending modules recursively.
14443 Don't call pupa_dl_unload implicitly, because PUPA can crash if
14444 a module is unloaded before one depending on that module is
14445 unloaded.
14446 (pupa_dl_unload): Unload depending modules explicitly,
14447 if possible.
14448
c04da074 144492003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
14450
14451 * include/pupa/i386/pc/linux.h: New file.
14452 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 14453
c04da074 14454 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
14455 Removed.
14456 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
14457 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
14458 of PUPA_CHAINLOADER_BOOT_SECTOR.
14459
14460 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
14461 (pupa_linux_prot_size): New variable.
14462 (pupa_linux_tmp_addr): Likewise.
14463 (pupa_linux_real_addr): Likewise.
14464 (pupa_linux_boot_zimage): New function.
14465 (pupa_linux_boot_bzimage): Likewise.
14466
14467 * kern/i386/pc/init.c (struct mem_region): New structure.
14468 (MAX_REGIONS): New macro.
14469 (mem_regions): New variable.
14470 (num_regions): Likewise.
14471 (pupa_os_area_addr): Likewise.
14472 (pupa_os_area_size): Likewise.
14473 (pupa_lower_mem): Likewise.
14474 (pupa_upper_mem): Likewise.
14475 (add_mem_region): New function.
14476 (compact_mem_regions): Likewise.
14477 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
14478 the size of the conventional memory and that of so-called upper
14479 memory (before the first memory hole).
14480 Instead of adding each found region to free memory, use
14481 add_mem_region and add them after removing overlaps.
14482 Also, add only 1/4 of the upper memory to free memory. The rest
14483 is used for loading OS images. Maybe this is ad hoc, but this
14484 makes it much easier to relocate OS images when booting.
14485
14486 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
14487 (pupa_enter_rescue_mode): Don't register initrd and module.
14488
14489 * kern/mm.c: Include pupa/dl.h.
14490
14491 * kern/main.c: Include pupa/file.h and pupa/device.h.
14492
14493 * kern/loader.c (pupa_loader_load_module_func): Removed.
14494 (pupa_loader_load_module): Likewise.
14495
14496 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
14497 ``.o''.
14498
14499 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
14500 (pupa_linux_tmp_addr): Likewise.
14501 (pupa_linux_real_addr): Likewise.
14502 (pupa_linux_boot_zimage): Likewise.
14503 (pupa_linux_boot_bzimage): Likewise.
14504
14505 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
14506 (pupa_upper_mem): Likewise.
14507 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
14508 module is too dangerous.
14509
14510 * include/pupa/loader.h (pupa_os_area_addr): Declared.
14511 (pupa_os_area_size): Likewise.
14512 (pupa_loader_set): Remove the first argument. Loader doesn't
14513 manage modules or initrd any longer.
14514 (pupa_loader_load_module): Removed.
14515
14516 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
14517 (linux_mod_SOURCES): New variable.
14518 (linux_mod_CFLAGS): Likewise.
14519
a13f9237 145202003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
14521
14522 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
14523 the length of a blocklist correctly.
14524
14525 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
14526 Use ioctl only if the OS file is a block device.
14527 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
14528 not very useful for normal files.
14529
14530 * kern/main.c (pupa_set_root_dev): New function.
14531 (pupa_load_normal_mode): Likewise.
14532 (pupa_main): Call those above.
14533
14534 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
14535 pupa_uint16_t.
14536
14537 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
14538
a5ffe966 145392003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
14540
14541 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
14542 (setup): Configure the installed partition information and the
14543 dl prefix.
14544
14545 * loader/i386/pc/chainloader.c (my_mod): New variable.
14546 (pupa_chainloader_unload): New function.
14547 (pupa_rescue_cmd_chainloader): Refer itself.
14548 (PUPA_MOD_INIT): Save its own module in MY_MOD.
14549
14550 * kern/i386/pc/startup.S (install_partition): Removed.
14551 (version_string): Likewise.
14552 (config_file): Likewise.
14553 (pupa_install_dos_part): New variable.
14554 (pupa_install_bsd_part): Likewise.
14555 (pupa_prefix): Likewise.
14556 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
14557
14558 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
14559 and pupa/misc.h.
14560 (make_install_device): New function.
14561 (pupa_machine_init): Set the dl prefix.
14562
14563 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
14564 (buf): Renamed to ...
14565 (linebuf): ... this.
14566 (pupa_rescue_cmd_prefix): New function.
14567 (pupa_rescue_cmd_insmod): Likewise.
14568 (pupa_rescue_cmd_rmmod): Likewise.
14569 (pupa_rescue_cmd_lsmod): Likewise.
14570 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
14571 rmmod and lsmod.
14572
14573 * kern/mm.c (pupa_memalign): If failed even after invalidating
14574 disk caches, unload unneeded modules and retry.
14575
14576 * kern/misc.c (pupa_memmove): New function.
14577 (pupa_memcpy): Removed.
14578 (pupa_strcpy): New function.
14579 (pupa_itoa): Made static.
14580
14581 * kern/dl.c (pupa_dl_iterate): New function.
14582 (pupa_dl_ref): Likewise.
14583 (pupa_dl_unref): Likewise.
14584 (pupa_dl_unload): Return if succeeded or not.
14585 (pupa_dl_unload_unneeded): New function.
14586 (pupa_dl_unload_all): Likewise.
14587 (pupa_dl_init): Renamed to ...
14588 (pupa_dl_set_prefix): ... this.
14589 (pupa_dl_get_prefix): New function.
14590
14591 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
14592 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
14593 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14594 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14595 (pupa_install_dos_part): Declared.
14596 (pupa_install_bsd_part): Likewise.
14597 (pupa_prefix): Likewise.
14598 (pupa_boot_drive): Likewise.
14599
14600 * include/pupa/types.h: Fix a typo.
14601
14602 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
14603 pupa_memmove.
14604 (pupa_memmove): Declared.
14605 (pupa_strcpy): Likewise.
14606
14607 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
14608 pupa_mod_init takes one argument, its own module.
14609 (pupa_dl_unload_unneeded): Declared.
14610 (pupa_dl_unload_all): Likewise.
14611 (pupa_dl_ref): Likewise.
14612 (pupa_dl_unref): Likewise.
14613 (pupa_dl_iterate): Likewise.
14614 (pupa_dl_init): Renamed to ...
14615 (pupa_dl_set_prefix): ... this.
14616 (pupa_dl_get_prefix): Declared.
14617
14618 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 14619 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 14620 unloaded.
14621 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
14622 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
14623
14624 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
14625 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
14626
012d7999 146272003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14628
14629 * util/i386/pc/pupa-setup.c (setup): Define the internal
14630 function find_first_partition_start at the top level, because GCC
14631 3.0.x cannot compile internal functions in deeper scopes
14632 correctly.
14633 (find_root_device): Use lstat instead of stat.
14634 Don't follow symbolic links.
14635 Fix the path-constructing code.
14636
14637 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
14638 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
14639 by a BLKGETSIZE ioctl first, because block devices don't fill
14640 the member st_mode of the structure stat on Linux.
14641 [__linux__] (linux_find_partition): Use a temporary buffer
14642 REAL_DEV for the working space. Copy it to DEV before returning.
14643 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
14644 buffer cache consistent.
14645 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
14646 strncmp. The previous value was merely wrong.
14647 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
14648
14649 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
14650 FAT size is 12. The previous value was merely wrong.
14651
14652 * kern/main.c (pupa_main): Don't split the starting message from
14653 newlines.
14654
14655 * kern/term.c (pupa_putchar): Put CR after LF instead of before
14656 LF, because BIOS goes crazy about character attributes in this
14657 case.
14658
1cc73a62 146592003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14660
14661 * include/i386/pc/util/biosdisk.h: New file.
14662 * util/i386/pc/biosdisk.c: Likewise.
14663 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 14664
1cc73a62 14665 * Makefile.in (INCLUDE_DISTFILES): Added
14666 include/pupa/i386/pc/util/biosdisk.h.
14667 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
14668 directory util/i386/pc.
14669 (install-local): Added a rule for sbin_UTILITIES.
14670 (uninstall): Likewise.
14671
14672 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
14673
14674 * util/misc.c (xrealloc): New function.
14675 (pupa_malloc): Likewise.
14676 (pupa_free): Likewise.
14677 (pupa_realloc): Likewise.
14678 (pupa_stop): Likewise.
14679 (pupa_putchar): Likewise.
14680
14681 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
14682
14683 * include/pupa/util/misc.h (xrealloc): Declared.
14684
14685 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
14686 macro.
14687 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
14688 (PUPA_BOOT_MACHINE_BPB_END): ... this.
14689
14690 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
14691 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14692
14693 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
14694 way should be implemented.
14695 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14696
14697 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
14698 the size of NAME for safety.
14699 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
14700 0x88.
14701
14702 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
14703 (pupa_setup_SOURCES): Likewise.
14704
14705 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
14706
08b70fe8 147072002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14708
14709 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
14710 bunch of pushl's from pusha, because this destroys the return
14711 value.
14712
62ddcc8f 147132002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14714
14715 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
14716 This means that any missing prototypes could be fatal. Also, you
14717 must take care when writing assembly code. See the comments at
14718 the beginning of startup.S, for more details.
f19dbdb7 14719
62ddcc8f 14720 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
14721 compilation mechanism.
14722 (pupa_chainloader_real_boot): Likewise.
14723 (pupa_biosdisk_rw_int13_extensions): Likewise.
14724 (pupa_biosdisk_rw_standard): Likewise.
14725 (pupa_biosdisk_check_int13_extensions): Likewise.
14726 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
14727 (pupa_biosdisk_get_diskinfo_standard): Likewise.
14728 (pupa_get_memsize): Likewise.
14729 (pupa_get_mmap_entry): Likewise.
14730 (pupa_console_putchar): Likewise.
14731 (pupa_console_setcursor): Likewise.
14732 (pupa_getrtsecs): Use pushl instead of push.
14733
14734 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
14735 memory instead of the stack for a mmap entry, because some
14736 BIOSes may ignore the maximum size and overflow.
14737
14738 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
14739
14740 * genmk.rb (PModule#rule): Compile automatically generated
14741 sources with module-specific CFLAGS as well as other sources.
14742
9962ed99 147432002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14744
14745 * configure.ac: Check ld.
14746 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
14747 respectively, before checking endianness and sizes.
14748
14749 * Makefile.in (LD): New variable.
f19dbdb7 14750
abdfc3c5 147512002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14752
14753 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
14754
6a161fa9 147552002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14756
14757 * Changelog: New file.
14758