]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
[grub2.git] / ChangeLog
CommitLineData
f4917dfd 12005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
2
3 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
4 negative, unload the module.
5
6 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
7 map is "pc_partition_map" but not "pc".
8 (usage): Fix the description. The options are --boot-image and
9 --core-image but not --boot-file or --core-file.
10 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
11 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
12 DEFAULT_DIRECTORY.
13
14 * util/i386/pc/grub-install.in: Do not specify --boot-file or
15 --core-file. Specify INSTALL_DEVICE as an argument.
16
17 * util/console.c: Include config.h.
18 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
19 [HAVE_NCURSES_H]: Include ncurses.h.
20 [HAVE_CURSES_H]: Include curses.h.
21 [!A_NORMAL] (A_NORMAL): Defined as zero.
22 [!A_STANDOUT] (A_STANDOUT): Likewise.
23
24 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
25 -lncurses.
26 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
27
28 * configure.ac: Check for curses libraries and headers.
29
30 * Makefile.in (LIBCURSES): New variable.
31
32 * genmk.rb (Script::rule): Set the executable bits.
33
34 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
35 name of the PC partition map is "pc_partition_map" but not "pc".
36
0e143073 372005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
38
39 * util/i386/pc/grub-install.in (grub_probefs): New variable.
40 (modules): Likewise.
41 (usage): Added descriptions for --modules and --grub-probefs.
42 Handle --modules and --grub-probefs. Save the arguments in MODULES
43 and GRUB_PROBEFS, respectively.
44 Auto-detect a filesystem module against GRUBDIR. If the result is
45 empty and modules are not specified explicitly, abort the
46 installation. Add the result to MODULES.
47
48 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
49 disk/powerpc/ieee1275/ofdisk.c,
50 include/grub/powerpc/ieee1275/init.h and
51 term/powerpc/ieee1275/ofconsole.c.
52 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
53 term/ieee1275/ofconsole.c.
54
55 * include/grub/powerpc/ieee1275/console.h: Resurrected.
56
57 * COPYING: Upgraded to the latest version. Only the address of the
58 FSF office has changed.
59
efd6e6d5 602005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
61
62 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
63 kern/ieee1275.c with kern/ieee1275/of.c.
64
65 * kern/ieee1275.c: Moved to ...
66 * kern/ieee1275/of.c: ... here.
67
8ceafda2 682005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
69
70 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
71 readablity.
72
73 * config.guess: Updated to the latest version from gnulib.
74 * config.sub: Likewise.
75 * install.sh: Likewise.
76 * mkinstalldirs: Likewise.
77
78 * include/grub/console.h: Removed. This file is arch-specific. Do
79 not put this in include/grub.
80
81 * include/grub/i386/pc/console.h: Resurrected.
82
83 * util/console.c: Include grub/machine/console.h instead of
84 grub/console.h.
85 * util/grub-emu.c: Likewise.
86
267f6cd9 872005-08-04 Marco Gerards <metgerards@student.han.nl>
88
89 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
90 hardcoded value.
91
92 From Vincent Pelletier <subdino2004@yahoo.fr>
93 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
94 Redefined to use grub_getwh.
95 (grub_term): New member named getwh.
96 (grub_getwh): New prototype.
97 * kern/term.c (grub_getwh): New function.
98 * term/i386/pc/console.c (grub_console_getwh): New function.
99 (grub_console_term): New member `getwh'.
100 * term/i386/pc/vga.c (grub_vga_getwh): New function.
101 (grub_vga_term): New member `getwh'.
102 * term/sparc64/ofconsole.c (grub_ofconsole_readkey): Use
103 grub_ssize_t.
104 (grub_ofconsole_getw): New function.
105 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
106 (grub_ofconsole_term): New field named getwh and new initial
107 value.
108
3be7266d 1092005-08-03 Hollis Blanchard <hollis@penguinppc.org>
110
111 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
112 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
113 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
114 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
115 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
116 of <grub/machine/ieee1275.h>.
117 * commands/ieee1275/reboot.c: Likewise.
118 * boot/powerpc/ieee1275/ieee1275.c: Move ...
119 * kern/ieee1275.c: ... to here. All users updated. Change all
120 parameter structs to use new type `grub_ieee1275_cell_t'.
121 * term/powerpc/ieee1275/ofconsole.c: Move ...
122 * term/ieee1275/ofconsole.c: ... to here. All users updated.
123 * disk/powerpc/ieee1275/ofdisk.c: Move ...
124 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
125 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
126 to return int.
127 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
128 Remove unused prototypes. All users updated.
129 * include/grub/powerpc/ieee1275/console.h: Removed.
130 * include/grub/powerpc/ieee1275/ieee1275.h: Define
131 `grub_ieee1275_cell_t'.
132 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
133 Cast comparisons with -1 to the correct type.
134 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
135 type to match `grub_ieee1275_entry_fn'.
136
8b5f3938 1372005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
138
139 * DISTLIST: Added util/i386/pc/grub-probefs.c.
140
141 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
142 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
143 partmap/sun.c.
144 (grub_probefs_SOURCES): New variable.
145
146 * util/i386/pc/grub-probefs.c: New file.
147
148 * util/i386/pc/grub-setup.c (main): Call
149 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
150 grub_hfs_init and grub_jfs_init to initialize the system. Call
151 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
152 grub_pc_partition_map_fini to finish the system.
153
ea409713 1542005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
155
156 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
157 function.
158 (grub_multiboot_load_elf32): Likewise.
159 (grub_multiboot_is_elf64): Likewise.
160 (grub_multiboot_load_elf64): Likewise.
161 (grub_multiboot_load_elf): Likewise.
162 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
163 an ELF32 or ELF64 file.
164 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
165
166 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
167 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
168 NULL before calling FS->LABEL.
169 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
170 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
171 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
172 before calling FS->LABEL.
173
141a288b 1742005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
175
176 * util/i386/pc/grub-install.in (datadir): New variable.
177 (libdir): Removed.
178 (pkgdatadir): New variable.
179 (pkglibdir): Removed.
180
0d5f8a54 1812005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
182
183 * DISTLIST: Added util/i386/pc/grub-install.in.
184
185 * util/i386/pc/grub-install.in: New file.
186
187 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
188 (grub_install_SOURCES): Likewise.
189
190 * genmk.rb: Added support for scripts.
191 (Script): New class.
192 (scripts): New variable.
193
194 * Makefile.in (install-local): Install sbin_SCRIPTS by
195 INSTALL_SCRIPT.
196 (uninstall): Remove sbin_SCRIPTS.
197
198 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
199 device, try to get a GRUB device by
200 grub_util_biosdisk_get_grub_dev.
201 Free DEST_DEV.
202
203 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
204 description for --device-map.
205
5f968e1e 2062005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
207
208 Change the semantics of variable hooks. They now return strings
209 instead of error values.
210
211 * util/i386/pc/grub-setup.c: Include grub/env.h.
212 (setup): Use grub_device_set_root instead of grub_env_set.
213
214 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
215 grub_env_get instead of grub_device_set_root and
216 grub_device_get_root, respectively.
217
218 * kern/main.c (grub_env_write_root): New function.
219 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
220 grub_env_set instead of grub_device_set_root.
221
222 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
223 many variables.
224 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
225 rather than calling ENV->WRITE_HOOK afterwards.
226 (grub_env_get): Return the result of ENV->READ_HOOK rather than
227 passing a pointer of a pointer.
228 (grub_register_variable_hook): Change the types of "read_hook" and
229 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
230 respectively.
231 Allocate the default empty string on the heap, because this string
232 may be freed later.
233
234 * kern/device.c: Include grub/env.h.
235 (grub_device_set_root): Removed.
236 (grub_device_get_root): Likewise.
237 (grub_device_open): Use grub_env_get instead of
238 grub_device_get_root.
239
240 * include/grub/env.h (grub_env_read_hook_t): New type.
241 (grub_env_write_hook_t): Likewise.
242 (grub_env_var): Change the types of "read_hook" and "write_hook"
243 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
244 (grub_register_variable_hook): Likewise.
245
246 * include/grub/device.h (grub_device_set_root): Removed.
247 (grub_device_set_root): Likewise.
248
249 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
250 make sure that DIRNAME terminates with '/', so that
251 grub_fat_find_dir will fail if PATH is not a directory.
252
253 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
254 from DIRNAME.
255 Use the qualifier auto for print_files and print_files_long.
256 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
257 as a regular file.
258 Put a newline only if there is no error.
259 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
260 used.
261
896f0afd 2622005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
263
264 * kern/partition.c (grub_partition_probe): Initialize PART to
265 NULL. Otherwise, when no partition map is registered, this returns
266 a garbage.
267
b28b81b2 2682005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
269
270 * partmap/apple.c (apple_partition_map_iterate): Check if POS
271 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
272 valid.
273
5f3607e0 2742005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
275
276 * commands/ls.c (grub_ls_list_disks): Print the filesystem
277 information on each device, if it does not have partitions. Print
278 "Device" instead of "Disk", because this function is not specific
279 to disk devices.
280
281 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
282 static to ensure that it is put on the memory rather than a
283 register.
284
502c87e8 2852005-07-17 Yoshinori Okuji <okuji@enbug.org>
286
287 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
288 (grub_cat_init): Likewise.
289 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
290 (options): Likewise.
291 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
292 (grub_configfile_init): Likewise.
293 * font/manager.c (GRUB_MOD_INIT): Likewise.
294 * commands/help.c (GRUB_MOD_INIT): Likewise.
295 (grub_help_init): Likewise.
296 * normal/command.c (grub_command_init): Likewise.
297 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
298 * disk/loopback.c (grub_loop_init): Likewise.
299 (GRUB_MOD_INIT): Likewise.
300 * commands/ls.c (grub_ls_init): Likewise.
301 (GRUB_MOD_INIT): Likewise.
302 (options): Likewise.
303 * commands/boot.c (grub_boot_init): Likewise.
304 (GRUB_MOD_INIT): Likewise.
305 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
306 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
307 (GRUB_MOD_INIT): Likewise.
308 * commands/cmp.c (grub_cmp_init): Likewise.
309 (GRUB_MOD_INIT): Likewise.
310
311 * normal/arg.c: Use <> instead of "" to include header files.
312 (SHORT_ARG_HELP): New macro.
313 (SHORT_ARG_USAGE): Likewise.
314 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
315 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
316 descriptions.
317 (find_short): Check if C is 'h' or 'u' explicitly.
318 (grub_arg_show_help): Use space characters instead of tabs. Treat
319 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
320 are shown with --help and --usage only if they are not used for
321 the command itself.
322 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
323 'h' and 'u'.
324
325 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
326 const into "longarg". Change the type of "shortarg" to int.
327
f806d18e 3282005-07-17 Yoshinori Okuji <okuji@enbug.org>
329
330 * boot/i386/pc/boot.S (boot_drive_check): New label.
331
332 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
333 macro.
334
335 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
336 which do not pass a boot drive correctly. Copied from GRUB Legacy.
337
e293232b 3382005-07-17 Yoshinori Okuji <okuji@enbug.org>
339
340 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
341 When turning off Gate A20, skip the check and return immediately,
342 because this is not fatal usually.
343
ebedfd00 3442005-07-17 Yoshinori Okuji <okuji@enbug.org>
345
346 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
347 be 0x7C00 instead of 0x8000.
348
349 * boot/i386/pc/pxeboot.S: Rewritten.
350
351 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
352 EXT_C.
353 (gate_a20_check_state): Read a byte from 0x108000. Invert the
354 result.
355
654fc59f 3562005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
357
358 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
359 robustness. This routine now supports a BIOS call and System
360 Control Port A to modify the gate A20.
361
362 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
363 Increased to 0x440.
364
09f9923f 3652005-07-12 Hollis Blanchard <hollis@penguinppc.org>
366
367 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
368 device path and resulting ihandle.
369 (grub_ofdisk_close): dprintf the ihandle being closed.
370 (grub_ofdisk_read): dprintf function parameters.
371 * kern/mm.c (grub_mm_init_region): Likewise.
372 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
373 (grub_linux_boot): dprintf the Linux entry point, initrd address and
374 size, and boot arguments.
375 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
376 before loading into memory.
377 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
378 before loading into memory.
379
7ef504d8 3802005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
381
382 * kern/mm.c: Added much documentation.
383 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
384 8, set to 5 instead of 8.
385
e0f050c2 3862005-07-10 Yoshinori Okuji <okuji@enbug.org>
387
388 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
389
390 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
391 (grub_mkdevicemap_SOURCES): New variable.
392
393 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
394 lib/device.c of GRUB Legacy.
395
7224189a 3962005-07-10 Yoshinori Okuji <okuji@enbug.org>
397
398 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
399 instead of PATH is NULL.
400
68c864eb 4012005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
402
403 * commands/cmp.c (BUFFER_SIZE): New macro.
404 (grub_cmd_cmp): Close the right file at the right time. Compare
405 only data just read. Don't report files of different size as
406 identical. Dynamically allocate buffers. Move variable
407 declarations at the beginning of function.
408
e6f3e614 4092005-07-09 Yoshinori Okuji <okuji@enbug.org>
410
411 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
412 reverse.
413
f8f1559a 4142004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
415
416 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
417 when backspace is pressed at beginning of line.
418
39c9d41d 4192005-07-03 Yoshinori Okuji <okuji@enbug.org>
420
421 * DISTLIST: Added genfslist.sh.
422
423 * normal/main.c (fs_module_list): New variable.
424 (autoload_fs_module): New function.
425 (read_fs_list): Likewise.
426 (grub_normal_execute): Call read_fs_list.
427
428 * kern/fs.c (grub_fs_autoload_hook): New variable.
429 (grub_fs_probe): Added support for auto-loading.
430
431 * include/grub/normal.h (struct grub_fs_module_list): New struct.
432 (grub_fs_module_list_t): New type.
433
434 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
435 (grub_fs_autoload_hook): New prototype.
436
437 * genfslist.sh: New file.
438
439 * genmk.rb: Added a rule to generate a filesystem list.
440
121c1d83 4412005-06-30 Marco Gerards <metgerards@student.han.nl>
442
443 * configure.ac: Fix the test for cross-compiling.
444
445 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
446 define GRUB_UTIL anymore.
447
448 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
449 so this function works on other systems than just big endian.
450 (load_modules): Likewise.
451 (add_segments): Likewise.
452
e75d76e1 4532005-06-23 Hollis Blanchard <hollis@penguinppc.org>
454
455 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
456 contains `l' modifier, get a long from va_arg().
457
50b5a0a7 4582005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
459
460 * kern/mm.c (grub_free): If the next free block which is being
461 merged is the first free block, set the first block to the block
462 being freed.
463 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
464
89371b20 4652005-05-08 Hollis Blanchard <hollis@penguinppc.org>
466
467 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
468 `grub_ieee1275_chosen'.
469
168d6e58 4702005-05-08 Hollis Blanchard <hollis@penguinppc.org>
471
472 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
473 (grub_ieee1275_chosen): New variable.
474 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
475 `chosen'.
476 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
477 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
478 Rename first argument to `phandle' for consistency.
479 (grub_ieee1275_get_property_length): Likewise.
480 (grub_ieee1275_next_property): Likewise. Change type of first argument
481 to grub_ieee1275_phandle_t.
482 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
483 Move export next to declaration.
484 (grub_ieee1275_chosen): New variable.
485 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
486 Correct cosmetic typo.
487 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
488 `grub_ieee1275_chosen'.
489 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
490 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
491 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
492 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
493 `grub_ieee1275_chosen'.
494
ca5baa3f 4952005-05-10 Hollis Blanchard <hollis@penguinppc.org>
496
497 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
498 /chosen/bootargs.
499 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
500 /chosen/bootargs as "variable=value" pairs.
501
708b345f 5022005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
503
504 * include/grub/misc.h (grub_dprintf): New macro.
505 (grub_real_dprintf): New prototype.
506 (grub_strword): Likewise.
507 (grub_iswordseparator): Likewise.
508 * kern/misc.c (grub_real_dprintf): New function.
509 (grub_strword): Likewise.
510 (grub_iswordseparator): Likewise.
511
f4c5e67c 5122005-04-30 Hollis Blanchard <hollis@penguinppc.org>
513
514 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
515 (roundup): Remove macro.
516 (grub_ieee1275_flags): Make static.
517 (grub_ieee1275_realmode): Remove.
518 (grub_ieee1275_test_flag): New function.
519 (grub_ieee1275_set_flag): Likewise.
520 (find_options): Rename to `grub_ieee1275_find_options'; update
521 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
522 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
523 (cmain): New prototype.
524 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
525 `grub_ieee1275_flags' directly.
526 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
527 machine/biosdisk.h.
528 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
529 Don't include grub/machine/init.h.
530 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
531 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
532 Remove prototype.
533 (grub_ieee1275_realmode): Likewise.
534 (grub_ieee1275_flag): New enum.
535 (grub_ieee1275_test_flag): New prototype.
536 (grub_ieee1275_set_flag): New prototype.
537 * include/grub/powerpc/ieee1275/init.h: Remove file.
538 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
539 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
540 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
541 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
542 comment.
543 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
544 `grub_ieee1275_test_flag'.
545 (grub_ieee1275_encode_devname): Likewise.
546
ed16607e 5472005-04-21 Hollis Blanchard <hollis@penguinppc.org>
548
549 * include/grub/powerpc/ieee1275/ieee1275.h
550 (grub_ieee1275_encode_devname): New prototype.
551 (grub_ieee1275_get_filename): Likewise.
552 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
553 function.
554 (grub_set_prefix): Likewise.
555 (grub_machine_init): Call grub_set_prefix.
556 * kern/powerpc/ieee1275/openfw.c: Fix typos.
557 (grub_parse_type): New enum.
558 (grub_ieee1275_get_devargs): New function.
559 (grub_ieee1275_get_devname): Likewise.
560 (grub_ieee1275_parse_args): Likewise.
561 (grub_ieee1275_get_filename): Likewise.
562 (grub_ieee1275_encode_devname): Likewise.
563
be369920 5642005-03-30 Marco Gerards <metgerards@student.han.nl>
565
566 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
567 `grub_loader_unset'.
568
a5ce3a4a 5692005-03-26 Hollis Blanchard <hollis@penguinppc.org>
570
571 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
572 instead of grub_ieee1275_interpret.
573 (grub_halt_init): New function.
574 (grub_halt_fini): Likewise.
575 (GRUB_MOD_INIT): Correct message grammar.
576 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
577 instead of grub_ieee1275_interpret.
578 (grub_reboot_init): New function.
579 (grub_reboot_fini): Likewise.
580 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
581 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
582 util/i386/pc/misc.c with commands/ieee1275/halt.c,
583 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
584 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
585 function.
586 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
587 Add prototype.
588 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
589 prototype.
590 (grub_halt): Likewise.
591 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
592 (cmain): Remove __attribute__((unused)).
593 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
594 (grub_heap_len): Likewise.
595 (grub_machine_fini): New function.
596 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
597 (grub_halt): Likewise.
598 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
599 function.
600 * util/powerpc/ieee1275/misc.c: New file.
601
0058f771 6022005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
603
604 * DISTLIST: New file.
605 * gendistlist.sh: Likewise.
606
607 * Makefile.in (COMMON_DISTFILES): Removed.
608 (BOOT_DISTFILES): Likewise.
609 (CONF_DISTFILES): Likewise.
610 (DISK_DISTFILES): Likewise.
611 (FS_DISTFILES): Likewise.
612 (INCLUDE_DISTFILES): Likewise.
613 (KERN_DISTFILES): Likewise.
614 (LOADER_DISTFILES): Likewise.
615 (TERM_DISTFILES): Likewise.
616 (UTIL_DISTFILES): Likewise.
617 (DISTFILES): Likewise.
618 (uninstall): Uninstall files in $(pkgdata_DATA).
619 (DISTLIST): New target.
620 (distdir): Use the contents of the file DISTLIST to get a list of
621 distributed files.
622
46b3b8a5 6232005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
624
625 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
626 descriptor. This is ported from GRUB Legacy.
627
628 * gencmdlist.sh: Added an extra semicolon to make it work with
629 old sed versions. Reported by Robert Bihlmeyer
630 <robbe@orcus.priv.at>.
631
5822ff87 6322005-03-08 Yoshinori Okuji <okuji@enbug.org>
633
634 Automatic loading of commands is supported.
635
636 * normal/main.c (read_command_list): New function.
637 (grub_normal_execute): Call read_command_list.
638
639 * normal/command.c (grub_register_command): Return zero or CMD.
640 Allocate CMD->NAME from the heap.
641 Initialize CMD->MODULE_NAME to zero.
642 Find the same name as well. If the same command is found and it is
643 a dummy command, overwrite members. If it is not a dummy command,
644 return zero.
645 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
646 (grub_command_find): If a dummy command is found, load a module
647 and retry to find a command only once.
648
649 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
650 make sure that each command is loaded.
651
652 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
653 macro.
654 (struct grub_command): Remove const from the member `name'.
655 Add a new member `module_name'.
656 (grub_register_command): Return grub_command_t.
657
658 * commands/help.c (grub_cmd_help): Call grub_command_find to make
659 sure that each command is loaded.
660
661 * genmk.rb (PModule::rule): Specify a module name without the
662 suffix ".mod" to gencmdlist.sh.
663
7b1f4b57 6642005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
665
666 * gencmdlist.sh: New file.
667
668 * genmk.rb (PModule::rule): Generate a rule for a command list.
669 Clean command.lst.
670 Generate command.lst from $(COMMANDFILES).
671
672 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
673 (DATA): Added $(pkgdata_DATA).
674 (install-local): Install files in $(pkgdata_DATA).
675
062aaf39 6762005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
677
678 * term/i386/pc/vga.c (debug_command): Removed.
679 (GRUB_MOD_INIT): Do not register the command "debug".
680
681 From Hollis Blanchard:
682 * commands/configfile.c: New file.
683 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
684 commands/configfile.c.
685 (pkgdata_MODULES): Added configfile.mod.
686 (configfile_mod_SOURCES): New variable.
687 (configfile_mod_CFLAGS): Likewise.
688 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
689 commands/configfile.c.
690 (pkgdata_MODULES): Added configfile.mod.
691 (configfile_mod_SOURCES): New variable.
692 (configfile_mod_CFLAGS): Likewise.
693 * util/grub-emu.c (main): Call grub_configfile_init and
694 grub_configfile_fini.
695 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
696 prototype.
697 [GRUB_UTIL] (grub_configfile_fini): Likewise.
698
cee01aa6 6992005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
700
701 * normal/arg.c (grub_arg_show_help): Do not show the bug report
702 address.
703
704 * commands/help.c (grub_cmd_help): Do not print newlines after
705 the last command in print_command_help.
706
93f3a1d8 7072005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
708
709 * commands/default.h: New file.
710 * commands/timeout.h: Likewise.
711 * normal/context.c: Likewise.
712
713 * util/misc.c: Do not include sys/times.h.
714 Include sys/time.h and grub/machine/time.h.
715 (grub_get_rtc): Rewritten with gettimeofday.
716
717 * util/grub-emu.c (main): Call grub_default_init and
718 grub_timeout_init before grub_normal_init, and call
719 grub_timeout_fini and grub_default_fini after grub_main.
720
721 * util/console.c (grub_ncurses_checkkey): Return the read
722 character or -1.
723
724 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
725 timeouts.
726
727 * normal/main.c (read_config_file): Push MENU. If this fails,
728 print an error and wait for a user input.
729 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
730 If a menu is empty or an error occurs, pop MENU.
731 (grub_normal_execute): Pop and free MENU after grub_menu_run
732 returns.
733
734 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
735
736 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
737 include time.h.
738 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
739 without GRUB_UTIL.
740 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
741 time.h.
742 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
743 without GRUB_UTIL.
744
745 * include/grub/normal.h (struct grub_menu_list): New struct.
746 (grub_menu_list_t): New type.
747 (struct grub_context): New struct.
748 (grub_context_t): New type.
749 (grub_register_command): Got rid of EXPORT_FUNC.
750 (grub_unregister_command): Likewise.
751 (grub_context_get): New prototype.
752 (grub_context_get_current_menu): Likewise.
753 (grub_context_push_menu): Likewise.
754 (grub_context_pop_menu): Likewise.
755 [GRUB_UTIL] (grub_default_init): Likewise.
756 [GRUB_UTIL] (grub_default_fini): Likewise.
757 [GRUB_UTIL] (grub_timeout_init): Likewise.
758 [GRUB_UTIL] (grub_timeout_fini): Likewise.
759
760 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
761 commands/timeout.c and normal/context.c.
762 (pkgdata_MODULES): Added default.mod and timeout.mod.
763 (normal_mod_SOURCES): Added normal/context.c.
764 (default_mod_SOURCES): New variable.
765 (default_mod_CFLAGS): Likewise.
766 (timeout_mod_SOURCES): Likewise.
767 (timeout_mod_CFLAGS): Likewise.
768 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
769 conf/i386-pc.rmk.
770 (pkgdata_MODULES): Added default.mod and timeout.mod.
771 (normal_mod_SOURCES): Added normal/context.c.
772 (default_mod_SOURCES): New variable.
773 (default_mod_CFLAGS): Likewise.
774 (timeout_mod_SOURCES): Likewise.
775 (timeout_mod_CFLAGS): Likewise.
776
777 * Makefile.in (all-local): Added $(MKFILES).
778
4ed2e1dd 7792005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
780
781 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
782 (grub_emu_SOURCES): Likewise.
783 (pkgdata_MODULES): Add `sun.mod'.
784 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
785 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
786 `partmap/sun.c'.
787 (pkgdata_MODULES): Add `sun.mod'.
788 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
789 * include/grub/partition.h (grub_sun_partition_map_init): New
790 prototype.
791 (grub_sun_partition_map_fini): Likewise.
792 * partmap/sun.c: New file.
793 * util/grub-emu.c (main): Initialize and de-initialize the sun
794 partitionmap support.
795
4d4e372e 7962005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
797
798 This implements an Emacs-like menu entry editor.
799
800 * normal/menu_entry.c: New file.
801
802 * util/console.c (grub_ncurses_putchar): Translate some Unicode
803 characters to ASCII.
804 (saved_char): New variable.
805 (grub_ncurses_checkkey): Rewritten completely.
806 (grub_ncurses_getkey): Likewise.
807 (grub_ncurses_init): Call raw instead of cbreak.
808
809 * normal/menu.c (print_entry): Do not put a space.
810 (init_page): Renamed to ...
811 (grub_menu_init_page): ... this. All callers changed.
812 (edit_menu_entry): Removed.
813 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
814
815 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
816
817 * kern/misc.c (grub_vprintf): Call grub_refresh.
818
819 * normal/menu.c (DISP_LEFT): Renamed to ...
820 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
821 * normal/menu.c (DISP_UP): Renamed to ...
822 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
823 * normal/menu.c (DISP_RIGHT): Renamed to ...
824 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
825 * normal/menu.c (DISP_DOWN): Renamed to ...
826 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
827 * normal/menu.c (DISP_HLINE): Renamed to ...
828 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
829 * normal/menu.c (DISP_VLINE): Renamed to ...
830 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
831 * normal/menu.c (DISP_UL): Renamed to ...
832 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
833 * normal/menu.c (DISP_UR): Renamed to ...
834 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
835 * normal/menu.c (DISP_LL): Renamed to ...
836 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
837 * normal/menu.c (DISP_LR): Renamed to ...
838 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
839 * normal/menu.c (TERM_WIDTH): Renamed to ...
840 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
841 * normal/menu.c (TERM_HEIGHT): Renamed to ...
842 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
843 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
844 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
845 * normal/menu.c (TERM_MARGIN): Renamed to ...
846 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
847 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
848 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
849 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
850 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
851 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
852 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
853 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
854 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
855 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
856 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
857 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
858 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
859 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
860 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
861 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
862 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
863 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
864 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
865 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
866 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
867 All callers changed.
868
869 * include/grub/normal.h: New prototype.
870
871 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
872 normal/menu_entry.c.
873 (normal_mod_SOURCES): Likewise.
874 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
875 (normal_mod_SOURCES): Likewise.
876
e6b92c8a 8772005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
878
879 * include/grub/normal.h (grub_halt_init): New prototype.
880 (grub_halt_fini): Likewise.
881 (grub_reboot_init): Likewise.
882 (grub_reboot_fini): Likewise.
883
884 * util/grub-emu.c: Include signal.h.
885 (main_env): New global variable.
886 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
887 catch C-c.
888 (grub_machine_fini): New function.
889 (main): Call grub_halt_init and grub_reboot_init before
890 grub_main, and grub_reboot_fini and grub_halt_fini after it.
891 Call setjmp with MAIN_ENV to go back afterwards.
892 Call grub_machine_fini right before return.
893
894 * include/grub/util/misc.h: Include setjmp.h.
895 (main_env): New prototype.
896
897 * include/grub/kernel.h (grub_machine_fini): New prototype.
898 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
899 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
900
901 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
902 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
903 * term/i386/pc/console.c (grub_console_fini): Likewise.
904
905 * util/i386/pc/misc.c: New file.
906
907 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
908 util/i386/pc/misc.c, commands/i386/pc/halt.c and
909 commands/i386/pc/reboot.c.
910
c642636f 9112005-02-14 Guillem Jover <guillem@hadrons.org>
912
913 * include/grub/dl.h (grub_dl_check_header): New prototype.
914 (grub_arch_dl_check_header): Change return type to grub_err_t,
915 remove size parameter and export function. Update all callers.
916 * kern/dl.c (grub_dl_check_header): New function.
917 (grub_dl_load_core): Use `grub_dl_check_header' instead of
918 `grub_arch_dl_check_header'. Check ELF type. Check if sections
919 are inside the core.
920 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
921 independent ELF header checks.
922 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
923 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
924 `grub_dl_check_header' instead of explicit checks. Check for the
925 ELF type.
926 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
927 `grub_dl_check_header' instead of explicit checks. Remove arch
928 specific ELF header checks.
929
e6b92c8a 930 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
931 argument SIZE.
932
5eabe94b 9332005-02-13 Hollis Blanchard <hollis@penguinppc.org>
934
935 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
936 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
937
1b14a681 9382005-02-12 Hollis Blanchard <hollis@penguinppc.org>
939
940 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
941 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
942 (part_map_iterate): Clear `grub_errno' and return 0 if
943 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
944 * partmap/amiga.c (amiga_partition_map_iterate): Return
945 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
946 * partmap/apple.c (apple_partition_map_iterate): Likewise.
947
aca108aa 9482005-02-01 Guillem Jover <guillem@hadrons.org>
949
950 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
951 help info.
952
c9f9c556 9532005-01-31 Marco Gerards <metgerards@student.han.nl>
954
955 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
956 Removed prototype.
957 (grub_rescue_cmd_linux): New prototype.
958 (grub_rescue_cmd_initrd): Likewise.
959 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
960 `bi_rec'.
961 (grub_linux_release_mem): Release the memory for the initrd.
962 (grub_load_linux): Renamed from this...
963 (grub_rescue_cmd_linux): ...To this. Changed all callers.
964 Changed `entry' not to be static. Loop over memory regions to
965 find another one when the default fails.
966 (grub_rescue_cmd_initrd): New function.
967 (grub_linux_init): Remove function.
968 (grub_linux_fini): Likewise.
969 (GRUB_MOD_INIT): Register `initrd'.
970 (GRUB_MOD_FINI): Unregister `initrd'.
971 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
972 Function removed.
973 (grub_linux_normal_fini): Likewise.
974 (GRUB_MOD_INIT): Register `initrd'.
975 (GRUB_MOD_FINI): Unregister `initrd'.
976
990cf3aa 9772005-01-31 Marco Gerards <metgerards@student.han.nl>
978
979 * commands/help.c: New file.
980 * normal/arg.c (show_help): Renamed to...
981 (grub_arg_show_help): ... this.
982 * commands/i386/pc/halt.c: New file.
983 * commands/i386/pc/reboot.c: Likewise.
984 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
985 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
986 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
987 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
988 variables.
989 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
990 `commands/help.c'.
991 (pkgdata_MODULES): Add `help.mod'.
992 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
993 * grub/i386/pc/init.h (grub_reboot): New prototype.
994 (grub_halt): Likewise.
995 * include/grub/normal.h (grub_arg_show_help): New prototype.
996 (grub_help_init): Likewise.
997 (grub_help_fini): Likewise.
998 * util/grub-emu.c (main): Initialize and deinitialize the help
999 command.
1000
1001 * normal/cmdline.c (grub_cmdline_get): Doc fix.
1002
1003 * normal/command.c (grub_command_init): Fixed the description of
1004 the `set' and `unset' commands.
1005
10062005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 1007
1008 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
1009 function.
1010 * commands/ieee1275/halt.c: New file.
1011 * commands/ieee1275/reboot.c: Likewise.
1012 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
1013 `__attribute__ ((unused))'. Some GCS related fixed.
1014 (grub_suspend_init) [GRUB_UTIL]: Function removed.
1015 (grub_suspend_fini): Likewise.
1016 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
1017 and `halt.mod'.
1018 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
1019 (halt_mod_CFLAGS): New variables.
1020 * include/grub/powerpc/ieee1275/ieee1275.h
1021 (grub_ieee1275_interpret): New prototype.
1022
1ab09cc7 10232005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
1024
1025 * include/grub/misc.h (memmove): New prototype.
1026 (memcpy): Likewise.
1027
8b8cbdb2 10282005-01-22 Hollis Blanchard <hollis@penguinppc.org>
1029
1030 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
1031 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
1032
e3741a27 10332005-01-22 Marco Gerards <metgerards@student.han.nl>
1034
1035 * kern/misc.c (grub_strndup): Function rewritten.
1036
776bd780 10372005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
1038
1039 * normal/menu.c (TERM_WIDTH): Macro redefined.
1040 (TERM_TOP_BORDER_Y): Likewise.
1041 (draw_border): Replaced while-loop by a for-loop. Make the number
1042 of lines consistent with the number of lines displayed in
1043 print_entries. Added a margin below the rectangle.
1044 (print_entry): Make the entry fit in the rectangle.
1045 (print_entries): Display the scroll arrows next to the right
1046 border.
1047
78026bce 10482005-01-21 Marco Gerards <metgerards@student.han.nl>
1049
1050 * fs/minix.c (grub_minix_find_file): Reserve more space for
1051 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
1052 `grub_strncpy' to copy `path' into it.
1053
67bbaf0f 10542005-01-21 Marco Gerards <metgerards@student.han.nl>
1055
1056 Add the loopback device, a device via which files can be accessed
1057 as devices.
1058
1059 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
1060 (pkgdata_MODULES): Add loopback.mod.
1061 (loopback_mod_SOURCES): New variable.
1062 (loopback_mod_CFLAGS): Likewise.
1063 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1064 `disk/loopback.c'.
1065 (pkgdata_MODULES): Add loopback.mod.
1066 (loopback_mod_SOURCES): New variable.
1067 (loopback_mod_CFLAGS): Likewise.
1068 * disk/loopback.c: new file.
1069 * include/grub/normal.h (grub_loop_init): New prototype.
1070 (grub_loop_fini): New prototype.
1071 * util/grub-emu.c (main): Initialize and de-initialize loopback
1072 support.
1073 * include/grub/disk.h (grub_disk_dev_id): Add
1074 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
1075
6f1c18bd 10762005-01-20 Hollis Blanchard <hollis@penguinppc.org>
1077
1078 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
1079 function.
1080 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
1081 (suspend_mod_SOURCES): New variable.
1082 (suspend_mod_CFLAGS): Likewise.
1083 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
1084 New prototype.
1085 * commands/ieee1275/suspend.c: New file.
1086
b38551da 10872005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
1088
1089 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
1090 ((unused))' to `__attribute__ ((used))'.
1091 (GRUB_MOD_FINI): Likewise.
1092 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
1093 * genmk.rb (PModule): Assign space to common symbols when linking
1094 modules.
1095
777aff39 10962005-01-20 Marco Gerards <metgerards@student.han.nl>
1097
1098 * include/grub/mm.h (grub_mm_init_region): Change the type of the
1099 `unsigned' arguments to `grub_size_t'.
1100 (grub_malloc): Likewise.
1101 (grub_realloc): Likewise.
1102 (grub_memalign): Likewise.
1103 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
1104 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
1105 * util/misc.c (grub_malloc): Likewise.
1106 (grub_realloc): Likewise.
1107 * kern/mm.c (get_header_from_pointer): Change the casts to
1108 `unsigned' into a cast to `grub_size_t'.
1109
1110 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
1111 point to `currnode' when `currnode' is changed.
1112
1113 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
1114 Schottelius <nico-linux@schottelius.org>.
1115
d0ff18e1 11162005-01-09 Hollis Blanchard <hollis@penguinppc.org>
1117
1118 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
1119 (note_path): Remove variable.
1120 (GRUB_IEEE1275_NOTE_NAME): New macro.
1121 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
1122 (grub_ieee1275_note_hdr): New structure.
1123 (grub_ieee1275_note_desc): Likewise.
1124 (grub_ieee1275_note): Likewise.
1125 (load_note): Remove `dir' argument. All callers updated. Remove
1126 `note_img' and `path'. Do not load a file from `note_path'.
1127 Initialize a struct grub_ieee1275_note and write that to `out'.
1128 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
1129
4ca7004c 11302005-01-05 Marco Gerards <metgerards@student.han.nl>
1131
1132 * util/misc.c (grub_util_read_image): Revert last change. It
1133 called `grub_util_read_at', which seeks from the beginning of the
1134 file.
1135
0b412211 11362005-01-04 Hollis Blanchard <hollis@penguinppc.org>
1137
1138 * TODO: Add note about endianness in grub-mkimage.
1139 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
1140 section.
1141 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
1142 (grub_mkimage_SOURCES): New target.
1143 * include/grub/kernel.h (grub_start_addr): Remove variable.
1144 (grub_end_addr): Likewise.
1145 (grub_total_module_size): Likewise.
1146 (grub_kernel_image_size): Likewise.
1147 (GRUB_MODULE_MAGIC): New constant.
1148 (grub_module_info): New structure.
1149 (grub_arch_modules_addr): New prototype.
1150 (grub_get_end_addr): Remove prototype.
1151 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
1152 * include/grub/powerpc/ieee1275/kernel.h: New file.
1153 * include/grub/util/misc.h (grub_util_get_fp_size): New
1154 prototype.
1155 (grub_util_read_at): Likewise.
1156 (grub_util_write_image_at): Likewise.
1157 * kern/main.c (grub_get_end_addr): Remove function.
1158 (grub_load_modules): Call grub_arch_modules_addr instead of using
1159 grub_end_addr. Look for a grub_module_info struct in memory. Use
1160 the grub_module_info fields instead of calling grub_get_end_addr
1161 as loop conditions. Move grub_add_unused_region code here.
1162 (grub_add_unused_region): Remove function.
1163 * kern/i386/pc/init.c: Include grub/cache.h.
1164 (grub_machine_init): Remove call to grub_get_end_addr. Remove
1165 one call to add_mem_region.
1166 (grub_arch_modules_addr): New function.
1167 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
1168 (grub_total_module_size): Likewise.
1169 Include grub/machine/kernel.h.
1170 (grub_arch_modules_addr): New function.
1171 * util/grub-emu.c (grub_end_addr): Remove variable.
1172 (grub_total_module_size): Likewise.
1173 (grub_arch_modules_addr): New function.
1174 * util/misc.c: Include unistd.h.
1175 (grub_util_get_fp_size): New function.
1176 (grub_util_read_at): Likewise.
1177 (grub_util_write_image_at): Likewise.
1178 (grub_util_read_image): Call grub_util_read_at.
1179 (grub_util_write_image): Call grub_util_write_image_at.
1180 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
1181 additional memory in kernel_img for a struct grub_module_info.
1182 Fill in that grub_module_info.
1183 * util/powerpc/ieee1275/grub-mkimage.c: New file.
1184
458786f8 11852005-01-03 Hollis Blanchard <hollis@penguinppc.org>
1186
1187 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
1188 New function.
1189 * include/grub/powerpc/ieee1275/ieee1275.h
1190 (grub_ieee1275_milliseconds): New prototype.
1191 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
1192 Change to 1000.
1193 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
1194 grub_ieee1275_milliseconds.
1195
ac507d1b 11962005-01-03 Hollis Blanchard <hollis@penguinppc.org>
1197
1198 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
1199 variable.
1200 (find_options): New function.
1201 (cmain): Call find_options.
1202 * include/grub/powerpc/ieee1275/ieee1275.h
1203 (grub_ieee1275_realmode): New extern variable.
1204 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
1205 grub_map if grub_ieee1275_realmode is false.
1206
6b8fd1c4 12072004-12-29 Marco Gerards <metgerards@student.han.nl>
1208
1209 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
1210 lines are inserted and make it work like readline. Reported by
1211 Vincent Pelletier <subdino2004@yahoo.fr>.
1212
8514a1e0 12132004-12-28 Marco Gerards <metgerards@student.han.nl>
1214
1215 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
1216
1217 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
1218 `kern/powerpc/cache.S'.
1219
924b6140 12202004-12-27 Marco Gerards <metgerards@student.han.nl>
1221
1222 * genmk.rb: Handle the `Program' class in the main loop. Written
1223 by Johan Rydberg <jrydberg@gnu.org>.
1224 (Program): New class.
1225 (programs): New variable.
1226 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
1227 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
1228 instead of "grub/kernel.h". Include <grub/machine/init.h>.
1229 (help_arch): Function removed.
1230 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
1231 `powerpc/libgcc.h' and `loader.h'.
1232 (pkgdata_PROGRAMS): New variable.
1233 (sbin_UTILITIES): Variable removed.
1234 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
1235 (grubof_SOURCES): Variable re-defined so it only includes the
1236 core functionality.
1237 (grubof_CFLAGS): Remove `-DGRUBOF'.
1238 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
1239 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
1240 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
1241 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
1242 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
1243 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
1244 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
1245 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
1246 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
1247 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
1248 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
1249 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
1250 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
1251 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
1252 (pc_mod_CFLAGS): New variables.
1253 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
1254 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
1255 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
1256 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
1257 Moved from here...
1258 * include/grub/i386/pc/init.h (grub_os_area_addr)
1259 (rub_os_area_size): ... to here.
1260 * include/grub/powerpc/ieee1275/ieee1275.h
1261 (grub_ieee1275_entry_fn): Export symbol.
1262 * include/grub/powerpc/ieee1275/init.h: New file.
1263 * include/grub/powerpc/libgcc.h: Likewise.
1264 * include/grub/cache.h: Likewise.
1265 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
1266 <hollis@penguinppc.org>.
1267 * kern/dl.c: Include <grub/cache.h>.
1268 (grub_dl_flush_cache): New function.
1269 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
1270 for this module.
1271 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
1272 (grub_console_init): Removed prototypes.
1273 (grub_machine_init): Don't initialize the modules anymore.
1274 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
1275 static.
1276 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
1277 Macro undef removed.
1278 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
1279 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
1280 relocation `R_PPC_REL32'. Return an error when the relocation is
1281 unknown.
1282 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
1283 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
1284 * util/misc.c (grub_arch_sync_caches): Likewise.
1285
e4b47e0c 12862004-12-19 Marco Gerards <metgerards@student.han.nl>
1287
1288 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
1289 `symlist.c', add `grubof_symlist.c'.
1290 (symlist.c): Variable removed.
1291 (grubof_HEADERS): Variable added.
1292 (grubof_symlist.c): New target.
1293 (kernel_syms.lst): Use `grubof_HEADERS' instead of
1294 `kernel_img_HEADERS'.
1295 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
1296 * kern/powerpc/dl.c: New file.
1297 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
1298 Function removed.
1299 (grub_arch_dl_relocate_symbols): Likewise.
1300 (grub_register_exported_symbols): Likewise.
1301
4ceb3636 13022004-12-13 Marco Gerards <metgerards@student.han.nl>
1303
1304 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
1305 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
1306 to fail instead. Reported by Vincent Pelletier
1307 <subdino2004@yahoo.fr>.
1308
1309 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
1310 it is not allocated. Reported by Vincent Pelletier
1311 <subdino2004@yahoo.fr>.
1312
1313 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
1314 output so the output looks better.
1315
3f1578fe 13162004-12-04 Marco Gerards <metgerards@student.han.nl>
1317
1318 Modulize the partition map support and add support for the amiga
1319 partition map.
1320
1321 * commands/ls.c: Include <grub/partition.h> instead of
1322 <grub/machine/partition.h>.
1323 * kern/disk.c: Likewise.
1324 * kern/rescue.c: Likewise.
1325 * loader/i386/pc/chainloader.c: Likewise.
1326 * normal/cmdline.c: Likewise.
1327 * kern/powerpc/ieee1275/init.c: Likewise.
1328 (grub_machine_init): Call `grub_pc_partition_map_init',
1329 `grub_amiga_partition_map_init' and
1330 `grub_apple_partition_map_init'.
1331 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
1332 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
1333 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
1334 `partition.h' and `pc_partition.h'.
1335 (grub_setup_SOURCES): Remove
1336 `disk/i386/pc/partition.c'. Add `kern/partition.c',
1337 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
1338 (grub_emu_SOURCES): Likewise.
1339 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
1340 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
1341 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
1342 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
1343 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
1344 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
1345 (grubof_SOURCES): Likewise.
1346 * disk/i386/pc/partition.c: File removed.
1347 * disk/powerpc/ieee1275/partition.c: Likewise.
1348 * include/grub/powerpc/ieee1275/partition.h: Likewise.
1349 * include/grub/i386/pc/partition.h: Likewise.
1350 * kern/partition.c: New file.
1351 * partmap/amiga.c: Likewise.
1352 * partmap/apple.c: Likewise.
1353 * partmap/pc.c: Likewise.
1354 * include/grub/partition.h: Likewise..
1355 * include/grub/pc_partition.h: Likewise.
1356 * util/grub-emu.c: Include <grub/partition.h> instead of
1357 <grub/machine/partition.h>.
1358 (main): Call `grub_pc_partition_map_init',
1359 `grub_amiga_partition_map_init' and
1360 `grub_apple_partition_map_init' and deinitialize afterwards.
1361 * util/i386/pc/biosdisk.c: Include `#include
1362 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
1363 `<grub/machine/partition.h>'.
1364 * util/i386/pc/grub-setup.c: Likewise.
1365 * util/i386/pc/biosdisk.c: Likewise.
1366 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
1367 partition information in case of a PC partition.
1368 * util/i386/pc/grub-setup.c: Include `#include
1369 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
1370 `<grub/machine/partition.h>'.
1371 (setup): Only access the PC specific partition information in case
1372 of a PC partition.
1373
0ef4ced9 13742004-11-17 Hollis Blanchard <hollis@penguinppc.org>
1375
1376 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
1377 (grub_longjmp): Likewise.
1378 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
1379 20.
1380 * normal/powerpc/setjmp.S: New file.
1381 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
1382 `normal/powerpc/setjmp.S'.
1383 (grubof_CFLAGS): Add `-DGRUBOF'.
1384 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
1385 [GRUB_UTIL && !GRUBOF].
1386
19950e29 13872004-11-16 Marco Gerards <metgerards@student.han.nl>
1388
1389 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
1390 property named `name'. Correctly handle the error returned by
1391 `grub_ieee1275_finddevice' if a device can not be opened.
1392
a2fea427 13932004-11-02 Hollis Blanchard <hollis@penguinppc.org>
1394
1395 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
1396 `actual' for negativity.
1397 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
1398 kern/fshelp.c.
1399
41ea0ea3 14002004-11-01 Marco Gerards <metgerards@student.han.nl>
1401
1402 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
1403 (PAGE_OFFSET): New macro.
1404 (CRTC_ADDR_PORT): Likewise.
1405 (CRTC_DATA_PORT): Likewise.
1406 (START_ADDR_HIGH_REGISTER): Likewise.
1407 (START_ADDR_LOW_REGISTER): Likewise.
1408 (GRAPHICS_ADDR_PORT): Likewise.
1409 (GRAPHICS_DATA_PORT): Likewise.
1410 (READ_MAP_REGISTER): Likewise.
1411 (INPUT_STATUS1_REGISTER): Likewise.
1412 (INPUT_STATUS1_VERTR_BIT): Likewise.
1413 (page): New variable.
1414 (wait_vretrace): New function.
1415 (set_read_map): Likewise.
1416 (set_start_address): Likewise.
1417 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
1418 the right page.
1419 (check_vga_mem): Take the page into account.
1420 (write_char): Likewise.
1421 (write_cursor): Likewise.
1422 (scroll_up): Likewise. Copy the page to the page that is not
1423 shown and switch between both pages.
1424 (grub_vga_putchar): Fix off by one error.
1425 (grub_vga_cls): Wait for the vertical retrace. Take the page into
1426 account.
1427
ad0bd20b 14282004-11-01 Marco Gerards <metgerards@student.han.nl>
1429
1430 Add support for iso9660 (including rockridge).
1431
1432 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
1433 (iso9660_mod_SOURCES): New variable.
1434 (iso9660_mod_CFLAGS): Likewise.
1435 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
1436 * include/grub/fs.h (grub_iso9660_init): New prototype.
1437 * util/grub-emu.c (main): Call `grub_iso9660_init'.
1438 * fs/iso9660.c: New file.
1439
1440 * include/grub/misc.h (grub_strncat): New prototype.
1441 * kern/misc.c (grub_strncat): New function.
1442
1443 * fs/hfs.c (grub_hfs_mount): Translate the error
1444 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
1445 * fs/jfs.c (grub_jfs_mount): Likewise.
1446 * fs/ufs.c (grub_ufs_mount): Likewise.
1447
a5477a59 14482004-10-28 Hollis Blanchard <hollis@penguinppc.org>
1449
1450 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
1451 which initialized BAT registers.
1452 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
1453 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
1454 Move from here...
1455 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
1456 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
1457 ... to here.
1458 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
1459 (grub_mapclaim): Likewise.
1460 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
1461 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
1462 hand.
1463
9304c1f8 14642004-10-19 Hollis Blanchard <hollis@penguinppc.org>
1465
1466 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
1467 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
1468 -ffreestanding and -msoft-float.
1469
86f4ae25 14702004-10-15 Hollis Blanchard <hollis@penguinppc.org>
1471
1472 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
1473 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
1474 set in grub_ieee1275_flags.
1475
38912228 14762004-10-14 Hollis Blanchard <hollis@penguinppc.org>
1477
1478 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
1479 prototype.
1480 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
1481 grub_console_init first.
1482 Change the memory range used for grub_ieee1275_claim and
1483 grub_mm_init_region.
1484 Print an error message if the claim fails.
1485 Include <grub/misc.h>.
1486
d1923dc8 14872004-10-13 Hollis Blanchard <hollis@penguinppc.org>
1488
1489 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
1490 Call grub_children_iterate for device nodes of type `scsi',
1491 `ide', or `ata'.
1492 (grub_ofdisk_open): Remove manual device alias resolution.
1493 Fix memory leak when device cannot be opened.
1494 * include/grub/powerpc/ieee1275/ieee1275.h
1495 (grub_children_iterate): New prototype.
1496 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
1497 New function.
1498 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
1499 Return -1 if args.size was -1.
1500
4512e4f3 15012004-10-11 Hollis Blanchard <hollis@penguinppc.org>
1502
1503 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
1504 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
1505 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
1506 Open Firmware's memory for it; claim memory from _start to _end.
1507 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
1508 (_end): New extern.
1509 (_start): Zero BSS from __bss_start to _end.
1510 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
1511 New extern.
1512 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
1513
4d61feb0 15142004-10-11 Hollis Blanchard <hollis@penguinppc.org>
1515
ad0bd20b 1516 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
1517 -1 if args.base was -1.
4d61feb0 1518
026fa2f9 15192004-10-08 Hollis Blanchard <hollis@penguinppc.org>
1520
1521 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
1522 escape sequence instead of a literal ^L. Also call
1523 grub_ofconsole_gotoxy.
1524
9f2220ef 15252004-10-03 Hollis Blanchard <hollis@penguinppc.org>
1526
1527 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
1528 void * arguments to grub_addr_t. All callers updated. Also make
1529 the `result' argument optional.
1530 (grub_ieee1275_release): change void * arguments to grub_addr_t.
1531 All callers updated.
1532
8a572cd7 15332004-09-22 Hollis Blanchard <hollis@penguinppc.org>
1534
1535 * commands/ls.c (grub_ls_list_files): Use the string following the
1536 initial ')', if present, as the filesystem path.
1537 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
1538
1539 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
1540
18aa81f2 15412004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
1542
1543 Make the source code of the menu interface more readable.
1544
1545 * normal/menu.c: Include grub/mm.h.
1546 (TERM_WIDTH): New macro.
1547 (TERM_HEIGHT): Likewise.
1548 (TERM_INFO_HEIGHT): Likewise.
1549 (TERM_MARGIN): Likewise.
1550 (TERM_SCROLL_WIDTH): Likewise.
1551 (TERM_TOP_BORDER_Y): Likewise.
1552 (TERM_LEFT_BORDER_X): Likewise.
1553 (TERM_BORDER_WIDTH): Likewise.
1554 (TERM_MESSAGE_HEIGHT): Likewise.
1555 (TERM_BORDER_HEIGHT): Likewise.
1556 (TERM_NUM_ENTRIES): Likewise.
1557 (TERM_FIRST_ENTRY_Y): Likewise.
1558 (TERM_ENTRY_WIDTH): Likewise.
1559 (TERM_CURSOR_X): Likewise.
1560 (draw_border): Use macros instead of magic numbers.
1561 (print_entry): Likewise.
1562 (print_entries): Likewise.
1563 (run_menu): Likewise. Also, handle the key 'e'.
1564 (run_menu_entry): Ignore empty command lines.
1565 (print_message): Added a new argument EDIT. If EDIT is true,
1566 print a different message.
1567 (init_page): Likewise.
1568 (edit_menu_entry): New function. Not implemented yet.
1569
b47efe30 15702004-09-17 Marco Gerards <metgerards@student.han.nl>
1571
1572 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
1573 can be loaded from normal mode.
1574
1575 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
1576 `multiboot.mod'.
1577 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
1578 (multiboot_mod_CFLAGS): New variables.
1579 * loader/i386/pc/linux_normal.c: New file.
1580 * loader/i386/pc/multiboot_normal.c: Likewise.
1581
1582 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
1583 attribute `unused'.
1584
1585 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
1586 `fdiro' to read the mode information from instead of `diro'.
1587
1588 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
1589 looking up a symlink.
1590
1591 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
1592 macro.
1593 * normal/command.c (grub_command_execute): Don't parse the
1594 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
1595 flags of the command.
1596
1597 * normal/menu.c (grub_menu_run): Fix typo.
1598
da75ac71 15992004-09-14 Hollis Blanchard <hollis@penguinppc.org>
1600
1601 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
1602
1603 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
1604 `y + 1' instead of `y - 1'.
1605
1606 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
1607
062b24c2 16082004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
1609
1610 From Hollis Blanchard <hollis@penguinppc.org>:
1611 * kern/misc.c (memmove): New alias for grub_memmove.
1612 (memcmp): New alias for grub_memcmp.
1613 (memset): New alias for grub_memset.
1614 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
1615 Change "int handle" to "grub_ieee1275_phandle_t handle".
1616 * include/grub/powerpc/ieee1275/ieee1275.h
1617 (grub_ieee1275_get_property): Likewise.
1618
8ddad845 16192004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
1620
1621 Added normal mode command `chainloader' as module chain.mod, which
1622 depends on normal.mod and _chain.mod.
1623
1624 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
1625 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
1626 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
1627 Deleted prototype.
1628 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
1629 but arguments parsing moved to ...
1630 (grub_chainloader_cmd): ... here. New function.
1631 * include/grub/i386/pc/chainloader.h: New file.
1632 * loader/i386/pc/chainloader_normal.c: Likewise.
1633
2c1f4ce3 16342004-09-11 Marco Gerards <metgerards@student.han.nl>
1635
1636 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
1637 (grub_mkimage_LDFLAGS): Likewise.
1638 (grub_emu_SOURCES): Likewise.
1639 (kernel_img_HEADERS): Added fshelp.h.
1640 * fs/ext2.c: Include <grub/fshelp.h>.
1641 (FILETYPE_REG): New macro.
1642 (FILETYPE_INO_REG): Likewise.
1643 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
1644 Changed all users.
1645 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
1646 all users.
1647 (grub_fshelp_node): New struct.
1648 (grub_ext2_data): Added member `diropen'. Changed member `inode'
1649 to a pointer.
1650 (grub_ext2_get_file_block): Removed function.
1651 (grub_ext2_read_block): New function.
1652 (grub_ext2_read_file): Replaced parameter `data' by `node'.
1653 This function was written.
1654 (grub_ext2_mount): Read the root inode. Create a diropen struct.
1655 (grub_ext2_find_file): Removed function.
1656 (grub_ext2_read_symlink): New function.
1657 (grub_ext2_iterate_dir): Likewise.
1658 (grub_ext2_open): Rewritten.
1659 (grub_ext2_dir): Rewritten.
1660 * include/grub/fshelp.h: New file.
1661 * fs/fshelp.c: Likewise.
1662
3c52136a 16632004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
1664
1665 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
1666 (print_message): Add a missing newline.
1667 (run_menu): Added timeout support.
1668 (run_menu_entry): New local function.
1669 (grub_menu_run): Added support for booting.
1670
1671 * kern/loader.c (grub_loader_is_loaded): New function.
1672
1673 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
1674 (grub_get_rtc): Exported.
1675
1676 * include/grub/i386/pc/time.h: Include grub/symbol.h.
1677 (grub_get_rtc): Exported.
1678
1679 * include/grub/normal.h (struct grub_command_list): Remove
1680 constant from the member `command'.
1681
1682 * include/grub/loader.h (grub_loader_is_loaded): Declared.
1683
1684 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
1685
1686 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
1687
aa033560 16882004-08-28 Marco Gerards <metgerards@student.han.nl>
1689
1690 Add support for the JFS filesystem.
1691
1692 * fs/jfs.c: New file.
1693 * include/grub/fs.h (grub_jfs_init): New prototype.
1694 (grub_jfs_fini): New prototype.
1695 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
1696 (grub_emu_SOURCES): Likewise.
1697 (pkgdata_MODULES): Add jfs.mod.
1698 (jfs_mod_SOURCES): New variable.
1699 (jfs_mod_CFLAGS): Likewise.
1700 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
1701 (grubof_SOURCES): Likewise.
1702 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
1703
1704 * fs/fat.c (grub_fat_find_dir): Convert the filename little
1705 endian to the host endian.
1706 (grub_fat_utf16_to_utf8): Move function from there...
1707 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
1708 the endianess of the source string anymore.
1709 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
1710
94bc45af 17112004-08-24 Marco Gerards <metgerards@student.han.nl>
1712
1713 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
1714 (grub_boot_fini) [GRUB_UTIL]: Likewise.
1715 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
1716 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
1717
1718 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
1719 (grub_hfs_iterate_dir): Make the function static. Add prototypes
1720 for `node_found' and `it_dir'.
1721 (grub_hfs_dir): Add prototype for `dir_hook'.
1722
1723 * fs/minix.c (grub_minix_get_file_block): Add prototype for
1724 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
1725 and `indir32' to silence a gcc warning.
1726
1727 * include/grub/fs.h (grub_hfs_init): New prototype.
1728 (grub_hfs_fini): Likewise.
1729
1730
97543f08 17312004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
1732
1733 Each disk device has its own id now. This is useful to make use
1734 of multiple disk devices.
1735
1736 * include/grub/disk.h (grub_disk_dev_id): New enum.
1737 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
1738 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
1739
1740 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
1741 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
1742
1743 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
1744 GRUB_DISK_DEVICE_OFDISK_ID as an id.
1745
1746 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
1747 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
1748
1749 * include/grub/disk.h (struct grub_disk_dev): Added a new member
1750 "id" which is used by the cache manager.
1751
1752 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
1753 of just "GRUB".
1754
64372eb4 17552004-08-18 Marco Gerards <metgerards@student.han.nl>
1756
1757 * fs/hfs.c: New file.
1758 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
1759 (grub_emu_SOURCES): Likewise.
1760 (pkgdata_MODULES): Add hfs.mod.
1761 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
1762 (grubof_SOURCES): Likewise.
1763 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
1764
1765 * include/grub/misc.h (grub_strncasecmp): Add prototype.
1766 * kern/misc.c (grub_strncasecmp): Add function.
1767
cc61b58f 17682004-08-14 Marco Gerards <metgerards@student.han.nl>
1769
1770 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
1771 with parentheses.
1772
1773 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
1774 (grub_ext2_dir): In case the directory entry type is unknown, read
1775 it from the inode.
1776
0ef123f6 17772004-08-02 Peter Bruin <pjbruin@dds.nl>
1778
1779 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
1780 grub_load_linux instead of grub_rescue_cmd_linux as second
1781 argument of grub_rescue_register_command.
1782
1783 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
1784
a447c5df 17852004-07-27 Marco Gerards <metgerards@student.han.nl>
1786
1787 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
1788 function.
1789 * commands/boot.c: Remove the check for `GRUB_UTIL'.
1790 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
1791 `loader/powerpc/ieee1275/linux.c',
1792 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
1793 * include/grub/powerpc/ieee1275/ieee1275.h
1794 (grub_ieee1275_release): New prototype.
1795 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
1796 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
1797 normal, boot, linux and linux_normal.
1798 * loader/powerpc/ieee1275/linux.c: New file.
1799 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
1800
5a9e3546 18012004-07-12 Marco Gerards <metgerards@student.han.nl>
1802
1803 * normal/arg.c (grub_arg_parse): Correct error handling after
1804 reallocating the argumentlist (check if `argl' is not null instead
1805 of checking if `args' is not null).
1806 * kern/mm.c (grub_realloc): Return the same pointer when using the
1807 same region, instead of returning the header address.
1808
e15199cb 18092004-07-11 Marco Gerards <metgerards@student.han.nl>
1810
1811 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
1812 one block instead of two when looking for the initial partition.
1813 (grub_partition_probe): Initialize the local variable `p' with 0.
1814 Use base 10 for the grub_strtoul call.
1815 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
1816 need for one local variable.
1817 (grub_strtoul): Don't add the new value to `num', instead of that
1818 just assign it.
1819
020616c2 18202004-07-11 Marco Gerards <metgerards@student.han.nl>
1821
1822 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
1823 (pxeboot_img_SOURCES): New variable.
1824 (pxeboot_img_ASFLAGS): Likewise.
1825 (pxeboot_img_LDFLAGS): Likewise.
1826 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
1827 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
1828 <lode_leroy@hotmail.com>.
1829
6c51eb64 18302004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
1831
1832 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
1833 there was no input.
1834
cfb12aff 18352004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
1836
1837 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
1838 the history buffer logic.
1839
6eabba74 18402004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
1841
1842 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
1843 (FILETYPE_INO_SYMLINK): New macros.
1844 (grub_ext2_find_file): Check if the node is a directory using the
1845 inode stat information instead of using the filetype in the
1846 dirent. Exclude the first character of an absolute symlink.
1847 (grub_ext2_dir): Mask out the filetype part of the mode member of
1848 the inode.
1849
66e19ef8 18502004-05-24 Marco Gerards <metgerards@student.han.nl>
1851
1852 Add support for UFS version 1 and 2. Add support for the minix
1853 filesystem version 1 and 2, both the variants with 14 and 30 long
1854 filenames.
1855
1856 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
1857 fs/minix.c.
1858 (grub_emu_SOURCES): Likewise.
1859 (pkgdata_MODULES): Add ufs.mod and minix.mod.
1860 (ufs_mod_SOURCES): New variable.
1861 (ufs_mod_CFLAGS): Likewise.
1862 (minix_mod_SOURCES): Likewise.
1863 (minix_mod_CFLAGS): Likewise.
1864 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
1865 fs/minix.c.
1866 (grubof_SOURCES): Likewise.
1867 * fs/ufs.c: New file.
1868 * fs/minix.c: New file.
1869 * include/grub/fs.h (grub_ufs_init): New prototype.
1870 (grub_ufs_fini): Likewise.
1871 (grub_minix_init): Likewise.
1872 (grub_minix_fini): Likewise.
1873 * util/grub-emu.c (main): Initialize and deinitialize UFS and
1874 minix fs.
1875
cc2e748a 18762004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
1877
1878 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
1879 commands/ls.c, commands/terminal.c, commands/boot.c,
1880 commands/cmp.c and commands/cat.c.
1881 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
1882
1883 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
1884 "env.h"
1885
4b13b216 18862004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1887
1888 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
1889 and grub_, respectively. Because the conversion is trivial and
1890 mechanical, I omit the details here. Please refer to the CVS
1891 if you need more information.
1892
6a142551 18932004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
1894
1895 * include/pupa: Renamed to ...
1896 * include/grub: ... this.
1897 * util/i386/pc/pupa-mkimage.c: Renamed to ...
1898 * util/i386/pc/grub-mkimage.c: ... this.
1899 * util/i386/pc/pupa-setup.c: Renamed to ...
1900 * util/i386/pc/grub-setup.c: ... this.
1901 * util/pupa-emu.c: Renamed to ...
1902 * util/grub-emu.c: ... this.
1903
e56cdf21 19042004-03-29 Marco Gerards <metgerards@student.han.nl>
1905
1906 Add support for the newworld apple macintosh (PPC). This has been
1907 tested on the powerbook 2000 only. It only adds support for
1908 generic ieee1275 functions, console and disk support. This should
1909 be easy to port to other architectures with support for Open
1910 Firmware.
1911
1912 * configure.ac: Accept the powerpc as host_cpu. In the case of
1913 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
1914 specific tests are only executed while building for the i386.
1915 Inverse test for crosscompile.
1916 * genmk.rb (Utility): Allow assembler files.
1917 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
1918 * conf/powerpc-ieee1275.rmk: New file.
1919 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
1920 * disk/powerpc/ieee1275/partition.c: Likewise.
1921 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
1922 * include/pupa/powerpc/ieee1275/console.h: Likewise.
1923 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
1924 * include/pupa/powerpc/ieee1275/time.h: Likewise.
1925 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
1926 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
1927 * include/pupa/powerpc/ieee1275/loader.h
1928 * include/pupa/powerpc/setjmp.h: Likewise.
1929 * include/pupa/powerpc/types.h: Likewise.
1930 * kern/powerpc/ieee1275/init.c: Likewise.
1931 * kern/powerpc/ieee1275/openfw.c: Likewise.
1932 * term/powerpc/ieee1275/ofconsole.c: Likewise.
1933
1934 These files were written by Johan Rydberg
1935 (jrydberg@night.trouble.net) and I only modified them slightly.
1936
1937 * boot/powerpc/ieee1275/cmain.c: New file.
1938 * boot/powerpc/ieee1275/crt0.S: Likewise.
1939 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
1940 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
1941
8c8cc205 19422004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
1943
1944 * Makefile.in: Update copyright.
1945 * genmodsrc.sh: Likewise.
1946 * gensymlist.sh: Likewise.
1947 * term/i386/pc/vga.c: Indent correctly.
1948
1949 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
1950 bugreporting address.
1951 * util/i386/pc/pupa-setup.c (usage): Likewise,
1952 (main): Call pupa_ext2_init and pupa_ext2_fini.
1953
1954 * fs/fat.c (log2): Renamed to ...
1955 (fat_log2): ... this.
1956 All callers changed.
1957 * kern/misc.c (memcpy): Alias to pupa_memmove.
1958 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
1959 lvalue cast.
1960 * util/console.c (pupa_ncurses_fini): Return 0.
1961
1962 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
1963 Move fail label here.
1964 [__GNU__]: Don't warn when using stat.
1965 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
1966 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
1967 long int. Use strtol instead of strtoul.
1968
db1771cf 19692004-03-14 Marco Gerards <metgerards@student.han.nl>
1970
1971 * commands/boot.c: New file.
1972 * commands/cat.c: Likewise.
1973 * commands/cmp.c: Likewise.
1974 * commands/ls.c: Likewise.
1975 * commands/terminal.c: Likewise.
1976 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
1977 (pupa_register_command): Changed interface to match the new
1978 argument parser.
1979 (pupa_command_execute): Changed (almost rewritten) so it uses
1980 pupa_split_command. Added support for setting variables using the
1981 syntax `foo=bar'.
1982 (rescue_command): Changed to work with the new argument parser.
1983 (terminal_command): Moved from here to commands/terminal.c.
1984 (set_command): New function.
1985 (unset_command): New function.
1986 (insmod_command): New function.
1987 (rmmod_command): New function.
1988 (lsmod_command): New function.
1989 (pupa_command_init): Don't initialize the command terminal
1990 anymore. Initialize the commands set, unset, insmod, rmmod and
1991 lsmod.
1992 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
1993 (kernel_img_HEADERS): Add arg.h and env.h.
1994 (pupa_mkimage_LDFLAGS): Add kern/env.c.
1995 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
1996 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
1997 normal/arg.c.
1998 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
1999 terminal.mod.
2000 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
2001 (boot_mod_SOURCES): New variable.
2002 (terminal_mod_SOURCES): Likewise.
2003 (ls_mod_SOURCES): Likewise.
2004 (cmp_mod_SOURCES): Likewise.
2005 (cat_mod_SOURCES): Likewise.
2006
2007 * normal/arg.c: New file.
2008 * kern/env.c: Likewise.
2009 * include/pupa/arg.h: Likewise.
2010 * include/pupa/env.h: Likewise.
2011 * font/manager.c (font_command): Changed to match argument parsing
2012 interface changes.
2013 (PUPA_MOD_INIT): Likewise.
2014 * hello/hello.c (pupa_cmd_hello): Likewise.
2015 (PUPA_MOD_INIT): Likewise.
2016 * include/pupa/disk.h: Include <pupa/device.h>.
2017 (pupa_print_partinfo): New prototype.
2018 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
2019 (pupa_dl_get_prefix): Likewise.
2020 * include/pupa/misc.h: Include <pupa/err.h>.
2021 (pupa_isgraph): New prototype.
2022 (pupa_isdigit): Likewise.
2023 (pupa_split_cmdline): Likewise.
2024 * include/pupa/normal.h: Include <pupa/arg.h>.
2025 (pupa_command): Changed the prototype of the member `func' to
2026 match the argument parsing interface. Added member `options'.
2027 (pupa_register_command): Updated to match function.
2028 (pupa_arg_parse): New prototype.
2029 (pupa_hello_init) [PUPA_UTIL]: New prototype.
2030 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
2031 (pupa_ls_init) [PUPA_UTIL]: Likewise.
2032 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
2033 (pupa_cat_init) [PUPA_UTIL]: Likewise.
2034 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
2035 (pupa_boot_init) [PUPA_UTIL]: Likewise.
2036 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
2037 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
2038 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
2039 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
2040 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
2041 * kern/disk.c: Include <pupa/file.h>.
2042 (pupa_print_partinfo): New function.
2043 * kern/dl.c: Include <pupa/env.h>.
2044 (pupa_dl_dir): Variable removed.
2045 (pupa_dl_load): Use the environment variable `prefix' instead of
2046 the variable pupa_dl_dir.
2047 (pupa_dl_set_prefix): Function removed.
2048 (pupa_dl_get_prefix): Likewise.
2049 * kern/i386/pc/init.c: Include <pupa/env.h>.
2050 (pupa_machine_init): Use the environment variable `prefix' instead of
2051 using pupa_dl_set_prefix to set the prefix.
2052 * kern/main.c: Include <pupa/env.h>.
2053 (pupa_set_root_dev): Use the environment variable `prefix' instead of
2054 using pupa_dl_get_prefix to get the prefix.
2055 * kern/misc.c: Include <pupa/env.h>.
2056 (pupa_isdigit): New function.
2057 (pupa_isgraph): Likewise.
2058 (pupa_ftoa): Likewise.
2059 (pupa_vsprintf): Added support for printing values of the type
2060 `double'. Make it possible to format variable output when using
2061 formatting like `%1.2%f'.
2062 (pupa_split_cmdline): New function.
2063 * kern/rescue.c: Include <pupa/env.h>.
2064 (next_word): Removed function.
2065 (pupa_rescue_cmd_prefix): Likewise.
2066 (pupa_rescue_cmd_set): New function.
2067 (pupa_rescue_cmd_unset): New function.
2068 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
2069 split the command line instead of splitting it here. Added
2070 support for setting variables using the syntax `foo=bar'. Don't
2071 initialize the prefix command anymore. Initialized the set and
2072 unset commands.
2073 * normal/cmdline.c: Include <pupa/env.h>.
2074 (pupa_tab_complete): Added prototypes for print_simple_completion,
2075 print_partition_completion, add_completion, iterate_commands,
2076 iterate_dev, iterate_part and iterate_dir. Moved code to print
2077 partition information from here to kern/disk.c.
2078 (pupa_cmdline_run): Don't check if the funtion exists anymore.
2079 * normal/main.c: Include <pupa/env.h>.
2080 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
2081 instead of using pupa_dl_get_prefix to get the prefix.
2082 * term/i386/pc/vga.c: Include <pupa/arg.h>.
2083 (check_vga_mem): Cast pointers to `void *' to silence a gcc
2084 warning.
2085 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
2086 (pupa_vga_setcolor): Declare unused variables with `__attribute__
2087 ((unused))' to silence a gcc warning.
2088 (pupa_vga_setcolor): Likewise.
2089 (debug_command): Changed to match argument parsing
2090 interface changes.
2091 * util/pupa-emu.c: Include <pupa/env.h>.
2092 (options): Added 0's for unused fields to silence a gcc warning.
2093 (argp): Likewise.
2094 (main): Use the environment variable `prefix' instead of using
2095 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
2096 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
2097 and terminal.
2098
2099 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
2100 * util/misc.c: Include <malloc.h>.
2101 (pupa_malloc): Rewritten so errors are correctly reported.
2102 (pupa_realloc): Likewise.
2103 (pupa_memalign): Likewise.
2104 (pupa_mm_init_region): Declare unused variables with
2105 `__attribute__ ((unused))' to silence a gcc warning.
2106 * normal/i386/setjmp.S: Remove tab at the end of the file to
2107 silence a gcc warning.
2108 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
2109 variables with `__attribute__ ((unused))' to silence a gcc
2110 warning.
2111 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
2112 local variable i unsigned to silence a gcc warning.
2113
2114 * kern/term.c: Include <pupa/misc.h>.
2115 (pupa_more_lines): New variable.
2116 (pupa_more): Likewise.
2117 (pupa_putcode): When the pager is active pause at the end of every
2118 screen.
2119 (pupa_set_more): New function.
2120 * include/pupa/term.h (pupa_set_more): New prototype.
2121
2122
3b1139cb 21232004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
2124
2125 Now this project is GRUB 2 rather than PUPA. The location of
2126 the CVS repository was moved to GRUB's.
2127
2128 * configure.ac: Use bug-grub as the reporting address.
2129 Use GRUB instead of PUPA.
2130 Change the version number to 1.90.
2131
8367695c 21322004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
2133
2134 * genkernsyms.sh: Updated copyright information.
2135 * genmk.rb: Likewise.
2136 * genmodsrc.sh: Likewise.
2137 * gensymlist.sh: Likewise.
2138 * boot/i386/pc/boot.S: Likewise.
2139 * boot/i386/pc/diskboot.S: Likewise.
2140 * disk/i386/pc/biosdisk.c: Likewise.
2141 * disk/i386/pc/partition.c: Likewise.
2142 * font/manager.c: Likewise.
2143 * fs/ext2.c: Likewise.
2144 * fs/fat.c: Likewise.
2145 * include/pupa/boot.h: Likewise.
2146 * include/pupa/device.h: Likewise.
2147 * include/pupa/disk.h: Likewise.
2148 * include/pupa/dl.h: Likewise.
2149 * include/pupa/elf.h: Likewise.
2150 * include/pupa/err.h: Likewise.
2151 * include/pupa/file.h: Likewise.
2152 * include/pupa/font.h: Likewise.
2153 * include/pupa/fs.h: Likewise.
2154 * include/pupa/kernel.h: Likewise.
2155 * include/pupa/loader.h: Likewise.
2156 * include/pupa/misc.h: Likewise.
2157 * include/pupa/mm.h: Likewise.
2158 * include/pupa/net.h: Likewise.
2159 * include/pupa/normal.h: Likewise.
2160 * include/pupa/rescue.h: Likewise.
2161 * include/pupa/setjmp.h: Likewise.
2162 * include/pupa/symbol.h: Likewise.
2163 * include/pupa/term.h: Likewise.
2164 * include/pupa/types.h: Likewise.
2165 * include/pupa/i386/setjmp.h: Likewise.
2166 * include/pupa/i386/types.h: Likewise.
2167 * include/pupa/i386/pc/biosdisk.h: Likewise.
2168 * include/pupa/i386/pc/boot.h: Likewise.
2169 * include/pupa/i386/pc/console.h: Likewise.
2170 * include/pupa/i386/pc/init.h: Likewise.
2171 * include/pupa/i386/pc/kernel.h: Likewise.
2172 * include/pupa/i386/pc/linux.h: Likewise.
2173 * include/pupa/i386/pc/loader.h: Likewise.
2174 * include/pupa/i386/pc/memory.h: Likewise.
2175 * include/pupa/i386/pc/multiboot.h: Likewise.
2176 * include/pupa/i386/pc/partition.h: Likewise.
2177 * include/pupa/i386/pc/time.h: Likewise.
2178 * include/pupa/i386/pc/vga.h: Likewise.
2179 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
2180 * include/pupa/util/getroot.h: Likewise.
2181 * include/pupa/util/misc.h: Likewise.
2182 * include/pupa/util/resolve.h: Likewise.
2183 * kern/device.c: Likewise.
2184 * kern/disk.c: Likewise.
2185 * kern/dl.c: Likewise.
2186 * kern/err.c: Likewise.
2187 * kern/file.c: Likewise.
2188 * kern/fs.c: Likewise.
2189 * kern/loader.c: Likewise.
2190 * kern/main.c: Likewise.
2191 * kern/misc.c: Likewise.
2192 * kern/mm.c: Likewise.
2193 * kern/rescue.c: Likewise.
2194 * kern/term.c: Likewise.
2195 * kern/i386/dl.c: Likewise.
2196 * kern/i386/pc/init.c: Likewise.
2197 * kern/i386/pc/lzo1x.S: Likewise.
2198 * kern/i386/pc/startup.S: Likewise.
2199 * loader/i386/pc/chainloader.c: Likewise.
2200 * loader/i386/pc/linux.c: Likewise.
2201 * loader/i386/pc/multiboot.c: Likewise.
2202 * normal/cmdline.c: Likewise.
2203 * normal/command.c: Likewise.
2204 * normal/main.c: Likewise.
2205 * normal/menu.c: Likewise.
2206 * normal/i386/setjmp.S: Likewise.
2207 * term/i386/pc/console.c: Likewise.
2208 * term/i386/pc/vga.c: Likewise.
2209 * util/console.c: Likewise.
2210 * util/genmoddep.c: Likewise.
2211 * util/misc.c: Likewise.
2212 * util/pupa-emu.c: Likewise.
2213 * util/resolve.c: Likewise.
2214 * util/unifont2pff.rb: Likewise.
2215 * util/i386/pc/biosdisk.c: Likewise.
2216 * util/i386/pc/getroot.c: Likewise.
2217 * util/i386/pc/pupa-mkimage.c: Likewise.
2218 * util/i386/pc/pupa-setup.c: Likewise.
2219
e6eced71 22202004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
2221
2222 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
2223 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
2224 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
2225 reading and reset it after reading.
2226 (pupa_ext2_close): Return PUPA_ERR_NONE.
2227
2228 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
2229 Correct value.
2230 (struct linux_kernel_header): Add kernel_version and
2231 initrd_addr_max.
2232 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
2233 pupa_file_read succeeds.
2234 (pupa_rescue_cmd_initrd): Implement.
2235
5aded270 22362003-12-03 Marco Gerards <metgerards@student.han.nl>
2237
2238 * fs/ext2.c (pupa_ext2_label): New function.
2239 (pupa_ext2_fs): Added label.
2240 * fs/fat.c (pupa_fat_label): New function.
2241 (pupa_fat_fs): Added label.
2242 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
2243
2244 * kern/misc.c (pupa_strndup): New function.
2245 * include/pupa/misc.h (pupa_strndup): New prototype.
2246
2247 * include/pupa/normal.h: Include <pupa/err.h>.
2248 (pupa_set_history): New prototype.
2249 (pupa_iterate_commands): New prototype.
2250 * normal/cmdline.c: Include <pupa/machine/partition.h>,
2251 <pupa/disk.h>, <pupa/file.h>.
2252 (hist_size): New variable.
2253 (hist_lines): Likewise.
2254 (hist_end): Likewise.
2255 (hist_used): Likewise.
2256 (pupa_set_history): New function.
2257 (pupa_history_get): Likewise.
2258 (pupa_history_add): Likewise.
2259 (pupa_history_replace): Likewise.
2260 (pupa_tab_complete): Likewise.
2261 (pupa_cmdline_run): Added tab completion and history buffer. Tab
2262 completion shows partitionnames while completing partitions, this
2263 feature was suggested by Jeff Bailey.
2264 * normal/command.c (pupa_iterate_commands): New function.
2265 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
2266 (pupa_normal_init): Initialize history buffer.
2267 (PUPA_MOD_INIT): Likewise.
2268 (pupa_normal_fini): Free the history buffer.
2269 (PUPA_MOD_FINI): Likewise.
2270
2271 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
2272 key.
2273
2274 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
2275 * configure.ac [i386]: Check for regparam bug.
2276 (NESTED_FUNC_ATTR) [! i386]: Defined.
2277
1f7315a3 22782003-11-17 Marco Gerards <metgerards@student.han.nl>
2279
2280 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
2281 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
2282 (pupa_emu_SOURCES): New variable.
2283 (pupa_emu_LDFLAGS): Likewise.
2284 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
2285 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
2286 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
2287 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
2288 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
2289 (pupa_jmp_buf): New typedef.
2290 (pupa_setjmp) [PUPA_UTIL]: New macro.
2291 (pupa_longjmp) [PUPA_UTIL]: Likewise.
2292 * include/pupa/term.h (struct pupa_term): New member `refresh'.
2293 (pupa_refresh): New prototype.
2294 * include/pupa/util/getroot.h: New file.
2295 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
2296 it.
2297 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
2298 (pupa_rescue_cmd_cat): Likewise.
2299 (pupa_rescue_cmd_ls): Likewise.
2300 (pupa_rescue_cmd_testload): Likewise.
2301 (pupa_rescue_cmd_lsmod): Likewise.
2302 * normal/cmdline.c (pupa_cmdline_get): Likewise.
2303 * normal/menu.c (run_menu): Likewise.
2304 * kern/term.c (pupa_cls): Likewise.
2305 (pupa_refresh): New function.
2306 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
2307 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
2308 * util/console.c: New file.
2309
2310 * util/i386/pc/getroot.c: New file.
2311 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
2312 (pupa_putchar): New function.
2313 (pupa_refresh): Likewise.
2314 (xgetcwd): Function moved to ...
2315 (strip_extra_slashes): Likewise.
2316 (get_prefix): Likewise.
2317 * util/i386/pc/getroot.c: ... here.
2318 (find_root_device): Function moved and renamed to...
2319 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
2320 Changed all callers.
2321 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
2322 and renamed to...
2323 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
2324 Changed all callers.
2325 * util/misc.c (pupa_memalign): New function.
2326 (pupa_mm_init_region): Likewise.
2327 (pupa_register_exported_symbols): Likewise.
2328 (pupa_putchar): Function removed.
2329 * util/pupa-emu.c: New file.
2330
9a5c1ade 23312003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
2332
2333 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
2334 (_multiboot_mod_SOURCES): New variable.
2335 (_multiboot_mod_CFLAGS): Likewise.
2336 * loader/i386/pc/multiboot.c: New file.
2337 * include/pupa/i386/pc/multiboot.h: Likewise.
2338 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
2339 (pupa_multiboot_real_boot): New function.
2340 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
2341 (pupa_multiboot_real_boot): New prototype.
2342 (pupa_rescue_cmd_multiboot): Likewise
2343 (pupa_rescue_cmd_module): Likewise.
2344
2345 * kern/loader.c (pupa_loader_set): Continue when
2346 pupa_loader_unload_func() fails.
2347 (pupa_loader_unset): New function.
2348 * include/pupa/loader.h (pupa_loader_unset): New prototype.
2349
2350 * kern/misc.c (pupa_stpcpy): New function.
2351 * include/pupa/misc.h (pupa_stpcpy): New prototype.
2352
8e72a9c0 23532003-11-12 Marco Gerards <metgerards@student.han.nl>
2354
2355 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
2356 for available extensions.
2357
2358 * include/pupa/i386/pc/time.h: New file.
2359 * kern/disk.c: Include <pupa/machine/time.h>.
2360 (PUPA_CACHE_TIMEOUT): New macro.
2361 (pupa_last_time): New variable.
2362 (pupa_disk_open): Flush the cache when there was a timeout.
2363 (pupa_disk_close): Reset the timer.
2364 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
2365 pupa_currticks.
2366 * util/misc.c: Include <sys/times.h>
2367 (pupa_get_rtc): New function.
2368
c4adbd32 23692003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
2370
2371 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
2372 as blocks.
2373 (pupa_ext2_get_file_block): Use blocks member.
2374
2375 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
2376 first block. Return -1 instead of pupa_errno on error.
2377
bfd30f06 23782003-10-27 Marco Gerards <metgerards@student.han.nl>
2379
2380 * README: In the pupa-mkimage example use _chain instead of chain
2381 and ext2 instead of fat.
2382 * TODO: Replace ext2fs with jfs as an example. Add an item for
2383 adding journal playback for ext2fs.
2384 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
2385 (pkgdata_MODULES): Added ext2.mod.
2386 (ext2_mod_SOURCES): New variable.
2387 (ext2_mod_CFLAGS): Likewise.
2388 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
2389 * include/pupa/misc.h (pupa_strncpy): New prototype.
2390 (pupa_strcat): Likewise.
2391 (pupa_strncmp): Likewise.
2392 * kern/misc.c (pupa_strcat): Enable function.
2393 (pupa_strncpy): New function.
2394 (pupa_strncmp): Likewise.
2395 * fs/ext2.c: New file.
2396
2397 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
2398 when the read failed before retrying.
2399 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
2400 (_FILE_OFFSET_BITS): Likewise.
2401 * configure.ac: Added AC_SYS_LARGEFILE.
2402
98d15063 24032003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
2404
2405 * genmk.rb (PModule#rule): Make sure to get only symbol names
2406 from the output of nm.
2407 Reported by Robert Millan <zeratul2@wanadoo.es>.
2408
18d9c7cd 24092003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
2410
2411 I forgot to check in these changes for a long time. This adds
2412 incomplete support for VGA console, and this is still very
2413 buggy. Also, a lot of consideration is required for I18N,
2414 UNICODE, and VGA font issues. Therefore, assume that this is
2415 such that "better than nothing".
2416
2417 * font/manager.c: New file.
2418 * include/pupa/font.h: Likewise.
2419 * include/pupa/i386/pc/vga.h: Likewise.
2420 * term/i386/pc/vga.c: Likewise.
2421 * util/unifont2pff.rb: Likewise.
2422
2423 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
2424 (pkgdata_MODULES): Added vga.mod and font.mod.
2425 (vga_mod_SOURCES): New variables.
2426 (vga_mod_CFLAGS): Likewise.
2427 (font_mod_SOURCES): Likewise.
2428 (font_mod_CFLAGS): Likewise.
2429
2430 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
2431
2432 * include/pupa/term.h: Include pupa/err.h.
2433 (struct pupa_term): Added init and fini.
2434 Changed the argument of putchar to pupa_uint32_t.
2435
2436 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
2437 (pupa_console_real_putchar): New prototype.
2438 (pupa_console_putchar): Removed.
2439 (pupa_console_checkkey): Exported.
2440 (pupa_console_getkey): Likewise.
2441
2442 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
2443 characters.
2444
2445 * kern/term.c (pupa_term_set_current): Rewritten.
2446 (pupa_putchar): Likewise.
2447 (pupa_putcode): New function.
2448
2449 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
2450 (pupa_console_real_putchar): ... this.
2451 (pupa_vga_set_mode): New function.
2452 (pupa_vga_get_font): Likewise.
2453
2454 * normal/command.c: Include pupa/term.h.
2455 (terminal_command): New function.
2456 (pupa_command_init): Register the command "terminal".
2457
2458 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
2459 (DISP_UP): Likewise.
2460 (DISP_RIGHT): Likewise.
2461 (DISP_DOWN): Likewise.
2462 (DISP_HLINE): Likewise.
2463 (DISP_VLINE): Likewise.
2464 (DISP_UL): Likewise.
2465 (DISP_UR): Likewise.
2466 (DISP_LL): Likewise.
2467 (DISP_LR): Likewise.
2468
2469 * term/i386/pc/console.c (pupa_console_putchar): New function.
2470
977329f5 24712003-02-08 NIIBE Yutaka <gniibe@m17n.org>
2472
2473 * util/resolve.c (pupa_util_resolve_dependencies): BUG
2474 FIX. Reverse the path_list.
2475
2476 * include/pupa/normal.h: Export pupa_register_command and
2477 pupa_unregister_command.
2478
2479 * hello/hello.c (pupa_cmd_hello): New module.
2480 * conf/i386-pc.rmk: Added hello.mod.
2481
1f5ab428 24822003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
2483
2484 * kern/i386/pc/lzo1x.S: New file.
2485
2486 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
2487 (compress_kernel): New variable.
2488 (generate_image): Heavily modified to support compressing a
2489 large part of the core image.
2490
2491 * util/misc.c (pupa_util_read_image): Fix a file descriptor
2492 leak.
2493 (pupa_util_load_image): New function.
2494
2495 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
2496 (pupa_compressed_size): New variable.
2497 (codestart): Enable Gate A20 here.
2498 Decompress the compressed part of the core image.
2499 Rearrange the code to put functions and variables which are
2500 required for initialization in the non-compressed part.
2501 Include lzo1x.S.
2502
2503 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
2504 here.
2505
2506 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
2507
2508 * include/pupa/i386/pc/kernel.h
2509 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
2510 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
2511 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
2512 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
2513 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
2514
2515 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
2516
2517 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
2518 (Utility#rule): Likewise.
2519
2520 * configure.ac: Check if LZO is available.
2521
ce5bf700 25222003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
2523
2524 * include/pupa/normal.h: New file.
2525 * include/pupa/setjmp.h: Likewise.
2526 * include/pupa/i386/setjmp.h: Likewise.
2527 * normal/cmdline.c: Likewise.
2528 * normal/command.c: Likewise.
2529 * normal/main.c: Likewise.
2530 * normal/menu.c: Likewise.
2531 * normal/i386/setjmp.S: Likewise.
2532
2533 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
2534 (pupa_rescue_cmd_initrd): Likewise.
2535
2536 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
2537 Likewise.
2538
2539 * kern/i386/pc/startup.S (translation_table): New variable.
2540 (translate_keycode): New function.
2541 (pupa_console_getkey): Call translate_keycode.
2542
2543 * kern/rescue.c (attempt_normal_mode): New function.
2544 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
2545 it failed, print a message.
2546
2547 * kern/mm.c (pupa_real_malloc): Print more information when a
2548 free magic is broken.
2549 (pupa_free): If the first free header is not free actually, set
2550 it to P.
2551
2552 * kern/main.c (pupa_load_normal_mode): Just load the module
2553 "normal".
2554 (pupa_main): Don't print the message
2555 "Entering into rescue mode..." here.
2556
2557 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
2558 Declared.
2559 (pupa_rescue_cmd_initrd): Likewise.
2560 (pupa_rescue_cmd_initrd): Likewise.
2561
2562 * include/pupa/symbol.h (FUNCTION): Specify the type.
2563 (VARIABLE): Likewise.
2564
2565 * include/pupa/err.h (pupa_err_t): Added
2566 PUPA_ERR_UNKNOWN_COMMAND.
2567
2568 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
2569 (pupa_dl_get_prefix): Likewise.
2570
2571 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
2572 Added _chain.mod and _linux.mod instead of chain.mod and
2573 linux.mod.
2574 (chain_mod_SOURCES): Renamed to ...
2575 (_chain_mod_SOURCES): ... this.
2576 (chain_mod_CFLAGS): Renamed to ...
2577 (_chain_mod_CFLAGS): ... this.
2578 (linux_mod_SOURCES): Renamed to ...
2579 (_linux_mod_SOURCES): ... this.
2580 (linux_mod_CFLAGS): Renamed to ...
2581 (_linux_mod_CFLAGS): ... this.
2582 (normal_mod_SOURCES): New variable.
2583 (normal_mod_CFLAGS): Likewise.
2584 (normal_mod_ASFLAGS): Likewise.
2585
25862003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
2587
2588 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
2589 possible.
2590
2591 * kern/dl.c (pupa_dl_ref): Refer dependending modules
2592 recursively.
2593 (pupa_dl_unref): Unrefer depending modules recursively.
2594 Don't call pupa_dl_unload implicitly, because PUPA can crash if
2595 a module is unloaded before one depending on that module is
2596 unloaded.
2597 (pupa_dl_unload): Unload depending modules explicitly,
2598 if possible.
2599
c04da074 26002003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
2601
2602 * include/pupa/i386/pc/linux.h: New file.
2603 * loader/i386/pc/linux.c: Likewise.
2604
2605 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
2606 Removed.
2607 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
2608 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
2609 of PUPA_CHAINLOADER_BOOT_SECTOR.
2610
2611 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
2612 (pupa_linux_prot_size): New variable.
2613 (pupa_linux_tmp_addr): Likewise.
2614 (pupa_linux_real_addr): Likewise.
2615 (pupa_linux_boot_zimage): New function.
2616 (pupa_linux_boot_bzimage): Likewise.
2617
2618 * kern/i386/pc/init.c (struct mem_region): New structure.
2619 (MAX_REGIONS): New macro.
2620 (mem_regions): New variable.
2621 (num_regions): Likewise.
2622 (pupa_os_area_addr): Likewise.
2623 (pupa_os_area_size): Likewise.
2624 (pupa_lower_mem): Likewise.
2625 (pupa_upper_mem): Likewise.
2626 (add_mem_region): New function.
2627 (compact_mem_regions): Likewise.
2628 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
2629 the size of the conventional memory and that of so-called upper
2630 memory (before the first memory hole).
2631 Instead of adding each found region to free memory, use
2632 add_mem_region and add them after removing overlaps.
2633 Also, add only 1/4 of the upper memory to free memory. The rest
2634 is used for loading OS images. Maybe this is ad hoc, but this
2635 makes it much easier to relocate OS images when booting.
2636
2637 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
2638 (pupa_enter_rescue_mode): Don't register initrd and module.
2639
2640 * kern/mm.c: Include pupa/dl.h.
2641
2642 * kern/main.c: Include pupa/file.h and pupa/device.h.
2643
2644 * kern/loader.c (pupa_loader_load_module_func): Removed.
2645 (pupa_loader_load_module): Likewise.
2646
2647 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
2648 ``.o''.
2649
2650 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
2651 (pupa_linux_tmp_addr): Likewise.
2652 (pupa_linux_real_addr): Likewise.
2653 (pupa_linux_boot_zimage): Likewise.
2654 (pupa_linux_boot_bzimage): Likewise.
2655
2656 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
2657 (pupa_upper_mem): Likewise.
2658 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
2659 module is too dangerous.
2660
2661 * include/pupa/loader.h (pupa_os_area_addr): Declared.
2662 (pupa_os_area_size): Likewise.
2663 (pupa_loader_set): Remove the first argument. Loader doesn't
2664 manage modules or initrd any longer.
2665 (pupa_loader_load_module): Removed.
2666
2667 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
2668 (linux_mod_SOURCES): New variable.
2669 (linux_mod_CFLAGS): Likewise.
2670
a13f9237 26712003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
2672
2673 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
2674 the length of a blocklist correctly.
2675
2676 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
2677 Use ioctl only if the OS file is a block device.
2678 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
2679 not very useful for normal files.
2680
2681 * kern/main.c (pupa_set_root_dev): New function.
2682 (pupa_load_normal_mode): Likewise.
2683 (pupa_main): Call those above.
2684
2685 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
2686 pupa_uint16_t.
2687
2688 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
2689
a5ffe966 26902003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
2691
2692 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
2693 (setup): Configure the installed partition information and the
2694 dl prefix.
2695
2696 * loader/i386/pc/chainloader.c (my_mod): New variable.
2697 (pupa_chainloader_unload): New function.
2698 (pupa_rescue_cmd_chainloader): Refer itself.
2699 (PUPA_MOD_INIT): Save its own module in MY_MOD.
2700
2701 * kern/i386/pc/startup.S (install_partition): Removed.
2702 (version_string): Likewise.
2703 (config_file): Likewise.
2704 (pupa_install_dos_part): New variable.
2705 (pupa_install_bsd_part): Likewise.
2706 (pupa_prefix): Likewise.
2707 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
2708
2709 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
2710 and pupa/misc.h.
2711 (make_install_device): New function.
2712 (pupa_machine_init): Set the dl prefix.
2713
2714 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
2715 (buf): Renamed to ...
2716 (linebuf): ... this.
2717 (pupa_rescue_cmd_prefix): New function.
2718 (pupa_rescue_cmd_insmod): Likewise.
2719 (pupa_rescue_cmd_rmmod): Likewise.
2720 (pupa_rescue_cmd_lsmod): Likewise.
2721 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
2722 rmmod and lsmod.
2723
2724 * kern/mm.c (pupa_memalign): If failed even after invalidating
2725 disk caches, unload unneeded modules and retry.
2726
2727 * kern/misc.c (pupa_memmove): New function.
2728 (pupa_memcpy): Removed.
2729 (pupa_strcpy): New function.
2730 (pupa_itoa): Made static.
2731
2732 * kern/dl.c (pupa_dl_iterate): New function.
2733 (pupa_dl_ref): Likewise.
2734 (pupa_dl_unref): Likewise.
2735 (pupa_dl_unload): Return if succeeded or not.
2736 (pupa_dl_unload_unneeded): New function.
2737 (pupa_dl_unload_all): Likewise.
2738 (pupa_dl_init): Renamed to ...
2739 (pupa_dl_set_prefix): ... this.
2740 (pupa_dl_get_prefix): New function.
2741
2742 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
2743 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
2744 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
2745 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
2746 (pupa_install_dos_part): Declared.
2747 (pupa_install_bsd_part): Likewise.
2748 (pupa_prefix): Likewise.
2749 (pupa_boot_drive): Likewise.
2750
2751 * include/pupa/types.h: Fix a typo.
2752
2753 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
2754 pupa_memmove.
2755 (pupa_memmove): Declared.
2756 (pupa_strcpy): Likewise.
2757
2758 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
2759 pupa_mod_init takes one argument, its own module.
2760 (pupa_dl_unload_unneeded): Declared.
2761 (pupa_dl_unload_all): Likewise.
2762 (pupa_dl_ref): Likewise.
2763 (pupa_dl_unref): Likewise.
2764 (pupa_dl_iterate): Likewise.
2765 (pupa_dl_init): Renamed to ...
2766 (pupa_dl_set_prefix): ... this.
2767 (pupa_dl_get_prefix): Declared.
2768
2769 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
2770 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
2771 unloaded.
2772 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
2773 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
2774
2775 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
2776 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
2777
012d7999 27782003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
2779
2780 * util/i386/pc/pupa-setup.c (setup): Define the internal
2781 function find_first_partition_start at the top level, because GCC
2782 3.0.x cannot compile internal functions in deeper scopes
2783 correctly.
2784 (find_root_device): Use lstat instead of stat.
2785 Don't follow symbolic links.
2786 Fix the path-constructing code.
2787
2788 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
2789 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
2790 by a BLKGETSIZE ioctl first, because block devices don't fill
2791 the member st_mode of the structure stat on Linux.
2792 [__linux__] (linux_find_partition): Use a temporary buffer
2793 REAL_DEV for the working space. Copy it to DEV before returning.
2794 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
2795 buffer cache consistent.
2796 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
2797 strncmp. The previous value was merely wrong.
2798 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
2799
2800 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
2801 FAT size is 12. The previous value was merely wrong.
2802
2803 * kern/main.c (pupa_main): Don't split the starting message from
2804 newlines.
2805
2806 * kern/term.c (pupa_putchar): Put CR after LF instead of before
2807 LF, because BIOS goes crazy about character attributes in this
2808 case.
2809
1cc73a62 28102003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
2811
2812 * include/i386/pc/util/biosdisk.h: New file.
2813 * util/i386/pc/biosdisk.c: Likewise.
2814 * util/i386/pc/pupa-setup.c: Likewise.
2815
2816 * Makefile.in (INCLUDE_DISTFILES): Added
2817 include/pupa/i386/pc/util/biosdisk.h.
2818 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
2819 directory util/i386/pc.
2820 (install-local): Added a rule for sbin_UTILITIES.
2821 (uninstall): Likewise.
2822
2823 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
2824
2825 * util/misc.c (xrealloc): New function.
2826 (pupa_malloc): Likewise.
2827 (pupa_free): Likewise.
2828 (pupa_realloc): Likewise.
2829 (pupa_stop): Likewise.
2830 (pupa_putchar): Likewise.
2831
2832 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
2833
2834 * include/pupa/util/misc.h (xrealloc): Declared.
2835
2836 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
2837 macro.
2838 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
2839 (PUPA_BOOT_MACHINE_BPB_END): ... this.
2840
2841 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
2842 [PUPA_UTIL] (pupa_fat_fini): Likewise.
2843
2844 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
2845 way should be implemented.
2846 [PUPA_UTIL] (pupa_fat_fini): Likewise.
2847
2848 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
2849 the size of NAME for safety.
2850 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
2851 0x88.
2852
2853 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
2854 (pupa_setup_SOURCES): Likewise.
2855
2856 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
2857
08b70fe8 28582002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
2859
2860 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
2861 bunch of pushl's from pusha, because this destroys the return
2862 value.
2863
62ddcc8f 28642002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
2865
2866 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
2867 This means that any missing prototypes could be fatal. Also, you
2868 must take care when writing assembly code. See the comments at
2869 the beginning of startup.S, for more details.
2870
2871 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
2872 compilation mechanism.
2873 (pupa_chainloader_real_boot): Likewise.
2874 (pupa_biosdisk_rw_int13_extensions): Likewise.
2875 (pupa_biosdisk_rw_standard): Likewise.
2876 (pupa_biosdisk_check_int13_extensions): Likewise.
2877 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
2878 (pupa_biosdisk_get_diskinfo_standard): Likewise.
2879 (pupa_get_memsize): Likewise.
2880 (pupa_get_mmap_entry): Likewise.
2881 (pupa_console_putchar): Likewise.
2882 (pupa_console_setcursor): Likewise.
2883 (pupa_getrtsecs): Use pushl instead of push.
2884
2885 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
2886 memory instead of the stack for a mmap entry, because some
2887 BIOSes may ignore the maximum size and overflow.
2888
2889 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
2890
2891 * genmk.rb (PModule#rule): Compile automatically generated
2892 sources with module-specific CFLAGS as well as other sources.
2893
9962ed99 28942002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
2895
2896 * configure.ac: Check ld.
2897 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
2898 respectively, before checking endianness and sizes.
2899
2900 * Makefile.in (LD): New variable.
2901
abdfc3c5 29022002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
2903
2904 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
2905
6a161fa9 29062002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
2907
2908 * Changelog: New file.
2909