]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2009-03-01 Bean <bean123ch@gmail.com>
[grub2.git] / ChangeLog
CommitLineData
71b9f361 12009-03-01 Bean <bean123ch@gmail.com>
2
3 * commands/terminal.c: Removed.
4
5 * commands/handler.c: New file.
6
7 * include/grub/list.h: Likewise.
8
9 * include/grub/handler.h: Likewise.
10
11 * kern/list.c: Likewise.
12
13 * kern/handler.c: Likewise.
14
15 * kern/term.h: Include header file <grub/handler.h>.
16 (grub_term_input): Move next field to the beginning.
17 (grub_term_output): Likewise.
18 (grub_term_input_class): New variable.
19 (grub_term_output_class): Likewise.
20 (grub_term_register_input): Changed to inline function.
21 (grub_term_register_output): Likewise.
22 (grub_term_unregister_input): Likewise.
23 (grub_term_unregister_output): Likewise.
24 (grub_term_set_current_input): Likewise.
25 (grub_term_set_current_output): Likewise.
26 (grub_term_get_current_input): Likewise.
27 (grub_term_get_current_output): Likewise.
28 (grub_term_iterate_input): Removed.
29 (grub_term_iterate_output): Likewise.
30
31 * kern/term.c (grub_term_list_input): Removed.
32 (grub_term_list_output): Likewise.
33 (grub_term_input_class): New variable.
34 (grub_term_output_class): Likewise.
35 (grub_cur_term_input): Change varaible as macro.
36 (grub_cur_term_output): Likewise.
37 (grub_term_register_input): Removed.
38 (grub_term_register_output): Likewise.
39 (grub_term_unregister_input): Likewise.
40 (grub_term_unregister_output): Likewise.
41 (grub_term_set_current_input): Likewise.
42 (grub_term_set_current_output): Likewise.
43 (grub_term_iterate_input): Likewise.
44 (grub_term_iterate_output): Likewise.
45 (grub_term_get_current_input): Likewise.
46 (grub_term_get_current_output): Likewise.
47
48 * util/grub-editenv.c: Include header file <grub/handler.h>.
49 (grub_term_get_current_input): Removed.
50 (grub_term_get_current_output): Likewise.
51 (grub_term_input_class): New variable.
52 (grub_term_outout_class): Likewise.
53
54 * util/grub-fstest.c (grub_term_get_current_input): Removed.
55 (grub_term_get_current_output): Likewise.
56 (grub_term_input_class): New variable.
57 (grub_term_outout_class): Likewise.
58
59 * util/grub-probe.c (grub_term_get_current_input): Removed.
60 (grub_term_get_current_output): Likewise.
61 (grub_term_input_class): New variable.
62 (grub_term_outout_class): Likewise.
63
64 * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
65 (grub_term_get_current_output): Likewise.
66 (grub_term_input_class): New variable.
67 (grub_term_outout_class): Likewise.
68
69 * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
70 (terminal_mod_SOURCES): Likewise.
71 (terminal_mod_CFLAGS): Likewise.
72 (terminal_mod_LDFLAGS): Likewise.
73
74 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
75 handler.c.
76 (kernel_img_SOURCES): Add list.c and handler.c.
77 (kernel_img_HEADERS): Add list.h and handler.h.
78
79 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
80 handler.c.
81 (kernel_mod_SOURCES): Add list.c and handler.c.
82 (kernel_mod_HEADERS): Add list.h and handler.h.
83
84 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
85 handler.c.
86 (kernel_elf_SOURCES): Add list.c and handler.c.
87 (kernel_elf_HEADERS): Add list.h and handler.h.
88
89 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
90 handler.c.
91 (kernel_elf_SOURCES): Add list.c and handler.c.
92 (kernel_elf_HEADERS): Add list.h and handler.h.
93
94 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
95 handler.c.
96 (kernel_mod_SOURCES): Add list.c and handler.c.
97 (kernel_mod_HEADERS): Add list.h and handler.h.
98
99 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
100 handler.c.
101 (kernel_elf_SOURCES): Add list.c and handler.c.
102 (kernel_elf_HEADERS): Add list.h and handler.h.
103
8a31787f 1042009-02-27 Robert Millan <rmh@aybabtu.com>
105
106 Factorize elf32 / elf64 code in Multiboot loader. This will
107 prevent it from getting out of sync again.
108
109 * loader/i386/multiboot.c (grub_multiboot_is_elf32,
110 grub_multiboot_load_elf32, grub_multiboot_is_elf64,
111 grub_multiboot_load_elf64): Move from here ...
112 * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
113 grub_multiboot_load_elf): ... to here (new file).
114
51cd3dfc 1152009-02-27 Robert Millan <rmh@aybabtu.com>
116
117 * util/grub.d/10_linux.in: Rename "single-user mode" to
118 "recovery mode".
119
6e8c9c3a 1202009-02-27 Vladimir Serbinenko <phcoder@gmail.com>
121
122 Don't leak in SCSI code.
123 * disk/scsi.c (grub_scsi_close): free `scsi'.
124
4b6bf4f9 1252009-02-27 Robert Millan <rmh@aybabtu.com>
126
127 * loader/i386/pc/multiboot.c: Move from here ...
128 * loader/i386/multiboot.c: ... to here. Update all users.
129
b9413424 1302009-02-27 Robert Millan <rmh@aybabtu.com>
131
132 Patch from Alexandre Bique <bique.alexandre@gmail.com>
133 * util/i386/pc/grub-setup.c (setup): Fix directory path.
134
34519c3f 1352009-02-27 Krzysztof Smiechowicz <deadwood@wp.pl>
136
137 * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
138 b-tree.
139
8cc50345 1402009-02-27 Robert Millan <rmh@aybabtu.com>
141
142 * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
143 `0x' qualifier as 0 when base is specified as parameter).
144
6e09b8b7 1452009-02-24 Bean <bean123ch@gmail.com>
146
147 * configure.ac: Check for -mcmodel=large in x86_64 target.
148
149 * include/grub/efi/api.h (efi_call_10): New macro.
150 (efi_wrap_10): New function.
151
152 * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
153 (GRUB_PE32_REL_BASED_HIGH): Likewise.
154 (GRUB_PE32_REL_BASED_LOW): Likewise.
155 (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
156 (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
157 (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
158 (GRUB_PE32_REL_BASED_SECTION): Likewise.
159 (GRUB_PE32_REL_BASED_REL): Likewise.
160 (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
161 (GRUB_PE32_REL_BASED_DIR64): Likewise.
162 (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
163
164 * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
165 issue.
166
167 * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
168 (efi_wrap_10): New function.
169
170 * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
171
172 * loader/efi/appleloader.c (devpath_5): Add support for late 2008
173 MB/MBP model (NV chipset).
174 (devdata_devs): Add devpath_5 to the list.
175
176 * load/i386/efi/linux.c (video_base): Remove variable.
177 (RGB_MASK): New macro.
178 (RGB_MAGIC): Likewise.
179 (LINE_MIN): Likewise.
180 (LINE_MAX): Likewise.
181 (FBTEST_STEP): Likewise.
182 (FBTEST_COUNT): Likewise.
183 (fb_list): New variable.
184 (grub_find_video_card): Remove function.
185 (find_framebuf): New function.
186 (grub_linux_setup_video): Use find_framebuf to get frame buffer and
187 line length.
188
189 * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
190 problem for x86_64.
191
74b21bee 1922009-02-22 Vesa Jääskeläinen <chaac@nic.fi>
193
194 Patch #25624 by Kevin Lacquement <kevin@lacqui>.
195
196 * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
197 coding tool name.
198
a455f472 1992009-02-22 Robert Millan <rmh@aybabtu.com>
200
201 * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
202 * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
203 in our relocation, instead of using it directly from heap. Also
204 use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
205
6374daf3 2062009-02-21 Robert Millan <rmh@aybabtu.com>
207
208 Implement USB keyboard support (based on patch by Marco Gerards)
209
210 * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
211 (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
212 (usb_keyboard_mod_LDFLAGS): New variables.
213
214 * term/usb_keyboard.c: New file.
215
8fa4ea70 2162009-02-14 Vladimir Serbinenko <phcoder@gmail.com>
217
218 Corrected wrong declaration
219
220 * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
221
353976ac 2222009-02-14 Christian Franke <franke@computer.org>
223
224 * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
225 (grub_lspci_iter): Print class code and programming interface byte.
226
6aa1169b 2272009-02-14 Christian Franke <franke@computer.org>
228
229 * gendistlist.sh: Ignore `.svn' directories.
230
265372ca 2312009-02-14 Felix Zielcke <fzielcke@z-51.de>
232
233 * fs/fat.c: Add 2009 to Copyright line.
234
9ff516f3 2352009-02-14 Christian Franke <franke@computer.org>
236
237 * commands/hdparm.c: New file. Provides `hdparm' command
238 which sends ATA commands via grub_disk_ata_pass_through ().
239
240 * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
241
242 * disk/ata.c: Include <grub/ata.h>. Move <grub/misc.h>
243 and <grub/cpu/io.h> to include/grub/ata.h.
244 (enum grub_ata_addressing_t): Move to include/grub/ata.h.
245 (GRUB_CDROM_SECTOR_SIZE): Remove.
246 (GRUB_ATA_*): Move to include/grub/ata.h.
247 (GRUB_ATAPI_*): Likewise.
248 (enum grub_ata_commands): Likewise.
249 (enum grub_ata_timeout_milliseconds): Likewise.
250 (struct grub_ata_device): Likewise.
251 (grub_ata_regset): Likewise.
252 (grub_ata_regget): Likewise.
253 (grub_ata_regset2): Likewise.
254 (grub_ata_regget2): Likewise.
255 (grub_ata_check_ready): Likewise.
256 (grub_ata_wait_not_busy): Remove static, exported in
257 include/grub/ata.h.
258 (grub_ata_wait_drq): Likewise.
259 (grub_ata_pio_read): Likewise.
260
261 * disk/ata_pthru.c: New file. Provides grub_ata_pass_through ()
262 function for hdparm.mod.
263
264 * include/grub/ata.h: New file, contains declarations from
265 disk/ata.c.
266 (enum grub_ata_commands): Add new commands for commands/hdparm.c.
267
268 * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
269 (grub_disk_ata_pass_through): New exported variable.
270
271 * kern/disk.c (grub_disk_ata_pass_through): New variable.
272
772e23da 2732009-02-13 Colin D Bennett <colin@gibibit.com>
274
275 Support multiple fallback entries, and provide an API to support
276 executing default+fallback menu entries. Renamed the `terminal' menu
277 viewer to `text'.
278
279 * include/grub/normal.h (grub_normal_text_menu_viewer): New global
280 variable declaration.
281 (grub_menu_execute_callback): New structure declaration.
282 (grub_menu_execute_callback_t): New typedef.
283 (grub_menu_execute_with_fallback): New function declaration.
284 (grub_menu_get_entry): Likewise.
285 (grub_menu_get_timeout): Likewise.
286 (grub_menu_set_timeout): Likewise.
287
288 * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
289
290 * normal/menu.c (grub_wait_after_message): Moved to
291 `normal/menu_text.c'.
292 (draw_border): Likewise.
293 (print_message): Likewise.
294 (print_entry): Likewise.
295 (print_entries): Likewise.
296 (grub_menu_init_page): Likewise.
297 (get_entry_number): Likewise.
298 (print_timeout): Likewise.
299 (run_menu): Likewise.
300 (grub_menu_execute_entry): Likewise.
301 (show_text_menu): Likewise.
302 (get_and_remove_first_entry_number): New function.
303 (grub_menu_execute_with_fallback): Likewise.
304 (get_entry): Renamed to ...
305 (grub_menu_get_entry): .. this and made it global.
306 (get_timeout): Renamed to ...
307 (grub_menu_get_timeout): ... this and made it global.
308 (set_timeout): Renamed to ...
309 (grub_menu_set_timeout): ... this and made it global.
310 (grub_normal_terminal_menu_viewer): Renamed to ...
311 (grub_normal_text_menu_viewer): ... this.
312
313 * normal/menu_text.c: New file. Extracted text-menu-specific code
314 from normal/menu.c.
315
316 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
317 (normal_mod_SOURCES): Likewise.
318
319 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
320 (normal_mod_SOURCES): Likewise.
321
322 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
323 (normal_mod_SOURCES): Likewise.
324
325 * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
326 (normal_mod_SOURCES): Likewise.
327
328 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
329 (normal_mod_SOURCES): Likewise.
330
331 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
332 (normal_mod_SOURCES): Likewise.
333
334 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
335 (normal_mod_SOURCES): Likewise.
336
16ac430e 3372009-02-11 Robert Millan <rmh@aybabtu.com>
338
339 * util/grub.d/00_header.in: Update old reference to `font' command.
340
06ff20fc 3412009-02-10 Felix Zielcke <fzielcke@z-51.de>
342
343 * fs/fat.c (grub_fat_mount): Fix wrong comparison.
344
345 Based on patch from Javier Martín.
346
96da9407 3472009-02-09 Felix Zielcke <fzielcke@z-51.de>
348
349 * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
350 to avoid false posivites with FAT.
351 (grub_fstest_SOURCES): Likewise.
352 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
353 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
354 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
355 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
356 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
357 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
358
6dca6fe4 3592009-02-09 Felix Zielcke <fzielcke@z-51.de>
360
06ff20fc 361 * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
6dca6fe4 362 bpb.version_specific.fat12_or_fat16.fstype and
363 bpb.version_specific.fat32.fstype.
364
2550c62f 3652009-02-08 Robert Millan <rmh@aybabtu.com>
366
be110b30 367 * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
2550c62f 368
56978920 3692009-02-08 Robert Millan <rmh@aybabtu.com>
370
371 * Makefile.in (host_os, host_cpu): New variables.
372 (target_os): Remove. Update all users.
373
d64399b5 3742009-02-08 Marco Gerards <marco@gnu.org>
375
376 * Makefile.in (enable_grub_emu_usb): New variable.
377 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
378 (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
379 `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
380 (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
381 (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
382 `usbtest.mod' and `usbms.mod'.
383 (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
384 (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
385 (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
386 (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
387 (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
388 variables.
389
390 * disk/usbms.c: New file.
391
392 * include/grub/usb.h: Likewise.
393
394 * include/grub/usbtrans.h: Likewise.
395
396 * include/grub/usbdesc.h: Likewise.
397
398 * bus/usb/usbtrans.c: Likewise.
399
400 * bus/usb/ohci.c: Likewise.
401
402 * bus/usb/uhci.c: Likewise.
403
404 * bus/usb/usbhub.c: Likewise.
405
406 * bus/usb/usb.c: Likewise.
407
408 * commands/usbtest.c: Likewise.
409
410 * util/usb.c: Likewise.
411
412 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
413
414 * configure.ac: Test for libusb presence.
415
416 * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
417
2b40d6bb 4182009-02-08 Vesa Jääskeläinen <chaac@nic.fi>
419
420 * kern/mm.c: Add more comments.
421
73a4ce81 4222009-02-08 Robert Millan <rmh@aybabtu.com>
423
424 Patch from Javier Martín.
425 * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
426 `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
427
f821ce59 4282009-02-08 Robert Millan <rmh@aybabtu.com>
429
430 * fs/cpio.c: Split tar functionality to ...
431 * fs/tar.c: ... here (new file). Update all users.
432
aebfc4b0 4332009-02-07 Robert Millan <rmh@aybabtu.com>
434
435 * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
436 backward-incompatible features.
437
438 Based on patch from Javier Martín, with some adjustments.
439
cea15bca 4402009-02-07 Michael Scherer <misc@mandriva.org>
441
442 * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
443
0bb5115e 4442009-02-07 Robert Millan <rmh@aybabtu.com>
445
446 * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
447 position of `disk/lvm.c' to ensure grub_init_all() always picks it
448 after the RAID stuff.
449
38a0f8e7 4502009-02-05 Vesa Jääskeläinen <chaac@nic.fi>
451
452 Fixes problem when running vbetest command as reported by
453 Vladimir Serbinenko <phcoder@gmail.com>.
454
455 * (grub_vbe_set_video_mode): Fixed problem with text modes.
456
3143cc1c 4572009-02-04 Felix Zielcke <fzielcke@z-51.de>
458
459 util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
460 /dev/md/NpN style mdraid devices.
461
9cba6fce 4622009-02-03 Felix Zielcke <fzielcke@z-51.de>
463
464 * util/unifont2pff.rb: Remove.
465
e507a2c1 4662009-02-03 Felix Zielcke <fzielcke@z-51.de>
467
468 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
469 `#'.
470
d2c2b4cd 4712009-02-03 Felix Zielcke <fzielcke@z-51.de>
472
473 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
474 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
475 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
476 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
477 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
478 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
479 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
480
b4315fb0 4812009-02-02 Christian Franke <franke@computer.org>
482
483 * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
484
de3aa260 4852009-02-01 Felix Zielcke <fzielcke@z-51.de>
486
7c3ff286 487 * INSTALL: Note that we now require at least autoconf 2.59 and
488 that LZO is optional.
de3aa260 489
825a182b 4902009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
491
492 Base on patch on bug #24154 created by Tomas Tintera
493 <trosos@seznam.cz>.
494
495 * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
496
a69ef770 4972009-02-01 Vesa Jääskeläinen <chaac@nic.fi>
498
7c3ff286 499 Based on patch on bug #25318 created by Bernhard Rosenkraenzer
a69ef770 500 <bero@arklinux.org>.
501
502 * normal/parser.y (script_init): Add missing semicolon.
503
6fa42fa6 5042009-01-31 Colin D Bennett <colin@gibibit.com>
505
7c3ff286 506 * normal/main.c: Add include to grub/menu_viewer.h.
6fa42fa6 507 (free_menu_entry_classes): Added.
508 (grub_normal_menu_addentry): Added class property handling.
509 (grub_normal_execute): Changed to use new menu viewer for menu viewing.
510 (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
511
512 * normal/menu_viewer.c: New file.
513
514 * normal/menu.c (run_menu_entry): Renamed to ...
515 (grub_menu_execute_entry): ... this and made it as global.
516 (grub_menu_run): Renamed to ...
517 (show_text_menu): ... this and made it local.
518 (show_text_menu): Adapt to new function names.
519 (grub_normal_terminal_menu_viewer): New global variable.
520
521 * include/grub/menu.h: New file.
522
523 * include/grub/menu_viewer.h: New file.
524
525 * include/grub/normal.h: Added include to grub/menu.h.
526 (grub_menu_entry): Moved to include/grub/menu.h.
527 (grub_menu_entry_t): Likewise.
528 (grub_menu): Likewise.
529 (grub_menu_t): Likewise.
530 (grub_normal_terminal_menu_viewer): Added.
531 (grub_menu_execute_entry): Likewise.
532 (grub_menu_run): Removed.
533
534 * DISTLIST: Added include/grub/menu.h.
535 Added include/grub/menu_viewer.h.
536 Added normal/menu_viewer.c.
537
5382009-01-31 Vesa Jääskeläinen <chaac@nic.fi>
539
540 * normal/execute.c (grub_script_execute_menuentry): Changed to use
541 arglist for menutitle arguments.
542
543 * normal/main.c (grub_normal_menu_addentry): Likewise.
544
545 * normal/parser.y (menuentry): Likewise.
546
547 * normal/script.c (grub_script_create_cmdmenu): Likewise.
548
549 * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
550 (grub_script_create_cmdmenu): Likewise.
551
552 * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
553
554 * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
555 changes.
556
557 * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
558
559 * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
560
561 * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
562
563 * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
564
565 * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
566
567 * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
568
56192c23 5692009-01-30 Christian Franke <franke@computer.org>
570
571 * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
572 in option help text.
573
d72521b3 5742009-01-27 Pavel Roskin <proski@gnu.org>
575
576 * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
577
994b5e84 5782009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
579
580 * commands/lsmmap.c: Add include to grub/machine/memory.h.
581
582 * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
583
584 * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
585 unregister function.
586
6a7eab2c 5872009-01-27 Vesa Jääskeläinen <chaac@nic.fi>
588
589 * disk/scsi.c (grub_scsi_read): Fix sign problem.
590
591 * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
592
593 * util/grub-mkfont.c (usage): Fix typo.
594
595 * util/elf/grub-mkimage.c (load_modules): Fix warning.
596
1806b56e 5972009-01-26 Daniel Mierswa <impulze@impulze.org>
598
3fb18f09 599 * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
600
336e1fb9 601 * commands/search.c (search_fs_uuid): Ignore case of the UUID.
602
1806b56e 603 * kern/misc.c (grub_strcasecmp): New function.
604 (grub_strcasecmp): Use grub_size_t instead of int for length.
605 Fix return value.
606 * include/grub/misc.h: Update function prototypes.
607
580b2a0f 6082009-01-26 Robert Millan <rmh@aybabtu.com>
609
610 * configure.ac: Fix cross-compilation check.
ef257b36 611
d31c24f1 6122009-01-22 Christian Franke <franke@computer.org>
613
614 * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
615 (precision) digit string. Allow `.format2' without `format1' (width).
616 Limit input chars for `%s' output to `format2' if specified. This is
617 compatible with standard printf ().
618
3138b44c 6192009-01-22 Christian Franke <franke@computer.org>
620
621 * disk/ata.c (grub_ata_wait_status): Replace by ...
622 (grub_ata_wait_not_busy): ... this function. Checks only BSY bit,
623 other status bits may be invalid while BSY is asserted.
624 (grub_ata_check_ready): New function.
625 (grub_ata_cmd): Removed.
626 (grub_ata_wait_drq): New function.
627 (grub_ata_strncpy): Remove inline.
628 (grub_ata_pio_read): Reduce to actual block transfer. BSY wait
629 and error check now done by grub_ata_wait_drq ().
630 (grub_ata_pio_write): Likewise.
631 (grub_atapi_identify): Set DEV before check for !BSY. Use
632 grub_ata_wait_drq () to wait for data.
633 (grub_ata_device_initialize): Add status register check to
634 detect missing SATA slave devices. Add debug messages.
635 (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
636 (grub_atapi_packet): Set DEV before check for !BSY. Replace
637 transfer loop by grub_ata_pio_write ().
638 (grub_ata_identify): Set DEV before check for !BSY. Use
639 grub_ata_wait_drq () to wait for data.
ef257b36 640 (grub_ata_setaddress): Set DEV before check for !BSY.
3138b44c 641 (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
642 read/write in one loop. Fix invalid command on write. Fix incomplete
643 command on (size % batch) == 0. Add missing error check after write of
644 last block. Add debug messages.
645 (grub_atapi_read): Replace transfer loop by grub_ata_pio_read ().
646
59a64ef6 6472009-01-19 Christian Franke <franke@computer.org>
648
649 * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
650 (GRUB_ATAPI_IREASON_*): Likewise.
651 (grub_ata_pio_write): Fix timeout error return.
652 (grub_atapi_identify): Add grub_ata_wait () after cmd.
653 (grub_atapi_wait_drq): New function.
654 (grub_atapi_packet): New parameter `size'.
655 Use grub_atapi_wait_drq () and direct write instead of
656 grub_ata_pio_write ().
657 (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
658 reads the number of bytes requested by the device for each DRQ
659 assertion.
660 (grub_atapi_write): Remove old implementation, return not
661 implemented instead.
662
1cfe20b3 6632009-01-19 Christian Franke <franke@computer.org>
664
665 * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
666 of 512 to calculate data size.
667 (grub_scsi_read12): Likewise.
668 (grub_scsi_write10): Likewise.
669 (grub_scsi_write12): Likewise.
670 (grub_scsi_read): Adjust size according to blocksize.
671 Add checks for invalid blocksize and unaligned transfer.
672
bee5fe5d 6732009-01-19 Vesa Jääskeläinen <chaac@nic.fi>
674
675 * font/font.c (grub_font_loader_init): Re-position unknown glyph.
676
ef257b36 677 * term/gfxterm.c (write_char): Fix background rendering for wide
bee5fe5d 678 width glyphs.
679
3e643f8c 6802009-01-19 Robert Millan <rmh@aybabtu.com>
681
682 * config.guess: Update to latest version from config git.
683 * config.sub: Likewise.
684
4fa80998 6852009-01-17 Felix Zielcke <fzielcke@z-51.de>
686
687 * Makefile.in: Change font compilation to use new grub-mkfont instead
688 of java version.
689
690 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
691 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
692 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
693 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
694 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
695 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
696 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
697 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
698 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
699
7086085b 7002009-01-16 Christian Franke <franke@computer.org>
701
702 * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
703 (enum grub_ata_timeout_milliseconds): New enum.
704 (grub_ata_wait_status): Add parameter milliseconds.
705 (grub_ata_cmd): Remove variable `err'. Remove wait for !DRQ to allow
706 recovery from timed-out commands.
707 (grub_ata_pio_read): Add parameter milliseconds. Fix error return,
708 return grub_errno instead of REG_ERROR.
709 (grub_ata_pio_write): Add parameter milliseconds.
710 (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
711 Pass milliseconds to grub_ata_wait_status () and
712 grub_ata_pio_read ().
713 (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
714 (grub_ata_identify): Remove variable `ataerr'. Pass milliseconds to
715 grub_ata_wait_status (). Fix IDENTIFY timeout check.
716 (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
717 It is not suitable for device detection, because DEV bit is ignored,
718 the command may run too long, and not all devices set the signature
719 properly.
720 (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
721 (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
722 Fix device selection, DEV bit must be set first to address the registers
723 of the correct device.
724 (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
725 grub_ata_pio_read/write ().
726 (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
727 (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
728
4a412913 7292009-01-13 Carles Pina i Estany <carles@pina.cat>
730
731 * util/grub-editenv.c (main): Use fseeko(), not fseek().
732
7795c55e 7332009-01-13 Bean <bean123ch@gmail.com>
d913988c 734
735 * util/grub-mkfont.c (write_font): forget to remove some debug code.
736
7795c55e 7372009-01-13 Bean <bean123ch@gmail.com>
e52db1f7 738
739 * Makefile.in: (enable_grub_mkfont): New variable.
740 (freetype_cflags): Likewise.
741 (freetype_libs): Likewise.
742
743 * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
744 (grub_mkfont_SOURCES): New variable.
745 (grub_mkfont_CFLAGS): Likewise.
746 (grub_mkfont_LDFLAGS): Likewise.
747
748 * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
749 library if `--enable-grub-mkfont' is requested.
750 (enable_grub_mkfont): New variable.
751 (freetype_cflags): Likewise.
752 (freetype_libs): Likewise.
753
754 * util/grub-mkfont.c: New file.
755
093af1fe 7562009-01-12 Christian Franke <franke@computer.org>
757
758 * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
759 mode check. Fix setting of compat_use[].
760
f36cc108 7612009-01-10 Robert Millan <rmh@aybabtu.com>
762
763 Update a few copyright years which we forgot to do in 2008 (only for
764 files whose changes made in 2008 were copyright-significant)
765
766 * Makefile.in: Add 2008 to Copyright line.
767 * disk/ieee1275/ofdisk.c: Likewise.
768 * disk/efi/efidisk.c: Likewise.
769 * kern/dl.c: Likewise.
770 * kern/sparc64/ieee1275/init.c: Likewise.
771 * kern/mm.c: Likewise.
772 * kern/efi/mm.c: Likewise.
773 * boot/i386/pc/boot.S: Likewise.
774 * genfslist.sh: Likewise.
775 * fs/iso9660.c: Likewise.
776 * fs/hfs.c: Likewise.
777 * fs/jfs.c: Likewise.
778 * fs/minix.c: Likewise.
779 * fs/ufs.c: Likewise.
780 * gensymlist.sh.in: Likewise.
781 * genkernsyms.sh.in: Likewise.
782 * include/grub/misc.h: Likewise.
783 * include/grub/types.h: Likewise.
784 * include/grub/symbol.h: Likewise.
785 * include/grub/elf.h: Likewise.
786 * include/grub/kernel.h: Likewise.
787 * include/grub/disk.h: Likewise.
788 * include/grub/dl.h: Likewise.
789 * include/grub/i386/linux.h: Likewise.
790 * include/grub/i386/pc/biosdisk.h: Likewise.
791 * include/grub/efi/api.h: Likewise.
792 * include/grub/efi/pe32.h: Likewise.
793 * include/grub/util/misc.h: Likewise.
794 * normal/execute.c: Likewise.
795 * normal/arg.c: Likewise.
796 * normal/completion.c: Likewise.
797 * normal/lexer.c: Likewise.
798 * normal/parser.y: Likewise.
799 * normal/misc.c: Likewise.
800 * commands/i386/pc/vbeinfo.c: Likewise.
801 * commands/hexdump.c: Likewise.
802 * commands/terminal.c: Likewise.
803 * commands/ls.c: Likewise.
804 * commands/help.c: Likewise.
805 * partmap/pc.c: Likewise.
806 * loader/efi/chainloader.c: Likewise.
807 * loader/multiboot_loader.c: Likewise.
808 * loader/i386/pc/multiboot2.c: Likewise.
809 * term/efi/console.c: Likewise.
810 * term/i386/pc/serial.c: Likewise.
811 * util/lvm.c: Likewise.
812 * util/console.c: Likewise.
813 * util/i386/efi/grub-mkimage.c: Likewise.
814 * util/raid.c: Likewise.
815
7f02114b 8162009-01-06 Vesa Jääskeläinen <chaac@nic.fi>
817
818 * commands/videotest.c: Removed include to grub/machine/memory.h.
819
820 * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
821 videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
822 (video_mod_SOURCES): Removed.
823 (video_mod_CFLAGS): Likewise.
824 (video_mod_LDFLAGS): Likewise.
825 (gfxterm_mod_SOURCES): Likewise.
826 (gfxterm_mod_CFLAGS): Likewise.
827 (gfxterm_mod_LDFLAGS): Likewise.
828 (videotest_mod_SOURCES): Likewise.
829 (videotest_mod_CFLAGS): Likewise.
830 (videotest_mod_LDFLAGS): Likewise.
831 (bitmap_mod_SOURCES): Likewise.
832 (bitmap_mod_CFLAGS): Likewise.
833 (bitmap_mod_LDFLAGS): Likewise.
834 (tga_mod_SOURCES): Likewise.
835 (tga_mod_CFLAGS): Likewise.
836 (tga_mod_LDFLAGS): Likewise.
837 (jpeg_mod_SOURCES): Likewise.
838 (jpeg_mod_CFLAGS): Likewise.
839 (jpeg_mod_LDFLAGS): Likewise.
840 (png_mod_SOURCES): Likewise.
841 (png_mod_CFLAGS): Likewise.
842 (png_mod_LDFLAGS): Likewise.
843
844 * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
845 bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
846 (video_mod_SOURCES): Added.
847 (video_mod_CFLAGS): Likewise.
848 (video_mod_LDFLAGS): Likewise.
849 (videotest_mod_SOURCES): Likewise.
850 (videotest_mod_CFLAGS): Likewise.
851 (videotest_mod_LDFLAGS): Likewise.
852 (bitmap_mod_SOURCES): Likewise.
853 (bitmap_mod_CFLAGS): Likewise.
854 (bitmap_mod_LDFLAGS): Likewise.
855 (tga_mod_SOURCES): Likewise.
856 (tga_mod_CFLAGS): Likewise.
857 (tga_mod_LDFLAGS): Likewise.
858 (jpeg_mod_SOURCES): Likewise.
859 (jpeg_mod_CFLAGS): Likewise.
860 (jpeg_mod_LDFLAGS): Likewise.
861 (png_mod_SOURCES): Likewise.
862 (png_mod_CFLAGS): Likewise.
863 (png_mod_LDFLAGS): Likewise.
864 (gfxterm_mod_SOURCES): Likewise.
865 (gfxterm_mod_CFLAGS): Likewise.
7795c55e 866 (gfxterm_mod_LDFLAGS): Likewise.
7f02114b 867
868 * term/gfxterm.c: Removed include to grub/machine/memory.h,
869 grub/machine/console.h.
870
644fff97 8712009-01-04 Jerone Young <jerone@gmail.com>
872
873 Make on screen instructions clearer
874
875 Based on patch created by Jidanni <jidanni@jidanni.org>
876
877 * normal/menu.c: print clearer instructions on the screen
878
1e901a75 8792009-01-02 Colin D Bennett <colin@gibibit.com>
880
881 New font engine.
34c44600 882
1e901a75 883 Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
884 build system and fixed gfxterm.c to work with different sized fonts.
885
886 * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
34c44600 887
1e901a75 888 * configure: Re-generated.
34c44600 889
1e901a75 890 * DISTLIST: Removed font/manager.c.
891 Added font/font.c.
892 Added font/font_cmd.c.
34c44600 893
1e901a75 894 * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF. Added Font tool
895 compilation.
34c44600 896
1e901a75 897 * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype. Changed users.
34c44600 898
899 * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
1e901a75 900
901 * kern/term.c: Changed users of grub_utf8_to_ucs4.
34c44600 902
1e901a75 903 * normal/menu.c: Likewise.
34c44600 904
1e901a75 905 * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
906 (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
34c44600 907
1e901a75 908 * include/grub/font.h: Replaced with new file.
34c44600 909
1e901a75 910 * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
911 (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
912 (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
913 (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
914 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
34c44600 915 (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
1e901a75 916 fg_red, fg_green, fg_blue, fg_alpha.
917 (grub_video_adapter): Removed blit_glyph.
34c44600 918 (grub_video_blit_glyph): Removed.
919
1e901a75 920 * font/manager.c: Removed file.
34c44600 921
922 * font/font.c: New file.
923
1e901a75 924 * font/font_cmd.c: Likewise.
34c44600 925
1e901a75 926 * video/video.c (grub_video_blit_glyph): Removed.
34c44600 927
1e901a75 928 * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
929 (grub_video_vbe_map_rgba): Likewise.
930 (grub_video_vbe_unmap_color_int): Likewise.
931 (grub_video_vbe_blit_glyph): Removed.
932 (grub_video_vbe_adapter): Removed blit_glyph.
34c44600 933
1e901a75 934 * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
935 (get_pixel): Likewise.
34c44600 936 (set_pixel): Likewise.
937
1e901a75 938 * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
34c44600 939
1e901a75 940 * term/gfxterm.c: Adapted to new font engine.
34c44600 941
1e901a75 942 * term/i386/pc/vesafb.c: Marked as deprecated. Made it compile.
34c44600 943
1e901a75 944 * term/i386/pc/vga.c: Likewise.
34c44600 945
1e901a75 946 * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
34c44600 947
1e901a75 948 * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
34c44600 949
1e901a75 950 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 951
1e901a75 952 * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
34c44600 953
1e901a75 954 * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
34c44600 955
1e901a75 956 * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
34c44600 957
1e901a75 958 * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
34c44600 959
1e901a75 960 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
34c44600 961
1e901a75 962 * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
963
964 * util/grub.d/00_header.in: Changed to use new loadfont command.
34c44600 965
1e901a75 966 * util/grub-mkconfig_lib.in: Changed font extension.
967
278922e8 9682008-12-28 Felix Zielcke <fzielcke@z-51.de>
969
970 * util/getroot.c (grub_util_get_grub_dev): Add support for
971 /dev/md/dNNpNN style partitionable mdraid devices.
972
3ced05cf 9732008-12-12 Alex Smith <alex@alex-smith.me.uk>
974
975 * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
976 at a time limit of the PXE TFTP API correctly.
977 (grub_pxefs_close): Likewise.
978
7fd0ee30 9792008-11-29 Robert Millan <rmh@aybabtu.com>
980
34c44600 981 * disk/ata.c (grub_ata_pciinit): Handle errors raised by
7fd0ee30 982 grub_ata_device_initialize() calls.
983
34c44600 9842008-11-28 Krzysztof Smiechowicz <deadwood@wp.pl>
0c5e79ab 985
986 * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
987 iteration failed.
988 * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
989
89313780 9902008-11-28 Robert Millan <rmh@aybabtu.com>
991
992 Fix build on powerpc-ieee1275. Based on patch created by
993 Manoel Abranches <mrabran@linux.vnet.ibm.com>.
994 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
995 `kern/ieee1275/mmap.c'.
996 * include/grub/powerpc/ieee1275/memory.h: New file.
997
15257703 998 Provide grub-install on coreboot.
999 * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
1000 (grub_install_SOURCES): New variable.
1001 * util/i386/pc/grub-install.in: Add a few condition checks to make it
1002 usable on coreboot.
1003
9fc5388a 10042008-11-25 Felix Zielcke <fzielcke@z-51.de>
1005
1006 * util/grub-fstest.c (grub_term_get_current_input): Change return type
1007 to `grub_term_input_t'.
1008 (grub_term_get_current_output): Change return type to
1009 `grub_term_output_t'.
1010
bc3a2f31 10112008-11-22 Robert Millan <rmh@aybabtu.com>
1012
34c44600 1013 Fix breakage on coreboot due to declaration mismatch.
bc3a2f31 1014 * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
1015 (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
1016 grub_vga_text_cls().
1017
80fc88f2 1018 * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
34c44600 1019 comments. Avoid copying one more byte than necessary (just in case).
80fc88f2 1020
cbf36fd3 1021 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
1022 to 0x200000 (avoids trouble with some OFW implementations, and matches
1023 with the one in Yaboot).
1024 Reported by Manoel Abranches
1025
73e8e268 10262008-11-20 Robert Millan <rmh@aybabtu.com>
3cf6ac19 1027
1028 * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
1029 (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
1030
73e8e268 1031 * util/grub-mkconfig_lib.in (grub_warn): New function.
1032 (convert_system_path_to_grub_path): Use grub_warn() when issuing
1033 warnings, to obtain consistent formatting.
1034 * util/grub.d/00_header.in: Likewise.
1035 * util/update-grub_lib.in: Likewise.
1036
e94045a1 1037 * loader/i386/linux.c (allocate_pages): Fix a warning.
40f9faa4 1038 Move comment text to `#error' stanza.
e94045a1 1039
79d29fd7 1040 Harmonize ieee1275's grub_available_iterate() with the generic
1041 grub_machine_mmap_iterate() interface (fixes a recently-introduced
1042 build problem on i386-ieee1275):
1043 * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
1044 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here. Add third
1045 parameter `type'. Update all users of this function.
1046 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
1047 `kern/ieee1275/mmap.c'.
1048 * kern/ieee1275/init.c
1049 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
1050 with ...
1051 (grub_machine_mmap_iterate): ... this.
1052 * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
1053 return type to `grub_err_t'. Update all implementations of this
1054 function prototype.
1055 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
1056 Likewise.
1057
60d6b16e 1058 Add `lsmmap' command (lists firmware-provided memory map):
1059 * commands/lsmmap.c: New file.
1060 * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
1061 (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
1062 variables.
1063 * conf/powerpc-ieee1275.rmk: Likewise.
1064 * conf/i386-coreboot.rmk: Likewise.
1065 * conf/i386-ieee1275.rmk: Likewise.
1066
ebaaf49b 10672008-11-19 Robert Millan <rmh@aybabtu.com>
1068
1069 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
92907110 1070 * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
1071 constraints to initrd allocation (based on code from
1072 loader/i386/pc/linux.c). Without them, initrd was allocated too high
1073 for Linux to find it.
ebaaf49b 1074
dfab719f 10752008-11-14 Robert Millan <rmh@aybabtu.com>
1076
1077 * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
1078 order to cope with duplicate slashes.
1079
10fc3eb9 10802008-11-14 Robert Millan <rmh@aybabtu.com>
1081
1082 * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
1083 Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000). We
1084 don't want to mess with lower memory, because it is used in the Linux
1085 loader.
1086
1087 * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
34c44600 1088 an appropriate place in lower memory, between 0x10000 and 0x90000,
10fc3eb9 1089 like loader/i386/efi/linux.c does. Linux often panics if real_mode_mem
1090 is in our heap (probably as a result of it being corrupted during
2f2a3442 1091 decompression). Add #error instance with comment to explain why this
1092 loader isn't currently usable on PC/BIOS.
10fc3eb9 1093
e2e07847 10942008-11-14 Robert Millan <rmh@aybabtu.com>
1095
1096 * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
34c44600 1097 (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
e2e07847 1098
fe8e8d69 10992008-11-12 Robert Millan <rmh@aybabtu.com>
1100
1101 Make loader/i386/linux.c buildable on i386-pc (although disabled).
1102
1103 * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
1104 (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
1105 from here ...
1106 * include/grub/i386/pc/memory.h: ... to here.
1107
976b07d0 11082008-11-12 Robert Millan <rmh@aybabtu.com>
1109
1110 Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
1111 split).
1112
1113 * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
1114 (grub_console_cur_color, grub_console_real_putchar)
1115 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1116 (grub_console_setcolorstate, grub_console_setcolor)
1117 (grub_console_getcolor): Move from here ...
1118 * include/grub/i386/vga_common.h: ... to here (new file).
1119
1120 * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
1121 `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
1122 `<grub/i386/io.h>'.
1123 * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
1124 `<grub/i386/vga_common.h>'.
1125
76679cd3 11262008-11-12 Robert Millan <rmh@aybabtu.com>
1127
1128 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
1129 * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
1130 (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
1131 variables.
1132 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1133 `term/i386/pc/console.c' with `term/i386/vga_common.c'.
1134
1135 * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
1136 grub_console_init() with call to grub_vga_text_init().
1137 (grub_machine_fini): Replace call to
1138 grub_console_fini() with call to grub_vga_text_fini() and
1139 grub_at_keyboard_fini().
1140
1141 * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
1142 (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
1143 (grub_console_setcolorstate, grub_console_setcolor)
1144 (grub_console_getcolor): New function prototypes.
1145
1146 * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
1147 (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
1148 (grub_vga_text_setcursor): Static-ize.
1149 (grub_vga_text_term): New structure.
1150 (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
1151
1152 * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
1153 (grub_console_cur_color, grub_console_standard_color)
1154 (grub_console_normal_color, grub_console_highlight_color)
1155 (map_char, grub_console_putchar, grub_console_getcharwidth)
1156 (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
1157 (grub_console_getcolor): Move from here ...
1158 * term/i386/vga_common.c: ... to here (same function names).
1159
95b841d3 11602008-11-12 Robert Millan <rmh@aybabtu.com>
1161
1162 Use newly-added Multiboot support in coreboot.
1163
1164 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
1165 `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
1166
1167 * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
1168 alignment, set `MULTIBOOT_MEMORY_INFO' flag.
1169 (codestart): Store the MBI in `startup_multiboot_info' when we're
1170 being loaded using Multiboot.
1171
1172 * kern/i386/coreboot/init.c (grub_machine_init): Move
1173 grub_at_keyboard_init() call to beginning of function (useful for
1174 debugging). Call grub_machine_mmap_init() before attempting to use
1175 grub_machine_mmap_iterate().
1176 (grub_lower_mem, grub_upper_mem): Move from here ...
1177 * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
1178 here (new file).
1179
1180 * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
1181 function prototype.
1182
761ca975 11832008-11-12 Robert Millan <rmh@aybabtu.com>
1184
1185 Fix a regression introduced by the at_keyboard.mod split. Because
1186 some terminals are default on some platforms and non-default on
1187 others, the first terminal being registered determines which is
1188 going to be default.
1189
1190 * kern/term.c (grub_term_register_input): If this is the first
1191 terminal being registered, set it as the current one.
1192 (grub_term_register_output): Likewise.
1193
1194 * term/efi/console.c (grub_console_init): Do not call
1195 grub_term_set_current_output() or grub_term_set_current_input().
1196 * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
1197 * term/i386/pc/console.c (grub_console_init): Likewise.
1198 (grub_console_fini): Do not call grub_term_set_current_input()
1199 (but leave grub_term_set_current_output() to restore text mode).
1200
6c529df7 12012008-11-10 Robert Millan <rmh@aybabtu.com>
1202
1203 * util/grub.d/00_header.in: Add backward compatibility check for
1204 versions of terminal.mod that don't understand `terminal_input' or
1205 `terminal_output'.
1206
132e4113 12072008-11-09 Robert Millan <rmh@aybabtu.com>
1208
1209 * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
1210 `terminal_input' / `terminal_output', not `terminal'.
1211
ac293d50 12122008-11-08 Robert Millan <rmh@aybabtu.com>
1213
1214 * Makefile.in (include_DATA): Fix srcdir=. assumption.
2a9c5940 1215 (DISTCLEANFILES): Add `build_env.mk'.
ac293d50 1216
0025933a 12172008-11-08 Robert Millan <rmh@aybabtu.com>
1218
1219 * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
dba3f844 1220 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
0025933a 1221 members. Update all users.
1222 * util/console.c (grub_ncurses_term): Split in ...
1223 (grub_ncurses_term_input): ... this, and ...
1224 (grub_ncurses_term_output): ... this. Update all users.
dcb6fa0a 1225 * term/ieee1275/ofconsole.c: Remove stale `#endif'.
0025933a 1226
37c86336 12272008-11-08 Robert Millan <rmh@aybabtu.com>
1228
1229 * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
1230 (PKGDATA): Add $(pkgdata_SRCDIR).
1231 (pkglib_BUILDDIR): New variable.
1232 (pkgdata_SRCDIR): New variable.
1233 (build_env.mk): New target.
1234 (include_DATA): New variable.
1235 (install-local): Install $(include_DATA) files in $(includedir).
1236
b6c15a2d 12372008-11-07 Pavel Roskin <proski@gnu.org>
1238
d99d46f1 1239 * gendistlist.sh: Use C locale for sorting to ensure consistent
1240 output on all systems.
1241
b6c15a2d 1242 * util/grub.d/00_header.in: Remove incorrect space before
1243 "serial".
1244
c32ee8c9 12452008-11-07 Robert Millan <rmh@aybabtu.com>
1246
1247 * include/multiboot2.h (struct multiboot_header): Add `flags' member as
1248 per specification.
1249 * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
1250 * loader/multiboot_loader.c (find_multi_boot2_header): New function
1251 (based on find_multi_boot1_header).
1252 (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
1253 using find_multi_boot2_header(), and abort if neither Multiboot or
1254 Multiboot headers were found.
1255
651c29b7 12562008-11-07 Robert Millan <rmh@aybabtu.com>
1257
1258 Modularize at_keyboard.mod:
1259
1260 * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
1261 (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
1262 (at_keyboard_mod_LDFLAGS): New variables.
1263
1264 Actual terminal split:
1265
1266 * include/grub/term.h (struct grub_term): Split in ...
1267 (struct grub_term_input): ... this, and ...
1268 (struct grub_term_output): ... this. Update all users.
1269 (grub_term_set_current): Split in ...
1270 (grub_term_set_current_input): ... this, and ...
1271 (grub_term_set_current_output): ... this.
1272 (grub_term_get_current): Split in ...
1273 (grub_term_get_current_input): ... this, and ...
1274 (grub_term_get_current_output): ... this.
1275 (grub_term_register): Split in ...
1276 (grub_term_register_input): ... this, and ...
1277 (grub_term_register_output): ... this.
1278 (grub_term_unregister): Split in ...
1279 (grub_term_unregister_input): ... this, and ...
1280 (grub_term_unregister_output): ... this.
1281 (grub_term_iterate): Split in ...
1282 (grub_term_iterate_input): ... this, and ...
1283 (grub_term_iterate_output): ... this.
1284
1285 * kern/term.c (grub_term_list): Split in ...
1286 (grub_term_list_input): ... this, and ...
1287 (grub_term_list_output): ... this. Update all users.
1288 (grub_cur_term): Split in ...
1289 (grub_cur_term_input): ... this, and ...
1290 (grub_cur_term_output): ... this. Update all users.
1291 (grub_term_set_current): Split in ...
1292 (grub_term_set_current_input): ... this, and ...
1293 (grub_term_set_current_output): ... this.
1294 (grub_term_get_current): Split in ...
1295 (grub_term_get_current_input): ... this, and ...
1296 (grub_term_get_current_output): ... this.
1297 (grub_term_register): Split in ...
1298 (grub_term_register_input): ... this, and ...
1299 (grub_term_register_output): ... this.
1300 (grub_term_unregister): Split in ...
1301 (grub_term_unregister_input): ... this, and ...
1302 (grub_term_unregister_output): ... this.
1303 (grub_term_iterate): Split in ...
1304 (grub_term_iterate_input): ... this, and ...
1305 (grub_term_iterate_output): ... this.
1306
1307 * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
1308 a check for input and one for output (and only attempt to get keys
1309 from user when input works).
1310
1311 * util/grub-probe.c (grub_term_get_current): Split in ...
1312 (grub_term_get_current_input): ... this, and ...
1313 (grub_term_get_current_output): ... this.
1314 * util/grub-fstest.c: Likewise.
1315 * util/i386/pc/grub-setup.c: Likewise.
1316 * util/grub-editenv.c: Likewise.
1317
1318 Portability adjustments:
1319
1320 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
1321 `term/i386/pc/at_keyboard.c'.
1322 * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
1323 grub_keyboard_controller_init() (now handled by terminal .init).
1324 * kern/i386/coreboot/init.c (grub_machine_init): Add call to
1325 grub_at_keyboard_init().
1326 * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
1327 (grub_console_checkkey, grub_console_getkey): Remove (now provided by
1328 at_keyboard.mod via input terminal interface).
1329 * include/grub/i386/coreboot/console.h: Convert into a stub for
1330 `<grub/i386/pc/console.h>'.
1331
1332 Migrate full terminals to new API:
1333
1334 * term/efi/console.c (grub_console_term): Split into ...
1335 (grub_console_term_input): ... this, and ...
1336 (grub_console_term_output): ... this. Update all users.
1337 * term/ieee1275/ofconsole.c: Remove __i386__ hack.
1338 (grub_ofconsole_init): Split into ...
1339 (grub_ofconsole_init_input): ... this, and ...
1340 (grub_ofconsole_init_output): ... this.
1341 (grub_ofconsole_term): Split into ...
1342 (grub_ofconsole_term_input): ... this, and ...
1343 (grub_ofconsole_term_output): ... this. Update all users.
1344 * term/i386/pc/serial.c (grub_serial_term): Split into ...
1345 (grub_serial_term_input): ... this, and ...
1346 (grub_serial_term_output): ... this. Update all users.
1347 * term/i386/pc/console.c (grub_console_term): Split into ...
1348 (grub_console_term_input): ... this, and ...
1349 (grub_console_term_output): ... this. Update all users.
1350 (grub_console_term_input): Only enable it on PC/BIOS platform.
1351 (grub_console_init): Remove grub_keyboard_controller_init() call.
1352
1353 Migrate input terminals to new API:
1354
1355 * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
1356 `i386' and `i386/pc' to enable build on x86_64 (this driver is
1357 i386-specific anyway).
1358 (grub_console_checkkey): Rename to ...
1359 (grub_at_keyboard_checkkey): ... this. Static-ize. Update all
1360 users.
1361 (grub_keyboard_controller_orig): New variable.
1362 (grub_console_getkey): Rename to ...
1363 (grub_at_keyboard_getkey): ... this. Static-ize. Update all
1364 users.
1365 (grub_keyboard_controller_init): Static-ize. Save original
1366 controller value so that it can be restored ...
1367 (grub_keyboard_controller_fini): ... here (new function).
1368 (grub_at_keyboard_term): New structure.
1369 (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
1370 functions.
1371
1372 Migrate output terminals to new API:
1373
1374 * term/i386/pc/vga.c (grub_vga_term): Change type to
1375 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1376 members. Update all users.
1377 * term/gfxterm.c (grub_video_term): Change type to
1378 `struct grub_term_output'. Remove `.checkkey' and `.getkey'
1379 members. Update all users.
1380 * include/grub/i386/pc/console.h (grub_console_checkkey)
1381 (grub_console_getkey): Do not export (no longer needed by gfxterm,
1382 etc).
1383
1384 Migrate `terminal' command and userland tools to new API:
1385
1386 * commands/terminal.c (grub_cmd_terminal): Split into ...
1387 (grub_cmd_terminal_input): ... this, and ...
1388 (grub_cmd_terminal_output): ... this.
1389 (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
1390 `terminal_input' and `terminal_output'.
1391 * util/grub.d/00_header.in: Adjust `terminal' calls to new
1392 `terminal_input' / `terminal_output' API.
1393 * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
1394 ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
1395 provided ${GRUB_TERMINAL}, convert it).
1396
96e5d876 13972008-11-04 Robert Millan <rmh@aybabtu.com>
1398
1399 * util/grub.d/10_freebsd.in: New file. Generate grub configuration
1400 for FreeBSD.
1401 * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
1402
556f3775 14032008-11-03 Bean <bean123ch@gmail.com>
1404
1405 * kern/elf.c (grub_elf32_load): Revert to previous code.
1406 (grub_elf64_load): Likewise.
1407
1408 * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
1409
926b9823 14102008-11-01 Robert Millan <rmh@aybabtu.com>
1411
1412 * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
1413 (TARGET_CPPFLAGS): Likewise.
1414 * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
1415
1432e958 14162008-11-01 Carles Pina i Estany <carles@pina.cat>
1417
1418 * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
1419
dba3f844 14202008-10-29 Guillem Jover <guillem.jover@nokia.com>
de4fa71c 1421
1422 * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
1423 addition of objects until the code is not going to be able to fail.
1424
dba3f844 14252008-10-29 Guillem Jover <guillem.jover@nokia.com>
b7279447 1426
1427 * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
1428 (add a missing NULL check, and correct them by moving the pointer
1429 operations after the actual check).
1430
7ab28c21 14312008-10-29 Robert Millan <rmh@aybabtu.com>
1432
1433 * util/i386/pc/grub-install.in: Handle empty string as output from
1434 make_system_path_relative_to_its_root().
1435
1b7748eb 14362008-10-05 Hans Lambermont <hans@lambermont.dyndns.org>
1437
1438 * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
1439 circular metadata worst case scenario. If the metadata is circular
1440 then copy the wrap in place.
1441 * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
1442 project lib/format_text/layout.h
1443 Circular metadata bug found and patch debugged by Jan Derk Gerlings.
1444
c9618ab2 14452008-10-03 Felix Zielcke <fzielcke@z-51.de>
1446
7a36edca 1447 * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
c9618ab2 1448
bf981c62 14492008-10-03 Felix Zielcke <fzielcke@z-51.de>
1450
1451 * util/update-grub_lib.in: Mention filename in warning message.
1452
6d994591 14532008-09-29 Felix Zielcke <fzielcke@z-51.de>
1454
1455 * NEWS: Update for rename of update-grub to grub-mkconfig.
1456
18ade780 14572008-09-29 Felix Zielcke <fzielcke@z-51.de>
1458
1459 * util/update-grub_lib.in: Copy to ...
1460 * util/grub-mkconfig_lib.in: ... this. Update all users.
7c3ff286 1461 * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
18ade780 1462 * util/update-grub.in: Rename to ...
1463 * util/grub-mkconfig.in: ... this. Update all users. Remove `-y'
1464 option. Add `--output' option to allow users to specify the generated
1465 configuration file. Default to stdout.
1466 (update_grub_dir): Rename to ...
1467 (grub_mkconfig_dir): ... this.
1468 (grub_cfg): Default to an empty string.
1469 * conf/common.rmk (update-grub): Rename to ...
1470 (grub-mkconfig): ... this.
1471 (update-grub_lib): Copy to ...
1472 (grub-mkconfig_lib): ... this.
1473 (update-grub_SCRIPTS): Copy to ...
1474 (grub-mkconfig_SCRIPTS): ... this. Update all users.
1475 (update-grub_DATA): Rename to ...
1476 (grub-mkconfig_DATA): ... this.
1477
556ce6ac 14782008-09-28 Robert Millan <rmh@aybabtu.com>
1479
1480 * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
1481 to `modified'. Add the real `created' field.
1482 (grub_iso9660_uuid): Use `modified' rather than `created' for
1483 constructing the UUID.
1484
14852008-09-28 Felix Zielcke <fzielcke@z-51.de>
eb079ba9 1486
1487 fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
1488 Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
1489
92274e85 14902008-09-28 Bean <bean123ch@gmail.com>
1491
1492 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
1493 Thanks to Christian Franke for finding this bug.
1494
add6f17a 14952008-09-25 Robert Millan <rmh@aybabtu.com>
1496
1497 * util/grub-mkdevicemap.c (make_device_map): Actually replace all
1498 instances of grub_util_get_disk_name() (see previous commit).
1499
d2a367b8 15002008-09-25 Robert Millan <rmh@aybabtu.com>
1501
1502 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
1503 `util/i386/get_disk_name.c'.
1504 * conf/i386-efi.rmk: Likewise.
1505 * conf/x86_64-efi.rmk: Likewise.
1506 * conf/i386-coreboot.rmk: Likewise.
1507 * conf/i386-ieee1275.rmk: Likewise.
1508 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
1509 `util/ieee1275/get_disk_name.c'.
1510 * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
1511 * util/ieee1275/get_disk_name.c: Remove file.
1512 * util/i386/get_disk_name.c: Remove file.
1513 * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
1514 "hd%d" for device.map entries, rather than using
1515 grub_util_get_disk_name().
1516
81a06771 15172008-09-24 Carles Pina i Estany <carles@pina.cat>
b0c301f7 1518
1519 * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
1520 warning.
1521 * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
1522
5a004279 15232008-09-24 Carles Pina i Estany <carles@pina.cat>
1524
1525 * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
1526 Changed to 0x5100.
1527 (GRUB_TERM_PPAGE): Changed to 0x4900.
1528
397093d3 15292008-09-24 Robert Millan <rmh@aybabtu.com>
1530
1531 * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
1532 macros (they were i386-pc specific).
1533 * include/grub/sparc64/ieee1275/console.h: Likewise.
1534 * include/grub/efi/console.h: Likewise.
1535
a91b6c7c 15362008-09-22 Bean <bean123ch@gmail.com>
1537
1538 * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
1539 resident and in attribute list.
1540
1541 * include/grub/ntfs.h (BMP_LEN): Removed.
1542
c40fd116 15432008-09-22 Bean <bean123ch@gmail.com>
1544
81a06771 1545 * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
c40fd116 1546 scsi->name and scsi->luns, as they will be set in grub_scsi_open.
1547
1548 * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
1549 error occurs, as grub_disk_open will call grub_disk_close, which will
1550 call p->close (scsi).
1551
81a06771 15522008-09-21 Felix Zielcke <fzielcke@z-51.de>
eb73121d 1553
1554 * configure.ac (AC_INIT): Quote `GRUB' string and version number.
1555 (AC_PREREQ): Bumped to 2.59.
1556 (AC_TRY_COMPILE): Replace obsolete macro with ...
1557 (AC_COMPILE_IFELSE): ... this.
1558 * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
1559 (AC_LINK_IFELSE): ... this.
1560
5dc43410 15612008-09-21 Felix Zielcke <fzielcke@z-51.de>
1562
1563 * autogen.sh: Add a call to `gendistlist.sh'.
1564
9035dce4 15652008-09-19 Christian Franke <franke@computer.org>
1566
1567 * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
1568 * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
1569 * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
1570 Export __enable_execute_stack() to modules.
1571 * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
1572 New function.
1573
7fd75377 15742008-09-09 Felix Zielcke <fzielcke@z-51.de>
1575
040030b3 1576 * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
1577 Sort the list.
1578
15792008-09-09 Felix Zielcke <fzielcke@z-51.de>
1580
1581 * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
7fd75377 1582 #include <grub/util/hostdisk.h>.
1583
89d5ffcf 15842008-09-08 Robert Millan <rmh@aybabtu.com>
1585
1586 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
1587 segments when their filesz is zero (grub_file_read() interprets
81a06771 1588 zero-size as "read until EOF", which results in memory corruption).
89d5ffcf 1589 Use `lowest_segment' rather than 0 for calculating the current
1590 segment load address.
1591
40da438f 15922008-09-08 Robert Millan <rmh@aybabtu.com>
1593
1594 * util/hostdisk.c (open_device): Replace a grub_util_info() call
1595 with grub_dprintf("hostdisk", ...), as it was so verbose that it
1596 clobbered useful information.
1597
ddbf5556 15982008-09-08 Robert Millan <rmh@aybabtu.com>
1599
1600 * include/grub/util/biosdisk.h: Move to ...
1601 * include/grub/util/hostdisk.h: ... here. Update all users.
1602 * util/biosdisk.c: Move to ...
1603 * util/hostdisk.c: ... here. Update all users.
1604
783d0f48 16052008-09-07 Robert Millan <rmh@aybabtu.com>
1606
1607 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
1608 variables.
1609 (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
1610 and length can be stored directly in the `mbi->mmap_addr' and
1611 `mbi->mmap_length' struct fields.
1612
548e2ea5 16132008-09-07 Robert Millan <rmh@aybabtu.com>
1614
1615 * conf/i386.rmk: New file. Provides declaration for building
1616 `cpuid.mod'.
1617 * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
1618 (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
1619 variables.
1620 Include `conf/i386.mk'.
1621 * conf/i386-efi.rmk: Likewise.
1622 * conf/x86_64-efi.rmk: Likewise.
1623 * conf/i386-coreboot.rmk: Likewise.
1624 * conf/i386-ieee1275.rmk: Likewise.
1625
0ea85a37 16262008-09-07 Vesa Jääskeläinen <chaac@nic.fi>
1627
1628 Based on patch created by Colin D Bennett <colin@gibibit.com>.
1629 Adds optimization support for BGR based modes.
1630
1631 * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
1632 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1633 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1634 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1635 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1636 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1637 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1638 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1639 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1640 (grub_video_i386_vbeblit_index_index): Likewise.
1641 (grub_video_i386_vbeblit_replace_directN): Added.
1642 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1643 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1644 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1645 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1646 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1647 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
81a06771 1648 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
0ea85a37 1649 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1650 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1651 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1652 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1653 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1654 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
1655
1656 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
1657 (grub_video_i386_vbefill_R8G8B8): Likewise.
1658 (grub_video_i386_vbefill_index): Likewise.
1659 (grub_video_i386_vbefill_direct32): Added.
1660 (grub_video_i386_vbefill_direct24): Likewise.
1661 (grub_video_i386_vbefill_direct16): Likewise.
1662 (grub_video_i386_vbefill_direct8): Likewise.
1663
81a06771 1664 * include/grub/video.h (grub_video_blit_format): Removed
0ea85a37 1665 GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
1666 (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
1667 GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
1668 GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
1669 GRUB_VIDEO_BLIT_FORMAT_BGR_565.
81a06771 1670
0ea85a37 1671 * video/video.c (grub_video_get_blit_format): Updated to use new
1672 blit formats. Added handling for 16 bit color modes.
81a06771 1673
1674 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
0ea85a37 1675 fillers.
1676 (common_blitter): Updated to use new blitters.
1677
1678 * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
1679 Removed.
1680 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
1681 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
1682 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
1683 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
1684 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
1685 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
1686 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
1687 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
1688 (grub_video_i386_vbeblit_index_index): Likewise.
1689 (grub_video_i386_vbeblit_replace_directN): Added.
1690 (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
1691 (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
1692 (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
1693 (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
1694 (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
1695 (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
1696 (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
1697 (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
1698 (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
1699 (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
1700 (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
1701 (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
1702 (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
81a06771 1703
0ea85a37 1704 * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
1705 (grub_video_i386_vbefill_R8G8B8): Likewise.
1706 (grub_video_i386_vbefill_index): Likewise.
1707 (grub_video_i386_vbefill_direct32): Added.
1708 (grub_video_i386_vbefill_direct24): Likewise.
1709 (grub_video_i386_vbefill_direct16): Likewise.
1710 (grub_video_i386_vbefill_direct8): Likewise.
81a06771 1711
0ea85a37 1712 * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
1713 types.
81a06771 1714
0ea85a37 1715 * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
1716 types.
81a06771 1717
0ea85a37 1718 * video/readers/png.c (grub_png_decode_image_header): Adapt to new
1719 blitter types.
81a06771 1720
0ea85a37 1721 * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
1722 types.
1723
e8a83df6 17242008-09-06 Felix Zielcke <fzielcke@z-51.de>
1725
1726 * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
1727 RAID level 1.
1728
6bcd8ee5 17292008-09-06 Felix Zielcke <fzielcke@z-51.de>
c375ae58 1730
6bcd8ee5 1731 * fs/iso9660.c (grub_iso9660_date): New structure.
1732 (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
1733 (grub_iso9660_uuid): New function.
c375ae58 1734
59261157 17352008-09-05 Bean <bean123ch@gmail.com>
1736
1737 * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
1738
1739 * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
1740 insensitive bit for names in Win32 and Win32 & DOS namespace.
1741
1742 * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
1743
1744 * include/grub/types.h (LONG_MAX): Likewise.
1745
58b6645a 17462008-09-04 Felix Zielcke <fzielcke@z-51.de>
1747
4ee55921 1748 * util/getroot.c: Include <config.h>.
1749 (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
1750 add support for /dev/md/N devices and handle LVM double dash escaping.
1751
17522008-09-04 Felix Zielcke <fzielcke@z-51.de>
1753
1754 * config.guess: Update to latest version from config git.
1755 * config.sub: Likewise.
58b6645a 1756
9124f65d 17572008-09-03 Robert Millan <rmh@aybabtu.com>
1758
1759 * disk/scsi.c (grub_scsi_open): Remove size limit when printing
1760 `disk->total_sectors'.
1761
81a06771 17622008-09-01 Colin D Bennett <colin@gibibit.com>
a0224a4e 1763
1764 * include/grub/normal.h: Fixed incorrect comment for
1765 GRUB_COMMAND_FLAG_NO_ARG_PARSE.
1766
81a06771 17672008-09-01 Colin D Bennett <colin@gibibit.com>
f0619958 1768
1769 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
1770 values with defines.
1771
1772 * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
1773 (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
1774 (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
1775 (GRUB_VBE_MODEATTR_COLOR): Likewise.
1776 (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
1777 (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
1778 (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
1779 (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
1780 (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
1781 (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
1782 (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
1783 (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
1784 (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
1785 (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
1786 (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
1787 (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
1788 (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
1789 (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
1790 (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
1791
93d5cbf8 17922008-08-31 Robert Millan <rmh@aybabtu.com>
1793
1794 * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
1795 declaration.
1796 (grub_multiboot): Fix a few warnings.
1797
21751d50 17982008-08-31 Robert Millan <rmh@aybabtu.com>
1799
1800 * loader/i386/pc/multiboot.c: Update comment not to say that
1801 boot_device support is unimplemented.
1802
e27a75c5 18032008-08-31 Robert Millan <rmh@aybabtu.com>
1804
1805 * loader/i386/pc/multiboot.c: Update comment not to say that a.out
1806 or memory map support are unimplemented.
1807
81a06771 18082008-08-31 Colin D Bennett <colin@gibibit.com>
64d2d53c 1809
1810 * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
1811
81a06771 18122008-08-31 Colin D Bennett <colin@gibibit.com>
c08a6c18 1813
1814 * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
1815 total video memory in 'vbeinfo' output; show color format details for
1816 each video mode.
1817
7c5d8d95 18182008-08-30 Pavel Roskin <proski@gnu.org>
1819
1820 * util/genmoddep.c: Remove for real this time.
1821 * DISTLIST: Remove util/genmoddep.c.
1822
4cebd25a 18232008-08-30 Robert Millan <rmh@aybabtu.com>
1824
1825 * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
1826 as required by Multiboot spec (it was already 4-byte aligned, but
1827 only by chance).
1828
b497a269 18292008-08-29 Pavel Roskin <proski@gnu.org>
1830
e3925185 1831 * kern/powerpc/ieee1275/crt0.S: Rename to ...
1832 * kern/powerpc/ieee1275/startup.S: ... this.
1833 * conf/powerpc-ieee1275.rmk: Adjust for the above.
1834 * DISTLIST: Likewise.
1835
b497a269 1836 * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
1837 grub/cpu/kernel.h. Add start label for consistency with other
1838 platforms. Add grub_prefix immediately after start. Add jump
1839 to the code after grub_prefix.
1840 * include/grub/powerpc/kernel.h: Provide valid values for
1841 GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
1842
6e5a42fe 18432008-08-29 Bean <bean123ch@gmail.com>
1844
1845 * configure.ac: Change host_os to cygwin for mingw.
1846 (asprintf): New check for function.
1847
1848 * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
1849 #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
1850
1851 * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
81a06771 1852 declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
6e5a42fe 1853 sync, sleep and grub_util_get_disk_size for mingw.
1854
1855 * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
1856 to get size in mingw.
1857 (open_device): Use flag O_BINARY if it's defined.
1858 (find_root_device): Add dummy code for mingw.
1859
1860 * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
1861 (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
1862 (get_scsi_disk_name): Return 0 for mingw.
1863
1864 * util/hostfs.c: #include <grub/util/misc.h>.
1865 (grub_hostfs_open): Use "rb" flag to open file, use
1866 grub_util_get_disk_size to get disk size for mingw.
1867
1868 * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
1869 (asprintf): New function if HAVE_ASPRINTF is not set.
1870 (sync): New function for mingw.
1871 (sleep): Likewise.
1872 (grub_util_get_disk_size): Likewise.
1873
ab3f2673 18742008-08-28 Pavel Roskin <proski@gnu.org>
1875
1876 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
1877 kern/time.c.
1878
1c282483 18792008-08-28 Robert Millan <rmh@aybabtu.com>
1880
1881 * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
1882
678e849c 18832008-08-28 Robert Millan <rmh@aybabtu.com>
1884
1885 Change find_grub_drive() syntax so it doesn't prevent it from
1886 detecting NULL names as errors.
1887
1888 * util/biosdisk.c (find_grub_drive): Move free slot search code
1889 from here ...
1890 (find_free_slot): ... to here.
1891 (read_device_map): Use find_free_slot() to search for free slots.
1892
965c75ca 18932008-08-27 Marco Gerards <marco@gnu.org>
1894
1895 * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
1896 (scsi_mod_SOURCES): New variable.
1897 (scsi_mod_CFLAGS): Likewise
1898 (scsi_mod_LDFLAGS): Likewise.
1899
1900 * disk/scsi.c: New file.
1901
1902 * include/grub/scsi.h: Likewise.
1903
1904 * include/grub/scsicmd.h: Likewise.
1905
1906 * disk/ata.c: Include <grub/scsi.h>.
1907 (grub_atapi_packet): Do not use grub_ata_cmd, use registers
1908 instead.
1909 (grub_ata_iterate): Skip ATAPI devices.
1910 (grub_ata_open): Only handle ATAPI devices.
1911 (struct grub_atapi_read): Removed.
1912 (grub_atapi_readsector): Likewise.
1913 (grub_ata_read): No longer handle ATAPI devices.
1914 (grub_ata_write): Likewise.
1915 (grub_atapi_iterate): New function.
1916 (grub_atapi_read): Likewise.
1917 (grub_atapi_write): Likewise.
1918 (grub_atapi_open): Likewise.
1919 (grub_atapi_close): Likewise.
1920 (grub_atapi_dev): New variable.
1921 (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
1922 (GRUB_MOD_FINI(ata)): Unregister ATAPI.
1923
1924 * include/grub/disk.h (enum grub_disk_dev_id): Add
1925 `GRUB_DISK_DEVICE_SCSI_ID'.
1926
c07ae501 19272008-08-26 Robert Millan <rmh@aybabtu.com>
1928
1929 * util/biosdisk.c (grub_util_biosdisk_open, open_device)
1930 (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
1931 descriptive.
1932
5ed20adc 19332008-08-23 Bean <bean123ch@gmail.com>
1934
1935 * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
1936 (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1937 disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
1938 (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
1939 dm_nv.mod.
1940 (raid5rec_mod_SOURCES): New macro.
1941 (raid5rec_mod_CFLAGS): Likewise.
1942 (raid5rec_mod_LDFLAGS): Likewise.
1943 (raid6rec_mod_SOURCES): Likewise.
1944 (raid6rec_mod_CFLAGS): Likewise.
1945 (raid6rec_mod_LDFLAGS): Likewise.
1946 (mdraid_mod_SOURCES): Likewise.
1947 (mdraid_mod_CFLAGS): Likewise.
1948 (mdraid_mod_LDFLAGS): Likewise.
1949 (dm_nv_mod_SOURCES): Likewise.
1950 (dm_nv_mod_CFLAGS): Likewise.
1951 (dm_nv_mod_LDFLAGS): Likewise.
1952
1953 * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
1954 (grub_emu_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
1955 disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1956
1957 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
1958 disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
1959
1960 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
1961
1962 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1963
1964 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1965
1966 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1967
1968 * disk/raid5_recover.c: New file.
1969
1970 * disk/raid6_recover.c: Likewise.
1971
1972 * disk/mdraid_linux.c: Likewise.
1973
1974 * disk/dmraid_nvidia.c: Likewise.
1975
1976 * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
1977 ULONG_MAX.
1978
1979 * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
1980 calculate the size of raid device.
1981 (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
1982 different layout of raid5.
1983 (grub_raid_scan_device): Remove code specific to mdraid.
1984 (grub_raid_list): New variable.
1985 (free_array): New function.
1986 (grub_raid_register): Likewise.
1987 (grub_raid_unregister): Likewise.
1988 (grub_raid_rescan): Likewise.
1989 (GRUB_MOD_INIT): Don't iterate device here.
1990 (GRUB_MOD_FINI): Use free_array to release resource.
1991
1992 * include/grub/raid.h: Remove macro and structure specific to mdraid.
1993 (grub_raid5_recover_func_t): New function variable type.
1994 (grub_raid6_recover_func_t): Likewise.
1995 (grub_raid5_recover_func): New variable.
1996 (grub_raid6_recover_func): Likewise.
1997 (grub_raid_register): New function.
1998 (grub_raid_unregister): Likewise.
1999 (grub_raid_rescan): Likewise.
2000 (grub_raid_block_xor): Likewise.
2001
2002 * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
2003 (CMD_CRC): New macro.
2004 (part): Removed.
2005 (read_file): Handle device as well as file.
2006 (cmd_crc): New function.
2007 (fstest): Handle multiple disks.
2008 (options): Remove part, raw and long, add root and diskcount.
2009 (usage): Add crc, remove -p, -r, -l, add -r and -c.
dba3f844 2010 (main): Find the first non option entry and ignore subsequent options,
5ed20adc 2011 add handling for the new options, support multiple disks.
2012
2013 * util/grub-probe.c (probe): Add mdraid to abstraction_name.
2014
29c18915 20152008-08-23 Bean <bean123ch@gmail.com>
2016
2017 * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
2018
2019 * genfslist.sh: Ignore kernel.mod.
2020
2021 * genpartmaplist.sh: Likewise.
2022
8415f261 20232008-08-23 Robert Millan <rmh@aybabtu.com>
2024
2025 * util/getroot.c (find_root_device): Skip anything that starts with
2026 a dot, not just directories. This avoids things like /dev/.tmp.md0.
2027
d5a7dc5b 20282008-08-22 Felix Zielcke <fzielcke@z-51.de>
81a06771 2029
d5a7dc5b 2030 * util/update-grub.in (GRUB_GFXMODE): Export variable.
2031 * util/grub.d/00_header.in: Allow the administrator to change default
2032 gfxmode via ${GRUB_GFXMODE}.
2033
380cfbb4 20342008-08-21 Felix Zielcke <fzielcke@z-51.de>
2035
2036 * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
2037
c9baafe7 20382008-08-21 Robert Millan <rmh@aybabtu.com>
2039
2040 * loader/i386/linux.c: New file. Implements generic 32-bit Linux
2041 loader.
2042 * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
2043 `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
2044
e290bef2 20452008-08-20 Carles Pina i Estany <carles@pina.cat>
2046
2047 * menu/normal.c (run_menu): Replace hardcoded numbers with macros
2048 (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
2049
f9dbfc96 20502008-08-19 Robert Millan <rmh@aybabtu.com>
2051
2052 * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
2053 (struct grub_virtual_screen): Remove `cursor_color'.
2054 (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
2055 initialization.
2056 (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
2057
dd6bd6ab 20582008-08-18 Robert Millan <rmh@aybabtu.com>
2059
2060 Unify (identical) linux_normal.c files.
2061 * loader/i386/efi/linux_normal.c: Move from here ...
2062 * loader/linux_normal.c: ... to here. Update all users.
2063 * loader/i386/pc/linux_normal.c: Delete. Update all users.
2064 * loader/i386/ieee1275/linux_normal.c: Likewise.
2065
7f42f83e 20662008-08-18 Robert Millan <rmh@aybabtu.com>
2067
2068 * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
2069 (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
2070 (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
2071 (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
2072 (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
2073 New macros.
2074 (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
2075 * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
2076 (GRUB_LINUX_CL_END_OFFSET): ... to here.
2077 * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
2078 (GRUB_LINUX_CL_OFFSET): ... this. Update all users.
2079 (GRUB_EFI_CL_END_OFFSET): Rename to ...
2080 (GRUB_LINUX_CL_END_OFFSET): ... this. Update all users.
2081 (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
2082 Initialize `params->video_cursor_x' and `params->video_cursor_y'
2083 portably using grub_getxy().
2084 Replace `-EFI' with `-bzImage' in boot message.
2085
38487ddb 20862008-08-17 Robert Millan <rmh@aybabtu.com>
2087
2088 * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
2089
deceb3ec 20902008-08-17 Robert Millan <rmh@aybabtu.com>
2091
2092 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
2093
2094 * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
2095 (GRUB_MACHINE_MEMORY_RESERVED): New macros.
2096 (grub_machine_mmap_iterate): New function declaration.
2097 * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
2098 structure.
2099 (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
2100 macros.
2101
2102 * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
2103 type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
2104 Move e820 parsing from here ...
2105 * kern/i386/pc/mmap.c: New file.
2106 (grub_machine_mmap_iterate): ... to here.
2107
2108 * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
2109 (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
2110 (GRUB_MACHINE_MEMORY_AVAILABLE): ... this. Update all users.
2111 (grub_available_iterate): Redeclare to return `void', and redeclare
2112 its hook to use grub_uint64_t as addr and size parameters, and rename
2113 to ...
2114 (grub_machine_mmap_iterate): ... this. Update all users.
2115
2116 * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
2117 to make it more readable. Rename to ...
2118 (grub_machine_mmap_iterate): ... this.
2119
2120 * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
2121 (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
2122 (grub_multiboot): Allocate an extra region after the payload, and fill
2123 it with a Multiboot memory map. Adjust a.out loader to calculate size
2124 with the extra space.
2125 (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
2126 with the extra space.
2127
f8aa0f43 21282008-08-17 Carles Pina i Estany <carles@pina.cat>
2129
9807deb9 2130 * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
f8aa0f43 2131
605f5bb6 21322008-08-17 Felix Zielcke <fzielcke@z-51.de>
2133
2134 * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
2135 mdate-sh to the list `find' searches for.
2136 * DISTLIST: Regenerated.
2137
210db6c6 21382008-08-16 Felix Zielcke <fzielcke@z-51.de>
2139
2140 * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
2141 genkernsyms.sh. Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
48cdbfd4 2142 genmoddep.awk, gensymlist.sh.in.
2143 (DISTDIRS): Add bus, docs, hook, lib.
210db6c6 2144 * DISTLIST: Regenerated.
48cdbfd4 2145 * NEWS: Add cygwin support and change the `os-prober' entry a bit.
210db6c6 2146
1082b929 21472008-08-16 Robert Millan <rmh@aybabtu.com>
2148
2149 * disk/raid.c (grub_raid_init): Handle/report errors set by
2150 grub_device_iterate().
2151 * disk/lvm.c (grub_lvm_init): Likewise.
2152
42ce5170 21532008-08-15 Bean <bean123ch@gmail.com>
2154
2155 * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2156 and datehook.mod.
2157 (datetime_mod_SOURCES): New macro.
2158 (datetime_mod_CFLAGS): Likewise.
2159 (datetime_mod_LDFLAGS): Likewise.
2160 (date_mod_SOURCES): Likewise.
2161 (date_mod_CFLAGS): Likewise.
2162 (date_mod_LDFLAGS): Likewise.
2163 (datehook_mod_SOURCES): Likewise.
2164 (datehook_mod_CFLAGS): Likewise.
2165 (datehook_mod_LDFLAGS): Likewise.
2166
2167 * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2168 and datehook.mod.
2169 (datetime_mod_SOURCES): New macro.
2170 (datetime_mod_CFLAGS): Likewise.
2171 (datetime_mod_LDFLAGS): Likewise.
2172 (date_mod_SOURCES): Likewise.
2173 (date_mod_CFLAGS): Likewise.
2174 (date_mod_LDFLAGS): Likewise.
2175 (datehook_mod_SOURCES): Likewise.
2176 (datehook_mod_CFLAGS): Likewise.
2177 (datehook_mod_LDFLAGS): Likewise.
2178
2179 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2180 and datehook.mod.
2181 (datetime_mod_SOURCES): New macro.
2182 (datetime_mod_CFLAGS): Likewise.
2183 (datetime_mod_LDFLAGS): Likewise.
2184 (date_mod_SOURCES): Likewise.
2185 (date_mod_CFLAGS): Likewise.
2186 (date_mod_LDFLAGS): Likewise.
2187 (datehook_mod_SOURCES): Likewise.
2188 (datehook_mod_CFLAGS): Likewise.
2189 (datehook_mod_LDFLAGS): Likewise.
2190
2191 * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2192 and datehook.mod.
2193 (datetime_mod_SOURCES): New macro.
2194 (datetime_mod_CFLAGS): Likewise.
2195 (datetime_mod_LDFLAGS): Likewise.
2196 (date_mod_SOURCES): Likewise.
2197 (date_mod_CFLAGS): Likewise.
2198 (date_mod_LDFLAGS): Likewise.
2199 (datehook_mod_SOURCES): Likewise.
2200 (datehook_mod_CFLAGS): Likewise.
2201 (datehook_mod_LDFLAGS): Likewise.
2202
2203 * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
2204 and datehook.mod.
2205 (datetime_mod_SOURCES): New macro.
2206 (datetime_mod_CFLAGS): Likewise.
2207 (datetime_mod_LDFLAGS): Likewise.
2208 (date_mod_SOURCES): Likewise.
2209 (date_mod_CFLAGS): Likewise.
2210 (date_mod_LDFLAGS): Likewise.
2211 (datehook_mod_SOURCES): Likewise.
2212 (datehook_mod_CFLAGS): Likewise.
2213 (datehook_mod_LDFLAGS): Likewise.
2214
2215 * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
2216
2217 * commands/date.c: New file.
2218
2219 * hook/datehook.c: Likewise.
2220
2221 * include/grub/lib/datetime.h: Likewise.
2222
2223 * include/grub/i386/cmos.h: Likewise.
2224
2225 * lib/datetime.c: Likewise.
2226
2227 * lib/i386/datetime.c: Likewise.
2228
2229 * lib/efi/datetime.c: Likewise.
2230
0e9242da 22312008-08-14 Robert Millan <rmh@aybabtu.com>
2232
2233 * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
2234 (grub_mkelfimage_SOURCES): New variable.
2235 (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
2236
2237 * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
2238 (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
2239 * conf/powerpc-ieee1275.rmk: Likewise.
2240 * conf/i386-ieee1275.rmk: Likewise.
2241
2242 * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
2243 * kern/i386/coreboot/init.c: Likewise.
2244
2245 * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
2246 with `<grub/cpu/kernel.h>'.
2247 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
2248 to ...
2249 (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
2250 * kern/i386/coreboot/startup.S: Likewise.
2251
2252 * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
2253 (GRUB_MOD_GAP): Remove.
2254 * include/grub/powerpc/kernel.h: New file.
2255 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
2256 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2257 * include/grub/i386/kernel.h: New file.
2258 * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
2259 (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
2260 (GRUB_KERNEL_MACHINE_DATA_END): Remove.
2261
2262 * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
2263 `grub-mkelfimage'.
2264 Use --directory when invoking grub_mkimage.
2265
2266 * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
2267 (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
2268 GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
2269 and GRUB_KERNEL_CPU_PREFIX.
2270
b86408f8 22712008-08-14 Felix Zielcke <fzielcke@z-51.de>
2272
d5e619ca 2273 * include/grub/err.h (grub_err_printf): New function prototype.
2274 * util/misc.c (grub_err_printf): New function.
2275 * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
2276 grub_printf.
2277 * kern/err.c (grub_print_error): Use grub_err_printf.
b86408f8 2278
7161f0e0 22792008-08-13 Robert Millan <rmh@aybabtu.com>
2280
2281 * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
2282
a1967522 22832008-08-13 Robert Millan <rmh@aybabtu.com>
2284
2285 * docs/grub.cfg: Use the native device name for the example GNU/Hurd
2286 boot entry.
2287
371458b5 22882008-08-12 Robert Millan <rmh@aybabtu.com>
2289
2290 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
2291 of the relocation code from here ...
2292 (grub_multiboot): ... to here.
2293 (forward_relocator, backward_relocator): Move from here ...
2294 * kern/i386/loader.S (grub_multiboot_forward_relocator)
2295 (grub_multiboot_backward_relocator): ... to here.
2296 (grub_multiboot_real_boot): Use %edx for entry offset. Put Multiboot
2297 magic in %eax. Use %ebp for jumping (so %edx is not trashed).
2298 * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
2299 (grub_multiboot_forward_relocator_end)
2300 (grub_multiboot_backward_relocator)
2301 (grub_multiboot_backward_relocator_end): New variables.
2302
05f9452b 23032008-08-12 Bean <bean123ch@gmail.com>
2304
2305 * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
2306
20024ab0 23072008-08-11 Robert Millan <rmh@aybabtu.com>
2308
2309 * kern/i386/linuxbios/startup.S: Move from here ...
2310 * kern/i386/coreboot/startup.S: ... to here.
2311
2312 * kern/i386/linuxbios/init.c: Move from here ...
2313 * kern/i386/coreboot/init.c: ... to here.
2314
2315 * kern/i386/linuxbios/table.c: Move from here ...
2316 * kern/i386/coreboot/mmap.c: ... to here.
2317
2318 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
2319
e352e9cd 23202008-08-11 Robert Millan <rmh@aybabtu.com>
2321
2322 * kern/device.c (grub_device_open): Do not handle grub_disk_open()
2323 errors. Leave it to the upper layer to handle them.
2324
2d05bc6a 23252008-08-09 Christian Franke <franke@computer.org>
2326
2327 * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
2328 * conf/common.rmk: Install `grub-pe2elf' only if requested.
2329 Install `grub.d/10_windows' only on Cygwin.
2330 * configure.ac: Add subst of `target_os'.
2331 Check `target_os' also before setting TARGET_OBJ2ELF.
2332 Add `--enable-grub-pe2elf'.
2333
042bd419 23342008-08-08 Robert Millan <rmh@aybabtu.com>
2335
2336 * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2337 (grub_last_time): Change type to grub_uint64_t.
2338 (grub_disk_open): Migrate code from to using grub_get_time_ms().
2339 (grub_disk_close): Likewise.
2340
2341 * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
2342 (run_menu): Migrate code from to using grub_get_time_ms().
2343
2344 * util/misc.c (grub_get_time_ms): New function.
2345
7f280db5 23462008-08-08 Marco Gerards <marco@gnu.org>
2347
2348 * disk/ata.c (grub_ata_regget): Change return type to
2349 `grub_uint8_t'.
2350 (grub_ata_regget2): Likewise.
2351 (grub_ata_wait_status): New function.
2352 (grub_ata_wait_busy): Removed function, updated all users to use
2353 `grub_ata_wait_status'.
2354 (grub_ata_wait_drq): Likewise.
2355 (grub_ata_cmd): New function.
2356 (grub_ata_pio_read): Change return type to `grub_uint8_t'. Add
2357 error handling.
2358 (grub_ata_pio_write): Add error handling.
2359 (grub_atapi_identify): Likewise.
2360 (grub_atapi_packet): Use `grub_ata_cmd' and improve error
2361 handling.
2362 (grub_ata_identify): Use `grub_ata_cmd' and improve error
2363 handling. Actually use the detected registers. Reorder the
2364 detection logic such that it is easier to read.
2365 (grub_ata_pciinit): Do not assign the same ID to each controller.
2366 (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
2367 handling.
2368 (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
2369
2370 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
2371
1fbc5e66 23722008-08-08 Marco Gerards <marco@gnu.org>
2373
2374 * NEWS: Update.
2375
819ce6c0 23762008-08-07 Bean <bean123ch@gmail.com>
2377
2378 * include/grub/x86_64/pci.h: New file.
2379
5c41d44d 23802008-08-07 Christian Franke <franke@computer.org>
2381
2382 * kern/i386/pit.c (TIMER2_SPEAKER): New define.
2383 (TIMER2_GATE): Likewise.
2384 (grub_pit_wait): Add enable/disable of the timer2 gate
2385 bit of port 0x61. This fixes a possible infinite loop.
2386
5ebc275d 23872008-08-07 Bean <bean123ch@gmail.com>
2388
2389 * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
2390 kern/i386/tsc.c and kern/i386/pit.c.
2391
2392 * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
2393 x86_64 platform.
2394
2395 * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
2396 <grub/i386/tsc.h>.
2397
2398 * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
2399
e383b3d0 24002008-08-07 Bean <bean123ch@gmail.com>
2401
2402 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
2403
2404 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
2405
2406 * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
2407 multiple inclusion. Add #include <grub/types.h>.
2408
1cbb58ac 24092008-08-06 Christian Franke <franke@computer.org>
2410
2411 * conf/common.rmk: Build and install `10_windows'.
2412 * util/grub.d/10_windows.in: New script.
2413
337f5a1e 24142008-08-06 Pavel Roskin <proski@gnu.org>
2415
2416 * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
2417
057bc4ac 24182008-08-06 Robert Millan <rmh@aybabtu.com>
2419
2420 * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
2421 * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
2422
2b99f123 24232008-08-06 Bean <bean123ch@gmail.com>
2424
2425 * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
2426 (grub_pxefs_fs_int): Remove dummy definition.
2427 (grub_pxefs_open): Use data->block_size to store the current block
2428 size setting.
2429 (grub_pxefs_read): Use block size stored in data->block_size. As the
2430 value of grub_pxe_blksize can be changed after the file is opened.
2431
9f0234cb 24322008-08-06 Bean <bean123ch@gmail.com>
2433
2434 * fs/i386/pc/pxe.c (curr_file): new variable.
2435 (grub_pxefs_open): Simply the handling of pxe file system. Don't
2436 require the dummy internal file system anymore.
2437 (grub_pxefs_read): Removed.
2438 (grub_pxefs_close): Likewise.
2439 (grub_pxefs_fs_int): Likewise.
2440 (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
2441 connection when we switch file.
2442 (grub_pxefs_close_int): Renamed to grub_pxefs_close.
2443
a55d42e0 24442008-08-06 Robert Millan <rmh@aybabtu.com>
2445
2446 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
2447 `halt.mod'.
2448 (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
2449 (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
2450
2451 * kern/i386/halt.c: New file.
2452 * kern/i386/reboot.c: Likewise.
2453 * include/grub/i386/reboot.h: Likewise.
2454 * include/grub/i386/halt.h: Likewise.
2455
2456 * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
2457 Include `<grub/cpu/halt.h>'.
2458 * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
2459 [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
2460
2461 * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
2462 (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
2463 (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
2464 (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
2465 (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
2466 (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
2467 from here ...
2468 * include/grub/i386/at_keyboard.h: ... to here.
2469
24371d26 24702008-08-05 Robert Millan <rmh@aybabtu.com>
2471
2472 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
2473 * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
2474 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
2475 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2476 `kern/generic/millisleep.c'.
2477
2478 * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
2479 instead of grub_get_rtc().
2480 (grub_tsc_init): Initialize `tsc_boot_time'.
2481
2482 * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
2483 (grub_machine_init): Use grub_tsc_init() rather than
2484 installing an RTC-based handler via grub_install_get_time_ms().
2485
2486 * kern/i386/pit.c: New file.
2487 * include/grub/i386/pit.h: Likewise.
2488
9e7007b3 24892008-08-05 Bean <bean123ch@gmail.com>
2490
2491 * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
2492
2493 * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
2494 (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
2495 (pxe_mod_SOURCES): New macro.
2496 (pxe_mod_CFLAGS): Likewise.
2497 (pxe_mod_LDFLAGS): Likewise.
2498 (pxecmd_mod_SOURCES): Likewise.
2499 (pxecmd_mod_CFLAGS): Likewise.
2500 (pxecmd_mod_LDFLAGS): Likewise.
2501
2502 * kern/i386/pc/startup.S (grub_pxe_scan): New function.
2503 (grub_pxe_call): Likewise.
2504
2505 * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
2506
2507 * commands/i386/pc/pxecmd.c: New file.
2508
9f0234cb 2509 * fs/i386/pc/pxe.c: Likewise.
9e7007b3 2510
2511 * include/grub/i386/pc/pxe.h: Likewise.
2512
6977d49f 25132008-08-05 Bean <bean123ch@gmail.com>
2514
2515 * util/console.c (grub_console_cur_color): New variable.
2516 (grub_console_standard_color): Likewise.
2517 (grub_console_normal_color): Likewise.
2518 (grub_console_highlight_color): Likewise.
2519 (color_map): Likewise.
2520 (use_color): Likewise.
2521 (NUM_COLORS): New macro.
2522 (grub_ncurses_setcolorstate): Handle color properly.
2523 (grub_ncurses_setcolor): Don't change color here, just remember the
2524 settings, color will be set in grub_ncurses_setcolorstate.
2525 (grub_ncurses_getcolor): New function.
2526 (grub_ncurses_init): Initialize color pairs.
2527 (grub_ncurses_term): New member grub_ncurses_getcolor.
2528
9c2ff3ee 25292008-08-05 Colin D Bennett <colin@gibibit.com>
337f5a1e 2530
9c2ff3ee 2531 High resolution timer support. Implemented for x86 CPUs using TSC.
2532 Extracted generic grub_millisleep() so it's linked in only as needed.
2533 This requires a Pentium compatible CPU; if the RDTSC instruction is
2534 not supported, then it falls back on the generic grub_get_time_ms()
2535 implementation that uses the machine's RTC.
2536
2537 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
2538 `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
2539 `kern/generic/millisleep.c'.
2540
2541 * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
2542 `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
2543
2544 * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
2545 `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
2546
2547 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2548
2549 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
2550 `kern/generic/millisleep.c'.
2551
2552 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2553
2554 * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
2555
2556 * kern/generic/rtc_get_time_ms.c: New file.
2557
2558 * kern/generic/millisleep.c: New file.
337f5a1e 2559
9c2ff3ee 2560 * kern/misc.c: Don't include
2561 <kern/time.h> anymore.
2562 (grub_millisleep_generic): Removed.
2563
2564 * commands/sleep.c (grub_interruptible_millisleep): Uses
2565 grub_get_time_ms() instead of grub_get_rtc().
2566
2567 * include/grub/i386/tsc.h (grub_get_tsc): New file. New inline
2568 function.
2569 (grub_cpu_is_cpuid_supported): New inline function.
2570 (grub_cpu_is_tsc_supported): New inline function.
2571 (grub_tsc_init): New function prototype.
2572 (grub_tsc_get_time_ms): New function prototype.
2573
2574 * kern/i386/tsc.c (grub_get_time_ms): New file.
2575
2576 * include/grub/time.h: Include <grub/types.h.
2577 (grub_millisleep_generic): Removed.
2578 (grub_get_time_ms): New prototype.
2579 (grub_install_get_time_ms): New prototype.
2580 (grub_rtc_get_time_ms): New prototype.
2581
2582 * kern/time.c (grub_get_time_ms): New function.
2583 (grub_install_get_time_ms): New function.
2584
2585 * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>. Don't include
2586 <grub/time.h> anymore.
2587 (grub_millisleep): Removed.
2588 (grub_machine_init): Call grub_tsc_init.
2589
2590 * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
2591 get_time_ms() implementation.
2592
2593 * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
2594 (ieee1275_get_time_ms): New function.
2595 (grub_machine_init): Install get_time_ms() implementation.
2596
2597 * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
2598 (grub_machine_init): Call grub_tsc_init().
2599 (grub_millisleep): Removed.
bf06a93f 2600
9c2ff3ee 2601 * kern/ieee1275/init.c (grub_millisleep): Removed.
2602 (grub_machine_init): Install ieee1275_get_time_ms()
2603 implementation.
2604 (ieee1275_get_time_ms): New function.
2605 (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
2606 real work.
2607
9ec92aaf 26082008-08-05 Marco Gerards <marco@gnu.org>
2609
2610 * disk/ata.c: Include <grub/pci.h>.
2611 (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
2612 (grub_ata_initialize): Rewritten.
2613 (grub_ata_device_initialize): New function.
2614
8d23f507 26152008-08-04 Pavel Roskin <proski@gnu.org>
2616
2617 * kern/main.c: Include grub/mm.h.
2618
5e15ee3d 26192008-08-04 Robert Millan <rmh@aybabtu.com>
2620
2621 * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
2622 (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
2623 corruption problem).
2624
a9053f8f 26252008-08-04 Robert Millan <rmh@aybabtu.com>
2626
2627 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
2628 warnings introduced in my last commit.
2629
dd19c7d7 26302008-08-03 Robert Millan <rmh@aybabtu.com>
2631
2632 Make PCI available on all i386 architectures.
2633
2634 * include/grub/i386/pc/pci.h: Move from here ...
2635 * include/grub/i386/pci.h: ... to here.
2636
2637 * include/grub/i386/pc/pci.h: Remove.
2638 * include/grub/i386/efi/pci.h: Remove.
2639 * include/grub/x86_64/efi/pci.h: Remove.
2640
2641 * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
2642 `<grub/cpu/pci.h>'.
2643
2644 * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
2645 (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
2646 (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
2647
2648 * conf/i386-ieee1275.rmk: Likewise.
2649
e14a6184 26502008-08-03 Robert Millan <rmh@aybabtu.com>
2651
2652 * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
2653 (grub_console_setcursor): Make it possible to set cursor off.
2654
52768e37 26552008-08-03 Robert Millan <rmh@aybabtu.com>
2656
2657 * util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
2658 of modules instead of assuming which platform provides what.
2659 * util/update-grub.in: Likewise.
2660
2d52f57f 26612008-08-03 Robert Millan <rmh@aybabtu.com>
2662
2663 * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
2664 instead of `grub_install_dos_part' to determine whether a drive needs
2665 to be prepended to prefix (`grub_install_dos_part' is not reliable,
825aa57a 2666 because it can be overridden when loading GRUB via Multiboot).
2d52f57f 2667
2a5cd121 26682008-08-02 Robert Millan <rmh@aybabtu.com>
2669
2670 * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
2671
93808428 26722008-08-02 Robert Millan <rmh@aybabtu.com>
2673
2674 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
2675 of informational grub_dprintf() calls.
2676
3bd0a12a 26772008-08-02 Robert Millan <rmh@aybabtu.com>
2678
2679 * disk/memdisk.c (memdisk_size): Don't initialize.
2680 (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
2681
2682 * include/grub/i386/pc/kernel.h
2683 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
2684 (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
2685 (grub_memdisk_image_size, grub_arch_memdisk_addr)
2686 (grub_arch_memdisk_size): Remove.
2687
2688 * include/grub/kernel.h (struct grub_module_header): Remove `offset'
2689 field (was only used to transfer a constant). Add `type' field to
2690 support multiple module types.
2691 (grub_module_iterate): New function.
2692
2693 * kern/device.c (grub_device_open): Do not hide error messages
2694 when grub_disk_open() fails. Use grub_print_error() instead.
2695
2696 * kern/i386/pc/init.c (grub_arch_modules_addr)
2697 (grub_arch_memdisk_size): Remove functions.
2698 (grub_arch_modules_addr): Return the module address in high memory
2699 (now that it isn't copied anymore).
2700
2701 * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
2702 (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
2703 decompression routine (grub_total_module_size already includes that
2704 now). Don't copy modules back to low memory.
2705
2706 * kern/main.c: Include `<grub/mm.h>'.
2707 (grub_load_modules): Split out (and use) ...
2708 (grub_module_iterate): ... this function, which iterates through
2709 module objects and runs a hook.
2710 Comment out grub_mm_init_region() call, as it would cause non-ELF
2711 modules to be overwritten.
2712
2713 * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
2714 the memdisk image in its own region, make it part of the module list.
2715 * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
2716 (main): Parse --memdisk|-m option, and pass user-provided path as
2717 parameter to generate_image().
2718 (add_segments): Pass `memdisk_path' down to load_modules().
2719 (load_modules): Embed memdisk image in module section when requested.
2720 * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
2721 `header.type' instead of `header.offset'.
2722
2723 * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
2724 (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
2725 (memdisk_mod_LDFLAGS): New variables.
2726 * conf/i386-coreboot.rmk: Likewise.
2727 * conf/i386-ieee1275.rmk: Likewise.
2728
a927cc73 27292008-08-02 Robert Millan <rmh@aybabtu.com>
2730
2731 * loader/i386/pc/multiboot.c (playground, forward_relocator)
2732 (backward_relocator): New variables. Used to allocate and relocate
2733 the payload, respectively.
2734 (grub_multiboot_load_elf32): Load into heap instead of requested
825aa57a 2735 address, install the appropriate relocator code in each bound of
a927cc73 2736 the payload, and set the entry point such that
2737 grub_multiboot_real_boot() will jump to one of them.
2738
2739 * kern/i386/loader.S (grub_multiboot_payload_size)
2740 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2741 (grub_multiboot_payload_entry_offset): New variables.
2742 (grub_multiboot_real_boot): Set cpu context to what the relocator
2743 expects, and jump to the relocator instead of the payload.
2744
2745 * include/grub/i386/loader.h (grub_multiboot_payload_size)
2746 (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
2747 (grub_multiboot_payload_entry_offset): Export.
2748
b15d8a0c 27492008-08-01 Bean <bean123ch@gmail.com>
2750
2751 * normal/menu_entry.c (editor_getline): Don't return the original
2752 string as result, as it will be released by lexer once it has done
2753 using it.
2754
cdfb3d22 27552008-08-01 Robert Millan <rmh@aybabtu.com>
2756
2757 * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
2758 within menuentries, not before them.
2759 util/grub.d/10_hurd.in: Likewise.
2760
9175e93d 27612008-08-01 Bean <bean123ch@gmail.com>
2762
2763 * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
2764 (bufio_mod_SOURCES): New macro.
2765 (bufio_mod_CFLAGS): Likewise.
2766 (bufio_mod_LDFLAGS): Likewise.
2767
2768 * include/grub/bufio.h: New file.
2769
2770 * io/bufio.c: Likewise.
2771
2772 * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
2773 (grub_video_reader_png): Use grub_buffile_open to open file.
2774
2775 * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
2776 (grub_video_reader_jpeg): Use grub_buffile_open to open file.
2777
2778 * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
2779 (grub_video_reader_tga): Use grub_buffile_open to open file.
2780
2781 * font/manager.c: Include <grub/bufio.h>.
2782 (add_font): Use grub_buffile_open to open file.
2783
3d8383e7 27842008-07-31 Robert Millan <rmh@aybabtu.com>
2785
2786 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
2787 ELF segments, use a macro for arbitrarily accessing any of them instead
2788 of preparing a pointer that allows access to one at a time.
2789 (grub_multiboot_load_elf64): Likewise.
2790
16e641b6 27912008-07-31 Bean <bean123ch@gmail.com>
2792
2793 * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
2794 GRUB_KERNEL_MACHINE_DATA_END.
2795
59198b72 27962008-07-30 Robert Millan <rmh@aybabtu.com>
2797
2798 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
2799 Increase from 0x50 to 0x60.
2800 * util/i386/pc/grub-install.in: Detect cross-disk installs, and
2801 use UUIDs to identify the root drive for them. If that's not
2802 possible, abort.
2803 * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
2804 check, for cross-disk installs.
2805
ae88bca3 28062008-07-30 Robert Millan <rmh@aybabtu.com>
2807
2808 * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
2809 is non-empty, use it to set the `prefix' environment variable instead
2810 of the usual approach.
2811 * kern/i386/linuxbios/init.c (make_install_device): Remove function.
2812 (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
2813 environment variable instead of dummy make_install_device().
2814
2815 * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
2816 (start): Insert a data section, with `grub_prefix' variable.
825aa57a 2817 * kern/i386/linuxbios/startup.S: Likewise.
ae88bca3 2818
2819 * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
2820 New variable reference.
2821 * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
2822 New macro. Defines offset of `grub_prefix' within startup.S (relative
2823 to `start').
2824 (GRUB_KERNEL_MACHINE_DATA_END): New macro. Defines the end of data
2825 section within startup.S (relative to `start').
2826 * include/grub/i386/coreboot/kernel.h: Likewise.
2827
2828 * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
2829 Overwrite grub_prefix with its contents, at the beginning of the
2830 first segment.
2831 (main): Understand -p|--prefix.
2832
14f41dd1 28332008-07-30 Robert Millan <rmh@aybabtu.com>
2834
2835 * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
2836
4ca049a3 28372008-07-30 Robert Millan <rmh@aybabtu.com>
2838
2839 * term/i386/pc/vga_text.c (grub_console_cls): Use
2840 grub_console_gotoxy() to go back to beginning of the screen.
2841 Found by Patrick Georgi <patrick.georgi@coresystems.de>
2842
2921d337 28432008-07-29 Christian Franke <franke@computer.org>
2844
2845 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
2846 Add conversion of emulated mount points on Cygwin.
2847
b609876d 28482008-07-29 Christian Franke <franke@computer.org>
2849
2850 * util/update-grub.in: Add a check for admin
2851 group on Cygwin.
2852 Remove old `grub.cfg.new' before creation.
2853 Add `-f' to `mv' to handle the different filesystem
2854 semantics of Windows.
2855
e93e4679 28562008-07-29 Bean <bean123ch@gmail.com>
2857
2858 * normal/main.c (get_line): Fix buffer overflow bug.
2859
41694fd0 28602008-07-28 Robert Millan <rmh@aybabtu.com>
2861
2862 * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
2863 (struct grub_apple_header): New struct. Describes the layout of
2864 the partmap header.
2865 (apple_partition_map_iterate): Check the header magic as well as the
2866 partition magic (which was already being checked).
2867
cfd0b4e6 28682008-07-28 Pavel Roskin <proski@gnu.org>
2869
2870 * genmk.rb: Add a warning to the beginning of the output that
2871 it's a generated file and should not be edited.
2872
93cce016 28732008-07-28 Robert Millan <rmh@aybabtu.com>
2874
2875 * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2876 with the same number are found, just use issue a warning with
2877 grub_dprintf(), as this error has been reported to be non-fatal.
c298def0 2878
cd1df915 28792008-07-27 Robert Millan <rmh@aybabtu.com>
2880
2881 * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
2882 information.
2883
b70a8427 28842008-07-27 Bean <bean123ch@gmail.com>
2885
2886 * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
2887 (grub_fat_find_dir): Ignore case when comparing filename.
2888
8f5e379f 28892008-07-27 Bean <bean123ch@gmail.com>
2890
2891 * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
2892 smallino, as it's more descriptive, and i8count can be confused with
2893 the other field count.
2894 (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
2895 inode type.
2896
a85cd5a0 28972008-07-27 Bean <bean123ch@gmail.com>
2898
2899 * commands/crc.c: New file.
2900
2901 * lib/crc.c: Likewise.
2902
2903 * include/grub/lib/crc.h: Likewise.
2904
2905 * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
2906
2907 * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
2908 (hexdump): Move this function to ...
2909
2910 * lib/hexdump.c: ... here.
2911
2912 * include/grub/hexdump.h: Renamed to ...
2913
2914 * include/grub/lib/hexdump.h: ... this.
2915
2916 * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
2917
2918 * util/grub-editenv.c: Likewise.
2919
2920 * include/envblk.h: Renamed to ...
2921
2922 * include/lib/envblk.h: ... this.
2923
2924 * util/envblk.c: Renamed to ...
2925
2926 * lib/envblk.c: ... this.
2927
2928 * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
2929 lib/hexdump.c.
2930 (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
2931 (pkglib_MODULES): Add crc.mod.
2932 (hexdump_mod_SOURCES): Add lib/hexdump.c.
2933 (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
2934 (crc_mod_SOURCES): New macro.
2935 (crc_mod_CFLAGS): Likewise.
2936 (crc_mod_LDFLAGS): Likewise.
2937
2938 * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
2939
2940 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2941
2942 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2943
2944 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2945
2946 * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2947
c298def0 29482008-07-27 Felix Zielcke <fzielcke@z-51.de>
8749e9e5 2949
2950 * commands/help.c: Include <grub/term.h>.
2951 (TERM_WIDTH): Removed. Updated all users.
2952
cc349fb3 29532008-07-27 Pavel Roskin <proski@gnu.org>
2954
2955 * util/getroot.c (find_root_device): Rephrase a comment to avoid
2956 spurious warnings about a comment within a comment.
2957
9051607e 29582008-07-25 Robert Millan <rmh@aybabtu.com>
2959
2960 * util/getroot.c (find_root_device): Skip devices that match
2961 /dev/dm-[0-9]. This lets the real device be found for any type of
2962 abstraction (LVM, EVMS, RAID..).
2963 (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
2964 and /dev/evms (for EVMS) before traversing /dev. If a /dev/dm-[0-9]
2965 device is found first, find_root_device() will now skip it.
2966
01453bfc 29672008-07-24 Pavel Roskin <proski@gnu.org>
2968
2969 * include/grub/types.h: Use __builtin_bswap32() and
2970 __builtin_bswap64() with gcc 4.3 and newer.
2971
6af9849f 29722008-07-24 Christian Franke <franke@computer.org>
2973
3a0fa256 2974 * util/i386/pc/grub-install.in: If `--debug' is specified,
2975 pass `--verbose' to grub-setup.
2976 Abort script if make_system_path_relative_to_its_root() fails.
2977
7810e747 29782008-07-24 Bean <bean123ch@gmail.com>
2979
2980 * configure.ac: Fixed a bug caused by the previous cygwin patch,
2981 variable `target_platform' should be `platform'.
2982
42290e17 29832008-07-24 Bean <bean123ch@gmail.com>
2984
51cc5193 2985 * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
42290e17 2986 (grub_png_init_fixed_block): New function.
2987 (grub_png_decode_image_data): Handle fixed huffman code compression.
2988
2a8a80e4 29892008-07-24 Bean <bean123ch@gmail.com>
2990
2991 * common.rmk (bin_UTILITIES): Add grub-pe2elf.
2992 (grub_pe2elf_SOURCES): New macro.
2993 (CLEANFILES): Add grub-pe2elf.
2994
2995 * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
2996 (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
2997 (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
2998 (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
2999 (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
3000 (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
3001 (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
3002 (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
3003 (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
3004 (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
3005 (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
3006 (GRUB_PE32_SYM_CLASS_FILE): Likewise.
3007 (GRUB_PE32_DT_FUNCTION): Likewise.
3008 (GRUB_PE32_REL_I386_DIR32): Likewise.
3009 (GRUB_PE32_REL_I386_REL32): Likewise.
3010 (grub_pe32_symbol): New structure.
3011 (grub_pe32_reloc): Likewise.
3012
3013 * util/grub-pe2elf.c: New file.
3014
3015 * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
3016 start symbol in non pc platform.
3017
3018 * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
3019
3020 The following patches are from Christian Franke.
3021
3022 * include/grub/dl.h: Remove .previous, gas supports this only
3023 for ELF format.
3024
3025 * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
3026 Remove .type, gas supports this only for ELF format.
3027
3028 * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
3029 nullbytes in symbol table. This fixes an infinite loop if table is
3030 zero filled.
3031
3032 * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
3033 TARGET_IMG_LDFLAGS and EXEEXT.
3034
3035 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
3036 TARGET_IMG_LDFLAGS_AC.
3037 (grub_CHECK_STACK_ARG_PROBE): New function.
3038
3039 * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
3040
3041 * conf/i386-pc-cygwin-ld-img.sc: New linker script.
3042
3043 * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
3044 to set TARGET_IMG_LD* accordingly.
3045 Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
3046 Add call to grub_CHECK_STACK_ARG_PROBE.
3047 Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
3048
3049 * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
3050
3051 * genmk.rb: Add EXEEXT to CLEANFILES.
3052
12ccdb75 30532008-07-23 Robert Millan <rmh@aybabtu.com>
3054
3055 * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
3056 define the codes for arrows and lines used for the menu).
3057 (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
3058 as well.
3059
3060 * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
3061 fonts, because the latter are too slow.
3062
18eeaf04 30632008-07-21 Bean <bean123ch@gmail.com>
3064
3065 * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
3066 a20. Run keyboard test last, as it will cause macbook to halt.
3067
b095e2ad 30682008-07-18 Pavel Roskin <proski@gnu.org>
3069
3070 * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P. We cannot
3071 load foreign architecture modules correctly anyway. Keep
3072 support for loading host architecture modules, whether we
3073 compile them or not.
3074
737feb35 30752008-07-17 Pavel Roskin <proski@gnu.org>
3076
3f4ce737 3077 * configure.ac: Use -m32 or -m64 regardless of whether we had to
3078 change target_cpu. The compiler default can mismatch target_cpu
3079 in any case.
3080
4ad2d049 3081 * disk/efi/efidisk.c: Fix format warnings on x86_64.
3082 * kern/efi/efi.c: Likewise.
3083
f6130a12 3084 * aclocal.m4 (grub_PROG_TARGET_CC): New macro. Check if the
3085 target compiler is functional.
3086 * configure.ac: Call grub_PROG_TARGET_CC once all target flags
3087 are set up.
3088
58393a2d 3089 * configure.ac: Default to efi platform for x86_64-apple. Allow
3090 powerpc64 CPU, default to ieee1275 platform for it. Split CPU
3091 adjustments from the rest, only do them if target is not
3092 explicitly given. Merge other adjustments with the final sanity
3093 check. Remove an extraneous check for supported CPU. Be
3094 specific which CPU and which platform is not supported.
3095
737feb35 3096 * configure.ac: Default to pc platform for x86_64.
3097
546f966a 30982008-07-17 Robert Millan <rmh@aybabtu.com>
3099
3100 Partial LinuxBIOS -> Coreboot rename.
3101
3102 * conf/i386-linuxbios.rmk: Renamed to ...
3103 * conf/i386-coreboot.rmk: ... this.
3104 * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
3105 * configure.ac: Accept "coreboot" as input platform (but maintain
3106 compatibility with "linuxbios").
3107 * include/grub/i386/linuxbios: Renamed to ...
3108 * include/grub/i386/coreboot: ... this.
3109
20011694 31102008-07-17 Bean <bean123ch@gmail.com>
3111
3112 * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
c11f6d16 3113 (appleldr_mod_SOURCE): New variable.
20011694 3114 (appleldr_mod_CFLAGS): Likewise.
3115 (appleldr_mod_LDFLAGS): Likewise.
3116 (pci_mod_SOURCES): Likewise.
3117 (pci_mod_CFLAGS): Likewise.
3118 (pci_mod_LDFLAGS): Likewise.
3119 (lspci_mod_SOURCES): Likewise.
3120 (lspci_mod_CFLAGS): Likewise.
3121 (lspci_mod_LDFLAGS): Likewise.
3122
3123 * conf/x86_64-efi.rmk: New file.
3124
3125 * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
3126 macro.
3127 (grub_efidisk_write): Likewise.
3128
3129 * include/efi/api.h (efi_call_0): New macro.
3130 (efi_call_1): Likewise.
3131 (efi_call_2): Likewise.
3132 (efi_call_3): Likewise.
3133 (efi_call_4): Likewise.
3134 (efi_call_5): Likewise.
3135 (efi_call_6): Likewise.
3136
3137 * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
3138 grub_rescue_cmd_chainloader.
3139
3140 * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
3141 (grub_pe32_optional_header): Change some fields based on i386 or
3142 x86_64 platform.
3143 (GRUB_PE32_PE32_MAGIC): Likewise.
3144
3145 * include/grub/efi/uga_draw.h: New file.
3146
3147 * include/grub/elf.h (STN_ABS): New constant.
3148 (R_X86_64_NONE): Relocation constant for x86_64.
3149 (R_X86_64_64): Likewise.
3150 (R_X86_64_PC32): Likewise.
3151 (R_X86_64_GOT32): Likewise.
3152 (R_X86_64_PLT32): Likewise.
3153 (R_X86_64_COPY): Likewise.
3154 (R_X86_64_GLOB_DAT): Likewise.
3155 (R_X86_64_JUMP_SLOT): Likewise.
3156 (R_X86_64_RELATIVE): Likewise.
3157 (R_X86_64_GOTPCREL): Likewise.
3158 (R_X86_64_32): Likewise.
3159 (R_X86_64_32S): Likewise.
3160 (R_X86_64_16): Likewise.
3161 (R_X86_64_PC16): Likewise.
3162 (R_X86_64_8): Likewise.
3163 (R_X86_64_PC8): Likewise.
3164
3165 * include/grub/i386/efi/pci.h: New file.
3166
3167 * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
3168 Change it value based on platform.
3169 (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
3170 (GRUB_E820_RAM): Likewise.
3171 (GRUB_E820_RESERVED): Likewise.
3172 (GRUB_E820_ACPI): Likewise.
3173 (GRUB_E820_NVS): Likewise.
3174 (GRUB_E820_EXEC_CODE): Likewise.
3175 (GRUB_E820_MAX_ENTRY): Likewise.
3176 (grub_e820_mmap): New structure.
3177 (linux_kernel_header): Change the efi field according to different
3178 kernel version, also field from linux_kernel_header.
3179
3180 * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
3181
3182 * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
3183 (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
3184 (GRUB_PCI_ADDR_SPACE_IO): Likewise.
3185 (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
3186 (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
3187 (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
3188 (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
3189 (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
3190 (GRUB_PCI_ADDR_MEM_MASK): Likewise.
3191 (GRUB_PCI_ADDR_IO_MASK): Likewise.
3192
3193 * include/grub/x86_64/efi/kernel.h: New file.
3194
3195 * include/grub/x86_64/efi/loader.h: Likewise.
3196
3197 * include/grub/x86_64/efi/machine.h: Likewise.
3198
3199 * include/grub/x86_64/efi/pci.h: Likewise.
3200
3201 * include/grub/x86_64/efi/time.h: Likewise.
3202
3203 * include/grub/x86_64/linux.h: Likewise.
3204
3205 * include/grub/x86_64/setjmp.h: Likewise.
3206
3207 * include/grub/x86_64/time.h: Likewise.
3208
3209 * include/grub/x86_64/types.h: Likewise.
3210
3211 * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
3212 GRUB_TARGET_SIZEOF_VOID_P.
3213
3214 * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
3215 (grub_efi_locate_handle): Likewise.
3216 (grub_efi_open_protocol): Likewise.
3217 (grub_efi_set_text_mode): Likewise.
3218 (grub_efi_stall): Likewise.
3219 (grub_exit): Likewise.
3220 (grub_reboot): Likewise.
3221 (grub_halt): Likewise.
3222 (grub_efi_exit_boot_services): Likewise.
3223 (grub_get_rtc): Likewise.
3224
3225 * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
3226 (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
3227 (grub_efi_allocate_pages): Wrap efi calls.
3228 (grub_efi_free_pages): Wrap efi calls.
3229 (grub_efi_get_memory_map): Wrap efi calls.
3230
3231 * kern/x86_64/dl.c: New file.
3232
3233 * kern/x86_64/efi/callwrap.S: Likewise.
3234
3235 * kern/x86_64/efi/startup.S: Likewise.
3236
3237 * loader/efi/appleloader.c: Likewise.
3238
3239 * loader/efi/chainloader.c (cmdline): New variable.
3240 (grub_chainloader_unload): Wrap efi calls.
3241 (grub_chainloader_boot): Likewise.
3242 (grub_rescue_cmd_chainloader): Wrap efi calls, handle
3243 command line.
3244
3245 * loader/efi/chainloader_normal.c (chainloader_command):
3246 Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
3247 command line.
3248
3249 * loader/i386/efi/linux.c (allocate_pages): Change allocation
3250 method.
3251 (grub_e820_add_region): New function.
3252 (grub_linux_boot): Construct e820 map from efi map, handle x86_64
3253 booting.
3254 (grub_find_video_card): New function.
3255 (grub_linux_setup_video): New function.
3256 (grub_rescue_cmd_linux): Probe for video information.
3257
3258 * normal/x86_64/setjmp.S: New file.
3259
3260 * term/efi/console.c (map_char): New function.
3261 (grub_console_putchar): Map unicode char.
3262 (grub_console_checkkey): Wrap efi calls.
3263 (grub_console_getkey): Likewise.
3264 (grub_console_getwh): Likewise.
3265 (grub_console_gotoxy): Likewise.
3266 (grub_console_cls): Likewise.
3267 (grub_console_setcolorstate): Likewise.
3268 (grub_console_setcursor): Likewise.
3269
3270 * util/i386/efi/grub-mkimage.c: Add support for x86_64.
3271
59652a20 32722008-07-16 Pavel Roskin <proski@gnu.org>
3273
ef294055 3274 * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
3275 format strings.
3276
59652a20 3277 * util/i386/efi/grub-mkimage.c (get_target_address): Return a
3278 pointer, not an integer. This fixes a warning and prevents
3279 precision loss on 64-bit systems.
3280 (relocate_addresses): Remove unneeded cast.
3281
afc3b5d7 32822008-07-15 Pavel Roskin <proski@gnu.org>
3283
506b2b3e 3284 * kern/i386/ieee1275/init.c: Include grub/cache.h.
3285
62ead89c 3286 * term/ieee1275/ofconsole.c: Disable code unused on i386.
3287
c4cd51d7 3288 * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
3289 Fix comparison between signed and unsigned.
3290
0d3d8f28 3291 * include/grub/i386/ieee1275/console.h: Declare
3292 grub_console_init() and grub_console_fini().
3293
8804b286 3294 * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
3295 It's empty and unused.
3296
ee01cf35 3297 * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
3298 beginning to avoid warnings with some compilers.
3299
afc3b5d7 3300 * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
3301 [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
3302
e4e8eaa5 33032008-07-14 Pavel Roskin <proski@gnu.org>
3304
407aceb4 3305 * kern/env.c (grub_register_variable_hook): Don't copy empty
3306 string, it leaks memory. Pass "" to grub_env_set(), it should
3307 handle constant strings.
3308
e4e8eaa5 3309 * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
3310 * commands/cmp.c (grub_cmd_cmp): Likewise.
3311 * kern/dl.c (grub_dl_flush_cache): Likewise.
3312 (grub_dl_load_core): Likewise.
3313 * kern/elf.c (grub_elf32_load_phdrs): Likewise.
3314 (grub_elf64_load_phdrs): Likewise.
3315
d4e2dad3 33162008-07-13 Pavel Roskin <proski@gnu.org>
3317
3318 * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
3319 between signed and unsigned.
3320 (LzmaEnc_Finish): Fix warning about an unused parameter.
3321
aa24b516 33222008-07-13 Bean <bean123ch@gmail.com>
3323
3324 * Makefile.in (enable_lzo): New rule.
3325
3326 * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
3327
3328 * configure.ac (ENABLE_LZO): New option --enable-lzo.
3329
3330 * boot/i386/pc/lnxboot.S: #include <config.h>.
3331
3332 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
fe987087 3333 its value according to the compression algorithm used, lzo or lzma.
aa24b516 3334
3335 * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
3336 compression algorithm according to configure macro.
3337
3338 * kern/i386/pc/startup.S (codestart): Likewise.
3339
3340 * kern/i386/pc/lzma_decode.S: New file.
3341
3342 * include/grub/lib/LzFind.h: Likewise.
3343
3344 * include/grub/lib/LzHash.h: Likewise.
3345
3346 * include/grub/lib/LzmaDec.h: Likewise.
3347
3348 * include/grub/lib/LzmaEnc.h: Likewise.
3349
3350 * include/grub/lib/LzmaTypes.h: Likewise.
3351
3352 * lib/LzFind.c: Likewise.
3353
3354 * lib/LzmaDec.c: Likewise.
3355
3356 * lib/LzmaEnc.c: Likewise.
3357
4ae821ac 33582008-07-13 Bean <bean123ch@gmail.com>
3359
3360 * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
3361 (grub_ext4_extent_header): New structure.
3362 (grub_ext4_extent): Likewise.
3363 (grub_ext4_extent_idx): Likewise.
3364 (grub_ext4_find_leaf): New function.
3365 (grub_ext2_read_block): Handle extents.
3366
9a745147 33672008-07-12 Robert Millan <rmh@aybabtu.com>
3368
3369 * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
3370
d49a4cf6 33712008-07-11 Robert Millan <rmh@aybabtu.com>
3372
3373 * util/grub.d/40_custom.in: New file. Example on how to add custom
3374 entries to /etc/grub.d.
3375 * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
3376 40_custom (implicitly, by merging all the grub.d rules).
3377
947414b4 33782008-07-11 Pavel Roskin <proski@gnu.org>
3379
0059cf6f 3380 * commands/read.c (grub_getline): Fix invalid memory access.
3381 Don't add newline to the variable value.
3382
947414b4 3383 * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
3384 [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
3385 (serial_hw_get_port): Check validity of the port number.
3386 (grub_cmd_serial): Check return value of serial_hw_get_port().
3387
62a02d00 33882008-07-07 Pavel Roskin <proski@gnu.org>
3389
3390 * boot/i386/pc/diskboot.S (notification_string): Replace
3391 "Loading kernel" with just "loading". This is shorter, less
3392 confusing and saves a few bytes for possible future changes.
3393
3e5581b0 33942008-07-05 Pavel Roskin <proski@gnu.org>
3395
ea387a48 3396 * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
3397 size for ATAPI devices, they are undefined. Output sector
3398 number in decimal form.
3399
3e5581b0 3400 * disk/ata.c: Use named constants for status bits.
3401
fdecb8fd 34022008-07-04 Pavel Roskin <proski@gnu.org>
3403
bcd35b90 3404 * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
3405 grub_addr_t before casting it to the void pointer to fix a
3406 warning. Non-addressable regions are discarded earlier.
3407 (grub_arch_modules_addr): Cast _end to grub_addr_t.
3408 * kern/i386/linuxbios/table.c: Include grub/misc.h.
3409 (check_signature): Don't shadow table_header.
3410 (grub_linuxbios_table_iterate): Cast numeric constants to
3411 grub_linuxbios_table_header_t.
3412 * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
3413 grub_stop().
3414
af58ab3d 3415 * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
3416 prevent warnings.
3417
1759aa57 3418 * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
3419 pointer, which can cause warnings. Support 64-bit addresses.
3420
fdecb8fd 3421 * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
3422 of sizeof(long). This fixes PowerPC image generation on x86_64.
3423
8516d2a8 34242008-07-04 Robert Millan <rmh@aybabtu.com>
3425
3426 This fixes a performance issue when pc & gpt partmap iterators
3427 didn't abort iteration even after our hook found what it was
fe987087 3428 looking for (often causing expensive probes of non-existent drives).
8516d2a8 3429
3430 Some callers relied on previous buggy behaviour, since they would
34c44600 3431 raise an error when their own hooks caused early abortion of its
8516d2a8 3432 iteration.
3433
3434 * kern/device.c (grub_device_open): Improve error message.
3435 * disk/lvm.c (grub_lvm_open): Likewise.
3436 * disk/raid.c (grub_raid_open): Likewise.
3437
3438 * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
3439 when hook requests it, independently of grub_errno.
3440 (pc_partition_map_probe): Do not fail when find_func() caused
3441 early abortion of pc_partition_map_iterate().
3442
3443 * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
3444 when hook requests it, independently of grub_errno.
3445 (gpt_partition_map_probe): Do not fail when find_func() caused
3446 early abortion of gpt_partition_map_iterate().
3447
3448 * kern/partition.c (grub_partition_iterate): Abort parent iteration
3449 when hook requests it, independently of grub_errno. Do not fail when
3450 part_map_iterate_hook() caused early abortion of p->iterate().
3451
3452 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
3453 when grub_partition_iterate() returned with non-zero.
3454
277d0de9 34552008-07-03 Pavel Roskin <proski@gnu.org>
3456
3457 * disk/ata.c (grub_ata_pio_write): Check status before writing,
3458 like we do in grub_ata_pio_read().
3459 (grub_ata_readwrite): Always write individual sectors. Fix the
3460 sector count for the remainder.
3461 (grub_ata_write): Enable writing to ATA devices. Correctly
3462 report error for ATAPI devices.
3463
d4c9b428 34642008-07-02 Pavel Roskin <proski@gnu.org>
3465
e43fc690 3466 * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
3467 warning.
3468
f707af42 3469 * disk/ata.c (grub_ata_readwrite): Don't increment sector number
3470 for every read sector, we already increment it for the whole
3471 batch. This fixes reading more than 256 sectors at once.
3472
11e16b15 3473 * util/grub-editenv.c (cmd_info): Cast argument to long
3474 explicitly. ptrdiff_t reduces to int on i386.
3475
cbabfdd4 3476 * util/grub-editenv.c (main): Be specific which parameter is
3477 missing.
3478
b8fbce0a 3479 * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
3480 (memdisk): Make memdisk_orig_addr a pointer.
3481
c9c8e606 3482 * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
3483 for file offsets, use grub_off_t instead. Fix printf format
3484 warnings.
3485
ca62e598 3486 * fs/reiserfs.c: Remove #warning, TODO list items don't belong
3487 there. Real unexpected warnings should not drown in the noise
3488 about known problems.
3489
ce8d1766 3490 * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
3491 grub_disk_addr_t for memory addresses.
3492
00c7a56a 3493 * loader/aout.c (grub_aout_load): Cast load_addr to pointer
3494 explicitly to fix a warning.
3495
08d3ef09 3496 * util/grub-editenv.c (cmd_info): Fix warning in printf format.
3497
cb71ba20 3498 * Makefile.in (MODULE_LDFLAGS): New variable.
3499 * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro. Check if
3500 the linker accepts --build-id=none.
3501 * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE. Substitute
3502 MODULE_LDFLAGS.
3503 * genmk.rb: Use MODULE_LDFLAGS when linking modules.
3504
d4c9b428 3505 * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
3506 those in Linux XFS code. Provide a way to access 64-bit parent
3507 inode.
3508 (grub_xfs_iterate_dir): Use the new names. Avoid reading past
3509 the end of struct grub_xfs_dir_header.
3510
d4156eee 35112008-07-02 Bean <bean123ch@gmail.com>
3512
3513 * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
3514 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3515 and GRUB_IEEE1275_FLAG_NO_ANSI.
3516
3517 * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
3518 GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
3519 and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
3520
3521 * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
3522 immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
3523
3524 * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
3525 GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
3526
3527 * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
3528 esc sequence on non ANSI terminal.
3529 (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
3530
3531 * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
3532 beginning of file.
3533
2270f77b 35342008-07-02 Bean <bean123ch@gmail.com>
3535
3536 * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
3537 (grub_editenv_SOURCES): New variable.
3538 (pkglib_MODULES): Add loadenv.mod.
3539 (loadenv_mod_SOURCES): New variable.
3540 (loadenv_mod_CFLAGS): Likewise.
3541 (loadenv_mod_LDFLAGS): Likewise.
3542
3543 * include/grub/envblk.h: New file.
3544
3545 * util/envblk.c: New file.
3546
3547 * util/grub-editenv.c: New file.
3548
3549 * commands/loadenv.c: New file.
3550
0e9e51ec 35512008-07-01 Pavel Roskin <proski@gnu.org>
3552
d89b7634 3553 * include/multiboot2.h (struct multiboot_tag_module): Use char,
3554 not unsigned char. This fixes warnings and is consistent with
3555 other tags.
3556
bf1835b1 3557 * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
3558
8222a04b 3559 * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
3560
6a42d99d 3561 * term/tparm.c (analyze): Always set *popcount.
3562
10b159d1 3563 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
3564 cast to fix a warning.
3565
b8789f6c 3566 * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
3567 cast to suppress a warning.
3568
29d7e38a 3569 * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
3570 grub_fshelp_read_file() expects.
3571
f341f669 3572 * fs/fat.c: Fix UUID calculation on big-endian systems. We
3573 write uuid as a 32-bit value in CPU byte order, so declare and
3574 use it as such.
3575
0e9e51ec 3576 * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
3577 long if the format specifier expects it.
3578 * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
3579 * partmap/pc.c (pc_partition_map_iterate): Likewise.
3580 * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
3581 long to fix a warning.
3582 * fs/reiserfs.c (grub_reiserfs_read): Change casts in
3583 grub_dprintf() arguments to fix warnings.
3584
3aefa857 35852008-06-30 Pavel Roskin <proski@gnu.org>
3586
56c7668b 3587 * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
3588 install_bsd_part immediately before core.img is embedded or
3589 modified on disk. This fixes core.img verification if core.img
3590 cannot be embedded.
3591
3aefa857 3592 * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
3593 core_path to calculate the blocklist.
3594 Patch from Javier Martín <lordhabbit@gmail.com>
3595
5444088d 35962008-06-29 Robert Millan <rmh@aybabtu.com>
3597
3598 * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro. Maps filesystem
3599 block to disk block.
3600 (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
3601 Patch from Niels Böhm <bitbucket@arcor.de>
3602
674835c8 36032008-06-29 Robert Millan <rmh@aybabtu.com>
3604
3605 * util/update-grub_lib.in (font_path): Search for fonts in
3606 /boot/grub first, which is more likely to be readable (we aren't
3607 deciding where fonts live, just looking for them).
3608
f527dbc8 36092008-06-26 Pavel Roskin <proski@gnu.org>
3610
6c2d8df6 3611 * util/biosdisk.c (read_device_map): Don't leave dead map
3612 entries for devices failing stat() check.
3613
f527dbc8 3614 * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
3615 core_path_dev for the core.img path on the target device.
3616
aebe3d13 36172008-06-26 Robert Millan <rmh@aybabtu.com>
3618
3619 * disk/fs_uuid.c: New file.
3620 * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
3621 (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
3622 (fs_uuid_mod_LDFLAGS): New variables.
3623 * include/grub/disk.h (grub_disk_dev_id): Add
3624 `GRUB_DISK_DEVICE_UUID_ID'.
3625 * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
3626 implement iterate().
3627
37aaf354 36282008-06-26 Robert Millan <rmh@aybabtu.com>
3629
3630 * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
3631 "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
3632 Linux image includes no initrd.
3633
25ff262a 36342008-06-21 Javier Martín <lordhabbit@gmail.com>
3635
3636 * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
3637 call to resolve the core image location that effectively appended the
3638 name twice.
3639
76a2bd44 36402008-06-21 Robert Millan <rmh@aybabtu.com>
3641
3642 * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
3643 call from here ...
3644
3645 * util/grub.d/10_hurd.in: ... to here ...
3646 * util/grub.d/10_linux.in: ... and here.
3647
650e1c79 36482008-06-19 Robert Millan <rmh@aybabtu.com>
3649
fe987087 3650 * kern/main.c (grub_main): Export `prefix' variable immediately
650e1c79 3651 after it has been set by grub_machine_set_prefix().
3652
6ce63911 36532008-06-19 Robert Millan <rmh@aybabtu.com>
3654
3655 * commands/search.c (search_label, search_fs_uuid, search_file): Print
3656 search result when not saving to variable, not the other way around.
3657 When saving to variable, abort iteration as soon as a match is found.
3658
73940cec 36592008-06-19 Robert Millan <rmh@aybabtu.com>
3660
3661 * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
3662 check for partition that provides /boot/grub. Its logic is flawed,
3663 as it prevents prepare_grub_to_access_device() from being called
3664 multiple times.
3665
3c62a39d 36662008-06-19 Robert Millan <rmh@aybabtu.com>
3667
3668 * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
3669 "insmod" command directly when abstraction modules are needed,
fe987087 3670 instead of relying on GRUB_PRELOAD_MODULES (which had no effect
3c62a39d 3671 since it had already been processed).
3672
47395a42 36732008-06-19 Pavel Roskin <proski@gnu.org>
3674
3675 * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
3676 changed. This is needed in case GRUB_LIBDIR changes.
3677 * conf/i386-ieee1275.rmk: Likewise.
3678 * conf/i386-linuxbios.rmk: Likewise.
3679 * conf/i386-pc.rmk: Likewise.
3680 * conf/powerpc-ieee1275.rmk: Likewise.
3681
a145ac2d 36822008-06-18 Pavel Roskin <proski@gnu.org>
3683
3684 * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
3685 kernel_elf_symlist.c to symlist.c for consistency with other
3686 architectures. Update all users.
3687 * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
3688
7847c51e 36892008-06-18 Robert Millan <rmh@aybabtu.com>
3690
3691 * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
3692 it in prefix.
3693
3694 * util/i386/pc/grub-setup.c (main): Don't handle prefix at all. Set
3695 `must_embed' to 1 when root_dev is a RAID device. When dest_dev is
3696 a RAID device, run setup() for all members independently on whether
3697 LVM abstraction is being used.
3698 (setup): Don't handle prefix at all; let grub-mkimage take care of it.
3699 If grub-mkimage has set `*install_dos_part == -2', don't override this
3700 value.
3701 Perform *install_dos_part adjustments independently on whether
3702 we're embedding or not.
3703 Clarify error message when image is too big for embedding.
3704 Remove duplicate *install_dos_part stanza.
3705
b23e5644 37062008-06-17 Robert Millan <rmh@aybabtu.com>
3707
3708 * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
3709 (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
3710 variables.
3711 (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
3712 values in grub_ofconsole_normal_color and
3713 grub_ofconsole_highlight_color (they're not directly related to
3714 background and foreground).
3715 (grub_ofconsole_setcolorstate): Extract background and foreground
3716 from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
3717
0aac2f79 37182008-06-17 Robert Millan <rmh@aybabtu.com>
3719
3720 * util/update-grub_lib.in (prepare_grub_to_access_device): Use
3721 /boot/grub for the check in last commit, not /boot (they could be
3722 different partitions).
3723
3cca7ef3 37242008-06-16 Robert Millan <rmh@aybabtu.com>
3725
3726 * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
3727 asked to setup access for the same partition that provides /boot,
3728 don't bother using UUIDs since our root already has the value we
3729 want.
3730
347396d8 37312008-06-16 Robert Millan <rmh@aybabtu.com>
3732
3733 * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
3734 I2O devices.
3735 Patch from Sven Mueller <sven@debian.org>.
3736
991477f8 37372008-06-16 Robert Millan <rmh@aybabtu.com>
3738
3739 * util/update-grub.in: Check for $EUID instead of $UID.
3740 Reported by Vincent Zweije.
3741
d31a32a1 37422008-06-16 Bean <bean123ch@gmail.com>
3743
fe987087 3744 * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
d31a32a1 3745 (grub_ext2_read_block): Likewise.
3746 (grub_ext2_read_inode): Likewise.
3747 (grub_ext2_mount): Likewise.
3748 (grub_ext2_close): Likewise.
3749 (grub_ext3_get_journal): Removed.
3750
fe987087 3751 * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
d31a32a1 3752 (grub_reiserfs_read_symlink): Likewise.
3753 (grub_reiserfs_mount): Likewise.
3754 (grub_reiserfs_open): Likewise.
3755 (grub_reiserfs_read): Likewise.
3756 (grub_reiserfs_close): Likewise.
3757 (grub_reiserfs_get_journal): Removed.
3758
3759 * fs/fshelp.c (grub_fshelp_read): Removed.
3760 (grub_fshelp_map_block): Likewise.
3761
3762 * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
3763 (grub_fshelp_journal): Likewise.
3764 (grub_fshelp_read): Likewise.
3765 (grub_fshelp_map_block): Likewise.
3766
3540a760 37672008-06-16 Pavel Roskin <proski@gnu.org>
3768
3769 * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
3770 floating point anymore.
3771 * include/grub/powerpc/libgcc.h: Leave only necessary exports.
3772
95614c84 37732008-06-15 Pavel Roskin <proski@gnu.org>
3774
3775 * commands/ls.c (grub_ls_list_files): Use integer calculations
3776 for human readable format, avoid floating point use.
3777 * kern/misc.c (grub_ftoa): Remove.
3778 (grub_vsprintf): Remove floating point support.
3779
50465dd6 37802008-06-15 Robert Millan <rmh@aybabtu.com>
3781
fe6b695a 3782 * util/grub.d/10_linux.in: Use the underlying device for loop-AES
50465dd6 3783 devices.
3784 Reported by Max Vozeler.
3785
a9207284 37862008-06-15 Robert Millan <rmh@aybabtu.com>
3787
3788 * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
3789 in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
3790 skipped later.
3791 (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
3792 the beginning of the prefix.
3793
3794 * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
3795 It is assumed that if we have a memdisk, grub-mkimage has set
3796 grub_prefix to include the "(memdisk)" drive in it.
3797
a7cbd45a 37982008-06-15 Robert Millan <rmh@aybabtu.com>
3799
3800 * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
3801 Initialize keyboard controller after registering the terminal, so that
3802 grub_printf() can be called from grub_keyboard_controller_init().
3803
21cf716a 38042008-06-15 Robert Millan <rmh@aybabtu.com>
3805
3806 * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
3807 extent-btree which is written as big endian on disk.
3808 Reported by Alain Greppin <al@chilibi.org>.
3809
23a64d8e 38102008-06-14 Robert Millan <rmh@aybabtu.com>
3811
3812 * util/i386/efi/grub-install.in (modules): Remove `_chain'.
3813 * util/i386/pc/grub-install.in (modules): Likewise.
3814
d687651c 38152008-06-13 Pavel Roskin <proski@gnu.org>
3816
3817 * commands/ls.c (grub_ls_list_files): Fix format warnings.
3818
dfe9ddd4 38192008-06-13 Bean <bean123ch@gmail.com>
3820
3821 * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
3822
3823 * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
3824
3825 * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
3826 to indicate sparse block.
3827
16ae7781 38282008-06-12 Pavel Roskin <proski@gnu.org>
3829
e6d1a308 3830 * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
3831 number, grub_fshelp_read() does it for us.
3832
16ae7781 3833 * fs/fshelp.c (grub_fshelp_read): New function. Implement
3834 linear disk read with journal translation.
3835 * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
3836 * include/grub/fshelp.h: Declare grub_fshelp_read().
3837
40fd3a2b 38382008-06-09 Pavel Roskin <proski@gnu.org>
3839
3840 * fs/minix.c (grub_minix_mount): Handle error reading
3841 superblock.
3842
f5679726 38432008-06-08 Robert Millan <rmh@aybabtu.com>
3844
3845 * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
3846 don't append the RAID prefix afterwards.
3847 Reported by Clint Adams.
3848
ce525529 38492008-06-08 Robert Millan <rmh@aybabtu.com>
3850
3851 Based on description from Pavel:
3852 * kern/disk.c (grub_disk_check_range): Rename to ...
3853 (grub_disk_adjust_range): ... this. Add a comment explaining the
3854 tasks performed by this function.
3855
ad4936a0 38562008-06-08 Robert Millan <rmh@aybabtu.com>
3857
3858 * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
3859 `num_serial' (for consistency with other variables).
3860 (struct grub_ntfs_data): Add `uuid' member.
3861 * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
3862 (grub_ntfs_uuid): New function.
3863 (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
3864
dc20b0f9 38652008-06-07 Pavel Roskin <proski@gnu.org>
3866
3867 * util/biosdisk.c (open_device): Revert last change to the
3868 function, it broke installation. The sector needs to be
3869 different dependent on which device is opened.
3870
c5e3cfba 38712008-06-06 Robert Millan <rmh@aybabtu.com>
3872
3873 Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
3874 rest of GRUB, and breakage doesn't happen if its value were modified.
3875
3876 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3877 Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
3878 a constant (same value).
3879 * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
3880 `GRUB_KERNEL_MACHINE_DATA_END' (same value).
3881
26a1f8c4 38822008-06-06 Robert Millan <rmh@aybabtu.com>
3883
3884 * util/biosdisk.c (open_device): Do not modify sector offset when
3885 accessing a partition. kern/disk.c already handles this for us.
3886
25d6b327 38872008-06-06 Robert Millan <rmh@aybabtu.com>
3888
3889 * util/grub-emu.c (grub_machine_init): Move code in this function from
3890 here ...
3891 (main): ... to here (before grub_util_biosdisk_init() call, to prevent
3892 segfault in case grub_printf() is called).
3893
3894 * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
3895 grub_probe. Update all users not to explicitly add it again.
3896 (grub_device): New variable; contains corresponding device for grubdir.
3897 (fs_module, partmap_module, devabstraction_module): Pass
3898 `--device ${grub_device}' to grub_probe to avoid traversing /dev
3899 every time.
3900
9ece62fb 39012008-06-05 Robert Millan <rmh@aybabtu.com>
3902
3903 * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
3904 is found, print it (same layout as with labels).
3905
1ad36d37 39062008-06-04 Robert Millan <rmh@aybabtu.com>
3907
3908 * util/biosdisk.c (get_drive): Rename to ...
3909 (find_grub_drive): ... this. Update all users.
3910
3911 (get_os_disk): Rename to ...
3912 (convert_system_partition_to_system_disk): ... this. Update all users.
3913
3914 (find_drive): Rename to ...
3915 (find_system_device): ... this. Update all users.
3916
e6a30859 39172008-06-04 Robert Millan <rmh@aybabtu.com>
3918
3919 * util/biosdisk.c (get_os_disk): Handle IDA devices.
3920 * util/grub-mkdevicemap.c (get_mmc_disk_name)
3921 (make_device_map): Likewise.
3922
00c108a4 39232008-06-01 Robert Millan <rmh@aybabtu.com>
3924
3925 * util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
3926 before dereferencing it.
3927
3928 * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
3929 union with fat12/fat16-specific ones. Add some new fields, including
3930 `num_serial' for both versions.
3931 (struct grub_fat_data): Add `uuid' member.
3932 (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
3933 names. Initialize `data->uuid' using `num_serial'.
3934 (grub_fat_uuid): New function.
3935 (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
3936
3937 * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
3938 (grub_reiserfs_uuid): New function.
3939 (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
3940 member.
3941
3942 * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
3943 (grub_xfs_uuid): New function.
3944 (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
3945
1385c5bb 39462008-06-01 Robert Millan <rmh@aybabtu.com>
3947
3948 * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
3949 code that is backward compatible with pre-uuid search command.
3950
c682dfd7 39512008-05-31 Robert Millan <rmh@aybabtu.com>
3952
3953 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
3954 floppies after everything else, to ensure floppy drive isn't accessed
3955 unnecessarily (patch from Bean).
3956
b7db5d47 39572008-05-31 Robert Millan <rmh@aybabtu.com>
3958
3959 * commands/search.c (search_label, search_fs_uuid, search_file): Do
3960 not print device names when we were asked to set a variable.
3961
6e037aa9 39622008-05-31 Robert Millan <rmh@aybabtu.com>
3963
3964 * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
3965 using "cursor-on" and "cursor-off" commands (understood at least by
3966 the Open Firmware flavour on OLPC).
3967
41305bc8 39682008-05-31 Michael Gorven <michael@gorven.za.net>
3969
3970 * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
3971 on and off sequences.
3972
69ba137e 39732008-05-31 Robert Millan <rmh@aybabtu.com>
3974
3975 * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
3976 * util/update-grub.in: Likewise.
3977
520ae21b 39782008-05-30 Pavel Roskin <proski@gnu.org>
3979
3980 * util/biosdisk.c (linux_find_partition): Simplify logic and
3981 make the code more universal. Keep special processing for
3982 devfs, but use a simple rule for all other devices. If the
3983 device ends with a number, append 'p' and the partition number.
3984 Otherwise, append only the partition number.
3985
5786569b 39862008-05-30 Robert Millan <rmh@aybabtu.com>
3987
3988 * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
3989 * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
3990 GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
3991 the `root' parameter to Linux.
3992
51500452 39932008-05-30 Robert Millan <rmh@aybabtu.com>
3994
3995 * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
3996 * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
3997 --fs_uuid with --fs-uuid.
3998 * util/update-grub.in: Allow filesystem UUID probes to fail (since not
3999 all filesystems support them).
4000
811d3878 40012008-05-30 Robert Millan <rmh@aybabtu.com>
4002
4003 * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
f19dbdb7 4004 grub_printf() flags, since we're printing in units of 2 bytes.
811d3878 4005
cab63c95 40062008-05-30 Robert Millan <rmh@aybabtu.com>
4007
4008 * util/grub.d/00_header.in: Remove obsolete comment referencing
4009 convert_system_path_to_grub_path().
4010 * util/update-grub.in: Likewise.
4011 * util/update-grub_lib.in (is_path_readable_by_grub): New function.
4012 (convert_system_path_to_grub_path): Add a warning message explaining
4013 that this function is deprecated. Rely on is_path_readable_by_grub()
4014 for the readability checks.
4015 (font_path): Use is_path_readable_by_grub() for the readability
4016 check rather than convert_system_path_to_grub_path().
4017
972e2f7a 40182008-05-30 Robert Millan <rmh@aybabtu.com>
4019
4020 * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
4021 * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
4022 converting it first.
4023 * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
4024 grub.cfg for access to font file, and afterwards call it again to set
4025 the root device.
4026
62191274 40272008-05-30 Robert Millan <rmh@aybabtu.com>
4028
4029 * commands/search.c (options): Add --fs_uuid option.
4030 (search_fs_uuid): New function.
4031 (grub_cmd_search): Fix --set argument passing.
4032 Use search_fs_uuid() when requested via --fs_uuid.
4033 (grub_search_init): Update help message.
4034 * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
4035 and redeclare it as an array of 16-bit words.
4036 (grub_ext2_uuid): New function.
4037 (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
4038 * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
4039 * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
4040 (GRUB_DEVICE_BOOT_UUID): New variables.
4041 (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
4042 * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
4043 whenever possible.
4044 * util/grub.d/10_hurd.in: Avoid explicit use of root drive. Instead,
4045 just assume `root' variable has the right value.
4046 * util/grub.d/10_linux.in: Likewise.
4047 * util/grub-probe.c (probe): Probe for filesystem UUID when requested
4048 via PRINT_FS_UUID.
4049 (main): Recognise `-t fs_uuid' argument.
4050
01b73ec8 40512008-05-30 Robert Millan <rmh@aybabtu.com>
4052
4053 * util/biosdisk.c (map): Redefine structure to hold information
4054 about GRUB drive name.
fe6b695a 4055 (get_drive): Reimplement without assuming (and verifying) BIOS-like
01b73ec8 4056 drive names.
4057 (call_hook): Remove.
4058 (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
4059 member. Assume drive has partitions.
4060 (grub_util_biosdisk_open): Access device names via `.device' struct
4061 member.
4062 (open_device): Likewise.
4063 (find_drive): Likewise.
4064 (read_device_map): Adjust map[] usage to match the new struct
4065 definition. Don't check for duplicates (still possible, but not cheap
4066 anymore).
4067 (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
4068 (make_device_name): Remove assumption of BIOS-like drive names.
4069
22f16596 40702008-05-30 Pavel Roskin <proski@gnu.org>
4071
4072 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
4073 compiling execute.c doesn't need grub_script.tab.h anymore.
4074 (normal/command.c_DEPENDENCIES): Likewise.
4075 (normal/function.c_DEPENDENCIES): Likewise.
4076 * conf/i386-ieee1275.rmk: Likewise.
4077 * conf/i386-linuxbios.rmk: Likewise.
4078 * conf/i386-pc.rmk: Likewise.
4079 * conf/powerpc-ieee1275.rmk: Likewise.
4080 * conf/sparc64-ieee1275.rmk: Likewise.
4081
528ad8f2 40822008-05-29 Pavel Roskin <proski@gnu.org>
4083
d1dff95d 4084 * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
4085 when scanning metadata for volume group name.
4086
528ad8f2 4087 * include/grub/script.h: Don't include grub_script.tab.h. It's
4088 a generated file, which may only be included from the files with
4089 DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE,
4090 use union YYSTYPE, as the later allows forward declaration.
4091 * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
4092
47248e08 40932008-05-29 Robert Millan <rmh@aybabtu.com>
4094
4095 * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
4096 (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
4097 [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
4098 (grub_console_checkkey): Add grub_dprintf() call to report unknown
4099 scan codes.
4100
ee632529 41012008-05-29 Robert Millan <rmh@aybabtu.com>
4102
4103 * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
4104 control key combinations.
4105
eee96e08 41062008-05-29 Robert Millan <rmh@aybabtu.com>
4107
4108 * util/powerpc/ieee1275/grub-install.in: Move from here ...
4109 * util/ieee1275/grub-install.in: ... to here.
4110 * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
4111 * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
4112 (grub_install_SOURCES): Likewise.
4113
da9a6a94 41142008-05-29 Robert Millan <rmh@aybabtu.com>
4115
4116 * fs/affs.c: Update copyright year.
4117 * fs/ext2.c: Likewise.
4118 * fs/fshelp.c: Likewise.
4119 * fs/hfsplus.c: Likewise.
4120 * fs/ntfs.c: Likewise.
4121 * fs/xfs.c: Likewise.
4122 * include/grub/fshelp.h: Likewise.
4123 * util/grub-mkdevicemap.c: Likewise.
4124
12e65f3a 41252008-05-28 Robert Millan <rmh@aybabtu.com>
4126
4127 * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
4128 might need to be fatfs to support some firmware implementations
4129 (e.g. OFW or EFI).
4130
23023641 41312008-05-28 Robert Millan <rmh@aybabtu.com>
4132
4133 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
4134 devices.
4135 * util/grub-mkdevicemap.c (get_mmc_disk_name)
4136 (make_device_map): Likewise.
4137
887d2619 41382008-05-20 Bean <bean123ch@gmail.com>
4139
4140 * fs/fshelp.c (grub_fshelp_map_block): New function.
4141 (grub_fshelp_find_file): Use 64-bit type for pos and block address.
4142 Use `>>' and `&' operator to avoid 64-bit divide and modulo.
4143
4144 * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
4145 (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
4146 (grub_fshelp_journal): New structure.
4147 (grub_fshelp_map_block): New function prototype.
4148 (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
4149 (grub_fshelp_map_block): Likewise.
4150
4151 * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
4152 (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
4153 (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
4154 (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
4155 (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
4156 (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
4157 (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
4158 (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
4159 (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
4160 (EXT3_JOURNAL_FLAG_DELETED): Likewise.
4161 (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
4162 (grub_ext2_sblock): New members for journal support.
4163 (grub_ext3_journal_header): New structure.
4164 (grub_ext3_journal_revoke_header): Likewise.
4165 (grub_ext3_journal_block_tag): Likewise.
4166 (grub_ext3_journal_sblock): Likewise.
4167 (grub_fshelp_node): New members logfile and journal.
4168 (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
4169 grub_fshelp_map_block to get real block number.
4170 (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
4171 number.
4172 (grub_ext2_read_inode): Likewise.
4173 (grub_ext3_get_journal): New function.
4174 (grub_read_inode): Initialize journal using grub_ext3_get_journal.
4175 (grub_ext2_close): Release memory used by journal.
4176
4177 * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
4178 (REISERFS_MAGIC_DESC_BLOCK): New macro.
4179 (grub_reiserfs_transaction_header): Renamed to
4180 grub_reiserfs_description_block, replace field data with real_blocks.
4181 (grub_reiserfs_commit_block): New structure.
4182 (grub_reiserfs_data): New member journal.
4183 (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
4184 number.
4185 (grub_reiserfs_read_symlink): Likewise.
4186 (grub_reiserfs_iterate_dir): Likewise.
4187 (grub_reiserfs_open): Likewise.
4188 (grub_reiserfs_read): Likewise.
4189 (grub_reiserfs_get_journal): New function.
4190 (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
4191 three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
4192 using grub_reiserfs_get_journal.
4193 (grub_reiserfs_close): Release memory used by journal.
4194
4195 * fs/affs.c (grub_affs_read_block): Change block type to
4196 grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
4197
4198 * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
4199
4200 * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
4201
4202 * fs/ntfs.c (grub_ntfs_read_block): Likewise.
4203
4204 * fs/udf.c (grub_udf_read_block): Change block type to
4205 grub_disk_addr_t. Use type cast to avoid warning.
4206
4207 * fs/xfs.c (grub_xfs_read_block): Likewise.
4208
b7c6bed5 42092008-05-16 Christian Franke <franke@computer.org>
4210
4211 * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
4212 to ensure that break with ESC will always work.
4213 * commands/sleep.c (grub_interruptible_millisleep): Likewise.
4214 Remove ESC from keyboard queue.
4215
eedf167f 42162008-05-16 Christian Franke <franke@computer.org>
4217
4218 * util/biosdisk.c: [__CYGWIN__] Add includes.
4219 (grub_util_biosdisk_open): Use Linux code also for Cygwin.
4220 (get_os_disk): Move variable declarations to OS specific
4221 parts to avoid warning.
4222 [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
4223 [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
4224 (grub_util_biosdisk_get_grub_dev): Use Linux code also for
4225 Cygwin.
4226 * util/getroot.c: [__CYGWIN__] Add includes.
4227 (strip_extra_slashes): Fix "/" case.
4228 [__CYGWIN__] (get_win32_path): New function.
4229 [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
4230 [__CYGWIN__] (find_root_device): Disable.
4231 [__CYGWIN__] (get_bootsec_serial): New function.
4232 [__CYGWIN__] (find_cygwin_root_device): Likewise.
4233 [__linux__] (grub_guess_root_device): Add early returns to simplify
4234 structure.
4235 [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
4236 [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
4237 check for Linux only.
4238
a079699e 42392008-05-15 Bean <bean123ch@gmail.com>
4240
4241 * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
4242 keyboard hang problem in apple's intel mac.
4243
1cf4059a 42442008-05-09 Robert Millan <rmh@aybabtu.com>
4245
4246 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
4247 devices.
4248 * util/grub-mkdevicemap.c (get_virtio_disk_name)
4249 (make_device_map): Likewise.
4250 Reported by Aurelien Jarno <aurel32@debian.org>
4251
ed759390 42522008-05-07 Ian Campbell <ijc@hellion.org.uk>
4253
4254 * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
4255 * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
4256 (make_device_map): Output entries for xvd type disks.
4257
b56c4eaa 42582008-05-07 Robert Millan <rmh@aybabtu.com>
4259
4260 * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
4261 devices.
4262 * util/grub-mkdevicemap.c (get_cciss_disk_name)
4263 (make_device_map): Likewise.
4264 Reported by Roland Dreier <rdreier@cisco.com>
4265
7f8866ed 42662008-05-07 Robert Millan <rmh@aybabtu.com>
4267
4268 * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
4269 grub_strstr() call. Correct a few mistakes in failure path handling.
4270
b0346e0f 42712008-05-06 Robert Millan <rmh@aybabtu.com>
4272
4273 * util/update-grub_lib.in (make_system_path_relative_to_its_root):
4274 Do not print a trailing slash (therefore, the root directory is an
4275 empty string).
4276 (convert_system_path_to_grub_path): Do not remove trailing slash
4277 from make_system_path_relative_to_its_root() output.
4278
4279 * util/i386/pc/grub-install.in: Add trailing slash to output from
4280 make_system_path_relative_to_its_root().
4281
6cf12cbd 42822008-05-06 Robert Millan <rmh@aybabtu.com>
4283
4284 * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'. This
4285 ensures that output lines aren't intermangled with those sent to
4286 stderr (via grub_util_info()).
4287 * util/grub-probe.c (grub_refresh): Likewise.
4288 * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
4289
0fbb3117 42902008-05-05 Christian Franke <franke@computer.org>
4291
4292 * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
4293 Add Cygwin device names.
4294 (get_ide_disk_name) [__CYGWIN__]: Likewise.
4295 (get_scsi_disk_name) [__CYGWIN__]: Likewise.
4296 (check_device): Return error instead of success on empty name.
4297 (make_device_map): Move label inside linux specific code to
4298 prevent compiler warning.
4299
8124cdb7 43002008-04-30 Robert Millan <rmh@aybabtu.com>
4301
4302 Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
4303 * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
4304 first boot option.
4305 * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
4306
094c01d0 43072008-04-29 Robert Millan <rmh@aybabtu.com>
4308
4309 * docs/grub.cfg: New file (example GRUB configuration).
4310
f4b1fc02 43112008-04-26 Robert Millan <rmh@aybabtu.com>
4312
329ce2a5 4313 * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST). Add
4314 `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
4315 and `disk/ieee1275/nand.c'.
f4b1fc02 4316
25f16ec1 43172008-04-25 Bean <bean123ch@gmail.com>
f19dbdb7 4318
25f16ec1 4319 * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
4320 i386-linuxbios.
4321
4322 * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
4323 change the buffer size to 4096 for cdrom device.
4324
4325 * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
4326 and nand.mod.
4327 (_linux_mod_SOURCES): New variable.
4328 (_linux_mod_CFLAGS): Likewise.
4329 (_linux_mod_LDFLAGS): Likewise.
4330 (linux_mod_SOURCES): Likewise.
4331 (linux_mod_CFLAGS): Likewise.
4332 (linux_mod_LDFLAGS): Likewise.
4333 (nand_mod_SOURCES): Likewise.
4334 (nand_mod_CFLAGS): Likewise.
4335 (nand_mod_LDFLAGS): Likewise.
4336
4337 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
4338 GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
4339 type property. (nand device in olpc don't have this property)
4340
4341 * include/grub/disk.h (grub_disk_dev_id): New macro
4342 GRUB_DISK_DEVICE_NAND_ID.
4343
4344 * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
4345 function prototype.
4346 (grub_rescue_cmd_initrd): Likewise.
4347
4348 * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
4349 (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
4350 ofw_cif_handler and ofw_idt, adjust padding number.
f19dbdb7 4351
25f16ec1 4352 * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
4353 GRUB_MACHINE_IEEE1275 is defined.
4354
4355 * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
4356 Use NESTED_FUNC_ATTR attribute on the hook parameter.
4357
4358 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
4359 on nested function heap_init.
4360 (grub_upper_mem): New variable for i386-ieee1275.
4361 (grub_get_extended_memory): New function for i386-ieee1275.
4362 (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
4363
4364 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
4365 NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
4366 property.
f19dbdb7 4367
25f16ec1 4368 * loader/i386/ieee1275/linux.c: New file.
4369
4370 * loader/i386/ieee1275/linux_normal.c: New file.
4371
4372 * disk/ieee1275/nand.c: New file.
4373
e89d61e9 43742008-04-18 Thomas Schwinge <tschwinge@gnu.org>
4375
4376 * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
4377 value.
4378 * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
4379
602566f6 43802008-04-18 Robert Millan <rmh@aybabtu.com>
4381
4382 Restructures early code path on ieee1275 to unify grub_main() as
4383 the first C function that is executed in every platform.
4384
4385 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
4386 * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
4387 cmain().
4388 * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
4389 * kern/ieee1275/cmain.c (cmain): Rename to ...
4390 * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
4391 * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
4392 at the beginning.
4393
57490c2b 43942008-04-18 Robert Millan <rmh@aybabtu.com>
4395
4396 * util/update-grub.in: Fix syntax error when setting
4397 `GRUB_PRELOAD_MODULES'.
4398 Reported by Stephane Chazelas <stephane@artesyncp.com>
4399
1977517d 44002008-04-17 Lubomir Kundrak <lkundrak@redhat.com>
4401
4402 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
4403 section into account, newer toolchains generate unique build ids
4404 * configure.ac: remove the test for --build-id=none acceptance,
e0c5dacb 4405 we want build ids to be preserved
1977517d 4406 * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
4407 far from other sections don't cause the raw binary images grow
4408 size
4409
bfb1f1a2 44102008-04-15 Robert Millan <rmh@aybabtu.com>
4411
4412 * disk/lvm.c: Update copyright year.
4413 * kern/misc.c: Likewise.
4414
01979850 44152008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4416
4417 * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
f19dbdb7 4418 there is no memory left for physical volume name.
01979850 4419
0a1150e2 44202008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
4421
4422 * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
4423 volume name mapping to support bigger than 9 character names properly.
4424
82ead3fe 44252008-04-13 Robert Millan <rmh@aybabtu.com>
4426
4427 * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
4428 as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
4429
e54a72f5 44302008-04-13 Christian Franke <franke@computer.org>
4431
4432 * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
4433 to create a floppy emulation boot CD when non emulation mode
4434 does not work.
4435 Enable Joliet CD filesystem extension.
4436
9fe86034 44372008-04-13 Robert Millan <rmh@aybabtu.com>
4438
4439 * kern/misc.c (grub_strncat): Fix off-by-one error.
4440 Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
4441
4442 * kern/env.c (grub_env_context_close): Clear current context, not
4443 previous one.
4444 Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
4445
4446 * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
4447
7ceeee39 44482008-04-13 Robert Millan <rmh@aybabtu.com>
4449
4450 Improve robustness when handling LVM.
4451
4452 * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
f19dbdb7 4453 (and leave `*p' unmodified).
7ceeee39 4454 (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
4455 through it.
4456 (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
4457 iterating through it.
4458 (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
4459 through it.
fe6b695a 4460 (grub_lvm_scan_device): Check the return value (and fail gracefully
7ceeee39 4461 when due) on each grub_lvm_getvalue() or grub_strstr() call.
4462 Don't assume `vg->pvs != NULL' when iterating through it.
4463
58cd3d85 44642008-04-13 Robert Millan <rmh@aybabtu.com>
4465
4466 * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
4467 * genmk.rb (partmap): New variable.
4468 (CLEANFILES, PARTMAPFILES): Add #{partmap}.
4469 (#{partmap}): New target rule.
4470 * genpartmaplist.sh: New file.
4471 * Makefile.in (pkglib_DATA): Add partmap.lst.
4472 (partmap.lst): New target rule.
4473 * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
4474 modules (including all partition maps), instead of preloading them.
4475
78b51059 44762007-04-13 Fabian Greffrath <fabian.greffrath@web.de>
4477
4478 * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
4479 `linux-boot-prober' (if installed) to detect other operating
4480 systems which are installed on the computer and add them to
4481 the boot menu.
4482 * conf/common.rmk: Build and install 30_os-prober.
4483
a91627b4 44842008-04-12 Robert Millan <rmh@aybabtu.com>
4485
4486 * kern/powerpc/ieee1275/init.c: Move from here ...
4487 * kern/ieee1275/init.c: ... to here. Update all users.
4488
4489 * kern/powerpc/ieee1275/cmain.c: Move from here ...
4490 * kern/ieee1275/cmain.c: ... to here. Update all users.
4491
4492 * kern/powerpc/ieee1275/openfw.c: Move from here ...
4493 * kern/ieee1275/openfw.c: ... to here. Update all users.
4494
4495 * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
4496 * loader/ieee1275/multiboot2.c: ... to here. Update all users.
4497
322562ea 44982008-04-10 Pavel Roskin <proski@gnu.org>
4499
4500 * configure.ac: Always use "_cv_" in cache variables for
4501 compatibility with Autoconf 2.62.
4502
a02a73c5 45032008-04-07 Robert Millan <rmh@aybabtu.com>
4504
4505 Revert grub/machine/init.h addition by Pavel (since it breaks on
4506 i386-ieee1275 and others):
4507 * util/i386/pc/misc.c: Remove grub/machine/init.h.
4508 * util/powerpc/ieee1275/misc.c: Likewise.
4509
25c024b1 45102008-04-07 Robert Millan <rmh@aybabtu.com>
4511
4512 * util/grub-probe.c (probe): Improve error message.
4513
3cbd2f98 45142008-04-07 Robert Millan <rmh@aybabtu.com>
4515
4516 * util/biosdisk.c (read_device_map): Skip devices that don't exist
4517 (this prevents the presence of a bogus entry from ruining the whole
4518 thing).
4519
87a297bf 45202008-04-06 Pavel Roskin <proski@gnu.org>
4521
36747a62 4522 * util/biosdisk.c: Include grub/util/biosdisk.h.
4523 * util/grub-fstest.c (execute_command): Make static.
4524 * util/grub-mkdevicemap.c (check_device): Likewise.
4525 * util/i386/pc/misc.c: Include grub/machine/init.h.
4526 * util/powerpc/ieee1275/misc.c: Likewise.
4527 * util/lvm.c: Include grub/util/lvm.h.
4528 * util/misc.c: Include grub/kernel.h, grub/misc.h and
4529 grub/cache.h.
4530 * util/raid.c: Include grub/util/raid.h.
4531 (grub_util_getdiskname): Make static.
4532
87a297bf 4533 * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
4534 grub_hostfs_fini(), as they are called from grub_init_all() and
4535 grub_fini_all() respectively. This fixes an infinite loop in
4536 grub-fstest due to double registration of hostfs.
4537 Reported by Christian Franke <Christian.Franke@t-online.de>
4538
f6ce7629 45392008-04-05 Pavel Roskin <proski@gnu.org>
4540
4541 * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
4542 all 8 functions. Otherwise, probe function 0 only.
4543
070e49e4 45442008-04-04 Pavel Roskin <proski@gnu.org>
4545
8b088a4c 4546 * commands/lspci.c (grub_lspci_iter): Print the bus number
4547 correctly.
4548
4f657021 4549 * commands/lspci.c (grub_pci_classes): Fix typos.
4550 (grub_lspci_iter): Don't print func twice. Print vendor ID
4551 before device ID, as it's normally done.
4552
070e49e4 4553 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
4554 Fix signedness warnings.
4555 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
4556 Likewise.
4557 * util/ieee1275/get_disk_name.c: Include config.h so that
4558 _GNU_SOURCE is defined and getline() is declared. Mark an
4559 unused argument as such. Fix a signedness warning.
4560
ba7328dc 45612008-04-02 Pavel Roskin <proski@gnu.org>
4562
26887f22 4563 * genkernsyms.sh.in: Use more robust assignments for CC and
4564 srcdir. Quote srcdir.
4565 * gensymlist.sh.in: Likewise. Assert at the compile time that
4566 the symbol table is not empty.
4567
ba7328dc 4568 * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
4569 * fs/cpio.c (grub_cpio_read): Likewise.
4570
0f582c6b 45712008-04-01 Pavel Roskin <proski@gnu.org>
4572
4b6e1995 4573 * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
4574 * disk/host.c (grub_host_open): Likewise.
4575 * disk/loopback.c (grub_loopback_open): Likewise.
4576 * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
4577 disk->id as in disk/host.c, not a multi-character constant.
4578
828a2768 4579 * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek(). The
4580 later is obsolete, potentially dangerous and sets a bad example.
4581 * util/i386/efi/grub-mkimage.c (make_header): Likewise.
4582 * util/misc.c (grub_util_get_image_size): Likewise.
4583
2bb4fb47 4584 * disk/loopback.c (options): Improve help for "--partitions".
4585
0f582c6b 4586 * normal/arg.c (grub_arg_show_help): Fix spacing of the long
4587 options to align them with the short options, e.g. "echo -e".
4588
a33224e0 45892008-03-31 Bean <bean123ch@gmail.com>
4590
4591 * video/reader/png.c (grub_png_data): New member is_16bit and
4592 image_data.
4593 (grub_png_decode_image_header): Detect 16 bit png image.
4594 (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
4595 (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
4596 (grub_video_reader_png): Release memory occupied by image_data.
4597
4598 * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
4599 4096 bytes.
4600 (grub_nfs_mount): Skip the test for sector per cluster.
4601
4602 * include/grub/ntfs.h (MAX_SPC): Removed.
4603
86cb4f54 46042008-03-31 Bean <bean123ch@gmail.com>
4605
4606 * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
4607 (grub_probe_SOURCES): Add fs/afs.c.
4608 (grub_fstest_SOURCES): Likewise.
4609 (afs_mod_SOURCES): New variable.
4610 (afs_mod_CFLAGS): Likewise.
4611 (afs_mod_LDFLAGS): Likewise.
4612
4613 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
4614 (grub_emu_SOURCES): Likewise.
4615
4616 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4617
4618 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4619
4620 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4621
4622 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4623
4624 * fs/afs.c: New file.
4625
17c74c21 46262008-03-30 Pavel Roskin <proski@gnu.org>
4627
4cb68e89 4628 * disk/host.c: Include grub/misc.h to fix a warning.
4629 * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
4630 warnings about implicit declarations.
4631
8790bb04 4632 * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
4633 variable.
4634 * include/grub/i386/loader.h: Change declaration of
4635 grub_linux_boot() to match what grub_loader_set() expects.
4636 * util/getroot.c (grub_guess_root_device): Return const char* to
4637 fix a warning.
4638 * util/grub-probe.c (probe): Fix a warning about uninitialized
4639 abstraction_name variable.
4640 * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
4641 second argument as unused to fix a warning.
4642
9a3f3296 4643 * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
4644 missing grub_error() call.
4645
0ecef90d 4646 * util/update-grub_lib.in: Define datarootdir, since Autoconf
4647 2.60 and newer uses it to define datadir.
4648
0bf6d401 4649 * commands/sleep.c: Fix warning about implicit declaration.
4650 * disk/memdisk.c: Likewise.
4651 * loader/aout.c: Likewise.
4652 * loader/i386/bsd_normal.c: Likewise.
4653 * util/grub-probe.c: Likewise.
4654
7cdacf97 4655 * commands/i386/cpuid.c (has_longmode): Make static.
4656 * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
4657 * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
4658
17c74c21 4659 * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
4660 GDT. This is more robust, as %ds can change.
4661 (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
4662 calling real_to_prot().
4663 (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
4664
80a3e68b 46652008-03-28 Pavel Roskin <proski@gnu.org>
4666
4667 * kern/i386/pc/startup.S: Assert that uncompressed functions
4668 don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
4669 * kern/i386/pc/lzo1x.S: Remove all .align directives in the
4670 code, as they push parts of the code (error handlers) beyond
4671 GRUB_KERNEL_MACHINE_RAW_SIZE. Speed is not as important in this
4672 code as correctness and size.
4673
77bcd272 46742008-03-28 Pavel Roskin <proski@gnu.org>
4675
4676 * kern/i386/pc/startup.S
4677 (grub_biosdisk_get_diskinfo_int13_extensions): When converting
4678 data block address to the real mode, keep offset minimal. This
4679 works around a bug in AWARD BIOS on old Athlon systems, which
4680 makes CD detection hang.
4681
c5dfd43b 46822008-03-26 Pavel Roskin <proski@gnu.org>
4683
4684 * normal/color.c (grub_parse_color_name_pair): Make `name' a
4685 const.
4686 * include/grub/normal.h: Add grub_parse_color_name_pair()
4687 declaration.
4688
bf962df2 46892008-03-24 Bean <bean123ch@gmail.com>
4690
4691 * disk/i386/pc/biosdisk.c (cd_start): Removed.
4692 (cd_count): Removed.
4693 (cd_drive): New variable.
4694 (grub_biosdisk_get_drive): Don't check for (cdN) device.
4695 (grub_biosdisk_call_hook): Likewise.
4696 (grub_biosdisk_iterate): Change cdrom detection method.
4697 (grub_biosdisk_open): Replace cd_start with cd_drive.
4698 (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
4699 detect cdrom device.
4700
4701 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
4702 Removed.
4703 (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
4704 (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
4705 (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
4706 (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
4707 (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
4708 (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
4709 (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
4710 (grub_biosdisk_cdrp): New structure.
4711 (grub_biosdisk_get_cdinfo_int13_extensions): New function.
4712
4713 * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
4714
4715 * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
4716 device.
4717
4718 * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
4719 New function.
4720
68e7fc7a 47212008-03-20 Robert Millan <rmh@aybabtu.com>
4722
4723 Remove 2 TiB limit in ata.mod.
4724 * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
4725 (grub_ata_dumpinfo): Print sector count with 0x%llx.
4726 (grub_ata_identify): Interpret `&info16[100]' as a pointer to
4727 grub_uint64_t instead of grub_uint32_t.
4728
38ad2cf5 47292008-03-05 Bean <bean123ch@gmail.com>
4730
4731 * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
4732 (grub_multiboot): Set boot device.
4733
4734 * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
4735
2b89344e 47362008-03-02 Bean <bean123ch@gmail.com>
4737
4738 * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
4739 symlink_buffer.
4740
87a95d1f 47412008-03-01 Yoshinori K. Okuji <okuji@enbug.org>
4742
4743 * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
4744 texinfo.tex.
4745
4746 * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
4747 modified.
4748
4749 * docs/fdl.texi: New file.
f19dbdb7 4750
87a95d1f 4751 * docs/mdate-sh: New file. Copied from gnulib.
4752 * docs/texinfo.tex: Likewise.
4753
4754 * config.guess: Updated from gnulib.
4755 * install-sh: Likewise.
4756
7dc15d8e 47572008-02-28 Robert Millan <rmh@aybabtu.com>
4758
4759 * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
4760 (aout_mod_SOURCES): New variable.
4761 (aout_mod_CFLAGS): Likewise.
4762 (aout_mod_LDFLAGS): Likewise.
4763
4764 * conf/i386-ieee1275.rmk: Likewise.
4765
b00ab696 47662008-02-28 Robert Millan <rmh@aybabtu.com>
4767
4768 * util/update-grub.in: Reorganise terminal validity check. Accept
4769 `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
4770 Based on suggestion by Franklin PIAT.
4771
79ca2d78 47722008-02-28 Fabian Greffrath <greffrath@leat.rub.de>
4773
4774 * include/grub/util/getroot.h (grub_util_check_block_device): Export new
4775 function.
4776 * util/getroot.c (grub_util_check_block_device): New function that
4777 returns the given argument if it is a block device and returns NULL else.
4778 * util/grub-probe.c (argument_is_device): New variable.
4779 (probe): Promote device_name from a variable to an argument. Receive
4780 device_name from grub_util_check_block_device() if path is NULL and from
4781 grub_guess_root_device() else. Do not free() device_name anymore.
f19dbdb7 4782 (options): Introduce new parameter '-d, --device'.
79ca2d78 4783 (main): Add description of the new parameter to the help screen.
4784 Rename path variable to argument. Set argument_is_device if the '-d'
4785 option is given. Pass argument to probe() depending on
4786 argument_is_device.
4787
0d16e571 47882008-02-24 Bean <bean123ch@gmail.com>
4789
4790 * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
4791 (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
4792 (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
4793 (GRUB_ISO9660_VOLDESC_PART): Likewise.
4794 (GRUB_ISO9660_VOLDESC_END): Likewise.
4795 (grub_iso9660_primary_voldesc): New member escape.
4796 (grub_iso9660_data): New member joliet.
4797 (grub_iso9660_convert_string): New function.
4798 (grub_iso9660_mount): Detect joliet extension.
4799 (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
4800 (grub_iso9660_iso9660_label): Likewise.
4801
4802 * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
4803 (grub_setup_SOURCES): Add fs/udf.c.
4804 (grub_fstest_SOURCES): Likewise.
4805 (udf_mod_SOURCES): New variable.
4806 (udf_mod_CFLAGS): Likewise.
4807 (udf_mod_LDFLAGS): Likewise.
4808
4809 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
4810 (grub_emu_SOURCES): Likewise.
4811
4812 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4813
4814 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4815
4816 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
4817
4818 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4819
4820 * fs/udf.c: New file.
4821
8a594a17 48222008-02-24 Robert Millan <rmh@aybabtu.com>
4823
4824 * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
4825 (normal/lexer.c_DEPENDENCIES): New variables.
4826 * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4827 (normal/lexer.c_DEPENDENCIES): Likewise.
4828 * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
4829 (normal/lexer.c_DEPENDENCIES): Likewise.
4830 * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
4831 (normal/lexer.c_DEPENDENCIES): Likewise.
4832 * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4833 (normal/lexer.c_DEPENDENCIES): Likewise.
4834 * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
4835 (normal/lexer.c_DEPENDENCIES): Likewise.
4836
2dc33c03 48372008-02-23 Robert Millan <rmh@aybabtu.com>
4838
4839 * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
4840 since they were intended to be in hex. This didn't break previously
4841 because of a bug in gpt_partition_map_iterate() (see below).
4842
4843 (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
4844 when checking the validity of GPT header.
4845 Remove `partno', since it always provides the same information as `i'.
4846
f6f4cfb0 48472008-02-21 Yoshinori K. Okuji <okuji@enbug.org>
4848
4849 * include/grub/efi/time.h: Fix a wrong comment.
4850
79ff665f 48512008-02-19 Pavel Roskin <proski@gnu.org>
4852
4853 * kern/rescue.c (grub_enter_rescue_mode): Improve initial
4854 message.
4855
d38e24c2 48562008-02-19 Bean <bean123ch@gmail.com>
4857
4858 * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
4859 (aout_mod_SOURCES): New variable.
4860 (aout_mod_CFLAGS): Likewise.
4861 (aout_mod_LDFLAGS): Likewise.
4862 (_bsd_mod_SOURCES): New variable.
4863 (_bsd_mod_CFLAGS): Likewise.
4864 (_bsd_mod_LDFLAGS): Likewise.
4865 (bsd_mod_SOURCES): New variable.
4866 (bsd_mod_CFLAGS): Likewise.
4867 (bsd_mod_LDFLAGS): Likewise.
4868
4869 * include/grub/aout.h: New file.
4870
4871 * include/grub/i386/loader.h (grub_unix_real_boot): New function.
4872
4873 * include/grub/i386/bsd.h: New file.
4874
4875 * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
4876 to make it public.
4877
4878 * kern/elf.c (grub_elf32_load): Get the physical address after the hook
4879 function is called, so that it's possible to change it inside the hook.
4880 (grub_elf64_load): Likewise.
4881 (grub_elf_file): Don't close the file if elf header is not found.
4882 (grub_elf_close): Close the file if grub_elf_file fails (The new
4883 grub_elf_file won't close it).
4884 (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
4885 (grub_elf64_size): Likewise.
4886
4887 * kern/i386/loader.S (grub_unix_real_boot): New function.
4888
4889 * loader/aout.c: New file.
4890
4891 * loader/i386/bsd.c: New file.
4892
4893 * loader/i386/bsd_normal.c: New file.
4894
4895 * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
4896
4897 * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
fe987087 4898 can test other formats.
d38e24c2 4899
b93bdb0f 49002008-02-19 Robert Millan <rmh@aybabtu.com>
4901
4902 * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
4903 (grub_gpt_partition_type_empty): Redefine with macro from
4904 `<grub/gpt_partition.h>'.
4905 (gpt_partition_map_iterate): Adjust partition type comparison.
4906
4907 Export `entry' as partmap-specific `part.data' struct.
4908 (grub_gpt_header, grub_gpt_partentry): Move from here ...
4909
4910 * include/grub/gpt_partition.h (grub_gpt_header)
4911 (grub_gpt_partentry): ... to here (new file).
4912
4913 * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
4914
4915 (grub_gpt_partition_type_bios_boot): New const variable, defined
4916 with macro from `<grub/gpt_partition.h>'.
4917
4918 (setup): Replace `first_start' with `embed_region', which keeps
4919 track of the embed region (and is partmap-agnostic).
4920
4921 Replace find_first_partition_start() with find_usable_region(),
4922 which finds a usable region for embedding using partmap-specific
4923 knowledge (supports PC/MSDOS and GPT).
4924
4925 Fix all assumptions that the embed region start at sector 1, using
4926 `embed_region.start' from now on. Similarly, use `embed_region.end'
4927 rather than `first_start' to calculate available size.
4928
4929 In grub_util_info() message, replace "into after the MBR" with an
4930 indication of the specific sector our embed region starts at.
4931
66cb40f6 49322008-02-19 Robert Millan <rmh@aybabtu.com>
4933
4934 * DISTLIST: Replace `commands/ieee1275/halt.c' and
4935 `commands/ieee1275/reboot.c' with `commands/halt.c' and
4936 `commands/reboot.c'.
4937 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4938 (halt_mod_SOURCES): Likewise.
4939 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
4940 (halt_mod_SOURCES): Likewise.
4941
b7202015 49422008-02-17 Christian Franke <franke@computer.org>
4943
4944 * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
4945
32b0fc49 49462008-02-17 Robert Millan <rmh@aybabtu.com>
4947
4948 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4949 set `first_start' to 0 for non-PC/MSDOS partition maps.
4950
aca63502 49512008-02-16 Robert Millan <rmh@aybabtu.com>
4952
4953 * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
4954 do not assume partition map is PC/MSDOS before performing checks that
4955 are specific to that layout.
4956
0de8be86 49572008-02-13 Robert Millan <rmh@aybabtu.com>
4958
4959 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
4960 `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
4961 * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
4962
c3db8364 49632008-02-13 Yoshinori K. Okuji <okuji@enbug.org>
4964
4965 * configure.ac: Only a cosmetic change on the handling of
4966 -fno-stack-protector.
4967
f714229e 49682008-02-12 Alexandre Boeglin <alex@boeglin.org>
4969
c3db8364 4970 * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
4971 commands/i386/pc/halt.c and reboot.c by commands/halt.c and
4972 reboot.c.
f714229e 4973 (grub_install_SOURCES): Add halt.mod and reboot.mod.
4974 (halt_mod_SOURCES): New variable.
4975 (halt_mod_CFLAGS): Likewise.
4976 (halt_mod_LDFLAGS): Likewise.
4977 (reboot_mod_SOURCES): Likewise.
4978 (reboot_mod_CFLAGS): Likewise.
4979 (reboot_mod_LDFLAGS): Likewise.
4980
c3db8364 4981 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
4982 commands/ieee1275/halt.c and reboot.c by commands/halt.c and
4983 reboot.c.
f714229e 4984 (halt_mod_SOURCES): Likewise.
4985 (reboot_mod_SOURCES): Likewise.
4986
c3db8364 4987 * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
4988 commands/i386/pc/reboot.c by commands/reboot.c.
f714229e 4989 (reboot_mod_SOURCES): Likewise.
4990
4991 * commands/i386/pc/reboot.c: merge this file ...
4992
4993 * commands/ieee1275/reboot.c: ... and this file ...
4994
4995 * commands/reboot.c: ... to this file.
c3db8364 4996 Add some precompiler directive to include the correct header for
4997 each machine.
f714229e 4998
4999 * commands/ieee1275/halt.c: move this file ...
5000
5001 * commands/halt.c: ... to here.
c3db8364 5002 Add some precompiler directive to include the correct header for
5003 each machine.
f714229e 5004
5005 * include/grub/efi/efi.h (grub_reboot): New function declaration.
5006 (grub_halt): Likewise.
5007
5008 * kern/efi/efi.c (grub_reboot): New function.
5009 (grub_halt): Likewise.
5010
c74493e0 50112008-02-12 Robert Millan <rmh@aybabtu.com>
5012
5013 * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
5014 /dev (like it is done for /dev/mapper). This doesn't provide support
5015 for EVMS, but at least it is now easy to identify the problem when it
5016 arises.
5017
d0db4b04 50182008-02-11 Robert Millan <rmh@aybabtu.com>
5019
5020 * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
5021 (grub_util_biosdisk_get_grub_dev): Check open() exit status by
5022 comparing it with -1, not 0.
5023
bf748642 50242008-02-10 Robert Millan <rmh@aybabtu.com>
5025
5026 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
5027 `disk/lvm.c'.
5028 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5029 * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
5030
5031 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
5032 `disk/lvm.c' to the end of the list.
5033 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5034 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5035
b5db202a 50362008-02-10 Robert Millan <rmh@aybabtu.com>
5037
5038 * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'. Call
5039 grub_print_error() instead. This will let user know why we're entering
5040 rescue mode.
5041 Based on suggestions from Sam Morris.
5042
83abee31 50432008-02-10 Alexandre Boeglin <alex@boeglin.org>
5044
5045 * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
5046 on remaining N args, instead of "--" arg N times.
5047
78d5a08b 50482008-02-09 Vesa Jaaskelainen <chaac@nic.fi>
5049
5050 * font/manager.c (unknown_glyph): Added variable for unknown glyph.
5051 (fill_with_default_glyph): Changed to use unknown_glyph for fill
5052 pattern for unknown glyphs.
5053
68807e5f 50542008-02-09 Robert Millan <rmh@aybabtu.com>
5055
5056 * configure.ac: Probe for `help2man'.
5057 * Makefile.in (builddir): New variable.
5058 (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it,
5059 or otherwise add a few flags/options to it.
5060 (install-local): For every executable utility or script that is
5061 installed, invoke $(HELP2MAN) to install a manpage based on --help
5062 output.
5063
5064 * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
5065 that it doesn't prevent --help from working in build tree.
5066
5067 * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
5068 with `bug-grub@gnu.org'.
5069 * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
5070 * util/update-grub.in (usage): New function.
5071 Implement proper argument check, with support for --help and --version
5072 (as well as existing -y).
5073
50742008-02-09 Christian Franke <franke@computer.org>
0d9ff7f0 5075
5076 * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
5077 avoid overwriting previous output.
5078 * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
5079
c1962162 50802008-02-09 Robert Millan <rmh@aybabtu.com>
5081
5082 * normal/menu.c (run_menu): If timeout is set to zero, don't bother
5083 drawing the menu.
5084
3dac2e3f 50852008-02-09 Robert Millan <rmh@aybabtu.com>
5086
5087 * commands/sleep.c: New file.
5088 * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
5089 (sleep_mod_SOURCES): New variable.
5090 (sleep_mod_CFLAGS): Likewise.
5091 (sleep_mod_LDFLAGS): Likewise.
5092
7a634e08 50932008-02-09 Robert Millan <rmh@aybabtu.com>
5094
5095 * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
5096 situations in which we can deduce the RAID size and the superblock
5097 doesn't match it.
5098
b92f0c18 50992008-02-09 Robert Millan <rmh@aybabtu.com>
5100
5101 * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function. Construct
5102 and return a grub_diskmemberlist_t composed of LVM physical volumes.
5103 [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
5104
5105 * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function. Construct
5106 and return a grub_diskmemberlist_t composed of physical array members.
5107 [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
5108
5109 * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
5110 prototype.
5111 [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
5112 [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
5113 [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
5114
5115 * util/grub-probe.c (probe): Move partmap probing code from here ...
5116 (probe_partmap): ... to here.
5117 (probe): Use probe_partmap() once for the disk we're probing, and
5118 additionally, when such disk contains a memberlist() struct member,
5119 once for each disk that is contained in the structure returned by
5120 memberlist().
5121
91a4bf68 51222008-02-09 Robert Millan <rmh@aybabtu.com>
5123
5124 * util/grub-probe.c (main): When `verbosity > 1', set `debug'
5125 environment variable to 'all' in order to obtain debug output from
5126 non-util/ code.
5127 * util/i386/pc/grub-setup.c (main): Likewise.
5128
a96f9caa 51292008-02-08 Robert Millan <rmh@aybabtu.com>
5130
5131 * disk/raid.c (grub_raid_scan_device): Check for
5132 `array->device[sb.this_disk.number]' rather than for
5133 `array->device[sb.this_disk.number]->name', since the latter is not
fe6b695a 5134 guaranteed to be accessible.
a96f9caa 5135
b37a9222 51362008-02-08 Robert Millan <rmh@aybabtu.com>
5137
5138 * disk/raid.c: Update copyright.
5139 * fs/cpio.c: Likewise.
5140 * include/grub/raid.h: Likewise.
5141 * loader/i386/pc/multiboot.c: Likewise.
5142 * util/hostfs.c: Likewise.
5143
5626aee1 51442008-02-08 Robert Millan <rmh@aybabtu.com>
5145
5146 * include/grub/raid.h (struct grub_raid_array): Change type of `device'
5147 to a grub_disk_t array.
5148 * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
5149 `device[x]'.
5150 (grub_raid_scan_device): Replace `device[x].name' accesses with
5151 `device[x]->name'. Simplify initialization of `array->device[x]'.
5152
554f0187 51532008-02-08 Robert Millan <rmh@aybabtu.com>
5154
5155 * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
5156 grub_dprintf() calls.
5157 * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
5158 error message.
5159
1ec8425d 51602008-02-07 Christian Franke <franke@computer.org>
5161
5162 * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
5163 instead of fseek and ftell to support large files.
5164 (grub_hostfs_read): Likewise.
5165
f2156fda 51662008-02-07 Robert Millan <rmh@aybabtu.com>
5167
5168 Patch from Jeroen Dekkers.
5169 * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
fe6b695a 5170 failure, since successfully reading all array members might not be
f2156fda 5171 required.
5172
9216e0e7 51732008-02-06 Robert Millan <rmh@aybabtu.com>
5174
5175 * util/grub-probe.c (probe): Simplify partmap probing (with the
5176 assumption that the first word up to the underscore equals to
5177 the module name).
5178
b0dfd29a 51792008-02-06 Christian Franke <franke@computer.org>
5180
5181 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
5182 (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
5183 last block of a cpio or tar stream.
5184 Check for "TRAILER!!!" instead of any empty data
5185 block to detect last block of a cpio stream.
5186 (grub_cpio_dir): Fix constness of variable np.
5187 (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
5188 cpio or tar trailer is detected. This fixes a crash
5189 on open of a non existing file.
5190
c32865bf 51912008-02-05 Bean <bean123ch@gmail.com>
5192
5193 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
5194 address of entry.
5195 (grub_multiboot_load_elf64): Likewise.
5196 (grub_multiboot): Initialize mbi structure.
5197
5198 * util/grub-fstest.c: Don't include unused header file script.h.
5199
fe6b695a 5200 * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
c32865bf 5201 of file.
5202 (grub_fstest_SOURCES): Likewise.
5203
409480b7 52042008-02-05 Robert Millan <rmh@aybabtu.com>
5205
5206 * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
5207 (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
5208 (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
5209 (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
5210
5211 * kern/i386/pc/startup.S: Include `<grub/term.h>'.
5212 (translation_table): Replace hardcoded values with macros
5213 provided by `<grub/term.h>'.
5214
5215 * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
5216 (keyboard_map): Correct/add a few values, with macros provided
5217 by `<grub/term.h>'.
5218 (keyboard_map_shift): Zero values that don't differ from their
5219 `keyboard_map' equivalents.
5220 (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
5221 Discard the second scan code that is always sent by Caps lock.
5222 Only use `keyboard_map_shift' when it provides a non-zero value,
5223 otherwise fallback to `keyboard_map'.
5224
99fadbaa 52252008-02-04 Bean <bean123ch@gmail.com>
5226
5227 * Makefile.in (enable_grub_fstest): New variable.
5228
5229 * conf/common.rmk (grub_fstest_init.lst): New rule.
5230 (grub_fstest_init.h): Likewise.
5231 (grub_fstest_init.c): Likewise.
5232 (util/grub-fstest.c_DEPENDENCIES): New variable.
5233 (grub_fstest_SOURCES): Likewise.
5234
5235 * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
5236
5237 * util/grub-fstest.c: New file.
5238
bf567c50 52392008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5240
5241 Make grub-setup handle a separate root device.
f19dbdb7 5242
bf567c50 5243 * util/i386/pc/grub-setup.c (setup): Always open the root device,
5244 so that the root device can be compared with the destination
5245 device.
5246 When embedding the core image, if the root and destination devices
5247 are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
5248 0xFF.
5249 When not embedding, set ROOT_DRIVE to 0xFF.
f19dbdb7 5250
9be6b98b 52512008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5252
5253 Add support for having a grub directory in a different drive. This
5254 is still only the data handling part.
f19dbdb7 5255
9be6b98b 5256 * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
5257 (codestart): Save %dh in GRUB_ROOT_DRIVE.
5258 (grub_root_drive): New variable.
5259
5260 * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
5261 instead of GRUB_BOOT_DRIVE to construct a device name. Set
5262 GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
5263 as it was.
5264
5265 * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
5266
5267 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
5268 macro.
5269 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
5270
5271 * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
5272 is bogus, because PXE booting does not specify any drive
5273 correctly.
5274
5275 * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
5276 am not sure if this is really correct.
5277
5278 * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
5279 is always identical to the boot drive when booting from a CD.
5280
5281 * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
5282 longer.
5283 (root_drive): New variable.
5284 (real_start): Unconditionally set %dh to ROOT_DRIVE.
5285 (setup_sectors): Push %dx right after popping it, because %dh will
5286 be modified later.
5287 (copy_buffer): Restore %dx.
5288
e0ca0677 52892008-02-03 Robert Millan <rmh@aybabtu.com>
5290
5291 * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
5292 use `cdboot.img' for cdrom images.
5293
3b3f6629 52942008-02-03 Robert Millan <rmh@aybabtu.com>
5295
5296 * util/grub.d/00_header.in: Issue scripting commands for GRUB to
5297 only setup gfxterm when `font' command has succeeded.
5298
d42b3672 52992008-02-03 Robert Millan <rmh@aybabtu.com>
5300
5301 * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
5302 (grub_rescue_cmd_multiboot_loader)
5303 (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
5304
fa370ea6 53052008-02-03 Pavel Roskin <proski@gnu.org>
5306
e0c5dacb 5307 * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
fa370ea6 5308 %edx and %esi from stack only after grub_gate_a20() is called.
5309 grub_gate_a20() clobbers %edx.
5310
f2a76e1d 53112008-02-03 Yoshinori K. Okuji <okuji@enbug.org>
5312
5313 * configure.ac (AC_INIT): Bumped to 1.96.
5314
5315 * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
5316 commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
5317 include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
5318 video/readers/png.c.
5319
90fd32d1 53202008-02-03 Bean <bean123ch@gmail.com>
9be665dd 5321
5322 * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
5323 (cdboot_img_SOURCES): New variable.
5324 (cdboot_img_ASFLAGS): New variable.
5325 (cdboot_img_LDFLAGS): New variable.
5326
5327 * boot/i386/pc/cdboot.S: New file.
5328
5329 * disk/i386/pc/biosdisk.c (cd_start): New variable.
5330 (cd_count): Likewise.
5331 (grub_biosdisk_get_drive): Add support for cd device.
5332 (grub_biosdisk_call_hook): Likewise.
5333 (grub_biosdisk_iterate): Likewise.
5334 (grub_biosdisk_open): Likewise.
5335 (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
5336 (grub_biosdisk_rw): Support reading from cd device.
5337 (GRUB_MOD_INIT): Iterate cd devices.
5338
5339 * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
5340 (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
5341 (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
5342
5343 * kern/i386/pc/init.c (make_install_device): Check for cd device.
5344
4020aa53 53452008-02-02 Robert Millan <rmh@aybabtu.com>
5346
5347 * commands/read.c: New file.
5348 * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
5349 (read_mod_SOURCES): New variable.
5350 (read_mod_CFLAGS): Likewise.
5351 (read_mod_LDFLAGS): Likewise.
5352
e03a1132 53532008-02-02 Robert Millan <rmh@aybabtu.com>
5354
5355 * normal/main.c (grub_normal_execute): Check for `menu->size' when
5356 determining whether menu has to be displayed.
5357
58c69220 53582008-02-02 Marco Gerards <marco@gnu.org>
5359
5360 * bus/pci.c: New file.
5361
5362 * include/grub/pci.h: Likewise.
5363
5364 * include/grub/i386/pc/pci.h: Likewise.
5365
5366 * commands/lspci.c: Likewise.
5367
5368 * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
5369 `lspci.mod'.
5370 (pci_mod_SOURCES): New variable.
5371 (pci_mod_CFLAGS): Likewise.
5372 (pci_mod_LDFLAGS): Likewise.
5373 (lspci_mod_SOURCES): Likewise.
5374 (lspci_mod_CFLAGS): Likewise.
f19dbdb7 5375 (lspci_mod_LDFLAGS): Likewise.
58c69220 5376
c004e1b4 53772008-02-02 Bean <bean123ch@gmail.com>
5378
5379 * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
5380 (grub_ufs_get_file_block): Fix indirect block calculation problem.
5381
5382 * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
5383 (grub_xfs_btree_node): New structure.
5384 (grub_xfs_btree_root): New structure.
5385 (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
5386 (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
5387 (GRUB_XFS_EXTENT_BLOCK): Likewise.
5388 (GRUB_XFS_EXTENT_SIZE): Likewise.
5389 (grub_xfs_read_block): Support btree format type.
5390 (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
5391 Use directory block as basic unit.
5392
5393 * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
5394
5395 * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
5396 __attribute__ ((__regparm__ (1))).
5397
f95562bf 53982008-02-01 Robert Millan <rmh@aybabtu.com>
5399
5400 Correct a mistake in previous commit.
5401
5402 * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
5403 top.
5404 (normal/command.c_DEPENDENCIES): New variable.
5405
7d31f41f 54062008-02-01 Robert Millan <rmh@aybabtu.com>
5407
5408 * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
5409 top.
5410 (normal/command.c_DEPENDENCIES): New variable.
5411 (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
5412 * conf/i386-ieee1275.rmk: Likewise.
5413 * conf/i386-linuxbios.rmk: Likewise.
5414 * conf/i386-pc.rmk: Likewise.
5415 * conf/sparc64-ieee1275.rmk: Likewise.
5416 * conf/powerpc-ieee1275.rmk: Likewise.
5417 (grub_emu_SOURCES): Add `fs/fshelp.c'.
5418
5419 * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
5420
60b6be74 54212008-02-01 Robert Millan <rmh@aybabtu.com>
5422
5423 * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
5424 call at beginning of function.
5425
078522ab 54262008-01-31 Pavel Roskin <proski@gnu.org>
5427
5428 * util/powerpc/ieee1275/grub-mkrescue.in: New file.
d2c11005 5429 * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
5430 (grub_mkrescue_SOURCES): Likewise.
078522ab 5431 * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
5432
ccaa8a5f 54332008-01-30 Robert Millan <rmh@aybabtu.com>
5434
5435 * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
5436 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
5437 * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
5438 (grub_probe_SOURCES): ... to here.
5439
5440 * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
5441 (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
5442 * conf/i386-ieee1275.rmk: Likewise.
5443 * conf/i386-linuxbios.rmk: Likewise.
5444 * conf/powerpc-ieee1275.rmk: Likewise.
5445
ae5a9cd7 54462008-01-30 Tristan Gingold <gingold@free.fr>
5447
5448 * kern/rescue.c: Silently accept empty lines.
5449
70bc2ef2 54502008-01-29 Bean <bean123ch@gmail.com>
5451
5452 * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
5453 (real_code_2): Code cleanup and change comment style.
5454 (move_memory): Avoid using 32-bit address mode.
5455
6a4d50ea 54562008-01-29 Bean <bean123ch@gmail.com>
5457
5458 * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
5459 (png_mod_SOURCES): New variable.
5460 (png_mod_CFLAGS): Likewise.
5461 (png_mod_LDFLAGS): Likewise.
5462
5463 * video/readers/png.c: New file.
5464
11cc30ac 54652008-01-28 Robert Millan <rmh@aybabtu.com>
5466
5467 * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
5468 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
5469 `ifndef GRUB_MOD_GAP' hack.
5470 * util/elf/grub-mkimage.c (add_segments): Likewise.
5471
3abc589f 54722008-01-27 Robert Millan <rmh@aybabtu.com>
5473
5474 * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
5475 `GRUB_MOD_GAP' for platforms in which it's not defined.
962ca133 5476 * util/elf/grub-mkimage.c (add_segments): Likewise.
3abc589f 5477
e1907778 54782008-01-27 Robert Millan <rmh@aybabtu.com>
5479
5480 Get grub-emu to build again (including parallel builds).
5481
5482 * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
5483 Split into ...
5484 (util/grub-emu.c_DEPENDENCIES): ... this, ...
5485 (normal/execute.c_DEPENDENCIES): ... this, ...
5486 (grub-emu_DEPENDENCIES): ... and this.
5487
5488 * conf/i386-efi.rmk: Likewise.
5489 * conf/i386-linuxbios.rmk: Likewise.
5490 * conf/i386-ieee1275.rmk: Likewise.
5491 * conf/powerpc-ieee1275.rmk: Likewise.
5492 (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
5493
2216b101 54942008-01-27 Robert Millan <rmh@aybabtu.com>
5495
5496 * NEWS: Add a few items.
5497
f75172d9 54982008-01-27 Robert Millan <rmh@aybabtu.com>
5499
5500 Fix parallel builds with grub-emu. Based on earlier commit for
5501 grub-probe and grub-setup.
5502
5503 * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5504 (util/grub-emu.c_DEPENDENCIES): ... this.
5505 * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5506 (util/grub-emu.c_DEPENDENCIES): ... this.
5507 * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5508 (util/grub-emu.c_DEPENDENCIES): ... this.
5509 * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5510 (util/grub-emu.c_DEPENDENCIES): ... this.
5511 * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
5512 (util/grub-emu.c_DEPENDENCIES): ... this.
5513
3f51de77 55142008-01-27 Pavel Roskin <proski@gnu.org>
5515
5516 * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
5517 to create a gap between _end and the modules added to the image
5518 with grub-mkrescue. That fixes "CLAIM failed" on PowerMAC.
5519 * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
5520 * util/elf/grub-mkimage.c (add_segments): Likewise.
5521
2033f53e 55222008-01-26 Pavel Roskin <proski@gnu.org>
5523
5524 * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
5525 just return an error.
5526
22da1f6f 55272008-01-26 Bean <bean123ch@gmail.com>
5528
5529 * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
5530 (grub_reiserfs_get_item): Save offset of the next item.
5531 (grub_reiserfs_iterate_dir): Use next_offset to find next item.
5532
2a9525e6 55332008-01-25 Robert Millan <rmh@aybabtu.com>
5534
5535 * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
5536 make all filesystem sources appear together (possibly fixing omissions
5537 while at it).
5538 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5539 * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5540 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
5541 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5542
5543 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise. Additionally,
5544 add `kern/file.c'.
5545 * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
5546 * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5547 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
5548 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
5549
5550 * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
5551 (probe): Add a sanity check to make sure of our ability to read
5552 requested files when probing for filesystem type.
5553
5554 * genmk.rb: Update copyright year (2007).
5555
5556 * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
5557 (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
5558 (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
5559 (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
5560 (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
5561 : Remove function prototypes.
5562
b95f71b5 55632008-01-25 Robert Millan <rmh@aybabtu.com>
5564
5565 Revert my previous commits (based on wrong assumption of how grub_errno
5566 works).
5567
fe6b695a 5568 * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
b95f71b5 5569 * kern/file.c (grub_file_open): Likewise.
5570
d08bbb49 55712008-01-24 Pavel Roskin <proski@gnu.org>
5572
5573 * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
5574 that hang if GRUB tries to setup colors.
5575 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
5576 colors for firmwares that don't support it.
5577 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
5578 Recognize Open Hack'Ware, set flags to work around its
5579 limitations.
5580
605e36ed 55812008-01-24 Robert Millan <rmh@aybabtu.com>
5582
5583 * kern/file.c (grub_file_open): Do not account previous failures of
5584 unrelated functions when grub_errno is checked for.
5585 Reported by Oleg Strikov.
5586
bac332a1 55872008-01-24 Bean <bean123ch@gmail.com>
5588
5589 * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
5590 (grub_ufs_sblock): New member volume name.
5591 (grub_ufs_find_file): Fix string copy bug.
5592 (grub_ufs_label): Implement this function properly.
5593
5594 * fs/hfs.c (grub_hfs_cnid_type): New enum.
5595 (grub_hfs_iterate_records): Use the correct file number for extents
5596 and catalog file. Fix problem in next index calculation.
5597 (grub_hfs_find_node): Replace recursive function call with loop.
5598 (grub_hfs_iterate_dir): Replace recursive function call with loop.
5599
15c80c09 56002008-01-23 Robert Millan <rmh@aybabtu.com>
5601
5602 * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
5603 `<grub/symbol.h>' and `<grub/multiboot.h>'.
5604 (grub_multiboot2_real_boot): New function prototype.
5605
5606 * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
5607 [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
5608
5609 * kern/i386/ieee1275/init.c (grub_os_area_addr)
5610 (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
5611
305338fd 56122008-01-23 Robert Millan <rmh@aybabtu.com>
5613
5614 * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
5615 #ifdef'ed out grub_printf().
5616
3ea52685 56172008-01-23 Robert Millan <rmh@aybabtu.com>
5618
5619 * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
5620 grub_dprintf calls, since they make "debug=all" mode unusable.
5621 (grub_console_checkkey): Likewise.
5622
5882ae4b 56232008-01-23 Robert Millan <rmh@aybabtu.com>
5624
5625 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
5626 `term/i386/pc/at_keyboard.c'.
5627 (pkglib_MODULES): Add `serial.mod'.
5628 (serial_mod_SOURCES): New variable.
5629 (serial_mod_CFLAGS): Likewise.
5630 (serial_mod_LDFLAGS): Likewise.
5631
5632 * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'. Remove
5633 `<grub/powerpc/ieee1275/console.h>'.
5634 (grub_keyboard_controller_init): New function prototype.
5635 (grub_console_checkkey): Likewise.
5636 (grub_console_getkey): Likewise.
5637
5638 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
5639 keyboard on i386.
5640
5641 * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
5642 grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
5643
06ab5303 56442008-01-23 Robert Millan <rmh@aybabtu.com>
5645
5646 * kern/i386/pc/init.c (make_install_device): When memdisk image is
5647 present, "(memdisk)/boot/grub" becomes the default prefix.
5648
5649 * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
5650 a memdisk tarball with all the modules. Add --overlay=DIR option that
5651 allows users to overlay additional files into the image.
5652
dbb475a4 56532008-01-23 Robert Millan <rmh@aybabtu.com>
5654
5655 * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
5656 and `machine/memory.h'.
5657 (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
5658 (_multiboot_mod_SOURCES): New variable.
5659 (_multiboot_mod_CFLAGS): Likewise.
5660 (_multiboot_mod_LDFLAGS): Likewise.
5661 (multiboot_mod_SOURCES): Likewise.
5662 (multiboot_mod_CFLAGS): Likewise.
5663 (multiboot_mod_LDFLAGS): Likewise.
5664
5665 * include/grub/i386/ieee1275/loader.h: New file.
5666
5667 * include/grub/i386/ieee1275/machine.h: Likewise.
5668
5669 * include/grub/i386/ieee1275/memory.h: Likewise.
5670
5671 * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
5672 variable declaration.
5673 (grub_os_area_size): Likewise.
5674
5675 * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
5676 (grub_lower_mem, grub_upper_mem): New variables.
5677 (grub_stop_floppy): New function (just to make
5678 grub_multiboot2_real_boot() happy).
5679
5680 * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
5681 `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
5682 (grub_stop): New function.
5683 Include `"../realmode.S"' and `"../loader.S"'.
5684
5685 * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
5686 Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
5687
5688 * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
5689 rely on grub_multiboot2_real_boot() for final boot.
5690
25638629 56912008-01-22 Robert Millan <rmh@aybabtu.com>
5692
5693 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
5694 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
5695 device that doesn't look like an SD card.
5696 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
5697 `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
5698 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
5699 OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
5700 found.
5701
9dad816d 57022008-01-22 Robert Millan <rmh@aybabtu.com>
5703
5704 * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
5705 avoid claiming over our own code.
5706
34842f2d 57072008-01-22 Bean <bean123ch@gmail.com>
5708
5709 * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
5710 (jpeg_mod_SOURCES): New variable.
5711 (jpeg_mod_CFLAGS): Likewise.
5712 (jpeg_mod_LDFLAGS): Likewise.
5713
5714 * video/readers/jpeg.c : New file.
5715
44023a28 57162008-01-22 Bean <bean123ch@gmail.com>
5717
5718 * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
5719 there are no more items.
5720
bc2d8ac6 57212008-01-21 Robert Millan <rmh@aybabtu.com>
5722
5723 * kern/mm.c (grub_mm_init_region): Improve debug message.
5724
261bd4bc 57252008-01-21 Robert Millan <rmh@aybabtu.com>
5726
5727 * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
5728 (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
5729 address.
5730 (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
5731 a C macro.
5732 * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
5733 Indicates start of upper memory.
5734 * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
5735 (generate_image): Abort when image size is big enough to corrupt
5736 upper memory.
5737
5738 * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
5739 (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
5740 * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5741 instead of hardcoding 0xA0000.
5742 * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
5743 (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
5744 instead of hardcoding 0xA0000.
5745
f970b55e 57462008-01-21 Robert Millan <rmh@aybabtu.com>
5747
5748 * disk/memdisk.c (memdisk_size): New variable.
5749 (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
5750 `memdisk_size'.
5751 (grub_memdisk_init): Initialize `memdisk_size'. Reallocate memdisk
5752 image to dynamic memory.
5753 (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
5754 `memdisk_size'. Free memdisk block.
5755
1a8b0526 57562008-01-21 Robert Millan <rmh@aybabtu.com>
5757
5758 Fix detection of very small filesystems (like tar).
5759
5760 * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
5761 contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
5762 GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
5763 a problem with this disk).
5764
6e9b4aab 57652008-01-21 Robert Millan <rmh@aybabtu.com>
5766
5767 * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
5768 on grub_biosdisk_rw_standard() error.
5769
0d8837b2 57702008-01-21 Robert Millan <rmh@aybabtu.com>
5771
5772 * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
5773 recent changes.
5774 * kern/elf.c: Likewise.
5775 * kern/ieee1275/ieee1275.c: Likewise.
5776 * kern/powerpc/ieee1275/openfw.c: Likewise.
5777 * term/ieee1275/ofconsole.c: Likewise.
5778
ffd36e34 57792008-01-21 Robert Millan <rmh@aybabtu.com>
5780
5781 * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
5782
3f0093d0 5783 * include/grub/kernel.h (grub_arch_memdisk_addr)
5784 (grub_arch_memdisk_size): Moved from here ...
ffd36e34 5785
3f0093d0 5786 * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
5787 (grub_arch_memdisk_size): ... to here.
ffd36e34 5788
6c391b21 57892008-01-21 Robert Millan <rmh@aybabtu.com>
5790
5791 Mostly based on bugfix from Bean.
5792
5793 * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
5794 attribute with hook() parameter.
5795 (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
5796 declaration.
5797 (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
5798 attribute with hook() parameter.
5799 (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
5800 declaration.
5801
55a581dc 58022008-01-21 Robert Millan <rmh@aybabtu.com>
5803
5804 * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
5805 (pkglib_MODULES): Add `memdisk.mod'.
5806 (memdisk_mod_SOURCES): New variable.
5807 (memdisk_mod_CFLAGS): Likewise.
5808 (memdisk_mod_LDFLAGS): Likewise.
5809
5810 * disk/memdisk.c: New file.
5811
5812 * include/grub/disk.h (grub_disk_dev_id): Add
5813 `GRUB_DISK_DEVICE_MEMDISK_ID'.
5814
5815 * include/grub/i386/pc/kernel.h
5816 (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
5817 (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
5818 (grub_kernel_image_size): New variable declaration.
5819 (grub_total_module_size): Likewise.
5820 (grub_memdisk_image_size): Likewise.
5821
5822 * include/grub/i386/pc/memory.h
5823 (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
5824
5825 * include/grub/kernel.h: Include `<grub/symbol.h>'.
5826 (grub_arch_memdisk_addr): New variable declaration.
5827 (grub_arch_memdisk_size): Likewise.
5828
5829 * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
5830 (grub_arch_memdisk_size): Likewise.
5831
5832 * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
5833 (codestart): Replace hardcoded `0x100000' with
5834 `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
5835
5836 * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
5837 (generate_image): Add `memdisk_path' parameter. When `memdisk_path' is
5838 not NULL, append the contents of the file it refers to, at the end of
5839 the compressed kernel image. Initialize `grub_memdisk_image_size'
5840 variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
5841 (options): Add "memdisk"|'m' option.
5842 (main): Parse --memdisk|-m option, and pass user-provided path as
5843 parameter to generate_image().
5844
3d7f54c9 58452008-01-20 Robert Millan <rmh@aybabtu.com>
5846
5847 * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
5848 grub_dprintf() calls from here ...
5849 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
5850
0bf74728 58512008-01-20 Robert Millan <rmh@aybabtu.com>
5852
5853 Fix detection of "real mode" when /options/real-mode? doesn't exist.
5854
5855 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
5856 declaration.
5857 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
5858 (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
5859 `GRUB_IEEE1275_FLAG_REAL_MODE'.
fe6b695a 5860 (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
0bf74728 5861 property).
5862 * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
5863 `grub_ieee1275_mmu' rather than obtaining a handler on every call.
5864
33bf70a7 58652008-01-19 Robert Millan <rmh@aybabtu.com>
5866
fe6b695a 5867 Get rid of confusing function (superseded by
33bf70a7 5868 `grub_ieee1275_get_integer_property')
5869 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
5870 prototype.
5871 * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
5872 function.
5873 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
5874 grub_ieee1275_decode_int_4(), by obtaining integer properties directly
fe987087 5875 in native endianness from grub_ieee1275_get_integer_property().
33bf70a7 5876
e2da7d26 58772008-01-19 Robert Millan <rmh@aybabtu.com>
5878
5879 * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
5880 command after "shut-down", since implementations differ on which
5881 the command for halt is.
5882
59f1fd8d 58832008-01-19 Robert Millan <rmh@aybabtu.com>
5884
5885 * include/grub/i386/linuxbios/console.h: Add header protection.
5886 (grub_keyboard_controller_init): New function prototype.
5887 * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
5888 (KEYBOARD_COMMAND_READ): Likewise.
5889 (KEYBOARD_COMMAND_WRITE): Likewise.
5890 (KEYBOARD_SCANCODE_SET1): Likewise.
5891 (grub_keyboard_controller_write): New function.
5892 (grub_keyboard_controller_read): Likewise.
5893 (grub_keyboard_controller_init): Likewise.
5894
5895 * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
5896 (grub_console_init): On coreboot/LinuxBIOS, call
5897 grub_keyboard_controller_init().
5898
5f5a7c15 58992008-01-19 Robert Millan <rmh@aybabtu.com>
5900
5901 PowerPC changes provided by Pavel Roskin.
5902
5903 * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
5904 * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
5905 don't rely on cmain() doing it.
5906 * kern/i386/ieee1275/startup.S (_start): Store %eax in
5907 grub_ieee1275_entry_fn, don't rely on cmain() doing it.
5908
1210e168 59092008-01-16 Robert Millan <rmh@aybabtu.com>
5910
5911 * include/grub/i386/linuxbios/memory.h
5912 (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
5913 * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
5914 receive `table_header' as argument. Instead, probe for it in the
5915 known memory ranges where it can be present.
5916 (grub_available_iterate): Do not pass a fixed `table_header' address
5917 to grub_linuxbios_table_iterate().
5918
3d04eab8 59192008-01-15 Robert Millan <rmh@aybabtu.com>
5920
5921 * configure.ac: Add `i386-ieee1275' to the list of supported targets.
5922 * conf/i386-ieee1275.rmk: New file.
5923 * include/grub/i386/ieee1275/console.h: Likewise.
5924 * include/grub/i386/ieee1275/ieee1275.h: Likewise.
5925 * include/grub/i386/ieee1275/kernel.h: Likewise.
5926 * include/grub/i386/ieee1275/time.h: Likewise.
5927 * kern/i386/ieee1275/init.c: Likewise.
5928 * kern/i386/ieee1275/startup.S: Likewise.
5929
d1bc1b73 59302008-01-15 Robert Millan <rmh@aybabtu.com>
5931
5932 * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
5933 when pointers are 32-bit (but still do set it to one when they are
5934 64-bit).
5935
66a65807 59362008-01-15 Robert Millan <rmh@aybabtu.com>
5937
5938 * include/grub/ieee1275/ieee1275.h
5939 (grub_ieee1275_get_integer_property): New function prototype.
5940
5941 * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
5942 (grub_ieee1275_get_integer_property): New function. Wraps around
fe987087 5943 grub_ieee1275_get_property() to handle endianness.
66a65807 5944
5945 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
5946 grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
fe6b695a 5947 where appropriate.
66a65807 5948 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
5949 (grub_map): Likewise.
5950 * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
5951
a83ccafd 59522008-01-15 Bean <bean123ch@gmail.com>
5953
5954 * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
5955 (grub_script_execute_cmdline): Reset grub_errno.
5956
5957 * normal/main.c (read_config_file): Reset grub_errno.
5958
5959 * normal/parse.y (script_init): New.
5960 (script): Move function and menuentry here.
5961 (delimiter): New.
5962 (command): Add delimiter at the end of command.
5963 (commands): Adjust to match the new command.
5964 (commandblock): Remove grub_script_lexer_record_start.
f19dbdb7 5965 (menuentry): Add grub_script_lexer_record_start, use the new commands.
a83ccafd 5966 (if): Use the new commands.
5967
5968 * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
5969
df6ecfc6 59702008-01-15 Robert Millan <rmh@aybabtu.com>
5971
5972 * normal/menu.c (run_menu): Move timeout message from here ...
5973 (print_timeout): ... to here.
5974 (run_menu): Use print_timeout() once during initial draw to print
5975 the whole message, and again in every clock tick to update only
5976 the number of seconds.
5977
87ae25eb 59782008-01-15 Robert Millan <rmh@aybabtu.com>
5979
5980 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
5981 actual size of `available' from grub_ieee1275_get_property(), and
5982 restrict parsing to that bound.
5983
47bf09a4 59842008-01-15 Christian Franke <franke@computer.org>
5985
5986 * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
5987 (argp_program_version): Remove variable.
5988 (argp_program_bug_address): Likewise.
5989 (options): Convert from struct argp_option to struct option.
5990 (struct arguments): Remove.
5991 (parse_opt): Remove.
5992 (usage): New function.
5993 (main): Replace struct args members by simple variables.
5994 Replace argp_parse() by getopt_long().
5995 Add switch to evaluate options.
5996 Add missing "(...)" around root_dev in prefix string.
5997
c86f1469 59982008-01-14 Robert Millan <rmh@aybabtu.com>
5999
6000 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
6001 for grub_ieee1275_exit(), in order to improve portability.
6002
e622c559 60032008-01-14 Robert Millan <rmh@aybabtu.com>
6004
6005 * util/grub.d/10_linux.in (prefix): Define.
6006 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
6007
44cb1ec8 60082008-01-13 Pavel Roskin <proski@gnu.org>
6009
6010 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
6011 grub_errno if no errors have been detected.
6012
1eb8c802 60132008-01-12 Robert Millan <rmh@aybabtu.com>
6014
6015 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
6016 (grub_util_get_dev_abstraction): New function prototype.
6017
6018 * util/getroot.c: Include `<grub/util/getroot.h>'
6019 (grub_util_get_grub_dev): Move detection of abstraction type to ...
6020 (grub_util_get_dev_abstraction): ... here (new function).
6021
6022 * util/grub-probe.c: Convert PRINT_* to an enum. Add
6023 `PRINT_ABSTRACTION'.
6024 (probe): Probe for abstraction type when requested.
6025 (main): Understand `--target=abstraction'.
6026
6027 * util/i386/efi/grub-install.in: Add abstraction module to core
6028 image when it is found to be necessary.
6029 * util/i386/pc/grub-install.in: Likewise.
6030 * util/powerpc/ieee1275/grub-install.in: Likewise.
6031
6032 * util/update-grub_lib.in (font_path): Return system path without
6033 converting to GRUB path.
6034 * util/update-grub.in: Convert system path returned by font_path()
6035 to a GRUB path. Use `grub-probe -t abstraction' to determine what
6036 abstraction module is needed for loading fonts (if any). Export
6037 that as `GRUB_PRELOAD_MODULES'.
6038 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
6039 insmod commands).
6040
52bd3de9 60412008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
6042
6043 Remove some unused code from reiserfs.
f19dbdb7 6044
52bd3de9 6045 * fs/reiserfs.c (struct grub_reiserfs_key)
6046 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
6047 (struct grub_reiserfs_node_body): Removed.
6048 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6049 Likewise.
6050 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6051 Likewise.
6052 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6053 Likewise.
6054 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
6055 Likewise.
6056 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
6057 Likewise.
6058 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
6059 Likewise.
6060 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6061 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6062 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
6063
2f80039d 60642008-01-10 Robert Millan <rmh@aybabtu.com>
6065
6066 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
6067 Determines if a file is garbage left by packaging systems, etc.
6068 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
6069 for processing /etc/grub.d scripts.
6070 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
6071 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
6072 as a condition for processing Linux images.
6073
87888032 60742008-01-10 Pavel Roskin <proski@gnu.org>
6075
6076 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
6077 to compile reiserfs.c on PowerPC.
6078
7e54fced 60792008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 6080
6081 * kern/device.c (grub_device_iterate): Do not abort device iteration
6082 when one of the devices cannot be opened.
6083 * kern/disk.c (grub_disk_open): Do not account previous failures of
6084 unrelated functions when grub_errno is checked for.
6085
5aa541e6 60862008-01-08 Robert Millan <rmh@aybabtu.com>
6087
6088 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
6089 `! grub_linux_is_bzimage', change order of address comparison to make
6090 it more intuitive, and improve "too big zImage" error message.
6091
7076340d 60922008-01-08 Robert Millan <rmh@aybabtu.com>
6093
6094 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
6095 `$(update-grub_DATA)'.
6096 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
6097 targets.
6098
9ca70333 60992008-01-07 Robert Millan <rmh@aybabtu.com>
6100
6101 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
6102 which instruction is modified by grub-setup during installation
6103 (since it wasn't obvious by only looking at this file).
6104
38ccf575 61052008-01-07 Robert Millan <rmh@aybabtu.com>
6106
6107 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
6108 listing actual TODO items.
6109
f5db4291 61102008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6111
868967cf 6112 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
6113 correctly.
6114 (grub_reiserfs_get_key_offset): Likewise.
6115 (grub_reiserfs_set_key_offset): Likewise.
6116 (grub_reiserfs_set_key_type): Likewise.
fe6b695a 6117 (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
868967cf 6118
6119 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
6120 better to remove the bitfield version completely.
f19dbdb7 6121
868967cf 61222008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 6123
f5db4291 6124 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
6125 allocated from the heap, due to the fshelp implementation.
6126 (grub_reiserfs_dir): Free NODE, due to the same reason.
6127
492e6d9d 61282008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
6129
6130 Mostly from Vincent Pelletier:
f19dbdb7 6131
492e6d9d 6132 * fs/reiserfs.c: New file.
f19dbdb7 6133
492e6d9d 6134 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
6135 (reiserfs_mod_SOURCES): New variable.
6136 (reiserfs_mod_CFLAGS): Likewise.
6137 (reiserfs_mod_LDFLAGS): Likewise.
6138
6139 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
6140 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
6141 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
6142 normal/color.c.
6143
9ce3e7c1 61442008-01-06 Robert Millan <rmh@aybabtu.com>
6145
6146 * normal/color.c: Remove `<grub/env.h>'.
6147
f3b58148 61482008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
6149
6150 * include/grub/normal.h: Include <grub/env.h>.
6151
7ac3bcfa 61522008-01-05 Robert Millan <rmh@aybabtu.com>
6153
6154 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
6155 usage example with `(hd0,1)'.
fb358190 6156 Reported by Samuel Thibault.
7ac3bcfa 6157
c8ee99d7 61582008-01-05 Robert Millan <rmh@aybabtu.com>
6159
6160 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
6161 (grub_linux_boot_zimage): Rename to ...
6162 (grub_linux_boot): ... this.
6163 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
6164 (grub_linux_boot_zimage): Conditionalize zImage copy.
6165
6166 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
6167 (grub_linux_boot_bzimage): Remove prototype.
6168 (grub_linux_boot_zimage): Rename to ...
6169 (grub_linux_boot): ... this.
6170
6171 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
6172 (grub_linux_boot): Remove function.
6173
0ece25b1 61742008-01-05 Robert Millan <rmh@aybabtu.com>
6175
6176 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
6177 (grub_env_write_color_highlight): Likewise.
6178 (grub_wait_after_message): Likewise.
6179
6180 * normal/color.c: New file.
6181
6182 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6183 (normal_mod_DEPENDENCIES): Likewise.
6184
6185 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6186 (normal_mod_DEPENDENCIES): Likewise.
6187
6188 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6189 (normal_mod_DEPENDENCIES): Likewise.
6190
6191 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
6192 (normal_mod_DEPENDENCIES): Likewise.
6193
6194 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
6195 for waiting after a message is printed.
6196 * normal/main.c (read_config_file): Likewise.
6197 (grub_normal_init): Register grub_env_write_color_normal() and
6198 grub_env_write_color_highlight() hooks. Mark `color_normal' and
6199 `color_highlight' variables as global.
6200
6201 * normal/menu.c (grub_wait_after_message): New function.
6202 (grub_color_menu_normal): New variable. Replaces ...
6203 (GRUB_COLOR_MENU_NORMAL): ... this macro.
6204 (grub_color_menu_highlight): New variable. Replaces ...
6205 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
6206 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
6207 `GRUB_TERM_COLOR_STANDARD'.
6208 (print_message): Use `grub_setcolorstate' to reload colors. Rename
6209 `normal_code' and `highlight_code' to `old_color_normal' and
6210 `old_color_highlight', respectively.
6211 (grub_menu_init_page): Update colors when drawing the menu, based on
6212 `menu_color_normal' and `menu_color_highlight' variables.
6213 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
6214 a message is printed.
6215
182dd4e5 62162008-01-05 Robert Millan <rmh@aybabtu.com>
6217
6218 * kern/env.c (grub_env_context_open): Propagate hooks for global
6219 variables to new context.
6220
6221 * kern/main.c (grub_set_root_dev): Export `root' variable.
6222
ddf8f6ad 62232008-01-05 Robert Millan <rmh@aybabtu.com>
6224
6225 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
fe6b695a 6226 discs unconditionally, since udev and others have options to provide
ddf8f6ad 6227 them.
6228
d8b43d9b 62292008-01-05 Robert Millan <rmh@aybabtu.com>
6230
6231 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
6232
2bff2de3 62332008-01-04 Christian Franke <franke@computer.org>
6234
6235 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
6236 of eisa_mmap.
6237
97eab917 62382008-01-03 Pavel Roskin <proski@gnu.org>
6239
6240 * kern/i386/linuxbios/init.c: Put "void" to all function
6241 declarations with no arguments.
6242 * kern/powerpc/ieee1275/init.c: Likewise.
6243 * term/i386/pc/at_keyboard.c: Likewise.
6244 * term/i386/pc/vga_text.c: Likewise.
6245 * util/grub-mkdevicemap.c: Likewise.
6246
b9416d00 62472008-01-02 Robert Millan <rmh@aybabtu.com>
6248
6249 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
6250 message when loaded image is out of bounds.
6251 (grub_multiboot_load_elf64): Likewise.
6252
92695df9 62532008-01-02 Pavel Roskin <proski@gnu.org>
6254
6255 * util/grub.d/10_linux.in: Try version without ".old" when
6256 looking for initrd. It's better to use initrd from the newer
6257 kernel of the same version than no initrd at all.
6258
d98d9cad 62592008-01-01 Robert Millan <rmh@aybabtu.com>
6260
6261 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
6262
dbfdce36 62632008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
6264
f19dbdb7 6265 * include/grub/video.h: Added grub_video_unmap_color and
dbfdce36 6266 grub_video_get_active_render_target.
6267 (grub_video_adapter): Added unmap_color and get_active_render_target.
6268
f19dbdb7 6269 * video/video.c: Added grub_video_unmap_color and
dbfdce36 6270 grub_video_get_active_render_target.
6271 (grub_video_get_info): Changed method to accept NULL pointer as an
6272 argument to allow detection of active video adapter.
6273
6274 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
6275 grub_video_vbe_unmap_color_int.
6276 Added grub_video_vbe_unmap_color and
6277 grub_video_vbe_get_active_render_target.
6278 (grub_video_vbe_adapter): Added unmap_color and
6279 get_active_render_target.
6280
f19dbdb7 6281 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
dbfdce36 6282 with grub_video_vbe_unmap_color_int.
6283
6284 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
6285 (DEFAULT_NORMAL_COLOR): Likewise.
6286 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
6287 (DEFAULT_FG_COLOR): Removed.
6288 (DEFAULT_BG_COLOR): Likewise.
6289 (DEFAULT_CURSOR_COLOR): Changed value.
6290 (grub_virtual_screen): Added standard_color_setting,
6291 normal_color_setting, highlight_color_setting and term_color.
6292 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
6293 (bitmap_width): Added.
6294 (bitmap_height): Likewise.
6295 (bitmap): Likewise.
6296 (set_term_color): Likewise.
6297 (grub_virtual_screen_setup): Changed to use new terminal coloring
6298 settings.
6299 (grub_gfxterm_init): Added init for bitmap.
6300 (grub_gfxterm_fini): Added destroy for bitmap.
6301 (redraw_screen_rect): Updated to use background bitmap and new
6302 terminal coloring.
6303 (scroll_up): Added optimization for case when there is no bitmap.
6304 (grub_gfxterm_cls): Fixed to use correct background color.
6305 (grub_virtual_screen_setcolorstate): Changed to use new terminal
6306 coloring.
6307 (grub_virtual_screen_setcolor): Likewise.
6308 (grub_virtual_screen_getcolor): Added.
6309 (grub_gfxterm_background_image_cmd): Likewise.
6310 (grub_video_term): Added setcolor and getcolor.
6311 (MOD_INIT): Added registration of background_image command.
6312 (MOD_TERM): Added unregistration for background_image command.
6313
c3c20931 63142007-12-30 Pavel Roskin <proski@gnu.org>
6315
6316 * loader/multiboot_loader.c: Fix multiboot command
6317 unregistration. Fix all typos in the word "multiboot".
6318
df266716 63192007-12-29 Pavel Roskin <proski@gnu.org>
94239199 6320
6321 * util/grub.d/10_linux.in: Refactor search for initrd. Add
6322 support for initrd names used in Fedora.
6323
fc6e896c 63242007-12-26 Bean <bean123ch@gmail.com>
6325
6326 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
6327 (cpio_mod_SOURCES): New variable.
6328 (cpio_mod_CFLAGS): Likewise.
6329 (cpio_mod_LDFLAGS): Likewise.
6330
6331 * fs/cpio.c: New file.
6332
6333 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
6334
6335 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6336
6337 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
6338
6339 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6340
533110ad 63412007-12-25 Robert Millan <rmh@aybabtu.com>
6342
6343 * include/grub/term.h (struct grub_term): Add `getcolor' function.
6344 (grub_getcolor): New function.
6345
6346 * kern/term.c (grub_getcolor): New function.
6347 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
6348 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
6349 (print_entry): Set normal and highlight colors to
6350 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
6351 respectively, before printing and restore them to old
6352 values afterwards.
6353 (grub_menu_init_page): Likewise. Fill an additional colored space
6354 that would otherwise be left blank.
6355
6356 * term/efi/console.c (grub_console_getcolor): New function.
6357 (struct grub_console_term.getcolor): New variable.
6358 * term/i386/pc/console.c (grub_console_getcolor): New function.
6359 (struct grub_console_term.getcolor): New variable.
6360 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
6361 (struct grub_console_term.getcolor): New variable.
6362
6363 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
6364 (struct grub_console_term.setcolor): Remove variable.
6365 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
6366 (struct grub_console_term.setcolor): Remove variable.
6367 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
6368 (struct grub_console_term.setcolor): Remove variable.
6369 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
6370 (struct grub_console_term.setcolor): Remove variable.
6371
4931827f 63722007-12-25 Robert Millan <rmh@aybabtu.com>
6373
6374 * configure.ac: Search for possible unifont.hex locations, and
6375 define UNIFONT_HEX if found.
6376
6377 * Makefile.in (UNIFONT_HEX): Define variable.
6378 (DATA): Rename to ...
6379 (PKGLIB): ... this. Update all users.
6380 (PKGDATA): New variable.
6381 (pkgdata_IMAGES): Rename to ...
6382 (pkglib_IMAGES): ... this. Update all users.
6383 (pkgdata_MODULES): Rename to ...
6384 (pkglib_MODULES): ... this. Update all users.
6385 (pkgdata_PROGRAMS): Rename to ...
6386 (pkglib_PROGRAMS): ... this. Update all users.
6387 (pkgdata_DATA): Rename to ...
6388 (pkglib_DATA): ... this. Update all users.
6389 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
6390 (unicode.pff, ascii.pff): New rules.
6391 (all-local): Add `$(PKGDATA)' dependency.
6392 (install-local): Process `$(PKGDATA)'.
6393
6394 * util/update-grub_lib.in (font_path): Search for *.pff files in
6395 a few more locations, including `${pkgdata}'.
6396
57e57e31 63972007-12-23 Robert Millan <rmh@aybabtu.com>
6398
6399 Patch from Bean <bean123ch@gmail.com>:
6400 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
6401 `size'.
6402
4bc72aa9 64032007-12-21 Bean <bean123ch@gmail.com>
6404
6405 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
6406 (ntfscomp_mod_SOURCES): New variable.
6407 (ntfscomp_mod_CFLAGS): Likewise.
6408 (ntfscomp_mod_LDFLAGS): Likewise.
6409
6410 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
6411 (grub_probe_SOURCES): Likewise.
6412 (grub_emu_SOURCES): Likewise.
6413
6414 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6415 (grub_emu_SOURCES): Likewise.
6416
6417 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6418 (grub_emu_SOURCES): Likewise.
6419
6420 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
6421 (grub_emu_SOURCES): Likewise.
6422
6423 * fs/ntfs.c (grub_ntfscomp_func): New variable.
6424 (read_run_list): Renamed to grub_ntfs_read_run_list.
6425 (decomp_nextvcn): Moved to ntfscomp.c.
6426 (decomp_getch): Likewise.
6427 (decomp_get16): Likewise.
6428 (decomp_block): Likewise.
6429 (read_block): Likewise.
6430 (read_data): Partially moved to ntfscomp.c.
6431 (fixup): Change unsigned to grub_uint16_t.
6432 (read_mft): Change unsigned long to grub_uint32_t.
6433 (read_attr): Likewise.
6434 (read_data): Likewise.
6435 (read_run_data): Likewise.
6436 (read_run_list): Likewise.
6437 (read_mft): Likewise.
6438
6439 * fs/ntfscomp.c: New file.
6440
6441 * include/grub/ntfs.h: New file.
6442
af680a87 64432007-12-16 Robert Millan <rmh@aybabtu.com>
6444
6445 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
6446 IDE disk check, since Linux is known to support 20 IDE disks.
6447 Reported by Colin Watson.
6448
84be7599 64492007-12-15 Bean <bean123ch@gmail.com>
6450
6451 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
6452 (lnxboot_img_SOURCES): New variable.
6453 (lnxboot_img_ASFLAGS): Likewise.
6454 (lnxboot_img_LDFLAGS): Likewise.
6455
6456 * boot/i386/pc/lnxboot.S: New file.
6457
6af9db01 64582007-11-24 Pavel Roskin <proski@gnu.org>
6459
6460 * configure.ac: Test if '--build-id=none' is supported by the
6461 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
6462 objcopy to generate incorrect binary files (binutils
6463 2.17.50.0.18-1 as shipped by Fedora 8).
6464 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
6465 linking, so that build ID doesn't break the test.
6466
7361cfe6 64672007-11-24 Pavel Roskin <proski@gnu.org>
6468
6469 * include/grub/i386/time.h: use "void" in the argument list
6470 of grub_cpu_idle().
6471 * include/grub/powerpc/time.h: Likewise.
6472 * include/grub/sparc64/time.h: Likewise.
6473
1593e10c 64742007-11-18 Christian Franke <franke@computer.org>
6475
6476 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
6477 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
6478 This fixes the problem that function keys did not work in grub-emu.
6479
3b8db1a8 64802007-11-18 Christian Franke <franke@computer.org>
6481
6482 * disk/host.c (grub_host_open): Remove attribute unused from
6483 name parameter. Add check for "host". This fixes the problem
6484 that grub-emu does not find partitions.
6485
2e29408d 64862007-11-18 Christian Franke <franke@computer.org>
6487
6488 * util/hostfs.c (is_dir): New function.
6489 (grub_hostfs_dir): Handle missing dirent.d_type case.
6490 (grub_hostfs_read): Add missing fseek().
6491 (grub_hostfs_label): Clear label pointer. This fixes a crash
6492 of grub-emu on "ls (host)".
6493
398cd047 64942007-11-18 Christian Franke <franke@computer.org>
6495
6496 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
6497 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
6498 to 64 bit boundary by default.
6499
c405c391 65002007-11-18 Bean <bean123ch@gmail.com>
6501
6502 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
6503 (hexdump_mod_SOURCES): New variable.
6504 (hexdump_mod_CFLAGS): Likewise.
6505 (hexdump_mod_LDFLAGS): Likewise.
f19dbdb7 6506
c405c391 6507 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6508
6509 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6510
6511 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6512
6513 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
6514
6515 * include/grub/hexdump.h: New file.
6516
6517 * commands/hexdump.c: New file.
6518
5cced7fd 65192007-11-10 Robert Millan <rmh@aybabtu.com>
6520
6521 * commands/i386/pc/play.c (beep_off): Switch order of arguments
6522 in grub_outb() calls.
6523 (beep_on): Likewise.
6524
8b714eb0 65252007-11-10 Christian Franke <franke@computer.org>
6526
6527 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
6528 (grub_menu_run): Likewise.
6529
ce0f1839 65302007-11-10 Robert Millan <rmh@aybabtu.com>
6531
6532 * include/grub/i386/efi/machine.h: New file.
6533 * include/grub/i386/linuxbios/machine.h: Likewise.
6534 * include/grub/i386/pc/machine.h: Likewise.
6535 * include/grub/powerpc/ieee1275/machine.h: Likewise.
6536 * include/grub/sparc64/ieee1275/machine.h: Likewise.
6537
6538 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
6539 (serial_hw_io_addr): New variable.
6540 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
6541 instead of `(unsigned short *) 0x400'.
6542
270c237d 65432007-11-10 Bean <bean123ch@gmail.com>
6544
6545 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
6546
a87783bf 65472007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6548
6549 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
6550 (vga_mod_SOURCES): Added.
6551 (vga_mod_CFLAGS): Likewise.
6552 (vga_mod_LDFLAGS): Likewise.
6553
6554 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
6555 grub_outb() calls.
6556 (set_map_mask): Likewise.
6557 (set_read_map): Likewise.
6558 (set_read_address): Likewise.
6559 (vga_font): Removed variable.
6560 (get_vga_glyph): Removed function.
6561 (invalidate_char): Likewise.
6562 (write_char): Changed to use grub_font_get_glyph() for font
6563 information.
6564 (grub_vga_putchar): Likewise.
6565 (grub_vga_getcharwidth): Likewise.
6566
6433b448 65672007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
6568
6569 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
6570 flags.
6571 (pxeboot_img_LDFLAGS): Likewise.
6572 (diskboot_img_LDFLAGS): Likewise.
6573 (kernel_img_LDFLAGS): Likewise.
6574
49178511 65752007-11-06 Robert Millan <rmh@aybabtu.com>
6576
6577 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
6578 in grub_outb() calls.
6579 (serial_hw_init): Likewise.
6580
53b052de 65812007-11-05 Robert Millan <rmh@aybabtu.com>
6582
6583 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
6584 spaces. Skip non-regular files.
6585
5ab33bba 65862007-11-05 Robert Millan <rmh@aybabtu.com>
6587
6588 * kern/disk.c (grub_disk_firmware_fini)
6589 (grub_disk_firmware_is_tainted): New variables.
6590
6591 * include/grub/disk.h (grub_disk_firmware_fini)
6592 (grub_disk_firmware_is_tainted): Likewise.
6593
6594 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
6595 (grub_disk_biosdisk_fini): ... to here.
6596 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
6597 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
6598 is set. Register grub_disk_biosdisk_fini() in
6599 `grub_disk_firmware_fini'.
6600
6601 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
6602 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
6603 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
6604 to finish existing firmware disk interface.
6605
6606 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
6607 (ata_mod_SOURCES): New variable.
6608 (ata_mod_CFLAGS): Likewise.
6609 (ata_mod_LDFLAGS): Likewise.
6610
0149ab7c 66112007-11-05 Robert Millan <rmh@aybabtu.com>
6612
6613 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
6614 (grub_ata_wait): Reimplement using grub_millisleep().
6615
6616 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
6617 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
6618
be7ac41e 66192007-11-03 Marco Gerards <marco@gnu.org>
6620
6621 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
6622 (CRTC_ADDR_PORT): New macro.
6623 (CRTC_DATA_PORT): Likewise.
6624 (CRTC_CURSOR): Likewise.
6625 (CRTC_CURSOR_ADDR_HIGH): Likewise.
6626 (CRTC_CURSOR_ADDR_LOW): Likewise.
6627 (update_cursor): New function.
6628 (grub_console_real_putchar): Call `update_cursor'.
6629 (grub_console_gotoxy): Likewise.
6630 (grub_console_cls): Set the default color when clearing the
6631 screen.
6632 (grub_console_setcursor): Implemented.
6633
bb06ab2e 66342007-11-03 Marco Gerards <marco@gnu.org>
6635
6636 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
6637 become activate.
6638 (grub_ata_pio_write): Likewise.
6639
6640 (grub_atapi_identify): Wait after issuing an ATA command.
6641 (grub_atapi_packet): Likewise.
6642 (grub_ata_identify): Likewise.
6643 (grub_ata_readwrite): Likewise.
6644
cf8f780b 66452007-11-03 Marco Gerards <marco@gnu.org>
6646
6647 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
6648 (grub_ata_pio_write): Likewise.
6649 (grub_ata_readwrite): Use `grub_error', instead of
6650 returning `grub_errno'.
6651
ed649e54 66522007-11-03 Marco Gerards <marco@gnu.org>
6653
6654 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
6655 grub_ata_pio_write once for every single sector, instead of for
6656 multiple sectors.
6657
ca25d8f0 66582007-10-31 Robert Millan <rmh@aybabtu.com>
6659
6660 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
6661
6662 * conf/i386-linuxbios.rmk: New file.
6663
6664 * kern/i386/pc/hardware.c: Likewise.
6665 * term/i386/pc/at_keyboard.c: Likewise.
6666 * term/i386/pc/vga_text.c: Likewise.
6667
6668 * include/grub/i386/linuxbios/boot.h: Likewise.
6669 * include/grub/i386/linuxbios/console.h: Likewise.
6670 * include/grub/i386/linuxbios/init.h: Likewise.
6671 * include/grub/i386/linuxbios/kernel.h: Likewise.
6672 * include/grub/i386/linuxbios/loader.h: Likewise.
6673 * include/grub/i386/linuxbios/memory.h: Likewise.
6674 * include/grub/i386/linuxbios/serial.h: Likewise.
6675 * include/grub/i386/linuxbios/time.h: Likewise.
6676
6677 * kern/i386/linuxbios/init.c: Likewise.
6678 * kern/i386/linuxbios/startup.S: Likewise.
6679 * kern/i386/linuxbios/table.c: Likewise.
6680
e911ecc1 66812007-10-31 Marco Gerards <marco@gnu.org>
6682
6683 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
6684 (ata_mod_SOURCES): New variable.
6685 (ata_mod_CFLAGS): Likewise.
6686 (ata_mod_LDFLAGS): Likewise.
6687
6688 * disk/ata.c: New file.
6689
6690 * include/grub/disk.h (grub_disk_dev_id): Add
6691 `GRUB_DISK_DEV_ATA_ID'.
f19dbdb7 6692
7f66d0e0 66932007-10-31 Robert Millan <rmh@aybabtu.com>
6694
6695 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
6696 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
6697
6698 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
6699 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
6700
6701 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
6702 `<grub/types.h>'.
6703
6704 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
6705
5cd7dd46 67062007-10-27 Robert Millan <rmh@aybabtu.com>
6707
3236ca65 6708 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 6709
2ebfc90f 67102007-10-22 Robert Millan <rmh@aybabtu.com>
6711
6712 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
6713 `"../realmode.S"'.
6714 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
6715
73fcb0f3 67162007-10-22 Robert Millan <rmh@aybabtu.com>
6717
6718 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
6719 (pkgdata_MODULES): Add `biosdisk.mod'.
6720 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
6721 variables.
6722
6723 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
6724 (grub_biosdisk_init): Replace with ...
6725 (GRUB_MOD_INIT(biosdisk)): ... this.
6726 (grub_biosdisk_fini): Replace with ...
6727 (GRUB_MOD_FINI(biosdisk)): ... this.
6728
6729 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
6730 (grub_machine_init): Remove call to grub_biosdisk_init().
6731 (grub_machine_fini): Remove call to grub_machine_fini().
6732
6733 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
6734
3381d274 67352007-10-22 Robert Millan <rmh@aybabtu.com>
6736
6737 * include/grub/time.h: New file.
6738 * include/grub/i386/time.h: Likewise.
6739 * include/grub/powerpc/time.h: Likewise.
6740 * include/grub/sparc64/time.h: Likewise.
6741
6742 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
6743 instances to ...
6744 (KERNEL_MACHINE_TIME_HEADER): ... this.
6745 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6746 instances to ...
6747 (KERNEL_MACHINE_TIME_HEADER): ... this.
6748 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
6749 instances to ...
6750 (KERNEL_MACHINE_TIME_HEADER): ... this.
6751
6752 * kern/i386/efi/init.c: Include `<grub/time.h>'.
6753 (grub_millisleep): New function.
6754 * kern/i386/pc/init.c: Include `<grub/time.h>'.
6755 (grub_millisleep): New function.
6756 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
6757 Remove `grub/machine/time.h' include.
6758 (grub_millisleep): New function.
6759 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
6760 Remove `grub/machine/time.h' include.
6761 (grub_millisleep): New function.
6762
6763 * include/grub/misc.h (grub_div_roundup): New function.
6764
6765 * kern/misc.c: Include `<grub/time.h>'.
6766 (grub_millisleep_generic): New function.
6767
6768 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
6769 Add `time.h'.
6770 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
6771 Add `time.h'.
6772 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
6773 `machine/time.h'. Add `time.h'.
6774 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
6775
a39a0312 67762007-10-21 Robert Millan <rmh@aybabtu.com>
6777
6778 * include/grub/misc.h (grub_max): New function.
6779
2aad70e2 67802007-10-21 Robert Millan <rmh@aybabtu.com>
6781
6782 * util/misc.c (grub_util_info): Call fflush() before returning.
6783
54b71c4b 67842007-10-20 Robert Millan <rmh@aybabtu.com>
6785
6786 * genmk.rb (Image): Copy `extra_flags' from here ...
6787 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
6788
6789 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
6790 to `argc' and `args' arguments.
6791
a979f513 67922007-10-17 Robert Millan <rmh@aybabtu.com>
6793
6794 * kern/i386/loader.S: New file.
6795
6796 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
6797 * kern/i386/loader.S (grub_linux_prot_size)... to here.
6798 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
6799 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
6800 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
6801 * kern/i386/loader.S (grub_linux_real_addr)... to here.
6802 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
6803 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
6804 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
6805 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
6806 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
6807 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
6808 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
6809 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
6810
6811 * kern/i386/realmode.S: New file.
6812
6813 * kern/i386/pc/startup.S (protstack): Moved from here ...
6814 * kern/i386/realmode.S (protstack)... to here.
6815 * kern/i386/pc/startup.S (gdt): Moved from here ...
6816 * kern/i386/realmode.S (gdt)... to here.
6817 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
6818 * kern/i386/realmode.S (prot_to_real)... to here.
6819
6820 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
6821 `kern/i386/realmode.S'.
6822
825fc8fd 68232007-10-17 Robert Millan <rmh@aybabtu.com>
6824
6825 * include/grub/i386/loader.h: New file.
6826
6827 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
6828 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6829 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6830 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6831 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
6832 * include/grub/i386/loader.h (grub_linux_prot_size)
6833 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
6834 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
6835 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
6836 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
6837
6838 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
6839
e179b2f4 68402007-10-15 Robert Millan <rmh@aybabtu.com>
6841
6842 * normal/misc.c (grub_normal_print_device_info): Do not probe for
6843 filesystem when dev->disk is unset.
6844 Do probe for filesystem even when dev->disk->has_partitions is set.
6845 In case a filesystem is found, always report it.
6846 In case it isn't, if dev->disk->has_partitions is set, report that
6847 a partition table was found instead of reporting that no filesystem
6848 could be identified.
6849
5db82af6 68502007-10-12 Robert Millan <rmh@aybabtu.com>
6851
6852 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
6853 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
6854
68f6ac74 6855 * include/grub/types.h (grub_host_to_target16): New macro.
6856 (grub_host_to_target32): Likewise.
6857 (grub_host_to_target64): Likewise.
6858 (grub_target_to_host16): Likewise.
6859 (grub_target_to_host32): Likewise.
6860 (grub_target_to_host64): Likewise.
5db82af6 6861
6862 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
6863 Renamed from to ...
6864 (GRUB_MOD_ALIGN): ...this. Update all users.
6865
68f6ac74 6866 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
6867 grub_host_to_target32.
6868 Replace grub_be_to_cpu32 with grub_target_to_host32.
6869 (load_modules): Likewise.
6870 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
6871 Replace grub_be_to_cpu32 with grub_target_to_host32.
6872 Replace grub_cpu_to_be16 with grub_host_to_target16.
6873 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 6874
3cf497cc 68752007-10-12 Robert Millan <rmh@aybabtu.com>
6876
6877 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
6878 * util/elf/grub-mkimage.c: ... here.
6879
6880 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
6881 `util/powerpc/ieee1275/grub-mkimage.c'.
6882
c8cc3692 68832007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 6884
c8cc3692 6885 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
6886 and make it easier to figure out.
6887 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
6888 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
6889 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
6890 leave us with less than HEAP_MIN_SIZE total heap.
6891 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 6892
5c58b791 68932007-10-03 Robert Millan <rmh@aybabtu.com>
6894
6895 * include/grub/i386/io.h: New file.
6896 * commands/i386/pc/play.c (inb): Removed.
6897 (outb): Removed.
6898 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6899 with grub_outb().
afcd2ef8 6900 * term/i386/pc/serial.c (inb): Removed.
6901 (outb): Removed.
6902 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6903 with grub_outb().
6904 * term/i386/pc/vga.c (inb): Removed.
6905 (outb): Removed.
6906 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
6907 with grub_outb().
5c58b791 6908
1a477ed6 69092007-10-02 Robert Millan <rmh@aybabtu.com>
6910
6911 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
6912 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6913 Reported by Marcin Kurek.
6914
6b5d80fa 69152007-09-07 Robert Millan <rmh@aybabtu.com>
6916
6917 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
6918 SmartFirmware version updates (as released by Sven Luther), and avoid
6919 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
6920 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
6921 known broken.
6922
5618afbf 69232007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6924
6925 From Hitoshi Ozeki:
6926 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
6927 when merging two regions.
6928
6139dcd9 69292007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
6930
508e39ee 6931 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
6932 * normal/completion.c (grub_normal_do_completion): Likewise.
6933 Reported by Hitoshi Ozeki.
6934
69352007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 6936
6139dcd9 6937 Do not use devices at boot in chainloading.
f19dbdb7 6938
6139dcd9 6939 * loader/i386/pc/chainloader.c (boot_drive): New variable.
6940 (boot_part_addr): Likewise.
6941 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
6942 with BOOT_DRIVE and BOOT_PART_ADDR.
6943 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
6944 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
6945
38da6516 69462007-08-29 Robert Millan <rmh@aybabtu.com>
6947
6948 Patch from Simon Peter <dn.tlp@gmx.net>:
6949 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
6950 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
6951 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
6952 util/i386/pc/grub-setup.c_DEPENDENCIES.
6953 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
6954 util/grub-probe.c_DEPENDENCIES.
6955 * conf/powerpc-ieee1275.rmk: Likewise.
6956
29d0928c 69572007-08-28 Robert Millan <rmh@aybabtu.com>
6958
6959 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
6960 to tell grub-mkdevicemap how to name devices.
6961 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
6962 feature).
6963
6964 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
6965 util/i386/get_disk_name.c.
6966 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
6967 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
6968 util/ieee1275/get_disk_name.c.
6969
6970 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
6971
6972 * DISTLIST: Add util/i386/get_disk_name.c and
6973 util/ieee1275/get_disk_name.c.
6974
6975 * util/grub-mkdevicemap.c: Replace device naming logic with
6976 grub_util_get_disk_name() calls.
6977
5a0d3cca 69782007-08-20 Robert Millan <rmh@aybabtu.com>
6979
6980 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
6981 (so that it works for both plural and singular quantities).
6982
8b72db2f 69832007-08-05 Robert Millan <rmh@aybabtu.com>
6984
6985 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
6986 so that [xz] isn't taken into account when determining order.
6987
352466bf 69882007-08-02 Marco Gerards <marco@gnu.org>
6989
6990 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
6991 `include/multiboot2.h', `include/grub/elfload.h',
6992 `include/multiboot.h', `include/grub/multiboot.h',
6993 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
6994 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
6995 `kern/elf.c', `loader/multiboot_loader.c',
6996 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
6997 `loader/i386/pc/multiboot2.c',
6998 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
6999 `util/i386/pc/grub-mkrescue.in'. Remove
7000 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
7001 `include/grub/i386/pc/util/biosdisk.h' and
7002 `include/grub/powerpc/ieee1275/multiboot.h'.
7003
8f096014 70042007-08-02 Bean <bean123ch@gmail.com>
7005
7006 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
7007 (ntfs_mod_SOURCES): New variable.
7008 (ntfs_mod_CFLAGS): Likewise.
7009 (ntfs_mod_LDFLAGS): Likewise.
7010
7011 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
7012 (grub_probe_SOURCES): Likewise.
7013 (grub_emu_SOURCES): Likewise.
7014
7015 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7016 (grub_emu_SOURCES): Likewise.
7017
7018 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
7019 (grub_emu_SOURCES): Likewise.
f19dbdb7 7020
8f096014 7021 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
7022
7023 * fs/ntfs.c: New file.
7024
9959f7db 70252007-08-02 Bean <bean123ch@gmail.com>
7026
7027 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
7028
7029 * file.h (grub_file): Likewise.
7030
7031 * fshelp.h (grub_fshelp_read_file): Likewise.
7032
7033 * util/i386/pc/grub-setup.c (setup): Likewise.
7034 (save_first_sector): Likewise.
7035 (save_blocklists): Likewise.
f19dbdb7 7036
9959f7db 7037 * fs/affs.c (grub_affs_read_file): Likewise.
7038
7039 * fs/ext2.c (grub_ext2_read_file): Likewise.
7040
7041 * fs/fat.c (grub_fat_read_data): Likewise.
7042
7043 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
7044
7045 * fs/hfs.c (grub_hfs_read_file): Likewise.
7046
7047 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
7048
7049 * fs/jfs.c (grub_jfs_read_file): Likewise.
7050
7051 * fs/minix.c (grub_minix_read_file): Likewise.
7052
7053 * fs/sfs.c (grub_sfs_read_file): Likewise.
7054
7055 * fs/ufs.c (grub_ufs_read_file): Likewise.
f19dbdb7 7056
9959f7db 7057 * fs/xfs.c (grub_xfs_read_file): Likewise.
7058
7059 * command/blocklist.c (read_blocklist): Likewise.
7060 (print_blocklist): Likewise.
7061
0a203f83 70622007-08-02 Marco Gerards <marco@gnu.org>
7063
7064 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
7065 `util/hostfs.c'.
7066
7067 * disk/host.c: New file.
7068
7069 * util/hostfs.c: Likewise.
7070
7071 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
7072 return `GRUB_ERR_BAD_FS'.
7073 * fs/sfs.c (grub_sfs_mount): Likewise.
7074 * fs/xfs.c (grub_xfs_mount): Likewise.
7075
7076 * include/grub/disk.h (enum grub_disk_dev_id): Add
7077 `GRUB_DISK_DEVICE_HOST_ID'.
7078
7079 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
7080
e5dfe777 70812007-07-24 Jerone Young <jerone@gmail.com>
7082
f19dbdb7 7083 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
e5dfe777 7084 modules for compilation.
7085 * conf/powerpc-ieee1275.rmk: Likewise.
7086
7087 * include/multiboot.h: Move multiboot definitions to one file. Rename
7088 many definitions to not get grub specific.
7089 * include/multiboot2.h: Create header with multiboot 2 definitions.
7090 * include/grub/multiboot.h: Header for grub specific function
7091 prototypes and definitions.
7092 * include/grub/multiboot2.h: Likewise.
7093 * include/grub/multiboot_loader.h: Likewise.
7094 * include/grub/i386/pc/multiboot.h: Removed.
7095 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
7096
7097 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
7098 and 2 to allow for one multiboot and module commands.
7099 * loader/multiboot2.c: Add multiboot2 functionality.
7100 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
7101 and definition names.
7102 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
7103 2 functions.
7104 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
7105 ieee1275 specific multiboot2 code.
7106
7107 * kern/i386/pc/startup.S: Change headers and definition names for
7108 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
7109
daf0f0ba 71102007-07-22 Robert Millan <rmh@aybabtu.com>
7111
7112 * geninitheader.sh: Process file specified in first parameter rather
7113 than hardcoding grub_modules_init.lst.
fe6b695a 7114 * geninit.sh: Likewise. Also, construct header name dynamically rather
daf0f0ba 7115 than hardcoding grub_modules_init.h.
7116
7117 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
7118 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
7119 grub_probe_init.[ch] and grub_setup_init.[ch].
7120
7121 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
7122 grub_modules_init.h with grub_emu_init.h.
7123 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
7124 grub_probe_init.[ch] files.
7125 * conf/i386-efi.rmk: Likewise.
7126 * conf/i386-pc.rmk: Likewise.
7127 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
7128 grub_setup_init.[ch] files.
7129
7130 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
7131 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
7132 to initialize modules rather than a list of hardcoded functions.
7133 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
7134 grub_init_all() to initialize modules rather than a list of hardcoded
7135 functions.
7136
54cdc1cc 71372007-07-22 Robert Millan <rmh@aybabtu.com>
7138
7139 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
7140 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
7141
ad0686cc 71422007-07-22 Robert Millan <rmh@aybabtu.com>
7143
7144 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
7145 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
7146 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
7147 flag when running on SmartFirmware.
7148 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
7149 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
7150 was set.
7151
7152 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
7153 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
7154 rather than decreasing it.
7155
7156 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
7157 there's not enough space to do it, fail in the same way as when it
7158 can't be done because there are no partitions.
7159
7160 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
7161 when nvsetenv failed.
7162
969c02ec 71632007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
7164
7165 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
7166 because this rule is automatically generated.
7167 (grub-mkrescue): Removed for the same reason as above.
7168
5a79f472 71692007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
7170
7171 Migrate to GNU General Public License Version 3.
f19dbdb7 7172
5a79f472 7173 * COPYING: Replaced with the plain text version of GPLv3.
7174
7175 * config.guess: Updated from gnulib.
7176 * config.sub: Likewise.
7177
7178 * geninit.sh: Output a GPLv3 copyright notice.
7179 * geninitheader.sh: Likewise.
7180 * genmodsrc.sh: Likewise.
7181 * gensymlist.sh.in: Likewise.
7182
7183 * boot/i386/pc/boot.S: Upgraded to GPLv3.
7184 * boot/i386/pc/diskboot.S: Likewise.
7185 * boot/i386/pc/pxeboot.S: Likewise.
7186 * commands/blocklist.c: Likewise.
7187 * commands/boot.c: Likewise.
7188 * commands/cat.c: Likewise.
7189 * commands/cmp.c: Likewise.
7190 * commands/configfile.c: Likewise.
7191 * commands/echo.c: Likewise.
7192 * commands/help.c: Likewise.
7193 * commands/ls.c: Likewise.
7194 * commands/search.c: Likewise.
7195 * commands/terminal.c: Likewise.
7196 * commands/test.c: Likewise.
7197 * commands/videotest.c: Likewise.
7198 * commands/i386/cpuid.c: Likewise.
7199 * commands/i386/pc/halt.c: Likewise.
7200 * commands/i386/pc/play.c: Likewise.
7201 * commands/i386/pc/reboot.c: Likewise.
7202 * commands/i386/pc/vbeinfo.c: Likewise.
7203 * commands/i386/pc/vbetest.c: Likewise.
7204 * commands/ieee1275/halt.c: Likewise.
7205 * commands/ieee1275/reboot.c: Likewise.
7206 * commands/ieee1275/suspend.c: Likewise.
7207 * disk/loopback.c: Likewise.
7208 * disk/lvm.c: Likewise.
7209 * disk/raid.c: Likewise.
7210 * disk/efi/efidisk.c: Likewise.
7211 * disk/i386/pc/biosdisk.c: Likewise.
7212 * disk/ieee1275/ofdisk.c: Likewise.
7213 * font/manager.c: Likewise.
7214 * fs/affs.c: Likewise.
7215 * fs/ext2.c: Likewise.
7216 * fs/fat.c: Likewise.
7217 * fs/fshelp.c: Likewise.
7218 * fs/hfs.c: Likewise.
7219 * fs/hfsplus.c: Likewise.
7220 * fs/iso9660.c: Likewise.
7221 * fs/jfs.c: Likewise.
7222 * fs/minix.c: Likewise.
7223 * fs/sfs.c: Likewise.
7224 * fs/ufs.c: Likewise.
7225 * fs/xfs.c: Likewise.
7226 * hello/hello.c: Likewise.
7227 * include/grub/acorn_filecore.h: Likewise.
7228 * include/grub/arg.h: Likewise.
7229 * include/grub/bitmap.h: Likewise.
7230 * include/grub/boot.h: Likewise.
7231 * include/grub/cache.h: Likewise.
7232 * include/grub/device.h: Likewise.
7233 * include/grub/disk.h: Likewise.
7234 * include/grub/dl.h: Likewise.
7235 * include/grub/elfload.h: Likewise.
7236 * include/grub/env.h: Likewise.
7237 * include/grub/err.h: Likewise.
7238 * include/grub/file.h: Likewise.
7239 * include/grub/font.h: Likewise.
7240 * include/grub/fs.h: Likewise.
7241 * include/grub/fshelp.h: Likewise.
7242 * include/grub/gzio.h: Likewise.
7243 * include/grub/hfs.h: Likewise.
7244 * include/grub/kernel.h: Likewise.
7245 * include/grub/loader.h: Likewise.
7246 * include/grub/lvm.h: Likewise.
7247 * include/grub/misc.h: Likewise.
7248 * include/grub/mm.h: Likewise.
7249 * include/grub/net.h: Likewise.
7250 * include/grub/normal.h: Likewise.
7251 * include/grub/parser.h: Likewise.
7252 * include/grub/partition.h: Likewise.
7253 * include/grub/pc_partition.h: Likewise.
7254 * include/grub/raid.h: Likewise.
7255 * include/grub/rescue.h: Likewise.
7256 * include/grub/script.h: Likewise.
7257 * include/grub/setjmp.h: Likewise.
7258 * include/grub/symbol.h: Likewise.
7259 * include/grub/term.h: Likewise.
7260 * include/grub/terminfo.h: Likewise.
7261 * include/grub/tparm.h: Likewise.
7262 * include/grub/types.h: Likewise.
7263 * include/grub/video.h: Likewise.
7264 * include/grub/efi/api.h: Likewise.
7265 * include/grub/efi/chainloader.h: Likewise.
7266 * include/grub/efi/console.h: Likewise.
7267 * include/grub/efi/console_control.h: Likewise.
7268 * include/grub/efi/disk.h: Likewise.
7269 * include/grub/efi/efi.h: Likewise.
7270 * include/grub/efi/pe32.h: Likewise.
7271 * include/grub/efi/time.h: Likewise.
7272 * include/grub/i386/linux.h: Likewise.
7273 * include/grub/i386/setjmp.h: Likewise.
7274 * include/grub/i386/types.h: Likewise.
7275 * include/grub/i386/efi/kernel.h: Likewise.
7276 * include/grub/i386/efi/loader.h: Likewise.
7277 * include/grub/i386/efi/time.h: Likewise.
7278 * include/grub/i386/pc/biosdisk.h: Likewise.
7279 * include/grub/i386/pc/boot.h: Likewise.
7280 * include/grub/i386/pc/chainloader.h: Likewise.
7281 * include/grub/i386/pc/console.h: Likewise.
7282 * include/grub/i386/pc/init.h: Likewise.
7283 * include/grub/i386/pc/kernel.h: Likewise.
7284 * include/grub/i386/pc/loader.h: Likewise.
7285 * include/grub/i386/pc/memory.h: Likewise.
7286 * include/grub/i386/pc/multiboot.h: Likewise.
7287 * include/grub/i386/pc/serial.h: Likewise.
7288 * include/grub/i386/pc/time.h: Likewise.
7289 * include/grub/i386/pc/vbe.h: Likewise.
7290 * include/grub/i386/pc/vbeblit.h: Likewise.
7291 * include/grub/i386/pc/vbefill.h: Likewise.
7292 * include/grub/i386/pc/vbeutil.h: Likewise.
7293 * include/grub/i386/pc/vga.h: Likewise.
7294 * include/grub/ieee1275/ieee1275.h: Likewise.
7295 * include/grub/ieee1275/ofdisk.h: Likewise.
7296 * include/grub/powerpc/libgcc.h: Likewise.
7297 * include/grub/powerpc/setjmp.h: Likewise.
7298 * include/grub/powerpc/types.h: Likewise.
7299 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
7300 * include/grub/powerpc/ieee1275/console.h: Likewise.
7301 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
7302 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
7303 * include/grub/powerpc/ieee1275/loader.h: Likewise.
7304 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
7305 * include/grub/powerpc/ieee1275/time.h: Likewise.
7306 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
7307 * include/grub/sparc64/libgcc.h: Likewise.
7308 * include/grub/sparc64/setjmp.h: Likewise.
7309 * include/grub/sparc64/types.h: Likewise.
7310 * include/grub/sparc64/ieee1275/console.h: Likewise.
7311 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
7312 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
7313 * include/grub/sparc64/ieee1275/time.h: Likewise.
7314 * include/grub/util/biosdisk.h: Likewise.
7315 * include/grub/util/getroot.h: Likewise.
7316 * include/grub/util/lvm.h: Likewise.
7317 * include/grub/util/misc.h: Likewise.
7318 * include/grub/util/raid.h: Likewise.
7319 * include/grub/util/resolve.h: Likewise.
7320 * io/gzio.c: Likewise.
7321 * kern/device.c: Likewise.
7322 * kern/disk.c: Likewise.
7323 * kern/dl.c: Likewise.
7324 * kern/elf.c: Likewise.
7325 * kern/env.c: Likewise.
7326 * kern/err.c: Likewise.
7327 * kern/file.c: Likewise.
7328 * kern/fs.c: Likewise.
7329 * kern/loader.c: Likewise.
7330 * kern/main.c: Likewise.
7331 * kern/misc.c: Likewise.
7332 * kern/mm.c: Likewise.
7333 * kern/parser.c: Likewise.
7334 * kern/partition.c: Likewise.
7335 * kern/rescue.c: Likewise.
7336 * kern/term.c: Likewise.
7337 * kern/efi/efi.c: Likewise.
7338 * kern/efi/init.c: Likewise.
7339 * kern/efi/mm.c: Likewise.
7340 * kern/i386/dl.c: Likewise.
7341 * kern/i386/efi/init.c: Likewise.
7342 * kern/i386/efi/startup.S: Likewise.
7343 * kern/i386/pc/init.c: Likewise.
7344 * kern/i386/pc/lzo1x.S: Likewise.
7345 * kern/i386/pc/startup.S: Likewise.
7346 * kern/ieee1275/ieee1275.c: Likewise.
7347 * kern/powerpc/cache.S: Likewise.
7348 * kern/powerpc/dl.c: Likewise.
7349 * kern/powerpc/ieee1275/cmain.c: Likewise.
7350 * kern/powerpc/ieee1275/crt0.S: Likewise.
7351 * kern/powerpc/ieee1275/init.c: Likewise.
7352 * kern/powerpc/ieee1275/openfw.c: Likewise.
7353 * kern/sparc64/cache.S: Likewise.
7354 * kern/sparc64/dl.c: Likewise.
7355 * kern/sparc64/ieee1275/init.c: Likewise.
7356 * kern/sparc64/ieee1275/openfw.c: Likewise.
7357 * loader/efi/chainloader.c: Likewise.
7358 * loader/efi/chainloader_normal.c: Likewise.
7359 * loader/i386/efi/linux.c: Likewise.
7360 * loader/i386/efi/linux_normal.c: Likewise.
7361 * loader/i386/pc/chainloader.c: Likewise.
7362 * loader/i386/pc/chainloader_normal.c: Likewise.
7363 * loader/i386/pc/linux.c: Likewise.
7364 * loader/i386/pc/linux_normal.c: Likewise.
7365 * loader/i386/pc/multiboot.c: Likewise.
7366 * loader/i386/pc/multiboot_normal.c: Likewise.
7367 * loader/powerpc/ieee1275/linux.c: Likewise.
7368 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
7369 * normal/arg.c: Likewise.
7370 * normal/cmdline.c: Likewise.
7371 * normal/command.c: Likewise.
7372 * normal/completion.c: Likewise.
7373 * normal/execute.c: Likewise.
7374 * normal/function.c: Likewise.
7375 * normal/lexer.c: Likewise.
7376 * normal/main.c: Likewise.
7377 * normal/menu.c: Likewise.
7378 * normal/menu_entry.c: Likewise.
7379 * normal/misc.c: Likewise.
7380 * normal/parser.y: Likewise.
7381 * normal/script.c: Likewise.
7382 * normal/i386/setjmp.S: Likewise.
7383 * normal/powerpc/setjmp.S: Likewise.
7384 * normal/sparc64/setjmp.S: Likewise.
7385 * partmap/acorn.c: Likewise.
7386 * partmap/amiga.c: Likewise.
7387 * partmap/apple.c: Likewise.
7388 * partmap/gpt.c: Likewise.
7389 * partmap/pc.c: Likewise.
7390 * partmap/sun.c: Likewise.
7391 * term/gfxterm.c: Likewise.
7392 * term/terminfo.c: Likewise.
7393 * term/efi/console.c: Likewise.
7394 * term/i386/pc/console.c: Likewise.
7395 * term/i386/pc/serial.c: Likewise.
7396 * term/i386/pc/vesafb.c: Likewise.
7397 * term/i386/pc/vga.c: Likewise.
7398 * term/ieee1275/ofconsole.c: Likewise.
7399 * util/biosdisk.c: Likewise.
7400 * util/console.c: Likewise.
7401 * util/genmoddep.c: Likewise.
7402 * util/getroot.c: Likewise.
7403 * util/grub-emu.c: Likewise.
7404 * util/grub-mkdevicemap.c: Likewise.
7405 * util/grub-probe.c: Likewise.
7406 * util/lvm.c: Likewise.
7407 * util/misc.c: Likewise.
7408 * util/raid.c: Likewise.
7409 * util/resolve.c: Likewise.
7410 * util/update-grub.in: Likewise.
7411 * util/update-grub_lib.in: Likewise.
7412 * util/grub.d/00_header.in: Likewise.
7413 * util/grub.d/10_hurd.in: Likewise.
7414 * util/grub.d/10_linux.in: Likewise.
7415 * util/i386/efi/grub-install.in: Likewise.
7416 * util/i386/efi/grub-mkimage.c: Likewise.
7417 * util/i386/pc/grub-install.in: Likewise.
7418 * util/i386/pc/grub-mkimage.c: Likewise.
7419 * util/i386/pc/grub-mkrescue.in: Likewise.
7420 * util/i386/pc/grub-setup.c: Likewise.
7421 * util/i386/pc/misc.c: Likewise.
7422 * util/powerpc/ieee1275/grub-install.in: Likewise.
7423 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
7424 * util/powerpc/ieee1275/misc.c: Likewise.
7425 * video/bitmap.c: Likewise.
7426 * video/video.c: Likewise.
7427 * video/i386/pc/vbe.c: Likewise.
7428 * video/i386/pc/vbeblit.c: Likewise.
7429 * video/i386/pc/vbefill.c: Likewise.
7430 * video/i386/pc/vbeutil.c: Likewise.
7431 * video/readers/tga.c: Likewise.
7432
3572d015 74332007-07-02 Robert Millan <rmh@aybabtu.com>
7434
7435 * conf/i386-efi.rmk: Replace obsolete reference to
7436 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
7437 with util/getroot.c.
7438 * conf/powerpc-ieee1275.rmk: Likewise.
7439 * conf/sparc64-ieee1275.rmk: Likewise.
7440
7441 * util/grub-emu.c (main): Fix unchecked pointer handling.
7442
2c2a681b 74432007-07-02 Robert Millan <rmh@aybabtu.com>
7444
7445 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
7446 invocation to fail, in order to support partition-less media.
7447
7448 * util/i386/pc/grub-install.in: Likewise.
7449
7450 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
7451 which fs or partmap modules are needed (akin to its sister scripts).
7452
7453 Also use grub-probe to get rid of unportable /proc/mounts check.
7454
7455 Print the same informational message that the other scripts do, before
fe6b695a 7456 exiting.
2c2a681b 7457
6193defe 74582007-06-23 Robert Millan <rmh@aybabtu.com>
7459
fe6b695a 7460 * util/update-grub_lib.in (font_path): New function. Determine whether
6193defe 7461 a font file can be found and, if so, echo the GRUB path to it.
7462
7463 * util/update-grub.in: Handle multiple terminals depending on user
7464 input, platform availability and font file presence. Propagate
7465 variables of our findings to /etc/grub.d/ children.
7466
7467 * util/grub.d/00_header.in: Handle multiple terminals, based on
7468 environment setup by update-grub.
7469
eface1dc 74702007-06-23 Robert Millan <rmh@aybabtu.com>
7471
ba50d28f 7472 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 7473
bf697e28 74742007-06-21 Robert Millan <rmh@aybabtu.com>
7475
7476 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
7477 indicate end of data section in kernel image.
7478 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
7479 GRUB_KERNEL_MACHINE_DATA_END.
7480
7481 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
7482 space for it.
7483 * kern/i386/efi/startup.S: Likewise.
7484
7485 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
7486 during image generation. Implement --prefix option to override this
7487 patch.
7488 * util/i386/efi/grub-mkimage.c: Likewise.
7489
7490 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
7491 code to make path relative to its root into a separate function.
7492
7493 * util/i386/pc/grub-install.in: Use newly provided
7494 make_system_path_relative_to_its_root() to convert ${grubdir}, then
7495 pass the result to grub-install --prefix.
7496
baa574b4 74972007-06-13 Robert Millan <rmh@aybabtu.com>
7498
7499 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
7500 DEFAULT_DEVICE_MAP.
7501 * util/grub-emu.c: Use above definitions from misc.h instead of
7502 defining them.
7503 * util/grub-mkdevicemap.c: Likewise.
7504 * util/i386/pc/grub-setup.c: Likewise.
7505 * util/grub-probe.c: Likewise.
7506 (probe): Abort with grub_util_error() when either
7507 grub_guess_root_device or grub_util_get_grub_dev fails.
7508
0215dcbf 75092007-06-12 Robert Millan <rmh@aybabtu.com>
7510
7511 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
7512 "pager" assignment.
7513 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
7514 "pcdata".
7515 * util/grub-probe.c (probe): Likewise for "drive_name".
7516
8af2ab7b 75172007-06-11 Robert Millan <rmh@aybabtu.com>
7518
7519 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
7520 not just the cdrom one.
7521
59d31694 75222007-06-11 Robert Millan <rmh@aybabtu.com>
7523
7524 * util/i386/pc/grub-mkrescue.in: Add "set -e".
7525 Add --pkglibdir=DIR option to override pkglibdir.
7526 Mention --image-type=TYPE in help output.
7527 Fix --grub-mkimage (it was a no-op).
fe6b695a 7528 Abort gracefully when no parameter is given.
59d31694 7529
7ee367e4 75302007-06-11 Robert Millan <rmh@aybabtu.com>
7531
7532 * util/i386/pc/grub-mkrescue.in: New file.
7533 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
7534 * Makefile.in: Handle bin_SCRIPTS.
7535
29b0ed46 75362007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
7537
7538 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
7539 list of video modes.
7540
c0f90770 75412007-06-06 Robert Millan <rmh@aybabtu.com>
7542
7543 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
7544 file doesn't exist, or if it is in a filesystem grub can't read.
7545
7546 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
7547 not abort if GRUB_DRIVE could not be defined. Rearrange generated
7548 header comment to fit in 80 columns when the variables are resolved.
7549
7550 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
7551 could be identified by update-grub. Remove redundant check for
fe6b695a 7552 unifont.pff existence (since convert_system_path_to_grub_path now
c0f90770 7553 handles that).
7554
fb36dc26 75552007-06-04 Robert Millan <rmh@aybabtu.com>
7556
7557 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
7558
7559 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
7560
7561 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
7562
0c68c93e 75632007-06-04 Robert Millan <rmh@aybabtu.com>
7564
7565 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
7566
7567 * include/grub/partition.h: Declare grub_apple_partition_map_init and
7568 grub_apple_partition_map_fini.
7569
7570 * util/biosdisk.c
7571 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
7572 to access >2 TiB disks).
7573
7574 Print disk->total_sectors with %llu instead of %lu, since this
7575 variable is always 64-bit (prevents wrong disk size from being displayed
7576 on either >2 TiB disk or big-endian CPU).
7577
7578 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
7579 into a generic case that supports all (sane) partition maps.
7580
7581 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
7582 breaks big-endian.
7583
7584 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
7585 and grub_apple_partition_map_fini() after that.
7586
0f23eb74 75872007-06-01 Robert Millan <rmh@aybabtu.com>
7588
7589 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
7590
7591 * util/grub.d/00_header.in: Only enable gfxterm when
7592 convert_system_path_to_grub_path() succeeds.
7593
42c71976 75942007-05-20 Robert Millan <rmh@aybabtu.com>
7595
7596 * util/update-grub_lib.in: New file.
7597 * DISTLIST: Add update-grub_lib.in.
7598 * conf/common.rmk: Generate update-grub_lib and install it in
7599 $(lib_DATA).
7600 * Makefile.in: Add install routine for $(lib_DATA).
7601
7602 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
7603 function provided by update-grub_lib to support arbitrary paths of
7604 unifont.pff.
7605 * util/update-grub.in: Use convert_system_path_to_grub_path() to
7606 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
7607
5beb2291 76082007-05-19 Robert Millan <rmh@aybabtu.com>
7609
7610 * commands/i386/cpuid.c: New module.
7611 * DISTLIST: Add it.
7612 * conf/i386-efi.rmk: Enable cpuid.mod.
7613 * conf/i386-pc.rmk: Likewise.
7614
7262eca1 76152007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7616
7617 * kern/disk.c (grub_disk_read): Check return value of
7618 grub_realloc().
7619
260ba823 76202007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
7621
7622 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
7623 arrays.
7624 * disk/raid.c (grub_raid_open): Likewise.
7625
1ecb6cf2 76262007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7627
7628 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
7629 stack instead of on the heap.
7630
7631 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
7632 before doing a read on it.
7633
7634 * configure.ac: Only use -fno-stack-protector for the target
7635 environment.
f19dbdb7 7636
21c8cbb1 76372007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
7638
7639 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
7640 __attribute_ ((unused)) to mode_type argument.
7641
7642 * util/getroot.c (grub_guess_root_device): Fix #endif.
f19dbdb7 7643
21c8cbb1 7644 * kern/misc.c (memcmp): Fix prototype.
7645
7646 * include/grub/partition.h [GRUB_UTIL]
7647 (grub_gpt_partition_map_init): Add prototype.
7648 (grub_gpt_partition_map_fini): Likewise.
7649
7650 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
7651 at the right place.
7652
7653 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
7654 (grub_fat_read_data): Likewise.
7655 (grub_fat_find_dir): Likewise.
7656
7657 * font/manager.c (find_glyph): Make table a const.
7658 (grub_font_get_glyph): Remove bitmap from if statement.
f19dbdb7 7659
849d55d3 76602007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
7661
7662 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
7663 code, first search for device in /dev/mapper, then in /dev.
7664 (grub_util_get_grub_dev): New function.
7665 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
7666 prototype.
7667 * util/grub-probe.c (probe): Remove check for RAID, call
7668 grub_util_get_grub_dev() instead of
7669 grub_util_biosdisk_get_grub_dev().
7670 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
7671 grub_util_biosdisk_get_grub_dev().
7672 * util/i386/pc/grub-setup.c (main): Likewise.
7673
8fff7c2f 76742007-05-16 Robert Millan <rmh@aybabtu.com>
7675
7676 * DISTLIST: Update for the latest changes.
7677 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
7678 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
7679 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
7680 grub/util/biosdisk.h.
7681 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
7682 grub/util/biosdisk.h.
7683
48e12b52 76842007-05-16 Robert Millan <rmh@aybabtu.com>
7685
7686 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
7687
46b9d128 76882007-05-16 Robert Millan <rmh@aybabtu.com>
7689
7690 * util/i386/efi/grub-install.in: New.
7691 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
7692 newly added grub-install.
7693 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
7694 include.
7695 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
7696 grub/util/biosdisk.h.
7697 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
7698 grub/util/biosdisk.h.
7699
2d1a40a9 77002007-05-16 Robert Millan <rmh@aybabtu.com>
7701
7702 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
7703 * include/grub/util/biosdisk.h: ... here.
7704 * util/i386/pc/biosdisk.c: Moved to ...
7705 * util/biosdisk.c: ... here.
7706 * util/i386/pc/getroot.c: Moved to ...
7707 * util/getroot.c: ... here.
7708 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
7709 * util/grub-mkdevicemap.c: ... here.
7710 * util/i386/pc/grub-probe.c: Moved to ...
7711 * util/grub-probe.c: ... here.
7712
9e26e3bc 77132007-05-15 Robert Millan <rmh@aybabtu.com>
7714
7715 * util/update-grub.in: Remove duplicated line in grub.cfg header
7716 message.
7717
57f96397 77182007-05-13 Robert Millan <rmh@aybabtu.com>
7719
7720 * util/update-grub.in: Fix a few assumptions about the devices holding
7721 /, /boot and /boot/grub being the same.
7722 * util/grub.d/00_header.in: Likewise.
7723 * util/grub.d/10_hurd.in: Likewise.
7724 * util/grub.d/10_linux.in: Likewise.
7725
7726 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
7727 patterns. Use that to define the `.old' suffix as older than `'.
7728
7729 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
7730
7731 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
7732 the grub.cfg header message.
7733
2e610d62 77342007-05-11 Robert Millan <rmh@aybabtu.com>
7735
7736 * util/update-grub.in: Create device.map if it doesn't already exist,
7737 before attempting to run grub-probe.
7738 Check for grub-probe and grub-mkdevicemap with the same code
7739 grub-install is using.
7740 Remove test mode.
7741
3f6a10ef 77422007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
7743
7744 * Makefile.in: Add the datarootdir autoconf variable.
7745
02e7b75e 77462007-05-09 Robert Millan <rmh@aybabtu.com>
7747
7748 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
f19dbdb7 7749 fail gracefully if dev->disk->partition == NULL.
02e7b75e 7750
75f396cc 77512007-05-07 Robert Millan <rmh@aybabtu.com>
7752
7753 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
7754 determine partition map module.
7755 * util/i386/pc/grub-install.in: Use this feature to decide which
7756 partition module to load, instead of hardcoding pc and gpt.
7757
da65cb36 77582007-05-07 Robert Millan <rmh@aybabtu.com>
7759
7760 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
7761 source directory differs from build directory.
7762
b57d6a91 77632007-05-05 Robert Millan <rmh@aybabtu.com>
7764
7765 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
7766 initialisation.
7767
509d00f1 77682007-05-05 Robert Millan <rmh@aybabtu.com>
7769
7770 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
7771
c48f23ef 77722007-05-05 Robert Millan <rmh@aybabtu.com>
7773
7774 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
7775 command-line arguments via ${GRUB_CMDLINE_LINUX}.
7776
20b97658 77772007-05-05 Robert Millan <rmh@aybabtu.com>
7778
7779 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
7780 (grub_probe_SOURCES): Likewise.
7781 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
7782 GPT and initialize dos_part and bsd_part accordingly.
7783 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
7784 install_bsd_part.
7785 (main): Activate gpt module for use during partition identification,
7786 and deactivate it afterwards.
7787 * util/i386/pc/grub-install.in: Add gpt module to core.img.
7788 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
7789 partition identification, and deactivate it afterwards.
7790
99123174 77912007-05-05 Robert Millan <rmh@aybabtu.com>
7792
7793 * term/i386/pc/console.c (grub_console_fini): Call
7794 grub_term_set_current() before grub_term_unregister().
7795
ebd97f6e 77962007-05-04 Robert Millan <rmh@aybabtu.com>
7797
7798 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
7799 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
7800 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
7801 and update-grub_DATA.
7802 * conf/common.rmk: Build and install update-grub components.
7803 * conf/common.mk: Regenerate.
7804 * util/update-grub.in: New. Core of update-grub.
7805 * util/grub.d/00_header.in: New. Generates grub.cfg header.
7806 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
7807 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
7808 * util/grub.d/README: New. Document grub.d directory layout.
7809
b06a264d 78102007-05-01 Robert Millan <rmh@aybabtu.com>
7811
7812 * util/grub-emu.c: Move initialization functions
7813 grub_util_biosdisk_init() and grub_init_all() before
7814 grub_util_biosdisk_get_grub_dev(), which relies on them.
7815
41f0050e 78162007-04-19 Robert Millan <rmh@aybabtu.com>
7817
7818 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
7819 it is used later.
7820
04582bb3 78212007-04-18 Jerone Young <jerone@gmail.com>
7822
f19dbdb7 7823 * kernel/elf.c: Add missing parenthesis for conditional statement
04582bb3 7824 stanza.
7825
08db4632 78262007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 7827
08db4632 7828 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
7829 continue on and look for device node with real device name.
7830
801b76be 78312007-04-10 Jerone Young <jerone@gmail.com>
f19dbdb7 7832
fe6b695a 7833 * configure.ac: Add argument for autoconf to use transformation
1d543c3e 7834 ability.
7835 * Makefile.in: Add autoconf package transformation code.
7836 * util/i386/pc/grub-install.in: Likewise.
7837 * util/powerpc/ieee1275/grub-install.in: Likewise.
7838
6795c4e1 78392007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
7840
7841 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
7842 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
7843 (EXT2_REVISION): Likewise.
7844 (EXT2_INODE_SIZE): Likewise.
7845 (struct grub_ext2_block_group): Added a missing member
7846 "used_dirs".
7847 (grub_ext2_read_inode): Divide by the inode size in a superblock
7848 instead of 128 to obtain INODES_PER_BLOCK.
7849 Use the macro EXT2_INODE_SIZE instead of directly using
7850 SBLOCK->INODE_SIZE.
7851
d70af616 78522007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
7853
7854 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
7855 superblock instead of the structure size to compute an
7856 offset. This fixes the problem that GRUB could not read a
7857 filesystem when inode size is different from 128-byte.
7858
3b801603 78592007-03-05 Marco Gerards <marco@gnu.org>
7860
7861 * normal/main.c (read_config_file): When "menu" is not set, create
7862 an initial context.
7863
4785bfe4 78642007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7865
7866 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
7867 (HEAP_LIMIT): New macro.
7868 (grub_claim_heap): Claim memory up to `heaplimit'.
7869
a0cbb023 78702007-02-21 Hollis Blanchard <hollis@penguinppc.org>
7871
7872 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
7873 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
7874 (_start): Likewise.
7875 (grub_arch_modules_addr): Return address after `_end'.
7876 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
7877 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
7878 (add_segments): Calculate `_end' from phdr size and location.
7879 (ALIGN_UP): Moved to ...
7880 * include/grub/misc.h: here.
7881 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
7882 New macro.
7883 (GRUB_IEEE1275_MODULE_BASE): Removed.
7884
fd7d8eba 78852007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7886
7887 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
7888 loop boundary.
7889
9b09e6fc 78902007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7891
7892 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
7893 All users updated.
7894 (grub_elf64_load_hook_t): Likewise.
7895 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
7896 debug output.
7897
3ce27299 78982007-02-20 Hollis Blanchard <hollis@penguinppc.org>
7899
7900 * kern/mm.c: Update copyright.
7901 (grub_mm_debug): Correct syntax error.
7902 (grub_mm_dump_free): New function.
7903 (grub_debug_free): Call `grub_free'.
7904 * include/grub/mm.h: Update copyright.
7905 (grub_mm_dump_free): Add declaration.
7906
077d5fee 79072007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7908
7909 * include/grub/ieee1275/ieee1275.h: Update copyright.
7910 * kern/powerpc/ieee1275/init.c: Likewise.
7911 * kern/powerpc/ieee1275/openfw.c: Likewise.
7912
7913 * loader/powerpc/ieee1275/linux.c: Likewise.
7914 * include/grub/elfload.h: Likewise.
7915 * kern/elf.c: Likewise.
7916 (grub_elf32_load): Pass `base' and `size' parameters. Update all
7917 callers.
7918 (grub_elf64_load): Likewise.
7919 (grub_elf32_load_segment): Move to a nested function.
7920 (grub_elf64_load_segment): Likewise.
7921
dc946850 79222007-02-12 Hollis Blanchard <hollis@penguinppc.org>
7923
7924 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
7925 prototype.
7926 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
7927 (grub_heap_len): Likewise.
7928 (HEAP_SIZE): New macro.
7929 (grub_claim_heap): New function.
7930 (grub_machine_init): Don't claim heap directly. Call
7931 `grub_claim_heap'.
7932 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
7933 (grub_available_iterate): New function.
7934
baa2a121 79352007-02-03 Thomas Schwinge <tschwinge@gnu.org>
7936
7937 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
7938 * configure.ac: Use it for testing the HOST and TARGET compilers.
7939
4fe9862e 79402006-12-13 Thomas Schwinge <tschwinge@gnu.org>
7941
7942 * Makefile.in (enable_grub_emu): New variable.
7943 * configure.ac (--enable-grub-emu): New option.
7944 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
7945 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
7946 * conf/i386-pc.rmk: Likewise.
7947 * conf/powerpc-ieee1275.rmk: Likewise.
7948 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
7949
a8aa5762 79502006-12-12 Marco Gerards <marco@gnu.org>
7951
7952 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
7953
7954 * kern/env.c (grub_env_unset): Don't free the member `value' when
7955 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
7956 pointer.
7957
7958 * normal/main.c (current_menu): Removed.
7959 (free_menu): Unset the `menu' environment variable.
7960 (grub_normal_menu_addentry): Make use of the environment variable
7961 `menu', instead of using the global `current_menu'. Allocate
7962 memory for the sourcecode of this entry.
7963 (read_config_file): New argument `nested', changed all callers.
7964 Only in the case of a new context, initialize a new menu. Set the
7965 `menu' environment variable.
7966 (grub_normal_execute): Don't set and unset the environment
7967 variable `menu' here anymore. Only free the menu when leaving the
7968 context.
7969
7970 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
7971 leak.
7972
957b3a3e 79732006-12-11 Marco Gerards <marco@gnu.org>
7974
7975 * normal/menu_entry.c (run): Fix off by one bug so the last line
7976 is executed. Move the loader check to outside the loop.
7977
ef875714 79782006-12-08 Hollis Blanchard <hollis@penguinppc.org>
7979
7980 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
7981
4e739985 79822006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
7983
7984 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
7985 the number of sectors. Reported by Andrey Shuvikov
7986 <mr_hyro@yahoo.com>.
f19dbdb7 7987
790707f2 79882006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
7989
7990 * kern/disk.c (grub_disk_read): When there is a read error, always
7991 try to read only the necessary data.
f19dbdb7 7992
790707f2 7993 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
7994 disk/raid.c.
7995 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
7996 prototype.
7997 [GRUB_UTIL] (grub_raid_fini): Likewise.
7998 [GRUB_UTIL] (grub_lvm_init): Likewise.
f19dbdb7 7999 [GRUB_UTIL] (grub_lvm_fini): Likewise.
790707f2 8000 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
8001 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
8002 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
8003 and grub_raid_fini().
f19dbdb7 8004
03e58196 80052006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
8006
8007 * include/grub/types.h (__unused): Rename to UNUSED.
8008 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
8009 (grub_elf64_size): Likewise.
f19dbdb7 8010
ae4f23bf 80112006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8012
8013 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
8014 grub_error_push and grub_error_pop in the error-handling path.
8015 (grub_elf32_load_segment): Only call grub_file_read with non-zero
8016 length.
8017
2166cc83 80182006-11-03 Hollis Blanchard <hollis@penguinppc.org>
8019
8020 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
8021 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8022 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8023 (kernel_elf_SOURCES): Likewise.
8024 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
8025 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
8026 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8027 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
8028 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
8029 (elf_mod_SOURCES): New variable.
8030 (elf_mod_CFLAGS): Likewise.
8031 (elf_mod_LDFLAGS): Likewise.
8032 * include/grub/types.h (__unused): New macro.
8033 * include/grub/elfload.h: New file.
8034 * kern/elf.c: Likewise.
8035 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
8036 (ELF32_LOADMASK): New macro.
8037 (ELF64_LOADMASK): Likewise.
8038 (vmlinux): Removed.
8039 (grub_linux_load32): New function.
8040 (grub_linux_load64): Likewise.
8041 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
8042 Use grub_elf_t instead of grub_file_t.
8043
a09d5aa5 80442006-11-02 Hollis Blanchard <hollis@penguinppc.org>
8045
8046 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
8047 `catch_result' to struct set_color_args.
8048
d976fc51 80492006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
8050
8051 * normal/menu.c: Include grub/script.h.
8052 * normal/menu_entry.c: Likewise.
8053 * include/grub/normal.h: Do not include grub/script.h.
8054
67507549 80552006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8056
8057 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
8058
69203a99 80592006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8060
8061 * kern/disk.c (grub_disk_open): Print debug messages when opening a
8062 disk.
8063 (grub_disk_close): Print debug messages when closing a disk.
8064 (grub_disk_read): Print debug messages when disk read fails.
8065 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
8066 filesystem type.
8067 * kern/partition.c: Include misc.h.
8068 (grub_partition_iterate): Print debug messages when detecting
8069 partition type.
8070
e2b8278c 80712006-10-27 Hollis Blanchard <hollis@penguinppc.org>
8072
8073 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
8074 is negative.
8075 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
8076
97b2f2ff 80772006-10-26 Hollis Blanchard <hollis@penguinppc.org>
8078
8079 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
8080 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
8081
6555d655 80822006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
8083
8084 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
8085 instead of sizeof(lv). Patch by Michael Guntsche.
8086
4d42b77f 80872006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
8088
8089 * disk/lvm.c: Rename VGS to VG_LIST.
8090 (grub_lvm_iterate): Change VGS->LV to VG-LV.
8091 (grub_lvm_open): Likewise.
8092 Thanks to Michael Guntsche for finding this bug.
8093
5d74d927 80942006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
8095
8096 * configure.ac (AC_INIT): Bumped to 1.95.
8097
a1bb27e4 80982006-10-14 Robert Millan <rmh@aybabtu.com>
8099
8100 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
8101 with "/dev/.static/dev/md".
8102
e0994b8b 81032006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
8104
8105 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
8106 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
8107 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
8108 DRIVE_NAME are always freed.
8109
8110 * util/i386/pc/biosdisk.c (make_device_name): Add one into
8111 DOS_PART, as a DOS partition is counted from one instead of zero
8112 now. Reported by Robert Millan.
8113
ddd5cee9 81142006-10-14 Robert Millan <rmh@aybabtu.com>
8115
8116 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
8117 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
8118 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
8119 string returned by grub_guess_root_device.
8120 * util/i386/pc/grub-setup.c: Likewise.
8121 * util/i386/pc/grub-probefs.c: Likewise.
8122
8123 * util/i386/pc/grub-probefs.c: Rename to ...
8124 * util/i386/pc/grub-probe.c: ... this.
8125 * DISTLIST: Remove grub-probefs, add grub-probe.
8126 * conf/i386-efi.rmk: Likewise.
8127 * conf/i386-pc.rmk: Likewise.
8128 * util/i386/pc/grub-install.in: Likewise.
8129
8130 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
8131 choose which information we want to print.
8132
2b002173 81332006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
8134
8135 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
8136 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
8137 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
8138 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
8139 video/readers/tga.c and video/i386/pc/vbeutil.c.
8140
81412006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
8142
8143 Added support for RAID and LVM.
f19dbdb7 8144
2b002173 8145 * disk/lvm.c: New file.
8146 * disk/raid.c: Likewise.
8147 * include/grub/lvm.h: Likewise.
f19dbdb7 8148 * include/grub/raid.h: Likewise.
2b002173 8149 * include/grub/util/lvm.h: Likewise.
8150 * include/grub/util/raid.h: Likewise.
8151 * util/lvm.c: Likewise.
8152 * util/raid.c: Likewise.
8153
8154 * include/grub/disk.h (grub_disk_dev_id): Add
8155 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
8156 (grub_disk_get_size): New prototype.
8157 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
8158 returns a partition.
8159 (grub_disk_get_size): New function.
f19dbdb7 8160
2b002173 8161 * kern/i386/pc/init.c (make_install_device): Copy the prefix
8162 verbatim if grub_install_dos_part is -2.
8163
8164 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
8165 and LVM devices.
8166
8167 * util/i386/pc/grub-setup.c (setup): New argument
8168 MUST_EMBED. Force embedding of GRUB when the argument is
8169 true. Close FILE before returning.
8170 (main): Add support for RAID and LVM.
f19dbdb7 8171
2b002173 8172 * conf/common.rmk: Add RAID and LVM modules.
8173 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
8174 util/lvm.c.
8175 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
8176
8177 * kern/misc.c (grub_strstr): New function.
8178 * include/grub/misc.h (grub_strstr): New prototype.
8179
050548d0 81802006-10-10 Tristan Gingold <tristan.gingold@bull.net>
8181
8182 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
8183
da849d2d 81842006-10-05 Tristan Gingold <tristan.gingold@bull.net>
8185
8186 * kern/misc.c (grub_strtoull): Guess the base only if not
8187 specified.
8188
97b2f2ff 81892006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 8190
8191 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
8192 PowerMac support.
8193
97b2f2ff 81942006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 8195
8196 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
8197
8198 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
8199 Remove `flags' argument. All callers changed.
8200 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
8201 (IEEE1275_IHANDLE_INVALID): New variable.
8202 (IEEE1275_CELL_INVALID): New variable.
8203 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
8204 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
8205 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
8206 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
8207 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
8208 codes from Open Firmware. All callers updated.
8209 (grub_ieee1275_next_property): Directly return Open Firmware return
8210 code.
8211 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8212 Standardize error checking from `grub_ieee1275_get_property'.
8213 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
8214 `devalias' to `aliases'. Correct comments. Consolidate error paths.
8215
97b2f2ff 82162006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 8217
8218 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
8219 `instance_to_package_args' to `instance_to_path_args'.
8220
8221 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
8222 `grub_ieee1275_chosen'.
8223
8224 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
8225 `grub_ieee1275_interpret'.
8226
97b2f2ff 82272006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 8228
8229 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
8230
97b2f2ff 82312006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 8232
8233 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
8234 (__cmpdi): Likewise.
8235
8236 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
8237 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
8238 `grub_ssize_t'.
8239
02bb8acc 8240 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 8241
8242 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
8243 to type `grub_ssize_t'.
8244 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
8245
7f9a8531 82462006-09-22 Marco Gerards <marco@gnu.org>
8247
8248 * normal/script.c (grub_script_create_cmdmenu): Skip leading
8249 newlines.
8250
b5ef1102 82512006-09-22 Marco Gerards <marco@gnu.org>
8252
8253 * commands/echo.c: New file.
8254
8255 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
8256
8257 * conf/common.rmk (echo_mod_SOURCES): New variable.
8258 (echo_mod_CFLAGS): Likewise.
8259 (echo_mod_LDFLAGS): Likewise.
8260
2cff3677 82612006-09-22 Marco Gerards <marco@gnu.org>
8262
8263 * normal/main.c (get_line): Malloc memory instead of using
8264 preallocated memory. Removed the arguments `cmdline' and
8265 `max_len'. Updated all callers.
8266
6ba4688b 82672006-09-22 Marco Gerards <marco@gnu.org>
8268
8269 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
8270 (normal_mod_DEPENDENCIES): Likewise.
8271
8272 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
8273 (normal_mod_DEPENDENCIES): Likewise.
8274
8275 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
8276
e02ac02c 82772006-09-22 Johan Rydberg <jrydberg@gnu.org>
8278
8279 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
8280 programs.
8281 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
8282 (normal_mod_DEPENDENCIES): Likewise.
8283 * conf/i386-pc.mk: Regenerate.
8284 * conf/i386-efi.mk: Likewise
8285 * conf/common.mk: Likewise.
8286 * conf/powerpc-ieee1275.mk: Likewise.
8287 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 8288
8d252e44 82892006-09-22 Robert Millan <rmh@aybabtu.com>
8290
8291 Sync with i386 version.
8292 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
8293 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
8294
209bf7ac 82952006-09-21 Robert Millan <rmh@aybabtu.com>
8296
8297 Import from GRUB Legacy (lib/device.c):
8298 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
8299 (init_device_map) [__linux__]: Add support for I2O devices.
8300
6b146090 83012006-09-14 Marco Gerards <marco@gnu.org>
8302
8303 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
8304 `-melf_i386'.
8305
e38600a8 83062006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 8307
8308 * util/i386/pc/grub-install.in: Skip menu.lst when removing
8309 /boot/grub/*.lst.
78fa1790 8310
2952da5d 8311 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 8312
2952da5d 8313 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
8314 before adding it to device.map.
8315
01b82a64 83162006-08-15 Johan Rydberg <jrydberg@gnu.org>
8317
fe6b695a 8318 * genmk.rb: Let GCC generate dependencies the first time it
01b82a64 8319 compiles a file; using the -MD option.
8320 * conf/common.mk: Regenerate.
8321 * conf/i386-pc.mk: Likewise.
8322 * conf/i386-efi.mk: Likewise.
8323 * conf/powerpc-ieee1275.mk: Likewise.
8324 * conf/sparc64-ieee1275.mk: Likewise.
f19dbdb7 8325
1064790d 83262006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
8327
8328 Move the prototypes of grub_setjmp and grub_longjmp to
8329 cpu/setjmp.h, so that each architecture may specify different
8330 attributes.
f19dbdb7 8331
1064790d 8332 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
8333 (grub_longjmp): Likewise.
8334 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
8335 (grub_longjmp): Likewise.
8336 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
8337 (grub_longjmp): Likewise.
8338
8339 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
8340 [!GRUB_UTIL] (grub_longjmp): Removed.
8341
29dda3ed 83422006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
8343
8344 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
8345 "color!" method does not return any value.
8346
ad2a06ed 83472006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8348
8349 * include/grub/bitmap.h: New file.
8350
8351 * include/grub/i386/pc/vbeutil.h: Likewise.
8352
8353 * video/bitmap.c: Likewise.
8354
8355 * video/readers/tga.c: Likewise.
8356
8357 * video/i386/pc/vbeutil.c: Likewise.
8358
8359 * commands/videotest.c: Code cleanup and updated to reflect to new
8360 video API.
8361
8362 * term/gfxterm.c: Likewise.
8363
8364 * video/video.c: Likewise.
8365
8366 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
8367 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
8368 (bitmap_mod_SOURCES): New entry.
8369 (bitmap_mod_CFLAGS): Likewise.
8370 (bitmap_mod_LDFLAGS): Likewise.
8371 (tga_mod_SOURCES): Likewise.
8372 (tga_mod_CFLAGS): Likewise.
8373 (tga_mod_LDFLAGS): Likewise.
8374
8375 * include/grub/video.h (grub_video_blit_operators): New enum type.
8376 (grub_video_render_target): Changed as forward declaration and moved
8377 actual definition to be video driver specific.
8378 (grub_video_adapter.blit_bitmap): Added blitting operator.
8379 (grub_video_adapter.blit_render_target): Likewise.
8380 (grub_video_blit_bitmap): Likewise.
8381 (grub_video_blit_render_target): Likewise.
8382
8383 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
8384 driver specific render target definition.
8385 (grub_video_vbe_map_rgba): Added driver internal helper.
8386 (grub_video_vbe_unmap_color): Updated to use
8387 grub_video_i386_vbeblit_info.
8388 (grub_video_vbe_get_video_ptr): Likewise.
8389
8390 * include/grub/i386/pc/vbeblit.h
8391 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
8392 grub_video_i386_vbeblit_info.
8393 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
8394 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
8395 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
8396 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
8397 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
8398 (grub_video_i386_vbeblit_index_index): Likewise.
8399 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
8400 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
8401 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
8402 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
8403 operator.
8404 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
8405 operator.
8406
8407 * video/i386/pc/vbeblit.c: Updated to reflect changes on
8408 include/grub/i386/pc/vbeblit.h.
8409
8410 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
8411 Updated to use grub_video_i386_vbeblit_info.
8412 (grub_video_i386_vbefill_R8G8B8): Likewise.
8413 (grub_video_i386_vbefill_index): Likewise.
8414 (grub_video_i386_vbefill): Added generic filler.
8415
8416 * video/i386/pc/vbefill.c: Updated to reflect changes on
8417 include/grub/i386/pc/vbefill.h.
8418
8419 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
8420 grub_video_i386_vbeblit_info.
8421 (grub_video_vbe_unmap_color): Likewise.
8422 (grub_video_vbe_blit_glyph): Likewise.
8423 (grub_video_vbe_scroll): Likewise.
8424 (grub_video_vbe_draw_pixel): Removed function.
8425 (grub_video_vbe_get_pixel): Likewise.
8426 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
8427 updated code to use it.
8428 (common_blitter): Added common blitter for render target and bitmap.
8429 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
8430 (grub_video_vbe_blit_render_target): Likewise.
8431
bc8c036d 84322006-07-30 Johan Rydberg <jrydberg@gnu.org>
8433
8434 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
8435 is in text mode if there is no console control protocol instance
8436 available.
8437
684a8eff 84382006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8439
8440 * include/grub/video.h: Code cleanup.
8441
8442 * include/grub/i386/pc/vbe.h: Likewise.
8443
8444 * video/i386/pc/vbe.c: Likewise.
8445
8446 * video/i386/pc/vbeblit.c: Likewise.
8447
8448 * video/i386/pc/vbefill.c: Likewise.
8449
8450 * video/video.c: Likewise. Also added more comments.
8451
5915059b 84522006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
8453
8454 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
8455 (struct grub_biosdisk_dap): Likewise.
8456
8457 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
8458 linkage settings for all functions.
8459
90ce5d56 84602006-07-12 Marco Gerards <marco@gnu.org>
8461
8462 * configure.ac (--enable-mm-debug): Fix typo.
8463
8464 * genkernsyms.sh.in: Use proper quoting for `CC'.
8465
43e7f879 84662006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
8467
8468 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
8469 (normal_mod_ASFLAGS): Remove "-m32".
8470
4889bdec 84712006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
8472
8473 * util/misc.c: Include config.h.
8474 [!HAVE_MEMALIGN]: Do not include malloc.h.
8475 (grub_memalign): Use posix_memalign, if present. Then, use
8476 memalign, if present. Otherwise, emit an error.
8477
8478 * util/grub-emu.c: Do not include malloc.h.
8479
8480 * include/grub/util/misc.h: Include unistd.h. This is required for
8481 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
8482 D. Eades III <hde@foobar-qux.org>.
8483
8484 * configure.ac (AC_GNU_SOURCE): Added.
8485 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
8486 type.
8487
fd39d4da 84882006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
8489
8490 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
8491 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
8492
b786f3b5 84932006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
8494
8495 * include/grub/types.h (grub_host_addr_t): Rename to
8496 grub_target_addr_t.
8497 (grub_host_off_t): Rename to grub_target_off_t.
8498 (grub_host_size_t): Rename to grub_target_size_t.
8499 (grub_host_ssize_t): Rename to grub_target_ssize_t.
8500 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
8501
8502 * include/grub/kernel.h (struct grub_module_header): Change type
8503 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
8504 (grub_module_info): Likewise.
f19dbdb7 8505
051988bb 85062006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8507
8508 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
8509 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
8510 Velazquez <jesus.velazquez@gmail.com>.
8511
deae281b 85122006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
8513
8514 Count partitions from 1 instead of 0 in the string representation
8515 of partitions. Still use 0-based internally.
f19dbdb7 8516
deae281b 8517 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
8518 (sun_partition_map_iterate): Use grub_partition_t instead of
8519 struct grub_partition *. Cast DESC->START_CYLINDER to
8520 grub_uint64_t after converting the endian.
8521 (sun_partition_map_probe): Subtract 1 for PARTNUM.
8522 (sun_partition_map_get_name): Add 1 to P->INDEX.
8523
8524 * partmap/pc.c (grub_partition_parse): Subtract 1 for
8525 PCDATA->DOS_PART.
8526 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
8527
8528 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
8529 zero instead of one.
8530 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
8531 (gpt_partition_map_get_name): Add 1 into P->INDEX.
8532
8533 * partmap/apple.c (apple_partition_map_iterate): Change the type
8534 of POS to unsigned.
8535 (apple_partition_map_probe): Subtract 1 for PARTNUM.
8536 (apple_partition_map_get_name): Add 1 into P->INDEX.
8537
8538 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
8539 of POS to unsigned.
8540 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
8541 calculate the offset of a partition.
8542 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
8543 (amiga_partition_map_get_name): Add 1 into P->INDEX.
8544
8545 * partmap/acorn.c (acorn_partition_map_find): Change the type of
8546 SECTOR to grub_disk_addr_t.
8547 (acorn_partition_map_iterate): Likewise.
8548 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
8549 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
8550 top.
8551 (acorn_partition_map_get_name): Add 1 into P->INDEX.
8552
8553 * kern/i386/pc/init.c (make_install_device): Add 1 into
8554 GRUB_INSTALL_DOS_PART.
8555
8556 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
8557 conditional.
8558
524a1e6a 85592006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8560
8561 Clean up the code to support 64-bit addressing in disks and
8562 files. This change is not enough for filesystems yet.
f19dbdb7 8563
524a1e6a 8564 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
8565 type of "start" to grub_uint64_t.
8566 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
8567 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
8568 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
8569 convert addresses.
8570
8571 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
8572 to grub_disk_addr_t.
8573
8574 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
8575 string.
8576
8577 * partmap/pc.c (pc_partition_map_iterate): Likewise.
8578
8579 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
8580 to char *.
8581
8582 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
8583
8584 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
8585
8586 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
8587
8588 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
8589 to grub_off_t, to detect an error from grub_file_seek.
8590 (grub_multiboot_load_elf32): Likewise.
8591
8592 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
8593 maximum unsigned long value when an overflow is detected.
8594 (grub_strtoull): New function.
8595 (grub_divmod64): Likewise.
8596 (grub_lltoa): use grub_divmod64.
8597
8598 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
8599 grub_disk_addr_t.
8600 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
8601 the pointer to next character. Use grub_strtoull instead of
8602 grub_strtoul.
8603 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
8604 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
8605 respectively.
8606
fe6b695a 8607 * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
524a1e6a 8608 return value is signed.
8609 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
8610 test if OFFSET is less than zero, as OFFSET is unsigned now.
8611
8612 * kern/disk.c (struct grub_disk_cache): Change the type of
8613 "sector" to grub_disk_addr_t.
8614 (grub_disk_cache_get_index): Change the type of SECTOR to
8615 grub_disk_addr_t. Calculate the hash with SECTOR casted to
8616 unsigned after shifting.
8617 (grub_disk_cache_invalidate): Change the type of SECTOR to
8618 grub_disk_addr_t.
8619 (grub_disk_cache_unlock): Likewise.
8620 (grub_disk_cache_store): Likewise.
8621 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
8622 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
8623 grub_disk_addr_t and grub_uint64_t, respectively.
8624 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
8625 body, as the value of OFFSET is tweaked by
8626 grub_disk_check_range. Change the types of START_SECTOR, LEN and
8627 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
8628 respectively.
8629 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
8630 body, as the value of OFFSET is tweaked by
8631 grub_disk_check_range. Change the types of LEN and N to
8632 grub_size_t.
8633
8634 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
8635 and "saved_offset" to grub_off_t.
8636 (test_header): Cast BUF to char *.
8637 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
8638 to char *.
8639 (grub_gzio_read): Change the types of OFFSET and SIZE to
8640 grub_off_t and grub_size_t, respectively.
8641
8642 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
8643 Removed.
8644 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
8645 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
8646 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
8647 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
8648 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
8649
8650 * include/grub/types.h (grub_off_t): Unconditionally set to
8651 grub_uint64_t.
8652 (grub_disk_addr_t): Changed to grub_uint64_t.
8653
8654 * include/grub/partition.h (struct grub_partition): Change the
8655 types of "start", "len" and "offset" to grub_disk_addr_t,
8656 grub_uint64_t and grub_disk_addr_t, respectively.
8657 (grub_partition_get_start): Return grub_disk_addr_t.
8658 (grub_partition_get_len): Return grub_uint64_t.
8659
8660 * include/grub/misc.h (grub_strtoull): New prototype.
8661 (grub_divmod64): Likewise.
8662
8663 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
8664 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
8665 grub_off_t, respectively.
8666 All callers and references changed.
8667
8668 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
8669 grub_size_t in "read".
8670 All callers and references changed.
8671
8672 * include/grub/file.h (struct grub_file): Change the types of
8673 "offset" and "size" to grub_off_t and grub_off_t,
8674 respectively. Change the type of SECTOR to grub_disk_addr_t in
8675 "read_hook".
8676 (grub_file_read): Change the type of LEN to grub_size_t.
8677 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
8678 grub_off_t.
8679 (grub_file_size): Return grub_off_t.
8680 (grub_file_tell): Likewise.
8681 All callers and references changed.
8682
8683 * include/grub/disk.h (struct grub_disk_dev): Change the types of
8684 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
8685 "write".
8686 (struct grub_disk): Change the type of "total_sectors" to
8687 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
f19dbdb7 8688 "read_hook".
524a1e6a 8689 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
8690 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
8691 (grub_disk_write): Likewise.
8692 All callers and references changed.
8693
8694 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
8695 char * for grub_strncmp to silence gcc.
8696 (grub_iso9660_mount): Likewise.
8697 (grub_iso9660_mount): Likewise.
8698 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
8699 return statement.
8700 (grub_iso9660_iterate_dir): Likewise.
8701 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
8702
8703 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
8704 LEN to grub_disk_addr_t and grub_size_t, respectively.
8705
8706 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
8707
8708 * fs/jfs.c (grub_jfs_read_file): Likewise.
8709
8710 * fs/minix.c (grub_jfs_read_file): Likewise.
8711
8712 * fs/sfs.c (grub_jfs_read_file): Likewise.
8713
8714 * fs/ufs.c (grub_jfs_read_file): Likewise.
8715
8716 * fs/xfs.c (grub_jfs_read_file): Likewise.
8717
8718 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
8719 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
8720 respectively.
8721
8722 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
8723 BLKNR to -1 instead of returning GRUB_ERRNO.
8724 (grub_ext2_read_file): Change the types of SECTOR and
8725 LEN to grub_disk_addr_t and grub_size_t, respectively.
8726
8727 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
8728 LEN to grub_disk_addr_t and grub_size_t, respectively.
8729
8730 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
8731 grub_file_read.
8732
8733 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
8734 string. Do not cast SECTOR explicitly.
8735
8736 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
8737 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
8738 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
8739 grub_disk_addr_t and grub_size_t, respectively. If the sector is
8740 over 2TB and LBA mode is not supported, raise an error.
8741 (get_safe_sectors): New function.
8742 (grub_biosdisk_read): Use get_safe_sectors.
8743 (grub_biosdisk_write): Likewise.
8744
8745 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
8746 (grub_efidisk_write): Likewise.
8747
8748 * disk/loopback.c (delete_loopback): Cosmetic changes.
8749 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
8750 correctly.
8751 (grub_loopback_open): Likewise.
8752 (grub_loopback_read): Likewise. Also, change the type of POS to
8753 grub_off_t, and fix the usage of grub_memset.
8754
8755 * commands/i386/pc/play.c: Include grub/machine/time.h.
8756
8757 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
8758 print FILE->SIZE.
8759
8760 * commands/configfile.c: Include grub/env.h.
8761
8762 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
8763 GRUB_ERRNO directly instead. Change the type of POS to
8764 grub_off_t. Follow the coding standard.
8765
8766 * commands/blocklist.c: Include grub/partition.h.
8767 (grub_cmd_blocklist): Return an error if the underlying device is
8768 not a disk. Take the starting sector of a partition into account,
8769 if a partition is used.
8770
8771 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
8772 a length field.
8773 (lba_mode): Support 64-bit addresses.
8774 (chs_mode): Likewise.
8775 (copy_buffer): Adapted to the new offsets of a length field and a
8776 segment field.
8777 (blocklist_default_start): Allocate 64-bit space.
8778
8779 * boot/i386/pc/boot.S (force_lba): Removed.
8780 (boot_drive): Moved to under KERNEL_SECTOR.
fe987087 8781 (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
524a1e6a 8782 space.
8783 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
8784 is useless.
8785 (lba_mode): Refactored to support a 64-bit address. More size
8786 optimization.
8787 (setup_sectors): Likewise.
8788
53af98ad 87892006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
8790
8791 * DISTLIST: Added include/grub/i386/linux.h. Removed
8792 include/grub/i386/pc/linux.h
8793
8794 * configure.ac (AC_INIT): Bumped to 1.94.
8795
8796 * config.guess: Updated from gnulib.
8797 * config.sub: Likewise.
8798 * install-sh: Likewise.
8799 * mkinstalldirs: Likewise.
8800
b4c1940a 88012006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8802
8803 * conf/common.rmk (grub_modules_init.lst): Depended on
8804 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
8805 MODSRCFILES.
8806
8807 * genmk.rb (PModule::rule): Reverted the previous change.
8808
cfca1cfd 88092006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
8810
8811 * conf/common.rmk (grub_modules_init.lst): Depends on
8812 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
8813 that the target does not exist before producing.
8814 (grub_modules_init.h): Remove the target before generating.
8815 (grub_emu_init.c): Likewise.
8816
8817 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
8818
aa6d7826 88192006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
8820
8821 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
8822 for the target-specific tests. Make sure that we also have the
8823 up-to-date target variables for those tests.
8824
26c607b9 88252006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8826
8827 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
8828 (PModule::rule): Likewise.
8829
0162321a 88302006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
8831
8832 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
8833 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
8834 target-specific flags should be prefixed.
8835 (PModule::rule): Likewise.
8836
6c826348 88372006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
8838
8839 * configure.ac (CMP): Check if cmp is available explicitly.
8840
b977bf01 88412006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
8842
8843 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
8844 (target_cpu): New variable.
8845 (pkglibdir): Use target_cpu instead of host_cpu.
f19dbdb7 8846
b977bf01 8847 * util/i386/pc/grub-install.in (host_cpu): Removed.
8848 (target_cpu): New variable.
8849 (pkglibdir): Use target_cpu instead of host_cpu.
8850
8851 * util/genmoddep.c: Removed.
f19dbdb7 8852
b977bf01 8853 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
8854 instead of GRUB_HOST_SIZEOF_VOID_P.
8855 * kern/dl.c: Likewise.
8856
8857 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
8858 ...
8859 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8860 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8861 (GRUB_TARGET_SIZEOF_LONG): ... this.
8862 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8863 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8864 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8865 to ...
8866 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8867 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8868 (GRUB_TARGET_SIZEOF_LONG): ... this.
8869 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8870 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8871 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
8872 to ...
8873 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
8874 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
8875 (GRUB_TARGET_SIZEOF_LONG): ... this.
8876 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
8877 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
8878
8879 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
8880 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
8881 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
8882 instead of GRUB_HOST_SIZEOF_LONG.
8883 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
8884 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
8885 GRUB_CPU_WORDS_BIGENDIAN.
8886 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
8887 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
8888 grub_host_ssize_t.
8889
8890 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
8891 (genmoddep_SOURCES): Likewise.
8892 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
8893 (genmoddep_SOURCES): Likewise.
8894 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
8895 (genmoddep_SOURCES): Likewise.
8896 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
8897 Likewise.
8898 (genmoddep_SOURCES): Likewise.
8899
8900 * genmoddep.awk: New file.
8901
8902 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
8903 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
8904 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
8905 (PModule::rule): Likewise.
8906 (Program::rule): Likewise.
8907 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
8908 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
8909 respectively.
8910
8911 * configure.ac: Rewritten intensively to use host and target
8912 instead of build and host, respectively.
8913
8914 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
8915 (host_cpu): Removed.
8916 (target_cpu): New variable.
8917 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
8918 (BUILD_CC): Removed.
8919 (BUILD_CFLAGS): Likewise.
8920 (BUILD_CPPFLAGS): Likewise.
8921 (TARGET_CC): New variable.
8922 (TARGET_CFLAGS): Likewise.
8923 (TARGET_CPPFLAGS): Likewise.
8924 (TARGET_LDFLAGS): Likewise.
8925 (AWK): Likewise.
8926 (include): Use target_cpu instead of host_cpu.
8927 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
f19dbdb7 8928
b977bf01 8929 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
8930
f09771a1 89312006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
8932
8933 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
8934 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
8935 field 'false' to 'exec_on_false'.
8936 (grub_script_create_cmdif): Renamed argument names to reflect above
8937 changes.
8938
8939 * normal/execute.c (grub_script_execute_cmdif): Likewise.
8940
8941 * normal/script.c (grub_script_create_cmdif): Likewise.
8942
118f4fb3 89432006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
8944
8945 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
8946 top.
8947 (grub_hfsplus_btree_recptr): Likewise.
8948 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
8949 FILEBLOCK both to pass a block number and store next block
8950 number.
8951 (grub_hfsplus_read_block): Rewritten heavily to support an extent
8952 overflow file correctly. Specify errors appropriately, because
8953 fshelp expects that GRUB_ERRNO is set when fails. Reuse
8954 grub_hfsplus_btree_recptr to get the pointer to a found key.
8955 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
8956 is found.
8957
8958 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
8959 linux.mod.
8960 (_linux_mod_SOURCES): New variable.
8961 (_linux_mod_CFLAGS): Likewise.
8962 (_linux_mod_LDFLAGS): Likewise.
8963 (linux_mod_SOURCES): Likewise.
8964 (linux_mod_CFLAGS): Likewise.
8965 (linux_mod_LDFLAGS): Likewise.
8966
8967 * DISTLIST: Added loader/i386/efi/linux.c,
8968 loader/i386/efi/linux_normal.c and
8969 include/grub/i386/efi/loader.h.
8970
8971 * loader/i386/efi/linux.c: New file.
8972 * loader/i386/efi/linux_normal.c: Likewise.
8973 * include/grub/i386/efi/loader.h: Likewise.
8974
89a7d726 89752006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
8976
8977 * commands/blocklist.c: New file.
8978
8979 * DISTLIST: Added commands/blocklist.c.
8980
8981 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 8982 color for the background, and a darker color for the foreground.
89a7d726 8983 (grub_console_checkkey): Return READ_KEY.
8984 (grub_console_cls): Set the background to
8985 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
8986
8987 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
8988
8989 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
8990 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
8991
8992 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
8993 prototype.
8994
8995 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
8996 BG. The spec is wrong again.
8997
8998 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
8999 prototype.
9000 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
9001
9002 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
9003 commands/blocklist.c.
9004 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
f19dbdb7 9005
89a7d726 9006 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
9007 (blocklist_mod_SOURCES): New variable.
9008 (blocklist_mod_CFLAGS): Likewise.
9009 (blocklist_mod_LDFLAGS): Likewise.
9010
75c8f258 90112006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
9012
9013 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
9014 duplication.
9015 (lba_mode): Use %eax more intensively to reduce the code size.
9016
da2eb181 90172006-05-20 Marco Gerards <marco@gnu.org>
9018
9019 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
9020
9021 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
9022 for `menuentry'.
9023 (script): Accept leading newlines.
9024 (newlines): New rule to describe 0 or more newlines.
9025 (commands): Accept `command' with trailing newline. Fixed the
9026 order in which arguments were passed to `grub_script_add_cmd'.
9027 Accept commands separated by newlines.
9028 (function): Changed to accept newlines.
9029 (menuentry) Rewritten.
9030
9031 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
9032 front of the list, instead of to the end.
9033
577b4050 90342006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
9035
9036 * util/i386/pc/grub-install.in (bindir): New variable.
9037 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
9038 Shaver <lbgwjl@gmail.com>.
9039
0d6e1189 90402006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
9041
9042 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
9043 grub/machine/linux.h
9044 * loader/i386/pc/linux.c: Likewise.
9045
9046 * include/grub/i386/pc/linux.h: Moved to ...
9047 * include/grub/i386/linux.h: ... here.
9048
9049 * include/grub/i386/linux.h (struct linux_kernel_params): New
9050 struct.
f19dbdb7 9051
31b86e9f 90522006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
9053
9054 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
9055 checking.
9056 (grub_video_vbe_blit_glyph): Likewise.
9057 (grub_video_vbe_blit_bitmap): Likewise.
9058 (grub_video_vbe_blit_render_target): Likewise.
9059
83b984de 90602006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
9061
9062 * configure.ac (--with-platform): Properly quote the square
9063 brackets.
9064
5f0413bd 90652006-05-08 Marco Gerards <marco@gnu.org>
9066
9067 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
9068 this...
9069 (kernel_elf_HEADERS): ...to this. Updated all users.
9070 (grubof_symlist.c): Renamed from this...
9071 (kernel_elf_symlist.c): ...to this. Updated all users.
9072 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9073 (grubof_SOURCES): Renamed from this...
9074 (kernel_elf_SOURCES): ...to this.
9075 (grubof_HEADERS): Renamed from this...
9076 (kernel_elf_HEADERS): ...to this.
9077 (grubof_CFLAGS): Renamed from this...
9078 (kernel_elf_CFLAGS): ...to this.
9079 (grubof_ASFLAGS): Renamed from this...
9080 (kernel_elf_ASFLAGS): ...to this.
9081 (grubof_LDFLAGS): Renamed from this...
9082 (kernel_elf_LDFLAGS): ...to this.
9083
9084 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
9085 this...
9086 (kernel_elf_HEADERS): ...to this. Updated all users.
9087 (grubof_symlist.c): Renamed from this...
9088 (kernel_elf_symlist.c): ...to this. Updated all users.
9089 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
9090 (grubof_SOURCES): Renamed from this...
9091 (kernel_elf_SOURCES): ...to this.
9092 (grubof_HEADERS): Renamed from this...
9093 (kernel_elf_HEADERS): ...to this.
9094 (grubof_CFLAGS): Renamed from this...
9095 (kernel_elf_CFLAGS): ...to this.
9096 (grubof_ASFLAGS): Renamed from this...
9097 (kernel_elf_ASFLAGS): ...to this.
9098 (grubof_LDFLAGS): Renamed from this...
9099 (kernel_elf_LDFLAGS): ...to this.
9100
9101 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
9102 `kernel.elf' instead of `grubof'.
9103
05568c2e 91042006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
9105
9106 Add --with-platform to configure. Use pkglibdir instead of
9107 pkgdatadir. This is reported by Roger Leigh.
9108
9109 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
9110 (host_vendor): Likewise.
9111 (host_os): Likewise.
9112 (pkgdatadir): Likewise.
9113 (platform): New variable.
9114 (pkglibdir): Likewise.
9115 Use PKGLIBDIR instead of PKGDATADIR.
f19dbdb7 9116
05568c2e 9117 * util/i386/pc/grub-install.in (datadir): Removed.
9118 (host_vendor): Likewise.
9119 (host_os): Likewise.
9120 (pkgdatadir): Likewise.
9121 (platform): New variable.
9122 (pkglibdir): Likewise.
9123 Use PKGLIBDIR instead of PKGDATADIR.
9124
9125 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
9126 instead of GRUB_DATADIR.
9127 (main): Likewise.
9128 * util/i386/pc/grub-mkimage.c (usage): Likewise.
9129 (main): Likewise.
9130 * util/i386/efi/grub-mkimage.c (usage): Likewise.
9131 (main): Likewise.
9132
9133 * configure.ac (--with-platform): New option.
9134 Use PLATFORM instead of HOST_VENDOR to specify a platform.
9135
9136 * Makefile.in: Include a makefile based on PLATFORM instead of
9137 HOST_VENDOR.
9138 (pkgdatadir): Not appended by the machine type.
9139 (pkglibdir): Appended by the machine type.
9140 (host_vendor): Removed.
9141 (platform): New variable.
9142 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
9143 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
9144 (uninstall): Likewise.
9145
4e93851c 91462006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
9147
9148 Use the environment context in the menu. Remove the commands
9149 "default" and "timeout", and use variables instead.
f19dbdb7 9150
4e93851c 9151 * normal/menu.c: Include grub/env.h.
9152 (print_entry): Cast TITLE to silence gcc.
9153 (get_timeout): New function.
9154 (set_timeout): Likewise.
9155 (get_entry_number): Likewise.
9156 (run_menu): Use a default entry, a fallback entry and a timeout
9157 in the environment variables "default", "fallback" and
9158 "timeout". Also, tweak the default entry if it is not within the
9159 current menu entries.
9160 (grub_menu_run): Use a fallback entry in the environment variable
9161 "fallback".
9162
9163 * normal/main.c (read_config_file): Do not initialize
9164 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
9165 NEWMENU->TIMEOUT.
9166 (grub_normal_execute): Use a data slot to store the menu.
9167
9168 * include/grub/normal.h (struct grub_menu): Removed default_entry,
9169 fallback_entry and timeout.
9170 (struct grub_menu_list): Removed.
9171 (grub_menu_list_t): Likewise.
9172 (struct grub_context): Likewise.
9173 (grub_context_t): Likewise.
9174 (grub_context_get): Likewise.
9175 (grub_context_get_current_menu): Likewise.
9176 (grub_context_push_menu): Likewise.
9177 (grub_context_pop_menu): Likewise.
9178 (grub_default_init): Likewise.
9179 (grub_default_fini): Likewise.
9180 (grub_timeout_init): Likewise.
9181 (grub_timeout_fini): Likewise.
9182
9183 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
9184 and timeout.mod.
9185 (normal_mod_SOURCES): Removed normal/context.c.
9186
9187 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
9188 commands/default.c, commands/timeout.c and normal/context.c.
9189 (normal_mod_SOURCES): Removed normal/context.c.
9190
9191 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
9192 commands/timeout.c and normal/context.c.
9193 (normal_mod_SOURCES): Removed normal/context.c.
9194
9195 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
9196 commands/default.c, commands/timeout.c and normal/context.c.
9197 (normal_mod_SOURCES): Removed normal/context.c.
9198
9199 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
9200 timeout.mod.
9201 (default_mod_SOURCES): Removed.
9202 (default_mod_CFLAGS): Likewise.
9203 (default_mod_LDFLAGS): Likewise.
9204 (timeout_mod_SOURCES): Removed.
9205 (timeout_mod_CFLAGS): Likewise.
9206 (timeout_mod_LDFLAGS): Likewise.
9207
9208 * DISTLIST: Removed commands/default.c, commands/timeout.c and
9209 normal/context.c.
9210
9211 * commands/default.c: Removed.
9212 * commands/timeout.c: Likewise.
9213 * normal/context.c: Likewise.
9214
1eb9cc1d 92152006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
9216
9217 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
9218
385bd9c1 92192006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
9220
9221 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
9222 "next" to "prev" for readability.
9223 (struct grub_env_sorted_var): New struct.
9224 (grub_env_context): Renamed to ...
9225 (initial_context): ... this.
9226 (grub_env_var_context): Renamed to ...
9227 (current_context): ... this.
9228 (grub_env_find): Look only at CURRENT_CONTEXT.
9229 (grub_env_context_open): Rewritten to copy exported variables from
9230 previous context.
9231 (grub_env_context_close): Rewritten according to the new
9232 scheme. Also, add an assertion to prevent the initial context from
9233 removed.
9234 (grub_env_insert): Removed the code for the sorted list.
9235 (grub_env_remove): Likewise.
9236 (grub_env_export): Simply mark the variable with
9237 GRUB_ENV_VAR_GLOBAL.
9238 (grub_env_set): A cosmetic change for naming consistency.
9239 (grub_env_get): Likewise.
9240 (grub_env_unset): Likewise.
9241 (grub_env_iterate): Rewritten to sort variables within this
9242 function.
9243 (grub_register_variable_hook): Fixed for naming consistency. Call
9244 grub_env_find again, only if NAME is not found at the first time.
9245 (mangle_data_slot_name): New function.
9246 (grub_env_set_data_slot): Likewise.
9247 (grub_env_get_data_slot): Likewise.
9248 (grub_env_unset_data_slot): Likewise.
9249
9250 * include/grub/env.h (grub_env_var_type): New enum.
9251 (GRUB_ENV_VAR_LOCAL): New constant.
9252 (GRUB_ENV_VAR_GLOBAL): Likewise.
9253 (GRUB_ENV_VAR_DATA): Likewise.
9254 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
9255 "type".
9256 (grub_env_set): Replace VAR with NAME for consistency.
9257 (grub_register_variable_hook): Likewise.
9258 (grub_env_export): Specify the name of the argument.
9259 (grub_env_set_data_slot): New prototype.
9260 (grub_env_get_data_slot): Likewise.
9261 (grub_env_unset_data_slot): Likewise.
9262
7f362539 92632006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
9264
9265 Extend the loader so that GRUB can accept a loader which comes
9266 back to GRUB when a loaded image exits. Also, this change adds
9267 support for a chainloader on EFI.
f19dbdb7 9268
7f362539 9269 * term/efi/console.c: Include grub/misc.h.
9270 (grub_console_checkkey): Display a scan code on the top for
9271 debugging. This will be removed once the EFI port gets stable.
9272 Correct the scan code mapping.
9273
9274 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
9275 allocate memory from larger regions, in order to reduce the number
9276 of allocated regions. Otherwise, the MacOSX loader panics.
9277 (filter_memory_map): Avoid less than 1MB for compatibility with
9278 other loaders.
9279 (add_memory_regions): Allocate from the tail of a region, if
9280 possible, to avoid allocating a region near to 1MB, for the MacOSX
9281 loader.
9282
9283 * kern/efi/init.c (grub_efi_set_prefix): Specify
9284 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
9285
9286 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
9287 argument IMAGE_HANDLE and specify it to get a loaded image.
9288 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
9289 grub_efi_get_loaded_image.
fe6b695a 9290 (grub_efi_get_filename): Divide the length by the size of
7f362539 9291 grub_efi_char16_t.
9292 (grub_efi_get_device_path): New function.
9293 (grub_efi_print_device_path): Print End Device Path nodes. Divide
9294 the length by the size of grub_efi_char16_t for a file path device
9295 path node.
9296
9297 * kern/loader.c (grub_loader_noreturn): New variable.
9298 (grub_loader_set): Accept a new argument NORETURN. Set
9299 GRUB_LOADER_NORETURN to NORETURN.
9300 All callers changed.
9301 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
9302 grub_machine_fini.
9303
9304 * include/grub/efi/efi.h (grub_efi_get_device_path): New
9305 prototype.
9306 (grub_efi_get_loaded_image): Take an argument to specify an image
9307 handle.
9308
9309 * include/grub/loader.h (grub_loader_set): Added one more argument
9310 NORETURN.
9311
9312 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
9313 instead of grub_efi_open_protocol.
9314 (grub_efidisk_get_device_name): Likewise.
9315 (grub_efidisk_close): Print a newline.
9316 (grub_efidisk_get_device_handle): Fixed to use
9317 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
9318 GRUB_EFI_DEVICE_PATH_TYPE.
9319
9320 * disk/efi/efidisk.c (device_path_guid): Moved to ...
9321 * kern/efi/efi.c (device_path_guid): ... here.
9322
9323 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
9324 chain.mod.
9325 (kernel_mod_HEADERS): Added efi/disk.h.
9326 (_chain_mod_SOURCES): New variable.
9327 (_chain_mod_CFLAGS): Likewise.
9328 (_chain_mod_LDFLAGS): Likewise.
9329 (chain_mod_SOURCES): Likewise.
9330 (chain_mod_CFLAGS): Likewise.
9331 (chain_mod_LDFLAGS): Likewise.
9332
9333 * DISTLIST: Added include/grub/efi/chainloader.h,
9334 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
9335
9336 * include/grub/efi/chainloader.h: New file.
9337 * loader/efi/chainloader.c: Likewise.
9338 * loader/efi/chainloader_normal.c: Likewise.
9339
c0111d6e 93402006-04-30 Marco Gerards <marco@gnu.org>
9341
9342 * commands/configfile.c (grub_cmd_source): New function.
9343 (GRUB_MOD_INIT): Register the commands `source' and `.'.
9344 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
9345
df5341da 93462006-04-30 Marco Gerards <marco@gnu.org>
9347
9348 * normal/execute.c (grub_script_execute_cmd): Change the return
9349 type to `grub_err_t'. Correctly return the error.
9350 (grub_script_execute_cmdline): In case a command line is not a
9351 command or a function, try to interpret it as an assignment.
9352
f85934bd 93532006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
9354
9355 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
9356 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
9357 skip a node whose name is obviously invalid as UTF-16,
9358 i.e. contains a NUL character. Stop the iteration when the last
9359 directory entry is found. Instead of using the return value of
9360 grub_hfsplus_btree_iterate_node, store the value in RET and use
9361 it, because the iterator can be stopped by the last directory
9362 entry.
9363
8f8a2cf8 93642006-04-30 Marco Gerards <marco@gnu.org>
9365
9366 * include/grub/env.h (grub_env_export): New prototype. Reported
9367 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
9368
a27e84ce 93692006-04-30 Marco Gerards <marco@gnu.org>
9370
9371 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
9372 size of the extents in a catalog file record.
9373
eaef0553 93742006-04-29 Marco Gerards <marco@gnu.org>
9375
9376 * commands/configfile.c (grub_cmd_configfile): Execute the
9377 configfile within its own context.
9378
9379 * include/grub/env.h (grub_env_context_open): New prototype.
9380 (grub_env_context_close): Likewise.
9381
9382 * kern/env.c (grub_env): Removed.
9383 (grub_env_sorted): Likewise.
9384 (grub_env_context): New variable.
9385 (grub_env_var_context): Likewise.
9386 (grub_env_find): Search both the active context and the global
9387 context.
9388 (grub_env_context_open): New function.
9389 (grub_env_context_close): Likewise.
9390 (grub_env_insert): Likewise.
9391 (grub_env_remove): Likewise.
9392 (grub_env_export): Likewise.
9393 (grub_env_set): Changed to use helper functions to avoid code
9394 duplication.
9395 (grub_env_iterate): Rewritten so both the current context and the
9396 global context are being used.
9397
9398 * normal/command.c (export_command): New function.
9399 (grub_command_init): Register the `export' function.
9400
7b455f4d 94012006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
9402
9403 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
9404 explicitly to suppress gcc's warnings.
9405 * fs/fat.c (grub_fat_find_dir): Likewise.
9406 (grub_fat_label): Likewise.
9407 * fs/xfs.c (grub_xfs_read_inode): Likewise.
9408 (grub_xfs_mount): Likewise.
9409 (grub_xfs_label): Likewise.
9410 * fs/affs.c (grub_affs_mount): Likewise.
9411 (grub_affs_label): Likewise.
9412 (grub_affs_iterate_dir): Likewise.
9413 * fs/sfs.c (grub_sfs_mount): Likewise.
9414 (grub_sfs_iterate_dir): Likewise.
9415 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
9416 * fs/hfs.c (grub_hfs_mount): Likewise.
9417 (grub_hfs_cmp_catkeys): Likewise.
9418 (grub_hfs_find_dir): Likewise.
9419 (grub_hfs_dir): Likewise.
9420 (grub_hfs_label): Likewise.
9421 * fs/jfs.c (grub_jfs_mount): Likewise.
9422 (grub_jfs_opendir): Likewise.
9423 (grub_jfs_getent): Likewise.
9424 (grub_jfs_lookup_symlink): Likewise.
9425 (grub_jfs_label): Likewise.
9426 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
9427 (grub_hfsplus_iterate_dir): Likewise.
9428 (grub_hfsplus_btree_iterate_node): Made static.
9429
9430 * util/grub-emu.c (prefix): New variable.
9431 (grub_machine_set_prefix): New function.
9432 (main): Do not set the environment variable "prefix" here. Only
9433 set PREFIX, which is used later by grub_machine_set_prefix.
9434
9435 * include/grub/video.h: Do not include grub/symbol.h.
9436 (grub_video_register): Not exported. This symbol is not defined in
9437 the kernel.
9438 (grub_video_unregister): Likewise.
9439 (grub_video_iterate): Likewise.
9440 (grub_video_setup): Likewise.
9441 (grub_video_restore): Likewise.
9442 (grub_video_get_info): Likewise.
9443 (grub_video_get_blit_format): Likewise.
9444 (grub_video_set_palette): Likewise.
9445 (grub_video_get_palette): Likewise.
9446 (grub_video_set_viewport): Likewise.
9447 (grub_video_get_viewport): Likewise.
9448 (grub_video_map_color): Likewise.
9449 (grub_video_map_rgb): Likewise.
9450 (grub_video_map_rgba): Likewise.
9451 (grub_video_fill_rect): Likewise.
9452 (grub_video_blit_glyph): Likewise.
9453 (grub_video_blit_bitmap): Likewise.
9454 (grub_video_blit_render_target): Likewise.
9455 (grub_video_scroll): Likewise.
9456 (grub_video_swap_buffers): Likewise.
9457 (grub_video_create_render_target): Likewise.
9458 (grub_video_delete_render_target): Likewise.
9459 (grub_video_set_active_render_target): Likewise.
9460
9461 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
9462 Undefined.
9463 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
9464
9465 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
9466 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9467 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9468 instead of $(srcdir)/genkernsyms.sh.
9469
9470 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
9471 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9472 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9473 instead of $(srcdir)/genkernsyms.sh.
9474
9475 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
9476 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9477 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9478 instead of $(srcdir)/genkernsyms.sh.
9479
9480 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
9481 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
9482 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
9483 instead of $(srcdir)/genkernsyms.sh.
9484
9485 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
9486 genkernsyms.sh.
9487
9488 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
9489 genkernsyms.sh.
9490 (gensymlist.sh): New target.
9491 (genkernsyms.sh): Likewise.
9492
9493 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
9494 genkernsyms.sh.in and gensymlist.sh.in.
9495
9496 * genkernsyms.sh: Removed.
9497 * gensymlist.sh: Likewise.
f19dbdb7 9498
7b455f4d 9499 * genkernsyms.sh.in: New file.
9500 * gensymlist.sh.in: Likewise.
9501
1885bb27 95022006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9503
9504 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
9505 clobber "prefix", since we may have already set it manually.
9506
71538dff 95072006-04-25 Hollis Blanchard <hollis@penguinppc.org>
9508
9509 * kern/misc.c (abort): New alias for grub_abort.
9510
2965c7cc 95112006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
9512
9513 A new machine-specific function "grub_machine_set_prefix" is
9514 defined. This is called after loading modules, so that a prefix
9515 initialization can use modules. Also, this change adds an
9516 intensive debugging feature for the memory manager via the
9517 configure option "--enable-mm-debug".
f19dbdb7 9518
2965c7cc 9519 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
9520 PART.LEN.
9521
9522 * kern/sparc64/ieee1275/init.c (abort): Removed.
9523 (grub_stop): Likewise.
9524 (grub_exit): New function.
9525 (grub_set_prefix): Renamed to ...
9526 (grub_machine_set_prefix): ... this.
9527 (grub_machine_init): Do not call grub_set_prefix.
9528
9529 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
9530 (grub_machine_set_prefix): ... this.
9531 (grub_machine_init): Do not call grub_set_prefix.
9532
9533 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
9534 (grub_machine_init): Do not set the prefix here.
9535
9536 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
9537
9538 * kern/efi/init.c: Include grub/mm.h.
9539 (grub_efi_set_prefix): New function.
9540
9541 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
9542 (grub_efi_get_filename): New function.
9543 (grub_print_device_path): Renamed to ...
9544 (grub_efi_print_device_path): ... this.
9545
9546 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
9547 [MM_DEBUG] (grub_realloc): Likewise.
9548 [MM_DEBUG] (grub_free): Likewise.
9549 [MM_DEBUG] (grub_memalign): Likewise.
9550 [MM_DEBUG] (grub_mm_debug): New variable.
9551 [MM_DEBUG] (grub_debug_malloc): New function.
9552 [MM_DEBUG] (grub_debug_free): New function.
9553 [MM_DEBUG] (grub_debug_realloc): New function.
9554 [MM_DEBUG] (grub_debug_memalign): New function.
9555
9556 * kern/misc.c (grub_abort): Print a newline to distinguish
9557 the message.
9558
9559 * kern/main.c (grub_main): Call grub_machine_set_prefix and
9560 grub_set_root_dev after loading modules. This is necessary when
9561 setting a prefix depends on modules.
9562
9563 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
9564 (grub_efi_print_device_path): ... this.
9565 (grub_efi_get_filename): New prototype.
9566 (grub_efi_set_prefix): Likewise.
9567
9568 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
9569 and grub/disk.h.
9570 (grub_efidisk_get_device_handle): New prototype.
9571 (grub_efidisk_get_device_name): Likewise.
9572
9573 * include/grub/mm.h: Include config.h.
9574 (MM_DEBUG): Removed.
9575 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
9576 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
9577 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
9578 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
9579 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
9580 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
9581 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
9582 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
9583 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
9584
9585 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
9586
9587 * disk/efi/efidisk.c: Include grub/partition.h.
9588 (iterate_child_devices): New function.
9589 (add_device): First, compare only last device path nodes, so that
9590 devices are sorted by the types.
9591 (grub_efidisk_get_device_handle): New function.
9592 (grub_efidisk_get_device_name): Likewise.
9593
9594 * configure.ac (--enable-mm-debug): New option to enable the
9595 memory manager debugging feature. This makes the binary much
9596 bigger, so is disabled by default.
9597
9cacaa17 95982006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
9599
9600 Use grub_abort instead of grub_stop, and grub_exit must be
9601 define in each architecture now. Also, this change adds support
9602 for EFI disks.
f19dbdb7 9603
9cacaa17 9604 * util/i386/pc/grub-probefs.c: Include grub/term.h.
9605 (grub_getkey): New function.
9606 (grub_term_get_current): Likewise.
9607
9608 * util/i386/pc/grub-setup.c: Include grub/term.h.
9609 (grub_getkey): New function.
9610 (grub_term_get_current): Likewise.
9611
9612 * util/misc.c (grub_stop): Renamed to ...
9613 (grub_exit): ... this.
9614
9615 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
9616 (grub_exit): ... this.
9617 (grub_machine_init): Use grub_abort instead of abort.
9618 (grub_stop): Removed.
9619
9620 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
9621 abort.
9622
9623 * kern/i386/pc/startup.S (grub_exit): New function.
9624 (cold_reboot): New label.
9625
9626 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
9627 (grub_efi_init): Call grub_efidisk_init.
9628 (grub_efi_fini): Call grub_efidisk_fini.
9629
9630 * kern/efi/efi.c: Include grub/mm.h.
9631 (grub_efi_console_control_guid): Renamed to ...
9632 (console_control_guid): ... this.
9633 (grub_efi_loaded_image_guid): Renamed to ...
9634 (loaded_image_guid): ... this.
9635 (grub_efi_locate_handle): New function.
9636 (grub_efi_open_protocol): Likewise.
9637 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
9638 GRUB_EFI_CONSOLE_CONTROL_GUID.
9639 (grub_efi_exit): Removed.
9640 (grub_stop): Likewise.
9641 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
9642 (grub_exit): New function.
9643 (grub_print_device_path): Likewise.
9644
9645 * kern/rescue.c (grub_rescue_cmd_exit): New function.
9646 (grub_enter_rescue_mode): Register "exit".
9647
9648 * kern/misc.c (grub_real_dprintf): A cosmetic change.
9649 (grub_abort): New function.
9650
9651 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
9652
9653 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
9654
9655 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
9656
9657 * include/grub/efi/efi.h (grub_efi_exit): Removed.
9658 (grub_print_device_path): New prototype.
9659 (grub_efi_locate_handle): Likewise.
9660 (grub_efi_open_protocol): Likewise.
9661
9662 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
9663 * disk/efi/efidisk.c: Likewise.
9664
9665 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
9666
9667 * include/grub/efi/console_control.h
9668 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
9669
9670 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
9671 last 8 bytes as an array.
9672 (GRUB_EFI_DISK_IO_GUID): New macro.
9673 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
9674 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
9675 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
9676 grub_uint8_t.
9677 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
9678 (struct grub_efi_device_path): Rename the member "sub_type" to
9679 "subtype".
9680 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
9681 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
9682 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
9683 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
9684 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
9685 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
9686 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
9687 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
9688 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
9689 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
9690 (struct grub_efi_pci_device_path): New structure.
9691 (grub_efi_pci_device_path_t): New type.
9692 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
9693 (struct grub_efi_pccard_device_path): New structure.
9694 (grub_efi_pccard_device_path_t): New type.
9695 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
9696 (struct grub_efi_memory_mapped_device_path): New structure.
9697 (grub_efi_memory_mapped_device_path_t): New type.
9698 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
9699 (struct grub_efi_vendor_device_path): New structure.
9700 (grub_efi_vendor_device_path_t): New type.
9701 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
9702 (struct grub_efi_controller_device_path): New structure.
9703 (grub_efi_controller_device_path_t): New type.
9704 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
9705 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
9706 (struct grub_efi_acpi_device_path): New structure.
9707 (grub_efi_acpi_device_path_t): New type.
9708 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
9709 (struct grub_efi_expanded_acpi_device_path): New structure.
9710 (grub_efi_expanded_acpi_device_path_t): New type.
9711 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
9712 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
9713 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
9714 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
9715 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
9716 (struct grub_efi_atapi_device_path): New structure.
9717 (grub_efi_atapi_device_path_t): New type.
9718 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
9719 (struct grub_efi_fibre_channel_device_path): New structure.
9720 (grub_efi_fibre_channel_device_path_t): New type.
9721 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
9722 (struct grub_efi_1394_device_path): New structure.
9723 (grub_efi_1394_device_path_t): New type.
9724 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
9725 (struct grub_efi_usb_device_path): New structure.
9726 (grub_efi_usb_device_path_t): New type.
9727 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
9728 (struct grub_efi_usb_class_device_path): New structure.
9729 (grub_efi_usb_class_device_path_t): New type.
9730 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
9731 (struct grub_efi_i2o_device_path): New structure.
9732 (grub_efi_i2o_device_path_t): New type.
9733 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
9734 (struct grub_efi_mac_address_device_path): New structure.
9735 (grub_efi_mac_address_device_path_t): New type.
9736 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
9737 (struct grub_efi_ipv4_device_path): New structure.
9738 (grub_efi_ipv4_device_path_t): New type.
9739 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
9740 (struct grub_efi_ipv6_device_path): New structure.
9741 (grub_efi_ipv6_device_path_t): New type.
9742 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
9743 (struct grub_efi_infiniband_device_path): New structure.
9744 (grub_efi_infiniband_device_path_t): New type.
9745 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
9746 (struct grub_efi_uart_device_path): New structure.
9747 (grub_efi_uart_device_path_t): New type.
9748 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
9749 (struct grub_efi_vendor_messaging_device_path): New structure.
9750 (grub_efi_vendor_messaging_device_path_t): New type.
9751 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
9752 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
9753 (struct grub_efi_hard_drive_device_path): New structure.
9754 (grub_efi_hard_drive_device_path_t): New type.
9755 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
9756 (struct grub_efi_cdrom_device_path): New structure.
9757 (grub_efi_cdrom_device_path_t): New type.
9758 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
9759 (struct grub_efi_vendor_media_device_path): New structure.
9760 (grub_efi_vendor_media_device_path_t): New type.
9761 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
9762 (struct grub_efi_file_path_device_path): New structure.
9763 (grub_efi_file_path_device_path_t): New type.
9764 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
9765 (struct grub_efi_protocol_device_path): New structure.
9766 (grub_efi_protocol_device_path_t): New type.
9767 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
9768 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
9769 (struct grub_efi_bios_device_path): New structure.
9770 (grub_efi_bios_device_path_t): New type.
9771 (struct grub_efi_disk_io): New structure.
9772 (grub_efi_disk_io_t): New type.
9773 (struct grub_efi_block_io_media): New structure.
9774 (grub_efi_block_io_media_t): New type.
9775 (struct grub_efi_block_io): New structure.
9776 (grub_efi_block_io_t): New type.
9777
9778 * include/grub/misc.h (grub_stop): Removed.
9779 (grub_exit): New prototype.
9780 (grub_abort): Likewise.
9781
9782 * include/grub/disk.h (enum grub_disk_dev_id): Added
9783 GRUB_DISK_DEVICE_EFIDISK_ID.
9784
9785 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
9786 disk/efi/efidisk.c.
9787 (kernel_syms.lst): Remove the target if an error occurs.
9788
49986a9f 97892006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
9790
9791 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
9792 as it was simply too buggy.
9793
970d3b8a 97942006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
9795
9796 * kern/misc.c (grub_lltoa): New function.
9797 (grub_vsprintf): Added support for the long long suffix,
9798 i.e. "ll".
9799
ff04ec24 98002006-04-20 Hollis Blanchard <hollis@penguinppc.org>
9801
9802 * Makefile.in (LDFLAGS): Add variable.
9803 (LD): Remove variable.
9804 * configure.ac: Add -m32 to LDFLAGS.
9805 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
9806 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
9807 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
9808 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
9809 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
9810 variables.
9811 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
9812 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
9813 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
9814
37e5e1a4 98152006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
9816
9817 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
9818 length for unknown glyph.
9819
c352d8dd 98202006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
9821
2eab1c0d 9822 Add support for pre-loaded modules into the EFI port.
f19dbdb7 9823
2eab1c0d 9824 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
9825 completely. Accept one more argument DIR. The caller has changed.
9826
9827 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
9828
9829 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
9830 (grub_efi_loaded_image_guid): New variable.
9831 (grub_efi_get_loaded_image): New function.
9832 (grub_arch_modules_addr): Likewise.
9833
9834 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
9835 prototype.
9836
9837 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
9838 (struct grub_efi_loaded_image): New structure.
9839 (grub_efi_loaded_image_t): New type.
9840
98412006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
f19dbdb7 9842
c352d8dd 9843 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
9844 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
9845 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
9846
6d01d6b4 98472006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
9848
9849 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
9850
976a4ea0 98512006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
9852
9853 * DISTLIST: Added include/grub/efi/console.h,
9854 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
9855 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9856
9857 * include/grub/efi/console.h: New file.
9858 * include/grub/efi/time.h: Likewise.
9859 * include/grub/i386/efi/kernel.h: Likewise.
9860 * kern/efi/init.c: Likewise.
9861 * kern/efi/mm.c: Likewise.
9862 * term/efi/console.c: Likewise.
f19dbdb7 9863
976a4ea0 9864 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
9865 (grub_stop): Removed.
9866 (grub_get_rtc): Likewise.
9867 (grub_machine_init): Simply call grub_efi_init.
9868 (grub_machine_fini): Call grub_efi_fini.
9869
9870 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
9871 (grub_efi_output_string): Removed.
9872 (grub_efi_stall): New function.
9873 (grub_stop): Likewise.
9874 (grub_get_rtc): Likewise.
9875
9876 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
9877 (grub_efi_stall): New prototype.
9878 (grub_efi_allocate_pages): Likewise.
9879 (grub_efi_free_pages): Likewise.
9880 (grub_efi_get_memory_map): Likewise.
9881 (grub_efi_mm_init): Likewise.
9882 (grub_efi_mm_fini): Likewise.
9883 (grub_efi_init): Likewise.
9884 (grub_efi_fini): Likewise.
9885
9886 * include/grub/i386/efi/time.h: Do not include
9887 grub/symbol.h. Include grub/efi/time.h.
9888 (GRUB_TICKS_PER_SECOND): Removed.
9889 (grub_get_rtc): Likewise.
9890
9891 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
9892 Added padding. The EFI spec is buggy.
9893 (GRUB_EFI_BLACK): New macro.
9894 (GRUB_EFI_BLUE): Likewise.
9895 (GRUB_EFI_GREEN): Likewise.
9896 (GRUB_EFI_CYAN): Likewise.
9897 (GRUB_EFI_RED): Likewise.
9898 (GRUB_EFI_MAGENTA): Likewise.
9899 (GRUB_EFI_BROWN): Likewise.
9900 (GRUB_EFI_LIGHTGRAY): Likewise.
9901 (GRUB_EFI_BRIGHT): Likewise.
9902 (GRUB_EFI_DARKGRAY): Likewise.
9903 (GRUB_EFI_LIGHTBLUE): Likewise.
9904 (GRUB_EFI_LIGHTGREEN): Likewise.
9905 (GRUB_EFI_LIGHTCYAN): Likewise.
9906 (GRUB_EFI_LIGHTRED): Likewise.
9907 (GRUB_EFI_LIGHTMAGENTA): Likewise.
9908 (GRUB_EFI_YELLOW): Likewise.
9909 (GRUB_EFI_WHITE): Likewise.
9910 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
9911 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
9912 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
9913 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
9914 (GRUB_EFI_BACKGROUND_RED): Likewise.
9915 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
9916 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
9917 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
9918 (GRUB_EFI_TEXT_ATTR): Likewise.
9919
9920 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
9921 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
9922 (kernel_mod_HEADERS): Added efi/time.h.
9923
83709125 99242006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
9925
9926 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
9927 include/grub/efi/api.h, include/grub/efi/console_control.h,
9928 include/grub/efi/efi.h, include/grub/efi/pe32.h,
9929 include/grub/i386/efi/time.h, kern/efi/efi.c,
9930 kern/i386/efi/init.c, kern/i386/efi/startup.S,
9931 and util/i386/efi/grub-mkimage.c.
9932
9933 * Makefile.in (RMKFILES): Added i386-efi.rmk.
9934
9935 * genmk.rb (PModule#rule): Do not export symbols if
9936 #{prefix}_EXPORTS is set to "no".
9937
9938 * conf/i386-efi.mk: New file.
9939 * conf/i386-efi.rmk: Likewise.
9940 * include/grub/efi/api.h: Likewise.
9941 * include/grub/efi/console_control.h: Likewise.
9942 * include/grub/efi/efi.h: Likewise.
9943 * include/grub/efi/pe32.h: Likewise.
9944 * include/grub/i386/efi/time.h: Likewise.
9945 * kern/efi/efi.c: Likewise.
9946 * kern/i386/efi/init.c: Likewise.
9947 * kern/i386/efi/startup.S: Likewise.
9948 * util/i386/efi/grub-mkimage.c: Likewise.
9949
99502006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 9951
9952 * include/grub/script.h: Include <grub/parser.h> and
9953 "grub_script.tab.h".
9954 (struct grub_lexer_param): New struct.
9955 (struct grub_parser_param): Likewise.
9956 (grub_script_create_arglist): Pass the state in an argument.
9957 (grub_script_add_arglist): Likewise.
9958 (grub_script_create_cmdline): Likewise.
9959 (grub_script_create_cmdblock): Likewise.
9960 (grub_script_create_cmdif): Likewise.
9961 (grub_script_create_cmdmenu): Likewise.
9962 (grub_script_add_cmd): Likewise.
9963 (grub_script_arg_add): Likewise.
9964 (grub_script_lexer_ref): Likewise.
9965 (grub_script_lexer_deref): Likewise.
9966 (grub_script_lexer_record_start): Likewise.
9967 (grub_script_lexer_record_stop): Likewise.
9968 (grub_script_mem_record): Likewise.
9969 (grub_script_mem_record_stop): Likewise.
9970 (grub_script_malloc): Likewise.
9971 (grub_script_yylex): Likewise.
9972 (grub_script_yyparse): Likewise.
9973 (grub_script_yyerror): Likewise.
9974 (grub_script_yylex): Likewise.
9975 (grub_script_lexer_init): Return the state.
9976
9977 * normal/lexer.c (grub_script_lexer_state): Removed variable.
9978 (grub_script_lexer_done): Likewise.
9979 (grub_script_lexer_getline): Likewise.
9980 (grub_script_lexer_refs): Likewise.
9981 (script): Likewise.
9982 (newscript): Likewise.
9983 (record): Likewise.
9984 (recording): Likewise.
9985 (recordpos): Likewise.
9986 (recordlen): Likewise.
9987 (grub_script_lexer_init): Return the state instead of setting
9988 global variables.
9989 (grub_script_lexer_ref): Use the newly added argument for state
9990 instead of globals.
9991 (grub_script_lexer_deref): Likewise.
9992 (grub_script_lexer_record_start): Likewise.
9993 (grub_script_lexer_record_stop): Likewise.
9994 (recordchar): Likewise.
9995 (nextchar): Likewise.
9996 (grub_script_yylex2): Likewise.
9997 (grub_script_yylex): Likewise.
9998 (grub_script_yyerror): Likewise.
9999
10000 * normal/parser.y (func_mem): Removed variable.
10001 (menu_entry): Likewise.
10002 (err): Likewise.
10003 (%lex-param): New parser option.
10004 (%parse-param): Likewise.
10005 (script): Always return the AST.
10006 (argument): Pass the state around.
10007 (arguments): Likewise.
10008 (grubcmd): Likewise.
10009 (commands): Likewise.
10010 (function): Likewise.
10011 (menuentry): Likewise.
10012 (if_statement): Likewise.
10013 (if): Likewise.
10014
10015 * normal/script.c (grub_script_memused): Removed variable.
10016 (grub_script_parsed): Likewise.
10017 (grub_script_malloc): Added a state argument. Use that instead of
10018 global variables.
10019 (grub_script_mem_record): Likewise.
10020 (grub_script_mem_record_stop): Likewise.
10021 (grub_script_arg_add): Likewise.
10022 (grub_script_add_arglist): Likewise.
10023 (grub_script_create_cmdline): Likewise.
10024 (grub_script_create_cmdif): Likewise.
10025 (grub_script_create_cmdmenu): Likewise.
10026 (grub_script_add_cmd): Likewise.
10027 (grub_script_parse): Setup the state before calling the parser.
f19dbdb7 10028
e2a8c904 100292006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 10030
10031 * normal/command.c (grub_command_init): Remove the title command.
10032
10033 * normal/lexer.c (grub_script_yylex): Renamed from this...
10034 (grub_script_yylex2): ... to this.
10035 (grub_script_yylex): New function. Temporary
10036 introduced to filter some tokens.
10037 (grub_script_yyerror): Print a newline.
10038
10039 * normal/main.c (read_config_file): Output information about the
10040 lines that contain errors. Wait for a key after all lines have
10041 been processed. Don't return an empty menu.
10042
10043 * normal/parser.y (func_mem): Don't initialize.
10044 (menu_entry): Likewise.
10045 (err): New variable.
10046 (script): Don't return anything when an error was encountered.
10047 (ws, returns): Removed rules.
10048 (argument): Disabled concatenated variable support.
10049 (arguments): Remove explicit separators.
10050 (grubcmd): Likewise.
10051 (function): Likewise.
10052 (menuentry): Likewise.
10053 (if): Likewise.
10054 (commands): Likewise. Add error handling.
10055
10056 * normal/script.c (grub_script_create_cmdline): If
10057 `grub_script_parsed' is 0, assume the parser encountered an error.
10058
c9a86192 100592006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
10060
10061 * configure.ac: Add support for EFI. Fix the typo
10062 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
10063
70f3b243 100642006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10065
10066 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
10067 foreign multibyte characters should be shown correctly.
10068
65f201ad 100692006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
10070
10071 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
10072 calculation.
10073 (read_config_file): Made it to close file before returning.
10074
b4b93674 100752006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
10076
10077 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
10078 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
10079 video/i386/pc/vbefill.c.
10080
10081 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
10082 video/i386/pc/vbefill.c.
10083
10084 * include/grub/video.h (grub_video_blit_format): New enum.
10085 (grub_video_mode_info): Added new member blit_format.
10086 (grub_video_get_blit_format): New function prototype.
10087
10088 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
10089 function prototype.
10090 (grub_video_vbe_map_rgb): Likewise.
10091 (grub_video_vbe_unmap_color): Likewise.
10092
10093 * include/grub/i386/pc/vbeblit.h: New file.
10094
10095 * include/grub/i386/pc/vbefill.h: New file.
10096
10097 * video/video.c (grub_video_get_blit_format): New function.
10098 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
10099 (grub_video_vbe_map_rgb): Likewise.
10100 (grub_video_vbe_unmap_color): Likewise.
10101
10102 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
10103 optimized fills.
10104 (grub_video_vbe_blit_render_target): Changed to use more optimized
10105 blits.
10106 (grub_video_vbe_setup): Added detection for optimized settings.
10107 (grub_video_vbe_create_render_target): Likewise.
10108
10109 * video/i386/pc/vbeblit.c: New file.
10110
10111 * video/i386/pc/vbefill.c: New file.
10112
c2379b9c 101132006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
10114
10115 * font/manager.c (grub_font_get_glyph): Removed font fixup from
10116 here...
10117
10118 * util/unifont2pff.rb: ... and moved it to here. Improved argument
10119 parsing to support both hex and dec ranges. If filename was missing
10120 show usage information.
10121
bd0d7896 101222006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
10123
10124 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
10125 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
10126
10127 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
10128 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
10129 (video_mod_SOURCES): Added.
10130 (video_mod_CFLAGS): Likewise.
10131 (video_mod_LDFLAGS): Likewise.
10132 (gfxterm_mod_SOURCES): Likewise.
10133 (gfxterm_mod_CFLAGS): Likewise.
10134 (gfxterm_mod_LDFLAGS): Likewise.
10135 (videotest_mod_SOURCES): Likewise.
10136 (videotest_mod_CFLAGS): Likewise.
10137 (videotest_mod_LDFLAGS): Likewise.
10138 (vesafb_mod_SOURCES): Removed.
10139 (vesafb_mod_CFLAGS): Likewise.
10140 (vesafb_mod_LDFLAGS): Likewise.
10141 (vga_mod_SOURCES): Likewise.
10142 (vga_mod_CFLAGS): Likewise.
10143 (vga_mod_LDFLAGS): Likewise.
10144
10145 * commands/videotest.c: New file.
10146
10147 * font/manager.c (fill_with_default_glyph): Modified to use
10148 grub_font_glyph.
10149 (grub_font_get_glyph): Likewise.
10150 (fontmanager): Renamed from this...
10151 (font_manager): ... to this.
10152
10153 * include/grub/font.h (grub_font_glyph): Added new structure.
10154 (grub_font_get_glyph): Modified to use grub_font_glyph.
10155
10156 * include/grub/misc.h (grub_abs): Added as inline function.
10157
10158 * include/grub/video.h: New file.
10159
10160 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
10161 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
10162 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
10163 (grub_vbe_get_controller_info): Renamed from this...
10164 (grub_vbe_bios_get_controller_info): ... to this.
10165 (grub_vbe_get_mode_info): Renamed from this...
10166 (grub_vbe_bios_get_mode_info): ... to this.
10167 (grub_vbe_set_mode): Renamed from this...
10168 (grub_vbe_bios_set_mode): ... to this.
10169 (grub_vbe_get_mode): Renamed from this...
10170 (grub_vbe_bios_get_mode): ... to this.
10171 (grub_vbe_set_memory_window): Renamed from this...
10172 (grub_vbe_bios_set_memory_window): ... to this.
10173 (grub_vbe_get_memory_window): Renamed from this...
10174 (grub_vbe_bios_get_memory_window): ... to this.
10175 (grub_vbe_set_scanline_length): Renamed from this...
10176 (grub_vbe_set_scanline_length): ... to this.
10177 (grub_vbe_get_scanline_length): Renamed from this...
10178 (grub_vbe_bios_get_scanline_length): ... to this.
10179 (grub_vbe_set_display_start): Renamed from this...
10180 (grub_vbe_bios_set_display_start): ... to this.
10181 (grub_vbe_get_display_start): Renamed from this...
10182 (grub_vbe_bios_get_display_start): ... to this.
10183 (grub_vbe_set_palette_data): Renamed from this...
10184 (grub_vbe_bios_set_palette_data): ... to this.
10185 (grub_vbe_set_pixel_rgb): Removed.
10186 (grub_vbe_set_pixel_index): Likewise.
10187
10188 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
10189 from this...
10190 (grub_vbe_bios_get_controller_info): ... to this.
10191 (grub_vbe_get_mode_info): Renamed from this...
10192 (grub_vbe_bios_get_mode_info): ... to this.
10193 (grub_vbe_set_mode): Renamed from this...
10194 (grub_vbe_bios_set_mode): ... to this.
10195 (grub_vbe_get_mode): Renamed from this...
10196 (grub_vbe_bios_get_mode): ... to this.
10197 (grub_vbe_set_memory_window): Renamed from this...
10198 (grub_vbe_bios_set_memory_window): ... to this.
10199 (grub_vbe_get_memory_window): Renamed from this...
10200 (grub_vbe_bios_get_memory_window): ... to this.
10201 (grub_vbe_set_scanline_length): Renamed from this...
10202 (grub_vbe_set_scanline_length): ... to this.
10203 (grub_vbe_get_scanline_length): Renamed from this...
10204 (grub_vbe_bios_get_scanline_length): ... to this.
10205 (grub_vbe_set_display_start): Renamed from this...
10206 (grub_vbe_bios_set_display_start): ... to this.
10207 (grub_vbe_get_display_start): Renamed from this...
10208 (grub_vbe_bios_get_display_start): ... to this.
10209 (grub_vbe_set_palette_data): Renamed from this...
10210 (grub_vbe_bios_set_palette_data): ... to this.
10211 (grub_vbe_bios_get_controller_info): Fixed problem with registers
10212 getting corrupted after calling it. Added more pushes and pops.
10213 (grub_vbe_bios_set_mode): Likewise.
10214 (grub_vbe_bios_get_mode): Likewise.
10215 (grub_vbe_bios_get_memory_window): Likewise.
10216 (grub_vbe_bios_set_scanline_length): Likewise.
10217 (grub_vbe_bios_get_scanline_length): Likewise.
10218 (grub_vbe_bios_get_display_start): Likewise.
10219 (grub_vbe_bios_set_palette_data): Likewise.
10220
10221 * normal/cmdline.c (cl_set_pos): Refresh the screen.
10222 (cl_insert): Likewise.
10223 (cl_delete): Likewise.
10224
10225 * term/gfxterm.c: New file.
10226
10227 * term/i386/pc/vesafb.c: Removed file.
10228
10229 * video/video.c: New file.
10230
10231 * video/i386/pc/vbe.c (real2pm): Added new function.
10232 (grub_video_vbe_draw_pixel): Likewise.
10233 (grub_video_vbe_get_video_ptr): Likewise.
10234 (grub_video_vbe_get_pixel): Likewise
10235 (grub_video_vbe_init): Likewise.
10236 (grub_video_vbe_fini): Likewise.
10237 (grub_video_vbe_setup): Likewise.
10238 (grub_video_vbe_get_info): Likewise.
10239 (grub_video_vbe_set_palette): Likewise.
10240 (grub_video_vbe_get_palette): Likewise.
10241 (grub_video_vbe_set_viewport): Likewise.
10242 (grub_video_vbe_get_viewport): Likewise.
10243 (grub_video_vbe_map_color): Likewise.
10244 (grub_video_vbe_map_rgb): Likewise.
10245 (grub_video_vbe_map_rgba): Likewise.
10246 (grub_video_vbe_unmap_color): Likewise.
10247 (grub_video_vbe_fill_rect): Likewise.
10248 (grub_video_vbe_blit_glyph): Likewise.
10249 (grub_video_vbe_blit_bitmap): Likewise.
10250 (grub_video_vbe_blit_render_target): Likewise.
10251 (grub_video_vbe_scroll): Likewise.
10252 (grub_video_vbe_swap_buffers): Likewise.
10253 (grub_video_vbe_create_render_target): Likewise.
10254 (grub_video_vbe_delete_render_target): Likewise.
10255 (grub_video_vbe_set_active_render_target): Likewise.
10256 (grub_vbe_set_pixel_rgb): Remove function.
10257 (grub_vbe_set_pixel_index): Likewise.
10258 (index_color_mode): Remove static variable.
10259 (active_mode): Likewise.
10260 (framebuffer): Likewise.
10261 (bytes_per_scan_line): Likewise.
10262 (grub_video_vbe_adapter): Added new static variable.
10263 (framebuffer): Likewise.
10264 (render_target): Likewise.
10265 (initial_mode): Likewise.
10266 (mode_in_use): Likewise.
10267 (mode_list): Likewise.
10268
5f97350b 102692006-03-10 Marco Gerards <marco@gnu.org>
10270
10271 * configure.ac (AC_INIT): Bumped to 1.93.
10272
10273 * DISTLIST: Added `include/grub/hfs.h'.
10274
a3c5c6f8 102752006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
10276
10277 * boot/i386/pc/boot.S (general_error): Before looping, try INT
10278 18H, which might help the BIOS falling back to next boot media.
10279
6de53d26 102802006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
10281
10282 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
10283 Poe Chen <poe.poechen@gmail.com>.
10284
77c4a393 102852006-01-17 Marco Gerards <marco@gnu.org>
10286
10287 * include/grub/normal.h: Include <grub/script.h>.
10288 (grub_command_list): Removed struct.
10289 (grub_command_list_t): Removed type.
10290 (grub_menu_entry): Remove members `num' and `command_list'. Add
10291 members `commands' and `sourcecode'.
10292 * include/grub/script.h: Add inclusion guards.
10293 (grub_script_cmd_menuentry): New struct.
10294 (grub_script_execute_menuentry): New prototype.
10295 (grub_script_lexer_record_start): Likewise.
10296 (grub_script_lexer_record_stop): Likewise.
10297 * normal/execute.c (grub_script_execute_menuentry): New function.
10298 * normal/lexer.c (record, recording, recordpos, recordlen): New
10299 variables.
10300 (grub_script_lexer_record_start): New function.
10301 (grub_script_lexer_record_stop): Likewise.
10302 (recordchar): Likewise.
10303 (nextchar): Likewise.
10304 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
10305 2048 as the buffer size. Add the tokens `menuentry' and `@'.
10306 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
10307 (current_menu): New variable.
10308 (free_menu): Mainly rewritten.
10309 (grub_normal_menu_addentry): New function.
10310 (read_config_file): Rewritten.
10311 * normal/menu.c (run_menu_entry): Mainly rewritten.
fe987087 10312 * normal/menu_entry.c (make_screen): Rewritten the code to insert
77c4a393 10313 the menu entry.
10314 (run): Mainly rewritten.
10315 * normal/parser.y (menu_entry): New variable.
10316 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
10317 (menuentry): New rule.
10318 (command): Add `menuentry'.
10319 (if_statement): Allow additional returns before `fi'.
10320 * normal/script.c (grub_script_create_cmdmenu): New function.
10321
144f1f98 103222006-01-03 Marco Gerards <marco@gnu.org>
10323
10324 * INSTALL: GNU Bison is required.
10325 * configure.ac: Rewritten the test to detect Bison.
10326 * Makefile.in (YACC): New variable. Reported by Xun Sun
10327 <xun.sun.cn@gmail.com>.
10328
af4b2d89 103292006-01-03 Marco Gerards <marco@gnu.org>
10330
10331 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
10332 the HFS+ filesystem to filesystem blocks.
10333 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
10334 GCC warning is silenced.
10335
15643b71 103362006-01-03 Marco Gerards <marco@gnu.org>
10337
10338 * partmap/apple.c (apple_partition_map_iterate): Convert the data
10339 read from disk from big endian to host byte order.
10340
00905879 103412006-01-03 Hollis Blanchard <hollis@penguinppc.org>
10342
10343 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
10344 documentation.
10345 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
10346 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
10347 embedded HFS+ filesystem.
10348 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
10349 (grub_hfs_sblock): Move from here...
10350 * include/grub/hfs.h: To here... New file.
10351 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
10352 documentation.
10353 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
10354 New macros.
10355 (grub_hfsplus_volheader): Change type of member `magic' to
10356 `grub_uint16_t'.
10357 (grub_hfsplus_data): Add new member `embedded_offset'.
10358 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
10359 returned block.
10360 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
10361 Calculate the offset.
10362
8899bc3e 103632005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10364
10365 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
10366 Removed.
10367 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
10368
ae8c0277 103692005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10370
10371 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
10372 ENV->NAME is NULL after allocating ENV->VALUE.
10373
07084456 103742005-12-25 Marco Gerards <marco@gnu.org>
10375
10376 * kern/env.c (grub_env_set): Rewritten the error handling code.
10377
4750f5f1 103782005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10379
10380 * geninit.sh: Made more robust, and more portable.
10381
50214199 103822005-12-25 Marco Gerards <marco@gnu.org>
10383
10384 Add support for Apple HFS+ filesystems.
f19dbdb7 10385
50214199 10386 * fs/hfsplus.c: New file.
10387
10388 * DISTLIST: Added `fs/hfsplus.c'.
10389
10390 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
10391 (hfsplus_mod_SOURCES): New variable.
10392 (hfsplus_mod_CFLAGS): Likewise.
10393 (hfsplus_mod_LDFLAGS): Likewise.
10394 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
10395 (grub_setup_SOURCES): Likewise.
10396 (grub_mkdevicemap_SOURCES): Likewise.
10397 (grub_emu_SOURCES): Likewise.
10398 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10399
10400 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
10401
10402 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
10403
befaed6c 104042005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
10405
10406 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
10407 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
10408 include/grub/parser.h, include/grub/script.h, kern/parser.c,
10409 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
10410 normal/lexer.c, normal/parser.y, normal/script.c, and
10411 partmap/gpt.c.
10412 Removed kern/sparc64/cache.c.
10413
10414 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
10415 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
10416 grub_emu_init.c.
10417
10418 * configure.ac (AC_INIT): Bumped to 1.92.
10419
6a124103 104202005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
10421
10422 * kern/err.c (grub_error_push): Added new function to support error
10423 stacks.
10424 (grub_error_pop): Likewise.
10425 (grub_error_stack_items): New local variable to support error stacks.
10426 (grub_error_stack_pos): Likewise.
10427 (grub_error_stack_assert): Likewise.
10428 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
10429 stack depth.
10430 (grub_print_error): Added support to print errors from error stack.
10431
10432 * include/grub/err.h (grub_error_push): Added function prototype.
10433 (grub_error_pop): Likewise.
10434
be973c1b 104352005-12-09 Hollis Blanchard <hollis@penguinppc.org>
10436
10437 * configure.ac: Accept `powerpc64' as host_cpu.
10438 (amd64): Rename to `biarch32'.
10439
10440 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
10441 non-cacheline-aligned addresses.
10442
10443 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
10444 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
10445 if `size' is non-zero.
10446
b04216ab 104472005-12-03 Marco Gerards <mgerards@xs4all.nl>
10448
10449 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
10450 and `cd' to make sure the filename is not prefixed with a
10451 directory name.
10452 (pkgdata_MODULES): Add `gpt.mod'.
10453 (gpt_mod_SOURCES): New variable.
10454 (gpt_mod_CFLAGS): Likewise.
10455 (gpt_mod_LDFLAGS): Likewise.
10456
10457 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
10458
10459 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
10460 New macro.
10461
10462 * partmap/gpt.c: New file.
10463
10464 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
10465 GPT partition map is detected.
10466
41730ed9 104672005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
10468
10469 * commands/i386/pc/play.c: New file.
10470 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
10471 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
10472 macros.
f19dbdb7 10473
95dc3643 104742005-11-27 Marco Gerards <mgerards@xs4all.nl>
10475
10476 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
10477 ((unused))' to silence gcc warning.
10478
1569ec51 104792005-11-26 Hollis Blanchard <hollis@penguinppc.org>
10480
10481 * configure.ac: Correct `AC_PROG_YACC' test.
10482
9abde152 104832005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10484
10485 * util/powerpc/ieee1275/grub-install.in: Run the mount point
10486 check before installing files.
10487
44b83271 104882005-11-22 Mike Small <smallm@panix.com>
10489
10490 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
10491 number regex so multidigit numbers are recognized correctly.
10492
104932005-11-22 Mike Small <smallm@panix.com>
10494
10495 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
10496 debugging message before attempting to claim memory.
10497 (grub_rescue_cmd_initrd): Add a claim debugging message and try
10498 multiple addresses in case of failure.
10499
9c12956b 105002005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10501
10502 * term/tparm.c (get_space): Remove empty `if' statement.
10503
10504 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
10505
10506 * kern/parser.c (check_varstate): Rename `state' to 's'.
10507
aeaf81d9 105082005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10509
10510 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
10511 variable definitions to the beginning of each function. Sort stack
10512 variables by size.
10513 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
10514 `buf' argument to `char *'.
10515
79bbb63f 105162005-11-22 Hollis Blanchard <hollis@penguinppc.org>
10517
10518 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
10519 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 10520 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
79bbb63f 10521 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10522 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10523 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10524 configfile.mod, search.mod, gzio.mod and test.mod.
10525 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10526 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10527 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10528 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10529 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10530 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10531 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10532 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10533 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10534 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10535 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10536 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10537 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10538 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10539 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10540 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10541 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10542 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10543 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10544 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10545 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10546 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10547 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
10548
10549 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
10550 `grep --include'.
10551 (pkgdata_MODULES): Add test.mod.
10552
233b1628 105532005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10554
10555 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
10556 appending to variables with "+=".
10557 (PModule): Use full pathname to generate *.lst filenames.
10558
10559 * Makefile.in: Fixed list rules moved from genmk.rb.
10560 (.DELETE_ON_ERROR): New special target.
10561 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
10562
10563 * conf/i386-pc.rmk: Include conf/common.mk.
10564 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
fe6b695a 10565 minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
233b1628 10566 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
10567 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
10568 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
10569 configfile.mod, search.mod, gzio.mod and test.mod.
10570 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
10571 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
10572 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
10573 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
10574 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
10575 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
10576 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
10577 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
10578 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
10579 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
10580 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10581 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10582 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
10583 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
10584 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
10585 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
10586 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
10587 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
10588 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
10589 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
10590 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
10591 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
10592 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
10593 here...
10594 * conf/common.rmk: ... to here. New file.
10595
10596 * conf/common.mk: New file.
10597
16f820c8 105982005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
10599
10600 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
10601 (grub_script.tab.c): ... here.
10602
10603 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
10604 (grub_script.tab.c): ... here.
10605
10606 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
10607 (grub_script.tab.c): ... here.
10608
10609 * normal/command.c (grub_command_find): Fixed a memory leak of
10610 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
10611
63ba1554 106122005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10613
10614 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
10615 "@" which marks the start of a comment on ARM.
10616 (VARIABLE): Likewise.
10617
7f67dc13 106182005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10619
79bbb63f 10620 Add support for Linux/ADFS partition tables.
7f67dc13 10621
10622 * partmap/acorn.c: New file.
10623
10624 * include/grub/acorn_filecore.h: Likewise.
10625
10626 * DISTLIST: Added `partmap/acorn.c' and
10627 `include/grub/acorn_filecore.h'.
f19dbdb7 10628
7f67dc13 10629 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10630 `partmap/acorn.c'.
10631 (pkgdata_MODULES): Add `acorn.mod'.
10632 (acorn_mod_SOURCES): New variable.
10633 (acorn_mod_CFLAGS): Likewise.
10634
10635 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10636 `partmap/acorn.c'.
10637 (pkgdata_MODULES): Add `acorn.mod'.
10638 (acorn_mod_SOURCES): New variable.
10639 (acorn_mod_CFLAGS): Likewise.
10640
10641 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
10642 (pkgdata_MODULES): Add `acorn.mod'.
10643 (acorn_mod_SOURCES): New variable.
10644 (acorn_mod_CFLAGS): Likewise.
10645 (acorn_mod_LDFLAGS): Likewise.
10646
10647 * include/types.h (grub_disk_addr_t): New typedef.
10648
6d099807 106492005-11-13 Marco Gerards <mgerards@xs4all.nl>
10650
10651 * geninit.sh: New file.
10652
10653 * geninitheader.sh: Likewise.
10654
10655 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
10656 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
10657 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
10658 * commands/configfile.c (grub_configfile_init)
10659 (grub_configfile_fini): Likewise.
10660 * commands/default.c (grub_default_init, grub_default_fini):
10661 Likewise.
10662 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
10663 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
10664 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
10665 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
10666 Likewise.
10667 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
10668 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
10669 Likewise.
10670 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
fe6b695a 10671 * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
6d099807 10672 Likewise.
10673 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
10674 Likewise.
fe6b695a 10675 * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
6d099807 10676 Likewise.
10677 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
10678 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
10679 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
10680 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
10681 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
10682 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
10683 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
10684 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
10685 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
10686 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
10687 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
10688 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
10689 * partmap/amiga.c (grub_amiga_partition_map_init)
10690 (grub_amiga_partition_map_fini): Likewise.
10691 * partmap/apple.c (grub_apple_partition_map_init)
10692 (grub_apple_partition_map_fini): Likewise.
10693 * partmap/pc.c (grub_pc_partition_map_init)
10694 (grub_pc_partition_map_fini): Likewise.
10695 * partmap/sun.c (grub_sun_partition_map_init,
10696 grub_sun_partition_map_fini): Likewise.
10697 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
10698 Likewise.
10699
10700 * util/grub-emu.c: Include <grub_modules_init.h>.
10701 (main): Don't initialize and de-initialize any modules directly,
10702 use `grub_init_all' and `grub_fini_all' instead.
10703
10704 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
10705 `grub_vesafb_mod_init'.
10706 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
10707 all users.
10708 * term/i386/pc/vga.c (grub_vga_init): Renamed to
10709 `grub_vga_mod_init'. Updated all users.
10710 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
f19dbdb7 10711
6d099807 10712 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
10713 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
10714 rules.
10715
10716 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
10717 Generate a function to initialize the module in utilities.
10718 Updated all callers.
10719 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
10720 initialize the module in utilities. Updated all callers.
10721
9046bcf0 107222005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10723
10724 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
10725 escape sequence and a literal ^L to clear the screen.
10726
10727 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
10728 when returning from Open Firmware.
10729
d13ea639 107302005-11-09 Hollis Blanchard <hollis@penguinppc.org>
10731
10732 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
10733 (grub_ofconsole_height): Likewise.
10734 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
10735 manually insert a '\n'.
10736 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
10737 `grub_ofconsole_height'. Return early if these are already set.
10738
a8fcf206 107392005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
10740
10741 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
10742 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
10743 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
10744 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
10745 and `normal/script.c'.
10746 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10747 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10748 (test_mod_SOURCES): New variable.
10749 (test_mod_CFLAGS): Likewise.
10750 (test_mod_LDFLAGS): Likewise.
10751 (pkgdata_MODULES): Add `test.mod'.
10752 (grub_script.tab.c): New rule.
10753 (grub_script.tab.h): Likewise.
10754
b6b32745 107552005-11-07 Marco Gerards <mgerards@xs4all.nl>
10756
10757 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
10758 `commands/test.c', `normal/execute.c', `normal/lexer.c',
10759 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10760 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10761 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
10762 (test_mod_SOURCES): New variable.
10763 (test_mod_CFLAGS): Likewise.
10764 (pkgdata_MODULES): Add `test.mod'.
10765 (grub_script.tab.c): New rule.
10766 (grub_script.tab.h): Likewise.
10767
daac212a 107682005-11-06 Marco Gerards <mgerards@xs4all.nl>
10769
10770 Add initial scripting support.
10771
10772 * commands/test.c: New file.
10773 * include/grub/script.h: Likewise.
10774 * normal/execute.c: Likewise.
10775 * normal/function.c: Likewise.
10776 * normal/lexer.c: Likewise.
10777 * normal/parser.y: Likewise.
10778 * normal/script.c: Likewise.
10779
10780 * configure.ac: Add `AC_PROG_YACC' test.
f19dbdb7 10781
daac212a 10782 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
10783 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
10784 `normal/function.c' and `normal/script.c'.
10785 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
10786 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 10787 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
10788 variables.
daac212a 10789 (pkgdata_MODULES): Add `test.mod'.
10790 (grub_script.tab.c): New rule.
10791 (grub_script.tab.h): Likewise.
10792
10793 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
10794
10795 * include/grub/normal.h (grub_test_init): New prototype.
10796 (grub_test_fini): Likewise.
f19dbdb7 10797
daac212a 10798 * normal/command.c: Include <grub/script.h>.
10799 (grub_command_execute): Rewritten.
f19dbdb7 10800
daac212a 10801 * util/grub-emu.c (main): Call `grub_test_init' and
10802 `grub_test_fini'.
10803
77500b2b 108042005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10805
10806 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
10807 to 0.
10808 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
10809 there are no pending characters.
10810
e45deb9e 108112005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10812
10813 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
10814 `grub_strndup' to drop device arguments. Replace unnecessary
10815 `grub_strndup' with `grub_strdup'.
10816
4ce32619 108172005-11-03 Hollis Blanchard <hollis@penguinppc.org>
10818
10819 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
10820 `debug' environment variable has been set.
10821
108222005-11-02 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 10823
4ce32619 10824 * Makefile.in (install-local): Use $(DATA).
10825 (uninstall): Likewise.
10826 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
10827 (sbin_UTILITIES): ... to here.
10828 (sbin_SCRIPTS): New variable.
10829 (grub_install_SOURCES): New variable.
10830 * util/powerpc/ieee1275/grub-install.in: New file.
10831 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
10832 variable.
10833 (add_segments): Call `grub_util_get_path'.
10834
25fe6f03 108352005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
10836
10837 From Timothy Baldwin:
10838 * commands/ls.c (grub_ls_list_files): Close FILE with
10839 grub_file_close.
10840 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
10841
04ccf3ec 108422005-10-24 Marco Gerards <mgerards@xs4all.nl>
10843
10844 * include/grub/parser.h: New file.
10845
10846 * kern/parser.c: Likewise.
10847
10848 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
10849 (grub_setup_SOURCES): Likewise.
10850 (grub_probefs_SOURCES): Likewise.
10851 (grub_emu_SOURCES): Likewise.
10852 (kernel_img_HEADERS): Add `parser.h'.
10853
10854 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10855 (grub_emu_SOURCES): Add `kern/parser.c'.
10856 (grubof_SOURCES): Likewise.
10857
10858 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
10859 (grubof_SOURCES): Add `kern/parser.c'.
10860
10861 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
10862
10863 * kern/misc.c (grub_split_cmdline): Removed function.
10864
10865 * kern/rescue.c: Include <grub/parser.h>.
10866 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
10867 of `grub_split_cmdline'.
10868
10869 * normal/command.c: Include <grub/parser.h>.
10870 (grub_command_execute): Use `grub_parser_split_cmdline' instead
10871 of `grub_split_cmdline'.
10872
10873 * normal/completion.c: Include <grub/parser.h>.
10874 (cmdline_state): New variable.
10875 (iterate_dir): End the filename with a quote depending on the
10876 command line state.
10877 (get_state): new function.
10878 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
10879 split the arguments and determine the current argument. When the
10880 argument string is not quoted, escape all spaces.
10881
6d8f4b0e 108822005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10883
10884 * normal/sparc64/setjmp.S: New file.
10885
15cf03ed 108862005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10887
10888 * include/grub/sparc64/libgcc.h: New file.
10889 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
10890 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
10891 normal/sparc64/setjmp.c.
10892
03e8661a 108932005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
10894
10895 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
10896 * kern/sparc64/cache.S: New file.
10897 * kern/sparc64/cache.c: Removed.
10898 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
10899 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
10900 -mtune=ultrasparc.
10901 (COMMON_LDFLAGS): Add -melf64_sparc.
10902 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
10903 (grubof_SOURCES): Use cache.S instead of cache.c.
10904 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
10905 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
10906 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
10907 commented though.
10908 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
10909 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
10910 (linux_mod_CFLAGS): Commented out.
10911 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
10912 out because module isn't built.
10913 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
10914 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
10915 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
10916 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
10917 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
10918 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
10919 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
10920 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
10921 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
10922 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
10923 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
10924 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
10925 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
10926 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
10927
34eeec8a 109282005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
10929
10930 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
10931 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
10932 longer, because HFS should not be used on PC.
10933
708367a3 109342005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
10935
10936 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
10937 consistently within the loop.
10938
6fa1251a 109392005-10-15 Marco Gerards <mgerards@xs4all.nl>
10940
10941 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
10942 directory can not be read.
10943
4801580b 109442005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10945
10946 * configure.ac (AC_INIT): Increase the version number to 1.91.
10947
10948 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
10949 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
10950 term/i386/pc/serial.c.
10951
219ad426 109522005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10953
10954 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
10955 file size must be permitted.
10956
10957 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
10958 between %ah and %al.
10959
688e5699 109602005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
10961
10962 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
10963 grub_uint64_t.
10964 Call the hook with a NUL-terminated filename.
10965 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
10966 grub_cpu_to_be32.
10967
10968 * kern/term.c (cursor_state): New variable.
10969 (grub_term_set_current): Reset the cursor state on a new
10970 terminal.
10971 (grub_setcursor): Rewritten to use CURSOR_STATE.
10972 (grub_getcursor): New function.
10973
10974 * include/grub/term.h (grub_getcursor): New prototype.
10975
10976 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
10977 integers on ARM. Reported by Timothy Baldwin
10978 <T.E.Baldwin99@members.leeds.ac.uk>.
10979
bb34586c 109802005-10-11 Marco Gerards <mgerards@xs4all.nl>
10981
10982 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
10983 allocated.
10984 (grub_sfs_dir): Likewise.
10985
9a909877 109862005-10-09 Marco Gerards <mgerards@xs4all.nl>
10987
10988 Add support for the SFS filesystem.
10989
10990 * fs/sfs.c: New file.
10991
10992 * DISTLIST: Added `fs/sfs.c'.
10993
10994 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
10995 (grub_probefs_SOURCES): Likewise.
10996 (grub_emu_SOURCES): Likewise.
10997 (pkgdata_MODULES): Add `sfs.mod'.
10998 (sfs_mod_SOURCES): New variable.
10999 (sfs_mod_CFLAGS): Likewise.
11000 (sfs_mod_LDFLAGS): Likewise.
11001
11002 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
11003 (pkgdata_MODULES): Add `sfs.mod'.
11004 (sfs_mod_SOURCES): New variable.
11005 (sfs_mod_CFLAGS): Likewise.
11006
11007 * util/grub-emu.c (main): Call `grub_sfs_init' and
11008 `grub_sfs_fini'.
11009
11010 * include/grub/fs.h (grub_sfs_init): New prototype.
11011 (grub_sfs_fini): Likewise.
11012
57bdbde3 110132005-10-07 Marco Gerards <mgerards@xs4all.nl>
11014
11015 Add support for the AFFS filesystem.
11016
11017 * fs/affs.c: New file.
11018
11019 * DISTLIST: Added `fs/affs.c'.
11020
11021 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
11022 (grub_probefs_SOURCES): Likewise.
11023 (grub_emu_SOURCES): Likewise.
11024 (pkgdata_MODULES): Add `affs.mod'.
11025 (affs_mod_SOURCES): New variable.
11026 (affs_mod_CFLAGS): Likewise.
11027 (affs_mod_LDFLAGS): Likewise.
11028
11029 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
11030 (pkgdata_MODULES): Add `affs.mod'.
11031 (affs_mod_SOURCES): New variable.
11032 (affs_mod_CFLAGS): Likewise.
11033
11034 * util/grub-emu.c (main): Call `grub_affs_init' and
11035 `grub_affs_fini'.
11036
11037 * include/grub/fs.h (grub_affs_init): New prototype.
11038 (grub_affs_fini): Likewise.
11039
047b67e0 110402005-10-01 Marco Gerards <mgerards@xs4all.nl>
11041
11042 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
11043
59b8208a 110442005-10-01 Marco Gerards <mgerards@xs4all.nl>
11045
11046 * configure.ac: Accept `x86_64' as host_cpu. In that case add
11047 `-m32' to CFLAGS.
11048
11049 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
11050 linking.
f19dbdb7 11051
59b8208a 11052 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
11053 (COMMON_LDFLAGS): New variable.
11054 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
11055 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
11056 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
11057 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
11058 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
11059 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
11060 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
11061 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
11062 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
11063 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
11064 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
11065 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
11066 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
11067 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
11068 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
11069 variables.
11070 (normal_mod_ASFLAGS): Add `-m32'.
11071
11072 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
11073 (grub_host_size_t, grub_host_ssize_t): New types.
11074 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
fe6b695a 11075 dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
59b8208a 11076 `GRUB_HOST_SIZEOF_VOID_P'.
11077
11078 * include/grub/kernel.h (struct grub_module_header): Type of
11079 member offset changed to `grub_host_off_t'. Type of member size
11080 changed to `grub_host_size_t'.
11081 (struct grub_module_info): Type of member offset changed to
11082 `grub_host_off_t'. Type of member size changed to
11083 `grub_host_size_t'.
11084
b4093103 110852005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
11086
11087 Make GRUB's kernel compliant to Multiboot Specification.
f19dbdb7 11088
b4093103 11089 * kern/i386/pc/startup.S (multiboot_header): New label.
11090 (multiboot_entry): Likewise.
11091 (multiboot_trampoline): Likewise.
11092
11093 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
11094 Increased to 0x4A0.
11095
11096 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
11097 put parentheses after a question mark.
11098 [!GRUB_UTIL] (my_mod): New variable.
11099
11100 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
11101
b2499b29 111022005-09-28 Marco Gerards <mgerards@xs4all.nl>
11103
11104 Adds support for the XFS filesystem. Btrees are not supported
11105 yet.
11106
11107 * fs/xfs.c: New file.
11108
11109 * DISTLIST: Added `fs/xfs.c'.
11110
11111 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
11112 (grub_probefs_SOURCES): Likewise.
11113 (grub_emu_SOURCES): Likewise.
11114 (pkgdata_MODULES): Add `xfs.mod'.
11115 (xfs_mod_SOURCES): New variable.
11116 (xfs_mod_CFLAGS): Likewise.
11117
11118 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
11119 (pkgdata_MODULES): Add `xfs.mod'.
11120 (xfs_mod_SOURCES): New variable.
11121 (xfs_mod_CFLAGS): Likewise.
11122
11123 * util/grub-emu.c (main): Call `grub_xfs_init' and
11124 `grub_xfs_fini'.
11125
11126 * include/grub/fs.h (grub_xfs_init): New prototype.
11127 (grub_xfs_fini): Likewise.
11128
f19dbdb7 11129
83d37a62 111302005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
11131
11132 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
11133 color modes, allow greater than 16 colors to be configured as
11134 a default palette.
11135
47d2d65e 111362005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
11137
11138 * normal/completion.c (complete_arguments): Add the qualifier
11139 const into OPTIONS.
11140
11141 From Omniflux <omniflux+lists@omniflux.com>:
11142 * include/grub/terminfo.h: New file.
11143 * include/grub/tparm.h: Likewise.
11144 * include/grub/i386/pc/serial.h: Likewise.
11145 * term/terminfo.c: Likewise.
11146 * term/tparm.c: Likewise.
11147 * term/i386/pc/serial.c: Likewise.
11148 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
11149 serial.mod.
11150 (terminfo_mod_SOURCES): New variable.
11151 (terminfo_mod_CFLAGS): Likewise.
11152 (serial_mod_SOURCES): Likewise.
11153 (serial_mod_CFLAGS): Likewise.
11154
48b671ff 111552005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
11156
11157 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
11158 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
11159 and kern/powerpc/ieee1275/cmain.c, respectively.
11160
11161 * boot/powerpc/ieee1275/crt0.S: Moved to ...
11162 * kern/powerpc/ieee1275/crt0.S: ... here.
11163
11164 * boot/powerpc/ieee1275/cmain.c: Moved to ...
11165 * kern/powerpc/ieee1275/cmain.c: ... here.
f19dbdb7 11166
48b671ff 11167 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
11168 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
11169 instead of boot/powerpc/ieee1275/crt0.S and
11170 boot/powerpc/ieee1275/cmain.c, respectively.
11171
11172 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
11173 sectors. It was not used anyway.
11174
09fc77a7 111752005-08-30 Hollis Blanchard <hollis@penguinppc.org>
11176
11177 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
11178 `unused parameter' warning.
11179
003789c7 111802005-08-30 Hollis Blanchard <hollis@penguinppc.org>
11181
11182 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
11183 function.
11184 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
11185 getcharwidth.
11186
67f44c86 111872005-08-28 Marco Gerards <metgerards@student.han.nl>
11188
11189 * include/grub/normal.h (enum grub_completion_type): Added
11190 `GRUB_COMPLETION_TYPE_ARGUMENT'.
11191
11192 * normal/cmdline.c (print_completion): Handle
11193 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
11194 * normal/menu_entry.c (store_completion): Likewise.
11195
11196 * normal/completion.c (complete_arguments): New function.
11197 (grub_normal_do_completion): Call `complete_arguments' when the
11198 current words start with a dash.
11199
0b5abe02 112002005-08-27 Marco Gerards <metgerards@student.han.nl>
11201
11202 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
11203 `gzio.mod' instead of `io.mod').
11204
d9864ee1 112052005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
11206
11207 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
11208 (DISTDIRS): Added io and video.
11209 Rewrite the search routine to make an output consistently.
11210
11211 * DISTLIST: Added conf/sparc64-ieee1275.mk,
11212 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
11213 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
11214 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
11215 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
11216 util/powerpc/ieee1275/misc.c.
f19dbdb7 11217
d9864ee1 11218 * include/grub/gzio.h: New file.
11219 * io/gzio.c: Likewise.
f19dbdb7 11220
d9864ee1 11221 * kern/file.c (grub_file_close): Call grub_device_close only if
11222 FILE->DEVICE is not NULL.
11223
11224 * include/grub/mm.h [!NULL] (NULL): New macro.
11225
11226 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
11227
11228 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
11229 (pkgdata_MODULES): Added gzio.mod.
11230 (gzio_mod_SOURCES): New variable.
11231 (gzio_mod_CFLAGS): Likewise.
11232
11233 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
11234 (pkgdata_MODULES): Added gzio.mod.
11235 (gzio_mod_SOURCES): New variable.
11236 (gzio_mod_CFLAGS): Likewise.
11237
11238 * commands/cat.c: Include grub/gzio.h.
11239 (grub_cmd_cat): Use grub_gzfile_open instead of
11240 grub_file_open.
f19dbdb7 11241
d9864ee1 11242 * commands/cmp.c: Include grub/gzio.h.
11243 (grub_cmd_cmp): Use grub_gzfile_open instead of
11244 grub_file_open.
11245
11246 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
11247 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
11248 grub_file_open.
11249 (grub_rescue_cmd_module): Likewise.
11250
fa46f4b5 112512005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
11252
11253 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
11254 kern/sparc64/ieee1275/init.c because it contains _start.
11255 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
11256
e9211b5d 112572005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
11258
11259 * configure.ac: Add support for sparc64 host with ieee1275
11260 firmware.
11261 * configure: Generated from configure.ac.
11262 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
11263 instead of int.
11264 (grub_ofdisk_read): Likewise.
11265 (grub_ofdisk_open): Use %p to print pointer values, and cast the
11266 pointers as (void *) to remove a warning.
11267 (grub_ofdisk_close): Likewise.
11268 (grub_ofdisk_read): Likewise.
11269 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
11270 returns, so make it return void to remove a warning.
11271 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
11272 Corresponding prototype change.
11273 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
11274 values, and cast the pointers as (void *) to remove a warning.
11275 (grub_mm_dump): Likewise.
11276 * conf/sparc64-ieee1275.mk: New file.
11277 * conf/sparc64-ieee1275.rmk: Likewise.
11278 * include/grub/sparc64/setjmp.h: Likewise.
11279 * include/grub/sparc64/types.h: Likewise.
11280 * include/grub/sparc64/ieee1275/console.h: Likewise.
11281 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11282 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11283 * include/grub/sparc64/ieee1275/time.h: Likewise.
11284 * kern/sparc64/cache.c: Likewise.
11285 * kern/sparc64/dl.c: Likewise.
11286 * kern/sparc64/ieee1275/init.c: Likewise.
11287 * kern/sparc64/ieee1275/openfw.c: Likewise.
11288
385c6a92 112892005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
11290
11291 * util/console.c (grub_ncurses_putchar): If C is greater than
11292 0x7f, set C to a question mark.
11293 (grub_ncurses_getcharwidth): New function.
11294 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
11295 getcharwidth.
11296
11297 * normal/menu.c (print_entry): Made aware of Unicode. First,
11298 convert TITLE to UCS-4, and predict the cursor position by
11299 grub_getcharwidth.
11300
11301 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
11302 const to SRC.
11303 * kern/misc.c (grub_utf16_to_utf8): Likewise.
11304
16ccb8b1 113052005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11306
11307 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
11308 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11309 grub_strcat.
11310
11311 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
11312 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
11313 grub_strcpy and grub_strlen. Take it into account that a space
11314 character is inserted as a delimiter.
11315
6a85ce79 113162005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11317
11318 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
fe6b695a 11319 invalid magic in the error.
6a85ce79 11320
11321 * commands/search.c: New file.
f19dbdb7 11322
6a85ce79 11323 * util/grub-emu.c (main): Call grub_search_init and
11324 grub_search_fini.
11325
11326 * kern/rescue.c (grub_rescue_print_disks): Removed.
11327 (grub_rescue_print_devices): New function.
11328 (grub_rescue_cmd_ls): Use grub_device_iterate with
11329 grub_rescue_print_devices instead of grub_disk_dev_iterate with
11330 grub_rescue_print_disks.
11331
11332 * kern/partition.c (grub_partition_iterate): Return the result of
11333 PARTMAP->ITERATE instead of GRUB_ERRNO.
11334
11335 * kern/device.c: Include grub/partition.h.
11336 (grub_device_iterate): New function.
11337
11338 * include/grub/partition.h (grub_partition_iterate): Return int
11339 instead of grub_err_t.
11340
11341 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
11342 prototype.
11343 [GRUB_UTIL] (grub_search_fini): Likewise.
11344
11345 * include/grub/device.h (grub_device_iterate): New prototype.
11346
11347 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11348 commands/search.c.
11349 (pkgdata_MODULES): Added search.mod.
11350 (search_mod_SOURCES): New variable.
11351 (search_mod_CFLAGS): Likewise.
11352
11353 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
11354 (pkgdata_MODULES): Added search.mod.
11355 (search_mod_SOURCES): New variable.
11356 (search_mod_CFLAGS): Likewise.
11357
11358 * commands/ls.c (grub_ls_list_disks): Renamed to ...
11359 (grub_ls_list_devices): ... this, and use grub_device_iterate.
11360 All callers changed.
11361
11362 * DISTLIST: Added commands/search.c.
11363
ef095434 113642005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
11365
11366 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
11367 conversion.
11368 (grub_getcharwidth): New function.
11369
11370 * kern/misc.c (grub_utf8_to_ucs4): New function.
11371
11372 * include/grub/term.h (struct grub_term): Added a new member
11373 "getcharwidth".
11374 (grub_getcharwidth): New prototype.
11375
11376 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
11377
11378 * term/i386/pc/console.c (map_char): New function. Segregated from
11379 grub_console_putchar.
11380 (grub_console_putchar): Use map_char.
11381 (grub_console_getcharwidth): New function.
11382 (grub_console_term): Specified grub_console_getcharwidth as
11383 getcharwidth.
11384
11385 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
11386 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
11387
11388 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
11389 GRUB_ERRNO.
11390 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
11391 on grub_strtoul completely.
11392 (write_char): Declare local variables in the beginning of the
11393 function.
11394 (grub_vesafb_getcharwidth): New function.
11395 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
11396 getcharwidth.
11397
1f0a95e4 113982005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
11399
11400 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
11401 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
11402 commands/i386/pc/vbetest.c.
11403
11404 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
11405 call grub_vbe_get_controller_info again, because the returned
11406 information is volatile.
11407 (grub_vbe_set_video_mode): Mostly rewritten.
11408 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
11409 grub_vbe_status_t correctly.
11410 (grub_vbe_get_video_mode_info): Likewise.
11411 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
11412 several if statements.
11413
11414 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
11415 * commands/i386/pc/vbeinfo.c: ... this.
11416
11417 * commands/i386/pc/vbe_test.c: Renamed to ...
11418 * commands/i386/pc/vbetest.c: ... this.
11419
11420 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
11421 ...
11422 (grub_cmd_vbeinfo): ... this. Save video modes before
11423 iterating. Skip a video mode, if it is not available, not enough
11424 information is given or it is monochrome. Show the memory
11425 model. Leave the interpretation of MODEVAR to grub_strtoul
11426 completely.
11427 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
11428 (GRUB_MOD_FINI): Likewise.
11429
11430 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
11431 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
11432 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
11433 duplicated grub_env_get. Leave the interpretation of MODEVAR to
11434 grub_strtoul completely.
11435 (real2pm): Removed.
11436 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
11437 (GRUB_MOD_FINI): Likewise.
11438
11439 * normal/misc.c: Include grub/mm.h.
11440
11441 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
11442 vbe_list_modes with vbetest.mod and vbeinfo.mod.
11443 (vbe_list_modes_mod_SOURCES): Removed.
11444 (vbe_list_modes_mod_CFLAGS): Likewise.
11445 (vbe_test_mod_SOURCES): Likewise.
11446 (vbe_test_mod_CFLAGS): Likewise.
11447 (vbeinfo_mod_SOURCES): New variable.
11448 (vbeinfo_mod_CFLAGS): Likewise.
11449 (vbetest_mod_SOURCES): Likewise.
11450 (vbetest_mod_CFLAGS): Likewise.
11451
992ffbbe 114522005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
11453
11454 * normal/misc.c: New file.
11455
11456 * DISTLIST: Added normal/misc.c.
f19dbdb7 11457
992ffbbe 11458 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
11459 DISK to HOOK. Call HOOK with DISK.
11460 * partmap/apple.c (apple_partition_map_iterate): Likewise.
11461 * partmap/pc.c (pc_partition_map_iterate): Likewise.
11462 * partmap/sun.c (sun_partition_map_iterate): Likewise.
11463
11464 * normal/menu_entry.c (struct screen): Added a new member
11465 "completion_shown".
11466 (completion_buffer): New global variable.
11467 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
11468 (store_completion): New function.
11469 (complete): Likewise.
11470 (clear_completions): Likewise.
11471 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
11472 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
11473 a tab, call complete.
11474
11475 * normal/completion.c (disk_dev): Removed.
11476 (print_simple_completion): Likewise.
11477 (print_partition_completion): Likewise.
11478 (print_func): New global variable.
11479 (add_completion): Do not take the arguments WHAT or PRINT any
11480 longer. Added a new argument TYPE. Instead of printing directly,
11481 call PRINT_FUNC if not NULL.
11482 All callers changed.
11483 (complete_device): Use a local variable DEV instead of
11484 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
11485 (grub_normal_do_completion): Take a new argument HOOK. Do not
11486 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
11487 empty string, return NULL instead.
11488 All callers changed.
11489
11490 * normal/cmdline.c (print_completion): New function.
11491
11492 * kern/partition.c (grub_partition_iterate): Add an argument DISK
11493 to HOOK.
11494 All callers changed.
11495
11496 * kern/disk.c (grub_print_partinfo): Removed.
11497
11498 * include/grub/partition.h (struct grub_partition_map): Add a new
11499 argument DISK into HOOK of ITERATE.
11500 (grub_partition_iterate): Add a new argument DISK to HOOK.
11501
11502 * include/grub/normal.h (enum grub_completion_type): New enum.
11503 (grub_completion_type_t): New type.
11504 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
11505 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
11506 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
11507 (GRUB_COMPLETION_TYPE_FILE): Likewise.
11508 (grub_normal_do_completion): Added a new argument HOOK.
11509 (grub_normal_print_device_info): New prototype.
11510
11511 * include/grub/disk.h (grub_print_partinfo): Removed.
11512
11513 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
11514 (normal_mod_SOURCES): Likewise.
11515 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11516 (normal_mod_SOURCES): Likewise.
11517
11518 * commands/ls.c (grub_ls_list_disks): Use
11519 grub_normal_print_device_info instead of grub_print_partinfo. Free
11520 PNAME.
11521 (grub_ls_list_files): Use grub_normal_print_device_info instead of
11522 duplicating the code.
11523
0bd41162 115242005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11525
11526 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
f19dbdb7 11527 follow GCS more precisely.
11528 * commands/i386/pc/vbe_test.c: Likewise.
11529 * include/grub/i386/pc/vbe.h: Likewise.
11530 * term/i386/pc/vesafb.c: Likewise.
11531 * video/i386/pc/vbe.c: Likewise.
0bd41162 11532
6323696a 115332005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
11534
11535 * DISTLIST: Added term/i386/pc/vesafb.c
11536 DISTLIST: Added video/i386/pc/vbe.c
11537 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
11538 DISTLIST: Added commands/i386/pc/vbe_test.c.
11539 * commands/i386/pc/vbe_list_modes.c: New file.
11540 * commands/i386/pc/vbe_test.c: Likewise.
11541 * term/i386/pc/vesafb.c: Likewise.
11542 * video/i386/pc/vbe.c: Likewise.
11543 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
11544 (grub_vbe_probe) Added prototype.
11545 (grub_vbe_set_video_mode) Likewise.
11546 (grub_vbe_get_video_mode) Likewise.
11547 (grub_vbe_get_video_mode_info) Likewise.
11548 (grub_vbe_set_pixel_rgb) Likewise.
11549 (grub_vbe_set_pixel_index) Likewise.
11550 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
11551 (pkgdata_MODULES): Added vesafb.mod.
11552 (pkgdata_MODULES): Added vbe_list_modes.mod.
11553 (pkgdata_MODULES): Added vbe_test.mod.
11554 (vbe_mod_SOURCES): Added.
11555 (vbe_mod_CFLAGS): Likewise.
11556 (vesafb_mod_SOURCES): Likewise.
11557 (vesafb_mod_CFLAGS): Likewise.
11558 (vbe_list_modes_mod_SOURCES): Likewise.
11559 (vbe_list_modes_mod_CFLAGS): Likewise.
11560 (vbe_test_mod_SOURCES): Likewise.
11561 (vbe_test_mod_CFLAGS): Likewise.
11562
0a74e62f 115632005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
11564
0a74e62f 11565 * normal/command.c (grub_command_execute): If INTERACTIVE is
11566 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
11567 CMDLINE. Disable the pager if INTERACTIVE is true.
11568 All callers are changed.
11569
11570 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
11571 before reading a config file.
11572 * normal/main.c (read_config_file): Even if a command is not
11573 found, register it if it is within an entry.
11574
11575 * util/grub-emu.c: Include sys/types.h and unistd.h.
11576 (options): Added --hold.
11577 (struct arguments): Added a new member "hold".
11578 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
11579 missing.
11580 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
11581 cleared by a debugger, if it is not zero.
11582
11583 * include/grub/normal.h (grub_command_execute): Add an argument
11584 INTERACTIVE.
11585
e51f85ae 115862005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
11587
11588 * DISTLIST: Added include/grub/i386/pc/vbe.h.
11589
e9c6f39b 115902005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
11591
11592 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
11593 program with another one, because the old one didn't detect a bug
11594 in gcc-3.4. Always use regparm 2, because the new test is still
11595 not enough for gcc-4.0. Someone must investigate a simple test
11596 case which detects a bug in gcc-4.0.
11597
8de3495c 115982005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
11599
11600 * DISTLIST: Added normal/completion.c.
11601
11602 * normal/completion.c: New file.
f19dbdb7 11603
8de3495c 11604 * term/i386/pc/console.c (grub_console_getwh): New function.
11605 (grub_console_term): Assign grub_console_getwh to getwh.
11606
11607 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
11608 function is defined in normal/completion.c as
11609 grub_normal_do_completion.
11610 (grub_cmdline_get): Use grub_normal_do_completion instead of
11611 grub_tab_complete.
11612
11613 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
11614 returns non-zero, otherwise return 0.
11615 (grub_partition_iterate): First, probe the partition map. Then,
11616 call ITERATE only for this partition map.
11617
11618 * kern/misc.c (grub_strncmp): Rewritten.
11619
11620 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
11621 returns non-zero. Otherwise return 0.
11622
11623 * include/grub/partition.h (grub_partition_map_iterate): Return
11624 int instead of void.
11625
11626 * include/grub/normal.h (grub_normal_do_completion): New prototype.
11627
11628 * include/grub/misc.h (grub_strncmp): Change the type of N to
11629 grub_size_t.
11630
11631 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
11632 of void.
11633
11634 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
fe6b695a 11635 unsigned explicitly before comparing it with I.
8de3495c 11636
11637 * kern/main.c (grub_env_write_root): Add the attribute unused into
11638 VAR.
11639
11640 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
11641 normal/completion.c.
11642 (normal_mod_SOURCES): Likewise.
11643 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11644 (normal_mod_SOURCES): Likewise.
11645
11646 * normal/command.c (grub_iterate_commands): If ITERATE returns
11647 non-zero, return one immediately.
11648
e85e144b 116492005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
11650
11651 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
11652 * kern/i386/pc/startup.S: Updated Global Descriptor table's
11653 descriptions.
11654 (grub_vbe_get_controller_info): New function.
11655 (grub_vbe_get_mode_info): Likewise.
11656 (grub_vbe_set_mode): Likewise.
11657 (grub_vbe_get_mode): Likewise.
11658 (grub_vbe_set_memory_window): Likewise.
11659 (grub_vbe_get_memory_window): Likewise.
11660 (grub_vbe_set_scanline_length): Likewise.
11661 (grub_vbe_get_scanline_length): Likewise.
11662 (grub_vbe_set_display_start): Likewise.
11663 (grub_vbe_get_display_start): Likewise.
11664 (grub_vbe_set_palette_data): Likewise.
11665 * include/grub/i386/pc/vbe.h: New file.
11666
c46153d2 116672005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11668
11669 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11670 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
11671 * DISTLIST: Likewise.
11672 * kern/ieee1275/of.c: Moved to ...
11673 * kern/ieee1275/ieee1275.c: ... here.
11674
0cb90c45 116752005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11676
11677 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
11678 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
11679 Pass 0 as `end' parameter to grub_strtoul().
11680
a19fb360 116812005-08-08 Hollis Blanchard <hollis@penguinppc.org>
11682
11683 * include/grub/powerpc/ieee1275/console.h: Do not include
11684 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
11685 ifdef.
11686 (grub_console_cur_color): Remove i386-specific prototype.
11687 (grub_console_real_putchar): Likewise.
11688 (grub_console_checkkey): Likewise.
11689 (grub_console_getkey): Likewise.
11690 (grub_console_getxy): Likewise.
11691 (grub_console_gotoxy): Likewise.
11692 (grub_console_cls): Likewise.
11693 (grub_console_setcursor): Likewise.
11694 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
11695 Include <grub/machine/console.h>.
11696 * term/ieee1275/ofconsole.c: Likewise.
11697
4ac9bd04 116982005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
11699
11700 * Makefile.in (LIBLZO): New variable.
11701
11702 * configure.ac: Check for LZO version 2.
11703
11704 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
11705 lzo/lzo1x.h instead of lzo1x.h.
11706
11707 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
11708 of -llzo.
11709
11710 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
11711 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
11712
11713 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
11714 copying the data from PARTITION to P.
11715
f4917dfd 117162005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11717
11718 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
11719 negative, unload the module.
11720
11721 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
11722 map is "pc_partition_map" but not "pc".
11723 (usage): Fix the description. The options are --boot-image and
11724 --core-image but not --boot-file or --core-file.
11725 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11726 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
11727 DEFAULT_DIRECTORY.
11728
11729 * util/i386/pc/grub-install.in: Do not specify --boot-file or
11730 --core-file. Specify INSTALL_DEVICE as an argument.
11731
11732 * util/console.c: Include config.h.
11733 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
11734 [HAVE_NCURSES_H]: Include ncurses.h.
11735 [HAVE_CURSES_H]: Include curses.h.
11736 [!A_NORMAL] (A_NORMAL): Defined as zero.
11737 [!A_STANDOUT] (A_STANDOUT): Likewise.
11738
11739 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
11740 -lncurses.
11741 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
11742
11743 * configure.ac: Check for curses libraries and headers.
11744
11745 * Makefile.in (LIBCURSES): New variable.
11746
11747 * genmk.rb (Script::rule): Set the executable bits.
11748
11749 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
11750 name of the PC partition map is "pc_partition_map" but not "pc".
11751
0e143073 117522005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11753
11754 * util/i386/pc/grub-install.in (grub_probefs): New variable.
11755 (modules): Likewise.
11756 (usage): Added descriptions for --modules and --grub-probefs.
11757 Handle --modules and --grub-probefs. Save the arguments in MODULES
11758 and GRUB_PROBEFS, respectively.
11759 Auto-detect a filesystem module against GRUBDIR. If the result is
11760 empty and modules are not specified explicitly, abort the
11761 installation. Add the result to MODULES.
11762
11763 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
11764 disk/powerpc/ieee1275/ofdisk.c,
11765 include/grub/powerpc/ieee1275/init.h and
11766 term/powerpc/ieee1275/ofconsole.c.
11767 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
11768 term/ieee1275/ofconsole.c.
11769
11770 * include/grub/powerpc/ieee1275/console.h: Resurrected.
11771
11772 * COPYING: Upgraded to the latest version. Only the address of the
11773 FSF office has changed.
f19dbdb7 11774
efd6e6d5 117752005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
11776
11777 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
11778 kern/ieee1275.c with kern/ieee1275/of.c.
11779
11780 * kern/ieee1275.c: Moved to ...
11781 * kern/ieee1275/of.c: ... here.
11782
8ceafda2 117832005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
11784
11785 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
fe6b695a 11786 readability.
8ceafda2 11787
11788 * config.guess: Updated to the latest version from gnulib.
11789 * config.sub: Likewise.
11790 * install.sh: Likewise.
11791 * mkinstalldirs: Likewise.
11792
11793 * include/grub/console.h: Removed. This file is arch-specific. Do
11794 not put this in include/grub.
11795
11796 * include/grub/i386/pc/console.h: Resurrected.
11797
11798 * util/console.c: Include grub/machine/console.h instead of
11799 grub/console.h.
11800 * util/grub-emu.c: Likewise.
11801
267f6cd9 118022005-08-04 Marco Gerards <metgerards@student.han.nl>
11803
11804 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
11805 hardcoded value.
f19dbdb7 11806
267f6cd9 11807 From Vincent Pelletier <subdino2004@yahoo.fr>
11808 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
11809 Redefined to use grub_getwh.
11810 (grub_term): New member named getwh.
11811 (grub_getwh): New prototype.
11812 * kern/term.c (grub_getwh): New function.
11813 * term/i386/pc/console.c (grub_console_getwh): New function.
11814 (grub_console_term): New member `getwh'.
11815 * term/i386/pc/vga.c (grub_vga_getwh): New function.
11816 (grub_vga_term): New member `getwh'.
0b5abe02 11817 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 11818 grub_ssize_t.
11819 (grub_ofconsole_getw): New function.
11820 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
11821 (grub_ofconsole_term): New field named getwh and new initial
11822 value.
11823
3be7266d 118242005-08-03 Hollis Blanchard <hollis@penguinppc.org>
11825
11826 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
11827 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
11828 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
11829 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
11830 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
11831 of <grub/machine/ieee1275.h>.
11832 * commands/ieee1275/reboot.c: Likewise.
11833 * boot/powerpc/ieee1275/ieee1275.c: Move ...
11834 * kern/ieee1275.c: ... to here. All users updated. Change all
11835 parameter structs to use new type `grub_ieee1275_cell_t'.
11836 * term/powerpc/ieee1275/ofconsole.c: Move ...
11837 * term/ieee1275/ofconsole.c: ... to here. All users updated.
11838 * disk/powerpc/ieee1275/ofdisk.c: Move ...
11839 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
11840 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
11841 to return int.
11842 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
11843 Remove unused prototypes. All users updated.
11844 * include/grub/powerpc/ieee1275/console.h: Removed.
11845 * include/grub/powerpc/ieee1275/ieee1275.h: Define
11846 `grub_ieee1275_cell_t'.
11847 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
11848 Cast comparisons with -1 to the correct type.
11849 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
11850 type to match `grub_ieee1275_entry_fn'.
11851
8b5f3938 118522005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
11853
11854 * DISTLIST: Added util/i386/pc/grub-probefs.c.
11855
11856 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
11857 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
11858 partmap/sun.c.
11859 (grub_probefs_SOURCES): New variable.
11860
11861 * util/i386/pc/grub-probefs.c: New file.
11862
11863 * util/i386/pc/grub-setup.c (main): Call
11864 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
11865 grub_hfs_init and grub_jfs_init to initialize the system. Call
11866 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
11867 grub_pc_partition_map_fini to finish the system.
11868
ea409713 118692005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
11870
11871 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
11872 function.
11873 (grub_multiboot_load_elf32): Likewise.
11874 (grub_multiboot_is_elf64): Likewise.
11875 (grub_multiboot_load_elf64): Likewise.
11876 (grub_multiboot_load_elf): Likewise.
11877 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
11878 an ELF32 or ELF64 file.
11879 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
11880
11881 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
11882 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
11883 NULL before calling FS->LABEL.
11884 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
11885 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
11886 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
11887 before calling FS->LABEL.
11888
141a288b 118892005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
11890
11891 * util/i386/pc/grub-install.in (datadir): New variable.
11892 (libdir): Removed.
11893 (pkgdatadir): New variable.
11894 (pkglibdir): Removed.
11895
0d5f8a54 118962005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
11897
11898 * DISTLIST: Added util/i386/pc/grub-install.in.
11899
11900 * util/i386/pc/grub-install.in: New file.
11901
11902 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
11903 (grub_install_SOURCES): Likewise.
11904
11905 * genmk.rb: Added support for scripts.
11906 (Script): New class.
11907 (scripts): New variable.
11908
11909 * Makefile.in (install-local): Install sbin_SCRIPTS by
11910 INSTALL_SCRIPT.
11911 (uninstall): Remove sbin_SCRIPTS.
11912
11913 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
11914 device, try to get a GRUB device by
11915 grub_util_biosdisk_get_grub_dev.
11916 Free DEST_DEV.
11917
11918 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
11919 description for --device-map.
11920
5f968e1e 119212005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11922
11923 Change the semantics of variable hooks. They now return strings
11924 instead of error values.
f19dbdb7 11925
5f968e1e 11926 * util/i386/pc/grub-setup.c: Include grub/env.h.
11927 (setup): Use grub_device_set_root instead of grub_env_set.
11928
11929 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
11930 grub_env_get instead of grub_device_set_root and
11931 grub_device_get_root, respectively.
11932
11933 * kern/main.c (grub_env_write_root): New function.
11934 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
11935 grub_env_set instead of grub_device_set_root.
11936
11937 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
11938 many variables.
11939 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
11940 rather than calling ENV->WRITE_HOOK afterwards.
11941 (grub_env_get): Return the result of ENV->READ_HOOK rather than
11942 passing a pointer of a pointer.
11943 (grub_register_variable_hook): Change the types of "read_hook" and
11944 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
11945 respectively.
11946 Allocate the default empty string on the heap, because this string
11947 may be freed later.
11948
11949 * kern/device.c: Include grub/env.h.
11950 (grub_device_set_root): Removed.
11951 (grub_device_get_root): Likewise.
11952 (grub_device_open): Use grub_env_get instead of
11953 grub_device_get_root.
11954
11955 * include/grub/env.h (grub_env_read_hook_t): New type.
11956 (grub_env_write_hook_t): Likewise.
11957 (grub_env_var): Change the types of "read_hook" and "write_hook"
11958 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
11959 (grub_register_variable_hook): Likewise.
11960
11961 * include/grub/device.h (grub_device_set_root): Removed.
11962 (grub_device_set_root): Likewise.
11963
11964 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
11965 make sure that DIRNAME terminates with '/', so that
11966 grub_fat_find_dir will fail if PATH is not a directory.
11967
11968 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
11969 from DIRNAME.
11970 Use the qualifier auto for print_files and print_files_long.
11971 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
11972 as a regular file.
11973 Put a newline only if there is no error.
11974 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
11975 used.
11976
896f0afd 119772005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
11978
11979 * kern/partition.c (grub_partition_probe): Initialize PART to
11980 NULL. Otherwise, when no partition map is registered, this returns
11981 a garbage.
11982
b28b81b2 119832005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
11984
11985 * partmap/apple.c (apple_partition_map_iterate): Check if POS
11986 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
11987 valid.
11988
5f3607e0 119892005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
11990
11991 * commands/ls.c (grub_ls_list_disks): Print the filesystem
11992 information on each device, if it does not have partitions. Print
11993 "Device" instead of "Disk", because this function is not specific
11994 to disk devices.
11995
11996 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
11997 static to ensure that it is put on the memory rather than a
11998 register.
11999
502c87e8 120002005-07-17 Yoshinori Okuji <okuji@enbug.org>
12001
12002 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
12003 (grub_cat_init): Likewise.
12004 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
12005 (options): Likewise.
12006 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
12007 (grub_configfile_init): Likewise.
12008 * font/manager.c (GRUB_MOD_INIT): Likewise.
12009 * commands/help.c (GRUB_MOD_INIT): Likewise.
12010 (grub_help_init): Likewise.
12011 * normal/command.c (grub_command_init): Likewise.
12012 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
12013 * disk/loopback.c (grub_loop_init): Likewise.
12014 (GRUB_MOD_INIT): Likewise.
12015 * commands/ls.c (grub_ls_init): Likewise.
12016 (GRUB_MOD_INIT): Likewise.
12017 (options): Likewise.
12018 * commands/boot.c (grub_boot_init): Likewise.
12019 (GRUB_MOD_INIT): Likewise.
12020 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
12021 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
12022 (GRUB_MOD_INIT): Likewise.
12023 * commands/cmp.c (grub_cmp_init): Likewise.
12024 (GRUB_MOD_INIT): Likewise.
12025
12026 * normal/arg.c: Use <> instead of "" to include header files.
12027 (SHORT_ARG_HELP): New macro.
12028 (SHORT_ARG_USAGE): Likewise.
12029 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
12030 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
12031 descriptions.
12032 (find_short): Check if C is 'h' or 'u' explicitly.
12033 (grub_arg_show_help): Use space characters instead of tabs. Treat
12034 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
12035 are shown with --help and --usage only if they are not used for
12036 the command itself.
12037 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
12038 'h' and 'u'.
12039
12040 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
12041 const into "longarg". Change the type of "shortarg" to int.
12042
f806d18e 120432005-07-17 Yoshinori Okuji <okuji@enbug.org>
12044
12045 * boot/i386/pc/boot.S (boot_drive_check): New label.
12046
12047 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
12048 macro.
12049
12050 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
12051 which do not pass a boot drive correctly. Copied from GRUB Legacy.
12052
e293232b 120532005-07-17 Yoshinori Okuji <okuji@enbug.org>
12054
12055 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
12056 When turning off Gate A20, skip the check and return immediately,
12057 because this is not fatal usually.
12058
ebedfd00 120592005-07-17 Yoshinori Okuji <okuji@enbug.org>
12060
12061 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
12062 be 0x7C00 instead of 0x8000.
12063
12064 * boot/i386/pc/pxeboot.S: Rewritten.
12065
12066 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
12067 EXT_C.
12068 (gate_a20_check_state): Read a byte from 0x108000. Invert the
12069 result.
12070
654fc59f 120712005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
12072
12073 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
12074 robustness. This routine now supports a BIOS call and System
12075 Control Port A to modify the gate A20.
12076
12077 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
12078 Increased to 0x440.
12079
09f9923f 120802005-07-12 Hollis Blanchard <hollis@penguinppc.org>
12081
12082 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
12083 device path and resulting ihandle.
12084 (grub_ofdisk_close): dprintf the ihandle being closed.
12085 (grub_ofdisk_read): dprintf function parameters.
12086 * kern/mm.c (grub_mm_init_region): Likewise.
12087 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
12088 (grub_linux_boot): dprintf the Linux entry point, initrd address and
12089 size, and boot arguments.
12090 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
12091 before loading into memory.
12092 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
12093 before loading into memory.
12094
7ef504d8 120952005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
12096
12097 * kern/mm.c: Added much documentation.
12098 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
12099 8, set to 5 instead of 8.
12100
e0f050c2 121012005-07-10 Yoshinori Okuji <okuji@enbug.org>
12102
12103 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
12104
12105 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
12106 (grub_mkdevicemap_SOURCES): New variable.
12107
12108 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
12109 lib/device.c of GRUB Legacy.
12110
7224189a 121112005-07-10 Yoshinori Okuji <okuji@enbug.org>
12112
12113 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
12114 instead of PATH is NULL.
12115
68c864eb 121162005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
12117
12118 * commands/cmp.c (BUFFER_SIZE): New macro.
12119 (grub_cmd_cmp): Close the right file at the right time. Compare
12120 only data just read. Don't report files of different size as
12121 identical. Dynamically allocate buffers. Move variable
12122 declarations at the beginning of function.
12123
e6f3e614 121242005-07-09 Yoshinori Okuji <okuji@enbug.org>
12125
12126 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
12127 reverse.
12128
f8f1559a 121292004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
12130
12131 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
12132 when backspace is pressed at beginning of line.
12133
39c9d41d 121342005-07-03 Yoshinori Okuji <okuji@enbug.org>
12135
12136 * DISTLIST: Added genfslist.sh.
12137
12138 * normal/main.c (fs_module_list): New variable.
12139 (autoload_fs_module): New function.
12140 (read_fs_list): Likewise.
12141 (grub_normal_execute): Call read_fs_list.
12142
12143 * kern/fs.c (grub_fs_autoload_hook): New variable.
12144 (grub_fs_probe): Added support for auto-loading.
12145
12146 * include/grub/normal.h (struct grub_fs_module_list): New struct.
12147 (grub_fs_module_list_t): New type.
12148
12149 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
12150 (grub_fs_autoload_hook): New prototype.
12151
12152 * genfslist.sh: New file.
f19dbdb7 12153
39c9d41d 12154 * genmk.rb: Added a rule to generate a filesystem list.
12155
121c1d83 121562005-06-30 Marco Gerards <metgerards@student.han.nl>
12157
12158 * configure.ac: Fix the test for cross-compiling.
12159
12160 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
12161 define GRUB_UTIL anymore.
12162
12163 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
12164 so this function works on other systems than just big endian.
12165 (load_modules): Likewise.
12166 (add_segments): Likewise.
12167
e75d76e1 121682005-06-23 Hollis Blanchard <hollis@penguinppc.org>
12169
12170 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
12171 contains `l' modifier, get a long from va_arg().
12172
50b5a0a7 121732005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
12174
12175 * kern/mm.c (grub_free): If the next free block which is being
12176 merged is the first free block, set the first block to the block
12177 being freed.
12178 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
12179
89371b20 121802005-05-08 Hollis Blanchard <hollis@penguinppc.org>
12181
12182 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
12183 `grub_ieee1275_chosen'.
12184
168d6e58 121852005-05-08 Hollis Blanchard <hollis@penguinppc.org>
12186
12187 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
12188 (grub_ieee1275_chosen): New variable.
12189 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
12190 `chosen'.
12191 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
12192 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
12193 Rename first argument to `phandle' for consistency.
12194 (grub_ieee1275_get_property_length): Likewise.
12195 (grub_ieee1275_next_property): Likewise. Change type of first argument
12196 to grub_ieee1275_phandle_t.
12197 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
12198 Move export next to declaration.
12199 (grub_ieee1275_chosen): New variable.
12200 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
12201 Correct cosmetic typo.
12202 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
12203 `grub_ieee1275_chosen'.
12204 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
12205 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
12206 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
12207 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
12208 `grub_ieee1275_chosen'.
12209
ca5baa3f 122102005-05-10 Hollis Blanchard <hollis@penguinppc.org>
12211
12212 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
12213 /chosen/bootargs.
12214 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
12215 /chosen/bootargs as "variable=value" pairs.
12216
708b345f 122172005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
12218
12219 * include/grub/misc.h (grub_dprintf): New macro.
12220 (grub_real_dprintf): New prototype.
12221 (grub_strword): Likewise.
12222 (grub_iswordseparator): Likewise.
12223 * kern/misc.c (grub_real_dprintf): New function.
12224 (grub_strword): Likewise.
12225 (grub_iswordseparator): Likewise.
12226
f4c5e67c 122272005-04-30 Hollis Blanchard <hollis@penguinppc.org>
12228
12229 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
12230 (roundup): Remove macro.
12231 (grub_ieee1275_flags): Make static.
12232 (grub_ieee1275_realmode): Remove.
12233 (grub_ieee1275_test_flag): New function.
12234 (grub_ieee1275_set_flag): Likewise.
12235 (find_options): Rename to `grub_ieee1275_find_options'; update
12236 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
12237 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
12238 (cmain): New prototype.
12239 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
12240 `grub_ieee1275_flags' directly.
12241 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
12242 machine/biosdisk.h.
12243 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
12244 Don't include grub/machine/init.h.
12245 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
12246 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
12247 Remove prototype.
12248 (grub_ieee1275_realmode): Likewise.
12249 (grub_ieee1275_flag): New enum.
12250 (grub_ieee1275_test_flag): New prototype.
12251 (grub_ieee1275_set_flag): New prototype.
12252 * include/grub/powerpc/ieee1275/init.h: Remove file.
12253 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
12254 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
12255 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
12256 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
12257 comment.
12258 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
12259 `grub_ieee1275_test_flag'.
12260 (grub_ieee1275_encode_devname): Likewise.
12261
ed16607e 122622005-04-21 Hollis Blanchard <hollis@penguinppc.org>
12263
12264 * include/grub/powerpc/ieee1275/ieee1275.h
12265 (grub_ieee1275_encode_devname): New prototype.
12266 (grub_ieee1275_get_filename): Likewise.
12267 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
12268 function.
12269 (grub_set_prefix): Likewise.
12270 (grub_machine_init): Call grub_set_prefix.
12271 * kern/powerpc/ieee1275/openfw.c: Fix typos.
12272 (grub_parse_type): New enum.
12273 (grub_ieee1275_get_devargs): New function.
12274 (grub_ieee1275_get_devname): Likewise.
12275 (grub_ieee1275_parse_args): Likewise.
12276 (grub_ieee1275_get_filename): Likewise.
12277 (grub_ieee1275_encode_devname): Likewise.
12278
be369920 122792005-03-30 Marco Gerards <metgerards@student.han.nl>
12280
12281 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
12282 `grub_loader_unset'.
12283
a5ce3a4a 122842005-03-26 Hollis Blanchard <hollis@penguinppc.org>
12285
12286 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
12287 instead of grub_ieee1275_interpret.
12288 (grub_halt_init): New function.
12289 (grub_halt_fini): Likewise.
12290 (GRUB_MOD_INIT): Correct message grammar.
12291 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
12292 instead of grub_ieee1275_interpret.
12293 (grub_reboot_init): New function.
12294 (grub_reboot_fini): Likewise.
12295 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
12296 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
12297 util/i386/pc/misc.c with commands/ieee1275/halt.c,
12298 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
12299 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
12300 function.
12301 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
12302 Add prototype.
12303 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
12304 prototype.
12305 (grub_halt): Likewise.
12306 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
12307 (cmain): Remove __attribute__((unused)).
12308 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
12309 (grub_heap_len): Likewise.
12310 (grub_machine_fini): New function.
12311 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
12312 (grub_halt): Likewise.
12313 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
12314 function.
12315 * util/powerpc/ieee1275/misc.c: New file.
12316
0058f771 123172005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
12318
12319 * DISTLIST: New file.
12320 * gendistlist.sh: Likewise.
f19dbdb7 12321
0058f771 12322 * Makefile.in (COMMON_DISTFILES): Removed.
12323 (BOOT_DISTFILES): Likewise.
12324 (CONF_DISTFILES): Likewise.
12325 (DISK_DISTFILES): Likewise.
12326 (FS_DISTFILES): Likewise.
12327 (INCLUDE_DISTFILES): Likewise.
12328 (KERN_DISTFILES): Likewise.
12329 (LOADER_DISTFILES): Likewise.
12330 (TERM_DISTFILES): Likewise.
12331 (UTIL_DISTFILES): Likewise.
12332 (DISTFILES): Likewise.
12333 (uninstall): Uninstall files in $(pkgdata_DATA).
12334 (DISTLIST): New target.
12335 (distdir): Use the contents of the file DISTLIST to get a list of
12336 distributed files.
12337
46b3b8a5 123382005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
12339
12340 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
12341 descriptor. This is ported from GRUB Legacy.
12342
12343 * gencmdlist.sh: Added an extra semicolon to make it work with
12344 old sed versions. Reported by Robert Bihlmeyer
12345 <robbe@orcus.priv.at>.
12346
5822ff87 123472005-03-08 Yoshinori Okuji <okuji@enbug.org>
12348
12349 Automatic loading of commands is supported.
f19dbdb7 12350
5822ff87 12351 * normal/main.c (read_command_list): New function.
12352 (grub_normal_execute): Call read_command_list.
12353
12354 * normal/command.c (grub_register_command): Return zero or CMD.
12355 Allocate CMD->NAME from the heap.
12356 Initialize CMD->MODULE_NAME to zero.
12357 Find the same name as well. If the same command is found and it is
12358 a dummy command, overwrite members. If it is not a dummy command,
12359 return zero.
12360 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
12361 (grub_command_find): If a dummy command is found, load a module
12362 and retry to find a command only once.
12363
12364 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
12365 make sure that each command is loaded.
12366
12367 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
12368 macro.
12369 (struct grub_command): Remove const from the member `name'.
12370 Add a new member `module_name'.
12371 (grub_register_command): Return grub_command_t.
12372
12373 * commands/help.c (grub_cmd_help): Call grub_command_find to make
12374 sure that each command is loaded.
12375
12376 * genmk.rb (PModule::rule): Specify a module name without the
12377 suffix ".mod" to gencmdlist.sh.
12378
7b1f4b57 123792005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12380
12381 * gencmdlist.sh: New file.
f19dbdb7 12382
7b1f4b57 12383 * genmk.rb (PModule::rule): Generate a rule for a command list.
12384 Clean command.lst.
12385 Generate command.lst from $(COMMANDFILES).
12386
12387 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
12388 (DATA): Added $(pkgdata_DATA).
12389 (install-local): Install files in $(pkgdata_DATA).
12390
062aaf39 123912005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
12392
12393 * term/i386/pc/vga.c (debug_command): Removed.
12394 (GRUB_MOD_INIT): Do not register the command "debug".
12395
12396 From Hollis Blanchard:
12397 * commands/configfile.c: New file.
12398 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12399 commands/configfile.c.
12400 (pkgdata_MODULES): Added configfile.mod.
12401 (configfile_mod_SOURCES): New variable.
12402 (configfile_mod_CFLAGS): Likewise.
12403 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
12404 commands/configfile.c.
12405 (pkgdata_MODULES): Added configfile.mod.
12406 (configfile_mod_SOURCES): New variable.
12407 (configfile_mod_CFLAGS): Likewise.
12408 * util/grub-emu.c (main): Call grub_configfile_init and
12409 grub_configfile_fini.
12410 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
12411 prototype.
12412 [GRUB_UTIL] (grub_configfile_fini): Likewise.
f19dbdb7 12413
cee01aa6 124142005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12415
12416 * normal/arg.c (grub_arg_show_help): Do not show the bug report
12417 address.
12418
12419 * commands/help.c (grub_cmd_help): Do not print newlines after
12420 the last command in print_command_help.
12421
93f3a1d8 124222005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
12423
12424 * commands/default.h: New file.
12425 * commands/timeout.h: Likewise.
12426 * normal/context.c: Likewise.
f19dbdb7 12427
93f3a1d8 12428 * util/misc.c: Do not include sys/times.h.
12429 Include sys/time.h and grub/machine/time.h.
12430 (grub_get_rtc): Rewritten with gettimeofday.
12431
12432 * util/grub-emu.c (main): Call grub_default_init and
12433 grub_timeout_init before grub_normal_init, and call
12434 grub_timeout_fini and grub_default_fini after grub_main.
12435
12436 * util/console.c (grub_ncurses_checkkey): Return the read
12437 character or -1.
12438
12439 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
12440 timeouts.
12441
12442 * normal/main.c (read_config_file): Push MENU. If this fails,
12443 print an error and wait for a user input.
12444 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
12445 If a menu is empty or an error occurs, pop MENU.
12446 (grub_normal_execute): Pop and free MENU after grub_menu_run
12447 returns.
12448
12449 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
12450
12451 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
12452 include time.h.
12453 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12454 without GRUB_UTIL.
12455 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
12456 time.h.
12457 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
12458 without GRUB_UTIL.
12459
12460 * include/grub/normal.h (struct grub_menu_list): New struct.
12461 (grub_menu_list_t): New type.
12462 (struct grub_context): New struct.
12463 (grub_context_t): New type.
12464 (grub_register_command): Got rid of EXPORT_FUNC.
12465 (grub_unregister_command): Likewise.
12466 (grub_context_get): New prototype.
12467 (grub_context_get_current_menu): Likewise.
12468 (grub_context_push_menu): Likewise.
12469 (grub_context_pop_menu): Likewise.
12470 [GRUB_UTIL] (grub_default_init): Likewise.
12471 [GRUB_UTIL] (grub_default_fini): Likewise.
12472 [GRUB_UTIL] (grub_timeout_init): Likewise.
12473 [GRUB_UTIL] (grub_timeout_fini): Likewise.
12474
12475 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
12476 commands/timeout.c and normal/context.c.
12477 (pkgdata_MODULES): Added default.mod and timeout.mod.
12478 (normal_mod_SOURCES): Added normal/context.c.
12479 (default_mod_SOURCES): New variable.
12480 (default_mod_CFLAGS): Likewise.
12481 (timeout_mod_SOURCES): Likewise.
12482 (timeout_mod_CFLAGS): Likewise.
12483 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
12484 conf/i386-pc.rmk.
12485 (pkgdata_MODULES): Added default.mod and timeout.mod.
12486 (normal_mod_SOURCES): Added normal/context.c.
12487 (default_mod_SOURCES): New variable.
12488 (default_mod_CFLAGS): Likewise.
12489 (timeout_mod_SOURCES): Likewise.
12490 (timeout_mod_CFLAGS): Likewise.
12491
12492 * Makefile.in (all-local): Added $(MKFILES).
12493
4ed2e1dd 124942005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
12495
12496 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
12497 (grub_emu_SOURCES): Likewise.
12498 (pkgdata_MODULES): Add `sun.mod'.
12499 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12500 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12501 `partmap/sun.c'.
12502 (pkgdata_MODULES): Add `sun.mod'.
12503 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
12504 * include/grub/partition.h (grub_sun_partition_map_init): New
12505 prototype.
12506 (grub_sun_partition_map_fini): Likewise.
12507 * partmap/sun.c: New file.
12508 * util/grub-emu.c (main): Initialize and de-initialize the sun
12509 partitionmap support.
12510
4d4e372e 125112005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
12512
12513 This implements an Emacs-like menu entry editor.
f19dbdb7 12514
4d4e372e 12515 * normal/menu_entry.c: New file.
f19dbdb7 12516
4d4e372e 12517 * util/console.c (grub_ncurses_putchar): Translate some Unicode
12518 characters to ASCII.
12519 (saved_char): New variable.
12520 (grub_ncurses_checkkey): Rewritten completely.
12521 (grub_ncurses_getkey): Likewise.
12522 (grub_ncurses_init): Call raw instead of cbreak.
12523
12524 * normal/menu.c (print_entry): Do not put a space.
12525 (init_page): Renamed to ...
12526 (grub_menu_init_page): ... this. All callers changed.
12527 (edit_menu_entry): Removed.
12528 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
12529
12530 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
12531
12532 * kern/misc.c (grub_vprintf): Call grub_refresh.
12533
12534 * normal/menu.c (DISP_LEFT): Renamed to ...
12535 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
12536 * normal/menu.c (DISP_UP): Renamed to ...
12537 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
12538 * normal/menu.c (DISP_RIGHT): Renamed to ...
12539 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
12540 * normal/menu.c (DISP_DOWN): Renamed to ...
12541 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
12542 * normal/menu.c (DISP_HLINE): Renamed to ...
12543 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
12544 * normal/menu.c (DISP_VLINE): Renamed to ...
12545 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
12546 * normal/menu.c (DISP_UL): Renamed to ...
12547 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
12548 * normal/menu.c (DISP_UR): Renamed to ...
12549 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
12550 * normal/menu.c (DISP_LL): Renamed to ...
12551 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
12552 * normal/menu.c (DISP_LR): Renamed to ...
12553 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
12554 * normal/menu.c (TERM_WIDTH): Renamed to ...
12555 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
12556 * normal/menu.c (TERM_HEIGHT): Renamed to ...
12557 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
12558 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
12559 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
12560 * normal/menu.c (TERM_MARGIN): Renamed to ...
12561 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
12562 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
12563 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
12564 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
12565 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
12566 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
12567 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
12568 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
12569 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
12570 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
12571 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
12572 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
12573 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
12574 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
12575 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
12576 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
12577 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
12578 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
12579 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
12580 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
12581 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
12582 All callers changed.
12583
12584 * include/grub/normal.h: New prototype.
12585
12586 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12587 normal/menu_entry.c.
12588 (normal_mod_SOURCES): Likewise.
12589 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12590 (normal_mod_SOURCES): Likewise.
12591
e6b92c8a 125922005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
12593
12594 * include/grub/normal.h (grub_halt_init): New prototype.
12595 (grub_halt_fini): Likewise.
12596 (grub_reboot_init): Likewise.
12597 (grub_reboot_fini): Likewise.
12598
12599 * util/grub-emu.c: Include signal.h.
12600 (main_env): New global variable.
12601 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
12602 catch C-c.
12603 (grub_machine_fini): New function.
12604 (main): Call grub_halt_init and grub_reboot_init before
12605 grub_main, and grub_reboot_fini and grub_halt_fini after it.
12606 Call setjmp with MAIN_ENV to go back afterwards.
12607 Call grub_machine_fini right before return.
12608
12609 * include/grub/util/misc.h: Include setjmp.h.
12610 (main_env): New prototype.
12611
12612 * include/grub/kernel.h (grub_machine_fini): New prototype.
12613 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
12614 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
12615
12616 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
12617 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
12618 * term/i386/pc/console.c (grub_console_fini): Likewise.
f19dbdb7 12619
e6b92c8a 12620 * util/i386/pc/misc.c: New file.
f19dbdb7 12621
e6b92c8a 12622 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12623 util/i386/pc/misc.c, commands/i386/pc/halt.c and
12624 commands/i386/pc/reboot.c.
12625
c642636f 126262005-02-14 Guillem Jover <guillem@hadrons.org>
12627
12628 * include/grub/dl.h (grub_dl_check_header): New prototype.
12629 (grub_arch_dl_check_header): Change return type to grub_err_t,
12630 remove size parameter and export function. Update all callers.
12631 * kern/dl.c (grub_dl_check_header): New function.
12632 (grub_dl_load_core): Use `grub_dl_check_header' instead of
12633 `grub_arch_dl_check_header'. Check ELF type. Check if sections
12634 are inside the core.
12635 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
12636 independent ELF header checks.
12637 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12638 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
12639 `grub_dl_check_header' instead of explicit checks. Check for the
12640 ELF type.
12641 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
12642 `grub_dl_check_header' instead of explicit checks. Remove arch
12643 specific ELF header checks.
12644
e6b92c8a 12645 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
12646 argument SIZE.
12647
5eabe94b 126482005-02-13 Hollis Blanchard <hollis@penguinppc.org>
12649
12650 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
12651 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
12652
1b14a681 126532005-02-12 Hollis Blanchard <hollis@penguinppc.org>
12654
12655 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
f19dbdb7 12656 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1b14a681 12657 (part_map_iterate): Clear `grub_errno' and return 0 if
f19dbdb7 12658 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1b14a681 12659 * partmap/amiga.c (amiga_partition_map_iterate): Return
12660 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
12661 * partmap/apple.c (apple_partition_map_iterate): Likewise.
12662
aca108aa 126632005-02-01 Guillem Jover <guillem@hadrons.org>
12664
12665 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
12666 help info.
12667
c9f9c556 126682005-01-31 Marco Gerards <metgerards@student.han.nl>
12669
12670 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
12671 Removed prototype.
12672 (grub_rescue_cmd_linux): New prototype.
12673 (grub_rescue_cmd_initrd): Likewise.
12674 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
12675 `bi_rec'.
12676 (grub_linux_release_mem): Release the memory for the initrd.
12677 (grub_load_linux): Renamed from this...
12678 (grub_rescue_cmd_linux): ...To this. Changed all callers.
12679 Changed `entry' not to be static. Loop over memory regions to
12680 find another one when the default fails.
12681 (grub_rescue_cmd_initrd): New function.
12682 (grub_linux_init): Remove function.
12683 (grub_linux_fini): Likewise.
12684 (GRUB_MOD_INIT): Register `initrd'.
12685 (GRUB_MOD_FINI): Unregister `initrd'.
12686 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
12687 Function removed.
12688 (grub_linux_normal_fini): Likewise.
12689 (GRUB_MOD_INIT): Register `initrd'.
12690 (GRUB_MOD_FINI): Unregister `initrd'.
12691
990cf3aa 126922005-01-31 Marco Gerards <metgerards@student.han.nl>
12693
12694 * commands/help.c: New file.
12695 * normal/arg.c (show_help): Renamed to...
12696 (grub_arg_show_help): ... this.
12697 * commands/i386/pc/halt.c: New file.
12698 * commands/i386/pc/reboot.c: Likewise.
12699 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
12700 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
12701 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
12702 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
12703 variables.
12704 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12705 `commands/help.c'.
12706 (pkgdata_MODULES): Add `help.mod'.
12707 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
12708 * grub/i386/pc/init.h (grub_reboot): New prototype.
12709 (grub_halt): Likewise.
12710 * include/grub/normal.h (grub_arg_show_help): New prototype.
12711 (grub_help_init): Likewise.
12712 (grub_help_fini): Likewise.
12713 * util/grub-emu.c (main): Initialize and deinitialize the help
12714 command.
12715
12716 * normal/cmdline.c (grub_cmdline_get): Doc fix.
12717
12718 * normal/command.c (grub_command_init): Fixed the description of
12719 the `set' and `unset' commands.
12720
127212005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 12722
12723 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
12724 function.
12725 * commands/ieee1275/halt.c: New file.
12726 * commands/ieee1275/reboot.c: Likewise.
12727 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
12728 `__attribute__ ((unused))'. Some GCS related fixed.
12729 (grub_suspend_init) [GRUB_UTIL]: Function removed.
12730 (grub_suspend_fini): Likewise.
12731 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
12732 and `halt.mod'.
12733 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
12734 (halt_mod_CFLAGS): New variables.
12735 * include/grub/powerpc/ieee1275/ieee1275.h
12736 (grub_ieee1275_interpret): New prototype.
12737
1ab09cc7 127382005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
12739
12740 * include/grub/misc.h (memmove): New prototype.
12741 (memcpy): Likewise.
12742
8b8cbdb2 127432005-01-22 Hollis Blanchard <hollis@penguinppc.org>
12744
12745 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
12746 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
12747
e3741a27 127482005-01-22 Marco Gerards <metgerards@student.han.nl>
12749
12750 * kern/misc.c (grub_strndup): Function rewritten.
12751
776bd780 127522005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
12753
12754 * normal/menu.c (TERM_WIDTH): Macro redefined.
12755 (TERM_TOP_BORDER_Y): Likewise.
12756 (draw_border): Replaced while-loop by a for-loop. Make the number
12757 of lines consistent with the number of lines displayed in
12758 print_entries. Added a margin below the rectangle.
12759 (print_entry): Make the entry fit in the rectangle.
12760 (print_entries): Display the scroll arrows next to the right
12761 border.
12762
78026bce 127632005-01-21 Marco Gerards <metgerards@student.han.nl>
12764
12765 * fs/minix.c (grub_minix_find_file): Reserve more space for
12766 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
12767 `grub_strncpy' to copy `path' into it.
12768
67bbaf0f 127692005-01-21 Marco Gerards <metgerards@student.han.nl>
12770
12771 Add the loopback device, a device via which files can be accessed
12772 as devices.
f19dbdb7 12773
67bbaf0f 12774 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
12775 (pkgdata_MODULES): Add loopback.mod.
12776 (loopback_mod_SOURCES): New variable.
12777 (loopback_mod_CFLAGS): Likewise.
12778 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
12779 `disk/loopback.c'.
12780 (pkgdata_MODULES): Add loopback.mod.
12781 (loopback_mod_SOURCES): New variable.
12782 (loopback_mod_CFLAGS): Likewise.
12783 * disk/loopback.c: new file.
12784 * include/grub/normal.h (grub_loop_init): New prototype.
12785 (grub_loop_fini): New prototype.
12786 * util/grub-emu.c (main): Initialize and de-initialize loopback
12787 support.
12788 * include/grub/disk.h (grub_disk_dev_id): Add
12789 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
12790
6f1c18bd 127912005-01-20 Hollis Blanchard <hollis@penguinppc.org>
12792
12793 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
12794 function.
12795 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
12796 (suspend_mod_SOURCES): New variable.
12797 (suspend_mod_CFLAGS): Likewise.
12798 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
12799 New prototype.
12800 * commands/ieee1275/suspend.c: New file.
12801
b38551da 128022005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
12803
12804 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
f19dbdb7 12805 ((unused))' to `__attribute__ ((used))'.
b38551da 12806 (GRUB_MOD_FINI): Likewise.
12807 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
12808 * genmk.rb (PModule): Assign space to common symbols when linking
12809 modules.
12810
777aff39 128112005-01-20 Marco Gerards <metgerards@student.han.nl>
12812
12813 * include/grub/mm.h (grub_mm_init_region): Change the type of the
12814 `unsigned' arguments to `grub_size_t'.
12815 (grub_malloc): Likewise.
12816 (grub_realloc): Likewise.
12817 (grub_memalign): Likewise.
12818 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
12819 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
12820 * util/misc.c (grub_malloc): Likewise.
12821 (grub_realloc): Likewise.
12822 * kern/mm.c (get_header_from_pointer): Change the casts to
12823 `unsigned' into a cast to `grub_size_t'.
12824
12825 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
12826 point to `currnode' when `currnode' is changed.
12827
12828 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
12829 Schottelius <nico-linux@schottelius.org>.
12830
d0ff18e1 128312005-01-09 Hollis Blanchard <hollis@penguinppc.org>
12832
12833 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
12834 (note_path): Remove variable.
12835 (GRUB_IEEE1275_NOTE_NAME): New macro.
12836 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
12837 (grub_ieee1275_note_hdr): New structure.
12838 (grub_ieee1275_note_desc): Likewise.
12839 (grub_ieee1275_note): Likewise.
12840 (load_note): Remove `dir' argument. All callers updated. Remove
12841 `note_img' and `path'. Do not load a file from `note_path'.
12842 Initialize a struct grub_ieee1275_note and write that to `out'.
12843 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
12844
4ca7004c 128452005-01-05 Marco Gerards <metgerards@student.han.nl>
12846
12847 * util/misc.c (grub_util_read_image): Revert last change. It
12848 called `grub_util_read_at', which seeks from the beginning of the
12849 file.
12850
0b412211 128512005-01-04 Hollis Blanchard <hollis@penguinppc.org>
12852
12853 * TODO: Add note about endianness in grub-mkimage.
12854 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
12855 section.
12856 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
12857 (grub_mkimage_SOURCES): New target.
12858 * include/grub/kernel.h (grub_start_addr): Remove variable.
12859 (grub_end_addr): Likewise.
12860 (grub_total_module_size): Likewise.
12861 (grub_kernel_image_size): Likewise.
12862 (GRUB_MODULE_MAGIC): New constant.
12863 (grub_module_info): New structure.
12864 (grub_arch_modules_addr): New prototype.
12865 (grub_get_end_addr): Remove prototype.
12866 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
12867 * include/grub/powerpc/ieee1275/kernel.h: New file.
12868 * include/grub/util/misc.h (grub_util_get_fp_size): New
12869 prototype.
12870 (grub_util_read_at): Likewise.
12871 (grub_util_write_image_at): Likewise.
12872 * kern/main.c (grub_get_end_addr): Remove function.
12873 (grub_load_modules): Call grub_arch_modules_addr instead of using
12874 grub_end_addr. Look for a grub_module_info struct in memory. Use
12875 the grub_module_info fields instead of calling grub_get_end_addr
12876 as loop conditions. Move grub_add_unused_region code here.
12877 (grub_add_unused_region): Remove function.
12878 * kern/i386/pc/init.c: Include grub/cache.h.
12879 (grub_machine_init): Remove call to grub_get_end_addr. Remove
12880 one call to add_mem_region.
12881 (grub_arch_modules_addr): New function.
12882 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
12883 (grub_total_module_size): Likewise.
12884 Include grub/machine/kernel.h.
12885 (grub_arch_modules_addr): New function.
12886 * util/grub-emu.c (grub_end_addr): Remove variable.
12887 (grub_total_module_size): Likewise.
12888 (grub_arch_modules_addr): New function.
12889 * util/misc.c: Include unistd.h.
12890 (grub_util_get_fp_size): New function.
12891 (grub_util_read_at): Likewise.
12892 (grub_util_write_image_at): Likewise.
12893 (grub_util_read_image): Call grub_util_read_at.
12894 (grub_util_write_image): Call grub_util_write_image_at.
12895 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
12896 additional memory in kernel_img for a struct grub_module_info.
12897 Fill in that grub_module_info.
12898 * util/powerpc/ieee1275/grub-mkimage.c: New file.
12899
458786f8 129002005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12901
12902 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
12903 New function.
12904 * include/grub/powerpc/ieee1275/ieee1275.h
12905 (grub_ieee1275_milliseconds): New prototype.
12906 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
12907 Change to 1000.
12908 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
12909 grub_ieee1275_milliseconds.
12910
ac507d1b 129112005-01-03 Hollis Blanchard <hollis@penguinppc.org>
12912
12913 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
12914 variable.
12915 (find_options): New function.
12916 (cmain): Call find_options.
12917 * include/grub/powerpc/ieee1275/ieee1275.h
12918 (grub_ieee1275_realmode): New extern variable.
12919 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
12920 grub_map if grub_ieee1275_realmode is false.
12921
6b8fd1c4 129222004-12-29 Marco Gerards <metgerards@student.han.nl>
12923
12924 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
12925 lines are inserted and make it work like readline. Reported by
12926 Vincent Pelletier <subdino2004@yahoo.fr>.
12927
8514a1e0 129282004-12-28 Marco Gerards <metgerards@student.han.nl>
12929
12930 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
12931
12932 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
12933 `kern/powerpc/cache.S'.
12934
924b6140 129352004-12-27 Marco Gerards <metgerards@student.han.nl>
12936
12937 * genmk.rb: Handle the `Program' class in the main loop. Written
12938 by Johan Rydberg <jrydberg@gnu.org>.
12939 (Program): New class.
12940 (programs): New variable.
12941 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
12942 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
12943 instead of "grub/kernel.h". Include <grub/machine/init.h>.
12944 (help_arch): Function removed.
12945 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
12946 `powerpc/libgcc.h' and `loader.h'.
12947 (pkgdata_PROGRAMS): New variable.
12948 (sbin_UTILITIES): Variable removed.
12949 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
12950 (grubof_SOURCES): Variable re-defined so it only includes the
12951 core functionality.
12952 (grubof_CFLAGS): Remove `-DGRUBOF'.
12953 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
12954 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
12955 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
12956 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
12957 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
12958 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
12959 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
12960 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
12961 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
12962 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
12963 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
12964 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
12965 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
12966 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
12967 (pc_mod_CFLAGS): New variables.
12968 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
12969 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
12970 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
12971 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
12972 Moved from here...
12973 * include/grub/i386/pc/init.h (grub_os_area_addr)
12974 (rub_os_area_size): ... to here.
12975 * include/grub/powerpc/ieee1275/ieee1275.h
12976 (grub_ieee1275_entry_fn): Export symbol.
12977 * include/grub/powerpc/ieee1275/init.h: New file.
12978 * include/grub/powerpc/libgcc.h: Likewise.
12979 * include/grub/cache.h: Likewise.
12980 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
12981 <hollis@penguinppc.org>.
12982 * kern/dl.c: Include <grub/cache.h>.
12983 (grub_dl_flush_cache): New function.
12984 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
12985 for this module.
12986 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
12987 (grub_console_init): Removed prototypes.
12988 (grub_machine_init): Don't initialize the modules anymore.
12989 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
12990 static.
12991 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
12992 Macro undef removed.
12993 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
12994 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
12995 relocation `R_PPC_REL32'. Return an error when the relocation is
12996 unknown.
12997 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
12998 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
12999 * util/misc.c (grub_arch_sync_caches): Likewise.
13000
e4b47e0c 130012004-12-19 Marco Gerards <metgerards@student.han.nl>
13002
13003 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
13004 `symlist.c', add `grubof_symlist.c'.
13005 (symlist.c): Variable removed.
13006 (grubof_HEADERS): Variable added.
13007 (grubof_symlist.c): New target.
13008 (kernel_syms.lst): Use `grubof_HEADERS' instead of
13009 `kernel_img_HEADERS'.
13010 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
13011 * kern/powerpc/dl.c: New file.
13012 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
13013 Function removed.
13014 (grub_arch_dl_relocate_symbols): Likewise.
13015 (grub_register_exported_symbols): Likewise.
13016
4ceb3636 130172004-12-13 Marco Gerards <metgerards@student.han.nl>
13018
13019 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
13020 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
13021 to fail instead. Reported by Vincent Pelletier
13022 <subdino2004@yahoo.fr>.
13023
13024 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
13025 it is not allocated. Reported by Vincent Pelletier
13026 <subdino2004@yahoo.fr>.
13027
13028 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
13029 output so the output looks better.
f19dbdb7 13030
3f1578fe 130312004-12-04 Marco Gerards <metgerards@student.han.nl>
13032
13033 Modulize the partition map support and add support for the amiga
13034 partition map.
f19dbdb7 13035
3f1578fe 13036 * commands/ls.c: Include <grub/partition.h> instead of
13037 <grub/machine/partition.h>.
13038 * kern/disk.c: Likewise.
13039 * kern/rescue.c: Likewise.
13040 * loader/i386/pc/chainloader.c: Likewise.
13041 * normal/cmdline.c: Likewise.
13042 * kern/powerpc/ieee1275/init.c: Likewise.
13043 (grub_machine_init): Call `grub_pc_partition_map_init',
13044 `grub_amiga_partition_map_init' and
13045 `grub_apple_partition_map_init'.
13046 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
13047 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
13048 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
13049 `partition.h' and `pc_partition.h'.
13050 (grub_setup_SOURCES): Remove
13051 `disk/i386/pc/partition.c'. Add `kern/partition.c',
13052 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13053 (grub_emu_SOURCES): Likewise.
13054 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
13055 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
13056 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
13057 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13058 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
13059 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
13060 (grubof_SOURCES): Likewise.
13061 * disk/i386/pc/partition.c: File removed.
13062 * disk/powerpc/ieee1275/partition.c: Likewise.
13063 * include/grub/powerpc/ieee1275/partition.h: Likewise.
13064 * include/grub/i386/pc/partition.h: Likewise.
13065 * kern/partition.c: New file.
13066 * partmap/amiga.c: Likewise.
13067 * partmap/apple.c: Likewise.
13068 * partmap/pc.c: Likewise.
13069 * include/grub/partition.h: Likewise..
13070 * include/grub/pc_partition.h: Likewise.
13071 * util/grub-emu.c: Include <grub/partition.h> instead of
13072 <grub/machine/partition.h>.
13073 (main): Call `grub_pc_partition_map_init',
13074 `grub_amiga_partition_map_init' and
13075 `grub_apple_partition_map_init' and deinitialize afterwards.
13076 * util/i386/pc/biosdisk.c: Include `#include
13077 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13078 `<grub/machine/partition.h>'.
13079 * util/i386/pc/grub-setup.c: Likewise.
13080 * util/i386/pc/biosdisk.c: Likewise.
13081 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
13082 partition information in case of a PC partition.
13083 * util/i386/pc/grub-setup.c: Include `#include
13084 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
13085 `<grub/machine/partition.h>'.
13086 (setup): Only access the PC specific partition information in case
13087 of a PC partition.
13088
0ef4ced9 130892004-11-17 Hollis Blanchard <hollis@penguinppc.org>
f19dbdb7 13090
0ef4ced9 13091 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
13092 (grub_longjmp): Likewise.
13093 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
13094 20.
13095 * normal/powerpc/setjmp.S: New file.
13096 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13097 `normal/powerpc/setjmp.S'.
13098 (grubof_CFLAGS): Add `-DGRUBOF'.
13099 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
13100 [GRUB_UTIL && !GRUBOF].
f19dbdb7 13101
19950e29 131022004-11-16 Marco Gerards <metgerards@student.han.nl>
13103
13104 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
13105 property named `name'. Correctly handle the error returned by
13106 `grub_ieee1275_finddevice' if a device can not be opened.
13107
a2fea427 131082004-11-02 Hollis Blanchard <hollis@penguinppc.org>
13109
13110 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
13111 `actual' for negativity.
13112 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
13113 kern/fshelp.c.
13114
41ea0ea3 131152004-11-01 Marco Gerards <metgerards@student.han.nl>
13116
13117 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
13118 (PAGE_OFFSET): New macro.
13119 (CRTC_ADDR_PORT): Likewise.
13120 (CRTC_DATA_PORT): Likewise.
13121 (START_ADDR_HIGH_REGISTER): Likewise.
13122 (START_ADDR_LOW_REGISTER): Likewise.
13123 (GRAPHICS_ADDR_PORT): Likewise.
13124 (GRAPHICS_DATA_PORT): Likewise.
13125 (READ_MAP_REGISTER): Likewise.
13126 (INPUT_STATUS1_REGISTER): Likewise.
13127 (INPUT_STATUS1_VERTR_BIT): Likewise.
13128 (page): New variable.
13129 (wait_vretrace): New function.
13130 (set_read_map): Likewise.
13131 (set_start_address): Likewise.
13132 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
13133 the right page.
13134 (check_vga_mem): Take the page into account.
13135 (write_char): Likewise.
13136 (write_cursor): Likewise.
13137 (scroll_up): Likewise. Copy the page to the page that is not
13138 shown and switch between both pages.
13139 (grub_vga_putchar): Fix off by one error.
13140 (grub_vga_cls): Wait for the vertical retrace. Take the page into
13141 account.
13142
ad0bd20b 131432004-11-01 Marco Gerards <metgerards@student.han.nl>
13144
13145 Add support for iso9660 (including rockridge).
f19dbdb7 13146
ad0bd20b 13147 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13148 (iso9660_mod_SOURCES): New variable.
13149 (iso9660_mod_CFLAGS): Likewise.
13150 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
13151 * include/grub/fs.h (grub_iso9660_init): New prototype.
13152 * util/grub-emu.c (main): Call `grub_iso9660_init'.
13153 * fs/iso9660.c: New file.
13154
13155 * include/grub/misc.h (grub_strncat): New prototype.
13156 * kern/misc.c (grub_strncat): New function.
f19dbdb7 13157
ad0bd20b 13158 * fs/hfs.c (grub_hfs_mount): Translate the error
13159 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
13160 * fs/jfs.c (grub_jfs_mount): Likewise.
13161 * fs/ufs.c (grub_ufs_mount): Likewise.
13162
a5477a59 131632004-10-28 Hollis Blanchard <hollis@penguinppc.org>
13164
13165 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
13166 which initialized BAT registers.
13167 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
13168 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13169 Move from here...
13170 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
13171 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
13172 ... to here.
13173 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
13174 (grub_mapclaim): Likewise.
13175 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
13176 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
13177 hand.
13178
9304c1f8 131792004-10-19 Hollis Blanchard <hollis@penguinppc.org>
13180
13181 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
13182 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
13183 -ffreestanding and -msoft-float.
13184
86f4ae25 131852004-10-15 Hollis Blanchard <hollis@penguinppc.org>
13186
13187 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
13188 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
13189 set in grub_ieee1275_flags.
13190
38912228 131912004-10-14 Hollis Blanchard <hollis@penguinppc.org>
13192
13193 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
13194 prototype.
13195 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
13196 grub_console_init first.
13197 Change the memory range used for grub_ieee1275_claim and
13198 grub_mm_init_region.
13199 Print an error message if the claim fails.
13200 Include <grub/misc.h>.
13201
d1923dc8 132022004-10-13 Hollis Blanchard <hollis@penguinppc.org>
13203
13204 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
13205 Call grub_children_iterate for device nodes of type `scsi',
13206 `ide', or `ata'.
13207 (grub_ofdisk_open): Remove manual device alias resolution.
13208 Fix memory leak when device cannot be opened.
f19dbdb7 13209 * include/grub/powerpc/ieee1275/ieee1275.h
d1923dc8 13210 (grub_children_iterate): New prototype.
13211 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
13212 New function.
13213 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
13214 Return -1 if args.size was -1.
13215
4512e4f3 132162004-10-11 Hollis Blanchard <hollis@penguinppc.org>
13217
13218 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
13219 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
13220 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
13221 Open Firmware's memory for it; claim memory from _start to _end.
13222 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
13223 (_end): New extern.
13224 (_start): Zero BSS from __bss_start to _end.
13225 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
13226 New extern.
13227 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
13228
4d61feb0 132292004-10-11 Hollis Blanchard <hollis@penguinppc.org>
13230
ad0bd20b 13231 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
13232 -1 if args.base was -1.
4d61feb0 13233
026fa2f9 132342004-10-08 Hollis Blanchard <hollis@penguinppc.org>
13235
13236 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
13237 escape sequence instead of a literal ^L. Also call
13238 grub_ofconsole_gotoxy.
13239
9f2220ef 132402004-10-03 Hollis Blanchard <hollis@penguinppc.org>
13241
13242 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
13243 void * arguments to grub_addr_t. All callers updated. Also make
13244 the `result' argument optional.
13245 (grub_ieee1275_release): change void * arguments to grub_addr_t.
13246 All callers updated.
13247
8a572cd7 132482004-09-22 Hollis Blanchard <hollis@penguinppc.org>
13249
13250 * commands/ls.c (grub_ls_list_files): Use the string following the
13251 initial ')', if present, as the filesystem path.
13252 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
13253
13254 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
13255
18aa81f2 132562004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
13257
13258 Make the source code of the menu interface more readable.
f19dbdb7 13259
18aa81f2 13260 * normal/menu.c: Include grub/mm.h.
13261 (TERM_WIDTH): New macro.
13262 (TERM_HEIGHT): Likewise.
13263 (TERM_INFO_HEIGHT): Likewise.
13264 (TERM_MARGIN): Likewise.
13265 (TERM_SCROLL_WIDTH): Likewise.
13266 (TERM_TOP_BORDER_Y): Likewise.
13267 (TERM_LEFT_BORDER_X): Likewise.
13268 (TERM_BORDER_WIDTH): Likewise.
13269 (TERM_MESSAGE_HEIGHT): Likewise.
13270 (TERM_BORDER_HEIGHT): Likewise.
13271 (TERM_NUM_ENTRIES): Likewise.
13272 (TERM_FIRST_ENTRY_Y): Likewise.
13273 (TERM_ENTRY_WIDTH): Likewise.
13274 (TERM_CURSOR_X): Likewise.
13275 (draw_border): Use macros instead of magic numbers.
13276 (print_entry): Likewise.
13277 (print_entries): Likewise.
13278 (run_menu): Likewise. Also, handle the key 'e'.
13279 (run_menu_entry): Ignore empty command lines.
13280 (print_message): Added a new argument EDIT. If EDIT is true,
13281 print a different message.
13282 (init_page): Likewise.
13283 (edit_menu_entry): New function. Not implemented yet.
13284
b47efe30 132852004-09-17 Marco Gerards <metgerards@student.han.nl>
13286
13287 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
13288 can be loaded from normal mode.
f19dbdb7 13289
b47efe30 13290 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
13291 `multiboot.mod'.
13292 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
13293 (multiboot_mod_CFLAGS): New variables.
13294 * loader/i386/pc/linux_normal.c: New file.
f19dbdb7 13295 * loader/i386/pc/multiboot_normal.c: Likewise.
13296
b47efe30 13297 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
13298 attribute `unused'.
f19dbdb7 13299
b47efe30 13300 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
13301 `fdiro' to read the mode information from instead of `diro'.
13302
13303 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
13304 looking up a symlink.
13305
13306 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
13307 macro.
13308 * normal/command.c (grub_command_execute): Don't parse the
13309 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
13310 flags of the command.
13311
13312 * normal/menu.c (grub_menu_run): Fix typo.
13313
da75ac71 133142004-09-14 Hollis Blanchard <hollis@penguinppc.org>
13315
13316 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
13317
13318 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
13319 `y + 1' instead of `y - 1'.
13320
13321 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
f19dbdb7 13322
062b24c2 133232004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
13324
13325 From Hollis Blanchard <hollis@penguinppc.org>:
13326 * kern/misc.c (memmove): New alias for grub_memmove.
13327 (memcmp): New alias for grub_memcmp.
13328 (memset): New alias for grub_memset.
f19dbdb7 13329 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
062b24c2 13330 Change "int handle" to "grub_ieee1275_phandle_t handle".
f19dbdb7 13331 * include/grub/powerpc/ieee1275/ieee1275.h
062b24c2 13332 (grub_ieee1275_get_property): Likewise.
f19dbdb7 13333
8ddad845 133342004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
13335
13336 Added normal mode command `chainloader' as module chain.mod, which
13337 depends on normal.mod and _chain.mod.
f19dbdb7 13338
8ddad845 13339 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
13340 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
13341 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
13342 Deleted prototype.
13343 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
13344 but arguments parsing moved to ...
13345 (grub_chainloader_cmd): ... here. New function.
13346 * include/grub/i386/pc/chainloader.h: New file.
13347 * loader/i386/pc/chainloader_normal.c: Likewise.
13348
2c1f4ce3 133492004-09-11 Marco Gerards <metgerards@student.han.nl>
13350
13351 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
13352 (grub_mkimage_LDFLAGS): Likewise.
13353 (grub_emu_SOURCES): Likewise.
13354 (kernel_img_HEADERS): Added fshelp.h.
13355 * fs/ext2.c: Include <grub/fshelp.h>.
13356 (FILETYPE_REG): New macro.
13357 (FILETYPE_INO_REG): Likewise.
13358 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
13359 Changed all users.
13360 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
13361 all users.
13362 (grub_fshelp_node): New struct.
13363 (grub_ext2_data): Added member `diropen'. Changed member `inode'
13364 to a pointer.
13365 (grub_ext2_get_file_block): Removed function.
13366 (grub_ext2_read_block): New function.
13367 (grub_ext2_read_file): Replaced parameter `data' by `node'.
13368 This function was written.
13369 (grub_ext2_mount): Read the root inode. Create a diropen struct.
13370 (grub_ext2_find_file): Removed function.
13371 (grub_ext2_read_symlink): New function.
13372 (grub_ext2_iterate_dir): Likewise.
13373 (grub_ext2_open): Rewritten.
13374 (grub_ext2_dir): Rewritten.
13375 * include/grub/fshelp.h: New file.
13376 * fs/fshelp.c: Likewise.
13377
3c52136a 133782004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
13379
13380 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
13381 (print_message): Add a missing newline.
13382 (run_menu): Added timeout support.
13383 (run_menu_entry): New local function.
13384 (grub_menu_run): Added support for booting.
13385
13386 * kern/loader.c (grub_loader_is_loaded): New function.
13387
13388 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
13389 (grub_get_rtc): Exported.
13390
13391 * include/grub/i386/pc/time.h: Include grub/symbol.h.
13392 (grub_get_rtc): Exported.
13393
13394 * include/grub/normal.h (struct grub_command_list): Remove
13395 constant from the member `command'.
13396
13397 * include/grub/loader.h (grub_loader_is_loaded): Declared.
13398
13399 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
13400
13401 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
13402
aa033560 134032004-08-28 Marco Gerards <metgerards@student.han.nl>
13404
13405 Add support for the JFS filesystem.
13406
13407 * fs/jfs.c: New file.
13408 * include/grub/fs.h (grub_jfs_init): New prototype.
13409 (grub_jfs_fini): New prototype.
13410 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
13411 (grub_emu_SOURCES): Likewise.
13412 (pkgdata_MODULES): Add jfs.mod.
13413 (jfs_mod_SOURCES): New variable.
13414 (jfs_mod_CFLAGS): Likewise.
13415 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
13416 (grubof_SOURCES): Likewise.
13417 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
13418
13419 * fs/fat.c (grub_fat_find_dir): Convert the filename little
13420 endian to the host endian.
13421 (grub_fat_utf16_to_utf8): Move function from there...
13422 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
fe987087 13423 the endianness of the source string anymore.
aa033560 13424 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
13425
94bc45af 134262004-08-24 Marco Gerards <metgerards@student.han.nl>
13427
13428 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
13429 (grub_boot_fini) [GRUB_UTIL]: Likewise.
13430 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
13431 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
f19dbdb7 13432
94bc45af 13433 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
13434 (grub_hfs_iterate_dir): Make the function static. Add prototypes
13435 for `node_found' and `it_dir'.
13436 (grub_hfs_dir): Add prototype for `dir_hook'.
13437
13438 * fs/minix.c (grub_minix_get_file_block): Add prototype for
13439 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
13440 and `indir32' to silence a gcc warning.
13441
13442 * include/grub/fs.h (grub_hfs_init): New prototype.
13443 (grub_hfs_fini): Likewise.
f19dbdb7 13444
13445
97543f08 134462004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
13447
13448 Each disk device has its own id now. This is useful to make use
13449 of multiple disk devices.
f19dbdb7 13450
97543f08 13451 * include/grub/disk.h (grub_disk_dev_id): New enum.
13452 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
13453 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
13454
13455 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
13456 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13457
13458 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
13459 GRUB_DISK_DEVICE_OFDISK_ID as an id.
13460
13461 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
13462 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
13463
13464 * include/grub/disk.h (struct grub_disk_dev): Added a new member
13465 "id" which is used by the cache manager.
13466
13467 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
13468 of just "GRUB".
13469
64372eb4 134702004-08-18 Marco Gerards <metgerards@student.han.nl>
13471
13472 * fs/hfs.c: New file.
13473 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
13474 (grub_emu_SOURCES): Likewise.
13475 (pkgdata_MODULES): Add hfs.mod.
13476 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
13477 (grubof_SOURCES): Likewise.
13478 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
13479
13480 * include/grub/misc.h (grub_strncasecmp): Add prototype.
13481 * kern/misc.c (grub_strncasecmp): Add function.
13482
cc61b58f 134832004-08-14 Marco Gerards <metgerards@student.han.nl>
13484
13485 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
13486 with parentheses.
13487
13488 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
13489 (grub_ext2_dir): In case the directory entry type is unknown, read
13490 it from the inode.
13491
0ef123f6 134922004-08-02 Peter Bruin <pjbruin@dds.nl>
13493
13494 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
13495 grub_load_linux instead of grub_rescue_cmd_linux as second
13496 argument of grub_rescue_register_command.
13497
13498 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
13499
a447c5df 135002004-07-27 Marco Gerards <metgerards@student.han.nl>
13501
13502 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
13503 function.
13504 * commands/boot.c: Remove the check for `GRUB_UTIL'.
13505 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
13506 `loader/powerpc/ieee1275/linux.c',
13507 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
13508 * include/grub/powerpc/ieee1275/ieee1275.h
13509 (grub_ieee1275_release): New prototype.
13510 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
13511 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
13512 normal, boot, linux and linux_normal.
13513 * loader/powerpc/ieee1275/linux.c: New file.
13514 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
13515
5a9e3546 135162004-07-12 Marco Gerards <metgerards@student.han.nl>
13517
13518 * normal/arg.c (grub_arg_parse): Correct error handling after
13519 reallocating the argumentlist (check if `argl' is not null instead
13520 of checking if `args' is not null).
13521 * kern/mm.c (grub_realloc): Return the same pointer when using the
13522 same region, instead of returning the header address.
13523
e15199cb 135242004-07-11 Marco Gerards <metgerards@student.han.nl>
13525
13526 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
13527 one block instead of two when looking for the initial partition.
13528 (grub_partition_probe): Initialize the local variable `p' with 0.
13529 Use base 10 for the grub_strtoul call.
13530 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
13531 need for one local variable.
13532 (grub_strtoul): Don't add the new value to `num', instead of that
13533 just assign it.
13534
020616c2 135352004-07-11 Marco Gerards <metgerards@student.han.nl>
13536
13537 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
13538 (pxeboot_img_SOURCES): New variable.
13539 (pxeboot_img_ASFLAGS): Likewise.
13540 (pxeboot_img_LDFLAGS): Likewise.
13541 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
13542 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
13543 <lode_leroy@hotmail.com>.
13544
6c51eb64 135452004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13546
13547 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
13548 there was no input.
13549
cfb12aff 135502004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13551
13552 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
13553 the history buffer logic.
13554
6eabba74 135552004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
13556
13557 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
13558 (FILETYPE_INO_SYMLINK): New macros.
13559 (grub_ext2_find_file): Check if the node is a directory using the
13560 inode stat information instead of using the filetype in the
13561 dirent. Exclude the first character of an absolute symlink.
13562 (grub_ext2_dir): Mask out the filetype part of the mode member of
13563 the inode.
13564
66e19ef8 135652004-05-24 Marco Gerards <metgerards@student.han.nl>
13566
13567 Add support for UFS version 1 and 2. Add support for the minix
13568 filesystem version 1 and 2, both the variants with 14 and 30 long
13569 filenames.
f19dbdb7 13570
66e19ef8 13571 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
13572 fs/minix.c.
13573 (grub_emu_SOURCES): Likewise.
13574 (pkgdata_MODULES): Add ufs.mod and minix.mod.
13575 (ufs_mod_SOURCES): New variable.
13576 (ufs_mod_CFLAGS): Likewise.
13577 (minix_mod_SOURCES): Likewise.
13578 (minix_mod_CFLAGS): Likewise.
13579 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
13580 fs/minix.c.
13581 (grubof_SOURCES): Likewise.
13582 * fs/ufs.c: New file.
13583 * fs/minix.c: New file.
13584 * include/grub/fs.h (grub_ufs_init): New prototype.
13585 (grub_ufs_fini): Likewise.
13586 (grub_minix_init): Likewise.
13587 (grub_minix_fini): Likewise.
13588 * util/grub-emu.c (main): Initialize and deinitialize UFS and
13589 minix fs.
13590
cc2e748a 135912004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
13592
13593 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
13594 commands/ls.c, commands/terminal.c, commands/boot.c,
13595 commands/cmp.c and commands/cat.c.
13596 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
13597
13598 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
13599 "env.h"
13600
4b13b216 136012004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13602
13603 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
13604 and grub_, respectively. Because the conversion is trivial and
13605 mechanical, I omit the details here. Please refer to the CVS
13606 if you need more information.
13607
6a142551 136082004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
13609
13610 * include/pupa: Renamed to ...
13611 * include/grub: ... this.
13612 * util/i386/pc/pupa-mkimage.c: Renamed to ...
13613 * util/i386/pc/grub-mkimage.c: ... this.
13614 * util/i386/pc/pupa-setup.c: Renamed to ...
13615 * util/i386/pc/grub-setup.c: ... this.
13616 * util/pupa-emu.c: Renamed to ...
13617 * util/grub-emu.c: ... this.
13618
e56cdf21 136192004-03-29 Marco Gerards <metgerards@student.han.nl>
13620
13621 Add support for the newworld apple macintosh (PPC). This has been
13622 tested on the powerbook 2000 only. It only adds support for
13623 generic ieee1275 functions, console and disk support. This should
13624 be easy to port to other architectures with support for Open
13625 Firmware.
f19dbdb7 13626
e56cdf21 13627 * configure.ac: Accept the powerpc as host_cpu. In the case of
13628 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
13629 specific tests are only executed while building for the i386.
13630 Inverse test for crosscompile.
13631 * genmk.rb (Utility): Allow assembler files.
13632 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
13633 * conf/powerpc-ieee1275.rmk: New file.
13634 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
13635 * disk/powerpc/ieee1275/partition.c: Likewise.
13636 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
13637 * include/pupa/powerpc/ieee1275/console.h: Likewise.
13638 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
13639 * include/pupa/powerpc/ieee1275/time.h: Likewise.
13640 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
13641 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
13642 * include/pupa/powerpc/ieee1275/loader.h
13643 * include/pupa/powerpc/setjmp.h: Likewise.
13644 * include/pupa/powerpc/types.h: Likewise.
13645 * kern/powerpc/ieee1275/init.c: Likewise.
13646 * kern/powerpc/ieee1275/openfw.c: Likewise.
13647 * term/powerpc/ieee1275/ofconsole.c: Likewise.
13648
13649 These files were written by Johan Rydberg
13650 (jrydberg@night.trouble.net) and I only modified them slightly.
f19dbdb7 13651
e56cdf21 13652 * boot/powerpc/ieee1275/cmain.c: New file.
13653 * boot/powerpc/ieee1275/crt0.S: Likewise.
13654 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
13655 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
13656
8c8cc205 136572004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
13658
13659 * Makefile.in: Update copyright.
13660 * genmodsrc.sh: Likewise.
13661 * gensymlist.sh: Likewise.
13662 * term/i386/pc/vga.c: Indent correctly.
13663
13664 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
13665 bugreporting address.
13666 * util/i386/pc/pupa-setup.c (usage): Likewise,
13667 (main): Call pupa_ext2_init and pupa_ext2_fini.
13668
f19dbdb7 13669 * fs/fat.c (log2): Renamed to ...
8c8cc205 13670 (fat_log2): ... this.
13671 All callers changed.
13672 * kern/misc.c (memcpy): Alias to pupa_memmove.
13673 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
13674 lvalue cast.
13675 * util/console.c (pupa_ncurses_fini): Return 0.
13676
13677 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
13678 Move fail label here.
13679 [__GNU__]: Don't warn when using stat.
13680 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
13681 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
13682 long int. Use strtol instead of strtoul.
f19dbdb7 13683
db1771cf 136842004-03-14 Marco Gerards <metgerards@student.han.nl>
13685
13686 * commands/boot.c: New file.
13687 * commands/cat.c: Likewise.
13688 * commands/cmp.c: Likewise.
13689 * commands/ls.c: Likewise.
13690 * commands/terminal.c: Likewise.
13691 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
13692 (pupa_register_command): Changed interface to match the new
13693 argument parser.
13694 (pupa_command_execute): Changed (almost rewritten) so it uses
13695 pupa_split_command. Added support for setting variables using the
13696 syntax `foo=bar'.
13697 (rescue_command): Changed to work with the new argument parser.
13698 (terminal_command): Moved from here to commands/terminal.c.
13699 (set_command): New function.
13700 (unset_command): New function.
13701 (insmod_command): New function.
13702 (rmmod_command): New function.
13703 (lsmod_command): New function.
13704 (pupa_command_init): Don't initialize the command terminal
13705 anymore. Initialize the commands set, unset, insmod, rmmod and
13706 lsmod.
13707 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
13708 (kernel_img_HEADERS): Add arg.h and env.h.
13709 (pupa_mkimage_LDFLAGS): Add kern/env.c.
13710 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
13711 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
13712 normal/arg.c.
13713 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
13714 terminal.mod.
13715 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
13716 (boot_mod_SOURCES): New variable.
13717 (terminal_mod_SOURCES): Likewise.
13718 (ls_mod_SOURCES): Likewise.
13719 (cmp_mod_SOURCES): Likewise.
13720 (cat_mod_SOURCES): Likewise.
13721
13722 * normal/arg.c: New file.
13723 * kern/env.c: Likewise.
13724 * include/pupa/arg.h: Likewise.
13725 * include/pupa/env.h: Likewise.
13726 * font/manager.c (font_command): Changed to match argument parsing
13727 interface changes.
13728 (PUPA_MOD_INIT): Likewise.
13729 * hello/hello.c (pupa_cmd_hello): Likewise.
13730 (PUPA_MOD_INIT): Likewise.
13731 * include/pupa/disk.h: Include <pupa/device.h>.
13732 (pupa_print_partinfo): New prototype.
13733 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
13734 (pupa_dl_get_prefix): Likewise.
13735 * include/pupa/misc.h: Include <pupa/err.h>.
13736 (pupa_isgraph): New prototype.
13737 (pupa_isdigit): Likewise.
13738 (pupa_split_cmdline): Likewise.
13739 * include/pupa/normal.h: Include <pupa/arg.h>.
13740 (pupa_command): Changed the prototype of the member `func' to
13741 match the argument parsing interface. Added member `options'.
13742 (pupa_register_command): Updated to match function.
13743 (pupa_arg_parse): New prototype.
13744 (pupa_hello_init) [PUPA_UTIL]: New prototype.
13745 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
13746 (pupa_ls_init) [PUPA_UTIL]: Likewise.
13747 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
13748 (pupa_cat_init) [PUPA_UTIL]: Likewise.
13749 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
13750 (pupa_boot_init) [PUPA_UTIL]: Likewise.
13751 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
13752 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
13753 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
13754 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
13755 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
13756 * kern/disk.c: Include <pupa/file.h>.
13757 (pupa_print_partinfo): New function.
13758 * kern/dl.c: Include <pupa/env.h>.
13759 (pupa_dl_dir): Variable removed.
13760 (pupa_dl_load): Use the environment variable `prefix' instead of
13761 the variable pupa_dl_dir.
13762 (pupa_dl_set_prefix): Function removed.
13763 (pupa_dl_get_prefix): Likewise.
13764 * kern/i386/pc/init.c: Include <pupa/env.h>.
13765 (pupa_machine_init): Use the environment variable `prefix' instead of
13766 using pupa_dl_set_prefix to set the prefix.
13767 * kern/main.c: Include <pupa/env.h>.
13768 (pupa_set_root_dev): Use the environment variable `prefix' instead of
13769 using pupa_dl_get_prefix to get the prefix.
13770 * kern/misc.c: Include <pupa/env.h>.
13771 (pupa_isdigit): New function.
13772 (pupa_isgraph): Likewise.
13773 (pupa_ftoa): Likewise.
13774 (pupa_vsprintf): Added support for printing values of the type
13775 `double'. Make it possible to format variable output when using
13776 formatting like `%1.2%f'.
13777 (pupa_split_cmdline): New function.
13778 * kern/rescue.c: Include <pupa/env.h>.
13779 (next_word): Removed function.
13780 (pupa_rescue_cmd_prefix): Likewise.
13781 (pupa_rescue_cmd_set): New function.
13782 (pupa_rescue_cmd_unset): New function.
13783 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
13784 split the command line instead of splitting it here. Added
13785 support for setting variables using the syntax `foo=bar'. Don't
13786 initialize the prefix command anymore. Initialized the set and
13787 unset commands.
13788 * normal/cmdline.c: Include <pupa/env.h>.
13789 (pupa_tab_complete): Added prototypes for print_simple_completion,
13790 print_partition_completion, add_completion, iterate_commands,
13791 iterate_dev, iterate_part and iterate_dir. Moved code to print
13792 partition information from here to kern/disk.c.
fe6b695a 13793 (pupa_cmdline_run): Don't check if the function exists anymore.
db1771cf 13794 * normal/main.c: Include <pupa/env.h>.
13795 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
13796 instead of using pupa_dl_get_prefix to get the prefix.
13797 * term/i386/pc/vga.c: Include <pupa/arg.h>.
13798 (check_vga_mem): Cast pointers to `void *' to silence a gcc
13799 warning.
13800 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
13801 (pupa_vga_setcolor): Declare unused variables with `__attribute__
13802 ((unused))' to silence a gcc warning.
13803 (pupa_vga_setcolor): Likewise.
13804 (debug_command): Changed to match argument parsing
13805 interface changes.
13806 * util/pupa-emu.c: Include <pupa/env.h>.
13807 (options): Added 0's for unused fields to silence a gcc warning.
13808 (argp): Likewise.
13809 (main): Use the environment variable `prefix' instead of using
13810 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
13811 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
13812 and terminal.
13813
13814 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
13815 * util/misc.c: Include <malloc.h>.
13816 (pupa_malloc): Rewritten so errors are correctly reported.
13817 (pupa_realloc): Likewise.
13818 (pupa_memalign): Likewise.
13819 (pupa_mm_init_region): Declare unused variables with
13820 `__attribute__ ((unused))' to silence a gcc warning.
13821 * normal/i386/setjmp.S: Remove tab at the end of the file to
13822 silence a gcc warning.
13823 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
13824 variables with `__attribute__ ((unused))' to silence a gcc
13825 warning.
13826 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
13827 local variable i unsigned to silence a gcc warning.
13828
13829 * kern/term.c: Include <pupa/misc.h>.
13830 (pupa_more_lines): New variable.
13831 (pupa_more): Likewise.
13832 (pupa_putcode): When the pager is active pause at the end of every
13833 screen.
13834 (pupa_set_more): New function.
13835 * include/pupa/term.h (pupa_set_more): New prototype.
13836
13837
3b1139cb 138382004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
13839
13840 Now this project is GRUB 2 rather than PUPA. The location of
13841 the CVS repository was moved to GRUB's.
f19dbdb7 13842
3b1139cb 13843 * configure.ac: Use bug-grub as the reporting address.
13844 Use GRUB instead of PUPA.
13845 Change the version number to 1.90.
13846
8367695c 138472004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
13848
13849 * genkernsyms.sh: Updated copyright information.
13850 * genmk.rb: Likewise.
13851 * genmodsrc.sh: Likewise.
13852 * gensymlist.sh: Likewise.
13853 * boot/i386/pc/boot.S: Likewise.
13854 * boot/i386/pc/diskboot.S: Likewise.
13855 * disk/i386/pc/biosdisk.c: Likewise.
13856 * disk/i386/pc/partition.c: Likewise.
13857 * font/manager.c: Likewise.
13858 * fs/ext2.c: Likewise.
13859 * fs/fat.c: Likewise.
13860 * include/pupa/boot.h: Likewise.
13861 * include/pupa/device.h: Likewise.
13862 * include/pupa/disk.h: Likewise.
13863 * include/pupa/dl.h: Likewise.
13864 * include/pupa/elf.h: Likewise.
13865 * include/pupa/err.h: Likewise.
13866 * include/pupa/file.h: Likewise.
13867 * include/pupa/font.h: Likewise.
13868 * include/pupa/fs.h: Likewise.
13869 * include/pupa/kernel.h: Likewise.
13870 * include/pupa/loader.h: Likewise.
13871 * include/pupa/misc.h: Likewise.
13872 * include/pupa/mm.h: Likewise.
13873 * include/pupa/net.h: Likewise.
13874 * include/pupa/normal.h: Likewise.
13875 * include/pupa/rescue.h: Likewise.
13876 * include/pupa/setjmp.h: Likewise.
13877 * include/pupa/symbol.h: Likewise.
13878 * include/pupa/term.h: Likewise.
13879 * include/pupa/types.h: Likewise.
13880 * include/pupa/i386/setjmp.h: Likewise.
13881 * include/pupa/i386/types.h: Likewise.
13882 * include/pupa/i386/pc/biosdisk.h: Likewise.
13883 * include/pupa/i386/pc/boot.h: Likewise.
13884 * include/pupa/i386/pc/console.h: Likewise.
13885 * include/pupa/i386/pc/init.h: Likewise.
13886 * include/pupa/i386/pc/kernel.h: Likewise.
13887 * include/pupa/i386/pc/linux.h: Likewise.
13888 * include/pupa/i386/pc/loader.h: Likewise.
13889 * include/pupa/i386/pc/memory.h: Likewise.
13890 * include/pupa/i386/pc/multiboot.h: Likewise.
13891 * include/pupa/i386/pc/partition.h: Likewise.
13892 * include/pupa/i386/pc/time.h: Likewise.
13893 * include/pupa/i386/pc/vga.h: Likewise.
13894 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
13895 * include/pupa/util/getroot.h: Likewise.
13896 * include/pupa/util/misc.h: Likewise.
13897 * include/pupa/util/resolve.h: Likewise.
13898 * kern/device.c: Likewise.
13899 * kern/disk.c: Likewise.
13900 * kern/dl.c: Likewise.
13901 * kern/err.c: Likewise.
13902 * kern/file.c: Likewise.
13903 * kern/fs.c: Likewise.
13904 * kern/loader.c: Likewise.
13905 * kern/main.c: Likewise.
13906 * kern/misc.c: Likewise.
13907 * kern/mm.c: Likewise.
13908 * kern/rescue.c: Likewise.
13909 * kern/term.c: Likewise.
13910 * kern/i386/dl.c: Likewise.
13911 * kern/i386/pc/init.c: Likewise.
13912 * kern/i386/pc/lzo1x.S: Likewise.
13913 * kern/i386/pc/startup.S: Likewise.
13914 * loader/i386/pc/chainloader.c: Likewise.
13915 * loader/i386/pc/linux.c: Likewise.
13916 * loader/i386/pc/multiboot.c: Likewise.
13917 * normal/cmdline.c: Likewise.
13918 * normal/command.c: Likewise.
13919 * normal/main.c: Likewise.
13920 * normal/menu.c: Likewise.
13921 * normal/i386/setjmp.S: Likewise.
13922 * term/i386/pc/console.c: Likewise.
13923 * term/i386/pc/vga.c: Likewise.
13924 * util/console.c: Likewise.
13925 * util/genmoddep.c: Likewise.
13926 * util/misc.c: Likewise.
13927 * util/pupa-emu.c: Likewise.
13928 * util/resolve.c: Likewise.
13929 * util/unifont2pff.rb: Likewise.
13930 * util/i386/pc/biosdisk.c: Likewise.
13931 * util/i386/pc/getroot.c: Likewise.
13932 * util/i386/pc/pupa-mkimage.c: Likewise.
13933 * util/i386/pc/pupa-setup.c: Likewise.
13934
e6eced71 139352004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
13936
13937 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
13938 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
13939 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
13940 reading and reset it after reading.
13941 (pupa_ext2_close): Return PUPA_ERR_NONE.
13942
13943 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
13944 Correct value.
13945 (struct linux_kernel_header): Add kernel_version and
13946 initrd_addr_max.
13947 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
13948 pupa_file_read succeeds.
13949 (pupa_rescue_cmd_initrd): Implement.
13950
5aded270 139512003-12-03 Marco Gerards <metgerards@student.han.nl>
13952
13953 * fs/ext2.c (pupa_ext2_label): New function.
13954 (pupa_ext2_fs): Added label.
13955 * fs/fat.c (pupa_fat_label): New function.
13956 (pupa_fat_fs): Added label.
13957 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
13958
13959 * kern/misc.c (pupa_strndup): New function.
13960 * include/pupa/misc.h (pupa_strndup): New prototype.
13961
13962 * include/pupa/normal.h: Include <pupa/err.h>.
13963 (pupa_set_history): New prototype.
13964 (pupa_iterate_commands): New prototype.
13965 * normal/cmdline.c: Include <pupa/machine/partition.h>,
13966 <pupa/disk.h>, <pupa/file.h>.
13967 (hist_size): New variable.
13968 (hist_lines): Likewise.
13969 (hist_end): Likewise.
13970 (hist_used): Likewise.
13971 (pupa_set_history): New function.
13972 (pupa_history_get): Likewise.
13973 (pupa_history_add): Likewise.
13974 (pupa_history_replace): Likewise.
13975 (pupa_tab_complete): Likewise.
13976 (pupa_cmdline_run): Added tab completion and history buffer. Tab
13977 completion shows partitionnames while completing partitions, this
13978 feature was suggested by Jeff Bailey.
13979 * normal/command.c (pupa_iterate_commands): New function.
13980 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
13981 (pupa_normal_init): Initialize history buffer.
13982 (PUPA_MOD_INIT): Likewise.
13983 (pupa_normal_fini): Free the history buffer.
13984 (PUPA_MOD_FINI): Likewise.
13985
13986 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
13987 key.
13988
13989 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
13990 * configure.ac [i386]: Check for regparam bug.
13991 (NESTED_FUNC_ATTR) [! i386]: Defined.
13992
1f7315a3 139932003-11-17 Marco Gerards <metgerards@student.han.nl>
13994
13995 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
13996 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
13997 (pupa_emu_SOURCES): New variable.
13998 (pupa_emu_LDFLAGS): Likewise.
13999 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
14000 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
14001 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
14002 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14003 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
14004 (pupa_jmp_buf): New typedef.
14005 (pupa_setjmp) [PUPA_UTIL]: New macro.
14006 (pupa_longjmp) [PUPA_UTIL]: Likewise.
14007 * include/pupa/term.h (struct pupa_term): New member `refresh'.
14008 (pupa_refresh): New prototype.
14009 * include/pupa/util/getroot.h: New file.
14010 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
14011 it.
14012 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
14013 (pupa_rescue_cmd_cat): Likewise.
14014 (pupa_rescue_cmd_ls): Likewise.
14015 (pupa_rescue_cmd_testload): Likewise.
14016 (pupa_rescue_cmd_lsmod): Likewise.
14017 * normal/cmdline.c (pupa_cmdline_get): Likewise.
14018 * normal/menu.c (run_menu): Likewise.
14019 * kern/term.c (pupa_cls): Likewise.
14020 (pupa_refresh): New function.
14021 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
14022 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
14023 * util/console.c: New file.
f19dbdb7 14024
1f7315a3 14025 * util/i386/pc/getroot.c: New file.
14026 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
14027 (pupa_putchar): New function.
14028 (pupa_refresh): Likewise.
14029 (xgetcwd): Function moved to ...
14030 (strip_extra_slashes): Likewise.
14031 (get_prefix): Likewise.
f19dbdb7 14032 * util/i386/pc/getroot.c: ... here.
1f7315a3 14033 (find_root_device): Function moved and renamed to...
14034 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
14035 Changed all callers.
14036 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
14037 and renamed to...
14038 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
14039 Changed all callers.
14040 * util/misc.c (pupa_memalign): New function.
14041 (pupa_mm_init_region): Likewise.
14042 (pupa_register_exported_symbols): Likewise.
14043 (pupa_putchar): Function removed.
14044 * util/pupa-emu.c: New file.
14045
9a5c1ade 140462003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
14047
14048 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
14049 (_multiboot_mod_SOURCES): New variable.
14050 (_multiboot_mod_CFLAGS): Likewise.
14051 * loader/i386/pc/multiboot.c: New file.
14052 * include/pupa/i386/pc/multiboot.h: Likewise.
14053 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
14054 (pupa_multiboot_real_boot): New function.
14055 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
14056 (pupa_multiboot_real_boot): New prototype.
14057 (pupa_rescue_cmd_multiboot): Likewise
14058 (pupa_rescue_cmd_module): Likewise.
14059
14060 * kern/loader.c (pupa_loader_set): Continue when
14061 pupa_loader_unload_func() fails.
14062 (pupa_loader_unset): New function.
14063 * include/pupa/loader.h (pupa_loader_unset): New prototype.
14064
14065 * kern/misc.c (pupa_stpcpy): New function.
14066 * include/pupa/misc.h (pupa_stpcpy): New prototype.
14067
8e72a9c0 140682003-11-12 Marco Gerards <metgerards@student.han.nl>
14069
14070 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
14071 for available extensions.
14072
14073 * include/pupa/i386/pc/time.h: New file.
14074 * kern/disk.c: Include <pupa/machine/time.h>.
14075 (PUPA_CACHE_TIMEOUT): New macro.
14076 (pupa_last_time): New variable.
14077 (pupa_disk_open): Flush the cache when there was a timeout.
14078 (pupa_disk_close): Reset the timer.
14079 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
14080 pupa_currticks.
14081 * util/misc.c: Include <sys/times.h>
14082 (pupa_get_rtc): New function.
14083
c4adbd32 140842003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
14085
14086 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
14087 as blocks.
14088 (pupa_ext2_get_file_block): Use blocks member.
14089
14090 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
14091 first block. Return -1 instead of pupa_errno on error.
14092
bfd30f06 140932003-10-27 Marco Gerards <metgerards@student.han.nl>
14094
14095 * README: In the pupa-mkimage example use _chain instead of chain
14096 and ext2 instead of fat.
14097 * TODO: Replace ext2fs with jfs as an example. Add an item for
14098 adding journal playback for ext2fs.
14099 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
14100 (pkgdata_MODULES): Added ext2.mod.
14101 (ext2_mod_SOURCES): New variable.
14102 (ext2_mod_CFLAGS): Likewise.
14103 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
14104 * include/pupa/misc.h (pupa_strncpy): New prototype.
14105 (pupa_strcat): Likewise.
14106 (pupa_strncmp): Likewise.
14107 * kern/misc.c (pupa_strcat): Enable function.
14108 (pupa_strncpy): New function.
14109 (pupa_strncmp): Likewise.
14110 * fs/ext2.c: New file.
f19dbdb7 14111
bfd30f06 14112 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
14113 when the read failed before retrying.
14114 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
14115 (_FILE_OFFSET_BITS): Likewise.
14116 * configure.ac: Added AC_SYS_LARGEFILE.
14117
98d15063 141182003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14119
14120 * genmk.rb (PModule#rule): Make sure to get only symbol names
14121 from the output of nm.
14122 Reported by Robert Millan <zeratul2@wanadoo.es>.
14123
18d9c7cd 141242003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
14125
14126 I forgot to check in these changes for a long time. This adds
14127 incomplete support for VGA console, and this is still very
14128 buggy. Also, a lot of consideration is required for I18N,
14129 UNICODE, and VGA font issues. Therefore, assume that this is
14130 such that "better than nothing".
f19dbdb7 14131
18d9c7cd 14132 * font/manager.c: New file.
14133 * include/pupa/font.h: Likewise.
14134 * include/pupa/i386/pc/vga.h: Likewise.
14135 * term/i386/pc/vga.c: Likewise.
14136 * util/unifont2pff.rb: Likewise.
14137
14138 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
14139 (pkgdata_MODULES): Added vga.mod and font.mod.
14140 (vga_mod_SOURCES): New variables.
14141 (vga_mod_CFLAGS): Likewise.
14142 (font_mod_SOURCES): Likewise.
14143 (font_mod_CFLAGS): Likewise.
14144
14145 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
14146
14147 * include/pupa/term.h: Include pupa/err.h.
f19dbdb7 14148 (struct pupa_term): Added init and fini.
18d9c7cd 14149 Changed the argument of putchar to pupa_uint32_t.
14150
14151 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
14152 (pupa_console_real_putchar): New prototype.
14153 (pupa_console_putchar): Removed.
14154 (pupa_console_checkkey): Exported.
14155 (pupa_console_getkey): Likewise.
14156
14157 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
14158 characters.
14159
14160 * kern/term.c (pupa_term_set_current): Rewritten.
14161 (pupa_putchar): Likewise.
14162 (pupa_putcode): New function.
14163
14164 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
14165 (pupa_console_real_putchar): ... this.
14166 (pupa_vga_set_mode): New function.
14167 (pupa_vga_get_font): Likewise.
14168
14169 * normal/command.c: Include pupa/term.h.
14170 (terminal_command): New function.
14171 (pupa_command_init): Register the command "terminal".
14172
14173 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
14174 (DISP_UP): Likewise.
14175 (DISP_RIGHT): Likewise.
14176 (DISP_DOWN): Likewise.
14177 (DISP_HLINE): Likewise.
14178 (DISP_VLINE): Likewise.
14179 (DISP_UL): Likewise.
14180 (DISP_UR): Likewise.
14181 (DISP_LL): Likewise.
14182 (DISP_LR): Likewise.
14183
14184 * term/i386/pc/console.c (pupa_console_putchar): New function.
f19dbdb7 14185
977329f5 141862003-02-08 NIIBE Yutaka <gniibe@m17n.org>
14187
14188 * util/resolve.c (pupa_util_resolve_dependencies): BUG
14189 FIX. Reverse the path_list.
14190
14191 * include/pupa/normal.h: Export pupa_register_command and
14192 pupa_unregister_command.
14193
14194 * hello/hello.c (pupa_cmd_hello): New module.
14195 * conf/i386-pc.rmk: Added hello.mod.
14196
1f5ab428 141972003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
14198
14199 * kern/i386/pc/lzo1x.S: New file.
f19dbdb7 14200
1f5ab428 14201 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
14202 (compress_kernel): New variable.
14203 (generate_image): Heavily modified to support compressing a
14204 large part of the core image.
14205
14206 * util/misc.c (pupa_util_read_image): Fix a file descriptor
14207 leak.
14208 (pupa_util_load_image): New function.
14209
14210 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
14211 (pupa_compressed_size): New variable.
14212 (codestart): Enable Gate A20 here.
14213 Decompress the compressed part of the core image.
14214 Rearrange the code to put functions and variables which are
14215 required for initialization in the non-compressed part.
14216 Include lzo1x.S.
14217
14218 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
14219 here.
14220
14221 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
14222
f19dbdb7 14223 * include/pupa/i386/pc/kernel.h
1f5ab428 14224 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
14225 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
14226 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14227 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14228 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
14229
14230 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
14231
14232 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
14233 (Utility#rule): Likewise.
14234
14235 * configure.ac: Check if LZO is available.
14236
ce5bf700 142372003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
14238
14239 * include/pupa/normal.h: New file.
14240 * include/pupa/setjmp.h: Likewise.
14241 * include/pupa/i386/setjmp.h: Likewise.
14242 * normal/cmdline.c: Likewise.
14243 * normal/command.c: Likewise.
14244 * normal/main.c: Likewise.
14245 * normal/menu.c: Likewise.
14246 * normal/i386/setjmp.S: Likewise.
f19dbdb7 14247
ce5bf700 14248 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
14249 (pupa_rescue_cmd_initrd): Likewise.
14250
14251 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
14252 Likewise.
14253
14254 * kern/i386/pc/startup.S (translation_table): New variable.
14255 (translate_keycode): New function.
14256 (pupa_console_getkey): Call translate_keycode.
14257
14258 * kern/rescue.c (attempt_normal_mode): New function.
14259 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
14260 it failed, print a message.
14261
14262 * kern/mm.c (pupa_real_malloc): Print more information when a
14263 free magic is broken.
14264 (pupa_free): If the first free header is not free actually, set
14265 it to P.
14266
14267 * kern/main.c (pupa_load_normal_mode): Just load the module
14268 "normal".
14269 (pupa_main): Don't print the message
14270 "Entering into rescue mode..." here.
14271
14272 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
14273 Declared.
14274 (pupa_rescue_cmd_initrd): Likewise.
14275 (pupa_rescue_cmd_initrd): Likewise.
14276
14277 * include/pupa/symbol.h (FUNCTION): Specify the type.
14278 (VARIABLE): Likewise.
14279
14280 * include/pupa/err.h (pupa_err_t): Added
14281 PUPA_ERR_UNKNOWN_COMMAND.
14282
14283 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
14284 (pupa_dl_get_prefix): Likewise.
14285
14286 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
14287 Added _chain.mod and _linux.mod instead of chain.mod and
14288 linux.mod.
14289 (chain_mod_SOURCES): Renamed to ...
14290 (_chain_mod_SOURCES): ... this.
14291 (chain_mod_CFLAGS): Renamed to ...
14292 (_chain_mod_CFLAGS): ... this.
14293 (linux_mod_SOURCES): Renamed to ...
14294 (_linux_mod_SOURCES): ... this.
14295 (linux_mod_CFLAGS): Renamed to ...
14296 (_linux_mod_CFLAGS): ... this.
14297 (normal_mod_SOURCES): New variable.
14298 (normal_mod_CFLAGS): Likewise.
14299 (normal_mod_ASFLAGS): Likewise.
14300
143012003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
14302
14303 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
14304 possible.
14305
fe6b695a 14306 * kern/dl.c (pupa_dl_ref): Refer depending modules
ce5bf700 14307 recursively.
14308 (pupa_dl_unref): Unrefer depending modules recursively.
14309 Don't call pupa_dl_unload implicitly, because PUPA can crash if
14310 a module is unloaded before one depending on that module is
14311 unloaded.
14312 (pupa_dl_unload): Unload depending modules explicitly,
14313 if possible.
14314
c04da074 143152003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
14316
14317 * include/pupa/i386/pc/linux.h: New file.
14318 * loader/i386/pc/linux.c: Likewise.
f19dbdb7 14319
c04da074 14320 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
14321 Removed.
14322 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
14323 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
14324 of PUPA_CHAINLOADER_BOOT_SECTOR.
14325
14326 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
14327 (pupa_linux_prot_size): New variable.
14328 (pupa_linux_tmp_addr): Likewise.
14329 (pupa_linux_real_addr): Likewise.
14330 (pupa_linux_boot_zimage): New function.
14331 (pupa_linux_boot_bzimage): Likewise.
14332
14333 * kern/i386/pc/init.c (struct mem_region): New structure.
14334 (MAX_REGIONS): New macro.
14335 (mem_regions): New variable.
14336 (num_regions): Likewise.
14337 (pupa_os_area_addr): Likewise.
14338 (pupa_os_area_size): Likewise.
14339 (pupa_lower_mem): Likewise.
14340 (pupa_upper_mem): Likewise.
14341 (add_mem_region): New function.
14342 (compact_mem_regions): Likewise.
14343 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
14344 the size of the conventional memory and that of so-called upper
14345 memory (before the first memory hole).
14346 Instead of adding each found region to free memory, use
14347 add_mem_region and add them after removing overlaps.
14348 Also, add only 1/4 of the upper memory to free memory. The rest
14349 is used for loading OS images. Maybe this is ad hoc, but this
14350 makes it much easier to relocate OS images when booting.
14351
14352 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
14353 (pupa_enter_rescue_mode): Don't register initrd and module.
14354
14355 * kern/mm.c: Include pupa/dl.h.
14356
14357 * kern/main.c: Include pupa/file.h and pupa/device.h.
14358
14359 * kern/loader.c (pupa_loader_load_module_func): Removed.
14360 (pupa_loader_load_module): Likewise.
14361
14362 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
14363 ``.o''.
14364
14365 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
14366 (pupa_linux_tmp_addr): Likewise.
14367 (pupa_linux_real_addr): Likewise.
14368 (pupa_linux_boot_zimage): Likewise.
14369 (pupa_linux_boot_bzimage): Likewise.
14370
14371 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
14372 (pupa_upper_mem): Likewise.
14373 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
14374 module is too dangerous.
14375
14376 * include/pupa/loader.h (pupa_os_area_addr): Declared.
14377 (pupa_os_area_size): Likewise.
14378 (pupa_loader_set): Remove the first argument. Loader doesn't
14379 manage modules or initrd any longer.
14380 (pupa_loader_load_module): Removed.
14381
14382 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
14383 (linux_mod_SOURCES): New variable.
14384 (linux_mod_CFLAGS): Likewise.
14385
a13f9237 143862003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
14387
14388 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
14389 the length of a blocklist correctly.
14390
14391 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
14392 Use ioctl only if the OS file is a block device.
14393 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
14394 not very useful for normal files.
14395
14396 * kern/main.c (pupa_set_root_dev): New function.
14397 (pupa_load_normal_mode): Likewise.
14398 (pupa_main): Call those above.
14399
14400 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
14401 pupa_uint16_t.
14402
14403 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
14404
a5ffe966 144052003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
14406
14407 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
14408 (setup): Configure the installed partition information and the
14409 dl prefix.
14410
14411 * loader/i386/pc/chainloader.c (my_mod): New variable.
14412 (pupa_chainloader_unload): New function.
14413 (pupa_rescue_cmd_chainloader): Refer itself.
14414 (PUPA_MOD_INIT): Save its own module in MY_MOD.
14415
14416 * kern/i386/pc/startup.S (install_partition): Removed.
14417 (version_string): Likewise.
14418 (config_file): Likewise.
14419 (pupa_install_dos_part): New variable.
14420 (pupa_install_bsd_part): Likewise.
14421 (pupa_prefix): Likewise.
14422 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
14423
14424 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
14425 and pupa/misc.h.
14426 (make_install_device): New function.
14427 (pupa_machine_init): Set the dl prefix.
14428
14429 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
14430 (buf): Renamed to ...
14431 (linebuf): ... this.
14432 (pupa_rescue_cmd_prefix): New function.
14433 (pupa_rescue_cmd_insmod): Likewise.
14434 (pupa_rescue_cmd_rmmod): Likewise.
14435 (pupa_rescue_cmd_lsmod): Likewise.
14436 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
14437 rmmod and lsmod.
14438
14439 * kern/mm.c (pupa_memalign): If failed even after invalidating
14440 disk caches, unload unneeded modules and retry.
14441
14442 * kern/misc.c (pupa_memmove): New function.
14443 (pupa_memcpy): Removed.
14444 (pupa_strcpy): New function.
14445 (pupa_itoa): Made static.
14446
14447 * kern/dl.c (pupa_dl_iterate): New function.
14448 (pupa_dl_ref): Likewise.
14449 (pupa_dl_unref): Likewise.
14450 (pupa_dl_unload): Return if succeeded or not.
14451 (pupa_dl_unload_unneeded): New function.
14452 (pupa_dl_unload_all): Likewise.
14453 (pupa_dl_init): Renamed to ...
14454 (pupa_dl_set_prefix): ... this.
14455 (pupa_dl_get_prefix): New function.
14456
14457 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
14458 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
14459 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
14460 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
14461 (pupa_install_dos_part): Declared.
14462 (pupa_install_bsd_part): Likewise.
14463 (pupa_prefix): Likewise.
14464 (pupa_boot_drive): Likewise.
14465
14466 * include/pupa/types.h: Fix a typo.
14467
14468 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
14469 pupa_memmove.
14470 (pupa_memmove): Declared.
14471 (pupa_strcpy): Likewise.
14472
14473 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
14474 pupa_mod_init takes one argument, its own module.
14475 (pupa_dl_unload_unneeded): Declared.
14476 (pupa_dl_unload_all): Likewise.
14477 (pupa_dl_ref): Likewise.
14478 (pupa_dl_unref): Likewise.
14479 (pupa_dl_iterate): Likewise.
14480 (pupa_dl_init): Renamed to ...
14481 (pupa_dl_set_prefix): ... this.
14482 (pupa_dl_get_prefix): Declared.
14483
14484 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
f19dbdb7 14485 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
a5ffe966 14486 unloaded.
14487 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
14488 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
14489
14490 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
14491 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
14492
012d7999 144932003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14494
14495 * util/i386/pc/pupa-setup.c (setup): Define the internal
14496 function find_first_partition_start at the top level, because GCC
14497 3.0.x cannot compile internal functions in deeper scopes
14498 correctly.
14499 (find_root_device): Use lstat instead of stat.
14500 Don't follow symbolic links.
14501 Fix the path-constructing code.
14502
14503 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
14504 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
14505 by a BLKGETSIZE ioctl first, because block devices don't fill
14506 the member st_mode of the structure stat on Linux.
14507 [__linux__] (linux_find_partition): Use a temporary buffer
14508 REAL_DEV for the working space. Copy it to DEV before returning.
14509 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
14510 buffer cache consistent.
14511 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
14512 strncmp. The previous value was merely wrong.
14513 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
14514
14515 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
14516 FAT size is 12. The previous value was merely wrong.
14517
14518 * kern/main.c (pupa_main): Don't split the starting message from
14519 newlines.
14520
14521 * kern/term.c (pupa_putchar): Put CR after LF instead of before
14522 LF, because BIOS goes crazy about character attributes in this
14523 case.
14524
1cc73a62 145252003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
14526
14527 * include/i386/pc/util/biosdisk.h: New file.
14528 * util/i386/pc/biosdisk.c: Likewise.
14529 * util/i386/pc/pupa-setup.c: Likewise.
f19dbdb7 14530
1cc73a62 14531 * Makefile.in (INCLUDE_DISTFILES): Added
14532 include/pupa/i386/pc/util/biosdisk.h.
14533 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
14534 directory util/i386/pc.
14535 (install-local): Added a rule for sbin_UTILITIES.
14536 (uninstall): Likewise.
14537
14538 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
14539
14540 * util/misc.c (xrealloc): New function.
14541 (pupa_malloc): Likewise.
14542 (pupa_free): Likewise.
14543 (pupa_realloc): Likewise.
14544 (pupa_stop): Likewise.
14545 (pupa_putchar): Likewise.
14546
14547 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
14548
14549 * include/pupa/util/misc.h (xrealloc): Declared.
14550
14551 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
14552 macro.
14553 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
14554 (PUPA_BOOT_MACHINE_BPB_END): ... this.
14555
14556 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
14557 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14558
14559 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
14560 way should be implemented.
14561 [PUPA_UTIL] (pupa_fat_fini): Likewise.
14562
14563 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
14564 the size of NAME for safety.
14565 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
14566 0x88.
14567
14568 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
14569 (pupa_setup_SOURCES): Likewise.
14570
14571 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
14572
08b70fe8 145732002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14574
14575 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
14576 bunch of pushl's from pusha, because this destroys the return
14577 value.
14578
62ddcc8f 145792002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
14580
14581 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
14582 This means that any missing prototypes could be fatal. Also, you
14583 must take care when writing assembly code. See the comments at
14584 the beginning of startup.S, for more details.
f19dbdb7 14585
62ddcc8f 14586 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
14587 compilation mechanism.
14588 (pupa_chainloader_real_boot): Likewise.
14589 (pupa_biosdisk_rw_int13_extensions): Likewise.
14590 (pupa_biosdisk_rw_standard): Likewise.
14591 (pupa_biosdisk_check_int13_extensions): Likewise.
14592 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
14593 (pupa_biosdisk_get_diskinfo_standard): Likewise.
14594 (pupa_get_memsize): Likewise.
14595 (pupa_get_mmap_entry): Likewise.
14596 (pupa_console_putchar): Likewise.
14597 (pupa_console_setcursor): Likewise.
14598 (pupa_getrtsecs): Use pushl instead of push.
14599
14600 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
14601 memory instead of the stack for a mmap entry, because some
14602 BIOSes may ignore the maximum size and overflow.
14603
14604 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
14605
14606 * genmk.rb (PModule#rule): Compile automatically generated
14607 sources with module-specific CFLAGS as well as other sources.
14608
9962ed99 146092002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14610
14611 * configure.ac: Check ld.
14612 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
14613 respectively, before checking endianness and sizes.
14614
14615 * Makefile.in (LD): New variable.
f19dbdb7 14616
abdfc3c5 146172002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14618
14619 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
14620
6a161fa9 146212002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
14622
14623 * Changelog: New file.
14624