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