]> git.proxmox.com Git - grub2.git/blame - ChangeLog
2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
[grub2.git] / ChangeLog
CommitLineData
0d6e1189 12006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
2
3 * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
4 grub/machine/linux.h
5 * loader/i386/pc/linux.c: Likewise.
6
7 * include/grub/i386/pc/linux.h: Moved to ...
8 * include/grub/i386/linux.h: ... here.
9
10 * include/grub/i386/linux.h (struct linux_kernel_params): New
11 struct.
12
31b86e9f 132006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
14
15 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
16 checking.
17 (grub_video_vbe_blit_glyph): Likewise.
18 (grub_video_vbe_blit_bitmap): Likewise.
19 (grub_video_vbe_blit_render_target): Likewise.
20
83b984de 212006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
22
23 * configure.ac (--with-platform): Properly quote the square
24 brackets.
25
5f0413bd 262006-05-08 Marco Gerards <marco@gnu.org>
27
28 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
29 this...
30 (kernel_elf_HEADERS): ...to this. Updated all users.
31 (grubof_symlist.c): Renamed from this...
32 (kernel_elf_symlist.c): ...to this. Updated all users.
33 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
34 (grubof_SOURCES): Renamed from this...
35 (kernel_elf_SOURCES): ...to this.
36 (grubof_HEADERS): Renamed from this...
37 (kernel_elf_HEADERS): ...to this.
38 (grubof_CFLAGS): Renamed from this...
39 (kernel_elf_CFLAGS): ...to this.
40 (grubof_ASFLAGS): Renamed from this...
41 (kernel_elf_ASFLAGS): ...to this.
42 (grubof_LDFLAGS): Renamed from this...
43 (kernel_elf_LDFLAGS): ...to this.
44
45 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
46 this...
47 (kernel_elf_HEADERS): ...to this. Updated all users.
48 (grubof_symlist.c): Renamed from this...
49 (kernel_elf_symlist.c): ...to this. Updated all users.
50 (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
51 (grubof_SOURCES): Renamed from this...
52 (kernel_elf_SOURCES): ...to this.
53 (grubof_HEADERS): Renamed from this...
54 (kernel_elf_HEADERS): ...to this.
55 (grubof_CFLAGS): Renamed from this...
56 (kernel_elf_CFLAGS): ...to this.
57 (grubof_ASFLAGS): Renamed from this...
58 (kernel_elf_ASFLAGS): ...to this.
59 (grubof_LDFLAGS): Renamed from this...
60 (kernel_elf_LDFLAGS): ...to this.
61
62 * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
63 `kernel.elf' instead of `grubof'.
64
05568c2e 652006-05-08 Yoshinori K. Okuji <okuji@enbug.org>
66
67 Add --with-platform to configure. Use pkglibdir instead of
68 pkgdatadir. This is reported by Roger Leigh.
69
70 * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
71 (host_vendor): Likewise.
72 (host_os): Likewise.
73 (pkgdatadir): Likewise.
74 (platform): New variable.
75 (pkglibdir): Likewise.
76 Use PKGLIBDIR instead of PKGDATADIR.
77
78 * util/i386/pc/grub-install.in (datadir): Removed.
79 (host_vendor): Likewise.
80 (host_os): Likewise.
81 (pkgdatadir): Likewise.
82 (platform): New variable.
83 (pkglibdir): Likewise.
84 Use PKGLIBDIR instead of PKGDATADIR.
85
86 * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
87 instead of GRUB_DATADIR.
88 (main): Likewise.
89 * util/i386/pc/grub-mkimage.c (usage): Likewise.
90 (main): Likewise.
91 * util/i386/efi/grub-mkimage.c (usage): Likewise.
92 (main): Likewise.
93
94 * configure.ac (--with-platform): New option.
95 Use PLATFORM instead of HOST_VENDOR to specify a platform.
96
97 * Makefile.in: Include a makefile based on PLATFORM instead of
98 HOST_VENDOR.
99 (pkgdatadir): Not appended by the machine type.
100 (pkglibdir): Appended by the machine type.
101 (host_vendor): Removed.
102 (platform): New variable.
103 (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
104 (install-local): Use PKGLIBDIR instead of PKGDATADIR.
105 (uninstall): Likewise.
106
4e93851c 1072006-05-07 Yoshinori K. Okuji <okuji@enbug.org>
108
109 Use the environment context in the menu. Remove the commands
110 "default" and "timeout", and use variables instead.
111
112 * normal/menu.c: Include grub/env.h.
113 (print_entry): Cast TITLE to silence gcc.
114 (get_timeout): New function.
115 (set_timeout): Likewise.
116 (get_entry_number): Likewise.
117 (run_menu): Use a default entry, a fallback entry and a timeout
118 in the environment variables "default", "fallback" and
119 "timeout". Also, tweak the default entry if it is not within the
120 current menu entries.
121 (grub_menu_run): Use a fallback entry in the environment variable
122 "fallback".
123
124 * normal/main.c (read_config_file): Do not initialize
125 NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
126 NEWMENU->TIMEOUT.
127 (grub_normal_execute): Use a data slot to store the menu.
128
129 * include/grub/normal.h (struct grub_menu): Removed default_entry,
130 fallback_entry and timeout.
131 (struct grub_menu_list): Removed.
132 (grub_menu_list_t): Likewise.
133 (struct grub_context): Likewise.
134 (grub_context_t): Likewise.
135 (grub_context_get): Likewise.
136 (grub_context_get_current_menu): Likewise.
137 (grub_context_push_menu): Likewise.
138 (grub_context_pop_menu): Likewise.
139 (grub_default_init): Likewise.
140 (grub_default_fini): Likewise.
141 (grub_timeout_init): Likewise.
142 (grub_timeout_fini): Likewise.
143
144 * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
145 and timeout.mod.
146 (normal_mod_SOURCES): Removed normal/context.c.
147
148 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
149 commands/default.c, commands/timeout.c and normal/context.c.
150 (normal_mod_SOURCES): Removed normal/context.c.
151
152 * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
153 commands/timeout.c and normal/context.c.
154 (normal_mod_SOURCES): Removed normal/context.c.
155
156 * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
157 commands/default.c, commands/timeout.c and normal/context.c.
158 (normal_mod_SOURCES): Removed normal/context.c.
159
160 * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
161 timeout.mod.
162 (default_mod_SOURCES): Removed.
163 (default_mod_CFLAGS): Likewise.
164 (default_mod_LDFLAGS): Likewise.
165 (timeout_mod_SOURCES): Removed.
166 (timeout_mod_CFLAGS): Likewise.
167 (timeout_mod_LDFLAGS): Likewise.
168
169 * DISTLIST: Removed commands/default.c, commands/timeout.c and
170 normal/context.c.
171
172 * commands/default.c: Removed.
173 * commands/timeout.c: Likewise.
174 * normal/context.c: Likewise.
175
1eb9cc1d 1762006-05-07 Vesa Jaaskelainen <chaac@nic.fi>
177
178 * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
179
385bd9c1 1802006-05-02 Yoshinori K. Okuji <okuji@enbug.org>
181
182 * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
183 "next" to "prev" for readability.
184 (struct grub_env_sorted_var): New struct.
185 (grub_env_context): Renamed to ...
186 (initial_context): ... this.
187 (grub_env_var_context): Renamed to ...
188 (current_context): ... this.
189 (grub_env_find): Look only at CURRENT_CONTEXT.
190 (grub_env_context_open): Rewritten to copy exported variables from
191 previous context.
192 (grub_env_context_close): Rewritten according to the new
193 scheme. Also, add an assertion to prevent the initial context from
194 removed.
195 (grub_env_insert): Removed the code for the sorted list.
196 (grub_env_remove): Likewise.
197 (grub_env_export): Simply mark the variable with
198 GRUB_ENV_VAR_GLOBAL.
199 (grub_env_set): A cosmetic change for naming consistency.
200 (grub_env_get): Likewise.
201 (grub_env_unset): Likewise.
202 (grub_env_iterate): Rewritten to sort variables within this
203 function.
204 (grub_register_variable_hook): Fixed for naming consistency. Call
205 grub_env_find again, only if NAME is not found at the first time.
206 (mangle_data_slot_name): New function.
207 (grub_env_set_data_slot): Likewise.
208 (grub_env_get_data_slot): Likewise.
209 (grub_env_unset_data_slot): Likewise.
210
211 * include/grub/env.h (grub_env_var_type): New enum.
212 (GRUB_ENV_VAR_LOCAL): New constant.
213 (GRUB_ENV_VAR_GLOBAL): Likewise.
214 (GRUB_ENV_VAR_DATA): Likewise.
215 (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
216 "type".
217 (grub_env_set): Replace VAR with NAME for consistency.
218 (grub_register_variable_hook): Likewise.
219 (grub_env_export): Specify the name of the argument.
220 (grub_env_set_data_slot): New prototype.
221 (grub_env_get_data_slot): Likewise.
222 (grub_env_unset_data_slot): Likewise.
223
7f362539 2242006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
225
226 Extend the loader so that GRUB can accept a loader which comes
227 back to GRUB when a loaded image exits. Also, this change adds
228 support for a chainloader on EFI.
229
230 * term/efi/console.c: Include grub/misc.h.
231 (grub_console_checkkey): Display a scan code on the top for
232 debugging. This will be removed once the EFI port gets stable.
233 Correct the scan code mapping.
234
235 * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
236 allocate memory from larger regions, in order to reduce the number
237 of allocated regions. Otherwise, the MacOSX loader panics.
238 (filter_memory_map): Avoid less than 1MB for compatibility with
239 other loaders.
240 (add_memory_regions): Allocate from the tail of a region, if
241 possible, to avoid allocating a region near to 1MB, for the MacOSX
242 loader.
243
244 * kern/efi/init.c (grub_efi_set_prefix): Specify
245 GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
246
247 * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
248 argument IMAGE_HANDLE and specify it to get a loaded image.
249 (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
250 grub_efi_get_loaded_image.
251 (grub_efi_get_filename): Divide the legnth by the size of
252 grub_efi_char16_t.
253 (grub_efi_get_device_path): New function.
254 (grub_efi_print_device_path): Print End Device Path nodes. Divide
255 the length by the size of grub_efi_char16_t for a file path device
256 path node.
257
258 * kern/loader.c (grub_loader_noreturn): New variable.
259 (grub_loader_set): Accept a new argument NORETURN. Set
260 GRUB_LOADER_NORETURN to NORETURN.
261 All callers changed.
262 (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
263 grub_machine_fini.
264
265 * include/grub/efi/efi.h (grub_efi_get_device_path): New
266 prototype.
267 (grub_efi_get_loaded_image): Take an argument to specify an image
268 handle.
269
270 * include/grub/loader.h (grub_loader_set): Added one more argument
271 NORETURN.
272
273 * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
274 instead of grub_efi_open_protocol.
275 (grub_efidisk_get_device_name): Likewise.
276 (grub_efidisk_close): Print a newline.
277 (grub_efidisk_get_device_handle): Fixed to use
278 GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
279 GRUB_EFI_DEVICE_PATH_TYPE.
280
281 * disk/efi/efidisk.c (device_path_guid): Moved to ...
282 * kern/efi/efi.c (device_path_guid): ... here.
283
284 * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
285 chain.mod.
286 (kernel_mod_HEADERS): Added efi/disk.h.
287 (_chain_mod_SOURCES): New variable.
288 (_chain_mod_CFLAGS): Likewise.
289 (_chain_mod_LDFLAGS): Likewise.
290 (chain_mod_SOURCES): Likewise.
291 (chain_mod_CFLAGS): Likewise.
292 (chain_mod_LDFLAGS): Likewise.
293
294 * DISTLIST: Added include/grub/efi/chainloader.h,
295 loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
296
297 * include/grub/efi/chainloader.h: New file.
298 * loader/efi/chainloader.c: Likewise.
299 * loader/efi/chainloader_normal.c: Likewise.
300
c0111d6e 3012006-04-30 Marco Gerards <marco@gnu.org>
302
303 * commands/configfile.c (grub_cmd_source): New function.
304 (GRUB_MOD_INIT): Register the commands `source' and `.'.
305 (GRUB_MOD_FINI): De-register the commands `source' and `.'.
306
df5341da 3072006-04-30 Marco Gerards <marco@gnu.org>
308
309 * normal/execute.c (grub_script_execute_cmd): Change the return
310 type to `grub_err_t'. Correctly return the error.
311 (grub_script_execute_cmdline): In case a command line is not a
312 command or a function, try to interpret it as an assignment.
313
f85934bd 3142006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
315
316 * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
317 (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
318 skip a node whose name is obviously invalid as UTF-16,
319 i.e. contains a NUL character. Stop the iteration when the last
320 directory entry is found. Instead of using the return value of
321 grub_hfsplus_btree_iterate_node, store the value in RET and use
322 it, because the iterator can be stopped by the last directory
323 entry.
324
8f8a2cf8 3252006-04-30 Marco Gerards <marco@gnu.org>
326
327 * include/grub/env.h (grub_env_export): New prototype. Reported
328 by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
329
a27e84ce 3302006-04-30 Marco Gerards <marco@gnu.org>
331
332 * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
333 size of the extents in a catalog file record.
334
eaef0553 3352006-04-29 Marco Gerards <marco@gnu.org>
336
337 * commands/configfile.c (grub_cmd_configfile): Execute the
338 configfile within its own context.
339
340 * include/grub/env.h (grub_env_context_open): New prototype.
341 (grub_env_context_close): Likewise.
342
343 * kern/env.c (grub_env): Removed.
344 (grub_env_sorted): Likewise.
345 (grub_env_context): New variable.
346 (grub_env_var_context): Likewise.
347 (grub_env_find): Search both the active context and the global
348 context.
349 (grub_env_context_open): New function.
350 (grub_env_context_close): Likewise.
351 (grub_env_insert): Likewise.
352 (grub_env_remove): Likewise.
353 (grub_env_export): Likewise.
354 (grub_env_set): Changed to use helper functions to avoid code
355 duplication.
356 (grub_env_iterate): Rewritten so both the current context and the
357 global context are being used.
358
359 * normal/command.c (export_command): New function.
360 (grub_command_init): Register the `export' function.
361
7b455f4d 3622006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
363
364 * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
365 explicitly to suppress gcc's warnings.
366 * fs/fat.c (grub_fat_find_dir): Likewise.
367 (grub_fat_label): Likewise.
368 * fs/xfs.c (grub_xfs_read_inode): Likewise.
369 (grub_xfs_mount): Likewise.
370 (grub_xfs_label): Likewise.
371 * fs/affs.c (grub_affs_mount): Likewise.
372 (grub_affs_label): Likewise.
373 (grub_affs_iterate_dir): Likewise.
374 * fs/sfs.c (grub_sfs_mount): Likewise.
375 (grub_sfs_iterate_dir): Likewise.
376 * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
377 * fs/hfs.c (grub_hfs_mount): Likewise.
378 (grub_hfs_cmp_catkeys): Likewise.
379 (grub_hfs_find_dir): Likewise.
380 (grub_hfs_dir): Likewise.
381 (grub_hfs_label): Likewise.
382 * fs/jfs.c (grub_jfs_mount): Likewise.
383 (grub_jfs_opendir): Likewise.
384 (grub_jfs_getent): Likewise.
385 (grub_jfs_lookup_symlink): Likewise.
386 (grub_jfs_label): Likewise.
387 * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
388 (grub_hfsplus_iterate_dir): Likewise.
389 (grub_hfsplus_btree_iterate_node): Made static.
390
391 * util/grub-emu.c (prefix): New variable.
392 (grub_machine_set_prefix): New function.
393 (main): Do not set the environment variable "prefix" here. Only
394 set PREFIX, which is used later by grub_machine_set_prefix.
395
396 * include/grub/video.h: Do not include grub/symbol.h.
397 (grub_video_register): Not exported. This symbol is not defined in
398 the kernel.
399 (grub_video_unregister): Likewise.
400 (grub_video_iterate): Likewise.
401 (grub_video_setup): Likewise.
402 (grub_video_restore): Likewise.
403 (grub_video_get_info): Likewise.
404 (grub_video_get_blit_format): Likewise.
405 (grub_video_set_palette): Likewise.
406 (grub_video_get_palette): Likewise.
407 (grub_video_set_viewport): Likewise.
408 (grub_video_get_viewport): Likewise.
409 (grub_video_map_color): Likewise.
410 (grub_video_map_rgb): Likewise.
411 (grub_video_map_rgba): Likewise.
412 (grub_video_fill_rect): Likewise.
413 (grub_video_blit_glyph): Likewise.
414 (grub_video_blit_bitmap): Likewise.
415 (grub_video_blit_render_target): Likewise.
416 (grub_video_scroll): Likewise.
417 (grub_video_swap_buffers): Likewise.
418 (grub_video_create_render_target): Likewise.
419 (grub_video_delete_render_target): Likewise.
420 (grub_video_set_active_render_target): Likewise.
421
422 * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
423 Undefined.
424 [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
425
426 * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
427 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
428 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
429 instead of $(srcdir)/genkernsyms.sh.
430
431 * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
432 config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
433 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
434 instead of $(srcdir)/genkernsyms.sh.
435
436 * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
437 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
438 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
439 instead of $(srcdir)/genkernsyms.sh.
440
441 * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
442 gensymlist.sh instead of $(srcdir)/gensymlist.sh.
443 (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
444 instead of $(srcdir)/genkernsyms.sh.
445
446 * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
447 genkernsyms.sh.
448
449 * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
450 genkernsyms.sh.
451 (gensymlist.sh): New target.
452 (genkernsyms.sh): Likewise.
453
454 * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
455 genkernsyms.sh.in and gensymlist.sh.in.
456
457 * genkernsyms.sh: Removed.
458 * gensymlist.sh: Likewise.
459
460 * genkernsyms.sh.in: New file.
461 * gensymlist.sh.in: Likewise.
462
1885bb27 4632006-04-25 Hollis Blanchard <hollis@penguinppc.org>
464
465 * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
466 clobber "prefix", since we may have already set it manually.
467
71538dff 4682006-04-25 Hollis Blanchard <hollis@penguinppc.org>
469
470 * kern/misc.c (abort): New alias for grub_abort.
471
2965c7cc 4722006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
473
474 A new machine-specific function "grub_machine_set_prefix" is
475 defined. This is called after loading modules, so that a prefix
476 initialization can use modules. Also, this change adds an
477 intensive debugging feature for the memory manager via the
478 configure option "--enable-mm-debug".
479
480 * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
481 PART.LEN.
482
483 * kern/sparc64/ieee1275/init.c (abort): Removed.
484 (grub_stop): Likewise.
485 (grub_exit): New function.
486 (grub_set_prefix): Renamed to ...
487 (grub_machine_set_prefix): ... this.
488 (grub_machine_init): Do not call grub_set_prefix.
489
490 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
491 (grub_machine_set_prefix): ... this.
492 (grub_machine_init): Do not call grub_set_prefix.
493
494 * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
495 (grub_machine_init): Do not set the prefix here.
496
497 * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
498
499 * kern/efi/init.c: Include grub/mm.h.
500 (grub_efi_set_prefix): New function.
501
502 * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
503 (grub_efi_get_filename): New function.
504 (grub_print_device_path): Renamed to ...
505 (grub_efi_print_device_path): ... this.
506
507 * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
508 [MM_DEBUG] (grub_realloc): Likewise.
509 [MM_DEBUG] (grub_free): Likewise.
510 [MM_DEBUG] (grub_memalign): Likewise.
511 [MM_DEBUG] (grub_mm_debug): New variable.
512 [MM_DEBUG] (grub_debug_malloc): New function.
513 [MM_DEBUG] (grub_debug_free): New function.
514 [MM_DEBUG] (grub_debug_realloc): New function.
515 [MM_DEBUG] (grub_debug_memalign): New function.
516
517 * kern/misc.c (grub_abort): Print a newline to distinguish
518 the message.
519
520 * kern/main.c (grub_main): Call grub_machine_set_prefix and
521 grub_set_root_dev after loading modules. This is necessary when
522 setting a prefix depends on modules.
523
524 * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
525 (grub_efi_print_device_path): ... this.
526 (grub_efi_get_filename): New prototype.
527 (grub_efi_set_prefix): Likewise.
528
529 * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
530 and grub/disk.h.
531 (grub_efidisk_get_device_handle): New prototype.
532 (grub_efidisk_get_device_name): Likewise.
533
534 * include/grub/mm.h: Include config.h.
535 (MM_DEBUG): Removed.
536 [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
537 [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
538 [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
539 [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
540 [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
541 [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
542 [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
543 [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
544 [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
545
546 * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
547
548 * disk/efi/efidisk.c: Include grub/partition.h.
549 (iterate_child_devices): New function.
550 (add_device): First, compare only last device path nodes, so that
551 devices are sorted by the types.
552 (grub_efidisk_get_device_handle): New function.
553 (grub_efidisk_get_device_name): Likewise.
554
555 * configure.ac (--enable-mm-debug): New option to enable the
556 memory manager debugging feature. This makes the binary much
557 bigger, so is disabled by default.
558
9cacaa17 5592006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
560
561 Use grub_abort instead of grub_stop, and grub_exit must be
562 define in each architecture now. Also, this change adds support
563 for EFI disks.
564
565 * util/i386/pc/grub-probefs.c: Include grub/term.h.
566 (grub_getkey): New function.
567 (grub_term_get_current): Likewise.
568
569 * util/i386/pc/grub-setup.c: Include grub/term.h.
570 (grub_getkey): New function.
571 (grub_term_get_current): Likewise.
572
573 * util/misc.c (grub_stop): Renamed to ...
574 (grub_exit): ... this.
575
576 * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
577 (grub_exit): ... this.
578 (grub_machine_init): Use grub_abort instead of abort.
579 (grub_stop): Removed.
580
581 * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
582 abort.
583
584 * kern/i386/pc/startup.S (grub_exit): New function.
585 (cold_reboot): New label.
586
587 * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
588 (grub_efi_init): Call grub_efidisk_init.
589 (grub_efi_fini): Call grub_efidisk_fini.
590
591 * kern/efi/efi.c: Include grub/mm.h.
592 (grub_efi_console_control_guid): Renamed to ...
593 (console_control_guid): ... this.
594 (grub_efi_loaded_image_guid): Renamed to ...
595 (loaded_image_guid): ... this.
596 (grub_efi_locate_handle): New function.
597 (grub_efi_open_protocol): Likewise.
598 (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
599 GRUB_EFI_CONSOLE_CONTROL_GUID.
600 (grub_efi_exit): Removed.
601 (grub_stop): Likewise.
602 (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
603 (grub_exit): New function.
604 (grub_print_device_path): Likewise.
605
606 * kern/rescue.c (grub_rescue_cmd_exit): New function.
607 (grub_enter_rescue_mode): Register "exit".
608
609 * kern/misc.c (grub_real_dprintf): A cosmetic change.
610 (grub_abort): New function.
611
612 * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
613
614 * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
615
616 * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
617
618 * include/grub/efi/efi.h (grub_efi_exit): Removed.
619 (grub_print_device_path): New prototype.
620 (grub_efi_locate_handle): Likewise.
621 (grub_efi_open_protocol): Likewise.
622
623 * include/grub/efi/disk.h (grub_efidisk_fini): New file.
624 * disk/efi/efidisk.c: Likewise.
625
626 * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
627
628 * include/grub/efi/console_control.h
629 (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
630
631 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
632 last 8 bytes as an array.
633 (GRUB_EFI_DISK_IO_GUID): New macro.
634 (GRUB_EFI_BLOCK_IO_GUID): Likewise.
635 (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
636 (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
637 grub_uint8_t.
638 (struct grub_efi_guid): Use an array to specify the last 8 bytes.
639 (struct grub_efi_device_path): Rename the member "sub_type" to
640 "subtype".
641 (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
642 (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
643 (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
644 (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
645 (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
646 (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
647 (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
648 (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
649 (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
650 (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
651 (struct grub_efi_pci_device_path): New structure.
652 (grub_efi_pci_device_path_t): New type.
653 (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
654 (struct grub_efi_pccard_device_path): New structure.
655 (grub_efi_pccard_device_path_t): New type.
656 (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
657 (struct grub_efi_memory_mapped_device_path): New structure.
658 (grub_efi_memory_mapped_device_path_t): New type.
659 (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
660 (struct grub_efi_vendor_device_path): New structure.
661 (grub_efi_vendor_device_path_t): New type.
662 (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
663 (struct grub_efi_controller_device_path): New structure.
664 (grub_efi_controller_device_path_t): New type.
665 (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
666 (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
667 (struct grub_efi_acpi_device_path): New structure.
668 (grub_efi_acpi_device_path_t): New type.
669 (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
670 (struct grub_efi_expanded_acpi_device_path): New structure.
671 (grub_efi_expanded_acpi_device_path_t): New type.
672 (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
673 (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
674 (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
675 (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
676 (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
677 (struct grub_efi_atapi_device_path): New structure.
678 (grub_efi_atapi_device_path_t): New type.
679 (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
680 (struct grub_efi_fibre_channel_device_path): New structure.
681 (grub_efi_fibre_channel_device_path_t): New type.
682 (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
683 (struct grub_efi_1394_device_path): New structure.
684 (grub_efi_1394_device_path_t): New type.
685 (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
686 (struct grub_efi_usb_device_path): New structure.
687 (grub_efi_usb_device_path_t): New type.
688 (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
689 (struct grub_efi_usb_class_device_path): New structure.
690 (grub_efi_usb_class_device_path_t): New type.
691 (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
692 (struct grub_efi_i2o_device_path): New structure.
693 (grub_efi_i2o_device_path_t): New type.
694 (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
695 (struct grub_efi_mac_address_device_path): New structure.
696 (grub_efi_mac_address_device_path_t): New type.
697 (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
698 (struct grub_efi_ipv4_device_path): New structure.
699 (grub_efi_ipv4_device_path_t): New type.
700 (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
701 (struct grub_efi_ipv6_device_path): New structure.
702 (grub_efi_ipv6_device_path_t): New type.
703 (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
704 (struct grub_efi_infiniband_device_path): New structure.
705 (grub_efi_infiniband_device_path_t): New type.
706 (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
707 (struct grub_efi_uart_device_path): New structure.
708 (grub_efi_uart_device_path_t): New type.
709 (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
710 (struct grub_efi_vendor_messaging_device_path): New structure.
711 (grub_efi_vendor_messaging_device_path_t): New type.
712 (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
713 (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
714 (struct grub_efi_hard_drive_device_path): New structure.
715 (grub_efi_hard_drive_device_path_t): New type.
716 (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
717 (struct grub_efi_cdrom_device_path): New structure.
718 (grub_efi_cdrom_device_path_t): New type.
719 (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
720 (struct grub_efi_vendor_media_device_path): New structure.
721 (grub_efi_vendor_media_device_path_t): New type.
722 (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
723 (struct grub_efi_file_path_device_path): New structure.
724 (grub_efi_file_path_device_path_t): New type.
725 (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
726 (struct grub_efi_protocol_device_path): New structure.
727 (grub_efi_protocol_device_path_t): New type.
728 (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
729 (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
730 (struct grub_efi_bios_device_path): New structure.
731 (grub_efi_bios_device_path_t): New type.
732 (struct grub_efi_disk_io): New structure.
733 (grub_efi_disk_io_t): New type.
734 (struct grub_efi_block_io_media): New structure.
735 (grub_efi_block_io_media_t): New type.
736 (struct grub_efi_block_io): New structure.
737 (grub_efi_block_io_t): New type.
738
739 * include/grub/misc.h (grub_stop): Removed.
740 (grub_exit): New prototype.
741 (grub_abort): Likewise.
742
743 * include/grub/disk.h (enum grub_disk_dev_id): Added
744 GRUB_DISK_DEVICE_EFIDISK_ID.
745
746 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
747 disk/efi/efidisk.c.
748 (kernel_syms.lst): Remove the target if an error occurs.
749
49986a9f 7502006-04-22 Yoshinori K. Okuji <okuji@enbug.org>
751
752 * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
753 as it was simply too buggy.
754
970d3b8a 7552006-04-21 Yoshinori K. Okuji <okuji@enbug.org>
756
757 * kern/misc.c (grub_lltoa): New function.
758 (grub_vsprintf): Added support for the long long suffix,
759 i.e. "ll".
760
ff04ec24 7612006-04-20 Hollis Blanchard <hollis@penguinppc.org>
762
763 * Makefile.in (LDFLAGS): Add variable.
764 (LD): Remove variable.
765 * configure.ac: Add -m32 to LDFLAGS.
766 * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
767 * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
768 (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
769 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
770 suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
771 variables.
772 * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
773 * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
774 * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
775
37e5e1a4 7762006-04-20 Vesa Jaaskelainen <chaac@nic.fi>
777
778 * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
779 length for unknown glyph.
780
c352d8dd 7812006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
782
2eab1c0d 783 Add support for pre-loaded modules into the EFI port.
784
785 * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
786 completely. Accept one more argument DIR. The caller has changed.
787
788 * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
789
790 * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
791 (grub_efi_loaded_image_guid): New variable.
792 (grub_efi_get_loaded_image): New function.
793 (grub_arch_modules_addr): Likewise.
794
795 * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
796 prototype.
797
798 * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
799 (struct grub_efi_loaded_image): New structure.
800 (grub_efi_loaded_image_t): New type.
801
8022006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
803
c352d8dd 804 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
805 size with GRUB_OS_AREA_SIZE as grub_size_t instead of
806 grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
807
6d01d6b4 8082006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
809
810 * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
811
976a4ea0 8122006-04-19 Yoshinori K. Okuji <okuji@enbug.org>
813
814 * DISTLIST: Added include/grub/efi/console.h,
815 include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
816 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
817
818 * include/grub/efi/console.h: New file.
819 * include/grub/efi/time.h: Likewise.
820 * include/grub/i386/efi/kernel.h: Likewise.
821 * kern/efi/init.c: Likewise.
822 * kern/efi/mm.c: Likewise.
823 * term/efi/console.c: Likewise.
824
825 * kern/i386/efi/init.c: Do not include grub/machine/time.h.
826 (grub_stop): Removed.
827 (grub_get_rtc): Likewise.
828 (grub_machine_init): Simply call grub_efi_init.
829 (grub_machine_fini): Call grub_efi_fini.
830
831 * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
832 (grub_efi_output_string): Removed.
833 (grub_efi_stall): New function.
834 (grub_stop): Likewise.
835 (grub_get_rtc): Likewise.
836
837 * include/grub/efi/efi.h (grub_efi_output_string): Removed.
838 (grub_efi_stall): New prototype.
839 (grub_efi_allocate_pages): Likewise.
840 (grub_efi_free_pages): Likewise.
841 (grub_efi_get_memory_map): Likewise.
842 (grub_efi_mm_init): Likewise.
843 (grub_efi_mm_fini): Likewise.
844 (grub_efi_init): Likewise.
845 (grub_efi_fini): Likewise.
846
847 * include/grub/i386/efi/time.h: Do not include
848 grub/symbol.h. Include grub/efi/time.h.
849 (GRUB_TICKS_PER_SECOND): Removed.
850 (grub_get_rtc): Likewise.
851
852 * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
853 Added padding. The EFI spec is buggy.
854 (GRUB_EFI_BLACK): New macro.
855 (GRUB_EFI_BLUE): Likewise.
856 (GRUB_EFI_GREEN): Likewise.
857 (GRUB_EFI_CYAN): Likewise.
858 (GRUB_EFI_RED): Likewise.
859 (GRUB_EFI_MAGENTA): Likewise.
860 (GRUB_EFI_BROWN): Likewise.
861 (GRUB_EFI_LIGHTGRAY): Likewise.
862 (GRUB_EFI_BRIGHT): Likewise.
863 (GRUB_EFI_DARKGRAY): Likewise.
864 (GRUB_EFI_LIGHTBLUE): Likewise.
865 (GRUB_EFI_LIGHTGREEN): Likewise.
866 (GRUB_EFI_LIGHTCYAN): Likewise.
867 (GRUB_EFI_LIGHTRED): Likewise.
868 (GRUB_EFI_LIGHTMAGENTA): Likewise.
869 (GRUB_EFI_YELLOW): Likewise.
870 (GRUB_EFI_WHITE): Likewise.
871 (GRUB_EFI_BACKGROUND_BLACK): Likewise.
872 (GRUB_EFI_BACKGROUND_BLUE): Likewise.
873 (GRUB_EFI_BACKGROUND_GREEN): Likewise.
874 (GRUB_EFI_BACKGROUND_CYAN): Likewise.
875 (GRUB_EFI_BACKGROUND_RED): Likewise.
876 (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
877 (GRUB_EFI_BACKGROUND_BROWN): Likewise.
878 (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
879 (GRUB_EFI_TEXT_ATTR): Likewise.
880
881 * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
882 kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
883 (kernel_mod_HEADERS): Added efi/time.h.
884
83709125 8852006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
886
887 * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
888 include/grub/efi/api.h, include/grub/efi/console_control.h,
889 include/grub/efi/efi.h, include/grub/efi/pe32.h,
890 include/grub/i386/efi/time.h, kern/efi/efi.c,
891 kern/i386/efi/init.c, kern/i386/efi/startup.S,
892 and util/i386/efi/grub-mkimage.c.
893
894 * Makefile.in (RMKFILES): Added i386-efi.rmk.
895
896 * genmk.rb (PModule#rule): Do not export symbols if
897 #{prefix}_EXPORTS is set to "no".
898
899 * conf/i386-efi.mk: New file.
900 * conf/i386-efi.rmk: Likewise.
901 * include/grub/efi/api.h: Likewise.
902 * include/grub/efi/console_control.h: Likewise.
903 * include/grub/efi/efi.h: Likewise.
904 * include/grub/efi/pe32.h: Likewise.
905 * include/grub/i386/efi/time.h: Likewise.
906 * kern/efi/efi.c: Likewise.
907 * kern/i386/efi/init.c: Likewise.
908 * kern/i386/efi/startup.S: Likewise.
909 * util/i386/efi/grub-mkimage.c: Likewise.
910
9112006-04-17 Marco Gerards <marco@gnu.org>
bfa2bd9e 912
913 * include/grub/script.h: Include <grub/parser.h> and
914 "grub_script.tab.h".
915 (struct grub_lexer_param): New struct.
916 (struct grub_parser_param): Likewise.
917 (grub_script_create_arglist): Pass the state in an argument.
918 (grub_script_add_arglist): Likewise.
919 (grub_script_create_cmdline): Likewise.
920 (grub_script_create_cmdblock): Likewise.
921 (grub_script_create_cmdif): Likewise.
922 (grub_script_create_cmdmenu): Likewise.
923 (grub_script_add_cmd): Likewise.
924 (grub_script_arg_add): Likewise.
925 (grub_script_lexer_ref): Likewise.
926 (grub_script_lexer_deref): Likewise.
927 (grub_script_lexer_record_start): Likewise.
928 (grub_script_lexer_record_stop): Likewise.
929 (grub_script_mem_record): Likewise.
930 (grub_script_mem_record_stop): Likewise.
931 (grub_script_malloc): Likewise.
932 (grub_script_yylex): Likewise.
933 (grub_script_yyparse): Likewise.
934 (grub_script_yyerror): Likewise.
935 (grub_script_yylex): Likewise.
936 (grub_script_lexer_init): Return the state.
937
938 * normal/lexer.c (grub_script_lexer_state): Removed variable.
939 (grub_script_lexer_done): Likewise.
940 (grub_script_lexer_getline): Likewise.
941 (grub_script_lexer_refs): Likewise.
942 (script): Likewise.
943 (newscript): Likewise.
944 (record): Likewise.
945 (recording): Likewise.
946 (recordpos): Likewise.
947 (recordlen): Likewise.
948 (grub_script_lexer_init): Return the state instead of setting
949 global variables.
950 (grub_script_lexer_ref): Use the newly added argument for state
951 instead of globals.
952 (grub_script_lexer_deref): Likewise.
953 (grub_script_lexer_record_start): Likewise.
954 (grub_script_lexer_record_stop): Likewise.
955 (recordchar): Likewise.
956 (nextchar): Likewise.
957 (grub_script_yylex2): Likewise.
958 (grub_script_yylex): Likewise.
959 (grub_script_yyerror): Likewise.
960
961 * normal/parser.y (func_mem): Removed variable.
962 (menu_entry): Likewise.
963 (err): Likewise.
964 (%lex-param): New parser option.
965 (%parse-param): Likewise.
966 (script): Always return the AST.
967 (argument): Pass the state around.
968 (arguments): Likewise.
969 (grubcmd): Likewise.
970 (commands): Likewise.
971 (function): Likewise.
972 (menuentry): Likewise.
973 (if_statement): Likewise.
974 (if): Likewise.
975
976 * normal/script.c (grub_script_memused): Removed variable.
977 (grub_script_parsed): Likewise.
978 (grub_script_malloc): Added a state argument. Use that instead of
979 global variables.
980 (grub_script_mem_record): Likewise.
981 (grub_script_mem_record_stop): Likewise.
982 (grub_script_arg_add): Likewise.
983 (grub_script_add_arglist): Likewise.
984 (grub_script_create_cmdline): Likewise.
985 (grub_script_create_cmdif): Likewise.
986 (grub_script_create_cmdmenu): Likewise.
987 (grub_script_add_cmd): Likewise.
988 (grub_script_parse): Setup the state before calling the parser.
989
e2a8c904 9902006-04-16 Marco Gerards <marco@gnu.org>
6de2ee99 991
992 * normal/command.c (grub_command_init): Remove the title command.
993
994 * normal/lexer.c (grub_script_yylex): Renamed from this...
995 (grub_script_yylex2): ... to this.
996 (grub_script_yylex): New function. Temporary
997 introduced to filter some tokens.
998 (grub_script_yyerror): Print a newline.
999
1000 * normal/main.c (read_config_file): Output information about the
1001 lines that contain errors. Wait for a key after all lines have
1002 been processed. Don't return an empty menu.
1003
1004 * normal/parser.y (func_mem): Don't initialize.
1005 (menu_entry): Likewise.
1006 (err): New variable.
1007 (script): Don't return anything when an error was encountered.
1008 (ws, returns): Removed rules.
1009 (argument): Disabled concatenated variable support.
1010 (arguments): Remove explicit separators.
1011 (grubcmd): Likewise.
1012 (function): Likewise.
1013 (menuentry): Likewise.
1014 (if): Likewise.
1015 (commands): Likewise. Add error handling.
1016
1017 * normal/script.c (grub_script_create_cmdline): If
1018 `grub_script_parsed' is 0, assume the parser encountered an error.
1019
c9a86192 10202006-04-02 Yoshinori K. Okuji <okuji@enbug.org>
1021
1022 * configure.ac: Add support for EFI. Fix the typo
1023 BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
1024
70f3b243 10252006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
1026
1027 * util/unifont2pff.rb: Removed unnecessary byte ordering. Now
1028 foreign multibyte characters should be shown correctly.
1029
65f201ad 10302006-04-01 Vesa Jaaskelainen <chaac@nic.fi>
1031
1032 * normal/main.c (grub_normal_menu_addentry): Fixed menu size
1033 calculation.
1034 (read_config_file): Made it to close file before returning.
1035
b4b93674 10362006-03-31 Vesa Jaaskelainen <chaac@nic.fi>
1037
1038 * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
1039 include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
1040 video/i386/pc/vbefill.c.
1041
1042 * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
1043 video/i386/pc/vbefill.c.
1044
1045 * include/grub/video.h (grub_video_blit_format): New enum.
1046 (grub_video_mode_info): Added new member blit_format.
1047 (grub_video_get_blit_format): New function prototype.
1048
1049 * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
1050 function prototype.
1051 (grub_video_vbe_map_rgb): Likewise.
1052 (grub_video_vbe_unmap_color): Likewise.
1053
1054 * include/grub/i386/pc/vbeblit.h: New file.
1055
1056 * include/grub/i386/pc/vbefill.h: New file.
1057
1058 * video/video.c (grub_video_get_blit_format): New function.
1059 (grub_video_vbe_get_video_ptr): Re-declared as non-static.
1060 (grub_video_vbe_map_rgb): Likewise.
1061 (grub_video_vbe_unmap_color): Likewise.
1062
1063 * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
1064 optimized fills.
1065 (grub_video_vbe_blit_render_target): Changed to use more optimized
1066 blits.
1067 (grub_video_vbe_setup): Added detection for optimized settings.
1068 (grub_video_vbe_create_render_target): Likewise.
1069
1070 * video/i386/pc/vbeblit.c: New file.
1071
1072 * video/i386/pc/vbefill.c: New file.
1073
c2379b9c 10742006-03-30 Vesa Jaaskelainen <chaac@nic.fi>
1075
1076 * font/manager.c (grub_font_get_glyph): Removed font fixup from
1077 here...
1078
1079 * util/unifont2pff.rb: ... and moved it to here. Improved argument
1080 parsing to support both hex and dec ranges. If filename was missing
1081 show usage information.
1082
bd0d7896 10832006-03-14 Vesa Jaaskelainen <chaac@nic.fi>
1084
1085 * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
1086 video/video.c, commands/videotest.c. Removed term/i386/pc/vesafb.c.
1087
1088 * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
1089 gfxterm.mod, videotest.mod. Removed vga.mod, vesafb.mod.
1090 (video_mod_SOURCES): Added.
1091 (video_mod_CFLAGS): Likewise.
1092 (video_mod_LDFLAGS): Likewise.
1093 (gfxterm_mod_SOURCES): Likewise.
1094 (gfxterm_mod_CFLAGS): Likewise.
1095 (gfxterm_mod_LDFLAGS): Likewise.
1096 (videotest_mod_SOURCES): Likewise.
1097 (videotest_mod_CFLAGS): Likewise.
1098 (videotest_mod_LDFLAGS): Likewise.
1099 (vesafb_mod_SOURCES): Removed.
1100 (vesafb_mod_CFLAGS): Likewise.
1101 (vesafb_mod_LDFLAGS): Likewise.
1102 (vga_mod_SOURCES): Likewise.
1103 (vga_mod_CFLAGS): Likewise.
1104 (vga_mod_LDFLAGS): Likewise.
1105
1106 * commands/videotest.c: New file.
1107
1108 * font/manager.c (fill_with_default_glyph): Modified to use
1109 grub_font_glyph.
1110 (grub_font_get_glyph): Likewise.
1111 (fontmanager): Renamed from this...
1112 (font_manager): ... to this.
1113
1114 * include/grub/font.h (grub_font_glyph): Added new structure.
1115 (grub_font_get_glyph): Modified to use grub_font_glyph.
1116
1117 * include/grub/misc.h (grub_abs): Added as inline function.
1118
1119 * include/grub/video.h: New file.
1120
1121 * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
1122 (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
1123 (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
1124 (grub_vbe_get_controller_info): Renamed from this...
1125 (grub_vbe_bios_get_controller_info): ... to this.
1126 (grub_vbe_get_mode_info): Renamed from this...
1127 (grub_vbe_bios_get_mode_info): ... to this.
1128 (grub_vbe_set_mode): Renamed from this...
1129 (grub_vbe_bios_set_mode): ... to this.
1130 (grub_vbe_get_mode): Renamed from this...
1131 (grub_vbe_bios_get_mode): ... to this.
1132 (grub_vbe_set_memory_window): Renamed from this...
1133 (grub_vbe_bios_set_memory_window): ... to this.
1134 (grub_vbe_get_memory_window): Renamed from this...
1135 (grub_vbe_bios_get_memory_window): ... to this.
1136 (grub_vbe_set_scanline_length): Renamed from this...
1137 (grub_vbe_set_scanline_length): ... to this.
1138 (grub_vbe_get_scanline_length): Renamed from this...
1139 (grub_vbe_bios_get_scanline_length): ... to this.
1140 (grub_vbe_set_display_start): Renamed from this...
1141 (grub_vbe_bios_set_display_start): ... to this.
1142 (grub_vbe_get_display_start): Renamed from this...
1143 (grub_vbe_bios_get_display_start): ... to this.
1144 (grub_vbe_set_palette_data): Renamed from this...
1145 (grub_vbe_bios_set_palette_data): ... to this.
1146 (grub_vbe_set_pixel_rgb): Removed.
1147 (grub_vbe_set_pixel_index): Likewise.
1148
1149 * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
1150 from this...
1151 (grub_vbe_bios_get_controller_info): ... to this.
1152 (grub_vbe_get_mode_info): Renamed from this...
1153 (grub_vbe_bios_get_mode_info): ... to this.
1154 (grub_vbe_set_mode): Renamed from this...
1155 (grub_vbe_bios_set_mode): ... to this.
1156 (grub_vbe_get_mode): Renamed from this...
1157 (grub_vbe_bios_get_mode): ... to this.
1158 (grub_vbe_set_memory_window): Renamed from this...
1159 (grub_vbe_bios_set_memory_window): ... to this.
1160 (grub_vbe_get_memory_window): Renamed from this...
1161 (grub_vbe_bios_get_memory_window): ... to this.
1162 (grub_vbe_set_scanline_length): Renamed from this...
1163 (grub_vbe_set_scanline_length): ... to this.
1164 (grub_vbe_get_scanline_length): Renamed from this...
1165 (grub_vbe_bios_get_scanline_length): ... to this.
1166 (grub_vbe_set_display_start): Renamed from this...
1167 (grub_vbe_bios_set_display_start): ... to this.
1168 (grub_vbe_get_display_start): Renamed from this...
1169 (grub_vbe_bios_get_display_start): ... to this.
1170 (grub_vbe_set_palette_data): Renamed from this...
1171 (grub_vbe_bios_set_palette_data): ... to this.
1172 (grub_vbe_bios_get_controller_info): Fixed problem with registers
1173 getting corrupted after calling it. Added more pushes and pops.
1174 (grub_vbe_bios_set_mode): Likewise.
1175 (grub_vbe_bios_get_mode): Likewise.
1176 (grub_vbe_bios_get_memory_window): Likewise.
1177 (grub_vbe_bios_set_scanline_length): Likewise.
1178 (grub_vbe_bios_get_scanline_length): Likewise.
1179 (grub_vbe_bios_get_display_start): Likewise.
1180 (grub_vbe_bios_set_palette_data): Likewise.
1181
1182 * normal/cmdline.c (cl_set_pos): Refresh the screen.
1183 (cl_insert): Likewise.
1184 (cl_delete): Likewise.
1185
1186 * term/gfxterm.c: New file.
1187
1188 * term/i386/pc/vesafb.c: Removed file.
1189
1190 * video/video.c: New file.
1191
1192 * video/i386/pc/vbe.c (real2pm): Added new function.
1193 (grub_video_vbe_draw_pixel): Likewise.
1194 (grub_video_vbe_get_video_ptr): Likewise.
1195 (grub_video_vbe_get_pixel): Likewise
1196 (grub_video_vbe_init): Likewise.
1197 (grub_video_vbe_fini): Likewise.
1198 (grub_video_vbe_setup): Likewise.
1199 (grub_video_vbe_get_info): Likewise.
1200 (grub_video_vbe_set_palette): Likewise.
1201 (grub_video_vbe_get_palette): Likewise.
1202 (grub_video_vbe_set_viewport): Likewise.
1203 (grub_video_vbe_get_viewport): Likewise.
1204 (grub_video_vbe_map_color): Likewise.
1205 (grub_video_vbe_map_rgb): Likewise.
1206 (grub_video_vbe_map_rgba): Likewise.
1207 (grub_video_vbe_unmap_color): Likewise.
1208 (grub_video_vbe_fill_rect): Likewise.
1209 (grub_video_vbe_blit_glyph): Likewise.
1210 (grub_video_vbe_blit_bitmap): Likewise.
1211 (grub_video_vbe_blit_render_target): Likewise.
1212 (grub_video_vbe_scroll): Likewise.
1213 (grub_video_vbe_swap_buffers): Likewise.
1214 (grub_video_vbe_create_render_target): Likewise.
1215 (grub_video_vbe_delete_render_target): Likewise.
1216 (grub_video_vbe_set_active_render_target): Likewise.
1217 (grub_vbe_set_pixel_rgb): Remove function.
1218 (grub_vbe_set_pixel_index): Likewise.
1219 (index_color_mode): Remove static variable.
1220 (active_mode): Likewise.
1221 (framebuffer): Likewise.
1222 (bytes_per_scan_line): Likewise.
1223 (grub_video_vbe_adapter): Added new static variable.
1224 (framebuffer): Likewise.
1225 (render_target): Likewise.
1226 (initial_mode): Likewise.
1227 (mode_in_use): Likewise.
1228 (mode_list): Likewise.
1229
5f97350b 12302006-03-10 Marco Gerards <marco@gnu.org>
1231
1232 * configure.ac (AC_INIT): Bumped to 1.93.
1233
1234 * DISTLIST: Added `include/grub/hfs.h'.
1235
a3c5c6f8 12362006-02-01 Yoshinori K. Okuji <okuji@enbug.org>
1237
1238 * boot/i386/pc/boot.S (general_error): Before looping, try INT
1239 18H, which might help the BIOS falling back to next boot media.
1240
6de53d26 12412006-01-25 Yoshinori K. Okuji <okuji@enbug.org>
1242
1243 * util/i386/pc/grub-install.in: Escape a backslash. Reported by
1244 Poe Chen <poe.poechen@gmail.com>.
1245
77c4a393 12462006-01-17 Marco Gerards <marco@gnu.org>
1247
1248 * include/grub/normal.h: Include <grub/script.h>.
1249 (grub_command_list): Removed struct.
1250 (grub_command_list_t): Removed type.
1251 (grub_menu_entry): Remove members `num' and `command_list'. Add
1252 members `commands' and `sourcecode'.
1253 * include/grub/script.h: Add inclusion guards.
1254 (grub_script_cmd_menuentry): New struct.
1255 (grub_script_execute_menuentry): New prototype.
1256 (grub_script_lexer_record_start): Likewise.
1257 (grub_script_lexer_record_stop): Likewise.
1258 * normal/execute.c (grub_script_execute_menuentry): New function.
1259 * normal/lexer.c (record, recording, recordpos, recordlen): New
1260 variables.
1261 (grub_script_lexer_record_start): New function.
1262 (grub_script_lexer_record_stop): Likewise.
1263 (recordchar): Likewise.
1264 (nextchar): Likewise.
1265 (grub_script_yylex): Use `nextchar' to fetch new characters. Use
1266 2048 as the buffer size. Add the tokens `menuentry' and `@'.
1267 * normal/main.c: Include <grub/parser.h> and <grub/script.h>
1268 (current_menu): New variable.
1269 (free_menu): Mainly rewritten.
1270 (grub_normal_menu_addentry): New function.
1271 (read_config_file): Rewritten.
1272 * normal/menu.c (run_menu_entry): Mainly rewritten.
1273 * normal/menu_entry.c (make_screen): Rewritten te code to insert
1274 the menu entry.
1275 (run): Mainly rewritten.
1276 * normal/parser.y (menu_entry): New variable.
1277 (GRUB_PARSER_TOKEN_MENUENTRY): New token.
1278 (menuentry): New rule.
1279 (command): Add `menuentry'.
1280 (if_statement): Allow additional returns before `fi'.
1281 * normal/script.c (grub_script_create_cmdmenu): New function.
1282
144f1f98 12832006-01-03 Marco Gerards <marco@gnu.org>
1284
1285 * INSTALL: GNU Bison is required.
1286 * configure.ac: Rewritten the test to detect Bison.
1287 * Makefile.in (YACC): New variable. Reported by Xun Sun
1288 <xun.sun.cn@gmail.com>.
1289
af4b2d89 12902006-01-03 Marco Gerards <marco@gnu.org>
1291
1292 * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
1293 the HFS+ filesystem to filesystem blocks.
1294 (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
1295 GCC warning is silenced.
1296
15643b71 12972006-01-03 Marco Gerards <marco@gnu.org>
1298
1299 * partmap/apple.c (apple_partition_map_iterate): Convert the data
1300 read from disk from big endian to host byte order.
1301
00905879 13022006-01-03 Hollis Blanchard <hollis@penguinppc.org>
1303
1304 * fs/hfs.c: Include <grub/hfs.h>. Added reference to the official
1305 documentation.
1306 (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
1307 (grub_hfs_mount): Grammar fix in error. Make sure this is not an
1308 embedded HFS+ filesystem.
1309 (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
1310 (grub_hfs_sblock): Move from here...
1311 * include/grub/hfs.h: To here... New file.
1312 * fs/hfsplus.c: Include <grub/hfs.h>. Added reference to the official
1313 documentation.
1314 (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
1315 New macros.
1316 (grub_hfsplus_volheader): Change type of member `magic' to
1317 `grub_uint16_t'.
1318 (grub_hfsplus_data): Add new member `embedded_offset'.
1319 (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
1320 returned block.
1321 (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
1322 Calculate the offset.
1323
8899bc3e 13242005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
1325
1326 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
1327 Removed.
1328 (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
1329
ae8c0277 13302005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
1331
1332 * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
1333 ENV->NAME is NULL after allocating ENV->VALUE.
1334
07084456 13352005-12-25 Marco Gerards <marco@gnu.org>
1336
1337 * kern/env.c (grub_env_set): Rewritten the error handling code.
1338
4750f5f1 13392005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
1340
1341 * geninit.sh: Made more robust, and more portable.
1342
50214199 13432005-12-25 Marco Gerards <marco@gnu.org>
1344
1345 Add support for Apple HFS+ filesystems.
1346
1347 * fs/hfsplus.c: New file.
1348
1349 * DISTLIST: Added `fs/hfsplus.c'.
1350
1351 * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
1352 (hfsplus_mod_SOURCES): New variable.
1353 (hfsplus_mod_CFLAGS): Likewise.
1354 (hfsplus_mod_LDFLAGS): Likewise.
1355 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
1356 (grub_setup_SOURCES): Likewise.
1357 (grub_mkdevicemap_SOURCES): Likewise.
1358 (grub_emu_SOURCES): Likewise.
1359 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1360
1361 * fs/fshelp.c (grub_fshelp_log2blksize): New function.
1362
1363 * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
1364
befaed6c 13652005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
1366
1367 * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
1368 commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
1369 include/grub/parser.h, include/grub/script.h, kern/parser.c,
1370 kern/sparc64/cache.S, normal/execute.c, normal/function.c,
1371 normal/lexer.c, normal/parser.y, normal/script.c, and
1372 partmap/gpt.c.
1373 Removed kern/sparc64/cache.c.
1374
1375 * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
1376 grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
1377 grub_emu_init.c.
1378
1379 * configure.ac (AC_INIT): Bumped to 1.92.
1380
6a124103 13812005-12-24 Vesa Jaaskelainen <chaac@nic.fi>
1382
1383 * kern/err.c (grub_error_push): Added new function to support error
1384 stacks.
1385 (grub_error_pop): Likewise.
1386 (grub_error_stack_items): New local variable to support error stacks.
1387 (grub_error_stack_pos): Likewise.
1388 (grub_error_stack_assert): Likewise.
1389 (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
1390 stack depth.
1391 (grub_print_error): Added support to print errors from error stack.
1392
1393 * include/grub/err.h (grub_error_push): Added function prototype.
1394 (grub_error_pop): Likewise.
1395
be973c1b 13962005-12-09 Hollis Blanchard <hollis@penguinppc.org>
1397
1398 * configure.ac: Accept `powerpc64' as host_cpu.
1399 (amd64): Rename to `biarch32'.
1400
1401 * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
1402 non-cacheline-aligned addresses.
1403
1404 * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
1405 (grub_dl_flush_cache): Likewise. Only call `grub_arch_sync_caches'
1406 if `size' is non-zero.
1407
b04216ab 14082005-12-03 Marco Gerards <mgerards@xs4all.nl>
1409
1410 * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
1411 and `cd' to make sure the filename is not prefixed with a
1412 directory name.
1413 (pkgdata_MODULES): Add `gpt.mod'.
1414 (gpt_mod_SOURCES): New variable.
1415 (gpt_mod_CFLAGS): Likewise.
1416 (gpt_mod_LDFLAGS): Likewise.
1417
1418 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
1419
1420 * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
1421 New macro.
1422
1423 * partmap/gpt.c: New file.
1424
1425 * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
1426 GPT partition map is detected.
1427
41730ed9 14282005-12-03 Vincent Pelletier <subdino2004@yahoo.fr>
1429
1430 * commands/i386/pc/play.c: New file.
1431 * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
1432 (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
1433 macros.
1434
95dc3643 14352005-11-27 Marco Gerards <mgerards@xs4all.nl>
1436
1437 * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
1438 ((unused))' to silence gcc warning.
1439
1569ec51 14402005-11-26 Hollis Blanchard <hollis@penguinppc.org>
1441
1442 * configure.ac: Correct `AC_PROG_YACC' test.
1443
9abde152 14442005-11-22 Hollis Blanchard <hollis@penguinppc.org>
1445
1446 * util/powerpc/ieee1275/grub-install.in: Run the mount point
1447 check before installing files.
1448
44b83271 14492005-11-22 Mike Small <smallm@panix.com>
1450
1451 * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
1452 number regex so multidigit numbers are recognized correctly.
1453
14542005-11-22 Mike Small <smallm@panix.com>
1455
1456 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
1457 debugging message before attempting to claim memory.
1458 (grub_rescue_cmd_initrd): Add a claim debugging message and try
1459 multiple addresses in case of failure.
1460
9c12956b 14612005-11-22 Hollis Blanchard <hollis@penguinppc.org>
1462
1463 * term/tparm.c (get_space): Remove empty `if' statement.
1464
1465 * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
1466
1467 * kern/parser.c (check_varstate): Rename `state' to 's'.
1468
aeaf81d9 14692005-11-22 Hollis Blanchard <hollis@penguinppc.org>
1470
1471 * partmap/acorn.c: Change `unsigned' to `unsigned int'. Move all
1472 variable definitions to the beginning of each function. Sort stack
1473 variables by size.
1474 (find): Rename to `acorn_partition_map_find'. Cast `grub_disk_read'
1475 `buf' argument to `char *'.
1476
79bbb63f 14772005-11-22 Hollis Blanchard <hollis@penguinppc.org>
1478
1479 * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
1480 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
1481 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
1482 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
1483 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
1484 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
1485 configfile.mod, search.mod, gzio.mod and test.mod.
1486 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
1487 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
1488 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
1489 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
1490 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
1491 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
1492 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
1493 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
1494 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
1495 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
1496 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
1497 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
1498 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
1499 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
1500 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
1501 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
1502 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
1503 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
1504 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
1505 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
1506 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
1507 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
1508 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
1509
1510 * conf/common.mk (grub_modules_init.lst): Use `find' instead of
1511 `grep --include'.
1512 (pkgdata_MODULES): Add test.mod.
1513
233b1628 15142005-11-18 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
1515
1516 * genmk.rb: Fixed list rules moved to Makefile.in. Recognise
1517 appending to variables with "+=".
1518 (PModule): Use full pathname to generate *.lst filenames.
1519
1520 * Makefile.in: Fixed list rules moved from genmk.rb.
1521 (.DELETE_ON_ERROR): New special target.
1522 (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
1523
1524 * conf/i386-pc.rmk: Include conf/common.mk.
1525 (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
1526 minux.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
1527 hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
1528 help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
1529 sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
1530 configfile.mod, search.mod, gzio.mod and test.mod.
1531 (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
1532 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
1533 (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
1534 (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
1535 (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
1536 (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
1537 (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
1538 (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
1539 (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
1540 (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
1541 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
1542 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
1543 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
1544 (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
1545 (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
1546 (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
1547 (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
1548 (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
1549 (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
1550 (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
1551 (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
1552 (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
1553 (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
1554 here...
1555 * conf/common.rmk: ... to here. New file.
1556
1557 * conf/common.mk: New file.
1558
16f820c8 15592005-11-18 Yoshinori K. Okuji <okuji@enbug.org>
1560
1561 * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
1562 (grub_script.tab.c): ... here.
1563
1564 * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
1565 (grub_script.tab.c): ... here.
1566
1567 * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
1568 (grub_script.tab.c): ... here.
1569
1570 * normal/command.c (grub_command_find): Fixed a memory leak of
1571 MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
1572
63ba1554 15732005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
1574
1575 * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
1576 "@" which marks the start of a comment on ARM.
1577 (VARIABLE): Likewise.
1578
7f67dc13 15792005-11-13 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
1580
79bbb63f 1581 Add support for Linux/ADFS partition tables.
7f67dc13 1582
1583 * partmap/acorn.c: New file.
1584
1585 * include/grub/acorn_filecore.h: Likewise.
1586
1587 * DISTLIST: Added `partmap/acorn.c' and
1588 `include/grub/acorn_filecore.h'.
1589
1590 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1591 `partmap/acorn.c'.
1592 (pkgdata_MODULES): Add `acorn.mod'.
1593 (acorn_mod_SOURCES): New variable.
1594 (acorn_mod_CFLAGS): Likewise.
1595
1596 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
1597 `partmap/acorn.c'.
1598 (pkgdata_MODULES): Add `acorn.mod'.
1599 (acorn_mod_SOURCES): New variable.
1600 (acorn_mod_CFLAGS): Likewise.
1601
1602 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
1603 (pkgdata_MODULES): Add `acorn.mod'.
1604 (acorn_mod_SOURCES): New variable.
1605 (acorn_mod_CFLAGS): Likewise.
1606 (acorn_mod_LDFLAGS): Likewise.
1607
1608 * include/types.h (grub_disk_addr_t): New typedef.
1609
6d099807 16102005-11-13 Marco Gerards <mgerards@xs4all.nl>
1611
1612 * geninit.sh: New file.
1613
1614 * geninitheader.sh: Likewise.
1615
1616 * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
1617 * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
1618 * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
1619 * commands/configfile.c (grub_configfile_init)
1620 (grub_configfile_fini): Likewise.
1621 * commands/default.c (grub_default_init, grub_default_fini):
1622 Likewise.
1623 * commands/help.c (grub_help_init, grub_help_fini): Likewise.
1624 * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
1625 * commands/search.c (grub_search_init, grub_search_fini): Likewise.
1626 * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
1627 Likewise.
1628 * commands/test.c (grub_test_init, grub_test_fini): Likewise.
1629 * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
1630 Likewise.
1631 * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
1632 * commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
1633 Likewise.
1634 * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
1635 Likewise.
1636 * commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
1637 Likewise.
1638 * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
1639 * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
1640 * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
1641 * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
1642 * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
1643 * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
1644 * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
1645 * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
1646 * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
1647 * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
1648 * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
1649 * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
1650 * partmap/amiga.c (grub_amiga_partition_map_init)
1651 (grub_amiga_partition_map_fini): Likewise.
1652 * partmap/apple.c (grub_apple_partition_map_init)
1653 (grub_apple_partition_map_fini): Likewise.
1654 * partmap/pc.c (grub_pc_partition_map_init)
1655 (grub_pc_partition_map_fini): Likewise.
1656 * partmap/sun.c (grub_sun_partition_map_init,
1657 grub_sun_partition_map_fini): Likewise.
1658 * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
1659 Likewise.
1660
1661 * util/grub-emu.c: Include <grub_modules_init.h>.
1662 (main): Don't initialize and de-initialize any modules directly,
1663 use `grub_init_all' and `grub_fini_all' instead.
1664
1665 * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
1666 `grub_vesafb_mod_init'.
1667 (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'. Updated
1668 all users.
1669 * term/i386/pc/vga.c (grub_vga_init): Renamed to
1670 `grub_vga_mod_init'. Updated all users.
1671 (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
1672
1673 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
1674 (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
1675 rules.
1676
1677 * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
1678 Generate a function to initialize the module in utilities.
1679 Updated all callers.
1680 (GRUB_MOD_FINI): Add argument `name'. Generate a function to
1681 initialize the module in utilities. Updated all callers.
1682
9046bcf0 16832005-11-09 Hollis Blanchard <hollis@penguinppc.org>
1684
1685 * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
1686 escape sequence and a literal ^L to clear the screen.
1687
1688 * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
1689 when returning from Open Firmware.
1690
d13ea639 16912005-11-09 Hollis Blanchard <hollis@penguinppc.org>
1692
1693 * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
1694 (grub_ofconsole_height): Likewise.
1695 (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
1696 manually insert a '\n'.
1697 (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
1698 `grub_ofconsole_height'. Return early if these are already set.
1699
a8fcf206 17002005-11-07 Vincent Pelletier <subdino2004@yahoo.fr>
1701
1702 * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
1703 `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
1704 `normal/execute.c', `normal/lexer.c', `io/gzio.c',
1705 `kern/parser.c', `grub_script.tab.c', `normal/function.c'
1706 and `normal/script.c'.
1707 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
1708 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
1709 (test_mod_SOURCES): New variable.
1710 (test_mod_CFLAGS): Likewise.
1711 (test_mod_LDFLAGS): Likewise.
1712 (pkgdata_MODULES): Add `test.mod'.
1713 (grub_script.tab.c): New rule.
1714 (grub_script.tab.h): Likewise.
1715
b6b32745 17162005-11-07 Marco Gerards <mgerards@xs4all.nl>
1717
1718 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1719 `commands/test.c', `normal/execute.c', `normal/lexer.c',
1720 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
1721 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
1722 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
1723 (test_mod_SOURCES): New variable.
1724 (test_mod_CFLAGS): Likewise.
1725 (pkgdata_MODULES): Add `test.mod'.
1726 (grub_script.tab.c): New rule.
1727 (grub_script.tab.h): Likewise.
1728
daac212a 17292005-11-06 Marco Gerards <mgerards@xs4all.nl>
1730
1731 Add initial scripting support.
1732
1733 * commands/test.c: New file.
1734 * include/grub/script.h: Likewise.
1735 * normal/execute.c: Likewise.
1736 * normal/function.c: Likewise.
1737 * normal/lexer.c: Likewise.
1738 * normal/parser.y: Likewise.
1739 * normal/script.c: Likewise.
1740
1741 * configure.ac: Add `AC_PROG_YACC' test.
1742
1743 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
1744 `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
1745 `normal/function.c' and `normal/script.c'.
1746 (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
1747 `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
b6b32745 1748 (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
1749 variables.
daac212a 1750 (pkgdata_MODULES): Add `test.mod'.
1751 (grub_script.tab.c): New rule.
1752 (grub_script.tab.h): Likewise.
1753
1754 * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
1755
1756 * include/grub/normal.h (grub_test_init): New prototype.
1757 (grub_test_fini): Likewise.
1758
1759 * normal/command.c: Include <grub/script.h>.
1760 (grub_command_execute): Rewritten.
1761
1762 * util/grub-emu.c (main): Call `grub_test_init' and
1763 `grub_test_fini'.
1764
77500b2b 17652005-11-03 Hollis Blanchard <hollis@penguinppc.org>
1766
1767 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
1768 to 0.
1769 * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
1770 there are no pending characters.
1771
e45deb9e 17722005-11-03 Hollis Blanchard <hollis@penguinppc.org>
1773
1774 * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
1775 `grub_strndup' to drop device arguments. Replace unnecessary
1776 `grub_strndup' with `grub_strdup'.
1777
4ce32619 17782005-11-03 Hollis Blanchard <hollis@penguinppc.org>
1779
1780 * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
1781 `debug' environment variable has been set.
1782
17832005-11-02 Hollis Blanchard <hollis@penguinppc.org>
1784
1785 * Makefile.in (install-local): Use $(DATA).
1786 (uninstall): Likewise.
1787 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
1788 (sbin_UTILITIES): ... to here.
1789 (sbin_SCRIPTS): New variable.
1790 (grub_install_SOURCES): New variable.
1791 * util/powerpc/ieee1275/grub-install.in: New file.
1792 * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
1793 variable.
1794 (add_segments): Call `grub_util_get_path'.
1795
25fe6f03 17962005-10-28 Yoshinori K. Okuji <okuji@enbug.org>
1797
1798 From Timothy Baldwin:
1799 * commands/ls.c (grub_ls_list_files): Close FILE with
1800 grub_file_close.
1801 * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
1802
04ccf3ec 18032005-10-24 Marco Gerards <mgerards@xs4all.nl>
1804
1805 * include/grub/parser.h: New file.
1806
1807 * kern/parser.c: Likewise.
1808
1809 * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
1810 (grub_setup_SOURCES): Likewise.
1811 (grub_probefs_SOURCES): Likewise.
1812 (grub_emu_SOURCES): Likewise.
1813 (kernel_img_HEADERS): Add `parser.h'.
1814
1815 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
1816 (grub_emu_SOURCES): Add `kern/parser.c'.
1817 (grubof_SOURCES): Likewise.
1818
1819 * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
1820 (grubof_SOURCES): Add `kern/parser.c'.
1821
1822 * include/grub/misc.h (grub_split_cmdline): Removed prototype.
1823
1824 * kern/misc.c (grub_split_cmdline): Removed function.
1825
1826 * kern/rescue.c: Include <grub/parser.h>.
1827 (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
1828 of `grub_split_cmdline'.
1829
1830 * normal/command.c: Include <grub/parser.h>.
1831 (grub_command_execute): Use `grub_parser_split_cmdline' instead
1832 of `grub_split_cmdline'.
1833
1834 * normal/completion.c: Include <grub/parser.h>.
1835 (cmdline_state): New variable.
1836 (iterate_dir): End the filename with a quote depending on the
1837 command line state.
1838 (get_state): new function.
1839 (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
1840 split the arguments and determine the current argument. When the
1841 argument string is not quoted, escape all spaces.
1842
6d8f4b0e 18432005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
1844
1845 * normal/sparc64/setjmp.S: New file.
1846
15cf03ed 18472005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
1848
1849 * include/grub/sparc64/libgcc.h: New file.
1850 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
1851 (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
1852 normal/sparc64/setjmp.c.
1853
03e8661a 18542005-10-23 Vincent Pelletier <subdino2004@yahoo.fr>
1855
1856 * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
1857 * kern/sparc64/cache.S: New file.
1858 * kern/sparc64/cache.c: Removed.
1859 * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
1860 (COMMON_CFLAGS): Add -mno-app-regs. Remove -mcpu=v9 and
1861 -mtune=ultrasparc.
1862 (COMMON_LDFLAGS): Add -melf64_sparc.
1863 (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
1864 (grubof_SOURCES): Use cache.S instead of cache.c.
1865 (grubof_LDFLAGS): Add -mno-app-regs. Replace "-Xlinker
1866 --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
1867 (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
1868 commented though.
1869 (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
1870 (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
1871 (linux_mod_CFLAGS): Commented out.
1872 (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
1873 out because module isn't built.
1874 (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
1875 (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
1876 (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
1877 (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
1878 (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
1879 (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
1880 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
1881 (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
1882 (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
1883 (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
1884 (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
1885 (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
1886 (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
1887 (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
1888
34eeec8a 18892005-10-20 Yoshinori K. Okuji <okuji@enbug.org>
1890
1891 * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
1892 grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
1893 longer, because HFS should not be used on PC.
1894
708367a3 18952005-10-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
1896
1897 * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
1898 consistently within the loop.
1899
6fa1251a 19002005-10-15 Marco Gerards <mgerards@xs4all.nl>
1901
1902 * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
1903 directory can not be read.
1904
4801580b 19052005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
1906
1907 * configure.ac (AC_INIT): Increase the version number to 1.91.
1908
1909 * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
1910 include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
1911 term/i386/pc/serial.c.
1912
219ad426 19132005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
1914
1915 * kern/file.c (grub_file_seek): Seeking to an offset equal to a
1916 file size must be permitted.
1917
1918 * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
1919 between %ah and %al.
1920
688e5699 19212005-10-15 Yoshinori K. Okuji <okuji@enbug.org>
1922
1923 * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
1924 grub_uint64_t.
1925 Call the hook with a NUL-terminated filename.
1926 (grub_xfs_mount): Use grub_be_to_cpu32 instead of
1927 grub_cpu_to_be32.
1928
1929 * kern/term.c (cursor_state): New variable.
1930 (grub_term_set_current): Reset the cursor state on a new
1931 terminal.
1932 (grub_setcursor): Rewritten to use CURSOR_STATE.
1933 (grub_getcursor): New function.
1934
1935 * include/grub/term.h (grub_getcursor): New prototype.
1936
1937 * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
1938 integers on ARM. Reported by Timothy Baldwin
1939 <T.E.Baldwin99@members.leeds.ac.uk>.
1940
bb34586c 19412005-10-11 Marco Gerards <mgerards@xs4all.nl>
1942
1943 * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
1944 allocated.
1945 (grub_sfs_dir): Likewise.
1946
9a909877 19472005-10-09 Marco Gerards <mgerards@xs4all.nl>
1948
1949 Add support for the SFS filesystem.
1950
1951 * fs/sfs.c: New file.
1952
1953 * DISTLIST: Added `fs/sfs.c'.
1954
1955 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
1956 (grub_probefs_SOURCES): Likewise.
1957 (grub_emu_SOURCES): Likewise.
1958 (pkgdata_MODULES): Add `sfs.mod'.
1959 (sfs_mod_SOURCES): New variable.
1960 (sfs_mod_CFLAGS): Likewise.
1961 (sfs_mod_LDFLAGS): Likewise.
1962
1963 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
1964 (pkgdata_MODULES): Add `sfs.mod'.
1965 (sfs_mod_SOURCES): New variable.
1966 (sfs_mod_CFLAGS): Likewise.
1967
1968 * util/grub-emu.c (main): Call `grub_sfs_init' and
1969 `grub_sfs_fini'.
1970
1971 * include/grub/fs.h (grub_sfs_init): New prototype.
1972 (grub_sfs_fini): Likewise.
1973
57bdbde3 19742005-10-07 Marco Gerards <mgerards@xs4all.nl>
1975
1976 Add support for the AFFS filesystem.
1977
1978 * fs/affs.c: New file.
1979
1980 * DISTLIST: Added `fs/affs.c'.
1981
1982 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
1983 (grub_probefs_SOURCES): Likewise.
1984 (grub_emu_SOURCES): Likewise.
1985 (pkgdata_MODULES): Add `affs.mod'.
1986 (affs_mod_SOURCES): New variable.
1987 (affs_mod_CFLAGS): Likewise.
1988 (affs_mod_LDFLAGS): Likewise.
1989
1990 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
1991 (pkgdata_MODULES): Add `affs.mod'.
1992 (affs_mod_SOURCES): New variable.
1993 (affs_mod_CFLAGS): Likewise.
1994
1995 * util/grub-emu.c (main): Call `grub_affs_init' and
1996 `grub_affs_fini'.
1997
1998 * include/grub/fs.h (grub_affs_init): New prototype.
1999 (grub_affs_fini): Likewise.
2000
047b67e0 20012005-10-01 Marco Gerards <mgerards@xs4all.nl>
2002
2003 * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
2004
59b8208a 20052005-10-01 Marco Gerards <mgerards@xs4all.nl>
2006
2007 * configure.ac: Accept `x86_64' as host_cpu. In that case add
2008 `-m32' to CFLAGS.
2009
2010 * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
2011 linking.
2012
2013 * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
2014 (COMMON_LDFLAGS): New variable.
2015 (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
2016 (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
2017 (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
2018 (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
2019 (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
2020 (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
2021 (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
2022 (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
2023 (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
2024 (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
2025 (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
2026 (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
2027 (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
2028 (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
2029 (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
2030 variables.
2031 (normal_mod_ASFLAGS): Add `-m32'.
2032
2033 * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
2034 (grub_host_size_t, grub_host_ssize_t): New types.
2035 (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
2036 dependant of `GRUB_CPU_SIZEOF_VOID_P' instead on
2037 `GRUB_HOST_SIZEOF_VOID_P'.
2038
2039 * include/grub/kernel.h (struct grub_module_header): Type of
2040 member offset changed to `grub_host_off_t'. Type of member size
2041 changed to `grub_host_size_t'.
2042 (struct grub_module_info): Type of member offset changed to
2043 `grub_host_off_t'. Type of member size changed to
2044 `grub_host_size_t'.
2045
b4093103 20462005-09-29 Yoshinori K. Okuji <okuji@enbug.org>
2047
2048 Make GRUB's kernel compliant to Multiboot Specification.
2049
2050 * kern/i386/pc/startup.S (multiboot_header): New label.
2051 (multiboot_entry): Likewise.
2052 (multiboot_trampoline): Likewise.
2053
2054 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
2055 Increased to 0x4A0.
2056
2057 * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
2058 put parentheses after a question mark.
2059 [!GRUB_UTIL] (my_mod): New variable.
2060
2061 * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
2062
b2499b29 20632005-09-28 Marco Gerards <mgerards@xs4all.nl>
2064
2065 Adds support for the XFS filesystem. Btrees are not supported
2066 yet.
2067
2068 * fs/xfs.c: New file.
2069
2070 * DISTLIST: Added `fs/xfs.c'.
2071
2072 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
2073 (grub_probefs_SOURCES): Likewise.
2074 (grub_emu_SOURCES): Likewise.
2075 (pkgdata_MODULES): Add `xfs.mod'.
2076 (xfs_mod_SOURCES): New variable.
2077 (xfs_mod_CFLAGS): Likewise.
2078
2079 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
2080 (pkgdata_MODULES): Add `xfs.mod'.
2081 (xfs_mod_SOURCES): New variable.
2082 (xfs_mod_CFLAGS): Likewise.
2083
2084 * util/grub-emu.c (main): Call `grub_xfs_init' and
2085 `grub_xfs_fini'.
2086
2087 * include/grub/fs.h (grub_xfs_init): New prototype.
2088 (grub_xfs_fini): Likewise.
2089
2090
83d37a62 20912005-09-18 Vesa Jaaskelainen <chaac@nic.fi>
2092
2093 * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
2094 color modes, allow greater than 16 colors to be configured as
2095 a default palette.
2096
47d2d65e 20972005-09-03 Yoshinori K. Okuji <okuji@enbug.org>
2098
2099 * normal/completion.c (complete_arguments): Add the qualifier
2100 const into OPTIONS.
2101
2102 From Omniflux <omniflux+lists@omniflux.com>:
2103 * include/grub/terminfo.h: New file.
2104 * include/grub/tparm.h: Likewise.
2105 * include/grub/i386/pc/serial.h: Likewise.
2106 * term/terminfo.c: Likewise.
2107 * term/tparm.c: Likewise.
2108 * term/i386/pc/serial.c: Likewise.
2109 * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
2110 serial.mod.
2111 (terminfo_mod_SOURCES): New variable.
2112 (terminfo_mod_CFLAGS): Likewise.
2113 (serial_mod_SOURCES): Likewise.
2114 (serial_mod_CFLAGS): Likewise.
2115
48b671ff 21162005-08-31 Yoshinori K. Okuji <okuji@enbug.org>
2117
2118 * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
2119 boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
2120 and kern/powerpc/ieee1275/cmain.c, respectively.
2121
2122 * boot/powerpc/ieee1275/crt0.S: Moved to ...
2123 * kern/powerpc/ieee1275/crt0.S: ... here.
2124
2125 * boot/powerpc/ieee1275/cmain.c: Moved to ...
2126 * kern/powerpc/ieee1275/cmain.c: ... here.
2127
2128 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
2129 kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
2130 instead of boot/powerpc/ieee1275/crt0.S and
2131 boot/powerpc/ieee1275/cmain.c, respectively.
2132
2133 * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
2134 sectors. It was not used anyway.
2135
09fc77a7 21362005-08-30 Hollis Blanchard <hollis@penguinppc.org>
2137
2138 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
2139 `unused parameter' warning.
2140
003789c7 21412005-08-30 Hollis Blanchard <hollis@penguinppc.org>
2142
2143 * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
2144 function.
2145 (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
2146 getcharwidth.
2147
67f44c86 21482005-08-28 Marco Gerards <metgerards@student.han.nl>
2149
2150 * include/grub/normal.h (enum grub_completion_type): Added
2151 `GRUB_COMPLETION_TYPE_ARGUMENT'.
2152
2153 * normal/cmdline.c (print_completion): Handle
2154 the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
2155 * normal/menu_entry.c (store_completion): Likewise.
2156
2157 * normal/completion.c (complete_arguments): New function.
2158 (grub_normal_do_completion): Call `complete_arguments' when the
2159 current words start with a dash.
2160
0b5abe02 21612005-08-27 Marco Gerards <metgerards@student.han.nl>
2162
2163 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
2164 `gzio.mod' instead of `io.mod').
2165
d9864ee1 21662005-08-22 Yoshinori K. Okuji <okuji@enbug.org>
2167
2168 * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
2169 (DISTDIRS): Added io and video.
2170 Rewrite the search routine to make an output consistently.
2171
2172 * DISTLIST: Added conf/sparc64-ieee1275.mk,
2173 conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
2174 include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
2175 io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
2176 kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
2177 util/powerpc/ieee1275/misc.c.
2178
2179 * include/grub/gzio.h: New file.
2180 * io/gzio.c: Likewise.
2181
2182 * kern/file.c (grub_file_close): Call grub_device_close only if
2183 FILE->DEVICE is not NULL.
2184
2185 * include/grub/mm.h [!NULL] (NULL): New macro.
2186
2187 * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
2188
2189 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
2190 (pkgdata_MODULES): Added gzio.mod.
2191 (gzio_mod_SOURCES): New variable.
2192 (gzio_mod_CFLAGS): Likewise.
2193
2194 * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
2195 (pkgdata_MODULES): Added gzio.mod.
2196 (gzio_mod_SOURCES): New variable.
2197 (gzio_mod_CFLAGS): Likewise.
2198
2199 * commands/cat.c: Include grub/gzio.h.
2200 (grub_cmd_cat): Use grub_gzfile_open instead of
2201 grub_file_open.
2202
2203 * commands/cmp.c: Include grub/gzio.h.
2204 (grub_cmd_cmp): Use grub_gzfile_open instead of
2205 grub_file_open.
2206
2207 * loader/i386/pc/multiboot.c: Include grub/gzio.h.
2208 (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
2209 grub_file_open.
2210 (grub_rescue_cmd_module): Likewise.
2211
fa46f4b5 22122005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
2213
2214 * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
2215 kern/sparc64/ieee1275/init.c because it contains _start.
2216 * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
2217
e9211b5d 22182005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
2219
2220 * configure.ac: Add support for sparc64 host with ieee1275
2221 firmware.
2222 * configure: Generated from configure.ac.
2223 * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
2224 instead of int.
2225 (grub_ofdisk_read): Likewise.
2226 (grub_ofdisk_open): Use %p to print pointer values, and cast the
2227 pointers as (void *) to remove a warning.
2228 (grub_ofdisk_close): Likewise.
2229 (grub_ofdisk_read): Likewise.
2230 * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
2231 returns, so make it return void to remove a warning.
2232 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
2233 Corresponding prototype change.
2234 * kern/mm.c (grub_mm_init_region): Use %p to print pointer
2235 values, and cast the pointers as (void *) to remove a warning.
2236 (grub_mm_dump): Likewise.
2237 * conf/sparc64-ieee1275.mk: New file.
2238 * conf/sparc64-ieee1275.rmk: Likewise.
2239 * include/grub/sparc64/setjmp.h: Likewise.
2240 * include/grub/sparc64/types.h: Likewise.
2241 * include/grub/sparc64/ieee1275/console.h: Likewise.
2242 * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
2243 * include/grub/sparc64/ieee1275/kernel.h: Likewise.
2244 * include/grub/sparc64/ieee1275/time.h: Likewise.
2245 * kern/sparc64/cache.c: Likewise.
2246 * kern/sparc64/dl.c: Likewise.
2247 * kern/sparc64/ieee1275/init.c: Likewise.
2248 * kern/sparc64/ieee1275/openfw.c: Likewise.
2249
385c6a92 22502005-08-21 Yoshinori K. Okuji <okuji@enbug.org>
2251
2252 * util/console.c (grub_ncurses_putchar): If C is greater than
2253 0x7f, set C to a question mark.
2254 (grub_ncurses_getcharwidth): New function.
2255 (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
2256 getcharwidth.
2257
2258 * normal/menu.c (print_entry): Made aware of Unicode. First,
2259 convert TITLE to UCS-4, and predict the cursor position by
2260 grub_getcharwidth.
2261
2262 * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
2263 const to SRC.
2264 * kern/misc.c (grub_utf16_to_utf8): Likewise.
2265
16ccb8b1 22662005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
2267
2268 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
2269 the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
2270 grub_strcat.
2271
2272 * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
2273 file by the option BOOT_IMAGE. Use grub_stpcpy instead of
2274 grub_strcpy and grub_strlen. Take it into account that a space
2275 character is inserted as a delimiter.
2276
6a85ce79 22772005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
2278
2279 * partmap/pc.c (pc_partition_map_iterate): Include the value of an
2280 invalid magic in thre error.
2281
2282 * commands/search.c: New file.
2283
2284 * util/grub-emu.c (main): Call grub_search_init and
2285 grub_search_fini.
2286
2287 * kern/rescue.c (grub_rescue_print_disks): Removed.
2288 (grub_rescue_print_devices): New function.
2289 (grub_rescue_cmd_ls): Use grub_device_iterate with
2290 grub_rescue_print_devices instead of grub_disk_dev_iterate with
2291 grub_rescue_print_disks.
2292
2293 * kern/partition.c (grub_partition_iterate): Return the result of
2294 PARTMAP->ITERATE instead of GRUB_ERRNO.
2295
2296 * kern/device.c: Include grub/partition.h.
2297 (grub_device_iterate): New function.
2298
2299 * include/grub/partition.h (grub_partition_iterate): Return int
2300 instead of grub_err_t.
2301
2302 * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
2303 prototype.
2304 [GRUB_UTIL] (grub_search_fini): Likewise.
2305
2306 * include/grub/device.h (grub_device_iterate): New prototype.
2307
2308 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
2309 commands/search.c.
2310 (pkgdata_MODULES): Added search.mod.
2311 (search_mod_SOURCES): New variable.
2312 (search_mod_CFLAGS): Likewise.
2313
2314 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
2315 (pkgdata_MODULES): Added search.mod.
2316 (search_mod_SOURCES): New variable.
2317 (search_mod_CFLAGS): Likewise.
2318
2319 * commands/ls.c (grub_ls_list_disks): Renamed to ...
2320 (grub_ls_list_devices): ... this, and use grub_device_iterate.
2321 All callers changed.
2322
2323 * DISTLIST: Added commands/search.c.
2324
ef095434 23252005-08-20 Yoshinori K. Okuji <okuji@enbug.org>
2326
2327 * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
2328 conversion.
2329 (grub_getcharwidth): New function.
2330
2331 * kern/misc.c (grub_utf8_to_ucs4): New function.
2332
2333 * include/grub/term.h (struct grub_term): Added a new member
2334 "getcharwidth".
2335 (grub_getcharwidth): New prototype.
2336
2337 * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
2338
2339 * term/i386/pc/console.c (map_char): New function. Segregated from
2340 grub_console_putchar.
2341 (grub_console_putchar): Use map_char.
2342 (grub_console_getcharwidth): New function.
2343 (grub_console_term): Specified grub_console_getcharwidth as
2344 getcharwidth.
2345
2346 * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
2347 (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
2348
2349 * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
2350 GRUB_ERRNO.
2351 (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
2352 on grub_strtoul completely.
2353 (write_char): Declare local variables in the beginning of the
2354 function.
2355 (grub_vesafb_getcharwidth): New function.
2356 (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
2357 getcharwidth.
2358
1f0a95e4 23592005-08-19 Yoshinori K. Okuji <okuji@enbug.org>
2360
2361 * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
2362 commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
2363 commands/i386/pc/vbetest.c.
2364
2365 * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
2366 call grub_vbe_get_controller_info again, because the returned
2367 information is volatile.
2368 (grub_vbe_set_video_mode): Mostly rewritten.
2369 (grub_vbe_get_video_mode): Use grub_vbe_probe and use
2370 grub_vbe_status_t correctly.
2371 (grub_vbe_get_video_mode_info): Likewise.
2372 (grub_vbe_set_pixel_rgb): Use a switch statement rather than
2373 several if statements.
2374
2375 * commands/i386/pc/vbe_list_modes.c: Renamed to ...
2376 * commands/i386/pc/vbeinfo.c: ... this.
2377
2378 * commands/i386/pc/vbe_test.c: Renamed to ...
2379 * commands/i386/pc/vbetest.c: ... this.
2380
2381 * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
2382 ...
2383 (grub_cmd_vbeinfo): ... this. Save video modes before
2384 iterating. Skip a video mode, if it is not available, not enough
2385 information is given or it is monochrome. Show the memory
2386 model. Leave the interpretation of MODEVAR to grub_strtoul
2387 completely.
2388 (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
2389 (GRUB_MOD_FINI): Likewise.
2390
2391 * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
2392 (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
2393 grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
2394 duplicated grub_env_get. Leave the interpretation of MODEVAR to
2395 grub_strtoul completely.
2396 (real2pm): Removed.
2397 (GRUB_MOD_INIT): Rename vbe_test to vbetest.
2398 (GRUB_MOD_FINI): Likewise.
2399
2400 * normal/misc.c: Include grub/mm.h.
2401
2402 * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
2403 vbe_list_modes with vbetest.mod and vbeinfo.mod.
2404 (vbe_list_modes_mod_SOURCES): Removed.
2405 (vbe_list_modes_mod_CFLAGS): Likewise.
2406 (vbe_test_mod_SOURCES): Likewise.
2407 (vbe_test_mod_CFLAGS): Likewise.
2408 (vbeinfo_mod_SOURCES): New variable.
2409 (vbeinfo_mod_CFLAGS): Likewise.
2410 (vbetest_mod_SOURCES): Likewise.
2411 (vbetest_mod_CFLAGS): Likewise.
2412
992ffbbe 24132005-08-18 Yoshinori K. Okuji <okuji@enbug.org>
2414
2415 * normal/misc.c: New file.
2416
2417 * DISTLIST: Added normal/misc.c.
2418
2419 * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
2420 DISK to HOOK. Call HOOK with DISK.
2421 * partmap/apple.c (apple_partition_map_iterate): Likewise.
2422 * partmap/pc.c (pc_partition_map_iterate): Likewise.
2423 * partmap/sun.c (sun_partition_map_iterate): Likewise.
2424
2425 * normal/menu_entry.c (struct screen): Added a new member
2426 "completion_shown".
2427 (completion_buffer): New global variable.
2428 (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
2429 (store_completion): New function.
2430 (complete): Likewise.
2431 (clear_completions): Likewise.
2432 (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
2433 call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
2434 a tab, call complete.
2435
2436 * normal/completion.c (disk_dev): Removed.
2437 (print_simple_completion): Likewise.
2438 (print_partition_completion): Likewise.
2439 (print_func): New global variable.
2440 (add_completion): Do not take the arguments WHAT or PRINT any
2441 longer. Added a new argument TYPE. Instead of printing directly,
2442 call PRINT_FUNC if not NULL.
2443 All callers changed.
2444 (complete_device): Use a local variable DEV instead of
2445 DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
2446 (grub_normal_do_completion): Take a new argument HOOK. Do not
2447 initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
2448 empty string, return NULL instead.
2449 All callers changed.
2450
2451 * normal/cmdline.c (print_completion): New function.
2452
2453 * kern/partition.c (grub_partition_iterate): Add an argument DISK
2454 to HOOK.
2455 All callers changed.
2456
2457 * kern/disk.c (grub_print_partinfo): Removed.
2458
2459 * include/grub/partition.h (struct grub_partition_map): Add a new
2460 argument DISK into HOOK of ITERATE.
2461 (grub_partition_iterate): Add a new argument DISK to HOOK.
2462
2463 * include/grub/normal.h (enum grub_completion_type): New enum.
2464 (grub_completion_type_t): New type.
2465 (GRUB_COMPLETION_TYPE_COMMAND): New constant.
2466 (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
2467 (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
2468 (GRUB_COMPLETION_TYPE_FILE): Likewise.
2469 (grub_normal_do_completion): Added a new argument HOOK.
2470 (grub_normal_print_device_info): New prototype.
2471
2472 * include/grub/disk.h (grub_print_partinfo): Removed.
2473
2474 * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
2475 (normal_mod_SOURCES): Likewise.
2476 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2477 (normal_mod_SOURCES): Likewise.
2478
2479 * commands/ls.c (grub_ls_list_disks): Use
2480 grub_normal_print_device_info instead of grub_print_partinfo. Free
2481 PNAME.
2482 (grub_ls_list_files): Use grub_normal_print_device_info instead of
2483 duplicating the code.
2484
0bd41162 24852005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
2486
2487 * commands/i386/pc/vbe_list_modes.c: Update source formatting to
2488 follow GCS more precisely.
2489 * commands/i386/pc/vbe_test.c: Likewise.
2490 * include/grub/i386/pc/vbe.h: Likewise.
2491 * term/i386/pc/vesafb.c: Likewise.
2492 * video/i386/pc/vbe.c: Likewise.
2493
6323696a 24942005-08-16 Vesa Jaaskelainen <chaac@nic.fi>
2495
2496 * DISTLIST: Added term/i386/pc/vesafb.c
2497 DISTLIST: Added video/i386/pc/vbe.c
2498 DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
2499 DISTLIST: Added commands/i386/pc/vbe_test.c.
2500 * commands/i386/pc/vbe_list_modes.c: New file.
2501 * commands/i386/pc/vbe_test.c: Likewise.
2502 * term/i386/pc/vesafb.c: Likewise.
2503 * video/i386/pc/vbe.c: Likewise.
2504 * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
2505 (grub_vbe_probe) Added prototype.
2506 (grub_vbe_set_video_mode) Likewise.
2507 (grub_vbe_get_video_mode) Likewise.
2508 (grub_vbe_get_video_mode_info) Likewise.
2509 (grub_vbe_set_pixel_rgb) Likewise.
2510 (grub_vbe_set_pixel_index) Likewise.
2511 * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
2512 (pkgdata_MODULES): Added vesafb.mod.
2513 (pkgdata_MODULES): Added vbe_list_modes.mod.
2514 (pkgdata_MODULES): Added vbe_test.mod.
2515 (vbe_mod_SOURCES): Added.
2516 (vbe_mod_CFLAGS): Likewise.
2517 (vesafb_mod_SOURCES): Likewise.
2518 (vesafb_mod_CFLAGS): Likewise.
2519 (vbe_list_modes_mod_SOURCES): Likewise.
2520 (vbe_list_modes_mod_CFLAGS): Likewise.
2521 (vbe_test_mod_SOURCES): Likewise.
2522 (vbe_test_mod_CFLAGS): Likewise.
2523
0a74e62f 25242005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
2525
0a74e62f 2526 * normal/command.c (grub_command_execute): If INTERACTIVE is
2527 false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
2528 CMDLINE. Disable the pager if INTERACTIVE is true.
2529 All callers are changed.
2530
2531 * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
2532 before reading a config file.
2533 * normal/main.c (read_config_file): Even if a command is not
2534 found, register it if it is within an entry.
2535
2536 * util/grub-emu.c: Include sys/types.h and unistd.h.
2537 (options): Added --hold.
2538 (struct arguments): Added a new member "hold".
2539 (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
2540 missing.
2541 (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
2542 cleared by a debugger, if it is not zero.
2543
2544 * include/grub/normal.h (grub_command_execute): Add an argument
2545 INTERACTIVE.
2546
e51f85ae 25472005-08-14 Vesa Jaaskelainen <chaac@nic.fi>
2548
2549 * DISTLIST: Added include/grub/i386/pc/vbe.h.
2550
e9c6f39b 25512005-08-13 Yoshinori K. Okuji <okuji@enbug.org>
2552
2553 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
2554 program with another one, because the old one didn't detect a bug
2555 in gcc-3.4. Always use regparm 2, because the new test is still
2556 not enough for gcc-4.0. Someone must investigate a simple test
2557 case which detects a bug in gcc-4.0.
2558
8de3495c 25592005-08-12 Yoshinori K. Okuji <okuji@enbug.org>
2560
2561 * DISTLIST: Added normal/completion.c.
2562
2563 * normal/completion.c: New file.
2564
2565 * term/i386/pc/console.c (grub_console_getwh): New function.
2566 (grub_console_term): Assign grub_console_getwh to getwh.
2567
2568 * normal/cmdline.c (grub_tab_complete): Removed. Now the same
2569 function is defined in normal/completion.c as
2570 grub_normal_do_completion.
2571 (grub_cmdline_get): Use grub_normal_do_completion instead of
2572 grub_tab_complete.
2573
2574 * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
2575 returns non-zero, otherwise return 0.
2576 (grub_partition_iterate): First, probe the partition map. Then,
2577 call ITERATE only for this partition map.
2578
2579 * kern/misc.c (grub_strncmp): Rewritten.
2580
2581 * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
2582 returns non-zero. Otherwise return 0.
2583
2584 * include/grub/partition.h (grub_partition_map_iterate): Return
2585 int instead of void.
2586
2587 * include/grub/normal.h (grub_normal_do_completion): New prototype.
2588
2589 * include/grub/misc.h (grub_strncmp): Change the type of N to
2590 grub_size_t.
2591
2592 * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
2593 of void.
2594
2595 * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
2596 unsigned explictly before comparing it with I.
2597
2598 * kern/main.c (grub_env_write_root): Add the attribute unused into
2599 VAR.
2600
2601 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
2602 normal/completion.c.
2603 (normal_mod_SOURCES): Likewise.
2604 * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
2605 (normal_mod_SOURCES): Likewise.
2606
2607 * normal/command.c (grub_iterate_commands): If ITERATE returns
2608 non-zero, return one immediately.
2609
e85e144b 26102005-08-09 Vesa Jaaskelainen <chaac@nic.fi>
2611
2612 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
2613 * kern/i386/pc/startup.S: Updated Global Descriptor table's
2614 descriptions.
2615 (grub_vbe_get_controller_info): New function.
2616 (grub_vbe_get_mode_info): Likewise.
2617 (grub_vbe_set_mode): Likewise.
2618 (grub_vbe_get_mode): Likewise.
2619 (grub_vbe_set_memory_window): Likewise.
2620 (grub_vbe_get_memory_window): Likewise.
2621 (grub_vbe_set_scanline_length): Likewise.
2622 (grub_vbe_get_scanline_length): Likewise.
2623 (grub_vbe_set_display_start): Likewise.
2624 (grub_vbe_get_display_start): Likewise.
2625 (grub_vbe_set_palette_data): Likewise.
2626 * include/grub/i386/pc/vbe.h: New file.
2627
c46153d2 26282005-08-08 Hollis Blanchard <hollis@penguinppc.org>
2629
2630 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
2631 kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
2632 * DISTLIST: Likewise.
2633 * kern/ieee1275/of.c: Moved to ...
2634 * kern/ieee1275/ieee1275.c: ... here.
2635
0cb90c45 26362005-08-08 Hollis Blanchard <hollis@penguinppc.org>
2637
2638 * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
2639 (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
2640 Pass 0 as `end' parameter to grub_strtoul().
2641
a19fb360 26422005-08-08 Hollis Blanchard <hollis@penguinppc.org>
2643
2644 * include/grub/powerpc/ieee1275/console.h: Do not include
2645 <grub/types.h>. Do not include <grub/symbol.h>. Remove ASM_FILE
2646 ifdef.
2647 (grub_console_cur_color): Remove i386-specific prototype.
2648 (grub_console_real_putchar): Likewise.
2649 (grub_console_checkkey): Likewise.
2650 (grub_console_getkey): Likewise.
2651 (grub_console_getxy): Likewise.
2652 (grub_console_gotoxy): Likewise.
2653 (grub_console_cls): Likewise.
2654 (grub_console_setcursor): Likewise.
2655 * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
2656 Include <grub/machine/console.h>.
2657 * term/ieee1275/ofconsole.c: Likewise.
2658
4ac9bd04 26592005-08-08 Yoshinori K. Okuji <okuji@enbug.org>
2660
2661 * Makefile.in (LIBLZO): New variable.
2662
2663 * configure.ac: Check for LZO version 2.
2664
2665 * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
2666 lzo/lzo1x.h instead of lzo1x.h.
2667
2668 * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
2669 of -llzo.
2670
2671 * util/i386/pc/grub-setup.c (main): Do not free PREFIX
2672 twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
2673
2674 * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
2675 copying the data from PARTITION to P.
2676
f4917dfd 26772005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
2678
2679 * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
2680 negative, unload the module.
2681
2682 * util/i386/pc/grub-setup.c (setup): The name of the PC partition
2683 map is "pc_partition_map" but not "pc".
2684 (usage): Fix the description. The options are --boot-image and
2685 --core-image but not --boot-file or --core-file.
2686 (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
2687 based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
2688 DEFAULT_DIRECTORY.
2689
2690 * util/i386/pc/grub-install.in: Do not specify --boot-file or
2691 --core-file. Specify INSTALL_DEVICE as an argument.
2692
2693 * util/console.c: Include config.h.
2694 [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
2695 [HAVE_NCURSES_H]: Include ncurses.h.
2696 [HAVE_CURSES_H]: Include curses.h.
2697 [!A_NORMAL] (A_NORMAL): Defined as zero.
2698 [!A_STANDOUT] (A_STANDOUT): Likewise.
2699
2700 * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
2701 -lncurses.
2702 * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
2703
2704 * configure.ac: Check for curses libraries and headers.
2705
2706 * Makefile.in (LIBCURSES): New variable.
2707
2708 * genmk.rb (Script::rule): Set the executable bits.
2709
2710 * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
2711 name of the PC partition map is "pc_partition_map" but not "pc".
2712
0e143073 27132005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
2714
2715 * util/i386/pc/grub-install.in (grub_probefs): New variable.
2716 (modules): Likewise.
2717 (usage): Added descriptions for --modules and --grub-probefs.
2718 Handle --modules and --grub-probefs. Save the arguments in MODULES
2719 and GRUB_PROBEFS, respectively.
2720 Auto-detect a filesystem module against GRUBDIR. If the result is
2721 empty and modules are not specified explicitly, abort the
2722 installation. Add the result to MODULES.
2723
2724 * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
2725 disk/powerpc/ieee1275/ofdisk.c,
2726 include/grub/powerpc/ieee1275/init.h and
2727 term/powerpc/ieee1275/ofconsole.c.
2728 Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
2729 term/ieee1275/ofconsole.c.
2730
2731 * include/grub/powerpc/ieee1275/console.h: Resurrected.
2732
2733 * COPYING: Upgraded to the latest version. Only the address of the
2734 FSF office has changed.
2735
efd6e6d5 27362005-08-07 Yoshinori K. Okuji <okuji@enbug.org>
2737
2738 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
2739 kern/ieee1275.c with kern/ieee1275/of.c.
2740
2741 * kern/ieee1275.c: Moved to ...
2742 * kern/ieee1275/of.c: ... here.
2743
8ceafda2 27442005-08-06 Yoshinori K. Okuji <okuji@enbug.org>
2745
2746 * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
2747 readablity.
2748
2749 * config.guess: Updated to the latest version from gnulib.
2750 * config.sub: Likewise.
2751 * install.sh: Likewise.
2752 * mkinstalldirs: Likewise.
2753
2754 * include/grub/console.h: Removed. This file is arch-specific. Do
2755 not put this in include/grub.
2756
2757 * include/grub/i386/pc/console.h: Resurrected.
2758
2759 * util/console.c: Include grub/machine/console.h instead of
2760 grub/console.h.
2761 * util/grub-emu.c: Likewise.
2762
267f6cd9 27632005-08-04 Marco Gerards <metgerards@student.han.nl>
2764
2765 * kern/term.c (grub_putcode): Use `grub_getwh' instead of
2766 hardcoded value.
2767
2768 From Vincent Pelletier <subdino2004@yahoo.fr>
2769 * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
2770 Redefined to use grub_getwh.
2771 (grub_term): New member named getwh.
2772 (grub_getwh): New prototype.
2773 * kern/term.c (grub_getwh): New function.
2774 * term/i386/pc/console.c (grub_console_getwh): New function.
2775 (grub_console_term): New member `getwh'.
2776 * term/i386/pc/vga.c (grub_vga_getwh): New function.
2777 (grub_vga_term): New member `getwh'.
0b5abe02 2778 * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
267f6cd9 2779 grub_ssize_t.
2780 (grub_ofconsole_getw): New function.
2781 (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
2782 (grub_ofconsole_term): New field named getwh and new initial
2783 value.
2784
3be7266d 27852005-08-03 Hollis Blanchard <hollis@penguinppc.org>
2786
2787 * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
2788 * include/grub/ieee1275/ieee1275.h: ... to here. All users updated.
2789 Move `abort', `grub_reboot', and `grub_halt' prototypes ...
2790 * include/grub/powerpc/ieee1275/kernel.h: ... to here.
2791 * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
2792 of <grub/machine/ieee1275.h>.
2793 * commands/ieee1275/reboot.c: Likewise.
2794 * boot/powerpc/ieee1275/ieee1275.c: Move ...
2795 * kern/ieee1275.c: ... to here. All users updated. Change all
2796 parameter structs to use new type `grub_ieee1275_cell_t'.
2797 * term/powerpc/ieee1275/ofconsole.c: Move ...
2798 * term/ieee1275/ofconsole.c: ... to here. All users updated.
2799 * disk/powerpc/ieee1275/ofdisk.c: Move ...
2800 * disk/ieee1275/ofdisk.c: ... to here. All users updated.
2801 * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
2802 to return int.
2803 * include/grub/i386/pc/console.h: Move to include/grub/console.h.
2804 Remove unused prototypes. All users updated.
2805 * include/grub/powerpc/ieee1275/console.h: Removed.
2806 * include/grub/powerpc/ieee1275/ieee1275.h: Define
2807 `grub_ieee1275_cell_t'.
2808 * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
2809 Cast comparisons with -1 to the correct type.
2810 * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
2811 type to match `grub_ieee1275_entry_fn'.
2812
8b5f3938 28132005-08-01 Yoshinori K. Okuji <okuji@enbug.org>
2814
2815 * DISTLIST: Added util/i386/pc/grub-probefs.c.
2816
2817 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
2818 (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
2819 partmap/sun.c.
2820 (grub_probefs_SOURCES): New variable.
2821
2822 * util/i386/pc/grub-probefs.c: New file.
2823
2824 * util/i386/pc/grub-setup.c (main): Call
2825 grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
2826 grub_hfs_init and grub_jfs_init to initialize the system. Call
2827 grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
2828 grub_pc_partition_map_fini to finish the system.
2829
ea409713 28302005-07-31 Yoshinori K. Okuji <okuji@enbug.org>
2831
2832 * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
2833 function.
2834 (grub_multiboot_load_elf32): Likewise.
2835 (grub_multiboot_is_elf64): Likewise.
2836 (grub_multiboot_load_elf64): Likewise.
2837 (grub_multiboot_load_elf): Likewise.
2838 (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
2839 an ELF32 or ELF64 file.
2840 This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
2841
2842 From Serbinenko Vladimir <serbinenko.vova@list.ru>:
2843 * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
2844 NULL before calling FS->LABEL.
2845 * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
2846 * commands/ls.c (grub_ls_list_files): Show labels, if possible.
2847 (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
2848 before calling FS->LABEL.
2849
141a288b 28502005-07-26 Yoshinori K. Okuji <okuji@enbug.org>
2851
2852 * util/i386/pc/grub-install.in (datadir): New variable.
2853 (libdir): Removed.
2854 (pkgdatadir): New variable.
2855 (pkglibdir): Removed.
2856
0d5f8a54 28572005-07-24 Yoshinori K. Okuji <okuji@enbug.org>
2858
2859 * DISTLIST: Added util/i386/pc/grub-install.in.
2860
2861 * util/i386/pc/grub-install.in: New file.
2862
2863 * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
2864 (grub_install_SOURCES): Likewise.
2865
2866 * genmk.rb: Added support for scripts.
2867 (Script): New class.
2868 (scripts): New variable.
2869
2870 * Makefile.in (install-local): Install sbin_SCRIPTS by
2871 INSTALL_SCRIPT.
2872 (uninstall): Remove sbin_SCRIPTS.
2873
2874 * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
2875 device, try to get a GRUB device by
2876 grub_util_biosdisk_get_grub_dev.
2877 Free DEST_DEV.
2878
2879 * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
2880 description for --device-map.
2881
5f968e1e 28822005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
2883
2884 Change the semantics of variable hooks. They now return strings
2885 instead of error values.
2886
2887 * util/i386/pc/grub-setup.c: Include grub/env.h.
2888 (setup): Use grub_device_set_root instead of grub_env_set.
2889
2890 * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
2891 grub_env_get instead of grub_device_set_root and
2892 grub_device_get_root, respectively.
2893
2894 * kern/main.c (grub_env_write_root): New function.
2895 (grub_set_root_dev): Register grub_env_write_hook for "root". Use
2896 grub_env_set instead of grub_device_set_root.
2897
2898 * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
2899 many variables.
2900 (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
2901 rather than calling ENV->WRITE_HOOK afterwards.
2902 (grub_env_get): Return the result of ENV->READ_HOOK rather than
2903 passing a pointer of a pointer.
2904 (grub_register_variable_hook): Change the types of "read_hook" and
2905 "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
2906 respectively.
2907 Allocate the default empty string on the heap, because this string
2908 may be freed later.
2909
2910 * kern/device.c: Include grub/env.h.
2911 (grub_device_set_root): Removed.
2912 (grub_device_get_root): Likewise.
2913 (grub_device_open): Use grub_env_get instead of
2914 grub_device_get_root.
2915
2916 * include/grub/env.h (grub_env_read_hook_t): New type.
2917 (grub_env_write_hook_t): Likewise.
2918 (grub_env_var): Change the types of "read_hook" and "write_hook"
2919 to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
2920 (grub_register_variable_hook): Likewise.
2921
2922 * include/grub/device.h (grub_device_set_root): Removed.
2923 (grub_device_set_root): Likewise.
2924
2925 * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
2926 make sure that DIRNAME terminates with '/', so that
2927 grub_fat_find_dir will fail if PATH is not a directory.
2928
2929 * commands/ls.c (grub_ls_list_files): Remove the qualifier const
2930 from DIRNAME.
2931 Use the qualifier auto for print_files and print_files_long.
2932 If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
2933 as a regular file.
2934 Put a newline only if there is no error.
2935 (grub_cmd_ls): Remove grub_ls_print_files, because this is not
2936 used.
2937
896f0afd 29382005-07-20 Yoshinori K. Okuji <okuji@enbug.org>
2939
2940 * kern/partition.c (grub_partition_probe): Initialize PART to
2941 NULL. Otherwise, when no partition map is registered, this returns
2942 a garbage.
2943
b28b81b2 29442005-07-19 Yoshinori K. Okuji <okuji@enbug.org>
2945
2946 * partmap/apple.c (apple_partition_map_iterate): Check if POS
2947 equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
2948 valid.
2949
5f3607e0 29502005-07-18 Yoshinori K. Okuji <okuji@enbug.org>
2951
2952 * commands/ls.c (grub_ls_list_disks): Print the filesystem
2953 information on each device, if it does not have partitions. Print
2954 "Device" instead of "Disk", because this function is not specific
2955 to disk devices.
2956
2957 * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
2958 static to ensure that it is put on the memory rather than a
2959 register.
2960
502c87e8 29612005-07-17 Yoshinori Okuji <okuji@enbug.org>
2962
2963 * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
2964 (grub_cat_init): Likewise.
2965 * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
2966 (options): Likewise.
2967 * commands/configfile.c (GRUB_MOD_INIT): Likewise.
2968 (grub_configfile_init): Likewise.
2969 * font/manager.c (GRUB_MOD_INIT): Likewise.
2970 * commands/help.c (GRUB_MOD_INIT): Likewise.
2971 (grub_help_init): Likewise.
2972 * normal/command.c (grub_command_init): Likewise.
2973 * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
2974 * disk/loopback.c (grub_loop_init): Likewise.
2975 (GRUB_MOD_INIT): Likewise.
2976 * commands/ls.c (grub_ls_init): Likewise.
2977 (GRUB_MOD_INIT): Likewise.
2978 (options): Likewise.
2979 * commands/boot.c (grub_boot_init): Likewise.
2980 (GRUB_MOD_INIT): Likewise.
2981 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
2982 * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
2983 (GRUB_MOD_INIT): Likewise.
2984 * commands/cmp.c (grub_cmp_init): Likewise.
2985 (GRUB_MOD_INIT): Likewise.
2986
2987 * normal/arg.c: Use <> instead of "" to include header files.
2988 (SHORT_ARG_HELP): New macro.
2989 (SHORT_ARG_USAGE): Likewise.
2990 (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
2991 of 'h' and 'u' for help and usage, respectively. Use more GNU-like
2992 descriptions.
2993 (find_short): Check if C is 'h' or 'u' explicitly.
2994 (grub_arg_show_help): Use space characters instead of tabs. Treat
2995 SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
2996 are shown with --help and --usage only if they are not used for
2997 the command itself.
2998 (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
2999 'h' and 'u'.
3000
3001 * include/grub/arg.h (struct grub_arg_option): Add the qualifier
3002 const into "longarg". Change the type of "shortarg" to int.
3003
f806d18e 30042005-07-17 Yoshinori Okuji <okuji@enbug.org>
3005
3006 * boot/i386/pc/boot.S (boot_drive_check): New label.
3007
3008 * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
3009 macro.
3010
3011 * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
3012 which do not pass a boot drive correctly. Copied from GRUB Legacy.
3013
e293232b 30142005-07-17 Yoshinori Okuji <okuji@enbug.org>
3015
3016 * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
3017 When turning off Gate A20, skip the check and return immediately,
3018 because this is not fatal usually.
3019
ebedfd00 30202005-07-17 Yoshinori Okuji <okuji@enbug.org>
3021
3022 * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
3023 be 0x7C00 instead of 0x8000.
3024
3025 * boot/i386/pc/pxeboot.S: Rewritten.
3026
3027 * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
3028 EXT_C.
3029 (gate_a20_check_state): Read a byte from 0x108000. Invert the
3030 result.
3031
654fc59f 30322005-07-16 Yoshinori K. Okuji <okuji@enbug.org>
3033
3034 * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
3035 robustness. This routine now supports a BIOS call and System
3036 Control Port A to modify the gate A20.
3037
3038 * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
3039 Increased to 0x440.
3040
09f9923f 30412005-07-12 Hollis Blanchard <hollis@penguinppc.org>
3042
3043 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
3044 device path and resulting ihandle.
3045 (grub_ofdisk_close): dprintf the ihandle being closed.
3046 (grub_ofdisk_read): dprintf function parameters.
3047 * kern/mm.c (grub_mm_init_region): Likewise.
3048 * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
3049 (grub_linux_boot): dprintf the Linux entry point, initrd address and
3050 size, and boot arguments.
3051 (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
3052 before loading into memory.
3053 (grub_rescue_cmd_initrd): dprintf the initrd's address and size
3054 before loading into memory.
3055
7ef504d8 30562005-07-12 Yoshinori K. Okuji <okuji@enbug.org>
3057
3058 * kern/mm.c: Added much documentation.
3059 (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
3060 8, set to 5 instead of 8.
3061
e0f050c2 30622005-07-10 Yoshinori Okuji <okuji@enbug.org>
3063
3064 * DISTLIST: Added util/i386/pc/grub-mkimage.c.
3065
3066 * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
3067 (grub_mkdevicemap_SOURCES): New variable.
3068
3069 * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
3070 lib/device.c of GRUB Legacy.
3071
7224189a 30722005-07-10 Yoshinori Okuji <okuji@enbug.org>
3073
3074 * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
3075 instead of PATH is NULL.
3076
68c864eb 30772005-07-09 Vincent Pelletier <subdino2004@yahoo.fr>
3078
3079 * commands/cmp.c (BUFFER_SIZE): New macro.
3080 (grub_cmd_cmp): Close the right file at the right time. Compare
3081 only data just read. Don't report files of different size as
3082 identical. Dynamically allocate buffers. Move variable
3083 declarations at the beginning of function.
3084
e6f3e614 30852005-07-09 Yoshinori Okuji <okuji@enbug.org>
3086
3087 * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
3088 reverse.
3089
f8f1559a 30902004-07-04 Vincent Pelletier <subdino2004@yahoo.fr>
3091
3092 * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
3093 when backspace is pressed at beginning of line.
3094
39c9d41d 30952005-07-03 Yoshinori Okuji <okuji@enbug.org>
3096
3097 * DISTLIST: Added genfslist.sh.
3098
3099 * normal/main.c (fs_module_list): New variable.
3100 (autoload_fs_module): New function.
3101 (read_fs_list): Likewise.
3102 (grub_normal_execute): Call read_fs_list.
3103
3104 * kern/fs.c (grub_fs_autoload_hook): New variable.
3105 (grub_fs_probe): Added support for auto-loading.
3106
3107 * include/grub/normal.h (struct grub_fs_module_list): New struct.
3108 (grub_fs_module_list_t): New type.
3109
3110 * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
3111 (grub_fs_autoload_hook): New prototype.
3112
3113 * genfslist.sh: New file.
3114
3115 * genmk.rb: Added a rule to generate a filesystem list.
3116
121c1d83 31172005-06-30 Marco Gerards <metgerards@student.han.nl>
3118
3119 * configure.ac: Fix the test for cross-compiling.
3120
3121 * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'. Don't
3122 define GRUB_UTIL anymore.
3123
3124 * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
3125 so this function works on other systems than just big endian.
3126 (load_modules): Likewise.
3127 (add_segments): Likewise.
3128
e75d76e1 31292005-06-23 Hollis Blanchard <hollis@penguinppc.org>
3130
3131 * kern/misc.c (grub_vsprintf): Add `longfmt'. If format string
3132 contains `l' modifier, get a long from va_arg().
3133
50b5a0a7 31342005-06-23 Yoshinori K. Okuji <okuji@enbug.org>
3135
3136 * kern/mm.c (grub_free): If the next free block which is being
3137 merged is the first free block, set the first block to the block
3138 being freed.
3139 Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
3140
89371b20 31412005-05-08 Hollis Blanchard <hollis@penguinppc.org>
3142
3143 * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
3144 `grub_ieee1275_chosen'.
3145
168d6e58 31462005-05-08 Hollis Blanchard <hollis@penguinppc.org>
3147
3148 * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
3149 (grub_ieee1275_chosen): New variable.
3150 (cmain): Initialize and use `grub_ieee1275_chosen' instead of
3151 `chosen'.
3152 * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
3153 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
3154 Rename first argument to `phandle' for consistency.
3155 (grub_ieee1275_get_property_length): Likewise.
3156 (grub_ieee1275_next_property): Likewise. Change type of first argument
3157 to grub_ieee1275_phandle_t.
3158 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
3159 Move export next to declaration.
3160 (grub_ieee1275_chosen): New variable.
3161 * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
3162 Correct cosmetic typo.
3163 * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
3164 `grub_ieee1275_chosen'.
3165 * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
3166 * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
3167 (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
3168 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
3169 `grub_ieee1275_chosen'.
3170
ca5baa3f 31712005-05-10 Hollis Blanchard <hollis@penguinppc.org>
3172
3173 * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
3174 /chosen/bootargs.
3175 * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
3176 /chosen/bootargs as "variable=value" pairs.
3177
708b345f 31782005-05-08 Vincent Pelletier <subdino2004@yahoo.fr>
3179
3180 * include/grub/misc.h (grub_dprintf): New macro.
3181 (grub_real_dprintf): New prototype.
3182 (grub_strword): Likewise.
3183 (grub_iswordseparator): Likewise.
3184 * kern/misc.c (grub_real_dprintf): New function.
3185 (grub_strword): Likewise.
3186 (grub_iswordseparator): Likewise.
3187
f4c5e67c 31882005-04-30 Hollis Blanchard <hollis@penguinppc.org>
3189
3190 * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
3191 (roundup): Remove macro.
3192 (grub_ieee1275_flags): Make static.
3193 (grub_ieee1275_realmode): Remove.
3194 (grub_ieee1275_test_flag): New function.
3195 (grub_ieee1275_set_flag): Likewise.
3196 (find_options): Rename to `grub_ieee1275_find_options'; update
3197 callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
3198 GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
3199 (cmain): New prototype.
3200 (cmain): Use `grub_ieee1275_set_flag' instead of accessing
3201 `grub_ieee1275_flags' directly.
3202 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
3203 machine/biosdisk.h.
3204 * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
3205 Don't include grub/machine/init.h.
3206 (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
3207 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
3208 Remove prototype.
3209 (grub_ieee1275_realmode): Likewise.
3210 (grub_ieee1275_flag): New enum.
3211 (grub_ieee1275_test_flag): New prototype.
3212 (grub_ieee1275_set_flag): New prototype.
3213 * include/grub/powerpc/ieee1275/init.h: Remove file.
3214 * include/grub/powerpc/ieee1275/ofdisk.h: New file.
3215 * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
3216 Include grub/machine/console.h. Include grub/machine/ofdisk.h.
3217 (grub_machine_fini): Don't call `grub_ieee1275_release'. Remove
3218 comment.
3219 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
3220 `grub_ieee1275_test_flag'.
3221 (grub_ieee1275_encode_devname): Likewise.
3222
ed16607e 32232005-04-21 Hollis Blanchard <hollis@penguinppc.org>
3224
3225 * include/grub/powerpc/ieee1275/ieee1275.h
3226 (grub_ieee1275_encode_devname): New prototype.
3227 (grub_ieee1275_get_filename): Likewise.
3228 * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
3229 function.
3230 (grub_set_prefix): Likewise.
3231 (grub_machine_init): Call grub_set_prefix.
3232 * kern/powerpc/ieee1275/openfw.c: Fix typos.
3233 (grub_parse_type): New enum.
3234 (grub_ieee1275_get_devargs): New function.
3235 (grub_ieee1275_get_devname): Likewise.
3236 (grub_ieee1275_parse_args): Likewise.
3237 (grub_ieee1275_get_filename): Likewise.
3238 (grub_ieee1275_encode_devname): Likewise.
3239
be369920 32402005-03-30 Marco Gerards <metgerards@student.han.nl>
3241
3242 * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
3243 `grub_loader_unset'.
3244
a5ce3a4a 32452005-03-26 Hollis Blanchard <hollis@penguinppc.org>
3246
3247 * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
3248 instead of grub_ieee1275_interpret.
3249 (grub_halt_init): New function.
3250 (grub_halt_fini): Likewise.
3251 (GRUB_MOD_INIT): Correct message grammar.
3252 * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
3253 instead of grub_ieee1275_interpret.
3254 (grub_reboot_init): New function.
3255 (grub_reboot_fini): Likewise.
3256 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
3257 commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
3258 util/i386/pc/misc.c with commands/ieee1275/halt.c,
3259 commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
3260 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
3261 function.
3262 * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
3263 Add prototype.
3264 * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
3265 prototype.
3266 (grub_halt): Likewise.
3267 * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
3268 (cmain): Remove __attribute__((unused)).
3269 * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
3270 (grub_heap_len): Likewise.
3271 (grub_machine_fini): New function.
3272 * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
3273 (grub_halt): Likewise.
3274 * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
3275 function.
3276 * util/powerpc/ieee1275/misc.c: New file.
3277
0058f771 32782005-03-19 Yoshinori K. Okuji <okuji@enbug.org>
3279
3280 * DISTLIST: New file.
3281 * gendistlist.sh: Likewise.
3282
3283 * Makefile.in (COMMON_DISTFILES): Removed.
3284 (BOOT_DISTFILES): Likewise.
3285 (CONF_DISTFILES): Likewise.
3286 (DISK_DISTFILES): Likewise.
3287 (FS_DISTFILES): Likewise.
3288 (INCLUDE_DISTFILES): Likewise.
3289 (KERN_DISTFILES): Likewise.
3290 (LOADER_DISTFILES): Likewise.
3291 (TERM_DISTFILES): Likewise.
3292 (UTIL_DISTFILES): Likewise.
3293 (DISTFILES): Likewise.
3294 (uninstall): Uninstall files in $(pkgdata_DATA).
3295 (DISTLIST): New target.
3296 (distdir): Use the contents of the file DISTLIST to get a list of
3297 distributed files.
3298
46b3b8a5 32992005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
3300
3301 * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
3302 descriptor. This is ported from GRUB Legacy.
3303
3304 * gencmdlist.sh: Added an extra semicolon to make it work with
3305 old sed versions. Reported by Robert Bihlmeyer
3306 <robbe@orcus.priv.at>.
3307
5822ff87 33082005-03-08 Yoshinori Okuji <okuji@enbug.org>
3309
3310 Automatic loading of commands is supported.
3311
3312 * normal/main.c (read_command_list): New function.
3313 (grub_normal_execute): Call read_command_list.
3314
3315 * normal/command.c (grub_register_command): Return zero or CMD.
3316 Allocate CMD->NAME from the heap.
3317 Initialize CMD->MODULE_NAME to zero.
3318 Find the same name as well. If the same command is found and it is
3319 a dummy command, overwrite members. If it is not a dummy command,
3320 return zero.
3321 (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
3322 (grub_command_find): If a dummy command is found, load a module
3323 and retry to find a command only once.
3324
3325 * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
3326 make sure that each command is loaded.
3327
3328 * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
3329 macro.
3330 (struct grub_command): Remove const from the member `name'.
3331 Add a new member `module_name'.
3332 (grub_register_command): Return grub_command_t.
3333
3334 * commands/help.c (grub_cmd_help): Call grub_command_find to make
3335 sure that each command is loaded.
3336
3337 * genmk.rb (PModule::rule): Specify a module name without the
3338 suffix ".mod" to gencmdlist.sh.
3339
7b1f4b57 33402005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
3341
3342 * gencmdlist.sh: New file.
3343
3344 * genmk.rb (PModule::rule): Generate a rule for a command list.
3345 Clean command.lst.
3346 Generate command.lst from $(COMMANDFILES).
3347
3348 * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
3349 (DATA): Added $(pkgdata_DATA).
3350 (install-local): Install files in $(pkgdata_DATA).
3351
062aaf39 33522005-03-02 Yoshinori K. Okuji <okuji@enbug.org>
3353
3354 * term/i386/pc/vga.c (debug_command): Removed.
3355 (GRUB_MOD_INIT): Do not register the command "debug".
3356
3357 From Hollis Blanchard:
3358 * commands/configfile.c: New file.
3359 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
3360 commands/configfile.c.
3361 (pkgdata_MODULES): Added configfile.mod.
3362 (configfile_mod_SOURCES): New variable.
3363 (configfile_mod_CFLAGS): Likewise.
3364 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
3365 commands/configfile.c.
3366 (pkgdata_MODULES): Added configfile.mod.
3367 (configfile_mod_SOURCES): New variable.
3368 (configfile_mod_CFLAGS): Likewise.
3369 * util/grub-emu.c (main): Call grub_configfile_init and
3370 grub_configfile_fini.
3371 * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
3372 prototype.
3373 [GRUB_UTIL] (grub_configfile_fini): Likewise.
3374
cee01aa6 33752005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
3376
3377 * normal/arg.c (grub_arg_show_help): Do not show the bug report
3378 address.
3379
3380 * commands/help.c (grub_cmd_help): Do not print newlines after
3381 the last command in print_command_help.
3382
93f3a1d8 33832005-02-27 Yoshinori K. Okuji <okuji@enbug.org>
3384
3385 * commands/default.h: New file.
3386 * commands/timeout.h: Likewise.
3387 * normal/context.c: Likewise.
3388
3389 * util/misc.c: Do not include sys/times.h.
3390 Include sys/time.h and grub/machine/time.h.
3391 (grub_get_rtc): Rewritten with gettimeofday.
3392
3393 * util/grub-emu.c (main): Call grub_default_init and
3394 grub_timeout_init before grub_normal_init, and call
3395 grub_timeout_fini and grub_default_fini after grub_main.
3396
3397 * util/console.c (grub_ncurses_checkkey): Return the read
3398 character or -1.
3399
3400 * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
3401 timeouts.
3402
3403 * normal/main.c (read_config_file): Push MENU. If this fails,
3404 print an error and wait for a user input.
3405 Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
3406 If a menu is empty or an error occurs, pop MENU.
3407 (grub_normal_execute): Pop and free MENU after grub_menu_run
3408 returns.
3409
3410 * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
3411
3412 * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
3413 include time.h.
3414 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
3415 without GRUB_UTIL.
3416 * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
3417 time.h.
3418 [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
3419 without GRUB_UTIL.
3420
3421 * include/grub/normal.h (struct grub_menu_list): New struct.
3422 (grub_menu_list_t): New type.
3423 (struct grub_context): New struct.
3424 (grub_context_t): New type.
3425 (grub_register_command): Got rid of EXPORT_FUNC.
3426 (grub_unregister_command): Likewise.
3427 (grub_context_get): New prototype.
3428 (grub_context_get_current_menu): Likewise.
3429 (grub_context_push_menu): Likewise.
3430 (grub_context_pop_menu): Likewise.
3431 [GRUB_UTIL] (grub_default_init): Likewise.
3432 [GRUB_UTIL] (grub_default_fini): Likewise.
3433 [GRUB_UTIL] (grub_timeout_init): Likewise.
3434 [GRUB_UTIL] (grub_timeout_fini): Likewise.
3435
3436 * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
3437 commands/timeout.c and normal/context.c.
3438 (pkgdata_MODULES): Added default.mod and timeout.mod.
3439 (normal_mod_SOURCES): Added normal/context.c.
3440 (default_mod_SOURCES): New variable.
3441 (default_mod_CFLAGS): Likewise.
3442 (timeout_mod_SOURCES): Likewise.
3443 (timeout_mod_CFLAGS): Likewise.
3444 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
3445 conf/i386-pc.rmk.
3446 (pkgdata_MODULES): Added default.mod and timeout.mod.
3447 (normal_mod_SOURCES): Added normal/context.c.
3448 (default_mod_SOURCES): New variable.
3449 (default_mod_CFLAGS): Likewise.
3450 (timeout_mod_SOURCES): Likewise.
3451 (timeout_mod_CFLAGS): Likewise.
3452
3453 * Makefile.in (all-local): Added $(MKFILES).
3454
4ed2e1dd 34552005-02-21 Vincent Pelletier <subdino2004@yahoo.fr>
3456
3457 * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
3458 (grub_emu_SOURCES): Likewise.
3459 (pkgdata_MODULES): Add `sun.mod'.
3460 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
3461 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3462 `partmap/sun.c'.
3463 (pkgdata_MODULES): Add `sun.mod'.
3464 (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
3465 * include/grub/partition.h (grub_sun_partition_map_init): New
3466 prototype.
3467 (grub_sun_partition_map_fini): Likewise.
3468 * partmap/sun.c: New file.
3469 * util/grub-emu.c (main): Initialize and de-initialize the sun
3470 partitionmap support.
3471
4d4e372e 34722005-02-19 Yoshinori K. Okuji <okuji@enbug.org>
3473
3474 This implements an Emacs-like menu entry editor.
3475
3476 * normal/menu_entry.c: New file.
3477
3478 * util/console.c (grub_ncurses_putchar): Translate some Unicode
3479 characters to ASCII.
3480 (saved_char): New variable.
3481 (grub_ncurses_checkkey): Rewritten completely.
3482 (grub_ncurses_getkey): Likewise.
3483 (grub_ncurses_init): Call raw instead of cbreak.
3484
3485 * normal/menu.c (print_entry): Do not put a space.
3486 (init_page): Renamed to ...
3487 (grub_menu_init_page): ... this. All callers changed.
3488 (edit_menu_entry): Removed.
3489 (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
3490
3491 * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
3492
3493 * kern/misc.c (grub_vprintf): Call grub_refresh.
3494
3495 * normal/menu.c (DISP_LEFT): Renamed to ...
3496 * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
3497 * normal/menu.c (DISP_UP): Renamed to ...
3498 * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
3499 * normal/menu.c (DISP_RIGHT): Renamed to ...
3500 * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
3501 * normal/menu.c (DISP_DOWN): Renamed to ...
3502 * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
3503 * normal/menu.c (DISP_HLINE): Renamed to ...
3504 * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
3505 * normal/menu.c (DISP_VLINE): Renamed to ...
3506 * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
3507 * normal/menu.c (DISP_UL): Renamed to ...
3508 * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
3509 * normal/menu.c (DISP_UR): Renamed to ...
3510 * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
3511 * normal/menu.c (DISP_LL): Renamed to ...
3512 * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
3513 * normal/menu.c (DISP_LR): Renamed to ...
3514 * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
3515 * normal/menu.c (TERM_WIDTH): Renamed to ...
3516 * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
3517 * normal/menu.c (TERM_HEIGHT): Renamed to ...
3518 * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
3519 * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
3520 * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
3521 * normal/menu.c (TERM_MARGIN): Renamed to ...
3522 * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
3523 * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
3524 * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
3525 * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
3526 * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
3527 * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
3528 * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
3529 * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
3530 * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
3531 * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
3532 * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
3533 * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
3534 * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
3535 * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
3536 * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
3537 * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
3538 * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
3539 * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
3540 * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
3541 * normal/menu.c (TERM_CURSOR_X): Renamed to ...
3542 * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
3543 All callers changed.
3544
3545 * include/grub/normal.h: New prototype.
3546
3547 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
3548 normal/menu_entry.c.
3549 (normal_mod_SOURCES): Likewise.
3550 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3551 (normal_mod_SOURCES): Likewise.
3552
e6b92c8a 35532005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
3554
3555 * include/grub/normal.h (grub_halt_init): New prototype.
3556 (grub_halt_fini): Likewise.
3557 (grub_reboot_init): Likewise.
3558 (grub_reboot_fini): Likewise.
3559
3560 * util/grub-emu.c: Include signal.h.
3561 (main_env): New global variable.
3562 (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
3563 catch C-c.
3564 (grub_machine_fini): New function.
3565 (main): Call grub_halt_init and grub_reboot_init before
3566 grub_main, and grub_reboot_fini and grub_halt_fini after it.
3567 Call setjmp with MAIN_ENV to go back afterwards.
3568 Call grub_machine_fini right before return.
3569
3570 * include/grub/util/misc.h: Include setjmp.h.
3571 (main_env): New prototype.
3572
3573 * include/grub/kernel.h (grub_machine_fini): New prototype.
3574 * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
3575 * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
3576
3577 * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
3578 * kern/i386/pc/init.c (grub_machine_fini): Likewise.
3579 * term/i386/pc/console.c (grub_console_fini): Likewise.
3580
3581 * util/i386/pc/misc.c: New file.
3582
3583 * conf/i386-pc.rmk (grub_emu_SOURCES): Added
3584 util/i386/pc/misc.c, commands/i386/pc/halt.c and
3585 commands/i386/pc/reboot.c.
3586
c642636f 35872005-02-14 Guillem Jover <guillem@hadrons.org>
3588
3589 * include/grub/dl.h (grub_dl_check_header): New prototype.
3590 (grub_arch_dl_check_header): Change return type to grub_err_t,
3591 remove size parameter and export function. Update all callers.
3592 * kern/dl.c (grub_dl_check_header): New function.
3593 (grub_dl_load_core): Use `grub_dl_check_header' instead of
3594 `grub_arch_dl_check_header'. Check ELF type. Check if sections
3595 are inside the core.
3596 * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
3597 independent ELF header checks.
3598 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
3599 * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
3600 `grub_dl_check_header' instead of explicit checks. Check for the
3601 ELF type.
3602 * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
3603 `grub_dl_check_header' instead of explicit checks. Remove arch
3604 specific ELF header checks.
3605
e6b92c8a 3606 * util/grub-emu.c (grub_arch_dl_check_header): Remove the
3607 argument SIZE.
3608
5eabe94b 36092005-02-13 Hollis Blanchard <hollis@penguinppc.org>
3610
3611 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
3612 * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
3613
1b14a681 36142005-02-12 Hollis Blanchard <hollis@penguinppc.org>
3615
3616 * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
3617 return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
3618 (part_map_iterate): Clear `grub_errno' and return 0 if
3619 `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
3620 * partmap/amiga.c (amiga_partition_map_iterate): Return
3621 GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
3622 * partmap/apple.c (apple_partition_map_iterate): Likewise.
3623
aca108aa 36242005-02-01 Guillem Jover <guillem@hadrons.org>
3625
3626 * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
3627 help info.
3628
c9f9c556 36292005-01-31 Marco Gerards <metgerards@student.han.nl>
3630
3631 * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
3632 Removed prototype.
3633 (grub_rescue_cmd_linux): New prototype.
3634 (grub_rescue_cmd_initrd): Likewise.
3635 * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
3636 `bi_rec'.
3637 (grub_linux_release_mem): Release the memory for the initrd.
3638 (grub_load_linux): Renamed from this...
3639 (grub_rescue_cmd_linux): ...To this. Changed all callers.
3640 Changed `entry' not to be static. Loop over memory regions to
3641 find another one when the default fails.
3642 (grub_rescue_cmd_initrd): New function.
3643 (grub_linux_init): Remove function.
3644 (grub_linux_fini): Likewise.
3645 (GRUB_MOD_INIT): Register `initrd'.
3646 (GRUB_MOD_FINI): Unregister `initrd'.
3647 * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
3648 Function removed.
3649 (grub_linux_normal_fini): Likewise.
3650 (GRUB_MOD_INIT): Register `initrd'.
3651 (GRUB_MOD_FINI): Unregister `initrd'.
3652
990cf3aa 36532005-01-31 Marco Gerards <metgerards@student.han.nl>
3654
3655 * commands/help.c: New file.
3656 * normal/arg.c (show_help): Renamed to...
3657 (grub_arg_show_help): ... this.
3658 * commands/i386/pc/halt.c: New file.
3659 * commands/i386/pc/reboot.c: Likewise.
3660 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
3661 (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
3662 (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
3663 (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
3664 variables.
3665 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3666 `commands/help.c'.
3667 (pkgdata_MODULES): Add `help.mod'.
3668 (help_mod_SOURCES, help_mod_CFLAGS): New variables.
3669 * grub/i386/pc/init.h (grub_reboot): New prototype.
3670 (grub_halt): Likewise.
3671 * include/grub/normal.h (grub_arg_show_help): New prototype.
3672 (grub_help_init): Likewise.
3673 (grub_help_fini): Likewise.
3674 * util/grub-emu.c (main): Initialize and deinitialize the help
3675 command.
3676
3677 * normal/cmdline.c (grub_cmdline_get): Doc fix.
3678
3679 * normal/command.c (grub_command_init): Fixed the description of
3680 the `set' and `unset' commands.
3681
36822005-01-31 Marco Gerards <metgerards@student.han.nl>
0f79cdc1 3683
3684 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
3685 function.
3686 * commands/ieee1275/halt.c: New file.
3687 * commands/ieee1275/reboot.c: Likewise.
3688 * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
3689 `__attribute__ ((unused))'. Some GCS related fixed.
3690 (grub_suspend_init) [GRUB_UTIL]: Function removed.
3691 (grub_suspend_fini): Likewise.
3692 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
3693 and `halt.mod'.
3694 (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
3695 (halt_mod_CFLAGS): New variables.
3696 * include/grub/powerpc/ieee1275/ieee1275.h
3697 (grub_ieee1275_interpret): New prototype.
3698
1ab09cc7 36992005-01-29 Yoshinori K. Okuji <okuji@enbug.org>
3700
3701 * include/grub/misc.h (memmove): New prototype.
3702 (memcpy): Likewise.
3703
8b8cbdb2 37042005-01-22 Hollis Blanchard <hollis@penguinppc.org>
3705
3706 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
3707 `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
3708
e3741a27 37092005-01-22 Marco Gerards <metgerards@student.han.nl>
3710
3711 * kern/misc.c (grub_strndup): Function rewritten.
3712
776bd780 37132005-01-22 Vincent Pelletier <subdino2004@yahoo.fr>
3714
3715 * normal/menu.c (TERM_WIDTH): Macro redefined.
3716 (TERM_TOP_BORDER_Y): Likewise.
3717 (draw_border): Replaced while-loop by a for-loop. Make the number
3718 of lines consistent with the number of lines displayed in
3719 print_entries. Added a margin below the rectangle.
3720 (print_entry): Make the entry fit in the rectangle.
3721 (print_entries): Display the scroll arrows next to the right
3722 border.
3723
78026bce 37242005-01-21 Marco Gerards <metgerards@student.han.nl>
3725
3726 * fs/minix.c (grub_minix_find_file): Reserve more space for
3727 `fpath' so the \0 can be stored. Use `grub_strcpy' instead of
3728 `grub_strncpy' to copy `path' into it.
3729
67bbaf0f 37302005-01-21 Marco Gerards <metgerards@student.han.nl>
3731
3732 Add the loopback device, a device via which files can be accessed
3733 as devices.
3734
3735 * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
3736 (pkgdata_MODULES): Add loopback.mod.
3737 (loopback_mod_SOURCES): New variable.
3738 (loopback_mod_CFLAGS): Likewise.
3739 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
3740 `disk/loopback.c'.
3741 (pkgdata_MODULES): Add loopback.mod.
3742 (loopback_mod_SOURCES): New variable.
3743 (loopback_mod_CFLAGS): Likewise.
3744 * disk/loopback.c: new file.
3745 * include/grub/normal.h (grub_loop_init): New prototype.
3746 (grub_loop_fini): New prototype.
3747 * util/grub-emu.c (main): Initialize and de-initialize loopback
3748 support.
3749 * include/grub/disk.h (grub_disk_dev_id): Add
3750 `GRUB_DISK_DEVICE_LOOPBACK_ID'.
3751
6f1c18bd 37522005-01-20 Hollis Blanchard <hollis@penguinppc.org>
3753
3754 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
3755 function.
3756 * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
3757 (suspend_mod_SOURCES): New variable.
3758 (suspend_mod_CFLAGS): Likewise.
3759 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
3760 New prototype.
3761 * commands/ieee1275/suspend.c: New file.
3762
b38551da 37632005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
3764
3765 * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
3766 ((unused))' to `__attribute__ ((used))'.
3767 (GRUB_MOD_FINI): Likewise.
3768 * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
3769 * genmk.rb (PModule): Assign space to common symbols when linking
3770 modules.
3771
777aff39 37722005-01-20 Marco Gerards <metgerards@student.han.nl>
3773
3774 * include/grub/mm.h (grub_mm_init_region): Change the type of the
3775 `unsigned' arguments to `grub_size_t'.
3776 (grub_malloc): Likewise.
3777 (grub_realloc): Likewise.
3778 (grub_memalign): Likewise.
3779 * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
3780 * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
3781 * util/misc.c (grub_malloc): Likewise.
3782 (grub_realloc): Likewise.
3783 * kern/mm.c (get_header_from_pointer): Change the casts to
3784 `unsigned' into a cast to `grub_size_t'.
3785
3786 * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
3787 point to `currnode' when `currnode' is changed.
3788
3789 * util/grub-emu.c (main): Initialize `progname'. Reported by Nico
3790 Schottelius <nico-linux@schottelius.org>.
3791
d0ff18e1 37922005-01-09 Hollis Blanchard <hollis@penguinppc.org>
3793
3794 * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
3795 (note_path): Remove variable.
3796 (GRUB_IEEE1275_NOTE_NAME): New macro.
3797 (GRUB_IEEE1275_NOTE_TYPE): Likewise.
3798 (grub_ieee1275_note_hdr): New structure.
3799 (grub_ieee1275_note_desc): Likewise.
3800 (grub_ieee1275_note): Likewise.
3801 (load_note): Remove `dir' argument. All callers updated. Remove
3802 `note_img' and `path'. Do not load a file from `note_path'.
3803 Initialize a struct grub_ieee1275_note and write that to `out'.
3804 Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
3805
4ca7004c 38062005-01-05 Marco Gerards <metgerards@student.han.nl>
3807
3808 * util/misc.c (grub_util_read_image): Revert last change. It
3809 called `grub_util_read_at', which seeks from the beginning of the
3810 file.
3811
0b412211 38122005-01-04 Hollis Blanchard <hollis@penguinppc.org>
3813
3814 * TODO: Add note about endianness in grub-mkimage.
3815 * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
3816 section.
3817 * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
3818 (grub_mkimage_SOURCES): New target.
3819 * include/grub/kernel.h (grub_start_addr): Remove variable.
3820 (grub_end_addr): Likewise.
3821 (grub_total_module_size): Likewise.
3822 (grub_kernel_image_size): Likewise.
3823 (GRUB_MODULE_MAGIC): New constant.
3824 (grub_module_info): New structure.
3825 (grub_arch_modules_addr): New prototype.
3826 (grub_get_end_addr): Remove prototype.
3827 * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
3828 * include/grub/powerpc/ieee1275/kernel.h: New file.
3829 * include/grub/util/misc.h (grub_util_get_fp_size): New
3830 prototype.
3831 (grub_util_read_at): Likewise.
3832 (grub_util_write_image_at): Likewise.
3833 * kern/main.c (grub_get_end_addr): Remove function.
3834 (grub_load_modules): Call grub_arch_modules_addr instead of using
3835 grub_end_addr. Look for a grub_module_info struct in memory. Use
3836 the grub_module_info fields instead of calling grub_get_end_addr
3837 as loop conditions. Move grub_add_unused_region code here.
3838 (grub_add_unused_region): Remove function.
3839 * kern/i386/pc/init.c: Include grub/cache.h.
3840 (grub_machine_init): Remove call to grub_get_end_addr. Remove
3841 one call to add_mem_region.
3842 (grub_arch_modules_addr): New function.
3843 * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
3844 (grub_total_module_size): Likewise.
3845 Include grub/machine/kernel.h.
3846 (grub_arch_modules_addr): New function.
3847 * util/grub-emu.c (grub_end_addr): Remove variable.
3848 (grub_total_module_size): Likewise.
3849 (grub_arch_modules_addr): New function.
3850 * util/misc.c: Include unistd.h.
3851 (grub_util_get_fp_size): New function.
3852 (grub_util_read_at): Likewise.
3853 (grub_util_write_image_at): Likewise.
3854 (grub_util_read_image): Call grub_util_read_at.
3855 (grub_util_write_image): Call grub_util_write_image_at.
3856 * util/i386/pc/grub-mkimage.c (generate_image): Allocate
3857 additional memory in kernel_img for a struct grub_module_info.
3858 Fill in that grub_module_info.
3859 * util/powerpc/ieee1275/grub-mkimage.c: New file.
3860
458786f8 38612005-01-03 Hollis Blanchard <hollis@penguinppc.org>
3862
3863 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
3864 New function.
3865 * include/grub/powerpc/ieee1275/ieee1275.h
3866 (grub_ieee1275_milliseconds): New prototype.
3867 * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
3868 Change to 1000.
3869 * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
3870 grub_ieee1275_milliseconds.
3871
ac507d1b 38722005-01-03 Hollis Blanchard <hollis@penguinppc.org>
3873
3874 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
3875 variable.
3876 (find_options): New function.
3877 (cmain): Call find_options.
3878 * include/grub/powerpc/ieee1275/ieee1275.h
3879 (grub_ieee1275_realmode): New extern variable.
3880 * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
3881 grub_map if grub_ieee1275_realmode is false.
3882
6b8fd1c4 38832004-12-29 Marco Gerards <metgerards@student.han.nl>
3884
3885 * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
3886 lines are inserted and make it work like readline. Reported by
3887 Vincent Pelletier <subdino2004@yahoo.fr>.
3888
8514a1e0 38892004-12-28 Marco Gerards <metgerards@student.han.nl>
3890
3891 * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
3892
3893 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
3894 `kern/powerpc/cache.S'.
3895
924b6140 38962004-12-27 Marco Gerards <metgerards@student.han.nl>
3897
3898 * genmk.rb: Handle the `Program' class in the main loop. Written
3899 by Johan Rydberg <jrydberg@gnu.org>.
3900 (Program): New class.
3901 (programs): New variable.
3902 * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
3903 instead of "grub/machine/ieee1275.h". Include <grub/kernel.h>
3904 instead of "grub/kernel.h". Include <grub/machine/init.h>.
3905 (help_arch): Function removed.
3906 * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
3907 `powerpc/libgcc.h' and `loader.h'.
3908 (pkgdata_PROGRAMS): New variable.
3909 (sbin_UTILITIES): Variable removed.
3910 (grub_emu_SOURCES): Added kern/powerpc/cache.S.
3911 (grubof_SOURCES): Variable re-defined so it only includes the
3912 core functionality.
3913 (grubof_CFLAGS): Remove `-DGRUBOF'.
3914 (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
3915 (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
3916 (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
3917 (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
3918 (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
3919 (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
3920 (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
3921 (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
3922 (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
3923 (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
3924 (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
3925 (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
3926 (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
3927 (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
3928 (pc_mod_CFLAGS): New variables.
3929 * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
3930 (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
3931 * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
3932 * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
3933 Moved from here...
3934 * include/grub/i386/pc/init.h (grub_os_area_addr)
3935 (rub_os_area_size): ... to here.
3936 * include/grub/powerpc/ieee1275/ieee1275.h
3937 (grub_ieee1275_entry_fn): Export symbol.
3938 * include/grub/powerpc/ieee1275/init.h: New file.
3939 * include/grub/powerpc/libgcc.h: Likewise.
3940 * include/grub/cache.h: Likewise.
3941 * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard
3942 <hollis@penguinppc.org>.
3943 * kern/dl.c: Include <grub/cache.h>.
3944 (grub_dl_flush_cache): New function.
3945 (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
3946 for this module.
3947 * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
3948 (grub_console_init): Removed prototypes.
3949 (grub_machine_init): Don't initialize the modules anymore.
3950 * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
3951 static.
3952 * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
3953 Macro undef removed.
3954 (GRUB_HOST_WORDS_BIGENDIAN): New macro.
3955 * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
3956 relocation `R_PPC_REL32'. Return an error when the relocation is
3957 unknown.
3958 * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
3959 * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
3960 * util/misc.c (grub_arch_sync_caches): Likewise.
3961
e4b47e0c 39622004-12-19 Marco Gerards <metgerards@student.han.nl>
3963
3964 * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
3965 `symlist.c', add `grubof_symlist.c'.
3966 (symlist.c): Variable removed.
3967 (grubof_HEADERS): Variable added.
3968 (grubof_symlist.c): New target.
3969 (kernel_syms.lst): Use `grubof_HEADERS' instead of
3970 `kernel_img_HEADERS'.
3971 (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
3972 * kern/powerpc/dl.c: New file.
3973 * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
3974 Function removed.
3975 (grub_arch_dl_relocate_symbols): Likewise.
3976 (grub_register_exported_symbols): Likewise.
3977
4ceb3636 39782004-12-13 Marco Gerards <metgerards@student.han.nl>
3979
3980 * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
3981 (grub_ext2_dir): Likewise. Don't return in case of an error, jump
3982 to fail instead. Reported by Vincent Pelletier
3983 <subdino2004@yahoo.fr>.
3984
3985 * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
3986 it is not allocated. Reported by Vincent Pelletier
3987 <subdino2004@yahoo.fr>.
3988
3989 * normal/cmdline.c (grub_tab_complete): Add a blank line to the
3990 output so the output looks better.
3991
3f1578fe 39922004-12-04 Marco Gerards <metgerards@student.han.nl>
3993
3994 Modulize the partition map support and add support for the amiga
3995 partition map.
3996
3997 * commands/ls.c: Include <grub/partition.h> instead of
3998 <grub/machine/partition.h>.
3999 * kern/disk.c: Likewise.
4000 * kern/rescue.c: Likewise.
4001 * loader/i386/pc/chainloader.c: Likewise.
4002 * normal/cmdline.c: Likewise.
4003 * kern/powerpc/ieee1275/init.c: Likewise.
4004 (grub_machine_init): Call `grub_pc_partition_map_init',
4005 `grub_amiga_partition_map_init' and
4006 `grub_apple_partition_map_init'.
4007 * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
4008 `disk/i386/pc/partition.c'. Add `kern/partition.c'.
4009 (kernel_img_HEADERS): Remove `machine/partition.h'. Add
4010 `partition.h' and `pc_partition.h'.
4011 (grub_setup_SOURCES): Remove
4012 `disk/i386/pc/partition.c'. Add `kern/partition.c',
4013 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
4014 (grub_emu_SOURCES): Likewise.
4015 (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
4016 (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
4017 (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
4018 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
4019 `disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
4020 `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
4021 (grubof_SOURCES): Likewise.
4022 * disk/i386/pc/partition.c: File removed.
4023 * disk/powerpc/ieee1275/partition.c: Likewise.
4024 * include/grub/powerpc/ieee1275/partition.h: Likewise.
4025 * include/grub/i386/pc/partition.h: Likewise.
4026 * kern/partition.c: New file.
4027 * partmap/amiga.c: Likewise.
4028 * partmap/apple.c: Likewise.
4029 * partmap/pc.c: Likewise.
4030 * include/grub/partition.h: Likewise..
4031 * include/grub/pc_partition.h: Likewise.
4032 * util/grub-emu.c: Include <grub/partition.h> instead of
4033 <grub/machine/partition.h>.
4034 (main): Call `grub_pc_partition_map_init',
4035 `grub_amiga_partition_map_init' and
4036 `grub_apple_partition_map_init' and deinitialize afterwards.
4037 * util/i386/pc/biosdisk.c: Include `#include
4038 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
4039 `<grub/machine/partition.h>'.
4040 * util/i386/pc/grub-setup.c: Likewise.
4041 * util/i386/pc/biosdisk.c: Likewise.
4042 (grub_util_biosdisk_get_grub_dev): Only access the PC specific
4043 partition information in case of a PC partition.
4044 * util/i386/pc/grub-setup.c: Include `#include
4045 <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
4046 `<grub/machine/partition.h>'.
4047 (setup): Only access the PC specific partition information in case
4048 of a PC partition.
4049
0ef4ced9 40502004-11-17 Hollis Blanchard <hollis@penguinppc.org>
4051
4052 * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
4053 (grub_longjmp): Likewise.
4054 * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
4055 20.
4056 * normal/powerpc/setjmp.S: New file.
4057 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
4058 `normal/powerpc/setjmp.S'.
4059 (grubof_CFLAGS): Add `-DGRUBOF'.
4060 * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
4061 [GRUB_UTIL && !GRUBOF].
4062
19950e29 40632004-11-16 Marco Gerards <metgerards@student.han.nl>
4064
4065 * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
4066 property named `name'. Correctly handle the error returned by
4067 `grub_ieee1275_finddevice' if a device can not be opened.
4068
a2fea427 40692004-11-02 Hollis Blanchard <hollis@penguinppc.org>
4070
4071 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
4072 `actual' for negativity.
4073 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
4074 kern/fshelp.c.
4075
41ea0ea3 40762004-11-01 Marco Gerards <metgerards@student.han.nl>
4077
4078 * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
4079 (PAGE_OFFSET): New macro.
4080 (CRTC_ADDR_PORT): Likewise.
4081 (CRTC_DATA_PORT): Likewise.
4082 (START_ADDR_HIGH_REGISTER): Likewise.
4083 (START_ADDR_LOW_REGISTER): Likewise.
4084 (GRAPHICS_ADDR_PORT): Likewise.
4085 (GRAPHICS_DATA_PORT): Likewise.
4086 (READ_MAP_REGISTER): Likewise.
4087 (INPUT_STATUS1_REGISTER): Likewise.
4088 (INPUT_STATUS1_VERTR_BIT): Likewise.
4089 (page): New variable.
4090 (wait_vretrace): New function.
4091 (set_read_map): Likewise.
4092 (set_start_address): Likewise.
4093 (grub_vga_init): Use mode 0x10 instead of mode 0x12. Switch to
4094 the right page.
4095 (check_vga_mem): Take the page into account.
4096 (write_char): Likewise.
4097 (write_cursor): Likewise.
4098 (scroll_up): Likewise. Copy the page to the page that is not
4099 shown and switch between both pages.
4100 (grub_vga_putchar): Fix off by one error.
4101 (grub_vga_cls): Wait for the vertical retrace. Take the page into
4102 account.
4103
ad0bd20b 41042004-11-01 Marco Gerards <metgerards@student.han.nl>
4105
4106 Add support for iso9660 (including rockridge).
4107
4108 * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
4109 (iso9660_mod_SOURCES): New variable.
4110 (iso9660_mod_CFLAGS): Likewise.
4111 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
4112 * include/grub/fs.h (grub_iso9660_init): New prototype.
4113 * util/grub-emu.c (main): Call `grub_iso9660_init'.
4114 * fs/iso9660.c: New file.
4115
4116 * include/grub/misc.h (grub_strncat): New prototype.
4117 * kern/misc.c (grub_strncat): New function.
4118
4119 * fs/hfs.c (grub_hfs_mount): Translate the error
4120 `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
4121 * fs/jfs.c (grub_jfs_mount): Likewise.
4122 * fs/ufs.c (grub_ufs_mount): Likewise.
4123
a5477a59 41242004-10-28 Hollis Blanchard <hollis@penguinppc.org>
4125
4126 * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
4127 which initialized BAT registers.
4128 * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
4129 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
4130 Move from here...
4131 * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
4132 grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
4133 ... to here.
4134 * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
4135 (grub_mapclaim): Likewise.
4136 * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
4137 grub_mapclaim instead of grub_ieee1275_claim. Assign linux_addr by
4138 hand.
4139
9304c1f8 41402004-10-19 Hollis Blanchard <hollis@penguinppc.org>
4141
4142 * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
4143 (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
4144 -ffreestanding and -msoft-float.
4145
86f4ae25 41462004-10-15 Hollis Blanchard <hollis@penguinppc.org>
4147
4148 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
4149 append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
4150 set in grub_ieee1275_flags.
4151
38912228 41522004-10-14 Hollis Blanchard <hollis@penguinppc.org>
4153
4154 * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
4155 prototype.
4156 * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
4157 grub_console_init first.
4158 Change the memory range used for grub_ieee1275_claim and
4159 grub_mm_init_region.
4160 Print an error message if the claim fails.
4161 Include <grub/misc.h>.
4162
d1923dc8 41632004-10-13 Hollis Blanchard <hollis@penguinppc.org>
4164
4165 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
4166 Call grub_children_iterate for device nodes of type `scsi',
4167 `ide', or `ata'.
4168 (grub_ofdisk_open): Remove manual device alias resolution.
4169 Fix memory leak when device cannot be opened.
4170 * include/grub/powerpc/ieee1275/ieee1275.h
4171 (grub_children_iterate): New prototype.
4172 * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
4173 New function.
4174 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
4175 Return -1 if args.size was -1.
4176
4512e4f3 41772004-10-11 Hollis Blanchard <hollis@penguinppc.org>
4178
4179 * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
4180 (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
4181 World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
4182 Open Firmware's memory for it; claim memory from _start to _end.
4183 * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
4184 (_end): New extern.
4185 (_start): Zero BSS from __bss_start to _end.
4186 * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
4187 New extern.
4188 (GRUB_IEEE1275_NO_PARTITION_0): New #define.
4189
4d61feb0 41902004-10-11 Hollis Blanchard <hollis@penguinppc.org>
4191
ad0bd20b 4192 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
4193 -1 if args.base was -1.
4d61feb0 4194
026fa2f9 41952004-10-08 Hollis Blanchard <hollis@penguinppc.org>
4196
4197 * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
4198 escape sequence instead of a literal ^L. Also call
4199 grub_ofconsole_gotoxy.
4200
9f2220ef 42012004-10-03 Hollis Blanchard <hollis@penguinppc.org>
4202
4203 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
4204 void * arguments to grub_addr_t. All callers updated. Also make
4205 the `result' argument optional.
4206 (grub_ieee1275_release): change void * arguments to grub_addr_t.
4207 All callers updated.
4208
8a572cd7 42092004-09-22 Hollis Blanchard <hollis@penguinppc.org>
4210
4211 * commands/ls.c (grub_ls_list_files): Use the string following the
4212 initial ')', if present, as the filesystem path.
4213 * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
4214
4215 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
4216
18aa81f2 42172004-09-18 Yoshinori K. Okuji <okuji@enbug.org>
4218
4219 Make the source code of the menu interface more readable.
4220
4221 * normal/menu.c: Include grub/mm.h.
4222 (TERM_WIDTH): New macro.
4223 (TERM_HEIGHT): Likewise.
4224 (TERM_INFO_HEIGHT): Likewise.
4225 (TERM_MARGIN): Likewise.
4226 (TERM_SCROLL_WIDTH): Likewise.
4227 (TERM_TOP_BORDER_Y): Likewise.
4228 (TERM_LEFT_BORDER_X): Likewise.
4229 (TERM_BORDER_WIDTH): Likewise.
4230 (TERM_MESSAGE_HEIGHT): Likewise.
4231 (TERM_BORDER_HEIGHT): Likewise.
4232 (TERM_NUM_ENTRIES): Likewise.
4233 (TERM_FIRST_ENTRY_Y): Likewise.
4234 (TERM_ENTRY_WIDTH): Likewise.
4235 (TERM_CURSOR_X): Likewise.
4236 (draw_border): Use macros instead of magic numbers.
4237 (print_entry): Likewise.
4238 (print_entries): Likewise.
4239 (run_menu): Likewise. Also, handle the key 'e'.
4240 (run_menu_entry): Ignore empty command lines.
4241 (print_message): Added a new argument EDIT. If EDIT is true,
4242 print a different message.
4243 (init_page): Likewise.
4244 (edit_menu_entry): New function. Not implemented yet.
4245
b47efe30 42462004-09-17 Marco Gerards <metgerards@student.han.nl>
4247
4248 Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
4249 can be loaded from normal mode.
4250
4251 * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
4252 `multiboot.mod'.
4253 (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
4254 (multiboot_mod_CFLAGS): New variables.
4255 * loader/i386/pc/linux_normal.c: New file.
4256 * loader/i386/pc/multiboot_normal.c: Likewise.
4257
4258 * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
4259 attribute `unused'.
4260
4261 * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type. Use
4262 `fdiro' to read the mode information from instead of `diro'.
4263
4264 * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
4265 looking up a symlink.
4266
4267 * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
4268 macro.
4269 * normal/command.c (grub_command_execute): Don't parse the
4270 arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
4271 flags of the command.
4272
4273 * normal/menu.c (grub_menu_run): Fix typo.
4274
da75ac71 42752004-09-14 Hollis Blanchard <hollis@penguinppc.org>
4276
4277 * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
4278
4279 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
4280 `y + 1' instead of `y - 1'.
4281
4282 * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
4283
062b24c2 42842004-09-14 Yoshinori K. Okuji <okuji@enbug.org>
4285
4286 From Hollis Blanchard <hollis@penguinppc.org>:
4287 * kern/misc.c (memmove): New alias for grub_memmove.
4288 (memcmp): New alias for grub_memcmp.
4289 (memset): New alias for grub_memset.
4290 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
4291 Change "int handle" to "grub_ieee1275_phandle_t handle".
4292 * include/grub/powerpc/ieee1275/ieee1275.h
4293 (grub_ieee1275_get_property): Likewise.
4294
8ddad845 42952004-09-12 Tomas Ebenlendr <ebik@ucw.cz>
4296
4297 Added normal mode command `chainloader' as module chain.mod, which
4298 depends on normal.mod and _chain.mod.
4299
4300 * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
4301 (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
4302 * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
4303 Deleted prototype.
4304 * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
4305 but arguments parsing moved to ...
4306 (grub_chainloader_cmd): ... here. New function.
4307 * include/grub/i386/pc/chainloader.h: New file.
4308 * loader/i386/pc/chainloader_normal.c: Likewise.
4309
2c1f4ce3 43102004-09-11 Marco Gerards <metgerards@student.han.nl>
4311
4312 * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
4313 (grub_mkimage_LDFLAGS): Likewise.
4314 (grub_emu_SOURCES): Likewise.
4315 (kernel_img_HEADERS): Added fshelp.h.
4316 * fs/ext2.c: Include <grub/fshelp.h>.
4317 (FILETYPE_REG): New macro.
4318 (FILETYPE_INO_REG): Likewise.
4319 (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
4320 Changed all users.
4321 (ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
4322 all users.
4323 (grub_fshelp_node): New struct.
4324 (grub_ext2_data): Added member `diropen'. Changed member `inode'
4325 to a pointer.
4326 (grub_ext2_get_file_block): Removed function.
4327 (grub_ext2_read_block): New function.
4328 (grub_ext2_read_file): Replaced parameter `data' by `node'.
4329 This function was written.
4330 (grub_ext2_mount): Read the root inode. Create a diropen struct.
4331 (grub_ext2_find_file): Removed function.
4332 (grub_ext2_read_symlink): New function.
4333 (grub_ext2_iterate_dir): Likewise.
4334 (grub_ext2_open): Rewritten.
4335 (grub_ext2_dir): Rewritten.
4336 * include/grub/fshelp.h: New file.
4337 * fs/fshelp.c: Likewise.
4338
3c52136a 43392004-09-10 Yoshinori K. Okuji <okuji@enbug.org>
4340
4341 * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
4342 (print_message): Add a missing newline.
4343 (run_menu): Added timeout support.
4344 (run_menu_entry): New local function.
4345 (grub_menu_run): Added support for booting.
4346
4347 * kern/loader.c (grub_loader_is_loaded): New function.
4348
4349 * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
4350 (grub_get_rtc): Exported.
4351
4352 * include/grub/i386/pc/time.h: Include grub/symbol.h.
4353 (grub_get_rtc): Exported.
4354
4355 * include/grub/normal.h (struct grub_command_list): Remove
4356 constant from the member `command'.
4357
4358 * include/grub/loader.h (grub_loader_is_loaded): Declared.
4359
4360 * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
4361
4362 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
4363
aa033560 43642004-08-28 Marco Gerards <metgerards@student.han.nl>
4365
4366 Add support for the JFS filesystem.
4367
4368 * fs/jfs.c: New file.
4369 * include/grub/fs.h (grub_jfs_init): New prototype.
4370 (grub_jfs_fini): New prototype.
4371 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
4372 (grub_emu_SOURCES): Likewise.
4373 (pkgdata_MODULES): Add jfs.mod.
4374 (jfs_mod_SOURCES): New variable.
4375 (jfs_mod_CFLAGS): Likewise.
4376 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
4377 (grubof_SOURCES): Likewise.
4378 * util/grub-emu.c (main): Initialize and deinitialize JFS support.
4379
4380 * fs/fat.c (grub_fat_find_dir): Convert the filename little
4381 endian to the host endian.
4382 (grub_fat_utf16_to_utf8): Move function from there...
4383 * kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
4384 the endianess of the source string anymore.
4385 * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
4386
94bc45af 43872004-08-24 Marco Gerards <metgerards@student.han.nl>
4388
4389 * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
4390 (grub_boot_fini) [GRUB_UTIL]: Likewise.
4391 (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
4392 (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
4393
4394 * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
4395 (grub_hfs_iterate_dir): Make the function static. Add prototypes
4396 for `node_found' and `it_dir'.
4397 (grub_hfs_dir): Add prototype for `dir_hook'.
4398
4399 * fs/minix.c (grub_minix_get_file_block): Add prototype for
4400 `grub_get_indir'. Rename `indir' in two blocks to `indir16'
4401 and `indir32' to silence a gcc warning.
4402
4403 * include/grub/fs.h (grub_hfs_init): New prototype.
4404 (grub_hfs_fini): Likewise.
4405
4406
97543f08 44072004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
4408
4409 Each disk device has its own id now. This is useful to make use
4410 of multiple disk devices.
4411
4412 * include/grub/disk.h (grub_disk_dev_id): New enum.
4413 (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
4414 (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
4415
4416 * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
4417 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
4418
4419 * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
4420 GRUB_DISK_DEVICE_OFDISK_ID as an id.
4421
4422 * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
4423 GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
4424
4425 * include/grub/disk.h (struct grub_disk_dev): Added a new member
4426 "id" which is used by the cache manager.
4427
4428 * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
4429 of just "GRUB".
4430
64372eb4 44312004-08-18 Marco Gerards <metgerards@student.han.nl>
4432
4433 * fs/hfs.c: New file.
4434 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
4435 (grub_emu_SOURCES): Likewise.
4436 (pkgdata_MODULES): Add hfs.mod.
4437 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
4438 (grubof_SOURCES): Likewise.
4439 * util/grub-emu.c (main): Initialize and deinitialize HFS support.
4440
4441 * include/grub/misc.h (grub_strncasecmp): Add prototype.
4442 * kern/misc.c (grub_strncasecmp): Add function.
4443
cc61b58f 44442004-08-14 Marco Gerards <metgerards@student.han.nl>
4445
4446 * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
4447 with parentheses.
4448
4449 * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
4450 (grub_ext2_dir): In case the directory entry type is unknown, read
4451 it from the inode.
4452
0ef123f6 44532004-08-02 Peter Bruin <pjbruin@dds.nl>
4454
4455 * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
4456 grub_load_linux instead of grub_rescue_cmd_linux as second
4457 argument of grub_rescue_register_command.
4458
4459 * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
4460
a447c5df 44612004-07-27 Marco Gerards <metgerards@student.han.nl>
4462
4463 * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
4464 function.
4465 * commands/boot.c: Remove the check for `GRUB_UTIL'.
4466 * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
4467 `loader/powerpc/ieee1275/linux.c',
4468 `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
4469 * include/grub/powerpc/ieee1275/ieee1275.h
4470 (grub_ieee1275_release): New prototype.
4471 * include/grub/powerpc/ieee1275/loader.h: Rewritten.
4472 * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
4473 normal, boot, linux and linux_normal.
4474 * loader/powerpc/ieee1275/linux.c: New file.
4475 * loader/powerpc/ieee1275/linux_normal.c: Likewise.
4476
5a9e3546 44772004-07-12 Marco Gerards <metgerards@student.han.nl>
4478
4479 * normal/arg.c (grub_arg_parse): Correct error handling after
4480 reallocating the argumentlist (check if `argl' is not null instead
4481 of checking if `args' is not null).
4482 * kern/mm.c (grub_realloc): Return the same pointer when using the
4483 same region, instead of returning the header address.
4484
e15199cb 44852004-07-11 Marco Gerards <metgerards@student.han.nl>
4486
4487 * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
4488 one block instead of two when looking for the initial partition.
4489 (grub_partition_probe): Initialize the local variable `p' with 0.
4490 Use base 10 for the grub_strtoul call.
4491 * kern/misc.c (grub_strncpy): Fix off by one bug. Eliminated the
4492 need for one local variable.
4493 (grub_strtoul): Don't add the new value to `num', instead of that
4494 just assign it.
4495
020616c2 44962004-07-11 Marco Gerards <metgerards@student.han.nl>
4497
4498 * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
4499 (pxeboot_img_SOURCES): New variable.
4500 (pxeboot_img_ASFLAGS): Likewise.
4501 (pxeboot_img_LDFLAGS): Likewise.
4502 * boot/i386/pc/pxeboot.S: New file. Based on pxeloader.S from
4503 GRUB Legacy and boot.S. Adopted for GRUB 2 by lode leroy
4504 <lode_leroy@hotmail.com>.
4505
6c51eb64 45062004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
4507
4508 * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
4509 there was no input.
4510
cfb12aff 45112004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
4512
4513 * normal/cmdline.c (grub_set_history): Fix off by one bug. Fixed
4514 the history buffer logic.
4515
6eabba74 45162004-06-27 Tomas Ebenlendr <ebik@ucw.cz>
4517
4518 * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
4519 (FILETYPE_INO_SYMLINK): New macros.
4520 (grub_ext2_find_file): Check if the node is a directory using the
4521 inode stat information instead of using the filetype in the
4522 dirent. Exclude the first character of an absolute symlink.
4523 (grub_ext2_dir): Mask out the filetype part of the mode member of
4524 the inode.
4525
66e19ef8 45262004-05-24 Marco Gerards <metgerards@student.han.nl>
4527
4528 Add support for UFS version 1 and 2. Add support for the minix
4529 filesystem version 1 and 2, both the variants with 14 and 30 long
4530 filenames.
4531
4532 * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
4533 fs/minix.c.
4534 (grub_emu_SOURCES): Likewise.
4535 (pkgdata_MODULES): Add ufs.mod and minix.mod.
4536 (ufs_mod_SOURCES): New variable.
4537 (ufs_mod_CFLAGS): Likewise.
4538 (minix_mod_SOURCES): Likewise.
4539 (minix_mod_CFLAGS): Likewise.
4540 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
4541 fs/minix.c.
4542 (grubof_SOURCES): Likewise.
4543 * fs/ufs.c: New file.
4544 * fs/minix.c: New file.
4545 * include/grub/fs.h (grub_ufs_init): New prototype.
4546 (grub_ufs_fini): Likewise.
4547 (grub_minix_init): Likewise.
4548 (grub_minix_fini): Likewise.
4549 * util/grub-emu.c (main): Initialize and deinitialize UFS and
4550 minix fs.
4551
cc2e748a 45522004-04-30 Jeroen Dekkers <jeroen@dekkers.cx>
4553
4554 * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
4555 commands/ls.c, commands/terminal.c, commands/boot.c,
4556 commands/cmp.c and commands/cat.c.
4557 (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
4558
4559 * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
4560 "env.h"
4561
4b13b216 45622004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
4563
4564 All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
4565 and grub_, respectively. Because the conversion is trivial and
4566 mechanical, I omit the details here. Please refer to the CVS
4567 if you need more information.
4568
6a142551 45692004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
4570
4571 * include/pupa: Renamed to ...
4572 * include/grub: ... this.
4573 * util/i386/pc/pupa-mkimage.c: Renamed to ...
4574 * util/i386/pc/grub-mkimage.c: ... this.
4575 * util/i386/pc/pupa-setup.c: Renamed to ...
4576 * util/i386/pc/grub-setup.c: ... this.
4577 * util/pupa-emu.c: Renamed to ...
4578 * util/grub-emu.c: ... this.
4579
e56cdf21 45802004-03-29 Marco Gerards <metgerards@student.han.nl>
4581
4582 Add support for the newworld apple macintosh (PPC). This has been
4583 tested on the powerbook 2000 only. It only adds support for
4584 generic ieee1275 functions, console and disk support. This should
4585 be easy to port to other architectures with support for Open
4586 Firmware.
4587
4588 * configure.ac: Accept the powerpc as host_cpu. In the case of
4589 the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
4590 specific tests are only executed while building for the i386.
4591 Inverse test for crosscompile.
4592 * genmk.rb (Utility): Allow assembler files.
4593 * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
4594 * conf/powerpc-ieee1275.rmk: New file.
4595 * disk/powerpc/ieee1275/ofdisk.c: Likewise.
4596 * disk/powerpc/ieee1275/partition.c: Likewise.
4597 * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
4598 * include/pupa/powerpc/ieee1275/console.h: Likewise.
4599 * include/pupa/powerpc/ieee1275/partition.h: Likewise.
4600 * include/pupa/powerpc/ieee1275/time.h: Likewise.
4601 * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
4602 * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
4603 * include/pupa/powerpc/ieee1275/loader.h
4604 * include/pupa/powerpc/setjmp.h: Likewise.
4605 * include/pupa/powerpc/types.h: Likewise.
4606 * kern/powerpc/ieee1275/init.c: Likewise.
4607 * kern/powerpc/ieee1275/openfw.c: Likewise.
4608 * term/powerpc/ieee1275/ofconsole.c: Likewise.
4609
4610 These files were written by Johan Rydberg
4611 (jrydberg@night.trouble.net) and I only modified them slightly.
4612
4613 * boot/powerpc/ieee1275/cmain.c: New file.
4614 * boot/powerpc/ieee1275/crt0.S: Likewise.
4615 * boot/powerpc/ieee1275/ieee1275.c: Likewise.
4616 * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
4617
8c8cc205 46182004-03-14 Jeroen Dekkers <jeroen@dekkers.cx>
4619
4620 * Makefile.in: Update copyright.
4621 * genmodsrc.sh: Likewise.
4622 * gensymlist.sh: Likewise.
4623 * term/i386/pc/vga.c: Indent correctly.
4624
4625 * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
4626 bugreporting address.
4627 * util/i386/pc/pupa-setup.c (usage): Likewise,
4628 (main): Call pupa_ext2_init and pupa_ext2_fini.
4629
4630 * fs/fat.c (log2): Renamed to ...
4631 (fat_log2): ... this.
4632 All callers changed.
4633 * kern/misc.c (memcpy): Alias to pupa_memmove.
4634 * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
4635 lvalue cast.
4636 * util/console.c (pupa_ncurses_fini): Return 0.
4637
4638 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
4639 Move fail label here.
4640 [__GNU__]: Don't warn when using stat.
4641 (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
4642 (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
4643 long int. Use strtol instead of strtoul.
4644
db1771cf 46452004-03-14 Marco Gerards <metgerards@student.han.nl>
4646
4647 * commands/boot.c: New file.
4648 * commands/cat.c: Likewise.
4649 * commands/cmp.c: Likewise.
4650 * commands/ls.c: Likewise.
4651 * commands/terminal.c: Likewise.
4652 * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
4653 (pupa_register_command): Changed interface to match the new
4654 argument parser.
4655 (pupa_command_execute): Changed (almost rewritten) so it uses
4656 pupa_split_command. Added support for setting variables using the
4657 syntax `foo=bar'.
4658 (rescue_command): Changed to work with the new argument parser.
4659 (terminal_command): Moved from here to commands/terminal.c.
4660 (set_command): New function.
4661 (unset_command): New function.
4662 (insmod_command): New function.
4663 (rmmod_command): New function.
4664 (lsmod_command): New function.
4665 (pupa_command_init): Don't initialize the command terminal
4666 anymore. Initialize the commands set, unset, insmod, rmmod and
4667 lsmod.
4668 * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
4669 (kernel_img_HEADERS): Add arg.h and env.h.
4670 (pupa_mkimage_LDFLAGS): Add kern/env.c.
4671 (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
4672 commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
4673 normal/arg.c.
4674 (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
4675 terminal.mod.
4676 (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
4677 (boot_mod_SOURCES): New variable.
4678 (terminal_mod_SOURCES): Likewise.
4679 (ls_mod_SOURCES): Likewise.
4680 (cmp_mod_SOURCES): Likewise.
4681 (cat_mod_SOURCES): Likewise.
4682
4683 * normal/arg.c: New file.
4684 * kern/env.c: Likewise.
4685 * include/pupa/arg.h: Likewise.
4686 * include/pupa/env.h: Likewise.
4687 * font/manager.c (font_command): Changed to match argument parsing
4688 interface changes.
4689 (PUPA_MOD_INIT): Likewise.
4690 * hello/hello.c (pupa_cmd_hello): Likewise.
4691 (PUPA_MOD_INIT): Likewise.
4692 * include/pupa/disk.h: Include <pupa/device.h>.
4693 (pupa_print_partinfo): New prototype.
4694 * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
4695 (pupa_dl_get_prefix): Likewise.
4696 * include/pupa/misc.h: Include <pupa/err.h>.
4697 (pupa_isgraph): New prototype.
4698 (pupa_isdigit): Likewise.
4699 (pupa_split_cmdline): Likewise.
4700 * include/pupa/normal.h: Include <pupa/arg.h>.
4701 (pupa_command): Changed the prototype of the member `func' to
4702 match the argument parsing interface. Added member `options'.
4703 (pupa_register_command): Updated to match function.
4704 (pupa_arg_parse): New prototype.
4705 (pupa_hello_init) [PUPA_UTIL]: New prototype.
4706 (pupa_hello_fini) [PUPA_UTIL]: Likewise.
4707 (pupa_ls_init) [PUPA_UTIL]: Likewise.
4708 (pupa_ls_fini) [PUPA_UTIL]: Likewise.
4709 (pupa_cat_init) [PUPA_UTIL]: Likewise.
4710 (pupa_cat_fini) [PUPA_UTIL]: Likewise.
4711 (pupa_boot_init) [PUPA_UTIL]: Likewise.
4712 (pupa_boot_fini) [PUPA_UTIL]: Likewise.
4713 (pupa_cmp_init) [PUPA_UTIL]: Likewise.
4714 (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
4715 (pupa_terminal_init) [PUPA_UTIL]: Likewise.
4716 (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
4717 * kern/disk.c: Include <pupa/file.h>.
4718 (pupa_print_partinfo): New function.
4719 * kern/dl.c: Include <pupa/env.h>.
4720 (pupa_dl_dir): Variable removed.
4721 (pupa_dl_load): Use the environment variable `prefix' instead of
4722 the variable pupa_dl_dir.
4723 (pupa_dl_set_prefix): Function removed.
4724 (pupa_dl_get_prefix): Likewise.
4725 * kern/i386/pc/init.c: Include <pupa/env.h>.
4726 (pupa_machine_init): Use the environment variable `prefix' instead of
4727 using pupa_dl_set_prefix to set the prefix.
4728 * kern/main.c: Include <pupa/env.h>.
4729 (pupa_set_root_dev): Use the environment variable `prefix' instead of
4730 using pupa_dl_get_prefix to get the prefix.
4731 * kern/misc.c: Include <pupa/env.h>.
4732 (pupa_isdigit): New function.
4733 (pupa_isgraph): Likewise.
4734 (pupa_ftoa): Likewise.
4735 (pupa_vsprintf): Added support for printing values of the type
4736 `double'. Make it possible to format variable output when using
4737 formatting like `%1.2%f'.
4738 (pupa_split_cmdline): New function.
4739 * kern/rescue.c: Include <pupa/env.h>.
4740 (next_word): Removed function.
4741 (pupa_rescue_cmd_prefix): Likewise.
4742 (pupa_rescue_cmd_set): New function.
4743 (pupa_rescue_cmd_unset): New function.
4744 (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
4745 split the command line instead of splitting it here. Added
4746 support for setting variables using the syntax `foo=bar'. Don't
4747 initialize the prefix command anymore. Initialized the set and
4748 unset commands.
4749 * normal/cmdline.c: Include <pupa/env.h>.
4750 (pupa_tab_complete): Added prototypes for print_simple_completion,
4751 print_partition_completion, add_completion, iterate_commands,
4752 iterate_dev, iterate_part and iterate_dir. Moved code to print
4753 partition information from here to kern/disk.c.
4754 (pupa_cmdline_run): Don't check if the funtion exists anymore.
4755 * normal/main.c: Include <pupa/env.h>.
4756 (pupa_rescue_cmd_normal): Use the environment variable `prefix'
4757 instead of using pupa_dl_get_prefix to get the prefix.
4758 * term/i386/pc/vga.c: Include <pupa/arg.h>.
4759 (check_vga_mem): Cast pointers to `void *' to silence a gcc
4760 warning.
4761 (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
4762 (pupa_vga_setcolor): Declare unused variables with `__attribute__
4763 ((unused))' to silence a gcc warning.
4764 (pupa_vga_setcolor): Likewise.
4765 (debug_command): Changed to match argument parsing
4766 interface changes.
4767 * util/pupa-emu.c: Include <pupa/env.h>.
4768 (options): Added 0's for unused fields to silence a gcc warning.
4769 (argp): Likewise.
4770 (main): Use the environment variable `prefix' instead of using
4771 pupa_dl_set_prefix to set the prefix. Initialize the commands ls,
4772 boot, cmp, cat and terminal. Finish the commands boot, cmp, cat
4773 and terminal.
4774
4775 * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
4776 * util/misc.c: Include <malloc.h>.
4777 (pupa_malloc): Rewritten so errors are correctly reported.
4778 (pupa_realloc): Likewise.
4779 (pupa_memalign): Likewise.
4780 (pupa_mm_init_region): Declare unused variables with
4781 `__attribute__ ((unused))' to silence a gcc warning.
4782 * normal/i386/setjmp.S: Remove tab at the end of the file to
4783 silence a gcc warning.
4784 * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
4785 variables with `__attribute__ ((unused))' to silence a gcc
4786 warning.
4787 * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
4788 local variable i unsigned to silence a gcc warning.
4789
4790 * kern/term.c: Include <pupa/misc.h>.
4791 (pupa_more_lines): New variable.
4792 (pupa_more): Likewise.
4793 (pupa_putcode): When the pager is active pause at the end of every
4794 screen.
4795 (pupa_set_more): New function.
4796 * include/pupa/term.h (pupa_set_more): New prototype.
4797
4798
3b1139cb 47992004-03-07 Yoshinori K. Okuji <okuji@enbug.org>
4800
4801 Now this project is GRUB 2 rather than PUPA. The location of
4802 the CVS repository was moved to GRUB's.
4803
4804 * configure.ac: Use bug-grub as the reporting address.
4805 Use GRUB instead of PUPA.
4806 Change the version number to 1.90.
4807
8367695c 48082004-02-24 Yoshinori K. Okuji <okuji@enbug.org>
4809
4810 * genkernsyms.sh: Updated copyright information.
4811 * genmk.rb: Likewise.
4812 * genmodsrc.sh: Likewise.
4813 * gensymlist.sh: Likewise.
4814 * boot/i386/pc/boot.S: Likewise.
4815 * boot/i386/pc/diskboot.S: Likewise.
4816 * disk/i386/pc/biosdisk.c: Likewise.
4817 * disk/i386/pc/partition.c: Likewise.
4818 * font/manager.c: Likewise.
4819 * fs/ext2.c: Likewise.
4820 * fs/fat.c: Likewise.
4821 * include/pupa/boot.h: Likewise.
4822 * include/pupa/device.h: Likewise.
4823 * include/pupa/disk.h: Likewise.
4824 * include/pupa/dl.h: Likewise.
4825 * include/pupa/elf.h: Likewise.
4826 * include/pupa/err.h: Likewise.
4827 * include/pupa/file.h: Likewise.
4828 * include/pupa/font.h: Likewise.
4829 * include/pupa/fs.h: Likewise.
4830 * include/pupa/kernel.h: Likewise.
4831 * include/pupa/loader.h: Likewise.
4832 * include/pupa/misc.h: Likewise.
4833 * include/pupa/mm.h: Likewise.
4834 * include/pupa/net.h: Likewise.
4835 * include/pupa/normal.h: Likewise.
4836 * include/pupa/rescue.h: Likewise.
4837 * include/pupa/setjmp.h: Likewise.
4838 * include/pupa/symbol.h: Likewise.
4839 * include/pupa/term.h: Likewise.
4840 * include/pupa/types.h: Likewise.
4841 * include/pupa/i386/setjmp.h: Likewise.
4842 * include/pupa/i386/types.h: Likewise.
4843 * include/pupa/i386/pc/biosdisk.h: Likewise.
4844 * include/pupa/i386/pc/boot.h: Likewise.
4845 * include/pupa/i386/pc/console.h: Likewise.
4846 * include/pupa/i386/pc/init.h: Likewise.
4847 * include/pupa/i386/pc/kernel.h: Likewise.
4848 * include/pupa/i386/pc/linux.h: Likewise.
4849 * include/pupa/i386/pc/loader.h: Likewise.
4850 * include/pupa/i386/pc/memory.h: Likewise.
4851 * include/pupa/i386/pc/multiboot.h: Likewise.
4852 * include/pupa/i386/pc/partition.h: Likewise.
4853 * include/pupa/i386/pc/time.h: Likewise.
4854 * include/pupa/i386/pc/vga.h: Likewise.
4855 * include/pupa/i386/pc/util/biosdisk.h: Likewise.
4856 * include/pupa/util/getroot.h: Likewise.
4857 * include/pupa/util/misc.h: Likewise.
4858 * include/pupa/util/resolve.h: Likewise.
4859 * kern/device.c: Likewise.
4860 * kern/disk.c: Likewise.
4861 * kern/dl.c: Likewise.
4862 * kern/err.c: Likewise.
4863 * kern/file.c: Likewise.
4864 * kern/fs.c: Likewise.
4865 * kern/loader.c: Likewise.
4866 * kern/main.c: Likewise.
4867 * kern/misc.c: Likewise.
4868 * kern/mm.c: Likewise.
4869 * kern/rescue.c: Likewise.
4870 * kern/term.c: Likewise.
4871 * kern/i386/dl.c: Likewise.
4872 * kern/i386/pc/init.c: Likewise.
4873 * kern/i386/pc/lzo1x.S: Likewise.
4874 * kern/i386/pc/startup.S: Likewise.
4875 * loader/i386/pc/chainloader.c: Likewise.
4876 * loader/i386/pc/linux.c: Likewise.
4877 * loader/i386/pc/multiboot.c: Likewise.
4878 * normal/cmdline.c: Likewise.
4879 * normal/command.c: Likewise.
4880 * normal/main.c: Likewise.
4881 * normal/menu.c: Likewise.
4882 * normal/i386/setjmp.S: Likewise.
4883 * term/i386/pc/console.c: Likewise.
4884 * term/i386/pc/vga.c: Likewise.
4885 * util/console.c: Likewise.
4886 * util/genmoddep.c: Likewise.
4887 * util/misc.c: Likewise.
4888 * util/pupa-emu.c: Likewise.
4889 * util/resolve.c: Likewise.
4890 * util/unifont2pff.rb: Likewise.
4891 * util/i386/pc/biosdisk.c: Likewise.
4892 * util/i386/pc/getroot.c: Likewise.
4893 * util/i386/pc/pupa-mkimage.c: Likewise.
4894 * util/i386/pc/pupa-setup.c: Likewise.
4895
e6eced71 48962004-02-15 Jeroen Dekkers <jeroen@dekkers.cx>
4897
4898 * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
4899 when it is EXT2_BLOCK_SIZE (data). New argument READ_HOOK, all
4900 callers changed. Set DATA->DISK->READ_HOOK to READ_HOOK before
4901 reading and reset it after reading.
4902 (pupa_ext2_close): Return PUPA_ERR_NONE.
4903
4904 * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
4905 Correct value.
4906 (struct linux_kernel_header): Add kernel_version and
4907 initrd_addr_max.
4908 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
4909 pupa_file_read succeeds.
4910 (pupa_rescue_cmd_initrd): Implement.
4911
5aded270 49122003-12-03 Marco Gerards <metgerards@student.han.nl>
4913
4914 * fs/ext2.c (pupa_ext2_label): New function.
4915 (pupa_ext2_fs): Added label.
4916 * fs/fat.c (pupa_fat_label): New function.
4917 (pupa_fat_fs): Added label.
4918 * include/pupa/fs.h (struct pupa_fs): Added prototype label.
4919
4920 * kern/misc.c (pupa_strndup): New function.
4921 * include/pupa/misc.h (pupa_strndup): New prototype.
4922
4923 * include/pupa/normal.h: Include <pupa/err.h>.
4924 (pupa_set_history): New prototype.
4925 (pupa_iterate_commands): New prototype.
4926 * normal/cmdline.c: Include <pupa/machine/partition.h>,
4927 <pupa/disk.h>, <pupa/file.h>.
4928 (hist_size): New variable.
4929 (hist_lines): Likewise.
4930 (hist_end): Likewise.
4931 (hist_used): Likewise.
4932 (pupa_set_history): New function.
4933 (pupa_history_get): Likewise.
4934 (pupa_history_add): Likewise.
4935 (pupa_history_replace): Likewise.
4936 (pupa_tab_complete): Likewise.
4937 (pupa_cmdline_run): Added tab completion and history buffer. Tab
4938 completion shows partitionnames while completing partitions, this
4939 feature was suggested by Jeff Bailey.
4940 * normal/command.c (pupa_iterate_commands): New function.
4941 * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
4942 (pupa_normal_init): Initialize history buffer.
4943 (PUPA_MOD_INIT): Likewise.
4944 (pupa_normal_fini): Free the history buffer.
4945 (PUPA_MOD_FINI): Likewise.
4946
4947 * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
4948 key.
4949
4950 * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
4951 * configure.ac [i386]: Check for regparam bug.
4952 (NESTED_FUNC_ATTR) [! i386]: Defined.
4953
1f7315a3 49542003-11-17 Marco Gerards <metgerards@student.han.nl>
4955
4956 * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
4957 (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
4958 (pupa_emu_SOURCES): New variable.
4959 (pupa_emu_LDFLAGS): Likewise.
4960 * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
4961 (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
4962 * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
4963 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
4964 * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
4965 (pupa_jmp_buf): New typedef.
4966 (pupa_setjmp) [PUPA_UTIL]: New macro.
4967 (pupa_longjmp) [PUPA_UTIL]: Likewise.
4968 * include/pupa/term.h (struct pupa_term): New member `refresh'.
4969 (pupa_refresh): New prototype.
4970 * include/pupa/util/getroot.h: New file.
4971 * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
4972 it.
4973 * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
4974 (pupa_rescue_cmd_cat): Likewise.
4975 (pupa_rescue_cmd_ls): Likewise.
4976 (pupa_rescue_cmd_testload): Likewise.
4977 (pupa_rescue_cmd_lsmod): Likewise.
4978 * normal/cmdline.c (pupa_cmdline_get): Likewise.
4979 * normal/menu.c (run_menu): Likewise.
4980 * kern/term.c (pupa_cls): Likewise.
4981 (pupa_refresh): New function.
4982 * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
4983 (pupa_normal_fini) [PUPA_UTIL]: Likewise.
4984 * util/console.c: New file.
4985
4986 * util/i386/pc/getroot.c: New file.
4987 * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
4988 (pupa_putchar): New function.
4989 (pupa_refresh): Likewise.
4990 (xgetcwd): Function moved to ...
4991 (strip_extra_slashes): Likewise.
4992 (get_prefix): Likewise.
4993 * util/i386/pc/getroot.c: ... here.
4994 (find_root_device): Function moved and renamed to...
4995 * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
4996 Changed all callers.
4997 * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
4998 and renamed to...
4999 * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
5000 Changed all callers.
5001 * util/misc.c (pupa_memalign): New function.
5002 (pupa_mm_init_region): Likewise.
5003 (pupa_register_exported_symbols): Likewise.
5004 (pupa_putchar): Function removed.
5005 * util/pupa-emu.c: New file.
5006
9a5c1ade 50072003-11-16 Jeroen Dekkers <jeroen@dekkers.cx>
5008
5009 * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
5010 (_multiboot_mod_SOURCES): New variable.
5011 (_multiboot_mod_CFLAGS): Likewise.
5012 * loader/i386/pc/multiboot.c: New file.
5013 * include/pupa/i386/pc/multiboot.h: Likewise.
5014 * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
5015 (pupa_multiboot_real_boot): New function.
5016 * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
5017 (pupa_multiboot_real_boot): New prototype.
5018 (pupa_rescue_cmd_multiboot): Likewise
5019 (pupa_rescue_cmd_module): Likewise.
5020
5021 * kern/loader.c (pupa_loader_set): Continue when
5022 pupa_loader_unload_func() fails.
5023 (pupa_loader_unset): New function.
5024 * include/pupa/loader.h (pupa_loader_unset): New prototype.
5025
5026 * kern/misc.c (pupa_stpcpy): New function.
5027 * include/pupa/misc.h (pupa_stpcpy): New prototype.
5028
8e72a9c0 50292003-11-12 Marco Gerards <metgerards@student.han.nl>
5030
5031 * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
5032 for available extensions.
5033
5034 * include/pupa/i386/pc/time.h: New file.
5035 * kern/disk.c: Include <pupa/machine/time.h>.
5036 (PUPA_CACHE_TIMEOUT): New macro.
5037 (pupa_last_time): New variable.
5038 (pupa_disk_open): Flush the cache when there was a timeout.
5039 (pupa_disk_close): Reset the timer.
5040 * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
5041 pupa_currticks.
5042 * util/misc.c: Include <sys/times.h>
5043 (pupa_get_rtc): New function.
5044
c4adbd32 50452003-11-09 Jeroen Dekkers <jeroen@dekkers.cx>
5046
5047 * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
5048 as blocks.
5049 (pupa_ext2_get_file_block): Use blocks member.
5050
5051 * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
5052 first block. Return -1 instead of pupa_errno on error.
5053
bfd30f06 50542003-10-27 Marco Gerards <metgerards@student.han.nl>
5055
5056 * README: In the pupa-mkimage example use _chain instead of chain
5057 and ext2 instead of fat.
5058 * TODO: Replace ext2fs with jfs as an example. Add an item for
5059 adding journal playback for ext2fs.
5060 * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
5061 (pkgdata_MODULES): Added ext2.mod.
5062 (ext2_mod_SOURCES): New variable.
5063 (ext2_mod_CFLAGS): Likewise.
5064 * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
5065 * include/pupa/misc.h (pupa_strncpy): New prototype.
5066 (pupa_strcat): Likewise.
5067 (pupa_strncmp): Likewise.
5068 * kern/misc.c (pupa_strcat): Enable function.
5069 (pupa_strncpy): New function.
5070 (pupa_strncmp): Likewise.
5071 * fs/ext2.c: New file.
5072
5073 * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
5074 when the read failed before retrying.
5075 * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
5076 (_FILE_OFFSET_BITS): Likewise.
5077 * configure.ac: Added AC_SYS_LARGEFILE.
5078
98d15063 50792003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
5080
5081 * genmk.rb (PModule#rule): Make sure to get only symbol names
5082 from the output of nm.
5083 Reported by Robert Millan <zeratul2@wanadoo.es>.
5084
18d9c7cd 50852003-09-25 Yoshinori K. Okuji <okuji@enbug.org>
5086
5087 I forgot to check in these changes for a long time. This adds
5088 incomplete support for VGA console, and this is still very
5089 buggy. Also, a lot of consideration is required for I18N,
5090 UNICODE, and VGA font issues. Therefore, assume that this is
5091 such that "better than nothing".
5092
5093 * font/manager.c: New file.
5094 * include/pupa/font.h: Likewise.
5095 * include/pupa/i386/pc/vga.h: Likewise.
5096 * term/i386/pc/vga.c: Likewise.
5097 * util/unifont2pff.rb: Likewise.
5098
5099 * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
5100 (pkgdata_MODULES): Added vga.mod and font.mod.
5101 (vga_mod_SOURCES): New variables.
5102 (vga_mod_CFLAGS): Likewise.
5103 (font_mod_SOURCES): Likewise.
5104 (font_mod_CFLAGS): Likewise.
5105
5106 * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
5107
5108 * include/pupa/term.h: Include pupa/err.h.
5109 (struct pupa_term): Added init and fini.
5110 Changed the argument of putchar to pupa_uint32_t.
5111
5112 * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
5113 (pupa_console_real_putchar): New prototype.
5114 (pupa_console_putchar): Removed.
5115 (pupa_console_checkkey): Exported.
5116 (pupa_console_getkey): Likewise.
5117
5118 * kern/misc.c (pupa_vsprintf): Add support for UNICODE
5119 characters.
5120
5121 * kern/term.c (pupa_term_set_current): Rewritten.
5122 (pupa_putchar): Likewise.
5123 (pupa_putcode): New function.
5124
5125 * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
5126 (pupa_console_real_putchar): ... this.
5127 (pupa_vga_set_mode): New function.
5128 (pupa_vga_get_font): Likewise.
5129
5130 * normal/command.c: Include pupa/term.h.
5131 (terminal_command): New function.
5132 (pupa_command_init): Register the command "terminal".
5133
5134 * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
5135 (DISP_UP): Likewise.
5136 (DISP_RIGHT): Likewise.
5137 (DISP_DOWN): Likewise.
5138 (DISP_HLINE): Likewise.
5139 (DISP_VLINE): Likewise.
5140 (DISP_UL): Likewise.
5141 (DISP_UR): Likewise.
5142 (DISP_LL): Likewise.
5143 (DISP_LR): Likewise.
5144
5145 * term/i386/pc/console.c (pupa_console_putchar): New function.
5146
977329f5 51472003-02-08 NIIBE Yutaka <gniibe@m17n.org>
5148
5149 * util/resolve.c (pupa_util_resolve_dependencies): BUG
5150 FIX. Reverse the path_list.
5151
5152 * include/pupa/normal.h: Export pupa_register_command and
5153 pupa_unregister_command.
5154
5155 * hello/hello.c (pupa_cmd_hello): New module.
5156 * conf/i386-pc.rmk: Added hello.mod.
5157
1f5ab428 51582003-01-31 Yoshinori K. Okuji <okuji@enbug.org>
5159
5160 * kern/i386/pc/lzo1x.S: New file.
5161
5162 * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
5163 (compress_kernel): New variable.
5164 (generate_image): Heavily modified to support compressing a
5165 large part of the core image.
5166
5167 * util/misc.c (pupa_util_read_image): Fix a file descriptor
5168 leak.
5169 (pupa_util_load_image): New function.
5170
5171 * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
5172 (pupa_compressed_size): New variable.
5173 (codestart): Enable Gate A20 here.
5174 Decompress the compressed part of the core image.
5175 Rearrange the code to put functions and variables which are
5176 required for initialization in the non-compressed part.
5177 Include lzo1x.S.
5178
5179 * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
5180 here.
5181
5182 * include/pupa/util/misc.h (pupa_util_write_image): Declared.
5183
5184 * include/pupa/i386/pc/kernel.h
5185 (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
5186 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
5187 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
5188 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
5189 (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
5190
5191 * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
5192
5193 * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
5194 (Utility#rule): Likewise.
5195
5196 * configure.ac: Check if LZO is available.
5197
ce5bf700 51982003-01-20 Yoshinori K. Okuji <okuji@enbug.org>
5199
5200 * include/pupa/normal.h: New file.
5201 * include/pupa/setjmp.h: Likewise.
5202 * include/pupa/i386/setjmp.h: Likewise.
5203 * normal/cmdline.c: Likewise.
5204 * normal/command.c: Likewise.
5205 * normal/main.c: Likewise.
5206 * normal/menu.c: Likewise.
5207 * normal/i386/setjmp.S: Likewise.
5208
5209 * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
5210 (pupa_rescue_cmd_initrd): Likewise.
5211
5212 * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
5213 Likewise.
5214
5215 * kern/i386/pc/startup.S (translation_table): New variable.
5216 (translate_keycode): New function.
5217 (pupa_console_getkey): Call translate_keycode.
5218
5219 * kern/rescue.c (attempt_normal_mode): New function.
5220 (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
5221 it failed, print a message.
5222
5223 * kern/mm.c (pupa_real_malloc): Print more information when a
5224 free magic is broken.
5225 (pupa_free): If the first free header is not free actually, set
5226 it to P.
5227
5228 * kern/main.c (pupa_load_normal_mode): Just load the module
5229 "normal".
5230 (pupa_main): Don't print the message
5231 "Entering into rescue mode..." here.
5232
5233 * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
5234 Declared.
5235 (pupa_rescue_cmd_initrd): Likewise.
5236 (pupa_rescue_cmd_initrd): Likewise.
5237
5238 * include/pupa/symbol.h (FUNCTION): Specify the type.
5239 (VARIABLE): Likewise.
5240
5241 * include/pupa/err.h (pupa_err_t): Added
5242 PUPA_ERR_UNKNOWN_COMMAND.
5243
5244 * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
5245 (pupa_dl_get_prefix): Likewise.
5246
5247 * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
5248 Added _chain.mod and _linux.mod instead of chain.mod and
5249 linux.mod.
5250 (chain_mod_SOURCES): Renamed to ...
5251 (_chain_mod_SOURCES): ... this.
5252 (chain_mod_CFLAGS): Renamed to ...
5253 (_chain_mod_CFLAGS): ... this.
5254 (linux_mod_SOURCES): Renamed to ...
5255 (_linux_mod_SOURCES): ... this.
5256 (linux_mod_CFLAGS): Renamed to ...
5257 (_linux_mod_CFLAGS): ... this.
5258 (normal_mod_SOURCES): New variable.
5259 (normal_mod_CFLAGS): Likewise.
5260 (normal_mod_ASFLAGS): Likewise.
5261
52622003-01-18 Yoshinori K. Okuji <okuji@enbug.org>
5263
5264 * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
5265 possible.
5266
5267 * kern/dl.c (pupa_dl_ref): Refer dependending modules
5268 recursively.
5269 (pupa_dl_unref): Unrefer depending modules recursively.
5270 Don't call pupa_dl_unload implicitly, because PUPA can crash if
5271 a module is unloaded before one depending on that module is
5272 unloaded.
5273 (pupa_dl_unload): Unload depending modules explicitly,
5274 if possible.
5275
c04da074 52762003-01-17 Yoshinori K. Okuji <okuji@enbug.org>
5277
5278 * include/pupa/i386/pc/linux.h: New file.
5279 * loader/i386/pc/linux.c: Likewise.
5280
5281 * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
5282 Removed.
5283 (pupa_chainloader_unload): Return PUPA_ERR_NONE.
5284 (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
5285 of PUPA_CHAINLOADER_BOOT_SECTOR.
5286
5287 * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
5288 (pupa_linux_prot_size): New variable.
5289 (pupa_linux_tmp_addr): Likewise.
5290 (pupa_linux_real_addr): Likewise.
5291 (pupa_linux_boot_zimage): New function.
5292 (pupa_linux_boot_bzimage): Likewise.
5293
5294 * kern/i386/pc/init.c (struct mem_region): New structure.
5295 (MAX_REGIONS): New macro.
5296 (mem_regions): New variable.
5297 (num_regions): Likewise.
5298 (pupa_os_area_addr): Likewise.
5299 (pupa_os_area_size): Likewise.
5300 (pupa_lower_mem): Likewise.
5301 (pupa_upper_mem): Likewise.
5302 (add_mem_region): New function.
5303 (compact_mem_regions): Likewise.
5304 (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
5305 the size of the conventional memory and that of so-called upper
5306 memory (before the first memory hole).
5307 Instead of adding each found region to free memory, use
5308 add_mem_region and add them after removing overlaps.
5309 Also, add only 1/4 of the upper memory to free memory. The rest
5310 is used for loading OS images. Maybe this is ad hoc, but this
5311 makes it much easier to relocate OS images when booting.
5312
5313 * kern/rescue.c (pupa_rescue_cmd_module): Removed.
5314 (pupa_enter_rescue_mode): Don't register initrd and module.
5315
5316 * kern/mm.c: Include pupa/dl.h.
5317
5318 * kern/main.c: Include pupa/file.h and pupa/device.h.
5319
5320 * kern/loader.c (pupa_loader_load_module_func): Removed.
5321 (pupa_loader_load_module): Likewise.
5322
5323 * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
5324 ``.o''.
5325
5326 * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
5327 (pupa_linux_tmp_addr): Likewise.
5328 (pupa_linux_real_addr): Likewise.
5329 (pupa_linux_boot_zimage): Likewise.
5330 (pupa_linux_boot_bzimage): Likewise.
5331
5332 * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
5333 (pupa_upper_mem): Likewise.
5334 (pupa_gate_a20): Don't export, because turning off Gate A20 in a
5335 module is too dangerous.
5336
5337 * include/pupa/loader.h (pupa_os_area_addr): Declared.
5338 (pupa_os_area_size): Likewise.
5339 (pupa_loader_set): Remove the first argument. Loader doesn't
5340 manage modules or initrd any longer.
5341 (pupa_loader_load_module): Removed.
5342
5343 * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
5344 (linux_mod_SOURCES): New variable.
5345 (linux_mod_CFLAGS): Likewise.
5346
a13f9237 53472003-01-07 Yoshinori K. Okuji <okuji@enbug.org>
5348
5349 * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
5350 the length of a blocklist correctly.
5351
5352 * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
5353 Use ioctl only if the OS file is a block device.
5354 (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
5355 not very useful for normal files.
5356
5357 * kern/main.c (pupa_set_root_dev): New function.
5358 (pupa_load_normal_mode): Likewise.
5359 (pupa_main): Call those above.
5360
5361 * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
5362 pupa_uint16_t.
5363
5364 * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
5365
a5ffe966 53662003-01-06 Yoshinori K. Okuji <okuji@enbug.org>
5367
5368 * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
5369 (setup): Configure the installed partition information and the
5370 dl prefix.
5371
5372 * loader/i386/pc/chainloader.c (my_mod): New variable.
5373 (pupa_chainloader_unload): New function.
5374 (pupa_rescue_cmd_chainloader): Refer itself.
5375 (PUPA_MOD_INIT): Save its own module in MY_MOD.
5376
5377 * kern/i386/pc/startup.S (install_partition): Removed.
5378 (version_string): Likewise.
5379 (config_file): Likewise.
5380 (pupa_install_dos_part): New variable.
5381 (pupa_install_bsd_part): Likewise.
5382 (pupa_prefix): Likewise.
5383 (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
5384
5385 * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
5386 and pupa/misc.h.
5387 (make_install_device): New function.
5388 (pupa_machine_init): Set the dl prefix.
5389
5390 * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
5391 (buf): Renamed to ...
5392 (linebuf): ... this.
5393 (pupa_rescue_cmd_prefix): New function.
5394 (pupa_rescue_cmd_insmod): Likewise.
5395 (pupa_rescue_cmd_rmmod): Likewise.
5396 (pupa_rescue_cmd_lsmod): Likewise.
5397 (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
5398 rmmod and lsmod.
5399
5400 * kern/mm.c (pupa_memalign): If failed even after invalidating
5401 disk caches, unload unneeded modules and retry.
5402
5403 * kern/misc.c (pupa_memmove): New function.
5404 (pupa_memcpy): Removed.
5405 (pupa_strcpy): New function.
5406 (pupa_itoa): Made static.
5407
5408 * kern/dl.c (pupa_dl_iterate): New function.
5409 (pupa_dl_ref): Likewise.
5410 (pupa_dl_unref): Likewise.
5411 (pupa_dl_unload): Return if succeeded or not.
5412 (pupa_dl_unload_unneeded): New function.
5413 (pupa_dl_unload_all): Likewise.
5414 (pupa_dl_init): Renamed to ...
5415 (pupa_dl_set_prefix): ... this.
5416 (pupa_dl_get_prefix): New function.
5417
5418 * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
5419 (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
5420 (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
5421 (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
5422 (pupa_install_dos_part): Declared.
5423 (pupa_install_bsd_part): Likewise.
5424 (pupa_prefix): Likewise.
5425 (pupa_boot_drive): Likewise.
5426
5427 * include/pupa/types.h: Fix a typo.
5428
5429 * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
5430 pupa_memmove.
5431 (pupa_memmove): Declared.
5432 (pupa_strcpy): Likewise.
5433
5434 * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
5435 pupa_mod_init takes one argument, its own module.
5436 (pupa_dl_unload_unneeded): Declared.
5437 (pupa_dl_unload_all): Likewise.
5438 (pupa_dl_ref): Likewise.
5439 (pupa_dl_unref): Likewise.
5440 (pupa_dl_iterate): Likewise.
5441 (pupa_dl_init): Renamed to ...
5442 (pupa_dl_set_prefix): ... this.
5443 (pupa_dl_get_prefix): Declared.
5444
5445 * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
5446 (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
5447 unloaded.
5448 (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
5449 (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
5450
5451 * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
5452 -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
5453
012d7999 54542003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
5455
5456 * util/i386/pc/pupa-setup.c (setup): Define the internal
5457 function find_first_partition_start at the top level, because GCC
5458 3.0.x cannot compile internal functions in deeper scopes
5459 correctly.
5460 (find_root_device): Use lstat instead of stat.
5461 Don't follow symbolic links.
5462 Fix the path-constructing code.
5463
5464 * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
5465 (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
5466 by a BLKGETSIZE ioctl first, because block devices don't fill
5467 the member st_mode of the structure stat on Linux.
5468 [__linux__] (linux_find_partition): Use a temporary buffer
5469 REAL_DEV for the working space. Copy it to DEV before returning.
5470 (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
5471 buffer cache consistent.
5472 (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
5473 strncmp. The previous value was merely wrong.
5474 (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
5475
5476 * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
5477 FAT size is 12. The previous value was merely wrong.
5478
5479 * kern/main.c (pupa_main): Don't split the starting message from
5480 newlines.
5481
5482 * kern/term.c (pupa_putchar): Put CR after LF instead of before
5483 LF, because BIOS goes crazy about character attributes in this
5484 case.
5485
1cc73a62 54862003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
5487
5488 * include/i386/pc/util/biosdisk.h: New file.
5489 * util/i386/pc/biosdisk.c: Likewise.
5490 * util/i386/pc/pupa-setup.c: Likewise.
5491
5492 * Makefile.in (INCLUDE_DISTFILES): Added
5493 include/pupa/i386/pc/util/biosdisk.h.
5494 (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
5495 directory util/i386/pc.
5496 (install-local): Added a rule for sbin_UTILITIES.
5497 (uninstall): Likewise.
5498
5499 * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
5500
5501 * util/misc.c (xrealloc): New function.
5502 (pupa_malloc): Likewise.
5503 (pupa_free): Likewise.
5504 (pupa_realloc): Likewise.
5505 (pupa_stop): Likewise.
5506 (pupa_putchar): Likewise.
5507
5508 * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
5509
5510 * include/pupa/util/misc.h (xrealloc): Declared.
5511
5512 * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
5513 macro.
5514 (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
5515 (PUPA_BOOT_MACHINE_BPB_END): ... this.
5516
5517 * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
5518 [PUPA_UTIL] (pupa_fat_fini): Likewise.
5519
5520 * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
5521 way should be implemented.
5522 [PUPA_UTIL] (pupa_fat_fini): Likewise.
5523
5524 * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
5525 the size of NAME for safety.
5526 (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
5527 0x88.
5528
5529 * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
5530 (pupa_setup_SOURCES): Likewise.
5531
5532 * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
5533
08b70fe8 55342002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
5535
5536 * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
5537 bunch of pushl's from pusha, because this destroys the return
5538 value.
5539
62ddcc8f 55402002-12-28 Yoshinori K. Okuji <okuji@enbug.org>
5541
5542 Use -mrtd and -mregparm=3 to reduce the generated code sizes.
5543 This means that any missing prototypes could be fatal. Also, you
5544 must take care when writing assembly code. See the comments at
5545 the beginning of startup.S, for more details.
5546
5547 * kern/i386/pc/startup.S (pupa_halt): Modified for the new
5548 compilation mechanism.
5549 (pupa_chainloader_real_boot): Likewise.
5550 (pupa_biosdisk_rw_int13_extensions): Likewise.
5551 (pupa_biosdisk_rw_standard): Likewise.
5552 (pupa_biosdisk_check_int13_extensions): Likewise.
5553 (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
5554 (pupa_biosdisk_get_diskinfo_standard): Likewise.
5555 (pupa_get_memsize): Likewise.
5556 (pupa_get_mmap_entry): Likewise.
5557 (pupa_console_putchar): Likewise.
5558 (pupa_console_setcursor): Likewise.
5559 (pupa_getrtsecs): Use pushl instead of push.
5560
5561 * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
5562 memory instead of the stack for a mmap entry, because some
5563 BIOSes may ignore the maximum size and overflow.
5564
5565 * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
5566
5567 * genmk.rb (PModule#rule): Compile automatically generated
5568 sources with module-specific CFLAGS as well as other sources.
5569
9962ed99 55702002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
5571
5572 * configure.ac: Check ld.
5573 Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
5574 respectively, before checking endianness and sizes.
5575
5576 * Makefile.in (LD): New variable.
5577
abdfc3c5 55782002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
5579
5580 * Makefile.in (BUILD_CC): CC -> BUILD_CC.
5581
6a161fa9 55822002-12-27 Yoshinori K. Okuji <okuji@enbug.org>
5583
5584 * Changelog: New file.
5585