]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2008-01-14 Robert Millan <rmh@aybabtu.com>
[grub2.git] / ChangeLog
CommitLineData
c86f1469 12008-01-14 Robert Millan <rmh@aybabtu.com>
2
3 * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
4 for grub_ieee1275_exit(), in order to improve portability.
5
e622c559 62008-01-14 Robert Millan <rmh@aybabtu.com>
7
8 * util/grub.d/10_linux.in (prefix): Define.
9 (exec_prefix): Likewise. Both definitions are later used by `libdir'.
10
44cb1ec8 112008-01-13 Pavel Roskin <proski@gnu.org>
12
13 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
14 grub_errno if no errors have been detected.
15
1eb8c802 162008-01-12 Robert Millan <rmh@aybabtu.com>
17
18 * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
19 (grub_util_get_dev_abstraction): New function prototype.
20
21 * util/getroot.c: Include `<grub/util/getroot.h>'
22 (grub_util_get_grub_dev): Move detection of abstraction type to ...
23 (grub_util_get_dev_abstraction): ... here (new function).
24
25 * util/grub-probe.c: Convert PRINT_* to an enum. Add
26 `PRINT_ABSTRACTION'.
27 (probe): Probe for abstraction type when requested.
28 (main): Understand `--target=abstraction'.
29
30 * util/i386/efi/grub-install.in: Add abstraction module to core
31 image when it is found to be necessary.
32 * util/i386/pc/grub-install.in: Likewise.
33 * util/powerpc/ieee1275/grub-install.in: Likewise.
34
35 * util/update-grub_lib.in (font_path): Return system path without
36 converting to GRUB path.
37 * util/update-grub.in: Convert system path returned by font_path()
38 to a GRUB path. Use `grub-probe -t abstraction' to determine what
39 abstraction module is needed for loading fonts (if any). Export
40 that as `GRUB_PRELOAD_MODULES'.
41 * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
42 insmod commands).
43
52bd3de9 442008-01-12 Yoshinori K. Okuji <okuji@enbug.org>
45
46 Remove some unused code from reiserfs.
47
48 * fs/reiserfs.c (struct grub_reiserfs_key)
49 [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
50 (struct grub_reiserfs_node_body): Removed.
51 (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
52 Likewise.
53 (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
54 Likewise.
55 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
56 Likewise.
57 (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
58 Likewise.
59 (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
60 Likewise.
61 (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
62 Likewise.
63 (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
64 (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
65 (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
66
2f80039d 672008-01-10 Robert Millan <rmh@aybabtu.com>
68
69 * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
70 Determines if a file is garbage left by packaging systems, etc.
71 * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
72 for processing /etc/grub.d scripts.
73 * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
74 * util/grub.d/10_linux.in: Likewise. Use grub_file_is_not_garbage()
75 as a condition for processing Linux images.
76
87888032 772008-01-10 Pavel Roskin <proski@gnu.org>
78
79 * include/grub/powerpc/libgcc.h (__ucmpdi2): New export. Needed
80 to compile reiserfs.c on PowerPC.
81
7e54fced 822008-01-10 Robert Millan <rmh@aybabtu.com>
de9993e0 83
84 * kern/device.c (grub_device_iterate): Do not abort device iteration
85 when one of the devices cannot be opened.
86 * kern/disk.c (grub_disk_open): Do not account previous failures of
87 unrelated functions when grub_errno is checked for.
88
5aa541e6 892008-01-08 Robert Millan <rmh@aybabtu.com>
90
91 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
92 `! grub_linux_is_bzimage', change order of address comparison to make
93 it more intuitive, and improve "too big zImage" error message.
94
7076340d 952008-01-08 Robert Millan <rmh@aybabtu.com>
96
97 * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
98 `$(update-grub_DATA)'.
99 (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
100 targets.
101
9ca70333 1022008-01-07 Robert Millan <rmh@aybabtu.com>
103
104 * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
105 which instruction is modified by grub-setup during installation
106 (since it wasn't obvious by only looking at this file).
107
38ccf575 1082008-01-07 Robert Millan <rmh@aybabtu.com>
109
110 * TODO: Rewrite. Just refer to the wiki and the BTS instead of
111 listing actual TODO items.
112
f5db4291 1132008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
114
868967cf 115 * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
116 correctly.
117 (grub_reiserfs_get_key_offset): Likewise.
118 (grub_reiserfs_set_key_offset): Likewise.
119 (grub_reiserfs_set_key_type): Likewise.
120 (grub_reiserfs_iterate_dir): Return 1 if found, otheriwise 0.
121
122 (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
123 better to remove the bitfield version completely.
124
1252008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
126
f5db4291 127 * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
128 allocated from the heap, due to the fshelp implementation.
129 (grub_reiserfs_dir): Free NODE, due to the same reason.
130
492e6d9d 1312008-01-06 Yoshinori K. Okuji <okuji@enbug.org>
132
133 Mostly from Vincent Pelletier:
134
135 * fs/reiserfs.c: New file.
136
137 * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
138 (reiserfs_mod_SOURCES): New variable.
139 (reiserfs_mod_CFLAGS): Likewise.
140 (reiserfs_mod_LDFLAGS): Likewise.
141
142 * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
143 disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
144 include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
145 normal/color.c.
146
9ce3e7c1 1472008-01-06 Robert Millan <rmh@aybabtu.com>
148
149 * normal/color.c: Remove `<grub/env.h>'.
150
f3b58148 1512008-01-05 Jeroen Dekkers <jeroen@dekkers.cx>
152
153 * include/grub/normal.h: Include <grub/env.h>.
154
7ac3bcfa 1552008-01-05 Robert Millan <rmh@aybabtu.com>
156
157 * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
158 usage example with `(hd0,1)'.
fb358190 159 Reported by Samuel Thibault.
7ac3bcfa 160
c8ee99d7 1612008-01-05 Robert Millan <rmh@aybabtu.com>
162
163 * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
164 (grub_linux_boot_zimage): Rename to ...
165 (grub_linux_boot): ... this.
166 (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
167 (grub_linux_boot_zimage): Conditionalize zImage copy.
168
169 * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
170 (grub_linux_boot_bzimage): Remove prototype.
171 (grub_linux_boot_zimage): Rename to ...
172 (grub_linux_boot): ... this.
173
174 * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
175 (grub_linux_boot): Remove function.
176
0ece25b1 1772008-01-05 Robert Millan <rmh@aybabtu.com>
178
179 * include/grub/normal.h (grub_env_write_color_normal): New prototype.
180 (grub_env_write_color_highlight): Likewise.
181 (grub_wait_after_message): Likewise.
182
183 * normal/color.c: New file.
184
185 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
186 (normal_mod_DEPENDENCIES): Likewise.
187
188 * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
189 (normal_mod_DEPENDENCIES): Likewise.
190
191 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
192 (normal_mod_DEPENDENCIES): Likewise.
193
194 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
195 (normal_mod_DEPENDENCIES): Likewise.
196
197 * normal/menu_entry.c (run): Rely on grub_wait_after_message()
198 for waiting after a message is printed.
199 * normal/main.c (read_config_file): Likewise.
200 (grub_normal_init): Register grub_env_write_color_normal() and
201 grub_env_write_color_highlight() hooks. Mark `color_normal' and
202 `color_highlight' variables as global.
203
204 * normal/menu.c (grub_wait_after_message): New function.
205 (grub_color_menu_normal): New variable. Replaces ...
206 (GRUB_COLOR_MENU_NORMAL): ... this macro.
207 (grub_color_menu_highlight): New variable. Replaces ...
208 (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
209 (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
210 `GRUB_TERM_COLOR_STANDARD'.
211 (print_message): Use `grub_setcolorstate' to reload colors. Rename
212 `normal_code' and `highlight_code' to `old_color_normal' and
213 `old_color_highlight', respectively.
214 (grub_menu_init_page): Update colors when drawing the menu, based on
215 `menu_color_normal' and `menu_color_highlight' variables.
216 (grub_menu_run): Rely on grub_wait_after_message() for waiting after
217 a message is printed.
218
182dd4e5 2192008-01-05 Robert Millan <rmh@aybabtu.com>
220
221 * kern/env.c (grub_env_context_open): Propagate hooks for global
222 variables to new context.
223
224 * kern/main.c (grub_set_root_dev): Export `root' variable.
225
ddf8f6ad 2262008-01-05 Robert Millan <rmh@aybabtu.com>
227
228 * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
229 discs unconditionaly, since udev and others have options to provide
230 them.
231
d8b43d9b 2322008-01-05 Robert Millan <rmh@aybabtu.com>
233
234 * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
235
2bff2de3 2362008-01-04 Christian Franke <franke@computer.org>
237
238 * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
239 of eisa_mmap.
240
97eab917 2412008-01-03 Pavel Roskin <proski@gnu.org>
242
243 * kern/i386/linuxbios/init.c: Put "void" to all function
244 declarations with no arguments.
245 * kern/powerpc/ieee1275/init.c: Likewise.
246 * term/i386/pc/at_keyboard.c: Likewise.
247 * term/i386/pc/vga_text.c: Likewise.
248 * util/grub-mkdevicemap.c: Likewise.
249
b9416d00 2502008-01-02 Robert Millan <rmh@aybabtu.com>
251
252 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
253 message when loaded image is out of bounds.
254 (grub_multiboot_load_elf64): Likewise.
255
92695df9 2562008-01-02 Pavel Roskin <proski@gnu.org>
257
258 * util/grub.d/10_linux.in: Try version without ".old" when
259 looking for initrd. It's better to use initrd from the newer
260 kernel of the same version than no initrd at all.
261
d98d9cad 2622008-01-01 Robert Millan <rmh@aybabtu.com>
263
264 * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
265
dbfdce36 2662008-01-01 Vesa Jaaskelainen <chaac@nic.fi>
267
268 * include/grub/video.h: Added grub_video_unmap_color and
269 grub_video_get_active_render_target.
270 (grub_video_adapter): Added unmap_color and get_active_render_target.
271
272 * video/video.c: Added grub_video_unmap_color and
273 grub_video_get_active_render_target.
274 (grub_video_get_info): Changed method to accept NULL pointer as an
275 argument to allow detection of active video adapter.
276
277 * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
278 grub_video_vbe_unmap_color_int.
279 Added grub_video_vbe_unmap_color and
280 grub_video_vbe_get_active_render_target.
281 (grub_video_vbe_adapter): Added unmap_color and
282 get_active_render_target.
283
284 * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
285 with grub_video_vbe_unmap_color_int.
286
287 * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
288 (DEFAULT_NORMAL_COLOR): Likewise.
289 (DEFAULT_HIGHLIGHT_COLOR) Likewise.
290 (DEFAULT_FG_COLOR): Removed.
291 (DEFAULT_BG_COLOR): Likewise.
292 (DEFAULT_CURSOR_COLOR): Changed value.
293 (grub_virtual_screen): Added standard_color_setting,
294 normal_color_setting, highlight_color_setting and term_color.
295 (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
296 (bitmap_width): Added.
297 (bitmap_height): Likewise.
298 (bitmap): Likewise.
299 (set_term_color): Likewise.
300 (grub_virtual_screen_setup): Changed to use new terminal coloring
301 settings.
302 (grub_gfxterm_init): Added init for bitmap.
303 (grub_gfxterm_fini): Added destroy for bitmap.
304 (redraw_screen_rect): Updated to use background bitmap and new
305 terminal coloring.
306 (scroll_up): Added optimization for case when there is no bitmap.
307 (grub_gfxterm_cls): Fixed to use correct background color.
308 (grub_virtual_screen_setcolorstate): Changed to use new terminal
309 coloring.
310 (grub_virtual_screen_setcolor): Likewise.
311 (grub_virtual_screen_getcolor): Added.
312 (grub_gfxterm_background_image_cmd): Likewise.
313 (grub_video_term): Added setcolor and getcolor.
314 (MOD_INIT): Added registration of background_image command.
315 (MOD_TERM): Added unregistration for background_image command.
316
c3c20931 3172007-12-30 Pavel Roskin <proski@gnu.org>
318
319 * loader/multiboot_loader.c: Fix multiboot command
320 unregistration. Fix all typos in the word "multiboot".
321
df266716 3222007-12-29 Pavel Roskin <proski@gnu.org>
94239199 323
324 * util/grub.d/10_linux.in: Refactor search for initrd. Add
325 support for initrd names used in Fedora.
326
fc6e896c 3272007-12-26 Bean <bean123ch@gmail.com>
328
329 * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
330 (cpio_mod_SOURCES): New variable.
331 (cpio_mod_CFLAGS): Likewise.
332 (cpio_mod_LDFLAGS): Likewise.
333
334 * fs/cpio.c: New file.
335
336 * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
337
338 * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
339
340 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
341
342 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
343
533110ad 3442007-12-25 Robert Millan <rmh@aybabtu.com>
345
346 * include/grub/term.h (struct grub_term): Add `getcolor' function.
347 (grub_getcolor): New function.
348
349 * kern/term.c (grub_getcolor): New function.
350 * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
351 (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
352 (print_entry): Set normal and highlight colors to
353 `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
354 respectively, before printing and restore them to old
355 values afterwards.
356 (grub_menu_init_page): Likewise. Fill an additional colored space
357 that would otherwise be left blank.
358
359 * term/efi/console.c (grub_console_getcolor): New function.
360 (struct grub_console_term.getcolor): New variable.
361 * term/i386/pc/console.c (grub_console_getcolor): New function.
362 (struct grub_console_term.getcolor): New variable.
363 * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
364 (struct grub_console_term.getcolor): New variable.
365
366 * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
367 (struct grub_console_term.setcolor): Remove variable.
368 * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
369 (struct grub_console_term.setcolor): Remove variable.
370 * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
371 (struct grub_console_term.setcolor): Remove variable.
372 * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
373 (struct grub_console_term.setcolor): Remove variable.
374
4931827f 3752007-12-25 Robert Millan <rmh@aybabtu.com>
376
377 * configure.ac: Search for possible unifont.hex locations, and
378 define UNIFONT_HEX if found.
379
380 * Makefile.in (UNIFONT_HEX): Define variable.
381 (DATA): Rename to ...
382 (PKGLIB): ... this. Update all users.
383 (PKGDATA): New variable.
384 (pkgdata_IMAGES): Rename to ...
385 (pkglib_IMAGES): ... this. Update all users.
386 (pkgdata_MODULES): Rename to ...
387 (pkglib_MODULES): ... this. Update all users.
388 (pkgdata_PROGRAMS): Rename to ...
389 (pkglib_PROGRAMS): ... this. Update all users.
390 (pkgdata_DATA): Rename to ...
391 (pkglib_DATA): ... this. Update all users.
392 (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
393 (unicode.pff, ascii.pff): New rules.
394 (all-local): Add `$(PKGDATA)' dependency.
395 (install-local): Process `$(PKGDATA)'.
396
397 * util/update-grub_lib.in (font_path): Search for *.pff files in
398 a few more locations, including `${pkgdata}'.
399
57e57e31 4002007-12-23 Robert Millan <rmh@aybabtu.com>
401
402 Patch from Bean <bean123ch@gmail.com>:
403 * disk/loopback.c (grub_loopback_read): Add missing bit shift to
404 `size'.
405
4bc72aa9 4062007-12-21 Bean <bean123ch@gmail.com>
407
408 * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
409 (ntfscomp_mod_SOURCES): New variable.
410 (ntfscomp_mod_CFLAGS): Likewise.
411 (ntfscomp_mod_LDFLAGS): Likewise.
412
413 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
414 (grub_probe_SOURCES): Likewise.
415 (grub_emu_SOURCES): Likewise.
416
417 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
418 (grub_emu_SOURCES): Likewise.
419
420 * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
421 (grub_emu_SOURCES): Likewise.
422
423 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
424 (grub_emu_SOURCES): Likewise.
425
426 * fs/ntfs.c (grub_ntfscomp_func): New variable.
427 (read_run_list): Renamed to grub_ntfs_read_run_list.
428 (decomp_nextvcn): Moved to ntfscomp.c.
429 (decomp_getch): Likewise.
430 (decomp_get16): Likewise.
431 (decomp_block): Likewise.
432 (read_block): Likewise.
433 (read_data): Partially moved to ntfscomp.c.
434 (fixup): Change unsigned to grub_uint16_t.
435 (read_mft): Change unsigned long to grub_uint32_t.
436 (read_attr): Likewise.
437 (read_data): Likewise.
438 (read_run_data): Likewise.
439 (read_run_list): Likewise.
440 (read_mft): Likewise.
441
442 * fs/ntfscomp.c: New file.
443
444 * include/grub/ntfs.h: New file.
445
af680a87 4462007-12-16 Robert Millan <rmh@aybabtu.com>
447
448 * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
449 IDE disk check, since Linux is known to support 20 IDE disks.
450 Reported by Colin Watson.
451
84be7599 4522007-12-15 Bean <bean123ch@gmail.com>
453
454 * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
455 (lnxboot_img_SOURCES): New variable.
456 (lnxboot_img_ASFLAGS): Likewise.
457 (lnxboot_img_LDFLAGS): Likewise.
458
459 * boot/i386/pc/lnxboot.S: New file.
460
6af9db01 4612007-11-24 Pavel Roskin <proski@gnu.org>
462
463 * configure.ac: Test if '--build-id=none' is supported by the
464 linker. If yes, add it to TARGET_LDFLAGS. Build ID causes
465 objcopy to generate incorrect binary files (binutils
466 2.17.50.0.18-1 as shipped by Fedora 8).
467 * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
468 linking, so that build ID doesn't break the test.
469
7361cfe6 4702007-11-24 Pavel Roskin <proski@gnu.org>
471
472 * include/grub/i386/time.h: use "void" in the argument list
473 of grub_cpu_idle().
474 * include/grub/powerpc/time.h: Likewise.
475 * include/grub/sparc64/time.h: Likewise.
476
1593e10c 4772007-11-18 Christian Franke <franke@computer.org>
478
479 * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
480 now return control chars instead of GRUB_CONSOLE_KEY_* constants.
481 This fixes the problem that function keys did not work in grub-emu.
482
3b8db1a8 4832007-11-18 Christian Franke <franke@computer.org>
484
485 * disk/host.c (grub_host_open): Remove attribute unused from
486 name parameter. Add check for "host". This fixes the problem
487 that grub-emu does not find partitions.
488
2e29408d 4892007-11-18 Christian Franke <franke@computer.org>
490
491 * util/hostfs.c (is_dir): New function.
492 (grub_hostfs_dir): Handle missing dirent.d_type case.
493 (grub_hostfs_read): Add missing fseek().
494 (grub_hostfs_label): Clear label pointer. This fixes a crash
495 of grub-emu on "ls (host)".
496
398cd047 4972007-11-18 Christian Franke <franke@computer.org>
498
499 * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
500 Add attribute packed, gcc 3.4.4 on Cygwin aligns this
501 to 64 bit boundary by default.
502
c405c391 5032007-11-18 Bean <bean123ch@gmail.com>
504
505 * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
506 (hexdump_mod_SOURCES): New variable.
507 (hexdump_mod_CFLAGS): Likewise.
508 (hexdump_mod_LDFLAGS): Likewise.
509
510 * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
511
512 * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
513
514 * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
515
516 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
517
518 * include/grub/hexdump.h: New file.
519
520 * commands/hexdump.c: New file.
521
5cced7fd 5222007-11-10 Robert Millan <rmh@aybabtu.com>
523
524 * commands/i386/pc/play.c (beep_off): Switch order of arguments
525 in grub_outb() calls.
526 (beep_on): Likewise.
527
8b714eb0 5282007-11-10 Christian Franke <franke@computer.org>
529
530 * normal/menu.c (run_menu): Check for empty menu to avoid crash.
531 (grub_menu_run): Likewise.
532
ce0f1839 5332007-11-10 Robert Millan <rmh@aybabtu.com>
534
535 * include/grub/i386/efi/machine.h: New file.
536 * include/grub/i386/linuxbios/machine.h: Likewise.
537 * include/grub/i386/pc/machine.h: Likewise.
538 * include/grub/powerpc/ieee1275/machine.h: Likewise.
539 * include/grub/sparc64/ieee1275/machine.h: Likewise.
540
541 * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
542 (serial_hw_io_addr): New variable.
543 (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
544 instead of `(unsigned short *) 0x400'.
545
270c237d 5462007-11-10 Bean <bean123ch@gmail.com>
547
548 * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
549
a87783bf 5502007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
551
552 * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
553 (vga_mod_SOURCES): Added.
554 (vga_mod_CFLAGS): Likewise.
555 (vga_mod_LDFLAGS): Likewise.
556
557 * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
558 grub_outb() calls.
559 (set_map_mask): Likewise.
560 (set_read_map): Likewise.
561 (set_read_address): Likewise.
562 (vga_font): Removed variable.
563 (get_vga_glyph): Removed function.
564 (invalidate_char): Likewise.
565 (write_char): Changed to use grub_font_get_glyph() for font
566 information.
567 (grub_vga_putchar): Likewise.
568 (grub_vga_getcharwidth): Likewise.
569
6433b448 5702007-11-10 Vesa Jaaskelainen <chaac@nic.fi>
571
572 * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
573 flags.
574 (pxeboot_img_LDFLAGS): Likewise.
575 (diskboot_img_LDFLAGS): Likewise.
576 (kernel_img_LDFLAGS): Likewise.
577
49178511 5782007-11-06 Robert Millan <rmh@aybabtu.com>
579
580 * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
581 in grub_outb() calls.
582 (serial_hw_init): Likewise.
583
53b052de 5842007-11-05 Robert Millan <rmh@aybabtu.com>
585
586 * util/update-grub.in: Allow files in ${update_grub_dir} to contain
587 spaces. Skip non-regular files.
588
5ab33bba 5892007-11-05 Robert Millan <rmh@aybabtu.com>
590
591 * kern/disk.c (grub_disk_firmware_fini)
592 (grub_disk_firmware_is_tainted): New variables.
593
594 * include/grub/disk.h (grub_disk_firmware_fini)
595 (grub_disk_firmware_is_tainted): Likewise.
596
597 * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
598 (grub_disk_biosdisk_fini): ... to here.
599 (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
600 (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
601 is set. Register grub_disk_biosdisk_fini() in
602 `grub_disk_firmware_fini'.
603
604 * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
605 (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
606 Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
607 to finish existing firmware disk interface.
608
609 * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
610 (ata_mod_SOURCES): New variable.
611 (ata_mod_CFLAGS): Likewise.
612 (ata_mod_LDFLAGS): Likewise.
613
0149ab7c 6142007-11-05 Robert Millan <rmh@aybabtu.com>
615
616 * disk/ata.c: Remove `<grub/machine/time.h>'. Include `<grub/time.h>'.
617 (grub_ata_wait): Reimplement using grub_millisleep().
618
619 * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
620 * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
621
be7ac41e 6222007-11-03 Marco Gerards <marco@gnu.org>
623
624 * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
625 (CRTC_ADDR_PORT): New macro.
626 (CRTC_DATA_PORT): Likewise.
627 (CRTC_CURSOR): Likewise.
628 (CRTC_CURSOR_ADDR_HIGH): Likewise.
629 (CRTC_CURSOR_ADDR_LOW): Likewise.
630 (update_cursor): New function.
631 (grub_console_real_putchar): Call `update_cursor'.
632 (grub_console_gotoxy): Likewise.
633 (grub_console_cls): Set the default color when clearing the
634 screen.
635 (grub_console_setcursor): Implemented.
636
bb06ab2e 6372007-11-03 Marco Gerards <marco@gnu.org>
638
639 * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
640 become activate.
641 (grub_ata_pio_write): Likewise.
642
643 (grub_atapi_identify): Wait after issuing an ATA command.
644 (grub_atapi_packet): Likewise.
645 (grub_ata_identify): Likewise.
646 (grub_ata_readwrite): Likewise.
647
cf8f780b 6482007-11-03 Marco Gerards <marco@gnu.org>
649
650 * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
651 (grub_ata_pio_write): Likewise.
652 (grub_ata_readwrite): Use `grub_error', instead of
653 returning `grub_errno'.
654
ed649e54 6552007-11-03 Marco Gerards <marco@gnu.org>
656
657 * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
658 grub_ata_pio_write once for every single sector, instead of for
659 multiple sectors.
660
ca25d8f0 6612007-10-31 Robert Millan <rmh@aybabtu.com>
662
663 * configure.ac: Add `i386-linuxbios' to the list of supported targets.
664
665 * conf/i386-linuxbios.rmk: New file.
666
667 * kern/i386/pc/hardware.c: Likewise.
668 * term/i386/pc/at_keyboard.c: Likewise.
669 * term/i386/pc/vga_text.c: Likewise.
670
671 * include/grub/i386/linuxbios/boot.h: Likewise.
672 * include/grub/i386/linuxbios/console.h: Likewise.
673 * include/grub/i386/linuxbios/init.h: Likewise.
674 * include/grub/i386/linuxbios/kernel.h: Likewise.
675 * include/grub/i386/linuxbios/loader.h: Likewise.
676 * include/grub/i386/linuxbios/memory.h: Likewise.
677 * include/grub/i386/linuxbios/serial.h: Likewise.
678 * include/grub/i386/linuxbios/time.h: Likewise.
679
680 * kern/i386/linuxbios/init.c: Likewise.
681 * kern/i386/linuxbios/startup.S: Likewise.
682 * kern/i386/linuxbios/table.c: Likewise.
683
e911ecc1 6842007-10-31 Marco Gerards <marco@gnu.org>
685
686 * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
687 (ata_mod_SOURCES): New variable.
688 (ata_mod_CFLAGS): Likewise.
689 (ata_mod_LDFLAGS): Likewise.
690
691 * disk/ata.c: New file.
692
693 * include/grub/disk.h (grub_disk_dev_id): Add
694 `GRUB_DISK_DEV_ATA_ID'.
695
7f66d0e0 6962007-10-31 Robert Millan <rmh@aybabtu.com>
697
698 * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
699 * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
700
701 * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
702 * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
703
704 * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
705 `<grub/types.h>'.
706
707 * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
708
5cd7dd46 7092007-10-27 Robert Millan <rmh@aybabtu.com>
710
3236ca65 711 * include/grub/types.h (ULONG_MAX): Define macro.
5cd7dd46 712
2ebfc90f 7132007-10-22 Robert Millan <rmh@aybabtu.com>
714
715 * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'. Include
716 `"../realmode.S"'.
717 Remove `"kern/i386/loader.S"'. Include `"../loader.S"'.
718
73fcb0f3 7192007-10-22 Robert Millan <rmh@aybabtu.com>
720
721 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
722 (pkgdata_MODULES): Add `biosdisk.mod'.
723 (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
724 variables.
725
726 * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
727 (grub_biosdisk_init): Replace with ...
728 (GRUB_MOD_INIT(biosdisk)): ... this.
729 (grub_biosdisk_fini): Replace with ...
730 (GRUB_MOD_FINI(biosdisk)): ... this.
731
732 * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
733 (grub_machine_init): Remove call to grub_biosdisk_init().
734 (grub_machine_fini): Remove call to grub_machine_fini().
735
736 * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
737
3381d274 7382007-10-22 Robert Millan <rmh@aybabtu.com>
739
740 * include/grub/time.h: New file.
741 * include/grub/i386/time.h: Likewise.
742 * include/grub/powerpc/time.h: Likewise.
743 * include/grub/sparc64/time.h: Likewise.
744
745 * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
746 instances to ...
747 (KERNEL_MACHINE_TIME_HEADER): ... this.
748 * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
749 instances to ...
750 (KERNEL_MACHINE_TIME_HEADER): ... this.
751 * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
752 instances to ...
753 (KERNEL_MACHINE_TIME_HEADER): ... this.
754
755 * kern/i386/efi/init.c: Include `<grub/time.h>'.
756 (grub_millisleep): New function.
757 * kern/i386/pc/init.c: Include `<grub/time.h>'.
758 (grub_millisleep): New function.
759 * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
760 Remove `grub/machine/time.h' include.
761 (grub_millisleep): New function.
762 * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
763 Remove `grub/machine/time.h' include.
764 (grub_millisleep): New function.
765
766 * include/grub/misc.h (grub_div_roundup): New function.
767
768 * kern/misc.c: Include `<grub/time.h>'.
769 (grub_millisleep_generic): New function.
770
771 * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
772 Add `time.h'.
773 * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
774 Add `time.h'.
775 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
776 `machine/time.h'. Add `time.h'.
777 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
778
a39a0312 7792007-10-21 Robert Millan <rmh@aybabtu.com>
780
781 * include/grub/misc.h (grub_max): New function.
782
2aad70e2 7832007-10-21 Robert Millan <rmh@aybabtu.com>
784
785 * util/misc.c (grub_util_info): Call fflush() before returning.
786
54b71c4b 7872007-10-20 Robert Millan <rmh@aybabtu.com>
788
789 * genmk.rb (Image): Copy `extra_flags' from here ...
790 (PModule): ... to here. Use it in `#{obj}: #{src}' rule.
791
792 * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
793 to `argc' and `args' arguments.
794
a979f513 7952007-10-17 Robert Millan <rmh@aybabtu.com>
796
797 * kern/i386/loader.S: New file.
798
799 * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
800 * kern/i386/loader.S (grub_linux_prot_size)... to here.
801 * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
802 * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
803 * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
804 * kern/i386/loader.S (grub_linux_real_addr)... to here.
805 * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
806 * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
807 * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
808 * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
809 * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
810 * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
811 * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
812 * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
813
814 * kern/i386/realmode.S: New file.
815
816 * kern/i386/pc/startup.S (protstack): Moved from here ...
817 * kern/i386/realmode.S (protstack)... to here.
818 * kern/i386/pc/startup.S (gdt): Moved from here ...
819 * kern/i386/realmode.S (gdt)... to here.
820 * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
821 * kern/i386/realmode.S (prot_to_real)... to here.
822
823 * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
824 `kern/i386/realmode.S'.
825
825fc8fd 8262007-10-17 Robert Millan <rmh@aybabtu.com>
827
828 * include/grub/i386/loader.h: New file.
829
830 * include/grub/i386/pc/loader.h (grub_linux_prot_size)
831 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
832 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
833 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
834 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
835 * include/grub/i386/loader.h (grub_linux_prot_size)
836 (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
837 (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
838 (grub_multiboot_real_boot, grub_multiboot2_real_boot)
839 (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
840
841 * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
842
e179b2f4 8432007-10-15 Robert Millan <rmh@aybabtu.com>
844
845 * normal/misc.c (grub_normal_print_device_info): Do not probe for
846 filesystem when dev->disk is unset.
847 Do probe for filesystem even when dev->disk->has_partitions is set.
848 In case a filesystem is found, always report it.
849 In case it isn't, if dev->disk->has_partitions is set, report that
850 a partition table was found instead of reporting that no filesystem
851 could be identified.
852
5db82af6 8532007-10-12 Robert Millan <rmh@aybabtu.com>
854
855 * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
856 to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
857
68f6ac74 858 * include/grub/types.h (grub_host_to_target16): New macro.
859 (grub_host_to_target32): Likewise.
860 (grub_host_to_target64): Likewise.
861 (grub_target_to_host16): Likewise.
862 (grub_target_to_host32): Likewise.
863 (grub_target_to_host64): Likewise.
5db82af6 864
865 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
866 Renamed from to ...
867 (GRUB_MOD_ALIGN): ...this. Update all users.
868
68f6ac74 869 * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
870 grub_host_to_target32.
871 Replace grub_be_to_cpu32 with grub_target_to_host32.
872 (load_modules): Likewise.
873 (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
874 Replace grub_be_to_cpu32 with grub_target_to_host32.
875 Replace grub_cpu_to_be16 with grub_host_to_target16.
876 Replace grub_cpu_to_be32 grub_host_to_target32.
5db82af6 877
3cf497cc 8782007-10-12 Robert Millan <rmh@aybabtu.com>
879
880 * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
881 * util/elf/grub-mkimage.c: ... here.
882
883 * DISTLIST: Add `util/elf/grub-mkimage.c'. Remove
884 `util/powerpc/ieee1275/grub-mkimage.c'.
885
c8cc3692 8862007-10-07 Robert Millan <rmh@aybabtu.com>
adbc4c9d 887
c8cc3692 888 * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
889 and make it easier to figure out.
890 Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
891 (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
892 Do not avoid claiming a region above HEAP_MAX_ADDR if that would
893 leave us with less than HEAP_MIN_SIZE total heap.
894 Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
adbc4c9d 895
5c58b791 8962007-10-03 Robert Millan <rmh@aybabtu.com>
897
898 * include/grub/i386/io.h: New file.
899 * commands/i386/pc/play.c (inb): Removed.
900 (outb): Removed.
901 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
902 with grub_outb().
afcd2ef8 903 * term/i386/pc/serial.c (inb): Removed.
904 (outb): Removed.
905 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
906 with grub_outb().
907 * term/i386/pc/vga.c (inb): Removed.
908 (outb): Removed.
909 Include grub/cpu/io.h. Replace inb() with grub_inb() and outb()
910 with grub_outb().
5c58b791 911
1a477ed6 9122007-10-02 Robert Millan <rmh@aybabtu.com>
913
914 * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
915 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
916 Reported by Marcin Kurek.
917
6b5d80fa 9182007-09-07 Robert Millan <rmh@aybabtu.com>
919
920 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
921 SmartFirmware version updates (as released by Sven Luther), and avoid
922 setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
923 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
924 known broken.
925
5618afbf 9262007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
927
928 From Hitoshi Ozeki:
929 * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
930 when merging two regions.
931
6139dcd9 9322007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
933
508e39ee 934 * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
935 * normal/completion.c (grub_normal_do_completion): Likewise.
936 Reported by Hitoshi Ozeki.
937
9382007-09-03 Yoshinori K. Okuji <okuji@enbug.org>
939
6139dcd9 940 Do not use devices at boot in chainloading.
941
942 * loader/i386/pc/chainloader.c (boot_drive): New variable.
943 (boot_part_addr): Likewise.
944 (grub_chainloader_boot): Simply call grub_chainloader_real_boot
945 with BOOT_DRIVE and BOOT_PART_ADDR.
946 (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
947 Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
948
38da6516 9492007-08-29 Robert Millan <rmh@aybabtu.com>
950
951 Patch from Simon Peter <dn.tlp@gmx.net>:
952 * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
953 * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
954 util/grub-probe.c_DEPENDENCIES. Replace grub-setup_DEPENDENCIES with
955 util/i386/pc/grub-setup.c_DEPENDENCIES.
956 * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
957 util/grub-probe.c_DEPENDENCIES.
958 * conf/powerpc-ieee1275.rmk: Likewise.
959
29d0928c 9602007-08-28 Robert Millan <rmh@aybabtu.com>
961
962 * util/i386/get_disk_name.c: New. Implement grub_util_get_disk_name()
963 to tell grub-mkdevicemap how to name devices.
964 * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
965 feature).
966
967 * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
968 util/i386/get_disk_name.c.
969 * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
970 * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
971 util/ieee1275/get_disk_name.c.
972
973 * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
974
975 * DISTLIST: Add util/i386/get_disk_name.c and
976 util/ieee1275/get_disk_name.c.
977
978 * util/grub-mkdevicemap.c: Replace device naming logic with
979 grub_util_get_disk_name() calls.
980
5a0d3cca 9812007-08-20 Robert Millan <rmh@aybabtu.com>
982
983 * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
984 (so that it works for both plural and singular quantities).
985
8b72db2f 9862007-08-05 Robert Millan <rmh@aybabtu.com>
987
988 * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
989 so that [xz] isn't taken into account when determining order.
990
352466bf 9912007-08-02 Marco Gerards <marco@gnu.org>
992
993 * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
994 `include/multiboot2.h', `include/grub/elfload.h',
995 `include/multiboot.h', `include/grub/multiboot.h',
996 `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
997 `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
998 `kern/elf.c', `loader/multiboot_loader.c',
999 `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
1000 `loader/i386/pc/multiboot2.c',
1001 `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
1002 `util/i386/pc/grub-mkrescue.in'. Remove
1003 `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
1004 `include/grub/i386/pc/util/biosdisk.h' and
1005 `include/grub/powerpc/ieee1275/multiboot.h'.
1006
8f096014 10072007-08-02 Bean <bean123ch@gmail.com>
1008
1009 * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
1010 (ntfs_mod_SOURCES): New variable.
1011 (ntfs_mod_CFLAGS): Likewise.
1012 (ntfs_mod_LDFLAGS): Likewise.
1013
1014 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
1015 (grub_probe_SOURCES): Likewise.
1016 (grub_emu_SOURCES): Likewise.
1017
1018 * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
1019 (grub_emu_SOURCES): Likewise.
1020
1021 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
1022 (grub_emu_SOURCES): Likewise.
1023
1024 * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
1025
1026 * fs/ntfs.c: New file.
1027
9959f7db 10282007-08-02 Bean <bean123ch@gmail.com>
1029
1030 * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
1031
1032 * file.h (grub_file): Likewise.
1033
1034 * fshelp.h (grub_fshelp_read_file): Likewise.
1035
1036 * util/i386/pc/grub-setup.c (setup): Likewise.
1037 (save_first_sector): Likewise.
1038 (save_blocklists): Likewise.
1039
1040 * fs/affs.c (grub_affs_read_file): Likewise.
1041
1042 * fs/ext2.c (grub_ext2_read_file): Likewise.
1043
1044 * fs/fat.c (grub_fat_read_data): Likewise.
1045
1046 * fs/fshelp.c (grub_fshelp_read_file): Likewise.
1047
1048 * fs/hfs.c (grub_hfs_read_file): Likewise.
1049
1050 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
1051
1052 * fs/jfs.c (grub_jfs_read_file): Likewise.
1053
1054 * fs/minix.c (grub_minix_read_file): Likewise.
1055
1056 * fs/sfs.c (grub_sfs_read_file): Likewise.
1057
1058 * fs/ufs.c (grub_ufs_read_file): Likewise.
1059
1060 * fs/xfs.c (grub_xfs_read_file): Likewise.
1061
1062 * command/blocklist.c (read_blocklist): Likewise.
1063 (print_blocklist): Likewise.
1064
0a203f83 10652007-08-02 Marco Gerards <marco@gnu.org>
1066
1067 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
1068 `util/hostfs.c'.
1069
1070 * disk/host.c: New file.
1071
1072 * util/hostfs.c: Likewise.
1073
1074 * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
1075 return `GRUB_ERR_BAD_FS'.
1076 * fs/sfs.c (grub_sfs_mount): Likewise.
1077 * fs/xfs.c (grub_xfs_mount): Likewise.
1078
1079 * include/grub/disk.h (enum grub_disk_dev_id): Add
1080 `GRUB_DISK_DEVICE_HOST_ID'.
1081
1082 * util/grub-emu.c (main): Initialize and de-initialize hostfs.
1083
e5dfe777 10842007-07-24 Jerone Young <jerone@gmail.com>
1085
1086 * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
1087 modules for compilation.
1088 * conf/powerpc-ieee1275.rmk: Likewise.
1089
1090 * include/multiboot.h: Move multiboot definitions to one file. Rename
1091 many definitions to not get grub specific.
1092 * include/multiboot2.h: Create header with multiboot 2 definitions.
1093 * include/grub/multiboot.h: Header for grub specific function
1094 prototypes and definitions.
1095 * include/grub/multiboot2.h: Likewise.
1096 * include/grub/multiboot_loader.h: Likewise.
1097 * include/grub/i386/pc/multiboot.h: Removed.
1098 * include/grub/powerpc/ieee1275/multiboot.h: Removed.
1099
1100 * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
1101 and 2 to allow for one multiboot and module commands.
1102 * loader/multiboot2.c: Add multiboot2 functionality.
1103 * loader/i386/pc/multiboot.c: Modify for new multiboot header location
1104 and definition names.
1105 * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
1106 2 functions.
1107 * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
1108 ieee1275 specific multiboot2 code.
1109
1110 * kern/i386/pc/startup.S: Change headers and definition names for
1111 multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
1112
daf0f0ba 11132007-07-22 Robert Millan <rmh@aybabtu.com>
1114
1115 * geninitheader.sh: Process file specified in first parameter rather
1116 than hardcoding grub_modules_init.lst.
1117 * geninit.sh: Likewise. Also, construct header name dynamicaly rather
1118 than hardcoding grub_modules_init.h.
1119
1120 * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
1121 grub-emu to grub_emu_init.[ch]. Add rules to build analogous
1122 grub_probe_init.[ch] and grub_setup_init.[ch].
1123
1124 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
1125 grub_modules_init.h with grub_emu_init.h.
1126 (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
1127 grub_probe_init.[ch] files.
1128 * conf/i386-efi.rmk: Likewise.
1129 * conf/i386-pc.rmk: Likewise.
1130 (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
1131 grub_setup_init.[ch] files.
1132
1133 * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
1134 * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all()
1135 to initialize modules rather than a list of hardcoded functions.
1136 * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use
1137 grub_init_all() to initialize modules rather than a list of hardcoded
1138 functions.
1139
54cdc1cc 11402007-07-22 Robert Millan <rmh@aybabtu.com>
1141
1142 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
1143 GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
1144
ad0686cc 11452007-07-22 Robert Millan <rmh@aybabtu.com>
1146
1147 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
1148 GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
1149 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
1150 flag when running on SmartFirmware.
1151 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
1152 "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
1153 was set.
1154
1155 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
1156 Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
1157 rather than decreasing it.
1158
1159 * util/i386/pc/grub-setup.c (setup): When embedding is required, but
1160 there's not enough space to do it, fail in the same way as when it
1161 can't be done because there are no partitions.
1162
1163 * util/powerpc/ieee1275/grub-install.in: Improve error message shown
1164 when nvsetenv failed.
1165
969c02ec 11662007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
1167
1168 * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
1169 because this rule is automatically generated.
1170 (grub-mkrescue): Removed for the same reason as above.
1171
5a79f472 11722007-07-22 Yoshinori K. Okuji <okuji@enbug.org>
1173
1174 Migrate to GNU General Public License Version 3.
1175
1176 * COPYING: Replaced with the plain text version of GPLv3.
1177
1178 * config.guess: Updated from gnulib.
1179 * config.sub: Likewise.
1180
1181 * geninit.sh: Output a GPLv3 copyright notice.
1182 * geninitheader.sh: Likewise.
1183 * genmodsrc.sh: Likewise.
1184 * gensymlist.sh.in: Likewise.
1185
1186 * boot/i386/pc/boot.S: Upgraded to GPLv3.
1187 * boot/i386/pc/diskboot.S: Likewise.
1188 * boot/i386/pc/pxeboot.S: Likewise.
1189 * commands/blocklist.c: Likewise.
1190 * commands/boot.c: Likewise.
1191 * commands/cat.c: Likewise.
1192 * commands/cmp.c: Likewise.
1193 * commands/configfile.c: Likewise.
1194 * commands/echo.c: Likewise.
1195 * commands/help.c: Likewise.
1196 * commands/ls.c: Likewise.
1197 * commands/search.c: Likewise.
1198 * commands/terminal.c: Likewise.
1199 * commands/test.c: Likewise.
1200 * commands/videotest.c: Likewise.
1201 * commands/i386/cpuid.c: Likewise.
1202 * commands/i386/pc/halt.c: Likewise.
1203 * commands/i386/pc/play.c: Likewise.
1204 * commands/i386/pc/reboot.c: Likewise.
1205 * commands/i386/pc/vbeinfo.c: Likewise.
1206 * commands/i386/pc/vbetest.c: Likewise.
1207 * commands/ieee1275/halt.c: Likewise.
1208 * commands/ieee1275/reboot.c: Likewise.
1209 * commands/ieee1275/suspend.c: Likewise.
1210 * disk/loopback.c: Likewise.
1211 * disk/lvm.c: Likewise.
1212 * disk/raid.c: Likewise.
1213 * disk/efi/efidisk.c: Likewise.
1214 * disk/i386/pc/biosdisk.c: Likewise.
1215 * disk/ieee1275/ofdisk.c: Likewise.
1216 * font/manager.c: Likewise.
1217 * fs/affs.c: Likewise.
1218 * fs/ext2.c: Likewise.
1219 * fs/fat.c: Likewise.
1220 * fs/fshelp.c: Likewise.
1221 * fs/hfs.c: Likewise.
1222 * fs/hfsplus.c: Likewise.
1223 * fs/iso9660.c: Likewise.
1224 * fs/jfs.c: Likewise.
1225 * fs/minix.c: Likewise.
1226 * fs/sfs.c: Likewise.
1227 * fs/ufs.c: Likewise.
1228 * fs/xfs.c: Likewise.
1229 * hello/hello.c: Likewise.
1230 * include/grub/acorn_filecore.h: Likewise.
1231 * include/grub/arg.h: Likewise.
1232 * include/grub/bitmap.h: Likewise.
1233 * include/grub/boot.h: Likewise.
1234 * include/grub/cache.h: Likewise.
1235 * include/grub/device.h: Likewise.
1236 * include/grub/disk.h: Likewise.
1237 * include/grub/dl.h: Likewise.
1238 * include/grub/elfload.h: Likewise.
1239 * include/grub/env.h: Likewise.
1240 * include/grub/err.h: Likewise.
1241 * include/grub/file.h: Likewise.
1242 * include/grub/font.h: Likewise.
1243 * include/grub/fs.h: Likewise.
1244 * include/grub/fshelp.h: Likewise.
1245 * include/grub/gzio.h: Likewise.
1246 * include/grub/hfs.h: Likewise.
1247 * include/grub/kernel.h: Likewise.
1248 * include/grub/loader.h: Likewise.
1249 * include/grub/lvm.h: Likewise.
1250 * include/grub/misc.h: Likewise.
1251 * include/grub/mm.h: Likewise.
1252 * include/grub/net.h: Likewise.
1253 * include/grub/normal.h: Likewise.
1254 * include/grub/parser.h: Likewise.
1255 * include/grub/partition.h: Likewise.
1256 * include/grub/pc_partition.h: Likewise.
1257 * include/grub/raid.h: Likewise.
1258 * include/grub/rescue.h: Likewise.
1259 * include/grub/script.h: Likewise.
1260 * include/grub/setjmp.h: Likewise.
1261 * include/grub/symbol.h: Likewise.
1262 * include/grub/term.h: Likewise.
1263 * include/grub/terminfo.h: Likewise.
1264 * include/grub/tparm.h: Likewise.
1265 * include/grub/types.h: Likewise.
1266 * include/grub/video.h: Likewise.
1267 * include/grub/efi/api.h: Likewise.
1268 * include/grub/efi/chainloader.h: Likewise.
1269 * include/grub/efi/console.h: Likewise.
1270 * include/grub/efi/console_control.h: Likewise.
1271 * include/grub/efi/disk.h: Likewise.
1272 * include/grub/efi/efi.h: Likewise.
1273 * include/grub/efi/pe32.h: Likewise.
1274 * include/grub/efi/time.h: Likewise.
1275 * include/grub/i386/linux.h: Likewise.
1276 * include/grub/i386/setjmp.h: Likewise.
1277 * include/grub/i386/types.h: Likewise.
1278 * include/grub/i386/efi/kernel.h: Likewise.
1279 * include/grub/i386/efi/loader.h: Likewise.
1280 * include/grub/i386/efi/time.h: Likewise.
1281 * include/grub/i386/pc/biosdisk.h: Likewise.
1282 * include/grub/i386/pc/boot.h: Likewise.
1283 * include/grub/i386/pc/chainloader.h: Likewise.
1284 * include/grub/i386/pc/console.h: Likewise.
1285 * include/grub/i386/pc/init.h: Likewise.
1286 * include/grub/i386/pc/kernel.h: Likewise.
1287 * include/grub/i386/pc/loader.h: Likewise.
1288 * include/grub/i386/pc/memory.h: Likewise.
1289 * include/grub/i386/pc/multiboot.h: Likewise.
1290 * include/grub/i386/pc/serial.h: Likewise.
1291 * include/grub/i386/pc/time.h: Likewise.
1292 * include/grub/i386/pc/vbe.h: Likewise.
1293 * include/grub/i386/pc/vbeblit.h: Likewise.
1294 * include/grub/i386/pc/vbefill.h: Likewise.
1295 * include/grub/i386/pc/vbeutil.h: Likewise.
1296 * include/grub/i386/pc/vga.h: Likewise.
1297 * include/grub/ieee1275/ieee1275.h: Likewise.
1298 * include/grub/ieee1275/ofdisk.h: Likewise.
1299 * include/grub/powerpc/libgcc.h: Likewise.
1300 * include/grub/powerpc/setjmp.h: Likewise.
1301 * include/grub/powerpc/types.h: Likewise.
1302 * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
1303 * include/grub/powerpc/ieee1275/console.h: Likewise.
1304 * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
1305 * include/grub/powerpc/ieee1275/kernel.h: Likewise.
1306 * include/grub/powerpc/ieee1275/loader.h: Likewise.
1307 * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
1308 * include/grub/powerpc/ieee1275/time.h: Likewise.
1309 * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
1310 * include/grub/sparc64/libgcc.h: Likewise.
1311 * include/grub/sparc64/setjmp.h: Likewise.
1312 * include/grub/sparc64/types.h: Likewise.
1313 * include/grub/sparc64/ieee1275/console.h: Likewise.
1314 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
1315 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
1316 * include/grub/sparc64/ieee1275/time.h: Likewise.
1317 * include/grub/util/biosdisk.h: Likewise.
1318 * include/grub/util/getroot.h: Likewise.
1319 * include/grub/util/lvm.h: Likewise.
1320 * include/grub/util/misc.h: Likewise.
1321 * include/grub/util/raid.h: Likewise.
1322 * include/grub/util/resolve.h: Likewise.
1323 * io/gzio.c: Likewise.
1324 * kern/device.c: Likewise.
1325 * kern/disk.c: Likewise.
1326 * kern/dl.c: Likewise.
1327 * kern/elf.c: Likewise.
1328 * kern/env.c: Likewise.
1329 * kern/err.c: Likewise.
1330 * kern/file.c: Likewise.
1331 * kern/fs.c: Likewise.
1332 * kern/loader.c: Likewise.
1333 * kern/main.c: Likewise.
1334 * kern/misc.c: Likewise.
1335 * kern/mm.c: Likewise.
1336 * kern/parser.c: Likewise.
1337 * kern/partition.c: Likewise.
1338 * kern/rescue.c: Likewise.
1339 * kern/term.c: Likewise.
1340 * kern/efi/efi.c: Likewise.
1341 * kern/efi/init.c: Likewise.
1342 * kern/efi/mm.c: Likewise.
1343 * kern/i386/dl.c: Likewise.
1344 * kern/i386/efi/init.c: Likewise.
1345 * kern/i386/efi/startup.S: Likewise.
1346 * kern/i386/pc/init.c: Likewise.
1347 * kern/i386/pc/lzo1x.S: Likewise.
1348 * kern/i386/pc/startup.S: Likewise.
1349 * kern/ieee1275/ieee1275.c: Likewise.
1350 * kern/powerpc/cache.S: Likewise.
1351 * kern/powerpc/dl.c: Likewise.
1352 * kern/powerpc/ieee1275/cmain.c: Likewise.
1353 * kern/powerpc/ieee1275/crt0.S: Likewise.
1354 * kern/powerpc/ieee1275/init.c: Likewise.
1355 * kern/powerpc/ieee1275/openfw.c: Likewise.
1356 * kern/sparc64/cache.S: Likewise.
1357 * kern/sparc64/dl.c: Likewise.
1358 * kern/sparc64/ieee1275/init.c: Likewise.
1359 * kern/sparc64/ieee1275/openfw.c: Likewise.
1360 * loader/efi/chainloader.c: Likewise.
1361 * loader/efi/chainloader_normal.c: Likewise.
1362 * loader/i386/efi/linux.c: Likewise.
1363 * loader/i386/efi/linux_normal.c: Likewise.
1364 * loader/i386/pc/chainloader.c: Likewise.
1365 * loader/i386/pc/chainloader_normal.c: Likewise.
1366 * loader/i386/pc/linux.c: Likewise.
1367 * loader/i386/pc/linux_normal.c: Likewise.
1368 * loader/i386/pc/multiboot.c: Likewise.
1369 * loader/i386/pc/multiboot_normal.c: Likewise.
1370 * loader/powerpc/ieee1275/linux.c: Likewise.
1371 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1372 * normal/arg.c: Likewise.
1373 * normal/cmdline.c: Likewise.
1374 * normal/command.c: Likewise.
1375 * normal/completion.c: Likewise.
1376 * normal/execute.c: Likewise.
1377 * normal/function.c: Likewise.
1378 * normal/lexer.c: Likewise.
1379 * normal/main.c: Likewise.
1380 * normal/menu.c: Likewise.
1381 * normal/menu_entry.c: Likewise.
1382 * normal/misc.c: Likewise.
1383 * normal/parser.y: Likewise.
1384 * normal/script.c: Likewise.
1385 * normal/i386/setjmp.S: Likewise.
1386 * normal/powerpc/setjmp.S: Likewise.
1387 * normal/sparc64/setjmp.S: Likewise.
1388 * partmap/acorn.c: Likewise.
1389 * partmap/amiga.c: Likewise.
1390 * partmap/apple.c: Likewise.
1391 * partmap/gpt.c: Likewise.
1392 * partmap/pc.c: Likewise.
1393 * partmap/sun.c: Likewise.
1394 * term/gfxterm.c: Likewise.
1395 * term/terminfo.c: Likewise.
1396 * term/efi/console.c: Likewise.
1397 * term/i386/pc/console.c: Likewise.
1398 * term/i386/pc/serial.c: Likewise.
1399 * term/i386/pc/vesafb.c: Likewise.
1400 * term/i386/pc/vga.c: Likewise.
1401 * term/ieee1275/ofconsole.c: Likewise.
1402 * util/biosdisk.c: Likewise.
1403 * util/console.c: Likewise.
1404 * util/genmoddep.c: Likewise.
1405 * util/getroot.c: Likewise.
1406 * util/grub-emu.c: Likewise.
1407 * util/grub-mkdevicemap.c: Likewise.
1408 * util/grub-probe.c: Likewise.
1409 * util/lvm.c: Likewise.
1410 * util/misc.c: Likewise.
1411 * util/raid.c: Likewise.
1412 * util/resolve.c: Likewise.
1413 * util/update-grub.in: Likewise.
1414 * util/update-grub_lib.in: Likewise.
1415 * util/grub.d/00_header.in: Likewise.
1416 * util/grub.d/10_hurd.in: Likewise.
1417 * util/grub.d/10_linux.in: Likewise.
1418 * util/i386/efi/grub-install.in: Likewise.
1419 * util/i386/efi/grub-mkimage.c: Likewise.
1420 * util/i386/pc/grub-install.in: Likewise.
1421 * util/i386/pc/grub-mkimage.c: Likewise.
1422 * util/i386/pc/grub-mkrescue.in: Likewise.
1423 * util/i386/pc/grub-setup.c: Likewise.
1424 * util/i386/pc/misc.c: Likewise.
1425 * util/powerpc/ieee1275/grub-install.in: Likewise.
1426 * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
1427 * util/powerpc/ieee1275/misc.c: Likewise.
1428 * video/bitmap.c: Likewise.
1429 * video/video.c: Likewise.
1430 * video/i386/pc/vbe.c: Likewise.
1431 * video/i386/pc/vbeblit.c: Likewise.
1432 * video/i386/pc/vbefill.c: Likewise.
1433 * video/i386/pc/vbeutil.c: Likewise.
1434 * video/readers/tga.c: Likewise.
1435
3572d015 14362007-07-02 Robert Millan <rmh@aybabtu.com>
1437
1438 * conf/i386-efi.rmk: Replace obsolete reference to
1439 util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
1440 with util/getroot.c.
1441 * conf/powerpc-ieee1275.rmk: Likewise.
1442 * conf/sparc64-ieee1275.rmk: Likewise.
1443
1444 * util/grub-emu.c (main): Fix unchecked pointer handling.
1445
2c2a681b 14462007-07-02 Robert Millan <rmh@aybabtu.com>
1447
1448 * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
1449 invocation to fail, in order to support partition-less media.
1450
1451 * util/i386/pc/grub-install.in: Likewise.
1452
1453 * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
1454 which fs or partmap modules are needed (akin to its sister scripts).
1455
1456 Also use grub-probe to get rid of unportable /proc/mounts check.
1457
1458 Print the same informational message that the other scripts do, before
1459 exitting.
1460
6193defe 14612007-06-23 Robert Millan <rmh@aybabtu.com>
1462
1463 * util/update-grub_lib.in (font_path): New function. Determine wether
1464 a font file can be found and, if so, echo the GRUB path to it.
1465
1466 * util/update-grub.in: Handle multiple terminals depending on user
1467 input, platform availability and font file presence. Propagate
1468 variables of our findings to /etc/grub.d/ children.
1469
1470 * util/grub.d/00_header.in: Handle multiple terminals, based on
1471 environment setup by update-grub.
1472
eface1dc 14732007-06-23 Robert Millan <rmh@aybabtu.com>
1474
ba50d28f 1475 * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
eface1dc 1476
bf697e28 14772007-06-21 Robert Millan <rmh@aybabtu.com>
1478
1479 * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
1480 indicate end of data section in kernel image.
1481 * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
1482 GRUB_KERNEL_MACHINE_DATA_END.
1483
1484 * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
1485 space for it.
1486 * kern/i386/efi/startup.S: Likewise.
1487
1488 * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
1489 during image generation. Implement --prefix option to override this
1490 patch.
1491 * util/i386/efi/grub-mkimage.c: Likewise.
1492
1493 * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
1494 code to make path relative to its root into a separate function.
1495
1496 * util/i386/pc/grub-install.in: Use newly provided
1497 make_system_path_relative_to_its_root() to convert ${grubdir}, then
1498 pass the result to grub-install --prefix.
1499
baa574b4 15002007-06-13 Robert Millan <rmh@aybabtu.com>
1501
1502 * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
1503 DEFAULT_DEVICE_MAP.
1504 * util/grub-emu.c: Use above definitions from misc.h instead of
1505 defining them.
1506 * util/grub-mkdevicemap.c: Likewise.
1507 * util/i386/pc/grub-setup.c: Likewise.
1508 * util/grub-probe.c: Likewise.
1509 (probe): Abort with grub_util_error() when either
1510 grub_guess_root_device or grub_util_get_grub_dev fails.
1511
0215dcbf 15122007-06-12 Robert Millan <rmh@aybabtu.com>
1513
1514 * normal/command.c (grub_command_execute): Use NULL rather than 0 for
1515 "pager" assignment.
1516 * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
1517 "pcdata".
1518 * util/grub-probe.c (probe): Likewise for "drive_name".
1519
8af2ab7b 15202007-06-11 Robert Millan <rmh@aybabtu.com>
1521
1522 * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
1523 not just the cdrom one.
1524
59d31694 15252007-06-11 Robert Millan <rmh@aybabtu.com>
1526
1527 * util/i386/pc/grub-mkrescue.in: Add "set -e".
1528 Add --pkglibdir=DIR option to override pkglibdir.
1529 Mention --image-type=TYPE in help output.
1530 Fix --grub-mkimage (it was a no-op).
1531 Abort gracefuly when no parameter is given.
1532
7ee367e4 15332007-06-11 Robert Millan <rmh@aybabtu.com>
1534
1535 * util/i386/pc/grub-mkrescue.in: New file.
1536 * conf/i386-pc.rmk: Add its build declarations. Put it in bin_SCRIPTS.
1537 * Makefile.in: Handle bin_SCRIPTS.
1538
29b0ed46 15392007-06-10 Vesa Jaaskelainen <chaac@nic.fi>
1540
1541 * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
1542 list of video modes.
1543
c0f90770 15442007-06-06 Robert Millan <rmh@aybabtu.com>
1545
1546 * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
1547 file doesn't exist, or if it is in a filesystem grub can't read.
1548
1549 * util/update-grub.in: Set fallback for GRUB_FS check to "unknown". Do
1550 not abort if GRUB_DRIVE could not be defined. Rearrange generated
1551 header comment to fit in 80 columns when the variables are resolved.
1552
1553 * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
1554 could be identified by update-grub. Remove redundant check for
1555 unifont.pff existance (since convert_system_path_to_grub_path now
1556 handles that).
1557
fb36dc26 15582007-06-04 Robert Millan <rmh@aybabtu.com>
1559
1560 * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
1561
1562 * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
1563
1564 * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
1565
0c68c93e 15662007-06-04 Robert Millan <rmh@aybabtu.com>
1567
1568 * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
1569
1570 * include/grub/partition.h: Declare grub_apple_partition_map_init and
1571 grub_apple_partition_map_fini.
1572
1573 * util/biosdisk.c
1574 (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
1575 to access >2 TiB disks).
1576
1577 Print disk->total_sectors with %llu instead of %lu, since this
1578 variable is always 64-bit (prevents wrong disk size from being displayed
1579 on either >2 TiB disk or big-endian CPU).
1580
1581 (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
1582 into a generic case that supports all (sane) partition maps.
1583
1584 Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
1585 breaks big-endian.
1586
1587 * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
1588 and grub_apple_partition_map_fini() after that.
1589
0f23eb74 15902007-06-01 Robert Millan <rmh@aybabtu.com>
1591
1592 * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
1593
1594 * util/grub.d/00_header.in: Only enable gfxterm when
1595 convert_system_path_to_grub_path() succeeds.
1596
42c71976 15972007-05-20 Robert Millan <rmh@aybabtu.com>
1598
1599 * util/update-grub_lib.in: New file.
1600 * DISTLIST: Add update-grub_lib.in.
1601 * conf/common.rmk: Generate update-grub_lib and install it in
1602 $(lib_DATA).
1603 * Makefile.in: Add install routine for $(lib_DATA).
1604
1605 * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
1606 function provided by update-grub_lib to support arbitrary paths of
1607 unifont.pff.
1608 * util/update-grub.in: Use convert_system_path_to_grub_path() to
1609 initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
1610
5beb2291 16112007-05-19 Robert Millan <rmh@aybabtu.com>
1612
1613 * commands/i386/cpuid.c: New module.
1614 * DISTLIST: Add it.
1615 * conf/i386-efi.rmk: Enable cpuid.mod.
1616 * conf/i386-pc.rmk: Likewise.
1617
7262eca1 16182007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
1619
1620 * kern/disk.c (grub_disk_read): Check return value of
1621 grub_realloc().
1622
260ba823 16232007-05-18 Jeroen Dekkers <jeroen@dekkers.cx>
1624
1625 * util/getroot.c (grub_util_get_grub_dev): Support partitionable
1626 arrays.
1627 * disk/raid.c (grub_raid_open): Likewise.
1628
1ecb6cf2 16292007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
1630
1631 * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
1632 stack instead of on the heap.
1633
1634 * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
1635 before doing a read on it.
1636
1637 * configure.ac: Only use -fno-stack-protector for the target
1638 environment.
1639
21c8cbb1 16402007-05-17 Jeroen Dekkers <jeroen@dekkers.cx>
1641
1642 * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
1643 __attribute_ ((unused)) to mode_type argument.
1644
1645 * util/getroot.c (grub_guess_root_device): Fix #endif.
1646
1647 * kern/misc.c (memcmp): Fix prototype.
1648
1649 * include/grub/partition.h [GRUB_UTIL]
1650 (grub_gpt_partition_map_init): Add prototype.
1651 (grub_gpt_partition_map_fini): Likewise.
1652
1653 * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
1654 at the right place.
1655
1656 * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
1657 (grub_fat_read_data): Likewise.
1658 (grub_fat_find_dir): Likewise.
1659
1660 * font/manager.c (find_glyph): Make table a const.
1661 (grub_font_get_glyph): Remove bitmap from if statement.
1662
849d55d3 16632007-05-16 Jeroen Dekkers <jeroen@dekkers.cx>
1664
1665 * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
1666 code, first search for device in /dev/mapper, then in /dev.
1667 (grub_util_get_grub_dev): New function.
1668 * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
1669 prototype.
1670 * util/grub-probe.c (probe): Remove check for RAID, call
1671 grub_util_get_grub_dev() instead of
1672 grub_util_biosdisk_get_grub_dev().
1673 * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
1674 grub_util_biosdisk_get_grub_dev().
1675 * util/i386/pc/grub-setup.c (main): Likewise.
1676
8fff7c2f 16772007-05-16 Robert Millan <rmh@aybabtu.com>
1678
1679 * DISTLIST: Update for the latest changes.
1680 * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
1681 util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
1682 * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
1683 grub/util/biosdisk.h.
1684 * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
1685 grub/util/biosdisk.h.
1686
48e12b52 16872007-05-16 Robert Millan <rmh@aybabtu.com>
1688
1689 * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
1690
46b9d128 16912007-05-16 Robert Millan <rmh@aybabtu.com>
1692
1693 * util/i386/efi/grub-install.in: New.
1694 * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
1695 newly added grub-install.
1696 * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
1697 include.
1698 * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
1699 grub/util/biosdisk.h.
1700 * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
1701 grub/util/biosdisk.h.
1702
2d1a40a9 17032007-05-16 Robert Millan <rmh@aybabtu.com>
1704
1705 * include/grub/i386/pc/util/biosdisk.h: Moved to ...
1706 * include/grub/util/biosdisk.h: ... here.
1707 * util/i386/pc/biosdisk.c: Moved to ...
1708 * util/biosdisk.c: ... here.
1709 * util/i386/pc/getroot.c: Moved to ...
1710 * util/getroot.c: ... here.
1711 * util/i386/pc/grub-mkdevicemap.c: Moved to ...
1712 * util/grub-mkdevicemap.c: ... here.
1713 * util/i386/pc/grub-probe.c: Moved to ...
1714 * util/grub-probe.c: ... here.
1715
9e26e3bc 17162007-05-15 Robert Millan <rmh@aybabtu.com>
1717
1718 * util/update-grub.in: Remove duplicated line in grub.cfg header
1719 message.
1720
57f96397 17212007-05-13 Robert Millan <rmh@aybabtu.com>
1722
1723 * util/update-grub.in: Fix a few assumptions about the devices holding
1724 /, /boot and /boot/grub being the same.
1725 * util/grub.d/00_header.in: Likewise.
1726 * util/grub.d/10_hurd.in: Likewise.
1727 * util/grub.d/10_linux.in: Likewise.
1728
1729 * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
1730 patterns. Use that to define the `.old' suffix as older than `'.
1731
1732 * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
1733
1734 * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
1735 the grub.cfg header message.
1736
2e610d62 17372007-05-11 Robert Millan <rmh@aybabtu.com>
1738
1739 * util/update-grub.in: Create device.map if it doesn't already exist,
1740 before attempting to run grub-probe.
1741 Check for grub-probe and grub-mkdevicemap with the same code
1742 grub-install is using.
1743 Remove test mode.
1744
3f6a10ef 17452007-05-09 Jeroen Dekkers <jeroen@dekkers.cx>
1746
1747 * Makefile.in: Add the datarootdir autoconf variable.
1748
02e7b75e 17492007-05-09 Robert Millan <rmh@aybabtu.com>
1750
1751 * util/i386/pc/grub-probe.c (probe): When detecting partition map,
1752 fail gracefuly if dev->disk->partition == NULL.
1753
75f396cc 17542007-05-07 Robert Millan <rmh@aybabtu.com>
1755
1756 * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
1757 determine partition map module.
1758 * util/i386/pc/grub-install.in: Use this feature to decide which
1759 partition module to load, instead of hardcoding pc and gpt.
1760
da65cb36 17612007-05-07 Robert Millan <rmh@aybabtu.com>
1762
1763 * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
1764 source directory differs from build directory.
1765
b57d6a91 17662007-05-05 Robert Millan <rmh@aybabtu.com>
1767
1768 * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
1769 initialisation.
1770
509d00f1 17712007-05-05 Robert Millan <rmh@aybabtu.com>
1772
1773 * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
1774
c48f23ef 17752007-05-05 Robert Millan <rmh@aybabtu.com>
1776
1777 * util/grub.d/10_linux.in: Allow the administrator to insert Linux
1778 command-line arguments via ${GRUB_CMDLINE_LINUX}.
1779
20b97658 17802007-05-05 Robert Millan <rmh@aybabtu.com>
1781
1782 * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
1783 (grub_probe_SOURCES): Likewise.
1784 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
1785 GPT and initialize dos_part and bsd_part accordingly.
1786 * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
1787 install_bsd_part.
1788 (main): Activate gpt module for use during partition identification,
1789 and deactivate it afterwards.
1790 * util/i386/pc/grub-install.in: Add gpt module to core.img.
1791 * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
1792 partition identification, and deactivate it afterwards.
1793
99123174 17942007-05-05 Robert Millan <rmh@aybabtu.com>
1795
1796 * term/i386/pc/console.c (grub_console_fini): Call
1797 grub_term_set_current() before grub_term_unregister().
1798
ebd97f6e 17992007-05-04 Robert Millan <rmh@aybabtu.com>
1800
1801 * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
1802 util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
1803 * Makefile.in: Build update-grub_SCRIPTS. Install update-grub_SCRIPTS
1804 and update-grub_DATA.
1805 * conf/common.rmk: Build and install update-grub components.
1806 * conf/common.mk: Regenerate.
1807 * util/update-grub.in: New. Core of update-grub.
1808 * util/grub.d/00_header.in: New. Generates grub.cfg header.
1809 * util/grub.d/10_hurd.in: New. Generates boot entries for the Hurd.
1810 * util/grub.d/10_linux.in: New. Generates boot entries for Linux.
1811 * util/grub.d/README: New. Document grub.d directory layout.
1812
b06a264d 18132007-05-01 Robert Millan <rmh@aybabtu.com>
1814
1815 * util/grub-emu.c: Move initialization functions
1816 grub_util_biosdisk_init() and grub_init_all() before
1817 grub_util_biosdisk_get_grub_dev(), which relies on them.
1818
41f0050e 18192007-04-19 Robert Millan <rmh@aybabtu.com>
1820
1821 * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
1822 it is used later.
1823
04582bb3 18242007-04-18 Jerone Young <jerone@gmail.com>
1825
1826 * kernel/elf.c: Add missing parenthesis for conditional statement
1827 stanza.
1828
08db4632 18292007-04-10 Jerone Young <jerone@gmail.com>
49892fdf 1830
08db4632 1831 * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
1832 continue on and look for device node with real device name.
1833
801b76be 18342007-04-10 Jerone Young <jerone@gmail.com>
1d543c3e 1835
1836 * configure.ac: Add argument for autoconf to use tranformation
1837 ability.
1838 * Makefile.in: Add autoconf package transformation code.
1839 * util/i386/pc/grub-install.in: Likewise.
1840 * util/powerpc/ieee1275/grub-install.in: Likewise.
1841
6795c4e1 18422007-03-19 Yoshinori K. Okuji <okuji@enbug.org>
1843
1844 * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
1845 (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
1846 (EXT2_REVISION): Likewise.
1847 (EXT2_INODE_SIZE): Likewise.
1848 (struct grub_ext2_block_group): Added a missing member
1849 "used_dirs".
1850 (grub_ext2_read_inode): Divide by the inode size in a superblock
1851 instead of 128 to obtain INODES_PER_BLOCK.
1852 Use the macro EXT2_INODE_SIZE instead of directly using
1853 SBLOCK->INODE_SIZE.
1854
d70af616 18552007-03-18 Yoshinori K. Okuji <okuji@enbug.org>
1856
1857 * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
1858 superblock instead of the structure size to compute an
1859 offset. This fixes the problem that GRUB could not read a
1860 filesystem when inode size is different from 128-byte.
1861
3b801603 18622007-03-05 Marco Gerards <marco@gnu.org>
1863
1864 * normal/main.c (read_config_file): When "menu" is not set, create
1865 an initial context.
1866
4785bfe4 18672007-02-21 Hollis Blanchard <hollis@penguinppc.org>
1868
1869 * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
1870 (HEAP_LIMIT): New macro.
1871 (grub_claim_heap): Claim memory up to `heaplimit'.
1872
a0cbb023 18732007-02-21 Hollis Blanchard <hollis@penguinppc.org>
1874
1875 * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
1876 * kern/powerpc/ieee1275/init.c (_end): Add declaration.
1877 (_start): Likewise.
1878 (grub_arch_modules_addr): Return address after `_end'.
1879 * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
1880 (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
1881 (add_segments): Calculate `_end' from phdr size and location.
1882 (ALIGN_UP): Moved to ...
1883 * include/grub/misc.h: here.
1884 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
1885 New macro.
1886 (GRUB_IEEE1275_MODULE_BASE): Removed.
1887
fd7d8eba 18882007-02-20 Hollis Blanchard <hollis@penguinppc.org>
1889
1890 * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
1891 loop boundary.
1892
9b09e6fc 18932007-02-20 Hollis Blanchard <hollis@penguinppc.org>
1894
1895 * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
1896 All users updated.
1897 (grub_elf64_load_hook_t): Likewise.
1898 * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
1899 debug output.
1900
3ce27299 19012007-02-20 Hollis Blanchard <hollis@penguinppc.org>
1902
1903 * kern/mm.c: Update copyright.
1904 (grub_mm_debug): Correct syntax error.
1905 (grub_mm_dump_free): New function.
1906 (grub_debug_free): Call `grub_free'.
1907 * include/grub/mm.h: Update copyright.
1908 (grub_mm_dump_free): Add declaration.
1909
077d5fee 19102007-02-12 Hollis Blanchard <hollis@penguinppc.org>
1911
1912 * include/grub/ieee1275/ieee1275.h: Update copyright.
1913 * kern/powerpc/ieee1275/init.c: Likewise.
1914 * kern/powerpc/ieee1275/openfw.c: Likewise.
1915
1916 * loader/powerpc/ieee1275/linux.c: Likewise.
1917 * include/grub/elfload.h: Likewise.
1918 * kern/elf.c: Likewise.
1919 (grub_elf32_load): Pass `base' and `size' parameters. Update all
1920 callers.
1921 (grub_elf64_load): Likewise.
1922 (grub_elf32_load_segment): Move to a nested function.
1923 (grub_elf64_load_segment): Likewise.
1924
dc946850 19252007-02-12 Hollis Blanchard <hollis@penguinppc.org>
1926
1927 * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
1928 prototype.
1929 * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
1930 (grub_heap_len): Likewise.
1931 (HEAP_SIZE): New macro.
1932 (grub_claim_heap): New function.
1933 (grub_machine_init): Don't claim heap directly. Call
1934 `grub_claim_heap'.
1935 * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
1936 (grub_available_iterate): New function.
1937
baa2a121 19382007-02-03 Thomas Schwinge <tschwinge@gnu.org>
1939
1940 * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
1941 * configure.ac: Use it for testing the HOST and TARGET compilers.
1942
4fe9862e 19432006-12-13 Thomas Schwinge <tschwinge@gnu.org>
1944
1945 * Makefile.in (enable_grub_emu): New variable.
1946 * configure.ac (--enable-grub-emu): New option.
1947 Do the checks for (n)curses only if `--enable-grub-emu' is requested.
1948 * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
1949 * conf/i386-pc.rmk: Likewise.
1950 * conf/powerpc-ieee1275.rmk: Likewise.
1951 * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
1952
a8aa5762 19532006-12-12 Marco Gerards <marco@gnu.org>
1954
1955 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
1956
1957 * kern/env.c (grub_env_unset): Don't free the member `value' when
1958 the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
1959 pointer.
1960
1961 * normal/main.c (current_menu): Removed.
1962 (free_menu): Unset the `menu' environment variable.
1963 (grub_normal_menu_addentry): Make use of the environment variable
1964 `menu', instead of using the global `current_menu'. Allocate
1965 memory for the sourcecode of this entry.
1966 (read_config_file): New argument `nested', changed all callers.
1967 Only in the case of a new context, initialize a new menu. Set the
1968 `menu' environment variable.
1969 (grub_normal_execute): Don't set and unset the environment
1970 variable `menu' here anymore. Only free the menu when leaving the
1971 context.
1972
1973 * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
1974 leak.
1975
957b3a3e 19762006-12-11 Marco Gerards <marco@gnu.org>
1977
1978 * normal/menu_entry.c (run): Fix off by one bug so the last line
1979 is executed. Move the loader check to outside the loop.
1980
ef875714 19812006-12-08 Hollis Blanchard <hollis@penguinppc.org>
1982
1983 * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
1984
4e739985 19852006-11-25 Yoshinori K. Okuji <okuji@enbug.org>
1986
1987 * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
1988 the number of sectors. Reported by Andrey Shuvikov
1989 <mr_hyro@yahoo.com>.
1990
790707f2 19912006-11-11 Jeroen Dekkers <jeroen@dekkers.cx>
1992
1993 * kern/disk.c (grub_disk_read): When there is a read error, always
1994 try to read only the necessary data.
1995
1996 * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
1997 disk/raid.c.
1998 * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
1999 prototype.
2000 [GRUB_UTIL] (grub_raid_fini): Likewise.
2001 [GRUB_UTIL] (grub_lvm_init): Likewise.
2002 [GRUB_UTIL] (grub_lvm_fini): Likewise.
2003 * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
2004 RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
2005 (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
2006 and grub_raid_fini().
2007
03e58196 20082006-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
2009
2010 * include/grub/types.h (__unused): Rename to UNUSED.
2011 * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
2012 (grub_elf64_size): Likewise.
2013
ae4f23bf 20142006-11-03 Hollis Blanchard <hollis@penguinppc.org>
2015
2016 * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
2017 grub_error_push and grub_error_pop in the error-handling path.
2018 (grub_elf32_load_segment): Only call grub_file_read with non-zero
2019 length.
2020
2166cc83 20212006-11-03 Hollis Blanchard <hollis@penguinppc.org>
2022
2023 * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
2024 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2025 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2026 (kernel_elf_SOURCES): Likewise.
2027 * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
2028 * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
2029 * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2030 * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
2031 * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
2032 (elf_mod_SOURCES): New variable.
2033 (elf_mod_CFLAGS): Likewise.
2034 (elf_mod_LDFLAGS): Likewise.
2035 * include/grub/types.h (__unused): New macro.
2036 * include/grub/elfload.h: New file.
2037 * kern/elf.c: Likewise.
2038 * loader/powerpc/ieee1275/linux.c: Include elfload.h.
2039 (ELF32_LOADMASK): New macro.
2040 (ELF64_LOADMASK): Likewise.
2041 (vmlinux): Removed.
2042 (grub_linux_load32): New function.
2043 (grub_linux_load64): Likewise.
2044 (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
2045 Use grub_elf_t instead of grub_file_t.
2046
a09d5aa5 20472006-11-02 Hollis Blanchard <hollis@penguinppc.org>
2048
2049 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
2050 `catch_result' to struct set_color_args.
2051
d976fc51 20522006-10-28 Yoshinori K. Okuji <okuji@enbug.org>
2053
2054 * normal/menu.c: Include grub/script.h.
2055 * normal/menu_entry.c: Likewise.
2056 * include/grub/normal.h: Do not include grub/script.h.
2057
67507549 20582006-10-27 Hollis Blanchard <hollis@penguinppc.org>
2059
2060 * kern/disk.c (grub_disk_read): Correct debug printf formatting.
2061
69203a99 20622006-10-27 Hollis Blanchard <hollis@penguinppc.org>
2063
2064 * kern/disk.c (grub_disk_open): Print debug messages when opening a
2065 disk.
2066 (grub_disk_close): Print debug messages when closing a disk.
2067 (grub_disk_read): Print debug messages when disk read fails.
2068 * kern/fs.c (grub_fs_probe): Print debug messages when detecting
2069 filesystem type.
2070 * kern/partition.c: Include misc.h.
2071 (grub_partition_iterate): Print debug messages when detecting
2072 partition type.
2073
e2b8278c 20742006-10-27 Hollis Blanchard <hollis@penguinppc.org>
2075
2076 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
2077 is negative.
2078 * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
2079
97b2f2ff 20802006-10-26 Hollis Blanchard <hollis@penguinppc.org>
2081
2082 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
2083 Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
2084
6555d655 20852006-10-25 Jeroen Dekkers <jeroen@dekkers.cx>
2086
2087 * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
2088 instead of sizeof(lv). Patch by Michael Guntsche.
2089
4d42b77f 20902006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
2091
2092 * disk/lvm.c: Rename VGS to VG_LIST.
2093 (grub_lvm_iterate): Change VGS->LV to VG-LV.
2094 (grub_lvm_open): Likewise.
2095 Thanks to Michael Guntsche for finding this bug.
2096
5d74d927 20972006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
2098
2099 * configure.ac (AC_INIT): Bumped to 1.95.
2100
a1bb27e4 21012006-10-14 Robert Millan <rmh@aybabtu.com>
2102
2103 * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
2104 with "/dev/.static/dev/md".
2105
e0994b8b 21062006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
2107
2108 * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
2109 DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
2110 DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
2111 DRIVE_NAME are always freed.
2112
2113 * util/i386/pc/biosdisk.c (make_device_name): Add one into
2114 DOS_PART, as a DOS partition is counted from one instead of zero
2115 now. Reported by Robert Millan.
2116
ddd5cee9 21172006-10-14 Robert Millan <rmh@aybabtu.com>
2118
2119 * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
2120 grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
2121 * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
2122 string returned by grub_guess_root_device.
2123 * util/i386/pc/grub-setup.c: Likewise.
2124 * util/i386/pc/grub-probefs.c: Likewise.
2125
2126 * util/i386/pc/grub-probefs.c: Rename to ...
2127 * util/i386/pc/grub-probe.c: ... this.
2128 * DISTLIST: Remove grub-probefs, add grub-probe.
2129 * conf/i386-efi.rmk: Likewise.
2130 * conf/i386-pc.rmk: Likewise.
2131 * util/i386/pc/grub-install.in: Likewise.
2132
2133 * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
2134 choose which information we want to print.
2135
2b002173 21362006-10-14 Yoshinori K. Okuji <okuji@enbug.org>
2137
2138 * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
2139 include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
2140 include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
2141 include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
2142 video/readers/tga.c and video/i386/pc/vbeutil.c.
2143
21442006-10-14 Jeroen Dekkers <jeroen@dekkers.cx>
2145
2146 Added support for RAID and LVM.
2147
2148 * disk/lvm.c: New file.
2149 * disk/raid.c: Likewise.
2150 * include/grub/lvm.h: Likewise.
2151 * include/grub/raid.h: Likewise.
2152 * include/grub/util/lvm.h: Likewise.
2153 * include/grub/util/raid.h: Likewise.
2154 * util/lvm.c: Likewise.
2155 * util/raid.c: Likewise.
2156
2157 * include/grub/disk.h (grub_disk_dev_id): Add
2158 GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
2159 (grub_disk_get_size): New prototype.
2160 * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
2161 returns a partition.
2162 (grub_disk_get_size): New function.
2163
2164 * kern/i386/pc/init.c (make_install_device): Copy the prefix
2165 verbatim if grub_install_dos_part is -2.
2166
2167 * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
2168 and LVM devices.
2169
2170 * util/i386/pc/grub-setup.c (setup): New argument
2171 MUST_EMBED. Force embedding of GRUB when the argument is
2172 true. Close FILE before returning.
2173 (main): Add support for RAID and LVM.
2174
2175 * conf/common.rmk: Add RAID and LVM modules.
2176 * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
2177 util/lvm.c.
2178 (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
2179
2180 * kern/misc.c (grub_strstr): New function.
2181 * include/grub/misc.h (grub_strstr): New prototype.
2182
050548d0 21832006-10-10 Tristan Gingold <tristan.gingold@bull.net>
2184
2185 * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
2186
da849d2d 21872006-10-05 Tristan Gingold <tristan.gingold@bull.net>
2188
2189 * kern/misc.c (grub_strtoull): Guess the base only if not
2190 specified.
2191
97b2f2ff 21922006-10-01 Hollis Blanchard <hollis@penguinppc.org>
4f0acd39 2193
2194 * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
2195 PowerMac support.
2196
97b2f2ff 21972006-10-01 Hollis Blanchard <hollis@penguinppc.org>
fba51f48 2198
2199 * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
2200
2201 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
2202 Remove `flags' argument. All callers changed.
2203 * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
2204 (IEEE1275_IHANDLE_INVALID): New variable.
2205 (IEEE1275_CELL_INVALID): New variable.
2206 (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2207 grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
2208 grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
2209 grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
2210 grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
2211 codes from Open Firmware. All callers updated.
2212 (grub_ieee1275_next_property): Directly return Open Firmware return
2213 code.
2214 * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
2215 Standardize error checking from `grub_ieee1275_get_property'.
2216 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
2217 `devalias' to `aliases'. Correct comments. Consolidate error paths.
2218
97b2f2ff 22192006-10-01 Hollis Blanchard <hollis@penguinppc.org>
cc6d3df3 2220
2221 * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
2222 `instance_to_package_args' to `instance_to_path_args'.
2223
2224 * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
2225 `grub_ieee1275_chosen'.
2226
2227 * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
2228 `grub_ieee1275_interpret'.
2229
97b2f2ff 22302006-09-25 Hollis Blanchard <hollis@penguinppc.org>
02bb8acc 2231
2232 * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
2233
97b2f2ff 22342006-09-25 Hollis Blanchard <hollis@penguinppc.org>
663b72f0 2235
2236 * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
2237 (__cmpdi): Likewise.
2238
2239 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
2240 `flags' to `grub_ieee1275_next_property'. Change `pathlen' to type
2241 `grub_ssize_t'.
2242
02bb8acc 2243 * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
663b72f0 2244
2245 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
2246 to type `grub_ssize_t'.
2247 (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
2248
7f9a8531 22492006-09-22 Marco Gerards <marco@gnu.org>
2250
2251 * normal/script.c (grub_script_create_cmdmenu): Skip leading
2252 newlines.
2253
b5ef1102 22542006-09-22 Marco Gerards <marco@gnu.org>
2255
2256 * commands/echo.c: New file.
2257
2258 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
2259
2260 * conf/common.rmk (echo_mod_SOURCES): New variable.
2261 (echo_mod_CFLAGS): Likewise.
2262 (echo_mod_LDFLAGS): Likewise.
2263
2cff3677 22642006-09-22 Marco Gerards <marco@gnu.org>
2265
2266 * normal/main.c (get_line): Malloc memory instead of using
2267 preallocated memory. Removed the arguments `cmdline' and
2268 `max_len'. Updated all callers.
2269
6ba4688b 22702006-09-22 Marco Gerards <marco@gnu.org>
2271
2272 * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
2273 (normal_mod_DEPENDENCIES): Likewise.
2274
2275 * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
2276 (normal_mod_DEPENDENCIES): Likewise.
2277
2278 * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
2279
e02ac02c 22802006-09-22 Johan Rydberg <jrydberg@gnu.org>
2281
2282 * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
2283 programs.
2284 * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
2285 (normal_mod_DEPENDENCIES): Likewise.
2286 * conf/i386-pc.mk: Regenerate.
2287 * conf/i386-efi.mk: Likewise
2288 * conf/common.mk: Likewise.
2289 * conf/powerpc-ieee1275.mk: Likewise.
2290 * conf/sparc64-ieee1275.mk: Likewise.
2291
8d252e44 22922006-09-22 Robert Millan <rmh@aybabtu.com>
2293
2294 Sync with i386 version.
2295 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
2296 * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
2297
209bf7ac 22982006-09-21 Robert Millan <rmh@aybabtu.com>
2299
2300 Import from GRUB Legacy (lib/device.c):
2301 * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
2302 (init_device_map) [__linux__]: Add support for I2O devices.
2303
6b146090 23042006-09-14 Marco Gerards <marco@gnu.org>
2305
2306 * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
2307 `-melf_i386'.
2308
e38600a8 23092006-09-14 Robert Millan <rmh@aybabtu.com>
2952da5d 2310
2311 * util/i386/pc/grub-install.in: Skip menu.lst when removing
2312 /boot/grub/*.lst.
78fa1790 2313
2952da5d 2314 * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
6b146090 2315
2952da5d 2316 * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
2317 before adding it to device.map.
2318
01b82a64 23192006-08-15 Johan Rydberg <jrydberg@gnu.org>
2320
2321 * genmk.rb: Let GCC generate dependenceies the first time it
2322 compiles a file; using the -MD option.
2323 * conf/common.mk: Regenerate.
2324 * conf/i386-pc.mk: Likewise.
2325 * conf/i386-efi.mk: Likewise.
2326 * conf/powerpc-ieee1275.mk: Likewise.
2327 * conf/sparc64-ieee1275.mk: Likewise.
2328
1064790d 23292006-08-04 Yoshinori K. Okuji <okuji@enbug.org>
2330
2331 Move the prototypes of grub_setjmp and grub_longjmp to
2332 cpu/setjmp.h, so that each architecture may specify different
2333 attributes.
2334
2335 * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
2336 (grub_longjmp): Likewise.
2337 * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
2338 (grub_longjmp): Likewise.
2339 * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
2340 (grub_longjmp): Likewise.
2341
2342 * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
2343 [!GRUB_UTIL] (grub_longjmp): Removed.
2344
29dda3ed 23452006-08-01 Pelletier Vincent <subdino2004@yahoo.fr>
2346
2347 * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
2348 "color!" method does not return any value.
2349
ad2a06ed 23502006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
2351
2352 * include/grub/bitmap.h: New file.
2353
2354 * include/grub/i386/pc/vbeutil.h: Likewise.
2355
2356 * video/bitmap.c: Likewise.
2357
2358 * video/readers/tga.c: Likewise.
2359
2360 * video/i386/pc/vbeutil.c: Likewise.
2361
2362 * commands/videotest.c: Code cleanup and updated to reflect to new
2363 video API.
2364
2365 * term/gfxterm.c: Likewise.
2366
2367 * video/video.c: Likewise.
2368
2369 * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
2370 (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
2371 (bitmap_mod_SOURCES): New entry.
2372 (bitmap_mod_CFLAGS): Likewise.
2373 (bitmap_mod_LDFLAGS): Likewise.
2374 (tga_mod_SOURCES): Likewise.
2375 (tga_mod_CFLAGS): Likewise.
2376 (tga_mod_LDFLAGS): Likewise.
2377
2378 * include/grub/video.h (grub_video_blit_operators): New enum type.
2379 (grub_video_render_target): Changed as forward declaration and moved
2380 actual definition to be video driver specific.
2381 (grub_video_adapter.blit_bitmap): Added blitting operator.
2382 (grub_video_adapter.blit_render_target): Likewise.
2383 (grub_video_blit_bitmap): Likewise.
2384 (grub_video_blit_render_target): Likewise.
2385
2386 * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
2387 driver specific render target definition.
2388 (grub_video_vbe_map_rgba): Added driver internal helper.
2389 (grub_video_vbe_unmap_color): Updated to use
2390 grub_video_i386_vbeblit_info.
2391 (grub_video_vbe_get_video_ptr): Likewise.
2392
2393 * include/grub/i386/pc/vbeblit.h
2394 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
2395 grub_video_i386_vbeblit_info.
2396 (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
2397 (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
2398 (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
2399 (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
2400 (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
2401 (grub_video_i386_vbeblit_index_index): Likewise.
2402 (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
2403 (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
2404 (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
2405 (grub_video_i386_vbeblit_blend): Added generic blitter for blend
2406 operator.
2407 (grub_video_i386_vbeblit_replace): Added generic blitter for replace
2408 operator.
2409
2410 * video/i386/pc/vbeblit.c: Updated to reflect changes on
2411 include/grub/i386/pc/vbeblit.h.
2412
2413 * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
2414 Updated to use grub_video_i386_vbeblit_info.
2415 (grub_video_i386_vbefill_R8G8B8): Likewise.
2416 (grub_video_i386_vbefill_index): Likewise.
2417 (grub_video_i386_vbefill): Added generic filler.
2418
2419 * video/i386/pc/vbefill.c: Updated to reflect changes on
2420 include/grub/i386/pc/vbefill.h.
2421
2422 * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
2423 grub_video_i386_vbeblit_info.
2424 (grub_video_vbe_unmap_color): Likewise.
2425 (grub_video_vbe_blit_glyph): Likewise.
2426 (grub_video_vbe_scroll): Likewise.
2427 (grub_video_vbe_draw_pixel): Removed function.
2428 (grub_video_vbe_get_pixel): Likewise.
2429 (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
2430 updated code to use it.
2431 (common_blitter): Added common blitter for render target and bitmap.
2432 (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
2433 (grub_video_vbe_blit_render_target): Likewise.
2434
bc8c036d 24352006-07-30 Johan Rydberg <jrydberg@gnu.org>
2436
2437 * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
2438 is in text mode if there is no console control protocol instance
2439 available.
2440
684a8eff 24412006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
2442
2443 * include/grub/video.h: Code cleanup.
2444
2445 * include/grub/i386/pc/vbe.h: Likewise.
2446
2447 * video/i386/pc/vbe.c: Likewise.
2448
2449 * video/i386/pc/vbeblit.c: Likewise.
2450
2451 * video/i386/pc/vbefill.c: Likewise.
2452
2453 * video/video.c: Likewise. Also added more comments.
2454
5915059b 24552006-07-29 Vesa Jaaskelainen <chaac@nic.fi>
2456
2457 * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
2458 (struct grub_biosdisk_dap): Likewise.
2459
2460 * include/grub/i386/pc/biosdisk.h: ... to here. Also corrected
2461 linkage settings for all functions.
2462
90ce5d56 24632006-07-12 Marco Gerards <marco@gnu.org>
2464
2465 * configure.ac (--enable-mm-debug): Fix typo.
2466
2467 * genkernsyms.sh.in: Use proper quoting for `CC'.
2468
43e7f879 24692006-07-02 Jeroen Dekkers <jeroen@dekkers.cx>
2470
2471 * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
2472 (normal_mod_ASFLAGS): Remove "-m32".
2473
4889bdec 24742006-06-14 Yoshinori K. Okuji <okuji@enbug.org>
2475
2476 * util/misc.c: Include config.h.
2477 [!HAVE_MEMALIGN]: Do not include malloc.h.
2478 (grub_memalign): Use posix_memalign, if present. Then, use
2479 memalign, if present. Otherwise, emit an error.
2480
2481 * util/grub-emu.c: Do not include malloc.h.
2482
2483 * include/grub/util/misc.h: Include unistd.h. This is required for
2484 FreeBSD, because off_t is defined in unistd.h. Reported by Harley
2485 D. Eades III <hde@foobar-qux.org>.
2486
2487 * configure.ac (AC_GNU_SOURCE): Added.
2488 (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
2489 type.
2490
fd39d4da 24912006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
2492
2493 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
2494 ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
2495
b786f3b5 24962006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
2497
2498 * include/grub/types.h (grub_host_addr_t): Rename to
2499 grub_target_addr_t.
2500 (grub_host_off_t): Rename to grub_target_off_t.
2501 (grub_host_size_t): Rename to grub_target_size_t.
2502 (grub_host_ssize_t): Rename to grub_target_ssize_t.
2503 Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
2504
2505 * include/grub/kernel.h (struct grub_module_header): Change type
2506 of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
2507 (grub_module_info): Likewise.
2508
051988bb 25092006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
2510
2511 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
2512 of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
2513 Velazquez <jesus.velazquez@gmail.com>.
2514
deae281b 25152006-06-05 Yoshinori K. Okuji <okuji@enbug.org>
2516
2517 Count partitions from 1 instead of 0 in the string representation
2518 of partitions. Still use 0-based internally.
2519
2520 * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
2521 (sun_partition_map_iterate): Use grub_partition_t instead of
2522 struct grub_partition *. Cast DESC->START_CYLINDER to
2523 grub_uint64_t after converting the endian.
2524 (sun_partition_map_probe): Subtract 1 for PARTNUM.
2525 (sun_partition_map_get_name): Add 1 to P->INDEX.
2526
2527 * partmap/pc.c (grub_partition_parse): Subtract 1 for
2528 PCDATA->DOS_PART.
2529 (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
2530
2531 * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
2532 zero instead of one.
2533 (gpt_partition_map_probe): Subtract 1 for PARTNUM.
2534 (gpt_partition_map_get_name): Add 1 into P->INDEX.
2535
2536 * partmap/apple.c (apple_partition_map_iterate): Change the type
2537 of POS to unsigned.
2538 (apple_partition_map_probe): Subtract 1 for PARTNUM.
2539 (apple_partition_map_get_name): Add 1 into P->INDEX.
2540
2541 * partmap/amiga.c (amiga_partition_map_iterate): Change the type
2542 of POS to unsigned.
2543 (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
2544 calculate the offset of a partition.
2545 (amiga_partition_map_probe): Subtract 1 for PARTNUM.
2546 (amiga_partition_map_get_name): Add 1 into P->INDEX.
2547
2548 * partmap/acorn.c (acorn_partition_map_find): Change the type of
2549 SECTOR to grub_disk_addr_t.
2550 (acorn_partition_map_iterate): Likewise.
2551 (acorn_partition_map_probe): Subtract 1 for PARTNUM.
2552 Change the type of SECTOR to grub_disk_addr_t. Declare P on the
2553 top.
2554 (acorn_partition_map_get_name): Add 1 into P->INDEX.
2555
2556 * kern/i386/pc/init.c (make_install_device): Add 1 into
2557 GRUB_INSTALL_DOS_PART.
2558
2559 * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
2560 conditional.
2561
524a1e6a 25622006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
2563
2564 Clean up the code to support 64-bit addressing in disks and
2565 files. This change is not enough for filesystems yet.
2566
2567 * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
2568 type of "start" to grub_uint64_t.
2569 (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
2570 grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
2571 save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
2572 convert addresses.
2573
2574 * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
2575 to grub_disk_addr_t.
2576
2577 * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
2578 string.
2579
2580 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2581
2582 * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
2583 to char *.
2584
2585 * normal/script.c (grub_script_parse): Remove unused MEMFREE.
2586
2587 * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
2588
2589 * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
2590
2591 * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
2592 to grub_off_t, to detect an error from grub_file_seek.
2593 (grub_multiboot_load_elf32): Likewise.
2594
2595 * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
2596 maximum unsigned long value when an overflow is detected.
2597 (grub_strtoull): New function.
2598 (grub_divmod64): Likewise.
2599 (grub_lltoa): use grub_divmod64.
2600
2601 * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
2602 grub_disk_addr_t.
2603 (grub_fs_blocklist_open): Increase P if P is not NULL to advance
2604 the pointer to next character. Use grub_strtoull instead of
2605 grub_strtoul.
2606 (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
2607 SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
2608 respectively.
2609
2610 * kern/file.c (grub_file_read): Prevent an oveflow of LEN, as the
2611 return value is signed.
2612 (grub_file_seek): Change the type of OLD to grub_off_t. Do not
2613 test if OFFSET is less than zero, as OFFSET is unsigned now.
2614
2615 * kern/disk.c (struct grub_disk_cache): Change the type of
2616 "sector" to grub_disk_addr_t.
2617 (grub_disk_cache_get_index): Change the type of SECTOR to
2618 grub_disk_addr_t. Calculate the hash with SECTOR casted to
2619 unsigned after shifting.
2620 (grub_disk_cache_invalidate): Change the type of SECTOR to
2621 grub_disk_addr_t.
2622 (grub_disk_cache_unlock): Likewise.
2623 (grub_disk_cache_store): Likewise.
2624 (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
2625 START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
2626 grub_disk_addr_t and grub_uint64_t, respectively.
2627 (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
2628 body, as the value of OFFSET is tweaked by
2629 grub_disk_check_range. Change the types of START_SECTOR, LEN and
2630 POS to grub_disk_addr_t, grub_size_t and grub_size_t,
2631 respectively.
2632 (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
2633 body, as the value of OFFSET is tweaked by
2634 grub_disk_check_range. Change the types of LEN and N to
2635 grub_size_t.
2636
2637 * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
2638 and "saved_offset" to grub_off_t.
2639 (test_header): Cast BUF to char *.
2640 (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
2641 to char *.
2642 (grub_gzio_read): Change the types of OFFSET and SIZE to
2643 grub_off_t and grub_size_t, respectively.
2644
2645 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
2646 Removed.
2647 (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
2648 (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
2649 (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
2650 (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
2651 (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
2652
2653 * include/grub/types.h (grub_off_t): Unconditionally set to
2654 grub_uint64_t.
2655 (grub_disk_addr_t): Changed to grub_uint64_t.
2656
2657 * include/grub/partition.h (struct grub_partition): Change the
2658 types of "start", "len" and "offset" to grub_disk_addr_t,
2659 grub_uint64_t and grub_disk_addr_t, respectively.
2660 (grub_partition_get_start): Return grub_disk_addr_t.
2661 (grub_partition_get_len): Return grub_uint64_t.
2662
2663 * include/grub/misc.h (grub_strtoull): New prototype.
2664 (grub_divmod64): Likewise.
2665
2666 * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
2667 of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
2668 grub_off_t, respectively.
2669 All callers and references changed.
2670
2671 * include/grub/fs.h (struct grub_fs): Change the type of LEN to
2672 grub_size_t in "read".
2673 All callers and references changed.
2674
2675 * include/grub/file.h (struct grub_file): Change the types of
2676 "offset" and "size" to grub_off_t and grub_off_t,
2677 respectively. Change the type of SECTOR to grub_disk_addr_t in
2678 "read_hook".
2679 (grub_file_read): Change the type of LEN to grub_size_t.
2680 (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
2681 grub_off_t.
2682 (grub_file_size): Return grub_off_t.
2683 (grub_file_tell): Likewise.
2684 All callers and references changed.
2685
2686 * include/grub/disk.h (struct grub_disk_dev): Change the types of
2687 SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
2688 "write".
2689 (struct grub_disk): Change the type of "total_sectors" to
2690 grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
2691 "read_hook".
2692 (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
2693 grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
2694 (grub_disk_write): Likewise.
2695 All callers and references changed.
2696
2697 * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
2698 char * for grub_strncmp to silence gcc.
2699 (grub_iso9660_mount): Likewise.
2700 (grub_iso9660_mount): Likewise.
2701 (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
2702 return statement.
2703 (grub_iso9660_iterate_dir): Likewise.
2704 (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
2705
2706 * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
2707 LEN to grub_disk_addr_t and grub_size_t, respectively.
2708
2709 * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
2710
2711 * fs/jfs.c (grub_jfs_read_file): Likewise.
2712
2713 * fs/minix.c (grub_jfs_read_file): Likewise.
2714
2715 * fs/sfs.c (grub_jfs_read_file): Likewise.
2716
2717 * fs/ufs.c (grub_jfs_read_file): Likewise.
2718
2719 * fs/xfs.c (grub_jfs_read_file): Likewise.
2720
2721 * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
2722 and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
2723 respectively.
2724
2725 * fs/ext2.c (grub_ext2_read_block): When an error happens, set
2726 BLKNR to -1 instead of returning GRUB_ERRNO.
2727 (grub_ext2_read_file): Change the types of SECTOR and
2728 LEN to grub_disk_addr_t and grub_size_t, respectively.
2729
2730 * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
2731 LEN to grub_disk_addr_t and grub_size_t, respectively.
2732
2733 * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
2734 grub_file_read.
2735
2736 * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
2737 string. Do not cast SECTOR explicitly.
2738
2739 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
2740 TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
2741 (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
2742 grub_disk_addr_t and grub_size_t, respectively. If the sector is
2743 over 2TB and LBA mode is not supported, raise an error.
2744 (get_safe_sectors): New function.
2745 (grub_biosdisk_read): Use get_safe_sectors.
2746 (grub_biosdisk_write): Likewise.
2747
2748 * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
2749 (grub_efidisk_write): Likewise.
2750
2751 * disk/loopback.c (delete_loopback): Cosmetic changes.
2752 (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
2753 correctly.
2754 (grub_loopback_open): Likewise.
2755 (grub_loopback_read): Likewise. Also, change the type of POS to
2756 grub_off_t, and fix the usage of grub_memset.
2757
2758 * commands/i386/pc/play.c: Include grub/machine/time.h.
2759
2760 * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
2761 print FILE->SIZE.
2762
2763 * commands/configfile.c: Include grub/env.h.
2764
2765 * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
2766 GRUB_ERRNO directly instead. Change the type of POS to
2767 grub_off_t. Follow the coding standard.
2768
2769 * commands/blocklist.c: Include grub/partition.h.
2770 (grub_cmd_blocklist): Return an error if the underlying device is
2771 not a disk. Take the starting sector of a partition into account,
2772 if a partition is used.
2773
2774 * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
2775 a length field.
2776 (lba_mode): Support 64-bit addresses.
2777 (chs_mode): Likewise.
2778 (copy_buffer): Adapted to the new offsets of a length field and a
2779 segment field.
2780 (blocklist_default_start): Allocate 64-bit space.
2781
2782 * boot/i386/pc/boot.S (force_lba): Removed.
2783 (boot_drive): Moved to under KERNEL_SECTOR.
2784 (kernel_sector): Moved to under KENREL_SEGMENT. Allocate 64-bit
2785 space.
2786 (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
2787 is useless.
2788 (lba_mode): Refactored to support a 64-bit address. More size
2789 optimization.
2790 (setup_sectors): Likewise.
2791
53af98ad 27922006-06-04 Yoshinori K. Okuji <okuji@enbug.org>
2793
2794 * DISTLIST: Added include/grub/i386/linux.h. Removed
2795 include/grub/i386/pc/linux.h
2796
2797 * configure.ac (AC_INIT): Bumped to 1.94.
2798
2799 * config.guess: Updated from gnulib.
2800 * config.sub: Likewise.
2801 * install-sh: Likewise.
2802 * mkinstalldirs: Likewise.
2803
b4c1940a 28042006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
2805
2806 * conf/common.rmk (grub_modules_init.lst): Depended on
2807 grub_emu_SOURCES, excluding grub_emu_init.c, instead of
2808 MODSRCFILES.
2809
2810 * genmk.rb (PModule::rule): Reverted the previous change.
2811
cfca1cfd 28122006-06-02 Yoshinori K. Okuji <okuji@enbug.org>
2813
2814 * conf/common.rmk (grub_modules_init.lst): Depends on
2815 $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
2816 that the target does not exist before producing.
2817 (grub_modules_init.h): Remove the target before generating.
2818 (grub_emu_init.c): Likewise.
2819
2820 * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
2821
aa6d7826 28222006-05-31 Jeroen Dekkers <jeroen@dekkers.cx>
2823
2824 * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
2825 for the target-specific tests. Make sure that we also have the
2826 up-to-date target variables for those tests.
2827
26c607b9 28282006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
2829
2830 * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
2831 (PModule::rule): Likewise.
2832
0162321a 28332006-05-31 Yoshinori K. Okuji <okuji@enbug.org>
2834
2835 * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
2836 TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
2837 target-specific flags should be prefixed.
2838 (PModule::rule): Likewise.
2839
6c826348 28402006-05-30 Yoshinori K. Okuji <okuji@enbug.org>
2841
2842 * configure.ac (CMP): Check if cmp is available explicitly.
2843
b977bf01 28442006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
2845
2846 * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
2847 (target_cpu): New variable.
2848 (pkglibdir): Use target_cpu instead of host_cpu.
2849
2850 * util/i386/pc/grub-install.in (host_cpu): Removed.
2851 (target_cpu): New variable.
2852 (pkglibdir): Use target_cpu instead of host_cpu.
2853
2854 * util/genmoddep.c: Removed.
2855
2856 * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
2857 instead of GRUB_HOST_SIZEOF_VOID_P.
2858 * kern/dl.c: Likewise.
2859
2860 * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
2861 ...
2862 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
2863 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
2864 (GRUB_TARGET_SIZEOF_LONG): ... this.
2865 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
2866 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
2867 * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
2868 to ...
2869 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
2870 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
2871 (GRUB_TARGET_SIZEOF_LONG): ... this.
2872 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
2873 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
2874 * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
2875 to ...
2876 (GRUB_TARGET_SIZEOF_VOID_P): ... this.
2877 (GRUB_HOST_SIZEOF_LONG): Renamed to ...
2878 (GRUB_TARGET_SIZEOF_LONG): ... this.
2879 (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
2880 (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
2881
2882 * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
2883 GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
2884 [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
2885 instead of GRUB_HOST_SIZEOF_LONG.
2886 [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
2887 GRUB_HOST_WORDS_BIGENDIAN to define or undefine
2888 GRUB_CPU_WORDS_BIGENDIAN.
2889 Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
2890 define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
2891 grub_host_ssize_t.
2892
2893 * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
2894 (genmoddep_SOURCES): Likewise.
2895 * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
2896 (genmoddep_SOURCES): Likewise.
2897 * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
2898 (genmoddep_SOURCES): Likewise.
2899 * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
2900 Likewise.
2901 (genmoddep_SOURCES): Likewise.
2902
2903 * genmoddep.awk: New file.
2904
2905 * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
2906 TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
2907 CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
2908 (PModule::rule): Likewise.
2909 (Program::rule): Likewise.
2910 (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
2911 BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
2912 respectively.
2913
2914 * configure.ac: Rewritten intensively to use host and target
2915 instead of build and host, respectively.
2916
2917 * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
2918 (host_cpu): Removed.
2919 (target_cpu): New variable.
2920 (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
2921 (BUILD_CC): Removed.
2922 (BUILD_CFLAGS): Likewise.
2923 (BUILD_CPPFLAGS): Likewise.
2924 (TARGET_CC): New variable.
2925 (TARGET_CFLAGS): Likewise.
2926 (TARGET_CPPFLAGS): Likewise.
2927 (TARGET_LDFLAGS): Likewise.
2928 (AWK): Likewise.
2929 (include): Use target_cpu instead of host_cpu.
2930 (moddep.lst:): Use genmoddep.awk instead of genmoddep.
2931
2932 * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2933
f09771a1 29342006-05-29 Vesa Jaaskelainen <chaac@nic.fi>
2935
2936 * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
2937 'exec_to_evaluate'. Renamed field 'true' to 'exec_on_true'. Renamed
2938 field 'false' to 'exec_on_false'.
2939 (grub_script_create_cmdif): Renamed argument names to reflect above
2940 changes.
2941
2942 * normal/execute.c (grub_script_execute_cmdif): Likewise.
2943
2944 * normal/script.c (grub_script_create_cmdif): Likewise.
2945
118f4fb3 29462006-05-28 Yoshinori K. Okuji <okuji@enbug.org>
2947
2948 * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
2949 top.
2950 (grub_hfsplus_btree_recptr): Likewise.
2951 (grub_hfsplus_find_block): Do not take RETRY any longer. Use
2952 FILEBLOCK both to pass a block number and store next block
2953 number.
2954 (grub_hfsplus_read_block): Rewritten heavily to support an extent
2955 overflow file correctly. Specify errors appropriately, because
2956 fshelp expects that GRUB_ERRNO is set when fails. Reuse
2957 grub_hfsplus_btree_recptr to get the pointer to a found key.
2958 (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
2959 is found.
2960
2961 * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
2962 linux.mod.
2963 (_linux_mod_SOURCES): New variable.
2964 (_linux_mod_CFLAGS): Likewise.
2965 (_linux_mod_LDFLAGS): Likewise.
2966 (linux_mod_SOURCES): Likewise.
2967 (linux_mod_CFLAGS): Likewise.
2968 (linux_mod_LDFLAGS): Likewise.
2969
2970 * DISTLIST: Added loader/i386/efi/linux.c,
2971 loader/i386/efi/linux_normal.c and
2972 include/grub/i386/efi/loader.h.
2973
2974 * loader/i386/efi/linux.c: New file.
2975 * loader/i386/efi/linux_normal.c: Likewise.
2976 * include/grub/i386/efi/loader.h: Likewise.
2977
89a7d726 29782006-05-27 Yoshinori K. Okuji <okuji@enbug.org>
2979
2980 * commands/blocklist.c: New file.
2981
2982 * DISTLIST: Added commands/blocklist.c.
2983
2984 * term/efi/console.c (grub_console_highlight_color): Use a lighter
43b553ad 2985 color for the background, and a darker color for the foreground.
89a7d726 2986 (grub_console_checkkey): Return READ_KEY.
2987 (grub_console_cls): Set the background to
2988 GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
2989
2990 * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
2991
2992 * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
2993 the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
2994
2995 * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
2996 prototype.
2997
2998 * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
2999 BG. The spec is wrong again.
3000
3001 * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
3002 prototype.
3003 [GRUB_UTIL] (grub_blocklist_fini): Likewise.
3004
3005 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
3006 commands/blocklist.c.
3007 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3008
3009 * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
3010 (blocklist_mod_SOURCES): New variable.
3011 (blocklist_mod_CFLAGS): Likewise.
3012 (blocklist_mod_LDFLAGS): Likewise.
3013
75c8f258 30142006-05-20 Yoshinori K. Okuji <okuji@enbug.org>
3015
3016 * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
3017 duplication.
3018 (lba_mode): Use %eax more intensively to reduce the code size.
3019
da2eb181 30202006-05-20 Marco Gerards <marco@gnu.org>
3021
3022 * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
3023
3024 * normal/parser.y (commandblock): Defined as <cmd>. A subroutine
3025 for `menuentry'.
3026 (script): Accept leading newlines.
3027 (newlines): New rule to describe 0 or more newlines.
3028 (commands): Accept `command' with trailing newline. Fixed the
3029 order in which arguments were passed to `grub_script_add_cmd'.
3030 Accept commands separated by newlines.
3031 (function): Changed to accept newlines.
3032 (menuentry) Rewritten.
3033
3034 * normal/script.c (grub_script_create_cmdmenu): Add new entries in
3035 front of the list, instead of to the end.
3036
577b4050 30372006-05-19 Yoshinori K. Okuji <okuji@enbug.org>
3038
3039 * util/i386/pc/grub-install.in (bindir): New variable.
3040 (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
3041 Shaver <lbgwjl@gmail.com>.
3042
0d6e1189 30432006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
3044
3045 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
3046 grub/machine/linux.h
3047 * loader/i386/pc/linux.c: Likewise.
3048
3049 * include/grub/i386/pc/linux.h: Moved to ...
3050 * include/grub/i386/linux.h: ... here.
3051
3052 * include/grub/i386/linux.h (struct linux_kernel_params): New
3053 struct.
3054
31b86e9f 30552006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
3056
3057 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
3058 checking.
3059 (grub_video_vbe_blit_glyph): Likewise.
3060 (grub_video_vbe_blit_bitmap): Likewise.
3061 (grub_video_vbe_blit_render_target): Likewise.
3062
83b984de 30632006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
3064
3065 * configure.ac (--with-platform): Properly quote the square
3066 brackets.
3067
5f0413bd 30682006-05-08 Marco Gerards <marco@gnu.org>
3069
3070 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
3071 this...
3072 (kernel_elf_HEADERS): ...to this. Updated all users.
3073 (grubof_symlist.c): Renamed from this...
3074 (kernel_elf_symlist.c): ...to this. Updated all users.
3075 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
3076 (grubof_SOURCES): Renamed from this...
3077 (kernel_elf_SOURCES): ...to this.
3078 (grubof_HEADERS): Renamed from this...
3079 (kernel_elf_HEADERS): ...to this.
3080 (grubof_CFLAGS): Renamed from this...
3081 (kernel_elf_CFLAGS): ...to this.
3082 (grubof_ASFLAGS): Renamed from this...
3083 (kernel_elf_ASFLAGS): ...to this.
3084 (grubof_LDFLAGS): Renamed from this...
3085 (kernel_elf_LDFLAGS): ...to this.
3086
3087 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
3088 this...
3089 (kernel_elf_HEADERS): ...to this. Updated all users.
3090 (grubof_symlist.c): Renamed from this...
3091 (kernel_elf_symlist.c): ...to this. Updated all users.
3092 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
3093 (grubof_SOURCES): Renamed from this...
3094 (kernel_elf_SOURCES): ...to this.
3095 (grubof_HEADERS): Renamed from this...
3096 (kernel_elf_HEADERS): ...to this.
3097 (grubof_CFLAGS): Renamed from this...
3098 (kernel_elf_CFLAGS): ...to this.
3099 (grubof_ASFLAGS): Renamed from this...
3100 (kernel_elf_ASFLAGS): ...to this.
3101 (grubof_LDFLAGS): Renamed from this...
3102 (kernel_elf_LDFLAGS): ...to this.
3103
3104 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
3105 `kernel.elf' instead of `grubof'.
3106
05568c2e 31072006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
3108
3109 Add --with-platform to configure. Use pkglibdir instead of
3110 pkgdatadir. This is reported by Roger Leigh.
3111
3112 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
3113 (host_vendor): Likewise.
3114 (host_os): Likewise.
3115 (pkgdatadir): Likewise.
3116 (platform): New variable.
3117 (pkglibdir): Likewise.
3118 Use PKGLIBDIR instead of PKGDATADIR.
3119
3120 * util/i386/pc/grub-install.in (datadir): Removed.
3121 (host_vendor): Likewise.
3122 (host_os): Likewise.
3123 (pkgdatadir): Likewise.
3124 (platform): New variable.
3125 (pkglibdir): Likewise.
3126 Use PKGLIBDIR instead of PKGDATADIR.
3127
3128 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
3129 instead of GRUB_DATADIR.
3130 (main): Likewise.
3131 * util/i386/pc/grub-mkimage.c (usage): Likewise.
3132 (main): Likewise.
3133 * util/i386/efi/grub-mkimage.c (usage): Likewise.
3134 (main): Likewise.
3135
3136 * configure.ac (--with-platform): New option.
3137 Use PLATFORM instead of HOST_VENDOR to specify a platform.
3138
3139 * Makefile.in: Include a makefile based on PLATFORM instead of
3140 HOST_VENDOR.
3141 (pkgdatadir): Not appended by the machine type.
3142 (pkglibdir): Appended by the machine type.
3143 (host_vendor): Removed.
3144 (platform): New variable.
3145 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
3146 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
3147 (uninstall): Likewise.
3148
4e93851c 31492006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
3150
3151 Use the environment context in the menu. Remove the commands
3152 "default" and "timeout", and use variables instead.
3153
3154 * normal/menu.c: Include grub/env.h.
3155 (print_entry): Cast TITLE to silence gcc.
3156 (get_timeout): New function.
3157 (set_timeout): Likewise.
3158 (get_entry_number): Likewise.
3159 (run_menu): Use a default entry, a fallback entry and a timeout
3160 in the environment variables "default", "fallback" and
3161 "timeout". Also, tweak the default entry if it is not within the
3162 current menu entries.
3163 (grub_menu_run): Use a fallback entry in the environment variable
3164 "fallback".
3165
3166 * normal/main.c (read_config_file): Do not initialize
3167 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
3168 NEWMENU->TIMEOUT.
3169 (grub_normal_execute): Use a data slot to store the menu.
3170
3171 * include/grub/normal.h (struct grub_menu): Removed default_entry,
3172 fallback_entry and timeout.
3173 (struct grub_menu_list): Removed.
3174 (grub_menu_list_t): Likewise.
3175 (struct grub_context): Likewise.
3176 (grub_context_t): Likewise.
3177 (grub_context_get): Likewise.
3178 (grub_context_get_current_menu): Likewise.
3179 (grub_context_push_menu): Likewise.
3180 (grub_context_pop_menu): Likewise.
3181 (grub_default_init): Likewise.
3182 (grub_default_fini): Likewise.
3183 (grub_timeout_init): Likewise.
3184 (grub_timeout_fini): Likewise.
3185
3186 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
3187 and timeout.mod.
3188 (normal_mod_SOURCES): Removed normal/context.c.
3189
3190 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
3191 commands/default.c, commands/timeout.c and normal/context.c.
3192 (normal_mod_SOURCES): Removed normal/context.c.
3193
3194 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
3195 commands/timeout.c and normal/context.c.
3196 (normal_mod_SOURCES): Removed normal/context.c.
3197
3198 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
3199 commands/default.c, commands/timeout.c and normal/context.c.
3200 (normal_mod_SOURCES): Removed normal/context.c.
3201
3202 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
3203 timeout.mod.
3204 (default_mod_SOURCES): Removed.
3205 (default_mod_CFLAGS): Likewise.
3206 (default_mod_LDFLAGS): Likewise.
3207 (timeout_mod_SOURCES): Removed.
3208 (timeout_mod_CFLAGS): Likewise.
3209 (timeout_mod_LDFLAGS): Likewise.
3210
3211 * DISTLIST: Removed commands/default.c, commands/timeout.c and
3212 normal/context.c.
3213
3214 * commands/default.c: Removed.
3215 * commands/timeout.c: Likewise.
3216 * normal/context.c: Likewise.
3217
1eb9cc1d 32182006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
3219
3220 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
3221
385bd9c1 32222006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
3223
3224 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
3225 "next" to "prev" for readability.
3226 (struct grub_env_sorted_var): New struct.
3227 (grub_env_context): Renamed to ...
3228 (initial_context): ... this.
3229 (grub_env_var_context): Renamed to ...
3230 (current_context): ... this.
3231 (grub_env_find): Look only at CURRENT_CONTEXT.
3232 (grub_env_context_open): Rewritten to copy exported variables from
3233 previous context.
3234 (grub_env_context_close): Rewritten according to the new
3235 scheme. Also, add an assertion to prevent the initial context from
3236 removed.
3237 (grub_env_insert): Removed the code for the sorted list.
3238 (grub_env_remove): Likewise.
3239 (grub_env_export): Simply mark the variable with
3240 GRUB_ENV_VAR_GLOBAL.
3241 (grub_env_set): A cosmetic change for naming consistency.
3242 (grub_env_get): Likewise.
3243 (grub_env_unset): Likewise.
3244 (grub_env_iterate): Rewritten to sort variables within this
3245 function.
3246 (grub_register_variable_hook): Fixed for naming consistency. Call
3247 grub_env_find again, only if NAME is not found at the first time.
3248 (mangle_data_slot_name): New function.
3249 (grub_env_set_data_slot): Likewise.
3250 (grub_env_get_data_slot): Likewise.
3251 (grub_env_unset_data_slot): Likewise.
3252
3253 * include/grub/env.h (grub_env_var_type): New enum.
3254 (GRUB_ENV_VAR_LOCAL): New constant.
3255 (GRUB_ENV_VAR_GLOBAL): Likewise.
3256 (GRUB_ENV_VAR_DATA): Likewise.
3257 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
3258 "type".
3259 (grub_env_set): Replace VAR with NAME for consistency.
3260 (grub_register_variable_hook): Likewise.
3261 (grub_env_export): Specify the name of the argument.
3262 (grub_env_set_data_slot): New prototype.
3263 (grub_env_get_data_slot): Likewise.
3264 (grub_env_unset_data_slot): Likewise.
3265
7f362539 32662006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
3267
3268 Extend the loader so that GRUB can accept a loader which comes
3269 back to GRUB when a loaded image exits. Also, this change adds
3270 support for a chainloader on EFI.
3271
3272 * term/efi/console.c: Include grub/misc.h.
3273 (grub_console_checkkey): Display a scan code on the top for
3274 debugging. This will be removed once the EFI port gets stable.
3275 Correct the scan code mapping.
3276
3277 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
3278 allocate memory from larger regions, in order to reduce the number
3279 of allocated regions. Otherwise, the MacOSX loader panics.
3280 (filter_memory_map): Avoid less than 1MB for compatibility with
3281 other loaders.
3282 (add_memory_regions): Allocate from the tail of a region, if
3283 possible, to avoid allocating a region near to 1MB, for the MacOSX
3284 loader.
3285
3286 * kern/efi/init.c (grub_efi_set_prefix): Specify
3287 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
3288
3289 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
3290 argument IMAGE_HANDLE and specify it to get a loaded image.
3291 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
3292 grub_efi_get_loaded_image.
3293 (grub_efi_get_filename): Divide the legnth by the size of
3294 grub_efi_char16_t.
3295 (grub_efi_get_device_path): New function.
3296 (grub_efi_print_device_path): Print End Device Path nodes. Divide
3297 the length by the size of grub_efi_char16_t for a file path device
3298 path node.
3299
3300 * kern/loader.c (grub_loader_noreturn): New variable.
3301 (grub_loader_set): Accept a new argument NORETURN. Set
3302 GRUB_LOADER_NORETURN to NORETURN.
3303 All callers changed.
3304 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
3305 grub_machine_fini.
3306
3307 * include/grub/efi/efi.h (grub_efi_get_device_path): New
3308 prototype.
3309 (grub_efi_get_loaded_image): Take an argument to specify an image
3310 handle.
3311
3312 * include/grub/loader.h (grub_loader_set): Added one more argument
3313 NORETURN.
3314
3315 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
3316 instead of grub_efi_open_protocol.
3317 (grub_efidisk_get_device_name): Likewise.
3318 (grub_efidisk_close): Print a newline.
3319 (grub_efidisk_get_device_handle): Fixed to use
3320 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
3321 GRUB_EFI_DEVICE_PATH_TYPE.
3322
3323 * disk/efi/efidisk.c (device_path_guid): Moved to ...
3324 * kern/efi/efi.c (device_path_guid): ... here.
3325
3326 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
3327 chain.mod.
3328 (kernel_mod_HEADERS): Added efi/disk.h.
3329 (_chain_mod_SOURCES): New variable.
3330 (_chain_mod_CFLAGS): Likewise.
3331 (_chain_mod_LDFLAGS): Likewise.
3332 (chain_mod_SOURCES): Likewise.
3333 (chain_mod_CFLAGS): Likewise.
3334 (chain_mod_LDFLAGS): Likewise.
3335
3336 * DISTLIST: Added include/grub/efi/chainloader.h,
3337 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
3338
3339 * include/grub/efi/chainloader.h: New file.
3340 * loader/efi/chainloader.c: Likewise.
3341 * loader/efi/chainloader_normal.c: Likewise.
3342
c0111d6e 33432006-04-30 Marco Gerards <marco@gnu.org>
3344
3345 * commands/configfile.c (grub_cmd_source): New function.
3346 (GRUB_MOD_INIT): Register the commands `source' and `.'.
3347 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
3348
df5341da 33492006-04-30 Marco Gerards <marco@gnu.org>
3350
3351 * normal/execute.c (grub_script_execute_cmd): Change the return
3352 type to `grub_err_t'. Correctly return the error.
3353 (grub_script_execute_cmdline): In case a command line is not a
3354 command or a function, try to interpret it as an assignment.
3355
f85934bd 33562006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
3357
3358 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
3359 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
3360 skip a node whose name is obviously invalid as UTF-16,
3361 i.e. contains a NUL character. Stop the iteration when the last
3362 directory entry is found. Instead of using the return value of
3363 grub_hfsplus_btree_iterate_node, store the value in RET and use
3364 it, because the iterator can be stopped by the last directory
3365 entry.
3366
8f8a2cf8 33672006-04-30 Marco Gerards <marco@gnu.org>
3368
3369 * include/grub/env.h (grub_env_export): New prototype. Reported
3370 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
3371
a27e84ce 33722006-04-30 Marco Gerards <marco@gnu.org>
3373
3374 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
3375 size of the extents in a catalog file record.
3376
eaef0553 33772006-04-29 Marco Gerards <marco@gnu.org>
3378
3379 * commands/configfile.c (grub_cmd_configfile): Execute the
3380 configfile within its own context.
3381
3382 * include/grub/env.h (grub_env_context_open): New prototype.
3383 (grub_env_context_close): Likewise.
3384
3385 * kern/env.c (grub_env): Removed.
3386 (grub_env_sorted): Likewise.
3387 (grub_env_context): New variable.
3388 (grub_env_var_context): Likewise.
3389 (grub_env_find): Search both the active context and the global
3390 context.
3391 (grub_env_context_open): New function.
3392 (grub_env_context_close): Likewise.
3393 (grub_env_insert): Likewise.
3394 (grub_env_remove): Likewise.
3395 (grub_env_export): Likewise.
3396 (grub_env_set): Changed to use helper functions to avoid code
3397 duplication.
3398 (grub_env_iterate): Rewritten so both the current context and the
3399 global context are being used.
3400
3401 * normal/command.c (export_command): New function.
3402 (grub_command_init): Register the `export' function.
3403
7b455f4d 34042006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
3405
3406 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
3407 explicitly to suppress gcc's warnings.
3408 * fs/fat.c (grub_fat_find_dir): Likewise.
3409 (grub_fat_label): Likewise.
3410 * fs/xfs.c (grub_xfs_read_inode): Likewise.
3411 (grub_xfs_mount): Likewise.
3412 (grub_xfs_label): Likewise.
3413 * fs/affs.c (grub_affs_mount): Likewise.
3414 (grub_affs_label): Likewise.
3415 (grub_affs_iterate_dir): Likewise.
3416 * fs/sfs.c (grub_sfs_mount): Likewise.
3417 (grub_sfs_iterate_dir): Likewise.
3418 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
3419 * fs/hfs.c (grub_hfs_mount): Likewise.
3420 (grub_hfs_cmp_catkeys): Likewise.
3421 (grub_hfs_find_dir): Likewise.
3422 (grub_hfs_dir): Likewise.
3423 (grub_hfs_label): Likewise.
3424 * fs/jfs.c (grub_jfs_mount): Likewise.
3425 (grub_jfs_opendir): Likewise.
3426 (grub_jfs_getent): Likewise.
3427 (grub_jfs_lookup_symlink): Likewise.
3428 (grub_jfs_label): Likewise.
3429 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
3430 (grub_hfsplus_iterate_dir): Likewise.
3431 (grub_hfsplus_btree_iterate_node): Made static.
3432
3433 * util/grub-emu.c (prefix): New variable.
3434 (grub_machine_set_prefix): New function.
3435 (main): Do not set the environment variable "prefix" here. Only
3436 set PREFIX, which is used later by grub_machine_set_prefix.
3437
3438 * include/grub/video.h: Do not include grub/symbol.h.
3439 (grub_video_register): Not exported. This symbol is not defined in
3440 the kernel.
3441 (grub_video_unregister): Likewise.
3442 (grub_video_iterate): Likewise.
3443 (grub_video_setup): Likewise.
3444 (grub_video_restore): Likewise.
3445 (grub_video_get_info): Likewise.
3446 (grub_video_get_blit_format): Likewise.
3447 (grub_video_set_palette): Likewise.
3448 (grub_video_get_palette): Likewise.
3449 (grub_video_set_viewport): Likewise.
3450 (grub_video_get_viewport): Likewise.
3451 (grub_video_map_color): Likewise.
3452 (grub_video_map_rgb): Likewise.
3453 (grub_video_map_rgba): Likewise.
3454 (grub_video_fill_rect): Likewise.
3455 (grub_video_blit_glyph): Likewise.
3456 (grub_video_blit_bitmap): Likewise.
3457 (grub_video_blit_render_target): Likewise.
3458 (grub_video_scroll): Likewise.
3459 (grub_video_swap_buffers): Likewise.
3460 (grub_video_create_render_target): Likewise.
3461 (grub_video_delete_render_target): Likewise.
3462 (grub_video_set_active_render_target): Likewise.
3463
3464 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
3465 Undefined.
3466 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
3467
3468 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
3469 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
3470 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
3471 instead of $(srcdir)/genkernsyms.sh.
3472
3473 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
3474 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
3475 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
3476 instead of $(srcdir)/genkernsyms.sh.
3477
3478 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
3479 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
3480 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
3481 instead of $(srcdir)/genkernsyms.sh.
3482
3483 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
3484 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
3485 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
3486 instead of $(srcdir)/genkernsyms.sh.
3487
3488 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
3489 genkernsyms.sh.
3490
3491 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
3492 genkernsyms.sh.
3493 (gensymlist.sh): New target.
3494 (genkernsyms.sh): Likewise.
3495
3496 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
3497 genkernsyms.sh.in and gensymlist.sh.in.
3498
3499 * genkernsyms.sh: Removed.
3500 * gensymlist.sh: Likewise.
3501
3502 * genkernsyms.sh.in: New file.
3503 * gensymlist.sh.in: Likewise.
3504
1885bb27 35052006-04-25 Hollis Blanchard <hollis@penguinppc.org>
3506
3507 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
3508 clobber "prefix", since we may have already set it manually.
3509
71538dff 35102006-04-25 Hollis Blanchard <hollis@penguinppc.org>
3511
3512 * kern/misc.c (abort): New alias for grub_abort.
3513
2965c7cc 35142006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
3515
3516 A new machine-specific function "grub_machine_set_prefix" is
3517 defined. This is called after loading modules, so that a prefix
3518 initialization can use modules. Also, this change adds an
3519 intensive debugging feature for the memory manager via the
3520 configure option "--enable-mm-debug".
3521
3522 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
3523 PART.LEN.
3524
3525 * kern/sparc64/ieee1275/init.c (abort): Removed.
3526 (grub_stop): Likewise.
3527 (grub_exit): New function.
3528 (grub_set_prefix): Renamed to ...
3529 (grub_machine_set_prefix): ... this.
3530 (grub_machine_init): Do not call grub_set_prefix.
3531
3532 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
3533 (grub_machine_set_prefix): ... this.
3534 (grub_machine_init): Do not call grub_set_prefix.
3535
3536 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
3537 (grub_machine_init): Do not set the prefix here.
3538
3539 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
3540
3541 * kern/efi/init.c: Include grub/mm.h.
3542 (grub_efi_set_prefix): New function.
3543
3544 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
3545 (grub_efi_get_filename): New function.
3546 (grub_print_device_path): Renamed to ...
3547 (grub_efi_print_device_path): ... this.
3548
3549 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
3550 [MM_DEBUG] (grub_realloc): Likewise.
3551 [MM_DEBUG] (grub_free): Likewise.
3552 [MM_DEBUG] (grub_memalign): Likewise.
3553 [MM_DEBUG] (grub_mm_debug): New variable.
3554 [MM_DEBUG] (grub_debug_malloc): New function.
3555 [MM_DEBUG] (grub_debug_free): New function.
3556 [MM_DEBUG] (grub_debug_realloc): New function.
3557 [MM_DEBUG] (grub_debug_memalign): New function.
3558
3559 * kern/misc.c (grub_abort): Print a newline to distinguish
3560 the message.
3561
3562 * kern/main.c (grub_main): Call grub_machine_set_prefix and
3563 grub_set_root_dev after loading modules. This is necessary when
3564 setting a prefix depends on modules.
3565
3566 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
3567 (grub_efi_print_device_path): ... this.
3568 (grub_efi_get_filename): New prototype.
3569 (grub_efi_set_prefix): Likewise.
3570
3571 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
3572 and grub/disk.h.
3573 (grub_efidisk_get_device_handle): New prototype.
3574 (grub_efidisk_get_device_name): Likewise.
3575
3576 * include/grub/mm.h: Include config.h.
3577 (MM_DEBUG): Removed.
3578 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
3579 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
3580 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
3581 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
3582 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
3583 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
3584 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
3585 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
3586 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
3587
3588 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
3589
3590 * disk/efi/efidisk.c: Include grub/partition.h.
3591 (iterate_child_devices): New function.
3592 (add_device): First, compare only last device path nodes, so that
3593 devices are sorted by the types.
3594 (grub_efidisk_get_device_handle): New function.
3595 (grub_efidisk_get_device_name): Likewise.
3596
3597 * configure.ac (--enable-mm-debug): New option to enable the
3598 memory manager debugging feature. This makes the binary much
3599 bigger, so is disabled by default.
3600
9cacaa17 36012006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
3602
3603 Use grub_abort instead of grub_stop, and grub_exit must be
3604 define in each architecture now. Also, this change adds support
3605 for EFI disks.
3606
3607 * util/i386/pc/grub-probefs.c: Include grub/term.h.
3608 (grub_getkey): New function.
3609 (grub_term_get_current): Likewise.
3610
3611 * util/i386/pc/grub-setup.c: Include grub/term.h.
3612 (grub_getkey): New function.
3613 (grub_term_get_current): Likewise.
3614
3615 * util/misc.c (grub_stop): Renamed to ...
3616 (grub_exit): ... this.
3617
3618 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
3619 (grub_exit): ... this.
3620 (grub_machine_init): Use grub_abort instead of abort.
3621 (grub_stop): Removed.
3622
3623 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
3624 abort.
3625
3626 * kern/i386/pc/startup.S (grub_exit): New function.
3627 (cold_reboot): New label.
3628
3629 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
3630 (grub_efi_init): Call grub_efidisk_init.
3631 (grub_efi_fini): Call grub_efidisk_fini.
3632
3633 * kern/efi/efi.c: Include grub/mm.h.
3634 (grub_efi_console_control_guid): Renamed to ...
3635 (console_control_guid): ... this.
3636 (grub_efi_loaded_image_guid): Renamed to ...
3637 (loaded_image_guid): ... this.
3638 (grub_efi_locate_handle): New function.
3639 (grub_efi_open_protocol): Likewise.
3640 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
3641 GRUB_EFI_CONSOLE_CONTROL_GUID.
3642 (grub_efi_exit): Removed.
3643 (grub_stop): Likewise.
3644 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
3645 (grub_exit): New function.
3646 (grub_print_device_path): Likewise.
3647
3648 * kern/rescue.c (grub_rescue_cmd_exit): New function.
3649 (grub_enter_rescue_mode): Register "exit".
3650
3651 * kern/misc.c (grub_real_dprintf): A cosmetic change.
3652 (grub_abort): New function.
3653
3654 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
3655
3656 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
3657
3658 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
3659
3660 * include/grub/efi/efi.h (grub_efi_exit): Removed.
3661 (grub_print_device_path): New prototype.
3662 (grub_efi_locate_handle): Likewise.
3663 (grub_efi_open_protocol): Likewise.
3664
3665 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
3666 * disk/efi/efidisk.c: Likewise.
3667
3668 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
3669
3670 * include/grub/efi/console_control.h
3671 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
3672
3673 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
3674 last 8 bytes as an array.
3675 (GRUB_EFI_DISK_IO_GUID): New macro.
3676 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
3677 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
3678 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
3679 grub_uint8_t.
3680 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
3681 (struct grub_efi_device_path): Rename the member "sub_type" to
3682 "subtype".
3683 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
3684 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
3685 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
3686 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
3687 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
3688 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
3689 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
3690 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
3691 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
3692 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
3693 (struct grub_efi_pci_device_path): New structure.
3694 (grub_efi_pci_device_path_t): New type.
3695 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
3696 (struct grub_efi_pccard_device_path): New structure.
3697 (grub_efi_pccard_device_path_t): New type.
3698 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
3699 (struct grub_efi_memory_mapped_device_path): New structure.
3700 (grub_efi_memory_mapped_device_path_t): New type.
3701 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
3702 (struct grub_efi_vendor_device_path): New structure.
3703 (grub_efi_vendor_device_path_t): New type.
3704 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
3705 (struct grub_efi_controller_device_path): New structure.
3706 (grub_efi_controller_device_path_t): New type.
3707 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
3708 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
3709 (struct grub_efi_acpi_device_path): New structure.
3710 (grub_efi_acpi_device_path_t): New type.
3711 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
3712 (struct grub_efi_expanded_acpi_device_path): New structure.
3713 (grub_efi_expanded_acpi_device_path_t): New type.
3714 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
3715 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
3716 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
3717 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
3718 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
3719 (struct grub_efi_atapi_device_path): New structure.
3720 (grub_efi_atapi_device_path_t): New type.
3721 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
3722 (struct grub_efi_fibre_channel_device_path): New structure.
3723 (grub_efi_fibre_channel_device_path_t): New type.
3724 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
3725 (struct grub_efi_1394_device_path): New structure.
3726 (grub_efi_1394_device_path_t): New type.
3727 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
3728 (struct grub_efi_usb_device_path): New structure.
3729 (grub_efi_usb_device_path_t): New type.
3730 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
3731 (struct grub_efi_usb_class_device_path): New structure.
3732 (grub_efi_usb_class_device_path_t): New type.
3733 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
3734 (struct grub_efi_i2o_device_path): New structure.
3735 (grub_efi_i2o_device_path_t): New type.
3736 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
3737 (struct grub_efi_mac_address_device_path): New structure.
3738 (grub_efi_mac_address_device_path_t): New type.
3739 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
3740 (struct grub_efi_ipv4_device_path): New structure.
3741 (grub_efi_ipv4_device_path_t): New type.
3742 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
3743 (struct grub_efi_ipv6_device_path): New structure.
3744 (grub_efi_ipv6_device_path_t): New type.
3745 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
3746 (struct grub_efi_infiniband_device_path): New structure.
3747 (grub_efi_infiniband_device_path_t): New type.
3748 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
3749 (struct grub_efi_uart_device_path): New structure.
3750 (grub_efi_uart_device_path_t): New type.
3751 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
3752 (struct grub_efi_vendor_messaging_device_path): New structure.
3753 (grub_efi_vendor_messaging_device_path_t): New type.
3754 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
3755 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
3756 (struct grub_efi_hard_drive_device_path): New structure.
3757 (grub_efi_hard_drive_device_path_t): New type.
3758 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
3759 (struct grub_efi_cdrom_device_path): New structure.
3760 (grub_efi_cdrom_device_path_t): New type.
3761 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
3762 (struct grub_efi_vendor_media_device_path): New structure.
3763 (grub_efi_vendor_media_device_path_t): New type.
3764 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
3765 (struct grub_efi_file_path_device_path): New structure.
3766 (grub_efi_file_path_device_path_t): New type.
3767 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
3768 (struct grub_efi_protocol_device_path): New structure.
3769 (grub_efi_protocol_device_path_t): New type.
3770 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
3771 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
3772 (struct grub_efi_bios_device_path): New structure.
3773 (grub_efi_bios_device_path_t): New type.
3774 (struct grub_efi_disk_io): New structure.
3775 (grub_efi_disk_io_t): New type.
3776 (struct grub_efi_block_io_media): New structure.
3777 (grub_efi_block_io_media_t): New type.
3778 (struct grub_efi_block_io): New structure.
3779 (grub_efi_block_io_t): New type.
3780
3781 * include/grub/misc.h (grub_stop): Removed.
3782 (grub_exit): New prototype.
3783 (grub_abort): Likewise.
3784
3785 * include/grub/disk.h (enum grub_disk_dev_id): Added
3786 GRUB_DISK_DEVICE_EFIDISK_ID.
3787
3788 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
3789 disk/efi/efidisk.c.
3790 (kernel_syms.lst): Remove the target if an error occurs.
3791
49986a9f 37922006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
3793
3794 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
3795 as it was simply too buggy.
3796
970d3b8a 37972006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
3798
3799 * kern/misc.c (grub_lltoa): New function.
3800 (grub_vsprintf): Added support for the long long suffix,
3801 i.e. "ll".
3802
ff04ec24 38032006-04-20 Hollis Blanchard <hollis@penguinppc.org>
3804
3805 * Makefile.in (LDFLAGS): Add variable.
3806 (LD): Remove variable.
3807 * configure.ac: Add -m32 to LDFLAGS.
3808 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
3809 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
3810 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
3811 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
3812 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
3813 variables.
3814 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
3815 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
3816 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
3817
37e5e1a4 38182006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
3819
3820 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
3821 length for unknown glyph.
3822
c352d8dd 38232006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
3824
2eab1c0d 3825 Add support for pre-loaded modules into the EFI port.
3826
3827 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
3828 completely. Accept one more argument DIR. The caller has changed.
3829
3830 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
3831
3832 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
3833 (grub_efi_loaded_image_guid): New variable.
3834 (grub_efi_get_loaded_image): New function.
3835 (grub_arch_modules_addr): Likewise.
3836
3837 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
3838 prototype.
3839
3840 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
3841 (struct grub_efi_loaded_image): New structure.
3842 (grub_efi_loaded_image_t): New type.
3843
38442006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
3845
c352d8dd 3846 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
3847 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
3848 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
3849
6d01d6b4 38502006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
3851
3852 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
3853
976a4ea0 38542006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
3855
3856 * DISTLIST: Added include/grub/efi/console.h,
3857 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
3858 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
3859
3860 * include/grub/efi/console.h: New file.
3861 * include/grub/efi/time.h: Likewise.
3862 * include/grub/i386/efi/kernel.h: Likewise.
3863 * kern/efi/init.c: Likewise.
3864 * kern/efi/mm.c: Likewise.
3865 * term/efi/console.c: Likewise.
3866
3867 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
3868 (grub_stop): Removed.
3869 (grub_get_rtc): Likewise.
3870 (grub_machine_init): Simply call grub_efi_init.
3871 (grub_machine_fini): Call grub_efi_fini.
3872
3873 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
3874 (grub_efi_output_string): Removed.
3875 (grub_efi_stall): New function.
3876 (grub_stop): Likewise.
3877 (grub_get_rtc): Likewise.
3878
3879 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
3880 (grub_efi_stall): New prototype.
3881 (grub_efi_allocate_pages): Likewise.
3882 (grub_efi_free_pages): Likewise.
3883 (grub_efi_get_memory_map): Likewise.
3884 (grub_efi_mm_init): Likewise.
3885 (grub_efi_mm_fini): Likewise.
3886 (grub_efi_init): Likewise.
3887 (grub_efi_fini): Likewise.
3888
3889 * include/grub/i386/efi/time.h: Do not include
3890 grub/symbol.h. Include grub/efi/time.h.
3891 (GRUB_TICKS_PER_SECOND): Removed.
3892 (grub_get_rtc): Likewise.
3893
3894 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
3895 Added padding. The EFI spec is buggy.
3896 (GRUB_EFI_BLACK): New macro.
3897 (GRUB_EFI_BLUE): Likewise.
3898 (GRUB_EFI_GREEN): Likewise.
3899 (GRUB_EFI_CYAN): Likewise.
3900 (GRUB_EFI_RED): Likewise.
3901 (GRUB_EFI_MAGENTA): Likewise.
3902 (GRUB_EFI_BROWN): Likewise.
3903 (GRUB_EFI_LIGHTGRAY): Likewise.
3904 (GRUB_EFI_BRIGHT): Likewise.
3905 (GRUB_EFI_DARKGRAY): Likewise.
3906 (GRUB_EFI_LIGHTBLUE): Likewise.
3907 (GRUB_EFI_LIGHTGREEN): Likewise.
3908 (GRUB_EFI_LIGHTCYAN): Likewise.
3909 (GRUB_EFI_LIGHTRED): Likewise.
3910 (GRUB_EFI_LIGHTMAGENTA): Likewise.
3911 (GRUB_EFI_YELLOW): Likewise.
3912 (GRUB_EFI_WHITE): Likewise.
3913 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
3914 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
3915 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
3916 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
3917 (GRUB_EFI_BACKGROUND_RED): Likewise.
3918 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
3919 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
3920 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
3921 (GRUB_EFI_TEXT_ATTR): Likewise.
3922
3923 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
3924 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
3925 (kernel_mod_HEADERS): Added efi/time.h.
3926
83709125 39272006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
3928
3929 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
3930 include/grub/efi/api.h, include/grub/efi/console_control.h,
3931 include/grub/efi/efi.h, include/grub/efi/pe32.h,
3932 include/grub/i386/efi/time.h, kern/efi/efi.c,
3933 kern/i386/efi/init.c, kern/i386/efi/startup.S,
3934 and util/i386/efi/grub-mkimage.c.
3935
3936 * Makefile.in (RMKFILES): Added i386-efi.rmk.
3937
3938 * genmk.rb (PModule#rule): Do not export symbols if
3939 #{prefix}_EXPORTS is set to "no".
3940
3941 * conf/i386-efi.mk: New file.
3942 * conf/i386-efi.rmk: Likewise.
3943 * include/grub/efi/api.h: Likewise.
3944 * include/grub/efi/console_control.h: Likewise.
3945 * include/grub/efi/efi.h: Likewise.
3946 * include/grub/efi/pe32.h: Likewise.
3947 * include/grub/i386/efi/time.h: Likewise.
3948 * kern/efi/efi.c: Likewise.
3949 * kern/i386/efi/init.c: Likewise.
3950 * kern/i386/efi/startup.S: Likewise.
3951 * util/i386/efi/grub-mkimage.c: Likewise.
3952
39532006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 3954
3955 * include/grub/script.h: Include <grub/parser.h> and
3956 "grub_script.tab.h".
3957 (struct grub_lexer_param): New struct.
3958 (struct grub_parser_param): Likewise.
3959 (grub_script_create_arglist): Pass the state in an argument.
3960 (grub_script_add_arglist): Likewise.
3961 (grub_script_create_cmdline): Likewise.
3962 (grub_script_create_cmdblock): Likewise.
3963 (grub_script_create_cmdif): Likewise.
3964 (grub_script_create_cmdmenu): Likewise.
3965 (grub_script_add_cmd): Likewise.
3966 (grub_script_arg_add): Likewise.
3967 (grub_script_lexer_ref): Likewise.
3968 (grub_script_lexer_deref): Likewise.
3969 (grub_script_lexer_record_start): Likewise.
3970 (grub_script_lexer_record_stop): Likewise.
3971 (grub_script_mem_record): Likewise.
3972 (grub_script_mem_record_stop): Likewise.
3973 (grub_script_malloc): Likewise.
3974 (grub_script_yylex): Likewise.
3975 (grub_script_yyparse): Likewise.
3976 (grub_script_yyerror): Likewise.
3977 (grub_script_yylex): Likewise.
3978 (grub_script_lexer_init): Return the state.
3979
3980 * normal/lexer.c (grub_script_lexer_state): Removed variable.
3981 (grub_script_lexer_done): Likewise.
3982 (grub_script_lexer_getline): Likewise.
3983 (grub_script_lexer_refs): Likewise.
3984 (script): Likewise.
3985 (newscript): Likewise.
3986 (record): Likewise.
3987 (recording): Likewise.
3988 (recordpos): Likewise.
3989 (recordlen): Likewise.
3990 (grub_script_lexer_init): Return the state instead of setting
3991 global variables.
3992 (grub_script_lexer_ref): Use the newly added argument for state
3993 instead of globals.
3994 (grub_script_lexer_deref): Likewise.
3995 (grub_script_lexer_record_start): Likewise.
3996 (grub_script_lexer_record_stop): Likewise.
3997 (recordchar): Likewise.
3998 (nextchar): Likewise.
3999 (grub_script_yylex2): Likewise.
4000 (grub_script_yylex): Likewise.
4001 (grub_script_yyerror): Likewise.
4002
4003 * normal/parser.y (func_mem): Removed variable.
4004 (menu_entry): Likewise.
4005 (err): Likewise.
4006 (%lex-param): New parser option.
4007 (%parse-param): Likewise.
4008 (script): Always return the AST.
4009 (argument): Pass the state around.
4010 (arguments): Likewise.
4011 (grubcmd): Likewise.
4012 (commands): Likewise.
4013 (function): Likewise.
4014 (menuentry): Likewise.
4015 (if_statement): Likewise.
4016 (if): Likewise.
4017
4018 * normal/script.c (grub_script_memused): Removed variable.
4019 (grub_script_parsed): Likewise.
4020 (grub_script_malloc): Added a state argument. Use that instead of
4021 global variables.
4022 (grub_script_mem_record): Likewise.
4023 (grub_script_mem_record_stop): Likewise.
4024 (grub_script_arg_add): Likewise.
4025 (grub_script_add_arglist): Likewise.
4026 (grub_script_create_cmdline): Likewise.
4027 (grub_script_create_cmdif): Likewise.
4028 (grub_script_create_cmdmenu): Likewise.
4029 (grub_script_add_cmd): Likewise.
4030 (grub_script_parse): Setup the state before calling the parser.
4031
e2a8c904 40322006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 4033
4034 * normal/command.c (grub_command_init): Remove the title command.
4035
4036 * normal/lexer.c (grub_script_yylex): Renamed from this...
4037 (grub_script_yylex2): ... to this.
4038 (grub_script_yylex): New function. Temporary
4039 introduced to filter some tokens.
4040 (grub_script_yyerror): Print a newline.
4041
4042 * normal/main.c (read_config_file): Output information about the
4043 lines that contain errors. Wait for a key after all lines have
4044 been processed. Don't return an empty menu.
4045
4046 * normal/parser.y (func_mem): Don't initialize.
4047 (menu_entry): Likewise.
4048 (err): New variable.
4049 (script): Don't return anything when an error was encountered.
4050 (ws, returns): Removed rules.
4051 (argument): Disabled concatenated variable support.
4052 (arguments): Remove explicit separators.
4053 (grubcmd): Likewise.
4054 (function): Likewise.
4055 (menuentry): Likewise.
4056 (if): Likewise.
4057 (commands): Likewise. Add error handling.
4058
4059 * normal/script.c (grub_script_create_cmdline): If
4060 `grub_script_parsed' is 0, assume the parser encountered an error.
4061
c9a86192 40622006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
4063
4064 * configure.ac: Add support for EFI. Fix the typo
4065 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
4066
70f3b243 40672006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
4068
4069 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
4070 foreign multibyte characters should be shown correctly.
4071
65f201ad 40722006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
4073
4074 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
4075 calculation.
4076 (read_config_file): Made it to close file before returning.
4077
b4b93674 40782006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
4079
4080 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
4081 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
4082 video/i386/pc/vbefill.c.
4083
4084 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
4085 video/i386/pc/vbefill.c.
4086
4087 * include/grub/video.h (grub_video_blit_format): New enum.
4088 (grub_video_mode_info): Added new member blit_format.
4089 (grub_video_get_blit_format): New function prototype.
4090
4091 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
4092 function prototype.
4093 (grub_video_vbe_map_rgb): Likewise.
4094 (grub_video_vbe_unmap_color): Likewise.
4095
4096 * include/grub/i386/pc/vbeblit.h: New file.
4097
4098 * include/grub/i386/pc/vbefill.h: New file.
4099
4100 * video/video.c (grub_video_get_blit_format): New function.
4101 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
4102 (grub_video_vbe_map_rgb): Likewise.
4103 (grub_video_vbe_unmap_color): Likewise.
4104
4105 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
4106 optimized fills.
4107 (grub_video_vbe_blit_render_target): Changed to use more optimized
4108 blits.
4109 (grub_video_vbe_setup): Added detection for optimized settings.
4110 (grub_video_vbe_create_render_target): Likewise.
4111
4112 * video/i386/pc/vbeblit.c: New file.
4113
4114 * video/i386/pc/vbefill.c: New file.
4115
c2379b9c 41162006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
4117
4118 * font/manager.c (grub_font_get_glyph): Removed font fixup from
4119 here...
4120
4121 * util/unifont2pff.rb: ... and moved it to here. Improved argument
4122 parsing to support both hex and dec ranges. If filename was missing
4123 show usage information.
4124
bd0d7896 41252006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
4126
4127 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
4128 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
4129
4130 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
4131 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
4132 (video_mod_SOURCES): Added.
4133 (video_mod_CFLAGS): Likewise.
4134 (video_mod_LDFLAGS): Likewise.
4135 (gfxterm_mod_SOURCES): Likewise.
4136 (gfxterm_mod_CFLAGS): Likewise.
4137 (gfxterm_mod_LDFLAGS): Likewise.
4138 (videotest_mod_SOURCES): Likewise.
4139 (videotest_mod_CFLAGS): Likewise.
4140 (videotest_mod_LDFLAGS): Likewise.
4141 (vesafb_mod_SOURCES): Removed.
4142 (vesafb_mod_CFLAGS): Likewise.
4143 (vesafb_mod_LDFLAGS): Likewise.
4144 (vga_mod_SOURCES): Likewise.
4145 (vga_mod_CFLAGS): Likewise.
4146 (vga_mod_LDFLAGS): Likewise.
4147
4148 * commands/videotest.c: New file.
4149
4150 * font/manager.c (fill_with_default_glyph): Modified to use
4151 grub_font_glyph.
4152 (grub_font_get_glyph): Likewise.
4153 (fontmanager): Renamed from this...
4154 (font_manager): ... to this.
4155
4156 * include/grub/font.h (grub_font_glyph): Added new structure.
4157 (grub_font_get_glyph): Modified to use grub_font_glyph.
4158
4159 * include/grub/misc.h (grub_abs): Added as inline function.
4160
4161 * include/grub/video.h: New file.
4162
4163 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
4164 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
4165 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
4166 (grub_vbe_get_controller_info): Renamed from this...
4167 (grub_vbe_bios_get_controller_info): ... to this.
4168 (grub_vbe_get_mode_info): Renamed from this...
4169 (grub_vbe_bios_get_mode_info): ... to this.
4170 (grub_vbe_set_mode): Renamed from this...
4171 (grub_vbe_bios_set_mode): ... to this.
4172 (grub_vbe_get_mode): Renamed from this...
4173 (grub_vbe_bios_get_mode): ... to this.
4174 (grub_vbe_set_memory_window): Renamed from this...
4175 (grub_vbe_bios_set_memory_window): ... to this.
4176 (grub_vbe_get_memory_window): Renamed from this...
4177 (grub_vbe_bios_get_memory_window): ... to this.
4178 (grub_vbe_set_scanline_length): Renamed from this...
4179 (grub_vbe_set_scanline_length): ... to this.
4180 (grub_vbe_get_scanline_length): Renamed from this...
4181 (grub_vbe_bios_get_scanline_length): ... to this.
4182 (grub_vbe_set_display_start): Renamed from this...
4183 (grub_vbe_bios_set_display_start): ... to this.
4184 (grub_vbe_get_display_start): Renamed from this...
4185 (grub_vbe_bios_get_display_start): ... to this.
4186 (grub_vbe_set_palette_data): Renamed from this...
4187 (grub_vbe_bios_set_palette_data): ... to this.
4188 (grub_vbe_set_pixel_rgb): Removed.
4189 (grub_vbe_set_pixel_index): Likewise.
4190
4191 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
4192 from this...
4193 (grub_vbe_bios_get_controller_info): ... to this.
4194 (grub_vbe_get_mode_info): Renamed from this...
4195 (grub_vbe_bios_get_mode_info): ... to this.
4196 (grub_vbe_set_mode): Renamed from this...
4197 (grub_vbe_bios_set_mode): ... to this.
4198 (grub_vbe_get_mode): Renamed from this...
4199 (grub_vbe_bios_get_mode): ... to this.
4200 (grub_vbe_set_memory_window): Renamed from this...
4201 (grub_vbe_bios_set_memory_window): ... to this.
4202 (grub_vbe_get_memory_window): Renamed from this...
4203 (grub_vbe_bios_get_memory_window): ... to this.
4204 (grub_vbe_set_scanline_length): Renamed from this...
4205 (grub_vbe_set_scanline_length): ... to this.
4206 (grub_vbe_get_scanline_length): Renamed from this...
4207 (grub_vbe_bios_get_scanline_length): ... to this.
4208 (grub_vbe_set_display_start): Renamed from this...
4209 (grub_vbe_bios_set_display_start): ... to this.
4210 (grub_vbe_get_display_start): Renamed from this...
4211 (grub_vbe_bios_get_display_start): ... to this.
4212 (grub_vbe_set_palette_data): Renamed from this...
4213 (grub_vbe_bios_set_palette_data): ... to this.
4214 (grub_vbe_bios_get_controller_info): Fixed problem with registers
4215 getting corrupted after calling it. Added more pushes and pops.
4216 (grub_vbe_bios_set_mode): Likewise.
4217 (grub_vbe_bios_get_mode): Likewise.
4218 (grub_vbe_bios_get_memory_window): Likewise.
4219 (grub_vbe_bios_set_scanline_length): Likewise.
4220 (grub_vbe_bios_get_scanline_length): Likewise.
4221 (grub_vbe_bios_get_display_start): Likewise.
4222 (grub_vbe_bios_set_palette_data): Likewise.
4223
4224 * normal/cmdline.c (cl_set_pos): Refresh the screen.
4225 (cl_insert): Likewise.
4226 (cl_delete): Likewise.
4227
4228 * term/gfxterm.c: New file.
4229
4230 * term/i386/pc/vesafb.c: Removed file.
4231
4232 * video/video.c: New file.
4233
4234 * video/i386/pc/vbe.c (real2pm): Added new function.
4235 (grub_video_vbe_draw_pixel): Likewise.
4236 (grub_video_vbe_get_video_ptr): Likewise.
4237 (grub_video_vbe_get_pixel): Likewise
4238 (grub_video_vbe_init): Likewise.
4239 (grub_video_vbe_fini): Likewise.
4240 (grub_video_vbe_setup): Likewise.
4241 (grub_video_vbe_get_info): Likewise.
4242 (grub_video_vbe_set_palette): Likewise.
4243 (grub_video_vbe_get_palette): Likewise.
4244 (grub_video_vbe_set_viewport): Likewise.
4245 (grub_video_vbe_get_viewport): Likewise.
4246 (grub_video_vbe_map_color): Likewise.
4247 (grub_video_vbe_map_rgb): Likewise.
4248 (grub_video_vbe_map_rgba): Likewise.
4249 (grub_video_vbe_unmap_color): Likewise.
4250 (grub_video_vbe_fill_rect): Likewise.
4251 (grub_video_vbe_blit_glyph): Likewise.
4252 (grub_video_vbe_blit_bitmap): Likewise.
4253 (grub_video_vbe_blit_render_target): Likewise.
4254 (grub_video_vbe_scroll): Likewise.
4255 (grub_video_vbe_swap_buffers): Likewise.
4256 (grub_video_vbe_create_render_target): Likewise.
4257 (grub_video_vbe_delete_render_target): Likewise.
4258 (grub_video_vbe_set_active_render_target): Likewise.
4259 (grub_vbe_set_pixel_rgb): Remove function.
4260 (grub_vbe_set_pixel_index): Likewise.
4261 (index_color_mode): Remove static variable.
4262 (active_mode): Likewise.
4263 (framebuffer): Likewise.
4264 (bytes_per_scan_line): Likewise.
4265 (grub_video_vbe_adapter): Added new static variable.
4266 (framebuffer): Likewise.
4267 (render_target): Likewise.
4268 (initial_mode): Likewise.
4269 (mode_in_use): Likewise.
4270 (mode_list): Likewise.
4271
5f97350b 42722006-03-10 Marco Gerards <marco@gnu.org>
4273
4274 * configure.ac (AC_INIT): Bumped to 1.93.
4275
4276 * DISTLIST: Added `include/grub/hfs.h'.
4277
a3c5c6f8 42782006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
4279
4280 * boot/i386/pc/boot.S (general_error): Before looping, try INT
4281 18H, which might help the BIOS falling back to next boot media.
4282
6de53d26 42832006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
4284
4285 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
4286 Poe Chen <poe.poechen@gmail.com>.
4287
77c4a393 42882006-01-17 Marco Gerards <marco@gnu.org>
4289
4290 * include/grub/normal.h: Include <grub/script.h>.
4291 (grub_command_list): Removed struct.
4292 (grub_command_list_t): Removed type.
4293 (grub_menu_entry): Remove members `num' and `command_list'. Add
4294 members `commands' and `sourcecode'.
4295 * include/grub/script.h: Add inclusion guards.
4296 (grub_script_cmd_menuentry): New struct.
4297 (grub_script_execute_menuentry): New prototype.
4298 (grub_script_lexer_record_start): Likewise.
4299 (grub_script_lexer_record_stop): Likewise.
4300 * normal/execute.c (grub_script_execute_menuentry): New function.
4301 * normal/lexer.c (record, recording, recordpos, recordlen): New
4302 variables.
4303 (grub_script_lexer_record_start): New function.
4304 (grub_script_lexer_record_stop): Likewise.
4305 (recordchar): Likewise.
4306 (nextchar): Likewise.
4307 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
4308 2048 as the buffer size. Add the tokens `menuentry' and `@'.
4309 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
4310 (current_menu): New variable.
4311 (free_menu): Mainly rewritten.
4312 (grub_normal_menu_addentry): New function.
4313 (read_config_file): Rewritten.
4314 * normal/menu.c (run_menu_entry): Mainly rewritten.
4315 * normal/menu_entry.c (make_screen): Rewritten te code to insert
4316 the menu entry.
4317 (run): Mainly rewritten.
4318 * normal/parser.y (menu_entry): New variable.
4319 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
4320 (menuentry): New rule.
4321 (command): Add `menuentry'.
4322 (if_statement): Allow additional returns before `fi'.
4323 * normal/script.c (grub_script_create_cmdmenu): New function.
4324
144f1f98 43252006-01-03 Marco Gerards <marco@gnu.org>
4326
4327 * INSTALL: GNU Bison is required.
4328 * configure.ac: Rewritten the test to detect Bison.
4329 * Makefile.in (YACC): New variable. Reported by Xun Sun
4330 <xun.sun.cn@gmail.com>.
4331
af4b2d89 43322006-01-03 Marco Gerards <marco@gnu.org>
4333
4334 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
4335 the HFS+ filesystem to filesystem blocks.
4336 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
4337 GCC warning is silenced.
4338
15643b71 43392006-01-03 Marco Gerards <marco@gnu.org>
4340
4341 * partmap/apple.c (apple_partition_map_iterate): Convert the data
4342 read from disk from big endian to host byte order.
4343
00905879 43442006-01-03 Hollis Blanchard <hollis@penguinppc.org>
4345
4346 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
4347 documentation.
4348 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
4349 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
4350 embedded HFS+ filesystem.
4351 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
4352 (grub_hfs_sblock): Move from here...
4353 * include/grub/hfs.h: To here... New file.
4354 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
4355 documentation.
4356 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
4357 New macros.
4358 (grub_hfsplus_volheader): Change type of member `magic' to
4359 `grub_uint16_t'.
4360 (grub_hfsplus_data): Add new member `embedded_offset'.
4361 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
4362 returned block.
4363 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
4364 Calculate the offset.
4365
8899bc3e 43662005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4367
4368 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
4369 Removed.
4370 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
4371
ae8c0277 43722005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4373
4374 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
4375 ENV->NAME is NULL after allocating ENV->VALUE.
4376
07084456 43772005-12-25 Marco Gerards <marco@gnu.org>
4378
4379 * kern/env.c (grub_env_set): Rewritten the error handling code.
4380
4750f5f1 43812005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4382
4383 * geninit.sh: Made more robust, and more portable.
4384
50214199 43852005-12-25 Marco Gerards <marco@gnu.org>
4386
4387 Add support for Apple HFS+ filesystems.
4388
4389 * fs/hfsplus.c: New file.
4390
4391 * DISTLIST: Added `fs/hfsplus.c'.
4392
4393 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
4394 (hfsplus_mod_SOURCES): New variable.
4395 (hfsplus_mod_CFLAGS): Likewise.
4396 (hfsplus_mod_LDFLAGS): Likewise.
4397 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
4398 (grub_setup_SOURCES): Likewise.
4399 (grub_mkdevicemap_SOURCES): Likewise.
4400 (grub_emu_SOURCES): Likewise.
4401 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4402
4403 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
4404
4405 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
4406
befaed6c 44072005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
4408
4409 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
4410 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
4411 include/grub/parser.h, include/grub/script.h, kern/parser.c,
4412 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
4413 normal/lexer.c, normal/parser.y, normal/script.c, and
4414 partmap/gpt.c.
4415 Removed kern/sparc64/cache.c.
4416
4417 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
4418 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
4419 grub_emu_init.c.
4420
4421 * configure.ac (AC_INIT): Bumped to 1.92.
4422
6a124103 44232005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
4424
4425 * kern/err.c (grub_error_push): Added new function to support error
4426 stacks.
4427 (grub_error_pop): Likewise.
4428 (grub_error_stack_items): New local variable to support error stacks.
4429 (grub_error_stack_pos): Likewise.
4430 (grub_error_stack_assert): Likewise.
4431 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
4432 stack depth.
4433 (grub_print_error): Added support to print errors from error stack.
4434
4435 * include/grub/err.h (grub_error_push): Added function prototype.
4436 (grub_error_pop): Likewise.
4437
be973c1b 44382005-12-09 Hollis Blanchard <hollis@penguinppc.org>
4439
4440 * configure.ac: Accept `powerpc64' as host_cpu.
4441 (amd64): Rename to `biarch32'.
4442
4443 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
4444 non-cacheline-aligned addresses.
4445
4446 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
4447 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
4448 if `size' is non-zero.
4449
b04216ab 44502005-12-03 Marco Gerards <mgerards@xs4all.nl>
4451
4452 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
4453 and `cd' to make sure the filename is not prefixed with a
4454 directory name.
4455 (pkgdata_MODULES): Add `gpt.mod'.
4456 (gpt_mod_SOURCES): New variable.
4457 (gpt_mod_CFLAGS): Likewise.
4458 (gpt_mod_LDFLAGS): Likewise.
4459
4460 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
4461
4462 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
4463 New macro.
4464
4465 * partmap/gpt.c: New file.
4466
4467 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
4468 GPT partition map is detected.
4469
41730ed9 44702005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
4471
4472 * commands/i386/pc/play.c: New file.
4473 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
4474 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
4475 macros.
4476
95dc3643 44772005-11-27 Marco Gerards <mgerards@xs4all.nl>
4478
4479 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
4480 ((unused))' to silence gcc warning.
4481
1569ec51 44822005-11-26 Hollis Blanchard <hollis@penguinppc.org>
4483
4484 * configure.ac: Correct `AC_PROG_YACC' test.
4485
9abde152 44862005-11-22 Hollis Blanchard <hollis@penguinppc.org>
4487
4488 * util/powerpc/ieee1275/grub-install.in: Run the mount point
4489 check before installing files.
4490
44b83271 44912005-11-22 Mike Small <smallm@panix.com>
4492
4493 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
4494 number regex so multidigit numbers are recognized correctly.
4495
44962005-11-22 Mike Small <smallm@panix.com>
4497
4498 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
4499 debugging message before attempting to claim memory.
4500 (grub_rescue_cmd_initrd): Add a claim debugging message and try
4501 multiple addresses in case of failure.
4502
9c12956b 45032005-11-22 Hollis Blanchard <hollis@penguinppc.org>
4504
4505 * term/tparm.c (get_space): Remove empty `if' statement.
4506
4507 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
4508
4509 * kern/parser.c (check_varstate): Rename `state' to 's'.
4510
aeaf81d9 45112005-11-22 Hollis Blanchard <hollis@penguinppc.org>
4512
4513 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
4514 variable definitions to the beginning of each function. Sort stack
4515 variables by size.
4516 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
4517 `buf' argument to `char *'.
4518
79bbb63f 45192005-11-22 Hollis Blanchard <hollis@penguinppc.org>
4520
4521 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
4522 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
4523 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
4524 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
4525 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
4526 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
4527 configfile.mod, search.mod, gzio.mod and test.mod.
4528 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
4529 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
4530 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
4531 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
4532 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
4533 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
4534 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
4535 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
4536 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
4537 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
4538 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
4539 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
4540 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
4541 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
4542 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
4543 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
4544 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
4545 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
4546 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
4547 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
4548 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
4549 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
4550 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
4551
4552 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
4553 `grep --include'.
4554 (pkgdata_MODULES): Add test.mod.
4555
233b1628 45562005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4557
4558 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
4559 appending to variables with "+=".
4560 (PModule): Use full pathname to generate *.lst filenames.
4561
4562 * Makefile.in: Fixed list rules moved from genmk.rb.
4563 (.DELETE_ON_ERROR): New special target.
4564 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
4565
4566 * conf/i386-pc.rmk: Include conf/common.mk.
4567 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
4568 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
4569 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
4570 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
4571 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
4572 configfile.mod, search.mod, gzio.mod and test.mod.
4573 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
4574 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
4575 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
4576 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
4577 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
4578 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
4579 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
4580 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
4581 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
4582 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
4583 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
4584 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
4585 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
4586 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
4587 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
4588 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
4589 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
4590 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
4591 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
4592 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
4593 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
4594 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
4595 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
4596 here...
4597 * conf/common.rmk: ... to here. New file.
4598
4599 * conf/common.mk: New file.
4600
16f820c8 46012005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
4602
4603 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
4604 (grub_script.tab.c): ... here.
4605
4606 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
4607 (grub_script.tab.c): ... here.
4608
4609 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
4610 (grub_script.tab.c): ... here.
4611
4612 * normal/command.c (grub_command_find): Fixed a memory leak of
4613 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
4614
63ba1554 46152005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4616
4617 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
4618 "@" which marks the start of a comment on ARM.
4619 (VARIABLE): Likewise.
4620
7f67dc13 46212005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4622
79bbb63f 4623 Add support for Linux/ADFS partition tables.
7f67dc13 4624
4625 * partmap/acorn.c: New file.
4626
4627 * include/grub/acorn_filecore.h: Likewise.
4628
4629 * DISTLIST: Added `partmap/acorn.c' and
4630 `include/grub/acorn_filecore.h'.
4631
4632 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
4633 `partmap/acorn.c'.
4634 (pkgdata_MODULES): Add `acorn.mod'.
4635 (acorn_mod_SOURCES): New variable.
4636 (acorn_mod_CFLAGS): Likewise.
4637
4638 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
4639 `partmap/acorn.c'.
4640 (pkgdata_MODULES): Add `acorn.mod'.
4641 (acorn_mod_SOURCES): New variable.
4642 (acorn_mod_CFLAGS): Likewise.
4643
4644 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
4645 (pkgdata_MODULES): Add `acorn.mod'.
4646 (acorn_mod_SOURCES): New variable.
4647 (acorn_mod_CFLAGS): Likewise.
4648 (acorn_mod_LDFLAGS): Likewise.
4649
4650 * include/types.h (grub_disk_addr_t): New typedef.
4651
6d099807 46522005-11-13 Marco Gerards <mgerards@xs4all.nl>
4653
4654 * geninit.sh: New file.
4655
4656 * geninitheader.sh: Likewise.
4657
4658 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
4659 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
4660 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
4661 * commands/configfile.c (grub_configfile_init)
4662 (grub_configfile_fini): Likewise.
4663 * commands/default.c (grub_default_init, grub_default_fini):
4664 Likewise.
4665 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
4666 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
4667 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
4668 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
4669 Likewise.
4670 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
4671 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
4672 Likewise.
4673 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
4674 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
4675 Likewise.
4676 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
4677 Likewise.
4678 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
4679 Likewise.
4680 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
4681 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
4682 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
4683 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
4684 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
4685 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
4686 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
4687 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
4688 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
4689 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
4690 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
4691 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
4692 * partmap/amiga.c (grub_amiga_partition_map_init)
4693 (grub_amiga_partition_map_fini): Likewise.
4694 * partmap/apple.c (grub_apple_partition_map_init)
4695 (grub_apple_partition_map_fini): Likewise.
4696 * partmap/pc.c (grub_pc_partition_map_init)
4697 (grub_pc_partition_map_fini): Likewise.
4698 * partmap/sun.c (grub_sun_partition_map_init,
4699 grub_sun_partition_map_fini): Likewise.
4700 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
4701 Likewise.
4702
4703 * util/grub-emu.c: Include <grub_modules_init.h>.
4704 (main): Don't initialize and de-initialize any modules directly,
4705 use `grub_init_all' and `grub_fini_all' instead.
4706
4707 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
4708 `grub_vesafb_mod_init'.
4709 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
4710 all users.
4711 * term/i386/pc/vga.c (grub_vga_init): Renamed to
4712 `grub_vga_mod_init'. Updated all users.
4713 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
4714
4715 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
4716 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
4717 rules.
4718
4719 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
4720 Generate a function to initialize the module in utilities.
4721 Updated all callers.
4722 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
4723 initialize the module in utilities. Updated all callers.
4724
9046bcf0 47252005-11-09 Hollis Blanchard <hollis@penguinppc.org>
4726
4727 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
4728 escape sequence and a literal ^L to clear the screen.
4729
4730 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
4731 when returning from Open Firmware.
4732
d13ea639 47332005-11-09 Hollis Blanchard <hollis@penguinppc.org>
4734
4735 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
4736 (grub_ofconsole_height): Likewise.
4737 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
4738 manually insert a '\n'.
4739 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
4740 `grub_ofconsole_height'. Return early if these are already set.
4741
a8fcf206 47422005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
4743
4744 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
4745 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
4746 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
4747 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
4748 and `normal/script.c'.
4749 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
4750 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
4751 (test_mod_SOURCES): New variable.
4752 (test_mod_CFLAGS): Likewise.
4753 (test_mod_LDFLAGS): Likewise.
4754 (pkgdata_MODULES): Add `test.mod'.
4755 (grub_script.tab.c): New rule.
4756 (grub_script.tab.h): Likewise.
4757
b6b32745 47582005-11-07 Marco Gerards <mgerards@xs4all.nl>
4759
4760 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
4761 `commands/test.c', `normal/execute.c', `normal/lexer.c',
4762 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
4763 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
4764 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
4765 (test_mod_SOURCES): New variable.
4766 (test_mod_CFLAGS): Likewise.
4767 (pkgdata_MODULES): Add `test.mod'.
4768 (grub_script.tab.c): New rule.
4769 (grub_script.tab.h): Likewise.
4770
daac212a 47712005-11-06 Marco Gerards <mgerards@xs4all.nl>
4772
4773 Add initial scripting support.
4774
4775 * commands/test.c: New file.
4776 * include/grub/script.h: Likewise.
4777 * normal/execute.c: Likewise.
4778 * normal/function.c: Likewise.
4779 * normal/lexer.c: Likewise.
4780 * normal/parser.y: Likewise.
4781 * normal/script.c: Likewise.
4782
4783 * configure.ac: Add `AC_PROG_YACC' test.
4784
4785 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
4786 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
4787 `normal/function.c' and `normal/script.c'.
4788 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
4789 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 4790 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
4791 variables.
daac212a 4792 (pkgdata_MODULES): Add `test.mod'.
4793 (grub_script.tab.c): New rule.
4794 (grub_script.tab.h): Likewise.
4795
4796 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
4797
4798 * include/grub/normal.h (grub_test_init): New prototype.
4799 (grub_test_fini): Likewise.
4800
4801 * normal/command.c: Include <grub/script.h>.
4802 (grub_command_execute): Rewritten.
4803
4804 * util/grub-emu.c (main): Call `grub_test_init' and
4805 `grub_test_fini'.
4806
77500b2b 48072005-11-03 Hollis Blanchard <hollis@penguinppc.org>
4808
4809 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
4810 to 0.
4811 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
4812 there are no pending characters.
4813
e45deb9e 48142005-11-03 Hollis Blanchard <hollis@penguinppc.org>
4815
4816 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
4817 `grub_strndup' to drop device arguments. Replace unnecessary
4818 `grub_strndup' with `grub_strdup'.
4819
4ce32619 48202005-11-03 Hollis Blanchard <hollis@penguinppc.org>
4821
4822 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
4823 `debug' environment variable has been set.
4824
48252005-11-02 Hollis Blanchard <hollis@penguinppc.org>
4826
4827 * Makefile.in (install-local): Use $(DATA).
4828 (uninstall): Likewise.
4829 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
4830 (sbin_UTILITIES): ... to here.
4831 (sbin_SCRIPTS): New variable.
4832 (grub_install_SOURCES): New variable.
4833 * util/powerpc/ieee1275/grub-install.in: New file.
4834 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
4835 variable.
4836 (add_segments): Call `grub_util_get_path'.
4837
25fe6f03 48382005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
4839
4840 From Timothy Baldwin:
4841 * commands/ls.c (grub_ls_list_files): Close FILE with
4842 grub_file_close.
4843 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
4844
04ccf3ec 48452005-10-24 Marco Gerards <mgerards@xs4all.nl>
4846
4847 * include/grub/parser.h: New file.
4848
4849 * kern/parser.c: Likewise.
4850
4851 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
4852 (grub_setup_SOURCES): Likewise.
4853 (grub_probefs_SOURCES): Likewise.
4854 (grub_emu_SOURCES): Likewise.
4855 (kernel_img_HEADERS): Add `parser.h'.
4856
4857 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
4858 (grub_emu_SOURCES): Add `kern/parser.c'.
4859 (grubof_SOURCES): Likewise.
4860
4861 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
4862 (grubof_SOURCES): Add `kern/parser.c'.
4863
4864 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
4865
4866 * kern/misc.c (grub_split_cmdline): Removed function.
4867
4868 * kern/rescue.c: Include <grub/parser.h>.
4869 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
4870 of `grub_split_cmdline'.
4871
4872 * normal/command.c: Include <grub/parser.h>.
4873 (grub_command_execute): Use `grub_parser_split_cmdline' instead
4874 of `grub_split_cmdline'.
4875
4876 * normal/completion.c: Include <grub/parser.h>.
4877 (cmdline_state): New variable.
4878 (iterate_dir): End the filename with a quote depending on the
4879 command line state.
4880 (get_state): new function.
4881 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
4882 split the arguments and determine the current argument. When the
4883 argument string is not quoted, escape all spaces.
4884
6d8f4b0e 48852005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
4886
4887 * normal/sparc64/setjmp.S: New file.
4888
15cf03ed 48892005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
4890
4891 * include/grub/sparc64/libgcc.h: New file.
4892 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
4893 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
4894 normal/sparc64/setjmp.c.
4895
03e8661a 48962005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
4897
4898 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
4899 * kern/sparc64/cache.S: New file.
4900 * kern/sparc64/cache.c: Removed.
4901 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
4902 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
4903 -mtune=ultrasparc.
4904 (COMMON_LDFLAGS): Add -melf64_sparc.
4905 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
4906 (grubof_SOURCES): Use cache.S instead of cache.c.
4907 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
4908 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
4909 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
4910 commented though.
4911 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
4912 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
4913 (linux_mod_CFLAGS): Commented out.
4914 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
4915 out because module isn't built.
4916 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
4917 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
4918 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
4919 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
4920 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
4921 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
4922 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
4923 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
4924 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
4925 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
4926 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
4927 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
4928 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
4929 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
4930
34eeec8a 49312005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
4932
4933 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
4934 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
4935 longer, because HFS should not be used on PC.
4936
708367a3 49372005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
4938
4939 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
4940 consistently within the loop.
4941
6fa1251a 49422005-10-15 Marco Gerards <mgerards@xs4all.nl>
4943
4944 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
4945 directory can not be read.
4946
4801580b 49472005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
4948
4949 * configure.ac (AC_INIT): Increase the version number to 1.91.
4950
4951 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
4952 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
4953 term/i386/pc/serial.c.
4954
219ad426 49552005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
4956
4957 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
4958 file size must be permitted.
4959
4960 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
4961 between %ah and %al.
4962
688e5699 49632005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
4964
4965 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
4966 grub_uint64_t.
4967 Call the hook with a NUL-terminated filename.
4968 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
4969 grub_cpu_to_be32.
4970
4971 * kern/term.c (cursor_state): New variable.
4972 (grub_term_set_current): Reset the cursor state on a new
4973 terminal.
4974 (grub_setcursor): Rewritten to use CURSOR_STATE.
4975 (grub_getcursor): New function.
4976
4977 * include/grub/term.h (grub_getcursor): New prototype.
4978
4979 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
4980 integers on ARM. Reported by Timothy Baldwin
4981 <T.E.Baldwin99@members.leeds.ac.uk>.
4982
bb34586c 49832005-10-11 Marco Gerards <mgerards@xs4all.nl>
4984
4985 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
4986 allocated.
4987 (grub_sfs_dir): Likewise.
4988
9a909877 49892005-10-09 Marco Gerards <mgerards@xs4all.nl>
4990
4991 Add support for the SFS filesystem.
4992
4993 * fs/sfs.c: New file.
4994
4995 * DISTLIST: Added `fs/sfs.c'.
4996
4997 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
4998 (grub_probefs_SOURCES): Likewise.
4999 (grub_emu_SOURCES): Likewise.
5000 (pkgdata_MODULES): Add `sfs.mod'.
5001 (sfs_mod_SOURCES): New variable.
5002 (sfs_mod_CFLAGS): Likewise.
5003 (sfs_mod_LDFLAGS): Likewise.
5004
5005 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
5006 (pkgdata_MODULES): Add `sfs.mod'.
5007 (sfs_mod_SOURCES): New variable.
5008 (sfs_mod_CFLAGS): Likewise.
5009
5010 * util/grub-emu.c (main): Call `grub_sfs_init' and
5011 `grub_sfs_fini'.
5012
5013 * include/grub/fs.h (grub_sfs_init): New prototype.
5014 (grub_sfs_fini): Likewise.
5015
57bdbde3 50162005-10-07 Marco Gerards <mgerards@xs4all.nl>
5017
5018 Add support for the AFFS filesystem.
5019
5020 * fs/affs.c: New file.
5021
5022 * DISTLIST: Added `fs/affs.c'.
5023
5024 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
5025 (grub_probefs_SOURCES): Likewise.
5026 (grub_emu_SOURCES): Likewise.
5027 (pkgdata_MODULES): Add `affs.mod'.
5028 (affs_mod_SOURCES): New variable.
5029 (affs_mod_CFLAGS): Likewise.
5030 (affs_mod_LDFLAGS): Likewise.
5031
5032 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
5033 (pkgdata_MODULES): Add `affs.mod'.
5034 (affs_mod_SOURCES): New variable.
5035 (affs_mod_CFLAGS): Likewise.
5036
5037 * util/grub-emu.c (main): Call `grub_affs_init' and
5038 `grub_affs_fini'.
5039
5040 * include/grub/fs.h (grub_affs_init): New prototype.
5041 (grub_affs_fini): Likewise.
5042
047b67e0 50432005-10-01 Marco Gerards <mgerards@xs4all.nl>
5044
5045 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
5046
59b8208a 50472005-10-01 Marco Gerards <mgerards@xs4all.nl>
5048
5049 * configure.ac: Accept `x86_64' as host_cpu. In that case add
5050 `-m32' to CFLAGS.
5051
5052 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
5053 linking.
5054
5055 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
5056 (COMMON_LDFLAGS): New variable.
5057 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
5058 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
5059 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
5060 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
5061 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
5062 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
5063 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
5064 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
5065 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
5066 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
5067 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
5068 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
5069 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
5070 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
5071 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
5072 variables.
5073 (normal_mod_ASFLAGS): Add `-m32'.
5074
5075 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
5076 (grub_host_size_t, grub_host_ssize_t): New types.
5077 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
5078 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
5079 `GRUB_HOST_SIZEOF_VOID_P'.
5080
5081 * include/grub/kernel.h (struct grub_module_header): Type of
5082 member offset changed to `grub_host_off_t'. Type of member size
5083 changed to `grub_host_size_t'.
5084 (struct grub_module_info): Type of member offset changed to
5085 `grub_host_off_t'. Type of member size changed to
5086 `grub_host_size_t'.
5087
b4093103 50882005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
5089
5090 Make GRUB's kernel compliant to Multiboot Specification.
5091
5092 * kern/i386/pc/startup.S (multiboot_header): New label.
5093 (multiboot_entry): Likewise.
5094 (multiboot_trampoline): Likewise.
5095
5096 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
5097 Increased to 0x4A0.
5098
5099 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
5100 put parentheses after a question mark.
5101 [!GRUB_UTIL] (my_mod): New variable.
5102
5103 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
5104
b2499b29 51052005-09-28 Marco Gerards <mgerards@xs4all.nl>
5106
5107 Adds support for the XFS filesystem. Btrees are not supported
5108 yet.
5109
5110 * fs/xfs.c: New file.
5111
5112 * DISTLIST: Added `fs/xfs.c'.
5113
5114 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
5115 (grub_probefs_SOURCES): Likewise.
5116 (grub_emu_SOURCES): Likewise.
5117 (pkgdata_MODULES): Add `xfs.mod'.
5118 (xfs_mod_SOURCES): New variable.
5119 (xfs_mod_CFLAGS): Likewise.
5120
5121 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
5122 (pkgdata_MODULES): Add `xfs.mod'.
5123 (xfs_mod_SOURCES): New variable.
5124 (xfs_mod_CFLAGS): Likewise.
5125
5126 * util/grub-emu.c (main): Call `grub_xfs_init' and
5127 `grub_xfs_fini'.
5128
5129 * include/grub/fs.h (grub_xfs_init): New prototype.
5130 (grub_xfs_fini): Likewise.
5131
5132
83d37a62 51332005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
5134
5135 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
5136 color modes, allow greater than 16 colors to be configured as
5137 a default palette.
5138
47d2d65e 51392005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
5140
5141 * normal/completion.c (complete_arguments): Add the qualifier
5142 const into OPTIONS.
5143
5144 From Omniflux <omniflux+lists@omniflux.com>:
5145 * include/grub/terminfo.h: New file.
5146 * include/grub/tparm.h: Likewise.
5147 * include/grub/i386/pc/serial.h: Likewise.
5148 * term/terminfo.c: Likewise.
5149 * term/tparm.c: Likewise.
5150 * term/i386/pc/serial.c: Likewise.
5151 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
5152 serial.mod.
5153 (terminfo_mod_SOURCES): New variable.
5154 (terminfo_mod_CFLAGS): Likewise.
5155 (serial_mod_SOURCES): Likewise.
5156 (serial_mod_CFLAGS): Likewise.
5157
48b671ff 51582005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
5159
5160 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
5161 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
5162 and kern/powerpc/ieee1275/cmain.c, respectively.
5163
5164 * boot/powerpc/ieee1275/crt0.S: Moved to ...
5165 * kern/powerpc/ieee1275/crt0.S: ... here.
5166
5167 * boot/powerpc/ieee1275/cmain.c: Moved to ...
5168 * kern/powerpc/ieee1275/cmain.c: ... here.
5169
5170 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
5171 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
5172 instead of boot/powerpc/ieee1275/crt0.S and
5173 boot/powerpc/ieee1275/cmain.c, respectively.
5174
5175 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
5176 sectors. It was not used anyway.
5177
09fc77a7 51782005-08-30 Hollis Blanchard <hollis@penguinppc.org>
5179
5180 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
5181 `unused parameter' warning.
5182
003789c7 51832005-08-30 Hollis Blanchard <hollis@penguinppc.org>
5184
5185 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
5186 function.
5187 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
5188 getcharwidth.
5189
67f44c86 51902005-08-28 Marco Gerards <metgerards@student.han.nl>
5191
5192 * include/grub/normal.h (enum grub_completion_type): Added
5193 `GRUB_COMPLETION_TYPE_ARGUMENT'.
5194
5195 * normal/cmdline.c (print_completion): Handle
5196 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
5197 * normal/menu_entry.c (store_completion): Likewise.
5198
5199 * normal/completion.c (complete_arguments): New function.
5200 (grub_normal_do_completion): Call `complete_arguments' when the
5201 current words start with a dash.
5202
0b5abe02 52032005-08-27 Marco Gerards <metgerards@student.han.nl>
5204
5205 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
5206 `gzio.mod' instead of `io.mod').
5207
d9864ee1 52082005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
5209
5210 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
5211 (DISTDIRS): Added io and video.
5212 Rewrite the search routine to make an output consistently.
5213
5214 * DISTLIST: Added conf/sparc64-ieee1275.mk,
5215 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
5216 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
5217 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
5218 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
5219 util/powerpc/ieee1275/misc.c.
5220
5221 * include/grub/gzio.h: New file.
5222 * io/gzio.c: Likewise.
5223
5224 * kern/file.c (grub_file_close): Call grub_device_close only if
5225 FILE->DEVICE is not NULL.
5226
5227 * include/grub/mm.h [!NULL] (NULL): New macro.
5228
5229 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
5230
5231 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
5232 (pkgdata_MODULES): Added gzio.mod.
5233 (gzio_mod_SOURCES): New variable.
5234 (gzio_mod_CFLAGS): Likewise.
5235
5236 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
5237 (pkgdata_MODULES): Added gzio.mod.
5238 (gzio_mod_SOURCES): New variable.
5239 (gzio_mod_CFLAGS): Likewise.
5240
5241 * commands/cat.c: Include grub/gzio.h.
5242 (grub_cmd_cat): Use grub_gzfile_open instead of
5243 grub_file_open.
5244
5245 * commands/cmp.c: Include grub/gzio.h.
5246 (grub_cmd_cmp): Use grub_gzfile_open instead of
5247 grub_file_open.
5248
5249 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
5250 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
5251 grub_file_open.
5252 (grub_rescue_cmd_module): Likewise.
5253
fa46f4b5 52542005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
5255
5256 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
5257 kern/sparc64/ieee1275/init.c because it contains _start.
5258 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
5259
e9211b5d 52602005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
5261
5262 * configure.ac: Add support for sparc64 host with ieee1275
5263 firmware.
5264 * configure: Generated from configure.ac.
5265 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
5266 instead of int.
5267 (grub_ofdisk_read): Likewise.
5268 (grub_ofdisk_open): Use %p to print pointer values, and cast the
5269 pointers as (void *) to remove a warning.
5270 (grub_ofdisk_close): Likewise.
5271 (grub_ofdisk_read): Likewise.
5272 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
5273 returns, so make it return void to remove a warning.
5274 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
5275 Corresponding prototype change.
5276 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
5277 values, and cast the pointers as (void *) to remove a warning.
5278 (grub_mm_dump): Likewise.
5279 * conf/sparc64-ieee1275.mk: New file.
5280 * conf/sparc64-ieee1275.rmk: Likewise.
5281 * include/grub/sparc64/setjmp.h: Likewise.
5282 * include/grub/sparc64/types.h: Likewise.
5283 * include/grub/sparc64/ieee1275/console.h: Likewise.
5284 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
5285 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
5286 * include/grub/sparc64/ieee1275/time.h: Likewise.
5287 * kern/sparc64/cache.c: Likewise.
5288 * kern/sparc64/dl.c: Likewise.
5289 * kern/sparc64/ieee1275/init.c: Likewise.
5290 * kern/sparc64/ieee1275/openfw.c: Likewise.
5291
385c6a92 52922005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
5293
5294 * util/console.c (grub_ncurses_putchar): If C is greater than
5295 0x7f, set C to a question mark.
5296 (grub_ncurses_getcharwidth): New function.
5297 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
5298 getcharwidth.
5299
5300 * normal/menu.c (print_entry): Made aware of Unicode. First,
5301 convert TITLE to UCS-4, and predict the cursor position by
5302 grub_getcharwidth.
5303
5304 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
5305 const to SRC.
5306 * kern/misc.c (grub_utf16_to_utf8): Likewise.
5307
16ccb8b1 53082005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
5309
5310 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
5311 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
5312 grub_strcat.
5313
5314 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
5315 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
5316 grub_strcpy and grub_strlen. Take it into account that a space
5317 character is inserted as a delimiter.
5318
6a85ce79 53192005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
5320
5321 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
5322 invalid magic in thre error.
5323
5324 * commands/search.c: New file.
5325
5326 * util/grub-emu.c (main): Call grub_search_init and
5327 grub_search_fini.
5328
5329 * kern/rescue.c (grub_rescue_print_disks): Removed.
5330 (grub_rescue_print_devices): New function.
5331 (grub_rescue_cmd_ls): Use grub_device_iterate with
5332 grub_rescue_print_devices instead of grub_disk_dev_iterate with
5333 grub_rescue_print_disks.
5334
5335 * kern/partition.c (grub_partition_iterate): Return the result of
5336 PARTMAP->ITERATE instead of GRUB_ERRNO.
5337
5338 * kern/device.c: Include grub/partition.h.
5339 (grub_device_iterate): New function.
5340
5341 * include/grub/partition.h (grub_partition_iterate): Return int
5342 instead of grub_err_t.
5343
5344 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
5345 prototype.
5346 [GRUB_UTIL] (grub_search_fini): Likewise.
5347
5348 * include/grub/device.h (grub_device_iterate): New prototype.
5349
5350 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
5351 commands/search.c.
5352 (pkgdata_MODULES): Added search.mod.
5353 (search_mod_SOURCES): New variable.
5354 (search_mod_CFLAGS): Likewise.
5355
5356 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
5357 (pkgdata_MODULES): Added search.mod.
5358 (search_mod_SOURCES): New variable.
5359 (search_mod_CFLAGS): Likewise.
5360
5361 * commands/ls.c (grub_ls_list_disks): Renamed to ...
5362 (grub_ls_list_devices): ... this, and use grub_device_iterate.
5363 All callers changed.
5364
5365 * DISTLIST: Added commands/search.c.
5366
ef095434 53672005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
5368
5369 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
5370 conversion.
5371 (grub_getcharwidth): New function.
5372
5373 * kern/misc.c (grub_utf8_to_ucs4): New function.
5374
5375 * include/grub/term.h (struct grub_term): Added a new member
5376 "getcharwidth".
5377 (grub_getcharwidth): New prototype.
5378
5379 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
5380
5381 * term/i386/pc/console.c (map_char): New function. Segregated from
5382 grub_console_putchar.
5383 (grub_console_putchar): Use map_char.
5384 (grub_console_getcharwidth): New function.
5385 (grub_console_term): Specified grub_console_getcharwidth as
5386 getcharwidth.
5387
5388 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
5389 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
5390
5391 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
5392 GRUB_ERRNO.
5393 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
5394 on grub_strtoul completely.
5395 (write_char): Declare local variables in the beginning of the
5396 function.
5397 (grub_vesafb_getcharwidth): New function.
5398 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
5399 getcharwidth.
5400
1f0a95e4 54012005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
5402
5403 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
5404 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
5405 commands/i386/pc/vbetest.c.
5406
5407 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
5408 call grub_vbe_get_controller_info again, because the returned
5409 information is volatile.
5410 (grub_vbe_set_video_mode): Mostly rewritten.
5411 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
5412 grub_vbe_status_t correctly.
5413 (grub_vbe_get_video_mode_info): Likewise.
5414 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
5415 several if statements.
5416
5417 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
5418 * commands/i386/pc/vbeinfo.c: ... this.
5419
5420 * commands/i386/pc/vbe_test.c: Renamed to ...
5421 * commands/i386/pc/vbetest.c: ... this.
5422
5423 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
5424 ...
5425 (grub_cmd_vbeinfo): ... this. Save video modes before
5426 iterating. Skip a video mode, if it is not available, not enough
5427 information is given or it is monochrome. Show the memory
5428 model. Leave the interpretation of MODEVAR to grub_strtoul
5429 completely.
5430 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
5431 (GRUB_MOD_FINI): Likewise.
5432
5433 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
5434 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
5435 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
5436 duplicated grub_env_get. Leave the interpretation of MODEVAR to
5437 grub_strtoul completely.
5438 (real2pm): Removed.
5439 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
5440 (GRUB_MOD_FINI): Likewise.
5441
5442 * normal/misc.c: Include grub/mm.h.
5443
5444 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
5445 vbe_list_modes with vbetest.mod and vbeinfo.mod.
5446 (vbe_list_modes_mod_SOURCES): Removed.
5447 (vbe_list_modes_mod_CFLAGS): Likewise.
5448 (vbe_test_mod_SOURCES): Likewise.
5449 (vbe_test_mod_CFLAGS): Likewise.
5450 (vbeinfo_mod_SOURCES): New variable.
5451 (vbeinfo_mod_CFLAGS): Likewise.
5452 (vbetest_mod_SOURCES): Likewise.
5453 (vbetest_mod_CFLAGS): Likewise.
5454
992ffbbe 54552005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
5456
5457 * normal/misc.c: New file.
5458
5459 * DISTLIST: Added normal/misc.c.
5460
5461 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
5462 DISK to HOOK. Call HOOK with DISK.
5463 * partmap/apple.c (apple_partition_map_iterate): Likewise.
5464 * partmap/pc.c (pc_partition_map_iterate): Likewise.
5465 * partmap/sun.c (sun_partition_map_iterate): Likewise.
5466
5467 * normal/menu_entry.c (struct screen): Added a new member
5468 "completion_shown".
5469 (completion_buffer): New global variable.
5470 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
5471 (store_completion): New function.
5472 (complete): Likewise.
5473 (clear_completions): Likewise.
5474 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
5475 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
5476 a tab, call complete.
5477
5478 * normal/completion.c (disk_dev): Removed.
5479 (print_simple_completion): Likewise.
5480 (print_partition_completion): Likewise.
5481 (print_func): New global variable.
5482 (add_completion): Do not take the arguments WHAT or PRINT any
5483 longer. Added a new argument TYPE. Instead of printing directly,
5484 call PRINT_FUNC if not NULL.
5485 All callers changed.
5486 (complete_device): Use a local variable DEV instead of
5487 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
5488 (grub_normal_do_completion): Take a new argument HOOK. Do not
5489 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
5490 empty string, return NULL instead.
5491 All callers changed.
5492
5493 * normal/cmdline.c (print_completion): New function.
5494
5495 * kern/partition.c (grub_partition_iterate): Add an argument DISK
5496 to HOOK.
5497 All callers changed.
5498
5499 * kern/disk.c (grub_print_partinfo): Removed.
5500
5501 * include/grub/partition.h (struct grub_partition_map): Add a new
5502 argument DISK into HOOK of ITERATE.
5503 (grub_partition_iterate): Add a new argument DISK to HOOK.
5504
5505 * include/grub/normal.h (enum grub_completion_type): New enum.
5506 (grub_completion_type_t): New type.
5507 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
5508 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
5509 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
5510 (GRUB_COMPLETION_TYPE_FILE): Likewise.
5511 (grub_normal_do_completion): Added a new argument HOOK.
5512 (grub_normal_print_device_info): New prototype.
5513
5514 * include/grub/disk.h (grub_print_partinfo): Removed.
5515
5516 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
5517 (normal_mod_SOURCES): Likewise.
5518 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5519 (normal_mod_SOURCES): Likewise.
5520
5521 * commands/ls.c (grub_ls_list_disks): Use
5522 grub_normal_print_device_info instead of grub_print_partinfo. Free
5523 PNAME.
5524 (grub_ls_list_files): Use grub_normal_print_device_info instead of
5525 duplicating the code.
5526
0bd41162 55272005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
5528
5529 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
5530 follow GCS more precisely.
5531 * commands/i386/pc/vbe_test.c: Likewise.
5532 * include/grub/i386/pc/vbe.h: Likewise.
5533 * term/i386/pc/vesafb.c: Likewise.
5534 * video/i386/pc/vbe.c: Likewise.
5535
6323696a 55362005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
5537
5538 * DISTLIST: Added term/i386/pc/vesafb.c
5539 DISTLIST: Added video/i386/pc/vbe.c
5540 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
5541 DISTLIST: Added commands/i386/pc/vbe_test.c.
5542 * commands/i386/pc/vbe_list_modes.c: New file.
5543 * commands/i386/pc/vbe_test.c: Likewise.
5544 * term/i386/pc/vesafb.c: Likewise.
5545 * video/i386/pc/vbe.c: Likewise.
5546 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
5547 (grub_vbe_probe) Added prototype.
5548 (grub_vbe_set_video_mode) Likewise.
5549 (grub_vbe_get_video_mode) Likewise.
5550 (grub_vbe_get_video_mode_info) Likewise.
5551 (grub_vbe_set_pixel_rgb) Likewise.
5552 (grub_vbe_set_pixel_index) Likewise.
5553 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
5554 (pkgdata_MODULES): Added vesafb.mod.
5555 (pkgdata_MODULES): Added vbe_list_modes.mod.
5556 (pkgdata_MODULES): Added vbe_test.mod.
5557 (vbe_mod_SOURCES): Added.
5558 (vbe_mod_CFLAGS): Likewise.
5559 (vesafb_mod_SOURCES): Likewise.
5560 (vesafb_mod_CFLAGS): Likewise.
5561 (vbe_list_modes_mod_SOURCES): Likewise.
5562 (vbe_list_modes_mod_CFLAGS): Likewise.
5563 (vbe_test_mod_SOURCES): Likewise.
5564 (vbe_test_mod_CFLAGS): Likewise.
5565
0a74e62f 55662005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
5567
0a74e62f 5568 * normal/command.c (grub_command_execute): If INTERACTIVE is
5569 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
5570 CMDLINE. Disable the pager if INTERACTIVE is true.
5571 All callers are changed.
5572
5573 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
5574 before reading a config file.
5575 * normal/main.c (read_config_file): Even if a command is not
5576 found, register it if it is within an entry.
5577
5578 * util/grub-emu.c: Include sys/types.h and unistd.h.
5579 (options): Added --hold.
5580 (struct arguments): Added a new member "hold".
5581 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
5582 missing.
5583 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
5584 cleared by a debugger, if it is not zero.
5585
5586 * include/grub/normal.h (grub_command_execute): Add an argument
5587 INTERACTIVE.
5588
e51f85ae 55892005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
5590
5591 * DISTLIST: Added include/grub/i386/pc/vbe.h.
5592
e9c6f39b 55932005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
5594
5595 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
5596 program with another one, because the old one didn't detect a bug
5597 in gcc-3.4. Always use regparm 2, because the new test is still
5598 not enough for gcc-4.0. Someone must investigate a simple test
5599 case which detects a bug in gcc-4.0.
5600
8de3495c 56012005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
5602
5603 * DISTLIST: Added normal/completion.c.
5604
5605 * normal/completion.c: New file.
5606
5607 * term/i386/pc/console.c (grub_console_getwh): New function.
5608 (grub_console_term): Assign grub_console_getwh to getwh.
5609
5610 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
5611 function is defined in normal/completion.c as
5612 grub_normal_do_completion.
5613 (grub_cmdline_get): Use grub_normal_do_completion instead of
5614 grub_tab_complete.
5615
5616 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
5617 returns non-zero, otherwise return 0.
5618 (grub_partition_iterate): First, probe the partition map. Then,
5619 call ITERATE only for this partition map.
5620
5621 * kern/misc.c (grub_strncmp): Rewritten.
5622
5623 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
5624 returns non-zero. Otherwise return 0.
5625
5626 * include/grub/partition.h (grub_partition_map_iterate): Return
5627 int instead of void.
5628
5629 * include/grub/normal.h (grub_normal_do_completion): New prototype.
5630
5631 * include/grub/misc.h (grub_strncmp): Change the type of N to
5632 grub_size_t.
5633
5634 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
5635 of void.
5636
5637 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
5638 unsigned explictly before comparing it with I.
5639
5640 * kern/main.c (grub_env_write_root): Add the attribute unused into
5641 VAR.
5642
5643 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
5644 normal/completion.c.
5645 (normal_mod_SOURCES): Likewise.
5646 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5647 (normal_mod_SOURCES): Likewise.
5648
5649 * normal/command.c (grub_iterate_commands): If ITERATE returns
5650 non-zero, return one immediately.
5651
e85e144b 56522005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
5653
5654 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
5655 * kern/i386/pc/startup.S: Updated Global Descriptor table's
5656 descriptions.
5657 (grub_vbe_get_controller_info): New function.
5658 (grub_vbe_get_mode_info): Likewise.
5659 (grub_vbe_set_mode): Likewise.
5660 (grub_vbe_get_mode): Likewise.
5661 (grub_vbe_set_memory_window): Likewise.
5662 (grub_vbe_get_memory_window): Likewise.
5663 (grub_vbe_set_scanline_length): Likewise.
5664 (grub_vbe_get_scanline_length): Likewise.
5665 (grub_vbe_set_display_start): Likewise.
5666 (grub_vbe_get_display_start): Likewise.
5667 (grub_vbe_set_palette_data): Likewise.
5668 * include/grub/i386/pc/vbe.h: New file.
5669
c46153d2 56702005-08-08 Hollis Blanchard <hollis@penguinppc.org>
5671
5672 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
5673 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
5674 * DISTLIST: Likewise.
5675 * kern/ieee1275/of.c: Moved to ...
5676 * kern/ieee1275/ieee1275.c: ... here.
5677
0cb90c45 56782005-08-08 Hollis Blanchard <hollis@penguinppc.org>
5679
5680 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
5681 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
5682 Pass 0 as `end' parameter to grub_strtoul().
5683
a19fb360 56842005-08-08 Hollis Blanchard <hollis@penguinppc.org>
5685
5686 * include/grub/powerpc/ieee1275/console.h: Do not include
5687 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
5688 ifdef.
5689 (grub_console_cur_color): Remove i386-specific prototype.
5690 (grub_console_real_putchar): Likewise.
5691 (grub_console_checkkey): Likewise.
5692 (grub_console_getkey): Likewise.
5693 (grub_console_getxy): Likewise.
5694 (grub_console_gotoxy): Likewise.
5695 (grub_console_cls): Likewise.
5696 (grub_console_setcursor): Likewise.
5697 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
5698 Include <grub/machine/console.h>.
5699 * term/ieee1275/ofconsole.c: Likewise.
5700
4ac9bd04 57012005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
5702
5703 * Makefile.in (LIBLZO): New variable.
5704
5705 * configure.ac: Check for LZO version 2.
5706
5707 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
5708 lzo/lzo1x.h instead of lzo1x.h.
5709
5710 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
5711 of -llzo.
5712
5713 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
5714 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
5715
5716 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
5717 copying the data from PARTITION to P.
5718
f4917dfd 57192005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
5720
5721 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
5722 negative, unload the module.
5723
5724 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
5725 map is "pc_partition_map" but not "pc".
5726 (usage): Fix the description. The options are --boot-image and
5727 --core-image but not --boot-file or --core-file.
5728 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
5729 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
5730 DEFAULT_DIRECTORY.
5731
5732 * util/i386/pc/grub-install.in: Do not specify --boot-file or
5733 --core-file. Specify INSTALL_DEVICE as an argument.
5734
5735 * util/console.c: Include config.h.
5736 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
5737 [HAVE_NCURSES_H]: Include ncurses.h.
5738 [HAVE_CURSES_H]: Include curses.h.
5739 [!A_NORMAL] (A_NORMAL): Defined as zero.
5740 [!A_STANDOUT] (A_STANDOUT): Likewise.
5741
5742 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
5743 -lncurses.
5744 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
5745
5746 * configure.ac: Check for curses libraries and headers.
5747
5748 * Makefile.in (LIBCURSES): New variable.
5749
5750 * genmk.rb (Script::rule): Set the executable bits.
5751
5752 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
5753 name of the PC partition map is "pc_partition_map" but not "pc".
5754
0e143073 57552005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
5756
5757 * util/i386/pc/grub-install.in (grub_probefs): New variable.
5758 (modules): Likewise.
5759 (usage): Added descriptions for --modules and --grub-probefs.
5760 Handle --modules and --grub-probefs. Save the arguments in MODULES
5761 and GRUB_PROBEFS, respectively.
5762 Auto-detect a filesystem module against GRUBDIR. If the result is
5763 empty and modules are not specified explicitly, abort the
5764 installation. Add the result to MODULES.
5765
5766 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
5767 disk/powerpc/ieee1275/ofdisk.c,
5768 include/grub/powerpc/ieee1275/init.h and
5769 term/powerpc/ieee1275/ofconsole.c.
5770 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
5771 term/ieee1275/ofconsole.c.
5772
5773 * include/grub/powerpc/ieee1275/console.h: Resurrected.
5774
5775 * COPYING: Upgraded to the latest version. Only the address of the
5776 FSF office has changed.
5777
efd6e6d5 57782005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
5779
5780 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
5781 kern/ieee1275.c with kern/ieee1275/of.c.
5782
5783 * kern/ieee1275.c: Moved to ...
5784 * kern/ieee1275/of.c: ... here.
5785
8ceafda2 57862005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
5787
5788 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
5789 readablity.
5790
5791 * config.guess: Updated to the latest version from gnulib.
5792 * config.sub: Likewise.
5793 * install.sh: Likewise.
5794 * mkinstalldirs: Likewise.
5795
5796 * include/grub/console.h: Removed. This file is arch-specific. Do
5797 not put this in include/grub.
5798
5799 * include/grub/i386/pc/console.h: Resurrected.
5800
5801 * util/console.c: Include grub/machine/console.h instead of
5802 grub/console.h.
5803 * util/grub-emu.c: Likewise.
5804
267f6cd9 58052005-08-04 Marco Gerards <metgerards@student.han.nl>
5806
5807 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
5808 hardcoded value.
5809
5810 From Vincent Pelletier <subdino2004@yahoo.fr>
5811 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
5812 Redefined to use grub_getwh.
5813 (grub_term): New member named getwh.
5814 (grub_getwh): New prototype.
5815 * kern/term.c (grub_getwh): New function.
5816 * term/i386/pc/console.c (grub_console_getwh): New function.
5817 (grub_console_term): New member `getwh'.
5818 * term/i386/pc/vga.c (grub_vga_getwh): New function.
5819 (grub_vga_term): New member `getwh'.
0b5abe02 5820 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 5821 grub_ssize_t.
5822 (grub_ofconsole_getw): New function.
5823 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
5824 (grub_ofconsole_term): New field named getwh and new initial
5825 value.
5826
3be7266d 58272005-08-03 Hollis Blanchard <hollis@penguinppc.org>
5828
5829 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
5830 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
5831 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
5832 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
5833 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
5834 of <grub/machine/ieee1275.h>.
5835 * commands/ieee1275/reboot.c: Likewise.
5836 * boot/powerpc/ieee1275/ieee1275.c: Move ...
5837 * kern/ieee1275.c: ... to here. All users updated. Change all
5838 parameter structs to use new type `grub_ieee1275_cell_t'.
5839 * term/powerpc/ieee1275/ofconsole.c: Move ...
5840 * term/ieee1275/ofconsole.c: ... to here. All users updated.
5841 * disk/powerpc/ieee1275/ofdisk.c: Move ...
5842 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
5843 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
5844 to return int.
5845 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
5846 Remove unused prototypes. All users updated.
5847 * include/grub/powerpc/ieee1275/console.h: Removed.
5848 * include/grub/powerpc/ieee1275/ieee1275.h: Define
5849 `grub_ieee1275_cell_t'.
5850 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
5851 Cast comparisons with -1 to the correct type.
5852 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
5853 type to match `grub_ieee1275_entry_fn'.
5854
8b5f3938 58552005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
5856
5857 * DISTLIST: Added util/i386/pc/grub-probefs.c.
5858
5859 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
5860 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
5861 partmap/sun.c.
5862 (grub_probefs_SOURCES): New variable.
5863
5864 * util/i386/pc/grub-probefs.c: New file.
5865
5866 * util/i386/pc/grub-setup.c (main): Call
5867 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
5868 grub_hfs_init and grub_jfs_init to initialize the system. Call
5869 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
5870 grub_pc_partition_map_fini to finish the system.
5871
ea409713 58722005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
5873
5874 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
5875 function.
5876 (grub_multiboot_load_elf32): Likewise.
5877 (grub_multiboot_is_elf64): Likewise.
5878 (grub_multiboot_load_elf64): Likewise.
5879 (grub_multiboot_load_elf): Likewise.
5880 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
5881 an ELF32 or ELF64 file.
5882 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
5883
5884 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
5885 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
5886 NULL before calling FS->LABEL.
5887 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
5888 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
5889 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
5890 before calling FS->LABEL.
5891
141a288b 58922005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
5893
5894 * util/i386/pc/grub-install.in (datadir): New variable.
5895 (libdir): Removed.
5896 (pkgdatadir): New variable.
5897 (pkglibdir): Removed.
5898
0d5f8a54 58992005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
5900
5901 * DISTLIST: Added util/i386/pc/grub-install.in.
5902
5903 * util/i386/pc/grub-install.in: New file.
5904
5905 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
5906 (grub_install_SOURCES): Likewise.
5907
5908 * genmk.rb: Added support for scripts.
5909 (Script): New class.
5910 (scripts): New variable.
5911
5912 * Makefile.in (install-local): Install sbin_SCRIPTS by
5913 INSTALL_SCRIPT.
5914 (uninstall): Remove sbin_SCRIPTS.
5915
5916 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
5917 device, try to get a GRUB device by
5918 grub_util_biosdisk_get_grub_dev.
5919 Free DEST_DEV.
5920
5921 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
5922 description for --device-map.
5923
5f968e1e 59242005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
5925
5926 Change the semantics of variable hooks. They now return strings
5927 instead of error values.
5928
5929 * util/i386/pc/grub-setup.c: Include grub/env.h.
5930 (setup): Use grub_device_set_root instead of grub_env_set.
5931
5932 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
5933 grub_env_get instead of grub_device_set_root and
5934 grub_device_get_root, respectively.
5935
5936 * kern/main.c (grub_env_write_root): New function.
5937 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
5938 grub_env_set instead of grub_device_set_root.
5939
5940 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
5941 many variables.
5942 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
5943 rather than calling ENV->WRITE_HOOK afterwards.
5944 (grub_env_get): Return the result of ENV->READ_HOOK rather than
5945 passing a pointer of a pointer.
5946 (grub_register_variable_hook): Change the types of "read_hook" and
5947 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
5948 respectively.
5949 Allocate the default empty string on the heap, because this string
5950 may be freed later.
5951
5952 * kern/device.c: Include grub/env.h.
5953 (grub_device_set_root): Removed.
5954 (grub_device_get_root): Likewise.
5955 (grub_device_open): Use grub_env_get instead of
5956 grub_device_get_root.
5957
5958 * include/grub/env.h (grub_env_read_hook_t): New type.
5959 (grub_env_write_hook_t): Likewise.
5960 (grub_env_var): Change the types of "read_hook" and "write_hook"
5961 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
5962 (grub_register_variable_hook): Likewise.
5963
5964 * include/grub/device.h (grub_device_set_root): Removed.
5965 (grub_device_set_root): Likewise.
5966
5967 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
5968 make sure that DIRNAME terminates with '/', so that
5969 grub_fat_find_dir will fail if PATH is not a directory.
5970
5971 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
5972 from DIRNAME.
5973 Use the qualifier auto for print_files and print_files_long.
5974 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
5975 as a regular file.
5976 Put a newline only if there is no error.
5977 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
5978 used.
5979
896f0afd 59802005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
5981
5982 * kern/partition.c (grub_partition_probe): Initialize PART to
5983 NULL. Otherwise, when no partition map is registered, this returns
5984 a garbage.
5985
b28b81b2 59862005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
5987
5988 * partmap/apple.c (apple_partition_map_iterate): Check if POS
5989 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
5990 valid.
5991
5f3607e0 59922005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
5993
5994 * commands/ls.c (grub_ls_list_disks): Print the filesystem
5995 information on each device, if it does not have partitions. Print
5996 "Device" instead of "Disk", because this function is not specific
5997 to disk devices.
5998
5999 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
6000 static to ensure that it is put on the memory rather than a
6001 register.
6002
502c87e8 60032005-07-17 Yoshinori Okuji <okuji@enbug.org>
6004
6005 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
6006 (grub_cat_init): Likewise.
6007 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
6008 (options): Likewise.
6009 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
6010 (grub_configfile_init): Likewise.
6011 * font/manager.c (GRUB_MOD_INIT): Likewise.
6012 * commands/help.c (GRUB_MOD_INIT): Likewise.
6013 (grub_help_init): Likewise.
6014 * normal/command.c (grub_command_init): Likewise.
6015 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
6016 * disk/loopback.c (grub_loop_init): Likewise.
6017 (GRUB_MOD_INIT): Likewise.
6018 * commands/ls.c (grub_ls_init): Likewise.
6019 (GRUB_MOD_INIT): Likewise.
6020 (options): Likewise.
6021 * commands/boot.c (grub_boot_init): Likewise.
6022 (GRUB_MOD_INIT): Likewise.
6023 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
6024 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
6025 (GRUB_MOD_INIT): Likewise.
6026 * commands/cmp.c (grub_cmp_init): Likewise.
6027 (GRUB_MOD_INIT): Likewise.
6028
6029 * normal/arg.c: Use <> instead of "" to include header files.
6030 (SHORT_ARG_HELP): New macro.
6031 (SHORT_ARG_USAGE): Likewise.
6032 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
6033 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
6034 descriptions.
6035 (find_short): Check if C is 'h' or 'u' explicitly.
6036 (grub_arg_show_help): Use space characters instead of tabs. Treat
6037 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
6038 are shown with --help and --usage only if they are not used for
6039 the command itself.
6040 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
6041 'h' and 'u'.
6042
6043 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
6044 const into "longarg". Change the type of "shortarg" to int.
6045
f806d18e 60462005-07-17 Yoshinori Okuji <okuji@enbug.org>
6047
6048 * boot/i386/pc/boot.S (boot_drive_check): New label.
6049
6050 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
6051 macro.
6052
6053 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
6054 which do not pass a boot drive correctly. Copied from GRUB Legacy.
6055
e293232b 60562005-07-17 Yoshinori Okuji <okuji@enbug.org>
6057
6058 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
6059 When turning off Gate A20, skip the check and return immediately,
6060 because this is not fatal usually.
6061
ebedfd00 60622005-07-17 Yoshinori Okuji <okuji@enbug.org>
6063
6064 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
6065 be 0x7C00 instead of 0x8000.
6066
6067 * boot/i386/pc/pxeboot.S: Rewritten.
6068
6069 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
6070 EXT_C.
6071 (gate_a20_check_state): Read a byte from 0x108000. Invert the
6072 result.
6073
654fc59f 60742005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
6075
6076 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
6077 robustness. This routine now supports a BIOS call and System
6078 Control Port A to modify the gate A20.
6079
6080 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6081 Increased to 0x440.
6082
09f9923f 60832005-07-12 Hollis Blanchard <hollis@penguinppc.org>
6084
6085 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
6086 device path and resulting ihandle.
6087 (grub_ofdisk_close): dprintf the ihandle being closed.
6088 (grub_ofdisk_read): dprintf function parameters.
6089 * kern/mm.c (grub_mm_init_region): Likewise.
6090 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
6091 (grub_linux_boot): dprintf the Linux entry point, initrd address and
6092 size, and boot arguments.
6093 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
6094 before loading into memory.
6095 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
6096 before loading into memory.
6097
7ef504d8 60982005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
6099
6100 * kern/mm.c: Added much documentation.
6101 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
6102 8, set to 5 instead of 8.
6103
e0f050c2 61042005-07-10 Yoshinori Okuji <okuji@enbug.org>
6105
6106 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
6107
6108 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
6109 (grub_mkdevicemap_SOURCES): New variable.
6110
6111 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
6112 lib/device.c of GRUB Legacy.
6113
7224189a 61142005-07-10 Yoshinori Okuji <okuji@enbug.org>
6115
6116 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
6117 instead of PATH is NULL.
6118
68c864eb 61192005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
6120
6121 * commands/cmp.c (BUFFER_SIZE): New macro.
6122 (grub_cmd_cmp): Close the right file at the right time. Compare
6123 only data just read. Don't report files of different size as
6124 identical. Dynamically allocate buffers. Move variable
6125 declarations at the beginning of function.
6126
e6f3e614 61272005-07-09 Yoshinori Okuji <okuji@enbug.org>
6128
6129 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
6130 reverse.
6131
f8f1559a 61322004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
6133
6134 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
6135 when backspace is pressed at beginning of line.
6136
39c9d41d 61372005-07-03 Yoshinori Okuji <okuji@enbug.org>
6138
6139 * DISTLIST: Added genfslist.sh.
6140
6141 * normal/main.c (fs_module_list): New variable.
6142 (autoload_fs_module): New function.
6143 (read_fs_list): Likewise.
6144 (grub_normal_execute): Call read_fs_list.
6145
6146 * kern/fs.c (grub_fs_autoload_hook): New variable.
6147 (grub_fs_probe): Added support for auto-loading.
6148
6149 * include/grub/normal.h (struct grub_fs_module_list): New struct.
6150 (grub_fs_module_list_t): New type.
6151
6152 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
6153 (grub_fs_autoload_hook): New prototype.
6154
6155 * genfslist.sh: New file.
6156
6157 * genmk.rb: Added a rule to generate a filesystem list.
6158
121c1d83 61592005-06-30 Marco Gerards <metgerards@student.han.nl>
6160
6161 * configure.ac: Fix the test for cross-compiling.
6162
6163 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
6164 define GRUB_UTIL anymore.
6165
6166 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
6167 so this function works on other systems than just big endian.
6168 (load_modules): Likewise.
6169 (add_segments): Likewise.
6170
e75d76e1 61712005-06-23 Hollis Blanchard <hollis@penguinppc.org>
6172
6173 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
6174 contains `l' modifier, get a long from va_arg().
6175
50b5a0a7 61762005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
6177
6178 * kern/mm.c (grub_free): If the next free block which is being
6179 merged is the first free block, set the first block to the block
6180 being freed.
6181 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
6182
89371b20 61832005-05-08 Hollis Blanchard <hollis@penguinppc.org>
6184
6185 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
6186 `grub_ieee1275_chosen'.
6187
168d6e58 61882005-05-08 Hollis Blanchard <hollis@penguinppc.org>
6189
6190 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
6191 (grub_ieee1275_chosen): New variable.
6192 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
6193 `chosen'.
6194 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
6195 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
6196 Rename first argument to `phandle' for consistency.
6197 (grub_ieee1275_get_property_length): Likewise.
6198 (grub_ieee1275_next_property): Likewise. Change type of first argument
6199 to grub_ieee1275_phandle_t.
6200 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
6201 Move export next to declaration.
6202 (grub_ieee1275_chosen): New variable.
6203 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
6204 Correct cosmetic typo.
6205 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
6206 `grub_ieee1275_chosen'.
6207 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
6208 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
6209 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
6210 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
6211 `grub_ieee1275_chosen'.
6212
ca5baa3f 62132005-05-10 Hollis Blanchard <hollis@penguinppc.org>
6214
6215 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
6216 /chosen/bootargs.
6217 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
6218 /chosen/bootargs as "variable=value" pairs.
6219
708b345f 62202005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
6221
6222 * include/grub/misc.h (grub_dprintf): New macro.
6223 (grub_real_dprintf): New prototype.
6224 (grub_strword): Likewise.
6225 (grub_iswordseparator): Likewise.
6226 * kern/misc.c (grub_real_dprintf): New function.
6227 (grub_strword): Likewise.
6228 (grub_iswordseparator): Likewise.
6229
f4c5e67c 62302005-04-30 Hollis Blanchard <hollis@penguinppc.org>
6231
6232 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
6233 (roundup): Remove macro.
6234 (grub_ieee1275_flags): Make static.
6235 (grub_ieee1275_realmode): Remove.
6236 (grub_ieee1275_test_flag): New function.
6237 (grub_ieee1275_set_flag): Likewise.
6238 (find_options): Rename to `grub_ieee1275_find_options'; update
6239 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
6240 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
6241 (cmain): New prototype.
6242 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
6243 `grub_ieee1275_flags' directly.
6244 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
6245 machine/biosdisk.h.
6246 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
6247 Don't include grub/machine/init.h.
6248 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
6249 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
6250 Remove prototype.
6251 (grub_ieee1275_realmode): Likewise.
6252 (grub_ieee1275_flag): New enum.
6253 (grub_ieee1275_test_flag): New prototype.
6254 (grub_ieee1275_set_flag): New prototype.
6255 * include/grub/powerpc/ieee1275/init.h: Remove file.
6256 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
6257 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
6258 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
6259 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
6260 comment.
6261 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
6262 `grub_ieee1275_test_flag'.
6263 (grub_ieee1275_encode_devname): Likewise.
6264
ed16607e 62652005-04-21 Hollis Blanchard <hollis@penguinppc.org>
6266
6267 * include/grub/powerpc/ieee1275/ieee1275.h
6268 (grub_ieee1275_encode_devname): New prototype.
6269 (grub_ieee1275_get_filename): Likewise.
6270 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
6271 function.
6272 (grub_set_prefix): Likewise.
6273 (grub_machine_init): Call grub_set_prefix.
6274 * kern/powerpc/ieee1275/openfw.c: Fix typos.
6275 (grub_parse_type): New enum.
6276 (grub_ieee1275_get_devargs): New function.
6277 (grub_ieee1275_get_devname): Likewise.
6278 (grub_ieee1275_parse_args): Likewise.
6279 (grub_ieee1275_get_filename): Likewise.
6280 (grub_ieee1275_encode_devname): Likewise.
6281
be369920 62822005-03-30 Marco Gerards <metgerards@student.han.nl>
6283
6284 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
6285 `grub_loader_unset'.
6286
a5ce3a4a 62872005-03-26 Hollis Blanchard <hollis@penguinppc.org>
6288
6289 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
6290 instead of grub_ieee1275_interpret.
6291 (grub_halt_init): New function.
6292 (grub_halt_fini): Likewise.
6293 (GRUB_MOD_INIT): Correct message grammar.
6294 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
6295 instead of grub_ieee1275_interpret.
6296 (grub_reboot_init): New function.
6297 (grub_reboot_fini): Likewise.
6298 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
6299 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
6300 util/i386/pc/misc.c with commands/ieee1275/halt.c,
6301 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
6302 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
6303 function.
6304 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
6305 Add prototype.
6306 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
6307 prototype.
6308 (grub_halt): Likewise.
6309 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
6310 (cmain): Remove __attribute__((unused)).
6311 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
6312 (grub_heap_len): Likewise.
6313 (grub_machine_fini): New function.
6314 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
6315 (grub_halt): Likewise.
6316 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
6317 function.
6318 * util/powerpc/ieee1275/misc.c: New file.
6319
0058f771 63202005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
6321
6322 * DISTLIST: New file.
6323 * gendistlist.sh: Likewise.
6324
6325 * Makefile.in (COMMON_DISTFILES): Removed.
6326 (BOOT_DISTFILES): Likewise.
6327 (CONF_DISTFILES): Likewise.
6328 (DISK_DISTFILES): Likewise.
6329 (FS_DISTFILES): Likewise.
6330 (INCLUDE_DISTFILES): Likewise.
6331 (KERN_DISTFILES): Likewise.
6332 (LOADER_DISTFILES): Likewise.
6333 (TERM_DISTFILES): Likewise.
6334 (UTIL_DISTFILES): Likewise.
6335 (DISTFILES): Likewise.
6336 (uninstall): Uninstall files in $(pkgdata_DATA).
6337 (DISTLIST): New target.
6338 (distdir): Use the contents of the file DISTLIST to get a list of
6339 distributed files.
6340
46b3b8a5 63412005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
6342
6343 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
6344 descriptor. This is ported from GRUB Legacy.
6345
6346 * gencmdlist.sh: Added an extra semicolon to make it work with
6347 old sed versions. Reported by Robert Bihlmeyer
6348 <robbe@orcus.priv.at>.
6349
5822ff87 63502005-03-08 Yoshinori Okuji <okuji@enbug.org>
6351
6352 Automatic loading of commands is supported.
6353
6354 * normal/main.c (read_command_list): New function.
6355 (grub_normal_execute): Call read_command_list.
6356
6357 * normal/command.c (grub_register_command): Return zero or CMD.
6358 Allocate CMD->NAME from the heap.
6359 Initialize CMD->MODULE_NAME to zero.
6360 Find the same name as well. If the same command is found and it is
6361 a dummy command, overwrite members. If it is not a dummy command,
6362 return zero.
6363 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
6364 (grub_command_find): If a dummy command is found, load a module
6365 and retry to find a command only once.
6366
6367 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
6368 make sure that each command is loaded.
6369
6370 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
6371 macro.
6372 (struct grub_command): Remove const from the member `name'.
6373 Add a new member `module_name'.
6374 (grub_register_command): Return grub_command_t.
6375
6376 * commands/help.c (grub_cmd_help): Call grub_command_find to make
6377 sure that each command is loaded.
6378
6379 * genmk.rb (PModule::rule): Specify a module name without the
6380 suffix ".mod" to gencmdlist.sh.
6381
7b1f4b57 63822005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
6383
6384 * gencmdlist.sh: New file.
6385
6386 * genmk.rb (PModule::rule): Generate a rule for a command list.
6387 Clean command.lst.
6388 Generate command.lst from $(COMMANDFILES).
6389
6390 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
6391 (DATA): Added $(pkgdata_DATA).
6392 (install-local): Install files in $(pkgdata_DATA).
6393
062aaf39 63942005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
6395
6396 * term/i386/pc/vga.c (debug_command): Removed.
6397 (GRUB_MOD_INIT): Do not register the command "debug".
6398
6399 From Hollis Blanchard:
6400 * commands/configfile.c: New file.
6401 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6402 commands/configfile.c.
6403 (pkgdata_MODULES): Added configfile.mod.
6404 (configfile_mod_SOURCES): New variable.
6405 (configfile_mod_CFLAGS): Likewise.
6406 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
6407 commands/configfile.c.
6408 (pkgdata_MODULES): Added configfile.mod.
6409 (configfile_mod_SOURCES): New variable.
6410 (configfile_mod_CFLAGS): Likewise.
6411 * util/grub-emu.c (main): Call grub_configfile_init and
6412 grub_configfile_fini.
6413 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
6414 prototype.
6415 [GRUB_UTIL] (grub_configfile_fini): Likewise.
6416
cee01aa6 64172005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
6418
6419 * normal/arg.c (grub_arg_show_help): Do not show the bug report
6420 address.
6421
6422 * commands/help.c (grub_cmd_help): Do not print newlines after
6423 the last command in print_command_help.
6424
93f3a1d8 64252005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
6426
6427 * commands/default.h: New file.
6428 * commands/timeout.h: Likewise.
6429 * normal/context.c: Likewise.
6430
6431 * util/misc.c: Do not include sys/times.h.
6432 Include sys/time.h and grub/machine/time.h.
6433 (grub_get_rtc): Rewritten with gettimeofday.
6434
6435 * util/grub-emu.c (main): Call grub_default_init and
6436 grub_timeout_init before grub_normal_init, and call
6437 grub_timeout_fini and grub_default_fini after grub_main.
6438
6439 * util/console.c (grub_ncurses_checkkey): Return the read
6440 character or -1.
6441
6442 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
6443 timeouts.
6444
6445 * normal/main.c (read_config_file): Push MENU. If this fails,
6446 print an error and wait for a user input.
6447 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
6448 If a menu is empty or an error occurs, pop MENU.
6449 (grub_normal_execute): Pop and free MENU after grub_menu_run
6450 returns.
6451
6452 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
6453
6454 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
6455 include time.h.
6456 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
6457 without GRUB_UTIL.
6458 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
6459 time.h.
6460 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
6461 without GRUB_UTIL.
6462
6463 * include/grub/normal.h (struct grub_menu_list): New struct.
6464 (grub_menu_list_t): New type.
6465 (struct grub_context): New struct.
6466 (grub_context_t): New type.
6467 (grub_register_command): Got rid of EXPORT_FUNC.
6468 (grub_unregister_command): Likewise.
6469 (grub_context_get): New prototype.
6470 (grub_context_get_current_menu): Likewise.
6471 (grub_context_push_menu): Likewise.
6472 (grub_context_pop_menu): Likewise.
6473 [GRUB_UTIL] (grub_default_init): Likewise.
6474 [GRUB_UTIL] (grub_default_fini): Likewise.
6475 [GRUB_UTIL] (grub_timeout_init): Likewise.
6476 [GRUB_UTIL] (grub_timeout_fini): Likewise.
6477
6478 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
6479 commands/timeout.c and normal/context.c.
6480 (pkgdata_MODULES): Added default.mod and timeout.mod.
6481 (normal_mod_SOURCES): Added normal/context.c.
6482 (default_mod_SOURCES): New variable.
6483 (default_mod_CFLAGS): Likewise.
6484 (timeout_mod_SOURCES): Likewise.
6485 (timeout_mod_CFLAGS): Likewise.
6486 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
6487 conf/i386-pc.rmk.
6488 (pkgdata_MODULES): Added default.mod and timeout.mod.
6489 (normal_mod_SOURCES): Added normal/context.c.
6490 (default_mod_SOURCES): New variable.
6491 (default_mod_CFLAGS): Likewise.
6492 (timeout_mod_SOURCES): Likewise.
6493 (timeout_mod_CFLAGS): Likewise.
6494
6495 * Makefile.in (all-local): Added $(MKFILES).
6496
4ed2e1dd 64972005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
6498
6499 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
6500 (grub_emu_SOURCES): Likewise.
6501 (pkgdata_MODULES): Add `sun.mod'.
6502 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
6503 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6504 `partmap/sun.c'.
6505 (pkgdata_MODULES): Add `sun.mod'.
6506 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
6507 * include/grub/partition.h (grub_sun_partition_map_init): New
6508 prototype.
6509 (grub_sun_partition_map_fini): Likewise.
6510 * partmap/sun.c: New file.
6511 * util/grub-emu.c (main): Initialize and de-initialize the sun
6512 partitionmap support.
6513
4d4e372e 65142005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
6515
6516 This implements an Emacs-like menu entry editor.
6517
6518 * normal/menu_entry.c: New file.
6519
6520 * util/console.c (grub_ncurses_putchar): Translate some Unicode
6521 characters to ASCII.
6522 (saved_char): New variable.
6523 (grub_ncurses_checkkey): Rewritten completely.
6524 (grub_ncurses_getkey): Likewise.
6525 (grub_ncurses_init): Call raw instead of cbreak.
6526
6527 * normal/menu.c (print_entry): Do not put a space.
6528 (init_page): Renamed to ...
6529 (grub_menu_init_page): ... this. All callers changed.
6530 (edit_menu_entry): Removed.
6531 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
6532
6533 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
6534
6535 * kern/misc.c (grub_vprintf): Call grub_refresh.
6536
6537 * normal/menu.c (DISP_LEFT): Renamed to ...
6538 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
6539 * normal/menu.c (DISP_UP): Renamed to ...
6540 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
6541 * normal/menu.c (DISP_RIGHT): Renamed to ...
6542 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
6543 * normal/menu.c (DISP_DOWN): Renamed to ...
6544 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
6545 * normal/menu.c (DISP_HLINE): Renamed to ...
6546 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
6547 * normal/menu.c (DISP_VLINE): Renamed to ...
6548 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
6549 * normal/menu.c (DISP_UL): Renamed to ...
6550 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
6551 * normal/menu.c (DISP_UR): Renamed to ...
6552 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
6553 * normal/menu.c (DISP_LL): Renamed to ...
6554 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
6555 * normal/menu.c (DISP_LR): Renamed to ...
6556 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
6557 * normal/menu.c (TERM_WIDTH): Renamed to ...
6558 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
6559 * normal/menu.c (TERM_HEIGHT): Renamed to ...
6560 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
6561 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
6562 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
6563 * normal/menu.c (TERM_MARGIN): Renamed to ...
6564 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
6565 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
6566 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
6567 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
6568 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
6569 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
6570 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
6571 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
6572 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
6573 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
6574 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
6575 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
6576 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
6577 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
6578 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
6579 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
6580 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
6581 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
6582 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
6583 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
6584 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
6585 All callers changed.
6586
6587 * include/grub/normal.h: New prototype.
6588
6589 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6590 normal/menu_entry.c.
6591 (normal_mod_SOURCES): Likewise.
6592 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6593 (normal_mod_SOURCES): Likewise.
6594
e6b92c8a 65952005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
6596
6597 * include/grub/normal.h (grub_halt_init): New prototype.
6598 (grub_halt_fini): Likewise.
6599 (grub_reboot_init): Likewise.
6600 (grub_reboot_fini): Likewise.
6601
6602 * util/grub-emu.c: Include signal.h.
6603 (main_env): New global variable.
6604 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
6605 catch C-c.
6606 (grub_machine_fini): New function.
6607 (main): Call grub_halt_init and grub_reboot_init before
6608 grub_main, and grub_reboot_fini and grub_halt_fini after it.
6609 Call setjmp with MAIN_ENV to go back afterwards.
6610 Call grub_machine_fini right before return.
6611
6612 * include/grub/util/misc.h: Include setjmp.h.
6613 (main_env): New prototype.
6614
6615 * include/grub/kernel.h (grub_machine_fini): New prototype.
6616 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
6617 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
6618
6619 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
6620 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
6621 * term/i386/pc/console.c (grub_console_fini): Likewise.
6622
6623 * util/i386/pc/misc.c: New file.
6624
6625 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
6626 util/i386/pc/misc.c, commands/i386/pc/halt.c and
6627 commands/i386/pc/reboot.c.
6628
c642636f 66292005-02-14 Guillem Jover <guillem@hadrons.org>
6630
6631 * include/grub/dl.h (grub_dl_check_header): New prototype.
6632 (grub_arch_dl_check_header): Change return type to grub_err_t,
6633 remove size parameter and export function. Update all callers.
6634 * kern/dl.c (grub_dl_check_header): New function.
6635 (grub_dl_load_core): Use `grub_dl_check_header' instead of
6636 `grub_arch_dl_check_header'. Check ELF type. Check if sections
6637 are inside the core.
6638 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
6639 independent ELF header checks.
6640 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
6641 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
6642 `grub_dl_check_header' instead of explicit checks. Check for the
6643 ELF type.
6644 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
6645 `grub_dl_check_header' instead of explicit checks. Remove arch
6646 specific ELF header checks.
6647
e6b92c8a 6648 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
6649 argument SIZE.
6650
5eabe94b 66512005-02-13 Hollis Blanchard <hollis@penguinppc.org>
6652
6653 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
6654 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
6655
1b14a681 66562005-02-12 Hollis Blanchard <hollis@penguinppc.org>
6657
6658 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
6659 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
6660 (part_map_iterate): Clear `grub_errno' and return 0 if
6661 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
6662 * partmap/amiga.c (amiga_partition_map_iterate): Return
6663 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
6664 * partmap/apple.c (apple_partition_map_iterate): Likewise.
6665
aca108aa 66662005-02-01 Guillem Jover <guillem@hadrons.org>
6667
6668 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
6669 help info.
6670
c9f9c556 66712005-01-31 Marco Gerards <metgerards@student.han.nl>
6672
6673 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
6674 Removed prototype.
6675 (grub_rescue_cmd_linux): New prototype.
6676 (grub_rescue_cmd_initrd): Likewise.
6677 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
6678 `bi_rec'.
6679 (grub_linux_release_mem): Release the memory for the initrd.
6680 (grub_load_linux): Renamed from this...
6681 (grub_rescue_cmd_linux): ...To this. Changed all callers.
6682 Changed `entry' not to be static. Loop over memory regions to
6683 find another one when the default fails.
6684 (grub_rescue_cmd_initrd): New function.
6685 (grub_linux_init): Remove function.
6686 (grub_linux_fini): Likewise.
6687 (GRUB_MOD_INIT): Register `initrd'.
6688 (GRUB_MOD_FINI): Unregister `initrd'.
6689 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
6690 Function removed.
6691 (grub_linux_normal_fini): Likewise.
6692 (GRUB_MOD_INIT): Register `initrd'.
6693 (GRUB_MOD_FINI): Unregister `initrd'.
6694
990cf3aa 66952005-01-31 Marco Gerards <metgerards@student.han.nl>
6696
6697 * commands/help.c: New file.
6698 * normal/arg.c (show_help): Renamed to...
6699 (grub_arg_show_help): ... this.
6700 * commands/i386/pc/halt.c: New file.
6701 * commands/i386/pc/reboot.c: Likewise.
6702 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
6703 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
6704 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
6705 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
6706 variables.
6707 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6708 `commands/help.c'.
6709 (pkgdata_MODULES): Add `help.mod'.
6710 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
6711 * grub/i386/pc/init.h (grub_reboot): New prototype.
6712 (grub_halt): Likewise.
6713 * include/grub/normal.h (grub_arg_show_help): New prototype.
6714 (grub_help_init): Likewise.
6715 (grub_help_fini): Likewise.
6716 * util/grub-emu.c (main): Initialize and deinitialize the help
6717 command.
6718
6719 * normal/cmdline.c (grub_cmdline_get): Doc fix.
6720
6721 * normal/command.c (grub_command_init): Fixed the description of
6722 the `set' and `unset' commands.
6723
67242005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 6725
6726 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
6727 function.
6728 * commands/ieee1275/halt.c: New file.
6729 * commands/ieee1275/reboot.c: Likewise.
6730 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
6731 `__attribute__ ((unused))'. Some GCS related fixed.
6732 (grub_suspend_init) [GRUB_UTIL]: Function removed.
6733 (grub_suspend_fini): Likewise.
6734 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
6735 and `halt.mod'.
6736 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
6737 (halt_mod_CFLAGS): New variables.
6738 * include/grub/powerpc/ieee1275/ieee1275.h
6739 (grub_ieee1275_interpret): New prototype.
6740
1ab09cc7 67412005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
6742
6743 * include/grub/misc.h (memmove): New prototype.
6744 (memcpy): Likewise.
6745
8b8cbdb2 67462005-01-22 Hollis Blanchard <hollis@penguinppc.org>
6747
6748 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
6749 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
6750
e3741a27 67512005-01-22 Marco Gerards <metgerards@student.han.nl>
6752
6753 * kern/misc.c (grub_strndup): Function rewritten.
6754
776bd780 67552005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
6756
6757 * normal/menu.c (TERM_WIDTH): Macro redefined.
6758 (TERM_TOP_BORDER_Y): Likewise.
6759 (draw_border): Replaced while-loop by a for-loop. Make the number
6760 of lines consistent with the number of lines displayed in
6761 print_entries. Added a margin below the rectangle.
6762 (print_entry): Make the entry fit in the rectangle.
6763 (print_entries): Display the scroll arrows next to the right
6764 border.
6765
78026bce 67662005-01-21 Marco Gerards <metgerards@student.han.nl>
6767
6768 * fs/minix.c (grub_minix_find_file): Reserve more space for
6769 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
6770 `grub_strncpy' to copy `path' into it.
6771
67bbaf0f 67722005-01-21 Marco Gerards <metgerards@student.han.nl>
6773
6774 Add the loopback device, a device via which files can be accessed
6775 as devices.
6776
6777 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
6778 (pkgdata_MODULES): Add loopback.mod.
6779 (loopback_mod_SOURCES): New variable.
6780 (loopback_mod_CFLAGS): Likewise.
6781 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
6782 `disk/loopback.c'.
6783 (pkgdata_MODULES): Add loopback.mod.
6784 (loopback_mod_SOURCES): New variable.
6785 (loopback_mod_CFLAGS): Likewise.
6786 * disk/loopback.c: new file.
6787 * include/grub/normal.h (grub_loop_init): New prototype.
6788 (grub_loop_fini): New prototype.
6789 * util/grub-emu.c (main): Initialize and de-initialize loopback
6790 support.
6791 * include/grub/disk.h (grub_disk_dev_id): Add
6792 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
6793
6f1c18bd 67942005-01-20 Hollis Blanchard <hollis@penguinppc.org>
6795
6796 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
6797 function.
6798 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
6799 (suspend_mod_SOURCES): New variable.
6800 (suspend_mod_CFLAGS): Likewise.
6801 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
6802 New prototype.
6803 * commands/ieee1275/suspend.c: New file.
6804
b38551da 68052005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
6806
6807 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
6808 ((unused))' to `__attribute__ ((used))'.
6809 (GRUB_MOD_FINI): Likewise.
6810 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
6811 * genmk.rb (PModule): Assign space to common symbols when linking
6812 modules.
6813
777aff39 68142005-01-20 Marco Gerards <metgerards@student.han.nl>
6815
6816 * include/grub/mm.h (grub_mm_init_region): Change the type of the
6817 `unsigned' arguments to `grub_size_t'.
6818 (grub_malloc): Likewise.
6819 (grub_realloc): Likewise.
6820 (grub_memalign): Likewise.
6821 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
6822 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
6823 * util/misc.c (grub_malloc): Likewise.
6824 (grub_realloc): Likewise.
6825 * kern/mm.c (get_header_from_pointer): Change the casts to
6826 `unsigned' into a cast to `grub_size_t'.
6827
6828 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
6829 point to `currnode' when `currnode' is changed.
6830
6831 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
6832 Schottelius <nico-linux@schottelius.org>.
6833
d0ff18e1 68342005-01-09 Hollis Blanchard <hollis@penguinppc.org>
6835
6836 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
6837 (note_path): Remove variable.
6838 (GRUB_IEEE1275_NOTE_NAME): New macro.
6839 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
6840 (grub_ieee1275_note_hdr): New structure.
6841 (grub_ieee1275_note_desc): Likewise.
6842 (grub_ieee1275_note): Likewise.
6843 (load_note): Remove `dir' argument. All callers updated. Remove
6844 `note_img' and `path'. Do not load a file from `note_path'.
6845 Initialize a struct grub_ieee1275_note and write that to `out'.
6846 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
6847
4ca7004c 68482005-01-05 Marco Gerards <metgerards@student.han.nl>
6849
6850 * util/misc.c (grub_util_read_image): Revert last change. It
6851 called `grub_util_read_at', which seeks from the beginning of the
6852 file.
6853
0b412211 68542005-01-04 Hollis Blanchard <hollis@penguinppc.org>
6855
6856 * TODO: Add note about endianness in grub-mkimage.
6857 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
6858 section.
6859 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
6860 (grub_mkimage_SOURCES): New target.
6861 * include/grub/kernel.h (grub_start_addr): Remove variable.
6862 (grub_end_addr): Likewise.
6863 (grub_total_module_size): Likewise.
6864 (grub_kernel_image_size): Likewise.
6865 (GRUB_MODULE_MAGIC): New constant.
6866 (grub_module_info): New structure.
6867 (grub_arch_modules_addr): New prototype.
6868 (grub_get_end_addr): Remove prototype.
6869 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
6870 * include/grub/powerpc/ieee1275/kernel.h: New file.
6871 * include/grub/util/misc.h (grub_util_get_fp_size): New
6872 prototype.
6873 (grub_util_read_at): Likewise.
6874 (grub_util_write_image_at): Likewise.
6875 * kern/main.c (grub_get_end_addr): Remove function.
6876 (grub_load_modules): Call grub_arch_modules_addr instead of using
6877 grub_end_addr. Look for a grub_module_info struct in memory. Use
6878 the grub_module_info fields instead of calling grub_get_end_addr
6879 as loop conditions. Move grub_add_unused_region code here.
6880 (grub_add_unused_region): Remove function.
6881 * kern/i386/pc/init.c: Include grub/cache.h.
6882 (grub_machine_init): Remove call to grub_get_end_addr. Remove
6883 one call to add_mem_region.
6884 (grub_arch_modules_addr): New function.
6885 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
6886 (grub_total_module_size): Likewise.
6887 Include grub/machine/kernel.h.
6888 (grub_arch_modules_addr): New function.
6889 * util/grub-emu.c (grub_end_addr): Remove variable.
6890 (grub_total_module_size): Likewise.
6891 (grub_arch_modules_addr): New function.
6892 * util/misc.c: Include unistd.h.
6893 (grub_util_get_fp_size): New function.
6894 (grub_util_read_at): Likewise.
6895 (grub_util_write_image_at): Likewise.
6896 (grub_util_read_image): Call grub_util_read_at.
6897 (grub_util_write_image): Call grub_util_write_image_at.
6898 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
6899 additional memory in kernel_img for a struct grub_module_info.
6900 Fill in that grub_module_info.
6901 * util/powerpc/ieee1275/grub-mkimage.c: New file.
6902
458786f8 69032005-01-03 Hollis Blanchard <hollis@penguinppc.org>
6904
6905 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
6906 New function.
6907 * include/grub/powerpc/ieee1275/ieee1275.h
6908 (grub_ieee1275_milliseconds): New prototype.
6909 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
6910 Change to 1000.
6911 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
6912 grub_ieee1275_milliseconds.
6913
ac507d1b 69142005-01-03 Hollis Blanchard <hollis@penguinppc.org>
6915
6916 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
6917 variable.
6918 (find_options): New function.
6919 (cmain): Call find_options.
6920 * include/grub/powerpc/ieee1275/ieee1275.h
6921 (grub_ieee1275_realmode): New extern variable.
6922 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
6923 grub_map if grub_ieee1275_realmode is false.
6924
6b8fd1c4 69252004-12-29 Marco Gerards <metgerards@student.han.nl>
6926
6927 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
6928 lines are inserted and make it work like readline. Reported by
6929 Vincent Pelletier <subdino2004@yahoo.fr>.
6930
8514a1e0 69312004-12-28 Marco Gerards <metgerards@student.han.nl>
6932
6933 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
6934
6935 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
6936 `kern/powerpc/cache.S'.
6937
924b6140 69382004-12-27 Marco Gerards <metgerards@student.han.nl>
6939
6940 * genmk.rb: Handle the `Program' class in the main loop. Written
6941 by Johan Rydberg <jrydberg@gnu.org>.
6942 (Program): New class.
6943 (programs): New variable.
6944 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
6945 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
6946 instead of "grub/kernel.h". Include <grub/machine/init.h>.
6947 (help_arch): Function removed.
6948 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
6949 `powerpc/libgcc.h' and `loader.h'.
6950 (pkgdata_PROGRAMS): New variable.
6951 (sbin_UTILITIES): Variable removed.
6952 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
6953 (grubof_SOURCES): Variable re-defined so it only includes the
6954 core functionality.
6955 (grubof_CFLAGS): Remove `-DGRUBOF'.
6956 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
6957 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
6958 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
6959 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
6960 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
6961 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
6962 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
6963 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
6964 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
6965 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
6966 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
6967 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
6968 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
6969 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
6970 (pc_mod_CFLAGS): New variables.
6971 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
6972 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
6973 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
6974 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
6975 Moved from here...
6976 * include/grub/i386/pc/init.h (grub_os_area_addr)
6977 (rub_os_area_size): ... to here.
6978 * include/grub/powerpc/ieee1275/ieee1275.h
6979 (grub_ieee1275_entry_fn): Export symbol.
6980 * include/grub/powerpc/ieee1275/init.h: New file.
6981 * include/grub/powerpc/libgcc.h: Likewise.
6982 * include/grub/cache.h: Likewise.
6983 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
6984 <hollis@penguinppc.org>.
6985 * kern/dl.c: Include <grub/cache.h>.
6986 (grub_dl_flush_cache): New function.
6987 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
6988 for this module.
6989 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
6990 (grub_console_init): Removed prototypes.
6991 (grub_machine_init): Don't initialize the modules anymore.
6992 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
6993 static.
6994 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
6995 Macro undef removed.
6996 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
6997 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
6998 relocation `R_PPC_REL32'. Return an error when the relocation is
6999 unknown.
7000 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
7001 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
7002 * util/misc.c (grub_arch_sync_caches): Likewise.
7003
e4b47e0c 70042004-12-19 Marco Gerards <metgerards@student.han.nl>
7005
7006 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
7007 `symlist.c', add `grubof_symlist.c'.
7008 (symlist.c): Variable removed.
7009 (grubof_HEADERS): Variable added.
7010 (grubof_symlist.c): New target.
7011 (kernel_syms.lst): Use `grubof_HEADERS' instead of
7012 `kernel_img_HEADERS'.
7013 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
7014 * kern/powerpc/dl.c: New file.
7015 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
7016 Function removed.
7017 (grub_arch_dl_relocate_symbols): Likewise.
7018 (grub_register_exported_symbols): Likewise.
7019
4ceb3636 70202004-12-13 Marco Gerards <metgerards@student.han.nl>
7021
7022 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
7023 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
7024 to fail instead. Reported by Vincent Pelletier
7025 <subdino2004@yahoo.fr>.
7026
7027 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
7028 it is not allocated. Reported by Vincent Pelletier
7029 <subdino2004@yahoo.fr>.
7030
7031 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
7032 output so the output looks better.
7033
3f1578fe 70342004-12-04 Marco Gerards <metgerards@student.han.nl>
7035
7036 Modulize the partition map support and add support for the amiga
7037 partition map.
7038
7039 * commands/ls.c: Include <grub/partition.h> instead of
7040 <grub/machine/partition.h>.
7041 * kern/disk.c: Likewise.
7042 * kern/rescue.c: Likewise.
7043 * loader/i386/pc/chainloader.c: Likewise.
7044 * normal/cmdline.c: Likewise.
7045 * kern/powerpc/ieee1275/init.c: Likewise.
7046 (grub_machine_init): Call `grub_pc_partition_map_init',
7047 `grub_amiga_partition_map_init' and
7048 `grub_apple_partition_map_init'.
7049 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
7050 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
7051 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
7052 `partition.h' and `pc_partition.h'.
7053 (grub_setup_SOURCES): Remove
7054 `disk/i386/pc/partition.c'. Add `kern/partition.c',
7055 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
7056 (grub_emu_SOURCES): Likewise.
7057 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
7058 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
7059 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
7060 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
7061 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
7062 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
7063 (grubof_SOURCES): Likewise.
7064 * disk/i386/pc/partition.c: File removed.
7065 * disk/powerpc/ieee1275/partition.c: Likewise.
7066 * include/grub/powerpc/ieee1275/partition.h: Likewise.
7067 * include/grub/i386/pc/partition.h: Likewise.
7068 * kern/partition.c: New file.
7069 * partmap/amiga.c: Likewise.
7070 * partmap/apple.c: Likewise.
7071 * partmap/pc.c: Likewise.
7072 * include/grub/partition.h: Likewise..
7073 * include/grub/pc_partition.h: Likewise.
7074 * util/grub-emu.c: Include <grub/partition.h> instead of
7075 <grub/machine/partition.h>.
7076 (main): Call `grub_pc_partition_map_init',
7077 `grub_amiga_partition_map_init' and
7078 `grub_apple_partition_map_init' and deinitialize afterwards.
7079 * util/i386/pc/biosdisk.c: Include `#include
7080 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
7081 `<grub/machine/partition.h>'.
7082 * util/i386/pc/grub-setup.c: Likewise.
7083 * util/i386/pc/biosdisk.c: Likewise.
7084 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
7085 partition information in case of a PC partition.
7086 * util/i386/pc/grub-setup.c: Include `#include
7087 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
7088 `<grub/machine/partition.h>'.
7089 (setup): Only access the PC specific partition information in case
7090 of a PC partition.
7091
0ef4ced9 70922004-11-17 Hollis Blanchard <hollis@penguinppc.org>
7093
7094 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
7095 (grub_longjmp): Likewise.
7096 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
7097 20.
7098 * normal/powerpc/setjmp.S: New file.
7099 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
7100 `normal/powerpc/setjmp.S'.
7101 (grubof_CFLAGS): Add `-DGRUBOF'.
7102 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
7103 [GRUB_UTIL && !GRUBOF].
7104
19950e29 71052004-11-16 Marco Gerards <metgerards@student.han.nl>
7106
7107 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
7108 property named `name'. Correctly handle the error returned by
7109 `grub_ieee1275_finddevice' if a device can not be opened.
7110
a2fea427 71112004-11-02 Hollis Blanchard <hollis@penguinppc.org>
7112
7113 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
7114 `actual' for negativity.
7115 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
7116 kern/fshelp.c.
7117
41ea0ea3 71182004-11-01 Marco Gerards <metgerards@student.han.nl>
7119
7120 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
7121 (PAGE_OFFSET): New macro.
7122 (CRTC_ADDR_PORT): Likewise.
7123 (CRTC_DATA_PORT): Likewise.
7124 (START_ADDR_HIGH_REGISTER): Likewise.
7125 (START_ADDR_LOW_REGISTER): Likewise.
7126 (GRAPHICS_ADDR_PORT): Likewise.
7127 (GRAPHICS_DATA_PORT): Likewise.
7128 (READ_MAP_REGISTER): Likewise.
7129 (INPUT_STATUS1_REGISTER): Likewise.
7130 (INPUT_STATUS1_VERTR_BIT): Likewise.
7131 (page): New variable.
7132 (wait_vretrace): New function.
7133 (set_read_map): Likewise.
7134 (set_start_address): Likewise.
7135 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
7136 the right page.
7137 (check_vga_mem): Take the page into account.
7138 (write_char): Likewise.
7139 (write_cursor): Likewise.
7140 (scroll_up): Likewise. Copy the page to the page that is not
7141 shown and switch between both pages.
7142 (grub_vga_putchar): Fix off by one error.
7143 (grub_vga_cls): Wait for the vertical retrace. Take the page into
7144 account.
7145
ad0bd20b 71462004-11-01 Marco Gerards <metgerards@student.han.nl>
7147
7148 Add support for iso9660 (including rockridge).
7149
7150 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
7151 (iso9660_mod_SOURCES): New variable.
7152 (iso9660_mod_CFLAGS): Likewise.
7153 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
7154 * include/grub/fs.h (grub_iso9660_init): New prototype.
7155 * util/grub-emu.c (main): Call `grub_iso9660_init'.
7156 * fs/iso9660.c: New file.
7157
7158 * include/grub/misc.h (grub_strncat): New prototype.
7159 * kern/misc.c (grub_strncat): New function.
7160
7161 * fs/hfs.c (grub_hfs_mount): Translate the error
7162 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
7163 * fs/jfs.c (grub_jfs_mount): Likewise.
7164 * fs/ufs.c (grub_ufs_mount): Likewise.
7165
a5477a59 71662004-10-28 Hollis Blanchard <hollis@penguinppc.org>
7167
7168 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
7169 which initialized BAT registers.
7170 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
7171 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
7172 Move from here...
7173 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
7174 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
7175 ... to here.
7176 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
7177 (grub_mapclaim): Likewise.
7178 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
7179 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
7180 hand.
7181
9304c1f8 71822004-10-19 Hollis Blanchard <hollis@penguinppc.org>
7183
7184 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
7185 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
7186 -ffreestanding and -msoft-float.
7187
86f4ae25 71882004-10-15 Hollis Blanchard <hollis@penguinppc.org>
7189
7190 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
7191 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
7192 set in grub_ieee1275_flags.
7193
38912228 71942004-10-14 Hollis Blanchard <hollis@penguinppc.org>
7195
7196 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
7197 prototype.
7198 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
7199 grub_console_init first.
7200 Change the memory range used for grub_ieee1275_claim and
7201 grub_mm_init_region.
7202 Print an error message if the claim fails.
7203 Include <grub/misc.h>.
7204
d1923dc8 72052004-10-13 Hollis Blanchard <hollis@penguinppc.org>
7206
7207 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
7208 Call grub_children_iterate for device nodes of type `scsi',
7209 `ide', or `ata'.
7210 (grub_ofdisk_open): Remove manual device alias resolution.
7211 Fix memory leak when device cannot be opened.
7212 * include/grub/powerpc/ieee1275/ieee1275.h
7213 (grub_children_iterate): New prototype.
7214 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
7215 New function.
7216 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
7217 Return -1 if args.size was -1.
7218
4512e4f3 72192004-10-11 Hollis Blanchard <hollis@penguinppc.org>
7220
7221 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
7222 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
7223 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
7224 Open Firmware's memory for it; claim memory from _start to _end.
7225 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
7226 (_end): New extern.
7227 (_start): Zero BSS from __bss_start to _end.
7228 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
7229 New extern.
7230 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
7231
4d61feb0 72322004-10-11 Hollis Blanchard <hollis@penguinppc.org>
7233
ad0bd20b 7234 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
7235 -1 if args.base was -1.
4d61feb0 7236
026fa2f9 72372004-10-08 Hollis Blanchard <hollis@penguinppc.org>
7238
7239 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
7240 escape sequence instead of a literal ^L. Also call
7241 grub_ofconsole_gotoxy.
7242
9f2220ef 72432004-10-03 Hollis Blanchard <hollis@penguinppc.org>
7244
7245 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
7246 void * arguments to grub_addr_t. All callers updated. Also make
7247 the `result' argument optional.
7248 (grub_ieee1275_release): change void * arguments to grub_addr_t.
7249 All callers updated.
7250
8a572cd7 72512004-09-22 Hollis Blanchard <hollis@penguinppc.org>
7252
7253 * commands/ls.c (grub_ls_list_files): Use the string following the
7254 initial ')', if present, as the filesystem path.
7255 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
7256
7257 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
7258
18aa81f2 72592004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
7260
7261 Make the source code of the menu interface more readable.
7262
7263 * normal/menu.c: Include grub/mm.h.
7264 (TERM_WIDTH): New macro.
7265 (TERM_HEIGHT): Likewise.
7266 (TERM_INFO_HEIGHT): Likewise.
7267 (TERM_MARGIN): Likewise.
7268 (TERM_SCROLL_WIDTH): Likewise.
7269 (TERM_TOP_BORDER_Y): Likewise.
7270 (TERM_LEFT_BORDER_X): Likewise.
7271 (TERM_BORDER_WIDTH): Likewise.
7272 (TERM_MESSAGE_HEIGHT): Likewise.
7273 (TERM_BORDER_HEIGHT): Likewise.
7274 (TERM_NUM_ENTRIES): Likewise.
7275 (TERM_FIRST_ENTRY_Y): Likewise.
7276 (TERM_ENTRY_WIDTH): Likewise.
7277 (TERM_CURSOR_X): Likewise.
7278 (draw_border): Use macros instead of magic numbers.
7279 (print_entry): Likewise.
7280 (print_entries): Likewise.
7281 (run_menu): Likewise. Also, handle the key 'e'.
7282 (run_menu_entry): Ignore empty command lines.
7283 (print_message): Added a new argument EDIT. If EDIT is true,
7284 print a different message.
7285 (init_page): Likewise.
7286 (edit_menu_entry): New function. Not implemented yet.
7287
b47efe30 72882004-09-17 Marco Gerards <metgerards@student.han.nl>
7289
7290 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
7291 can be loaded from normal mode.
7292
7293 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
7294 `multiboot.mod'.
7295 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
7296 (multiboot_mod_CFLAGS): New variables.
7297 * loader/i386/pc/linux_normal.c: New file.
7298 * loader/i386/pc/multiboot_normal.c: Likewise.
7299
7300 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
7301 attribute `unused'.
7302
7303 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
7304 `fdiro' to read the mode information from instead of `diro'.
7305
7306 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
7307 looking up a symlink.
7308
7309 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
7310 macro.
7311 * normal/command.c (grub_command_execute): Don't parse the
7312 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
7313 flags of the command.
7314
7315 * normal/menu.c (grub_menu_run): Fix typo.
7316
da75ac71 73172004-09-14 Hollis Blanchard <hollis@penguinppc.org>
7318
7319 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
7320
7321 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
7322 `y + 1' instead of `y - 1'.
7323
7324 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
7325
062b24c2 73262004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
7327
7328 From Hollis Blanchard <hollis@penguinppc.org>:
7329 * kern/misc.c (memmove): New alias for grub_memmove.
7330 (memcmp): New alias for grub_memcmp.
7331 (memset): New alias for grub_memset.
7332 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
7333 Change "int handle" to "grub_ieee1275_phandle_t handle".
7334 * include/grub/powerpc/ieee1275/ieee1275.h
7335 (grub_ieee1275_get_property): Likewise.
7336
8ddad845 73372004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
7338
7339 Added normal mode command `chainloader' as module chain.mod, which
7340 depends on normal.mod and _chain.mod.
7341
7342 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
7343 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
7344 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
7345 Deleted prototype.
7346 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
7347 but arguments parsing moved to ...
7348 (grub_chainloader_cmd): ... here. New function.
7349 * include/grub/i386/pc/chainloader.h: New file.
7350 * loader/i386/pc/chainloader_normal.c: Likewise.
7351
2c1f4ce3 73522004-09-11 Marco Gerards <metgerards@student.han.nl>
7353
7354 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
7355 (grub_mkimage_LDFLAGS): Likewise.
7356 (grub_emu_SOURCES): Likewise.
7357 (kernel_img_HEADERS): Added fshelp.h.
7358 * fs/ext2.c: Include <grub/fshelp.h>.
7359 (FILETYPE_REG): New macro.
7360 (FILETYPE_INO_REG): Likewise.
7361 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
7362 Changed all users.
7363 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
7364 all users.
7365 (grub_fshelp_node): New struct.
7366 (grub_ext2_data): Added member `diropen'. Changed member `inode'
7367 to a pointer.
7368 (grub_ext2_get_file_block): Removed function.
7369 (grub_ext2_read_block): New function.
7370 (grub_ext2_read_file): Replaced parameter `data' by `node'.
7371 This function was written.
7372 (grub_ext2_mount): Read the root inode. Create a diropen struct.
7373 (grub_ext2_find_file): Removed function.
7374 (grub_ext2_read_symlink): New function.
7375 (grub_ext2_iterate_dir): Likewise.
7376 (grub_ext2_open): Rewritten.
7377 (grub_ext2_dir): Rewritten.
7378 * include/grub/fshelp.h: New file.
7379 * fs/fshelp.c: Likewise.
7380
3c52136a 73812004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
7382
7383 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
7384 (print_message): Add a missing newline.
7385 (run_menu): Added timeout support.
7386 (run_menu_entry): New local function.
7387 (grub_menu_run): Added support for booting.
7388
7389 * kern/loader.c (grub_loader_is_loaded): New function.
7390
7391 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
7392 (grub_get_rtc): Exported.
7393
7394 * include/grub/i386/pc/time.h: Include grub/symbol.h.
7395 (grub_get_rtc): Exported.
7396
7397 * include/grub/normal.h (struct grub_command_list): Remove
7398 constant from the member `command'.
7399
7400 * include/grub/loader.h (grub_loader_is_loaded): Declared.
7401
7402 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
7403
7404 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
7405
aa033560 74062004-08-28 Marco Gerards <metgerards@student.han.nl>
7407
7408 Add support for the JFS filesystem.
7409
7410 * fs/jfs.c: New file.
7411 * include/grub/fs.h (grub_jfs_init): New prototype.
7412 (grub_jfs_fini): New prototype.
7413 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
7414 (grub_emu_SOURCES): Likewise.
7415 (pkgdata_MODULES): Add jfs.mod.
7416 (jfs_mod_SOURCES): New variable.
7417 (jfs_mod_CFLAGS): Likewise.
7418 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
7419 (grubof_SOURCES): Likewise.
7420 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
7421
7422 * fs/fat.c (grub_fat_find_dir): Convert the filename little
7423 endian to the host endian.
7424 (grub_fat_utf16_to_utf8): Move function from there...
7425 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
7426 the endianess of the source string anymore.
7427 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
7428
94bc45af 74292004-08-24 Marco Gerards <metgerards@student.han.nl>
7430
7431 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
7432 (grub_boot_fini) [GRUB_UTIL]: Likewise.
7433 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
7434 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
7435
7436 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
7437 (grub_hfs_iterate_dir): Make the function static. Add prototypes
7438 for `node_found' and `it_dir'.
7439 (grub_hfs_dir): Add prototype for `dir_hook'.
7440
7441 * fs/minix.c (grub_minix_get_file_block): Add prototype for
7442 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
7443 and `indir32' to silence a gcc warning.
7444
7445 * include/grub/fs.h (grub_hfs_init): New prototype.
7446 (grub_hfs_fini): Likewise.
7447
7448
97543f08 74492004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
7450
7451 Each disk device has its own id now. This is useful to make use
7452 of multiple disk devices.
7453
7454 * include/grub/disk.h (grub_disk_dev_id): New enum.
7455 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
7456 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
7457
7458 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
7459 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
7460
7461 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
7462 GRUB_DISK_DEVICE_OFDISK_ID as an id.
7463
7464 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
7465 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
7466
7467 * include/grub/disk.h (struct grub_disk_dev): Added a new member
7468 "id" which is used by the cache manager.
7469
7470 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
7471 of just "GRUB".
7472
64372eb4 74732004-08-18 Marco Gerards <metgerards@student.han.nl>
7474
7475 * fs/hfs.c: New file.
7476 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
7477 (grub_emu_SOURCES): Likewise.
7478 (pkgdata_MODULES): Add hfs.mod.
7479 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
7480 (grubof_SOURCES): Likewise.
7481 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
7482
7483 * include/grub/misc.h (grub_strncasecmp): Add prototype.
7484 * kern/misc.c (grub_strncasecmp): Add function.
7485
cc61b58f 74862004-08-14 Marco Gerards <metgerards@student.han.nl>
7487
7488 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
7489 with parentheses.
7490
7491 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
7492 (grub_ext2_dir): In case the directory entry type is unknown, read
7493 it from the inode.
7494
0ef123f6 74952004-08-02 Peter Bruin <pjbruin@dds.nl>
7496
7497 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
7498 grub_load_linux instead of grub_rescue_cmd_linux as second
7499 argument of grub_rescue_register_command.
7500
7501 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
7502
a447c5df 75032004-07-27 Marco Gerards <metgerards@student.han.nl>
7504
7505 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
7506 function.
7507 * commands/boot.c: Remove the check for `GRUB_UTIL'.
7508 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
7509 `loader/powerpc/ieee1275/linux.c',
7510 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
7511 * include/grub/powerpc/ieee1275/ieee1275.h
7512 (grub_ieee1275_release): New prototype.
7513 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
7514 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
7515 normal, boot, linux and linux_normal.
7516 * loader/powerpc/ieee1275/linux.c: New file.
7517 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
7518
5a9e3546 75192004-07-12 Marco Gerards <metgerards@student.han.nl>
7520
7521 * normal/arg.c (grub_arg_parse): Correct error handling after
7522 reallocating the argumentlist (check if `argl' is not null instead
7523 of checking if `args' is not null).
7524 * kern/mm.c (grub_realloc): Return the same pointer when using the
7525 same region, instead of returning the header address.
7526
e15199cb 75272004-07-11 Marco Gerards <metgerards@student.han.nl>
7528
7529 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
7530 one block instead of two when looking for the initial partition.
7531 (grub_partition_probe): Initialize the local variable `p' with 0.
7532 Use base 10 for the grub_strtoul call.
7533 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
7534 need for one local variable.
7535 (grub_strtoul): Don't add the new value to `num', instead of that
7536 just assign it.
7537
020616c2 75382004-07-11 Marco Gerards <metgerards@student.han.nl>
7539
7540 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
7541 (pxeboot_img_SOURCES): New variable.
7542 (pxeboot_img_ASFLAGS): Likewise.
7543 (pxeboot_img_LDFLAGS): Likewise.
7544 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
7545 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
7546 <lode_leroy@hotmail.com>.
7547
6c51eb64 75482004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
7549
7550 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
7551 there was no input.
7552
cfb12aff 75532004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
7554
7555 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
7556 the history buffer logic.
7557
6eabba74 75582004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
7559
7560 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
7561 (FILETYPE_INO_SYMLINK): New macros.
7562 (grub_ext2_find_file): Check if the node is a directory using the
7563 inode stat information instead of using the filetype in the
7564 dirent. Exclude the first character of an absolute symlink.
7565 (grub_ext2_dir): Mask out the filetype part of the mode member of
7566 the inode.
7567
66e19ef8 75682004-05-24 Marco Gerards <metgerards@student.han.nl>
7569
7570 Add support for UFS version 1 and 2. Add support for the minix
7571 filesystem version 1 and 2, both the variants with 14 and 30 long
7572 filenames.
7573
7574 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
7575 fs/minix.c.
7576 (grub_emu_SOURCES): Likewise.
7577 (pkgdata_MODULES): Add ufs.mod and minix.mod.
7578 (ufs_mod_SOURCES): New variable.
7579 (ufs_mod_CFLAGS): Likewise.
7580 (minix_mod_SOURCES): Likewise.
7581 (minix_mod_CFLAGS): Likewise.
7582 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
7583 fs/minix.c.
7584 (grubof_SOURCES): Likewise.
7585 * fs/ufs.c: New file.
7586 * fs/minix.c: New file.
7587 * include/grub/fs.h (grub_ufs_init): New prototype.
7588 (grub_ufs_fini): Likewise.
7589 (grub_minix_init): Likewise.
7590 (grub_minix_fini): Likewise.
7591 * util/grub-emu.c (main): Initialize and deinitialize UFS and
7592 minix fs.
7593
cc2e748a 75942004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
7595
7596 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
7597 commands/ls.c, commands/terminal.c, commands/boot.c,
7598 commands/cmp.c and commands/cat.c.
7599 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
7600
7601 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
7602 "env.h"
7603
4b13b216 76042004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
7605
7606 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
7607 and grub_, respectively. Because the conversion is trivial and
7608 mechanical, I omit the details here. Please refer to the CVS
7609 if you need more information.
7610
6a142551 76112004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
7612
7613 * include/pupa: Renamed to ...
7614 * include/grub: ... this.
7615 * util/i386/pc/pupa-mkimage.c: Renamed to ...
7616 * util/i386/pc/grub-mkimage.c: ... this.
7617 * util/i386/pc/pupa-setup.c: Renamed to ...
7618 * util/i386/pc/grub-setup.c: ... this.
7619 * util/pupa-emu.c: Renamed to ...
7620 * util/grub-emu.c: ... this.
7621
e56cdf21 76222004-03-29 Marco Gerards <metgerards@student.han.nl>
7623
7624 Add support for the newworld apple macintosh (PPC). This has been
7625 tested on the powerbook 2000 only. It only adds support for
7626 generic ieee1275 functions, console and disk support. This should
7627 be easy to port to other architectures with support for Open
7628 Firmware.
7629
7630 * configure.ac: Accept the powerpc as host_cpu. In the case of
7631 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
7632 specific tests are only executed while building for the i386.
7633 Inverse test for crosscompile.
7634 * genmk.rb (Utility): Allow assembler files.
7635 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
7636 * conf/powerpc-ieee1275.rmk: New file.
7637 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
7638 * disk/powerpc/ieee1275/partition.c: Likewise.
7639 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
7640 * include/pupa/powerpc/ieee1275/console.h: Likewise.
7641 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
7642 * include/pupa/powerpc/ieee1275/time.h: Likewise.
7643 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
7644 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
7645 * include/pupa/powerpc/ieee1275/loader.h
7646 * include/pupa/powerpc/setjmp.h: Likewise.
7647 * include/pupa/powerpc/types.h: Likewise.
7648 * kern/powerpc/ieee1275/init.c: Likewise.
7649 * kern/powerpc/ieee1275/openfw.c: Likewise.
7650 * term/powerpc/ieee1275/ofconsole.c: Likewise.
7651
7652 These files were written by Johan Rydberg
7653 (jrydberg@night.trouble.net) and I only modified them slightly.
7654
7655 * boot/powerpc/ieee1275/cmain.c: New file.
7656 * boot/powerpc/ieee1275/crt0.S: Likewise.
7657 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
7658 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
7659
8c8cc205 76602004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
7661
7662 * Makefile.in: Update copyright.
7663 * genmodsrc.sh: Likewise.
7664 * gensymlist.sh: Likewise.
7665 * term/i386/pc/vga.c: Indent correctly.
7666
7667 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
7668 bugreporting address.
7669 * util/i386/pc/pupa-setup.c (usage): Likewise,
7670 (main): Call pupa_ext2_init and pupa_ext2_fini.
7671
7672 * fs/fat.c (log2): Renamed to ...
7673 (fat_log2): ... this.
7674 All callers changed.
7675 * kern/misc.c (memcpy): Alias to pupa_memmove.
7676 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
7677 lvalue cast.
7678 * util/console.c (pupa_ncurses_fini): Return 0.
7679
7680 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
7681 Move fail label here.
7682 [__GNU__]: Don't warn when using stat.
7683 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
7684 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
7685 long int. Use strtol instead of strtoul.
7686
db1771cf 76872004-03-14 Marco Gerards <metgerards@student.han.nl>
7688
7689 * commands/boot.c: New file.
7690 * commands/cat.c: Likewise.
7691 * commands/cmp.c: Likewise.
7692 * commands/ls.c: Likewise.
7693 * commands/terminal.c: Likewise.
7694 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
7695 (pupa_register_command): Changed interface to match the new
7696 argument parser.
7697 (pupa_command_execute): Changed (almost rewritten) so it uses
7698 pupa_split_command. Added support for setting variables using the
7699 syntax `foo=bar'.
7700 (rescue_command): Changed to work with the new argument parser.
7701 (terminal_command): Moved from here to commands/terminal.c.
7702 (set_command): New function.
7703 (unset_command): New function.
7704 (insmod_command): New function.
7705 (rmmod_command): New function.
7706 (lsmod_command): New function.
7707 (pupa_command_init): Don't initialize the command terminal
7708 anymore. Initialize the commands set, unset, insmod, rmmod and
7709 lsmod.
7710 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
7711 (kernel_img_HEADERS): Add arg.h and env.h.
7712 (pupa_mkimage_LDFLAGS): Add kern/env.c.
7713 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
7714 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
7715 normal/arg.c.
7716 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
7717 terminal.mod.
7718 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
7719 (boot_mod_SOURCES): New variable.
7720 (terminal_mod_SOURCES): Likewise.
7721 (ls_mod_SOURCES): Likewise.
7722 (cmp_mod_SOURCES): Likewise.
7723 (cat_mod_SOURCES): Likewise.
7724
7725 * normal/arg.c: New file.
7726 * kern/env.c: Likewise.
7727 * include/pupa/arg.h: Likewise.
7728 * include/pupa/env.h: Likewise.
7729 * font/manager.c (font_command): Changed to match argument parsing
7730 interface changes.
7731 (PUPA_MOD_INIT): Likewise.
7732 * hello/hello.c (pupa_cmd_hello): Likewise.
7733 (PUPA_MOD_INIT): Likewise.
7734 * include/pupa/disk.h: Include <pupa/device.h>.
7735 (pupa_print_partinfo): New prototype.
7736 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
7737 (pupa_dl_get_prefix): Likewise.
7738 * include/pupa/misc.h: Include <pupa/err.h>.
7739 (pupa_isgraph): New prototype.
7740 (pupa_isdigit): Likewise.
7741 (pupa_split_cmdline): Likewise.
7742 * include/pupa/normal.h: Include <pupa/arg.h>.
7743 (pupa_command): Changed the prototype of the member `func' to
7744 match the argument parsing interface. Added member `options'.
7745 (pupa_register_command): Updated to match function.
7746 (pupa_arg_parse): New prototype.
7747 (pupa_hello_init) [PUPA_UTIL]: New prototype.
7748 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
7749 (pupa_ls_init) [PUPA_UTIL]: Likewise.
7750 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
7751 (pupa_cat_init) [PUPA_UTIL]: Likewise.
7752 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
7753 (pupa_boot_init) [PUPA_UTIL]: Likewise.
7754 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
7755 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
7756 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
7757 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
7758 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
7759 * kern/disk.c: Include <pupa/file.h>.
7760 (pupa_print_partinfo): New function.
7761 * kern/dl.c: Include <pupa/env.h>.
7762 (pupa_dl_dir): Variable removed.
7763 (pupa_dl_load): Use the environment variable `prefix' instead of
7764 the variable pupa_dl_dir.
7765 (pupa_dl_set_prefix): Function removed.
7766 (pupa_dl_get_prefix): Likewise.
7767 * kern/i386/pc/init.c: Include <pupa/env.h>.
7768 (pupa_machine_init): Use the environment variable `prefix' instead of
7769 using pupa_dl_set_prefix to set the prefix.
7770 * kern/main.c: Include <pupa/env.h>.
7771 (pupa_set_root_dev): Use the environment variable `prefix' instead of
7772 using pupa_dl_get_prefix to get the prefix.
7773 * kern/misc.c: Include <pupa/env.h>.
7774 (pupa_isdigit): New function.
7775 (pupa_isgraph): Likewise.
7776 (pupa_ftoa): Likewise.
7777 (pupa_vsprintf): Added support for printing values of the type
7778 `double'. Make it possible to format variable output when using
7779 formatting like `%1.2%f'.
7780 (pupa_split_cmdline): New function.
7781 * kern/rescue.c: Include <pupa/env.h>.
7782 (next_word): Removed function.
7783 (pupa_rescue_cmd_prefix): Likewise.
7784 (pupa_rescue_cmd_set): New function.
7785 (pupa_rescue_cmd_unset): New function.
7786 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
7787 split the command line instead of splitting it here. Added
7788 support for setting variables using the syntax `foo=bar'. Don't
7789 initialize the prefix command anymore. Initialized the set and
7790 unset commands.
7791 * normal/cmdline.c: Include <pupa/env.h>.
7792 (pupa_tab_complete): Added prototypes for print_simple_completion,
7793 print_partition_completion, add_completion, iterate_commands,
7794 iterate_dev, iterate_part and iterate_dir. Moved code to print
7795 partition information from here to kern/disk.c.
7796 (pupa_cmdline_run): Don't check if the funtion exists anymore.
7797 * normal/main.c: Include <pupa/env.h>.
7798 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
7799 instead of using pupa_dl_get_prefix to get the prefix.
7800 * term/i386/pc/vga.c: Include <pupa/arg.h>.
7801 (check_vga_mem): Cast pointers to `void *' to silence a gcc
7802 warning.
7803 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
7804 (pupa_vga_setcolor): Declare unused variables with `__attribute__
7805 ((unused))' to silence a gcc warning.
7806 (pupa_vga_setcolor): Likewise.
7807 (debug_command): Changed to match argument parsing
7808 interface changes.
7809 * util/pupa-emu.c: Include <pupa/env.h>.
7810 (options): Added 0's for unused fields to silence a gcc warning.
7811 (argp): Likewise.
7812 (main): Use the environment variable `prefix' instead of using
7813 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
7814 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
7815 and terminal.
7816
7817 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
7818 * util/misc.c: Include <malloc.h>.
7819 (pupa_malloc): Rewritten so errors are correctly reported.
7820 (pupa_realloc): Likewise.
7821 (pupa_memalign): Likewise.
7822 (pupa_mm_init_region): Declare unused variables with
7823 `__attribute__ ((unused))' to silence a gcc warning.
7824 * normal/i386/setjmp.S: Remove tab at the end of the file to
7825 silence a gcc warning.
7826 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
7827 variables with `__attribute__ ((unused))' to silence a gcc
7828 warning.
7829 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
7830 local variable i unsigned to silence a gcc warning.
7831
7832 * kern/term.c: Include <pupa/misc.h>.
7833 (pupa_more_lines): New variable.
7834 (pupa_more): Likewise.
7835 (pupa_putcode): When the pager is active pause at the end of every
7836 screen.
7837 (pupa_set_more): New function.
7838 * include/pupa/term.h (pupa_set_more): New prototype.
7839
7840
3b1139cb 78412004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
7842
7843 Now this project is GRUB 2 rather than PUPA. The location of
7844 the CVS repository was moved to GRUB's.
7845
7846 * configure.ac: Use bug-grub as the reporting address.
7847 Use GRUB instead of PUPA.
7848 Change the version number to 1.90.
7849
8367695c 78502004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
7851
7852 * genkernsyms.sh: Updated copyright information.
7853 * genmk.rb: Likewise.
7854 * genmodsrc.sh: Likewise.
7855 * gensymlist.sh: Likewise.
7856 * boot/i386/pc/boot.S: Likewise.
7857 * boot/i386/pc/diskboot.S: Likewise.
7858 * disk/i386/pc/biosdisk.c: Likewise.
7859 * disk/i386/pc/partition.c: Likewise.
7860 * font/manager.c: Likewise.
7861 * fs/ext2.c: Likewise.
7862 * fs/fat.c: Likewise.
7863 * include/pupa/boot.h: Likewise.
7864 * include/pupa/device.h: Likewise.
7865 * include/pupa/disk.h: Likewise.
7866 * include/pupa/dl.h: Likewise.
7867 * include/pupa/elf.h: Likewise.
7868 * include/pupa/err.h: Likewise.
7869 * include/pupa/file.h: Likewise.
7870 * include/pupa/font.h: Likewise.
7871 * include/pupa/fs.h: Likewise.
7872 * include/pupa/kernel.h: Likewise.
7873 * include/pupa/loader.h: Likewise.
7874 * include/pupa/misc.h: Likewise.
7875 * include/pupa/mm.h: Likewise.
7876 * include/pupa/net.h: Likewise.
7877 * include/pupa/normal.h: Likewise.
7878 * include/pupa/rescue.h: Likewise.
7879 * include/pupa/setjmp.h: Likewise.
7880 * include/pupa/symbol.h: Likewise.
7881 * include/pupa/term.h: Likewise.
7882 * include/pupa/types.h: Likewise.
7883 * include/pupa/i386/setjmp.h: Likewise.
7884 * include/pupa/i386/types.h: Likewise.
7885 * include/pupa/i386/pc/biosdisk.h: Likewise.
7886 * include/pupa/i386/pc/boot.h: Likewise.
7887 * include/pupa/i386/pc/console.h: Likewise.
7888 * include/pupa/i386/pc/init.h: Likewise.
7889 * include/pupa/i386/pc/kernel.h: Likewise.
7890 * include/pupa/i386/pc/linux.h: Likewise.
7891 * include/pupa/i386/pc/loader.h: Likewise.
7892 * include/pupa/i386/pc/memory.h: Likewise.
7893 * include/pupa/i386/pc/multiboot.h: Likewise.
7894 * include/pupa/i386/pc/partition.h: Likewise.
7895 * include/pupa/i386/pc/time.h: Likewise.
7896 * include/pupa/i386/pc/vga.h: Likewise.
7897 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
7898 * include/pupa/util/getroot.h: Likewise.
7899 * include/pupa/util/misc.h: Likewise.
7900 * include/pupa/util/resolve.h: Likewise.
7901 * kern/device.c: Likewise.
7902 * kern/disk.c: Likewise.
7903 * kern/dl.c: Likewise.
7904 * kern/err.c: Likewise.
7905 * kern/file.c: Likewise.
7906 * kern/fs.c: Likewise.
7907 * kern/loader.c: Likewise.
7908 * kern/main.c: Likewise.
7909 * kern/misc.c: Likewise.
7910 * kern/mm.c: Likewise.
7911 * kern/rescue.c: Likewise.
7912 * kern/term.c: Likewise.
7913 * kern/i386/dl.c: Likewise.
7914 * kern/i386/pc/init.c: Likewise.
7915 * kern/i386/pc/lzo1x.S: Likewise.
7916 * kern/i386/pc/startup.S: Likewise.
7917 * loader/i386/pc/chainloader.c: Likewise.
7918 * loader/i386/pc/linux.c: Likewise.
7919 * loader/i386/pc/multiboot.c: Likewise.
7920 * normal/cmdline.c: Likewise.
7921 * normal/command.c: Likewise.
7922 * normal/main.c: Likewise.
7923 * normal/menu.c: Likewise.
7924 * normal/i386/setjmp.S: Likewise.
7925 * term/i386/pc/console.c: Likewise.
7926 * term/i386/pc/vga.c: Likewise.
7927 * util/console.c: Likewise.
7928 * util/genmoddep.c: Likewise.
7929 * util/misc.c: Likewise.
7930 * util/pupa-emu.c: Likewise.
7931 * util/resolve.c: Likewise.
7932 * util/unifont2pff.rb: Likewise.
7933 * util/i386/pc/biosdisk.c: Likewise.
7934 * util/i386/pc/getroot.c: Likewise.
7935 * util/i386/pc/pupa-mkimage.c: Likewise.
7936 * util/i386/pc/pupa-setup.c: Likewise.
7937
e6eced71 79382004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
7939
7940 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
7941 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
7942 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
7943 reading and reset it after reading.
7944 (pupa_ext2_close): Return PUPA_ERR_NONE.
7945
7946 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
7947 Correct value.
7948 (struct linux_kernel_header): Add kernel_version and
7949 initrd_addr_max.
7950 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
7951 pupa_file_read succeeds.
7952 (pupa_rescue_cmd_initrd): Implement.
7953
5aded270 79542003-12-03 Marco Gerards <metgerards@student.han.nl>
7955
7956 * fs/ext2.c (pupa_ext2_label): New function.
7957 (pupa_ext2_fs): Added label.
7958 * fs/fat.c (pupa_fat_label): New function.
7959 (pupa_fat_fs): Added label.
7960 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
7961
7962 * kern/misc.c (pupa_strndup): New function.
7963 * include/pupa/misc.h (pupa_strndup): New prototype.
7964
7965 * include/pupa/normal.h: Include <pupa/err.h>.
7966 (pupa_set_history): New prototype.
7967 (pupa_iterate_commands): New prototype.
7968 * normal/cmdline.c: Include <pupa/machine/partition.h>,
7969 <pupa/disk.h>, <pupa/file.h>.
7970 (hist_size): New variable.
7971 (hist_lines): Likewise.
7972 (hist_end): Likewise.
7973 (hist_used): Likewise.
7974 (pupa_set_history): New function.
7975 (pupa_history_get): Likewise.
7976 (pupa_history_add): Likewise.
7977 (pupa_history_replace): Likewise.
7978 (pupa_tab_complete): Likewise.
7979 (pupa_cmdline_run): Added tab completion and history buffer. Tab
7980 completion shows partitionnames while completing partitions, this
7981 feature was suggested by Jeff Bailey.
7982 * normal/command.c (pupa_iterate_commands): New function.
7983 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
7984 (pupa_normal_init): Initialize history buffer.
7985 (PUPA_MOD_INIT): Likewise.
7986 (pupa_normal_fini): Free the history buffer.
7987 (PUPA_MOD_FINI): Likewise.
7988
7989 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
7990 key.
7991
7992 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
7993 * configure.ac [i386]: Check for regparam bug.
7994 (NESTED_FUNC_ATTR) [! i386]: Defined.
7995
1f7315a3 79962003-11-17 Marco Gerards <metgerards@student.han.nl>
7997
7998 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
7999 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
8000 (pupa_emu_SOURCES): New variable.
8001 (pupa_emu_LDFLAGS): Likewise.
8002 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
8003 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
8004 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
8005 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
8006 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
8007 (pupa_jmp_buf): New typedef.
8008 (pupa_setjmp) [PUPA_UTIL]: New macro.
8009 (pupa_longjmp) [PUPA_UTIL]: Likewise.
8010 * include/pupa/term.h (struct pupa_term): New member `refresh'.
8011 (pupa_refresh): New prototype.
8012 * include/pupa/util/getroot.h: New file.
8013 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
8014 it.
8015 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
8016 (pupa_rescue_cmd_cat): Likewise.
8017 (pupa_rescue_cmd_ls): Likewise.
8018 (pupa_rescue_cmd_testload): Likewise.
8019 (pupa_rescue_cmd_lsmod): Likewise.
8020 * normal/cmdline.c (pupa_cmdline_get): Likewise.
8021 * normal/menu.c (run_menu): Likewise.
8022 * kern/term.c (pupa_cls): Likewise.
8023 (pupa_refresh): New function.
8024 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
8025 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
8026 * util/console.c: New file.
8027
8028 * util/i386/pc/getroot.c: New file.
8029 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
8030 (pupa_putchar): New function.
8031 (pupa_refresh): Likewise.
8032 (xgetcwd): Function moved to ...
8033 (strip_extra_slashes): Likewise.
8034 (get_prefix): Likewise.
8035 * util/i386/pc/getroot.c: ... here.
8036 (find_root_device): Function moved and renamed to...
8037 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
8038 Changed all callers.
8039 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
8040 and renamed to...
8041 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
8042 Changed all callers.
8043 * util/misc.c (pupa_memalign): New function.
8044 (pupa_mm_init_region): Likewise.
8045 (pupa_register_exported_symbols): Likewise.
8046 (pupa_putchar): Function removed.
8047 * util/pupa-emu.c: New file.
8048
9a5c1ade 80492003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
8050
8051 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
8052 (_multiboot_mod_SOURCES): New variable.
8053 (_multiboot_mod_CFLAGS): Likewise.
8054 * loader/i386/pc/multiboot.c: New file.
8055 * include/pupa/i386/pc/multiboot.h: Likewise.
8056 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
8057 (pupa_multiboot_real_boot): New function.
8058 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
8059 (pupa_multiboot_real_boot): New prototype.
8060 (pupa_rescue_cmd_multiboot): Likewise
8061 (pupa_rescue_cmd_module): Likewise.
8062
8063 * kern/loader.c (pupa_loader_set): Continue when
8064 pupa_loader_unload_func() fails.
8065 (pupa_loader_unset): New function.
8066 * include/pupa/loader.h (pupa_loader_unset): New prototype.
8067
8068 * kern/misc.c (pupa_stpcpy): New function.
8069 * include/pupa/misc.h (pupa_stpcpy): New prototype.
8070
8e72a9c0 80712003-11-12 Marco Gerards <metgerards@student.han.nl>
8072
8073 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
8074 for available extensions.
8075
8076 * include/pupa/i386/pc/time.h: New file.
8077 * kern/disk.c: Include <pupa/machine/time.h>.
8078 (PUPA_CACHE_TIMEOUT): New macro.
8079 (pupa_last_time): New variable.
8080 (pupa_disk_open): Flush the cache when there was a timeout.
8081 (pupa_disk_close): Reset the timer.
8082 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
8083 pupa_currticks.
8084 * util/misc.c: Include <sys/times.h>
8085 (pupa_get_rtc): New function.
8086
c4adbd32 80872003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
8088
8089 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
8090 as blocks.
8091 (pupa_ext2_get_file_block): Use blocks member.
8092
8093 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
8094 first block. Return -1 instead of pupa_errno on error.
8095
bfd30f06 80962003-10-27 Marco Gerards <metgerards@student.han.nl>
8097
8098 * README: In the pupa-mkimage example use _chain instead of chain
8099 and ext2 instead of fat.
8100 * TODO: Replace ext2fs with jfs as an example. Add an item for
8101 adding journal playback for ext2fs.
8102 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
8103 (pkgdata_MODULES): Added ext2.mod.
8104 (ext2_mod_SOURCES): New variable.
8105 (ext2_mod_CFLAGS): Likewise.
8106 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
8107 * include/pupa/misc.h (pupa_strncpy): New prototype.
8108 (pupa_strcat): Likewise.
8109 (pupa_strncmp): Likewise.
8110 * kern/misc.c (pupa_strcat): Enable function.
8111 (pupa_strncpy): New function.
8112 (pupa_strncmp): Likewise.
8113 * fs/ext2.c: New file.
8114
8115 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
8116 when the read failed before retrying.
8117 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
8118 (_FILE_OFFSET_BITS): Likewise.
8119 * configure.ac: Added AC_SYS_LARGEFILE.
8120
98d15063 81212003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
8122
8123 * genmk.rb (PModule#rule): Make sure to get only symbol names
8124 from the output of nm.
8125 Reported by Robert Millan <zeratul2@wanadoo.es>.
8126
18d9c7cd 81272003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
8128
8129 I forgot to check in these changes for a long time. This adds
8130 incomplete support for VGA console, and this is still very
8131 buggy. Also, a lot of consideration is required for I18N,
8132 UNICODE, and VGA font issues. Therefore, assume that this is
8133 such that "better than nothing".
8134
8135 * font/manager.c: New file.
8136 * include/pupa/font.h: Likewise.
8137 * include/pupa/i386/pc/vga.h: Likewise.
8138 * term/i386/pc/vga.c: Likewise.
8139 * util/unifont2pff.rb: Likewise.
8140
8141 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
8142 (pkgdata_MODULES): Added vga.mod and font.mod.
8143 (vga_mod_SOURCES): New variables.
8144 (vga_mod_CFLAGS): Likewise.
8145 (font_mod_SOURCES): Likewise.
8146 (font_mod_CFLAGS): Likewise.
8147
8148 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
8149
8150 * include/pupa/term.h: Include pupa/err.h.
8151 (struct pupa_term): Added init and fini.
8152 Changed the argument of putchar to pupa_uint32_t.
8153
8154 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
8155 (pupa_console_real_putchar): New prototype.
8156 (pupa_console_putchar): Removed.
8157 (pupa_console_checkkey): Exported.
8158 (pupa_console_getkey): Likewise.
8159
8160 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
8161 characters.
8162
8163 * kern/term.c (pupa_term_set_current): Rewritten.
8164 (pupa_putchar): Likewise.
8165 (pupa_putcode): New function.
8166
8167 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
8168 (pupa_console_real_putchar): ... this.
8169 (pupa_vga_set_mode): New function.
8170 (pupa_vga_get_font): Likewise.
8171
8172 * normal/command.c: Include pupa/term.h.
8173 (terminal_command): New function.
8174 (pupa_command_init): Register the command "terminal".
8175
8176 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
8177 (DISP_UP): Likewise.
8178 (DISP_RIGHT): Likewise.
8179 (DISP_DOWN): Likewise.
8180 (DISP_HLINE): Likewise.
8181 (DISP_VLINE): Likewise.
8182 (DISP_UL): Likewise.
8183 (DISP_UR): Likewise.
8184 (DISP_LL): Likewise.
8185 (DISP_LR): Likewise.
8186
8187 * term/i386/pc/console.c (pupa_console_putchar): New function.
8188
977329f5 81892003-02-08 NIIBE Yutaka <gniibe@m17n.org>
8190
8191 * util/resolve.c (pupa_util_resolve_dependencies): BUG
8192 FIX. Reverse the path_list.
8193
8194 * include/pupa/normal.h: Export pupa_register_command and
8195 pupa_unregister_command.
8196
8197 * hello/hello.c (pupa_cmd_hello): New module.
8198 * conf/i386-pc.rmk: Added hello.mod.
8199
1f5ab428 82002003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
8201
8202 * kern/i386/pc/lzo1x.S: New file.
8203
8204 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
8205 (compress_kernel): New variable.
8206 (generate_image): Heavily modified to support compressing a
8207 large part of the core image.
8208
8209 * util/misc.c (pupa_util_read_image): Fix a file descriptor
8210 leak.
8211 (pupa_util_load_image): New function.
8212
8213 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
8214 (pupa_compressed_size): New variable.
8215 (codestart): Enable Gate A20 here.
8216 Decompress the compressed part of the core image.
8217 Rearrange the code to put functions and variables which are
8218 required for initialization in the non-compressed part.
8219 Include lzo1x.S.
8220
8221 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
8222 here.
8223
8224 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
8225
8226 * include/pupa/i386/pc/kernel.h
8227 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
8228 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
8229 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
8230 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
8231 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
8232
8233 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
8234
8235 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
8236 (Utility#rule): Likewise.
8237
8238 * configure.ac: Check if LZO is available.
8239
ce5bf700 82402003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
8241
8242 * include/pupa/normal.h: New file.
8243 * include/pupa/setjmp.h: Likewise.
8244 * include/pupa/i386/setjmp.h: Likewise.
8245 * normal/cmdline.c: Likewise.
8246 * normal/command.c: Likewise.
8247 * normal/main.c: Likewise.
8248 * normal/menu.c: Likewise.
8249 * normal/i386/setjmp.S: Likewise.
8250
8251 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
8252 (pupa_rescue_cmd_initrd): Likewise.
8253
8254 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
8255 Likewise.
8256
8257 * kern/i386/pc/startup.S (translation_table): New variable.
8258 (translate_keycode): New function.
8259 (pupa_console_getkey): Call translate_keycode.
8260
8261 * kern/rescue.c (attempt_normal_mode): New function.
8262 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
8263 it failed, print a message.
8264
8265 * kern/mm.c (pupa_real_malloc): Print more information when a
8266 free magic is broken.
8267 (pupa_free): If the first free header is not free actually, set
8268 it to P.
8269
8270 * kern/main.c (pupa_load_normal_mode): Just load the module
8271 "normal".
8272 (pupa_main): Don't print the message
8273 "Entering into rescue mode..." here.
8274
8275 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
8276 Declared.
8277 (pupa_rescue_cmd_initrd): Likewise.
8278 (pupa_rescue_cmd_initrd): Likewise.
8279
8280 * include/pupa/symbol.h (FUNCTION): Specify the type.
8281 (VARIABLE): Likewise.
8282
8283 * include/pupa/err.h (pupa_err_t): Added
8284 PUPA_ERR_UNKNOWN_COMMAND.
8285
8286 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
8287 (pupa_dl_get_prefix): Likewise.
8288
8289 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
8290 Added _chain.mod and _linux.mod instead of chain.mod and
8291 linux.mod.
8292 (chain_mod_SOURCES): Renamed to ...
8293 (_chain_mod_SOURCES): ... this.
8294 (chain_mod_CFLAGS): Renamed to ...
8295 (_chain_mod_CFLAGS): ... this.
8296 (linux_mod_SOURCES): Renamed to ...
8297 (_linux_mod_SOURCES): ... this.
8298 (linux_mod_CFLAGS): Renamed to ...
8299 (_linux_mod_CFLAGS): ... this.
8300 (normal_mod_SOURCES): New variable.
8301 (normal_mod_CFLAGS): Likewise.
8302 (normal_mod_ASFLAGS): Likewise.
8303
83042003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
8305
8306 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
8307 possible.
8308
8309 * kern/dl.c (pupa_dl_ref): Refer dependending modules
8310 recursively.
8311 (pupa_dl_unref): Unrefer depending modules recursively.
8312 Don't call pupa_dl_unload implicitly, because PUPA can crash if
8313 a module is unloaded before one depending on that module is
8314 unloaded.
8315 (pupa_dl_unload): Unload depending modules explicitly,
8316 if possible.
8317
c04da074 83182003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
8319
8320 * include/pupa/i386/pc/linux.h: New file.
8321 * loader/i386/pc/linux.c: Likewise.
8322
8323 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
8324 Removed.
8325 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
8326 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
8327 of PUPA_CHAINLOADER_BOOT_SECTOR.
8328
8329 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
8330 (pupa_linux_prot_size): New variable.
8331 (pupa_linux_tmp_addr): Likewise.
8332 (pupa_linux_real_addr): Likewise.
8333 (pupa_linux_boot_zimage): New function.
8334 (pupa_linux_boot_bzimage): Likewise.
8335
8336 * kern/i386/pc/init.c (struct mem_region): New structure.
8337 (MAX_REGIONS): New macro.
8338 (mem_regions): New variable.
8339 (num_regions): Likewise.
8340 (pupa_os_area_addr): Likewise.
8341 (pupa_os_area_size): Likewise.
8342 (pupa_lower_mem): Likewise.
8343 (pupa_upper_mem): Likewise.
8344 (add_mem_region): New function.
8345 (compact_mem_regions): Likewise.
8346 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
8347 the size of the conventional memory and that of so-called upper
8348 memory (before the first memory hole).
8349 Instead of adding each found region to free memory, use
8350 add_mem_region and add them after removing overlaps.
8351 Also, add only 1/4 of the upper memory to free memory. The rest
8352 is used for loading OS images. Maybe this is ad hoc, but this
8353 makes it much easier to relocate OS images when booting.
8354
8355 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
8356 (pupa_enter_rescue_mode): Don't register initrd and module.
8357
8358 * kern/mm.c: Include pupa/dl.h.
8359
8360 * kern/main.c: Include pupa/file.h and pupa/device.h.
8361
8362 * kern/loader.c (pupa_loader_load_module_func): Removed.
8363 (pupa_loader_load_module): Likewise.
8364
8365 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
8366 ``.o''.
8367
8368 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
8369 (pupa_linux_tmp_addr): Likewise.
8370 (pupa_linux_real_addr): Likewise.
8371 (pupa_linux_boot_zimage): Likewise.
8372 (pupa_linux_boot_bzimage): Likewise.
8373
8374 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
8375 (pupa_upper_mem): Likewise.
8376 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
8377 module is too dangerous.
8378
8379 * include/pupa/loader.h (pupa_os_area_addr): Declared.
8380 (pupa_os_area_size): Likewise.
8381 (pupa_loader_set): Remove the first argument. Loader doesn't
8382 manage modules or initrd any longer.
8383 (pupa_loader_load_module): Removed.
8384
8385 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
8386 (linux_mod_SOURCES): New variable.
8387 (linux_mod_CFLAGS): Likewise.
8388
a13f9237 83892003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
8390
8391 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
8392 the length of a blocklist correctly.
8393
8394 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
8395 Use ioctl only if the OS file is a block device.
8396 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
8397 not very useful for normal files.
8398
8399 * kern/main.c (pupa_set_root_dev): New function.
8400 (pupa_load_normal_mode): Likewise.
8401 (pupa_main): Call those above.
8402
8403 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
8404 pupa_uint16_t.
8405
8406 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
8407
a5ffe966 84082003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
8409
8410 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
8411 (setup): Configure the installed partition information and the
8412 dl prefix.
8413
8414 * loader/i386/pc/chainloader.c (my_mod): New variable.
8415 (pupa_chainloader_unload): New function.
8416 (pupa_rescue_cmd_chainloader): Refer itself.
8417 (PUPA_MOD_INIT): Save its own module in MY_MOD.
8418
8419 * kern/i386/pc/startup.S (install_partition): Removed.
8420 (version_string): Likewise.
8421 (config_file): Likewise.
8422 (pupa_install_dos_part): New variable.
8423 (pupa_install_bsd_part): Likewise.
8424 (pupa_prefix): Likewise.
8425 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
8426
8427 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
8428 and pupa/misc.h.
8429 (make_install_device): New function.
8430 (pupa_machine_init): Set the dl prefix.
8431
8432 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
8433 (buf): Renamed to ...
8434 (linebuf): ... this.
8435 (pupa_rescue_cmd_prefix): New function.
8436 (pupa_rescue_cmd_insmod): Likewise.
8437 (pupa_rescue_cmd_rmmod): Likewise.
8438 (pupa_rescue_cmd_lsmod): Likewise.
8439 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
8440 rmmod and lsmod.
8441
8442 * kern/mm.c (pupa_memalign): If failed even after invalidating
8443 disk caches, unload unneeded modules and retry.
8444
8445 * kern/misc.c (pupa_memmove): New function.
8446 (pupa_memcpy): Removed.
8447 (pupa_strcpy): New function.
8448 (pupa_itoa): Made static.
8449
8450 * kern/dl.c (pupa_dl_iterate): New function.
8451 (pupa_dl_ref): Likewise.
8452 (pupa_dl_unref): Likewise.
8453 (pupa_dl_unload): Return if succeeded or not.
8454 (pupa_dl_unload_unneeded): New function.
8455 (pupa_dl_unload_all): Likewise.
8456 (pupa_dl_init): Renamed to ...
8457 (pupa_dl_set_prefix): ... this.
8458 (pupa_dl_get_prefix): New function.
8459
8460 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
8461 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
8462 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
8463 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
8464 (pupa_install_dos_part): Declared.
8465 (pupa_install_bsd_part): Likewise.
8466 (pupa_prefix): Likewise.
8467 (pupa_boot_drive): Likewise.
8468
8469 * include/pupa/types.h: Fix a typo.
8470
8471 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
8472 pupa_memmove.
8473 (pupa_memmove): Declared.
8474 (pupa_strcpy): Likewise.
8475
8476 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
8477 pupa_mod_init takes one argument, its own module.
8478 (pupa_dl_unload_unneeded): Declared.
8479 (pupa_dl_unload_all): Likewise.
8480 (pupa_dl_ref): Likewise.
8481 (pupa_dl_unref): Likewise.
8482 (pupa_dl_iterate): Likewise.
8483 (pupa_dl_init): Renamed to ...
8484 (pupa_dl_set_prefix): ... this.
8485 (pupa_dl_get_prefix): Declared.
8486
8487 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
8488 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
8489 unloaded.
8490 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
8491 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
8492
8493 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
8494 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
8495
012d7999 84962003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
8497
8498 * util/i386/pc/pupa-setup.c (setup): Define the internal
8499 function find_first_partition_start at the top level, because GCC
8500 3.0.x cannot compile internal functions in deeper scopes
8501 correctly.
8502 (find_root_device): Use lstat instead of stat.
8503 Don't follow symbolic links.
8504 Fix the path-constructing code.
8505
8506 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
8507 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
8508 by a BLKGETSIZE ioctl first, because block devices don't fill
8509 the member st_mode of the structure stat on Linux.
8510 [__linux__] (linux_find_partition): Use a temporary buffer
8511 REAL_DEV for the working space. Copy it to DEV before returning.
8512 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
8513 buffer cache consistent.
8514 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
8515 strncmp. The previous value was merely wrong.
8516 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
8517
8518 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
8519 FAT size is 12. The previous value was merely wrong.
8520
8521 * kern/main.c (pupa_main): Don't split the starting message from
8522 newlines.
8523
8524 * kern/term.c (pupa_putchar): Put CR after LF instead of before
8525 LF, because BIOS goes crazy about character attributes in this
8526 case.
8527
1cc73a62 85282003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
8529
8530 * include/i386/pc/util/biosdisk.h: New file.
8531 * util/i386/pc/biosdisk.c: Likewise.
8532 * util/i386/pc/pupa-setup.c: Likewise.
8533
8534 * Makefile.in (INCLUDE_DISTFILES): Added
8535 include/pupa/i386/pc/util/biosdisk.h.
8536 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
8537 directory util/i386/pc.
8538 (install-local): Added a rule for sbin_UTILITIES.
8539 (uninstall): Likewise.
8540
8541 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
8542
8543 * util/misc.c (xrealloc): New function.
8544 (pupa_malloc): Likewise.
8545 (pupa_free): Likewise.
8546 (pupa_realloc): Likewise.
8547 (pupa_stop): Likewise.
8548 (pupa_putchar): Likewise.
8549
8550 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
8551
8552 * include/pupa/util/misc.h (xrealloc): Declared.
8553
8554 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
8555 macro.
8556 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
8557 (PUPA_BOOT_MACHINE_BPB_END): ... this.
8558
8559 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
8560 [PUPA_UTIL] (pupa_fat_fini): Likewise.
8561
8562 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
8563 way should be implemented.
8564 [PUPA_UTIL] (pupa_fat_fini): Likewise.
8565
8566 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
8567 the size of NAME for safety.
8568 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
8569 0x88.
8570
8571 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
8572 (pupa_setup_SOURCES): Likewise.
8573
8574 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
8575
08b70fe8 85762002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
8577
8578 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
8579 bunch of pushl's from pusha, because this destroys the return
8580 value.
8581
62ddcc8f 85822002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
8583
8584 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
8585 This means that any missing prototypes could be fatal. Also, you
8586 must take care when writing assembly code. See the comments at
8587 the beginning of startup.S, for more details.
8588
8589 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
8590 compilation mechanism.
8591 (pupa_chainloader_real_boot): Likewise.
8592 (pupa_biosdisk_rw_int13_extensions): Likewise.
8593 (pupa_biosdisk_rw_standard): Likewise.
8594 (pupa_biosdisk_check_int13_extensions): Likewise.
8595 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
8596 (pupa_biosdisk_get_diskinfo_standard): Likewise.
8597 (pupa_get_memsize): Likewise.
8598 (pupa_get_mmap_entry): Likewise.
8599 (pupa_console_putchar): Likewise.
8600 (pupa_console_setcursor): Likewise.
8601 (pupa_getrtsecs): Use pushl instead of push.
8602
8603 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
8604 memory instead of the stack for a mmap entry, because some
8605 BIOSes may ignore the maximum size and overflow.
8606
8607 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
8608
8609 * genmk.rb (PModule#rule): Compile automatically generated
8610 sources with module-specific CFLAGS as well as other sources.
8611
9962ed99 86122002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
8613
8614 * configure.ac: Check ld.
8615 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
8616 respectively, before checking endianness and sizes.
8617
8618 * Makefile.in (LD): New variable.
8619
abdfc3c5 86202002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
8621
8622 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
8623
6a161fa9 86242002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
8625
8626 * Changelog: New file.
8627