]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2005-10-01 Marco Gerards <mgerards@xs4all.nl>
[grub2.git] / ChangeLog
CommitLineData
59b8208a 12005-10-01 Marco Gerards <mgerards@xs4all.nl>
2
3 * configure.ac: Accept `x86_64' as host_cpu. In that case add
4 `-m32' to CFLAGS.
5
6 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
7 linking.
8
9 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
10 (COMMON_LDFLAGS): New variable.
11 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
12 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
15 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
16 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
17 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
18 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
19 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
20 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
21 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
22 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
23 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
24 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
25 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
26 variables.
27 (normal_mod_ASFLAGS): Add `-m32'.
28
29 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
30 (grub_host_size_t, grub_host_ssize_t): New types.
31 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
32 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
33 `GRUB_HOST_SIZEOF_VOID_P'.
34
35 * include/grub/kernel.h (struct grub_module_header): Type of
36 member offset changed to `grub_host_off_t'. Type of member size
37 changed to `grub_host_size_t'.
38 (struct grub_module_info): Type of member offset changed to
39 `grub_host_off_t'. Type of member size changed to
40 `grub_host_size_t'.
41
b4093103 422005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
43
44 Make GRUB's kernel compliant to Multiboot Specification.
45
46 * kern/i386/pc/startup.S (multiboot_header): New label.
47 (multiboot_entry): Likewise.
48 (multiboot_trampoline): Likewise.
49
50 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
51 Increased to 0x4A0.
52
53 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
54 put parentheses after a question mark.
55 [!GRUB_UTIL] (my_mod): New variable.
56
57 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
58
b2499b29 592005-09-28 Marco Gerards <mgerards@xs4all.nl>
60
61 Adds support for the XFS filesystem. Btrees are not supported
62 yet.
63
64 * fs/xfs.c: New file.
65
66 * DISTLIST: Added `fs/xfs.c'.
67
68 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
69 (grub_probefs_SOURCES): Likewise.
70 (grub_emu_SOURCES): Likewise.
71 (pkgdata_MODULES): Add `xfs.mod'.
72 (xfs_mod_SOURCES): New variable.
73 (xfs_mod_CFLAGS): Likewise.
74
75 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
76 (pkgdata_MODULES): Add `xfs.mod'.
77 (xfs_mod_SOURCES): New variable.
78 (xfs_mod_CFLAGS): Likewise.
79
80 * util/grub-emu.c (main): Call `grub_xfs_init' and
81 `grub_xfs_fini'.
82
83 * include/grub/fs.h (grub_xfs_init): New prototype.
84 (grub_xfs_fini): Likewise.
85
86
83d37a62 872005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
88
89 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
90 color modes, allow greater than 16 colors to be configured as
91 a default palette.
92
47d2d65e 932005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
94
95 * normal/completion.c (complete_arguments): Add the qualifier
96 const into OPTIONS.
97
98 From Omniflux <omniflux+lists@omniflux.com>:
99 * include/grub/terminfo.h: New file.
100 * include/grub/tparm.h: Likewise.
101 * include/grub/i386/pc/serial.h: Likewise.
102 * term/terminfo.c: Likewise.
103 * term/tparm.c: Likewise.
104 * term/i386/pc/serial.c: Likewise.
105 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
106 serial.mod.
107 (terminfo_mod_SOURCES): New variable.
108 (terminfo_mod_CFLAGS): Likewise.
109 (serial_mod_SOURCES): Likewise.
110 (serial_mod_CFLAGS): Likewise.
111
48b671ff 1122005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
113
114 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
115 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
116 and kern/powerpc/ieee1275/cmain.c, respectively.
117
118 * boot/powerpc/ieee1275/crt0.S: Moved to ...
119 * kern/powerpc/ieee1275/crt0.S: ... here.
120
121 * boot/powerpc/ieee1275/cmain.c: Moved to ...
122 * kern/powerpc/ieee1275/cmain.c: ... here.
123
124 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
125 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
126 instead of boot/powerpc/ieee1275/crt0.S and
127 boot/powerpc/ieee1275/cmain.c, respectively.
128
129 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
130 sectors. It was not used anyway.
131
09fc77a7 1322005-08-30 Hollis Blanchard <hollis@penguinppc.org>
133
134 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
135 `unused parameter' warning.
136
003789c7 1372005-08-30 Hollis Blanchard <hollis@penguinppc.org>
138
139 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
140 function.
141 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
142 getcharwidth.
143
67f44c86 1442005-08-28 Marco Gerards <metgerards@student.han.nl>
145
146 * include/grub/normal.h (enum grub_completion_type): Added
147 `GRUB_COMPLETION_TYPE_ARGUMENT'.
148
149 * normal/cmdline.c (print_completion): Handle
150 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
151 * normal/menu_entry.c (store_completion): Likewise.
152
153 * normal/completion.c (complete_arguments): New function.
154 (grub_normal_do_completion): Call `complete_arguments' when the
155 current words start with a dash.
156
0b5abe02 1572005-08-27 Marco Gerards <metgerards@student.han.nl>
158
159 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
160 `gzio.mod' instead of `io.mod').
161
d9864ee1 1622005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
163
164 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
165 (DISTDIRS): Added io and video.
166 Rewrite the search routine to make an output consistently.
167
168 * DISTLIST: Added conf/sparc64-ieee1275.mk,
169 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
170 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
171 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
172 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
173 util/powerpc/ieee1275/misc.c.
174
175 * include/grub/gzio.h: New file.
176 * io/gzio.c: Likewise.
177
178 * kern/file.c (grub_file_close): Call grub_device_close only if
179 FILE->DEVICE is not NULL.
180
181 * include/grub/mm.h [!NULL] (NULL): New macro.
182
183 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
184
185 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
186 (pkgdata_MODULES): Added gzio.mod.
187 (gzio_mod_SOURCES): New variable.
188 (gzio_mod_CFLAGS): Likewise.
189
190 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
191 (pkgdata_MODULES): Added gzio.mod.
192 (gzio_mod_SOURCES): New variable.
193 (gzio_mod_CFLAGS): Likewise.
194
195 * commands/cat.c: Include grub/gzio.h.
196 (grub_cmd_cat): Use grub_gzfile_open instead of
197 grub_file_open.
198
199 * commands/cmp.c: Include grub/gzio.h.
200 (grub_cmd_cmp): Use grub_gzfile_open instead of
201 grub_file_open.
202
203 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
204 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
205 grub_file_open.
206 (grub_rescue_cmd_module): Likewise.
207
fa46f4b5 2082005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
209
210 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
211 kern/sparc64/ieee1275/init.c because it contains _start.
212 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
213
e9211b5d 2142005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
215
216 * configure.ac: Add support for sparc64 host with ieee1275
217 firmware.
218 * configure: Generated from configure.ac.
219 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
220 instead of int.
221 (grub_ofdisk_read): Likewise.
222 (grub_ofdisk_open): Use %p to print pointer values, and cast the
223 pointers as (void *) to remove a warning.
224 (grub_ofdisk_close): Likewise.
225 (grub_ofdisk_read): Likewise.
226 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
227 returns, so make it return void to remove a warning.
228 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
229 Corresponding prototype change.
230 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
231 values, and cast the pointers as (void *) to remove a warning.
232 (grub_mm_dump): Likewise.
233 * conf/sparc64-ieee1275.mk: New file.
234 * conf/sparc64-ieee1275.rmk: Likewise.
235 * include/grub/sparc64/setjmp.h: Likewise.
236 * include/grub/sparc64/types.h: Likewise.
237 * include/grub/sparc64/ieee1275/console.h: Likewise.
238 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
239 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
240 * include/grub/sparc64/ieee1275/time.h: Likewise.
241 * kern/sparc64/cache.c: Likewise.
242 * kern/sparc64/dl.c: Likewise.
243 * kern/sparc64/ieee1275/init.c: Likewise.
244 * kern/sparc64/ieee1275/openfw.c: Likewise.
245
385c6a92 2462005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
247
248 * util/console.c (grub_ncurses_putchar): If C is greater than
249 0x7f, set C to a question mark.
250 (grub_ncurses_getcharwidth): New function.
251 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
252 getcharwidth.
253
254 * normal/menu.c (print_entry): Made aware of Unicode. First,
255 convert TITLE to UCS-4, and predict the cursor position by
256 grub_getcharwidth.
257
258 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
259 const to SRC.
260 * kern/misc.c (grub_utf16_to_utf8): Likewise.
261
16ccb8b1 2622005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
263
264 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
265 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
266 grub_strcat.
267
268 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
269 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
270 grub_strcpy and grub_strlen. Take it into account that a space
271 character is inserted as a delimiter.
272
6a85ce79 2732005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
274
275 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
276 invalid magic in thre error.
277
278 * commands/search.c: New file.
279
280 * util/grub-emu.c (main): Call grub_search_init and
281 grub_search_fini.
282
283 * kern/rescue.c (grub_rescue_print_disks): Removed.
284 (grub_rescue_print_devices): New function.
285 (grub_rescue_cmd_ls): Use grub_device_iterate with
286 grub_rescue_print_devices instead of grub_disk_dev_iterate with
287 grub_rescue_print_disks.
288
289 * kern/partition.c (grub_partition_iterate): Return the result of
290 PARTMAP->ITERATE instead of GRUB_ERRNO.
291
292 * kern/device.c: Include grub/partition.h.
293 (grub_device_iterate): New function.
294
295 * include/grub/partition.h (grub_partition_iterate): Return int
296 instead of grub_err_t.
297
298 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
299 prototype.
300 [GRUB_UTIL] (grub_search_fini): Likewise.
301
302 * include/grub/device.h (grub_device_iterate): New prototype.
303
304 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
305 commands/search.c.
306 (pkgdata_MODULES): Added search.mod.
307 (search_mod_SOURCES): New variable.
308 (search_mod_CFLAGS): Likewise.
309
310 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
311 (pkgdata_MODULES): Added search.mod.
312 (search_mod_SOURCES): New variable.
313 (search_mod_CFLAGS): Likewise.
314
315 * commands/ls.c (grub_ls_list_disks): Renamed to ...
316 (grub_ls_list_devices): ... this, and use grub_device_iterate.
317 All callers changed.
318
319 * DISTLIST: Added commands/search.c.
320
ef095434 3212005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
322
323 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
324 conversion.
325 (grub_getcharwidth): New function.
326
327 * kern/misc.c (grub_utf8_to_ucs4): New function.
328
329 * include/grub/term.h (struct grub_term): Added a new member
330 "getcharwidth".
331 (grub_getcharwidth): New prototype.
332
333 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
334
335 * term/i386/pc/console.c (map_char): New function. Segregated from
336 grub_console_putchar.
337 (grub_console_putchar): Use map_char.
338 (grub_console_getcharwidth): New function.
339 (grub_console_term): Specified grub_console_getcharwidth as
340 getcharwidth.
341
342 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
343 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
344
345 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
346 GRUB_ERRNO.
347 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
348 on grub_strtoul completely.
349 (write_char): Declare local variables in the beginning of the
350 function.
351 (grub_vesafb_getcharwidth): New function.
352 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
353 getcharwidth.
354
1f0a95e4 3552005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
356
357 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
358 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
359 commands/i386/pc/vbetest.c.
360
361 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
362 call grub_vbe_get_controller_info again, because the returned
363 information is volatile.
364 (grub_vbe_set_video_mode): Mostly rewritten.
365 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
366 grub_vbe_status_t correctly.
367 (grub_vbe_get_video_mode_info): Likewise.
368 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
369 several if statements.
370
371 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
372 * commands/i386/pc/vbeinfo.c: ... this.
373
374 * commands/i386/pc/vbe_test.c: Renamed to ...
375 * commands/i386/pc/vbetest.c: ... this.
376
377 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
378 ...
379 (grub_cmd_vbeinfo): ... this. Save video modes before
380 iterating. Skip a video mode, if it is not available, not enough
381 information is given or it is monochrome. Show the memory
382 model. Leave the interpretation of MODEVAR to grub_strtoul
383 completely.
384 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
385 (GRUB_MOD_FINI): Likewise.
386
387 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
388 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
389 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
390 duplicated grub_env_get. Leave the interpretation of MODEVAR to
391 grub_strtoul completely.
392 (real2pm): Removed.
393 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
394 (GRUB_MOD_FINI): Likewise.
395
396 * normal/misc.c: Include grub/mm.h.
397
398 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
399 vbe_list_modes with vbetest.mod and vbeinfo.mod.
400 (vbe_list_modes_mod_SOURCES): Removed.
401 (vbe_list_modes_mod_CFLAGS): Likewise.
402 (vbe_test_mod_SOURCES): Likewise.
403 (vbe_test_mod_CFLAGS): Likewise.
404 (vbeinfo_mod_SOURCES): New variable.
405 (vbeinfo_mod_CFLAGS): Likewise.
406 (vbetest_mod_SOURCES): Likewise.
407 (vbetest_mod_CFLAGS): Likewise.
408
992ffbbe 4092005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
410
411 * normal/misc.c: New file.
412
413 * DISTLIST: Added normal/misc.c.
414
415 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
416 DISK to HOOK. Call HOOK with DISK.
417 * partmap/apple.c (apple_partition_map_iterate): Likewise.
418 * partmap/pc.c (pc_partition_map_iterate): Likewise.
419 * partmap/sun.c (sun_partition_map_iterate): Likewise.
420
421 * normal/menu_entry.c (struct screen): Added a new member
422 "completion_shown".
423 (completion_buffer): New global variable.
424 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
425 (store_completion): New function.
426 (complete): Likewise.
427 (clear_completions): Likewise.
428 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
429 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
430 a tab, call complete.
431
432 * normal/completion.c (disk_dev): Removed.
433 (print_simple_completion): Likewise.
434 (print_partition_completion): Likewise.
435 (print_func): New global variable.
436 (add_completion): Do not take the arguments WHAT or PRINT any
437 longer. Added a new argument TYPE. Instead of printing directly,
438 call PRINT_FUNC if not NULL.
439 All callers changed.
440 (complete_device): Use a local variable DEV instead of
441 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
442 (grub_normal_do_completion): Take a new argument HOOK. Do not
443 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
444 empty string, return NULL instead.
445 All callers changed.
446
447 * normal/cmdline.c (print_completion): New function.
448
449 * kern/partition.c (grub_partition_iterate): Add an argument DISK
450 to HOOK.
451 All callers changed.
452
453 * kern/disk.c (grub_print_partinfo): Removed.
454
455 * include/grub/partition.h (struct grub_partition_map): Add a new
456 argument DISK into HOOK of ITERATE.
457 (grub_partition_iterate): Add a new argument DISK to HOOK.
458
459 * include/grub/normal.h (enum grub_completion_type): New enum.
460 (grub_completion_type_t): New type.
461 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
462 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
463 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
464 (GRUB_COMPLETION_TYPE_FILE): Likewise.
465 (grub_normal_do_completion): Added a new argument HOOK.
466 (grub_normal_print_device_info): New prototype.
467
468 * include/grub/disk.h (grub_print_partinfo): Removed.
469
470 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
471 (normal_mod_SOURCES): Likewise.
472 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
473 (normal_mod_SOURCES): Likewise.
474
475 * commands/ls.c (grub_ls_list_disks): Use
476 grub_normal_print_device_info instead of grub_print_partinfo. Free
477 PNAME.
478 (grub_ls_list_files): Use grub_normal_print_device_info instead of
479 duplicating the code.
480
0bd41162 4812005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
482
483 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
484 follow GCS more precisely.
485 * commands/i386/pc/vbe_test.c: Likewise.
486 * include/grub/i386/pc/vbe.h: Likewise.
487 * term/i386/pc/vesafb.c: Likewise.
488 * video/i386/pc/vbe.c: Likewise.
489
6323696a 4902005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
491
492 * DISTLIST: Added term/i386/pc/vesafb.c
493 DISTLIST: Added video/i386/pc/vbe.c
494 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
495 DISTLIST: Added commands/i386/pc/vbe_test.c.
496 * commands/i386/pc/vbe_list_modes.c: New file.
497 * commands/i386/pc/vbe_test.c: Likewise.
498 * term/i386/pc/vesafb.c: Likewise.
499 * video/i386/pc/vbe.c: Likewise.
500 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
501 (grub_vbe_probe) Added prototype.
502 (grub_vbe_set_video_mode) Likewise.
503 (grub_vbe_get_video_mode) Likewise.
504 (grub_vbe_get_video_mode_info) Likewise.
505 (grub_vbe_set_pixel_rgb) Likewise.
506 (grub_vbe_set_pixel_index) Likewise.
507 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
508 (pkgdata_MODULES): Added vesafb.mod.
509 (pkgdata_MODULES): Added vbe_list_modes.mod.
510 (pkgdata_MODULES): Added vbe_test.mod.
511 (vbe_mod_SOURCES): Added.
512 (vbe_mod_CFLAGS): Likewise.
513 (vesafb_mod_SOURCES): Likewise.
514 (vesafb_mod_CFLAGS): Likewise.
515 (vbe_list_modes_mod_SOURCES): Likewise.
516 (vbe_list_modes_mod_CFLAGS): Likewise.
517 (vbe_test_mod_SOURCES): Likewise.
518 (vbe_test_mod_CFLAGS): Likewise.
519
0a74e62f 5202005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
521
0a74e62f 522 * normal/command.c (grub_command_execute): If INTERACTIVE is
523 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
524 CMDLINE. Disable the pager if INTERACTIVE is true.
525 All callers are changed.
526
527 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
528 before reading a config file.
529 * normal/main.c (read_config_file): Even if a command is not
530 found, register it if it is within an entry.
531
532 * util/grub-emu.c: Include sys/types.h and unistd.h.
533 (options): Added --hold.
534 (struct arguments): Added a new member "hold".
535 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
536 missing.
537 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
538 cleared by a debugger, if it is not zero.
539
540 * include/grub/normal.h (grub_command_execute): Add an argument
541 INTERACTIVE.
542
e51f85ae 5432005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
544
545 * DISTLIST: Added include/grub/i386/pc/vbe.h.
546
e9c6f39b 5472005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
548
549 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
550 program with another one, because the old one didn't detect a bug
551 in gcc-3.4. Always use regparm 2, because the new test is still
552 not enough for gcc-4.0. Someone must investigate a simple test
553 case which detects a bug in gcc-4.0.
554
8de3495c 5552005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
556
557 * DISTLIST: Added normal/completion.c.
558
559 * normal/completion.c: New file.
560
561 * term/i386/pc/console.c (grub_console_getwh): New function.
562 (grub_console_term): Assign grub_console_getwh to getwh.
563
564 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
565 function is defined in normal/completion.c as
566 grub_normal_do_completion.
567 (grub_cmdline_get): Use grub_normal_do_completion instead of
568 grub_tab_complete.
569
570 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
571 returns non-zero, otherwise return 0.
572 (grub_partition_iterate): First, probe the partition map. Then,
573 call ITERATE only for this partition map.
574
575 * kern/misc.c (grub_strncmp): Rewritten.
576
577 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
578 returns non-zero. Otherwise return 0.
579
580 * include/grub/partition.h (grub_partition_map_iterate): Return
581 int instead of void.
582
583 * include/grub/normal.h (grub_normal_do_completion): New prototype.
584
585 * include/grub/misc.h (grub_strncmp): Change the type of N to
586 grub_size_t.
587
588 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
589 of void.
590
591 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
592 unsigned explictly before comparing it with I.
593
594 * kern/main.c (grub_env_write_root): Add the attribute unused into
595 VAR.
596
597 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
598 normal/completion.c.
599 (normal_mod_SOURCES): Likewise.
600 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
601 (normal_mod_SOURCES): Likewise.
602
603 * normal/command.c (grub_iterate_commands): If ITERATE returns
604 non-zero, return one immediately.
605
e85e144b 6062005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
607
608 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
609 * kern/i386/pc/startup.S: Updated Global Descriptor table's
610 descriptions.
611 (grub_vbe_get_controller_info): New function.
612 (grub_vbe_get_mode_info): Likewise.
613 (grub_vbe_set_mode): Likewise.
614 (grub_vbe_get_mode): Likewise.
615 (grub_vbe_set_memory_window): Likewise.
616 (grub_vbe_get_memory_window): Likewise.
617 (grub_vbe_set_scanline_length): Likewise.
618 (grub_vbe_get_scanline_length): Likewise.
619 (grub_vbe_set_display_start): Likewise.
620 (grub_vbe_get_display_start): Likewise.
621 (grub_vbe_set_palette_data): Likewise.
622 * include/grub/i386/pc/vbe.h: New file.
623
c46153d2 6242005-08-08 Hollis Blanchard <hollis@penguinppc.org>
625
626 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
627 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
628 * DISTLIST: Likewise.
629 * kern/ieee1275/of.c: Moved to ...
630 * kern/ieee1275/ieee1275.c: ... here.
631
0cb90c45 6322005-08-08 Hollis Blanchard <hollis@penguinppc.org>
633
634 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
635 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
636 Pass 0 as `end' parameter to grub_strtoul().
637
a19fb360 6382005-08-08 Hollis Blanchard <hollis@penguinppc.org>
639
640 * include/grub/powerpc/ieee1275/console.h: Do not include
641 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
642 ifdef.
643 (grub_console_cur_color): Remove i386-specific prototype.
644 (grub_console_real_putchar): Likewise.
645 (grub_console_checkkey): Likewise.
646 (grub_console_getkey): Likewise.
647 (grub_console_getxy): Likewise.
648 (grub_console_gotoxy): Likewise.
649 (grub_console_cls): Likewise.
650 (grub_console_setcursor): Likewise.
651 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
652 Include <grub/machine/console.h>.
653 * term/ieee1275/ofconsole.c: Likewise.
654
4ac9bd04 6552005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
656
657 * Makefile.in (LIBLZO): New variable.
658
659 * configure.ac: Check for LZO version 2.
660
661 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
662 lzo/lzo1x.h instead of lzo1x.h.
663
664 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
665 of -llzo.
666
667 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
668 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
669
670 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
671 copying the data from PARTITION to P.
672
f4917dfd 6732005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
674
675 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
676 negative, unload the module.
677
678 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
679 map is "pc_partition_map" but not "pc".
680 (usage): Fix the description. The options are --boot-image and
681 --core-image but not --boot-file or --core-file.
682 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
683 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
684 DEFAULT_DIRECTORY.
685
686 * util/i386/pc/grub-install.in: Do not specify --boot-file or
687 --core-file. Specify INSTALL_DEVICE as an argument.
688
689 * util/console.c: Include config.h.
690 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
691 [HAVE_NCURSES_H]: Include ncurses.h.
692 [HAVE_CURSES_H]: Include curses.h.
693 [!A_NORMAL] (A_NORMAL): Defined as zero.
694 [!A_STANDOUT] (A_STANDOUT): Likewise.
695
696 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
697 -lncurses.
698 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
699
700 * configure.ac: Check for curses libraries and headers.
701
702 * Makefile.in (LIBCURSES): New variable.
703
704 * genmk.rb (Script::rule): Set the executable bits.
705
706 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
707 name of the PC partition map is "pc_partition_map" but not "pc".
708
0e143073 7092005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
710
711 * util/i386/pc/grub-install.in (grub_probefs): New variable.
712 (modules): Likewise.
713 (usage): Added descriptions for --modules and --grub-probefs.
714 Handle --modules and --grub-probefs. Save the arguments in MODULES
715 and GRUB_PROBEFS, respectively.
716 Auto-detect a filesystem module against GRUBDIR. If the result is
717 empty and modules are not specified explicitly, abort the
718 installation. Add the result to MODULES.
719
720 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
721 disk/powerpc/ieee1275/ofdisk.c,
722 include/grub/powerpc/ieee1275/init.h and
723 term/powerpc/ieee1275/ofconsole.c.
724 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
725 term/ieee1275/ofconsole.c.
726
727 * include/grub/powerpc/ieee1275/console.h: Resurrected.
728
729 * COPYING: Upgraded to the latest version. Only the address of the
730 FSF office has changed.
731
efd6e6d5 7322005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
733
734 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
735 kern/ieee1275.c with kern/ieee1275/of.c.
736
737 * kern/ieee1275.c: Moved to ...
738 * kern/ieee1275/of.c: ... here.
739
8ceafda2 7402005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
741
742 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
743 readablity.
744
745 * config.guess: Updated to the latest version from gnulib.
746 * config.sub: Likewise.
747 * install.sh: Likewise.
748 * mkinstalldirs: Likewise.
749
750 * include/grub/console.h: Removed. This file is arch-specific. Do
751 not put this in include/grub.
752
753 * include/grub/i386/pc/console.h: Resurrected.
754
755 * util/console.c: Include grub/machine/console.h instead of
756 grub/console.h.
757 * util/grub-emu.c: Likewise.
758
267f6cd9 7592005-08-04 Marco Gerards <metgerards@student.han.nl>
760
761 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
762 hardcoded value.
763
764 From Vincent Pelletier <subdino2004@yahoo.fr>
765 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
766 Redefined to use grub_getwh.
767 (grub_term): New member named getwh.
768 (grub_getwh): New prototype.
769 * kern/term.c (grub_getwh): New function.
770 * term/i386/pc/console.c (grub_console_getwh): New function.
771 (grub_console_term): New member `getwh'.
772 * term/i386/pc/vga.c (grub_vga_getwh): New function.
773 (grub_vga_term): New member `getwh'.
0b5abe02 774 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 775 grub_ssize_t.
776 (grub_ofconsole_getw): New function.
777 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
778 (grub_ofconsole_term): New field named getwh and new initial
779 value.
780
3be7266d 7812005-08-03 Hollis Blanchard <hollis@penguinppc.org>
782
783 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
784 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
785 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
786 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
787 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
788 of <grub/machine/ieee1275.h>.
789 * commands/ieee1275/reboot.c: Likewise.
790 * boot/powerpc/ieee1275/ieee1275.c: Move ...
791 * kern/ieee1275.c: ... to here. All users updated. Change all
792 parameter structs to use new type `grub_ieee1275_cell_t'.
793 * term/powerpc/ieee1275/ofconsole.c: Move ...
794 * term/ieee1275/ofconsole.c: ... to here. All users updated.
795 * disk/powerpc/ieee1275/ofdisk.c: Move ...
796 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
797 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
798 to return int.
799 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
800 Remove unused prototypes. All users updated.
801 * include/grub/powerpc/ieee1275/console.h: Removed.
802 * include/grub/powerpc/ieee1275/ieee1275.h: Define
803 `grub_ieee1275_cell_t'.
804 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
805 Cast comparisons with -1 to the correct type.
806 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
807 type to match `grub_ieee1275_entry_fn'.
808
8b5f3938 8092005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
810
811 * DISTLIST: Added util/i386/pc/grub-probefs.c.
812
813 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
814 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
815 partmap/sun.c.
816 (grub_probefs_SOURCES): New variable.
817
818 * util/i386/pc/grub-probefs.c: New file.
819
820 * util/i386/pc/grub-setup.c (main): Call
821 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
822 grub_hfs_init and grub_jfs_init to initialize the system. Call
823 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
824 grub_pc_partition_map_fini to finish the system.
825
ea409713 8262005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
827
828 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
829 function.
830 (grub_multiboot_load_elf32): Likewise.
831 (grub_multiboot_is_elf64): Likewise.
832 (grub_multiboot_load_elf64): Likewise.
833 (grub_multiboot_load_elf): Likewise.
834 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
835 an ELF32 or ELF64 file.
836 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
837
838 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
839 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
840 NULL before calling FS->LABEL.
841 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
842 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
843 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
844 before calling FS->LABEL.
845
141a288b 8462005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
847
848 * util/i386/pc/grub-install.in (datadir): New variable.
849 (libdir): Removed.
850 (pkgdatadir): New variable.
851 (pkglibdir): Removed.
852
0d5f8a54 8532005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
854
855 * DISTLIST: Added util/i386/pc/grub-install.in.
856
857 * util/i386/pc/grub-install.in: New file.
858
859 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
860 (grub_install_SOURCES): Likewise.
861
862 * genmk.rb: Added support for scripts.
863 (Script): New class.
864 (scripts): New variable.
865
866 * Makefile.in (install-local): Install sbin_SCRIPTS by
867 INSTALL_SCRIPT.
868 (uninstall): Remove sbin_SCRIPTS.
869
870 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
871 device, try to get a GRUB device by
872 grub_util_biosdisk_get_grub_dev.
873 Free DEST_DEV.
874
875 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
876 description for --device-map.
877
5f968e1e 8782005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
879
880 Change the semantics of variable hooks. They now return strings
881 instead of error values.
882
883 * util/i386/pc/grub-setup.c: Include grub/env.h.
884 (setup): Use grub_device_set_root instead of grub_env_set.
885
886 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
887 grub_env_get instead of grub_device_set_root and
888 grub_device_get_root, respectively.
889
890 * kern/main.c (grub_env_write_root): New function.
891 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
892 grub_env_set instead of grub_device_set_root.
893
894 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
895 many variables.
896 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
897 rather than calling ENV->WRITE_HOOK afterwards.
898 (grub_env_get): Return the result of ENV->READ_HOOK rather than
899 passing a pointer of a pointer.
900 (grub_register_variable_hook): Change the types of "read_hook" and
901 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
902 respectively.
903 Allocate the default empty string on the heap, because this string
904 may be freed later.
905
906 * kern/device.c: Include grub/env.h.
907 (grub_device_set_root): Removed.
908 (grub_device_get_root): Likewise.
909 (grub_device_open): Use grub_env_get instead of
910 grub_device_get_root.
911
912 * include/grub/env.h (grub_env_read_hook_t): New type.
913 (grub_env_write_hook_t): Likewise.
914 (grub_env_var): Change the types of "read_hook" and "write_hook"
915 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
916 (grub_register_variable_hook): Likewise.
917
918 * include/grub/device.h (grub_device_set_root): Removed.
919 (grub_device_set_root): Likewise.
920
921 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
922 make sure that DIRNAME terminates with '/', so that
923 grub_fat_find_dir will fail if PATH is not a directory.
924
925 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
926 from DIRNAME.
927 Use the qualifier auto for print_files and print_files_long.
928 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
929 as a regular file.
930 Put a newline only if there is no error.
931 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
932 used.
933
896f0afd 9342005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
935
936 * kern/partition.c (grub_partition_probe): Initialize PART to
937 NULL. Otherwise, when no partition map is registered, this returns
938 a garbage.
939
b28b81b2 9402005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
941
942 * partmap/apple.c (apple_partition_map_iterate): Check if POS
943 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
944 valid.
945
5f3607e0 9462005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
947
948 * commands/ls.c (grub_ls_list_disks): Print the filesystem
949 information on each device, if it does not have partitions. Print
950 "Device" instead of "Disk", because this function is not specific
951 to disk devices.
952
953 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
954 static to ensure that it is put on the memory rather than a
955 register.
956
502c87e8 9572005-07-17 Yoshinori Okuji <okuji@enbug.org>
958
959 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
960 (grub_cat_init): Likewise.
961 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
962 (options): Likewise.
963 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
964 (grub_configfile_init): Likewise.
965 * font/manager.c (GRUB_MOD_INIT): Likewise.
966 * commands/help.c (GRUB_MOD_INIT): Likewise.
967 (grub_help_init): Likewise.
968 * normal/command.c (grub_command_init): Likewise.
969 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
970 * disk/loopback.c (grub_loop_init): Likewise.
971 (GRUB_MOD_INIT): Likewise.
972 * commands/ls.c (grub_ls_init): Likewise.
973 (GRUB_MOD_INIT): Likewise.
974 (options): Likewise.
975 * commands/boot.c (grub_boot_init): Likewise.
976 (GRUB_MOD_INIT): Likewise.
977 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
978 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
979 (GRUB_MOD_INIT): Likewise.
980 * commands/cmp.c (grub_cmp_init): Likewise.
981 (GRUB_MOD_INIT): Likewise.
982
983 * normal/arg.c: Use <> instead of "" to include header files.
984 (SHORT_ARG_HELP): New macro.
985 (SHORT_ARG_USAGE): Likewise.
986 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
987 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
988 descriptions.
989 (find_short): Check if C is 'h' or 'u' explicitly.
990 (grub_arg_show_help): Use space characters instead of tabs. Treat
991 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
992 are shown with --help and --usage only if they are not used for
993 the command itself.
994 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
995 'h' and 'u'.
996
997 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
998 const into "longarg". Change the type of "shortarg" to int.
999
f806d18e 10002005-07-17 Yoshinori Okuji <okuji@enbug.org>
1001
1002 * boot/i386/pc/boot.S (boot_drive_check): New label.
1003
1004 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
1005 macro.
1006
1007 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
1008 which do not pass a boot drive correctly. Copied from GRUB Legacy.
1009
e293232b 10102005-07-17 Yoshinori Okuji <okuji@enbug.org>
1011
1012 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
1013 When turning off Gate A20, skip the check and return immediately,
1014 because this is not fatal usually.
1015
ebedfd00 10162005-07-17 Yoshinori Okuji <okuji@enbug.org>
1017
1018 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
1019 be 0x7C00 instead of 0x8000.
1020
1021 * boot/i386/pc/pxeboot.S: Rewritten.
1022
1023 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
1024 EXT_C.
1025 (gate_a20_check_state): Read a byte from 0x108000. Invert the
1026 result.
1027
654fc59f 10282005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
1029
1030 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
1031 robustness. This routine now supports a BIOS call and System
1032 Control Port A to modify the gate A20.
1033
1034 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
1035 Increased to 0x440.
1036
09f9923f 10372005-07-12 Hollis Blanchard <hollis@penguinppc.org>
1038
1039 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
1040 device path and resulting ihandle.
1041 (grub_ofdisk_close): dprintf the ihandle being closed.
1042 (grub_ofdisk_read): dprintf function parameters.
1043 * kern/mm.c (grub_mm_init_region): Likewise.
1044 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
1045 (grub_linux_boot): dprintf the Linux entry point, initrd address and
1046 size, and boot arguments.
1047 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
1048 before loading into memory.
1049 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
1050 before loading into memory.
1051
7ef504d8 10522005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
1053
1054 * kern/mm.c: Added much documentation.
1055 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
1056 8, set to 5 instead of 8.
1057
e0f050c2 10582005-07-10 Yoshinori Okuji <okuji@enbug.org>
1059
1060 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
1061
1062 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
1063 (grub_mkdevicemap_SOURCES): New variable.
1064
1065 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
1066 lib/device.c of GRUB Legacy.
1067
7224189a 10682005-07-10 Yoshinori Okuji <okuji@enbug.org>
1069
1070 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
1071 instead of PATH is NULL.
1072
68c864eb 10732005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
1074
1075 * commands/cmp.c (BUFFER_SIZE): New macro.
1076 (grub_cmd_cmp): Close the right file at the right time. Compare
1077 only data just read. Don't report files of different size as
1078 identical. Dynamically allocate buffers. Move variable
1079 declarations at the beginning of function.
1080
e6f3e614 10812005-07-09 Yoshinori Okuji <okuji@enbug.org>
1082
1083 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
1084 reverse.
1085
f8f1559a 10862004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
1087
1088 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
1089 when backspace is pressed at beginning of line.
1090
39c9d41d 10912005-07-03 Yoshinori Okuji <okuji@enbug.org>
1092
1093 * DISTLIST: Added genfslist.sh.
1094
1095 * normal/main.c (fs_module_list): New variable.
1096 (autoload_fs_module): New function.
1097 (read_fs_list): Likewise.
1098 (grub_normal_execute): Call read_fs_list.
1099
1100 * kern/fs.c (grub_fs_autoload_hook): New variable.
1101 (grub_fs_probe): Added support for auto-loading.
1102
1103 * include/grub/normal.h (struct grub_fs_module_list): New struct.
1104 (grub_fs_module_list_t): New type.
1105
1106 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
1107 (grub_fs_autoload_hook): New prototype.
1108
1109 * genfslist.sh: New file.
1110
1111 * genmk.rb: Added a rule to generate a filesystem list.
1112
121c1d83 11132005-06-30 Marco Gerards <metgerards@student.han.nl>
1114
1115 * configure.ac: Fix the test for cross-compiling.
1116
1117 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
1118 define GRUB_UTIL anymore.
1119
1120 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
1121 so this function works on other systems than just big endian.
1122 (load_modules): Likewise.
1123 (add_segments): Likewise.
1124
e75d76e1 11252005-06-23 Hollis Blanchard <hollis@penguinppc.org>
1126
1127 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
1128 contains `l' modifier, get a long from va_arg().
1129
50b5a0a7 11302005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
1131
1132 * kern/mm.c (grub_free): If the next free block which is being
1133 merged is the first free block, set the first block to the block
1134 being freed.
1135 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
1136
89371b20 11372005-05-08 Hollis Blanchard <hollis@penguinppc.org>
1138
1139 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
1140 `grub_ieee1275_chosen'.
1141
168d6e58 11422005-05-08 Hollis Blanchard <hollis@penguinppc.org>
1143
1144 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
1145 (grub_ieee1275_chosen): New variable.
1146 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
1147 `chosen'.
1148 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
1149 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
1150 Rename first argument to `phandle' for consistency.
1151 (grub_ieee1275_get_property_length): Likewise.
1152 (grub_ieee1275_next_property): Likewise. Change type of first argument
1153 to grub_ieee1275_phandle_t.
1154 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
1155 Move export next to declaration.
1156 (grub_ieee1275_chosen): New variable.
1157 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
1158 Correct cosmetic typo.
1159 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
1160 `grub_ieee1275_chosen'.
1161 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
1162 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
1163 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
1164 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
1165 `grub_ieee1275_chosen'.
1166
ca5baa3f 11672005-05-10 Hollis Blanchard <hollis@penguinppc.org>
1168
1169 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
1170 /chosen/bootargs.
1171 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
1172 /chosen/bootargs as "variable=value" pairs.
1173
708b345f 11742005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
1175
1176 * include/grub/misc.h (grub_dprintf): New macro.
1177 (grub_real_dprintf): New prototype.
1178 (grub_strword): Likewise.
1179 (grub_iswordseparator): Likewise.
1180 * kern/misc.c (grub_real_dprintf): New function.
1181 (grub_strword): Likewise.
1182 (grub_iswordseparator): Likewise.
1183
f4c5e67c 11842005-04-30 Hollis Blanchard <hollis@penguinppc.org>
1185
1186 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
1187 (roundup): Remove macro.
1188 (grub_ieee1275_flags): Make static.
1189 (grub_ieee1275_realmode): Remove.
1190 (grub_ieee1275_test_flag): New function.
1191 (grub_ieee1275_set_flag): Likewise.
1192 (find_options): Rename to `grub_ieee1275_find_options'; update
1193 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
1194 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
1195 (cmain): New prototype.
1196 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
1197 `grub_ieee1275_flags' directly.
1198 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
1199 machine/biosdisk.h.
1200 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
1201 Don't include grub/machine/init.h.
1202 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
1203 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
1204 Remove prototype.
1205 (grub_ieee1275_realmode): Likewise.
1206 (grub_ieee1275_flag): New enum.
1207 (grub_ieee1275_test_flag): New prototype.
1208 (grub_ieee1275_set_flag): New prototype.
1209 * include/grub/powerpc/ieee1275/init.h: Remove file.
1210 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
1211 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
1212 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
1213 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
1214 comment.
1215 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
1216 `grub_ieee1275_test_flag'.
1217 (grub_ieee1275_encode_devname): Likewise.
1218
ed16607e 12192005-04-21 Hollis Blanchard <hollis@penguinppc.org>
1220
1221 * include/grub/powerpc/ieee1275/ieee1275.h
1222 (grub_ieee1275_encode_devname): New prototype.
1223 (grub_ieee1275_get_filename): Likewise.
1224 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
1225 function.
1226 (grub_set_prefix): Likewise.
1227 (grub_machine_init): Call grub_set_prefix.
1228 * kern/powerpc/ieee1275/openfw.c: Fix typos.
1229 (grub_parse_type): New enum.
1230 (grub_ieee1275_get_devargs): New function.
1231 (grub_ieee1275_get_devname): Likewise.
1232 (grub_ieee1275_parse_args): Likewise.
1233 (grub_ieee1275_get_filename): Likewise.
1234 (grub_ieee1275_encode_devname): Likewise.
1235
be369920 12362005-03-30 Marco Gerards <metgerards@student.han.nl>
1237
1238 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
1239 `grub_loader_unset'.
1240
a5ce3a4a 12412005-03-26 Hollis Blanchard <hollis@penguinppc.org>
1242
1243 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
1244 instead of grub_ieee1275_interpret.
1245 (grub_halt_init): New function.
1246 (grub_halt_fini): Likewise.
1247 (GRUB_MOD_INIT): Correct message grammar.
1248 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
1249 instead of grub_ieee1275_interpret.
1250 (grub_reboot_init): New function.
1251 (grub_reboot_fini): Likewise.
1252 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
1253 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
1254 util/i386/pc/misc.c with commands/ieee1275/halt.c,
1255 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
1256 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
1257 function.
1258 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
1259 Add prototype.
1260 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
1261 prototype.
1262 (grub_halt): Likewise.
1263 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
1264 (cmain): Remove __attribute__((unused)).
1265 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
1266 (grub_heap_len): Likewise.
1267 (grub_machine_fini): New function.
1268 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
1269 (grub_halt): Likewise.
1270 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
1271 function.
1272 * util/powerpc/ieee1275/misc.c: New file.
1273
0058f771 12742005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
1275
1276 * DISTLIST: New file.
1277 * gendistlist.sh: Likewise.
1278
1279 * Makefile.in (COMMON_DISTFILES): Removed.
1280 (BOOT_DISTFILES): Likewise.
1281 (CONF_DISTFILES): Likewise.
1282 (DISK_DISTFILES): Likewise.
1283 (FS_DISTFILES): Likewise.
1284 (INCLUDE_DISTFILES): Likewise.
1285 (KERN_DISTFILES): Likewise.
1286 (LOADER_DISTFILES): Likewise.
1287 (TERM_DISTFILES): Likewise.
1288 (UTIL_DISTFILES): Likewise.
1289 (DISTFILES): Likewise.
1290 (uninstall): Uninstall files in $(pkgdata_DATA).
1291 (DISTLIST): New target.
1292 (distdir): Use the contents of the file DISTLIST to get a list of
1293 distributed files.
1294
46b3b8a5 12952005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
1296
1297 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
1298 descriptor. This is ported from GRUB Legacy.
1299
1300 * gencmdlist.sh: Added an extra semicolon to make it work with
1301 old sed versions. Reported by Robert Bihlmeyer
1302 <robbe@orcus.priv.at>.
1303
5822ff87 13042005-03-08 Yoshinori Okuji <okuji@enbug.org>
1305
1306 Automatic loading of commands is supported.
1307
1308 * normal/main.c (read_command_list): New function.
1309 (grub_normal_execute): Call read_command_list.
1310
1311 * normal/command.c (grub_register_command): Return zero or CMD.
1312 Allocate CMD->NAME from the heap.
1313 Initialize CMD->MODULE_NAME to zero.
1314 Find the same name as well. If the same command is found and it is
1315 a dummy command, overwrite members. If it is not a dummy command,
1316 return zero.
1317 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
1318 (grub_command_find): If a dummy command is found, load a module
1319 and retry to find a command only once.
1320
1321 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
1322 make sure that each command is loaded.
1323
1324 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
1325 macro.
1326 (struct grub_command): Remove const from the member `name'.
1327 Add a new member `module_name'.
1328 (grub_register_command): Return grub_command_t.
1329
1330 * commands/help.c (grub_cmd_help): Call grub_command_find to make
1331 sure that each command is loaded.
1332
1333 * genmk.rb (PModule::rule): Specify a module name without the
1334 suffix ".mod" to gencmdlist.sh.
1335
7b1f4b57 13362005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
1337
1338 * gencmdlist.sh: New file.
1339
1340 * genmk.rb (PModule::rule): Generate a rule for a command list.
1341 Clean command.lst.
1342 Generate command.lst from $(COMMANDFILES).
1343
1344 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
1345 (DATA): Added $(pkgdata_DATA).
1346 (install-local): Install files in $(pkgdata_DATA).
1347
062aaf39 13482005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
1349
1350 * term/i386/pc/vga.c (debug_command): Removed.
1351 (GRUB_MOD_INIT): Do not register the command "debug".
1352
1353 From Hollis Blanchard:
1354 * commands/configfile.c: New file.
1355 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
1356 commands/configfile.c.
1357 (pkgdata_MODULES): Added configfile.mod.
1358 (configfile_mod_SOURCES): New variable.
1359 (configfile_mod_CFLAGS): Likewise.
1360 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
1361 commands/configfile.c.
1362 (pkgdata_MODULES): Added configfile.mod.
1363 (configfile_mod_SOURCES): New variable.
1364 (configfile_mod_CFLAGS): Likewise.
1365 * util/grub-emu.c (main): Call grub_configfile_init and
1366 grub_configfile_fini.
1367 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
1368 prototype.
1369 [GRUB_UTIL] (grub_configfile_fini): Likewise.
1370
cee01aa6 13712005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
1372
1373 * normal/arg.c (grub_arg_show_help): Do not show the bug report
1374 address.
1375
1376 * commands/help.c (grub_cmd_help): Do not print newlines after
1377 the last command in print_command_help.
1378
93f3a1d8 13792005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
1380
1381 * commands/default.h: New file.
1382 * commands/timeout.h: Likewise.
1383 * normal/context.c: Likewise.
1384
1385 * util/misc.c: Do not include sys/times.h.
1386 Include sys/time.h and grub/machine/time.h.
1387 (grub_get_rtc): Rewritten with gettimeofday.
1388
1389 * util/grub-emu.c (main): Call grub_default_init and
1390 grub_timeout_init before grub_normal_init, and call
1391 grub_timeout_fini and grub_default_fini after grub_main.
1392
1393 * util/console.c (grub_ncurses_checkkey): Return the read
1394 character or -1.
1395
1396 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
1397 timeouts.
1398
1399 * normal/main.c (read_config_file): Push MENU. If this fails,
1400 print an error and wait for a user input.
1401 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
1402 If a menu is empty or an error occurs, pop MENU.
1403 (grub_normal_execute): Pop and free MENU after grub_menu_run
1404 returns.
1405
1406 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
1407
1408 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
1409 include time.h.
1410 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
1411 without GRUB_UTIL.
1412 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
1413 time.h.
1414 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
1415 without GRUB_UTIL.
1416
1417 * include/grub/normal.h (struct grub_menu_list): New struct.
1418 (grub_menu_list_t): New type.
1419 (struct grub_context): New struct.
1420 (grub_context_t): New type.
1421 (grub_register_command): Got rid of EXPORT_FUNC.
1422 (grub_unregister_command): Likewise.
1423 (grub_context_get): New prototype.
1424 (grub_context_get_current_menu): Likewise.
1425 (grub_context_push_menu): Likewise.
1426 (grub_context_pop_menu): Likewise.
1427 [GRUB_UTIL] (grub_default_init): Likewise.
1428 [GRUB_UTIL] (grub_default_fini): Likewise.
1429 [GRUB_UTIL] (grub_timeout_init): Likewise.
1430 [GRUB_UTIL] (grub_timeout_fini): Likewise.
1431
1432 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
1433 commands/timeout.c and normal/context.c.
1434 (pkgdata_MODULES): Added default.mod and timeout.mod.
1435 (normal_mod_SOURCES): Added normal/context.c.
1436 (default_mod_SOURCES): New variable.
1437 (default_mod_CFLAGS): Likewise.
1438 (timeout_mod_SOURCES): Likewise.
1439 (timeout_mod_CFLAGS): Likewise.
1440 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
1441 conf/i386-pc.rmk.
1442 (pkgdata_MODULES): Added default.mod and timeout.mod.
1443 (normal_mod_SOURCES): Added normal/context.c.
1444 (default_mod_SOURCES): New variable.
1445 (default_mod_CFLAGS): Likewise.
1446 (timeout_mod_SOURCES): Likewise.
1447 (timeout_mod_CFLAGS): Likewise.
1448
1449 * Makefile.in (all-local): Added $(MKFILES).
1450
4ed2e1dd 14512005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
1452
1453 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
1454 (grub_emu_SOURCES): Likewise.
1455 (pkgdata_MODULES): Add `sun.mod'.
1456 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
1457 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1458 `partmap/sun.c'.
1459 (pkgdata_MODULES): Add `sun.mod'.
1460 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
1461 * include/grub/partition.h (grub_sun_partition_map_init): New
1462 prototype.
1463 (grub_sun_partition_map_fini): Likewise.
1464 * partmap/sun.c: New file.
1465 * util/grub-emu.c (main): Initialize and de-initialize the sun
1466 partitionmap support.
1467
4d4e372e 14682005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
1469
1470 This implements an Emacs-like menu entry editor.
1471
1472 * normal/menu_entry.c: New file.
1473
1474 * util/console.c (grub_ncurses_putchar): Translate some Unicode
1475 characters to ASCII.
1476 (saved_char): New variable.
1477 (grub_ncurses_checkkey): Rewritten completely.
1478 (grub_ncurses_getkey): Likewise.
1479 (grub_ncurses_init): Call raw instead of cbreak.
1480
1481 * normal/menu.c (print_entry): Do not put a space.
1482 (init_page): Renamed to ...
1483 (grub_menu_init_page): ... this. All callers changed.
1484 (edit_menu_entry): Removed.
1485 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
1486
1487 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
1488
1489 * kern/misc.c (grub_vprintf): Call grub_refresh.
1490
1491 * normal/menu.c (DISP_LEFT): Renamed to ...
1492 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
1493 * normal/menu.c (DISP_UP): Renamed to ...
1494 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
1495 * normal/menu.c (DISP_RIGHT): Renamed to ...
1496 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
1497 * normal/menu.c (DISP_DOWN): Renamed to ...
1498 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
1499 * normal/menu.c (DISP_HLINE): Renamed to ...
1500 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
1501 * normal/menu.c (DISP_VLINE): Renamed to ...
1502 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
1503 * normal/menu.c (DISP_UL): Renamed to ...
1504 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
1505 * normal/menu.c (DISP_UR): Renamed to ...
1506 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
1507 * normal/menu.c (DISP_LL): Renamed to ...
1508 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
1509 * normal/menu.c (DISP_LR): Renamed to ...
1510 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
1511 * normal/menu.c (TERM_WIDTH): Renamed to ...
1512 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
1513 * normal/menu.c (TERM_HEIGHT): Renamed to ...
1514 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
1515 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
1516 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
1517 * normal/menu.c (TERM_MARGIN): Renamed to ...
1518 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
1519 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
1520 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
1521 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
1522 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
1523 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
1524 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
1525 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
1526 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
1527 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
1528 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
1529 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
1530 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
1531 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
1532 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
1533 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
1534 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
1535 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
1536 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
1537 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
1538 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
1539 All callers changed.
1540
1541 * include/grub/normal.h: New prototype.
1542
1543 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
1544 normal/menu_entry.c.
1545 (normal_mod_SOURCES): Likewise.
1546 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1547 (normal_mod_SOURCES): Likewise.
1548
e6b92c8a 15492005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
1550
1551 * include/grub/normal.h (grub_halt_init): New prototype.
1552 (grub_halt_fini): Likewise.
1553 (grub_reboot_init): Likewise.
1554 (grub_reboot_fini): Likewise.
1555
1556 * util/grub-emu.c: Include signal.h.
1557 (main_env): New global variable.
1558 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
1559 catch C-c.
1560 (grub_machine_fini): New function.
1561 (main): Call grub_halt_init and grub_reboot_init before
1562 grub_main, and grub_reboot_fini and grub_halt_fini after it.
1563 Call setjmp with MAIN_ENV to go back afterwards.
1564 Call grub_machine_fini right before return.
1565
1566 * include/grub/util/misc.h: Include setjmp.h.
1567 (main_env): New prototype.
1568
1569 * include/grub/kernel.h (grub_machine_fini): New prototype.
1570 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
1571 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
1572
1573 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
1574 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
1575 * term/i386/pc/console.c (grub_console_fini): Likewise.
1576
1577 * util/i386/pc/misc.c: New file.
1578
1579 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
1580 util/i386/pc/misc.c, commands/i386/pc/halt.c and
1581 commands/i386/pc/reboot.c.
1582
c642636f 15832005-02-14 Guillem Jover <guillem@hadrons.org>
1584
1585 * include/grub/dl.h (grub_dl_check_header): New prototype.
1586 (grub_arch_dl_check_header): Change return type to grub_err_t,
1587 remove size parameter and export function. Update all callers.
1588 * kern/dl.c (grub_dl_check_header): New function.
1589 (grub_dl_load_core): Use `grub_dl_check_header' instead of
1590 `grub_arch_dl_check_header'. Check ELF type. Check if sections
1591 are inside the core.
1592 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
1593 independent ELF header checks.
1594 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
1595 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
1596 `grub_dl_check_header' instead of explicit checks. Check for the
1597 ELF type.
1598 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
1599 `grub_dl_check_header' instead of explicit checks. Remove arch
1600 specific ELF header checks.
1601
e6b92c8a 1602 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
1603 argument SIZE.
1604
5eabe94b 16052005-02-13 Hollis Blanchard <hollis@penguinppc.org>
1606
1607 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
1608 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
1609
1b14a681 16102005-02-12 Hollis Blanchard <hollis@penguinppc.org>
1611
1612 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
1613 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
1614 (part_map_iterate): Clear `grub_errno' and return 0 if
1615 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
1616 * partmap/amiga.c (amiga_partition_map_iterate): Return
1617 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
1618 * partmap/apple.c (apple_partition_map_iterate): Likewise.
1619
aca108aa 16202005-02-01 Guillem Jover <guillem@hadrons.org>
1621
1622 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
1623 help info.
1624
c9f9c556 16252005-01-31 Marco Gerards <metgerards@student.han.nl>
1626
1627 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
1628 Removed prototype.
1629 (grub_rescue_cmd_linux): New prototype.
1630 (grub_rescue_cmd_initrd): Likewise.
1631 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
1632 `bi_rec'.
1633 (grub_linux_release_mem): Release the memory for the initrd.
1634 (grub_load_linux): Renamed from this...
1635 (grub_rescue_cmd_linux): ...To this. Changed all callers.
1636 Changed `entry' not to be static. Loop over memory regions to
1637 find another one when the default fails.
1638 (grub_rescue_cmd_initrd): New function.
1639 (grub_linux_init): Remove function.
1640 (grub_linux_fini): Likewise.
1641 (GRUB_MOD_INIT): Register `initrd'.
1642 (GRUB_MOD_FINI): Unregister `initrd'.
1643 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
1644 Function removed.
1645 (grub_linux_normal_fini): Likewise.
1646 (GRUB_MOD_INIT): Register `initrd'.
1647 (GRUB_MOD_FINI): Unregister `initrd'.
1648
990cf3aa 16492005-01-31 Marco Gerards <metgerards@student.han.nl>
1650
1651 * commands/help.c: New file.
1652 * normal/arg.c (show_help): Renamed to...
1653 (grub_arg_show_help): ... this.
1654 * commands/i386/pc/halt.c: New file.
1655 * commands/i386/pc/reboot.c: Likewise.
1656 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
1657 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
1658 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
1659 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
1660 variables.
1661 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1662 `commands/help.c'.
1663 (pkgdata_MODULES): Add `help.mod'.
1664 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
1665 * grub/i386/pc/init.h (grub_reboot): New prototype.
1666 (grub_halt): Likewise.
1667 * include/grub/normal.h (grub_arg_show_help): New prototype.
1668 (grub_help_init): Likewise.
1669 (grub_help_fini): Likewise.
1670 * util/grub-emu.c (main): Initialize and deinitialize the help
1671 command.
1672
1673 * normal/cmdline.c (grub_cmdline_get): Doc fix.
1674
1675 * normal/command.c (grub_command_init): Fixed the description of
1676 the `set' and `unset' commands.
1677
16782005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 1679
1680 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
1681 function.
1682 * commands/ieee1275/halt.c: New file.
1683 * commands/ieee1275/reboot.c: Likewise.
1684 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
1685 `__attribute__ ((unused))'. Some GCS related fixed.
1686 (grub_suspend_init) [GRUB_UTIL]: Function removed.
1687 (grub_suspend_fini): Likewise.
1688 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
1689 and `halt.mod'.
1690 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
1691 (halt_mod_CFLAGS): New variables.
1692 * include/grub/powerpc/ieee1275/ieee1275.h
1693 (grub_ieee1275_interpret): New prototype.
1694
1ab09cc7 16952005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
1696
1697 * include/grub/misc.h (memmove): New prototype.
1698 (memcpy): Likewise.
1699
8b8cbdb2 17002005-01-22 Hollis Blanchard <hollis@penguinppc.org>
1701
1702 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
1703 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
1704
e3741a27 17052005-01-22 Marco Gerards <metgerards@student.han.nl>
1706
1707 * kern/misc.c (grub_strndup): Function rewritten.
1708
776bd780 17092005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
1710
1711 * normal/menu.c (TERM_WIDTH): Macro redefined.
1712 (TERM_TOP_BORDER_Y): Likewise.
1713 (draw_border): Replaced while-loop by a for-loop. Make the number
1714 of lines consistent with the number of lines displayed in
1715 print_entries. Added a margin below the rectangle.
1716 (print_entry): Make the entry fit in the rectangle.
1717 (print_entries): Display the scroll arrows next to the right
1718 border.
1719
78026bce 17202005-01-21 Marco Gerards <metgerards@student.han.nl>
1721
1722 * fs/minix.c (grub_minix_find_file): Reserve more space for
1723 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
1724 `grub_strncpy' to copy `path' into it.
1725
67bbaf0f 17262005-01-21 Marco Gerards <metgerards@student.han.nl>
1727
1728 Add the loopback device, a device via which files can be accessed
1729 as devices.
1730
1731 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
1732 (pkgdata_MODULES): Add loopback.mod.
1733 (loopback_mod_SOURCES): New variable.
1734 (loopback_mod_CFLAGS): Likewise.
1735 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1736 `disk/loopback.c'.
1737 (pkgdata_MODULES): Add loopback.mod.
1738 (loopback_mod_SOURCES): New variable.
1739 (loopback_mod_CFLAGS): Likewise.
1740 * disk/loopback.c: new file.
1741 * include/grub/normal.h (grub_loop_init): New prototype.
1742 (grub_loop_fini): New prototype.
1743 * util/grub-emu.c (main): Initialize and de-initialize loopback
1744 support.
1745 * include/grub/disk.h (grub_disk_dev_id): Add
1746 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
1747
6f1c18bd 17482005-01-20 Hollis Blanchard <hollis@penguinppc.org>
1749
1750 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
1751 function.
1752 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
1753 (suspend_mod_SOURCES): New variable.
1754 (suspend_mod_CFLAGS): Likewise.
1755 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
1756 New prototype.
1757 * commands/ieee1275/suspend.c: New file.
1758
b38551da 17592005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
1760
1761 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
1762 ((unused))' to `__attribute__ ((used))'.
1763 (GRUB_MOD_FINI): Likewise.
1764 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
1765 * genmk.rb (PModule): Assign space to common symbols when linking
1766 modules.
1767
777aff39 17682005-01-20 Marco Gerards <metgerards@student.han.nl>
1769
1770 * include/grub/mm.h (grub_mm_init_region): Change the type of the
1771 `unsigned' arguments to `grub_size_t'.
1772 (grub_malloc): Likewise.
1773 (grub_realloc): Likewise.
1774 (grub_memalign): Likewise.
1775 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
1776 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
1777 * util/misc.c (grub_malloc): Likewise.
1778 (grub_realloc): Likewise.
1779 * kern/mm.c (get_header_from_pointer): Change the casts to
1780 `unsigned' into a cast to `grub_size_t'.
1781
1782 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
1783 point to `currnode' when `currnode' is changed.
1784
1785 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
1786 Schottelius <nico-linux@schottelius.org>.
1787
d0ff18e1 17882005-01-09 Hollis Blanchard <hollis@penguinppc.org>
1789
1790 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
1791 (note_path): Remove variable.
1792 (GRUB_IEEE1275_NOTE_NAME): New macro.
1793 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
1794 (grub_ieee1275_note_hdr): New structure.
1795 (grub_ieee1275_note_desc): Likewise.
1796 (grub_ieee1275_note): Likewise.
1797 (load_note): Remove `dir' argument. All callers updated. Remove
1798 `note_img' and `path'. Do not load a file from `note_path'.
1799 Initialize a struct grub_ieee1275_note and write that to `out'.
1800 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
1801
4ca7004c 18022005-01-05 Marco Gerards <metgerards@student.han.nl>
1803
1804 * util/misc.c (grub_util_read_image): Revert last change. It
1805 called `grub_util_read_at', which seeks from the beginning of the
1806 file.
1807
0b412211 18082005-01-04 Hollis Blanchard <hollis@penguinppc.org>
1809
1810 * TODO: Add note about endianness in grub-mkimage.
1811 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
1812 section.
1813 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
1814 (grub_mkimage_SOURCES): New target.
1815 * include/grub/kernel.h (grub_start_addr): Remove variable.
1816 (grub_end_addr): Likewise.
1817 (grub_total_module_size): Likewise.
1818 (grub_kernel_image_size): Likewise.
1819 (GRUB_MODULE_MAGIC): New constant.
1820 (grub_module_info): New structure.
1821 (grub_arch_modules_addr): New prototype.
1822 (grub_get_end_addr): Remove prototype.
1823 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
1824 * include/grub/powerpc/ieee1275/kernel.h: New file.
1825 * include/grub/util/misc.h (grub_util_get_fp_size): New
1826 prototype.
1827 (grub_util_read_at): Likewise.
1828 (grub_util_write_image_at): Likewise.
1829 * kern/main.c (grub_get_end_addr): Remove function.
1830 (grub_load_modules): Call grub_arch_modules_addr instead of using
1831 grub_end_addr. Look for a grub_module_info struct in memory. Use
1832 the grub_module_info fields instead of calling grub_get_end_addr
1833 as loop conditions. Move grub_add_unused_region code here.
1834 (grub_add_unused_region): Remove function.
1835 * kern/i386/pc/init.c: Include grub/cache.h.
1836 (grub_machine_init): Remove call to grub_get_end_addr. Remove
1837 one call to add_mem_region.
1838 (grub_arch_modules_addr): New function.
1839 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
1840 (grub_total_module_size): Likewise.
1841 Include grub/machine/kernel.h.
1842 (grub_arch_modules_addr): New function.
1843 * util/grub-emu.c (grub_end_addr): Remove variable.
1844 (grub_total_module_size): Likewise.
1845 (grub_arch_modules_addr): New function.
1846 * util/misc.c: Include unistd.h.
1847 (grub_util_get_fp_size): New function.
1848 (grub_util_read_at): Likewise.
1849 (grub_util_write_image_at): Likewise.
1850 (grub_util_read_image): Call grub_util_read_at.
1851 (grub_util_write_image): Call grub_util_write_image_at.
1852 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
1853 additional memory in kernel_img for a struct grub_module_info.
1854 Fill in that grub_module_info.
1855 * util/powerpc/ieee1275/grub-mkimage.c: New file.
1856
458786f8 18572005-01-03 Hollis Blanchard <hollis@penguinppc.org>
1858
1859 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
1860 New function.
1861 * include/grub/powerpc/ieee1275/ieee1275.h
1862 (grub_ieee1275_milliseconds): New prototype.
1863 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
1864 Change to 1000.
1865 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
1866 grub_ieee1275_milliseconds.
1867
ac507d1b 18682005-01-03 Hollis Blanchard <hollis@penguinppc.org>
1869
1870 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
1871 variable.
1872 (find_options): New function.
1873 (cmain): Call find_options.
1874 * include/grub/powerpc/ieee1275/ieee1275.h
1875 (grub_ieee1275_realmode): New extern variable.
1876 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
1877 grub_map if grub_ieee1275_realmode is false.
1878
6b8fd1c4 18792004-12-29 Marco Gerards <metgerards@student.han.nl>
1880
1881 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
1882 lines are inserted and make it work like readline. Reported by
1883 Vincent Pelletier <subdino2004@yahoo.fr>.
1884
8514a1e0 18852004-12-28 Marco Gerards <metgerards@student.han.nl>
1886
1887 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
1888
1889 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
1890 `kern/powerpc/cache.S'.
1891
924b6140 18922004-12-27 Marco Gerards <metgerards@student.han.nl>
1893
1894 * genmk.rb: Handle the `Program' class in the main loop. Written
1895 by Johan Rydberg <jrydberg@gnu.org>.
1896 (Program): New class.
1897 (programs): New variable.
1898 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
1899 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
1900 instead of "grub/kernel.h". Include <grub/machine/init.h>.
1901 (help_arch): Function removed.
1902 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
1903 `powerpc/libgcc.h' and `loader.h'.
1904 (pkgdata_PROGRAMS): New variable.
1905 (sbin_UTILITIES): Variable removed.
1906 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
1907 (grubof_SOURCES): Variable re-defined so it only includes the
1908 core functionality.
1909 (grubof_CFLAGS): Remove `-DGRUBOF'.
1910 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
1911 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
1912 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
1913 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
1914 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
1915 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
1916 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
1917 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
1918 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
1919 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
1920 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
1921 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
1922 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
1923 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
1924 (pc_mod_CFLAGS): New variables.
1925 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
1926 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
1927 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
1928 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
1929 Moved from here...
1930 * include/grub/i386/pc/init.h (grub_os_area_addr)
1931 (rub_os_area_size): ... to here.
1932 * include/grub/powerpc/ieee1275/ieee1275.h
1933 (grub_ieee1275_entry_fn): Export symbol.
1934 * include/grub/powerpc/ieee1275/init.h: New file.
1935 * include/grub/powerpc/libgcc.h: Likewise.
1936 * include/grub/cache.h: Likewise.
1937 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
1938 <hollis@penguinppc.org>.
1939 * kern/dl.c: Include <grub/cache.h>.
1940 (grub_dl_flush_cache): New function.
1941 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
1942 for this module.
1943 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
1944 (grub_console_init): Removed prototypes.
1945 (grub_machine_init): Don't initialize the modules anymore.
1946 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
1947 static.
1948 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
1949 Macro undef removed.
1950 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
1951 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
1952 relocation `R_PPC_REL32'. Return an error when the relocation is
1953 unknown.
1954 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
1955 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
1956 * util/misc.c (grub_arch_sync_caches): Likewise.
1957
e4b47e0c 19582004-12-19 Marco Gerards <metgerards@student.han.nl>
1959
1960 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
1961 `symlist.c', add `grubof_symlist.c'.
1962 (symlist.c): Variable removed.
1963 (grubof_HEADERS): Variable added.
1964 (grubof_symlist.c): New target.
1965 (kernel_syms.lst): Use `grubof_HEADERS' instead of
1966 `kernel_img_HEADERS'.
1967 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
1968 * kern/powerpc/dl.c: New file.
1969 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
1970 Function removed.
1971 (grub_arch_dl_relocate_symbols): Likewise.
1972 (grub_register_exported_symbols): Likewise.
1973
4ceb3636 19742004-12-13 Marco Gerards <metgerards@student.han.nl>
1975
1976 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
1977 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
1978 to fail instead. Reported by Vincent Pelletier
1979 <subdino2004@yahoo.fr>.
1980
1981 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
1982 it is not allocated. Reported by Vincent Pelletier
1983 <subdino2004@yahoo.fr>.
1984
1985 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
1986 output so the output looks better.
1987
3f1578fe 19882004-12-04 Marco Gerards <metgerards@student.han.nl>
1989
1990 Modulize the partition map support and add support for the amiga
1991 partition map.
1992
1993 * commands/ls.c: Include <grub/partition.h> instead of
1994 <grub/machine/partition.h>.
1995 * kern/disk.c: Likewise.
1996 * kern/rescue.c: Likewise.
1997 * loader/i386/pc/chainloader.c: Likewise.
1998 * normal/cmdline.c: Likewise.
1999 * kern/powerpc/ieee1275/init.c: Likewise.
2000 (grub_machine_init): Call `grub_pc_partition_map_init',
2001 `grub_amiga_partition_map_init' and
2002 `grub_apple_partition_map_init'.
2003 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
2004 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
2005 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
2006 `partition.h' and `pc_partition.h'.
2007 (grub_setup_SOURCES): Remove
2008 `disk/i386/pc/partition.c'. Add `kern/partition.c',
2009 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
2010 (grub_emu_SOURCES): Likewise.
2011 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
2012 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
2013 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
2014 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
2015 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
2016 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
2017 (grubof_SOURCES): Likewise.
2018 * disk/i386/pc/partition.c: File removed.
2019 * disk/powerpc/ieee1275/partition.c: Likewise.
2020 * include/grub/powerpc/ieee1275/partition.h: Likewise.
2021 * include/grub/i386/pc/partition.h: Likewise.
2022 * kern/partition.c: New file.
2023 * partmap/amiga.c: Likewise.
2024 * partmap/apple.c: Likewise.
2025 * partmap/pc.c: Likewise.
2026 * include/grub/partition.h: Likewise..
2027 * include/grub/pc_partition.h: Likewise.
2028 * util/grub-emu.c: Include <grub/partition.h> instead of
2029 <grub/machine/partition.h>.
2030 (main): Call `grub_pc_partition_map_init',
2031 `grub_amiga_partition_map_init' and
2032 `grub_apple_partition_map_init' and deinitialize afterwards.
2033 * util/i386/pc/biosdisk.c: Include `#include
2034 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
2035 `<grub/machine/partition.h>'.
2036 * util/i386/pc/grub-setup.c: Likewise.
2037 * util/i386/pc/biosdisk.c: Likewise.
2038 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
2039 partition information in case of a PC partition.
2040 * util/i386/pc/grub-setup.c: Include `#include
2041 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
2042 `<grub/machine/partition.h>'.
2043 (setup): Only access the PC specific partition information in case
2044 of a PC partition.
2045
0ef4ced9 20462004-11-17 Hollis Blanchard <hollis@penguinppc.org>
2047
2048 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
2049 (grub_longjmp): Likewise.
2050 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
2051 20.
2052 * normal/powerpc/setjmp.S: New file.
2053 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
2054 `normal/powerpc/setjmp.S'.
2055 (grubof_CFLAGS): Add `-DGRUBOF'.
2056 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
2057 [GRUB_UTIL && !GRUBOF].
2058
19950e29 20592004-11-16 Marco Gerards <metgerards@student.han.nl>
2060
2061 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
2062 property named `name'. Correctly handle the error returned by
2063 `grub_ieee1275_finddevice' if a device can not be opened.
2064
a2fea427 20652004-11-02 Hollis Blanchard <hollis@penguinppc.org>
2066
2067 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
2068 `actual' for negativity.
2069 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
2070 kern/fshelp.c.
2071
41ea0ea3 20722004-11-01 Marco Gerards <metgerards@student.han.nl>
2073
2074 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
2075 (PAGE_OFFSET): New macro.
2076 (CRTC_ADDR_PORT): Likewise.
2077 (CRTC_DATA_PORT): Likewise.
2078 (START_ADDR_HIGH_REGISTER): Likewise.
2079 (START_ADDR_LOW_REGISTER): Likewise.
2080 (GRAPHICS_ADDR_PORT): Likewise.
2081 (GRAPHICS_DATA_PORT): Likewise.
2082 (READ_MAP_REGISTER): Likewise.
2083 (INPUT_STATUS1_REGISTER): Likewise.
2084 (INPUT_STATUS1_VERTR_BIT): Likewise.
2085 (page): New variable.
2086 (wait_vretrace): New function.
2087 (set_read_map): Likewise.
2088 (set_start_address): Likewise.
2089 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
2090 the right page.
2091 (check_vga_mem): Take the page into account.
2092 (write_char): Likewise.
2093 (write_cursor): Likewise.
2094 (scroll_up): Likewise. Copy the page to the page that is not
2095 shown and switch between both pages.
2096 (grub_vga_putchar): Fix off by one error.
2097 (grub_vga_cls): Wait for the vertical retrace. Take the page into
2098 account.
2099
ad0bd20b 21002004-11-01 Marco Gerards <metgerards@student.han.nl>
2101
2102 Add support for iso9660 (including rockridge).
2103
2104 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
2105 (iso9660_mod_SOURCES): New variable.
2106 (iso9660_mod_CFLAGS): Likewise.
2107 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
2108 * include/grub/fs.h (grub_iso9660_init): New prototype.
2109 * util/grub-emu.c (main): Call `grub_iso9660_init'.
2110 * fs/iso9660.c: New file.
2111
2112 * include/grub/misc.h (grub_strncat): New prototype.
2113 * kern/misc.c (grub_strncat): New function.
2114
2115 * fs/hfs.c (grub_hfs_mount): Translate the error
2116 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
2117 * fs/jfs.c (grub_jfs_mount): Likewise.
2118 * fs/ufs.c (grub_ufs_mount): Likewise.
2119
a5477a59 21202004-10-28 Hollis Blanchard <hollis@penguinppc.org>
2121
2122 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
2123 which initialized BAT registers.
2124 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
2125 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
2126 Move from here...
2127 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
2128 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
2129 ... to here.
2130 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
2131 (grub_mapclaim): Likewise.
2132 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
2133 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
2134 hand.
2135
9304c1f8 21362004-10-19 Hollis Blanchard <hollis@penguinppc.org>
2137
2138 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
2139 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
2140 -ffreestanding and -msoft-float.
2141
86f4ae25 21422004-10-15 Hollis Blanchard <hollis@penguinppc.org>
2143
2144 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
2145 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
2146 set in grub_ieee1275_flags.
2147
38912228 21482004-10-14 Hollis Blanchard <hollis@penguinppc.org>
2149
2150 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
2151 prototype.
2152 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
2153 grub_console_init first.
2154 Change the memory range used for grub_ieee1275_claim and
2155 grub_mm_init_region.
2156 Print an error message if the claim fails.
2157 Include <grub/misc.h>.
2158
d1923dc8 21592004-10-13 Hollis Blanchard <hollis@penguinppc.org>
2160
2161 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
2162 Call grub_children_iterate for device nodes of type `scsi',
2163 `ide', or `ata'.
2164 (grub_ofdisk_open): Remove manual device alias resolution.
2165 Fix memory leak when device cannot be opened.
2166 * include/grub/powerpc/ieee1275/ieee1275.h
2167 (grub_children_iterate): New prototype.
2168 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
2169 New function.
2170 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
2171 Return -1 if args.size was -1.
2172
4512e4f3 21732004-10-11 Hollis Blanchard <hollis@penguinppc.org>
2174
2175 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
2176 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
2177 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
2178 Open Firmware's memory for it; claim memory from _start to _end.
2179 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
2180 (_end): New extern.
2181 (_start): Zero BSS from __bss_start to _end.
2182 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
2183 New extern.
2184 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
2185
4d61feb0 21862004-10-11 Hollis Blanchard <hollis@penguinppc.org>
2187
ad0bd20b 2188 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
2189 -1 if args.base was -1.
4d61feb0 2190
026fa2f9 21912004-10-08 Hollis Blanchard <hollis@penguinppc.org>
2192
2193 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
2194 escape sequence instead of a literal ^L. Also call
2195 grub_ofconsole_gotoxy.
2196
9f2220ef 21972004-10-03 Hollis Blanchard <hollis@penguinppc.org>
2198
2199 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
2200 void * arguments to grub_addr_t. All callers updated. Also make
2201 the `result' argument optional.
2202 (grub_ieee1275_release): change void * arguments to grub_addr_t.
2203 All callers updated.
2204
8a572cd7 22052004-09-22 Hollis Blanchard <hollis@penguinppc.org>
2206
2207 * commands/ls.c (grub_ls_list_files): Use the string following the
2208 initial ')', if present, as the filesystem path.
2209 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
2210
2211 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
2212
18aa81f2 22132004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
2214
2215 Make the source code of the menu interface more readable.
2216
2217 * normal/menu.c: Include grub/mm.h.
2218 (TERM_WIDTH): New macro.
2219 (TERM_HEIGHT): Likewise.
2220 (TERM_INFO_HEIGHT): Likewise.
2221 (TERM_MARGIN): Likewise.
2222 (TERM_SCROLL_WIDTH): Likewise.
2223 (TERM_TOP_BORDER_Y): Likewise.
2224 (TERM_LEFT_BORDER_X): Likewise.
2225 (TERM_BORDER_WIDTH): Likewise.
2226 (TERM_MESSAGE_HEIGHT): Likewise.
2227 (TERM_BORDER_HEIGHT): Likewise.
2228 (TERM_NUM_ENTRIES): Likewise.
2229 (TERM_FIRST_ENTRY_Y): Likewise.
2230 (TERM_ENTRY_WIDTH): Likewise.
2231 (TERM_CURSOR_X): Likewise.
2232 (draw_border): Use macros instead of magic numbers.
2233 (print_entry): Likewise.
2234 (print_entries): Likewise.
2235 (run_menu): Likewise. Also, handle the key 'e'.
2236 (run_menu_entry): Ignore empty command lines.
2237 (print_message): Added a new argument EDIT. If EDIT is true,
2238 print a different message.
2239 (init_page): Likewise.
2240 (edit_menu_entry): New function. Not implemented yet.
2241
b47efe30 22422004-09-17 Marco Gerards <metgerards@student.han.nl>
2243
2244 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
2245 can be loaded from normal mode.
2246
2247 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
2248 `multiboot.mod'.
2249 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
2250 (multiboot_mod_CFLAGS): New variables.
2251 * loader/i386/pc/linux_normal.c: New file.
2252 * loader/i386/pc/multiboot_normal.c: Likewise.
2253
2254 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
2255 attribute `unused'.
2256
2257 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
2258 `fdiro' to read the mode information from instead of `diro'.
2259
2260 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
2261 looking up a symlink.
2262
2263 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
2264 macro.
2265 * normal/command.c (grub_command_execute): Don't parse the
2266 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
2267 flags of the command.
2268
2269 * normal/menu.c (grub_menu_run): Fix typo.
2270
da75ac71 22712004-09-14 Hollis Blanchard <hollis@penguinppc.org>
2272
2273 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
2274
2275 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
2276 `y + 1' instead of `y - 1'.
2277
2278 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
2279
062b24c2 22802004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
2281
2282 From Hollis Blanchard <hollis@penguinppc.org>:
2283 * kern/misc.c (memmove): New alias for grub_memmove.
2284 (memcmp): New alias for grub_memcmp.
2285 (memset): New alias for grub_memset.
2286 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
2287 Change "int handle" to "grub_ieee1275_phandle_t handle".
2288 * include/grub/powerpc/ieee1275/ieee1275.h
2289 (grub_ieee1275_get_property): Likewise.
2290
8ddad845 22912004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
2292
2293 Added normal mode command `chainloader' as module chain.mod, which
2294 depends on normal.mod and _chain.mod.
2295
2296 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
2297 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
2298 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
2299 Deleted prototype.
2300 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
2301 but arguments parsing moved to ...
2302 (grub_chainloader_cmd): ... here. New function.
2303 * include/grub/i386/pc/chainloader.h: New file.
2304 * loader/i386/pc/chainloader_normal.c: Likewise.
2305
2c1f4ce3 23062004-09-11 Marco Gerards <metgerards@student.han.nl>
2307
2308 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
2309 (grub_mkimage_LDFLAGS): Likewise.
2310 (grub_emu_SOURCES): Likewise.
2311 (kernel_img_HEADERS): Added fshelp.h.
2312 * fs/ext2.c: Include <grub/fshelp.h>.
2313 (FILETYPE_REG): New macro.
2314 (FILETYPE_INO_REG): Likewise.
2315 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
2316 Changed all users.
2317 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
2318 all users.
2319 (grub_fshelp_node): New struct.
2320 (grub_ext2_data): Added member `diropen'. Changed member `inode'
2321 to a pointer.
2322 (grub_ext2_get_file_block): Removed function.
2323 (grub_ext2_read_block): New function.
2324 (grub_ext2_read_file): Replaced parameter `data' by `node'.
2325 This function was written.
2326 (grub_ext2_mount): Read the root inode. Create a diropen struct.
2327 (grub_ext2_find_file): Removed function.
2328 (grub_ext2_read_symlink): New function.
2329 (grub_ext2_iterate_dir): Likewise.
2330 (grub_ext2_open): Rewritten.
2331 (grub_ext2_dir): Rewritten.
2332 * include/grub/fshelp.h: New file.
2333 * fs/fshelp.c: Likewise.
2334
3c52136a 23352004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
2336
2337 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
2338 (print_message): Add a missing newline.
2339 (run_menu): Added timeout support.
2340 (run_menu_entry): New local function.
2341 (grub_menu_run): Added support for booting.
2342
2343 * kern/loader.c (grub_loader_is_loaded): New function.
2344
2345 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
2346 (grub_get_rtc): Exported.
2347
2348 * include/grub/i386/pc/time.h: Include grub/symbol.h.
2349 (grub_get_rtc): Exported.
2350
2351 * include/grub/normal.h (struct grub_command_list): Remove
2352 constant from the member `command'.
2353
2354 * include/grub/loader.h (grub_loader_is_loaded): Declared.
2355
2356 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
2357
2358 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
2359
aa033560 23602004-08-28 Marco Gerards <metgerards@student.han.nl>
2361
2362 Add support for the JFS filesystem.
2363
2364 * fs/jfs.c: New file.
2365 * include/grub/fs.h (grub_jfs_init): New prototype.
2366 (grub_jfs_fini): New prototype.
2367 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
2368 (grub_emu_SOURCES): Likewise.
2369 (pkgdata_MODULES): Add jfs.mod.
2370 (jfs_mod_SOURCES): New variable.
2371 (jfs_mod_CFLAGS): Likewise.
2372 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
2373 (grubof_SOURCES): Likewise.
2374 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
2375
2376 * fs/fat.c (grub_fat_find_dir): Convert the filename little
2377 endian to the host endian.
2378 (grub_fat_utf16_to_utf8): Move function from there...
2379 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
2380 the endianess of the source string anymore.
2381 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
2382
94bc45af 23832004-08-24 Marco Gerards <metgerards@student.han.nl>
2384
2385 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
2386 (grub_boot_fini) [GRUB_UTIL]: Likewise.
2387 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
2388 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
2389
2390 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
2391 (grub_hfs_iterate_dir): Make the function static. Add prototypes
2392 for `node_found' and `it_dir'.
2393 (grub_hfs_dir): Add prototype for `dir_hook'.
2394
2395 * fs/minix.c (grub_minix_get_file_block): Add prototype for
2396 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
2397 and `indir32' to silence a gcc warning.
2398
2399 * include/grub/fs.h (grub_hfs_init): New prototype.
2400 (grub_hfs_fini): Likewise.
2401
2402
97543f08 24032004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
2404
2405 Each disk device has its own id now. This is useful to make use
2406 of multiple disk devices.
2407
2408 * include/grub/disk.h (grub_disk_dev_id): New enum.
2409 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
2410 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
2411
2412 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
2413 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
2414
2415 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
2416 GRUB_DISK_DEVICE_OFDISK_ID as an id.
2417
2418 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
2419 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
2420
2421 * include/grub/disk.h (struct grub_disk_dev): Added a new member
2422 "id" which is used by the cache manager.
2423
2424 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
2425 of just "GRUB".
2426
64372eb4 24272004-08-18 Marco Gerards <metgerards@student.han.nl>
2428
2429 * fs/hfs.c: New file.
2430 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
2431 (grub_emu_SOURCES): Likewise.
2432 (pkgdata_MODULES): Add hfs.mod.
2433 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
2434 (grubof_SOURCES): Likewise.
2435 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
2436
2437 * include/grub/misc.h (grub_strncasecmp): Add prototype.
2438 * kern/misc.c (grub_strncasecmp): Add function.
2439
cc61b58f 24402004-08-14 Marco Gerards <metgerards@student.han.nl>
2441
2442 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
2443 with parentheses.
2444
2445 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
2446 (grub_ext2_dir): In case the directory entry type is unknown, read
2447 it from the inode.
2448
0ef123f6 24492004-08-02 Peter Bruin <pjbruin@dds.nl>
2450
2451 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
2452 grub_load_linux instead of grub_rescue_cmd_linux as second
2453 argument of grub_rescue_register_command.
2454
2455 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
2456
a447c5df 24572004-07-27 Marco Gerards <metgerards@student.han.nl>
2458
2459 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
2460 function.
2461 * commands/boot.c: Remove the check for `GRUB_UTIL'.
2462 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
2463 `loader/powerpc/ieee1275/linux.c',
2464 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
2465 * include/grub/powerpc/ieee1275/ieee1275.h
2466 (grub_ieee1275_release): New prototype.
2467 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
2468 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
2469 normal, boot, linux and linux_normal.
2470 * loader/powerpc/ieee1275/linux.c: New file.
2471 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2472
5a9e3546 24732004-07-12 Marco Gerards <metgerards@student.han.nl>
2474
2475 * normal/arg.c (grub_arg_parse): Correct error handling after
2476 reallocating the argumentlist (check if `argl' is not null instead
2477 of checking if `args' is not null).
2478 * kern/mm.c (grub_realloc): Return the same pointer when using the
2479 same region, instead of returning the header address.
2480
e15199cb 24812004-07-11 Marco Gerards <metgerards@student.han.nl>
2482
2483 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
2484 one block instead of two when looking for the initial partition.
2485 (grub_partition_probe): Initialize the local variable `p' with 0.
2486 Use base 10 for the grub_strtoul call.
2487 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
2488 need for one local variable.
2489 (grub_strtoul): Don't add the new value to `num', instead of that
2490 just assign it.
2491
020616c2 24922004-07-11 Marco Gerards <metgerards@student.han.nl>
2493
2494 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
2495 (pxeboot_img_SOURCES): New variable.
2496 (pxeboot_img_ASFLAGS): Likewise.
2497 (pxeboot_img_LDFLAGS): Likewise.
2498 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
2499 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
2500 <lode_leroy@hotmail.com>.
2501
6c51eb64 25022004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
2503
2504 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
2505 there was no input.
2506
cfb12aff 25072004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
2508
2509 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
2510 the history buffer logic.
2511
6eabba74 25122004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
2513
2514 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
2515 (FILETYPE_INO_SYMLINK): New macros.
2516 (grub_ext2_find_file): Check if the node is a directory using the
2517 inode stat information instead of using the filetype in the
2518 dirent. Exclude the first character of an absolute symlink.
2519 (grub_ext2_dir): Mask out the filetype part of the mode member of
2520 the inode.
2521
66e19ef8 25222004-05-24 Marco Gerards <metgerards@student.han.nl>
2523
2524 Add support for UFS version 1 and 2. Add support for the minix
2525 filesystem version 1 and 2, both the variants with 14 and 30 long
2526 filenames.
2527
2528 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
2529 fs/minix.c.
2530 (grub_emu_SOURCES): Likewise.
2531 (pkgdata_MODULES): Add ufs.mod and minix.mod.
2532 (ufs_mod_SOURCES): New variable.
2533 (ufs_mod_CFLAGS): Likewise.
2534 (minix_mod_SOURCES): Likewise.
2535 (minix_mod_CFLAGS): Likewise.
2536 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
2537 fs/minix.c.
2538 (grubof_SOURCES): Likewise.
2539 * fs/ufs.c: New file.
2540 * fs/minix.c: New file.
2541 * include/grub/fs.h (grub_ufs_init): New prototype.
2542 (grub_ufs_fini): Likewise.
2543 (grub_minix_init): Likewise.
2544 (grub_minix_fini): Likewise.
2545 * util/grub-emu.c (main): Initialize and deinitialize UFS and
2546 minix fs.
2547
cc2e748a 25482004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
2549
2550 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
2551 commands/ls.c, commands/terminal.c, commands/boot.c,
2552 commands/cmp.c and commands/cat.c.
2553 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
2554
2555 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
2556 "env.h"
2557
4b13b216 25582004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2559
2560 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
2561 and grub_, respectively. Because the conversion is trivial and
2562 mechanical, I omit the details here. Please refer to the CVS
2563 if you need more information.
2564
6a142551 25652004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
2566
2567 * include/pupa: Renamed to ...
2568 * include/grub: ... this.
2569 * util/i386/pc/pupa-mkimage.c: Renamed to ...
2570 * util/i386/pc/grub-mkimage.c: ... this.
2571 * util/i386/pc/pupa-setup.c: Renamed to ...
2572 * util/i386/pc/grub-setup.c: ... this.
2573 * util/pupa-emu.c: Renamed to ...
2574 * util/grub-emu.c: ... this.
2575
e56cdf21 25762004-03-29 Marco Gerards <metgerards@student.han.nl>
2577
2578 Add support for the newworld apple macintosh (PPC). This has been
2579 tested on the powerbook 2000 only. It only adds support for
2580 generic ieee1275 functions, console and disk support. This should
2581 be easy to port to other architectures with support for Open
2582 Firmware.
2583
2584 * configure.ac: Accept the powerpc as host_cpu. In the case of
2585 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
2586 specific tests are only executed while building for the i386.
2587 Inverse test for crosscompile.
2588 * genmk.rb (Utility): Allow assembler files.
2589 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
2590 * conf/powerpc-ieee1275.rmk: New file.
2591 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
2592 * disk/powerpc/ieee1275/partition.c: Likewise.
2593 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
2594 * include/pupa/powerpc/ieee1275/console.h: Likewise.
2595 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
2596 * include/pupa/powerpc/ieee1275/time.h: Likewise.
2597 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
2598 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
2599 * include/pupa/powerpc/ieee1275/loader.h
2600 * include/pupa/powerpc/setjmp.h: Likewise.
2601 * include/pupa/powerpc/types.h: Likewise.
2602 * kern/powerpc/ieee1275/init.c: Likewise.
2603 * kern/powerpc/ieee1275/openfw.c: Likewise.
2604 * term/powerpc/ieee1275/ofconsole.c: Likewise.
2605
2606 These files were written by Johan Rydberg
2607 (jrydberg@night.trouble.net) and I only modified them slightly.
2608
2609 * boot/powerpc/ieee1275/cmain.c: New file.
2610 * boot/powerpc/ieee1275/crt0.S: Likewise.
2611 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
2612 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
2613
8c8cc205 26142004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
2615
2616 * Makefile.in: Update copyright.
2617 * genmodsrc.sh: Likewise.
2618 * gensymlist.sh: Likewise.
2619 * term/i386/pc/vga.c: Indent correctly.
2620
2621 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
2622 bugreporting address.
2623 * util/i386/pc/pupa-setup.c (usage): Likewise,
2624 (main): Call pupa_ext2_init and pupa_ext2_fini.
2625
2626 * fs/fat.c (log2): Renamed to ...
2627 (fat_log2): ... this.
2628 All callers changed.
2629 * kern/misc.c (memcpy): Alias to pupa_memmove.
2630 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
2631 lvalue cast.
2632 * util/console.c (pupa_ncurses_fini): Return 0.
2633
2634 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
2635 Move fail label here.
2636 [__GNU__]: Don't warn when using stat.
2637 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
2638 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
2639 long int. Use strtol instead of strtoul.
2640
db1771cf 26412004-03-14 Marco Gerards <metgerards@student.han.nl>
2642
2643 * commands/boot.c: New file.
2644 * commands/cat.c: Likewise.
2645 * commands/cmp.c: Likewise.
2646 * commands/ls.c: Likewise.
2647 * commands/terminal.c: Likewise.
2648 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
2649 (pupa_register_command): Changed interface to match the new
2650 argument parser.
2651 (pupa_command_execute): Changed (almost rewritten) so it uses
2652 pupa_split_command. Added support for setting variables using the
2653 syntax `foo=bar'.
2654 (rescue_command): Changed to work with the new argument parser.
2655 (terminal_command): Moved from here to commands/terminal.c.
2656 (set_command): New function.
2657 (unset_command): New function.
2658 (insmod_command): New function.
2659 (rmmod_command): New function.
2660 (lsmod_command): New function.
2661 (pupa_command_init): Don't initialize the command terminal
2662 anymore. Initialize the commands set, unset, insmod, rmmod and
2663 lsmod.
2664 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
2665 (kernel_img_HEADERS): Add arg.h and env.h.
2666 (pupa_mkimage_LDFLAGS): Add kern/env.c.
2667 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
2668 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
2669 normal/arg.c.
2670 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
2671 terminal.mod.
2672 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
2673 (boot_mod_SOURCES): New variable.
2674 (terminal_mod_SOURCES): Likewise.
2675 (ls_mod_SOURCES): Likewise.
2676 (cmp_mod_SOURCES): Likewise.
2677 (cat_mod_SOURCES): Likewise.
2678
2679 * normal/arg.c: New file.
2680 * kern/env.c: Likewise.
2681 * include/pupa/arg.h: Likewise.
2682 * include/pupa/env.h: Likewise.
2683 * font/manager.c (font_command): Changed to match argument parsing
2684 interface changes.
2685 (PUPA_MOD_INIT): Likewise.
2686 * hello/hello.c (pupa_cmd_hello): Likewise.
2687 (PUPA_MOD_INIT): Likewise.
2688 * include/pupa/disk.h: Include <pupa/device.h>.
2689 (pupa_print_partinfo): New prototype.
2690 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
2691 (pupa_dl_get_prefix): Likewise.
2692 * include/pupa/misc.h: Include <pupa/err.h>.
2693 (pupa_isgraph): New prototype.
2694 (pupa_isdigit): Likewise.
2695 (pupa_split_cmdline): Likewise.
2696 * include/pupa/normal.h: Include <pupa/arg.h>.
2697 (pupa_command): Changed the prototype of the member `func' to
2698 match the argument parsing interface. Added member `options'.
2699 (pupa_register_command): Updated to match function.
2700 (pupa_arg_parse): New prototype.
2701 (pupa_hello_init) [PUPA_UTIL]: New prototype.
2702 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
2703 (pupa_ls_init) [PUPA_UTIL]: Likewise.
2704 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
2705 (pupa_cat_init) [PUPA_UTIL]: Likewise.
2706 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
2707 (pupa_boot_init) [PUPA_UTIL]: Likewise.
2708 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
2709 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
2710 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
2711 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
2712 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
2713 * kern/disk.c: Include <pupa/file.h>.
2714 (pupa_print_partinfo): New function.
2715 * kern/dl.c: Include <pupa/env.h>.
2716 (pupa_dl_dir): Variable removed.
2717 (pupa_dl_load): Use the environment variable `prefix' instead of
2718 the variable pupa_dl_dir.
2719 (pupa_dl_set_prefix): Function removed.
2720 (pupa_dl_get_prefix): Likewise.
2721 * kern/i386/pc/init.c: Include <pupa/env.h>.
2722 (pupa_machine_init): Use the environment variable `prefix' instead of
2723 using pupa_dl_set_prefix to set the prefix.
2724 * kern/main.c: Include <pupa/env.h>.
2725 (pupa_set_root_dev): Use the environment variable `prefix' instead of
2726 using pupa_dl_get_prefix to get the prefix.
2727 * kern/misc.c: Include <pupa/env.h>.
2728 (pupa_isdigit): New function.
2729 (pupa_isgraph): Likewise.
2730 (pupa_ftoa): Likewise.
2731 (pupa_vsprintf): Added support for printing values of the type
2732 `double'. Make it possible to format variable output when using
2733 formatting like `%1.2%f'.
2734 (pupa_split_cmdline): New function.
2735 * kern/rescue.c: Include <pupa/env.h>.
2736 (next_word): Removed function.
2737 (pupa_rescue_cmd_prefix): Likewise.
2738 (pupa_rescue_cmd_set): New function.
2739 (pupa_rescue_cmd_unset): New function.
2740 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
2741 split the command line instead of splitting it here. Added
2742 support for setting variables using the syntax `foo=bar'. Don't
2743 initialize the prefix command anymore. Initialized the set and
2744 unset commands.
2745 * normal/cmdline.c: Include <pupa/env.h>.
2746 (pupa_tab_complete): Added prototypes for print_simple_completion,
2747 print_partition_completion, add_completion, iterate_commands,
2748 iterate_dev, iterate_part and iterate_dir. Moved code to print
2749 partition information from here to kern/disk.c.
2750 (pupa_cmdline_run): Don't check if the funtion exists anymore.
2751 * normal/main.c: Include <pupa/env.h>.
2752 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
2753 instead of using pupa_dl_get_prefix to get the prefix.
2754 * term/i386/pc/vga.c: Include <pupa/arg.h>.
2755 (check_vga_mem): Cast pointers to `void *' to silence a gcc
2756 warning.
2757 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
2758 (pupa_vga_setcolor): Declare unused variables with `__attribute__
2759 ((unused))' to silence a gcc warning.
2760 (pupa_vga_setcolor): Likewise.
2761 (debug_command): Changed to match argument parsing
2762 interface changes.
2763 * util/pupa-emu.c: Include <pupa/env.h>.
2764 (options): Added 0's for unused fields to silence a gcc warning.
2765 (argp): Likewise.
2766 (main): Use the environment variable `prefix' instead of using
2767 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
2768 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
2769 and terminal.
2770
2771 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
2772 * util/misc.c: Include <malloc.h>.
2773 (pupa_malloc): Rewritten so errors are correctly reported.
2774 (pupa_realloc): Likewise.
2775 (pupa_memalign): Likewise.
2776 (pupa_mm_init_region): Declare unused variables with
2777 `__attribute__ ((unused))' to silence a gcc warning.
2778 * normal/i386/setjmp.S: Remove tab at the end of the file to
2779 silence a gcc warning.
2780 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
2781 variables with `__attribute__ ((unused))' to silence a gcc
2782 warning.
2783 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
2784 local variable i unsigned to silence a gcc warning.
2785
2786 * kern/term.c: Include <pupa/misc.h>.
2787 (pupa_more_lines): New variable.
2788 (pupa_more): Likewise.
2789 (pupa_putcode): When the pager is active pause at the end of every
2790 screen.
2791 (pupa_set_more): New function.
2792 * include/pupa/term.h (pupa_set_more): New prototype.
2793
2794
3b1139cb 27952004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
2796
2797 Now this project is GRUB 2 rather than PUPA. The location of
2798 the CVS repository was moved to GRUB's.
2799
2800 * configure.ac: Use bug-grub as the reporting address.
2801 Use GRUB instead of PUPA.
2802 Change the version number to 1.90.
2803
8367695c 28042004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
2805
2806 * genkernsyms.sh: Updated copyright information.
2807 * genmk.rb: Likewise.
2808 * genmodsrc.sh: Likewise.
2809 * gensymlist.sh: Likewise.
2810 * boot/i386/pc/boot.S: Likewise.
2811 * boot/i386/pc/diskboot.S: Likewise.
2812 * disk/i386/pc/biosdisk.c: Likewise.
2813 * disk/i386/pc/partition.c: Likewise.
2814 * font/manager.c: Likewise.
2815 * fs/ext2.c: Likewise.
2816 * fs/fat.c: Likewise.
2817 * include/pupa/boot.h: Likewise.
2818 * include/pupa/device.h: Likewise.
2819 * include/pupa/disk.h: Likewise.
2820 * include/pupa/dl.h: Likewise.
2821 * include/pupa/elf.h: Likewise.
2822 * include/pupa/err.h: Likewise.
2823 * include/pupa/file.h: Likewise.
2824 * include/pupa/font.h: Likewise.
2825 * include/pupa/fs.h: Likewise.
2826 * include/pupa/kernel.h: Likewise.
2827 * include/pupa/loader.h: Likewise.
2828 * include/pupa/misc.h: Likewise.
2829 * include/pupa/mm.h: Likewise.
2830 * include/pupa/net.h: Likewise.
2831 * include/pupa/normal.h: Likewise.
2832 * include/pupa/rescue.h: Likewise.
2833 * include/pupa/setjmp.h: Likewise.
2834 * include/pupa/symbol.h: Likewise.
2835 * include/pupa/term.h: Likewise.
2836 * include/pupa/types.h: Likewise.
2837 * include/pupa/i386/setjmp.h: Likewise.
2838 * include/pupa/i386/types.h: Likewise.
2839 * include/pupa/i386/pc/biosdisk.h: Likewise.
2840 * include/pupa/i386/pc/boot.h: Likewise.
2841 * include/pupa/i386/pc/console.h: Likewise.
2842 * include/pupa/i386/pc/init.h: Likewise.
2843 * include/pupa/i386/pc/kernel.h: Likewise.
2844 * include/pupa/i386/pc/linux.h: Likewise.
2845 * include/pupa/i386/pc/loader.h: Likewise.
2846 * include/pupa/i386/pc/memory.h: Likewise.
2847 * include/pupa/i386/pc/multiboot.h: Likewise.
2848 * include/pupa/i386/pc/partition.h: Likewise.
2849 * include/pupa/i386/pc/time.h: Likewise.
2850 * include/pupa/i386/pc/vga.h: Likewise.
2851 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
2852 * include/pupa/util/getroot.h: Likewise.
2853 * include/pupa/util/misc.h: Likewise.
2854 * include/pupa/util/resolve.h: Likewise.
2855 * kern/device.c: Likewise.
2856 * kern/disk.c: Likewise.
2857 * kern/dl.c: Likewise.
2858 * kern/err.c: Likewise.
2859 * kern/file.c: Likewise.
2860 * kern/fs.c: Likewise.
2861 * kern/loader.c: Likewise.
2862 * kern/main.c: Likewise.
2863 * kern/misc.c: Likewise.
2864 * kern/mm.c: Likewise.
2865 * kern/rescue.c: Likewise.
2866 * kern/term.c: Likewise.
2867 * kern/i386/dl.c: Likewise.
2868 * kern/i386/pc/init.c: Likewise.
2869 * kern/i386/pc/lzo1x.S: Likewise.
2870 * kern/i386/pc/startup.S: Likewise.
2871 * loader/i386/pc/chainloader.c: Likewise.
2872 * loader/i386/pc/linux.c: Likewise.
2873 * loader/i386/pc/multiboot.c: Likewise.
2874 * normal/cmdline.c: Likewise.
2875 * normal/command.c: Likewise.
2876 * normal/main.c: Likewise.
2877 * normal/menu.c: Likewise.
2878 * normal/i386/setjmp.S: Likewise.
2879 * term/i386/pc/console.c: Likewise.
2880 * term/i386/pc/vga.c: Likewise.
2881 * util/console.c: Likewise.
2882 * util/genmoddep.c: Likewise.
2883 * util/misc.c: Likewise.
2884 * util/pupa-emu.c: Likewise.
2885 * util/resolve.c: Likewise.
2886 * util/unifont2pff.rb: Likewise.
2887 * util/i386/pc/biosdisk.c: Likewise.
2888 * util/i386/pc/getroot.c: Likewise.
2889 * util/i386/pc/pupa-mkimage.c: Likewise.
2890 * util/i386/pc/pupa-setup.c: Likewise.
2891
e6eced71 28922004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
2893
2894 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
2895 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
2896 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
2897 reading and reset it after reading.
2898 (pupa_ext2_close): Return PUPA_ERR_NONE.
2899
2900 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
2901 Correct value.
2902 (struct linux_kernel_header): Add kernel_version and
2903 initrd_addr_max.
2904 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
2905 pupa_file_read succeeds.
2906 (pupa_rescue_cmd_initrd): Implement.
2907
5aded270 29082003-12-03 Marco Gerards <metgerards@student.han.nl>
2909
2910 * fs/ext2.c (pupa_ext2_label): New function.
2911 (pupa_ext2_fs): Added label.
2912 * fs/fat.c (pupa_fat_label): New function.
2913 (pupa_fat_fs): Added label.
2914 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
2915
2916 * kern/misc.c (pupa_strndup): New function.
2917 * include/pupa/misc.h (pupa_strndup): New prototype.
2918
2919 * include/pupa/normal.h: Include <pupa/err.h>.
2920 (pupa_set_history): New prototype.
2921 (pupa_iterate_commands): New prototype.
2922 * normal/cmdline.c: Include <pupa/machine/partition.h>,
2923 <pupa/disk.h>, <pupa/file.h>.
2924 (hist_size): New variable.
2925 (hist_lines): Likewise.
2926 (hist_end): Likewise.
2927 (hist_used): Likewise.
2928 (pupa_set_history): New function.
2929 (pupa_history_get): Likewise.
2930 (pupa_history_add): Likewise.
2931 (pupa_history_replace): Likewise.
2932 (pupa_tab_complete): Likewise.
2933 (pupa_cmdline_run): Added tab completion and history buffer. Tab
2934 completion shows partitionnames while completing partitions, this
2935 feature was suggested by Jeff Bailey.
2936 * normal/command.c (pupa_iterate_commands): New function.
2937 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
2938 (pupa_normal_init): Initialize history buffer.
2939 (PUPA_MOD_INIT): Likewise.
2940 (pupa_normal_fini): Free the history buffer.
2941 (PUPA_MOD_FINI): Likewise.
2942
2943 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
2944 key.
2945
2946 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
2947 * configure.ac [i386]: Check for regparam bug.
2948 (NESTED_FUNC_ATTR) [! i386]: Defined.
2949
1f7315a3 29502003-11-17 Marco Gerards <metgerards@student.han.nl>
2951
2952 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
2953 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
2954 (pupa_emu_SOURCES): New variable.
2955 (pupa_emu_LDFLAGS): Likewise.
2956 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
2957 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
2958 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
2959 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
2960 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
2961 (pupa_jmp_buf): New typedef.
2962 (pupa_setjmp) [PUPA_UTIL]: New macro.
2963 (pupa_longjmp) [PUPA_UTIL]: Likewise.
2964 * include/pupa/term.h (struct pupa_term): New member `refresh'.
2965 (pupa_refresh): New prototype.
2966 * include/pupa/util/getroot.h: New file.
2967 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
2968 it.
2969 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
2970 (pupa_rescue_cmd_cat): Likewise.
2971 (pupa_rescue_cmd_ls): Likewise.
2972 (pupa_rescue_cmd_testload): Likewise.
2973 (pupa_rescue_cmd_lsmod): Likewise.
2974 * normal/cmdline.c (pupa_cmdline_get): Likewise.
2975 * normal/menu.c (run_menu): Likewise.
2976 * kern/term.c (pupa_cls): Likewise.
2977 (pupa_refresh): New function.
2978 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
2979 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
2980 * util/console.c: New file.
2981
2982 * util/i386/pc/getroot.c: New file.
2983 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
2984 (pupa_putchar): New function.
2985 (pupa_refresh): Likewise.
2986 (xgetcwd): Function moved to ...
2987 (strip_extra_slashes): Likewise.
2988 (get_prefix): Likewise.
2989 * util/i386/pc/getroot.c: ... here.
2990 (find_root_device): Function moved and renamed to...
2991 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
2992 Changed all callers.
2993 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
2994 and renamed to...
2995 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
2996 Changed all callers.
2997 * util/misc.c (pupa_memalign): New function.
2998 (pupa_mm_init_region): Likewise.
2999 (pupa_register_exported_symbols): Likewise.
3000 (pupa_putchar): Function removed.
3001 * util/pupa-emu.c: New file.
3002
9a5c1ade 30032003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
3004
3005 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
3006 (_multiboot_mod_SOURCES): New variable.
3007 (_multiboot_mod_CFLAGS): Likewise.
3008 * loader/i386/pc/multiboot.c: New file.
3009 * include/pupa/i386/pc/multiboot.h: Likewise.
3010 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
3011 (pupa_multiboot_real_boot): New function.
3012 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
3013 (pupa_multiboot_real_boot): New prototype.
3014 (pupa_rescue_cmd_multiboot): Likewise
3015 (pupa_rescue_cmd_module): Likewise.
3016
3017 * kern/loader.c (pupa_loader_set): Continue when
3018 pupa_loader_unload_func() fails.
3019 (pupa_loader_unset): New function.
3020 * include/pupa/loader.h (pupa_loader_unset): New prototype.
3021
3022 * kern/misc.c (pupa_stpcpy): New function.
3023 * include/pupa/misc.h (pupa_stpcpy): New prototype.
3024
8e72a9c0 30252003-11-12 Marco Gerards <metgerards@student.han.nl>
3026
3027 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
3028 for available extensions.
3029
3030 * include/pupa/i386/pc/time.h: New file.
3031 * kern/disk.c: Include <pupa/machine/time.h>.
3032 (PUPA_CACHE_TIMEOUT): New macro.
3033 (pupa_last_time): New variable.
3034 (pupa_disk_open): Flush the cache when there was a timeout.
3035 (pupa_disk_close): Reset the timer.
3036 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
3037 pupa_currticks.
3038 * util/misc.c: Include <sys/times.h>
3039 (pupa_get_rtc): New function.
3040
c4adbd32 30412003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
3042
3043 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
3044 as blocks.
3045 (pupa_ext2_get_file_block): Use blocks member.
3046
3047 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
3048 first block. Return -1 instead of pupa_errno on error.
3049
bfd30f06 30502003-10-27 Marco Gerards <metgerards@student.han.nl>
3051
3052 * README: In the pupa-mkimage example use _chain instead of chain
3053 and ext2 instead of fat.
3054 * TODO: Replace ext2fs with jfs as an example. Add an item for
3055 adding journal playback for ext2fs.
3056 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
3057 (pkgdata_MODULES): Added ext2.mod.
3058 (ext2_mod_SOURCES): New variable.
3059 (ext2_mod_CFLAGS): Likewise.
3060 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
3061 * include/pupa/misc.h (pupa_strncpy): New prototype.
3062 (pupa_strcat): Likewise.
3063 (pupa_strncmp): Likewise.
3064 * kern/misc.c (pupa_strcat): Enable function.
3065 (pupa_strncpy): New function.
3066 (pupa_strncmp): Likewise.
3067 * fs/ext2.c: New file.
3068
3069 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
3070 when the read failed before retrying.
3071 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
3072 (_FILE_OFFSET_BITS): Likewise.
3073 * configure.ac: Added AC_SYS_LARGEFILE.
3074
98d15063 30752003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
3076
3077 * genmk.rb (PModule#rule): Make sure to get only symbol names
3078 from the output of nm.
3079 Reported by Robert Millan <zeratul2@wanadoo.es>.
3080
18d9c7cd 30812003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
3082
3083 I forgot to check in these changes for a long time. This adds
3084 incomplete support for VGA console, and this is still very
3085 buggy. Also, a lot of consideration is required for I18N,
3086 UNICODE, and VGA font issues. Therefore, assume that this is
3087 such that "better than nothing".
3088
3089 * font/manager.c: New file.
3090 * include/pupa/font.h: Likewise.
3091 * include/pupa/i386/pc/vga.h: Likewise.
3092 * term/i386/pc/vga.c: Likewise.
3093 * util/unifont2pff.rb: Likewise.
3094
3095 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
3096 (pkgdata_MODULES): Added vga.mod and font.mod.
3097 (vga_mod_SOURCES): New variables.
3098 (vga_mod_CFLAGS): Likewise.
3099 (font_mod_SOURCES): Likewise.
3100 (font_mod_CFLAGS): Likewise.
3101
3102 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
3103
3104 * include/pupa/term.h: Include pupa/err.h.
3105 (struct pupa_term): Added init and fini.
3106 Changed the argument of putchar to pupa_uint32_t.
3107
3108 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
3109 (pupa_console_real_putchar): New prototype.
3110 (pupa_console_putchar): Removed.
3111 (pupa_console_checkkey): Exported.
3112 (pupa_console_getkey): Likewise.
3113
3114 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
3115 characters.
3116
3117 * kern/term.c (pupa_term_set_current): Rewritten.
3118 (pupa_putchar): Likewise.
3119 (pupa_putcode): New function.
3120
3121 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
3122 (pupa_console_real_putchar): ... this.
3123 (pupa_vga_set_mode): New function.
3124 (pupa_vga_get_font): Likewise.
3125
3126 * normal/command.c: Include pupa/term.h.
3127 (terminal_command): New function.
3128 (pupa_command_init): Register the command "terminal".
3129
3130 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
3131 (DISP_UP): Likewise.
3132 (DISP_RIGHT): Likewise.
3133 (DISP_DOWN): Likewise.
3134 (DISP_HLINE): Likewise.
3135 (DISP_VLINE): Likewise.
3136 (DISP_UL): Likewise.
3137 (DISP_UR): Likewise.
3138 (DISP_LL): Likewise.
3139 (DISP_LR): Likewise.
3140
3141 * term/i386/pc/console.c (pupa_console_putchar): New function.
3142
977329f5 31432003-02-08 NIIBE Yutaka <gniibe@m17n.org>
3144
3145 * util/resolve.c (pupa_util_resolve_dependencies): BUG
3146 FIX. Reverse the path_list.
3147
3148 * include/pupa/normal.h: Export pupa_register_command and
3149 pupa_unregister_command.
3150
3151 * hello/hello.c (pupa_cmd_hello): New module.
3152 * conf/i386-pc.rmk: Added hello.mod.
3153
1f5ab428 31542003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
3155
3156 * kern/i386/pc/lzo1x.S: New file.
3157
3158 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
3159 (compress_kernel): New variable.
3160 (generate_image): Heavily modified to support compressing a
3161 large part of the core image.
3162
3163 * util/misc.c (pupa_util_read_image): Fix a file descriptor
3164 leak.
3165 (pupa_util_load_image): New function.
3166
3167 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
3168 (pupa_compressed_size): New variable.
3169 (codestart): Enable Gate A20 here.
3170 Decompress the compressed part of the core image.
3171 Rearrange the code to put functions and variables which are
3172 required for initialization in the non-compressed part.
3173 Include lzo1x.S.
3174
3175 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
3176 here.
3177
3178 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
3179
3180 * include/pupa/i386/pc/kernel.h
3181 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
3182 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
3183 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
3184 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
3185 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
3186
3187 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
3188
3189 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
3190 (Utility#rule): Likewise.
3191
3192 * configure.ac: Check if LZO is available.
3193
ce5bf700 31942003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
3195
3196 * include/pupa/normal.h: New file.
3197 * include/pupa/setjmp.h: Likewise.
3198 * include/pupa/i386/setjmp.h: Likewise.
3199 * normal/cmdline.c: Likewise.
3200 * normal/command.c: Likewise.
3201 * normal/main.c: Likewise.
3202 * normal/menu.c: Likewise.
3203 * normal/i386/setjmp.S: Likewise.
3204
3205 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
3206 (pupa_rescue_cmd_initrd): Likewise.
3207
3208 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
3209 Likewise.
3210
3211 * kern/i386/pc/startup.S (translation_table): New variable.
3212 (translate_keycode): New function.
3213 (pupa_console_getkey): Call translate_keycode.
3214
3215 * kern/rescue.c (attempt_normal_mode): New function.
3216 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
3217 it failed, print a message.
3218
3219 * kern/mm.c (pupa_real_malloc): Print more information when a
3220 free magic is broken.
3221 (pupa_free): If the first free header is not free actually, set
3222 it to P.
3223
3224 * kern/main.c (pupa_load_normal_mode): Just load the module
3225 "normal".
3226 (pupa_main): Don't print the message
3227 "Entering into rescue mode..." here.
3228
3229 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
3230 Declared.
3231 (pupa_rescue_cmd_initrd): Likewise.
3232 (pupa_rescue_cmd_initrd): Likewise.
3233
3234 * include/pupa/symbol.h (FUNCTION): Specify the type.
3235 (VARIABLE): Likewise.
3236
3237 * include/pupa/err.h (pupa_err_t): Added
3238 PUPA_ERR_UNKNOWN_COMMAND.
3239
3240 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
3241 (pupa_dl_get_prefix): Likewise.
3242
3243 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
3244 Added _chain.mod and _linux.mod instead of chain.mod and
3245 linux.mod.
3246 (chain_mod_SOURCES): Renamed to ...
3247 (_chain_mod_SOURCES): ... this.
3248 (chain_mod_CFLAGS): Renamed to ...
3249 (_chain_mod_CFLAGS): ... this.
3250 (linux_mod_SOURCES): Renamed to ...
3251 (_linux_mod_SOURCES): ... this.
3252 (linux_mod_CFLAGS): Renamed to ...
3253 (_linux_mod_CFLAGS): ... this.
3254 (normal_mod_SOURCES): New variable.
3255 (normal_mod_CFLAGS): Likewise.
3256 (normal_mod_ASFLAGS): Likewise.
3257
32582003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
3259
3260 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
3261 possible.
3262
3263 * kern/dl.c (pupa_dl_ref): Refer dependending modules
3264 recursively.
3265 (pupa_dl_unref): Unrefer depending modules recursively.
3266 Don't call pupa_dl_unload implicitly, because PUPA can crash if
3267 a module is unloaded before one depending on that module is
3268 unloaded.
3269 (pupa_dl_unload): Unload depending modules explicitly,
3270 if possible.
3271
c04da074 32722003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
3273
3274 * include/pupa/i386/pc/linux.h: New file.
3275 * loader/i386/pc/linux.c: Likewise.
3276
3277 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
3278 Removed.
3279 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
3280 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
3281 of PUPA_CHAINLOADER_BOOT_SECTOR.
3282
3283 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
3284 (pupa_linux_prot_size): New variable.
3285 (pupa_linux_tmp_addr): Likewise.
3286 (pupa_linux_real_addr): Likewise.
3287 (pupa_linux_boot_zimage): New function.
3288 (pupa_linux_boot_bzimage): Likewise.
3289
3290 * kern/i386/pc/init.c (struct mem_region): New structure.
3291 (MAX_REGIONS): New macro.
3292 (mem_regions): New variable.
3293 (num_regions): Likewise.
3294 (pupa_os_area_addr): Likewise.
3295 (pupa_os_area_size): Likewise.
3296 (pupa_lower_mem): Likewise.
3297 (pupa_upper_mem): Likewise.
3298 (add_mem_region): New function.
3299 (compact_mem_regions): Likewise.
3300 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
3301 the size of the conventional memory and that of so-called upper
3302 memory (before the first memory hole).
3303 Instead of adding each found region to free memory, use
3304 add_mem_region and add them after removing overlaps.
3305 Also, add only 1/4 of the upper memory to free memory. The rest
3306 is used for loading OS images. Maybe this is ad hoc, but this
3307 makes it much easier to relocate OS images when booting.
3308
3309 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
3310 (pupa_enter_rescue_mode): Don't register initrd and module.
3311
3312 * kern/mm.c: Include pupa/dl.h.
3313
3314 * kern/main.c: Include pupa/file.h and pupa/device.h.
3315
3316 * kern/loader.c (pupa_loader_load_module_func): Removed.
3317 (pupa_loader_load_module): Likewise.
3318
3319 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
3320 ``.o''.
3321
3322 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
3323 (pupa_linux_tmp_addr): Likewise.
3324 (pupa_linux_real_addr): Likewise.
3325 (pupa_linux_boot_zimage): Likewise.
3326 (pupa_linux_boot_bzimage): Likewise.
3327
3328 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
3329 (pupa_upper_mem): Likewise.
3330 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
3331 module is too dangerous.
3332
3333 * include/pupa/loader.h (pupa_os_area_addr): Declared.
3334 (pupa_os_area_size): Likewise.
3335 (pupa_loader_set): Remove the first argument. Loader doesn't
3336 manage modules or initrd any longer.
3337 (pupa_loader_load_module): Removed.
3338
3339 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
3340 (linux_mod_SOURCES): New variable.
3341 (linux_mod_CFLAGS): Likewise.
3342
a13f9237 33432003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
3344
3345 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
3346 the length of a blocklist correctly.
3347
3348 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
3349 Use ioctl only if the OS file is a block device.
3350 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
3351 not very useful for normal files.
3352
3353 * kern/main.c (pupa_set_root_dev): New function.
3354 (pupa_load_normal_mode): Likewise.
3355 (pupa_main): Call those above.
3356
3357 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
3358 pupa_uint16_t.
3359
3360 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
3361
a5ffe966 33622003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
3363
3364 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
3365 (setup): Configure the installed partition information and the
3366 dl prefix.
3367
3368 * loader/i386/pc/chainloader.c (my_mod): New variable.
3369 (pupa_chainloader_unload): New function.
3370 (pupa_rescue_cmd_chainloader): Refer itself.
3371 (PUPA_MOD_INIT): Save its own module in MY_MOD.
3372
3373 * kern/i386/pc/startup.S (install_partition): Removed.
3374 (version_string): Likewise.
3375 (config_file): Likewise.
3376 (pupa_install_dos_part): New variable.
3377 (pupa_install_bsd_part): Likewise.
3378 (pupa_prefix): Likewise.
3379 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
3380
3381 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
3382 and pupa/misc.h.
3383 (make_install_device): New function.
3384 (pupa_machine_init): Set the dl prefix.
3385
3386 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
3387 (buf): Renamed to ...
3388 (linebuf): ... this.
3389 (pupa_rescue_cmd_prefix): New function.
3390 (pupa_rescue_cmd_insmod): Likewise.
3391 (pupa_rescue_cmd_rmmod): Likewise.
3392 (pupa_rescue_cmd_lsmod): Likewise.
3393 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
3394 rmmod and lsmod.
3395
3396 * kern/mm.c (pupa_memalign): If failed even after invalidating
3397 disk caches, unload unneeded modules and retry.
3398
3399 * kern/misc.c (pupa_memmove): New function.
3400 (pupa_memcpy): Removed.
3401 (pupa_strcpy): New function.
3402 (pupa_itoa): Made static.
3403
3404 * kern/dl.c (pupa_dl_iterate): New function.
3405 (pupa_dl_ref): Likewise.
3406 (pupa_dl_unref): Likewise.
3407 (pupa_dl_unload): Return if succeeded or not.
3408 (pupa_dl_unload_unneeded): New function.
3409 (pupa_dl_unload_all): Likewise.
3410 (pupa_dl_init): Renamed to ...
3411 (pupa_dl_set_prefix): ... this.
3412 (pupa_dl_get_prefix): New function.
3413
3414 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
3415 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
3416 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
3417 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
3418 (pupa_install_dos_part): Declared.
3419 (pupa_install_bsd_part): Likewise.
3420 (pupa_prefix): Likewise.
3421 (pupa_boot_drive): Likewise.
3422
3423 * include/pupa/types.h: Fix a typo.
3424
3425 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
3426 pupa_memmove.
3427 (pupa_memmove): Declared.
3428 (pupa_strcpy): Likewise.
3429
3430 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
3431 pupa_mod_init takes one argument, its own module.
3432 (pupa_dl_unload_unneeded): Declared.
3433 (pupa_dl_unload_all): Likewise.
3434 (pupa_dl_ref): Likewise.
3435 (pupa_dl_unref): Likewise.
3436 (pupa_dl_iterate): Likewise.
3437 (pupa_dl_init): Renamed to ...
3438 (pupa_dl_set_prefix): ... this.
3439 (pupa_dl_get_prefix): Declared.
3440
3441 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
3442 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
3443 unloaded.
3444 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
3445 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
3446
3447 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
3448 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
3449
012d7999 34502003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
3451
3452 * util/i386/pc/pupa-setup.c (setup): Define the internal
3453 function find_first_partition_start at the top level, because GCC
3454 3.0.x cannot compile internal functions in deeper scopes
3455 correctly.
3456 (find_root_device): Use lstat instead of stat.
3457 Don't follow symbolic links.
3458 Fix the path-constructing code.
3459
3460 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
3461 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
3462 by a BLKGETSIZE ioctl first, because block devices don't fill
3463 the member st_mode of the structure stat on Linux.
3464 [__linux__] (linux_find_partition): Use a temporary buffer
3465 REAL_DEV for the working space. Copy it to DEV before returning.
3466 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
3467 buffer cache consistent.
3468 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
3469 strncmp. The previous value was merely wrong.
3470 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
3471
3472 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
3473 FAT size is 12. The previous value was merely wrong.
3474
3475 * kern/main.c (pupa_main): Don't split the starting message from
3476 newlines.
3477
3478 * kern/term.c (pupa_putchar): Put CR after LF instead of before
3479 LF, because BIOS goes crazy about character attributes in this
3480 case.
3481
1cc73a62 34822003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
3483
3484 * include/i386/pc/util/biosdisk.h: New file.
3485 * util/i386/pc/biosdisk.c: Likewise.
3486 * util/i386/pc/pupa-setup.c: Likewise.
3487
3488 * Makefile.in (INCLUDE_DISTFILES): Added
3489 include/pupa/i386/pc/util/biosdisk.h.
3490 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
3491 directory util/i386/pc.
3492 (install-local): Added a rule for sbin_UTILITIES.
3493 (uninstall): Likewise.
3494
3495 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
3496
3497 * util/misc.c (xrealloc): New function.
3498 (pupa_malloc): Likewise.
3499 (pupa_free): Likewise.
3500 (pupa_realloc): Likewise.
3501 (pupa_stop): Likewise.
3502 (pupa_putchar): Likewise.
3503
3504 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
3505
3506 * include/pupa/util/misc.h (xrealloc): Declared.
3507
3508 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
3509 macro.
3510 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
3511 (PUPA_BOOT_MACHINE_BPB_END): ... this.
3512
3513 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
3514 [PUPA_UTIL] (pupa_fat_fini): Likewise.
3515
3516 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
3517 way should be implemented.
3518 [PUPA_UTIL] (pupa_fat_fini): Likewise.
3519
3520 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
3521 the size of NAME for safety.
3522 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
3523 0x88.
3524
3525 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
3526 (pupa_setup_SOURCES): Likewise.
3527
3528 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
3529
08b70fe8 35302002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
3531
3532 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
3533 bunch of pushl's from pusha, because this destroys the return
3534 value.
3535
62ddcc8f 35362002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
3537
3538 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
3539 This means that any missing prototypes could be fatal. Also, you
3540 must take care when writing assembly code. See the comments at
3541 the beginning of startup.S, for more details.
3542
3543 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
3544 compilation mechanism.
3545 (pupa_chainloader_real_boot): Likewise.
3546 (pupa_biosdisk_rw_int13_extensions): Likewise.
3547 (pupa_biosdisk_rw_standard): Likewise.
3548 (pupa_biosdisk_check_int13_extensions): Likewise.
3549 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
3550 (pupa_biosdisk_get_diskinfo_standard): Likewise.
3551 (pupa_get_memsize): Likewise.
3552 (pupa_get_mmap_entry): Likewise.
3553 (pupa_console_putchar): Likewise.
3554 (pupa_console_setcursor): Likewise.
3555 (pupa_getrtsecs): Use pushl instead of push.
3556
3557 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
3558 memory instead of the stack for a mmap entry, because some
3559 BIOSes may ignore the maximum size and overflow.
3560
3561 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
3562
3563 * genmk.rb (PModule#rule): Compile automatically generated
3564 sources with module-specific CFLAGS as well as other sources.
3565
9962ed99 35662002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
3567
3568 * configure.ac: Check ld.
3569 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
3570 respectively, before checking endianness and sizes.
3571
3572 * Makefile.in (LD): New variable.
3573
abdfc3c5 35742002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
3575
3576 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
3577
6a161fa9 35782002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
3579
3580 * Changelog: New file.
3581