]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2005-12-09 Hollis Blanchard <hollis@penguinppc.org>
[grub2.git] / ChangeLog
CommitLineData
be973c1b 12005-12-09 Hollis Blanchard <hollis@penguinppc.org>
2
3 * configure.ac: Accept `powerpc64' as host_cpu.
4 (amd64): Rename to `biarch32'.
5
6 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
7 non-cacheline-aligned addresses.
8
9 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
10 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
11 if `size' is non-zero.
12
b04216ab 132005-12-03 Marco Gerards <mgerards@xs4all.nl>
14
15 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
16 and `cd' to make sure the filename is not prefixed with a
17 directory name.
18 (pkgdata_MODULES): Add `gpt.mod'.
19 (gpt_mod_SOURCES): New variable.
20 (gpt_mod_CFLAGS): Likewise.
21 (gpt_mod_LDFLAGS): Likewise.
22
23 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
24
25 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
26 New macro.
27
28 * partmap/gpt.c: New file.
29
30 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
31 GPT partition map is detected.
32
41730ed9 332005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
34
35 * commands/i386/pc/play.c: New file.
36 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
37 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
38 macros.
39
95dc3643 402005-11-27 Marco Gerards <mgerards@xs4all.nl>
41
42 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
43 ((unused))' to silence gcc warning.
44
1569ec51 452005-11-26 Hollis Blanchard <hollis@penguinppc.org>
46
47 * configure.ac: Correct `AC_PROG_YACC' test.
48
9abde152 492005-11-22 Hollis Blanchard <hollis@penguinppc.org>
50
51 * util/powerpc/ieee1275/grub-install.in: Run the mount point
52 check before installing files.
53
44b83271 542005-11-22 Mike Small <smallm@panix.com>
55
56 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
57 number regex so multidigit numbers are recognized correctly.
58
592005-11-22 Mike Small <smallm@panix.com>
60
61 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
62 debugging message before attempting to claim memory.
63 (grub_rescue_cmd_initrd): Add a claim debugging message and try
64 multiple addresses in case of failure.
65
9c12956b 662005-11-22 Hollis Blanchard <hollis@penguinppc.org>
67
68 * term/tparm.c (get_space): Remove empty `if' statement.
69
70 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
71
72 * kern/parser.c (check_varstate): Rename `state' to 's'.
73
aeaf81d9 742005-11-22 Hollis Blanchard <hollis@penguinppc.org>
75
76 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
77 variable definitions to the beginning of each function. Sort stack
78 variables by size.
79 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
80 `buf' argument to `char *'.
81
79bbb63f 822005-11-22 Hollis Blanchard <hollis@penguinppc.org>
83
84 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
85 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
86 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
87 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
88 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
89 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
90 configfile.mod, search.mod, gzio.mod and test.mod.
91 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
92 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
93 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
94 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
95 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
96 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
97 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
98 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
99 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
100 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
101 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
102 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
103 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
104 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
105 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
106 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
107 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
108 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
109 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
110 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
111 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
112 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
113 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
114
115 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
116 `grep --include'.
117 (pkgdata_MODULES): Add test.mod.
118
233b1628 1192005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
120
121 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
122 appending to variables with "+=".
123 (PModule): Use full pathname to generate *.lst filenames.
124
125 * Makefile.in: Fixed list rules moved from genmk.rb.
126 (.DELETE_ON_ERROR): New special target.
127 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
128
129 * conf/i386-pc.rmk: Include conf/common.mk.
130 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
131 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
132 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
133 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
134 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
135 configfile.mod, search.mod, gzio.mod and test.mod.
136 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
137 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
138 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
139 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
140 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
141 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
142 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
143 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
144 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
145 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
146 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
147 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
148 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
149 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
150 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
151 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
152 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
153 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
154 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
155 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
156 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
157 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
158 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
159 here...
160 * conf/common.rmk: ... to here. New file.
161
162 * conf/common.mk: New file.
163
16f820c8 1642005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
165
166 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
167 (grub_script.tab.c): ... here.
168
169 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
170 (grub_script.tab.c): ... here.
171
172 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
173 (grub_script.tab.c): ... here.
174
175 * normal/command.c (grub_command_find): Fixed a memory leak of
176 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
177
63ba1554 1782005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
179
180 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
181 "@" which marks the start of a comment on ARM.
182 (VARIABLE): Likewise.
183
7f67dc13 1842005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
185
79bbb63f 186 Add support for Linux/ADFS partition tables.
7f67dc13 187
188 * partmap/acorn.c: New file.
189
190 * include/grub/acorn_filecore.h: Likewise.
191
192 * DISTLIST: Added `partmap/acorn.c' and
193 `include/grub/acorn_filecore.h'.
194
195 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
196 `partmap/acorn.c'.
197 (pkgdata_MODULES): Add `acorn.mod'.
198 (acorn_mod_SOURCES): New variable.
199 (acorn_mod_CFLAGS): Likewise.
200
201 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
202 `partmap/acorn.c'.
203 (pkgdata_MODULES): Add `acorn.mod'.
204 (acorn_mod_SOURCES): New variable.
205 (acorn_mod_CFLAGS): Likewise.
206
207 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
208 (pkgdata_MODULES): Add `acorn.mod'.
209 (acorn_mod_SOURCES): New variable.
210 (acorn_mod_CFLAGS): Likewise.
211 (acorn_mod_LDFLAGS): Likewise.
212
213 * include/types.h (grub_disk_addr_t): New typedef.
214
6d099807 2152005-11-13 Marco Gerards <mgerards@xs4all.nl>
216
217 * geninit.sh: New file.
218
219 * geninitheader.sh: Likewise.
220
221 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
222 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
223 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
224 * commands/configfile.c (grub_configfile_init)
225 (grub_configfile_fini): Likewise.
226 * commands/default.c (grub_default_init, grub_default_fini):
227 Likewise.
228 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
229 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
230 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
231 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
232 Likewise.
233 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
234 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
235 Likewise.
236 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
237 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
238 Likewise.
239 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
240 Likewise.
241 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
242 Likewise.
243 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
244 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
245 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
246 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
247 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
248 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
249 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
250 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
251 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
252 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
253 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
254 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
255 * partmap/amiga.c (grub_amiga_partition_map_init)
256 (grub_amiga_partition_map_fini): Likewise.
257 * partmap/apple.c (grub_apple_partition_map_init)
258 (grub_apple_partition_map_fini): Likewise.
259 * partmap/pc.c (grub_pc_partition_map_init)
260 (grub_pc_partition_map_fini): Likewise.
261 * partmap/sun.c (grub_sun_partition_map_init,
262 grub_sun_partition_map_fini): Likewise.
263 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
264 Likewise.
265
266 * util/grub-emu.c: Include <grub_modules_init.h>.
267 (main): Don't initialize and de-initialize any modules directly,
268 use `grub_init_all' and `grub_fini_all' instead.
269
270 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
271 `grub_vesafb_mod_init'.
272 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
273 all users.
274 * term/i386/pc/vga.c (grub_vga_init): Renamed to
275 `grub_vga_mod_init'. Updated all users.
276 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
277
278 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
279 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
280 rules.
281
282 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
283 Generate a function to initialize the module in utilities.
284 Updated all callers.
285 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
286 initialize the module in utilities. Updated all callers.
287
9046bcf0 2882005-11-09 Hollis Blanchard <hollis@penguinppc.org>
289
290 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
291 escape sequence and a literal ^L to clear the screen.
292
293 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
294 when returning from Open Firmware.
295
d13ea639 2962005-11-09 Hollis Blanchard <hollis@penguinppc.org>
297
298 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
299 (grub_ofconsole_height): Likewise.
300 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
301 manually insert a '\n'.
302 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
303 `grub_ofconsole_height'. Return early if these are already set.
304
a8fcf206 3052005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
306
307 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
308 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
309 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
310 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
311 and `normal/script.c'.
312 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
313 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
314 (test_mod_SOURCES): New variable.
315 (test_mod_CFLAGS): Likewise.
316 (test_mod_LDFLAGS): Likewise.
317 (pkgdata_MODULES): Add `test.mod'.
318 (grub_script.tab.c): New rule.
319 (grub_script.tab.h): Likewise.
320
b6b32745 3212005-11-07 Marco Gerards <mgerards@xs4all.nl>
322
323 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
324 `commands/test.c', `normal/execute.c', `normal/lexer.c',
325 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
326 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
327 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
328 (test_mod_SOURCES): New variable.
329 (test_mod_CFLAGS): Likewise.
330 (pkgdata_MODULES): Add `test.mod'.
331 (grub_script.tab.c): New rule.
332 (grub_script.tab.h): Likewise.
333
daac212a 3342005-11-06 Marco Gerards <mgerards@xs4all.nl>
335
336 Add initial scripting support.
337
338 * commands/test.c: New file.
339 * include/grub/script.h: Likewise.
340 * normal/execute.c: Likewise.
341 * normal/function.c: Likewise.
342 * normal/lexer.c: Likewise.
343 * normal/parser.y: Likewise.
344 * normal/script.c: Likewise.
345
346 * configure.ac: Add `AC_PROG_YACC' test.
347
348 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
349 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
350 `normal/function.c' and `normal/script.c'.
351 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
352 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 353 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
354 variables.
daac212a 355 (pkgdata_MODULES): Add `test.mod'.
356 (grub_script.tab.c): New rule.
357 (grub_script.tab.h): Likewise.
358
359 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
360
361 * include/grub/normal.h (grub_test_init): New prototype.
362 (grub_test_fini): Likewise.
363
364 * normal/command.c: Include <grub/script.h>.
365 (grub_command_execute): Rewritten.
366
367 * util/grub-emu.c (main): Call `grub_test_init' and
368 `grub_test_fini'.
369
77500b2b 3702005-11-03 Hollis Blanchard <hollis@penguinppc.org>
371
372 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
373 to 0.
374 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
375 there are no pending characters.
376
e45deb9e 3772005-11-03 Hollis Blanchard <hollis@penguinppc.org>
378
379 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
380 `grub_strndup' to drop device arguments. Replace unnecessary
381 `grub_strndup' with `grub_strdup'.
382
4ce32619 3832005-11-03 Hollis Blanchard <hollis@penguinppc.org>
384
385 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
386 `debug' environment variable has been set.
387
3882005-11-02 Hollis Blanchard <hollis@penguinppc.org>
389
390 * Makefile.in (install-local): Use $(DATA).
391 (uninstall): Likewise.
392 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
393 (sbin_UTILITIES): ... to here.
394 (sbin_SCRIPTS): New variable.
395 (grub_install_SOURCES): New variable.
396 * util/powerpc/ieee1275/grub-install.in: New file.
397 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
398 variable.
399 (add_segments): Call `grub_util_get_path'.
400
25fe6f03 4012005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
402
403 From Timothy Baldwin:
404 * commands/ls.c (grub_ls_list_files): Close FILE with
405 grub_file_close.
406 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
407
04ccf3ec 4082005-10-24 Marco Gerards <mgerards@xs4all.nl>
409
410 * include/grub/parser.h: New file.
411
412 * kern/parser.c: Likewise.
413
414 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
415 (grub_setup_SOURCES): Likewise.
416 (grub_probefs_SOURCES): Likewise.
417 (grub_emu_SOURCES): Likewise.
418 (kernel_img_HEADERS): Add `parser.h'.
419
420 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
421 (grub_emu_SOURCES): Add `kern/parser.c'.
422 (grubof_SOURCES): Likewise.
423
424 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
425 (grubof_SOURCES): Add `kern/parser.c'.
426
427 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
428
429 * kern/misc.c (grub_split_cmdline): Removed function.
430
431 * kern/rescue.c: Include <grub/parser.h>.
432 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
433 of `grub_split_cmdline'.
434
435 * normal/command.c: Include <grub/parser.h>.
436 (grub_command_execute): Use `grub_parser_split_cmdline' instead
437 of `grub_split_cmdline'.
438
439 * normal/completion.c: Include <grub/parser.h>.
440 (cmdline_state): New variable.
441 (iterate_dir): End the filename with a quote depending on the
442 command line state.
443 (get_state): new function.
444 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
445 split the arguments and determine the current argument. When the
446 argument string is not quoted, escape all spaces.
447
6d8f4b0e 4482005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
449
450 * normal/sparc64/setjmp.S: New file.
451
15cf03ed 4522005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
453
454 * include/grub/sparc64/libgcc.h: New file.
455 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
456 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
457 normal/sparc64/setjmp.c.
458
03e8661a 4592005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
460
461 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
462 * kern/sparc64/cache.S: New file.
463 * kern/sparc64/cache.c: Removed.
464 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
465 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
466 -mtune=ultrasparc.
467 (COMMON_LDFLAGS): Add -melf64_sparc.
468 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
469 (grubof_SOURCES): Use cache.S instead of cache.c.
470 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
471 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
472 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
473 commented though.
474 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
475 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
476 (linux_mod_CFLAGS): Commented out.
477 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
478 out because module isn't built.
479 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
480 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
481 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
482 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
483 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
484 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
485 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
486 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
487 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
488 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
489 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
490 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
491 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
492 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
493
34eeec8a 4942005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
495
496 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
497 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
498 longer, because HFS should not be used on PC.
499
708367a3 5002005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
501
502 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
503 consistently within the loop.
504
6fa1251a 5052005-10-15 Marco Gerards <mgerards@xs4all.nl>
506
507 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
508 directory can not be read.
509
4801580b 5102005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
511
512 * configure.ac (AC_INIT): Increase the version number to 1.91.
513
514 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
515 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
516 term/i386/pc/serial.c.
517
219ad426 5182005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
519
520 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
521 file size must be permitted.
522
523 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
524 between %ah and %al.
525
688e5699 5262005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
527
528 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
529 grub_uint64_t.
530 Call the hook with a NUL-terminated filename.
531 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
532 grub_cpu_to_be32.
533
534 * kern/term.c (cursor_state): New variable.
535 (grub_term_set_current): Reset the cursor state on a new
536 terminal.
537 (grub_setcursor): Rewritten to use CURSOR_STATE.
538 (grub_getcursor): New function.
539
540 * include/grub/term.h (grub_getcursor): New prototype.
541
542 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
543 integers on ARM. Reported by Timothy Baldwin
544 <T.E.Baldwin99@members.leeds.ac.uk>.
545
bb34586c 5462005-10-11 Marco Gerards <mgerards@xs4all.nl>
547
548 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
549 allocated.
550 (grub_sfs_dir): Likewise.
551
9a909877 5522005-10-09 Marco Gerards <mgerards@xs4all.nl>
553
554 Add support for the SFS filesystem.
555
556 * fs/sfs.c: New file.
557
558 * DISTLIST: Added `fs/sfs.c'.
559
560 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
561 (grub_probefs_SOURCES): Likewise.
562 (grub_emu_SOURCES): Likewise.
563 (pkgdata_MODULES): Add `sfs.mod'.
564 (sfs_mod_SOURCES): New variable.
565 (sfs_mod_CFLAGS): Likewise.
566 (sfs_mod_LDFLAGS): Likewise.
567
568 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
569 (pkgdata_MODULES): Add `sfs.mod'.
570 (sfs_mod_SOURCES): New variable.
571 (sfs_mod_CFLAGS): Likewise.
572
573 * util/grub-emu.c (main): Call `grub_sfs_init' and
574 `grub_sfs_fini'.
575
576 * include/grub/fs.h (grub_sfs_init): New prototype.
577 (grub_sfs_fini): Likewise.
578
57bdbde3 5792005-10-07 Marco Gerards <mgerards@xs4all.nl>
580
581 Add support for the AFFS filesystem.
582
583 * fs/affs.c: New file.
584
585 * DISTLIST: Added `fs/affs.c'.
586
587 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
588 (grub_probefs_SOURCES): Likewise.
589 (grub_emu_SOURCES): Likewise.
590 (pkgdata_MODULES): Add `affs.mod'.
591 (affs_mod_SOURCES): New variable.
592 (affs_mod_CFLAGS): Likewise.
593 (affs_mod_LDFLAGS): Likewise.
594
595 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
596 (pkgdata_MODULES): Add `affs.mod'.
597 (affs_mod_SOURCES): New variable.
598 (affs_mod_CFLAGS): Likewise.
599
600 * util/grub-emu.c (main): Call `grub_affs_init' and
601 `grub_affs_fini'.
602
603 * include/grub/fs.h (grub_affs_init): New prototype.
604 (grub_affs_fini): Likewise.
605
047b67e0 6062005-10-01 Marco Gerards <mgerards@xs4all.nl>
607
608 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
609
59b8208a 6102005-10-01 Marco Gerards <mgerards@xs4all.nl>
611
612 * configure.ac: Accept `x86_64' as host_cpu. In that case add
613 `-m32' to CFLAGS.
614
615 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
616 linking.
617
618 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
619 (COMMON_LDFLAGS): New variable.
620 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
621 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
622 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
623 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
624 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
625 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
626 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
627 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
628 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
629 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
630 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
631 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
632 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
633 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
634 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
635 variables.
636 (normal_mod_ASFLAGS): Add `-m32'.
637
638 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
639 (grub_host_size_t, grub_host_ssize_t): New types.
640 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
641 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
642 `GRUB_HOST_SIZEOF_VOID_P'.
643
644 * include/grub/kernel.h (struct grub_module_header): Type of
645 member offset changed to `grub_host_off_t'. Type of member size
646 changed to `grub_host_size_t'.
647 (struct grub_module_info): Type of member offset changed to
648 `grub_host_off_t'. Type of member size changed to
649 `grub_host_size_t'.
650
b4093103 6512005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
652
653 Make GRUB's kernel compliant to Multiboot Specification.
654
655 * kern/i386/pc/startup.S (multiboot_header): New label.
656 (multiboot_entry): Likewise.
657 (multiboot_trampoline): Likewise.
658
659 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
660 Increased to 0x4A0.
661
662 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
663 put parentheses after a question mark.
664 [!GRUB_UTIL] (my_mod): New variable.
665
666 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
667
b2499b29 6682005-09-28 Marco Gerards <mgerards@xs4all.nl>
669
670 Adds support for the XFS filesystem. Btrees are not supported
671 yet.
672
673 * fs/xfs.c: New file.
674
675 * DISTLIST: Added `fs/xfs.c'.
676
677 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
678 (grub_probefs_SOURCES): Likewise.
679 (grub_emu_SOURCES): Likewise.
680 (pkgdata_MODULES): Add `xfs.mod'.
681 (xfs_mod_SOURCES): New variable.
682 (xfs_mod_CFLAGS): Likewise.
683
684 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
685 (pkgdata_MODULES): Add `xfs.mod'.
686 (xfs_mod_SOURCES): New variable.
687 (xfs_mod_CFLAGS): Likewise.
688
689 * util/grub-emu.c (main): Call `grub_xfs_init' and
690 `grub_xfs_fini'.
691
692 * include/grub/fs.h (grub_xfs_init): New prototype.
693 (grub_xfs_fini): Likewise.
694
695
83d37a62 6962005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
697
698 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
699 color modes, allow greater than 16 colors to be configured as
700 a default palette.
701
47d2d65e 7022005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
703
704 * normal/completion.c (complete_arguments): Add the qualifier
705 const into OPTIONS.
706
707 From Omniflux <omniflux+lists@omniflux.com>:
708 * include/grub/terminfo.h: New file.
709 * include/grub/tparm.h: Likewise.
710 * include/grub/i386/pc/serial.h: Likewise.
711 * term/terminfo.c: Likewise.
712 * term/tparm.c: Likewise.
713 * term/i386/pc/serial.c: Likewise.
714 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
715 serial.mod.
716 (terminfo_mod_SOURCES): New variable.
717 (terminfo_mod_CFLAGS): Likewise.
718 (serial_mod_SOURCES): Likewise.
719 (serial_mod_CFLAGS): Likewise.
720
48b671ff 7212005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
722
723 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
724 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
725 and kern/powerpc/ieee1275/cmain.c, respectively.
726
727 * boot/powerpc/ieee1275/crt0.S: Moved to ...
728 * kern/powerpc/ieee1275/crt0.S: ... here.
729
730 * boot/powerpc/ieee1275/cmain.c: Moved to ...
731 * kern/powerpc/ieee1275/cmain.c: ... here.
732
733 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
734 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
735 instead of boot/powerpc/ieee1275/crt0.S and
736 boot/powerpc/ieee1275/cmain.c, respectively.
737
738 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
739 sectors. It was not used anyway.
740
09fc77a7 7412005-08-30 Hollis Blanchard <hollis@penguinppc.org>
742
743 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
744 `unused parameter' warning.
745
003789c7 7462005-08-30 Hollis Blanchard <hollis@penguinppc.org>
747
748 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
749 function.
750 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
751 getcharwidth.
752
67f44c86 7532005-08-28 Marco Gerards <metgerards@student.han.nl>
754
755 * include/grub/normal.h (enum grub_completion_type): Added
756 `GRUB_COMPLETION_TYPE_ARGUMENT'.
757
758 * normal/cmdline.c (print_completion): Handle
759 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
760 * normal/menu_entry.c (store_completion): Likewise.
761
762 * normal/completion.c (complete_arguments): New function.
763 (grub_normal_do_completion): Call `complete_arguments' when the
764 current words start with a dash.
765
0b5abe02 7662005-08-27 Marco Gerards <metgerards@student.han.nl>
767
768 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
769 `gzio.mod' instead of `io.mod').
770
d9864ee1 7712005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
772
773 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
774 (DISTDIRS): Added io and video.
775 Rewrite the search routine to make an output consistently.
776
777 * DISTLIST: Added conf/sparc64-ieee1275.mk,
778 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
779 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
780 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
781 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
782 util/powerpc/ieee1275/misc.c.
783
784 * include/grub/gzio.h: New file.
785 * io/gzio.c: Likewise.
786
787 * kern/file.c (grub_file_close): Call grub_device_close only if
788 FILE->DEVICE is not NULL.
789
790 * include/grub/mm.h [!NULL] (NULL): New macro.
791
792 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
793
794 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
795 (pkgdata_MODULES): Added gzio.mod.
796 (gzio_mod_SOURCES): New variable.
797 (gzio_mod_CFLAGS): Likewise.
798
799 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
800 (pkgdata_MODULES): Added gzio.mod.
801 (gzio_mod_SOURCES): New variable.
802 (gzio_mod_CFLAGS): Likewise.
803
804 * commands/cat.c: Include grub/gzio.h.
805 (grub_cmd_cat): Use grub_gzfile_open instead of
806 grub_file_open.
807
808 * commands/cmp.c: Include grub/gzio.h.
809 (grub_cmd_cmp): Use grub_gzfile_open instead of
810 grub_file_open.
811
812 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
813 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
814 grub_file_open.
815 (grub_rescue_cmd_module): Likewise.
816
fa46f4b5 8172005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
818
819 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
820 kern/sparc64/ieee1275/init.c because it contains _start.
821 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
822
e9211b5d 8232005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
824
825 * configure.ac: Add support for sparc64 host with ieee1275
826 firmware.
827 * configure: Generated from configure.ac.
828 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
829 instead of int.
830 (grub_ofdisk_read): Likewise.
831 (grub_ofdisk_open): Use %p to print pointer values, and cast the
832 pointers as (void *) to remove a warning.
833 (grub_ofdisk_close): Likewise.
834 (grub_ofdisk_read): Likewise.
835 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
836 returns, so make it return void to remove a warning.
837 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
838 Corresponding prototype change.
839 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
840 values, and cast the pointers as (void *) to remove a warning.
841 (grub_mm_dump): Likewise.
842 * conf/sparc64-ieee1275.mk: New file.
843 * conf/sparc64-ieee1275.rmk: Likewise.
844 * include/grub/sparc64/setjmp.h: Likewise.
845 * include/grub/sparc64/types.h: Likewise.
846 * include/grub/sparc64/ieee1275/console.h: Likewise.
847 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
848 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
849 * include/grub/sparc64/ieee1275/time.h: Likewise.
850 * kern/sparc64/cache.c: Likewise.
851 * kern/sparc64/dl.c: Likewise.
852 * kern/sparc64/ieee1275/init.c: Likewise.
853 * kern/sparc64/ieee1275/openfw.c: Likewise.
854
385c6a92 8552005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
856
857 * util/console.c (grub_ncurses_putchar): If C is greater than
858 0x7f, set C to a question mark.
859 (grub_ncurses_getcharwidth): New function.
860 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
861 getcharwidth.
862
863 * normal/menu.c (print_entry): Made aware of Unicode. First,
864 convert TITLE to UCS-4, and predict the cursor position by
865 grub_getcharwidth.
866
867 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
868 const to SRC.
869 * kern/misc.c (grub_utf16_to_utf8): Likewise.
870
16ccb8b1 8712005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
872
873 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
874 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
875 grub_strcat.
876
877 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
878 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
879 grub_strcpy and grub_strlen. Take it into account that a space
880 character is inserted as a delimiter.
881
6a85ce79 8822005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
883
884 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
885 invalid magic in thre error.
886
887 * commands/search.c: New file.
888
889 * util/grub-emu.c (main): Call grub_search_init and
890 grub_search_fini.
891
892 * kern/rescue.c (grub_rescue_print_disks): Removed.
893 (grub_rescue_print_devices): New function.
894 (grub_rescue_cmd_ls): Use grub_device_iterate with
895 grub_rescue_print_devices instead of grub_disk_dev_iterate with
896 grub_rescue_print_disks.
897
898 * kern/partition.c (grub_partition_iterate): Return the result of
899 PARTMAP->ITERATE instead of GRUB_ERRNO.
900
901 * kern/device.c: Include grub/partition.h.
902 (grub_device_iterate): New function.
903
904 * include/grub/partition.h (grub_partition_iterate): Return int
905 instead of grub_err_t.
906
907 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
908 prototype.
909 [GRUB_UTIL] (grub_search_fini): Likewise.
910
911 * include/grub/device.h (grub_device_iterate): New prototype.
912
913 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
914 commands/search.c.
915 (pkgdata_MODULES): Added search.mod.
916 (search_mod_SOURCES): New variable.
917 (search_mod_CFLAGS): Likewise.
918
919 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
920 (pkgdata_MODULES): Added search.mod.
921 (search_mod_SOURCES): New variable.
922 (search_mod_CFLAGS): Likewise.
923
924 * commands/ls.c (grub_ls_list_disks): Renamed to ...
925 (grub_ls_list_devices): ... this, and use grub_device_iterate.
926 All callers changed.
927
928 * DISTLIST: Added commands/search.c.
929
ef095434 9302005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
931
932 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
933 conversion.
934 (grub_getcharwidth): New function.
935
936 * kern/misc.c (grub_utf8_to_ucs4): New function.
937
938 * include/grub/term.h (struct grub_term): Added a new member
939 "getcharwidth".
940 (grub_getcharwidth): New prototype.
941
942 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
943
944 * term/i386/pc/console.c (map_char): New function. Segregated from
945 grub_console_putchar.
946 (grub_console_putchar): Use map_char.
947 (grub_console_getcharwidth): New function.
948 (grub_console_term): Specified grub_console_getcharwidth as
949 getcharwidth.
950
951 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
952 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
953
954 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
955 GRUB_ERRNO.
956 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
957 on grub_strtoul completely.
958 (write_char): Declare local variables in the beginning of the
959 function.
960 (grub_vesafb_getcharwidth): New function.
961 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
962 getcharwidth.
963
1f0a95e4 9642005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
965
966 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
967 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
968 commands/i386/pc/vbetest.c.
969
970 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
971 call grub_vbe_get_controller_info again, because the returned
972 information is volatile.
973 (grub_vbe_set_video_mode): Mostly rewritten.
974 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
975 grub_vbe_status_t correctly.
976 (grub_vbe_get_video_mode_info): Likewise.
977 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
978 several if statements.
979
980 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
981 * commands/i386/pc/vbeinfo.c: ... this.
982
983 * commands/i386/pc/vbe_test.c: Renamed to ...
984 * commands/i386/pc/vbetest.c: ... this.
985
986 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
987 ...
988 (grub_cmd_vbeinfo): ... this. Save video modes before
989 iterating. Skip a video mode, if it is not available, not enough
990 information is given or it is monochrome. Show the memory
991 model. Leave the interpretation of MODEVAR to grub_strtoul
992 completely.
993 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
994 (GRUB_MOD_FINI): Likewise.
995
996 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
997 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
998 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
999 duplicated grub_env_get. Leave the interpretation of MODEVAR to
1000 grub_strtoul completely.
1001 (real2pm): Removed.
1002 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
1003 (GRUB_MOD_FINI): Likewise.
1004
1005 * normal/misc.c: Include grub/mm.h.
1006
1007 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
1008 vbe_list_modes with vbetest.mod and vbeinfo.mod.
1009 (vbe_list_modes_mod_SOURCES): Removed.
1010 (vbe_list_modes_mod_CFLAGS): Likewise.
1011 (vbe_test_mod_SOURCES): Likewise.
1012 (vbe_test_mod_CFLAGS): Likewise.
1013 (vbeinfo_mod_SOURCES): New variable.
1014 (vbeinfo_mod_CFLAGS): Likewise.
1015 (vbetest_mod_SOURCES): Likewise.
1016 (vbetest_mod_CFLAGS): Likewise.
1017
992ffbbe 10182005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
1019
1020 * normal/misc.c: New file.
1021
1022 * DISTLIST: Added normal/misc.c.
1023
1024 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
1025 DISK to HOOK. Call HOOK with DISK.
1026 * partmap/apple.c (apple_partition_map_iterate): Likewise.
1027 * partmap/pc.c (pc_partition_map_iterate): Likewise.
1028 * partmap/sun.c (sun_partition_map_iterate): Likewise.
1029
1030 * normal/menu_entry.c (struct screen): Added a new member
1031 "completion_shown".
1032 (completion_buffer): New global variable.
1033 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
1034 (store_completion): New function.
1035 (complete): Likewise.
1036 (clear_completions): Likewise.
1037 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
1038 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
1039 a tab, call complete.
1040
1041 * normal/completion.c (disk_dev): Removed.
1042 (print_simple_completion): Likewise.
1043 (print_partition_completion): Likewise.
1044 (print_func): New global variable.
1045 (add_completion): Do not take the arguments WHAT or PRINT any
1046 longer. Added a new argument TYPE. Instead of printing directly,
1047 call PRINT_FUNC if not NULL.
1048 All callers changed.
1049 (complete_device): Use a local variable DEV instead of
1050 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
1051 (grub_normal_do_completion): Take a new argument HOOK. Do not
1052 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
1053 empty string, return NULL instead.
1054 All callers changed.
1055
1056 * normal/cmdline.c (print_completion): New function.
1057
1058 * kern/partition.c (grub_partition_iterate): Add an argument DISK
1059 to HOOK.
1060 All callers changed.
1061
1062 * kern/disk.c (grub_print_partinfo): Removed.
1063
1064 * include/grub/partition.h (struct grub_partition_map): Add a new
1065 argument DISK into HOOK of ITERATE.
1066 (grub_partition_iterate): Add a new argument DISK to HOOK.
1067
1068 * include/grub/normal.h (enum grub_completion_type): New enum.
1069 (grub_completion_type_t): New type.
1070 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
1071 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
1072 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
1073 (GRUB_COMPLETION_TYPE_FILE): Likewise.
1074 (grub_normal_do_completion): Added a new argument HOOK.
1075 (grub_normal_print_device_info): New prototype.
1076
1077 * include/grub/disk.h (grub_print_partinfo): Removed.
1078
1079 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
1080 (normal_mod_SOURCES): Likewise.
1081 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1082 (normal_mod_SOURCES): Likewise.
1083
1084 * commands/ls.c (grub_ls_list_disks): Use
1085 grub_normal_print_device_info instead of grub_print_partinfo. Free
1086 PNAME.
1087 (grub_ls_list_files): Use grub_normal_print_device_info instead of
1088 duplicating the code.
1089
0bd41162 10902005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
1091
1092 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
1093 follow GCS more precisely.
1094 * commands/i386/pc/vbe_test.c: Likewise.
1095 * include/grub/i386/pc/vbe.h: Likewise.
1096 * term/i386/pc/vesafb.c: Likewise.
1097 * video/i386/pc/vbe.c: Likewise.
1098
6323696a 10992005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
1100
1101 * DISTLIST: Added term/i386/pc/vesafb.c
1102 DISTLIST: Added video/i386/pc/vbe.c
1103 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
1104 DISTLIST: Added commands/i386/pc/vbe_test.c.
1105 * commands/i386/pc/vbe_list_modes.c: New file.
1106 * commands/i386/pc/vbe_test.c: Likewise.
1107 * term/i386/pc/vesafb.c: Likewise.
1108 * video/i386/pc/vbe.c: Likewise.
1109 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
1110 (grub_vbe_probe) Added prototype.
1111 (grub_vbe_set_video_mode) Likewise.
1112 (grub_vbe_get_video_mode) Likewise.
1113 (grub_vbe_get_video_mode_info) Likewise.
1114 (grub_vbe_set_pixel_rgb) Likewise.
1115 (grub_vbe_set_pixel_index) Likewise.
1116 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
1117 (pkgdata_MODULES): Added vesafb.mod.
1118 (pkgdata_MODULES): Added vbe_list_modes.mod.
1119 (pkgdata_MODULES): Added vbe_test.mod.
1120 (vbe_mod_SOURCES): Added.
1121 (vbe_mod_CFLAGS): Likewise.
1122 (vesafb_mod_SOURCES): Likewise.
1123 (vesafb_mod_CFLAGS): Likewise.
1124 (vbe_list_modes_mod_SOURCES): Likewise.
1125 (vbe_list_modes_mod_CFLAGS): Likewise.
1126 (vbe_test_mod_SOURCES): Likewise.
1127 (vbe_test_mod_CFLAGS): Likewise.
1128
0a74e62f 11292005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
1130
0a74e62f 1131 * normal/command.c (grub_command_execute): If INTERACTIVE is
1132 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
1133 CMDLINE. Disable the pager if INTERACTIVE is true.
1134 All callers are changed.
1135
1136 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
1137 before reading a config file.
1138 * normal/main.c (read_config_file): Even if a command is not
1139 found, register it if it is within an entry.
1140
1141 * util/grub-emu.c: Include sys/types.h and unistd.h.
1142 (options): Added --hold.
1143 (struct arguments): Added a new member "hold".
1144 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
1145 missing.
1146 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
1147 cleared by a debugger, if it is not zero.
1148
1149 * include/grub/normal.h (grub_command_execute): Add an argument
1150 INTERACTIVE.
1151
e51f85ae 11522005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
1153
1154 * DISTLIST: Added include/grub/i386/pc/vbe.h.
1155
e9c6f39b 11562005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
1157
1158 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
1159 program with another one, because the old one didn't detect a bug
1160 in gcc-3.4. Always use regparm 2, because the new test is still
1161 not enough for gcc-4.0. Someone must investigate a simple test
1162 case which detects a bug in gcc-4.0.
1163
8de3495c 11642005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
1165
1166 * DISTLIST: Added normal/completion.c.
1167
1168 * normal/completion.c: New file.
1169
1170 * term/i386/pc/console.c (grub_console_getwh): New function.
1171 (grub_console_term): Assign grub_console_getwh to getwh.
1172
1173 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
1174 function is defined in normal/completion.c as
1175 grub_normal_do_completion.
1176 (grub_cmdline_get): Use grub_normal_do_completion instead of
1177 grub_tab_complete.
1178
1179 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
1180 returns non-zero, otherwise return 0.
1181 (grub_partition_iterate): First, probe the partition map. Then,
1182 call ITERATE only for this partition map.
1183
1184 * kern/misc.c (grub_strncmp): Rewritten.
1185
1186 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
1187 returns non-zero. Otherwise return 0.
1188
1189 * include/grub/partition.h (grub_partition_map_iterate): Return
1190 int instead of void.
1191
1192 * include/grub/normal.h (grub_normal_do_completion): New prototype.
1193
1194 * include/grub/misc.h (grub_strncmp): Change the type of N to
1195 grub_size_t.
1196
1197 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
1198 of void.
1199
1200 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
1201 unsigned explictly before comparing it with I.
1202
1203 * kern/main.c (grub_env_write_root): Add the attribute unused into
1204 VAR.
1205
1206 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
1207 normal/completion.c.
1208 (normal_mod_SOURCES): Likewise.
1209 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
1210 (normal_mod_SOURCES): Likewise.
1211
1212 * normal/command.c (grub_iterate_commands): If ITERATE returns
1213 non-zero, return one immediately.
1214
e85e144b 12152005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
1216
1217 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
1218 * kern/i386/pc/startup.S: Updated Global Descriptor table's
1219 descriptions.
1220 (grub_vbe_get_controller_info): New function.
1221 (grub_vbe_get_mode_info): Likewise.
1222 (grub_vbe_set_mode): Likewise.
1223 (grub_vbe_get_mode): Likewise.
1224 (grub_vbe_set_memory_window): Likewise.
1225 (grub_vbe_get_memory_window): Likewise.
1226 (grub_vbe_set_scanline_length): Likewise.
1227 (grub_vbe_get_scanline_length): Likewise.
1228 (grub_vbe_set_display_start): Likewise.
1229 (grub_vbe_get_display_start): Likewise.
1230 (grub_vbe_set_palette_data): Likewise.
1231 * include/grub/i386/pc/vbe.h: New file.
1232
c46153d2 12332005-08-08 Hollis Blanchard <hollis@penguinppc.org>
1234
1235 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
1236 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
1237 * DISTLIST: Likewise.
1238 * kern/ieee1275/of.c: Moved to ...
1239 * kern/ieee1275/ieee1275.c: ... here.
1240
0cb90c45 12412005-08-08 Hollis Blanchard <hollis@penguinppc.org>
1242
1243 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
1244 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
1245 Pass 0 as `end' parameter to grub_strtoul().
1246
a19fb360 12472005-08-08 Hollis Blanchard <hollis@penguinppc.org>
1248
1249 * include/grub/powerpc/ieee1275/console.h: Do not include
1250 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
1251 ifdef.
1252 (grub_console_cur_color): Remove i386-specific prototype.
1253 (grub_console_real_putchar): Likewise.
1254 (grub_console_checkkey): Likewise.
1255 (grub_console_getkey): Likewise.
1256 (grub_console_getxy): Likewise.
1257 (grub_console_gotoxy): Likewise.
1258 (grub_console_cls): Likewise.
1259 (grub_console_setcursor): Likewise.
1260 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
1261 Include <grub/machine/console.h>.
1262 * term/ieee1275/ofconsole.c: Likewise.
1263
4ac9bd04 12642005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
1265
1266 * Makefile.in (LIBLZO): New variable.
1267
1268 * configure.ac: Check for LZO version 2.
1269
1270 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
1271 lzo/lzo1x.h instead of lzo1x.h.
1272
1273 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
1274 of -llzo.
1275
1276 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
1277 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
1278
1279 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
1280 copying the data from PARTITION to P.
1281
f4917dfd 12822005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
1283
1284 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
1285 negative, unload the module.
1286
1287 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
1288 map is "pc_partition_map" but not "pc".
1289 (usage): Fix the description. The options are --boot-image and
1290 --core-image but not --boot-file or --core-file.
1291 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
1292 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
1293 DEFAULT_DIRECTORY.
1294
1295 * util/i386/pc/grub-install.in: Do not specify --boot-file or
1296 --core-file. Specify INSTALL_DEVICE as an argument.
1297
1298 * util/console.c: Include config.h.
1299 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
1300 [HAVE_NCURSES_H]: Include ncurses.h.
1301 [HAVE_CURSES_H]: Include curses.h.
1302 [!A_NORMAL] (A_NORMAL): Defined as zero.
1303 [!A_STANDOUT] (A_STANDOUT): Likewise.
1304
1305 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
1306 -lncurses.
1307 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
1308
1309 * configure.ac: Check for curses libraries and headers.
1310
1311 * Makefile.in (LIBCURSES): New variable.
1312
1313 * genmk.rb (Script::rule): Set the executable bits.
1314
1315 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
1316 name of the PC partition map is "pc_partition_map" but not "pc".
1317
0e143073 13182005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
1319
1320 * util/i386/pc/grub-install.in (grub_probefs): New variable.
1321 (modules): Likewise.
1322 (usage): Added descriptions for --modules and --grub-probefs.
1323 Handle --modules and --grub-probefs. Save the arguments in MODULES
1324 and GRUB_PROBEFS, respectively.
1325 Auto-detect a filesystem module against GRUBDIR. If the result is
1326 empty and modules are not specified explicitly, abort the
1327 installation. Add the result to MODULES.
1328
1329 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
1330 disk/powerpc/ieee1275/ofdisk.c,
1331 include/grub/powerpc/ieee1275/init.h and
1332 term/powerpc/ieee1275/ofconsole.c.
1333 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
1334 term/ieee1275/ofconsole.c.
1335
1336 * include/grub/powerpc/ieee1275/console.h: Resurrected.
1337
1338 * COPYING: Upgraded to the latest version. Only the address of the
1339 FSF office has changed.
1340
efd6e6d5 13412005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
1342
1343 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
1344 kern/ieee1275.c with kern/ieee1275/of.c.
1345
1346 * kern/ieee1275.c: Moved to ...
1347 * kern/ieee1275/of.c: ... here.
1348
8ceafda2 13492005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
1350
1351 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
1352 readablity.
1353
1354 * config.guess: Updated to the latest version from gnulib.
1355 * config.sub: Likewise.
1356 * install.sh: Likewise.
1357 * mkinstalldirs: Likewise.
1358
1359 * include/grub/console.h: Removed. This file is arch-specific. Do
1360 not put this in include/grub.
1361
1362 * include/grub/i386/pc/console.h: Resurrected.
1363
1364 * util/console.c: Include grub/machine/console.h instead of
1365 grub/console.h.
1366 * util/grub-emu.c: Likewise.
1367
267f6cd9 13682005-08-04 Marco Gerards <metgerards@student.han.nl>
1369
1370 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
1371 hardcoded value.
1372
1373 From Vincent Pelletier <subdino2004@yahoo.fr>
1374 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
1375 Redefined to use grub_getwh.
1376 (grub_term): New member named getwh.
1377 (grub_getwh): New prototype.
1378 * kern/term.c (grub_getwh): New function.
1379 * term/i386/pc/console.c (grub_console_getwh): New function.
1380 (grub_console_term): New member `getwh'.
1381 * term/i386/pc/vga.c (grub_vga_getwh): New function.
1382 (grub_vga_term): New member `getwh'.
0b5abe02 1383 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 1384 grub_ssize_t.
1385 (grub_ofconsole_getw): New function.
1386 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
1387 (grub_ofconsole_term): New field named getwh and new initial
1388 value.
1389
3be7266d 13902005-08-03 Hollis Blanchard <hollis@penguinppc.org>
1391
1392 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
1393 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
1394 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
1395 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
1396 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
1397 of <grub/machine/ieee1275.h>.
1398 * commands/ieee1275/reboot.c: Likewise.
1399 * boot/powerpc/ieee1275/ieee1275.c: Move ...
1400 * kern/ieee1275.c: ... to here. All users updated. Change all
1401 parameter structs to use new type `grub_ieee1275_cell_t'.
1402 * term/powerpc/ieee1275/ofconsole.c: Move ...
1403 * term/ieee1275/ofconsole.c: ... to here. All users updated.
1404 * disk/powerpc/ieee1275/ofdisk.c: Move ...
1405 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
1406 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
1407 to return int.
1408 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
1409 Remove unused prototypes. All users updated.
1410 * include/grub/powerpc/ieee1275/console.h: Removed.
1411 * include/grub/powerpc/ieee1275/ieee1275.h: Define
1412 `grub_ieee1275_cell_t'.
1413 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
1414 Cast comparisons with -1 to the correct type.
1415 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
1416 type to match `grub_ieee1275_entry_fn'.
1417
8b5f3938 14182005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
1419
1420 * DISTLIST: Added util/i386/pc/grub-probefs.c.
1421
1422 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
1423 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
1424 partmap/sun.c.
1425 (grub_probefs_SOURCES): New variable.
1426
1427 * util/i386/pc/grub-probefs.c: New file.
1428
1429 * util/i386/pc/grub-setup.c (main): Call
1430 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
1431 grub_hfs_init and grub_jfs_init to initialize the system. Call
1432 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
1433 grub_pc_partition_map_fini to finish the system.
1434
ea409713 14352005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
1436
1437 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
1438 function.
1439 (grub_multiboot_load_elf32): Likewise.
1440 (grub_multiboot_is_elf64): Likewise.
1441 (grub_multiboot_load_elf64): Likewise.
1442 (grub_multiboot_load_elf): Likewise.
1443 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
1444 an ELF32 or ELF64 file.
1445 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
1446
1447 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
1448 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
1449 NULL before calling FS->LABEL.
1450 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
1451 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
1452 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
1453 before calling FS->LABEL.
1454
141a288b 14552005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
1456
1457 * util/i386/pc/grub-install.in (datadir): New variable.
1458 (libdir): Removed.
1459 (pkgdatadir): New variable.
1460 (pkglibdir): Removed.
1461
0d5f8a54 14622005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
1463
1464 * DISTLIST: Added util/i386/pc/grub-install.in.
1465
1466 * util/i386/pc/grub-install.in: New file.
1467
1468 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
1469 (grub_install_SOURCES): Likewise.
1470
1471 * genmk.rb: Added support for scripts.
1472 (Script): New class.
1473 (scripts): New variable.
1474
1475 * Makefile.in (install-local): Install sbin_SCRIPTS by
1476 INSTALL_SCRIPT.
1477 (uninstall): Remove sbin_SCRIPTS.
1478
1479 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
1480 device, try to get a GRUB device by
1481 grub_util_biosdisk_get_grub_dev.
1482 Free DEST_DEV.
1483
1484 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
1485 description for --device-map.
1486
5f968e1e 14872005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
1488
1489 Change the semantics of variable hooks. They now return strings
1490 instead of error values.
1491
1492 * util/i386/pc/grub-setup.c: Include grub/env.h.
1493 (setup): Use grub_device_set_root instead of grub_env_set.
1494
1495 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
1496 grub_env_get instead of grub_device_set_root and
1497 grub_device_get_root, respectively.
1498
1499 * kern/main.c (grub_env_write_root): New function.
1500 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
1501 grub_env_set instead of grub_device_set_root.
1502
1503 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
1504 many variables.
1505 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
1506 rather than calling ENV->WRITE_HOOK afterwards.
1507 (grub_env_get): Return the result of ENV->READ_HOOK rather than
1508 passing a pointer of a pointer.
1509 (grub_register_variable_hook): Change the types of "read_hook" and
1510 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
1511 respectively.
1512 Allocate the default empty string on the heap, because this string
1513 may be freed later.
1514
1515 * kern/device.c: Include grub/env.h.
1516 (grub_device_set_root): Removed.
1517 (grub_device_get_root): Likewise.
1518 (grub_device_open): Use grub_env_get instead of
1519 grub_device_get_root.
1520
1521 * include/grub/env.h (grub_env_read_hook_t): New type.
1522 (grub_env_write_hook_t): Likewise.
1523 (grub_env_var): Change the types of "read_hook" and "write_hook"
1524 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
1525 (grub_register_variable_hook): Likewise.
1526
1527 * include/grub/device.h (grub_device_set_root): Removed.
1528 (grub_device_set_root): Likewise.
1529
1530 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
1531 make sure that DIRNAME terminates with '/', so that
1532 grub_fat_find_dir will fail if PATH is not a directory.
1533
1534 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
1535 from DIRNAME.
1536 Use the qualifier auto for print_files and print_files_long.
1537 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
1538 as a regular file.
1539 Put a newline only if there is no error.
1540 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
1541 used.
1542
896f0afd 15432005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
1544
1545 * kern/partition.c (grub_partition_probe): Initialize PART to
1546 NULL. Otherwise, when no partition map is registered, this returns
1547 a garbage.
1548
b28b81b2 15492005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
1550
1551 * partmap/apple.c (apple_partition_map_iterate): Check if POS
1552 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
1553 valid.
1554
5f3607e0 15552005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
1556
1557 * commands/ls.c (grub_ls_list_disks): Print the filesystem
1558 information on each device, if it does not have partitions. Print
1559 "Device" instead of "Disk", because this function is not specific
1560 to disk devices.
1561
1562 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
1563 static to ensure that it is put on the memory rather than a
1564 register.
1565
502c87e8 15662005-07-17 Yoshinori Okuji <okuji@enbug.org>
1567
1568 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
1569 (grub_cat_init): Likewise.
1570 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
1571 (options): Likewise.
1572 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
1573 (grub_configfile_init): Likewise.
1574 * font/manager.c (GRUB_MOD_INIT): Likewise.
1575 * commands/help.c (GRUB_MOD_INIT): Likewise.
1576 (grub_help_init): Likewise.
1577 * normal/command.c (grub_command_init): Likewise.
1578 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
1579 * disk/loopback.c (grub_loop_init): Likewise.
1580 (GRUB_MOD_INIT): Likewise.
1581 * commands/ls.c (grub_ls_init): Likewise.
1582 (GRUB_MOD_INIT): Likewise.
1583 (options): Likewise.
1584 * commands/boot.c (grub_boot_init): Likewise.
1585 (GRUB_MOD_INIT): Likewise.
1586 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
1587 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
1588 (GRUB_MOD_INIT): Likewise.
1589 * commands/cmp.c (grub_cmp_init): Likewise.
1590 (GRUB_MOD_INIT): Likewise.
1591
1592 * normal/arg.c: Use <> instead of "" to include header files.
1593 (SHORT_ARG_HELP): New macro.
1594 (SHORT_ARG_USAGE): Likewise.
1595 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
1596 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
1597 descriptions.
1598 (find_short): Check if C is 'h' or 'u' explicitly.
1599 (grub_arg_show_help): Use space characters instead of tabs. Treat
1600 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
1601 are shown with --help and --usage only if they are not used for
1602 the command itself.
1603 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
1604 'h' and 'u'.
1605
1606 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
1607 const into "longarg". Change the type of "shortarg" to int.
1608
f806d18e 16092005-07-17 Yoshinori Okuji <okuji@enbug.org>
1610
1611 * boot/i386/pc/boot.S (boot_drive_check): New label.
1612
1613 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
1614 macro.
1615
1616 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
1617 which do not pass a boot drive correctly. Copied from GRUB Legacy.
1618
e293232b 16192005-07-17 Yoshinori Okuji <okuji@enbug.org>
1620
1621 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
1622 When turning off Gate A20, skip the check and return immediately,
1623 because this is not fatal usually.
1624
ebedfd00 16252005-07-17 Yoshinori Okuji <okuji@enbug.org>
1626
1627 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
1628 be 0x7C00 instead of 0x8000.
1629
1630 * boot/i386/pc/pxeboot.S: Rewritten.
1631
1632 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
1633 EXT_C.
1634 (gate_a20_check_state): Read a byte from 0x108000. Invert the
1635 result.
1636
654fc59f 16372005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
1638
1639 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
1640 robustness. This routine now supports a BIOS call and System
1641 Control Port A to modify the gate A20.
1642
1643 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
1644 Increased to 0x440.
1645
09f9923f 16462005-07-12 Hollis Blanchard <hollis@penguinppc.org>
1647
1648 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
1649 device path and resulting ihandle.
1650 (grub_ofdisk_close): dprintf the ihandle being closed.
1651 (grub_ofdisk_read): dprintf function parameters.
1652 * kern/mm.c (grub_mm_init_region): Likewise.
1653 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
1654 (grub_linux_boot): dprintf the Linux entry point, initrd address and
1655 size, and boot arguments.
1656 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
1657 before loading into memory.
1658 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
1659 before loading into memory.
1660
7ef504d8 16612005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
1662
1663 * kern/mm.c: Added much documentation.
1664 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
1665 8, set to 5 instead of 8.
1666
e0f050c2 16672005-07-10 Yoshinori Okuji <okuji@enbug.org>
1668
1669 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
1670
1671 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
1672 (grub_mkdevicemap_SOURCES): New variable.
1673
1674 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
1675 lib/device.c of GRUB Legacy.
1676
7224189a 16772005-07-10 Yoshinori Okuji <okuji@enbug.org>
1678
1679 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
1680 instead of PATH is NULL.
1681
68c864eb 16822005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
1683
1684 * commands/cmp.c (BUFFER_SIZE): New macro.
1685 (grub_cmd_cmp): Close the right file at the right time. Compare
1686 only data just read. Don't report files of different size as
1687 identical. Dynamically allocate buffers. Move variable
1688 declarations at the beginning of function.
1689
e6f3e614 16902005-07-09 Yoshinori Okuji <okuji@enbug.org>
1691
1692 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
1693 reverse.
1694
f8f1559a 16952004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
1696
1697 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
1698 when backspace is pressed at beginning of line.
1699
39c9d41d 17002005-07-03 Yoshinori Okuji <okuji@enbug.org>
1701
1702 * DISTLIST: Added genfslist.sh.
1703
1704 * normal/main.c (fs_module_list): New variable.
1705 (autoload_fs_module): New function.
1706 (read_fs_list): Likewise.
1707 (grub_normal_execute): Call read_fs_list.
1708
1709 * kern/fs.c (grub_fs_autoload_hook): New variable.
1710 (grub_fs_probe): Added support for auto-loading.
1711
1712 * include/grub/normal.h (struct grub_fs_module_list): New struct.
1713 (grub_fs_module_list_t): New type.
1714
1715 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
1716 (grub_fs_autoload_hook): New prototype.
1717
1718 * genfslist.sh: New file.
1719
1720 * genmk.rb: Added a rule to generate a filesystem list.
1721
121c1d83 17222005-06-30 Marco Gerards <metgerards@student.han.nl>
1723
1724 * configure.ac: Fix the test for cross-compiling.
1725
1726 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
1727 define GRUB_UTIL anymore.
1728
1729 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
1730 so this function works on other systems than just big endian.
1731 (load_modules): Likewise.
1732 (add_segments): Likewise.
1733
e75d76e1 17342005-06-23 Hollis Blanchard <hollis@penguinppc.org>
1735
1736 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
1737 contains `l' modifier, get a long from va_arg().
1738
50b5a0a7 17392005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
1740
1741 * kern/mm.c (grub_free): If the next free block which is being
1742 merged is the first free block, set the first block to the block
1743 being freed.
1744 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
1745
89371b20 17462005-05-08 Hollis Blanchard <hollis@penguinppc.org>
1747
1748 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
1749 `grub_ieee1275_chosen'.
1750
168d6e58 17512005-05-08 Hollis Blanchard <hollis@penguinppc.org>
1752
1753 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
1754 (grub_ieee1275_chosen): New variable.
1755 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
1756 `chosen'.
1757 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
1758 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
1759 Rename first argument to `phandle' for consistency.
1760 (grub_ieee1275_get_property_length): Likewise.
1761 (grub_ieee1275_next_property): Likewise. Change type of first argument
1762 to grub_ieee1275_phandle_t.
1763 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
1764 Move export next to declaration.
1765 (grub_ieee1275_chosen): New variable.
1766 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
1767 Correct cosmetic typo.
1768 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
1769 `grub_ieee1275_chosen'.
1770 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
1771 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
1772 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
1773 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
1774 `grub_ieee1275_chosen'.
1775
ca5baa3f 17762005-05-10 Hollis Blanchard <hollis@penguinppc.org>
1777
1778 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
1779 /chosen/bootargs.
1780 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
1781 /chosen/bootargs as "variable=value" pairs.
1782
708b345f 17832005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
1784
1785 * include/grub/misc.h (grub_dprintf): New macro.
1786 (grub_real_dprintf): New prototype.
1787 (grub_strword): Likewise.
1788 (grub_iswordseparator): Likewise.
1789 * kern/misc.c (grub_real_dprintf): New function.
1790 (grub_strword): Likewise.
1791 (grub_iswordseparator): Likewise.
1792
f4c5e67c 17932005-04-30 Hollis Blanchard <hollis@penguinppc.org>
1794
1795 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
1796 (roundup): Remove macro.
1797 (grub_ieee1275_flags): Make static.
1798 (grub_ieee1275_realmode): Remove.
1799 (grub_ieee1275_test_flag): New function.
1800 (grub_ieee1275_set_flag): Likewise.
1801 (find_options): Rename to `grub_ieee1275_find_options'; update
1802 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
1803 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
1804 (cmain): New prototype.
1805 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
1806 `grub_ieee1275_flags' directly.
1807 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
1808 machine/biosdisk.h.
1809 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
1810 Don't include grub/machine/init.h.
1811 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
1812 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
1813 Remove prototype.
1814 (grub_ieee1275_realmode): Likewise.
1815 (grub_ieee1275_flag): New enum.
1816 (grub_ieee1275_test_flag): New prototype.
1817 (grub_ieee1275_set_flag): New prototype.
1818 * include/grub/powerpc/ieee1275/init.h: Remove file.
1819 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
1820 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
1821 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
1822 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
1823 comment.
1824 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
1825 `grub_ieee1275_test_flag'.
1826 (grub_ieee1275_encode_devname): Likewise.
1827
ed16607e 18282005-04-21 Hollis Blanchard <hollis@penguinppc.org>
1829
1830 * include/grub/powerpc/ieee1275/ieee1275.h
1831 (grub_ieee1275_encode_devname): New prototype.
1832 (grub_ieee1275_get_filename): Likewise.
1833 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
1834 function.
1835 (grub_set_prefix): Likewise.
1836 (grub_machine_init): Call grub_set_prefix.
1837 * kern/powerpc/ieee1275/openfw.c: Fix typos.
1838 (grub_parse_type): New enum.
1839 (grub_ieee1275_get_devargs): New function.
1840 (grub_ieee1275_get_devname): Likewise.
1841 (grub_ieee1275_parse_args): Likewise.
1842 (grub_ieee1275_get_filename): Likewise.
1843 (grub_ieee1275_encode_devname): Likewise.
1844
be369920 18452005-03-30 Marco Gerards <metgerards@student.han.nl>
1846
1847 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
1848 `grub_loader_unset'.
1849
a5ce3a4a 18502005-03-26 Hollis Blanchard <hollis@penguinppc.org>
1851
1852 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
1853 instead of grub_ieee1275_interpret.
1854 (grub_halt_init): New function.
1855 (grub_halt_fini): Likewise.
1856 (GRUB_MOD_INIT): Correct message grammar.
1857 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
1858 instead of grub_ieee1275_interpret.
1859 (grub_reboot_init): New function.
1860 (grub_reboot_fini): Likewise.
1861 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
1862 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
1863 util/i386/pc/misc.c with commands/ieee1275/halt.c,
1864 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
1865 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
1866 function.
1867 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
1868 Add prototype.
1869 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
1870 prototype.
1871 (grub_halt): Likewise.
1872 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
1873 (cmain): Remove __attribute__((unused)).
1874 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
1875 (grub_heap_len): Likewise.
1876 (grub_machine_fini): New function.
1877 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
1878 (grub_halt): Likewise.
1879 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
1880 function.
1881 * util/powerpc/ieee1275/misc.c: New file.
1882
0058f771 18832005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
1884
1885 * DISTLIST: New file.
1886 * gendistlist.sh: Likewise.
1887
1888 * Makefile.in (COMMON_DISTFILES): Removed.
1889 (BOOT_DISTFILES): Likewise.
1890 (CONF_DISTFILES): Likewise.
1891 (DISK_DISTFILES): Likewise.
1892 (FS_DISTFILES): Likewise.
1893 (INCLUDE_DISTFILES): Likewise.
1894 (KERN_DISTFILES): Likewise.
1895 (LOADER_DISTFILES): Likewise.
1896 (TERM_DISTFILES): Likewise.
1897 (UTIL_DISTFILES): Likewise.
1898 (DISTFILES): Likewise.
1899 (uninstall): Uninstall files in $(pkgdata_DATA).
1900 (DISTLIST): New target.
1901 (distdir): Use the contents of the file DISTLIST to get a list of
1902 distributed files.
1903
46b3b8a5 19042005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
1905
1906 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
1907 descriptor. This is ported from GRUB Legacy.
1908
1909 * gencmdlist.sh: Added an extra semicolon to make it work with
1910 old sed versions. Reported by Robert Bihlmeyer
1911 <robbe@orcus.priv.at>.
1912
5822ff87 19132005-03-08 Yoshinori Okuji <okuji@enbug.org>
1914
1915 Automatic loading of commands is supported.
1916
1917 * normal/main.c (read_command_list): New function.
1918 (grub_normal_execute): Call read_command_list.
1919
1920 * normal/command.c (grub_register_command): Return zero or CMD.
1921 Allocate CMD->NAME from the heap.
1922 Initialize CMD->MODULE_NAME to zero.
1923 Find the same name as well. If the same command is found and it is
1924 a dummy command, overwrite members. If it is not a dummy command,
1925 return zero.
1926 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
1927 (grub_command_find): If a dummy command is found, load a module
1928 and retry to find a command only once.
1929
1930 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
1931 make sure that each command is loaded.
1932
1933 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
1934 macro.
1935 (struct grub_command): Remove const from the member `name'.
1936 Add a new member `module_name'.
1937 (grub_register_command): Return grub_command_t.
1938
1939 * commands/help.c (grub_cmd_help): Call grub_command_find to make
1940 sure that each command is loaded.
1941
1942 * genmk.rb (PModule::rule): Specify a module name without the
1943 suffix ".mod" to gencmdlist.sh.
1944
7b1f4b57 19452005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
1946
1947 * gencmdlist.sh: New file.
1948
1949 * genmk.rb (PModule::rule): Generate a rule for a command list.
1950 Clean command.lst.
1951 Generate command.lst from $(COMMANDFILES).
1952
1953 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
1954 (DATA): Added $(pkgdata_DATA).
1955 (install-local): Install files in $(pkgdata_DATA).
1956
062aaf39 19572005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
1958
1959 * term/i386/pc/vga.c (debug_command): Removed.
1960 (GRUB_MOD_INIT): Do not register the command "debug".
1961
1962 From Hollis Blanchard:
1963 * commands/configfile.c: New file.
1964 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
1965 commands/configfile.c.
1966 (pkgdata_MODULES): Added configfile.mod.
1967 (configfile_mod_SOURCES): New variable.
1968 (configfile_mod_CFLAGS): Likewise.
1969 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
1970 commands/configfile.c.
1971 (pkgdata_MODULES): Added configfile.mod.
1972 (configfile_mod_SOURCES): New variable.
1973 (configfile_mod_CFLAGS): Likewise.
1974 * util/grub-emu.c (main): Call grub_configfile_init and
1975 grub_configfile_fini.
1976 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
1977 prototype.
1978 [GRUB_UTIL] (grub_configfile_fini): Likewise.
1979
cee01aa6 19802005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
1981
1982 * normal/arg.c (grub_arg_show_help): Do not show the bug report
1983 address.
1984
1985 * commands/help.c (grub_cmd_help): Do not print newlines after
1986 the last command in print_command_help.
1987
93f3a1d8 19882005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
1989
1990 * commands/default.h: New file.
1991 * commands/timeout.h: Likewise.
1992 * normal/context.c: Likewise.
1993
1994 * util/misc.c: Do not include sys/times.h.
1995 Include sys/time.h and grub/machine/time.h.
1996 (grub_get_rtc): Rewritten with gettimeofday.
1997
1998 * util/grub-emu.c (main): Call grub_default_init and
1999 grub_timeout_init before grub_normal_init, and call
2000 grub_timeout_fini and grub_default_fini after grub_main.
2001
2002 * util/console.c (grub_ncurses_checkkey): Return the read
2003 character or -1.
2004
2005 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
2006 timeouts.
2007
2008 * normal/main.c (read_config_file): Push MENU. If this fails,
2009 print an error and wait for a user input.
2010 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
2011 If a menu is empty or an error occurs, pop MENU.
2012 (grub_normal_execute): Pop and free MENU after grub_menu_run
2013 returns.
2014
2015 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
2016
2017 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
2018 include time.h.
2019 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
2020 without GRUB_UTIL.
2021 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
2022 time.h.
2023 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
2024 without GRUB_UTIL.
2025
2026 * include/grub/normal.h (struct grub_menu_list): New struct.
2027 (grub_menu_list_t): New type.
2028 (struct grub_context): New struct.
2029 (grub_context_t): New type.
2030 (grub_register_command): Got rid of EXPORT_FUNC.
2031 (grub_unregister_command): Likewise.
2032 (grub_context_get): New prototype.
2033 (grub_context_get_current_menu): Likewise.
2034 (grub_context_push_menu): Likewise.
2035 (grub_context_pop_menu): Likewise.
2036 [GRUB_UTIL] (grub_default_init): Likewise.
2037 [GRUB_UTIL] (grub_default_fini): Likewise.
2038 [GRUB_UTIL] (grub_timeout_init): Likewise.
2039 [GRUB_UTIL] (grub_timeout_fini): Likewise.
2040
2041 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
2042 commands/timeout.c and normal/context.c.
2043 (pkgdata_MODULES): Added default.mod and timeout.mod.
2044 (normal_mod_SOURCES): Added normal/context.c.
2045 (default_mod_SOURCES): New variable.
2046 (default_mod_CFLAGS): Likewise.
2047 (timeout_mod_SOURCES): Likewise.
2048 (timeout_mod_CFLAGS): Likewise.
2049 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
2050 conf/i386-pc.rmk.
2051 (pkgdata_MODULES): Added default.mod and timeout.mod.
2052 (normal_mod_SOURCES): Added normal/context.c.
2053 (default_mod_SOURCES): New variable.
2054 (default_mod_CFLAGS): Likewise.
2055 (timeout_mod_SOURCES): Likewise.
2056 (timeout_mod_CFLAGS): Likewise.
2057
2058 * Makefile.in (all-local): Added $(MKFILES).
2059
4ed2e1dd 20602005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
2061
2062 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
2063 (grub_emu_SOURCES): Likewise.
2064 (pkgdata_MODULES): Add `sun.mod'.
2065 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
2066 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2067 `partmap/sun.c'.
2068 (pkgdata_MODULES): Add `sun.mod'.
2069 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
2070 * include/grub/partition.h (grub_sun_partition_map_init): New
2071 prototype.
2072 (grub_sun_partition_map_fini): Likewise.
2073 * partmap/sun.c: New file.
2074 * util/grub-emu.c (main): Initialize and de-initialize the sun
2075 partitionmap support.
2076
4d4e372e 20772005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
2078
2079 This implements an Emacs-like menu entry editor.
2080
2081 * normal/menu_entry.c: New file.
2082
2083 * util/console.c (grub_ncurses_putchar): Translate some Unicode
2084 characters to ASCII.
2085 (saved_char): New variable.
2086 (grub_ncurses_checkkey): Rewritten completely.
2087 (grub_ncurses_getkey): Likewise.
2088 (grub_ncurses_init): Call raw instead of cbreak.
2089
2090 * normal/menu.c (print_entry): Do not put a space.
2091 (init_page): Renamed to ...
2092 (grub_menu_init_page): ... this. All callers changed.
2093 (edit_menu_entry): Removed.
2094 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
2095
2096 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
2097
2098 * kern/misc.c (grub_vprintf): Call grub_refresh.
2099
2100 * normal/menu.c (DISP_LEFT): Renamed to ...
2101 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
2102 * normal/menu.c (DISP_UP): Renamed to ...
2103 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
2104 * normal/menu.c (DISP_RIGHT): Renamed to ...
2105 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
2106 * normal/menu.c (DISP_DOWN): Renamed to ...
2107 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
2108 * normal/menu.c (DISP_HLINE): Renamed to ...
2109 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
2110 * normal/menu.c (DISP_VLINE): Renamed to ...
2111 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
2112 * normal/menu.c (DISP_UL): Renamed to ...
2113 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
2114 * normal/menu.c (DISP_UR): Renamed to ...
2115 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
2116 * normal/menu.c (DISP_LL): Renamed to ...
2117 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
2118 * normal/menu.c (DISP_LR): Renamed to ...
2119 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
2120 * normal/menu.c (TERM_WIDTH): Renamed to ...
2121 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
2122 * normal/menu.c (TERM_HEIGHT): Renamed to ...
2123 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
2124 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
2125 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
2126 * normal/menu.c (TERM_MARGIN): Renamed to ...
2127 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
2128 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
2129 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
2130 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
2131 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
2132 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
2133 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
2134 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
2135 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
2136 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
2137 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
2138 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
2139 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
2140 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
2141 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
2142 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
2143 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
2144 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
2145 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
2146 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
2147 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
2148 All callers changed.
2149
2150 * include/grub/normal.h: New prototype.
2151
2152 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
2153 normal/menu_entry.c.
2154 (normal_mod_SOURCES): Likewise.
2155 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2156 (normal_mod_SOURCES): Likewise.
2157
e6b92c8a 21582005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
2159
2160 * include/grub/normal.h (grub_halt_init): New prototype.
2161 (grub_halt_fini): Likewise.
2162 (grub_reboot_init): Likewise.
2163 (grub_reboot_fini): Likewise.
2164
2165 * util/grub-emu.c: Include signal.h.
2166 (main_env): New global variable.
2167 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
2168 catch C-c.
2169 (grub_machine_fini): New function.
2170 (main): Call grub_halt_init and grub_reboot_init before
2171 grub_main, and grub_reboot_fini and grub_halt_fini after it.
2172 Call setjmp with MAIN_ENV to go back afterwards.
2173 Call grub_machine_fini right before return.
2174
2175 * include/grub/util/misc.h: Include setjmp.h.
2176 (main_env): New prototype.
2177
2178 * include/grub/kernel.h (grub_machine_fini): New prototype.
2179 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
2180 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
2181
2182 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
2183 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
2184 * term/i386/pc/console.c (grub_console_fini): Likewise.
2185
2186 * util/i386/pc/misc.c: New file.
2187
2188 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
2189 util/i386/pc/misc.c, commands/i386/pc/halt.c and
2190 commands/i386/pc/reboot.c.
2191
c642636f 21922005-02-14 Guillem Jover <guillem@hadrons.org>
2193
2194 * include/grub/dl.h (grub_dl_check_header): New prototype.
2195 (grub_arch_dl_check_header): Change return type to grub_err_t,
2196 remove size parameter and export function. Update all callers.
2197 * kern/dl.c (grub_dl_check_header): New function.
2198 (grub_dl_load_core): Use `grub_dl_check_header' instead of
2199 `grub_arch_dl_check_header'. Check ELF type. Check if sections
2200 are inside the core.
2201 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
2202 independent ELF header checks.
2203 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
2204 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
2205 `grub_dl_check_header' instead of explicit checks. Check for the
2206 ELF type.
2207 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
2208 `grub_dl_check_header' instead of explicit checks. Remove arch
2209 specific ELF header checks.
2210
e6b92c8a 2211 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
2212 argument SIZE.
2213
5eabe94b 22142005-02-13 Hollis Blanchard <hollis@penguinppc.org>
2215
2216 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
2217 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
2218
1b14a681 22192005-02-12 Hollis Blanchard <hollis@penguinppc.org>
2220
2221 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
2222 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
2223 (part_map_iterate): Clear `grub_errno' and return 0 if
2224 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
2225 * partmap/amiga.c (amiga_partition_map_iterate): Return
2226 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
2227 * partmap/apple.c (apple_partition_map_iterate): Likewise.
2228
aca108aa 22292005-02-01 Guillem Jover <guillem@hadrons.org>
2230
2231 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
2232 help info.
2233
c9f9c556 22342005-01-31 Marco Gerards <metgerards@student.han.nl>
2235
2236 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
2237 Removed prototype.
2238 (grub_rescue_cmd_linux): New prototype.
2239 (grub_rescue_cmd_initrd): Likewise.
2240 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
2241 `bi_rec'.
2242 (grub_linux_release_mem): Release the memory for the initrd.
2243 (grub_load_linux): Renamed from this...
2244 (grub_rescue_cmd_linux): ...To this. Changed all callers.
2245 Changed `entry' not to be static. Loop over memory regions to
2246 find another one when the default fails.
2247 (grub_rescue_cmd_initrd): New function.
2248 (grub_linux_init): Remove function.
2249 (grub_linux_fini): Likewise.
2250 (GRUB_MOD_INIT): Register `initrd'.
2251 (GRUB_MOD_FINI): Unregister `initrd'.
2252 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
2253 Function removed.
2254 (grub_linux_normal_fini): Likewise.
2255 (GRUB_MOD_INIT): Register `initrd'.
2256 (GRUB_MOD_FINI): Unregister `initrd'.
2257
990cf3aa 22582005-01-31 Marco Gerards <metgerards@student.han.nl>
2259
2260 * commands/help.c: New file.
2261 * normal/arg.c (show_help): Renamed to...
2262 (grub_arg_show_help): ... this.
2263 * commands/i386/pc/halt.c: New file.
2264 * commands/i386/pc/reboot.c: Likewise.
2265 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
2266 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
2267 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
2268 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
2269 variables.
2270 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2271 `commands/help.c'.
2272 (pkgdata_MODULES): Add `help.mod'.
2273 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
2274 * grub/i386/pc/init.h (grub_reboot): New prototype.
2275 (grub_halt): Likewise.
2276 * include/grub/normal.h (grub_arg_show_help): New prototype.
2277 (grub_help_init): Likewise.
2278 (grub_help_fini): Likewise.
2279 * util/grub-emu.c (main): Initialize and deinitialize the help
2280 command.
2281
2282 * normal/cmdline.c (grub_cmdline_get): Doc fix.
2283
2284 * normal/command.c (grub_command_init): Fixed the description of
2285 the `set' and `unset' commands.
2286
22872005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 2288
2289 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
2290 function.
2291 * commands/ieee1275/halt.c: New file.
2292 * commands/ieee1275/reboot.c: Likewise.
2293 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
2294 `__attribute__ ((unused))'. Some GCS related fixed.
2295 (grub_suspend_init) [GRUB_UTIL]: Function removed.
2296 (grub_suspend_fini): Likewise.
2297 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
2298 and `halt.mod'.
2299 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
2300 (halt_mod_CFLAGS): New variables.
2301 * include/grub/powerpc/ieee1275/ieee1275.h
2302 (grub_ieee1275_interpret): New prototype.
2303
1ab09cc7 23042005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
2305
2306 * include/grub/misc.h (memmove): New prototype.
2307 (memcpy): Likewise.
2308
8b8cbdb2 23092005-01-22 Hollis Blanchard <hollis@penguinppc.org>
2310
2311 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
2312 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
2313
e3741a27 23142005-01-22 Marco Gerards <metgerards@student.han.nl>
2315
2316 * kern/misc.c (grub_strndup): Function rewritten.
2317
776bd780 23182005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
2319
2320 * normal/menu.c (TERM_WIDTH): Macro redefined.
2321 (TERM_TOP_BORDER_Y): Likewise.
2322 (draw_border): Replaced while-loop by a for-loop. Make the number
2323 of lines consistent with the number of lines displayed in
2324 print_entries. Added a margin below the rectangle.
2325 (print_entry): Make the entry fit in the rectangle.
2326 (print_entries): Display the scroll arrows next to the right
2327 border.
2328
78026bce 23292005-01-21 Marco Gerards <metgerards@student.han.nl>
2330
2331 * fs/minix.c (grub_minix_find_file): Reserve more space for
2332 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
2333 `grub_strncpy' to copy `path' into it.
2334
67bbaf0f 23352005-01-21 Marco Gerards <metgerards@student.han.nl>
2336
2337 Add the loopback device, a device via which files can be accessed
2338 as devices.
2339
2340 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
2341 (pkgdata_MODULES): Add loopback.mod.
2342 (loopback_mod_SOURCES): New variable.
2343 (loopback_mod_CFLAGS): Likewise.
2344 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
2345 `disk/loopback.c'.
2346 (pkgdata_MODULES): Add loopback.mod.
2347 (loopback_mod_SOURCES): New variable.
2348 (loopback_mod_CFLAGS): Likewise.
2349 * disk/loopback.c: new file.
2350 * include/grub/normal.h (grub_loop_init): New prototype.
2351 (grub_loop_fini): New prototype.
2352 * util/grub-emu.c (main): Initialize and de-initialize loopback
2353 support.
2354 * include/grub/disk.h (grub_disk_dev_id): Add
2355 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
2356
6f1c18bd 23572005-01-20 Hollis Blanchard <hollis@penguinppc.org>
2358
2359 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
2360 function.
2361 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
2362 (suspend_mod_SOURCES): New variable.
2363 (suspend_mod_CFLAGS): Likewise.
2364 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
2365 New prototype.
2366 * commands/ieee1275/suspend.c: New file.
2367
b38551da 23682005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
2369
2370 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
2371 ((unused))' to `__attribute__ ((used))'.
2372 (GRUB_MOD_FINI): Likewise.
2373 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
2374 * genmk.rb (PModule): Assign space to common symbols when linking
2375 modules.
2376
777aff39 23772005-01-20 Marco Gerards <metgerards@student.han.nl>
2378
2379 * include/grub/mm.h (grub_mm_init_region): Change the type of the
2380 `unsigned' arguments to `grub_size_t'.
2381 (grub_malloc): Likewise.
2382 (grub_realloc): Likewise.
2383 (grub_memalign): Likewise.
2384 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
2385 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
2386 * util/misc.c (grub_malloc): Likewise.
2387 (grub_realloc): Likewise.
2388 * kern/mm.c (get_header_from_pointer): Change the casts to
2389 `unsigned' into a cast to `grub_size_t'.
2390
2391 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
2392 point to `currnode' when `currnode' is changed.
2393
2394 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
2395 Schottelius <nico-linux@schottelius.org>.
2396
d0ff18e1 23972005-01-09 Hollis Blanchard <hollis@penguinppc.org>
2398
2399 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
2400 (note_path): Remove variable.
2401 (GRUB_IEEE1275_NOTE_NAME): New macro.
2402 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
2403 (grub_ieee1275_note_hdr): New structure.
2404 (grub_ieee1275_note_desc): Likewise.
2405 (grub_ieee1275_note): Likewise.
2406 (load_note): Remove `dir' argument. All callers updated. Remove
2407 `note_img' and `path'. Do not load a file from `note_path'.
2408 Initialize a struct grub_ieee1275_note and write that to `out'.
2409 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
2410
4ca7004c 24112005-01-05 Marco Gerards <metgerards@student.han.nl>
2412
2413 * util/misc.c (grub_util_read_image): Revert last change. It
2414 called `grub_util_read_at', which seeks from the beginning of the
2415 file.
2416
0b412211 24172005-01-04 Hollis Blanchard <hollis@penguinppc.org>
2418
2419 * TODO: Add note about endianness in grub-mkimage.
2420 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
2421 section.
2422 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
2423 (grub_mkimage_SOURCES): New target.
2424 * include/grub/kernel.h (grub_start_addr): Remove variable.
2425 (grub_end_addr): Likewise.
2426 (grub_total_module_size): Likewise.
2427 (grub_kernel_image_size): Likewise.
2428 (GRUB_MODULE_MAGIC): New constant.
2429 (grub_module_info): New structure.
2430 (grub_arch_modules_addr): New prototype.
2431 (grub_get_end_addr): Remove prototype.
2432 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
2433 * include/grub/powerpc/ieee1275/kernel.h: New file.
2434 * include/grub/util/misc.h (grub_util_get_fp_size): New
2435 prototype.
2436 (grub_util_read_at): Likewise.
2437 (grub_util_write_image_at): Likewise.
2438 * kern/main.c (grub_get_end_addr): Remove function.
2439 (grub_load_modules): Call grub_arch_modules_addr instead of using
2440 grub_end_addr. Look for a grub_module_info struct in memory. Use
2441 the grub_module_info fields instead of calling grub_get_end_addr
2442 as loop conditions. Move grub_add_unused_region code here.
2443 (grub_add_unused_region): Remove function.
2444 * kern/i386/pc/init.c: Include grub/cache.h.
2445 (grub_machine_init): Remove call to grub_get_end_addr. Remove
2446 one call to add_mem_region.
2447 (grub_arch_modules_addr): New function.
2448 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
2449 (grub_total_module_size): Likewise.
2450 Include grub/machine/kernel.h.
2451 (grub_arch_modules_addr): New function.
2452 * util/grub-emu.c (grub_end_addr): Remove variable.
2453 (grub_total_module_size): Likewise.
2454 (grub_arch_modules_addr): New function.
2455 * util/misc.c: Include unistd.h.
2456 (grub_util_get_fp_size): New function.
2457 (grub_util_read_at): Likewise.
2458 (grub_util_write_image_at): Likewise.
2459 (grub_util_read_image): Call grub_util_read_at.
2460 (grub_util_write_image): Call grub_util_write_image_at.
2461 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
2462 additional memory in kernel_img for a struct grub_module_info.
2463 Fill in that grub_module_info.
2464 * util/powerpc/ieee1275/grub-mkimage.c: New file.
2465
458786f8 24662005-01-03 Hollis Blanchard <hollis@penguinppc.org>
2467
2468 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
2469 New function.
2470 * include/grub/powerpc/ieee1275/ieee1275.h
2471 (grub_ieee1275_milliseconds): New prototype.
2472 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
2473 Change to 1000.
2474 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
2475 grub_ieee1275_milliseconds.
2476
ac507d1b 24772005-01-03 Hollis Blanchard <hollis@penguinppc.org>
2478
2479 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
2480 variable.
2481 (find_options): New function.
2482 (cmain): Call find_options.
2483 * include/grub/powerpc/ieee1275/ieee1275.h
2484 (grub_ieee1275_realmode): New extern variable.
2485 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
2486 grub_map if grub_ieee1275_realmode is false.
2487
6b8fd1c4 24882004-12-29 Marco Gerards <metgerards@student.han.nl>
2489
2490 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
2491 lines are inserted and make it work like readline. Reported by
2492 Vincent Pelletier <subdino2004@yahoo.fr>.
2493
8514a1e0 24942004-12-28 Marco Gerards <metgerards@student.han.nl>
2495
2496 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
2497
2498 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
2499 `kern/powerpc/cache.S'.
2500
924b6140 25012004-12-27 Marco Gerards <metgerards@student.han.nl>
2502
2503 * genmk.rb: Handle the `Program' class in the main loop. Written
2504 by Johan Rydberg <jrydberg@gnu.org>.
2505 (Program): New class.
2506 (programs): New variable.
2507 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
2508 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
2509 instead of "grub/kernel.h". Include <grub/machine/init.h>.
2510 (help_arch): Function removed.
2511 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
2512 `powerpc/libgcc.h' and `loader.h'.
2513 (pkgdata_PROGRAMS): New variable.
2514 (sbin_UTILITIES): Variable removed.
2515 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
2516 (grubof_SOURCES): Variable re-defined so it only includes the
2517 core functionality.
2518 (grubof_CFLAGS): Remove `-DGRUBOF'.
2519 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
2520 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
2521 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
2522 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
2523 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
2524 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
2525 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
2526 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
2527 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
2528 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
2529 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
2530 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
2531 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
2532 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
2533 (pc_mod_CFLAGS): New variables.
2534 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
2535 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
2536 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
2537 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
2538 Moved from here...
2539 * include/grub/i386/pc/init.h (grub_os_area_addr)
2540 (rub_os_area_size): ... to here.
2541 * include/grub/powerpc/ieee1275/ieee1275.h
2542 (grub_ieee1275_entry_fn): Export symbol.
2543 * include/grub/powerpc/ieee1275/init.h: New file.
2544 * include/grub/powerpc/libgcc.h: Likewise.
2545 * include/grub/cache.h: Likewise.
2546 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
2547 <hollis@penguinppc.org>.
2548 * kern/dl.c: Include <grub/cache.h>.
2549 (grub_dl_flush_cache): New function.
2550 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
2551 for this module.
2552 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
2553 (grub_console_init): Removed prototypes.
2554 (grub_machine_init): Don't initialize the modules anymore.
2555 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
2556 static.
2557 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
2558 Macro undef removed.
2559 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
2560 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
2561 relocation `R_PPC_REL32'. Return an error when the relocation is
2562 unknown.
2563 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
2564 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
2565 * util/misc.c (grub_arch_sync_caches): Likewise.
2566
e4b47e0c 25672004-12-19 Marco Gerards <metgerards@student.han.nl>
2568
2569 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
2570 `symlist.c', add `grubof_symlist.c'.
2571 (symlist.c): Variable removed.
2572 (grubof_HEADERS): Variable added.
2573 (grubof_symlist.c): New target.
2574 (kernel_syms.lst): Use `grubof_HEADERS' instead of
2575 `kernel_img_HEADERS'.
2576 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
2577 * kern/powerpc/dl.c: New file.
2578 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
2579 Function removed.
2580 (grub_arch_dl_relocate_symbols): Likewise.
2581 (grub_register_exported_symbols): Likewise.
2582
4ceb3636 25832004-12-13 Marco Gerards <metgerards@student.han.nl>
2584
2585 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
2586 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
2587 to fail instead. Reported by Vincent Pelletier
2588 <subdino2004@yahoo.fr>.
2589
2590 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
2591 it is not allocated. Reported by Vincent Pelletier
2592 <subdino2004@yahoo.fr>.
2593
2594 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
2595 output so the output looks better.
2596
3f1578fe 25972004-12-04 Marco Gerards <metgerards@student.han.nl>
2598
2599 Modulize the partition map support and add support for the amiga
2600 partition map.
2601
2602 * commands/ls.c: Include <grub/partition.h> instead of
2603 <grub/machine/partition.h>.
2604 * kern/disk.c: Likewise.
2605 * kern/rescue.c: Likewise.
2606 * loader/i386/pc/chainloader.c: Likewise.
2607 * normal/cmdline.c: Likewise.
2608 * kern/powerpc/ieee1275/init.c: Likewise.
2609 (grub_machine_init): Call `grub_pc_partition_map_init',
2610 `grub_amiga_partition_map_init' and
2611 `grub_apple_partition_map_init'.
2612 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
2613 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
2614 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
2615 `partition.h' and `pc_partition.h'.
2616 (grub_setup_SOURCES): Remove
2617 `disk/i386/pc/partition.c'. Add `kern/partition.c',
2618 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
2619 (grub_emu_SOURCES): Likewise.
2620 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
2621 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
2622 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
2623 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
2624 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
2625 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
2626 (grubof_SOURCES): Likewise.
2627 * disk/i386/pc/partition.c: File removed.
2628 * disk/powerpc/ieee1275/partition.c: Likewise.
2629 * include/grub/powerpc/ieee1275/partition.h: Likewise.
2630 * include/grub/i386/pc/partition.h: Likewise.
2631 * kern/partition.c: New file.
2632 * partmap/amiga.c: Likewise.
2633 * partmap/apple.c: Likewise.
2634 * partmap/pc.c: Likewise.
2635 * include/grub/partition.h: Likewise..
2636 * include/grub/pc_partition.h: Likewise.
2637 * util/grub-emu.c: Include <grub/partition.h> instead of
2638 <grub/machine/partition.h>.
2639 (main): Call `grub_pc_partition_map_init',
2640 `grub_amiga_partition_map_init' and
2641 `grub_apple_partition_map_init' and deinitialize afterwards.
2642 * util/i386/pc/biosdisk.c: Include `#include
2643 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
2644 `<grub/machine/partition.h>'.
2645 * util/i386/pc/grub-setup.c: Likewise.
2646 * util/i386/pc/biosdisk.c: Likewise.
2647 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
2648 partition information in case of a PC partition.
2649 * util/i386/pc/grub-setup.c: Include `#include
2650 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
2651 `<grub/machine/partition.h>'.
2652 (setup): Only access the PC specific partition information in case
2653 of a PC partition.
2654
0ef4ced9 26552004-11-17 Hollis Blanchard <hollis@penguinppc.org>
2656
2657 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
2658 (grub_longjmp): Likewise.
2659 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
2660 20.
2661 * normal/powerpc/setjmp.S: New file.
2662 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
2663 `normal/powerpc/setjmp.S'.
2664 (grubof_CFLAGS): Add `-DGRUBOF'.
2665 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
2666 [GRUB_UTIL && !GRUBOF].
2667
19950e29 26682004-11-16 Marco Gerards <metgerards@student.han.nl>
2669
2670 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
2671 property named `name'. Correctly handle the error returned by
2672 `grub_ieee1275_finddevice' if a device can not be opened.
2673
a2fea427 26742004-11-02 Hollis Blanchard <hollis@penguinppc.org>
2675
2676 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
2677 `actual' for negativity.
2678 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
2679 kern/fshelp.c.
2680
41ea0ea3 26812004-11-01 Marco Gerards <metgerards@student.han.nl>
2682
2683 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
2684 (PAGE_OFFSET): New macro.
2685 (CRTC_ADDR_PORT): Likewise.
2686 (CRTC_DATA_PORT): Likewise.
2687 (START_ADDR_HIGH_REGISTER): Likewise.
2688 (START_ADDR_LOW_REGISTER): Likewise.
2689 (GRAPHICS_ADDR_PORT): Likewise.
2690 (GRAPHICS_DATA_PORT): Likewise.
2691 (READ_MAP_REGISTER): Likewise.
2692 (INPUT_STATUS1_REGISTER): Likewise.
2693 (INPUT_STATUS1_VERTR_BIT): Likewise.
2694 (page): New variable.
2695 (wait_vretrace): New function.
2696 (set_read_map): Likewise.
2697 (set_start_address): Likewise.
2698 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
2699 the right page.
2700 (check_vga_mem): Take the page into account.
2701 (write_char): Likewise.
2702 (write_cursor): Likewise.
2703 (scroll_up): Likewise. Copy the page to the page that is not
2704 shown and switch between both pages.
2705 (grub_vga_putchar): Fix off by one error.
2706 (grub_vga_cls): Wait for the vertical retrace. Take the page into
2707 account.
2708
ad0bd20b 27092004-11-01 Marco Gerards <metgerards@student.han.nl>
2710
2711 Add support for iso9660 (including rockridge).
2712
2713 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
2714 (iso9660_mod_SOURCES): New variable.
2715 (iso9660_mod_CFLAGS): Likewise.
2716 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
2717 * include/grub/fs.h (grub_iso9660_init): New prototype.
2718 * util/grub-emu.c (main): Call `grub_iso9660_init'.
2719 * fs/iso9660.c: New file.
2720
2721 * include/grub/misc.h (grub_strncat): New prototype.
2722 * kern/misc.c (grub_strncat): New function.
2723
2724 * fs/hfs.c (grub_hfs_mount): Translate the error
2725 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
2726 * fs/jfs.c (grub_jfs_mount): Likewise.
2727 * fs/ufs.c (grub_ufs_mount): Likewise.
2728
a5477a59 27292004-10-28 Hollis Blanchard <hollis@penguinppc.org>
2730
2731 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
2732 which initialized BAT registers.
2733 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
2734 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
2735 Move from here...
2736 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
2737 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
2738 ... to here.
2739 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
2740 (grub_mapclaim): Likewise.
2741 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
2742 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
2743 hand.
2744
9304c1f8 27452004-10-19 Hollis Blanchard <hollis@penguinppc.org>
2746
2747 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
2748 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
2749 -ffreestanding and -msoft-float.
2750
86f4ae25 27512004-10-15 Hollis Blanchard <hollis@penguinppc.org>
2752
2753 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
2754 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
2755 set in grub_ieee1275_flags.
2756
38912228 27572004-10-14 Hollis Blanchard <hollis@penguinppc.org>
2758
2759 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
2760 prototype.
2761 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
2762 grub_console_init first.
2763 Change the memory range used for grub_ieee1275_claim and
2764 grub_mm_init_region.
2765 Print an error message if the claim fails.
2766 Include <grub/misc.h>.
2767
d1923dc8 27682004-10-13 Hollis Blanchard <hollis@penguinppc.org>
2769
2770 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
2771 Call grub_children_iterate for device nodes of type `scsi',
2772 `ide', or `ata'.
2773 (grub_ofdisk_open): Remove manual device alias resolution.
2774 Fix memory leak when device cannot be opened.
2775 * include/grub/powerpc/ieee1275/ieee1275.h
2776 (grub_children_iterate): New prototype.
2777 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
2778 New function.
2779 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
2780 Return -1 if args.size was -1.
2781
4512e4f3 27822004-10-11 Hollis Blanchard <hollis@penguinppc.org>
2783
2784 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
2785 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
2786 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
2787 Open Firmware's memory for it; claim memory from _start to _end.
2788 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
2789 (_end): New extern.
2790 (_start): Zero BSS from __bss_start to _end.
2791 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
2792 New extern.
2793 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
2794
4d61feb0 27952004-10-11 Hollis Blanchard <hollis@penguinppc.org>
2796
ad0bd20b 2797 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
2798 -1 if args.base was -1.
4d61feb0 2799
026fa2f9 28002004-10-08 Hollis Blanchard <hollis@penguinppc.org>
2801
2802 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
2803 escape sequence instead of a literal ^L. Also call
2804 grub_ofconsole_gotoxy.
2805
9f2220ef 28062004-10-03 Hollis Blanchard <hollis@penguinppc.org>
2807
2808 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
2809 void * arguments to grub_addr_t. All callers updated. Also make
2810 the `result' argument optional.
2811 (grub_ieee1275_release): change void * arguments to grub_addr_t.
2812 All callers updated.
2813
8a572cd7 28142004-09-22 Hollis Blanchard <hollis@penguinppc.org>
2815
2816 * commands/ls.c (grub_ls_list_files): Use the string following the
2817 initial ')', if present, as the filesystem path.
2818 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
2819
2820 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
2821
18aa81f2 28222004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
2823
2824 Make the source code of the menu interface more readable.
2825
2826 * normal/menu.c: Include grub/mm.h.
2827 (TERM_WIDTH): New macro.
2828 (TERM_HEIGHT): Likewise.
2829 (TERM_INFO_HEIGHT): Likewise.
2830 (TERM_MARGIN): Likewise.
2831 (TERM_SCROLL_WIDTH): Likewise.
2832 (TERM_TOP_BORDER_Y): Likewise.
2833 (TERM_LEFT_BORDER_X): Likewise.
2834 (TERM_BORDER_WIDTH): Likewise.
2835 (TERM_MESSAGE_HEIGHT): Likewise.
2836 (TERM_BORDER_HEIGHT): Likewise.
2837 (TERM_NUM_ENTRIES): Likewise.
2838 (TERM_FIRST_ENTRY_Y): Likewise.
2839 (TERM_ENTRY_WIDTH): Likewise.
2840 (TERM_CURSOR_X): Likewise.
2841 (draw_border): Use macros instead of magic numbers.
2842 (print_entry): Likewise.
2843 (print_entries): Likewise.
2844 (run_menu): Likewise. Also, handle the key 'e'.
2845 (run_menu_entry): Ignore empty command lines.
2846 (print_message): Added a new argument EDIT. If EDIT is true,
2847 print a different message.
2848 (init_page): Likewise.
2849 (edit_menu_entry): New function. Not implemented yet.
2850
b47efe30 28512004-09-17 Marco Gerards <metgerards@student.han.nl>
2852
2853 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
2854 can be loaded from normal mode.
2855
2856 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
2857 `multiboot.mod'.
2858 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
2859 (multiboot_mod_CFLAGS): New variables.
2860 * loader/i386/pc/linux_normal.c: New file.
2861 * loader/i386/pc/multiboot_normal.c: Likewise.
2862
2863 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
2864 attribute `unused'.
2865
2866 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
2867 `fdiro' to read the mode information from instead of `diro'.
2868
2869 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
2870 looking up a symlink.
2871
2872 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
2873 macro.
2874 * normal/command.c (grub_command_execute): Don't parse the
2875 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
2876 flags of the command.
2877
2878 * normal/menu.c (grub_menu_run): Fix typo.
2879
da75ac71 28802004-09-14 Hollis Blanchard <hollis@penguinppc.org>
2881
2882 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
2883
2884 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
2885 `y + 1' instead of `y - 1'.
2886
2887 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
2888
062b24c2 28892004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
2890
2891 From Hollis Blanchard <hollis@penguinppc.org>:
2892 * kern/misc.c (memmove): New alias for grub_memmove.
2893 (memcmp): New alias for grub_memcmp.
2894 (memset): New alias for grub_memset.
2895 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
2896 Change "int handle" to "grub_ieee1275_phandle_t handle".
2897 * include/grub/powerpc/ieee1275/ieee1275.h
2898 (grub_ieee1275_get_property): Likewise.
2899
8ddad845 29002004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
2901
2902 Added normal mode command `chainloader' as module chain.mod, which
2903 depends on normal.mod and _chain.mod.
2904
2905 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
2906 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
2907 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
2908 Deleted prototype.
2909 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
2910 but arguments parsing moved to ...
2911 (grub_chainloader_cmd): ... here. New function.
2912 * include/grub/i386/pc/chainloader.h: New file.
2913 * loader/i386/pc/chainloader_normal.c: Likewise.
2914
2c1f4ce3 29152004-09-11 Marco Gerards <metgerards@student.han.nl>
2916
2917 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
2918 (grub_mkimage_LDFLAGS): Likewise.
2919 (grub_emu_SOURCES): Likewise.
2920 (kernel_img_HEADERS): Added fshelp.h.
2921 * fs/ext2.c: Include <grub/fshelp.h>.
2922 (FILETYPE_REG): New macro.
2923 (FILETYPE_INO_REG): Likewise.
2924 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
2925 Changed all users.
2926 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
2927 all users.
2928 (grub_fshelp_node): New struct.
2929 (grub_ext2_data): Added member `diropen'. Changed member `inode'
2930 to a pointer.
2931 (grub_ext2_get_file_block): Removed function.
2932 (grub_ext2_read_block): New function.
2933 (grub_ext2_read_file): Replaced parameter `data' by `node'.
2934 This function was written.
2935 (grub_ext2_mount): Read the root inode. Create a diropen struct.
2936 (grub_ext2_find_file): Removed function.
2937 (grub_ext2_read_symlink): New function.
2938 (grub_ext2_iterate_dir): Likewise.
2939 (grub_ext2_open): Rewritten.
2940 (grub_ext2_dir): Rewritten.
2941 * include/grub/fshelp.h: New file.
2942 * fs/fshelp.c: Likewise.
2943
3c52136a 29442004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
2945
2946 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
2947 (print_message): Add a missing newline.
2948 (run_menu): Added timeout support.
2949 (run_menu_entry): New local function.
2950 (grub_menu_run): Added support for booting.
2951
2952 * kern/loader.c (grub_loader_is_loaded): New function.
2953
2954 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
2955 (grub_get_rtc): Exported.
2956
2957 * include/grub/i386/pc/time.h: Include grub/symbol.h.
2958 (grub_get_rtc): Exported.
2959
2960 * include/grub/normal.h (struct grub_command_list): Remove
2961 constant from the member `command'.
2962
2963 * include/grub/loader.h (grub_loader_is_loaded): Declared.
2964
2965 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
2966
2967 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
2968
aa033560 29692004-08-28 Marco Gerards <metgerards@student.han.nl>
2970
2971 Add support for the JFS filesystem.
2972
2973 * fs/jfs.c: New file.
2974 * include/grub/fs.h (grub_jfs_init): New prototype.
2975 (grub_jfs_fini): New prototype.
2976 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
2977 (grub_emu_SOURCES): Likewise.
2978 (pkgdata_MODULES): Add jfs.mod.
2979 (jfs_mod_SOURCES): New variable.
2980 (jfs_mod_CFLAGS): Likewise.
2981 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
2982 (grubof_SOURCES): Likewise.
2983 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
2984
2985 * fs/fat.c (grub_fat_find_dir): Convert the filename little
2986 endian to the host endian.
2987 (grub_fat_utf16_to_utf8): Move function from there...
2988 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
2989 the endianess of the source string anymore.
2990 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
2991
94bc45af 29922004-08-24 Marco Gerards <metgerards@student.han.nl>
2993
2994 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
2995 (grub_boot_fini) [GRUB_UTIL]: Likewise.
2996 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
2997 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
2998
2999 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
3000 (grub_hfs_iterate_dir): Make the function static. Add prototypes
3001 for `node_found' and `it_dir'.
3002 (grub_hfs_dir): Add prototype for `dir_hook'.
3003
3004 * fs/minix.c (grub_minix_get_file_block): Add prototype for
3005 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
3006 and `indir32' to silence a gcc warning.
3007
3008 * include/grub/fs.h (grub_hfs_init): New prototype.
3009 (grub_hfs_fini): Likewise.
3010
3011
97543f08 30122004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
3013
3014 Each disk device has its own id now. This is useful to make use
3015 of multiple disk devices.
3016
3017 * include/grub/disk.h (grub_disk_dev_id): New enum.
3018 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
3019 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
3020
3021 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
3022 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
3023
3024 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
3025 GRUB_DISK_DEVICE_OFDISK_ID as an id.
3026
3027 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
3028 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
3029
3030 * include/grub/disk.h (struct grub_disk_dev): Added a new member
3031 "id" which is used by the cache manager.
3032
3033 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
3034 of just "GRUB".
3035
64372eb4 30362004-08-18 Marco Gerards <metgerards@student.han.nl>
3037
3038 * fs/hfs.c: New file.
3039 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
3040 (grub_emu_SOURCES): Likewise.
3041 (pkgdata_MODULES): Add hfs.mod.
3042 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
3043 (grubof_SOURCES): Likewise.
3044 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
3045
3046 * include/grub/misc.h (grub_strncasecmp): Add prototype.
3047 * kern/misc.c (grub_strncasecmp): Add function.
3048
cc61b58f 30492004-08-14 Marco Gerards <metgerards@student.han.nl>
3050
3051 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
3052 with parentheses.
3053
3054 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
3055 (grub_ext2_dir): In case the directory entry type is unknown, read
3056 it from the inode.
3057
0ef123f6 30582004-08-02 Peter Bruin <pjbruin@dds.nl>
3059
3060 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
3061 grub_load_linux instead of grub_rescue_cmd_linux as second
3062 argument of grub_rescue_register_command.
3063
3064 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
3065
a447c5df 30662004-07-27 Marco Gerards <metgerards@student.han.nl>
3067
3068 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
3069 function.
3070 * commands/boot.c: Remove the check for `GRUB_UTIL'.
3071 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
3072 `loader/powerpc/ieee1275/linux.c',
3073 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
3074 * include/grub/powerpc/ieee1275/ieee1275.h
3075 (grub_ieee1275_release): New prototype.
3076 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
3077 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
3078 normal, boot, linux and linux_normal.
3079 * loader/powerpc/ieee1275/linux.c: New file.
3080 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3081
5a9e3546 30822004-07-12 Marco Gerards <metgerards@student.han.nl>
3083
3084 * normal/arg.c (grub_arg_parse): Correct error handling after
3085 reallocating the argumentlist (check if `argl' is not null instead
3086 of checking if `args' is not null).
3087 * kern/mm.c (grub_realloc): Return the same pointer when using the
3088 same region, instead of returning the header address.
3089
e15199cb 30902004-07-11 Marco Gerards <metgerards@student.han.nl>
3091
3092 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
3093 one block instead of two when looking for the initial partition.
3094 (grub_partition_probe): Initialize the local variable `p' with 0.
3095 Use base 10 for the grub_strtoul call.
3096 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
3097 need for one local variable.
3098 (grub_strtoul): Don't add the new value to `num', instead of that
3099 just assign it.
3100
020616c2 31012004-07-11 Marco Gerards <metgerards@student.han.nl>
3102
3103 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
3104 (pxeboot_img_SOURCES): New variable.
3105 (pxeboot_img_ASFLAGS): Likewise.
3106 (pxeboot_img_LDFLAGS): Likewise.
3107 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
3108 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
3109 <lode_leroy@hotmail.com>.
3110
6c51eb64 31112004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
3112
3113 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
3114 there was no input.
3115
cfb12aff 31162004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
3117
3118 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
3119 the history buffer logic.
3120
6eabba74 31212004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
3122
3123 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
3124 (FILETYPE_INO_SYMLINK): New macros.
3125 (grub_ext2_find_file): Check if the node is a directory using the
3126 inode stat information instead of using the filetype in the
3127 dirent. Exclude the first character of an absolute symlink.
3128 (grub_ext2_dir): Mask out the filetype part of the mode member of
3129 the inode.
3130
66e19ef8 31312004-05-24 Marco Gerards <metgerards@student.han.nl>
3132
3133 Add support for UFS version 1 and 2. Add support for the minix
3134 filesystem version 1 and 2, both the variants with 14 and 30 long
3135 filenames.
3136
3137 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
3138 fs/minix.c.
3139 (grub_emu_SOURCES): Likewise.
3140 (pkgdata_MODULES): Add ufs.mod and minix.mod.
3141 (ufs_mod_SOURCES): New variable.
3142 (ufs_mod_CFLAGS): Likewise.
3143 (minix_mod_SOURCES): Likewise.
3144 (minix_mod_CFLAGS): Likewise.
3145 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
3146 fs/minix.c.
3147 (grubof_SOURCES): Likewise.
3148 * fs/ufs.c: New file.
3149 * fs/minix.c: New file.
3150 * include/grub/fs.h (grub_ufs_init): New prototype.
3151 (grub_ufs_fini): Likewise.
3152 (grub_minix_init): Likewise.
3153 (grub_minix_fini): Likewise.
3154 * util/grub-emu.c (main): Initialize and deinitialize UFS and
3155 minix fs.
3156
cc2e748a 31572004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
3158
3159 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
3160 commands/ls.c, commands/terminal.c, commands/boot.c,
3161 commands/cmp.c and commands/cat.c.
3162 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
3163
3164 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
3165 "env.h"
3166
4b13b216 31672004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3168
3169 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
3170 and grub_, respectively. Because the conversion is trivial and
3171 mechanical, I omit the details here. Please refer to the CVS
3172 if you need more information.
3173
6a142551 31742004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
3175
3176 * include/pupa: Renamed to ...
3177 * include/grub: ... this.
3178 * util/i386/pc/pupa-mkimage.c: Renamed to ...
3179 * util/i386/pc/grub-mkimage.c: ... this.
3180 * util/i386/pc/pupa-setup.c: Renamed to ...
3181 * util/i386/pc/grub-setup.c: ... this.
3182 * util/pupa-emu.c: Renamed to ...
3183 * util/grub-emu.c: ... this.
3184
e56cdf21 31852004-03-29 Marco Gerards <metgerards@student.han.nl>
3186
3187 Add support for the newworld apple macintosh (PPC). This has been
3188 tested on the powerbook 2000 only. It only adds support for
3189 generic ieee1275 functions, console and disk support. This should
3190 be easy to port to other architectures with support for Open
3191 Firmware.
3192
3193 * configure.ac: Accept the powerpc as host_cpu. In the case of
3194 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
3195 specific tests are only executed while building for the i386.
3196 Inverse test for crosscompile.
3197 * genmk.rb (Utility): Allow assembler files.
3198 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
3199 * conf/powerpc-ieee1275.rmk: New file.
3200 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
3201 * disk/powerpc/ieee1275/partition.c: Likewise.
3202 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
3203 * include/pupa/powerpc/ieee1275/console.h: Likewise.
3204 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
3205 * include/pupa/powerpc/ieee1275/time.h: Likewise.
3206 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
3207 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
3208 * include/pupa/powerpc/ieee1275/loader.h
3209 * include/pupa/powerpc/setjmp.h: Likewise.
3210 * include/pupa/powerpc/types.h: Likewise.
3211 * kern/powerpc/ieee1275/init.c: Likewise.
3212 * kern/powerpc/ieee1275/openfw.c: Likewise.
3213 * term/powerpc/ieee1275/ofconsole.c: Likewise.
3214
3215 These files were written by Johan Rydberg
3216 (jrydberg@night.trouble.net) and I only modified them slightly.
3217
3218 * boot/powerpc/ieee1275/cmain.c: New file.
3219 * boot/powerpc/ieee1275/crt0.S: Likewise.
3220 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
3221 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
3222
8c8cc205 32232004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
3224
3225 * Makefile.in: Update copyright.
3226 * genmodsrc.sh: Likewise.
3227 * gensymlist.sh: Likewise.
3228 * term/i386/pc/vga.c: Indent correctly.
3229
3230 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
3231 bugreporting address.
3232 * util/i386/pc/pupa-setup.c (usage): Likewise,
3233 (main): Call pupa_ext2_init and pupa_ext2_fini.
3234
3235 * fs/fat.c (log2): Renamed to ...
3236 (fat_log2): ... this.
3237 All callers changed.
3238 * kern/misc.c (memcpy): Alias to pupa_memmove.
3239 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
3240 lvalue cast.
3241 * util/console.c (pupa_ncurses_fini): Return 0.
3242
3243 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
3244 Move fail label here.
3245 [__GNU__]: Don't warn when using stat.
3246 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
3247 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
3248 long int. Use strtol instead of strtoul.
3249
db1771cf 32502004-03-14 Marco Gerards <metgerards@student.han.nl>
3251
3252 * commands/boot.c: New file.
3253 * commands/cat.c: Likewise.
3254 * commands/cmp.c: Likewise.
3255 * commands/ls.c: Likewise.
3256 * commands/terminal.c: Likewise.
3257 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
3258 (pupa_register_command): Changed interface to match the new
3259 argument parser.
3260 (pupa_command_execute): Changed (almost rewritten) so it uses
3261 pupa_split_command. Added support for setting variables using the
3262 syntax `foo=bar'.
3263 (rescue_command): Changed to work with the new argument parser.
3264 (terminal_command): Moved from here to commands/terminal.c.
3265 (set_command): New function.
3266 (unset_command): New function.
3267 (insmod_command): New function.
3268 (rmmod_command): New function.
3269 (lsmod_command): New function.
3270 (pupa_command_init): Don't initialize the command terminal
3271 anymore. Initialize the commands set, unset, insmod, rmmod and
3272 lsmod.
3273 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
3274 (kernel_img_HEADERS): Add arg.h and env.h.
3275 (pupa_mkimage_LDFLAGS): Add kern/env.c.
3276 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
3277 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
3278 normal/arg.c.
3279 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
3280 terminal.mod.
3281 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
3282 (boot_mod_SOURCES): New variable.
3283 (terminal_mod_SOURCES): Likewise.
3284 (ls_mod_SOURCES): Likewise.
3285 (cmp_mod_SOURCES): Likewise.
3286 (cat_mod_SOURCES): Likewise.
3287
3288 * normal/arg.c: New file.
3289 * kern/env.c: Likewise.
3290 * include/pupa/arg.h: Likewise.
3291 * include/pupa/env.h: Likewise.
3292 * font/manager.c (font_command): Changed to match argument parsing
3293 interface changes.
3294 (PUPA_MOD_INIT): Likewise.
3295 * hello/hello.c (pupa_cmd_hello): Likewise.
3296 (PUPA_MOD_INIT): Likewise.
3297 * include/pupa/disk.h: Include <pupa/device.h>.
3298 (pupa_print_partinfo): New prototype.
3299 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
3300 (pupa_dl_get_prefix): Likewise.
3301 * include/pupa/misc.h: Include <pupa/err.h>.
3302 (pupa_isgraph): New prototype.
3303 (pupa_isdigit): Likewise.
3304 (pupa_split_cmdline): Likewise.
3305 * include/pupa/normal.h: Include <pupa/arg.h>.
3306 (pupa_command): Changed the prototype of the member `func' to
3307 match the argument parsing interface. Added member `options'.
3308 (pupa_register_command): Updated to match function.
3309 (pupa_arg_parse): New prototype.
3310 (pupa_hello_init) [PUPA_UTIL]: New prototype.
3311 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
3312 (pupa_ls_init) [PUPA_UTIL]: Likewise.
3313 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
3314 (pupa_cat_init) [PUPA_UTIL]: Likewise.
3315 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
3316 (pupa_boot_init) [PUPA_UTIL]: Likewise.
3317 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
3318 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
3319 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
3320 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
3321 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
3322 * kern/disk.c: Include <pupa/file.h>.
3323 (pupa_print_partinfo): New function.
3324 * kern/dl.c: Include <pupa/env.h>.
3325 (pupa_dl_dir): Variable removed.
3326 (pupa_dl_load): Use the environment variable `prefix' instead of
3327 the variable pupa_dl_dir.
3328 (pupa_dl_set_prefix): Function removed.
3329 (pupa_dl_get_prefix): Likewise.
3330 * kern/i386/pc/init.c: Include <pupa/env.h>.
3331 (pupa_machine_init): Use the environment variable `prefix' instead of
3332 using pupa_dl_set_prefix to set the prefix.
3333 * kern/main.c: Include <pupa/env.h>.
3334 (pupa_set_root_dev): Use the environment variable `prefix' instead of
3335 using pupa_dl_get_prefix to get the prefix.
3336 * kern/misc.c: Include <pupa/env.h>.
3337 (pupa_isdigit): New function.
3338 (pupa_isgraph): Likewise.
3339 (pupa_ftoa): Likewise.
3340 (pupa_vsprintf): Added support for printing values of the type
3341 `double'. Make it possible to format variable output when using
3342 formatting like `%1.2%f'.
3343 (pupa_split_cmdline): New function.
3344 * kern/rescue.c: Include <pupa/env.h>.
3345 (next_word): Removed function.
3346 (pupa_rescue_cmd_prefix): Likewise.
3347 (pupa_rescue_cmd_set): New function.
3348 (pupa_rescue_cmd_unset): New function.
3349 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
3350 split the command line instead of splitting it here. Added
3351 support for setting variables using the syntax `foo=bar'. Don't
3352 initialize the prefix command anymore. Initialized the set and
3353 unset commands.
3354 * normal/cmdline.c: Include <pupa/env.h>.
3355 (pupa_tab_complete): Added prototypes for print_simple_completion,
3356 print_partition_completion, add_completion, iterate_commands,
3357 iterate_dev, iterate_part and iterate_dir. Moved code to print
3358 partition information from here to kern/disk.c.
3359 (pupa_cmdline_run): Don't check if the funtion exists anymore.
3360 * normal/main.c: Include <pupa/env.h>.
3361 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
3362 instead of using pupa_dl_get_prefix to get the prefix.
3363 * term/i386/pc/vga.c: Include <pupa/arg.h>.
3364 (check_vga_mem): Cast pointers to `void *' to silence a gcc
3365 warning.
3366 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
3367 (pupa_vga_setcolor): Declare unused variables with `__attribute__
3368 ((unused))' to silence a gcc warning.
3369 (pupa_vga_setcolor): Likewise.
3370 (debug_command): Changed to match argument parsing
3371 interface changes.
3372 * util/pupa-emu.c: Include <pupa/env.h>.
3373 (options): Added 0's for unused fields to silence a gcc warning.
3374 (argp): Likewise.
3375 (main): Use the environment variable `prefix' instead of using
3376 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
3377 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
3378 and terminal.
3379
3380 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
3381 * util/misc.c: Include <malloc.h>.
3382 (pupa_malloc): Rewritten so errors are correctly reported.
3383 (pupa_realloc): Likewise.
3384 (pupa_memalign): Likewise.
3385 (pupa_mm_init_region): Declare unused variables with
3386 `__attribute__ ((unused))' to silence a gcc warning.
3387 * normal/i386/setjmp.S: Remove tab at the end of the file to
3388 silence a gcc warning.
3389 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
3390 variables with `__attribute__ ((unused))' to silence a gcc
3391 warning.
3392 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
3393 local variable i unsigned to silence a gcc warning.
3394
3395 * kern/term.c: Include <pupa/misc.h>.
3396 (pupa_more_lines): New variable.
3397 (pupa_more): Likewise.
3398 (pupa_putcode): When the pager is active pause at the end of every
3399 screen.
3400 (pupa_set_more): New function.
3401 * include/pupa/term.h (pupa_set_more): New prototype.
3402
3403
3b1139cb 34042004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
3405
3406 Now this project is GRUB 2 rather than PUPA. The location of
3407 the CVS repository was moved to GRUB's.
3408
3409 * configure.ac: Use bug-grub as the reporting address.
3410 Use GRUB instead of PUPA.
3411 Change the version number to 1.90.
3412
8367695c 34132004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
3414
3415 * genkernsyms.sh: Updated copyright information.
3416 * genmk.rb: Likewise.
3417 * genmodsrc.sh: Likewise.
3418 * gensymlist.sh: Likewise.
3419 * boot/i386/pc/boot.S: Likewise.
3420 * boot/i386/pc/diskboot.S: Likewise.
3421 * disk/i386/pc/biosdisk.c: Likewise.
3422 * disk/i386/pc/partition.c: Likewise.
3423 * font/manager.c: Likewise.
3424 * fs/ext2.c: Likewise.
3425 * fs/fat.c: Likewise.
3426 * include/pupa/boot.h: Likewise.
3427 * include/pupa/device.h: Likewise.
3428 * include/pupa/disk.h: Likewise.
3429 * include/pupa/dl.h: Likewise.
3430 * include/pupa/elf.h: Likewise.
3431 * include/pupa/err.h: Likewise.
3432 * include/pupa/file.h: Likewise.
3433 * include/pupa/font.h: Likewise.
3434 * include/pupa/fs.h: Likewise.
3435 * include/pupa/kernel.h: Likewise.
3436 * include/pupa/loader.h: Likewise.
3437 * include/pupa/misc.h: Likewise.
3438 * include/pupa/mm.h: Likewise.
3439 * include/pupa/net.h: Likewise.
3440 * include/pupa/normal.h: Likewise.
3441 * include/pupa/rescue.h: Likewise.
3442 * include/pupa/setjmp.h: Likewise.
3443 * include/pupa/symbol.h: Likewise.
3444 * include/pupa/term.h: Likewise.
3445 * include/pupa/types.h: Likewise.
3446 * include/pupa/i386/setjmp.h: Likewise.
3447 * include/pupa/i386/types.h: Likewise.
3448 * include/pupa/i386/pc/biosdisk.h: Likewise.
3449 * include/pupa/i386/pc/boot.h: Likewise.
3450 * include/pupa/i386/pc/console.h: Likewise.
3451 * include/pupa/i386/pc/init.h: Likewise.
3452 * include/pupa/i386/pc/kernel.h: Likewise.
3453 * include/pupa/i386/pc/linux.h: Likewise.
3454 * include/pupa/i386/pc/loader.h: Likewise.
3455 * include/pupa/i386/pc/memory.h: Likewise.
3456 * include/pupa/i386/pc/multiboot.h: Likewise.
3457 * include/pupa/i386/pc/partition.h: Likewise.
3458 * include/pupa/i386/pc/time.h: Likewise.
3459 * include/pupa/i386/pc/vga.h: Likewise.
3460 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
3461 * include/pupa/util/getroot.h: Likewise.
3462 * include/pupa/util/misc.h: Likewise.
3463 * include/pupa/util/resolve.h: Likewise.
3464 * kern/device.c: Likewise.
3465 * kern/disk.c: Likewise.
3466 * kern/dl.c: Likewise.
3467 * kern/err.c: Likewise.
3468 * kern/file.c: Likewise.
3469 * kern/fs.c: Likewise.
3470 * kern/loader.c: Likewise.
3471 * kern/main.c: Likewise.
3472 * kern/misc.c: Likewise.
3473 * kern/mm.c: Likewise.
3474 * kern/rescue.c: Likewise.
3475 * kern/term.c: Likewise.
3476 * kern/i386/dl.c: Likewise.
3477 * kern/i386/pc/init.c: Likewise.
3478 * kern/i386/pc/lzo1x.S: Likewise.
3479 * kern/i386/pc/startup.S: Likewise.
3480 * loader/i386/pc/chainloader.c: Likewise.
3481 * loader/i386/pc/linux.c: Likewise.
3482 * loader/i386/pc/multiboot.c: Likewise.
3483 * normal/cmdline.c: Likewise.
3484 * normal/command.c: Likewise.
3485 * normal/main.c: Likewise.
3486 * normal/menu.c: Likewise.
3487 * normal/i386/setjmp.S: Likewise.
3488 * term/i386/pc/console.c: Likewise.
3489 * term/i386/pc/vga.c: Likewise.
3490 * util/console.c: Likewise.
3491 * util/genmoddep.c: Likewise.
3492 * util/misc.c: Likewise.
3493 * util/pupa-emu.c: Likewise.
3494 * util/resolve.c: Likewise.
3495 * util/unifont2pff.rb: Likewise.
3496 * util/i386/pc/biosdisk.c: Likewise.
3497 * util/i386/pc/getroot.c: Likewise.
3498 * util/i386/pc/pupa-mkimage.c: Likewise.
3499 * util/i386/pc/pupa-setup.c: Likewise.
3500
e6eced71 35012004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
3502
3503 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
3504 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
3505 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
3506 reading and reset it after reading.
3507 (pupa_ext2_close): Return PUPA_ERR_NONE.
3508
3509 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
3510 Correct value.
3511 (struct linux_kernel_header): Add kernel_version and
3512 initrd_addr_max.
3513 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
3514 pupa_file_read succeeds.
3515 (pupa_rescue_cmd_initrd): Implement.
3516
5aded270 35172003-12-03 Marco Gerards <metgerards@student.han.nl>
3518
3519 * fs/ext2.c (pupa_ext2_label): New function.
3520 (pupa_ext2_fs): Added label.
3521 * fs/fat.c (pupa_fat_label): New function.
3522 (pupa_fat_fs): Added label.
3523 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
3524
3525 * kern/misc.c (pupa_strndup): New function.
3526 * include/pupa/misc.h (pupa_strndup): New prototype.
3527
3528 * include/pupa/normal.h: Include <pupa/err.h>.
3529 (pupa_set_history): New prototype.
3530 (pupa_iterate_commands): New prototype.
3531 * normal/cmdline.c: Include <pupa/machine/partition.h>,
3532 <pupa/disk.h>, <pupa/file.h>.
3533 (hist_size): New variable.
3534 (hist_lines): Likewise.
3535 (hist_end): Likewise.
3536 (hist_used): Likewise.
3537 (pupa_set_history): New function.
3538 (pupa_history_get): Likewise.
3539 (pupa_history_add): Likewise.
3540 (pupa_history_replace): Likewise.
3541 (pupa_tab_complete): Likewise.
3542 (pupa_cmdline_run): Added tab completion and history buffer. Tab
3543 completion shows partitionnames while completing partitions, this
3544 feature was suggested by Jeff Bailey.
3545 * normal/command.c (pupa_iterate_commands): New function.
3546 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
3547 (pupa_normal_init): Initialize history buffer.
3548 (PUPA_MOD_INIT): Likewise.
3549 (pupa_normal_fini): Free the history buffer.
3550 (PUPA_MOD_FINI): Likewise.
3551
3552 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
3553 key.
3554
3555 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
3556 * configure.ac [i386]: Check for regparam bug.
3557 (NESTED_FUNC_ATTR) [! i386]: Defined.
3558
1f7315a3 35592003-11-17 Marco Gerards <metgerards@student.han.nl>
3560
3561 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
3562 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
3563 (pupa_emu_SOURCES): New variable.
3564 (pupa_emu_LDFLAGS): Likewise.
3565 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
3566 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
3567 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
3568 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
3569 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
3570 (pupa_jmp_buf): New typedef.
3571 (pupa_setjmp) [PUPA_UTIL]: New macro.
3572 (pupa_longjmp) [PUPA_UTIL]: Likewise.
3573 * include/pupa/term.h (struct pupa_term): New member `refresh'.
3574 (pupa_refresh): New prototype.
3575 * include/pupa/util/getroot.h: New file.
3576 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
3577 it.
3578 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
3579 (pupa_rescue_cmd_cat): Likewise.
3580 (pupa_rescue_cmd_ls): Likewise.
3581 (pupa_rescue_cmd_testload): Likewise.
3582 (pupa_rescue_cmd_lsmod): Likewise.
3583 * normal/cmdline.c (pupa_cmdline_get): Likewise.
3584 * normal/menu.c (run_menu): Likewise.
3585 * kern/term.c (pupa_cls): Likewise.
3586 (pupa_refresh): New function.
3587 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
3588 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
3589 * util/console.c: New file.
3590
3591 * util/i386/pc/getroot.c: New file.
3592 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
3593 (pupa_putchar): New function.
3594 (pupa_refresh): Likewise.
3595 (xgetcwd): Function moved to ...
3596 (strip_extra_slashes): Likewise.
3597 (get_prefix): Likewise.
3598 * util/i386/pc/getroot.c: ... here.
3599 (find_root_device): Function moved and renamed to...
3600 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
3601 Changed all callers.
3602 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
3603 and renamed to...
3604 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
3605 Changed all callers.
3606 * util/misc.c (pupa_memalign): New function.
3607 (pupa_mm_init_region): Likewise.
3608 (pupa_register_exported_symbols): Likewise.
3609 (pupa_putchar): Function removed.
3610 * util/pupa-emu.c: New file.
3611
9a5c1ade 36122003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
3613
3614 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
3615 (_multiboot_mod_SOURCES): New variable.
3616 (_multiboot_mod_CFLAGS): Likewise.
3617 * loader/i386/pc/multiboot.c: New file.
3618 * include/pupa/i386/pc/multiboot.h: Likewise.
3619 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
3620 (pupa_multiboot_real_boot): New function.
3621 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
3622 (pupa_multiboot_real_boot): New prototype.
3623 (pupa_rescue_cmd_multiboot): Likewise
3624 (pupa_rescue_cmd_module): Likewise.
3625
3626 * kern/loader.c (pupa_loader_set): Continue when
3627 pupa_loader_unload_func() fails.
3628 (pupa_loader_unset): New function.
3629 * include/pupa/loader.h (pupa_loader_unset): New prototype.
3630
3631 * kern/misc.c (pupa_stpcpy): New function.
3632 * include/pupa/misc.h (pupa_stpcpy): New prototype.
3633
8e72a9c0 36342003-11-12 Marco Gerards <metgerards@student.han.nl>
3635
3636 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
3637 for available extensions.
3638
3639 * include/pupa/i386/pc/time.h: New file.
3640 * kern/disk.c: Include <pupa/machine/time.h>.
3641 (PUPA_CACHE_TIMEOUT): New macro.
3642 (pupa_last_time): New variable.
3643 (pupa_disk_open): Flush the cache when there was a timeout.
3644 (pupa_disk_close): Reset the timer.
3645 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
3646 pupa_currticks.
3647 * util/misc.c: Include <sys/times.h>
3648 (pupa_get_rtc): New function.
3649
c4adbd32 36502003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
3651
3652 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
3653 as blocks.
3654 (pupa_ext2_get_file_block): Use blocks member.
3655
3656 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
3657 first block. Return -1 instead of pupa_errno on error.
3658
bfd30f06 36592003-10-27 Marco Gerards <metgerards@student.han.nl>
3660
3661 * README: In the pupa-mkimage example use _chain instead of chain
3662 and ext2 instead of fat.
3663 * TODO: Replace ext2fs with jfs as an example. Add an item for
3664 adding journal playback for ext2fs.
3665 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
3666 (pkgdata_MODULES): Added ext2.mod.
3667 (ext2_mod_SOURCES): New variable.
3668 (ext2_mod_CFLAGS): Likewise.
3669 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
3670 * include/pupa/misc.h (pupa_strncpy): New prototype.
3671 (pupa_strcat): Likewise.
3672 (pupa_strncmp): Likewise.
3673 * kern/misc.c (pupa_strcat): Enable function.
3674 (pupa_strncpy): New function.
3675 (pupa_strncmp): Likewise.
3676 * fs/ext2.c: New file.
3677
3678 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
3679 when the read failed before retrying.
3680 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
3681 (_FILE_OFFSET_BITS): Likewise.
3682 * configure.ac: Added AC_SYS_LARGEFILE.
3683
98d15063 36842003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
3685
3686 * genmk.rb (PModule#rule): Make sure to get only symbol names
3687 from the output of nm.
3688 Reported by Robert Millan <zeratul2@wanadoo.es>.
3689
18d9c7cd 36902003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
3691
3692 I forgot to check in these changes for a long time. This adds
3693 incomplete support for VGA console, and this is still very
3694 buggy. Also, a lot of consideration is required for I18N,
3695 UNICODE, and VGA font issues. Therefore, assume that this is
3696 such that "better than nothing".
3697
3698 * font/manager.c: New file.
3699 * include/pupa/font.h: Likewise.
3700 * include/pupa/i386/pc/vga.h: Likewise.
3701 * term/i386/pc/vga.c: Likewise.
3702 * util/unifont2pff.rb: Likewise.
3703
3704 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
3705 (pkgdata_MODULES): Added vga.mod and font.mod.
3706 (vga_mod_SOURCES): New variables.
3707 (vga_mod_CFLAGS): Likewise.
3708 (font_mod_SOURCES): Likewise.
3709 (font_mod_CFLAGS): Likewise.
3710
3711 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
3712
3713 * include/pupa/term.h: Include pupa/err.h.
3714 (struct pupa_term): Added init and fini.
3715 Changed the argument of putchar to pupa_uint32_t.
3716
3717 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
3718 (pupa_console_real_putchar): New prototype.
3719 (pupa_console_putchar): Removed.
3720 (pupa_console_checkkey): Exported.
3721 (pupa_console_getkey): Likewise.
3722
3723 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
3724 characters.
3725
3726 * kern/term.c (pupa_term_set_current): Rewritten.
3727 (pupa_putchar): Likewise.
3728 (pupa_putcode): New function.
3729
3730 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
3731 (pupa_console_real_putchar): ... this.
3732 (pupa_vga_set_mode): New function.
3733 (pupa_vga_get_font): Likewise.
3734
3735 * normal/command.c: Include pupa/term.h.
3736 (terminal_command): New function.
3737 (pupa_command_init): Register the command "terminal".
3738
3739 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
3740 (DISP_UP): Likewise.
3741 (DISP_RIGHT): Likewise.
3742 (DISP_DOWN): Likewise.
3743 (DISP_HLINE): Likewise.
3744 (DISP_VLINE): Likewise.
3745 (DISP_UL): Likewise.
3746 (DISP_UR): Likewise.
3747 (DISP_LL): Likewise.
3748 (DISP_LR): Likewise.
3749
3750 * term/i386/pc/console.c (pupa_console_putchar): New function.
3751
977329f5 37522003-02-08 NIIBE Yutaka <gniibe@m17n.org>
3753
3754 * util/resolve.c (pupa_util_resolve_dependencies): BUG
3755 FIX. Reverse the path_list.
3756
3757 * include/pupa/normal.h: Export pupa_register_command and
3758 pupa_unregister_command.
3759
3760 * hello/hello.c (pupa_cmd_hello): New module.
3761 * conf/i386-pc.rmk: Added hello.mod.
3762
1f5ab428 37632003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
3764
3765 * kern/i386/pc/lzo1x.S: New file.
3766
3767 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
3768 (compress_kernel): New variable.
3769 (generate_image): Heavily modified to support compressing a
3770 large part of the core image.
3771
3772 * util/misc.c (pupa_util_read_image): Fix a file descriptor
3773 leak.
3774 (pupa_util_load_image): New function.
3775
3776 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
3777 (pupa_compressed_size): New variable.
3778 (codestart): Enable Gate A20 here.
3779 Decompress the compressed part of the core image.
3780 Rearrange the code to put functions and variables which are
3781 required for initialization in the non-compressed part.
3782 Include lzo1x.S.
3783
3784 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
3785 here.
3786
3787 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
3788
3789 * include/pupa/i386/pc/kernel.h
3790 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
3791 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
3792 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
3793 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
3794 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
3795
3796 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
3797
3798 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
3799 (Utility#rule): Likewise.
3800
3801 * configure.ac: Check if LZO is available.
3802
ce5bf700 38032003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
3804
3805 * include/pupa/normal.h: New file.
3806 * include/pupa/setjmp.h: Likewise.
3807 * include/pupa/i386/setjmp.h: Likewise.
3808 * normal/cmdline.c: Likewise.
3809 * normal/command.c: Likewise.
3810 * normal/main.c: Likewise.
3811 * normal/menu.c: Likewise.
3812 * normal/i386/setjmp.S: Likewise.
3813
3814 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
3815 (pupa_rescue_cmd_initrd): Likewise.
3816
3817 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
3818 Likewise.
3819
3820 * kern/i386/pc/startup.S (translation_table): New variable.
3821 (translate_keycode): New function.
3822 (pupa_console_getkey): Call translate_keycode.
3823
3824 * kern/rescue.c (attempt_normal_mode): New function.
3825 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
3826 it failed, print a message.
3827
3828 * kern/mm.c (pupa_real_malloc): Print more information when a
3829 free magic is broken.
3830 (pupa_free): If the first free header is not free actually, set
3831 it to P.
3832
3833 * kern/main.c (pupa_load_normal_mode): Just load the module
3834 "normal".
3835 (pupa_main): Don't print the message
3836 "Entering into rescue mode..." here.
3837
3838 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
3839 Declared.
3840 (pupa_rescue_cmd_initrd): Likewise.
3841 (pupa_rescue_cmd_initrd): Likewise.
3842
3843 * include/pupa/symbol.h (FUNCTION): Specify the type.
3844 (VARIABLE): Likewise.
3845
3846 * include/pupa/err.h (pupa_err_t): Added
3847 PUPA_ERR_UNKNOWN_COMMAND.
3848
3849 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
3850 (pupa_dl_get_prefix): Likewise.
3851
3852 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
3853 Added _chain.mod and _linux.mod instead of chain.mod and
3854 linux.mod.
3855 (chain_mod_SOURCES): Renamed to ...
3856 (_chain_mod_SOURCES): ... this.
3857 (chain_mod_CFLAGS): Renamed to ...
3858 (_chain_mod_CFLAGS): ... this.
3859 (linux_mod_SOURCES): Renamed to ...
3860 (_linux_mod_SOURCES): ... this.
3861 (linux_mod_CFLAGS): Renamed to ...
3862 (_linux_mod_CFLAGS): ... this.
3863 (normal_mod_SOURCES): New variable.
3864 (normal_mod_CFLAGS): Likewise.
3865 (normal_mod_ASFLAGS): Likewise.
3866
38672003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
3868
3869 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
3870 possible.
3871
3872 * kern/dl.c (pupa_dl_ref): Refer dependending modules
3873 recursively.
3874 (pupa_dl_unref): Unrefer depending modules recursively.
3875 Don't call pupa_dl_unload implicitly, because PUPA can crash if
3876 a module is unloaded before one depending on that module is
3877 unloaded.
3878 (pupa_dl_unload): Unload depending modules explicitly,
3879 if possible.
3880
c04da074 38812003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
3882
3883 * include/pupa/i386/pc/linux.h: New file.
3884 * loader/i386/pc/linux.c: Likewise.
3885
3886 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
3887 Removed.
3888 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
3889 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
3890 of PUPA_CHAINLOADER_BOOT_SECTOR.
3891
3892 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
3893 (pupa_linux_prot_size): New variable.
3894 (pupa_linux_tmp_addr): Likewise.
3895 (pupa_linux_real_addr): Likewise.
3896 (pupa_linux_boot_zimage): New function.
3897 (pupa_linux_boot_bzimage): Likewise.
3898
3899 * kern/i386/pc/init.c (struct mem_region): New structure.
3900 (MAX_REGIONS): New macro.
3901 (mem_regions): New variable.
3902 (num_regions): Likewise.
3903 (pupa_os_area_addr): Likewise.
3904 (pupa_os_area_size): Likewise.
3905 (pupa_lower_mem): Likewise.
3906 (pupa_upper_mem): Likewise.
3907 (add_mem_region): New function.
3908 (compact_mem_regions): Likewise.
3909 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
3910 the size of the conventional memory and that of so-called upper
3911 memory (before the first memory hole).
3912 Instead of adding each found region to free memory, use
3913 add_mem_region and add them after removing overlaps.
3914 Also, add only 1/4 of the upper memory to free memory. The rest
3915 is used for loading OS images. Maybe this is ad hoc, but this
3916 makes it much easier to relocate OS images when booting.
3917
3918 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
3919 (pupa_enter_rescue_mode): Don't register initrd and module.
3920
3921 * kern/mm.c: Include pupa/dl.h.
3922
3923 * kern/main.c: Include pupa/file.h and pupa/device.h.
3924
3925 * kern/loader.c (pupa_loader_load_module_func): Removed.
3926 (pupa_loader_load_module): Likewise.
3927
3928 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
3929 ``.o''.
3930
3931 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
3932 (pupa_linux_tmp_addr): Likewise.
3933 (pupa_linux_real_addr): Likewise.
3934 (pupa_linux_boot_zimage): Likewise.
3935 (pupa_linux_boot_bzimage): Likewise.
3936
3937 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
3938 (pupa_upper_mem): Likewise.
3939 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
3940 module is too dangerous.
3941
3942 * include/pupa/loader.h (pupa_os_area_addr): Declared.
3943 (pupa_os_area_size): Likewise.
3944 (pupa_loader_set): Remove the first argument. Loader doesn't
3945 manage modules or initrd any longer.
3946 (pupa_loader_load_module): Removed.
3947
3948 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
3949 (linux_mod_SOURCES): New variable.
3950 (linux_mod_CFLAGS): Likewise.
3951
a13f9237 39522003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
3953
3954 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
3955 the length of a blocklist correctly.
3956
3957 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
3958 Use ioctl only if the OS file is a block device.
3959 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
3960 not very useful for normal files.
3961
3962 * kern/main.c (pupa_set_root_dev): New function.
3963 (pupa_load_normal_mode): Likewise.
3964 (pupa_main): Call those above.
3965
3966 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
3967 pupa_uint16_t.
3968
3969 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
3970
a5ffe966 39712003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3972
3973 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
3974 (setup): Configure the installed partition information and the
3975 dl prefix.
3976
3977 * loader/i386/pc/chainloader.c (my_mod): New variable.
3978 (pupa_chainloader_unload): New function.
3979 (pupa_rescue_cmd_chainloader): Refer itself.
3980 (PUPA_MOD_INIT): Save its own module in MY_MOD.
3981
3982 * kern/i386/pc/startup.S (install_partition): Removed.
3983 (version_string): Likewise.
3984 (config_file): Likewise.
3985 (pupa_install_dos_part): New variable.
3986 (pupa_install_bsd_part): Likewise.
3987 (pupa_prefix): Likewise.
3988 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
3989
3990 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
3991 and pupa/misc.h.
3992 (make_install_device): New function.
3993 (pupa_machine_init): Set the dl prefix.
3994
3995 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
3996 (buf): Renamed to ...
3997 (linebuf): ... this.
3998 (pupa_rescue_cmd_prefix): New function.
3999 (pupa_rescue_cmd_insmod): Likewise.
4000 (pupa_rescue_cmd_rmmod): Likewise.
4001 (pupa_rescue_cmd_lsmod): Likewise.
4002 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
4003 rmmod and lsmod.
4004
4005 * kern/mm.c (pupa_memalign): If failed even after invalidating
4006 disk caches, unload unneeded modules and retry.
4007
4008 * kern/misc.c (pupa_memmove): New function.
4009 (pupa_memcpy): Removed.
4010 (pupa_strcpy): New function.
4011 (pupa_itoa): Made static.
4012
4013 * kern/dl.c (pupa_dl_iterate): New function.
4014 (pupa_dl_ref): Likewise.
4015 (pupa_dl_unref): Likewise.
4016 (pupa_dl_unload): Return if succeeded or not.
4017 (pupa_dl_unload_unneeded): New function.
4018 (pupa_dl_unload_all): Likewise.
4019 (pupa_dl_init): Renamed to ...
4020 (pupa_dl_set_prefix): ... this.
4021 (pupa_dl_get_prefix): New function.
4022
4023 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
4024 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
4025 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
4026 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
4027 (pupa_install_dos_part): Declared.
4028 (pupa_install_bsd_part): Likewise.
4029 (pupa_prefix): Likewise.
4030 (pupa_boot_drive): Likewise.
4031
4032 * include/pupa/types.h: Fix a typo.
4033
4034 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
4035 pupa_memmove.
4036 (pupa_memmove): Declared.
4037 (pupa_strcpy): Likewise.
4038
4039 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
4040 pupa_mod_init takes one argument, its own module.
4041 (pupa_dl_unload_unneeded): Declared.
4042 (pupa_dl_unload_all): Likewise.
4043 (pupa_dl_ref): Likewise.
4044 (pupa_dl_unref): Likewise.
4045 (pupa_dl_iterate): Likewise.
4046 (pupa_dl_init): Renamed to ...
4047 (pupa_dl_set_prefix): ... this.
4048 (pupa_dl_get_prefix): Declared.
4049
4050 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
4051 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
4052 unloaded.
4053 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
4054 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
4055
4056 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
4057 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
4058
012d7999 40592003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
4060
4061 * util/i386/pc/pupa-setup.c (setup): Define the internal
4062 function find_first_partition_start at the top level, because GCC
4063 3.0.x cannot compile internal functions in deeper scopes
4064 correctly.
4065 (find_root_device): Use lstat instead of stat.
4066 Don't follow symbolic links.
4067 Fix the path-constructing code.
4068
4069 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
4070 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
4071 by a BLKGETSIZE ioctl first, because block devices don't fill
4072 the member st_mode of the structure stat on Linux.
4073 [__linux__] (linux_find_partition): Use a temporary buffer
4074 REAL_DEV for the working space. Copy it to DEV before returning.
4075 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
4076 buffer cache consistent.
4077 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
4078 strncmp. The previous value was merely wrong.
4079 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
4080
4081 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
4082 FAT size is 12. The previous value was merely wrong.
4083
4084 * kern/main.c (pupa_main): Don't split the starting message from
4085 newlines.
4086
4087 * kern/term.c (pupa_putchar): Put CR after LF instead of before
4088 LF, because BIOS goes crazy about character attributes in this
4089 case.
4090
1cc73a62 40912003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
4092
4093 * include/i386/pc/util/biosdisk.h: New file.
4094 * util/i386/pc/biosdisk.c: Likewise.
4095 * util/i386/pc/pupa-setup.c: Likewise.
4096
4097 * Makefile.in (INCLUDE_DISTFILES): Added
4098 include/pupa/i386/pc/util/biosdisk.h.
4099 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
4100 directory util/i386/pc.
4101 (install-local): Added a rule for sbin_UTILITIES.
4102 (uninstall): Likewise.
4103
4104 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
4105
4106 * util/misc.c (xrealloc): New function.
4107 (pupa_malloc): Likewise.
4108 (pupa_free): Likewise.
4109 (pupa_realloc): Likewise.
4110 (pupa_stop): Likewise.
4111 (pupa_putchar): Likewise.
4112
4113 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
4114
4115 * include/pupa/util/misc.h (xrealloc): Declared.
4116
4117 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
4118 macro.
4119 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
4120 (PUPA_BOOT_MACHINE_BPB_END): ... this.
4121
4122 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
4123 [PUPA_UTIL] (pupa_fat_fini): Likewise.
4124
4125 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
4126 way should be implemented.
4127 [PUPA_UTIL] (pupa_fat_fini): Likewise.
4128
4129 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
4130 the size of NAME for safety.
4131 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
4132 0x88.
4133
4134 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
4135 (pupa_setup_SOURCES): Likewise.
4136
4137 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
4138
08b70fe8 41392002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
4140
4141 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
4142 bunch of pushl's from pusha, because this destroys the return
4143 value.
4144
62ddcc8f 41452002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
4146
4147 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
4148 This means that any missing prototypes could be fatal. Also, you
4149 must take care when writing assembly code. See the comments at
4150 the beginning of startup.S, for more details.
4151
4152 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
4153 compilation mechanism.
4154 (pupa_chainloader_real_boot): Likewise.
4155 (pupa_biosdisk_rw_int13_extensions): Likewise.
4156 (pupa_biosdisk_rw_standard): Likewise.
4157 (pupa_biosdisk_check_int13_extensions): Likewise.
4158 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
4159 (pupa_biosdisk_get_diskinfo_standard): Likewise.
4160 (pupa_get_memsize): Likewise.
4161 (pupa_get_mmap_entry): Likewise.
4162 (pupa_console_putchar): Likewise.
4163 (pupa_console_setcursor): Likewise.
4164 (pupa_getrtsecs): Use pushl instead of push.
4165
4166 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
4167 memory instead of the stack for a mmap entry, because some
4168 BIOSes may ignore the maximum size and overflow.
4169
4170 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
4171
4172 * genmk.rb (PModule#rule): Compile automatically generated
4173 sources with module-specific CFLAGS as well as other sources.
4174
9962ed99 41752002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
4176
4177 * configure.ac: Check ld.
4178 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
4179 respectively, before checking endianness and sizes.
4180
4181 * Makefile.in (LD): New variable.
4182
abdfc3c5 41832002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
4184
4185 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
4186
6a161fa9 41872002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
4188
4189 * Changelog: New file.
4190