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