1 2005-12-25 Marco Gerards <marco@gnu.org>
3 * kern/env.c (grub_env_set): Rewritten the error handling code.
5 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
7 * geninit.sh: Made more robust, and more portable.
9 2005-12-25 Marco Gerards <marco@gnu.org>
11 Add support for Apple HFS+ filesystems.
13 * fs/hfsplus.c: New file.
15 * DISTLIST: Added `fs/hfsplus.c'.
17 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
18 (hfsplus_mod_SOURCES): New variable.
19 (hfsplus_mod_CFLAGS): Likewise.
20 (hfsplus_mod_LDFLAGS): Likewise.
21 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
22 (grub_setup_SOURCES): Likewise.
23 (grub_mkdevicemap_SOURCES): Likewise.
24 (grub_emu_SOURCES): Likewise.
25 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
27 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
29 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
31 2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
33 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
34 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
35 include/grub/parser.h, include/grub/script.h, kern/parser.c,
36 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
37 normal/lexer.c, normal/parser.y, normal/script.c, and
39 Removed kern/sparc64/cache.c.
41 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
42 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
45 * configure.ac (AC_INIT): Bumped to 1.92.
47 2005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
49 * kern/err.c (grub_error_push): Added new function to support error
51 (grub_error_pop): Likewise.
52 (grub_error_stack_items): New local variable to support error stacks.
53 (grub_error_stack_pos): Likewise.
54 (grub_error_stack_assert): Likewise.
55 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
57 (grub_print_error): Added support to print errors from error stack.
59 * include/grub/err.h (grub_error_push): Added function prototype.
60 (grub_error_pop): Likewise.
62 2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
64 * configure.ac: Accept `powerpc64' as host_cpu.
65 (amd64): Rename to `biarch32'.
67 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
68 non-cacheline-aligned addresses.
70 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
71 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
72 if `size' is non-zero.
74 2005-12-03 Marco Gerards <mgerards@xs4all.nl>
76 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
77 and `cd' to make sure the filename is not prefixed with a
79 (pkgdata_MODULES): Add `gpt.mod'.
80 (gpt_mod_SOURCES): New variable.
81 (gpt_mod_CFLAGS): Likewise.
82 (gpt_mod_LDFLAGS): Likewise.
84 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
86 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
89 * partmap/gpt.c: New file.
91 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
92 GPT partition map is detected.
94 2005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
96 * commands/i386/pc/play.c: New file.
97 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
98 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
101 2005-11-27 Marco Gerards <mgerards@xs4all.nl>
103 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
104 ((unused))' to silence gcc warning.
106 2005-11-26 Hollis Blanchard <hollis@penguinppc.org>
108 * configure.ac: Correct `AC_PROG_YACC' test.
110 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
112 * util/powerpc/ieee1275/grub-install.in: Run the mount point
113 check before installing files.
115 2005-11-22 Mike Small <smallm@panix.com>
117 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
118 number regex so multidigit numbers are recognized correctly.
120 2005-11-22 Mike Small <smallm@panix.com>
122 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
123 debugging message before attempting to claim memory.
124 (grub_rescue_cmd_initrd): Add a claim debugging message and try
125 multiple addresses in case of failure.
127 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
129 * term/tparm.c (get_space): Remove empty `if' statement.
131 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
133 * kern/parser.c (check_varstate): Rename `state' to 's'.
135 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
137 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
138 variable definitions to the beginning of each function. Sort stack
140 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
141 `buf' argument to `char *'.
143 2005-11-22 Hollis Blanchard <hollis@penguinppc.org>
145 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
146 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
147 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
148 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
149 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
150 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
151 configfile.mod, search.mod, gzio.mod and test.mod.
152 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
153 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
154 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
155 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
156 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
157 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
158 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
159 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
160 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
161 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
162 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
163 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
164 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
165 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
166 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
167 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
168 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
169 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
170 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
171 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
172 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
173 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
174 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
176 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
178 (pkgdata_MODULES): Add test.mod.
180 2005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
182 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
183 appending to variables with "+=".
184 (PModule): Use full pathname to generate *.lst filenames.
186 * Makefile.in: Fixed list rules moved from genmk.rb.
187 (.DELETE_ON_ERROR): New special target.
188 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
190 * conf/i386-pc.rmk: Include conf/common.mk.
191 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
192 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
193 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
194 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
195 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
196 configfile.mod, search.mod, gzio.mod and test.mod.
197 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
198 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
199 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
200 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
201 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
202 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
203 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
204 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
205 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
206 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
207 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
208 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
209 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
210 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
211 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
212 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
213 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
214 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
215 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
216 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
217 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
218 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
219 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
221 * conf/common.rmk: ... to here. New file.
223 * conf/common.mk: New file.
225 2005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
227 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
228 (grub_script.tab.c): ... here.
230 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
231 (grub_script.tab.c): ... here.
233 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
234 (grub_script.tab.c): ... here.
236 * normal/command.c (grub_command_find): Fixed a memory leak of
237 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
239 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
241 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
242 "@" which marks the start of a comment on ARM.
243 (VARIABLE): Likewise.
245 2005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
247 Add support for Linux/ADFS partition tables.
249 * partmap/acorn.c: New file.
251 * include/grub/acorn_filecore.h: Likewise.
253 * DISTLIST: Added `partmap/acorn.c' and
254 `include/grub/acorn_filecore.h'.
256 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
258 (pkgdata_MODULES): Add `acorn.mod'.
259 (acorn_mod_SOURCES): New variable.
260 (acorn_mod_CFLAGS): Likewise.
262 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
264 (pkgdata_MODULES): Add `acorn.mod'.
265 (acorn_mod_SOURCES): New variable.
266 (acorn_mod_CFLAGS): Likewise.
268 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
269 (pkgdata_MODULES): Add `acorn.mod'.
270 (acorn_mod_SOURCES): New variable.
271 (acorn_mod_CFLAGS): Likewise.
272 (acorn_mod_LDFLAGS): Likewise.
274 * include/types.h (grub_disk_addr_t): New typedef.
276 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
278 * geninit.sh: New file.
280 * geninitheader.sh: Likewise.
282 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
283 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
284 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
285 * commands/configfile.c (grub_configfile_init)
286 (grub_configfile_fini): Likewise.
287 * commands/default.c (grub_default_init, grub_default_fini):
289 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
290 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
291 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
292 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
294 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
295 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
297 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
298 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
300 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
302 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
304 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
305 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
306 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
307 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
308 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
309 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
310 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
311 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
312 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
313 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
314 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
315 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
316 * partmap/amiga.c (grub_amiga_partition_map_init)
317 (grub_amiga_partition_map_fini): Likewise.
318 * partmap/apple.c (grub_apple_partition_map_init)
319 (grub_apple_partition_map_fini): Likewise.
320 * partmap/pc.c (grub_pc_partition_map_init)
321 (grub_pc_partition_map_fini): Likewise.
322 * partmap/sun.c (grub_sun_partition_map_init,
323 grub_sun_partition_map_fini): Likewise.
324 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
327 * util/grub-emu.c: Include <grub_modules_init.h>.
328 (main): Don't initialize and de-initialize any modules directly,
329 use `grub_init_all' and `grub_fini_all' instead.
331 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
332 `grub_vesafb_mod_init'.
333 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
335 * term/i386/pc/vga.c (grub_vga_init): Renamed to
336 `grub_vga_mod_init'. Updated all users.
337 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
339 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
340 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
343 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
344 Generate a function to initialize the module in utilities.
346 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
347 initialize the module in utilities. Updated all callers.
349 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
351 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
352 escape sequence and a literal ^L to clear the screen.
354 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
355 when returning from Open Firmware.
357 2005-11-09 Hollis Blanchard <hollis@penguinppc.org>
359 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
360 (grub_ofconsole_height): Likewise.
361 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
362 manually insert a '\n'.
363 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
364 `grub_ofconsole_height'. Return early if these are already set.
366 2005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
368 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
369 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
370 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
371 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
372 and `normal/script.c'.
373 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
374 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
375 (test_mod_SOURCES): New variable.
376 (test_mod_CFLAGS): Likewise.
377 (test_mod_LDFLAGS): Likewise.
378 (pkgdata_MODULES): Add `test.mod'.
379 (grub_script.tab.c): New rule.
380 (grub_script.tab.h): Likewise.
382 2005-11-07 Marco Gerards <mgerards@xs4all.nl>
384 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
385 `commands/test.c', `normal/execute.c', `normal/lexer.c',
386 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
387 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
388 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
389 (test_mod_SOURCES): New variable.
390 (test_mod_CFLAGS): Likewise.
391 (pkgdata_MODULES): Add `test.mod'.
392 (grub_script.tab.c): New rule.
393 (grub_script.tab.h): Likewise.
395 2005-11-06 Marco Gerards <mgerards@xs4all.nl>
397 Add initial scripting support.
399 * commands/test.c: New file.
400 * include/grub/script.h: Likewise.
401 * normal/execute.c: Likewise.
402 * normal/function.c: Likewise.
403 * normal/lexer.c: Likewise.
404 * normal/parser.y: Likewise.
405 * normal/script.c: Likewise.
407 * configure.ac: Add `AC_PROG_YACC' test.
409 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
410 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
411 `normal/function.c' and `normal/script.c'.
412 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
413 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
414 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
416 (pkgdata_MODULES): Add `test.mod'.
417 (grub_script.tab.c): New rule.
418 (grub_script.tab.h): Likewise.
420 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
422 * include/grub/normal.h (grub_test_init): New prototype.
423 (grub_test_fini): Likewise.
425 * normal/command.c: Include <grub/script.h>.
426 (grub_command_execute): Rewritten.
428 * util/grub-emu.c (main): Call `grub_test_init' and
431 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
433 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
435 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
436 there are no pending characters.
438 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
440 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
441 `grub_strndup' to drop device arguments. Replace unnecessary
442 `grub_strndup' with `grub_strdup'.
444 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
446 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
447 `debug' environment variable has been set.
449 2005-11-02 Hollis Blanchard <hollis@penguinppc.org>
451 * Makefile.in (install-local): Use $(DATA).
452 (uninstall): Likewise.
453 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
454 (sbin_UTILITIES): ... to here.
455 (sbin_SCRIPTS): New variable.
456 (grub_install_SOURCES): New variable.
457 * util/powerpc/ieee1275/grub-install.in: New file.
458 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
460 (add_segments): Call `grub_util_get_path'.
462 2005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
464 From Timothy Baldwin:
465 * commands/ls.c (grub_ls_list_files): Close FILE with
467 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
469 2005-10-24 Marco Gerards <mgerards@xs4all.nl>
471 * include/grub/parser.h: New file.
473 * kern/parser.c: Likewise.
475 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
476 (grub_setup_SOURCES): Likewise.
477 (grub_probefs_SOURCES): Likewise.
478 (grub_emu_SOURCES): Likewise.
479 (kernel_img_HEADERS): Add `parser.h'.
481 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
482 (grub_emu_SOURCES): Add `kern/parser.c'.
483 (grubof_SOURCES): Likewise.
485 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
486 (grubof_SOURCES): Add `kern/parser.c'.
488 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
490 * kern/misc.c (grub_split_cmdline): Removed function.
492 * kern/rescue.c: Include <grub/parser.h>.
493 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
494 of `grub_split_cmdline'.
496 * normal/command.c: Include <grub/parser.h>.
497 (grub_command_execute): Use `grub_parser_split_cmdline' instead
498 of `grub_split_cmdline'.
500 * normal/completion.c: Include <grub/parser.h>.
501 (cmdline_state): New variable.
502 (iterate_dir): End the filename with a quote depending on the
504 (get_state): new function.
505 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
506 split the arguments and determine the current argument. When the
507 argument string is not quoted, escape all spaces.
509 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
511 * normal/sparc64/setjmp.S: New file.
513 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
515 * include/grub/sparc64/libgcc.h: New file.
516 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
517 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
518 normal/sparc64/setjmp.c.
520 2005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
522 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
523 * kern/sparc64/cache.S: New file.
524 * kern/sparc64/cache.c: Removed.
525 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
526 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
528 (COMMON_LDFLAGS): Add -melf64_sparc.
529 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
530 (grubof_SOURCES): Use cache.S instead of cache.c.
531 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
532 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
533 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
535 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
536 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
537 (linux_mod_CFLAGS): Commented out.
538 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
539 out because module isn't built.
540 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
541 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
542 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
543 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
544 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
545 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
546 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
547 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
548 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
549 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
550 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
551 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
552 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
553 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
555 2005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
557 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
558 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
559 longer, because HFS should not be used on PC.
561 2005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
563 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
564 consistently within the loop.
566 2005-10-15 Marco Gerards <mgerards@xs4all.nl>
568 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
569 directory can not be read.
571 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
573 * configure.ac (AC_INIT): Increase the version number to 1.91.
575 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
576 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
577 term/i386/pc/serial.c.
579 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
581 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
582 file size must be permitted.
584 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
587 2005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
589 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
591 Call the hook with a NUL-terminated filename.
592 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
595 * kern/term.c (cursor_state): New variable.
596 (grub_term_set_current): Reset the cursor state on a new
598 (grub_setcursor): Rewritten to use CURSOR_STATE.
599 (grub_getcursor): New function.
601 * include/grub/term.h (grub_getcursor): New prototype.
603 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
604 integers on ARM. Reported by Timothy Baldwin
605 <T.E.Baldwin99@members.leeds.ac.uk>.
607 2005-10-11 Marco Gerards <mgerards@xs4all.nl>
609 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
611 (grub_sfs_dir): Likewise.
613 2005-10-09 Marco Gerards <mgerards@xs4all.nl>
615 Add support for the SFS filesystem.
617 * fs/sfs.c: New file.
619 * DISTLIST: Added `fs/sfs.c'.
621 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
622 (grub_probefs_SOURCES): Likewise.
623 (grub_emu_SOURCES): Likewise.
624 (pkgdata_MODULES): Add `sfs.mod'.
625 (sfs_mod_SOURCES): New variable.
626 (sfs_mod_CFLAGS): Likewise.
627 (sfs_mod_LDFLAGS): Likewise.
629 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
630 (pkgdata_MODULES): Add `sfs.mod'.
631 (sfs_mod_SOURCES): New variable.
632 (sfs_mod_CFLAGS): Likewise.
634 * util/grub-emu.c (main): Call `grub_sfs_init' and
637 * include/grub/fs.h (grub_sfs_init): New prototype.
638 (grub_sfs_fini): Likewise.
640 2005-10-07 Marco Gerards <mgerards@xs4all.nl>
642 Add support for the AFFS filesystem.
644 * fs/affs.c: New file.
646 * DISTLIST: Added `fs/affs.c'.
648 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
649 (grub_probefs_SOURCES): Likewise.
650 (grub_emu_SOURCES): Likewise.
651 (pkgdata_MODULES): Add `affs.mod'.
652 (affs_mod_SOURCES): New variable.
653 (affs_mod_CFLAGS): Likewise.
654 (affs_mod_LDFLAGS): Likewise.
656 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
657 (pkgdata_MODULES): Add `affs.mod'.
658 (affs_mod_SOURCES): New variable.
659 (affs_mod_CFLAGS): Likewise.
661 * util/grub-emu.c (main): Call `grub_affs_init' and
664 * include/grub/fs.h (grub_affs_init): New prototype.
665 (grub_affs_fini): Likewise.
667 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
669 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
671 2005-10-01 Marco Gerards <mgerards@xs4all.nl>
673 * configure.ac: Accept `x86_64' as host_cpu. In that case add
676 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
679 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
680 (COMMON_LDFLAGS): New variable.
681 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
682 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
683 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
684 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
685 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
686 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
687 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
688 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
689 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
690 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
691 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
692 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
693 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
694 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
695 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
697 (normal_mod_ASFLAGS): Add `-m32'.
699 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
700 (grub_host_size_t, grub_host_ssize_t): New types.
701 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
702 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
703 `GRUB_HOST_SIZEOF_VOID_P'.
705 * include/grub/kernel.h (struct grub_module_header): Type of
706 member offset changed to `grub_host_off_t'. Type of member size
707 changed to `grub_host_size_t'.
708 (struct grub_module_info): Type of member offset changed to
709 `grub_host_off_t'. Type of member size changed to
712 2005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
714 Make GRUB's kernel compliant to Multiboot Specification.
716 * kern/i386/pc/startup.S (multiboot_header): New label.
717 (multiboot_entry): Likewise.
718 (multiboot_trampoline): Likewise.
720 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
723 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
724 put parentheses after a question mark.
725 [!GRUB_UTIL] (my_mod): New variable.
727 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
729 2005-09-28 Marco Gerards <mgerards@xs4all.nl>
731 Adds support for the XFS filesystem. Btrees are not supported
734 * fs/xfs.c: New file.
736 * DISTLIST: Added `fs/xfs.c'.
738 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
739 (grub_probefs_SOURCES): Likewise.
740 (grub_emu_SOURCES): Likewise.
741 (pkgdata_MODULES): Add `xfs.mod'.
742 (xfs_mod_SOURCES): New variable.
743 (xfs_mod_CFLAGS): Likewise.
745 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
746 (pkgdata_MODULES): Add `xfs.mod'.
747 (xfs_mod_SOURCES): New variable.
748 (xfs_mod_CFLAGS): Likewise.
750 * util/grub-emu.c (main): Call `grub_xfs_init' and
753 * include/grub/fs.h (grub_xfs_init): New prototype.
754 (grub_xfs_fini): Likewise.
757 2005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
759 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
760 color modes, allow greater than 16 colors to be configured as
763 2005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
765 * normal/completion.c (complete_arguments): Add the qualifier
768 From Omniflux <omniflux+lists@omniflux.com>:
769 * include/grub/terminfo.h: New file.
770 * include/grub/tparm.h: Likewise.
771 * include/grub/i386/pc/serial.h: Likewise.
772 * term/terminfo.c: Likewise.
773 * term/tparm.c: Likewise.
774 * term/i386/pc/serial.c: Likewise.
775 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
777 (terminfo_mod_SOURCES): New variable.
778 (terminfo_mod_CFLAGS): Likewise.
779 (serial_mod_SOURCES): Likewise.
780 (serial_mod_CFLAGS): Likewise.
782 2005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
784 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
785 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
786 and kern/powerpc/ieee1275/cmain.c, respectively.
788 * boot/powerpc/ieee1275/crt0.S: Moved to ...
789 * kern/powerpc/ieee1275/crt0.S: ... here.
791 * boot/powerpc/ieee1275/cmain.c: Moved to ...
792 * kern/powerpc/ieee1275/cmain.c: ... here.
794 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
795 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
796 instead of boot/powerpc/ieee1275/crt0.S and
797 boot/powerpc/ieee1275/cmain.c, respectively.
799 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
800 sectors. It was not used anyway.
802 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
804 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
805 `unused parameter' warning.
807 2005-08-30 Hollis Blanchard <hollis@penguinppc.org>
809 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
811 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
814 2005-08-28 Marco Gerards <metgerards@student.han.nl>
816 * include/grub/normal.h (enum grub_completion_type): Added
817 `GRUB_COMPLETION_TYPE_ARGUMENT'.
819 * normal/cmdline.c (print_completion): Handle
820 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
821 * normal/menu_entry.c (store_completion): Likewise.
823 * normal/completion.c (complete_arguments): New function.
824 (grub_normal_do_completion): Call `complete_arguments' when the
825 current words start with a dash.
827 2005-08-27 Marco Gerards <metgerards@student.han.nl>
829 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
830 `gzio.mod' instead of `io.mod').
832 2005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
834 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
835 (DISTDIRS): Added io and video.
836 Rewrite the search routine to make an output consistently.
838 * DISTLIST: Added conf/sparc64-ieee1275.mk,
839 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
840 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
841 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
842 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
843 util/powerpc/ieee1275/misc.c.
845 * include/grub/gzio.h: New file.
846 * io/gzio.c: Likewise.
848 * kern/file.c (grub_file_close): Call grub_device_close only if
849 FILE->DEVICE is not NULL.
851 * include/grub/mm.h [!NULL] (NULL): New macro.
853 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
855 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
856 (pkgdata_MODULES): Added gzio.mod.
857 (gzio_mod_SOURCES): New variable.
858 (gzio_mod_CFLAGS): Likewise.
860 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
861 (pkgdata_MODULES): Added gzio.mod.
862 (gzio_mod_SOURCES): New variable.
863 (gzio_mod_CFLAGS): Likewise.
865 * commands/cat.c: Include grub/gzio.h.
866 (grub_cmd_cat): Use grub_gzfile_open instead of
869 * commands/cmp.c: Include grub/gzio.h.
870 (grub_cmd_cmp): Use grub_gzfile_open instead of
873 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
874 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
876 (grub_rescue_cmd_module): Likewise.
878 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
880 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
881 kern/sparc64/ieee1275/init.c because it contains _start.
882 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
884 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
886 * configure.ac: Add support for sparc64 host with ieee1275
888 * configure: Generated from configure.ac.
889 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
891 (grub_ofdisk_read): Likewise.
892 (grub_ofdisk_open): Use %p to print pointer values, and cast the
893 pointers as (void *) to remove a warning.
894 (grub_ofdisk_close): Likewise.
895 (grub_ofdisk_read): Likewise.
896 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
897 returns, so make it return void to remove a warning.
898 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
899 Corresponding prototype change.
900 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
901 values, and cast the pointers as (void *) to remove a warning.
902 (grub_mm_dump): Likewise.
903 * conf/sparc64-ieee1275.mk: New file.
904 * conf/sparc64-ieee1275.rmk: Likewise.
905 * include/grub/sparc64/setjmp.h: Likewise.
906 * include/grub/sparc64/types.h: Likewise.
907 * include/grub/sparc64/ieee1275/console.h: Likewise.
908 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
909 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
910 * include/grub/sparc64/ieee1275/time.h: Likewise.
911 * kern/sparc64/cache.c: Likewise.
912 * kern/sparc64/dl.c: Likewise.
913 * kern/sparc64/ieee1275/init.c: Likewise.
914 * kern/sparc64/ieee1275/openfw.c: Likewise.
916 2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
918 * util/console.c (grub_ncurses_putchar): If C is greater than
919 0x7f, set C to a question mark.
920 (grub_ncurses_getcharwidth): New function.
921 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
924 * normal/menu.c (print_entry): Made aware of Unicode. First,
925 convert TITLE to UCS-4, and predict the cursor position by
928 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
930 * kern/misc.c (grub_utf16_to_utf8): Likewise.
932 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
934 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
935 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
938 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
939 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
940 grub_strcpy and grub_strlen. Take it into account that a space
941 character is inserted as a delimiter.
943 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
945 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
946 invalid magic in thre error.
948 * commands/search.c: New file.
950 * util/grub-emu.c (main): Call grub_search_init and
953 * kern/rescue.c (grub_rescue_print_disks): Removed.
954 (grub_rescue_print_devices): New function.
955 (grub_rescue_cmd_ls): Use grub_device_iterate with
956 grub_rescue_print_devices instead of grub_disk_dev_iterate with
957 grub_rescue_print_disks.
959 * kern/partition.c (grub_partition_iterate): Return the result of
960 PARTMAP->ITERATE instead of GRUB_ERRNO.
962 * kern/device.c: Include grub/partition.h.
963 (grub_device_iterate): New function.
965 * include/grub/partition.h (grub_partition_iterate): Return int
966 instead of grub_err_t.
968 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
970 [GRUB_UTIL] (grub_search_fini): Likewise.
972 * include/grub/device.h (grub_device_iterate): New prototype.
974 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
976 (pkgdata_MODULES): Added search.mod.
977 (search_mod_SOURCES): New variable.
978 (search_mod_CFLAGS): Likewise.
980 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
981 (pkgdata_MODULES): Added search.mod.
982 (search_mod_SOURCES): New variable.
983 (search_mod_CFLAGS): Likewise.
985 * commands/ls.c (grub_ls_list_disks): Renamed to ...
986 (grub_ls_list_devices): ... this, and use grub_device_iterate.
989 * DISTLIST: Added commands/search.c.
991 2005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
993 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
995 (grub_getcharwidth): New function.
997 * kern/misc.c (grub_utf8_to_ucs4): New function.
999 * include/grub/term.h (struct grub_term): Added a new member
1001 (grub_getcharwidth): New prototype.
1003 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
1005 * term/i386/pc/console.c (map_char): New function. Segregated from
1006 grub_console_putchar.
1007 (grub_console_putchar): Use map_char.
1008 (grub_console_getcharwidth): New function.
1009 (grub_console_term): Specified grub_console_getcharwidth as
1012 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
1013 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
1015 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
1017 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
1018 on grub_strtoul completely.
1019 (write_char): Declare local variables in the beginning of the
1021 (grub_vesafb_getcharwidth): New function.
1022 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
1025 2005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
1027 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
1028 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
1029 commands/i386/pc/vbetest.c.
1031 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
1032 call grub_vbe_get_controller_info again, because the returned
1033 information is volatile.
1034 (grub_vbe_set_video_mode): Mostly rewritten.
1035 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
1036 grub_vbe_status_t correctly.
1037 (grub_vbe_get_video_mode_info): Likewise.
1038 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
1039 several if statements.
1041 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
1042 * commands/i386/pc/vbeinfo.c: ... this.
1044 * commands/i386/pc/vbe_test.c: Renamed to ...
1045 * commands/i386/pc/vbetest.c: ... this.
1047 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
1049 (grub_cmd_vbeinfo): ... this. Save video modes before
1050 iterating. Skip a video mode, if it is not available, not enough
1051 information is given or it is monochrome. Show the memory
1052 model. Leave the interpretation of MODEVAR to grub_strtoul
1054 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
1055 (GRUB_MOD_FINI): Likewise.
1057 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
1058 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
1059 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
1060 duplicated grub_env_get. Leave the interpretation of MODEVAR to
1061 grub_strtoul completely.
1063 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
1064 (GRUB_MOD_FINI): Likewise.
1066 * normal/misc.c: Include grub/mm.h.
1068 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
1069 vbe_list_modes with vbetest.mod and vbeinfo.mod.
1070 (vbe_list_modes_mod_SOURCES): Removed.
1071 (vbe_list_modes_mod_CFLAGS): Likewise.
1072 (vbe_test_mod_SOURCES): Likewise.
1073 (vbe_test_mod_CFLAGS): Likewise.
1074 (vbeinfo_mod_SOURCES): New variable.
1075 (vbeinfo_mod_CFLAGS): Likewise.
1076 (vbetest_mod_SOURCES): Likewise.
1077 (vbetest_mod_CFLAGS): Likewise.
1079 2005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
1081 * normal/misc.c: New file.
1083 * DISTLIST: Added normal/misc.c.
1085 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
1086 DISK to HOOK. Call HOOK with DISK.
1087 * partmap/apple.c (apple_partition_map_iterate): Likewise.
1088 * partmap/pc.c (pc_partition_map_iterate): Likewise.
1089 * partmap/sun.c (sun_partition_map_iterate): Likewise.
1091 * normal/menu_entry.c (struct screen): Added a new member
1093 (completion_buffer): New global variable.
1094 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
1095 (store_completion): New function.
1096 (complete): Likewise.
1097 (clear_completions): Likewise.
1098 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
1099 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
1100 a tab, call complete.
1102 * normal/completion.c (disk_dev): Removed.
1103 (print_simple_completion): Likewise.
1104 (print_partition_completion): Likewise.
1105 (print_func): New global variable.
1106 (add_completion): Do not take the arguments WHAT or PRINT any
1107 longer. Added a new argument TYPE. Instead of printing directly,
1108 call PRINT_FUNC if not NULL.
1109 All callers changed.
1110 (complete_device): Use a local variable DEV instead of
1111 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
1112 (grub_normal_do_completion): Take a new argument HOOK. Do not
1113 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
1114 empty string, return NULL instead.
1115 All callers changed.
1117 * normal/cmdline.c (print_completion): New function.
1119 * kern/partition.c (grub_partition_iterate): Add an argument DISK
1121 All callers changed.
1123 * kern/disk.c (grub_print_partinfo): Removed.
1125 * include/grub/partition.h (struct grub_partition_map): Add a new
1126 argument DISK into HOOK of ITERATE.
1127 (grub_partition_iterate): Add a new argument DISK to HOOK.
1129 * include/grub/normal.h (enum grub_completion_type): New enum.
1130 (grub_completion_type_t): New type.
1131 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
1132 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
1133 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
1134 (GRUB_COMPLETION_TYPE_FILE): Likewise.
1135 (grub_normal_do_completion): Added a new argument HOOK.
1136 (grub_normal_print_device_info): New prototype.
1138 * include/grub/disk.h (grub_print_partinfo): Removed.
1140 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
1141 (normal_mod_SOURCES): Likewise.
1142 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1143 (normal_mod_SOURCES): Likewise.
1145 * commands/ls.c (grub_ls_list_disks): Use
1146 grub_normal_print_device_info instead of grub_print_partinfo. Free
1148 (grub_ls_list_files): Use grub_normal_print_device_info instead of
1149 duplicating the code.
1151 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
1153 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
1154 follow GCS more precisely.
1155 * commands/i386/pc/vbe_test.c: Likewise.
1156 * include/grub/i386/pc/vbe.h: Likewise.
1157 * term/i386/pc/vesafb.c: Likewise.
1158 * video/i386/pc/vbe.c: Likewise.
1160 2005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
1162 * DISTLIST: Added term/i386/pc/vesafb.c
1163 DISTLIST: Added video/i386/pc/vbe.c
1164 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
1165 DISTLIST: Added commands/i386/pc/vbe_test.c.
1166 * commands/i386/pc/vbe_list_modes.c: New file.
1167 * commands/i386/pc/vbe_test.c: Likewise.
1168 * term/i386/pc/vesafb.c: Likewise.
1169 * video/i386/pc/vbe.c: Likewise.
1170 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
1171 (grub_vbe_probe) Added prototype.
1172 (grub_vbe_set_video_mode) Likewise.
1173 (grub_vbe_get_video_mode) Likewise.
1174 (grub_vbe_get_video_mode_info) Likewise.
1175 (grub_vbe_set_pixel_rgb) Likewise.
1176 (grub_vbe_set_pixel_index) Likewise.
1177 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
1178 (pkgdata_MODULES): Added vesafb.mod.
1179 (pkgdata_MODULES): Added vbe_list_modes.mod.
1180 (pkgdata_MODULES): Added vbe_test.mod.
1181 (vbe_mod_SOURCES): Added.
1182 (vbe_mod_CFLAGS): Likewise.
1183 (vesafb_mod_SOURCES): Likewise.
1184 (vesafb_mod_CFLAGS): Likewise.
1185 (vbe_list_modes_mod_SOURCES): Likewise.
1186 (vbe_list_modes_mod_CFLAGS): Likewise.
1187 (vbe_test_mod_SOURCES): Likewise.
1188 (vbe_test_mod_CFLAGS): Likewise.
1190 2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
1192 * normal/command.c (grub_command_execute): If INTERACTIVE is
1193 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
1194 CMDLINE. Disable the pager if INTERACTIVE is true.
1195 All callers are changed.
1197 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
1198 before reading a config file.
1199 * normal/main.c (read_config_file): Even if a command is not
1200 found, register it if it is within an entry.
1202 * util/grub-emu.c: Include sys/types.h and unistd.h.
1203 (options): Added --hold.
1204 (struct arguments): Added a new member "hold".
1205 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
1207 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
1208 cleared by a debugger, if it is not zero.
1210 * include/grub/normal.h (grub_command_execute): Add an argument
1213 2005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
1215 * DISTLIST: Added include/grub/i386/pc/vbe.h.
1217 2005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
1219 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
1220 program with another one, because the old one didn't detect a bug
1221 in gcc-3.4. Always use regparm 2, because the new test is still
1222 not enough for gcc-4.0. Someone must investigate a simple test
1223 case which detects a bug in gcc-4.0.
1225 2005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
1227 * DISTLIST: Added normal/completion.c.
1229 * normal/completion.c: New file.
1231 * term/i386/pc/console.c (grub_console_getwh): New function.
1232 (grub_console_term): Assign grub_console_getwh to getwh.
1234 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
1235 function is defined in normal/completion.c as
1236 grub_normal_do_completion.
1237 (grub_cmdline_get): Use grub_normal_do_completion instead of
1240 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
1241 returns non-zero, otherwise return 0.
1242 (grub_partition_iterate): First, probe the partition map. Then,
1243 call ITERATE only for this partition map.
1245 * kern/misc.c (grub_strncmp): Rewritten.
1247 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
1248 returns non-zero. Otherwise return 0.
1250 * include/grub/partition.h (grub_partition_map_iterate): Return
1251 int instead of void.
1253 * include/grub/normal.h (grub_normal_do_completion): New prototype.
1255 * include/grub/misc.h (grub_strncmp): Change the type of N to
1258 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
1261 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
1262 unsigned explictly before comparing it with I.
1264 * kern/main.c (grub_env_write_root): Add the attribute unused into
1267 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
1268 normal/completion.c.
1269 (normal_mod_SOURCES): Likewise.
1270 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1271 (normal_mod_SOURCES): Likewise.
1273 * normal/command.c (grub_iterate_commands): If ITERATE returns
1274 non-zero, return one immediately.
1276 2005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
1278 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
1279 * kern/i386/pc/startup.S: Updated Global Descriptor table's
1281 (grub_vbe_get_controller_info): New function.
1282 (grub_vbe_get_mode_info): Likewise.
1283 (grub_vbe_set_mode): Likewise.
1284 (grub_vbe_get_mode): Likewise.
1285 (grub_vbe_set_memory_window): Likewise.
1286 (grub_vbe_get_memory_window): Likewise.
1287 (grub_vbe_set_scanline_length): Likewise.
1288 (grub_vbe_get_scanline_length): Likewise.
1289 (grub_vbe_set_display_start): Likewise.
1290 (grub_vbe_get_display_start): Likewise.
1291 (grub_vbe_set_palette_data): Likewise.
1292 * include/grub/i386/pc/vbe.h: New file.
1294 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
1296 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
1297 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
1298 * DISTLIST: Likewise.
1299 * kern/ieee1275/of.c: Moved to ...
1300 * kern/ieee1275/ieee1275.c: ... here.
1302 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
1304 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
1305 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
1306 Pass 0 as `end' parameter to grub_strtoul().
1308 2005-08-08 Hollis Blanchard <hollis@penguinppc.org>
1310 * include/grub/powerpc/ieee1275/console.h: Do not include
1311 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
1313 (grub_console_cur_color): Remove i386-specific prototype.
1314 (grub_console_real_putchar): Likewise.
1315 (grub_console_checkkey): Likewise.
1316 (grub_console_getkey): Likewise.
1317 (grub_console_getxy): Likewise.
1318 (grub_console_gotoxy): Likewise.
1319 (grub_console_cls): Likewise.
1320 (grub_console_setcursor): Likewise.
1321 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
1322 Include <grub/machine/console.h>.
1323 * term/ieee1275/ofconsole.c: Likewise.
1325 2005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
1327 * Makefile.in (LIBLZO): New variable.
1329 * configure.ac: Check for LZO version 2.
1331 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
1332 lzo/lzo1x.h instead of lzo1x.h.
1334 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
1337 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
1338 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
1340 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
1341 copying the data from PARTITION to P.
1343 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
1345 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
1346 negative, unload the module.
1348 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
1349 map is "pc_partition_map" but not "pc".
1350 (usage): Fix the description. The options are --boot-image and
1351 --core-image but not --boot-file or --core-file.
1352 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
1353 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
1356 * util/i386/pc/grub-install.in: Do not specify --boot-file or
1357 --core-file. Specify INSTALL_DEVICE as an argument.
1359 * util/console.c: Include config.h.
1360 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
1361 [HAVE_NCURSES_H]: Include ncurses.h.
1362 [HAVE_CURSES_H]: Include curses.h.
1363 [!A_NORMAL] (A_NORMAL): Defined as zero.
1364 [!A_STANDOUT] (A_STANDOUT): Likewise.
1366 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
1368 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
1370 * configure.ac: Check for curses libraries and headers.
1372 * Makefile.in (LIBCURSES): New variable.
1374 * genmk.rb (Script::rule): Set the executable bits.
1376 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
1377 name of the PC partition map is "pc_partition_map" but not "pc".
1379 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
1381 * util/i386/pc/grub-install.in (grub_probefs): New variable.
1382 (modules): Likewise.
1383 (usage): Added descriptions for --modules and --grub-probefs.
1384 Handle --modules and --grub-probefs. Save the arguments in MODULES
1385 and GRUB_PROBEFS, respectively.
1386 Auto-detect a filesystem module against GRUBDIR. If the result is
1387 empty and modules are not specified explicitly, abort the
1388 installation. Add the result to MODULES.
1390 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
1391 disk/powerpc/ieee1275/ofdisk.c,
1392 include/grub/powerpc/ieee1275/init.h and
1393 term/powerpc/ieee1275/ofconsole.c.
1394 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
1395 term/ieee1275/ofconsole.c.
1397 * include/grub/powerpc/ieee1275/console.h: Resurrected.
1399 * COPYING: Upgraded to the latest version. Only the address of the
1400 FSF office has changed.
1402 2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
1404 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
1405 kern/ieee1275.c with kern/ieee1275/of.c.
1407 * kern/ieee1275.c: Moved to ...
1408 * kern/ieee1275/of.c: ... here.
1410 2005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
1412 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
1415 * config.guess: Updated to the latest version from gnulib.
1416 * config.sub: Likewise.
1417 * install.sh: Likewise.
1418 * mkinstalldirs: Likewise.
1420 * include/grub/console.h: Removed. This file is arch-specific. Do
1421 not put this in include/grub.
1423 * include/grub/i386/pc/console.h: Resurrected.
1425 * util/console.c: Include grub/machine/console.h instead of
1427 * util/grub-emu.c: Likewise.
1429 2005-08-04 Marco Gerards <metgerards@student.han.nl>
1431 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
1434 From Vincent Pelletier <subdino2004@yahoo.fr>
1435 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
1436 Redefined to use grub_getwh.
1437 (grub_term): New member named getwh.
1438 (grub_getwh): New prototype.
1439 * kern/term.c (grub_getwh): New function.
1440 * term/i386/pc/console.c (grub_console_getwh): New function.
1441 (grub_console_term): New member `getwh'.
1442 * term/i386/pc/vga.c (grub_vga_getwh): New function.
1443 (grub_vga_term): New member `getwh'.
1444 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
1446 (grub_ofconsole_getw): New function.
1447 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
1448 (grub_ofconsole_term): New field named getwh and new initial
1451 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
1453 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
1454 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
1455 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
1456 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
1457 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
1458 of <grub/machine/ieee1275.h>.
1459 * commands/ieee1275/reboot.c: Likewise.
1460 * boot/powerpc/ieee1275/ieee1275.c: Move ...
1461 * kern/ieee1275.c: ... to here. All users updated. Change all
1462 parameter structs to use new type `grub_ieee1275_cell_t'.
1463 * term/powerpc/ieee1275/ofconsole.c: Move ...
1464 * term/ieee1275/ofconsole.c: ... to here. All users updated.
1465 * disk/powerpc/ieee1275/ofdisk.c: Move ...
1466 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
1467 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
1469 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
1470 Remove unused prototypes. All users updated.
1471 * include/grub/powerpc/ieee1275/console.h: Removed.
1472 * include/grub/powerpc/ieee1275/ieee1275.h: Define
1473 `grub_ieee1275_cell_t'.
1474 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
1475 Cast comparisons with -1 to the correct type.
1476 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
1477 type to match `grub_ieee1275_entry_fn'.
1479 2005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
1481 * DISTLIST: Added util/i386/pc/grub-probefs.c.
1483 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
1484 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
1486 (grub_probefs_SOURCES): New variable.
1488 * util/i386/pc/grub-probefs.c: New file.
1490 * util/i386/pc/grub-setup.c (main): Call
1491 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
1492 grub_hfs_init and grub_jfs_init to initialize the system. Call
1493 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
1494 grub_pc_partition_map_fini to finish the system.
1496 2005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
1498 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
1500 (grub_multiboot_load_elf32): Likewise.
1501 (grub_multiboot_is_elf64): Likewise.
1502 (grub_multiboot_load_elf64): Likewise.
1503 (grub_multiboot_load_elf): Likewise.
1504 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
1505 an ELF32 or ELF64 file.
1506 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
1508 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
1509 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
1510 NULL before calling FS->LABEL.
1511 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
1512 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
1513 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
1514 before calling FS->LABEL.
1516 2005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
1518 * util/i386/pc/grub-install.in (datadir): New variable.
1520 (pkgdatadir): New variable.
1521 (pkglibdir): Removed.
1523 2005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
1525 * DISTLIST: Added util/i386/pc/grub-install.in.
1527 * util/i386/pc/grub-install.in: New file.
1529 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
1530 (grub_install_SOURCES): Likewise.
1532 * genmk.rb: Added support for scripts.
1533 (Script): New class.
1534 (scripts): New variable.
1536 * Makefile.in (install-local): Install sbin_SCRIPTS by
1538 (uninstall): Remove sbin_SCRIPTS.
1540 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
1541 device, try to get a GRUB device by
1542 grub_util_biosdisk_get_grub_dev.
1545 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
1546 description for --device-map.
1548 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
1550 Change the semantics of variable hooks. They now return strings
1551 instead of error values.
1553 * util/i386/pc/grub-setup.c: Include grub/env.h.
1554 (setup): Use grub_device_set_root instead of grub_env_set.
1556 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
1557 grub_env_get instead of grub_device_set_root and
1558 grub_device_get_root, respectively.
1560 * kern/main.c (grub_env_write_root): New function.
1561 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
1562 grub_env_set instead of grub_device_set_root.
1564 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
1566 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
1567 rather than calling ENV->WRITE_HOOK afterwards.
1568 (grub_env_get): Return the result of ENV->READ_HOOK rather than
1569 passing a pointer of a pointer.
1570 (grub_register_variable_hook): Change the types of "read_hook" and
1571 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
1573 Allocate the default empty string on the heap, because this string
1576 * kern/device.c: Include grub/env.h.
1577 (grub_device_set_root): Removed.
1578 (grub_device_get_root): Likewise.
1579 (grub_device_open): Use grub_env_get instead of
1580 grub_device_get_root.
1582 * include/grub/env.h (grub_env_read_hook_t): New type.
1583 (grub_env_write_hook_t): Likewise.
1584 (grub_env_var): Change the types of "read_hook" and "write_hook"
1585 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
1586 (grub_register_variable_hook): Likewise.
1588 * include/grub/device.h (grub_device_set_root): Removed.
1589 (grub_device_set_root): Likewise.
1591 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
1592 make sure that DIRNAME terminates with '/', so that
1593 grub_fat_find_dir will fail if PATH is not a directory.
1595 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
1597 Use the qualifier auto for print_files and print_files_long.
1598 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
1600 Put a newline only if there is no error.
1601 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
1604 2005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
1606 * kern/partition.c (grub_partition_probe): Initialize PART to
1607 NULL. Otherwise, when no partition map is registered, this returns
1610 2005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
1612 * partmap/apple.c (apple_partition_map_iterate): Check if POS
1613 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
1616 2005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
1618 * commands/ls.c (grub_ls_list_disks): Print the filesystem
1619 information on each device, if it does not have partitions. Print
1620 "Device" instead of "Disk", because this function is not specific
1623 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
1624 static to ensure that it is put on the memory rather than a
1627 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
1629 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
1630 (grub_cat_init): Likewise.
1631 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
1632 (options): Likewise.
1633 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
1634 (grub_configfile_init): Likewise.
1635 * font/manager.c (GRUB_MOD_INIT): Likewise.
1636 * commands/help.c (GRUB_MOD_INIT): Likewise.
1637 (grub_help_init): Likewise.
1638 * normal/command.c (grub_command_init): Likewise.
1639 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
1640 * disk/loopback.c (grub_loop_init): Likewise.
1641 (GRUB_MOD_INIT): Likewise.
1642 * commands/ls.c (grub_ls_init): Likewise.
1643 (GRUB_MOD_INIT): Likewise.
1644 (options): Likewise.
1645 * commands/boot.c (grub_boot_init): Likewise.
1646 (GRUB_MOD_INIT): Likewise.
1647 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
1648 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
1649 (GRUB_MOD_INIT): Likewise.
1650 * commands/cmp.c (grub_cmp_init): Likewise.
1651 (GRUB_MOD_INIT): Likewise.
1653 * normal/arg.c: Use <> instead of "" to include header files.
1654 (SHORT_ARG_HELP): New macro.
1655 (SHORT_ARG_USAGE): Likewise.
1656 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
1657 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
1659 (find_short): Check if C is 'h' or 'u' explicitly.
1660 (grub_arg_show_help): Use space characters instead of tabs. Treat
1661 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
1662 are shown with --help and --usage only if they are not used for
1664 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
1667 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
1668 const into "longarg". Change the type of "shortarg" to int.
1670 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
1672 * boot/i386/pc/boot.S (boot_drive_check): New label.
1674 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
1677 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
1678 which do not pass a boot drive correctly. Copied from GRUB Legacy.
1680 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
1682 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
1683 When turning off Gate A20, skip the check and return immediately,
1684 because this is not fatal usually.
1686 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
1688 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
1689 be 0x7C00 instead of 0x8000.
1691 * boot/i386/pc/pxeboot.S: Rewritten.
1693 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
1695 (gate_a20_check_state): Read a byte from 0x108000. Invert the
1698 2005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
1700 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
1701 robustness. This routine now supports a BIOS call and System
1702 Control Port A to modify the gate A20.
1704 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
1707 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
1709 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
1710 device path and resulting ihandle.
1711 (grub_ofdisk_close): dprintf the ihandle being closed.
1712 (grub_ofdisk_read): dprintf function parameters.
1713 * kern/mm.c (grub_mm_init_region): Likewise.
1714 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
1715 (grub_linux_boot): dprintf the Linux entry point, initrd address and
1716 size, and boot arguments.
1717 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
1718 before loading into memory.
1719 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
1720 before loading into memory.
1722 2005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
1724 * kern/mm.c: Added much documentation.
1725 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
1726 8, set to 5 instead of 8.
1728 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
1730 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
1732 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
1733 (grub_mkdevicemap_SOURCES): New variable.
1735 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
1736 lib/device.c of GRUB Legacy.
1738 2005-07-10 Yoshinori Okuji <okuji@enbug.org>
1740 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
1741 instead of PATH is NULL.
1743 2005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
1745 * commands/cmp.c (BUFFER_SIZE): New macro.
1746 (grub_cmd_cmp): Close the right file at the right time. Compare
1747 only data just read. Don't report files of different size as
1748 identical. Dynamically allocate buffers. Move variable
1749 declarations at the beginning of function.
1751 2005-07-09 Yoshinori Okuji <okuji@enbug.org>
1753 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
1756 2004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
1758 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
1759 when backspace is pressed at beginning of line.
1761 2005-07-03 Yoshinori Okuji <okuji@enbug.org>
1763 * DISTLIST: Added genfslist.sh.
1765 * normal/main.c (fs_module_list): New variable.
1766 (autoload_fs_module): New function.
1767 (read_fs_list): Likewise.
1768 (grub_normal_execute): Call read_fs_list.
1770 * kern/fs.c (grub_fs_autoload_hook): New variable.
1771 (grub_fs_probe): Added support for auto-loading.
1773 * include/grub/normal.h (struct grub_fs_module_list): New struct.
1774 (grub_fs_module_list_t): New type.
1776 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
1777 (grub_fs_autoload_hook): New prototype.
1779 * genfslist.sh: New file.
1781 * genmk.rb: Added a rule to generate a filesystem list.
1783 2005-06-30 Marco Gerards <metgerards@student.han.nl>
1785 * configure.ac: Fix the test for cross-compiling.
1787 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
1788 define GRUB_UTIL anymore.
1790 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
1791 so this function works on other systems than just big endian.
1792 (load_modules): Likewise.
1793 (add_segments): Likewise.
1795 2005-06-23 Hollis Blanchard <hollis@penguinppc.org>
1797 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
1798 contains `l' modifier, get a long from va_arg().
1800 2005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
1802 * kern/mm.c (grub_free): If the next free block which is being
1803 merged is the first free block, set the first block to the block
1805 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
1807 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
1809 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
1810 `grub_ieee1275_chosen'.
1812 2005-05-08 Hollis Blanchard <hollis@penguinppc.org>
1814 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
1815 (grub_ieee1275_chosen): New variable.
1816 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
1818 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
1819 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
1820 Rename first argument to `phandle' for consistency.
1821 (grub_ieee1275_get_property_length): Likewise.
1822 (grub_ieee1275_next_property): Likewise. Change type of first argument
1823 to grub_ieee1275_phandle_t.
1824 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
1825 Move export next to declaration.
1826 (grub_ieee1275_chosen): New variable.
1827 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
1828 Correct cosmetic typo.
1829 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
1830 `grub_ieee1275_chosen'.
1831 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
1832 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
1833 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
1834 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
1835 `grub_ieee1275_chosen'.
1837 2005-05-10 Hollis Blanchard <hollis@penguinppc.org>
1839 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
1841 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
1842 /chosen/bootargs as "variable=value" pairs.
1844 2005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
1846 * include/grub/misc.h (grub_dprintf): New macro.
1847 (grub_real_dprintf): New prototype.
1848 (grub_strword): Likewise.
1849 (grub_iswordseparator): Likewise.
1850 * kern/misc.c (grub_real_dprintf): New function.
1851 (grub_strword): Likewise.
1852 (grub_iswordseparator): Likewise.
1854 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
1856 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
1857 (roundup): Remove macro.
1858 (grub_ieee1275_flags): Make static.
1859 (grub_ieee1275_realmode): Remove.
1860 (grub_ieee1275_test_flag): New function.
1861 (grub_ieee1275_set_flag): Likewise.
1862 (find_options): Rename to `grub_ieee1275_find_options'; update
1863 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
1864 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
1865 (cmain): New prototype.
1866 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
1867 `grub_ieee1275_flags' directly.
1868 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
1870 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
1871 Don't include grub/machine/init.h.
1872 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
1873 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
1875 (grub_ieee1275_realmode): Likewise.
1876 (grub_ieee1275_flag): New enum.
1877 (grub_ieee1275_test_flag): New prototype.
1878 (grub_ieee1275_set_flag): New prototype.
1879 * include/grub/powerpc/ieee1275/init.h: Remove file.
1880 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
1881 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
1882 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
1883 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
1885 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
1886 `grub_ieee1275_test_flag'.
1887 (grub_ieee1275_encode_devname): Likewise.
1889 2005-04-21 Hollis Blanchard <hollis@penguinppc.org>
1891 * include/grub/powerpc/ieee1275/ieee1275.h
1892 (grub_ieee1275_encode_devname): New prototype.
1893 (grub_ieee1275_get_filename): Likewise.
1894 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
1896 (grub_set_prefix): Likewise.
1897 (grub_machine_init): Call grub_set_prefix.
1898 * kern/powerpc/ieee1275/openfw.c: Fix typos.
1899 (grub_parse_type): New enum.
1900 (grub_ieee1275_get_devargs): New function.
1901 (grub_ieee1275_get_devname): Likewise.
1902 (grub_ieee1275_parse_args): Likewise.
1903 (grub_ieee1275_get_filename): Likewise.
1904 (grub_ieee1275_encode_devname): Likewise.
1906 2005-03-30 Marco Gerards <metgerards@student.han.nl>
1908 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
1909 `grub_loader_unset'.
1911 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
1913 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
1914 instead of grub_ieee1275_interpret.
1915 (grub_halt_init): New function.
1916 (grub_halt_fini): Likewise.
1917 (GRUB_MOD_INIT): Correct message grammar.
1918 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
1919 instead of grub_ieee1275_interpret.
1920 (grub_reboot_init): New function.
1921 (grub_reboot_fini): Likewise.
1922 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
1923 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
1924 util/i386/pc/misc.c with commands/ieee1275/halt.c,
1925 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
1926 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
1928 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
1930 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
1932 (grub_halt): Likewise.
1933 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
1934 (cmain): Remove __attribute__((unused)).
1935 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
1936 (grub_heap_len): Likewise.
1937 (grub_machine_fini): New function.
1938 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
1939 (grub_halt): Likewise.
1940 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
1942 * util/powerpc/ieee1275/misc.c: New file.
1944 2005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
1946 * DISTLIST: New file.
1947 * gendistlist.sh: Likewise.
1949 * Makefile.in (COMMON_DISTFILES): Removed.
1950 (BOOT_DISTFILES): Likewise.
1951 (CONF_DISTFILES): Likewise.
1952 (DISK_DISTFILES): Likewise.
1953 (FS_DISTFILES): Likewise.
1954 (INCLUDE_DISTFILES): Likewise.
1955 (KERN_DISTFILES): Likewise.
1956 (LOADER_DISTFILES): Likewise.
1957 (TERM_DISTFILES): Likewise.
1958 (UTIL_DISTFILES): Likewise.
1959 (DISTFILES): Likewise.
1960 (uninstall): Uninstall files in $(pkgdata_DATA).
1961 (DISTLIST): New target.
1962 (distdir): Use the contents of the file DISTLIST to get a list of
1965 2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
1967 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
1968 descriptor. This is ported from GRUB Legacy.
1970 * gencmdlist.sh: Added an extra semicolon to make it work with
1971 old sed versions. Reported by Robert Bihlmeyer
1972 <robbe@orcus.priv.at>.
1974 2005-03-08 Yoshinori Okuji <okuji@enbug.org>
1976 Automatic loading of commands is supported.
1978 * normal/main.c (read_command_list): New function.
1979 (grub_normal_execute): Call read_command_list.
1981 * normal/command.c (grub_register_command): Return zero or CMD.
1982 Allocate CMD->NAME from the heap.
1983 Initialize CMD->MODULE_NAME to zero.
1984 Find the same name as well. If the same command is found and it is
1985 a dummy command, overwrite members. If it is not a dummy command,
1987 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
1988 (grub_command_find): If a dummy command is found, load a module
1989 and retry to find a command only once.
1991 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
1992 make sure that each command is loaded.
1994 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
1996 (struct grub_command): Remove const from the member `name'.
1997 Add a new member `module_name'.
1998 (grub_register_command): Return grub_command_t.
2000 * commands/help.c (grub_cmd_help): Call grub_command_find to make
2001 sure that each command is loaded.
2003 * genmk.rb (PModule::rule): Specify a module name without the
2004 suffix ".mod" to gencmdlist.sh.
2006 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
2008 * gencmdlist.sh: New file.
2010 * genmk.rb (PModule::rule): Generate a rule for a command list.
2012 Generate command.lst from $(COMMANDFILES).
2014 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
2015 (DATA): Added $(pkgdata_DATA).
2016 (install-local): Install files in $(pkgdata_DATA).
2018 2005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
2020 * term/i386/pc/vga.c (debug_command): Removed.
2021 (GRUB_MOD_INIT): Do not register the command "debug".
2023 From Hollis Blanchard:
2024 * commands/configfile.c: New file.
2025 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
2026 commands/configfile.c.
2027 (pkgdata_MODULES): Added configfile.mod.
2028 (configfile_mod_SOURCES): New variable.
2029 (configfile_mod_CFLAGS): Likewise.
2030 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
2031 commands/configfile.c.
2032 (pkgdata_MODULES): Added configfile.mod.
2033 (configfile_mod_SOURCES): New variable.
2034 (configfile_mod_CFLAGS): Likewise.
2035 * util/grub-emu.c (main): Call grub_configfile_init and
2036 grub_configfile_fini.
2037 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
2039 [GRUB_UTIL] (grub_configfile_fini): Likewise.
2041 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
2043 * normal/arg.c (grub_arg_show_help): Do not show the bug report
2046 * commands/help.c (grub_cmd_help): Do not print newlines after
2047 the last command in print_command_help.
2049 2005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
2051 * commands/default.h: New file.
2052 * commands/timeout.h: Likewise.
2053 * normal/context.c: Likewise.
2055 * util/misc.c: Do not include sys/times.h.
2056 Include sys/time.h and grub/machine/time.h.
2057 (grub_get_rtc): Rewritten with gettimeofday.
2059 * util/grub-emu.c (main): Call grub_default_init and
2060 grub_timeout_init before grub_normal_init, and call
2061 grub_timeout_fini and grub_default_fini after grub_main.
2063 * util/console.c (grub_ncurses_checkkey): Return the read
2066 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
2069 * normal/main.c (read_config_file): Push MENU. If this fails,
2070 print an error and wait for a user input.
2071 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
2072 If a menu is empty or an error occurs, pop MENU.
2073 (grub_normal_execute): Pop and free MENU after grub_menu_run
2076 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
2078 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
2080 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
2082 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
2084 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
2087 * include/grub/normal.h (struct grub_menu_list): New struct.
2088 (grub_menu_list_t): New type.
2089 (struct grub_context): New struct.
2090 (grub_context_t): New type.
2091 (grub_register_command): Got rid of EXPORT_FUNC.
2092 (grub_unregister_command): Likewise.
2093 (grub_context_get): New prototype.
2094 (grub_context_get_current_menu): Likewise.
2095 (grub_context_push_menu): Likewise.
2096 (grub_context_pop_menu): Likewise.
2097 [GRUB_UTIL] (grub_default_init): Likewise.
2098 [GRUB_UTIL] (grub_default_fini): Likewise.
2099 [GRUB_UTIL] (grub_timeout_init): Likewise.
2100 [GRUB_UTIL] (grub_timeout_fini): Likewise.
2102 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
2103 commands/timeout.c and normal/context.c.
2104 (pkgdata_MODULES): Added default.mod and timeout.mod.
2105 (normal_mod_SOURCES): Added normal/context.c.
2106 (default_mod_SOURCES): New variable.
2107 (default_mod_CFLAGS): Likewise.
2108 (timeout_mod_SOURCES): Likewise.
2109 (timeout_mod_CFLAGS): Likewise.
2110 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
2112 (pkgdata_MODULES): Added default.mod and timeout.mod.
2113 (normal_mod_SOURCES): Added normal/context.c.
2114 (default_mod_SOURCES): New variable.
2115 (default_mod_CFLAGS): Likewise.
2116 (timeout_mod_SOURCES): Likewise.
2117 (timeout_mod_CFLAGS): Likewise.
2119 * Makefile.in (all-local): Added $(MKFILES).
2121 2005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
2123 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
2124 (grub_emu_SOURCES): Likewise.
2125 (pkgdata_MODULES): Add `sun.mod'.
2126 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
2127 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2129 (pkgdata_MODULES): Add `sun.mod'.
2130 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
2131 * include/grub/partition.h (grub_sun_partition_map_init): New
2133 (grub_sun_partition_map_fini): Likewise.
2134 * partmap/sun.c: New file.
2135 * util/grub-emu.c (main): Initialize and de-initialize the sun
2136 partitionmap support.
2138 2005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
2140 This implements an Emacs-like menu entry editor.
2142 * normal/menu_entry.c: New file.
2144 * util/console.c (grub_ncurses_putchar): Translate some Unicode
2145 characters to ASCII.
2146 (saved_char): New variable.
2147 (grub_ncurses_checkkey): Rewritten completely.
2148 (grub_ncurses_getkey): Likewise.
2149 (grub_ncurses_init): Call raw instead of cbreak.
2151 * normal/menu.c (print_entry): Do not put a space.
2152 (init_page): Renamed to ...
2153 (grub_menu_init_page): ... this. All callers changed.
2154 (edit_menu_entry): Removed.
2155 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
2157 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
2159 * kern/misc.c (grub_vprintf): Call grub_refresh.
2161 * normal/menu.c (DISP_LEFT): Renamed to ...
2162 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
2163 * normal/menu.c (DISP_UP): Renamed to ...
2164 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
2165 * normal/menu.c (DISP_RIGHT): Renamed to ...
2166 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
2167 * normal/menu.c (DISP_DOWN): Renamed to ...
2168 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
2169 * normal/menu.c (DISP_HLINE): Renamed to ...
2170 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
2171 * normal/menu.c (DISP_VLINE): Renamed to ...
2172 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
2173 * normal/menu.c (DISP_UL): Renamed to ...
2174 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
2175 * normal/menu.c (DISP_UR): Renamed to ...
2176 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
2177 * normal/menu.c (DISP_LL): Renamed to ...
2178 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
2179 * normal/menu.c (DISP_LR): Renamed to ...
2180 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
2181 * normal/menu.c (TERM_WIDTH): Renamed to ...
2182 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
2183 * normal/menu.c (TERM_HEIGHT): Renamed to ...
2184 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
2185 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
2186 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
2187 * normal/menu.c (TERM_MARGIN): Renamed to ...
2188 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
2189 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
2190 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
2191 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
2192 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
2193 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
2194 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
2195 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
2196 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
2197 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
2198 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
2199 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
2200 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
2201 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
2202 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
2203 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
2204 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
2205 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
2206 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
2207 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
2208 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
2209 All callers changed.
2211 * include/grub/normal.h: New prototype.
2213 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
2214 normal/menu_entry.c.
2215 (normal_mod_SOURCES): Likewise.
2216 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2217 (normal_mod_SOURCES): Likewise.
2219 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
2221 * include/grub/normal.h (grub_halt_init): New prototype.
2222 (grub_halt_fini): Likewise.
2223 (grub_reboot_init): Likewise.
2224 (grub_reboot_fini): Likewise.
2226 * util/grub-emu.c: Include signal.h.
2227 (main_env): New global variable.
2228 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
2230 (grub_machine_fini): New function.
2231 (main): Call grub_halt_init and grub_reboot_init before
2232 grub_main, and grub_reboot_fini and grub_halt_fini after it.
2233 Call setjmp with MAIN_ENV to go back afterwards.
2234 Call grub_machine_fini right before return.
2236 * include/grub/util/misc.h: Include setjmp.h.
2237 (main_env): New prototype.
2239 * include/grub/kernel.h (grub_machine_fini): New prototype.
2240 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
2241 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
2243 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
2244 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
2245 * term/i386/pc/console.c (grub_console_fini): Likewise.
2247 * util/i386/pc/misc.c: New file.
2249 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
2250 util/i386/pc/misc.c, commands/i386/pc/halt.c and
2251 commands/i386/pc/reboot.c.
2253 2005-02-14 Guillem Jover <guillem@hadrons.org>
2255 * include/grub/dl.h (grub_dl_check_header): New prototype.
2256 (grub_arch_dl_check_header): Change return type to grub_err_t,
2257 remove size parameter and export function. Update all callers.
2258 * kern/dl.c (grub_dl_check_header): New function.
2259 (grub_dl_load_core): Use `grub_dl_check_header' instead of
2260 `grub_arch_dl_check_header'. Check ELF type. Check if sections
2261 are inside the core.
2262 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
2263 independent ELF header checks.
2264 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
2265 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
2266 `grub_dl_check_header' instead of explicit checks. Check for the
2268 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
2269 `grub_dl_check_header' instead of explicit checks. Remove arch
2270 specific ELF header checks.
2272 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
2275 2005-02-13 Hollis Blanchard <hollis@penguinppc.org>
2277 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
2278 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
2280 2005-02-12 Hollis Blanchard <hollis@penguinppc.org>
2282 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
2283 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
2284 (part_map_iterate): Clear `grub_errno' and return 0 if
2285 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
2286 * partmap/amiga.c (amiga_partition_map_iterate): Return
2287 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
2288 * partmap/apple.c (apple_partition_map_iterate): Likewise.
2290 2005-02-01 Guillem Jover <guillem@hadrons.org>
2292 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
2295 2005-01-31 Marco Gerards <metgerards@student.han.nl>
2297 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
2299 (grub_rescue_cmd_linux): New prototype.
2300 (grub_rescue_cmd_initrd): Likewise.
2301 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
2303 (grub_linux_release_mem): Release the memory for the initrd.
2304 (grub_load_linux): Renamed from this...
2305 (grub_rescue_cmd_linux): ...To this. Changed all callers.
2306 Changed `entry' not to be static. Loop over memory regions to
2307 find another one when the default fails.
2308 (grub_rescue_cmd_initrd): New function.
2309 (grub_linux_init): Remove function.
2310 (grub_linux_fini): Likewise.
2311 (GRUB_MOD_INIT): Register `initrd'.
2312 (GRUB_MOD_FINI): Unregister `initrd'.
2313 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
2315 (grub_linux_normal_fini): Likewise.
2316 (GRUB_MOD_INIT): Register `initrd'.
2317 (GRUB_MOD_FINI): Unregister `initrd'.
2319 2005-01-31 Marco Gerards <metgerards@student.han.nl>
2321 * commands/help.c: New file.
2322 * normal/arg.c (show_help): Renamed to...
2323 (grub_arg_show_help): ... this.
2324 * commands/i386/pc/halt.c: New file.
2325 * commands/i386/pc/reboot.c: Likewise.
2326 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
2327 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
2328 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
2329 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
2331 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2333 (pkgdata_MODULES): Add `help.mod'.
2334 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
2335 * grub/i386/pc/init.h (grub_reboot): New prototype.
2336 (grub_halt): Likewise.
2337 * include/grub/normal.h (grub_arg_show_help): New prototype.
2338 (grub_help_init): Likewise.
2339 (grub_help_fini): Likewise.
2340 * util/grub-emu.c (main): Initialize and deinitialize the help
2343 * normal/cmdline.c (grub_cmdline_get): Doc fix.
2345 * normal/command.c (grub_command_init): Fixed the description of
2346 the `set' and `unset' commands.
2348 2005-01-31 Marco Gerards <metgerards@student.han.nl>
2350 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
2352 * commands/ieee1275/halt.c: New file.
2353 * commands/ieee1275/reboot.c: Likewise.
2354 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
2355 `__attribute__ ((unused))'. Some GCS related fixed.
2356 (grub_suspend_init) [GRUB_UTIL]: Function removed.
2357 (grub_suspend_fini): Likewise.
2358 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
2360 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
2361 (halt_mod_CFLAGS): New variables.
2362 * include/grub/powerpc/ieee1275/ieee1275.h
2363 (grub_ieee1275_interpret): New prototype.
2365 2005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
2367 * include/grub/misc.h (memmove): New prototype.
2370 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
2372 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
2373 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
2375 2005-01-22 Marco Gerards <metgerards@student.han.nl>
2377 * kern/misc.c (grub_strndup): Function rewritten.
2379 2005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
2381 * normal/menu.c (TERM_WIDTH): Macro redefined.
2382 (TERM_TOP_BORDER_Y): Likewise.
2383 (draw_border): Replaced while-loop by a for-loop. Make the number
2384 of lines consistent with the number of lines displayed in
2385 print_entries. Added a margin below the rectangle.
2386 (print_entry): Make the entry fit in the rectangle.
2387 (print_entries): Display the scroll arrows next to the right
2390 2005-01-21 Marco Gerards <metgerards@student.han.nl>
2392 * fs/minix.c (grub_minix_find_file): Reserve more space for
2393 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
2394 `grub_strncpy' to copy `path' into it.
2396 2005-01-21 Marco Gerards <metgerards@student.han.nl>
2398 Add the loopback device, a device via which files can be accessed
2401 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
2402 (pkgdata_MODULES): Add loopback.mod.
2403 (loopback_mod_SOURCES): New variable.
2404 (loopback_mod_CFLAGS): Likewise.
2405 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2407 (pkgdata_MODULES): Add loopback.mod.
2408 (loopback_mod_SOURCES): New variable.
2409 (loopback_mod_CFLAGS): Likewise.
2410 * disk/loopback.c: new file.
2411 * include/grub/normal.h (grub_loop_init): New prototype.
2412 (grub_loop_fini): New prototype.
2413 * util/grub-emu.c (main): Initialize and de-initialize loopback
2415 * include/grub/disk.h (grub_disk_dev_id): Add
2416 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
2418 2005-01-20 Hollis Blanchard <hollis@penguinppc.org>
2420 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
2422 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
2423 (suspend_mod_SOURCES): New variable.
2424 (suspend_mod_CFLAGS): Likewise.
2425 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
2427 * commands/ieee1275/suspend.c: New file.
2429 2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
2431 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
2432 ((unused))' to `__attribute__ ((used))'.
2433 (GRUB_MOD_FINI): Likewise.
2434 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
2435 * genmk.rb (PModule): Assign space to common symbols when linking
2438 2005-01-20 Marco Gerards <metgerards@student.han.nl>
2440 * include/grub/mm.h (grub_mm_init_region): Change the type of the
2441 `unsigned' arguments to `grub_size_t'.
2442 (grub_malloc): Likewise.
2443 (grub_realloc): Likewise.
2444 (grub_memalign): Likewise.
2445 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
2446 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
2447 * util/misc.c (grub_malloc): Likewise.
2448 (grub_realloc): Likewise.
2449 * kern/mm.c (get_header_from_pointer): Change the casts to
2450 `unsigned' into a cast to `grub_size_t'.
2452 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
2453 point to `currnode' when `currnode' is changed.
2455 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
2456 Schottelius <nico-linux@schottelius.org>.
2458 2005-01-09 Hollis Blanchard <hollis@penguinppc.org>
2460 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
2461 (note_path): Remove variable.
2462 (GRUB_IEEE1275_NOTE_NAME): New macro.
2463 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
2464 (grub_ieee1275_note_hdr): New structure.
2465 (grub_ieee1275_note_desc): Likewise.
2466 (grub_ieee1275_note): Likewise.
2467 (load_note): Remove `dir' argument. All callers updated. Remove
2468 `note_img' and `path'. Do not load a file from `note_path'.
2469 Initialize a struct grub_ieee1275_note and write that to `out'.
2470 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
2472 2005-01-05 Marco Gerards <metgerards@student.han.nl>
2474 * util/misc.c (grub_util_read_image): Revert last change. It
2475 called `grub_util_read_at', which seeks from the beginning of the
2478 2005-01-04 Hollis Blanchard <hollis@penguinppc.org>
2480 * TODO: Add note about endianness in grub-mkimage.
2481 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
2483 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
2484 (grub_mkimage_SOURCES): New target.
2485 * include/grub/kernel.h (grub_start_addr): Remove variable.
2486 (grub_end_addr): Likewise.
2487 (grub_total_module_size): Likewise.
2488 (grub_kernel_image_size): Likewise.
2489 (GRUB_MODULE_MAGIC): New constant.
2490 (grub_module_info): New structure.
2491 (grub_arch_modules_addr): New prototype.
2492 (grub_get_end_addr): Remove prototype.
2493 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
2494 * include/grub/powerpc/ieee1275/kernel.h: New file.
2495 * include/grub/util/misc.h (grub_util_get_fp_size): New
2497 (grub_util_read_at): Likewise.
2498 (grub_util_write_image_at): Likewise.
2499 * kern/main.c (grub_get_end_addr): Remove function.
2500 (grub_load_modules): Call grub_arch_modules_addr instead of using
2501 grub_end_addr. Look for a grub_module_info struct in memory. Use
2502 the grub_module_info fields instead of calling grub_get_end_addr
2503 as loop conditions. Move grub_add_unused_region code here.
2504 (grub_add_unused_region): Remove function.
2505 * kern/i386/pc/init.c: Include grub/cache.h.
2506 (grub_machine_init): Remove call to grub_get_end_addr. Remove
2507 one call to add_mem_region.
2508 (grub_arch_modules_addr): New function.
2509 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
2510 (grub_total_module_size): Likewise.
2511 Include grub/machine/kernel.h.
2512 (grub_arch_modules_addr): New function.
2513 * util/grub-emu.c (grub_end_addr): Remove variable.
2514 (grub_total_module_size): Likewise.
2515 (grub_arch_modules_addr): New function.
2516 * util/misc.c: Include unistd.h.
2517 (grub_util_get_fp_size): New function.
2518 (grub_util_read_at): Likewise.
2519 (grub_util_write_image_at): Likewise.
2520 (grub_util_read_image): Call grub_util_read_at.
2521 (grub_util_write_image): Call grub_util_write_image_at.
2522 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
2523 additional memory in kernel_img for a struct grub_module_info.
2524 Fill in that grub_module_info.
2525 * util/powerpc/ieee1275/grub-mkimage.c: New file.
2527 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
2529 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
2531 * include/grub/powerpc/ieee1275/ieee1275.h
2532 (grub_ieee1275_milliseconds): New prototype.
2533 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
2535 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
2536 grub_ieee1275_milliseconds.
2538 2005-01-03 Hollis Blanchard <hollis@penguinppc.org>
2540 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
2542 (find_options): New function.
2543 (cmain): Call find_options.
2544 * include/grub/powerpc/ieee1275/ieee1275.h
2545 (grub_ieee1275_realmode): New extern variable.
2546 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
2547 grub_map if grub_ieee1275_realmode is false.
2549 2004-12-29 Marco Gerards <metgerards@student.han.nl>
2551 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
2552 lines are inserted and make it work like readline. Reported by
2553 Vincent Pelletier <subdino2004@yahoo.fr>.
2555 2004-12-28 Marco Gerards <metgerards@student.han.nl>
2557 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
2559 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
2560 `kern/powerpc/cache.S'.
2562 2004-12-27 Marco Gerards <metgerards@student.han.nl>
2564 * genmk.rb: Handle the `Program' class in the main loop. Written
2565 by Johan Rydberg <jrydberg@gnu.org>.
2566 (Program): New class.
2567 (programs): New variable.
2568 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
2569 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
2570 instead of "grub/kernel.h". Include <grub/machine/init.h>.
2571 (help_arch): Function removed.
2572 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
2573 `powerpc/libgcc.h' and `loader.h'.
2574 (pkgdata_PROGRAMS): New variable.
2575 (sbin_UTILITIES): Variable removed.
2576 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
2577 (grubof_SOURCES): Variable re-defined so it only includes the
2579 (grubof_CFLAGS): Remove `-DGRUBOF'.
2580 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
2581 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
2582 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
2583 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
2584 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
2585 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
2586 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
2587 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
2588 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
2589 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
2590 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
2591 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
2592 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
2593 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
2594 (pc_mod_CFLAGS): New variables.
2595 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
2596 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
2597 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
2598 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
2600 * include/grub/i386/pc/init.h (grub_os_area_addr)
2601 (rub_os_area_size): ... to here.
2602 * include/grub/powerpc/ieee1275/ieee1275.h
2603 (grub_ieee1275_entry_fn): Export symbol.
2604 * include/grub/powerpc/ieee1275/init.h: New file.
2605 * include/grub/powerpc/libgcc.h: Likewise.
2606 * include/grub/cache.h: Likewise.
2607 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
2608 <hollis@penguinppc.org>.
2609 * kern/dl.c: Include <grub/cache.h>.
2610 (grub_dl_flush_cache): New function.
2611 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
2613 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
2614 (grub_console_init): Removed prototypes.
2615 (grub_machine_init): Don't initialize the modules anymore.
2616 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
2618 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
2619 Macro undef removed.
2620 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
2621 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
2622 relocation `R_PPC_REL32'. Return an error when the relocation is
2624 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
2625 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
2626 * util/misc.c (grub_arch_sync_caches): Likewise.
2628 2004-12-19 Marco Gerards <metgerards@student.han.nl>
2630 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
2631 `symlist.c', add `grubof_symlist.c'.
2632 (symlist.c): Variable removed.
2633 (grubof_HEADERS): Variable added.
2634 (grubof_symlist.c): New target.
2635 (kernel_syms.lst): Use `grubof_HEADERS' instead of
2636 `kernel_img_HEADERS'.
2637 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
2638 * kern/powerpc/dl.c: New file.
2639 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
2641 (grub_arch_dl_relocate_symbols): Likewise.
2642 (grub_register_exported_symbols): Likewise.
2644 2004-12-13 Marco Gerards <metgerards@student.han.nl>
2646 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
2647 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
2648 to fail instead. Reported by Vincent Pelletier
2649 <subdino2004@yahoo.fr>.
2651 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
2652 it is not allocated. Reported by Vincent Pelletier
2653 <subdino2004@yahoo.fr>.
2655 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
2656 output so the output looks better.
2658 2004-12-04 Marco Gerards <metgerards@student.han.nl>
2660 Modulize the partition map support and add support for the amiga
2663 * commands/ls.c: Include <grub/partition.h> instead of
2664 <grub/machine/partition.h>.
2665 * kern/disk.c: Likewise.
2666 * kern/rescue.c: Likewise.
2667 * loader/i386/pc/chainloader.c: Likewise.
2668 * normal/cmdline.c: Likewise.
2669 * kern/powerpc/ieee1275/init.c: Likewise.
2670 (grub_machine_init): Call `grub_pc_partition_map_init',
2671 `grub_amiga_partition_map_init' and
2672 `grub_apple_partition_map_init'.
2673 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
2674 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
2675 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
2676 `partition.h' and `pc_partition.h'.
2677 (grub_setup_SOURCES): Remove
2678 `disk/i386/pc/partition.c'. Add `kern/partition.c',
2679 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
2680 (grub_emu_SOURCES): Likewise.
2681 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
2682 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
2683 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
2684 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
2685 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
2686 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
2687 (grubof_SOURCES): Likewise.
2688 * disk/i386/pc/partition.c: File removed.
2689 * disk/powerpc/ieee1275/partition.c: Likewise.
2690 * include/grub/powerpc/ieee1275/partition.h: Likewise.
2691 * include/grub/i386/pc/partition.h: Likewise.
2692 * kern/partition.c: New file.
2693 * partmap/amiga.c: Likewise.
2694 * partmap/apple.c: Likewise.
2695 * partmap/pc.c: Likewise.
2696 * include/grub/partition.h: Likewise..
2697 * include/grub/pc_partition.h: Likewise.
2698 * util/grub-emu.c: Include <grub/partition.h> instead of
2699 <grub/machine/partition.h>.
2700 (main): Call `grub_pc_partition_map_init',
2701 `grub_amiga_partition_map_init' and
2702 `grub_apple_partition_map_init' and deinitialize afterwards.
2703 * util/i386/pc/biosdisk.c: Include `#include
2704 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
2705 `<grub/machine/partition.h>'.
2706 * util/i386/pc/grub-setup.c: Likewise.
2707 * util/i386/pc/biosdisk.c: Likewise.
2708 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
2709 partition information in case of a PC partition.
2710 * util/i386/pc/grub-setup.c: Include `#include
2711 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
2712 `<grub/machine/partition.h>'.
2713 (setup): Only access the PC specific partition information in case
2716 2004-11-17 Hollis Blanchard <hollis@penguinppc.org>
2718 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
2719 (grub_longjmp): Likewise.
2720 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
2722 * normal/powerpc/setjmp.S: New file.
2723 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
2724 `normal/powerpc/setjmp.S'.
2725 (grubof_CFLAGS): Add `-DGRUBOF'.
2726 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
2727 [GRUB_UTIL && !GRUBOF].
2729 2004-11-16 Marco Gerards <metgerards@student.han.nl>
2731 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
2732 property named `name'. Correctly handle the error returned by
2733 `grub_ieee1275_finddevice' if a device can not be opened.
2735 2004-11-02 Hollis Blanchard <hollis@penguinppc.org>
2737 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
2738 `actual' for negativity.
2739 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
2742 2004-11-01 Marco Gerards <metgerards@student.han.nl>
2744 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
2745 (PAGE_OFFSET): New macro.
2746 (CRTC_ADDR_PORT): Likewise.
2747 (CRTC_DATA_PORT): Likewise.
2748 (START_ADDR_HIGH_REGISTER): Likewise.
2749 (START_ADDR_LOW_REGISTER): Likewise.
2750 (GRAPHICS_ADDR_PORT): Likewise.
2751 (GRAPHICS_DATA_PORT): Likewise.
2752 (READ_MAP_REGISTER): Likewise.
2753 (INPUT_STATUS1_REGISTER): Likewise.
2754 (INPUT_STATUS1_VERTR_BIT): Likewise.
2755 (page): New variable.
2756 (wait_vretrace): New function.
2757 (set_read_map): Likewise.
2758 (set_start_address): Likewise.
2759 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
2761 (check_vga_mem): Take the page into account.
2762 (write_char): Likewise.
2763 (write_cursor): Likewise.
2764 (scroll_up): Likewise. Copy the page to the page that is not
2765 shown and switch between both pages.
2766 (grub_vga_putchar): Fix off by one error.
2767 (grub_vga_cls): Wait for the vertical retrace. Take the page into
2770 2004-11-01 Marco Gerards <metgerards@student.han.nl>
2772 Add support for iso9660 (including rockridge).
2774 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
2775 (iso9660_mod_SOURCES): New variable.
2776 (iso9660_mod_CFLAGS): Likewise.
2777 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
2778 * include/grub/fs.h (grub_iso9660_init): New prototype.
2779 * util/grub-emu.c (main): Call `grub_iso9660_init'.
2780 * fs/iso9660.c: New file.
2782 * include/grub/misc.h (grub_strncat): New prototype.
2783 * kern/misc.c (grub_strncat): New function.
2785 * fs/hfs.c (grub_hfs_mount): Translate the error
2786 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
2787 * fs/jfs.c (grub_jfs_mount): Likewise.
2788 * fs/ufs.c (grub_ufs_mount): Likewise.
2790 2004-10-28 Hollis Blanchard <hollis@penguinppc.org>
2792 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
2793 which initialized BAT registers.
2794 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
2795 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
2797 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
2798 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
2800 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
2801 (grub_mapclaim): Likewise.
2802 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
2803 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
2806 2004-10-19 Hollis Blanchard <hollis@penguinppc.org>
2808 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
2809 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
2810 -ffreestanding and -msoft-float.
2812 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
2814 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
2815 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
2816 set in grub_ieee1275_flags.
2818 2004-10-14 Hollis Blanchard <hollis@penguinppc.org>
2820 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
2822 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
2823 grub_console_init first.
2824 Change the memory range used for grub_ieee1275_claim and
2825 grub_mm_init_region.
2826 Print an error message if the claim fails.
2827 Include <grub/misc.h>.
2829 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
2831 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
2832 Call grub_children_iterate for device nodes of type `scsi',
2834 (grub_ofdisk_open): Remove manual device alias resolution.
2835 Fix memory leak when device cannot be opened.
2836 * include/grub/powerpc/ieee1275/ieee1275.h
2837 (grub_children_iterate): New prototype.
2838 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
2840 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
2841 Return -1 if args.size was -1.
2843 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
2845 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
2846 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
2847 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
2848 Open Firmware's memory for it; claim memory from _start to _end.
2849 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
2851 (_start): Zero BSS from __bss_start to _end.
2852 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
2854 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
2856 2004-10-11 Hollis Blanchard <hollis@penguinppc.org>
2858 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
2859 -1 if args.base was -1.
2861 2004-10-08 Hollis Blanchard <hollis@penguinppc.org>
2863 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
2864 escape sequence instead of a literal ^L. Also call
2865 grub_ofconsole_gotoxy.
2867 2004-10-03 Hollis Blanchard <hollis@penguinppc.org>
2869 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
2870 void * arguments to grub_addr_t. All callers updated. Also make
2871 the `result' argument optional.
2872 (grub_ieee1275_release): change void * arguments to grub_addr_t.
2873 All callers updated.
2875 2004-09-22 Hollis Blanchard <hollis@penguinppc.org>
2877 * commands/ls.c (grub_ls_list_files): Use the string following the
2878 initial ')', if present, as the filesystem path.
2879 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
2881 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
2883 2004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
2885 Make the source code of the menu interface more readable.
2887 * normal/menu.c: Include grub/mm.h.
2888 (TERM_WIDTH): New macro.
2889 (TERM_HEIGHT): Likewise.
2890 (TERM_INFO_HEIGHT): Likewise.
2891 (TERM_MARGIN): Likewise.
2892 (TERM_SCROLL_WIDTH): Likewise.
2893 (TERM_TOP_BORDER_Y): Likewise.
2894 (TERM_LEFT_BORDER_X): Likewise.
2895 (TERM_BORDER_WIDTH): Likewise.
2896 (TERM_MESSAGE_HEIGHT): Likewise.
2897 (TERM_BORDER_HEIGHT): Likewise.
2898 (TERM_NUM_ENTRIES): Likewise.
2899 (TERM_FIRST_ENTRY_Y): Likewise.
2900 (TERM_ENTRY_WIDTH): Likewise.
2901 (TERM_CURSOR_X): Likewise.
2902 (draw_border): Use macros instead of magic numbers.
2903 (print_entry): Likewise.
2904 (print_entries): Likewise.
2905 (run_menu): Likewise. Also, handle the key 'e'.
2906 (run_menu_entry): Ignore empty command lines.
2907 (print_message): Added a new argument EDIT. If EDIT is true,
2908 print a different message.
2909 (init_page): Likewise.
2910 (edit_menu_entry): New function. Not implemented yet.
2912 2004-09-17 Marco Gerards <metgerards@student.han.nl>
2914 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
2915 can be loaded from normal mode.
2917 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
2919 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
2920 (multiboot_mod_CFLAGS): New variables.
2921 * loader/i386/pc/linux_normal.c: New file.
2922 * loader/i386/pc/multiboot_normal.c: Likewise.
2924 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
2927 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
2928 `fdiro' to read the mode information from instead of `diro'.
2930 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
2931 looking up a symlink.
2933 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
2935 * normal/command.c (grub_command_execute): Don't parse the
2936 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
2937 flags of the command.
2939 * normal/menu.c (grub_menu_run): Fix typo.
2941 2004-09-14 Hollis Blanchard <hollis@penguinppc.org>
2943 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
2945 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
2946 `y + 1' instead of `y - 1'.
2948 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
2950 2004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
2952 From Hollis Blanchard <hollis@penguinppc.org>:
2953 * kern/misc.c (memmove): New alias for grub_memmove.
2954 (memcmp): New alias for grub_memcmp.
2955 (memset): New alias for grub_memset.
2956 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
2957 Change "int handle" to "grub_ieee1275_phandle_t handle".
2958 * include/grub/powerpc/ieee1275/ieee1275.h
2959 (grub_ieee1275_get_property): Likewise.
2961 2004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
2963 Added normal mode command `chainloader' as module chain.mod, which
2964 depends on normal.mod and _chain.mod.
2966 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
2967 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
2968 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
2970 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
2971 but arguments parsing moved to ...
2972 (grub_chainloader_cmd): ... here. New function.
2973 * include/grub/i386/pc/chainloader.h: New file.
2974 * loader/i386/pc/chainloader_normal.c: Likewise.
2976 2004-09-11 Marco Gerards <metgerards@student.han.nl>
2978 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
2979 (grub_mkimage_LDFLAGS): Likewise.
2980 (grub_emu_SOURCES): Likewise.
2981 (kernel_img_HEADERS): Added fshelp.h.
2982 * fs/ext2.c: Include <grub/fshelp.h>.
2983 (FILETYPE_REG): New macro.
2984 (FILETYPE_INO_REG): Likewise.
2985 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
2987 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
2989 (grub_fshelp_node): New struct.
2990 (grub_ext2_data): Added member `diropen'. Changed member `inode'
2992 (grub_ext2_get_file_block): Removed function.
2993 (grub_ext2_read_block): New function.
2994 (grub_ext2_read_file): Replaced parameter `data' by `node'.
2995 This function was written.
2996 (grub_ext2_mount): Read the root inode. Create a diropen struct.
2997 (grub_ext2_find_file): Removed function.
2998 (grub_ext2_read_symlink): New function.
2999 (grub_ext2_iterate_dir): Likewise.
3000 (grub_ext2_open): Rewritten.
3001 (grub_ext2_dir): Rewritten.
3002 * include/grub/fshelp.h: New file.
3003 * fs/fshelp.c: Likewise.
3005 2004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
3007 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
3008 (print_message): Add a missing newline.
3009 (run_menu): Added timeout support.
3010 (run_menu_entry): New local function.
3011 (grub_menu_run): Added support for booting.
3013 * kern/loader.c (grub_loader_is_loaded): New function.
3015 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
3016 (grub_get_rtc): Exported.
3018 * include/grub/i386/pc/time.h: Include grub/symbol.h.
3019 (grub_get_rtc): Exported.
3021 * include/grub/normal.h (struct grub_command_list): Remove
3022 constant from the member `command'.
3024 * include/grub/loader.h (grub_loader_is_loaded): Declared.
3026 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
3028 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
3030 2004-08-28 Marco Gerards <metgerards@student.han.nl>
3032 Add support for the JFS filesystem.
3034 * fs/jfs.c: New file.
3035 * include/grub/fs.h (grub_jfs_init): New prototype.
3036 (grub_jfs_fini): New prototype.
3037 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
3038 (grub_emu_SOURCES): Likewise.
3039 (pkgdata_MODULES): Add jfs.mod.
3040 (jfs_mod_SOURCES): New variable.
3041 (jfs_mod_CFLAGS): Likewise.
3042 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
3043 (grubof_SOURCES): Likewise.
3044 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
3046 * fs/fat.c (grub_fat_find_dir): Convert the filename little
3047 endian to the host endian.
3048 (grub_fat_utf16_to_utf8): Move function from there...
3049 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
3050 the endianess of the source string anymore.
3051 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
3053 2004-08-24 Marco Gerards <metgerards@student.han.nl>
3055 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
3056 (grub_boot_fini) [GRUB_UTIL]: Likewise.
3057 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
3058 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
3060 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
3061 (grub_hfs_iterate_dir): Make the function static. Add prototypes
3062 for `node_found' and `it_dir'.
3063 (grub_hfs_dir): Add prototype for `dir_hook'.
3065 * fs/minix.c (grub_minix_get_file_block): Add prototype for
3066 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
3067 and `indir32' to silence a gcc warning.
3069 * include/grub/fs.h (grub_hfs_init): New prototype.
3070 (grub_hfs_fini): Likewise.
3073 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
3075 Each disk device has its own id now. This is useful to make use
3076 of multiple disk devices.
3078 * include/grub/disk.h (grub_disk_dev_id): New enum.
3079 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
3080 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
3082 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
3083 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
3085 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
3086 GRUB_DISK_DEVICE_OFDISK_ID as an id.
3088 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
3089 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
3091 * include/grub/disk.h (struct grub_disk_dev): Added a new member
3092 "id" which is used by the cache manager.
3094 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
3097 2004-08-18 Marco Gerards <metgerards@student.han.nl>
3099 * fs/hfs.c: New file.
3100 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
3101 (grub_emu_SOURCES): Likewise.
3102 (pkgdata_MODULES): Add hfs.mod.
3103 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
3104 (grubof_SOURCES): Likewise.
3105 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
3107 * include/grub/misc.h (grub_strncasecmp): Add prototype.
3108 * kern/misc.c (grub_strncasecmp): Add function.
3110 2004-08-14 Marco Gerards <metgerards@student.han.nl>
3112 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
3115 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
3116 (grub_ext2_dir): In case the directory entry type is unknown, read
3119 2004-08-02 Peter Bruin <pjbruin@dds.nl>
3121 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
3122 grub_load_linux instead of grub_rescue_cmd_linux as second
3123 argument of grub_rescue_register_command.
3125 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
3127 2004-07-27 Marco Gerards <metgerards@student.han.nl>
3129 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
3131 * commands/boot.c: Remove the check for `GRUB_UTIL'.
3132 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
3133 `loader/powerpc/ieee1275/linux.c',
3134 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
3135 * include/grub/powerpc/ieee1275/ieee1275.h
3136 (grub_ieee1275_release): New prototype.
3137 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
3138 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
3139 normal, boot, linux and linux_normal.
3140 * loader/powerpc/ieee1275/linux.c: New file.
3141 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3143 2004-07-12 Marco Gerards <metgerards@student.han.nl>
3145 * normal/arg.c (grub_arg_parse): Correct error handling after
3146 reallocating the argumentlist (check if `argl' is not null instead
3147 of checking if `args' is not null).
3148 * kern/mm.c (grub_realloc): Return the same pointer when using the
3149 same region, instead of returning the header address.
3151 2004-07-11 Marco Gerards <metgerards@student.han.nl>
3153 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
3154 one block instead of two when looking for the initial partition.
3155 (grub_partition_probe): Initialize the local variable `p' with 0.
3156 Use base 10 for the grub_strtoul call.
3157 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
3158 need for one local variable.
3159 (grub_strtoul): Don't add the new value to `num', instead of that
3162 2004-07-11 Marco Gerards <metgerards@student.han.nl>
3164 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
3165 (pxeboot_img_SOURCES): New variable.
3166 (pxeboot_img_ASFLAGS): Likewise.
3167 (pxeboot_img_LDFLAGS): Likewise.
3168 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
3169 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
3170 <lode_leroy@hotmail.com>.
3172 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
3174 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
3177 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
3179 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
3180 the history buffer logic.
3182 2004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
3184 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
3185 (FILETYPE_INO_SYMLINK): New macros.
3186 (grub_ext2_find_file): Check if the node is a directory using the
3187 inode stat information instead of using the filetype in the
3188 dirent. Exclude the first character of an absolute symlink.
3189 (grub_ext2_dir): Mask out the filetype part of the mode member of
3192 2004-05-24 Marco Gerards <metgerards@student.han.nl>
3194 Add support for UFS version 1 and 2. Add support for the minix
3195 filesystem version 1 and 2, both the variants with 14 and 30 long
3198 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
3200 (grub_emu_SOURCES): Likewise.
3201 (pkgdata_MODULES): Add ufs.mod and minix.mod.
3202 (ufs_mod_SOURCES): New variable.
3203 (ufs_mod_CFLAGS): Likewise.
3204 (minix_mod_SOURCES): Likewise.
3205 (minix_mod_CFLAGS): Likewise.
3206 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
3208 (grubof_SOURCES): Likewise.
3209 * fs/ufs.c: New file.
3210 * fs/minix.c: New file.
3211 * include/grub/fs.h (grub_ufs_init): New prototype.
3212 (grub_ufs_fini): Likewise.
3213 (grub_minix_init): Likewise.
3214 (grub_minix_fini): Likewise.
3215 * util/grub-emu.c (main): Initialize and deinitialize UFS and
3218 2004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
3220 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
3221 commands/ls.c, commands/terminal.c, commands/boot.c,
3222 commands/cmp.c and commands/cat.c.
3223 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
3225 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
3228 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3230 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
3231 and grub_, respectively. Because the conversion is trivial and
3232 mechanical, I omit the details here. Please refer to the CVS
3233 if you need more information.
3235 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3237 * include/pupa: Renamed to ...
3238 * include/grub: ... this.
3239 * util/i386/pc/pupa-mkimage.c: Renamed to ...
3240 * util/i386/pc/grub-mkimage.c: ... this.
3241 * util/i386/pc/pupa-setup.c: Renamed to ...
3242 * util/i386/pc/grub-setup.c: ... this.
3243 * util/pupa-emu.c: Renamed to ...
3244 * util/grub-emu.c: ... this.
3246 2004-03-29 Marco Gerards <metgerards@student.han.nl>
3248 Add support for the newworld apple macintosh (PPC). This has been
3249 tested on the powerbook 2000 only. It only adds support for
3250 generic ieee1275 functions, console and disk support. This should
3251 be easy to port to other architectures with support for Open
3254 * configure.ac: Accept the powerpc as host_cpu. In the case of
3255 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
3256 specific tests are only executed while building for the i386.
3257 Inverse test for crosscompile.
3258 * genmk.rb (Utility): Allow assembler files.
3259 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
3260 * conf/powerpc-ieee1275.rmk: New file.
3261 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
3262 * disk/powerpc/ieee1275/partition.c: Likewise.
3263 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
3264 * include/pupa/powerpc/ieee1275/console.h: Likewise.
3265 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
3266 * include/pupa/powerpc/ieee1275/time.h: Likewise.
3267 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
3268 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
3269 * include/pupa/powerpc/ieee1275/loader.h
3270 * include/pupa/powerpc/setjmp.h: Likewise.
3271 * include/pupa/powerpc/types.h: Likewise.
3272 * kern/powerpc/ieee1275/init.c: Likewise.
3273 * kern/powerpc/ieee1275/openfw.c: Likewise.
3274 * term/powerpc/ieee1275/ofconsole.c: Likewise.
3276 These files were written by Johan Rydberg
3277 (jrydberg@night.trouble.net) and I only modified them slightly.
3279 * boot/powerpc/ieee1275/cmain.c: New file.
3280 * boot/powerpc/ieee1275/crt0.S: Likewise.
3281 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
3282 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
3284 2004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
3286 * Makefile.in: Update copyright.
3287 * genmodsrc.sh: Likewise.
3288 * gensymlist.sh: Likewise.
3289 * term/i386/pc/vga.c: Indent correctly.
3291 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
3292 bugreporting address.
3293 * util/i386/pc/pupa-setup.c (usage): Likewise,
3294 (main): Call pupa_ext2_init and pupa_ext2_fini.
3296 * fs/fat.c (log2): Renamed to ...
3297 (fat_log2): ... this.
3298 All callers changed.
3299 * kern/misc.c (memcpy): Alias to pupa_memmove.
3300 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
3302 * util/console.c (pupa_ncurses_fini): Return 0.
3304 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
3305 Move fail label here.
3306 [__GNU__]: Don't warn when using stat.
3307 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
3308 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
3309 long int. Use strtol instead of strtoul.
3311 2004-03-14 Marco Gerards <metgerards@student.han.nl>
3313 * commands/boot.c: New file.
3314 * commands/cat.c: Likewise.
3315 * commands/cmp.c: Likewise.
3316 * commands/ls.c: Likewise.
3317 * commands/terminal.c: Likewise.
3318 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
3319 (pupa_register_command): Changed interface to match the new
3321 (pupa_command_execute): Changed (almost rewritten) so it uses
3322 pupa_split_command. Added support for setting variables using the
3324 (rescue_command): Changed to work with the new argument parser.
3325 (terminal_command): Moved from here to commands/terminal.c.
3326 (set_command): New function.
3327 (unset_command): New function.
3328 (insmod_command): New function.
3329 (rmmod_command): New function.
3330 (lsmod_command): New function.
3331 (pupa_command_init): Don't initialize the command terminal
3332 anymore. Initialize the commands set, unset, insmod, rmmod and
3334 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
3335 (kernel_img_HEADERS): Add arg.h and env.h.
3336 (pupa_mkimage_LDFLAGS): Add kern/env.c.
3337 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
3338 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
3340 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
3342 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
3343 (boot_mod_SOURCES): New variable.
3344 (terminal_mod_SOURCES): Likewise.
3345 (ls_mod_SOURCES): Likewise.
3346 (cmp_mod_SOURCES): Likewise.
3347 (cat_mod_SOURCES): Likewise.
3349 * normal/arg.c: New file.
3350 * kern/env.c: Likewise.
3351 * include/pupa/arg.h: Likewise.
3352 * include/pupa/env.h: Likewise.
3353 * font/manager.c (font_command): Changed to match argument parsing
3355 (PUPA_MOD_INIT): Likewise.
3356 * hello/hello.c (pupa_cmd_hello): Likewise.
3357 (PUPA_MOD_INIT): Likewise.
3358 * include/pupa/disk.h: Include <pupa/device.h>.
3359 (pupa_print_partinfo): New prototype.
3360 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
3361 (pupa_dl_get_prefix): Likewise.
3362 * include/pupa/misc.h: Include <pupa/err.h>.
3363 (pupa_isgraph): New prototype.
3364 (pupa_isdigit): Likewise.
3365 (pupa_split_cmdline): Likewise.
3366 * include/pupa/normal.h: Include <pupa/arg.h>.
3367 (pupa_command): Changed the prototype of the member `func' to
3368 match the argument parsing interface. Added member `options'.
3369 (pupa_register_command): Updated to match function.
3370 (pupa_arg_parse): New prototype.
3371 (pupa_hello_init) [PUPA_UTIL]: New prototype.
3372 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
3373 (pupa_ls_init) [PUPA_UTIL]: Likewise.
3374 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
3375 (pupa_cat_init) [PUPA_UTIL]: Likewise.
3376 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
3377 (pupa_boot_init) [PUPA_UTIL]: Likewise.
3378 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
3379 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
3380 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
3381 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
3382 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
3383 * kern/disk.c: Include <pupa/file.h>.
3384 (pupa_print_partinfo): New function.
3385 * kern/dl.c: Include <pupa/env.h>.
3386 (pupa_dl_dir): Variable removed.
3387 (pupa_dl_load): Use the environment variable `prefix' instead of
3388 the variable pupa_dl_dir.
3389 (pupa_dl_set_prefix): Function removed.
3390 (pupa_dl_get_prefix): Likewise.
3391 * kern/i386/pc/init.c: Include <pupa/env.h>.
3392 (pupa_machine_init): Use the environment variable `prefix' instead of
3393 using pupa_dl_set_prefix to set the prefix.
3394 * kern/main.c: Include <pupa/env.h>.
3395 (pupa_set_root_dev): Use the environment variable `prefix' instead of
3396 using pupa_dl_get_prefix to get the prefix.
3397 * kern/misc.c: Include <pupa/env.h>.
3398 (pupa_isdigit): New function.
3399 (pupa_isgraph): Likewise.
3400 (pupa_ftoa): Likewise.
3401 (pupa_vsprintf): Added support for printing values of the type
3402 `double'. Make it possible to format variable output when using
3403 formatting like `%1.2%f'.
3404 (pupa_split_cmdline): New function.
3405 * kern/rescue.c: Include <pupa/env.h>.
3406 (next_word): Removed function.
3407 (pupa_rescue_cmd_prefix): Likewise.
3408 (pupa_rescue_cmd_set): New function.
3409 (pupa_rescue_cmd_unset): New function.
3410 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
3411 split the command line instead of splitting it here. Added
3412 support for setting variables using the syntax `foo=bar'. Don't
3413 initialize the prefix command anymore. Initialized the set and
3415 * normal/cmdline.c: Include <pupa/env.h>.
3416 (pupa_tab_complete): Added prototypes for print_simple_completion,
3417 print_partition_completion, add_completion, iterate_commands,
3418 iterate_dev, iterate_part and iterate_dir. Moved code to print
3419 partition information from here to kern/disk.c.
3420 (pupa_cmdline_run): Don't check if the funtion exists anymore.
3421 * normal/main.c: Include <pupa/env.h>.
3422 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
3423 instead of using pupa_dl_get_prefix to get the prefix.
3424 * term/i386/pc/vga.c: Include <pupa/arg.h>.
3425 (check_vga_mem): Cast pointers to `void *' to silence a gcc
3427 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
3428 (pupa_vga_setcolor): Declare unused variables with `__attribute__
3429 ((unused))' to silence a gcc warning.
3430 (pupa_vga_setcolor): Likewise.
3431 (debug_command): Changed to match argument parsing
3433 * util/pupa-emu.c: Include <pupa/env.h>.
3434 (options): Added 0's for unused fields to silence a gcc warning.
3436 (main): Use the environment variable `prefix' instead of using
3437 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
3438 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
3441 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
3442 * util/misc.c: Include <malloc.h>.
3443 (pupa_malloc): Rewritten so errors are correctly reported.
3444 (pupa_realloc): Likewise.
3445 (pupa_memalign): Likewise.
3446 (pupa_mm_init_region): Declare unused variables with
3447 `__attribute__ ((unused))' to silence a gcc warning.
3448 * normal/i386/setjmp.S: Remove tab at the end of the file to
3449 silence a gcc warning.
3450 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
3451 variables with `__attribute__ ((unused))' to silence a gcc
3453 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
3454 local variable i unsigned to silence a gcc warning.
3456 * kern/term.c: Include <pupa/misc.h>.
3457 (pupa_more_lines): New variable.
3458 (pupa_more): Likewise.
3459 (pupa_putcode): When the pager is active pause at the end of every
3461 (pupa_set_more): New function.
3462 * include/pupa/term.h (pupa_set_more): New prototype.
3465 2004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
3467 Now this project is GRUB 2 rather than PUPA. The location of
3468 the CVS repository was moved to GRUB's.
3470 * configure.ac: Use bug-grub as the reporting address.
3471 Use GRUB instead of PUPA.
3472 Change the version number to 1.90.
3474 2004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
3476 * genkernsyms.sh: Updated copyright information.
3477 * genmk.rb: Likewise.
3478 * genmodsrc.sh: Likewise.
3479 * gensymlist.sh: Likewise.
3480 * boot/i386/pc/boot.S: Likewise.
3481 * boot/i386/pc/diskboot.S: Likewise.
3482 * disk/i386/pc/biosdisk.c: Likewise.
3483 * disk/i386/pc/partition.c: Likewise.
3484 * font/manager.c: Likewise.
3485 * fs/ext2.c: Likewise.
3486 * fs/fat.c: Likewise.
3487 * include/pupa/boot.h: Likewise.
3488 * include/pupa/device.h: Likewise.
3489 * include/pupa/disk.h: Likewise.
3490 * include/pupa/dl.h: Likewise.
3491 * include/pupa/elf.h: Likewise.
3492 * include/pupa/err.h: Likewise.
3493 * include/pupa/file.h: Likewise.
3494 * include/pupa/font.h: Likewise.
3495 * include/pupa/fs.h: Likewise.
3496 * include/pupa/kernel.h: Likewise.
3497 * include/pupa/loader.h: Likewise.
3498 * include/pupa/misc.h: Likewise.
3499 * include/pupa/mm.h: Likewise.
3500 * include/pupa/net.h: Likewise.
3501 * include/pupa/normal.h: Likewise.
3502 * include/pupa/rescue.h: Likewise.
3503 * include/pupa/setjmp.h: Likewise.
3504 * include/pupa/symbol.h: Likewise.
3505 * include/pupa/term.h: Likewise.
3506 * include/pupa/types.h: Likewise.
3507 * include/pupa/i386/setjmp.h: Likewise.
3508 * include/pupa/i386/types.h: Likewise.
3509 * include/pupa/i386/pc/biosdisk.h: Likewise.
3510 * include/pupa/i386/pc/boot.h: Likewise.
3511 * include/pupa/i386/pc/console.h: Likewise.
3512 * include/pupa/i386/pc/init.h: Likewise.
3513 * include/pupa/i386/pc/kernel.h: Likewise.
3514 * include/pupa/i386/pc/linux.h: Likewise.
3515 * include/pupa/i386/pc/loader.h: Likewise.
3516 * include/pupa/i386/pc/memory.h: Likewise.
3517 * include/pupa/i386/pc/multiboot.h: Likewise.
3518 * include/pupa/i386/pc/partition.h: Likewise.
3519 * include/pupa/i386/pc/time.h: Likewise.
3520 * include/pupa/i386/pc/vga.h: Likewise.
3521 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
3522 * include/pupa/util/getroot.h: Likewise.
3523 * include/pupa/util/misc.h: Likewise.
3524 * include/pupa/util/resolve.h: Likewise.
3525 * kern/device.c: Likewise.
3526 * kern/disk.c: Likewise.
3527 * kern/dl.c: Likewise.
3528 * kern/err.c: Likewise.
3529 * kern/file.c: Likewise.
3530 * kern/fs.c: Likewise.
3531 * kern/loader.c: Likewise.
3532 * kern/main.c: Likewise.
3533 * kern/misc.c: Likewise.
3534 * kern/mm.c: Likewise.
3535 * kern/rescue.c: Likewise.
3536 * kern/term.c: Likewise.
3537 * kern/i386/dl.c: Likewise.
3538 * kern/i386/pc/init.c: Likewise.
3539 * kern/i386/pc/lzo1x.S: Likewise.
3540 * kern/i386/pc/startup.S: Likewise.
3541 * loader/i386/pc/chainloader.c: Likewise.
3542 * loader/i386/pc/linux.c: Likewise.
3543 * loader/i386/pc/multiboot.c: Likewise.
3544 * normal/cmdline.c: Likewise.
3545 * normal/command.c: Likewise.
3546 * normal/main.c: Likewise.
3547 * normal/menu.c: Likewise.
3548 * normal/i386/setjmp.S: Likewise.
3549 * term/i386/pc/console.c: Likewise.
3550 * term/i386/pc/vga.c: Likewise.
3551 * util/console.c: Likewise.
3552 * util/genmoddep.c: Likewise.
3553 * util/misc.c: Likewise.
3554 * util/pupa-emu.c: Likewise.
3555 * util/resolve.c: Likewise.
3556 * util/unifont2pff.rb: Likewise.
3557 * util/i386/pc/biosdisk.c: Likewise.
3558 * util/i386/pc/getroot.c: Likewise.
3559 * util/i386/pc/pupa-mkimage.c: Likewise.
3560 * util/i386/pc/pupa-setup.c: Likewise.
3562 2004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
3564 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
3565 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
3566 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
3567 reading and reset it after reading.
3568 (pupa_ext2_close): Return PUPA_ERR_NONE.
3570 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
3572 (struct linux_kernel_header): Add kernel_version and
3574 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
3575 pupa_file_read succeeds.
3576 (pupa_rescue_cmd_initrd): Implement.
3578 2003-12-03 Marco Gerards <metgerards@student.han.nl>
3580 * fs/ext2.c (pupa_ext2_label): New function.
3581 (pupa_ext2_fs): Added label.
3582 * fs/fat.c (pupa_fat_label): New function.
3583 (pupa_fat_fs): Added label.
3584 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
3586 * kern/misc.c (pupa_strndup): New function.
3587 * include/pupa/misc.h (pupa_strndup): New prototype.
3589 * include/pupa/normal.h: Include <pupa/err.h>.
3590 (pupa_set_history): New prototype.
3591 (pupa_iterate_commands): New prototype.
3592 * normal/cmdline.c: Include <pupa/machine/partition.h>,
3593 <pupa/disk.h>, <pupa/file.h>.
3594 (hist_size): New variable.
3595 (hist_lines): Likewise.
3596 (hist_end): Likewise.
3597 (hist_used): Likewise.
3598 (pupa_set_history): New function.
3599 (pupa_history_get): Likewise.
3600 (pupa_history_add): Likewise.
3601 (pupa_history_replace): Likewise.
3602 (pupa_tab_complete): Likewise.
3603 (pupa_cmdline_run): Added tab completion and history buffer. Tab
3604 completion shows partitionnames while completing partitions, this
3605 feature was suggested by Jeff Bailey.
3606 * normal/command.c (pupa_iterate_commands): New function.
3607 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
3608 (pupa_normal_init): Initialize history buffer.
3609 (PUPA_MOD_INIT): Likewise.
3610 (pupa_normal_fini): Free the history buffer.
3611 (PUPA_MOD_FINI): Likewise.
3613 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
3616 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
3617 * configure.ac [i386]: Check for regparam bug.
3618 (NESTED_FUNC_ATTR) [! i386]: Defined.
3620 2003-11-17 Marco Gerards <metgerards@student.han.nl>
3622 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
3623 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
3624 (pupa_emu_SOURCES): New variable.
3625 (pupa_emu_LDFLAGS): Likewise.
3626 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
3627 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
3628 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
3629 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
3630 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
3631 (pupa_jmp_buf): New typedef.
3632 (pupa_setjmp) [PUPA_UTIL]: New macro.
3633 (pupa_longjmp) [PUPA_UTIL]: Likewise.
3634 * include/pupa/term.h (struct pupa_term): New member `refresh'.
3635 (pupa_refresh): New prototype.
3636 * include/pupa/util/getroot.h: New file.
3637 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
3639 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
3640 (pupa_rescue_cmd_cat): Likewise.
3641 (pupa_rescue_cmd_ls): Likewise.
3642 (pupa_rescue_cmd_testload): Likewise.
3643 (pupa_rescue_cmd_lsmod): Likewise.
3644 * normal/cmdline.c (pupa_cmdline_get): Likewise.
3645 * normal/menu.c (run_menu): Likewise.
3646 * kern/term.c (pupa_cls): Likewise.
3647 (pupa_refresh): New function.
3648 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
3649 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
3650 * util/console.c: New file.
3652 * util/i386/pc/getroot.c: New file.
3653 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
3654 (pupa_putchar): New function.
3655 (pupa_refresh): Likewise.
3656 (xgetcwd): Function moved to ...
3657 (strip_extra_slashes): Likewise.
3658 (get_prefix): Likewise.
3659 * util/i386/pc/getroot.c: ... here.
3660 (find_root_device): Function moved and renamed to...
3661 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
3662 Changed all callers.
3663 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
3665 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
3666 Changed all callers.
3667 * util/misc.c (pupa_memalign): New function.
3668 (pupa_mm_init_region): Likewise.
3669 (pupa_register_exported_symbols): Likewise.
3670 (pupa_putchar): Function removed.
3671 * util/pupa-emu.c: New file.
3673 2003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
3675 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
3676 (_multiboot_mod_SOURCES): New variable.
3677 (_multiboot_mod_CFLAGS): Likewise.
3678 * loader/i386/pc/multiboot.c: New file.
3679 * include/pupa/i386/pc/multiboot.h: Likewise.
3680 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
3681 (pupa_multiboot_real_boot): New function.
3682 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
3683 (pupa_multiboot_real_boot): New prototype.
3684 (pupa_rescue_cmd_multiboot): Likewise
3685 (pupa_rescue_cmd_module): Likewise.
3687 * kern/loader.c (pupa_loader_set): Continue when
3688 pupa_loader_unload_func() fails.
3689 (pupa_loader_unset): New function.
3690 * include/pupa/loader.h (pupa_loader_unset): New prototype.
3692 * kern/misc.c (pupa_stpcpy): New function.
3693 * include/pupa/misc.h (pupa_stpcpy): New prototype.
3695 2003-11-12 Marco Gerards <metgerards@student.han.nl>
3697 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
3698 for available extensions.
3700 * include/pupa/i386/pc/time.h: New file.
3701 * kern/disk.c: Include <pupa/machine/time.h>.
3702 (PUPA_CACHE_TIMEOUT): New macro.
3703 (pupa_last_time): New variable.
3704 (pupa_disk_open): Flush the cache when there was a timeout.
3705 (pupa_disk_close): Reset the timer.
3706 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
3708 * util/misc.c: Include <sys/times.h>
3709 (pupa_get_rtc): New function.
3711 2003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
3713 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
3715 (pupa_ext2_get_file_block): Use blocks member.
3717 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
3718 first block. Return -1 instead of pupa_errno on error.
3720 2003-10-27 Marco Gerards <metgerards@student.han.nl>
3722 * README: In the pupa-mkimage example use _chain instead of chain
3723 and ext2 instead of fat.
3724 * TODO: Replace ext2fs with jfs as an example. Add an item for
3725 adding journal playback for ext2fs.
3726 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
3727 (pkgdata_MODULES): Added ext2.mod.
3728 (ext2_mod_SOURCES): New variable.
3729 (ext2_mod_CFLAGS): Likewise.
3730 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
3731 * include/pupa/misc.h (pupa_strncpy): New prototype.
3732 (pupa_strcat): Likewise.
3733 (pupa_strncmp): Likewise.
3734 * kern/misc.c (pupa_strcat): Enable function.
3735 (pupa_strncpy): New function.
3736 (pupa_strncmp): Likewise.
3737 * fs/ext2.c: New file.
3739 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
3740 when the read failed before retrying.
3741 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
3742 (_FILE_OFFSET_BITS): Likewise.
3743 * configure.ac: Added AC_SYS_LARGEFILE.
3745 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
3747 * genmk.rb (PModule#rule): Make sure to get only symbol names
3748 from the output of nm.
3749 Reported by Robert Millan <zeratul2@wanadoo.es>.
3751 2003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
3753 I forgot to check in these changes for a long time. This adds
3754 incomplete support for VGA console, and this is still very
3755 buggy. Also, a lot of consideration is required for I18N,
3756 UNICODE, and VGA font issues. Therefore, assume that this is
3757 such that "better than nothing".
3759 * font/manager.c: New file.
3760 * include/pupa/font.h: Likewise.
3761 * include/pupa/i386/pc/vga.h: Likewise.
3762 * term/i386/pc/vga.c: Likewise.
3763 * util/unifont2pff.rb: Likewise.
3765 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
3766 (pkgdata_MODULES): Added vga.mod and font.mod.
3767 (vga_mod_SOURCES): New variables.
3768 (vga_mod_CFLAGS): Likewise.
3769 (font_mod_SOURCES): Likewise.
3770 (font_mod_CFLAGS): Likewise.
3772 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
3774 * include/pupa/term.h: Include pupa/err.h.
3775 (struct pupa_term): Added init and fini.
3776 Changed the argument of putchar to pupa_uint32_t.
3778 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
3779 (pupa_console_real_putchar): New prototype.
3780 (pupa_console_putchar): Removed.
3781 (pupa_console_checkkey): Exported.
3782 (pupa_console_getkey): Likewise.
3784 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
3787 * kern/term.c (pupa_term_set_current): Rewritten.
3788 (pupa_putchar): Likewise.
3789 (pupa_putcode): New function.
3791 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
3792 (pupa_console_real_putchar): ... this.
3793 (pupa_vga_set_mode): New function.
3794 (pupa_vga_get_font): Likewise.
3796 * normal/command.c: Include pupa/term.h.
3797 (terminal_command): New function.
3798 (pupa_command_init): Register the command "terminal".
3800 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
3801 (DISP_UP): Likewise.
3802 (DISP_RIGHT): Likewise.
3803 (DISP_DOWN): Likewise.
3804 (DISP_HLINE): Likewise.
3805 (DISP_VLINE): Likewise.
3806 (DISP_UL): Likewise.
3807 (DISP_UR): Likewise.
3808 (DISP_LL): Likewise.
3809 (DISP_LR): Likewise.
3811 * term/i386/pc/console.c (pupa_console_putchar): New function.
3813 2003-02-08 NIIBE Yutaka <gniibe@m17n.org>
3815 * util/resolve.c (pupa_util_resolve_dependencies): BUG
3816 FIX. Reverse the path_list.
3818 * include/pupa/normal.h: Export pupa_register_command and
3819 pupa_unregister_command.
3821 * hello/hello.c (pupa_cmd_hello): New module.
3822 * conf/i386-pc.rmk: Added hello.mod.
3824 2003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
3826 * kern/i386/pc/lzo1x.S: New file.
3828 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
3829 (compress_kernel): New variable.
3830 (generate_image): Heavily modified to support compressing a
3831 large part of the core image.
3833 * util/misc.c (pupa_util_read_image): Fix a file descriptor
3835 (pupa_util_load_image): New function.
3837 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
3838 (pupa_compressed_size): New variable.
3839 (codestart): Enable Gate A20 here.
3840 Decompress the compressed part of the core image.
3841 Rearrange the code to put functions and variables which are
3842 required for initialization in the non-compressed part.
3845 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
3848 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
3850 * include/pupa/i386/pc/kernel.h
3851 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
3852 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
3853 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
3854 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
3855 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
3857 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
3859 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
3860 (Utility#rule): Likewise.
3862 * configure.ac: Check if LZO is available.
3864 2003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
3866 * include/pupa/normal.h: New file.
3867 * include/pupa/setjmp.h: Likewise.
3868 * include/pupa/i386/setjmp.h: Likewise.
3869 * normal/cmdline.c: Likewise.
3870 * normal/command.c: Likewise.
3871 * normal/main.c: Likewise.
3872 * normal/menu.c: Likewise.
3873 * normal/i386/setjmp.S: Likewise.
3875 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
3876 (pupa_rescue_cmd_initrd): Likewise.
3878 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
3881 * kern/i386/pc/startup.S (translation_table): New variable.
3882 (translate_keycode): New function.
3883 (pupa_console_getkey): Call translate_keycode.
3885 * kern/rescue.c (attempt_normal_mode): New function.
3886 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
3887 it failed, print a message.
3889 * kern/mm.c (pupa_real_malloc): Print more information when a
3890 free magic is broken.
3891 (pupa_free): If the first free header is not free actually, set
3894 * kern/main.c (pupa_load_normal_mode): Just load the module
3896 (pupa_main): Don't print the message
3897 "Entering into rescue mode..." here.
3899 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
3901 (pupa_rescue_cmd_initrd): Likewise.
3902 (pupa_rescue_cmd_initrd): Likewise.
3904 * include/pupa/symbol.h (FUNCTION): Specify the type.
3905 (VARIABLE): Likewise.
3907 * include/pupa/err.h (pupa_err_t): Added
3908 PUPA_ERR_UNKNOWN_COMMAND.
3910 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
3911 (pupa_dl_get_prefix): Likewise.
3913 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
3914 Added _chain.mod and _linux.mod instead of chain.mod and
3916 (chain_mod_SOURCES): Renamed to ...
3917 (_chain_mod_SOURCES): ... this.
3918 (chain_mod_CFLAGS): Renamed to ...
3919 (_chain_mod_CFLAGS): ... this.
3920 (linux_mod_SOURCES): Renamed to ...
3921 (_linux_mod_SOURCES): ... this.
3922 (linux_mod_CFLAGS): Renamed to ...
3923 (_linux_mod_CFLAGS): ... this.
3924 (normal_mod_SOURCES): New variable.
3925 (normal_mod_CFLAGS): Likewise.
3926 (normal_mod_ASFLAGS): Likewise.
3928 2003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
3930 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
3933 * kern/dl.c (pupa_dl_ref): Refer dependending modules
3935 (pupa_dl_unref): Unrefer depending modules recursively.
3936 Don't call pupa_dl_unload implicitly, because PUPA can crash if
3937 a module is unloaded before one depending on that module is
3939 (pupa_dl_unload): Unload depending modules explicitly,
3942 2003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
3944 * include/pupa/i386/pc/linux.h: New file.
3945 * loader/i386/pc/linux.c: Likewise.
3947 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
3949 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
3950 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
3951 of PUPA_CHAINLOADER_BOOT_SECTOR.
3953 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
3954 (pupa_linux_prot_size): New variable.
3955 (pupa_linux_tmp_addr): Likewise.
3956 (pupa_linux_real_addr): Likewise.
3957 (pupa_linux_boot_zimage): New function.
3958 (pupa_linux_boot_bzimage): Likewise.
3960 * kern/i386/pc/init.c (struct mem_region): New structure.
3961 (MAX_REGIONS): New macro.
3962 (mem_regions): New variable.
3963 (num_regions): Likewise.
3964 (pupa_os_area_addr): Likewise.
3965 (pupa_os_area_size): Likewise.
3966 (pupa_lower_mem): Likewise.
3967 (pupa_upper_mem): Likewise.
3968 (add_mem_region): New function.
3969 (compact_mem_regions): Likewise.
3970 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
3971 the size of the conventional memory and that of so-called upper
3972 memory (before the first memory hole).
3973 Instead of adding each found region to free memory, use
3974 add_mem_region and add them after removing overlaps.
3975 Also, add only 1/4 of the upper memory to free memory. The rest
3976 is used for loading OS images. Maybe this is ad hoc, but this
3977 makes it much easier to relocate OS images when booting.
3979 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
3980 (pupa_enter_rescue_mode): Don't register initrd and module.
3982 * kern/mm.c: Include pupa/dl.h.
3984 * kern/main.c: Include pupa/file.h and pupa/device.h.
3986 * kern/loader.c (pupa_loader_load_module_func): Removed.
3987 (pupa_loader_load_module): Likewise.
3989 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
3992 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
3993 (pupa_linux_tmp_addr): Likewise.
3994 (pupa_linux_real_addr): Likewise.
3995 (pupa_linux_boot_zimage): Likewise.
3996 (pupa_linux_boot_bzimage): Likewise.
3998 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
3999 (pupa_upper_mem): Likewise.
4000 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
4001 module is too dangerous.
4003 * include/pupa/loader.h (pupa_os_area_addr): Declared.
4004 (pupa_os_area_size): Likewise.
4005 (pupa_loader_set): Remove the first argument. Loader doesn't
4006 manage modules or initrd any longer.
4007 (pupa_loader_load_module): Removed.
4009 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
4010 (linux_mod_SOURCES): New variable.
4011 (linux_mod_CFLAGS): Likewise.
4013 2003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
4015 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
4016 the length of a blocklist correctly.
4018 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
4019 Use ioctl only if the OS file is a block device.
4020 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
4021 not very useful for normal files.
4023 * kern/main.c (pupa_set_root_dev): New function.
4024 (pupa_load_normal_mode): Likewise.
4025 (pupa_main): Call those above.
4027 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
4030 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
4032 2003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
4034 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
4035 (setup): Configure the installed partition information and the
4038 * loader/i386/pc/chainloader.c (my_mod): New variable.
4039 (pupa_chainloader_unload): New function.
4040 (pupa_rescue_cmd_chainloader): Refer itself.
4041 (PUPA_MOD_INIT): Save its own module in MY_MOD.
4043 * kern/i386/pc/startup.S (install_partition): Removed.
4044 (version_string): Likewise.
4045 (config_file): Likewise.
4046 (pupa_install_dos_part): New variable.
4047 (pupa_install_bsd_part): Likewise.
4048 (pupa_prefix): Likewise.
4049 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
4051 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
4053 (make_install_device): New function.
4054 (pupa_machine_init): Set the dl prefix.
4056 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
4057 (buf): Renamed to ...
4058 (linebuf): ... this.
4059 (pupa_rescue_cmd_prefix): New function.
4060 (pupa_rescue_cmd_insmod): Likewise.
4061 (pupa_rescue_cmd_rmmod): Likewise.
4062 (pupa_rescue_cmd_lsmod): Likewise.
4063 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
4066 * kern/mm.c (pupa_memalign): If failed even after invalidating
4067 disk caches, unload unneeded modules and retry.
4069 * kern/misc.c (pupa_memmove): New function.
4070 (pupa_memcpy): Removed.
4071 (pupa_strcpy): New function.
4072 (pupa_itoa): Made static.
4074 * kern/dl.c (pupa_dl_iterate): New function.
4075 (pupa_dl_ref): Likewise.
4076 (pupa_dl_unref): Likewise.
4077 (pupa_dl_unload): Return if succeeded or not.
4078 (pupa_dl_unload_unneeded): New function.
4079 (pupa_dl_unload_all): Likewise.
4080 (pupa_dl_init): Renamed to ...
4081 (pupa_dl_set_prefix): ... this.
4082 (pupa_dl_get_prefix): New function.
4084 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
4085 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
4086 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
4087 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
4088 (pupa_install_dos_part): Declared.
4089 (pupa_install_bsd_part): Likewise.
4090 (pupa_prefix): Likewise.
4091 (pupa_boot_drive): Likewise.
4093 * include/pupa/types.h: Fix a typo.
4095 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
4097 (pupa_memmove): Declared.
4098 (pupa_strcpy): Likewise.
4100 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
4101 pupa_mod_init takes one argument, its own module.
4102 (pupa_dl_unload_unneeded): Declared.
4103 (pupa_dl_unload_all): Likewise.
4104 (pupa_dl_ref): Likewise.
4105 (pupa_dl_unref): Likewise.
4106 (pupa_dl_iterate): Likewise.
4107 (pupa_dl_init): Renamed to ...
4108 (pupa_dl_set_prefix): ... this.
4109 (pupa_dl_get_prefix): Declared.
4111 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
4112 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
4114 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
4115 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
4117 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
4118 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
4120 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
4122 * util/i386/pc/pupa-setup.c (setup): Define the internal
4123 function find_first_partition_start at the top level, because GCC
4124 3.0.x cannot compile internal functions in deeper scopes
4126 (find_root_device): Use lstat instead of stat.
4127 Don't follow symbolic links.
4128 Fix the path-constructing code.
4130 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
4131 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
4132 by a BLKGETSIZE ioctl first, because block devices don't fill
4133 the member st_mode of the structure stat on Linux.
4134 [__linux__] (linux_find_partition): Use a temporary buffer
4135 REAL_DEV for the working space. Copy it to DEV before returning.
4136 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
4137 buffer cache consistent.
4138 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
4139 strncmp. The previous value was merely wrong.
4140 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
4142 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
4143 FAT size is 12. The previous value was merely wrong.
4145 * kern/main.c (pupa_main): Don't split the starting message from
4148 * kern/term.c (pupa_putchar): Put CR after LF instead of before
4149 LF, because BIOS goes crazy about character attributes in this
4152 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
4154 * include/i386/pc/util/biosdisk.h: New file.
4155 * util/i386/pc/biosdisk.c: Likewise.
4156 * util/i386/pc/pupa-setup.c: Likewise.
4158 * Makefile.in (INCLUDE_DISTFILES): Added
4159 include/pupa/i386/pc/util/biosdisk.h.
4160 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
4161 directory util/i386/pc.
4162 (install-local): Added a rule for sbin_UTILITIES.
4163 (uninstall): Likewise.
4165 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
4167 * util/misc.c (xrealloc): New function.
4168 (pupa_malloc): Likewise.
4169 (pupa_free): Likewise.
4170 (pupa_realloc): Likewise.
4171 (pupa_stop): Likewise.
4172 (pupa_putchar): Likewise.
4174 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
4176 * include/pupa/util/misc.h (xrealloc): Declared.
4178 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
4180 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
4181 (PUPA_BOOT_MACHINE_BPB_END): ... this.
4183 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
4184 [PUPA_UTIL] (pupa_fat_fini): Likewise.
4186 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
4187 way should be implemented.
4188 [PUPA_UTIL] (pupa_fat_fini): Likewise.
4190 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
4191 the size of NAME for safety.
4192 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
4195 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
4196 (pupa_setup_SOURCES): Likewise.
4198 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
4200 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
4202 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
4203 bunch of pushl's from pusha, because this destroys the return
4206 2002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
4208 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
4209 This means that any missing prototypes could be fatal. Also, you
4210 must take care when writing assembly code. See the comments at
4211 the beginning of startup.S, for more details.
4213 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
4214 compilation mechanism.
4215 (pupa_chainloader_real_boot): Likewise.
4216 (pupa_biosdisk_rw_int13_extensions): Likewise.
4217 (pupa_biosdisk_rw_standard): Likewise.
4218 (pupa_biosdisk_check_int13_extensions): Likewise.
4219 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
4220 (pupa_biosdisk_get_diskinfo_standard): Likewise.
4221 (pupa_get_memsize): Likewise.
4222 (pupa_get_mmap_entry): Likewise.
4223 (pupa_console_putchar): Likewise.
4224 (pupa_console_setcursor): Likewise.
4225 (pupa_getrtsecs): Use pushl instead of push.
4227 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
4228 memory instead of the stack for a mmap entry, because some
4229 BIOSes may ignore the maximum size and overflow.
4231 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
4233 * genmk.rb (PModule#rule): Compile automatically generated
4234 sources with module-specific CFLAGS as well as other sources.
4236 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
4238 * configure.ac: Check ld.
4239 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
4240 respectively, before checking endianness and sizes.
4242 * Makefile.in (LD): New variable.
4244 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
4246 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
4248 2002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
4250 * Changelog: New file.