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