1 2006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
3 * configure.ac: Add support for EFI. Fix the typo
4 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
6 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
8 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
9 foreign multibyte characters should be shown correctly.
11 2006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
13 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
15 (read_config_file): Made it to close file before returning.
17 2006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
19 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
20 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
21 video/i386/pc/vbefill.c.
23 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
24 video/i386/pc/vbefill.c.
26 * include/grub/video.h (grub_video_blit_format): New enum.
27 (grub_video_mode_info): Added new member blit_format.
28 (grub_video_get_blit_format): New function prototype.
30 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
32 (grub_video_vbe_map_rgb): Likewise.
33 (grub_video_vbe_unmap_color): Likewise.
35 * include/grub/i386/pc/vbeblit.h: New file.
37 * include/grub/i386/pc/vbefill.h: New file.
39 * video/video.c (grub_video_get_blit_format): New function.
40 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
41 (grub_video_vbe_map_rgb): Likewise.
42 (grub_video_vbe_unmap_color): Likewise.
44 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
46 (grub_video_vbe_blit_render_target): Changed to use more optimized
48 (grub_video_vbe_setup): Added detection for optimized settings.
49 (grub_video_vbe_create_render_target): Likewise.
51 * video/i386/pc/vbeblit.c: New file.
53 * video/i386/pc/vbefill.c: New file.
55 2006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
57 * font/manager.c (grub_font_get_glyph): Removed font fixup from
60 * util/unifont2pff.rb: ... and moved it to here. Improved argument
61 parsing to support both hex and dec ranges. If filename was missing
62 show usage information.
64 2006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
66 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
67 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
69 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
70 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
71 (video_mod_SOURCES): Added.
72 (video_mod_CFLAGS): Likewise.
73 (video_mod_LDFLAGS): Likewise.
74 (gfxterm_mod_SOURCES): Likewise.
75 (gfxterm_mod_CFLAGS): Likewise.
76 (gfxterm_mod_LDFLAGS): Likewise.
77 (videotest_mod_SOURCES): Likewise.
78 (videotest_mod_CFLAGS): Likewise.
79 (videotest_mod_LDFLAGS): Likewise.
80 (vesafb_mod_SOURCES): Removed.
81 (vesafb_mod_CFLAGS): Likewise.
82 (vesafb_mod_LDFLAGS): Likewise.
83 (vga_mod_SOURCES): Likewise.
84 (vga_mod_CFLAGS): Likewise.
85 (vga_mod_LDFLAGS): Likewise.
87 * commands/videotest.c: New file.
89 * font/manager.c (fill_with_default_glyph): Modified to use
91 (grub_font_get_glyph): Likewise.
92 (fontmanager): Renamed from this...
93 (font_manager): ... to this.
95 * include/grub/font.h (grub_font_glyph): Added new structure.
96 (grub_font_get_glyph): Modified to use grub_font_glyph.
98 * include/grub/misc.h (grub_abs): Added as inline function.
100 * include/grub/video.h: New file.
102 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
103 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
104 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
105 (grub_vbe_get_controller_info): Renamed from this...
106 (grub_vbe_bios_get_controller_info): ... to this.
107 (grub_vbe_get_mode_info): Renamed from this...
108 (grub_vbe_bios_get_mode_info): ... to this.
109 (grub_vbe_set_mode): Renamed from this...
110 (grub_vbe_bios_set_mode): ... to this.
111 (grub_vbe_get_mode): Renamed from this...
112 (grub_vbe_bios_get_mode): ... to this.
113 (grub_vbe_set_memory_window): Renamed from this...
114 (grub_vbe_bios_set_memory_window): ... to this.
115 (grub_vbe_get_memory_window): Renamed from this...
116 (grub_vbe_bios_get_memory_window): ... to this.
117 (grub_vbe_set_scanline_length): Renamed from this...
118 (grub_vbe_set_scanline_length): ... to this.
119 (grub_vbe_get_scanline_length): Renamed from this...
120 (grub_vbe_bios_get_scanline_length): ... to this.
121 (grub_vbe_set_display_start): Renamed from this...
122 (grub_vbe_bios_set_display_start): ... to this.
123 (grub_vbe_get_display_start): Renamed from this...
124 (grub_vbe_bios_get_display_start): ... to this.
125 (grub_vbe_set_palette_data): Renamed from this...
126 (grub_vbe_bios_set_palette_data): ... to this.
127 (grub_vbe_set_pixel_rgb): Removed.
128 (grub_vbe_set_pixel_index): Likewise.
130 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
132 (grub_vbe_bios_get_controller_info): ... to this.
133 (grub_vbe_get_mode_info): Renamed from this...
134 (grub_vbe_bios_get_mode_info): ... to this.
135 (grub_vbe_set_mode): Renamed from this...
136 (grub_vbe_bios_set_mode): ... to this.
137 (grub_vbe_get_mode): Renamed from this...
138 (grub_vbe_bios_get_mode): ... to this.
139 (grub_vbe_set_memory_window): Renamed from this...
140 (grub_vbe_bios_set_memory_window): ... to this.
141 (grub_vbe_get_memory_window): Renamed from this...
142 (grub_vbe_bios_get_memory_window): ... to this.
143 (grub_vbe_set_scanline_length): Renamed from this...
144 (grub_vbe_set_scanline_length): ... to this.
145 (grub_vbe_get_scanline_length): Renamed from this...
146 (grub_vbe_bios_get_scanline_length): ... to this.
147 (grub_vbe_set_display_start): Renamed from this...
148 (grub_vbe_bios_set_display_start): ... to this.
149 (grub_vbe_get_display_start): Renamed from this...
150 (grub_vbe_bios_get_display_start): ... to this.
151 (grub_vbe_set_palette_data): Renamed from this...
152 (grub_vbe_bios_set_palette_data): ... to this.
153 (grub_vbe_bios_get_controller_info): Fixed problem with registers
154 getting corrupted after calling it. Added more pushes and pops.
155 (grub_vbe_bios_set_mode): Likewise.
156 (grub_vbe_bios_get_mode): Likewise.
157 (grub_vbe_bios_get_memory_window): Likewise.
158 (grub_vbe_bios_set_scanline_length): Likewise.
159 (grub_vbe_bios_get_scanline_length): Likewise.
160 (grub_vbe_bios_get_display_start): Likewise.
161 (grub_vbe_bios_set_palette_data): Likewise.
163 * normal/cmdline.c (cl_set_pos): Refresh the screen.
164 (cl_insert): Likewise.
165 (cl_delete): Likewise.
167 * term/gfxterm.c: New file.
169 * term/i386/pc/vesafb.c: Removed file.
171 * video/video.c: New file.
173 * video/i386/pc/vbe.c (real2pm): Added new function.
174 (grub_video_vbe_draw_pixel): Likewise.
175 (grub_video_vbe_get_video_ptr): Likewise.
176 (grub_video_vbe_get_pixel): Likewise
177 (grub_video_vbe_init): Likewise.
178 (grub_video_vbe_fini): Likewise.
179 (grub_video_vbe_setup): Likewise.
180 (grub_video_vbe_get_info): Likewise.
181 (grub_video_vbe_set_palette): Likewise.
182 (grub_video_vbe_get_palette): Likewise.
183 (grub_video_vbe_set_viewport): Likewise.
184 (grub_video_vbe_get_viewport): Likewise.
185 (grub_video_vbe_map_color): Likewise.
186 (grub_video_vbe_map_rgb): Likewise.
187 (grub_video_vbe_map_rgba): Likewise.
188 (grub_video_vbe_unmap_color): Likewise.
189 (grub_video_vbe_fill_rect): Likewise.
190 (grub_video_vbe_blit_glyph): Likewise.
191 (grub_video_vbe_blit_bitmap): Likewise.
192 (grub_video_vbe_blit_render_target): Likewise.
193 (grub_video_vbe_scroll): Likewise.
194 (grub_video_vbe_swap_buffers): Likewise.
195 (grub_video_vbe_create_render_target): Likewise.
196 (grub_video_vbe_delete_render_target): Likewise.
197 (grub_video_vbe_set_active_render_target): Likewise.
198 (grub_vbe_set_pixel_rgb): Remove function.
199 (grub_vbe_set_pixel_index): Likewise.
200 (index_color_mode): Remove static variable.
201 (active_mode): Likewise.
202 (framebuffer): Likewise.
203 (bytes_per_scan_line): Likewise.
204 (grub_video_vbe_adapter): Added new static variable.
205 (framebuffer): Likewise.
206 (render_target): Likewise.
207 (initial_mode): Likewise.
208 (mode_in_use): Likewise.
209 (mode_list): Likewise.
211 2006-03-10 Marco Gerards <marco@gnu.org>
213 * configure.ac (AC_INIT): Bumped to 1.93.
215 * DISTLIST: Added `include/grub/hfs.h'.
217 2006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
219 * boot/i386/pc/boot.S (general_error): Before looping, try INT
220 18H, which might help the BIOS falling back to next boot media.
222 2006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
224 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
225 Poe Chen <poe.poechen@gmail.com>.
227 2006-01-17 Marco Gerards <marco@gnu.org>
229 * include/grub/normal.h: Include <grub/script.h>.
230 (grub_command_list): Removed struct.
231 (grub_command_list_t): Removed type.
232 (grub_menu_entry): Remove members `num' and `command_list'. Add
233 members `commands' and `sourcecode'.
234 * include/grub/script.h: Add inclusion guards.
235 (grub_script_cmd_menuentry): New struct.
236 (grub_script_execute_menuentry): New prototype.
237 (grub_script_lexer_record_start): Likewise.
238 (grub_script_lexer_record_stop): Likewise.
239 * normal/execute.c (grub_script_execute_menuentry): New function.
240 * normal/lexer.c (record, recording, recordpos, recordlen): New
242 (grub_script_lexer_record_start): New function.
243 (grub_script_lexer_record_stop): Likewise.
244 (recordchar): Likewise.
245 (nextchar): Likewise.
246 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
247 2048 as the buffer size. Add the tokens `menuentry' and `@'.
248 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
249 (current_menu): New variable.
250 (free_menu): Mainly rewritten.
251 (grub_normal_menu_addentry): New function.
252 (read_config_file): Rewritten.
253 * normal/menu.c (run_menu_entry): Mainly rewritten.
254 * normal/menu_entry.c (make_screen): Rewritten te code to insert
256 (run): Mainly rewritten.
257 * normal/parser.y (menu_entry): New variable.
258 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
259 (menuentry): New rule.
260 (command): Add `menuentry'.
261 (if_statement): Allow additional returns before `fi'.
262 * normal/script.c (grub_script_create_cmdmenu): New function.
264 2006-01-03 Marco Gerards <marco@gnu.org>
266 * INSTALL: GNU Bison is required.
267 * configure.ac: Rewritten the test to detect Bison.
268 * Makefile.in (YACC): New variable. Reported by Xun Sun
269 <xun.sun.cn@gmail.com>.
271 2006-01-03 Marco Gerards <marco@gnu.org>
273 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
274 the HFS+ filesystem to filesystem blocks.
275 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
276 GCC warning is silenced.
278 2006-01-03 Marco Gerards <marco@gnu.org>
280 * partmap/apple.c (apple_partition_map_iterate): Convert the data
281 read from disk from big endian to host byte order.
283 2006-01-03 Hollis Blanchard <hollis@penguinppc.org>
285 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
287 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
288 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
289 embedded HFS+ filesystem.
290 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
291 (grub_hfs_sblock): Move from here...
292 * include/grub/hfs.h: To here... New file.
293 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
295 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
297 (grub_hfsplus_volheader): Change type of member `magic' to
299 (grub_hfsplus_data): Add new member `embedded_offset'.
300 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
302 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
303 Calculate the offset.
305 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
307 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
309 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
311 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
313 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
314 ENV->NAME is NULL after allocating ENV->VALUE.
316 2005-12-25 Marco Gerards <marco@gnu.org>
318 * kern/env.c (grub_env_set): Rewritten the error handling code.
320 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
322 * geninit.sh: Made more robust, and more portable.
324 2005-12-25 Marco Gerards <marco@gnu.org>
326 Add support for Apple HFS+ filesystems.
328 * fs/hfsplus.c: New file.
330 * DISTLIST: Added `fs/hfsplus.c'.
332 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
333 (hfsplus_mod_SOURCES): New variable.
334 (hfsplus_mod_CFLAGS): Likewise.
335 (hfsplus_mod_LDFLAGS): Likewise.
336 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
337 (grub_setup_SOURCES): Likewise.
338 (grub_mkdevicemap_SOURCES): Likewise.
339 (grub_emu_SOURCES): Likewise.
340 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
342 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
344 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
346 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
348 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
349 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
350 include/grub/parser.h, include/grub/script.h, kern/parser.c,
351 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
352 normal/lexer.c, normal/parser.y, normal/script.c, and
354 Removed kern/sparc64/cache.c.
356 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
357 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
360 * configure.ac (AC_INIT): Bumped to 1.92.
362 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
364 * kern/err.c (grub_error_push): Added new function to support error
366 (grub_error_pop): Likewise.
367 (grub_error_stack_items): New local variable to support error stacks.
368 (grub_error_stack_pos): Likewise.
369 (grub_error_stack_assert): Likewise.
370 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
372 (grub_print_error): Added support to print errors from error stack.
374 * include/grub/err.h (grub_error_push): Added function prototype.
375 (grub_error_pop): Likewise.
377 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
379 * configure.ac: Accept `powerpc64' as host_cpu.
380 (amd64): Rename to `biarch32'.
382 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
383 non-cacheline-aligned addresses.
385 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
386 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
387 if `size' is non-zero.
389 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
391 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
392 and `cd' to make sure the filename is not prefixed with a
394 (pkgdata_MODULES): Add `gpt.mod'.
395 (gpt_mod_SOURCES): New variable.
396 (gpt_mod_CFLAGS): Likewise.
397 (gpt_mod_LDFLAGS): Likewise.
399 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
401 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
404 * partmap/gpt.c: New file.
406 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
407 GPT partition map is detected.
409 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
411 * commands/i386/pc/play.c: New file.
412 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
413 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
416 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
418 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
419 ((unused))' to silence gcc warning.
421 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
423 * configure.ac: Correct `AC_PROG_YACC' test.
425 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
427 * util/powerpc/ieee1275/grub-install.in: Run the mount point
428 check before installing files.
430 2005-11-22 Mike Small <smallm@panix.com>
432 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
433 number regex so multidigit numbers are recognized correctly.
435 2005-11-22 Mike Small <smallm@panix.com>
437 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
438 debugging message before attempting to claim memory.
439 (grub_rescue_cmd_initrd): Add a claim debugging message and try
440 multiple addresses in case of failure.
442 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
444 * term/tparm.c (get_space): Remove empty `if' statement.
446 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
448 * kern/parser.c (check_varstate): Rename `state' to 's'.
450 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
452 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
453 variable definitions to the beginning of each function. Sort stack
455 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
456 `buf' argument to `char *'.
458 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
460 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
461 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
462 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
463 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
464 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
465 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
466 configfile.mod, search.mod, gzio.mod and test.mod.
467 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
468 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
469 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
470 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
471 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
472 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
473 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
474 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
475 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
476 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
477 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
478 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
479 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
480 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
481 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
482 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
483 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
484 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
485 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
486 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
487 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
488 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
489 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
491 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
493 (pkgdata_MODULES): Add test.mod.
495 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
497 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
498 appending to variables with "+=".
499 (PModule): Use full pathname to generate *.lst filenames.
501 * Makefile.in: Fixed list rules moved from genmk.rb.
502 (.DELETE_ON_ERROR): New special target.
503 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
505 * conf/i386-pc.rmk: Include conf/common.mk.
506 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
507 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
508 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
509 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
510 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
511 configfile.mod, search.mod, gzio.mod and test.mod.
512 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
513 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
514 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
515 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
516 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
517 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
518 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
519 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
520 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
521 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
522 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
523 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
524 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
525 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
526 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
527 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
528 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
529 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
530 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
531 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
532 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
533 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
534 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
536 * conf/common.rmk: ... to here. New file.
538 * conf/common.mk: New file.
540 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
542 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
543 (grub_script.tab.c): ... here.
545 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
546 (grub_script.tab.c): ... here.
548 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
549 (grub_script.tab.c): ... here.
551 * normal/command.c (grub_command_find): Fixed a memory leak of
552 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
554 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
556 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
557 "@" which marks the start of a comment on ARM.
558 (VARIABLE): Likewise.
560 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
562 Add support for Linux/ADFS partition tables.
564 * partmap/acorn.c: New file.
566 * include/grub/acorn_filecore.h: Likewise.
568 * DISTLIST: Added `partmap/acorn.c' and
569 `include/grub/acorn_filecore.h'.
571 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
573 (pkgdata_MODULES): Add `acorn.mod'.
574 (acorn_mod_SOURCES): New variable.
575 (acorn_mod_CFLAGS): Likewise.
577 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
579 (pkgdata_MODULES): Add `acorn.mod'.
580 (acorn_mod_SOURCES): New variable.
581 (acorn_mod_CFLAGS): Likewise.
583 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
584 (pkgdata_MODULES): Add `acorn.mod'.
585 (acorn_mod_SOURCES): New variable.
586 (acorn_mod_CFLAGS): Likewise.
587 (acorn_mod_LDFLAGS): Likewise.
589 * include/types.h (grub_disk_addr_t): New typedef.
591 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
593 * geninit.sh: New file.
595 * geninitheader.sh: Likewise.
597 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
598 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
599 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
600 * commands/configfile.c (grub_configfile_init)
601 (grub_configfile_fini): Likewise.
602 * commands/default.c (grub_default_init, grub_default_fini):
604 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
605 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
606 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
607 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
609 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
610 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
612 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
613 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
615 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
617 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
619 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
620 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
621 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
622 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
623 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
624 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
625 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
626 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
627 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
628 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
629 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
630 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
631 * partmap/amiga.c (grub_amiga_partition_map_init)
632 (grub_amiga_partition_map_fini): Likewise.
633 * partmap/apple.c (grub_apple_partition_map_init)
634 (grub_apple_partition_map_fini): Likewise.
635 * partmap/pc.c (grub_pc_partition_map_init)
636 (grub_pc_partition_map_fini): Likewise.
637 * partmap/sun.c (grub_sun_partition_map_init,
638 grub_sun_partition_map_fini): Likewise.
639 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
642 * util/grub-emu.c: Include <grub_modules_init.h>.
643 (main): Don't initialize and de-initialize any modules directly,
644 use `grub_init_all' and `grub_fini_all' instead.
646 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
647 `grub_vesafb_mod_init'.
648 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
650 * term/i386/pc/vga.c (grub_vga_init): Renamed to
651 `grub_vga_mod_init'. Updated all users.
652 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
654 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
655 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
658 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
659 Generate a function to initialize the module in utilities.
661 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
662 initialize the module in utilities. Updated all callers.
664 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
666 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
667 escape sequence and a literal ^L to clear the screen.
669 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
670 when returning from Open Firmware.
672 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
674 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
675 (grub_ofconsole_height): Likewise.
676 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
677 manually insert a '\n'.
678 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
679 `grub_ofconsole_height'. Return early if these are already set.
681 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
683 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
684 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
685 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
686 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
687 and `normal/script.c'.
688 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
689 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
690 (test_mod_SOURCES): New variable.
691 (test_mod_CFLAGS): Likewise.
692 (test_mod_LDFLAGS): Likewise.
693 (pkgdata_MODULES): Add `test.mod'.
694 (grub_script.tab.c): New rule.
695 (grub_script.tab.h): Likewise.
697 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
699 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
700 `commands/test.c', `normal/execute.c', `normal/lexer.c',
701 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
702 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
703 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
704 (test_mod_SOURCES): New variable.
705 (test_mod_CFLAGS): Likewise.
706 (pkgdata_MODULES): Add `test.mod'.
707 (grub_script.tab.c): New rule.
708 (grub_script.tab.h): Likewise.
710 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
712 Add initial scripting support.
714 * commands/test.c: New file.
715 * include/grub/script.h: Likewise.
716 * normal/execute.c: Likewise.
717 * normal/function.c: Likewise.
718 * normal/lexer.c: Likewise.
719 * normal/parser.y: Likewise.
720 * normal/script.c: Likewise.
722 * configure.ac: Add `AC_PROG_YACC' test.
724 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
725 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
726 `normal/function.c' and `normal/script.c'.
727 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
728 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
729 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
731 (pkgdata_MODULES): Add `test.mod'.
732 (grub_script.tab.c): New rule.
733 (grub_script.tab.h): Likewise.
735 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
737 * include/grub/normal.h (grub_test_init): New prototype.
738 (grub_test_fini): Likewise.
740 * normal/command.c: Include <grub/script.h>.
741 (grub_command_execute): Rewritten.
743 * util/grub-emu.c (main): Call `grub_test_init' and
746 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
748 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
750 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
751 there are no pending characters.
753 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
755 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
756 `grub_strndup' to drop device arguments. Replace unnecessary
757 `grub_strndup' with `grub_strdup'.
759 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
761 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
762 `debug' environment variable has been set.
764 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
766 * Makefile.in (install-local): Use $(DATA).
767 (uninstall): Likewise.
768 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
769 (sbin_UTILITIES): ... to here.
770 (sbin_SCRIPTS): New variable.
771 (grub_install_SOURCES): New variable.
772 * util/powerpc/ieee1275/grub-install.in: New file.
773 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
775 (add_segments): Call `grub_util_get_path'.
777 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
779 From Timothy Baldwin:
780 * commands/ls.c (grub_ls_list_files): Close FILE with
782 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
784 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
786 * include/grub/parser.h: New file.
788 * kern/parser.c: Likewise.
790 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
791 (grub_setup_SOURCES): Likewise.
792 (grub_probefs_SOURCES): Likewise.
793 (grub_emu_SOURCES): Likewise.
794 (kernel_img_HEADERS): Add `parser.h'.
796 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
797 (grub_emu_SOURCES): Add `kern/parser.c'.
798 (grubof_SOURCES): Likewise.
800 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
801 (grubof_SOURCES): Add `kern/parser.c'.
803 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
805 * kern/misc.c (grub_split_cmdline): Removed function.
807 * kern/rescue.c: Include <grub/parser.h>.
808 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
809 of `grub_split_cmdline'.
811 * normal/command.c: Include <grub/parser.h>.
812 (grub_command_execute): Use `grub_parser_split_cmdline' instead
813 of `grub_split_cmdline'.
815 * normal/completion.c: Include <grub/parser.h>.
816 (cmdline_state): New variable.
817 (iterate_dir): End the filename with a quote depending on the
819 (get_state): new function.
820 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
821 split the arguments and determine the current argument. When the
822 argument string is not quoted, escape all spaces.
824 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
826 * normal/sparc64/setjmp.S: New file.
828 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
830 * include/grub/sparc64/libgcc.h: New file.
831 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
832 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
833 normal/sparc64/setjmp.c.
835 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
837 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
838 * kern/sparc64/cache.S: New file.
839 * kern/sparc64/cache.c: Removed.
840 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
841 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
843 (COMMON_LDFLAGS): Add -melf64_sparc.
844 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
845 (grubof_SOURCES): Use cache.S instead of cache.c.
846 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
847 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
848 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
850 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
851 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
852 (linux_mod_CFLAGS): Commented out.
853 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
854 out because module isn't built.
855 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
856 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
857 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
858 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
859 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
860 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
861 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
862 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
863 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
864 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
865 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
866 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
867 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
868 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
870 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
872 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
873 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
874 longer, because HFS should not be used on PC.
876 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
878 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
879 consistently within the loop.
881 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
883 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
884 directory can not be read.
886 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
888 * configure.ac (AC_INIT): Increase the version number to 1.91.
890 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
891 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
892 term/i386/pc/serial.c.
894 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
896 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
897 file size must be permitted.
899 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
902 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
904 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
906 Call the hook with a NUL-terminated filename.
907 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
910 * kern/term.c (cursor_state): New variable.
911 (grub_term_set_current): Reset the cursor state on a new
913 (grub_setcursor): Rewritten to use CURSOR_STATE.
914 (grub_getcursor): New function.
916 * include/grub/term.h (grub_getcursor): New prototype.
918 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
919 integers on ARM. Reported by Timothy Baldwin
920 <T.E.Baldwin99@members.leeds.ac.uk>.
922 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
924 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
926 (grub_sfs_dir): Likewise.
928 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
930 Add support for the SFS filesystem.
932 * fs/sfs.c: New file.
934 * DISTLIST: Added `fs/sfs.c'.
936 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
937 (grub_probefs_SOURCES): Likewise.
938 (grub_emu_SOURCES): Likewise.
939 (pkgdata_MODULES): Add `sfs.mod'.
940 (sfs_mod_SOURCES): New variable.
941 (sfs_mod_CFLAGS): Likewise.
942 (sfs_mod_LDFLAGS): Likewise.
944 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
945 (pkgdata_MODULES): Add `sfs.mod'.
946 (sfs_mod_SOURCES): New variable.
947 (sfs_mod_CFLAGS): Likewise.
949 * util/grub-emu.c (main): Call `grub_sfs_init' and
952 * include/grub/fs.h (grub_sfs_init): New prototype.
953 (grub_sfs_fini): Likewise.
955 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
957 Add support for the AFFS filesystem.
959 * fs/affs.c: New file.
961 * DISTLIST: Added `fs/affs.c'.
963 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
964 (grub_probefs_SOURCES): Likewise.
965 (grub_emu_SOURCES): Likewise.
966 (pkgdata_MODULES): Add `affs.mod'.
967 (affs_mod_SOURCES): New variable.
968 (affs_mod_CFLAGS): Likewise.
969 (affs_mod_LDFLAGS): Likewise.
971 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
972 (pkgdata_MODULES): Add `affs.mod'.
973 (affs_mod_SOURCES): New variable.
974 (affs_mod_CFLAGS): Likewise.
976 * util/grub-emu.c (main): Call `grub_affs_init' and
979 * include/grub/fs.h (grub_affs_init): New prototype.
980 (grub_affs_fini): Likewise.
982 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
984 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
986 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
988 * configure.ac: Accept `x86_64' as host_cpu. In that case add
991 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
994 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
995 (COMMON_LDFLAGS): New variable.
996 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
997 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
998 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
999 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
1000 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
1001 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
1002 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
1003 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
1004 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
1005 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
1006 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
1007 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
1008 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
1009 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
1010 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
1012 (normal_mod_ASFLAGS): Add `-m32'.
1014 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
1015 (grub_host_size_t, grub_host_ssize_t): New types.
1016 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
1017 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
1018 `GRUB_HOST_SIZEOF_VOID_P'.
1020 * include/grub/kernel.h (struct grub_module_header): Type of
1021 member offset changed to `grub_host_off_t'. Type of member size
1022 changed to `grub_host_size_t'.
1023 (struct grub_module_info): Type of member offset changed to
1024 `grub_host_off_t'. Type of member size changed to
1027 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
1029 Make GRUB's kernel compliant to Multiboot Specification.
1031 * kern/i386/pc/startup.S (multiboot_header): New label.
1032 (multiboot_entry): Likewise.
1033 (multiboot_trampoline): Likewise.
1035 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
1038 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
1039 put parentheses after a question mark.
1040 [!GRUB_UTIL] (my_mod): New variable.
1042 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
1044 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
1046 Adds support for the XFS filesystem. Btrees are not supported
1049 * fs/xfs.c: New file.
1051 * DISTLIST: Added `fs/xfs.c'.
1053 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
1054 (grub_probefs_SOURCES): Likewise.
1055 (grub_emu_SOURCES): Likewise.
1056 (pkgdata_MODULES): Add `xfs.mod'.
1057 (xfs_mod_SOURCES): New variable.
1058 (xfs_mod_CFLAGS): Likewise.
1060 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
1061 (pkgdata_MODULES): Add `xfs.mod'.
1062 (xfs_mod_SOURCES): New variable.
1063 (xfs_mod_CFLAGS): Likewise.
1065 * util/grub-emu.c (main): Call `grub_xfs_init' and
1068 * include/grub/fs.h (grub_xfs_init): New prototype.
1069 (grub_xfs_fini): Likewise.
1072 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
1074 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
1075 color modes, allow greater than 16 colors to be configured as
1078 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
1080 * normal/completion.c (complete_arguments): Add the qualifier
1083 From Omniflux <omniflux+lists@omniflux.com>:
1084 * include/grub/terminfo.h: New file.
1085 * include/grub/tparm.h: Likewise.
1086 * include/grub/i386/pc/serial.h: Likewise.
1087 * term/terminfo.c: Likewise.
1088 * term/tparm.c: Likewise.
1089 * term/i386/pc/serial.c: Likewise.
1090 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
1092 (terminfo_mod_SOURCES): New variable.
1093 (terminfo_mod_CFLAGS): Likewise.
1094 (serial_mod_SOURCES): Likewise.
1095 (serial_mod_CFLAGS): Likewise.
1097 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
1099 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
1100 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
1101 and kern/powerpc/ieee1275/cmain.c, respectively.
1103 * boot/powerpc/ieee1275/crt0.S: Moved to ...
1104 * kern/powerpc/ieee1275/crt0.S: ... here.
1106 * boot/powerpc/ieee1275/cmain.c: Moved to ...
1107 * kern/powerpc/ieee1275/cmain.c: ... here.
1109 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
1110 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
1111 instead of boot/powerpc/ieee1275/crt0.S and
1112 boot/powerpc/ieee1275/cmain.c, respectively.
1114 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
1115 sectors. It was not used anyway.
1117 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
1119 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
1120 `unused parameter' warning.
1122 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
1124 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
1126 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
1129 2005-08-28 Marco Gerards <metgerards@student.han.nl>
1131 * include/grub/normal.h (enum grub_completion_type): Added
1132 `GRUB_COMPLETION_TYPE_ARGUMENT'.
1134 * normal/cmdline.c (print_completion): Handle
1135 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
1136 * normal/menu_entry.c (store_completion): Likewise.
1138 * normal/completion.c (complete_arguments): New function.
1139 (grub_normal_do_completion): Call `complete_arguments' when the
1140 current words start with a dash.
1142 2005-08-27 Marco Gerards <metgerards@student.han.nl>
1144 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
1145 `gzio.mod' instead of `io.mod').
1147 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
1149 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
1150 (DISTDIRS): Added io and video.
1151 Rewrite the search routine to make an output consistently.
1153 * DISTLIST: Added conf/sparc64-ieee1275.mk,
1154 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
1155 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
1156 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
1157 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
1158 util/powerpc/ieee1275/misc.c.
1160 * include/grub/gzio.h: New file.
1161 * io/gzio.c: Likewise.
1163 * kern/file.c (grub_file_close): Call grub_device_close only if
1164 FILE->DEVICE is not NULL.
1166 * include/grub/mm.h [!NULL] (NULL): New macro.
1168 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
1170 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
1171 (pkgdata_MODULES): Added gzio.mod.
1172 (gzio_mod_SOURCES): New variable.
1173 (gzio_mod_CFLAGS): Likewise.
1175 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
1176 (pkgdata_MODULES): Added gzio.mod.
1177 (gzio_mod_SOURCES): New variable.
1178 (gzio_mod_CFLAGS): Likewise.
1180 * commands/cat.c: Include grub/gzio.h.
1181 (grub_cmd_cat): Use grub_gzfile_open instead of
1184 * commands/cmp.c: Include grub/gzio.h.
1185 (grub_cmd_cmp): Use grub_gzfile_open instead of
1188 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
1189 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
1191 (grub_rescue_cmd_module): Likewise.
1193 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
1195 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
1196 kern/sparc64/ieee1275/init.c because it contains _start.
1197 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
1199 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
1201 * configure.ac: Add support for sparc64 host with ieee1275
1203 * configure: Generated from configure.ac.
1204 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
1206 (grub_ofdisk_read): Likewise.
1207 (grub_ofdisk_open): Use %p to print pointer values, and cast the
1208 pointers as (void *) to remove a warning.
1209 (grub_ofdisk_close): Likewise.
1210 (grub_ofdisk_read): Likewise.
1211 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
1212 returns, so make it return void to remove a warning.
1213 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
1214 Corresponding prototype change.
1215 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
1216 values, and cast the pointers as (void *) to remove a warning.
1217 (grub_mm_dump): Likewise.
1218 * conf/sparc64-ieee1275.mk: New file.
1219 * conf/sparc64-ieee1275.rmk: Likewise.
1220 * include/grub/sparc64/setjmp.h: Likewise.
1221 * include/grub/sparc64/types.h: Likewise.
1222 * include/grub/sparc64/ieee1275/console.h: Likewise.
1223 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
1224 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
1225 * include/grub/sparc64/ieee1275/time.h: Likewise.
1226 * kern/sparc64/cache.c: Likewise.
1227 * kern/sparc64/dl.c: Likewise.
1228 * kern/sparc64/ieee1275/init.c: Likewise.
1229 * kern/sparc64/ieee1275/openfw.c: Likewise.
1231 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
1233 * util/console.c (grub_ncurses_putchar): If C is greater than
1234 0x7f, set C to a question mark.
1235 (grub_ncurses_getcharwidth): New function.
1236 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
1239 * normal/menu.c (print_entry): Made aware of Unicode. First,
1240 convert TITLE to UCS-4, and predict the cursor position by
1243 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
1245 * kern/misc.c (grub_utf16_to_utf8): Likewise.
1247 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
1249 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
1250 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
1253 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
1254 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
1255 grub_strcpy and grub_strlen. Take it into account that a space
1256 character is inserted as a delimiter.
1258 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
1260 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
1261 invalid magic in thre error.
1263 * commands/search.c: New file.
1265 * util/grub-emu.c (main): Call grub_search_init and
1268 * kern/rescue.c (grub_rescue_print_disks): Removed.
1269 (grub_rescue_print_devices): New function.
1270 (grub_rescue_cmd_ls): Use grub_device_iterate with
1271 grub_rescue_print_devices instead of grub_disk_dev_iterate with
1272 grub_rescue_print_disks.
1274 * kern/partition.c (grub_partition_iterate): Return the result of
1275 PARTMAP->ITERATE instead of GRUB_ERRNO.
1277 * kern/device.c: Include grub/partition.h.
1278 (grub_device_iterate): New function.
1280 * include/grub/partition.h (grub_partition_iterate): Return int
1281 instead of grub_err_t.
1283 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
1285 [GRUB_UTIL] (grub_search_fini): Likewise.
1287 * include/grub/device.h (grub_device_iterate): New prototype.
1289 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
1291 (pkgdata_MODULES): Added search.mod.
1292 (search_mod_SOURCES): New variable.
1293 (search_mod_CFLAGS): Likewise.
1295 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
1296 (pkgdata_MODULES): Added search.mod.
1297 (search_mod_SOURCES): New variable.
1298 (search_mod_CFLAGS): Likewise.
1300 * commands/ls.c (grub_ls_list_disks): Renamed to ...
1301 (grub_ls_list_devices): ... this, and use grub_device_iterate.
1302 All callers changed.
1304 * DISTLIST: Added commands/search.c.
1306 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
1308 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
1310 (grub_getcharwidth): New function.
1312 * kern/misc.c (grub_utf8_to_ucs4): New function.
1314 * include/grub/term.h (struct grub_term): Added a new member
1316 (grub_getcharwidth): New prototype.
1318 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
1320 * term/i386/pc/console.c (map_char): New function. Segregated from
1321 grub_console_putchar.
1322 (grub_console_putchar): Use map_char.
1323 (grub_console_getcharwidth): New function.
1324 (grub_console_term): Specified grub_console_getcharwidth as
1327 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
1328 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
1330 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
1332 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
1333 on grub_strtoul completely.
1334 (write_char): Declare local variables in the beginning of the
1336 (grub_vesafb_getcharwidth): New function.
1337 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
1340 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
1342 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
1343 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
1344 commands/i386/pc/vbetest.c.
1346 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
1347 call grub_vbe_get_controller_info again, because the returned
1348 information is volatile.
1349 (grub_vbe_set_video_mode): Mostly rewritten.
1350 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
1351 grub_vbe_status_t correctly.
1352 (grub_vbe_get_video_mode_info): Likewise.
1353 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
1354 several if statements.
1356 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
1357 * commands/i386/pc/vbeinfo.c: ... this.
1359 * commands/i386/pc/vbe_test.c: Renamed to ...
1360 * commands/i386/pc/vbetest.c: ... this.
1362 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
1364 (grub_cmd_vbeinfo): ... this. Save video modes before
1365 iterating. Skip a video mode, if it is not available, not enough
1366 information is given or it is monochrome. Show the memory
1367 model. Leave the interpretation of MODEVAR to grub_strtoul
1369 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
1370 (GRUB_MOD_FINI): Likewise.
1372 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
1373 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
1374 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
1375 duplicated grub_env_get. Leave the interpretation of MODEVAR to
1376 grub_strtoul completely.
1378 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
1379 (GRUB_MOD_FINI): Likewise.
1381 * normal/misc.c: Include grub/mm.h.
1383 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
1384 vbe_list_modes with vbetest.mod and vbeinfo.mod.
1385 (vbe_list_modes_mod_SOURCES): Removed.
1386 (vbe_list_modes_mod_CFLAGS): Likewise.
1387 (vbe_test_mod_SOURCES): Likewise.
1388 (vbe_test_mod_CFLAGS): Likewise.
1389 (vbeinfo_mod_SOURCES): New variable.
1390 (vbeinfo_mod_CFLAGS): Likewise.
1391 (vbetest_mod_SOURCES): Likewise.
1392 (vbetest_mod_CFLAGS): Likewise.
1394 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
1396 * normal/misc.c: New file.
1398 * DISTLIST: Added normal/misc.c.
1400 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
1401 DISK to HOOK. Call HOOK with DISK.
1402 * partmap/apple.c (apple_partition_map_iterate): Likewise.
1403 * partmap/pc.c (pc_partition_map_iterate): Likewise.
1404 * partmap/sun.c (sun_partition_map_iterate): Likewise.
1406 * normal/menu_entry.c (struct screen): Added a new member
1408 (completion_buffer): New global variable.
1409 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
1410 (store_completion): New function.
1411 (complete): Likewise.
1412 (clear_completions): Likewise.
1413 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
1414 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
1415 a tab, call complete.
1417 * normal/completion.c (disk_dev): Removed.
1418 (print_simple_completion): Likewise.
1419 (print_partition_completion): Likewise.
1420 (print_func): New global variable.
1421 (add_completion): Do not take the arguments WHAT or PRINT any
1422 longer. Added a new argument TYPE. Instead of printing directly,
1423 call PRINT_FUNC if not NULL.
1424 All callers changed.
1425 (complete_device): Use a local variable DEV instead of
1426 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
1427 (grub_normal_do_completion): Take a new argument HOOK. Do not
1428 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
1429 empty string, return NULL instead.
1430 All callers changed.
1432 * normal/cmdline.c (print_completion): New function.
1434 * kern/partition.c (grub_partition_iterate): Add an argument DISK
1436 All callers changed.
1438 * kern/disk.c (grub_print_partinfo): Removed.
1440 * include/grub/partition.h (struct grub_partition_map): Add a new
1441 argument DISK into HOOK of ITERATE.
1442 (grub_partition_iterate): Add a new argument DISK to HOOK.
1444 * include/grub/normal.h (enum grub_completion_type): New enum.
1445 (grub_completion_type_t): New type.
1446 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
1447 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
1448 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
1449 (GRUB_COMPLETION_TYPE_FILE): Likewise.
1450 (grub_normal_do_completion): Added a new argument HOOK.
1451 (grub_normal_print_device_info): New prototype.
1453 * include/grub/disk.h (grub_print_partinfo): Removed.
1455 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
1456 (normal_mod_SOURCES): Likewise.
1457 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1458 (normal_mod_SOURCES): Likewise.
1460 * commands/ls.c (grub_ls_list_disks): Use
1461 grub_normal_print_device_info instead of grub_print_partinfo. Free
1463 (grub_ls_list_files): Use grub_normal_print_device_info instead of
1464 duplicating the code.
1466 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
1468 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
1469 follow GCS more precisely.
1470 * commands/i386/pc/vbe_test.c: Likewise.
1471 * include/grub/i386/pc/vbe.h: Likewise.
1472 * term/i386/pc/vesafb.c: Likewise.
1473 * video/i386/pc/vbe.c: Likewise.
1475 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
1477 * DISTLIST: Added term/i386/pc/vesafb.c
1478 DISTLIST: Added video/i386/pc/vbe.c
1479 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
1480 DISTLIST: Added commands/i386/pc/vbe_test.c.
1481 * commands/i386/pc/vbe_list_modes.c: New file.
1482 * commands/i386/pc/vbe_test.c: Likewise.
1483 * term/i386/pc/vesafb.c: Likewise.
1484 * video/i386/pc/vbe.c: Likewise.
1485 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
1486 (grub_vbe_probe) Added prototype.
1487 (grub_vbe_set_video_mode) Likewise.
1488 (grub_vbe_get_video_mode) Likewise.
1489 (grub_vbe_get_video_mode_info) Likewise.
1490 (grub_vbe_set_pixel_rgb) Likewise.
1491 (grub_vbe_set_pixel_index) Likewise.
1492 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
1493 (pkgdata_MODULES): Added vesafb.mod.
1494 (pkgdata_MODULES): Added vbe_list_modes.mod.
1495 (pkgdata_MODULES): Added vbe_test.mod.
1496 (vbe_mod_SOURCES): Added.
1497 (vbe_mod_CFLAGS): Likewise.
1498 (vesafb_mod_SOURCES): Likewise.
1499 (vesafb_mod_CFLAGS): Likewise.
1500 (vbe_list_modes_mod_SOURCES): Likewise.
1501 (vbe_list_modes_mod_CFLAGS): Likewise.
1502 (vbe_test_mod_SOURCES): Likewise.
1503 (vbe_test_mod_CFLAGS): Likewise.
1505 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
1507 * normal/command.c (grub_command_execute): If INTERACTIVE is
1508 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
1509 CMDLINE. Disable the pager if INTERACTIVE is true.
1510 All callers are changed.
1512 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
1513 before reading a config file.
1514 * normal/main.c (read_config_file): Even if a command is not
1515 found, register it if it is within an entry.
1517 * util/grub-emu.c: Include sys/types.h and unistd.h.
1518 (options): Added --hold.
1519 (struct arguments): Added a new member "hold".
1520 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
1522 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
1523 cleared by a debugger, if it is not zero.
1525 * include/grub/normal.h (grub_command_execute): Add an argument
1528 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
1530 * DISTLIST: Added include/grub/i386/pc/vbe.h.
1532 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
1534 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
1535 program with another one, because the old one didn't detect a bug
1536 in gcc-3.4. Always use regparm 2, because the new test is still
1537 not enough for gcc-4.0. Someone must investigate a simple test
1538 case which detects a bug in gcc-4.0.
1540 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
1542 * DISTLIST: Added normal/completion.c.
1544 * normal/completion.c: New file.
1546 * term/i386/pc/console.c (grub_console_getwh): New function.
1547 (grub_console_term): Assign grub_console_getwh to getwh.
1549 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
1550 function is defined in normal/completion.c as
1551 grub_normal_do_completion.
1552 (grub_cmdline_get): Use grub_normal_do_completion instead of
1555 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
1556 returns non-zero, otherwise return 0.
1557 (grub_partition_iterate): First, probe the partition map. Then,
1558 call ITERATE only for this partition map.
1560 * kern/misc.c (grub_strncmp): Rewritten.
1562 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
1563 returns non-zero. Otherwise return 0.
1565 * include/grub/partition.h (grub_partition_map_iterate): Return
1566 int instead of void.
1568 * include/grub/normal.h (grub_normal_do_completion): New prototype.
1570 * include/grub/misc.h (grub_strncmp): Change the type of N to
1573 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
1576 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
1577 unsigned explictly before comparing it with I.
1579 * kern/main.c (grub_env_write_root): Add the attribute unused into
1582 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
1583 normal/completion.c.
1584 (normal_mod_SOURCES): Likewise.
1585 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1586 (normal_mod_SOURCES): Likewise.
1588 * normal/command.c (grub_iterate_commands): If ITERATE returns
1589 non-zero, return one immediately.
1591 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
1593 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
1594 * kern/i386/pc/startup.S: Updated Global Descriptor table's
1596 (grub_vbe_get_controller_info): New function.
1597 (grub_vbe_get_mode_info): Likewise.
1598 (grub_vbe_set_mode): Likewise.
1599 (grub_vbe_get_mode): Likewise.
1600 (grub_vbe_set_memory_window): Likewise.
1601 (grub_vbe_get_memory_window): Likewise.
1602 (grub_vbe_set_scanline_length): Likewise.
1603 (grub_vbe_get_scanline_length): Likewise.
1604 (grub_vbe_set_display_start): Likewise.
1605 (grub_vbe_get_display_start): Likewise.
1606 (grub_vbe_set_palette_data): Likewise.
1607 * include/grub/i386/pc/vbe.h: New file.
1609 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
1611 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
1612 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
1613 * DISTLIST: Likewise.
1614 * kern/ieee1275/of.c: Moved to ...
1615 * kern/ieee1275/ieee1275.c: ... here.
1617 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
1619 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
1620 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
1621 Pass 0 as `end' parameter to grub_strtoul().
1623 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
1625 * include/grub/powerpc/ieee1275/console.h: Do not include
1626 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
1628 (grub_console_cur_color): Remove i386-specific prototype.
1629 (grub_console_real_putchar): Likewise.
1630 (grub_console_checkkey): Likewise.
1631 (grub_console_getkey): Likewise.
1632 (grub_console_getxy): Likewise.
1633 (grub_console_gotoxy): Likewise.
1634 (grub_console_cls): Likewise.
1635 (grub_console_setcursor): Likewise.
1636 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
1637 Include <grub/machine/console.h>.
1638 * term/ieee1275/ofconsole.c: Likewise.
1640 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
1642 * Makefile.in (LIBLZO): New variable.
1644 * configure.ac: Check for LZO version 2.
1646 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
1647 lzo/lzo1x.h instead of lzo1x.h.
1649 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
1652 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
1653 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
1655 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
1656 copying the data from PARTITION to P.
1658 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
1660 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
1661 negative, unload the module.
1663 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
1664 map is "pc_partition_map" but not "pc".
1665 (usage): Fix the description. The options are --boot-image and
1666 --core-image but not --boot-file or --core-file.
1667 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
1668 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
1671 * util/i386/pc/grub-install.in: Do not specify --boot-file or
1672 --core-file. Specify INSTALL_DEVICE as an argument.
1674 * util/console.c: Include config.h.
1675 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
1676 [HAVE_NCURSES_H]: Include ncurses.h.
1677 [HAVE_CURSES_H]: Include curses.h.
1678 [!A_NORMAL] (A_NORMAL): Defined as zero.
1679 [!A_STANDOUT] (A_STANDOUT): Likewise.
1681 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
1683 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
1685 * configure.ac: Check for curses libraries and headers.
1687 * Makefile.in (LIBCURSES): New variable.
1689 * genmk.rb (Script::rule): Set the executable bits.
1691 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
1692 name of the PC partition map is "pc_partition_map" but not "pc".
1694 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
1696 * util/i386/pc/grub-install.in (grub_probefs): New variable.
1697 (modules): Likewise.
1698 (usage): Added descriptions for --modules and --grub-probefs.
1699 Handle --modules and --grub-probefs. Save the arguments in MODULES
1700 and GRUB_PROBEFS, respectively.
1701 Auto-detect a filesystem module against GRUBDIR. If the result is
1702 empty and modules are not specified explicitly, abort the
1703 installation. Add the result to MODULES.
1705 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
1706 disk/powerpc/ieee1275/ofdisk.c,
1707 include/grub/powerpc/ieee1275/init.h and
1708 term/powerpc/ieee1275/ofconsole.c.
1709 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
1710 term/ieee1275/ofconsole.c.
1712 * include/grub/powerpc/ieee1275/console.h: Resurrected.
1714 * COPYING: Upgraded to the latest version. Only the address of the
1715 FSF office has changed.
1717 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
1719 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
1720 kern/ieee1275.c with kern/ieee1275/of.c.
1722 * kern/ieee1275.c: Moved to ...
1723 * kern/ieee1275/of.c: ... here.
1725 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
1727 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
1730 * config.guess: Updated to the latest version from gnulib.
1731 * config.sub: Likewise.
1732 * install.sh: Likewise.
1733 * mkinstalldirs: Likewise.
1735 * include/grub/console.h: Removed. This file is arch-specific. Do
1736 not put this in include/grub.
1738 * include/grub/i386/pc/console.h: Resurrected.
1740 * util/console.c: Include grub/machine/console.h instead of
1742 * util/grub-emu.c: Likewise.
1744 2005-08-04 Marco Gerards <metgerards@student.han.nl>
1746 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
1749 From Vincent Pelletier <subdino2004@yahoo.fr>
1750 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
1751 Redefined to use grub_getwh.
1752 (grub_term): New member named getwh.
1753 (grub_getwh): New prototype.
1754 * kern/term.c (grub_getwh): New function.
1755 * term/i386/pc/console.c (grub_console_getwh): New function.
1756 (grub_console_term): New member `getwh'.
1757 * term/i386/pc/vga.c (grub_vga_getwh): New function.
1758 (grub_vga_term): New member `getwh'.
1759 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
1761 (grub_ofconsole_getw): New function.
1762 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
1763 (grub_ofconsole_term): New field named getwh and new initial
1766 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
1768 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
1769 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
1770 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
1771 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
1772 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
1773 of <grub/machine/ieee1275.h>.
1774 * commands/ieee1275/reboot.c: Likewise.
1775 * boot/powerpc/ieee1275/ieee1275.c: Move ...
1776 * kern/ieee1275.c: ... to here. All users updated. Change all
1777 parameter structs to use new type `grub_ieee1275_cell_t'.
1778 * term/powerpc/ieee1275/ofconsole.c: Move ...
1779 * term/ieee1275/ofconsole.c: ... to here. All users updated.
1780 * disk/powerpc/ieee1275/ofdisk.c: Move ...
1781 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
1782 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
1784 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
1785 Remove unused prototypes. All users updated.
1786 * include/grub/powerpc/ieee1275/console.h: Removed.
1787 * include/grub/powerpc/ieee1275/ieee1275.h: Define
1788 `grub_ieee1275_cell_t'.
1789 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
1790 Cast comparisons with -1 to the correct type.
1791 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
1792 type to match `grub_ieee1275_entry_fn'.
1794 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
1796 * DISTLIST: Added util/i386/pc/grub-probefs.c.
1798 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
1799 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
1801 (grub_probefs_SOURCES): New variable.
1803 * util/i386/pc/grub-probefs.c: New file.
1805 * util/i386/pc/grub-setup.c (main): Call
1806 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
1807 grub_hfs_init and grub_jfs_init to initialize the system. Call
1808 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
1809 grub_pc_partition_map_fini to finish the system.
1811 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
1813 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
1815 (grub_multiboot_load_elf32): Likewise.
1816 (grub_multiboot_is_elf64): Likewise.
1817 (grub_multiboot_load_elf64): Likewise.
1818 (grub_multiboot_load_elf): Likewise.
1819 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
1820 an ELF32 or ELF64 file.
1821 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
1823 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
1824 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
1825 NULL before calling FS->LABEL.
1826 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
1827 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
1828 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
1829 before calling FS->LABEL.
1831 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
1833 * util/i386/pc/grub-install.in (datadir): New variable.
1835 (pkgdatadir): New variable.
1836 (pkglibdir): Removed.
1838 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
1840 * DISTLIST: Added util/i386/pc/grub-install.in.
1842 * util/i386/pc/grub-install.in: New file.
1844 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
1845 (grub_install_SOURCES): Likewise.
1847 * genmk.rb: Added support for scripts.
1848 (Script): New class.
1849 (scripts): New variable.
1851 * Makefile.in (install-local): Install sbin_SCRIPTS by
1853 (uninstall): Remove sbin_SCRIPTS.
1855 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
1856 device, try to get a GRUB device by
1857 grub_util_biosdisk_get_grub_dev.
1860 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
1861 description for --device-map.
1863 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
1865 Change the semantics of variable hooks. They now return strings
1866 instead of error values.
1868 * util/i386/pc/grub-setup.c: Include grub/env.h.
1869 (setup): Use grub_device_set_root instead of grub_env_set.
1871 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
1872 grub_env_get instead of grub_device_set_root and
1873 grub_device_get_root, respectively.
1875 * kern/main.c (grub_env_write_root): New function.
1876 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
1877 grub_env_set instead of grub_device_set_root.
1879 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
1881 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
1882 rather than calling ENV->WRITE_HOOK afterwards.
1883 (grub_env_get): Return the result of ENV->READ_HOOK rather than
1884 passing a pointer of a pointer.
1885 (grub_register_variable_hook): Change the types of "read_hook" and
1886 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
1888 Allocate the default empty string on the heap, because this string
1891 * kern/device.c: Include grub/env.h.
1892 (grub_device_set_root): Removed.
1893 (grub_device_get_root): Likewise.
1894 (grub_device_open): Use grub_env_get instead of
1895 grub_device_get_root.
1897 * include/grub/env.h (grub_env_read_hook_t): New type.
1898 (grub_env_write_hook_t): Likewise.
1899 (grub_env_var): Change the types of "read_hook" and "write_hook"
1900 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
1901 (grub_register_variable_hook): Likewise.
1903 * include/grub/device.h (grub_device_set_root): Removed.
1904 (grub_device_set_root): Likewise.
1906 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
1907 make sure that DIRNAME terminates with '/', so that
1908 grub_fat_find_dir will fail if PATH is not a directory.
1910 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
1912 Use the qualifier auto for print_files and print_files_long.
1913 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
1915 Put a newline only if there is no error.
1916 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
1919 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
1921 * kern/partition.c (grub_partition_probe): Initialize PART to
1922 NULL. Otherwise, when no partition map is registered, this returns
1925 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
1927 * partmap/apple.c (apple_partition_map_iterate): Check if POS
1928 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
1931 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
1933 * commands/ls.c (grub_ls_list_disks): Print the filesystem
1934 information on each device, if it does not have partitions. Print
1935 "Device" instead of "Disk", because this function is not specific
1938 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
1939 static to ensure that it is put on the memory rather than a
1942 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
1944 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
1945 (grub_cat_init): Likewise.
1946 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
1947 (options): Likewise.
1948 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
1949 (grub_configfile_init): Likewise.
1950 * font/manager.c (GRUB_MOD_INIT): Likewise.
1951 * commands/help.c (GRUB_MOD_INIT): Likewise.
1952 (grub_help_init): Likewise.
1953 * normal/command.c (grub_command_init): Likewise.
1954 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
1955 * disk/loopback.c (grub_loop_init): Likewise.
1956 (GRUB_MOD_INIT): Likewise.
1957 * commands/ls.c (grub_ls_init): Likewise.
1958 (GRUB_MOD_INIT): Likewise.
1959 (options): Likewise.
1960 * commands/boot.c (grub_boot_init): Likewise.
1961 (GRUB_MOD_INIT): Likewise.
1962 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
1963 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
1964 (GRUB_MOD_INIT): Likewise.
1965 * commands/cmp.c (grub_cmp_init): Likewise.
1966 (GRUB_MOD_INIT): Likewise.
1968 * normal/arg.c: Use <> instead of "" to include header files.
1969 (SHORT_ARG_HELP): New macro.
1970 (SHORT_ARG_USAGE): Likewise.
1971 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
1972 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
1974 (find_short): Check if C is 'h' or 'u' explicitly.
1975 (grub_arg_show_help): Use space characters instead of tabs. Treat
1976 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
1977 are shown with --help and --usage only if they are not used for
1979 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
1982 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
1983 const into "longarg". Change the type of "shortarg" to int.
1985 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
1987 * boot/i386/pc/boot.S (boot_drive_check): New label.
1989 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
1992 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
1993 which do not pass a boot drive correctly. Copied from GRUB Legacy.
1995 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
1997 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
1998 When turning off Gate A20, skip the check and return immediately,
1999 because this is not fatal usually.
2001 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
2003 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
2004 be 0x7C00 instead of 0x8000.
2006 * boot/i386/pc/pxeboot.S: Rewritten.
2008 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
2010 (gate_a20_check_state): Read a byte from 0x108000. Invert the
2013 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
2015 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
2016 robustness. This routine now supports a BIOS call and System
2017 Control Port A to modify the gate A20.
2019 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2022 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
2024 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
2025 device path and resulting ihandle.
2026 (grub_ofdisk_close): dprintf the ihandle being closed.
2027 (grub_ofdisk_read): dprintf function parameters.
2028 * kern/mm.c (grub_mm_init_region): Likewise.
2029 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
2030 (grub_linux_boot): dprintf the Linux entry point, initrd address and
2031 size, and boot arguments.
2032 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
2033 before loading into memory.
2034 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
2035 before loading into memory.
2037 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
2039 * kern/mm.c: Added much documentation.
2040 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
2041 8, set to 5 instead of 8.
2043 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
2045 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
2047 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
2048 (grub_mkdevicemap_SOURCES): New variable.
2050 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
2051 lib/device.c of GRUB Legacy.
2053 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
2055 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
2056 instead of PATH is NULL.
2058 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
2060 * commands/cmp.c (BUFFER_SIZE): New macro.
2061 (grub_cmd_cmp): Close the right file at the right time. Compare
2062 only data just read. Don't report files of different size as
2063 identical. Dynamically allocate buffers. Move variable
2064 declarations at the beginning of function.
2066 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
2068 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
2071 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
2073 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
2074 when backspace is pressed at beginning of line.
2076 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
2078 * DISTLIST: Added genfslist.sh.
2080 * normal/main.c (fs_module_list): New variable.
2081 (autoload_fs_module): New function.
2082 (read_fs_list): Likewise.
2083 (grub_normal_execute): Call read_fs_list.
2085 * kern/fs.c (grub_fs_autoload_hook): New variable.
2086 (grub_fs_probe): Added support for auto-loading.
2088 * include/grub/normal.h (struct grub_fs_module_list): New struct.
2089 (grub_fs_module_list_t): New type.
2091 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
2092 (grub_fs_autoload_hook): New prototype.
2094 * genfslist.sh: New file.
2096 * genmk.rb: Added a rule to generate a filesystem list.
2098 2005-06-30 Marco Gerards <metgerards@student.han.nl>
2100 * configure.ac: Fix the test for cross-compiling.
2102 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
2103 define GRUB_UTIL anymore.
2105 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
2106 so this function works on other systems than just big endian.
2107 (load_modules): Likewise.
2108 (add_segments): Likewise.
2110 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
2112 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
2113 contains `l' modifier, get a long from va_arg().
2115 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
2117 * kern/mm.c (grub_free): If the next free block which is being
2118 merged is the first free block, set the first block to the block
2120 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
2122 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
2124 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
2125 `grub_ieee1275_chosen'.
2127 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
2129 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
2130 (grub_ieee1275_chosen): New variable.
2131 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
2133 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
2134 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
2135 Rename first argument to `phandle' for consistency.
2136 (grub_ieee1275_get_property_length): Likewise.
2137 (grub_ieee1275_next_property): Likewise. Change type of first argument
2138 to grub_ieee1275_phandle_t.
2139 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
2140 Move export next to declaration.
2141 (grub_ieee1275_chosen): New variable.
2142 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
2143 Correct cosmetic typo.
2144 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
2145 `grub_ieee1275_chosen'.
2146 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
2147 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
2148 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
2149 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
2150 `grub_ieee1275_chosen'.
2152 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
2154 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
2156 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
2157 /chosen/bootargs as "variable=value" pairs.
2159 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
2161 * include/grub/misc.h (grub_dprintf): New macro.
2162 (grub_real_dprintf): New prototype.
2163 (grub_strword): Likewise.
2164 (grub_iswordseparator): Likewise.
2165 * kern/misc.c (grub_real_dprintf): New function.
2166 (grub_strword): Likewise.
2167 (grub_iswordseparator): Likewise.
2169 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
2171 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
2172 (roundup): Remove macro.
2173 (grub_ieee1275_flags): Make static.
2174 (grub_ieee1275_realmode): Remove.
2175 (grub_ieee1275_test_flag): New function.
2176 (grub_ieee1275_set_flag): Likewise.
2177 (find_options): Rename to `grub_ieee1275_find_options'; update
2178 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
2179 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
2180 (cmain): New prototype.
2181 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
2182 `grub_ieee1275_flags' directly.
2183 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
2185 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
2186 Don't include grub/machine/init.h.
2187 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
2188 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
2190 (grub_ieee1275_realmode): Likewise.
2191 (grub_ieee1275_flag): New enum.
2192 (grub_ieee1275_test_flag): New prototype.
2193 (grub_ieee1275_set_flag): New prototype.
2194 * include/grub/powerpc/ieee1275/init.h: Remove file.
2195 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
2196 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
2197 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
2198 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
2200 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
2201 `grub_ieee1275_test_flag'.
2202 (grub_ieee1275_encode_devname): Likewise.
2204 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
2206 * include/grub/powerpc/ieee1275/ieee1275.h
2207 (grub_ieee1275_encode_devname): New prototype.
2208 (grub_ieee1275_get_filename): Likewise.
2209 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
2211 (grub_set_prefix): Likewise.
2212 (grub_machine_init): Call grub_set_prefix.
2213 * kern/powerpc/ieee1275/openfw.c: Fix typos.
2214 (grub_parse_type): New enum.
2215 (grub_ieee1275_get_devargs): New function.
2216 (grub_ieee1275_get_devname): Likewise.
2217 (grub_ieee1275_parse_args): Likewise.
2218 (grub_ieee1275_get_filename): Likewise.
2219 (grub_ieee1275_encode_devname): Likewise.
2221 2005-03-30 Marco Gerards <metgerards@student.han.nl>
2223 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
2224 `grub_loader_unset'.
2226 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
2228 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
2229 instead of grub_ieee1275_interpret.
2230 (grub_halt_init): New function.
2231 (grub_halt_fini): Likewise.
2232 (GRUB_MOD_INIT): Correct message grammar.
2233 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
2234 instead of grub_ieee1275_interpret.
2235 (grub_reboot_init): New function.
2236 (grub_reboot_fini): Likewise.
2237 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
2238 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
2239 util/i386/pc/misc.c with commands/ieee1275/halt.c,
2240 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
2241 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
2243 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
2245 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
2247 (grub_halt): Likewise.
2248 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
2249 (cmain): Remove __attribute__((unused)).
2250 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
2251 (grub_heap_len): Likewise.
2252 (grub_machine_fini): New function.
2253 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
2254 (grub_halt): Likewise.
2255 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
2257 * util/powerpc/ieee1275/misc.c: New file.
2259 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
2261 * DISTLIST: New file.
2262 * gendistlist.sh: Likewise.
2264 * Makefile.in (COMMON_DISTFILES): Removed.
2265 (BOOT_DISTFILES): Likewise.
2266 (CONF_DISTFILES): Likewise.
2267 (DISK_DISTFILES): Likewise.
2268 (FS_DISTFILES): Likewise.
2269 (INCLUDE_DISTFILES): Likewise.
2270 (KERN_DISTFILES): Likewise.
2271 (LOADER_DISTFILES): Likewise.
2272 (TERM_DISTFILES): Likewise.
2273 (UTIL_DISTFILES): Likewise.
2274 (DISTFILES): Likewise.
2275 (uninstall): Uninstall files in $(pkgdata_DATA).
2276 (DISTLIST): New target.
2277 (distdir): Use the contents of the file DISTLIST to get a list of
2280 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
2282 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
2283 descriptor. This is ported from GRUB Legacy.
2285 * gencmdlist.sh: Added an extra semicolon to make it work with
2286 old sed versions. Reported by Robert Bihlmeyer
2287 <robbe@orcus.priv.at>.
2289 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
2291 Automatic loading of commands is supported.
2293 * normal/main.c (read_command_list): New function.
2294 (grub_normal_execute): Call read_command_list.
2296 * normal/command.c (grub_register_command): Return zero or CMD.
2297 Allocate CMD->NAME from the heap.
2298 Initialize CMD->MODULE_NAME to zero.
2299 Find the same name as well. If the same command is found and it is
2300 a dummy command, overwrite members. If it is not a dummy command,
2302 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
2303 (grub_command_find): If a dummy command is found, load a module
2304 and retry to find a command only once.
2306 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
2307 make sure that each command is loaded.
2309 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
2311 (struct grub_command): Remove const from the member `name'.
2312 Add a new member `module_name'.
2313 (grub_register_command): Return grub_command_t.
2315 * commands/help.c (grub_cmd_help): Call grub_command_find to make
2316 sure that each command is loaded.
2318 * genmk.rb (PModule::rule): Specify a module name without the
2319 suffix ".mod" to gencmdlist.sh.
2321 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
2323 * gencmdlist.sh: New file.
2325 * genmk.rb (PModule::rule): Generate a rule for a command list.
2327 Generate command.lst from $(COMMANDFILES).
2329 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
2330 (DATA): Added $(pkgdata_DATA).
2331 (install-local): Install files in $(pkgdata_DATA).
2333 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
2335 * term/i386/pc/vga.c (debug_command): Removed.
2336 (GRUB_MOD_INIT): Do not register the command "debug".
2338 From Hollis Blanchard:
2339 * commands/configfile.c: New file.
2340 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
2341 commands/configfile.c.
2342 (pkgdata_MODULES): Added configfile.mod.
2343 (configfile_mod_SOURCES): New variable.
2344 (configfile_mod_CFLAGS): Likewise.
2345 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
2346 commands/configfile.c.
2347 (pkgdata_MODULES): Added configfile.mod.
2348 (configfile_mod_SOURCES): New variable.
2349 (configfile_mod_CFLAGS): Likewise.
2350 * util/grub-emu.c (main): Call grub_configfile_init and
2351 grub_configfile_fini.
2352 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
2354 [GRUB_UTIL] (grub_configfile_fini): Likewise.
2356 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
2358 * normal/arg.c (grub_arg_show_help): Do not show the bug report
2361 * commands/help.c (grub_cmd_help): Do not print newlines after
2362 the last command in print_command_help.
2364 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
2366 * commands/default.h: New file.
2367 * commands/timeout.h: Likewise.
2368 * normal/context.c: Likewise.
2370 * util/misc.c: Do not include sys/times.h.
2371 Include sys/time.h and grub/machine/time.h.
2372 (grub_get_rtc): Rewritten with gettimeofday.
2374 * util/grub-emu.c (main): Call grub_default_init and
2375 grub_timeout_init before grub_normal_init, and call
2376 grub_timeout_fini and grub_default_fini after grub_main.
2378 * util/console.c (grub_ncurses_checkkey): Return the read
2381 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
2384 * normal/main.c (read_config_file): Push MENU. If this fails,
2385 print an error and wait for a user input.
2386 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
2387 If a menu is empty or an error occurs, pop MENU.
2388 (grub_normal_execute): Pop and free MENU after grub_menu_run
2391 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
2393 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
2395 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
2397 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
2399 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
2402 * include/grub/normal.h (struct grub_menu_list): New struct.
2403 (grub_menu_list_t): New type.
2404 (struct grub_context): New struct.
2405 (grub_context_t): New type.
2406 (grub_register_command): Got rid of EXPORT_FUNC.
2407 (grub_unregister_command): Likewise.
2408 (grub_context_get): New prototype.
2409 (grub_context_get_current_menu): Likewise.
2410 (grub_context_push_menu): Likewise.
2411 (grub_context_pop_menu): Likewise.
2412 [GRUB_UTIL] (grub_default_init): Likewise.
2413 [GRUB_UTIL] (grub_default_fini): Likewise.
2414 [GRUB_UTIL] (grub_timeout_init): Likewise.
2415 [GRUB_UTIL] (grub_timeout_fini): Likewise.
2417 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
2418 commands/timeout.c and normal/context.c.
2419 (pkgdata_MODULES): Added default.mod and timeout.mod.
2420 (normal_mod_SOURCES): Added normal/context.c.
2421 (default_mod_SOURCES): New variable.
2422 (default_mod_CFLAGS): Likewise.
2423 (timeout_mod_SOURCES): Likewise.
2424 (timeout_mod_CFLAGS): Likewise.
2425 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
2427 (pkgdata_MODULES): Added default.mod and timeout.mod.
2428 (normal_mod_SOURCES): Added normal/context.c.
2429 (default_mod_SOURCES): New variable.
2430 (default_mod_CFLAGS): Likewise.
2431 (timeout_mod_SOURCES): Likewise.
2432 (timeout_mod_CFLAGS): Likewise.
2434 * Makefile.in (all-local): Added $(MKFILES).
2436 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
2438 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
2439 (grub_emu_SOURCES): Likewise.
2440 (pkgdata_MODULES): Add `sun.mod'.
2441 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
2442 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2444 (pkgdata_MODULES): Add `sun.mod'.
2445 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
2446 * include/grub/partition.h (grub_sun_partition_map_init): New
2448 (grub_sun_partition_map_fini): Likewise.
2449 * partmap/sun.c: New file.
2450 * util/grub-emu.c (main): Initialize and de-initialize the sun
2451 partitionmap support.
2453 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
2455 This implements an Emacs-like menu entry editor.
2457 * normal/menu_entry.c: New file.
2459 * util/console.c (grub_ncurses_putchar): Translate some Unicode
2460 characters to ASCII.
2461 (saved_char): New variable.
2462 (grub_ncurses_checkkey): Rewritten completely.
2463 (grub_ncurses_getkey): Likewise.
2464 (grub_ncurses_init): Call raw instead of cbreak.
2466 * normal/menu.c (print_entry): Do not put a space.
2467 (init_page): Renamed to ...
2468 (grub_menu_init_page): ... this. All callers changed.
2469 (edit_menu_entry): Removed.
2470 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
2472 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
2474 * kern/misc.c (grub_vprintf): Call grub_refresh.
2476 * normal/menu.c (DISP_LEFT): Renamed to ...
2477 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
2478 * normal/menu.c (DISP_UP): Renamed to ...
2479 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
2480 * normal/menu.c (DISP_RIGHT): Renamed to ...
2481 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
2482 * normal/menu.c (DISP_DOWN): Renamed to ...
2483 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
2484 * normal/menu.c (DISP_HLINE): Renamed to ...
2485 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
2486 * normal/menu.c (DISP_VLINE): Renamed to ...
2487 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
2488 * normal/menu.c (DISP_UL): Renamed to ...
2489 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
2490 * normal/menu.c (DISP_UR): Renamed to ...
2491 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
2492 * normal/menu.c (DISP_LL): Renamed to ...
2493 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
2494 * normal/menu.c (DISP_LR): Renamed to ...
2495 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
2496 * normal/menu.c (TERM_WIDTH): Renamed to ...
2497 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
2498 * normal/menu.c (TERM_HEIGHT): Renamed to ...
2499 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
2500 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
2501 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
2502 * normal/menu.c (TERM_MARGIN): Renamed to ...
2503 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
2504 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
2505 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
2506 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
2507 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
2508 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
2509 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
2510 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
2511 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
2512 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
2513 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
2514 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
2515 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
2516 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
2517 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
2518 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
2519 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
2520 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
2521 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
2522 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
2523 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
2524 All callers changed.
2526 * include/grub/normal.h: New prototype.
2528 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
2529 normal/menu_entry.c.
2530 (normal_mod_SOURCES): Likewise.
2531 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2532 (normal_mod_SOURCES): Likewise.
2534 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
2536 * include/grub/normal.h (grub_halt_init): New prototype.
2537 (grub_halt_fini): Likewise.
2538 (grub_reboot_init): Likewise.
2539 (grub_reboot_fini): Likewise.
2541 * util/grub-emu.c: Include signal.h.
2542 (main_env): New global variable.
2543 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
2545 (grub_machine_fini): New function.
2546 (main): Call grub_halt_init and grub_reboot_init before
2547 grub_main, and grub_reboot_fini and grub_halt_fini after it.
2548 Call setjmp with MAIN_ENV to go back afterwards.
2549 Call grub_machine_fini right before return.
2551 * include/grub/util/misc.h: Include setjmp.h.
2552 (main_env): New prototype.
2554 * include/grub/kernel.h (grub_machine_fini): New prototype.
2555 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
2556 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
2558 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
2559 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
2560 * term/i386/pc/console.c (grub_console_fini): Likewise.
2562 * util/i386/pc/misc.c: New file.
2564 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
2565 util/i386/pc/misc.c, commands/i386/pc/halt.c and
2566 commands/i386/pc/reboot.c.
2568 2005-02-14 Guillem Jover <guillem@hadrons.org>
2570 * include/grub/dl.h (grub_dl_check_header): New prototype.
2571 (grub_arch_dl_check_header): Change return type to grub_err_t,
2572 remove size parameter and export function. Update all callers.
2573 * kern/dl.c (grub_dl_check_header): New function.
2574 (grub_dl_load_core): Use `grub_dl_check_header' instead of
2575 `grub_arch_dl_check_header'. Check ELF type. Check if sections
2576 are inside the core.
2577 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
2578 independent ELF header checks.
2579 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
2580 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
2581 `grub_dl_check_header' instead of explicit checks. Check for the
2583 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
2584 `grub_dl_check_header' instead of explicit checks. Remove arch
2585 specific ELF header checks.
2587 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
2590 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
2592 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
2593 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
2595 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
2597 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
2598 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
2599 (part_map_iterate): Clear `grub_errno' and return 0 if
2600 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
2601 * partmap/amiga.c (amiga_partition_map_iterate): Return
2602 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
2603 * partmap/apple.c (apple_partition_map_iterate): Likewise.
2605 2005-02-01 Guillem Jover <guillem@hadrons.org>
2607 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
2610 2005-01-31 Marco Gerards <metgerards@student.han.nl>
2612 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
2614 (grub_rescue_cmd_linux): New prototype.
2615 (grub_rescue_cmd_initrd): Likewise.
2616 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
2618 (grub_linux_release_mem): Release the memory for the initrd.
2619 (grub_load_linux): Renamed from this...
2620 (grub_rescue_cmd_linux): ...To this. Changed all callers.
2621 Changed `entry' not to be static. Loop over memory regions to
2622 find another one when the default fails.
2623 (grub_rescue_cmd_initrd): New function.
2624 (grub_linux_init): Remove function.
2625 (grub_linux_fini): Likewise.
2626 (GRUB_MOD_INIT): Register `initrd'.
2627 (GRUB_MOD_FINI): Unregister `initrd'.
2628 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
2630 (grub_linux_normal_fini): Likewise.
2631 (GRUB_MOD_INIT): Register `initrd'.
2632 (GRUB_MOD_FINI): Unregister `initrd'.
2634 2005-01-31 Marco Gerards <metgerards@student.han.nl>
2636 * commands/help.c: New file.
2637 * normal/arg.c (show_help): Renamed to...
2638 (grub_arg_show_help): ... this.
2639 * commands/i386/pc/halt.c: New file.
2640 * commands/i386/pc/reboot.c: Likewise.
2641 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
2642 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
2643 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
2644 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
2646 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2648 (pkgdata_MODULES): Add `help.mod'.
2649 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
2650 * grub/i386/pc/init.h (grub_reboot): New prototype.
2651 (grub_halt): Likewise.
2652 * include/grub/normal.h (grub_arg_show_help): New prototype.
2653 (grub_help_init): Likewise.
2654 (grub_help_fini): Likewise.
2655 * util/grub-emu.c (main): Initialize and deinitialize the help
2658 * normal/cmdline.c (grub_cmdline_get): Doc fix.
2660 * normal/command.c (grub_command_init): Fixed the description of
2661 the `set' and `unset' commands.
2663 2005-01-31 Marco Gerards <metgerards@student.han.nl>
2665 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
2667 * commands/ieee1275/halt.c: New file.
2668 * commands/ieee1275/reboot.c: Likewise.
2669 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
2670 `__attribute__ ((unused))'. Some GCS related fixed.
2671 (grub_suspend_init) [GRUB_UTIL]: Function removed.
2672 (grub_suspend_fini): Likewise.
2673 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
2675 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
2676 (halt_mod_CFLAGS): New variables.
2677 * include/grub/powerpc/ieee1275/ieee1275.h
2678 (grub_ieee1275_interpret): New prototype.
2680 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
2682 * include/grub/misc.h (memmove): New prototype.
2685 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
2687 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
2688 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
2690 2005-01-22 Marco Gerards <metgerards@student.han.nl>
2692 * kern/misc.c (grub_strndup): Function rewritten.
2694 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
2696 * normal/menu.c (TERM_WIDTH): Macro redefined.
2697 (TERM_TOP_BORDER_Y): Likewise.
2698 (draw_border): Replaced while-loop by a for-loop. Make the number
2699 of lines consistent with the number of lines displayed in
2700 print_entries. Added a margin below the rectangle.
2701 (print_entry): Make the entry fit in the rectangle.
2702 (print_entries): Display the scroll arrows next to the right
2705 2005-01-21 Marco Gerards <metgerards@student.han.nl>
2707 * fs/minix.c (grub_minix_find_file): Reserve more space for
2708 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
2709 `grub_strncpy' to copy `path' into it.
2711 2005-01-21 Marco Gerards <metgerards@student.han.nl>
2713 Add the loopback device, a device via which files can be accessed
2716 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
2717 (pkgdata_MODULES): Add loopback.mod.
2718 (loopback_mod_SOURCES): New variable.
2719 (loopback_mod_CFLAGS): Likewise.
2720 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2722 (pkgdata_MODULES): Add loopback.mod.
2723 (loopback_mod_SOURCES): New variable.
2724 (loopback_mod_CFLAGS): Likewise.
2725 * disk/loopback.c: new file.
2726 * include/grub/normal.h (grub_loop_init): New prototype.
2727 (grub_loop_fini): New prototype.
2728 * util/grub-emu.c (main): Initialize and de-initialize loopback
2730 * include/grub/disk.h (grub_disk_dev_id): Add
2731 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
2733 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
2735 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
2737 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
2738 (suspend_mod_SOURCES): New variable.
2739 (suspend_mod_CFLAGS): Likewise.
2740 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
2742 * commands/ieee1275/suspend.c: New file.
2744 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
2746 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
2747 ((unused))' to `__attribute__ ((used))'.
2748 (GRUB_MOD_FINI): Likewise.
2749 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
2750 * genmk.rb (PModule): Assign space to common symbols when linking
2753 2005-01-20 Marco Gerards <metgerards@student.han.nl>
2755 * include/grub/mm.h (grub_mm_init_region): Change the type of the
2756 `unsigned' arguments to `grub_size_t'.
2757 (grub_malloc): Likewise.
2758 (grub_realloc): Likewise.
2759 (grub_memalign): Likewise.
2760 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
2761 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
2762 * util/misc.c (grub_malloc): Likewise.
2763 (grub_realloc): Likewise.
2764 * kern/mm.c (get_header_from_pointer): Change the casts to
2765 `unsigned' into a cast to `grub_size_t'.
2767 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
2768 point to `currnode' when `currnode' is changed.
2770 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
2771 Schottelius <nico-linux@schottelius.org>.
2773 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
2775 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
2776 (note_path): Remove variable.
2777 (GRUB_IEEE1275_NOTE_NAME): New macro.
2778 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
2779 (grub_ieee1275_note_hdr): New structure.
2780 (grub_ieee1275_note_desc): Likewise.
2781 (grub_ieee1275_note): Likewise.
2782 (load_note): Remove `dir' argument. All callers updated. Remove
2783 `note_img' and `path'. Do not load a file from `note_path'.
2784 Initialize a struct grub_ieee1275_note and write that to `out'.
2785 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
2787 2005-01-05 Marco Gerards <metgerards@student.han.nl>
2789 * util/misc.c (grub_util_read_image): Revert last change. It
2790 called `grub_util_read_at', which seeks from the beginning of the
2793 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
2795 * TODO: Add note about endianness in grub-mkimage.
2796 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
2798 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
2799 (grub_mkimage_SOURCES): New target.
2800 * include/grub/kernel.h (grub_start_addr): Remove variable.
2801 (grub_end_addr): Likewise.
2802 (grub_total_module_size): Likewise.
2803 (grub_kernel_image_size): Likewise.
2804 (GRUB_MODULE_MAGIC): New constant.
2805 (grub_module_info): New structure.
2806 (grub_arch_modules_addr): New prototype.
2807 (grub_get_end_addr): Remove prototype.
2808 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
2809 * include/grub/powerpc/ieee1275/kernel.h: New file.
2810 * include/grub/util/misc.h (grub_util_get_fp_size): New
2812 (grub_util_read_at): Likewise.
2813 (grub_util_write_image_at): Likewise.
2814 * kern/main.c (grub_get_end_addr): Remove function.
2815 (grub_load_modules): Call grub_arch_modules_addr instead of using
2816 grub_end_addr. Look for a grub_module_info struct in memory. Use
2817 the grub_module_info fields instead of calling grub_get_end_addr
2818 as loop conditions. Move grub_add_unused_region code here.
2819 (grub_add_unused_region): Remove function.
2820 * kern/i386/pc/init.c: Include grub/cache.h.
2821 (grub_machine_init): Remove call to grub_get_end_addr. Remove
2822 one call to add_mem_region.
2823 (grub_arch_modules_addr): New function.
2824 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
2825 (grub_total_module_size): Likewise.
2826 Include grub/machine/kernel.h.
2827 (grub_arch_modules_addr): New function.
2828 * util/grub-emu.c (grub_end_addr): Remove variable.
2829 (grub_total_module_size): Likewise.
2830 (grub_arch_modules_addr): New function.
2831 * util/misc.c: Include unistd.h.
2832 (grub_util_get_fp_size): New function.
2833 (grub_util_read_at): Likewise.
2834 (grub_util_write_image_at): Likewise.
2835 (grub_util_read_image): Call grub_util_read_at.
2836 (grub_util_write_image): Call grub_util_write_image_at.
2837 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
2838 additional memory in kernel_img for a struct grub_module_info.
2839 Fill in that grub_module_info.
2840 * util/powerpc/ieee1275/grub-mkimage.c: New file.
2842 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
2844 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
2846 * include/grub/powerpc/ieee1275/ieee1275.h
2847 (grub_ieee1275_milliseconds): New prototype.
2848 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
2850 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
2851 grub_ieee1275_milliseconds.
2853 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
2855 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
2857 (find_options): New function.
2858 (cmain): Call find_options.
2859 * include/grub/powerpc/ieee1275/ieee1275.h
2860 (grub_ieee1275_realmode): New extern variable.
2861 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
2862 grub_map if grub_ieee1275_realmode is false.
2864 2004-12-29 Marco Gerards <metgerards@student.han.nl>
2866 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
2867 lines are inserted and make it work like readline. Reported by
2868 Vincent Pelletier <subdino2004@yahoo.fr>.
2870 2004-12-28 Marco Gerards <metgerards@student.han.nl>
2872 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
2874 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
2875 `kern/powerpc/cache.S'.
2877 2004-12-27 Marco Gerards <metgerards@student.han.nl>
2879 * genmk.rb: Handle the `Program' class in the main loop. Written
2880 by Johan Rydberg <jrydberg@gnu.org>.
2881 (Program): New class.
2882 (programs): New variable.
2883 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
2884 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
2885 instead of "grub/kernel.h". Include <grub/machine/init.h>.
2886 (help_arch): Function removed.
2887 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
2888 `powerpc/libgcc.h' and `loader.h'.
2889 (pkgdata_PROGRAMS): New variable.
2890 (sbin_UTILITIES): Variable removed.
2891 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
2892 (grubof_SOURCES): Variable re-defined so it only includes the
2894 (grubof_CFLAGS): Remove `-DGRUBOF'.
2895 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
2896 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
2897 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
2898 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
2899 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
2900 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
2901 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
2902 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
2903 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
2904 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
2905 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
2906 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
2907 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
2908 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
2909 (pc_mod_CFLAGS): New variables.
2910 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
2911 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
2912 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
2913 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
2915 * include/grub/i386/pc/init.h (grub_os_area_addr)
2916 (rub_os_area_size): ... to here.
2917 * include/grub/powerpc/ieee1275/ieee1275.h
2918 (grub_ieee1275_entry_fn): Export symbol.
2919 * include/grub/powerpc/ieee1275/init.h: New file.
2920 * include/grub/powerpc/libgcc.h: Likewise.
2921 * include/grub/cache.h: Likewise.
2922 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
2923 <hollis@penguinppc.org>.
2924 * kern/dl.c: Include <grub/cache.h>.
2925 (grub_dl_flush_cache): New function.
2926 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
2928 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
2929 (grub_console_init): Removed prototypes.
2930 (grub_machine_init): Don't initialize the modules anymore.
2931 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
2933 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
2934 Macro undef removed.
2935 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
2936 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
2937 relocation `R_PPC_REL32'. Return an error when the relocation is
2939 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
2940 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
2941 * util/misc.c (grub_arch_sync_caches): Likewise.
2943 2004-12-19 Marco Gerards <metgerards@student.han.nl>
2945 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
2946 `symlist.c', add `grubof_symlist.c'.
2947 (symlist.c): Variable removed.
2948 (grubof_HEADERS): Variable added.
2949 (grubof_symlist.c): New target.
2950 (kernel_syms.lst): Use `grubof_HEADERS' instead of
2951 `kernel_img_HEADERS'.
2952 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
2953 * kern/powerpc/dl.c: New file.
2954 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
2956 (grub_arch_dl_relocate_symbols): Likewise.
2957 (grub_register_exported_symbols): Likewise.
2959 2004-12-13 Marco Gerards <metgerards@student.han.nl>
2961 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
2962 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
2963 to fail instead. Reported by Vincent Pelletier
2964 <subdino2004@yahoo.fr>.
2966 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
2967 it is not allocated. Reported by Vincent Pelletier
2968 <subdino2004@yahoo.fr>.
2970 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
2971 output so the output looks better.
2973 2004-12-04 Marco Gerards <metgerards@student.han.nl>
2975 Modulize the partition map support and add support for the amiga
2978 * commands/ls.c: Include <grub/partition.h> instead of
2979 <grub/machine/partition.h>.
2980 * kern/disk.c: Likewise.
2981 * kern/rescue.c: Likewise.
2982 * loader/i386/pc/chainloader.c: Likewise.
2983 * normal/cmdline.c: Likewise.
2984 * kern/powerpc/ieee1275/init.c: Likewise.
2985 (grub_machine_init): Call `grub_pc_partition_map_init',
2986 `grub_amiga_partition_map_init' and
2987 `grub_apple_partition_map_init'.
2988 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
2989 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
2990 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
2991 `partition.h' and `pc_partition.h'.
2992 (grub_setup_SOURCES): Remove
2993 `disk/i386/pc/partition.c'. Add `kern/partition.c',
2994 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
2995 (grub_emu_SOURCES): Likewise.
2996 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
2997 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
2998 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
2999 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
3000 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
3001 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
3002 (grubof_SOURCES): Likewise.
3003 * disk/i386/pc/partition.c: File removed.
3004 * disk/powerpc/ieee1275/partition.c: Likewise.
3005 * include/grub/powerpc/ieee1275/partition.h: Likewise.
3006 * include/grub/i386/pc/partition.h: Likewise.
3007 * kern/partition.c: New file.
3008 * partmap/amiga.c: Likewise.
3009 * partmap/apple.c: Likewise.
3010 * partmap/pc.c: Likewise.
3011 * include/grub/partition.h: Likewise..
3012 * include/grub/pc_partition.h: Likewise.
3013 * util/grub-emu.c: Include <grub/partition.h> instead of
3014 <grub/machine/partition.h>.
3015 (main): Call `grub_pc_partition_map_init',
3016 `grub_amiga_partition_map_init' and
3017 `grub_apple_partition_map_init' and deinitialize afterwards.
3018 * util/i386/pc/biosdisk.c: Include `#include
3019 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
3020 `<grub/machine/partition.h>'.
3021 * util/i386/pc/grub-setup.c: Likewise.
3022 * util/i386/pc/biosdisk.c: Likewise.
3023 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
3024 partition information in case of a PC partition.
3025 * util/i386/pc/grub-setup.c: Include `#include
3026 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
3027 `<grub/machine/partition.h>'.
3028 (setup): Only access the PC specific partition information in case
3031 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
3033 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
3034 (grub_longjmp): Likewise.
3035 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
3037 * normal/powerpc/setjmp.S: New file.
3038 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
3039 `normal/powerpc/setjmp.S'.
3040 (grubof_CFLAGS): Add `-DGRUBOF'.
3041 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
3042 [GRUB_UTIL && !GRUBOF].
3044 2004-11-16 Marco Gerards <metgerards@student.han.nl>
3046 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
3047 property named `name'. Correctly handle the error returned by
3048 `grub_ieee1275_finddevice' if a device can not be opened.
3050 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
3052 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
3053 `actual' for negativity.
3054 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
3057 2004-11-01 Marco Gerards <metgerards@student.han.nl>
3059 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
3060 (PAGE_OFFSET): New macro.
3061 (CRTC_ADDR_PORT): Likewise.
3062 (CRTC_DATA_PORT): Likewise.
3063 (START_ADDR_HIGH_REGISTER): Likewise.
3064 (START_ADDR_LOW_REGISTER): Likewise.
3065 (GRAPHICS_ADDR_PORT): Likewise.
3066 (GRAPHICS_DATA_PORT): Likewise.
3067 (READ_MAP_REGISTER): Likewise.
3068 (INPUT_STATUS1_REGISTER): Likewise.
3069 (INPUT_STATUS1_VERTR_BIT): Likewise.
3070 (page): New variable.
3071 (wait_vretrace): New function.
3072 (set_read_map): Likewise.
3073 (set_start_address): Likewise.
3074 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
3076 (check_vga_mem): Take the page into account.
3077 (write_char): Likewise.
3078 (write_cursor): Likewise.
3079 (scroll_up): Likewise. Copy the page to the page that is not
3080 shown and switch between both pages.
3081 (grub_vga_putchar): Fix off by one error.
3082 (grub_vga_cls): Wait for the vertical retrace. Take the page into
3085 2004-11-01 Marco Gerards <metgerards@student.han.nl>
3087 Add support for iso9660 (including rockridge).
3089 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
3090 (iso9660_mod_SOURCES): New variable.
3091 (iso9660_mod_CFLAGS): Likewise.
3092 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
3093 * include/grub/fs.h (grub_iso9660_init): New prototype.
3094 * util/grub-emu.c (main): Call `grub_iso9660_init'.
3095 * fs/iso9660.c: New file.
3097 * include/grub/misc.h (grub_strncat): New prototype.
3098 * kern/misc.c (grub_strncat): New function.
3100 * fs/hfs.c (grub_hfs_mount): Translate the error
3101 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
3102 * fs/jfs.c (grub_jfs_mount): Likewise.
3103 * fs/ufs.c (grub_ufs_mount): Likewise.
3105 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
3107 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
3108 which initialized BAT registers.
3109 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
3110 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
3112 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
3113 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
3115 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
3116 (grub_mapclaim): Likewise.
3117 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
3118 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
3121 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
3123 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
3124 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
3125 -ffreestanding and -msoft-float.
3127 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
3129 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
3130 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
3131 set in grub_ieee1275_flags.
3133 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
3135 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
3137 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
3138 grub_console_init first.
3139 Change the memory range used for grub_ieee1275_claim and
3140 grub_mm_init_region.
3141 Print an error message if the claim fails.
3142 Include <grub/misc.h>.
3144 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
3146 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
3147 Call grub_children_iterate for device nodes of type `scsi',
3149 (grub_ofdisk_open): Remove manual device alias resolution.
3150 Fix memory leak when device cannot be opened.
3151 * include/grub/powerpc/ieee1275/ieee1275.h
3152 (grub_children_iterate): New prototype.
3153 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
3155 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
3156 Return -1 if args.size was -1.
3158 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
3160 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
3161 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
3162 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
3163 Open Firmware's memory for it; claim memory from _start to _end.
3164 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
3166 (_start): Zero BSS from __bss_start to _end.
3167 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
3169 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
3171 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
3173 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
3174 -1 if args.base was -1.
3176 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
3178 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
3179 escape sequence instead of a literal ^L. Also call
3180 grub_ofconsole_gotoxy.
3182 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
3184 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
3185 void * arguments to grub_addr_t. All callers updated. Also make
3186 the `result' argument optional.
3187 (grub_ieee1275_release): change void * arguments to grub_addr_t.
3188 All callers updated.
3190 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
3192 * commands/ls.c (grub_ls_list_files): Use the string following the
3193 initial ')', if present, as the filesystem path.
3194 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
3196 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
3198 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
3200 Make the source code of the menu interface more readable.
3202 * normal/menu.c: Include grub/mm.h.
3203 (TERM_WIDTH): New macro.
3204 (TERM_HEIGHT): Likewise.
3205 (TERM_INFO_HEIGHT): Likewise.
3206 (TERM_MARGIN): Likewise.
3207 (TERM_SCROLL_WIDTH): Likewise.
3208 (TERM_TOP_BORDER_Y): Likewise.
3209 (TERM_LEFT_BORDER_X): Likewise.
3210 (TERM_BORDER_WIDTH): Likewise.
3211 (TERM_MESSAGE_HEIGHT): Likewise.
3212 (TERM_BORDER_HEIGHT): Likewise.
3213 (TERM_NUM_ENTRIES): Likewise.
3214 (TERM_FIRST_ENTRY_Y): Likewise.
3215 (TERM_ENTRY_WIDTH): Likewise.
3216 (TERM_CURSOR_X): Likewise.
3217 (draw_border): Use macros instead of magic numbers.
3218 (print_entry): Likewise.
3219 (print_entries): Likewise.
3220 (run_menu): Likewise. Also, handle the key 'e'.
3221 (run_menu_entry): Ignore empty command lines.
3222 (print_message): Added a new argument EDIT. If EDIT is true,
3223 print a different message.
3224 (init_page): Likewise.
3225 (edit_menu_entry): New function. Not implemented yet.
3227 2004-09-17 Marco Gerards <metgerards@student.han.nl>
3229 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
3230 can be loaded from normal mode.
3232 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
3234 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
3235 (multiboot_mod_CFLAGS): New variables.
3236 * loader/i386/pc/linux_normal.c: New file.
3237 * loader/i386/pc/multiboot_normal.c: Likewise.
3239 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
3242 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
3243 `fdiro' to read the mode information from instead of `diro'.
3245 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
3246 looking up a symlink.
3248 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
3250 * normal/command.c (grub_command_execute): Don't parse the
3251 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
3252 flags of the command.
3254 * normal/menu.c (grub_menu_run): Fix typo.
3256 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
3258 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
3260 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
3261 `y + 1' instead of `y - 1'.
3263 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
3265 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
3267 From Hollis Blanchard <hollis@penguinppc.org>:
3268 * kern/misc.c (memmove): New alias for grub_memmove.
3269 (memcmp): New alias for grub_memcmp.
3270 (memset): New alias for grub_memset.
3271 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
3272 Change "int handle" to "grub_ieee1275_phandle_t handle".
3273 * include/grub/powerpc/ieee1275/ieee1275.h
3274 (grub_ieee1275_get_property): Likewise.
3276 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
3278 Added normal mode command `chainloader' as module chain.mod, which
3279 depends on normal.mod and _chain.mod.
3281 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
3282 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
3283 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
3285 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
3286 but arguments parsing moved to ...
3287 (grub_chainloader_cmd): ... here. New function.
3288 * include/grub/i386/pc/chainloader.h: New file.
3289 * loader/i386/pc/chainloader_normal.c: Likewise.
3291 2004-09-11 Marco Gerards <metgerards@student.han.nl>
3293 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
3294 (grub_mkimage_LDFLAGS): Likewise.
3295 (grub_emu_SOURCES): Likewise.
3296 (kernel_img_HEADERS): Added fshelp.h.
3297 * fs/ext2.c: Include <grub/fshelp.h>.
3298 (FILETYPE_REG): New macro.
3299 (FILETYPE_INO_REG): Likewise.
3300 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
3302 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
3304 (grub_fshelp_node): New struct.
3305 (grub_ext2_data): Added member `diropen'. Changed member `inode'
3307 (grub_ext2_get_file_block): Removed function.
3308 (grub_ext2_read_block): New function.
3309 (grub_ext2_read_file): Replaced parameter `data' by `node'.
3310 This function was written.
3311 (grub_ext2_mount): Read the root inode. Create a diropen struct.
3312 (grub_ext2_find_file): Removed function.
3313 (grub_ext2_read_symlink): New function.
3314 (grub_ext2_iterate_dir): Likewise.
3315 (grub_ext2_open): Rewritten.
3316 (grub_ext2_dir): Rewritten.
3317 * include/grub/fshelp.h: New file.
3318 * fs/fshelp.c: Likewise.
3320 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
3322 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
3323 (print_message): Add a missing newline.
3324 (run_menu): Added timeout support.
3325 (run_menu_entry): New local function.
3326 (grub_menu_run): Added support for booting.
3328 * kern/loader.c (grub_loader_is_loaded): New function.
3330 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
3331 (grub_get_rtc): Exported.
3333 * include/grub/i386/pc/time.h: Include grub/symbol.h.
3334 (grub_get_rtc): Exported.
3336 * include/grub/normal.h (struct grub_command_list): Remove
3337 constant from the member `command'.
3339 * include/grub/loader.h (grub_loader_is_loaded): Declared.
3341 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
3343 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
3345 2004-08-28 Marco Gerards <metgerards@student.han.nl>
3347 Add support for the JFS filesystem.
3349 * fs/jfs.c: New file.
3350 * include/grub/fs.h (grub_jfs_init): New prototype.
3351 (grub_jfs_fini): New prototype.
3352 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
3353 (grub_emu_SOURCES): Likewise.
3354 (pkgdata_MODULES): Add jfs.mod.
3355 (jfs_mod_SOURCES): New variable.
3356 (jfs_mod_CFLAGS): Likewise.
3357 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
3358 (grubof_SOURCES): Likewise.
3359 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
3361 * fs/fat.c (grub_fat_find_dir): Convert the filename little
3362 endian to the host endian.
3363 (grub_fat_utf16_to_utf8): Move function from there...
3364 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
3365 the endianess of the source string anymore.
3366 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
3368 2004-08-24 Marco Gerards <metgerards@student.han.nl>
3370 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
3371 (grub_boot_fini) [GRUB_UTIL]: Likewise.
3372 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
3373 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
3375 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
3376 (grub_hfs_iterate_dir): Make the function static. Add prototypes
3377 for `node_found' and `it_dir'.
3378 (grub_hfs_dir): Add prototype for `dir_hook'.
3380 * fs/minix.c (grub_minix_get_file_block): Add prototype for
3381 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
3382 and `indir32' to silence a gcc warning.
3384 * include/grub/fs.h (grub_hfs_init): New prototype.
3385 (grub_hfs_fini): Likewise.
3388 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
3390 Each disk device has its own id now. This is useful to make use
3391 of multiple disk devices.
3393 * include/grub/disk.h (grub_disk_dev_id): New enum.
3394 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
3395 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
3397 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
3398 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
3400 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
3401 GRUB_DISK_DEVICE_OFDISK_ID as an id.
3403 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
3404 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
3406 * include/grub/disk.h (struct grub_disk_dev): Added a new member
3407 "id" which is used by the cache manager.
3409 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
3412 2004-08-18 Marco Gerards <metgerards@student.han.nl>
3414 * fs/hfs.c: New file.
3415 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
3416 (grub_emu_SOURCES): Likewise.
3417 (pkgdata_MODULES): Add hfs.mod.
3418 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
3419 (grubof_SOURCES): Likewise.
3420 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
3422 * include/grub/misc.h (grub_strncasecmp): Add prototype.
3423 * kern/misc.c (grub_strncasecmp): Add function.
3425 2004-08-14 Marco Gerards <metgerards@student.han.nl>
3427 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
3430 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
3431 (grub_ext2_dir): In case the directory entry type is unknown, read
3434 2004-08-02 Peter Bruin <pjbruin@dds.nl>
3436 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
3437 grub_load_linux instead of grub_rescue_cmd_linux as second
3438 argument of grub_rescue_register_command.
3440 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
3442 2004-07-27 Marco Gerards <metgerards@student.han.nl>
3444 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
3446 * commands/boot.c: Remove the check for `GRUB_UTIL'.
3447 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
3448 `loader/powerpc/ieee1275/linux.c',
3449 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
3450 * include/grub/powerpc/ieee1275/ieee1275.h
3451 (grub_ieee1275_release): New prototype.
3452 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
3453 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
3454 normal, boot, linux and linux_normal.
3455 * loader/powerpc/ieee1275/linux.c: New file.
3456 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3458 2004-07-12 Marco Gerards <metgerards@student.han.nl>
3460 * normal/arg.c (grub_arg_parse): Correct error handling after
3461 reallocating the argumentlist (check if `argl' is not null instead
3462 of checking if `args' is not null).
3463 * kern/mm.c (grub_realloc): Return the same pointer when using the
3464 same region, instead of returning the header address.
3466 2004-07-11 Marco Gerards <metgerards@student.han.nl>
3468 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
3469 one block instead of two when looking for the initial partition.
3470 (grub_partition_probe): Initialize the local variable `p' with 0.
3471 Use base 10 for the grub_strtoul call.
3472 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
3473 need for one local variable.
3474 (grub_strtoul): Don't add the new value to `num', instead of that
3477 2004-07-11 Marco Gerards <metgerards@student.han.nl>
3479 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
3480 (pxeboot_img_SOURCES): New variable.
3481 (pxeboot_img_ASFLAGS): Likewise.
3482 (pxeboot_img_LDFLAGS): Likewise.
3483 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
3484 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
3485 <lode_leroy@hotmail.com>.
3487 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
3489 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
3492 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
3494 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
3495 the history buffer logic.
3497 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
3499 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
3500 (FILETYPE_INO_SYMLINK): New macros.
3501 (grub_ext2_find_file): Check if the node is a directory using the
3502 inode stat information instead of using the filetype in the
3503 dirent. Exclude the first character of an absolute symlink.
3504 (grub_ext2_dir): Mask out the filetype part of the mode member of
3507 2004-05-24 Marco Gerards <metgerards@student.han.nl>
3509 Add support for UFS version 1 and 2. Add support for the minix
3510 filesystem version 1 and 2, both the variants with 14 and 30 long
3513 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
3515 (grub_emu_SOURCES): Likewise.
3516 (pkgdata_MODULES): Add ufs.mod and minix.mod.
3517 (ufs_mod_SOURCES): New variable.
3518 (ufs_mod_CFLAGS): Likewise.
3519 (minix_mod_SOURCES): Likewise.
3520 (minix_mod_CFLAGS): Likewise.
3521 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
3523 (grubof_SOURCES): Likewise.
3524 * fs/ufs.c: New file.
3525 * fs/minix.c: New file.
3526 * include/grub/fs.h (grub_ufs_init): New prototype.
3527 (grub_ufs_fini): Likewise.
3528 (grub_minix_init): Likewise.
3529 (grub_minix_fini): Likewise.
3530 * util/grub-emu.c (main): Initialize and deinitialize UFS and
3533 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
3535 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
3536 commands/ls.c, commands/terminal.c, commands/boot.c,
3537 commands/cmp.c and commands/cat.c.
3538 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
3540 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
3543 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3545 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
3546 and grub_, respectively. Because the conversion is trivial and
3547 mechanical, I omit the details here. Please refer to the CVS
3548 if you need more information.
3550 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3552 * include/pupa: Renamed to ...
3553 * include/grub: ... this.
3554 * util/i386/pc/pupa-mkimage.c: Renamed to ...
3555 * util/i386/pc/grub-mkimage.c: ... this.
3556 * util/i386/pc/pupa-setup.c: Renamed to ...
3557 * util/i386/pc/grub-setup.c: ... this.
3558 * util/pupa-emu.c: Renamed to ...
3559 * util/grub-emu.c: ... this.
3561 2004-03-29 Marco Gerards <metgerards@student.han.nl>
3563 Add support for the newworld apple macintosh (PPC). This has been
3564 tested on the powerbook 2000 only. It only adds support for
3565 generic ieee1275 functions, console and disk support. This should
3566 be easy to port to other architectures with support for Open
3569 * configure.ac: Accept the powerpc as host_cpu. In the case of
3570 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
3571 specific tests are only executed while building for the i386.
3572 Inverse test for crosscompile.
3573 * genmk.rb (Utility): Allow assembler files.
3574 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
3575 * conf/powerpc-ieee1275.rmk: New file.
3576 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
3577 * disk/powerpc/ieee1275/partition.c: Likewise.
3578 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
3579 * include/pupa/powerpc/ieee1275/console.h: Likewise.
3580 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
3581 * include/pupa/powerpc/ieee1275/time.h: Likewise.
3582 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
3583 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
3584 * include/pupa/powerpc/ieee1275/loader.h
3585 * include/pupa/powerpc/setjmp.h: Likewise.
3586 * include/pupa/powerpc/types.h: Likewise.
3587 * kern/powerpc/ieee1275/init.c: Likewise.
3588 * kern/powerpc/ieee1275/openfw.c: Likewise.
3589 * term/powerpc/ieee1275/ofconsole.c: Likewise.
3591 These files were written by Johan Rydberg
3592 (jrydberg@night.trouble.net) and I only modified them slightly.
3594 * boot/powerpc/ieee1275/cmain.c: New file.
3595 * boot/powerpc/ieee1275/crt0.S: Likewise.
3596 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
3597 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
3599 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
3601 * Makefile.in: Update copyright.
3602 * genmodsrc.sh: Likewise.
3603 * gensymlist.sh: Likewise.
3604 * term/i386/pc/vga.c: Indent correctly.
3606 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
3607 bugreporting address.
3608 * util/i386/pc/pupa-setup.c (usage): Likewise,
3609 (main): Call pupa_ext2_init and pupa_ext2_fini.
3611 * fs/fat.c (log2): Renamed to ...
3612 (fat_log2): ... this.
3613 All callers changed.
3614 * kern/misc.c (memcpy): Alias to pupa_memmove.
3615 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
3617 * util/console.c (pupa_ncurses_fini): Return 0.
3619 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
3620 Move fail label here.
3621 [__GNU__]: Don't warn when using stat.
3622 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
3623 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
3624 long int. Use strtol instead of strtoul.
3626 2004-03-14 Marco Gerards <metgerards@student.han.nl>
3628 * commands/boot.c: New file.
3629 * commands/cat.c: Likewise.
3630 * commands/cmp.c: Likewise.
3631 * commands/ls.c: Likewise.
3632 * commands/terminal.c: Likewise.
3633 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
3634 (pupa_register_command): Changed interface to match the new
3636 (pupa_command_execute): Changed (almost rewritten) so it uses
3637 pupa_split_command. Added support for setting variables using the
3639 (rescue_command): Changed to work with the new argument parser.
3640 (terminal_command): Moved from here to commands/terminal.c.
3641 (set_command): New function.
3642 (unset_command): New function.
3643 (insmod_command): New function.
3644 (rmmod_command): New function.
3645 (lsmod_command): New function.
3646 (pupa_command_init): Don't initialize the command terminal
3647 anymore. Initialize the commands set, unset, insmod, rmmod and
3649 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
3650 (kernel_img_HEADERS): Add arg.h and env.h.
3651 (pupa_mkimage_LDFLAGS): Add kern/env.c.
3652 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
3653 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
3655 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
3657 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
3658 (boot_mod_SOURCES): New variable.
3659 (terminal_mod_SOURCES): Likewise.
3660 (ls_mod_SOURCES): Likewise.
3661 (cmp_mod_SOURCES): Likewise.
3662 (cat_mod_SOURCES): Likewise.
3664 * normal/arg.c: New file.
3665 * kern/env.c: Likewise.
3666 * include/pupa/arg.h: Likewise.
3667 * include/pupa/env.h: Likewise.
3668 * font/manager.c (font_command): Changed to match argument parsing
3670 (PUPA_MOD_INIT): Likewise.
3671 * hello/hello.c (pupa_cmd_hello): Likewise.
3672 (PUPA_MOD_INIT): Likewise.
3673 * include/pupa/disk.h: Include <pupa/device.h>.
3674 (pupa_print_partinfo): New prototype.
3675 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
3676 (pupa_dl_get_prefix): Likewise.
3677 * include/pupa/misc.h: Include <pupa/err.h>.
3678 (pupa_isgraph): New prototype.
3679 (pupa_isdigit): Likewise.
3680 (pupa_split_cmdline): Likewise.
3681 * include/pupa/normal.h: Include <pupa/arg.h>.
3682 (pupa_command): Changed the prototype of the member `func' to
3683 match the argument parsing interface. Added member `options'.
3684 (pupa_register_command): Updated to match function.
3685 (pupa_arg_parse): New prototype.
3686 (pupa_hello_init) [PUPA_UTIL]: New prototype.
3687 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
3688 (pupa_ls_init) [PUPA_UTIL]: Likewise.
3689 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
3690 (pupa_cat_init) [PUPA_UTIL]: Likewise.
3691 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
3692 (pupa_boot_init) [PUPA_UTIL]: Likewise.
3693 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
3694 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
3695 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
3696 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
3697 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
3698 * kern/disk.c: Include <pupa/file.h>.
3699 (pupa_print_partinfo): New function.
3700 * kern/dl.c: Include <pupa/env.h>.
3701 (pupa_dl_dir): Variable removed.
3702 (pupa_dl_load): Use the environment variable `prefix' instead of
3703 the variable pupa_dl_dir.
3704 (pupa_dl_set_prefix): Function removed.
3705 (pupa_dl_get_prefix): Likewise.
3706 * kern/i386/pc/init.c: Include <pupa/env.h>.
3707 (pupa_machine_init): Use the environment variable `prefix' instead of
3708 using pupa_dl_set_prefix to set the prefix.
3709 * kern/main.c: Include <pupa/env.h>.
3710 (pupa_set_root_dev): Use the environment variable `prefix' instead of
3711 using pupa_dl_get_prefix to get the prefix.
3712 * kern/misc.c: Include <pupa/env.h>.
3713 (pupa_isdigit): New function.
3714 (pupa_isgraph): Likewise.
3715 (pupa_ftoa): Likewise.
3716 (pupa_vsprintf): Added support for printing values of the type
3717 `double'. Make it possible to format variable output when using
3718 formatting like `%1.2%f'.
3719 (pupa_split_cmdline): New function.
3720 * kern/rescue.c: Include <pupa/env.h>.
3721 (next_word): Removed function.
3722 (pupa_rescue_cmd_prefix): Likewise.
3723 (pupa_rescue_cmd_set): New function.
3724 (pupa_rescue_cmd_unset): New function.
3725 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
3726 split the command line instead of splitting it here. Added
3727 support for setting variables using the syntax `foo=bar'. Don't
3728 initialize the prefix command anymore. Initialized the set and
3730 * normal/cmdline.c: Include <pupa/env.h>.
3731 (pupa_tab_complete): Added prototypes for print_simple_completion,
3732 print_partition_completion, add_completion, iterate_commands,
3733 iterate_dev, iterate_part and iterate_dir. Moved code to print
3734 partition information from here to kern/disk.c.
3735 (pupa_cmdline_run): Don't check if the funtion exists anymore.
3736 * normal/main.c: Include <pupa/env.h>.
3737 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
3738 instead of using pupa_dl_get_prefix to get the prefix.
3739 * term/i386/pc/vga.c: Include <pupa/arg.h>.
3740 (check_vga_mem): Cast pointers to `void *' to silence a gcc
3742 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
3743 (pupa_vga_setcolor): Declare unused variables with `__attribute__
3744 ((unused))' to silence a gcc warning.
3745 (pupa_vga_setcolor): Likewise.
3746 (debug_command): Changed to match argument parsing
3748 * util/pupa-emu.c: Include <pupa/env.h>.
3749 (options): Added 0's for unused fields to silence a gcc warning.
3751 (main): Use the environment variable `prefix' instead of using
3752 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
3753 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
3756 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
3757 * util/misc.c: Include <malloc.h>.
3758 (pupa_malloc): Rewritten so errors are correctly reported.
3759 (pupa_realloc): Likewise.
3760 (pupa_memalign): Likewise.
3761 (pupa_mm_init_region): Declare unused variables with
3762 `__attribute__ ((unused))' to silence a gcc warning.
3763 * normal/i386/setjmp.S: Remove tab at the end of the file to
3764 silence a gcc warning.
3765 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
3766 variables with `__attribute__ ((unused))' to silence a gcc
3768 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
3769 local variable i unsigned to silence a gcc warning.
3771 * kern/term.c: Include <pupa/misc.h>.
3772 (pupa_more_lines): New variable.
3773 (pupa_more): Likewise.
3774 (pupa_putcode): When the pager is active pause at the end of every
3776 (pupa_set_more): New function.
3777 * include/pupa/term.h (pupa_set_more): New prototype.
3780 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
3782 Now this project is GRUB 2 rather than PUPA. The location of
3783 the CVS repository was moved to GRUB's.
3785 * configure.ac: Use bug-grub as the reporting address.
3786 Use GRUB instead of PUPA.
3787 Change the version number to 1.90.
3789 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
3791 * genkernsyms.sh: Updated copyright information.
3792 * genmk.rb: Likewise.
3793 * genmodsrc.sh: Likewise.
3794 * gensymlist.sh: Likewise.
3795 * boot/i386/pc/boot.S: Likewise.
3796 * boot/i386/pc/diskboot.S: Likewise.
3797 * disk/i386/pc/biosdisk.c: Likewise.
3798 * disk/i386/pc/partition.c: Likewise.
3799 * font/manager.c: Likewise.
3800 * fs/ext2.c: Likewise.
3801 * fs/fat.c: Likewise.
3802 * include/pupa/boot.h: Likewise.
3803 * include/pupa/device.h: Likewise.
3804 * include/pupa/disk.h: Likewise.
3805 * include/pupa/dl.h: Likewise.
3806 * include/pupa/elf.h: Likewise.
3807 * include/pupa/err.h: Likewise.
3808 * include/pupa/file.h: Likewise.
3809 * include/pupa/font.h: Likewise.
3810 * include/pupa/fs.h: Likewise.
3811 * include/pupa/kernel.h: Likewise.
3812 * include/pupa/loader.h: Likewise.
3813 * include/pupa/misc.h: Likewise.
3814 * include/pupa/mm.h: Likewise.
3815 * include/pupa/net.h: Likewise.
3816 * include/pupa/normal.h: Likewise.
3817 * include/pupa/rescue.h: Likewise.
3818 * include/pupa/setjmp.h: Likewise.
3819 * include/pupa/symbol.h: Likewise.
3820 * include/pupa/term.h: Likewise.
3821 * include/pupa/types.h: Likewise.
3822 * include/pupa/i386/setjmp.h: Likewise.
3823 * include/pupa/i386/types.h: Likewise.
3824 * include/pupa/i386/pc/biosdisk.h: Likewise.
3825 * include/pupa/i386/pc/boot.h: Likewise.
3826 * include/pupa/i386/pc/console.h: Likewise.
3827 * include/pupa/i386/pc/init.h: Likewise.
3828 * include/pupa/i386/pc/kernel.h: Likewise.
3829 * include/pupa/i386/pc/linux.h: Likewise.
3830 * include/pupa/i386/pc/loader.h: Likewise.
3831 * include/pupa/i386/pc/memory.h: Likewise.
3832 * include/pupa/i386/pc/multiboot.h: Likewise.
3833 * include/pupa/i386/pc/partition.h: Likewise.
3834 * include/pupa/i386/pc/time.h: Likewise.
3835 * include/pupa/i386/pc/vga.h: Likewise.
3836 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
3837 * include/pupa/util/getroot.h: Likewise.
3838 * include/pupa/util/misc.h: Likewise.
3839 * include/pupa/util/resolve.h: Likewise.
3840 * kern/device.c: Likewise.
3841 * kern/disk.c: Likewise.
3842 * kern/dl.c: Likewise.
3843 * kern/err.c: Likewise.
3844 * kern/file.c: Likewise.
3845 * kern/fs.c: Likewise.
3846 * kern/loader.c: Likewise.
3847 * kern/main.c: Likewise.
3848 * kern/misc.c: Likewise.
3849 * kern/mm.c: Likewise.
3850 * kern/rescue.c: Likewise.
3851 * kern/term.c: Likewise.
3852 * kern/i386/dl.c: Likewise.
3853 * kern/i386/pc/init.c: Likewise.
3854 * kern/i386/pc/lzo1x.S: Likewise.
3855 * kern/i386/pc/startup.S: Likewise.
3856 * loader/i386/pc/chainloader.c: Likewise.
3857 * loader/i386/pc/linux.c: Likewise.
3858 * loader/i386/pc/multiboot.c: Likewise.
3859 * normal/cmdline.c: Likewise.
3860 * normal/command.c: Likewise.
3861 * normal/main.c: Likewise.
3862 * normal/menu.c: Likewise.
3863 * normal/i386/setjmp.S: Likewise.
3864 * term/i386/pc/console.c: Likewise.
3865 * term/i386/pc/vga.c: Likewise.
3866 * util/console.c: Likewise.
3867 * util/genmoddep.c: Likewise.
3868 * util/misc.c: Likewise.
3869 * util/pupa-emu.c: Likewise.
3870 * util/resolve.c: Likewise.
3871 * util/unifont2pff.rb: Likewise.
3872 * util/i386/pc/biosdisk.c: Likewise.
3873 * util/i386/pc/getroot.c: Likewise.
3874 * util/i386/pc/pupa-mkimage.c: Likewise.
3875 * util/i386/pc/pupa-setup.c: Likewise.
3877 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
3879 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
3880 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
3881 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
3882 reading and reset it after reading.
3883 (pupa_ext2_close): Return PUPA_ERR_NONE.
3885 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
3887 (struct linux_kernel_header): Add kernel_version and
3889 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
3890 pupa_file_read succeeds.
3891 (pupa_rescue_cmd_initrd): Implement.
3893 2003-12-03 Marco Gerards <metgerards@student.han.nl>
3895 * fs/ext2.c (pupa_ext2_label): New function.
3896 (pupa_ext2_fs): Added label.
3897 * fs/fat.c (pupa_fat_label): New function.
3898 (pupa_fat_fs): Added label.
3899 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
3901 * kern/misc.c (pupa_strndup): New function.
3902 * include/pupa/misc.h (pupa_strndup): New prototype.
3904 * include/pupa/normal.h: Include <pupa/err.h>.
3905 (pupa_set_history): New prototype.
3906 (pupa_iterate_commands): New prototype.
3907 * normal/cmdline.c: Include <pupa/machine/partition.h>,
3908 <pupa/disk.h>, <pupa/file.h>.
3909 (hist_size): New variable.
3910 (hist_lines): Likewise.
3911 (hist_end): Likewise.
3912 (hist_used): Likewise.
3913 (pupa_set_history): New function.
3914 (pupa_history_get): Likewise.
3915 (pupa_history_add): Likewise.
3916 (pupa_history_replace): Likewise.
3917 (pupa_tab_complete): Likewise.
3918 (pupa_cmdline_run): Added tab completion and history buffer. Tab
3919 completion shows partitionnames while completing partitions, this
3920 feature was suggested by Jeff Bailey.
3921 * normal/command.c (pupa_iterate_commands): New function.
3922 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
3923 (pupa_normal_init): Initialize history buffer.
3924 (PUPA_MOD_INIT): Likewise.
3925 (pupa_normal_fini): Free the history buffer.
3926 (PUPA_MOD_FINI): Likewise.
3928 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
3931 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
3932 * configure.ac [i386]: Check for regparam bug.
3933 (NESTED_FUNC_ATTR) [! i386]: Defined.
3935 2003-11-17 Marco Gerards <metgerards@student.han.nl>
3937 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
3938 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
3939 (pupa_emu_SOURCES): New variable.
3940 (pupa_emu_LDFLAGS): Likewise.
3941 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
3942 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
3943 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
3944 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
3945 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
3946 (pupa_jmp_buf): New typedef.
3947 (pupa_setjmp) [PUPA_UTIL]: New macro.
3948 (pupa_longjmp) [PUPA_UTIL]: Likewise.
3949 * include/pupa/term.h (struct pupa_term): New member `refresh'.
3950 (pupa_refresh): New prototype.
3951 * include/pupa/util/getroot.h: New file.
3952 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
3954 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
3955 (pupa_rescue_cmd_cat): Likewise.
3956 (pupa_rescue_cmd_ls): Likewise.
3957 (pupa_rescue_cmd_testload): Likewise.
3958 (pupa_rescue_cmd_lsmod): Likewise.
3959 * normal/cmdline.c (pupa_cmdline_get): Likewise.
3960 * normal/menu.c (run_menu): Likewise.
3961 * kern/term.c (pupa_cls): Likewise.
3962 (pupa_refresh): New function.
3963 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
3964 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
3965 * util/console.c: New file.
3967 * util/i386/pc/getroot.c: New file.
3968 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
3969 (pupa_putchar): New function.
3970 (pupa_refresh): Likewise.
3971 (xgetcwd): Function moved to ...
3972 (strip_extra_slashes): Likewise.
3973 (get_prefix): Likewise.
3974 * util/i386/pc/getroot.c: ... here.
3975 (find_root_device): Function moved and renamed to...
3976 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
3977 Changed all callers.
3978 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
3980 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
3981 Changed all callers.
3982 * util/misc.c (pupa_memalign): New function.
3983 (pupa_mm_init_region): Likewise.
3984 (pupa_register_exported_symbols): Likewise.
3985 (pupa_putchar): Function removed.
3986 * util/pupa-emu.c: New file.
3988 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
3990 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
3991 (_multiboot_mod_SOURCES): New variable.
3992 (_multiboot_mod_CFLAGS): Likewise.
3993 * loader/i386/pc/multiboot.c: New file.
3994 * include/pupa/i386/pc/multiboot.h: Likewise.
3995 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
3996 (pupa_multiboot_real_boot): New function.
3997 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
3998 (pupa_multiboot_real_boot): New prototype.
3999 (pupa_rescue_cmd_multiboot): Likewise
4000 (pupa_rescue_cmd_module): Likewise.
4002 * kern/loader.c (pupa_loader_set): Continue when
4003 pupa_loader_unload_func() fails.
4004 (pupa_loader_unset): New function.
4005 * include/pupa/loader.h (pupa_loader_unset): New prototype.
4007 * kern/misc.c (pupa_stpcpy): New function.
4008 * include/pupa/misc.h (pupa_stpcpy): New prototype.
4010 2003-11-12 Marco Gerards <metgerards@student.han.nl>
4012 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
4013 for available extensions.
4015 * include/pupa/i386/pc/time.h: New file.
4016 * kern/disk.c: Include <pupa/machine/time.h>.
4017 (PUPA_CACHE_TIMEOUT): New macro.
4018 (pupa_last_time): New variable.
4019 (pupa_disk_open): Flush the cache when there was a timeout.
4020 (pupa_disk_close): Reset the timer.
4021 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
4023 * util/misc.c: Include <sys/times.h>
4024 (pupa_get_rtc): New function.
4026 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
4028 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
4030 (pupa_ext2_get_file_block): Use blocks member.
4032 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
4033 first block. Return -1 instead of pupa_errno on error.
4035 2003-10-27 Marco Gerards <metgerards@student.han.nl>
4037 * README: In the pupa-mkimage example use _chain instead of chain
4038 and ext2 instead of fat.
4039 * TODO: Replace ext2fs with jfs as an example. Add an item for
4040 adding journal playback for ext2fs.
4041 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
4042 (pkgdata_MODULES): Added ext2.mod.
4043 (ext2_mod_SOURCES): New variable.
4044 (ext2_mod_CFLAGS): Likewise.
4045 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
4046 * include/pupa/misc.h (pupa_strncpy): New prototype.
4047 (pupa_strcat): Likewise.
4048 (pupa_strncmp): Likewise.
4049 * kern/misc.c (pupa_strcat): Enable function.
4050 (pupa_strncpy): New function.
4051 (pupa_strncmp): Likewise.
4052 * fs/ext2.c: New file.
4054 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
4055 when the read failed before retrying.
4056 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
4057 (_FILE_OFFSET_BITS): Likewise.
4058 * configure.ac: Added AC_SYS_LARGEFILE.
4060 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
4062 * genmk.rb (PModule#rule): Make sure to get only symbol names
4063 from the output of nm.
4064 Reported by Robert Millan <zeratul2@wanadoo.es>.
4066 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
4068 I forgot to check in these changes for a long time. This adds
4069 incomplete support for VGA console, and this is still very
4070 buggy. Also, a lot of consideration is required for I18N,
4071 UNICODE, and VGA font issues. Therefore, assume that this is
4072 such that "better than nothing".
4074 * font/manager.c: New file.
4075 * include/pupa/font.h: Likewise.
4076 * include/pupa/i386/pc/vga.h: Likewise.
4077 * term/i386/pc/vga.c: Likewise.
4078 * util/unifont2pff.rb: Likewise.
4080 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
4081 (pkgdata_MODULES): Added vga.mod and font.mod.
4082 (vga_mod_SOURCES): New variables.
4083 (vga_mod_CFLAGS): Likewise.
4084 (font_mod_SOURCES): Likewise.
4085 (font_mod_CFLAGS): Likewise.
4087 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
4089 * include/pupa/term.h: Include pupa/err.h.
4090 (struct pupa_term): Added init and fini.
4091 Changed the argument of putchar to pupa_uint32_t.
4093 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
4094 (pupa_console_real_putchar): New prototype.
4095 (pupa_console_putchar): Removed.
4096 (pupa_console_checkkey): Exported.
4097 (pupa_console_getkey): Likewise.
4099 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
4102 * kern/term.c (pupa_term_set_current): Rewritten.
4103 (pupa_putchar): Likewise.
4104 (pupa_putcode): New function.
4106 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
4107 (pupa_console_real_putchar): ... this.
4108 (pupa_vga_set_mode): New function.
4109 (pupa_vga_get_font): Likewise.
4111 * normal/command.c: Include pupa/term.h.
4112 (terminal_command): New function.
4113 (pupa_command_init): Register the command "terminal".
4115 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
4116 (DISP_UP): Likewise.
4117 (DISP_RIGHT): Likewise.
4118 (DISP_DOWN): Likewise.
4119 (DISP_HLINE): Likewise.
4120 (DISP_VLINE): Likewise.
4121 (DISP_UL): Likewise.
4122 (DISP_UR): Likewise.
4123 (DISP_LL): Likewise.
4124 (DISP_LR): Likewise.
4126 * term/i386/pc/console.c (pupa_console_putchar): New function.
4128 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
4130 * util/resolve.c (pupa_util_resolve_dependencies): BUG
4131 FIX. Reverse the path_list.
4133 * include/pupa/normal.h: Export pupa_register_command and
4134 pupa_unregister_command.
4136 * hello/hello.c (pupa_cmd_hello): New module.
4137 * conf/i386-pc.rmk: Added hello.mod.
4139 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
4141 * kern/i386/pc/lzo1x.S: New file.
4143 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
4144 (compress_kernel): New variable.
4145 (generate_image): Heavily modified to support compressing a
4146 large part of the core image.
4148 * util/misc.c (pupa_util_read_image): Fix a file descriptor
4150 (pupa_util_load_image): New function.
4152 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
4153 (pupa_compressed_size): New variable.
4154 (codestart): Enable Gate A20 here.
4155 Decompress the compressed part of the core image.
4156 Rearrange the code to put functions and variables which are
4157 required for initialization in the non-compressed part.
4160 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
4163 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
4165 * include/pupa/i386/pc/kernel.h
4166 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
4167 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
4168 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
4169 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
4170 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
4172 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
4174 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
4175 (Utility#rule): Likewise.
4177 * configure.ac: Check if LZO is available.
4179 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
4181 * include/pupa/normal.h: New file.
4182 * include/pupa/setjmp.h: Likewise.
4183 * include/pupa/i386/setjmp.h: Likewise.
4184 * normal/cmdline.c: Likewise.
4185 * normal/command.c: Likewise.
4186 * normal/main.c: Likewise.
4187 * normal/menu.c: Likewise.
4188 * normal/i386/setjmp.S: Likewise.
4190 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
4191 (pupa_rescue_cmd_initrd): Likewise.
4193 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
4196 * kern/i386/pc/startup.S (translation_table): New variable.
4197 (translate_keycode): New function.
4198 (pupa_console_getkey): Call translate_keycode.
4200 * kern/rescue.c (attempt_normal_mode): New function.
4201 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
4202 it failed, print a message.
4204 * kern/mm.c (pupa_real_malloc): Print more information when a
4205 free magic is broken.
4206 (pupa_free): If the first free header is not free actually, set
4209 * kern/main.c (pupa_load_normal_mode): Just load the module
4211 (pupa_main): Don't print the message
4212 "Entering into rescue mode..." here.
4214 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
4216 (pupa_rescue_cmd_initrd): Likewise.
4217 (pupa_rescue_cmd_initrd): Likewise.
4219 * include/pupa/symbol.h (FUNCTION): Specify the type.
4220 (VARIABLE): Likewise.
4222 * include/pupa/err.h (pupa_err_t): Added
4223 PUPA_ERR_UNKNOWN_COMMAND.
4225 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
4226 (pupa_dl_get_prefix): Likewise.
4228 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
4229 Added _chain.mod and _linux.mod instead of chain.mod and
4231 (chain_mod_SOURCES): Renamed to ...
4232 (_chain_mod_SOURCES): ... this.
4233 (chain_mod_CFLAGS): Renamed to ...
4234 (_chain_mod_CFLAGS): ... this.
4235 (linux_mod_SOURCES): Renamed to ...
4236 (_linux_mod_SOURCES): ... this.
4237 (linux_mod_CFLAGS): Renamed to ...
4238 (_linux_mod_CFLAGS): ... this.
4239 (normal_mod_SOURCES): New variable.
4240 (normal_mod_CFLAGS): Likewise.
4241 (normal_mod_ASFLAGS): Likewise.
4243 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
4245 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
4248 * kern/dl.c (pupa_dl_ref): Refer dependending modules
4250 (pupa_dl_unref): Unrefer depending modules recursively.
4251 Don't call pupa_dl_unload implicitly, because PUPA can crash if
4252 a module is unloaded before one depending on that module is
4254 (pupa_dl_unload): Unload depending modules explicitly,
4257 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
4259 * include/pupa/i386/pc/linux.h: New file.
4260 * loader/i386/pc/linux.c: Likewise.
4262 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
4264 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
4265 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
4266 of PUPA_CHAINLOADER_BOOT_SECTOR.
4268 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
4269 (pupa_linux_prot_size): New variable.
4270 (pupa_linux_tmp_addr): Likewise.
4271 (pupa_linux_real_addr): Likewise.
4272 (pupa_linux_boot_zimage): New function.
4273 (pupa_linux_boot_bzimage): Likewise.
4275 * kern/i386/pc/init.c (struct mem_region): New structure.
4276 (MAX_REGIONS): New macro.
4277 (mem_regions): New variable.
4278 (num_regions): Likewise.
4279 (pupa_os_area_addr): Likewise.
4280 (pupa_os_area_size): Likewise.
4281 (pupa_lower_mem): Likewise.
4282 (pupa_upper_mem): Likewise.
4283 (add_mem_region): New function.
4284 (compact_mem_regions): Likewise.
4285 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
4286 the size of the conventional memory and that of so-called upper
4287 memory (before the first memory hole).
4288 Instead of adding each found region to free memory, use
4289 add_mem_region and add them after removing overlaps.
4290 Also, add only 1/4 of the upper memory to free memory. The rest
4291 is used for loading OS images. Maybe this is ad hoc, but this
4292 makes it much easier to relocate OS images when booting.
4294 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
4295 (pupa_enter_rescue_mode): Don't register initrd and module.
4297 * kern/mm.c: Include pupa/dl.h.
4299 * kern/main.c: Include pupa/file.h and pupa/device.h.
4301 * kern/loader.c (pupa_loader_load_module_func): Removed.
4302 (pupa_loader_load_module): Likewise.
4304 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
4307 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
4308 (pupa_linux_tmp_addr): Likewise.
4309 (pupa_linux_real_addr): Likewise.
4310 (pupa_linux_boot_zimage): Likewise.
4311 (pupa_linux_boot_bzimage): Likewise.
4313 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
4314 (pupa_upper_mem): Likewise.
4315 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
4316 module is too dangerous.
4318 * include/pupa/loader.h (pupa_os_area_addr): Declared.
4319 (pupa_os_area_size): Likewise.
4320 (pupa_loader_set): Remove the first argument. Loader doesn't
4321 manage modules or initrd any longer.
4322 (pupa_loader_load_module): Removed.
4324 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
4325 (linux_mod_SOURCES): New variable.
4326 (linux_mod_CFLAGS): Likewise.
4328 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
4330 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
4331 the length of a blocklist correctly.
4333 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
4334 Use ioctl only if the OS file is a block device.
4335 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
4336 not very useful for normal files.
4338 * kern/main.c (pupa_set_root_dev): New function.
4339 (pupa_load_normal_mode): Likewise.
4340 (pupa_main): Call those above.
4342 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
4345 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
4347 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4349 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
4350 (setup): Configure the installed partition information and the
4353 * loader/i386/pc/chainloader.c (my_mod): New variable.
4354 (pupa_chainloader_unload): New function.
4355 (pupa_rescue_cmd_chainloader): Refer itself.
4356 (PUPA_MOD_INIT): Save its own module in MY_MOD.
4358 * kern/i386/pc/startup.S (install_partition): Removed.
4359 (version_string): Likewise.
4360 (config_file): Likewise.
4361 (pupa_install_dos_part): New variable.
4362 (pupa_install_bsd_part): Likewise.
4363 (pupa_prefix): Likewise.
4364 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
4366 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
4368 (make_install_device): New function.
4369 (pupa_machine_init): Set the dl prefix.
4371 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
4372 (buf): Renamed to ...
4373 (linebuf): ... this.
4374 (pupa_rescue_cmd_prefix): New function.
4375 (pupa_rescue_cmd_insmod): Likewise.
4376 (pupa_rescue_cmd_rmmod): Likewise.
4377 (pupa_rescue_cmd_lsmod): Likewise.
4378 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
4381 * kern/mm.c (pupa_memalign): If failed even after invalidating
4382 disk caches, unload unneeded modules and retry.
4384 * kern/misc.c (pupa_memmove): New function.
4385 (pupa_memcpy): Removed.
4386 (pupa_strcpy): New function.
4387 (pupa_itoa): Made static.
4389 * kern/dl.c (pupa_dl_iterate): New function.
4390 (pupa_dl_ref): Likewise.
4391 (pupa_dl_unref): Likewise.
4392 (pupa_dl_unload): Return if succeeded or not.
4393 (pupa_dl_unload_unneeded): New function.
4394 (pupa_dl_unload_all): Likewise.
4395 (pupa_dl_init): Renamed to ...
4396 (pupa_dl_set_prefix): ... this.
4397 (pupa_dl_get_prefix): New function.
4399 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
4400 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
4401 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
4402 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
4403 (pupa_install_dos_part): Declared.
4404 (pupa_install_bsd_part): Likewise.
4405 (pupa_prefix): Likewise.
4406 (pupa_boot_drive): Likewise.
4408 * include/pupa/types.h: Fix a typo.
4410 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
4412 (pupa_memmove): Declared.
4413 (pupa_strcpy): Likewise.
4415 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
4416 pupa_mod_init takes one argument, its own module.
4417 (pupa_dl_unload_unneeded): Declared.
4418 (pupa_dl_unload_all): Likewise.
4419 (pupa_dl_ref): Likewise.
4420 (pupa_dl_unref): Likewise.
4421 (pupa_dl_iterate): Likewise.
4422 (pupa_dl_init): Renamed to ...
4423 (pupa_dl_set_prefix): ... this.
4424 (pupa_dl_get_prefix): Declared.
4426 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
4427 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
4429 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
4430 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
4432 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
4433 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
4435 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
4437 * util/i386/pc/pupa-setup.c (setup): Define the internal
4438 function find_first_partition_start at the top level, because GCC
4439 3.0.x cannot compile internal functions in deeper scopes
4441 (find_root_device): Use lstat instead of stat.
4442 Don't follow symbolic links.
4443 Fix the path-constructing code.
4445 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
4446 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
4447 by a BLKGETSIZE ioctl first, because block devices don't fill
4448 the member st_mode of the structure stat on Linux.
4449 [__linux__] (linux_find_partition): Use a temporary buffer
4450 REAL_DEV for the working space. Copy it to DEV before returning.
4451 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
4452 buffer cache consistent.
4453 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
4454 strncmp. The previous value was merely wrong.
4455 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
4457 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
4458 FAT size is 12. The previous value was merely wrong.
4460 * kern/main.c (pupa_main): Don't split the starting message from
4463 * kern/term.c (pupa_putchar): Put CR after LF instead of before
4464 LF, because BIOS goes crazy about character attributes in this
4467 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
4469 * include/i386/pc/util/biosdisk.h: New file.
4470 * util/i386/pc/biosdisk.c: Likewise.
4471 * util/i386/pc/pupa-setup.c: Likewise.
4473 * Makefile.in (INCLUDE_DISTFILES): Added
4474 include/pupa/i386/pc/util/biosdisk.h.
4475 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
4476 directory util/i386/pc.
4477 (install-local): Added a rule for sbin_UTILITIES.
4478 (uninstall): Likewise.
4480 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
4482 * util/misc.c (xrealloc): New function.
4483 (pupa_malloc): Likewise.
4484 (pupa_free): Likewise.
4485 (pupa_realloc): Likewise.
4486 (pupa_stop): Likewise.
4487 (pupa_putchar): Likewise.
4489 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
4491 * include/pupa/util/misc.h (xrealloc): Declared.
4493 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
4495 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
4496 (PUPA_BOOT_MACHINE_BPB_END): ... this.
4498 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
4499 [PUPA_UTIL] (pupa_fat_fini): Likewise.
4501 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
4502 way should be implemented.
4503 [PUPA_UTIL] (pupa_fat_fini): Likewise.
4505 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
4506 the size of NAME for safety.
4507 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
4510 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
4511 (pupa_setup_SOURCES): Likewise.
4513 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
4515 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
4517 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
4518 bunch of pushl's from pusha, because this destroys the return
4521 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
4523 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
4524 This means that any missing prototypes could be fatal. Also, you
4525 must take care when writing assembly code. See the comments at
4526 the beginning of startup.S, for more details.
4528 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
4529 compilation mechanism.
4530 (pupa_chainloader_real_boot): Likewise.
4531 (pupa_biosdisk_rw_int13_extensions): Likewise.
4532 (pupa_biosdisk_rw_standard): Likewise.
4533 (pupa_biosdisk_check_int13_extensions): Likewise.
4534 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
4535 (pupa_biosdisk_get_diskinfo_standard): Likewise.
4536 (pupa_get_memsize): Likewise.
4537 (pupa_get_mmap_entry): Likewise.
4538 (pupa_console_putchar): Likewise.
4539 (pupa_console_setcursor): Likewise.
4540 (pupa_getrtsecs): Use pushl instead of push.
4542 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
4543 memory instead of the stack for a mmap entry, because some
4544 BIOSes may ignore the maximum size and overflow.
4546 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
4548 * genmk.rb (PModule#rule): Compile automatically generated
4549 sources with module-specific CFLAGS as well as other sources.
4551 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
4553 * configure.ac: Check ld.
4554 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
4555 respectively, before checking endianness and sizes.
4557 * Makefile.in (LD): New variable.
4559 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
4561 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
4563 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
4565 * Changelog: New file.