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